From b82836699f441c0b6c1a5686dafa32c06d7d9ddc Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 10 Feb 2023 16:24:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/plant_plan.vue | 3 +++ pages/warehouse/info.vue | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pages/massif/plant_plan.vue b/pages/massif/plant_plan.vue index 0b2bf64..3005ac2 100644 --- a/pages/massif/plant_plan.vue +++ b/pages/massif/plant_plan.vue @@ -34,6 +34,7 @@ export default { return{ fields:{ varietyName:{label:"品种名称"}, + warehouseNo:{label:"种植编号"}, plantType:{label:"作物类型",type:"select",columns:[[]],value:[]}, plantArea:{label:"种植面积(亩)",type:"digit"}, startTime:{label:"种植开始日期",type:"calendar"}, @@ -53,6 +54,7 @@ export default { }, formData:{ varietyName:"", + warehouseNo:"", plantType:"", plantArea:"", startTime:"", @@ -67,6 +69,7 @@ export default { }, rules:{ varietyName: {required:true, message:"品种名称必填!", trigger:"blur"}, + warehouseNo: {required:true, message:"种植编号必填!", trigger:"blur"}, plantType: {required:true, message:"作物类型必选!", trigger:"blur"}, plantArea: {required:true, type:"number", message:"种植面积必填!", trigger:"blur"}, startTime: {required:true, message:"种植开始日期必选!", trigger:"blur"}, diff --git a/pages/warehouse/info.vue b/pages/warehouse/info.vue index c333a15..82b72c7 100644 --- a/pages/warehouse/info.vue +++ b/pages/warehouse/info.vue @@ -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=>{