'调整了一些bug'
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Admin\Controllers\Coupon;
|
||||
|
||||
use App\Admin\Exporters\CouponExport;
|
||||
use App\Models\ActivityRule;
|
||||
use App\Models\Coupon;
|
||||
use App\Models\User;
|
||||
use Encore\Admin\Controllers\AdminController;
|
||||
@@ -43,12 +44,7 @@ class IndexController extends AdminController
|
||||
->get()
|
||||
->pluck('nickname', 'id');
|
||||
$filter->equal('user_id', '渠道')->select($users);
|
||||
$filter->equal('thirdPartyGoodsId', '优惠政策')->select([
|
||||
'YSD-full100-10' => '100减10元',
|
||||
'YSD-full100-25' => '100减25元',
|
||||
'YSD-full100-50' => '100减50元',
|
||||
'YSD-full200-100' => '200减100元',
|
||||
]);
|
||||
$filter->equal('thirdPartyGoodsId', '优惠政策')->select(ActivityRule::pluck('title', 'code'));
|
||||
});
|
||||
$filter->column(1 / 2, function ($filter) {
|
||||
$filter->like('redemptionCode', '平安券编号');
|
||||
@@ -59,6 +55,8 @@ class IndexController extends AdminController
|
||||
});
|
||||
});
|
||||
}, '网点名称');
|
||||
|
||||
$filter->equal('type', '类型')->select(Coupon::TYPES);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -66,6 +64,12 @@ class IndexController extends AdminController
|
||||
$grid->column('渠道')->display(function () {
|
||||
return $this->user->nickname;
|
||||
});
|
||||
$grid->column('type', '类型')
|
||||
->using(Coupon::TYPES)
|
||||
->label([
|
||||
'1' => 'info',
|
||||
'2' => 'success',
|
||||
]);
|
||||
|
||||
$grid->column('网点名称/编号')->display(function () {
|
||||
return $this->outlet ? $this->outlet->nickname : $this->outletId;
|
||||
|
||||
Reference in New Issue
Block a user