title = 'Bus Order Finances'; $this->params['breadcrumbs'][] = $this->title; ?>
'pjax-list', 'timeout' => false]); ?> render('_search', ['model' => $searchModel]); ?>
$dataProvider, 'emptyText' => '没有匹配的记录', 'pagerFixed' => true, 'columns' => [ [ 'headerOptions' => ['style'=> 'width: 1%'], 'class' => 'yii\grid\CheckboxColumn'], [ 'width' => '7%', 'attribute' => 'ID' ], [ 'width' => '16%', 'label' => '对账周期', 'value' => function ($model) { /* @var $model \backend\modules\motorcade\models\searchOrderFinance */ return $model->DATE_FROM . ' _ ' . $model->DATE_TO; } ], [ 'header' => $searchModel->FINANCE_TYPE == 1 ? '供应商' : '客户', 'width' => '24%', 'attribute' => 'depart_name' ], [ 'width' => '6%', 'attribute' => 'BUS_COST', 'hAlign' => 'right' ], [ 'width' => '13%', 'attribute' => 'CREATE_TIME', 'hAlign' => 'center', 'format' => ['date', 'php:Y-m-d'] ], [ 'width' => '7%', 'attribute' => 'end_status_name', 'hAlign' => 'center' ], [ 'width' => '7%', 'label' => '导出订单', 'value' => function ($model) { /* @var $model BusOrderFinance */ return Html::button('', ['onclick' => 'exportOneExcel("/motorcade/order-finance/export-one?id=' . $model->ID . '")', 'class' => 'btn btn-link']); }, 'hAlign' => 'center', 'format' => 'raw' ], [ 'headerOptions' => ['style'=> 'text-align: center'], 'class' => 'yii\grid\ActionColumn', 'header' => '操作', 'template' => '{confirm}{finish}{cancel}', // 'width' => '20%', 'buttons' => [ 'confirm' => function ($url, $model, $key) { //已结算的,不显示 if ($model->END_STATUS == searchOrder::STATUS_END_WAITING_CONFIRM) { $label = '核对确认'; $options = [ 'class' => 'btn btn-link btn-sm-width', 'data-confirm' => "确认要{$label}吗", ]; return Html::a($label, 'javascript:financeOrder("/motorcade/order-finance/confirm-finance?id=' . $model->ID . '")', $options); } return ''; }, 'finish' => function ($url, $model, $key) { //已结算的,不显示 if ($model->END_STATUS == searchOrder::STATUS_END_WAITING_FINISH) { $label = '完成结算'; $options = [ 'class' => 'btn btn-link btn-sm-width', 'data-confirm' => "确认要{$label}吗", ]; return Html::a($label, 'javascript:financeOrder("/motorcade/order-finance/finish-finance?id=' . $model->ID . '")', $options); } return ''; }, 'cancel' => function ($url, $model, $key) { //已结算的,不显示 if ($model->END_STATUS != searchOrder::STATUS_END_FINISH) { $label = '取消对账'; $options = [ 'class' => 'btn btn-link btn-sm-width', 'data-confirm' => "确认要{$label}吗", ]; return Html::a($label, 'javascript:financeOrder("/motorcade/order-finance/cancel-finance?id=' . $model->ID . '")', $options); } return ''; }, ] ] ] ]); ?>