示例#1
0
    }
}
$Combo_Dept = ArrayHelper::map(Dept::find()->orderBy('SORT')->asArray()->all(), 'DEP_NM', 'DEP_NM');
?>
<div style="padding:10px;">
	
	<?php 
echo GridView::widget(['id' => 'ro-grd-index', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '20px', 'header' => 'No.', 'headerOptions' => ['class' => 'kartik-sheet-style']], ['attribute' => 'KD_SA', 'hAlign' => 'left', 'vAlign' => 'middle', 'group' => true], ['label' => 'Tanggal Pembuatan', 'attribute' => 'CREATED_AT', 'hAlign' => 'left', 'vAlign' => 'middle', 'group' => true, 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'parentro.CREATED_AT', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['id' => 'tglro', 'format' => 'Y/m/d', 'separator' => 'TO', 'opens' => 'left']]], ['label' => 'Pengajuan', 'group' => true, 'attribute' => 'EMP_NM', 'hAlign' => 'left', 'vAlign' => 'middle'], ['label' => 'Department', 'group' => true, 'attribute' => 'dept.DEP_NM', 'hAlign' => 'left', 'vAlign' => 'middle', 'filter' => $Combo_Dept], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}{tambahEdit}{delete}{approved}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'buttons' => ['view' => function ($url, $model) {
    return tombolView($url, $model);
}, 'tambahEdit' => function ($url, $model) {
    return tombolEdit($url, $model);
}, 'delete' => function ($url, $model) {
    return tombolDelete($url, $model);
}, 'approved' => function ($url, $model) {
    return tombolApproval($url, $model);
}]], ['label' => 'Notification', 'mergeHeader' => true, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) {
    return statusProcessRo($model);
}]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'sa-grd-index']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false, 'toolbar' => [['content' => tombolCreate() . tombolBarang() . tombolKategori()], '{toggleData}'], 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => "List Sales Order"]]);
?>


	<?php 
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#new-sa').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'new-sa', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-book"></div><div><h4 class="modal-title">Entry Sales Order</h4></div>', 'size' => 'modal-md', 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(131, 160, 245, 0.5)']]);
Modal::end();
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#add-sa').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'add-sa', 'header' => '<h4 class="modal-title">Entry Sales Order</h4>', 'size' => 'modal-lg', 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(230, 251, 225, 1);']]);
Modal::end();
$this->registerJs("\r\n\t\t\t\$(document).on('click', '[data-toggle-active]', function(e){\r\n\t\t\te.preventDefault();\r\n\r\n\t\t\tvar id = \$(this).data('toggle-active');\r\n\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: '/purchasing/sales-order/approved&id=' + id,\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\tsuccess: function(result) {\r\n\r\n\t\t\t\t\tif (result == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Success\r\n\t\t\t\t\t\t\$.pjax.reload({container:'#grid-pjax'});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Fail\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t});\r\n\t\t", $this::POS_READY);
?>
</div>
示例#2
0
    /*
     * max String Disply
     * @author ptrnov <*****@*****.**>
     */
    return substr($model->CREATED_AT, 0, 10);
}, 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'CREATED_AT', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['id' => 'tglpo', 'format' => 'Y/m/d', 'separator' => ' - ', 'opens' => 'right']], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '90px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '90px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'dept.DEP_NM', 'label' => 'Department', 'filter' => $Combo_Dept, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'SIG1_NM', 'label' => 'Created', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'SIG2_NM', 'label' => 'Checked', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'SIG3_NM', 'label' => 'Approved', 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '130px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}{tambahEdit}{delete}{review}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'buttons' => ['view' => function ($url, $model) {
    return tombolView($url, $model);
}, 'tambahEdit' => function ($url, $model) {
    return tombolEdit($url, $model);
}, 'delete' => function ($url, $model) {
    return tombolDelete($url, $model);
}, 'review' => function ($url, $model) {
    return tombolReview($url, $model);
}], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['label' => 'Notification', 'mergeHeader' => true, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) {
    return statusProcessRo($model);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'ro-grd-inbox']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false, 'toolbar' => [['content' => tombolCreate() . tombolBarang() . tombolKategori()], '{toggleData}'], 'panel' => ['type' => GridView::TYPE_DANGER, 'heading' => "<span class='fa fa-cart-plus fa-xs'><b> LIST SALES ORDER</b></span>"]]);
?>


	<?php 
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#new-so').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'new-so', 'header' => '<div style="float:left;margin-right:10px" class="fa fa-2x fa-book"></div><div><h4 class="modal-title">Entry Items Sales Order</h4></div>', 'size' => 'modal-md', 'headerOptions' => ['style' => 'border-radius:5px; background-color: rgba(97, 211, 96, 0.3)']]);
Modal::end();
$this->registerJs("\r\n\t\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\t\r\n\t\t\t\$('#add-ro').on('show.bs.modal', function (event) {\r\n\t\t\t\tvar button = \$(event.relatedTarget)\r\n\t\t\t\tvar modal = \$(this)\r\n\t\t\t\tvar title = button.data('title') \r\n\t\t\t\tvar href = button.attr('href') \r\n\t\t\t\tmodal.find('.modal-title').html(title)\r\n\t\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\r\n\t\t\t\t\$.post(href)\r\n\t\t\t\t\t.done(function( data ) {\r\n\t\t\t\t\t\tmodal.find('.modal-body').html(data)\t\t\t\t\t\r\n\t\t\t\t\t});\r\n\t\t\t\t}),\t\t\t\r\n\t\t", $this::POS_READY);
Modal::begin(['id' => 'add-ro', 'header' => '<h4 class="modal-title">Entry Request Order</h4>', 'size' => 'modal-lg', 'headerOptions' => ['style' => 'border-radius:5px; background-color:rgba(97, 211, 96, 0.3);']]);
Modal::end();
$this->registerJs("\r\n\t\t\t\$(document).on('click', '[data-toggle-active]', function(e){\r\n\t\t\te.preventDefault();\r\n\r\n\t\t\tvar id = \$(this).data('toggle-active');\r\n\r\n\t\t\t\$.ajax({\r\n\t\t\t\turl: '/purchasing/sales-order/approved&id=' + id,\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\tsuccess: function(result) {\r\n\r\n\t\t\t\t\tif (result == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Success\r\n\t\t\t\t\t\t\$.pjax.reload({container:'#grid-pjax'});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Fail\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t});\r\n\t\t", $this::POS_READY);
?>
<div style="padding:10px;">
	<?php 
$items = [['label' => '<i class="fa fa-sign-in fa-lg"></i>  Outbox', 'content' => $outboxSo, 'active' => true], ['label' => '<i class="fa fa-sign-out fa-lg"></i>  Inbox', 'content' => $inboxSo]];