|
|
@ -33,8 +33,8 @@ import request from '@/common/request.js' |
|
|
|
warehouseVolume:{label:"仓库容量(㎡)", type:"digit",placeholder:"请输入仓库容量"}, |
|
|
|
goodsType:{label:"存储物品类型",type:"select",columns:[],value:[]}, |
|
|
|
warehouseType:{label:"仓库类型",type:"select",columns:[],value:[]}, |
|
|
|
contactPeople:{label:"基地管理员", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, |
|
|
|
contactNumber:{label:"管理员联系方式", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, |
|
|
|
// contactPeople:{label:"基地管理员", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, |
|
|
|
// contactNumber:{label:"管理员联系方式", disabled:this.$store.getters['userInfo'].roleCode=="baseAdmin"}, |
|
|
|
warehousePic:{label:"仓库图片",type:"upImg",num:3}, |
|
|
|
}, |
|
|
|
formData:{ |
|
|
@ -44,8 +44,8 @@ import request from '@/common/request.js' |
|
|
|
warehouseVolume:"", |
|
|
|
goodsType:'', |
|
|
|
warehouseType:"", |
|
|
|
contactPeople:"", |
|
|
|
contactNumber:"", |
|
|
|
// contactPeople:"", |
|
|
|
// contactNumber:"", |
|
|
|
warehousePic:[], |
|
|
|
baseId: this.$store.state.baseInfo.id, |
|
|
|
}, |
|
|
@ -56,12 +56,12 @@ import request from '@/common/request.js' |
|
|
|
warehouseVolume:{required:true, message:"仓库容量必填!", type:"number", trigger:["blur","change"]}, |
|
|
|
goodsType:{required:true, message:"存储物品类型必填!", trigger:["blur","change"]}, |
|
|
|
warehouseType:{required:true, message:"仓库类型必选!", trigger:["blur","change"]}, |
|
|
|
contactPeople:{required:true, message:"基地管理员必填!", trigger:["blur","change"]}, |
|
|
|
contactNumber:{required:true, validator(rule,val,call){ |
|
|
|
if(!val)call(new Error("管理员联系方式必填!")); |
|
|
|
else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(val))call(new Error("请输入正确联系方式格式!")) |
|
|
|
else call(); |
|
|
|
}, trigger:["blur","change"]}, |
|
|
|
// contactPeople:{required:true, message:"基地管理员必填!", trigger:["blur","change"]}, |
|
|
|
// contactNumber:{required:true, validator(rule,val,call){ |
|
|
|
// if(!val)call(new Error("管理员联系方式必填!")); |
|
|
|
// else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(val))call(new Error("请输入正确联系方式格式!")) |
|
|
|
// else call(); |
|
|
|
// }, trigger:["blur","change"]}, |
|
|
|
warehousePic:{required:true, validator(rule,val,call){ |
|
|
|
if(!this.fields.warehousePic)call(new Error("仓库图片必选!")) |
|
|
|
else call() |
|
|
@ -80,8 +80,8 @@ import request from '@/common/request.js' |
|
|
|
this.fields.warehouseType.value=[e.warehouseType] |
|
|
|
this.fields.goodsType.value=[e.goodsType] |
|
|
|
}else if(this.$store.getters['userInfo'].roleCode=="baseAdmin"){ |
|
|
|
this.formData.contactPeople=this.$store.getters['userInfo'].realname |
|
|
|
this.formData.contactNumber=this.$store.getters['userInfo'].phone |
|
|
|
// this.formData.contactPeople=this.$store.getters['userInfo'].realname |
|
|
|
// this.formData.contactNumber=this.$store.getters['userInfo'].phone |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|