Accept Merge Request #212: (feature/hant -> develop)
Merge Request: 派单 Created By: @todayswind Accepted By: @todayswind URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/212?initial=true
This commit is contained in:
commit
e00f798264
|
|
@ -303,7 +303,7 @@ class Worker extends Backend
|
|||
->select();
|
||||
$select_ids = array_column($select_ids, 'item_id');
|
||||
foreach ($this->tree as $index => $item) {
|
||||
if (in_array($item['parent'], $select_ids)) {
|
||||
if (in_array($item['parent'], $select_ids)||in_array($item['id'],$select_ids)) {
|
||||
$this->tree[$index]['state']['selected'] = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -319,6 +319,7 @@ class Worker extends Backend
|
|||
{
|
||||
$area_id = request()->get('area_id');
|
||||
$item_id = request()->get('item_id');
|
||||
$keyword = request()->get('keyword');
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$build = model('worker')
|
||||
|
|
@ -343,12 +344,17 @@ class Worker extends Backend
|
|||
// dd($code);
|
||||
$build->where('area_id', 'like', $code . '%');
|
||||
}
|
||||
|
||||
if ($item_id) {
|
||||
$ids = $this->getParentIdsFromArray($item_id,$this->items);
|
||||
$ids [] = $item_id;
|
||||
$worker_ids = WorkerItem::whereIn('item_id',$ids)->column('worker_id');
|
||||
$build->whereIn('id',$worker_ids);
|
||||
}
|
||||
if ($keyword) {
|
||||
$build->where('name', 'like', '%'.$keyword . '%')
|
||||
->whereOr('tel','like','%'.$keyword . '%');
|
||||
}
|
||||
$list = $build
|
||||
->paginate($limit);
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class CheckOrderDispatchGotCommand extends Command
|
|||
|
||||
$Model->where('status', OrderDispatch::STATUS_TOGET)
|
||||
->where('type', 2)
|
||||
->where('worker_id','!=',1059)
|
||||
->where('create_time', '<=', $now)
|
||||
->chunk(100, function ($list) use ($OrderLogic) {
|
||||
foreach ($list as $item) {
|
||||
|
|
|
|||
|
|
@ -352,7 +352,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'layer', 'cascader'],
|
|||
Form.api.submit($("#add-form"), function (data) {
|
||||
var index = parent.Layer.getFrameIndex(window.name);
|
||||
parent.Layer.close(index); // 关闭当前弹窗
|
||||
parent.table.bootstrapTable('refresh'); // 刷新父页面表格
|
||||
});
|
||||
} else {
|
||||
Toastr.error('请完整填写表单');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user