diff --git a/app/admin/lists/beforehand_order/BeforehandOrderLists.php b/app/admin/lists/beforehand_order/BeforehandOrderLists.php index 52772795f..40b37ab9f 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderLists.php @@ -11,6 +11,7 @@ use app\common\model\purchase_product_offer\PurchaseProductOffer; use app\common\model\system_store\SystemStore; use app\common\lists\ListsExcelInterface; use app\common\model\beforehand_order_cart_info\BeforehandOrderCartInfo; +use app\common\model\warehouse_order\WarehouseOrder; /** * 预订单表列表 @@ -49,6 +50,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte public function lists(): array { $warehouse_type = $this->request->get('warehouse_type', 0); + $order_rk = $this->request->get('order_rk', ''); + $order_ck = $this->request->get('order_ck', ''); switch ($warehouse_type) { case 1: @@ -67,6 +70,13 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte default: break; } + if ($order_rk!='') { + $oid=WarehouseOrder::where('financial_pm',1)->where('code','like','%'.$order_rk)->column('id'); + $this->searchWhere[] = ['warehousing_id','in',$oid]; + }elseif ($order_ck!='') { + $oid=WarehouseOrder::where('financial_pm',0)->where('code','like','%'.$order_ck)->column('oid'); + $this->searchWhere[] = ['outbound_id','in',$oid]; + } return BeforehandOrder::where($this->searchWhere) ->field(['id', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file']) ->limit($this->limitOffset, $this->limitLength) diff --git a/app/admin/lists/warehouse_product/WarehouseProductLists.php b/app/admin/lists/warehouse_product/WarehouseProductLists.php index 3ff7eeedb..ffed56121 100644 --- a/app/admin/lists/warehouse_product/WarehouseProductLists.php +++ b/app/admin/lists/warehouse_product/WarehouseProductLists.php @@ -73,7 +73,7 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt } } return WarehouseProduct::where($this->searchWhere) - ->field(['id', 'oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay']) + ->field(['id', 'pay_type','oid','admin_id','supplier_id', 'store_id', 'warehouse_id', 'product_id', 'financial_pm', 'batch', 'nums', 'price', 'purchase', 'cost', 'total_price', 'manufacture', 'expiration_date', 'status', 'mark', 'create_time','is_pay']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->withTrashed() diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index b1ea9e6fc..2b99da170 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -188,7 +188,7 @@ class WarehouseProductLogic extends BaseLogic * @author admin * @date 2024/07/31 16:55 */ - public static function edit(array $params): bool + public static function edit(array $params) { Db::startTrans(); @@ -219,6 +219,9 @@ class WarehouseProductLogic extends BaseLogic $after_nums = bcsub($warehouseProductStorege['nums'], $params['nums'], 2); } WarehouseProduct::where('id', $params['id'])->update([ + 'nums' => $params['nums'], + 'supplier_id' => $params['supplier_id'], + 'pay_type' => $params['pay_type'], 'nums' => $params['nums'], 'purchase' => $params['purchase'], 'before_nums' => $before_nums,