|
|
@@ -873,6 +873,19 @@ class OrderController extends BaseController
|
|
|
if (empty($custom)) {
|
|
|
util::fail('请选客户哦');
|
|
|
}
|
|
|
+
|
|
|
+ if ($customId != 5405 || $customId != 4091) {
|
|
|
+ //除了花样年华和惠雅鲜花,批发店不能给已经开了批发店的零售客户开单,同理,采购也是要限制的。
|
|
|
+ //审核入库的功能开通之后就可以用起来
|
|
|
+ $customShopId = $custom['shopId'] ?? 0;
|
|
|
+ if (!empty($customShopId)) {
|
|
|
+ $customShop = ShopClass::getById($customShopId, true);
|
|
|
+ if (isset($customShop->pfShopId) && !empty($customShop->pfShopId)) {
|
|
|
+ util::fail('此客户开了批发店,暂不能直接给他开单');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
CustomClass::valid($custom, $this->shopId);
|
|
|
if (isset($custom['mainId']) && !empty($custom['mainId']) && $custom['mainId'] == $custom['ownMainId']) {
|
|
|
util::fail('不能给自己的零售店开单');
|