This commit is contained in:
2020-10-13 13:44:45 +08:00
parent 59cf8a26c4
commit 4d97481515
7 changed files with 132 additions and 84 deletions

View File

@@ -143,15 +143,13 @@ class IndexController extends AdminController
$grid->column('分润规则')->display(function ($title, $column) {
return '点击展开';
})->modal(function ($model) {
if ($model->code) {
$codes = $model->code->map(function ($code) {
return $code->only(['name', 'code', 'profit']);
});
$table = new Table(['名称', '规则项', '分润金额(元)'], $codes->toArray());
return trim($table->render(), '"');
return new Table(['名称', '规则项', '分润金额(元)'], $codes->toArray());
}
});