zhongtianhaoyuan 4 lat temu
rodzic
commit
2536df4f38

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

@@ -362,24 +362,30 @@ export default {
         })
         return
       }
-       if(!this.selectedOptions){
+       if(!this.deptBudgetList.personPhone){
         this.$message({
-          message: '仓库所在地不能为空!',
+          message: '负责人电话不能为空!',
           type: 'warning',
         })
         return
       }
-
-       if(!this.deptBudgetList.detailedAddress){
+      if(this.deptBudgetList.personPhone.length != 11){
         this.$message({
-          message: '详细地址不能为空!',
+          message: '手机号输入有误!',
           type: 'warning',
         })
         return
       }
-       if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+      //  if(!this.deptBudgetList.warehousePrivate){
+      //   this.$message({
+      //     message: '仓库所在地不能为空!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+       if(!this.deptBudgetList.detailedAddress){
         this.$message({
-          message: '详细地址长度不符合要求!',
+          message: '详细地址不能为空!',
           type: 'warning',
         })
         return
@@ -392,31 +398,6 @@ export default {
         })
         return
       }
-      if (!this.deptBudgetList.warehouseName) {
-        this.$message({
-          message: '仓库名称不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.warehouseName.length < 2 ||
-        this.deptBudgetList.warehouseName.length > 20
-      ) {
-        this.$message({
-          message: '仓库名称长度不符合要求,请控制在2-20字符之内',
-          type: 'warning',
-        })
-        return
-      }
-      
-      if (this.deptBudgetList.personPhone.length > 11) {
-        this.$message({
-          message: '手机号输入有误',
-          type: 'warning',
-        })
-        return
-      }
       if (
         this.deptBudgetList.detailedAddress.length < 2 ||
         this.deptBudgetList.detailedAddress.length > 20
@@ -427,6 +408,7 @@ export default {
         })
         return
       }
+      // freightspace
       for (var i = 0; i < this.freightspace.length; i++) {
         for (var j = i + 1; j < this.freightspace.length; j++) {
           console.log(

+ 70 - 0
src/views/warehouse/warehouseManagementEdit.vue

@@ -392,6 +392,76 @@ computed : {
 
     //提交
     submit() {
+       if(!this.deptBudgetList.warehouseName){
+        this.$message({
+          message: '仓库名称不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+        this.$message({
+          message: '仓库名长度不符合要求!',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.personCharge){
+        this.$message({
+          message: '负责人不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.personCharge.length < 2 ||
+        this.deptBudgetList.personCharge.length > 10
+      ) {
+        this.$message({
+          message: '负责人长度不符合要求,请控制在2-10字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.personPhone){
+        this.$message({
+          message: '负责人电话不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if(this.deptBudgetList.personPhone.length != 11){
+        this.$message({
+          message: '手机号输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.detailedAddress){
+        this.$message({
+          message: '详细地址不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      
+      if(this.totalStorage <= 0){
+        this.$message({
+          message: '仓位储量不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.detailedAddress.length < 2 ||
+        this.deptBudgetList.detailedAddress.length > 20
+      ) {
+        this.$message({
+          message: '详细地址长度不符合要求,请控制在2-20字符之内',
+          type: 'warning',
+        })
+        return
+      }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.baseId = this.baseId

+ 1 - 1
src/views/warehouse/warehouseManagementList.vue

@@ -260,7 +260,7 @@ export default {
     warehousing(item) {
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
-        free += Number(item.warehouseNumViewList[i].storage)
+        free += item.warehouseNumViewList[i].storage
       }
       this.$router.push({
         path: 'warehouseManagementPut',

+ 1 - 1
vue.config.js

@@ -143,7 +143,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.121:8090/',
+        target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.1.124:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址