shish %!s(int64=3) %!d(string=hai) anos
pai
achega
f6e0fd2b30
Modificáronse 1 ficheiros con 12 adicións e 11 borrados
  1. 12 11
      app-ghs/controllers/ProductController.php

+ 12 - 11
app-ghs/controllers/ProductController.php

@@ -101,27 +101,28 @@ class ProductController extends BaseController
         $name = $info->name ?? '';
         $ptItemId = $info->itemId ?? 0;
         $mainId = $info->mainId ?? 0;
-
         $ext = $this->shopExt;
         $printLabelSn = $ext->printLabelSn ?? '';
         if (empty($printLabelSn)) {
             util::fail('请设置标签打印机');
         }
         $p = new printUtil($printLabelSn);
-
         $unit = $info->ratio . $info->smallUnit . '/' . $info->bigUnit;
-
         $p->times = $num;
-        $content = '<TEXT x="30" y="45" font="12" w="2" h="2" r="0">' . $name . '</TEXT>';
-        $content .= '<BC128 x="30" y="115" h="75" s="1" r="0" n="3" w="10">' . $ptItemId . '</BC128>';
-        if (in_array($mainId, [52, 1459])) {
-            $content .= '<TEXT x="30" y="250" font="11" w="2" h="2" r="0">惠雅鲜花</TEXT>';
+        //杭州斗南批发店
+        if ($this->shopId == 4608) {
+            $content = '<TEXT x="30" y="30" font="12" w="1" h="1" r="0">' . $name . '</TEXT>';
+            $content .= '<QR x="35"  y="100"  e="L"  w="5">' . Yii::$app->params['mallHost'] . "/item/show-info?id=" . $id . '</QR>';
+            $content .= '<TEXT x="40" y="270" font="12" w="1" h="1" r="0">扫码看价格</TEXT>';
         } else {
-            $content .= '<TEXT x="30" y="250" font="11" w="2" h="2" r="0">' . $unit . '</TEXT>';
+            $content = '<TEXT x="30" y="45" font="12" w="2" h="2" r="0">' . $name . '</TEXT>';
+            $content .= '<BC128 x="30" y="115" h="75" s="1" r="0" n="3" w="10">' . $ptItemId . '</BC128>';
+            if (in_array($mainId, [52, 1459])) {
+                $content .= '<TEXT x="30" y="250" font="11" w="2" h="2" r="0">惠雅鲜花</TEXT>';
+            } else {
+                $content .= '<TEXT x="30" y="250" font="11" w="2" h="2" r="0">' . $unit . '</TEXT>';
+            }
         }
-
-        //$content .= '<QR x="30"  y="390"  e="L"  w="5">' . Yii::$app->params['mallHost'] . "/item/show-info?id=" . $id . '</QR>';
-        //$content .= '<TEXT x="220" y="400" font="12" w="1" h="1" r="90">扫码看价格</TEXT>';
         $p->printLabelMsg($content);
         util::complete();
     }