diff --git a/app/admin/lists/beforehand_order/BeforehandOrderLists.php b/app/admin/lists/beforehand_order/BeforehandOrderLists.php index 4b5db2cb1..0d632cdd8 100644 --- a/app/admin/lists/beforehand_order/BeforehandOrderLists.php +++ b/app/admin/lists/beforehand_order/BeforehandOrderLists.php @@ -10,6 +10,7 @@ use app\common\model\auth\Admin; 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; /** * 预订单表列表 @@ -51,6 +52,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function ($item){ + $item['outbound']=''; if($item->admin_id){ $item->admin_name=Admin::where(['id'=>$item->admin_id])->value('name'); }else{ @@ -66,6 +68,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte $item->order_type_name='线上订单'; }elseif($item->order_type==5){ $item->order_type_name='仓库补货'; + $item->outbound='无须出库'; }elseif($item->order_type==6){ $item->order_type_name='往期补单'; } @@ -79,8 +82,13 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte $item->msg='商品没有入库'; } } + if($item->msg==''){ + $count=BeforehandOrderCartInfo::where('is_buyer',0)->count('id'); + if($count>0){ + $item->msg='有'.$count.'个商品未设置'; + } + } $item['warehousing']=''; - $item['outbound']=''; $item['system_store']=''; if($item['warehousing_id']>0){ $item->warehousing='已入库|'.$item['warehousing_id']; diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 9865fa696..4970dee59 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -345,6 +345,9 @@ class BeforehandOrderLogic extends BaseLogic if (!$order) { throw new BusinessException('该订单不存在'); } + if($order['order_type']==5){ + throw new BusinessException('仓库补货,不用出库'); + } if ($order['outbound_id'] > 0) { throw new BusinessException('该订单已创建出库单'); }