feat(admin): 仓库订单列表支持按仓库类型筛选
- 新增仓库类型筛选功能,支持按未出库、已出库、未入库、已入库状态筛选订单 - 优化订单列表查询逻辑,增加仓库状态相关字段 - 更新订单导出功能,增加仓库状态相关列
This commit is contained in:
parent
a93649615e
commit
1a89c2f1f8
@ -48,6 +48,25 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$warehouse_type = $this->request->get('warehouse_type', 0);
|
||||
|
||||
switch ($warehouse_type) {
|
||||
case 1:
|
||||
$this->searchWhere[] = ['is_outbound', '=', 0];
|
||||
$this->searchWhere[] = ['order_type', '<>', 5];
|
||||
break;
|
||||
case 2:
|
||||
$this->searchWhere[] = ['is_outbound', '=', 1];
|
||||
break;
|
||||
case 3:
|
||||
$this->searchWhere[] = ['is_warehousing', '=', 0];
|
||||
break;
|
||||
case 4:
|
||||
$this->searchWhere[] = ['is_warehousing', '=', 1];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return BeforehandOrder::where($this->searchWhere)
|
||||
->field(['id', 'order_id', 'store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
|
@ -209,7 +209,7 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
||||
WarehouseProductLogic::add($data);
|
||||
PurchaseProductOffer::where('id', $v['id'])->update(['status' => 1, 'is_storage' => 1]);
|
||||
}
|
||||
BeforehandOrder::where('id', $params['bhoid'])->update(['warehousing_id' => $res['id']]);
|
||||
BeforehandOrder::where('id', $params['bhoid'])->update(['warehousing_id' => $res['id'],'is_warehousing'=>1]);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Throwable $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user