shish 2 years ago
parent
commit
c90a8503da
1 changed files with 42 additions and 14 deletions
  1. 42 14
      biz-ghs/order/classes/OrderClass.php

+ 42 - 14
biz-ghs/order/classes/OrderClass.php

@@ -1219,6 +1219,9 @@ class OrderClass extends BaseClass
 
         $shopId = $orderInfo['shopId'] ?? 0;
         $shop = ShopClass::getById($shopId, true);
+        if (empty($shop)) {
+            util::fail('打印失败,没有找到门店');
+        }
         $sjId = $shop->sjId ?? 0;
         $fontSizeType = $shop->fontSize ?? 0;
         $telephone = $shop->telephone ?? '';
@@ -1266,22 +1269,47 @@ class OrderClass extends BaseClass
         if (isset($orderInfo['presell']) && $orderInfo['presell'] == 1) {
             $content .= '<B>预售单</B><BR>';
         }
-        if (isset($orderInfo['sendType'])) {
-            $sendName = '送货上门';
-            if ($orderInfo['sendType'] == 1) {
-                $sendName = '到店自取';
-            }
-            if ($orderInfo['sendType'] == 2) {
-                $sendName = '代叫配送';
-            }
-            if ($orderInfo['sendType'] == 3) {
-                $wlName = $orderInfo['wlName'] ?? '未填物流';
-                $sendName = $wlName;
+        if (isset($shop->pfLevel) && $shop->pfLevel == 1) {
+            if (isset($orderInfo['transType'])) {
+                $sendName = '同城配送';
+                if ($orderInfo['transType'] == 0) {
+                    $sendName = '德邦物流';
+                }
+                if ($orderInfo['transType'] == 1) {
+                    $sendName = '顺丰物流';
+                }
+                if ($orderInfo['transType'] == 2) {
+                    $sendName = '冷链物流';
+                }
+                if ($orderInfo['transType'] == 3) {
+                    $sendName = '航空物流';
+                }
+                if ($orderInfo['transType'] == 4) {
+                    $sendName = '同城配送';
+                }
+                if ($orderInfo['transType'] == 5) {
+                    $sendName = '到店自取';
+                }
+                $content .= '<BR><B>' . $sendName . '</B><BR>';
             }
-            if ($orderInfo['sendType'] == 4) {
-                $sendName = '发快递';
+        } else {
+            if (isset($orderInfo['sendType'])) {
+                $sendName = '送货上门';
+                if ($orderInfo['sendType'] == 1) {
+                    $sendName = '到店自取';
+                }
+                if ($orderInfo['sendType'] == 2) {
+                    $sendName = '代叫配送';
+                }
+                if ($orderInfo['sendType'] == 3) {
+                    $wlName = $orderInfo['wlName'] ?? '未填物流';
+                    $sendName = $wlName;
+                }
+                if ($orderInfo['sendType'] == 4) {
+                    $sendName = '发快递';
+                }
+                $content .= '<BR><B>' . $sendName . '</B><BR>';
             }
-            $content .= '<BR><B>' . $sendName . '</B><BR>';
         }
         if (isset($respond['remark']) && !empty($respond['remark'])) {
             $content .= '<BR>';