shish 4 anni fa
parent
commit
45595f2030
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      app-ghs/controllers/PurchaseOrderController.php

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

@@ -26,8 +26,12 @@ class PurchaseOrderController extends BaseController
 
         $ext = $this->shopExt;
         $printLabelSn = $ext->printLabelSn ?? '';
+        if(empty($printLabelSn)){
+            util::fail('请设置条码打印机');
+        }
         $p = new printUtil($printLabelSn);
 
+
         foreach ($itemList as $item) {
             $name = $item->name ?? '';
             $num = !empty($item->itemNum) ? floatval($item->itemNum) : 0;
@@ -60,6 +64,9 @@ class PurchaseOrderController extends BaseController
 
         $ext = $this->shopExt;
         $printLabelSn = $ext->printLabelSn ?? '';
+        if(empty($printLabelSn)){
+            util::fail('请设置条码打印机');
+        }
         $p = new printUtil($printLabelSn);
 
         $ptItemId = $item->itemId ?? '';