|
@ -32,9 +32,10 @@ export default { |
|
|
fields:{ |
|
|
fields:{ |
|
|
harvestNum:{label:"采收数量",suffix:'kg',type:"digit"}, |
|
|
harvestNum:{label:"采收数量",suffix:'kg',type:"digit"}, |
|
|
harvestBatch:{label:"收获批次号",btnText:"生成", btnFun:()=>this.formData.harvestBatch=`CS${new Date().format('yyyyMMdd')}${new Date().getTime()}`}, |
|
|
harvestBatch:{label:"收获批次号",btnText:"生成", btnFun:()=>this.formData.harvestBatch=`CS${new Date().format('yyyyMMdd')}${new Date().getTime()}`}, |
|
|
principal:{label:"负责人",type:"select",columns:[],value:[null]}, |
|
|
principal:{label:"负责人",type:"select",columns:[],value:[]}, |
|
|
harvestTime:{label:"采收时间",type:"calendar"}, |
|
|
harvestTime:{label:"采收时间",type:"calendar"}, |
|
|
status:{label:"采收状态",type:"select",columns:[[{label:"本次采收完后续还会采收",value:"1"},{label:"已全部采收完",value:"2"}]],value:[null]}, |
|
|
status:{label:"采收状态",type:"select",columns:[[{label:"本次采收完后续还会采收",value:"1"},{label:"已全部采收完",value:"2"}]],value:[]}, |
|
|
|
|
|
warehouseId:{label:"仓库",type:"select",columns:[],value:[]}, |
|
|
}, |
|
|
}, |
|
|
formData:{ |
|
|
formData:{ |
|
|
harvestNum:"", |
|
|
harvestNum:"", |
|
@ -42,6 +43,7 @@ export default { |
|
|
principal:"", |
|
|
principal:"", |
|
|
harvestTime:"", |
|
|
harvestTime:"", |
|
|
status:"", |
|
|
status:"", |
|
|
|
|
|
warehouseId:"", |
|
|
plantSchedulId:"",//种植计划id |
|
|
plantSchedulId:"",//种植计划id |
|
|
plotId:"",//地块id |
|
|
plotId:"",//地块id |
|
|
}, |
|
|
}, |
|
@ -73,6 +75,19 @@ export default { |
|
|
showCancel:false, |
|
|
showCancel:false, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
//仓库 下拉选 |
|
|
|
|
|
var res=await request("/api/plantHarvest/getWarehouse",{ |
|
|
|
|
|
params:{plantBaseId:this.$store.state.plantBaseInfoId} |
|
|
|
|
|
}) |
|
|
|
|
|
if(res.statu){ |
|
|
|
|
|
this.fields.warehouseId.columns=[res.data.map(v=>({label:v.warehouseName,value:v.id}))] |
|
|
|
|
|
}else{ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title:"提示", |
|
|
|
|
|
content:res.msg||"获取仓库选项失败!", |
|
|
|
|
|
showCancel:false, |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
submit(){ |
|
|
submit(){ |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|