|
|
@@ -111,7 +111,7 @@ class PurchaseClass extends BaseClass
|
|
|
|
|
|
PurchaseItemClass::batchAdd($productList);
|
|
|
|
|
|
- //供货商增加订单
|
|
|
+ //零售的供货商增加订单
|
|
|
$ghsId = $data['ghsId'] ?? 0;
|
|
|
if (empty($ghsId)) {
|
|
|
util::fail('没有找到供货商');
|
|
|
@@ -125,6 +125,7 @@ class PurchaseClass extends BaseClass
|
|
|
$getType = $data['getType'] ?? 0;
|
|
|
$hdOrderId = $respond['id'] ?? 0;
|
|
|
|
|
|
+ //增加供货商的客户
|
|
|
$custom = CustomClass::getByCondition(['ownSjId' => $ghsSjId, 'sjId' => $hdSjId, 'shopId' => $hdShopId]);
|
|
|
if (empty($custom)) {
|
|
|
$hdShop = ShopClass::getShopInfo($hdShopId);
|
|
|
@@ -171,7 +172,7 @@ class PurchaseClass extends BaseClass
|
|
|
'customAvatar' => $customAvatar,
|
|
|
'customMobile' => $customMobile,
|
|
|
];
|
|
|
-
|
|
|
+ //增加供货商的销售单
|
|
|
$return = OrderClass::addOrder($orderData, $ghsShopId, true);
|
|
|
$id = $return['id'] ?? 0;
|
|
|
self::updateById($hdOrderId, ['ghsOrderId' => $id]);
|