<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Concern\HasAdminQuickCRUD; use ModStart\Admin\Layout\AdminCRUDBuilder; use ModStart\Core\Type\TypeUtil; use ModStart\Field\AbstractField; use ModStart\Grid\GridFilter; use ModStart\Support\Concern\HasFields; use Module\Member\Util\MemberCmsUtil; use Module\Vendor\Type\OrderStatus; class MemberMoneyChargeOrderController extends Controller { use HasAdminQuickCRUD; protected function crud(AdminCRUDBuilder $lZifj) { $lZifj->init('member_money_charge_order')->field(function ($lZifj) { $lZifj->display('id', '业务订单ID'); $lZifj->datetime('created_at', '创建时间'); $lZifj->display('memberUserId', '用户')->hookRendering(function (AbstractField $pZ_lR, $jIWZA, $aaYHa) { return MemberCmsUtil::showFromId($jIWZA->memberUserId); }); $lZifj->display('money', '支付金额'); $lZifj->type('status', '状态')->type(OrderStatus::class); })->gridFilter(function (GridFilter $bu01d) { $bu01d->eq('id', '业务订单ID'); $bu01d->eq('memberUserId', '用户ID'); $bu01d->eq('status', '状态')->select(array(OrderStatus::WAIT_PAY => TypeUtil::name(OrderStatus::class, OrderStatus::WAIT_PAY), OrderStatus::COMPLETED => TypeUtil::name(OrderStatus::class, OrderStatus::COMPLETED))); })->disableCUD()->canShow(false)->title('用户-钱包充值订单'); } }