Răsfoiți Sursa

Merge branch 'master' into dev

shish 4 luni în urmă
părinte
comite
d0f876df83

+ 38 - 0
app-hd/controllers/PurchaseController.php

@@ -732,6 +732,44 @@ class PurchaseController extends BaseController
                 }
 
             }
+
+            if ($sendType == 2) {
+                //温州易批花,跑腿,不满100,要选10元的补运费商品
+                if ($ghsShopId == 91115) {
+                    if ($respond->actPrice < 100) {
+                        $transaction->rollBack();
+                        $hasMust = array_intersect($ids, [4449812]);
+                        if (empty($hasMust)) {
+                            util::fail('不满100,必选商品 补运费10元');
+                        }
+                    }
+                }
+            }
+            if ($sendType == 4) {
+                //温州易批花,快递,不满100,要选10元的补运费商品
+                if ($ghsShopId == 91115) {
+                    if ($respond->actPrice < 100) {
+                        $transaction->rollBack();
+                        $hasMust = array_intersect($ids, [4449812]);
+                        if (empty($hasMust)) {
+                            util::fail('不满100,必选商品 补运费10元');
+                        }
+                    }
+                }
+            }
+            if ($sendType == 3) {
+                //温州易批花,物流,不满200,要选20元的补运费商品
+                if ($ghsShopId == 91115) {
+                    if ($respond->actPrice < 200) {
+                        $transaction->rollBack();
+                        $hasMust = array_intersect($ids, [4449811]);
+                        if (empty($hasMust)) {
+                            util::fail('不满200,必选商品 补运费20元');
+                        }
+                    }
+                }
+            }
+
             $transaction->commit();
             $transactionFinished = true;
             ProductClass::clearLimitBuyRollbackSnapshot();

+ 10 - 6
biz-ghs/order/classes/OrderClass.php

@@ -2,6 +2,7 @@
 
 namespace bizGhs\order\classes;
 
+use bizGhs\custom\classes\DistClass;
 use bizGhs\item\classes\ItemClassClass;
 use bizHd\purchase\classes\PurchaseItemClass;
 use common\components\arrayUtil;
@@ -450,7 +451,7 @@ class OrderClass extends BaseClass
         $customId = $order->customId ?? 0;
         $custom = CustomClass::getById($customId, true);
         if (empty($custom)) {
-            util::fail('没有找到客户信息,编号:'.$customId);
+            util::fail('没有找到客户信息,编号:' . $customId);
         }
         $shopId = $custom->shopId ?? 0;
         $customShop = ShopClass::getById($shopId, true);
@@ -1514,7 +1515,7 @@ class OrderClass extends BaseClass
             } else {
                 $content .= $productNum . ' = ' . $productPrice . '元  ' . ($ratioType == 0 ? $ratio . '支装' : ($ratioType == 1 ? '若干支装' : '')) . '<BR>';
             }
-        }else{
+        } else {
             $content .= ' ' . ($ratioType == 0 ? $ratio . '支装' : ($ratioType == 1 ? '若干支装' : '')) . '<BR>';
         }
         $content .= '--------------------------------<BR>';
@@ -1899,7 +1900,7 @@ class OrderClass extends BaseClass
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         $orderMainId = $orderInfo['mainId'] ?? 0;
         if (getenv('YII_ENV') == 'production') {
-            $map = [65726, 58, 25119,28500];
+            $map = [65726, 58, 25119, 28500];
         } else {
             $map = [828];
         }
@@ -2958,7 +2959,7 @@ XL;
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         $orderMainId = $order->mainId;
         if (getenv('YII_ENV') == 'production') {
-            $map = [65726, 58, 25119,28500];
+            $map = [65726, 58, 25119, 28500];
         } else {
             $map = [828];
         }
@@ -2992,6 +2993,9 @@ XL;
         if (empty($wlName)) {
             $wlName = $shortRemark;
         }
+        $distId = $custom->distId ?? '';
+        $dist = DistClass::getById($distId, true);
+        $distName = $dist->name ?? '';
 
         $address = $order->address ?? '';
         $floor = $order->floor ?? '';
@@ -3056,9 +3060,9 @@ XL;
             $content .= '<TEXT x="290" y="30" font="12" w="2" h="3" r="90">' . $customName . '</TEXT>';
             $content .= '<TEXT x="195" y="30" font="12" w="1" h="2" r="90">' . $fullAddress . '</TEXT>';
             $content .= '<TEXT x="128" y="30" font="12" w="2" h="2" r="90">' . $customMobile . ' ' . $itemNum . '扎</TEXT>';
-            //福州易批花,不仅要自动打印,还要打印出物流名称
+            //福州易批花,温州易批花,不仅要自动打印,还要打印出物流名称
             if ($orderMainId == 25119 || $orderMainId == 28500) {
-                $content .= '<TEXT x="70" y="30" font="12" w="2" h="2" r="90">物流 ' . $wlName .' '.$payDate. '</TEXT>';
+                $content .= '<TEXT x="70" y="30" font="12" w="2" h="2" r="90">片区 ' . $distName . ' ' . $payDate . '</TEXT>';
             }
             /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         }