Merge pull request 'feat(admin): 仓库订单列表支持按仓库类型筛选' (#330) from dev into main
Reviewed-on: #330
This commit is contained in:
commit
b3dd4008d9
@ -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