|
@@ -318,6 +318,9 @@ class StoreOrder extends BaseModel
|
|
|
$priceGroup = $cartGroup['priceGroup'];
|
|
$priceGroup = $cartGroup['priceGroup'];
|
|
|
$other = $cartGroup['other'];
|
|
$other = $cartGroup['other'];
|
|
|
$distance = 0;
|
|
$distance = 0;
|
|
|
|
|
+ if (!$userInfo['admin_id'] && $other['only_store_user']) {
|
|
|
|
|
+ return self::setErrorInfo('不支持提货!', true);
|
|
|
|
|
+ }
|
|
|
if ($other['store_id'] != $storeId && !$store_order && !$free_check && !$test) {
|
|
if ($other['store_id'] != $storeId && !$store_order && !$free_check && !$test) {
|
|
|
self::clearCacheOrderInfo($uid, $key);
|
|
self::clearCacheOrderInfo($uid, $key);
|
|
|
return self::setErrorInfo('所选门店改变,请刷新当前页面!', true);
|
|
return self::setErrorInfo('所选门店改变,请刷新当前页面!', true);
|
|
@@ -526,12 +529,20 @@ class StoreOrder extends BaseModel
|
|
|
'city' => $addressInfo['city'],
|
|
'city' => $addressInfo['city'],
|
|
|
'district' => $addressInfo['district'],
|
|
'district' => $addressInfo['district'],
|
|
|
'time_area' => $time_area,
|
|
'time_area' => $time_area,
|
|
|
|
|
+ 'store_user' => $other['only_store_user'],
|
|
|
];
|
|
];
|
|
|
$orderInfo['store_id'] = SystemStore::getStoreDispose($storeId, 'id');
|
|
$orderInfo['store_id'] = SystemStore::getStoreDispose($storeId, 'id');
|
|
|
if (!$orderInfo['store_id'] && !$free_check) return self::setErrorInfo('暂无门店无法选择门店!', true);
|
|
if (!$orderInfo['store_id'] && !$free_check) return self::setErrorInfo('暂无门店无法选择门店!', true);
|
|
|
else if ($free_check) $orderInfo['store_id'] = 0;
|
|
else if ($free_check) $orderInfo['store_id'] = 0;
|
|
|
|
|
+ if ($other['only_store_user'] && !$orderInfo['store_id']) {
|
|
|
|
|
+ return self::setErrorInfo('请选择采购门店!', true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if ($orderInfo['store_id']) {
|
|
if ($orderInfo['store_id']) {
|
|
|
$store = SystemStore::get($orderInfo['store_id']);
|
|
$store = SystemStore::get($orderInfo['store_id']);
|
|
|
|
|
+ if (!$store['store_user'] && $other['only_store_user']) {
|
|
|
|
|
+ return self::setErrorInfo('门店不支持采购!', true);
|
|
|
|
|
+ }
|
|
|
$orderInfo['province'] = explode(',', $store['address'])[0] ?? '';
|
|
$orderInfo['province'] = explode(',', $store['address'])[0] ?? '';
|
|
|
$orderInfo['city'] = explode(',', $store['address'])[1] ?? '';
|
|
$orderInfo['city'] = explode(',', $store['address'])[1] ?? '';
|
|
|
$orderInfo['district'] = explode(',', $store['address'])[2] ?? '';
|
|
$orderInfo['district'] = explode(',', $store['address'])[2] ?? '';
|