Explorar o código

fix: 增加提交作废前限制

zh %!s(int64=2) %!d(string=hai) anos
pai
achega
01b02cb2d0
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  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({