title = 'Report MP'; ?> registerCssFile(Yii::getAlias('@web') . '/js/datepickerth/css/bootstrap-datepicker.css')?> registerJsFile('//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.min.js', ['depends' => ['class' => 'yii\web\JqueryAsset']])?> registerJsFile('//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/locales/bootstrap-datepicker.th.min.js', ['depends' => ['class' => 'yii\web\JqueryAsset']])?> registerJsFile(Yii::getAlias('@web') . '/js/datepickerth/js/bootstrap-datepicker-BE.js', ['depends' => ['class' => 'yii\web\JqueryAsset']])?> registerJs(" $('.datepicker').datepicker({ format: 'dd/mm/yyyy', todayBtn: true, autoclose: true, todayHighlight: true, language: 'th', //เปลี่ยน label ต่างของ ปฏิทิน ให้เป็น ภาษาไทย (ต้องใช้ไฟล์ bootstrap-datepicker.th.min.js นี้ด้วย) thaiyear: true //Set เป็นปี พ.ศ. }).datepicker(); //กำหนดเป็นวันปัจุบัน ")?>
one(); if ($const->load(Yii::$app->request->get())) { $const_name = $_GET['ConstServiceCharge']['search']; $const->search = $const_name; if($const_name){ $matches = "'".implode("','", $const_name)."'"; $AndRight = "and s.name in (".$matches.") "; $AndDate = "and s.register_at between '".Yii::$app->iop->searchDateStart($_GET['ConstServiceCharge']['date_start'])."' and '".Yii::$app->iop->searchDateStart($_GET['ConstServiceCharge']['date_end'])."' "; }else{ $AndRight = ""; $AndDate = ""; $matches = ""; } }else{ $AndRight = ""; $AndDate = ""; $matches = ""; $const_name =""; } //echo $AndRight; $form = ActiveForm::begin(['method' => 'get', 'action' => 'report1'])?>
field($const, 'date_start')->textInput(['maxlength' => true, 'class' => 'form-control datepicker'])?>
field($const, 'date_end')->textInput(['maxlength' => true, 'class' => 'form-control datepicker'])?>
field($const, 'search')->widget(Select2::classname(), [ 'data' => ArrayHelper::map(ConstServiceCharge::find() ->select('name') ->andwhere("lab = 'molecular' ") ->all() ,'name','name'), 'options' => ['placeholder' => 'Select receivers...', 'multiple' => true], 'pluginOptions' => [ 'tags' => true, 'maximumInputLength' => 10 ], ]); ?>
ค้นหา', ['class' => 'btn btn-success'])?>
[ 'id' => 'PrintThis', 'btnClass' => 'btn btn-info', 'btnId' => 'btnPrintThis', 'btnText' => 'พิมพ์หน้านี้', 'btnIcon' => 'fa fa-print' ], ]) ?> ส่งออกเป็นไฟล์ EXCEL registerJs('$("[id$=idExcelHisto]").click(function(e) { window.open(\'data:application/vnd.ms-excel,\' + encodeURIComponent( $(\'div[id$=PrintThis]\').html())); e.preventDefault(); });') ?> registerCss(" @media print { .noprint {display:none !important;} a:link:after, a:visited:after { display: none; content: \"\"; } } ") ?>

title ?>

TEST (".$matches.")
".$_GET['ConstServiceCharge']['date_start']." - ".$_GET['ConstServiceCharge']['date_end']."

"; }?>
getDb(); $command = $connection->createCommand(" select s.id , s.name , s.id_case , s.title , s.patient_name , s.age , s.age_unit , s.hospital , s.register_at , s.pathologist, s.status ,t.result ,m.clinical_diagnosis from stat_service_charge as s join molecular_test as t on t.id_case=s.id_case join case_molecular as m on m.id_case=s.id_case where s.lab = 'molecular' ".$AndRight." ".$AndDate." "); if($const_name){ $result = $command->queryAll(); $i=0; $case =""; foreach($result as $p){ echo ""; } } //print_r($price); ?>
id_case TEST title patient_name age age_unit hospital register_at pathologist status result clinical_diagnosis
".$p['id_case']." ".$p['name']." ".$p['title']." ".$p['patient_name']." ".$p['age']." ".$p['age_unit']." ".$p['hospital']." ".$p['register_at']." ".$p['pathologist']." ".$p['status']." ".$p['result']." ".$p['clinical_diagnosis']."