Browse Source

控制小单位调拨

shish 1 year ago
parent
commit
7d0285ae9d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app-ghs/controllers/StockOutController.php

+ 5 - 1
app-ghs/controllers/StockOutController.php

@@ -252,7 +252,11 @@ class StockOutController extends BaseController
             foreach ($ghsItemInfo as $v) {
                 $bigNum = $v['bigNum'] ?? 0;
                 $smallNum = $v['smallNum'] ?? 0;
-                if ($bigNum <= 0 && $smallNum <= 0) {
+                $name = $v['name']??'';
+                if($smallNum > 0){
+                    util::fail($name.'不能调拨小单位');
+                }
+                if ($bigNum <= 0) {
                     util::fail('花材数量不能为0');
                 }
             }