|
|
@@ -318,7 +318,7 @@ class StoreOrder extends BaseModel
|
|
|
$priceGroup = $cartGroup['priceGroup'];
|
|
|
$other = $cartGroup['other'];
|
|
|
$distance = 0;
|
|
|
- if (!$userInfo['admin_id'] && $other['only_store_user']) {
|
|
|
+ if (!$userInfo['admin_id'] && ($other['only_store_user'] ?? 0)) {
|
|
|
return self::setErrorInfo('不支持采购!', true);
|
|
|
}
|
|
|
if ($other['store_id'] != $storeId && !$store_order && !$free_check && !$test) {
|
|
|
@@ -534,13 +534,13 @@ class StoreOrder extends BaseModel
|
|
|
$orderInfo['store_id'] = SystemStore::getStoreDispose($storeId, 'id');
|
|
|
if (!$orderInfo['store_id'] && !$free_check) return self::setErrorInfo('暂无门店无法选择门店!', true);
|
|
|
else if ($free_check) $orderInfo['store_id'] = 0;
|
|
|
- if ($other['only_store_user'] && !$orderInfo['store_id']) {
|
|
|
+ if (($other['only_store_user'] ?? 0) && !$orderInfo['store_id']) {
|
|
|
return self::setErrorInfo('请选择采购门店!', true);
|
|
|
}
|
|
|
|
|
|
if ($orderInfo['store_id']) {
|
|
|
$store = SystemStore::get($orderInfo['store_id']);
|
|
|
- if (!$store['store_user'] && $other['only_store_user']) {
|
|
|
+ if (!$store['store_user'] && ($other['only_store_user'] ?? 0)) {
|
|
|
return self::setErrorInfo('门店不支持采购!', true);
|
|
|
}
|
|
|
$orderInfo['province'] = explode(',', $store['address'])[0] ?? '';
|