Browse Source

修改表单数据

master
邓宏 2 years ago
parent
commit
335800a951
  1. 9
      pages/warehouse/info.vue

9
pages/warehouse/info.vue

@ -30,7 +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:[]},
goodsType:{label:"存储物品类型",type:"select",columns:[],value:[]},
warehouseType:{label:"仓库类型",type:"select",columns:[[{label:"标签1",value:1},{label:"标签2",value:2}]],value:[]},
contactPeople:{label:"基地管理员"},
contactNumber:{label:"管理员联系方式"},
@ -40,7 +40,7 @@ import request from '@/common/request.js'
warehouseName:"",
warehouseAddress:"",
warehouseVolume:"",
goods_type:'',
goodsType:'',
warehouseType:"",
contactPeople:"",
contactNumber:"",
@ -51,7 +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"]},
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){
@ -96,7 +96,7 @@ import request from '@/common/request.js'
params:{dictCode: "goods_type"}
})
if(res.statu){
this.fields.goods_type.columns=[res.data]
this.fields.goodsType.columns=[res.data]
}else{
uni.showModal({
title:"提示",
@ -137,6 +137,7 @@ import request from '@/common/request.js'
this.fields.warehousePic.value=res.data.warehousePic
this.formData.warehousePic=res.data.warehousePic?.split?.(",")?.filter?.(v=>v)||[]
this.fields.warehouseType.value=[res.data.warehouseType]
this.fields.goodsType.value=[res.data.goodsType]
}else{
uni.showModal({
title:"提示",

Loading…
Cancel
Save