%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/eoffice/frontend/modules/supa3/views/default/ |
Upload File : |
<?php use yii\helpers\Html; use kartik\grid\GridView; use yii\helpers\ArrayHelper; use backend\modules\departments\models\Departments; use kartik\export\ExportMenu; use dixonsatit\thaiYearFormatter\ThaiYearFormatter; use kartik\daterange\DateRangePicker; use dosamigos\datepicker\DatePicker; use yii\bootstrap\Modal; use yii\helpers\Url; /* @var $this yii\web\View */ /* @var $searchModel common\models\Supa1Search */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'ใบสั่งซื้อ'; $this->params['breadcrumbs'][] = $this->title; $asset = new backend\theme\MetronicAsset(); $asset::register($this); $directoryAsset = Yii::$app->assetManager->getPublishedUrl($asset->sourcePath); ?> <?php $gridColumns = [ [ 'attribute' => 'num', 'vAlign' => 'middle', 'width' => '5%', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'date', 'hAlign' => 'center', // 'width' => '10%', 'vAlign' => 'middle', 'xlFormat' => "mmm\\-dd\\, \\-yyyy", 'format' => 'html', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ( [ 'model' => $searchModel, 'type' => 2, 'language' => 'th', 'attribute' => 'date', 'convertFormat' => true, 'pluginOptions' => [ 'autoclose' => true, 'format' => 'yyyy-MM-dd', ], ] ), 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, 'value' => function ($model) { return Yii::$app->formatter->asDate($model->date, 'long'); }, ], [ 'attribute' => 'plan_number', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'plan_title', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: left;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'amount', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: left;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'page', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'length', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'date_start_contract', 'hAlign' => 'center', // 'width' => '10%', 'vAlign' => 'middle', 'xlFormat' => "mmm\\-dd\\, \\-yyyy", 'format' => 'html', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ( [ 'model' => $searchModel, 'type' => 2, 'language' => 'th', 'attribute' => 'date_start_contract', 'convertFormat' => true, 'pluginOptions' => [ 'autoclose' => true, 'format' => 'yyyy-MM-dd', ], ] ), 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, 'value' => function ($model) { return Yii::$app->formatter->asDate($model->date_start_contract, 'long'); }, ], [ 'attribute' => 'date_end_contract', 'hAlign' => 'center', // 'width' => '10%', 'vAlign' => 'middle', 'xlFormat' => "mmm\\-dd\\, \\-yyyy", 'format' => 'html', 'filterType' => GridView::FILTER_DATE, 'filterWidgetOptions' => ( [ 'model' => $searchModel, 'type' => 2, 'language' => 'th', 'attribute' => 'date_end_contract', 'convertFormat' => true, 'pluginOptions' => [ 'autoclose' => true, 'format' => 'yyyy-MM-dd', ], ] ), 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, 'value' => function ($model) { return Yii::$app->formatter->asDate($model->date_end_contract, 'long'); }, ], [ 'attribute' => 'company', 'vAlign' => 'middle', 'headerOptions' => ['class' => 'kv-sticky-column text-center'], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: left;cursor:pointer;overflow: auto;white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'attribute' => 'status', 'label' => 'สถานะ', 'width' => '100px', 'vAlign' => 'middle', 'headerOptions' => ['style' => 'width:150'], 'format' => 'html', 'filter' => array("1" => "ปกติ", "0" => "ยกเลิก"), 'filterInputOptions' => [ 'class' => 'form-control', 'prompt' => 'ทั้งหมด' ], 'contentOptions' => function ($model) { return [ 'style' => 'text-align: center;cursor:pointer;max-width:150px;overflow: auto; white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, 'value' => function ($model) { if ($model->status == 1) { return '<i class="m-menu__link-icon fa fa-check" style="color:blue"></i> <span style="color:blue">ปกติ</span>'; } if ($model->status == 0) { return '<i class="m-menu__link-icon fa fa-times" style="color:red"></i> <span style="color:red">ยกเลิก</span>'; } }, ], [ 'attribute' => 'comment', // 'width' => '200px', 'vAlign' => 'middle', 'headerOptions' => ['style' => 'width:150'], 'format' => 'html', 'contentOptions' => function ($model) { return [ 'style' => 'text-align: left;cursor:pointer;max-width:150px;overflow: auto; white-space: normal; word-wrap: break-word;', 'name' => 'modal-ordernum-view-button', 'id' => $model['id'], // 'onclick' => 'window.location.href = "update?id="+(this.id)', ]; }, ], [ 'class' => 'kartik\grid\FormulaColumn', 'header' => '<i class="fas fa-file-alt"></i>', 'vAlign' => 'middle', 'format' => 'raw', 'value' => function ($model) { if ($model->filename != null) { return '<a href="' . Yii::$app->urlFrontend->getBaseUrl() . '/supafiles/' . $model->filename . '" target="_blank"><i class="fas fa-file-alt"></i></a>'; } else { return '-'; } }, 'headerOptions' => ['class' => 'kartik-sheet-style'], 'hAlign' => 'center', 'mergeHeader' => true, ], ]; ?> <div class="supa1-index"> <div class="body-content"> <div class="m-divider m--padding-bottom-20"> <span></span> <h3 class="bg-light m--padding-20"><?= Html::encode($this->title) ?></h3> <span></span> </div> <div class="m-portlet m-portlet--mobile"> <?= GridView::widget([ 'id' => 'grid2-' . Yii::$app->controller->module->id . Yii::$app->controller->action->id, 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'options' => [ 'class' => 'm-datatable__table table table-bordered', 'style' => 'font-size:1rem', ], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'layout' => "{items}\n{pager}", 'showPageSummary' => false, 'panel' => [ 'type' => GridView::TYPE_PRIMARY ], 'panelTemplate' => ' <div class="m_datatable m-datatable m-datatable--default m-datatable--loaded panel {type}"> {items} <div class="m-datatable__pager m-datatable--paging-loaded clearfix"> {pager} </div> <div class="clearfix"></div> </div>', 'pjax' => true, 'pjaxSettings' => [ 'neverTimeout' => true, 'enablePushState' => true, 'options' => ['id' => 'grid-' . Yii::$app->controller->module->id . Yii::$app->controller->action->id,], ], 'pager' => Yii::$app->params['pagerX'], 'toolbar' => [ '{export}', '{toggleData}' ], 'export' => [ 'label' => 'ดาว์โหลดเอกสาร', 'fontAwesome' => true, 'showConfirmAlert' => false, 'target' => \kartik\grid\GridView::TARGET_BLANK ], 'exportConfig' => [ \kartik\grid\GridView::EXCEL => false, ], 'responsive' => true, 'responsiveWrap' => false, 'hover' => true, 'headerRowOptions' => ['class' => 'header-table-center', 'style' => 'font-size:1.1rem;'], 'columns' => $gridColumns, 'krajeeDialogSettings' => ['overrideYiiConfirm' => false] ]); ?> </div> </div> </div>