Commit 0f1a9aa9 by yink

refactor(OrderInfoController, OrderDivideRecordController): 优化筛选条件查询和字段映射

在OrderInfoController中,将“是否分账”的筛选条件从multipleSelect改为select,简化了用户操作。在OrderDivideRecordController中,修正了员工查询的字段映射,从id改为member_id,确保查询结果的准确性。
parent f977d088
...@@ -44,7 +44,7 @@ protected function grid() ...@@ -44,7 +44,7 @@ protected function grid()
} else if ($stype == 3) { } else if ($stype == 3) {
$name = Merchant::where('id', $val)->value('name'); $name = Merchant::where('id', $val)->value('name');
} else if ($stype == 5) { } else if ($stype == 5) {
$name = StoreAdminUsers::where('id', $val)->value('name'); $name = StoreAdminUsers::where('member_id', $val)->value('name');
} }
return $name; return $name;
...@@ -124,7 +124,7 @@ protected function grid() ...@@ -124,7 +124,7 @@ protected function grid()
->whereHas('order', function ($q) { ->whereHas('order', function ($q) {
$q->where('um_id', $this->input); $q->where('um_id', $this->input);
}); });
}, '员工')->select(StoreAdminUsers::where('role_id', 3)->pluck('name', 'id'))->width(3); }, '员工')->select(StoreAdminUsers::where('role_id', 3)->pluck('name', 'member_id'))->width(3);
// 添加时间范围快捷筛选 // 添加时间范围快捷筛选
$filter->scope('today', '今日')->whereDate('created_at', date('Y-m-d')); $filter->scope('today', '今日')->whereDate('created_at', date('Y-m-d'));
......
...@@ -161,13 +161,8 @@ protected function grid() ...@@ -161,13 +161,8 @@ protected function grid()
->multipleSelect(OrderInfo::STATUS_OPTIONS) ->multipleSelect(OrderInfo::STATUS_OPTIONS)
->width(3); ->width(3);
//支付类型 //是否分账
$filter->in('is_div', '是否分账') $filter->equal('is_div', '是否分账')->select(['1' => '是', '0' => '否'])->width(3);
->multipleSelect([
0 => '否',
1 => '是',
])
->width(3);
//支付类型 //支付类型
$filter->in('pay_type', '支付类型') $filter->in('pay_type', '支付类型')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment