Exemplo n.º 1
0
        $icon = '<span class="glyphicon glyphicon-zoom-in"></span>';
        $label = $icon . ' ' . $title;
        $url = Url::toRoute(['/purchasing/purchase-order/detail', 'kd_ro' => $model->KD_RO, 'kdpo' => $_GET['kdpo']]);
        $options['tabindex'] = '-1';
        return '<li>' . Html::a($label, $url, $options) . '</li>' . PHP_EOL;
    }
}
/*
 * GRID VIEW CREATE PO -> BY REQUEST ORDER
 * @author ptrnov  <*****@*****.**>
 * @since 1.1
 */
$gvROSendPO = GridView::widget(['id' => 'gv-ro-detail', 'dataProvider' => $dataProviderRo, 'filterModel' => $searchModel1, 'columns' => [['attribute' => 'KD_RO', 'label' => 'Kode RO', 'hAlign' => 'left', 'vAlign' => 'middle', 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}{sendPo}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['view' => function ($url, $model) {
    return tombolView($url, $model);
}, 'sendPo' => function ($url, $model) use($poHeader) {
    return tombolSendPo($url, $model, $poHeader);
}]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-ro-detail'], 'refreshGrid' => true, 'neverTimeout' => true], 'panel' => ['heading' => false], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]);
/*
 * MODAL SELECT REQUEST ORDER
 * @author ptrnov  <*****@*****.**>
 * @since 1.1
 */
$this->registerJs("\n\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\$('#ro-sendpo').on('show.bs.modal', function (event) {\n\t\t\tvar button = \$(event.relatedTarget)\n\t\t\tvar modal = \$(this)\n\t\t\tvar title = button.data('title')\n\t\t\tvar href = button.attr('href')\n\t\t\tmodal.find('.modal-title').html(title)\n\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t\t\$.post(href)\n\t\t\t\t.done(function( data ) {\n\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t});\n\t\t\t});\n\t", $this::POS_READY);
Modal::begin(['id' => 'ro-sendpo', 'header' => '<h4 class="modal-title">...</h4>', 'size' => Modal::SIZE_LARGE]);
//echo '...';
Modal::end();
$this->registerJs("\n\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\$('#ro-view').on('show.bs.modal', function (event) {\n\t\t\tvar button = \$(event.relatedTarget)\n\t\t\tvar modal = \$(this)\n\t\t\tvar title = button.data('title')\n\t\t\tvar href = button.attr('href')\n\t\t\tmodal.find('.modal-title').html(title)\n\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t\t\$.post(href)\n\t\t\t\t.done(function( data ) {\n\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t});\n\t\t\t});\n\t", $this::POS_READY);
Modal::begin(['id' => 'ro-view', 'header' => '<h4 class="modal-title">...</h4>', 'size' => Modal::SIZE_LARGE]);
//echo '...';
Modal::end();
/*
Exemplo n.º 2
0
    $label = $icon . ' ' . $title;
    $url = Url::toRoute(['/purchasing/purchase-order/detail', 'kd_ro' => $model->KD_RO, 'kdpo' => $_GET['kdpo']]);
    $options['tabindex'] = '-1';
    return '<li>' . Html::a($label, $url, $options) . '</li>' . PHP_EOL;
    //}
    //}
}
/*
 * GRID VIEW CREATE PO -> BY REQUEST ORDER
 * @author ptrnov  <*****@*****.**>
 * @since 1.1
 */
$gvROSendPO = GridView::widget(['id' => 'gv-ro-detail', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['attribute' => 'KD_RO', 'label' => 'Kode RO', 'hAlign' => 'left', 'vAlign' => 'middle', 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{view}{sendPo}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'buttons' => ['view' => function ($url, $model) {
    return tombolView($url, $model);
}, 'sendPo' => function ($url, $model) {
    return tombolSendPo($url, $model);
}]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'gv-ro-detail']], 'panel' => ['heading' => false], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]);
//echo $gvROSendPO;
$items = [['label' => '<div style="font-family: tahoma ;font-size:8pt;">Request Order</div>', 'content' => $gvROSendPO, 'active' => true], ['label' => '<div style="font-family: tahoma ;font-size:8pt;">Seles Order</div>', 'content' => $gvROSendPO]];
$tabRoSo = TabsX::widget(['id' => 'tab-emp', 'items' => $items, 'position' => TabsX::POS_ABOVE, 'bordered' => true, 'encodeLabels' => false]);
/*
 * MODAL SELECT REQUEST ORDER 
 * @author ptrnov  <*****@*****.**>
 * @since 1.1
 */
$this->registerJs("\n\t\t\$.fn.modal.Constructor.prototype.enforceFocus = function() {};\n\t\t\$('#ro-sendpo').on('show.bs.modal', function (event) {\n\t\t\tvar button = \$(event.relatedTarget)\n\t\t\tvar modal = \$(this)\n\t\t\tvar title = button.data('title') \n\t\t\tvar href = button.attr('href') \n\t\t\tmodal.find('.modal-title').html(title)\n\t\t\tmodal.find('.modal-body').html('<i class=\"fa fa-spinner fa-spin\"></i>')\n\t\t\t\$.post(href)\n\t\t\t\t.done(function( data ) {\n\t\t\t\t\tmodal.find('.modal-body').html(data)\n\t\t\t\t});\n\t\t\t});\n\t", $this::POS_READY);
Modal::begin(['id' => 'ro-sendpo', 'header' => '<h4 class="modal-title">...</h4>', 'size' => Modal::SIZE_LARGE]);
//echo '...';
Modal::end();
/*
 * Status Value Signature1 | PurchaseOrder