Browse Source

fix: 增加提交作废前限制

zh 2 years ago
parent
commit
01b02cb2d0
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/views/sales_policy/components/cancal.vue

+ 7 - 0
src/views/sales_policy/components/cancal.vue

@@ -317,6 +317,13 @@ export default {
         this.$errorMsg('物料不能为空')
         return
       }
+      for (let i = 0; i < this.tableData.length; i++) {
+        if (!this.tableData[i].number) {
+          this.$errorMsg('物料不能为空')
+          return
+        }
+      }
+
       const policyIds = this.policyList.map(k => k.id).join(',')
       const materialIds = this.tableData.map(k => k.id).join(',')
       cancalMaterialPolicy({