|
|
@@ -503,6 +503,20 @@ class PurchaseController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //不是预订单,并且采购人没有开批发店,则订单直接完成掉
|
|
|
+ $cg = PurchaseClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ if (!empty($cg)) {
|
|
|
+ if (isset($cg->book) && $cg->book == 0) {
|
|
|
+ $cgShopId = $cg->shopId ?? 0;
|
|
|
+ $cgShop = ShopClass::getById($cgShopId, true);
|
|
|
+ if (!empty($cgShop)) {
|
|
|
+ if (isset($cgShop->pfShopId) && $cgShop->pfShopId == 0) {
|
|
|
+ PurchaseClass::confirmTake($cg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//app新订单通知
|
|
|
$saleId = $info->saleId ?? 0;
|
|
|
$order = OrderClass::getById($saleId, true);
|