title = 'All Task'; use yii\grid\GridView; use yii\helpers\Html; use kartik\icons\Icon; use yii\helpers\ArrayHelper; use common\models\ConstStatus; use common\models\ConstServiceCharge; use yii\widgets\MaskedInput; use yii\widgets\Pjax; use yii\widgets\ActiveForm; ?> render('/layouts/_menu') ?>

ค้นหา

'case_search']) ?>
field($searchCase, 'id_case')->widget(MaskedInput::className(), [ 'mask' => 'AA99-99999', 'options' => [ 'class' => 'form-control input-lg', 'autofocus' => true, 'style' => 'font-weight: bold' ] ]) ?> ค้นหา', ['class' => 'btn btn-info']) ?>

title ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'class' => 'yii\grid\CheckboxColumn', 'checkboxOptions' => function($model) { return ['value' => $model->fish->id_case]; } ,'contentOptions' => ['class' => 'CheckboxColumn'], ], [ 'attribute' => '', 'format' => 'raw', 'value' => function ($model) { return "" . Html::a("Edit", ['take', 'id_case' => $model->fish->id_case, 'p' => '79', 'a' => 'edit'], ['class' => 'btn btn-xs btn-warning']) . " " . Html::a("Open", ['take', 'id_case' => $model->fish->id_case, 'p' => '79'], ['class' => 'btn btn-xs btn-info']); } ], [ 'label' => 'Worksheet', 'format' => 'raw', 'value' => function ($model) { $path = $model->fish_type_id == 725 ? 'dish' : 'fish'; return Html::a('',['worksheet-'.$path.'','id_case'=>$model->fish->id_case],['class'=>'btn btn-primary btn-sm','target' => '_blank' , 'title'=>'prognostic factor panel worksheet']); } ], /*[ 'attribute' => '', 'format' => 'raw', 'value' => function($model){ if($model['status_id'] =='12'){ return Html::a("Report", ['/report/case/fish', 'id_case' => $model->fish->id_case ,'mode'=>'final'], ['class' => 'btn btn-xs btn-warning']); }else{ return ""; } } ],*/ /*[ 'attribute' => 'fish.id_case', 'filter' => Html::activeTextInput($searchModel, 'search_id_case', ['class' => 'form-control']), ],*/ [ 'attribute' => 'fish.id_case', 'filter' => Html::activeTextInput($searchModel, 'search_id_case', ['class' => 'form-control']), 'format' => 'raw', 'value' => function($model){ return $model->fish->id_case.' '.Yii::$app->iop->getCaseDate($model->fish->id_case); } ], [ 'attribute' => 'fish_type_id', 'format' => 'raw', 'filter' => ArrayHelper::map(ConstServiceCharge::find()->where(['lab' => 'fish'])->all(), 'id', 'name'), 'value' => function ($model) { return $model->fishType->name; } ], //'fish.id_case', //'fish.patient.name', [ 'attribute' => 'fish.patient.name', 'filter' => Html::activeTextInput($searchModel, 'search_name', ['class' => 'form-control']), ], [ 'attribute' => 'fish.patient.age', 'value' => function ($model) { return $model->fish->patient->age . ' ' . $model->fish->patient->age_unit; }, 'filter' => Html::activeTextInput($searchModel, 'search_age', ['class' => 'form-control']), ], [ 'attribute' => 'fish.block_no', 'filter' => Html::activeTextInput($searchModel, 'search_block_no', ['class' => 'form-control']), ], [ 'attribute' => 'fish.block_in', 'filter' => Html::activeTextInput($searchModel, 'search_block_in', ['class' => 'form-control']), ], [ 'attribute' => 'fish.patient.hospital.name', 'filter' => Html::activeTextInput($searchModel, 'search_hospital', ['class' => 'form-control']), ], [ 'attribute' => 'fish.register_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'search_register_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'operate_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'operate_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'send_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'send_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'report_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'report_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'fish.return_at', 'filter' => MaskedInput::widget([ 'model' => $searchModel, 'attribute' => 'search_return_at', 'mask' => '99/99/9999' ]), ], [ 'attribute' => 'operate_id', 'value' => function ($model) { return $model->operate_id > 1 ? $model->operate->realname : ''; } ], [ 'label' => 'พยาธิแพทย์', 'attribute' => 'pathologist.realname', 'value' => function ($model) { return (isset($model->pathologist) && $model->pathologist->id > 1) ? $model->pathologist->realname : null; } ], //'fish.patient.hospital.name', //'fish.register_at', [ 'attribute' => 'status_id', 'value' => function ($model) { return $model['status']['status']; }, 'filter' => Html::activeDropDownList($searchModel, 'status_id', ArrayHelper::map(ConstStatus::find()->all(), 'id', 'status'), ['class' => 'form-control', 'prompt' => 'เลือกสถานะ']), ], 'fish.document_no', [ 'label' => 'tracking', 'format' => 'raw', 'value' => function($model){ return "".$model->fish->tracking.""; } ], /*[ 'label' => '', 'format' => 'raw', 'value' => function($model){ return $model['status_id'] == 1 ? Html::a('', ['/register/case-update/fish', 'id_case' => $model->fish->id_case], ['class' => 'btn btn-xs btn-warning', 'title' => 'แก้ไข', 'target' => '_blank', 'data-pjax' => 0]) : Html::a('', ['preview', 'id_case' => $model->fish->id_case], ['class' => 'btn btn-xs btn-info', 'title' => 'เปิดดู', 'target' => '_blank', 'data-pjax' => 0]); } ],*/ ] ]); echo "
".Html::label('วันที่ส่งคืน', 'label'); echo MaskedInput::widget([ 'class' => 'form-control', 'name' => 'return_at', 'mask'=>'99/99/9999', ]); echo "ตัวอย่าง 30/10/2563
"; echo "
".Html::label('เลขที่หนังสือ', 'label')." ".Html::textInput('document_no','',['class' => 'form-control']); echo "
"; echo "
".Html::label('วันที่หนังสือ', 'label'); echo MaskedInput::widget([ 'class' => 'form-control', 'name' => 'document_at', 'mask'=>'99/99/9999', ]); echo "ตัวอย่าง 30/10/2563
"; echo "
".Html::label('Tracking', 'label')." ".Html::textInput('tracking','',['class' => 'form-control']); echo "
"; echo "

".Html::submitButton(' Save', ['class' => 'btn btn-success'])."
"; ?>