fix button daily
parent
2696d34e92
commit
f39712f74b
|
|
@ -54,7 +54,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
|
||||
<?php if ($model->load(Yii::$app->request->get())) { ?>
|
||||
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<h5 class="card-title">
|
||||
<?= $this->title . ' :' . ' ' . Yii::$app->pathology->thaiDate($model->date_start) . ' ถึง ' . Yii::$app->pathology->thaiDate($model->date_end) ?></span>
|
||||
|
|
@ -62,14 +62,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
?></h5>
|
||||
|
||||
<div class="d-flex gap-2 justify-content-end mt-4">
|
||||
<?= PrintThis::widget([
|
||||
'htmlOptions' => [
|
||||
'id' => 'PrintThis',
|
||||
'btnClass' => 'btn btn-info',
|
||||
'btnId' => 'btnPrintThis',
|
||||
'btnText' => 'พิมพ์หน้านี้',
|
||||
'btnIcon' => 'ri-printer-line'
|
||||
],
|
||||
<?= Html::button('<i class="ri-printer-line"></i> พิมพ์หน้านี้', [
|
||||
'class' => 'btn btn-info',
|
||||
'onclick' => 'printContent("print-area")'
|
||||
]) ?>
|
||||
<?php $this->registerCss("
|
||||
@media print {
|
||||
|
|
@ -80,12 +75,11 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
}
|
||||
}
|
||||
") ?>
|
||||
|
||||
<?= Html::a('<i class="ri-file-excel-2-line"></i> MS Excel', '#', ['id' => 'btnExcel', 'class' => 'btn btn-success']) ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="PrintThis">
|
||||
<div id="print-area">
|
||||
<div class="mt-4">
|
||||
<div class="table-outer">
|
||||
<div class="table-responsive">
|
||||
|
|
@ -127,12 +121,12 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
|
||||
<?php $this->registerJs("
|
||||
<?php $this->registerJs("
|
||||
$(\"#btnExcel\").click(function(){
|
||||
$(\"#dailyDetail\").tableExport({
|
||||
type: 'excel',
|
||||
|
|
@ -141,4 +135,18 @@ $(\"#btnExcel\").click(function(){
|
|||
});
|
||||
});
|
||||
") ?>
|
||||
|
||||
<script>
|
||||
function printContent(el) {
|
||||
console.log('printContent function triggered');
|
||||
var printContents = document.getElementById(el).innerHTML;
|
||||
var originalContents = document.body.innerHTML;
|
||||
|
||||
document.body.innerHTML = printContents;
|
||||
|
||||
window.print();
|
||||
|
||||
document.body.innerHTML = originalContents;
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
|
@ -51,12 +51,12 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
|
||||
|
||||
<?php if ($model->load(Yii::$app->request->get())) { ?>
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
|
||||
<div class="d-flex gap-2 justify-content-end mt-4">
|
||||
<?= Html::button('<i class="ri-printer-line"></i> Print', [
|
||||
'class' => 'btn btn-warning',
|
||||
<?= Html::button('<i class="ri-printer-line"></i> พิมพ์หน้านี้', [
|
||||
'class' => 'btn btn-info',
|
||||
'onclick' => 'printContent("print-area")'
|
||||
]) ?>
|
||||
<?php $this->registerCss("
|
||||
|
|
@ -121,11 +121,11 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
|
||||
<?php $this->registerJs("
|
||||
<?php $this->registerJs("
|
||||
$(\"#btnExcel\").click(function(){
|
||||
$(\"#dailyDetail\").tableExport({
|
||||
type: 'excel',
|
||||
|
|
@ -135,8 +135,8 @@ $(\"#btnExcel\").click(function(){
|
|||
});
|
||||
") ?>
|
||||
|
||||
<script>
|
||||
function printContent(el) {
|
||||
<script>
|
||||
function printContent(el) {
|
||||
console.log('printContent function triggered');
|
||||
var printContents = document.getElementById(el).innerHTML;
|
||||
var originalContents = document.body.innerHTML;
|
||||
|
|
@ -146,6 +146,6 @@ $(\"#btnExcel\").click(function(){
|
|||
window.print();
|
||||
|
||||
document.body.innerHTML = originalContents;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
|
@ -54,7 +54,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
|
||||
<?php if ($model->load(Yii::$app->request->get())) { ?>
|
||||
|
||||
<div class="card shadow">
|
||||
<div class="card shadow">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<div class="card-title">
|
||||
|
||||
|
|
@ -62,8 +62,8 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
?></div>
|
||||
|
||||
<div class="d-flex gap-2 justify-content-end mt-4">
|
||||
<?= Html::button('<i class="ri-printer-line"></i> Print', [
|
||||
'class' => 'btn btn-warning',
|
||||
<?= Html::button('<i class="ri-printer-line"></i> พิมพ์หน้านี้', [
|
||||
'class' => 'btn btn-info',
|
||||
'onclick' => 'printContent("print-area")'
|
||||
]) ?>
|
||||
<?php $this->registerCss("
|
||||
|
|
@ -127,12 +127,12 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
|
||||
<?php $this->registerJs("
|
||||
<?php $this->registerJs("
|
||||
$(\"#btnExcel\").click(function(){
|
||||
$(\"#dailyDetail\").tableExport({
|
||||
type: 'excel',
|
||||
|
|
@ -142,8 +142,8 @@ $(\"#btnExcel\").click(function(){
|
|||
});
|
||||
") ?>
|
||||
|
||||
<script>
|
||||
function printContent(el) {
|
||||
<script>
|
||||
function printContent(el) {
|
||||
console.log('printContent function triggered');
|
||||
var printContents = document.getElementById(el).innerHTML;
|
||||
var originalContents = document.body.innerHTML;
|
||||
|
|
@ -153,6 +153,6 @@ $(\"#btnExcel\").click(function(){
|
|||
window.print();
|
||||
|
||||
document.body.innerHTML = originalContents;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
|
@ -54,15 +54,15 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
|
||||
<?php if ($model->load(Yii::$app->request->get())) { ?>
|
||||
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card shadow mb-3">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<div class="card-title">
|
||||
<?php //= $pathologist->realname
|
||||
?></div>
|
||||
|
||||
<div class="d-flex gap-2 justify-content-end mt-4">
|
||||
<?= Html::button('<i class="ri-printer-line"></i> Print', [
|
||||
'class' => 'btn btn-warning',
|
||||
<?= Html::button('<i class="ri-printer-line"></i> พิมพ์หน้านี้', [
|
||||
'class' => 'btn btn-info',
|
||||
'onclick' => 'printContent("print-area")'
|
||||
]) ?>
|
||||
|
||||
|
|
@ -140,13 +140,13 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
<?php $this->registerJsFile(Yii::getAlias('@web') . '/js/tableexport-xls-bold-headers.js', ['depends' => ['yii\web\JqueryAsset']]) ?>
|
||||
|
||||
<?php $this->registerJs("
|
||||
<?php $this->registerJs("
|
||||
$(\"#btnExcel\").click(function(){
|
||||
$(\"#dailyDetail\").tableExport({
|
||||
type: 'excel',
|
||||
|
|
@ -156,8 +156,8 @@ $(\"#btnExcel\").click(function(){
|
|||
});
|
||||
") ?>
|
||||
|
||||
<script>
|
||||
function printContent(el) {
|
||||
<script>
|
||||
function printContent(el) {
|
||||
console.log('printContent function triggered');
|
||||
var printContents = document.getElementById(el).innerHTML;
|
||||
var originalContents = document.body.innerHTML;
|
||||
|
|
@ -167,6 +167,6 @@ $(\"#btnExcel\").click(function(){
|
|||
window.print();
|
||||
|
||||
document.body.innerHTML = originalContents;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
Loading…
Reference in New Issue