优化了采购订单入库逻辑
- 修改了采购产品报价的查询条件,从 'buyer_nums' 更改为 'buyer_confirm' - 增加了商品采购信息设置的提示信息 - 调整了仓储ID检查的位置,提高了代码逻辑清晰度
This commit is contained in:
parent
3ea1bc8fdb
commit
d5a9066616
@ -127,10 +127,13 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
||||
if($params['bhoid']<=0){
|
||||
throw new BusinessException('参数错误');
|
||||
}
|
||||
$count = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'is_storage' => 0, 'buyer_nums' => 0])->count('id');
|
||||
$count = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'buyer_confirm' => 0])->count('id');
|
||||
$beforehandOrder = BeforehandOrder::where('id', $params['bhoid'])->field('order_type,warehousing_id')->find();
|
||||
|
||||
if ($count > 0 || $beforehandOrder['warehousing_id'] > 0) {
|
||||
if ($count > 0) {
|
||||
throw new BusinessException('还有商品正在采购中,请先设置采购信息在入库');
|
||||
}
|
||||
if ($beforehandOrder['warehousing_id'] > 0) {
|
||||
throw new BusinessException('请勿重复入库');
|
||||
}
|
||||
$offer_list = PurchaseProductOffer::where(['order_id' => $params['bhoid'], 'is_storage' => 0])->select();
|
||||
|
Loading…
x
Reference in New Issue
Block a user