shish il y a 4 ans
Parent
commit
f04fe09193

+ 3 - 0
app-ghs/controllers/ProductController.php

@@ -45,9 +45,12 @@ class ProductController extends BaseController
         }
         $p = new printUtil($printLabelSn);
 
+        $unit = $info->ratio . $info->smallUnit . '/' . $info->bigUnit;
+
         $p->times = $num;
         $content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
         $content .= '<BC128 x="260" y="30" h="80" s="1" r="90" n="5" w="12">' . $ptItemId . '</BC128>';
+        $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $unit . '</TEXT>';
         $p->printLabelMsg($content);
         util::complete();
     }

+ 11 - 0
app-ghs/controllers/PurchaseOrderController.php

@@ -40,11 +40,17 @@ class PurchaseOrderController extends BaseController
             }
             $ptItemId = $item->itemId ?? '';
             $p->times = $num;
+
+            $smallUnit = $item->smallUnit ?? '';
+            $bigUnit = $item->bigUnit ?? '';
+            $unit = $smallUnit . '/' . $bigUnit;
+
             $content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
             $content .= '<BC128 x="260" y="30" h="80" s="1" r="90" n="5" w="12">' . $ptItemId . '</BC128>';
             if ($key % 2 == 1) {
                 $content .= '<TEXT x="415" y="20" font="12" w="2" h="2" r="90">.</TEXT>';
             }
+            $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $unit . '</TEXT>';
             $p->printLabelMsg($content);
         }
         util::complete();
@@ -72,10 +78,15 @@ class PurchaseOrderController extends BaseController
         }
         $p = new printUtil($printLabelSn);
 
+        $smallUnit = $item->smallUnit ?? '';
+        $bigUnit = $item->bigUnit ?? '';
+        $unit = $smallUnit . '/' . $bigUnit;
+
         $ptItemId = $item->itemId ?? '';
         $p->times = $num;
         $content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
         $content .= '<BC128 x="260" y="30" h="80" s="1" r="90" n="5" w="12">' . $ptItemId . '</BC128>';
+        $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $unit . '</TEXT>';
         $p->printLabelMsg($content);
         util::complete();
     }

+ 3 - 0
app-hd/controllers/ProductController.php

@@ -41,9 +41,12 @@ class ProductController extends BaseController
         }
         $p = new printUtil($printLabelSn);
 
+        $unit = $info->ratio . $info->smallUnit . '/' . $info->bigUnit;
+
         $p->times = $num;
         $content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
         $content .= '<BC128 x="260" y="30" h="80" s="1" r="90" n="5" w="12">' . $ptItemId . '</BC128>';
+        $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $unit . '</TEXT>';
         $p->printLabelMsg($content);
         util::complete();
     }