|
|
@ -30,6 +30,7 @@ import request from '@/common/request.js' |
|
|
|
warehouseName:{label:"仓库名称"}, |
|
|
|
warehouseAddress:{label:"仓库位置",type:"textarea"}, |
|
|
|
warehouseVolume:{label:"仓库容量(㎡)", type:"digit",placeholder:"请输入仓库容量"}, |
|
|
|
goods_type:{label:"存储物品类型",type:"select",columns:[],value:[]}, |
|
|
|
warehouseType:{label:"仓库类型",type:"select",columns:[[{label:"标签1",value:1},{label:"标签2",value:2}]],value:[]}, |
|
|
|
contactPeople:{label:"基地管理员"}, |
|
|
|
contactNumber:{label:"管理员联系方式"}, |
|
|
@ -39,6 +40,7 @@ import request from '@/common/request.js' |
|
|
|
warehouseName:"", |
|
|
|
warehouseAddress:"", |
|
|
|
warehouseVolume:"", |
|
|
|
goods_type:'', |
|
|
|
warehouseType:"", |
|
|
|
contactPeople:"", |
|
|
|
contactNumber:"", |
|
|
@ -49,6 +51,7 @@ import request from '@/common/request.js' |
|
|
|
warehouseName:{required:true, message:"仓库名称必填!", trigger:["blur","change"]}, |
|
|
|
warehouseAddress:{required:true, message:"仓库位置必填!", trigger:["blur","change"]}, |
|
|
|
warehouseVolume:{required:true, message:"仓库容量必填!", type:"number", trigger:["blur","change"]}, |
|
|
|
goods_type:{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){ |
|
|
@ -73,6 +76,7 @@ import request from '@/common/request.js' |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
async init(){ |
|
|
|
//仓库类型 |
|
|
|
var res=await request("/common/api/dict/queryDictItemByDictCode",{ |
|
|
|
method:"post", |
|
|
|
params:{dictCode: "warehouse_type"} |
|
|
@ -86,6 +90,20 @@ import request from '@/common/request.js' |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
//存储物品类型 |
|
|
|
var res=await request("/common/api/dict/queryDictItemByDictCode",{ |
|
|
|
method:"post", |
|
|
|
params:{dictCode: "goods_type"} |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
this.fields.goods_type.columns=[res.data] |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"获取仓库类型选项失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
submit(){ |
|
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
|