Kaynağa Gözat

采购收货数量是否能大于采购总数 参数判断

yusheng 1 yıl önce
ebeveyn
işleme
b05cd8ffa3

+ 14 - 2
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -239,6 +239,7 @@
   import fileMain from '@/components/addDoc/index.vue';
   import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
   import { lbjtList } from '@/enum/dict.js';
+  import { parameterGetByCode } from '@/api/main/index.js';
 
   export default {
     mixins: [dictMixins],
@@ -608,7 +609,8 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ]
+        ],
+        isTotalCount: 0 //采购收货数量是否限制不能大于采购总数 //0否 1是
       };
     },
     created() {
@@ -618,6 +620,12 @@
       getWarehouseList().then((res) => {
         this.warehouseList = res;
       });
+      //采购收货数量是否限制不能大于采购总数//0否 1是
+      parameterGetByCode({
+        code: 'purchaseOrder_invoice_productList_totalCount'
+      }).then((res) => {
+        this.isTotalCount = res.value;
+      });
     },
 
     computed: {},
@@ -842,7 +850,11 @@
             callback(new Error('请输入大于0的数字'));
           } else if (totalCount > row.orderTotalCount) {
             this.$message.warning('收货数量大于采购总数量');
-            callback();
+            if (this.isTotalCount == 1) {
+              callback('收货数量大于采购总数量');
+            } else {
+              callback();
+            }
           } else {
             callback();
           }