shish %!s(int64=2) %!d(string=hai) anos
pai
achega
0985fc1b6d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app-ghs/controllers/PurchaseOrderController.php

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

@@ -32,6 +32,9 @@ class PurchaseOrderController extends BaseController
         if ($cg->mainId != $this->mainId) {
         if ($cg->mainId != $this->mainId) {
             util::fail('不是你的采购单哦');
             util::fail('不是你的采购单哦');
         }
         }
+        if ($cg->status != 4) {
+            util::fail('入库的订单才能打印');
+        }
         $orderSn = $cg->orderSn ?? '';
         $orderSn = $cg->orderSn ?? '';
         $itemList = PurchaseOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
         $itemList = PurchaseOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
         $table = [];
         $table = [];