Accept Merge Request #188: (feature/hant -> develop)
Merge Request: 修改 Created By: @todayswind Accepted By: @todayswind URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/188?initial=true
This commit is contained in:
commit
69e37ea26e
|
|
@ -144,6 +144,7 @@ class Order extends Backend
|
|||
'aftersale' => $this->auth->check('aftersales/aftersale/add'),
|
||||
'log' => $this->auth->check('order/log'),
|
||||
'dispatch' => $this->auth->check('orders/dispatch/add'),
|
||||
'map' => $this->auth->check('orders/dispatch/map'),
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class Worker extends Backend
|
|||
$item_map = array_column($item_map, 'level', 'id');
|
||||
if ($ids) {
|
||||
$items = explode(',', $params['rules'] ?? '');
|
||||
|
||||
WorkerItem::where('worker_id', $ids)->delete();
|
||||
if ($items) {
|
||||
$insert = [];
|
||||
foreach ($items as $item) {
|
||||
|
|
@ -246,8 +246,7 @@ class Worker extends Backend
|
|||
'item_path_id' => $item_map[$item] ?? 0
|
||||
];
|
||||
}
|
||||
model('WorkerItem')->where('worker_id', $ids)->delete();
|
||||
model('WorkerItem')->insertAll($insert);
|
||||
WorkerItem::insertAll($insert);
|
||||
}
|
||||
}
|
||||
unset($params['rules']);
|
||||
|
|
@ -260,7 +259,7 @@ class Worker extends Backend
|
|||
$worker->area_name = str_replace(',', '/', $area_name ?? '');
|
||||
|
||||
|
||||
$select_ids = model('WorkerItem')->where('worker_id', $ids)->field('item_id')
|
||||
$select_ids = WorkerItem::where('worker_id', $ids)->field('item_id')
|
||||
->select();
|
||||
$select_ids = array_column($select_ids, 'item_id');
|
||||
foreach ($this->tree as $index => $item) {
|
||||
|
|
@ -301,6 +300,7 @@ class Worker extends Backend
|
|||
|
||||
if ($area_id) {
|
||||
$code = $this->getSelectAreaCode(substr_replace($area_id, '00', -2));
|
||||
// dd($code);
|
||||
$build->where('area_id', 'like', $code . '%');
|
||||
}
|
||||
if ($item_id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user