diff --git a/app/Admin/Controllers/DealerController.php b/app/Admin/Controllers/DealerController.php index a131a536..6b2f8a13 100644 --- a/app/Admin/Controllers/DealerController.php +++ b/app/Admin/Controllers/DealerController.php @@ -169,17 +169,6 @@ class DealerController extends AdminController $column->row(Box::make('用户记录', $tab)); }); }; - - // return Show::make($id, new Dealer(), function (Show $show) { - // $show->field('id'); - // $show->field('user_id'); - // $show->field('lvl'); - // $show->field('is_sale'); - // $show->field('is_manager'); - // // $show->field('pay_info'); - // $show->field('created_at'); - // $show->field('updated_at'); - // }); } /** diff --git a/app/Admin/Controllers/DealerEarningController.php b/app/Admin/Controllers/DealerEarningController.php index 92836a02..90bcec39 100644 --- a/app/Admin/Controllers/DealerEarningController.php +++ b/app/Admin/Controllers/DealerEarningController.php @@ -10,7 +10,9 @@ use App\Models\DealerPurchaseSubsidy; use Dcat\Admin\Form; use Dcat\Admin\Grid; use Dcat\Admin\Http\Controllers\AdminController; +use Dcat\Admin\Layout\Row; use Dcat\Admin\Show; +use Dcat\Admin\Widgets\Box; class DealerEarningController extends AdminController { @@ -65,6 +67,7 @@ class DealerEarningController extends AdminController if ($actions->row->earningable_type != (new DealerChannelSubsidyLog())->getMorphClass()) { $actions->append(' 显示   '); } + //如果打款人为空,且待打款,则系统打款 }); $grid->filter(function (Grid\Filter $filter) { @@ -83,27 +86,40 @@ class DealerEarningController extends AdminController */ protected function detail($id) { - return Show::make($id, new DealerEarning(), function (Show $show) { - $show->field('id'); - $show->field('user_id'); - $show->field('earningable_type'); - $show->field('earningable_id'); - $show->field('lvl'); - $show->field('is_manager'); - $show->field('total_amount'); - $show->field('total_earnings'); - $show->field('fee'); - $show->field('fee_rate'); - $show->field('payer_id'); - $show->field('pay_info'); - $show->field('pay_at'); - $show->field('settle_at'); - $show->field('status'); - $show->field('remark'); - $show->field('pay_image'); - $show->field('created_at'); - $show->field('updated_at'); - }); + return function (Row $row) use ($id) { + $row->column(5, function ($column) use ($id) { + $builder = DealerEarning::with(['user', 'payer']); + $column->row(Show::make($id, $builder, function (Show $show) { + $show->field('id'); + $show->field('user.phone'); + // $show->field('earningable_type'); + // $show->field('earningable_id'); + $show->field('lvl'); + $show->field('is_manager'); + $show->field('total_amount'); + $show->field('total_earnings'); + $show->field('fee'); + $show->field('fee_rate'); + $show->field('payer_id'); + // $show->field('pay_info'); + $show->field('pay_at'); + $show->field('settle_at'); + // $show->field('status'); + $show->field('remark'); + $show->field('pay_image'); + $show->field('created_at'); + // $show->field('updated_at'); + $show->panel() + ->tools(function (Show\Tools $tools) use ($show) { + $tools->disableEdit(); + $tools->disableDelete(); + }); + })); + }); + $row->column(7, function ($column) use ($id) { + $column->row(Box::make('明细记录', '')); + }); + }; } /**