Url::to([ '/goods-share-rule/create', 'goods_id' => $goods->id, ]), 'class' => 'btn btn-success js-layer-share-rule-link', 'title' => Yii::t('common', 'Create Goods Share Rule'), ]) ?>

'goods-share-rule-list']) ?> $dataProvider, 'export' => false, 'options' => ['id' => 'share_rule_list'], 'columns' => [ [ 'class' => 'kartik\grid\CheckboxColumn', 'name' => 'id', ],//复选框列 'level', 'rate', // 'created_at:datetime', // 'updated_at:datetime', [ 'class' => 'common\helpers\DiyActionColumn', 'template' => '{update} {delete}', 'buttons' => [ 'update' => function ($url, $model, $key) { return Html::a(Yii::t('yii', 'Update'), 'javascript:;', [ 'url' => Url::to(['/goods-share-rule/update', 'id' => $model->id]), 'class' => 'btn btn-success btn-xs js-layer-share-rule-link', 'title' => Yii::t('common', 'Update Goods Share Rule'), ]); }, 'delete' => function ($url, $model, $key) { return Html::a('删除', 'javascript:;', [ 'url' => Url::to(['/goods-share-rule/delete', 'id' => $model->id]), 'class' => 'btn btn-success btn-xs js-share-rule-del', 'title' => Yii::t('common', '删除商品分润'), ]); }, ], ], ], ]); ?>
{ //表单提交 $.post(link.attr('url'), {}, (res) => { if (res.errcode == 0) { $.modal.notify(res.errmsg, 'success', () => { //移除行 // link.parents('tr').slideUp().remove(); attrPjax(); }); } else { $.modal.error(res.errmsg); } }); }); }); function attrPjax() { location.hash = '#share-rule'; $.pjax({ url: location.href, container: '#goods-share-rule-list', timeout: 0 }); } JS; $this->registerJs($js); ?>