shish 5 ngày trước cách đây
mục cha
commit
134d9fab06
2 tập tin đã thay đổi với 35 bổ sung21 xóa
  1. 15 3
      app-hd/controllers/GhsController.php
  2. 20 18
      biz-ghs/order/classes/OrderClass.php

+ 15 - 3
app-hd/controllers/GhsController.php

@@ -257,7 +257,7 @@ class GhsController extends BaseController
         $ghsInfo['packCost'] = $ghsShop->packCost ? floatval($ghsShop->packCost) : 0;
         $lackExpend = $ghsShop->lackExpend ? floatval($ghsShop->lackExpend) : 0;
         $customId = $ghsInfo['customId'] ?? 0;
-        $needAdd = \bizHd\shop\classes\ShopClass::needAddPackCost($ghsShop, $customId);
+        $needAdd = \bizHd\shop\classes\ShopClass::needAddPackCost($ghsShop, $customId, 4);
         //昆明批发,需要算打包费和运费
         $needAddPackFreight = 1;
         if (!$needAdd) {
@@ -273,6 +273,7 @@ class GhsController extends BaseController
         $ghsInfo['kiloFee'] = $ghsShop->kiloFee ?? 0;
         $ghsInfo['miniKilo'] = $ghsShop->miniKilo ?? 0;
 
+        //这个多处要补充的地方 add_pfLevel_many_place
         $ghsInfo['pfLevel'] = $ghsShop->pfLevel ?? 0;
         $ghsInfo['afterSale'] = $ghsShop->afterSale ?? 1;
         //联系电话
@@ -321,6 +322,10 @@ class GhsController extends BaseController
         }
         $ghsInfo['hcMap'] = $hcMap;
 
+        //是否使用新的配送方式,关键词 sh_method_area
+        $newShMethod = dict::getNewMethodShop();
+        $ghsInfo['useNewShMethod'] = in_array($ghsShopId, $newShMethod) ? 1 : 0;
+
         util::success($ghsInfo);
     }
 
@@ -378,6 +383,13 @@ class GhsController extends BaseController
 
             $ghs['transCost'] = dict::getDict('transCost', null, null, $ghsShop->mainId);
 
+            //这个多处要补充的地方 add_pfLevel_many_place
+            $ghs['pfLevel'] = $ghsShop->pfLevel ?? 0;
+
+            //是否使用新的配送方式,关键词 sh_method_area
+            $newShMethod = dict::getNewMethodShop();
+            $ghs['useNewShMethod'] = in_array($ghsShopId, $newShMethod) ? 1 : 0;
+
         } else {
             //没有开店也给显示供货商信息
             $shop = ShopClass::getShopInfo($shopId);
@@ -503,10 +515,10 @@ class GhsController extends BaseController
         $get = Yii::$app->request->get();
         $ghsId = intval($get['ghsId'] ?? 0);
         $ghs = GhsClass::getById($ghsId);
-        if(empty($ghs)){
+        if (empty($ghs)) {
             util::fail('没有找到批发店');
         }
-        if($ghs['ownMainId'] != $this->mainId){
+        if ($ghs['ownMainId'] != $this->mainId) {
             util::fail('不是你的批发店');
         }
         $mainId = $ghs['mainId'] ?? 0;

+ 20 - 18
biz-ghs/order/classes/OrderClass.php

@@ -1960,6 +1960,14 @@ class OrderClass extends BaseClass
                     $showPrice = 0;
                 }
             }
+
+            //清流美朵花业线上下单不显示价格
+            if (isset($orderInfo->mainId) && $orderInfo->mainId == 99641) {
+                if (!empty($orderInfo->customShopAdminId)) {
+                    $showPrice = 0;
+                }
+            }
+
             //北京花篮子,线上下单,不显示价格
             if (isset($orderInfo->mainId) && $orderInfo->mainId == 10735) {
                 if (!empty($orderInfo->customShopAdminId)) {
@@ -2015,7 +2023,7 @@ class OrderClass extends BaseClass
         $orderMainId = $orderInfo['mainId'] ?? 0;
         if (getenv('YII_ENV') == 'production') {
             //东莞我要花不要自动打印标准,mainId=2644,已经去掉了
-            $map = [65726, 58, 25119, 28500, 1294, 12925];
+            $map = [65726, 58, 25119, 28500, 1294, 12925, 83694];
         } else {
             $map = [828];
         }
@@ -2142,7 +2150,7 @@ class OrderClass extends BaseClass
                 $name = $current['name'] ?? '';
                 $count = $current['count'] ?? '';
                 if ($fontSizeType == 1) {
-                    $content .= '<L>'.$name . ' ' . $count . '</L><BR>';
+                    $content .= '<L>' . $name . ' ' . $count . '</L><BR>';
                 } else {
                     $content .= '<B>' . $name . ' ' . $count . '</B><BR>';
                 }
@@ -2213,26 +2221,20 @@ class OrderClass extends BaseClass
         }
 
         $content .= "<BR>";
-
-        if (getenv('YII_ENV') == 'production') {
-            //丽子鲜花、花样年华、镜中花卉、满天星、世纪花、盛丰、福清辉煌、美阁都不显示扫码买花
-            if (!in_array($orderInfo->shopId, [1527, 1585, 1596, 16454, 33668, 38492, 36596, 35389, 38322, 43274, 40312, 44556, 42946, 51758, 8391, 65591, 8596, 81437, 14248])) {
-                //勇记、国恋、花悠星零售开单不需要打印扫码买花
-//                if ($customId != 12145 || $customId != 12487 || $customId != 12281) {
-//                    $content .= "<BR>";
-//                    $content .= "<C>扫码买花结账</C>";
-//                    $content .= "<BR>";
-//                    $host = Yii::$app->params['hdHost'];
-//                    $content .= "<QR>" . $host . "/#/admin/home/workbench</QR>";
-//                }
-            }
-        }
         $content .= "<BR>";
         $content .= "<BR>";
 
         if (!empty($printSn)) {
             $p = new printUtil($printSn);
-            $p->printMsg($content, $shop, $orderSn);
+            // onlinePrint 每次打印均写入飞鹅打印日志缓存
+            $logMeta = [
+                'writeLog' => true,
+                'mainId' => intval($orderInfo['mainId'] ?? 0),
+                'orderId' => intval($orderInfo['id'] ?? 0),
+                'orderSn' => (string)$orderSn,
+                'printSn' => (string)$printSn,
+            ];
+            $p->printMsg($content, $shop, $orderSn, $logMeta);
         }
 
     }
@@ -3079,7 +3081,7 @@ XL;
         /**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
         $orderMainId = $order->mainId;
         if (getenv('YII_ENV') == 'production') {
-            $map = [65726, 58, 25119, 28500, 1294, 12925, 2644, 10652, 2084, 89473,83694];
+            $map = [65726, 58, 25119, 28500, 1294, 12925, 2644, 10652, 2084, 89473, 83694];
         } else {
             $map = [828];
         }