瀏覽代碼

入库管理-入库单逻辑修改(一个入库单只能有一条明细)

LZH 2 年之前
父節點
當前提交
728b5db5cd
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. 10 5
      ruoyi-ui/src/views/wms/docAsn/docAsnDetails.vue

+ 10 - 5
ruoyi-ui/src/views/wms/docAsn/docAsnDetails.vue

@@ -140,11 +140,16 @@
       },
       // 新增 / 修改
       addHandle () {
-        //控制只能单选
-        this.addOrUpdateVisible = true
-        this.$nextTick(() => {
-          this.$refs.addOrUpdate.init(this.queryParams.asnNo,'')
-        })
+        if (this.dataList.length >0){
+          this.addOrUpdateVisible = false
+          alert("只能新增一条明细")
+        }else {
+          //控制只能单选
+          this.addOrUpdateVisible = true
+          this.$nextTick(() => {
+            this.$refs.addOrUpdate.init(this.queryParams.asnNo,'')
+          })
+        }
       },
       updateHandle () {
         this.addOrUpdateVisible = true