浏览代码

修改仓库管理附件、仓库定位为必填项

mxx 3 年之前
父节点
当前提交
86d5c41550
共有 2 个文件被更改,包括 33 次插入1 次删除
  1. 14 0
      src/views/warehouse/warehouseManagementAdd.vue
  2. 19 1
      src/views/warehouse/warehouseManagementEdit.vue

+ 14 - 0
src/views/warehouse/warehouseManagementAdd.vue

@@ -379,6 +379,20 @@
             })
             return
           }
+          if (!this.deptBudgetList.addressUrl) {
+            this.$message({
+              message: '附件不能为空!',
+              type: 'warning',
+            })
+            return
+          }
+           if (!this.deptBudgetList.warehousePositioning) {
+            this.$message({
+              message: '仓库定位不能为空!',
+              type: 'warning',
+            })
+            return
+          }
 
           if (this.totalStorage <= 0) {
             this.$message({

+ 19 - 1
src/views/warehouse/warehouseManagementEdit.vue

@@ -479,7 +479,11 @@
             // if(this.deptBudgetList.addressUrl){
             //   this.fileList =  this._getFileList(this.deptBudgetList.addressUrl)
             // }
-            this.addressUrls = this.deptBudgetList.addressUrl.split(',')
+            if(this.deptBudgetList.addressUrl){
+              this.addressUrls = this.deptBudgetList.addressUrl.split(',')
+            }else{
+                this.addressUrls = []
+            }
             this.deptBudgetList.otherPersonPhone = this.deptBudgetList.otherPersonPhone.split(',')
             this.addressUrls.pop()
           })
@@ -557,6 +561,20 @@
           })
           return
         }
+        if (!this.deptBudgetList.addressUrl) {
+          this.$message({
+            message: '附件不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+          if (!this.deptBudgetList.warehousePositioning) {
+          this.$message({
+            message: '仓库定位不能为空!',
+            type: 'warning',
+          })
+          return
+        }
         if (this.warehouseType == 1) {
           if (this.totalStorage <= 0) {
             this.$message({