Browse Source

采收信息 修改负责人表单

master
邓宏 2 years ago
parent
commit
e7f31ab443
  1. 4
      pages/home/index.vue
  2. 14
      pages/massif/plant_info.vue

4
pages/home/index.vue

@ -316,13 +316,13 @@
<template v-if="!baseIndex || baseIndex=='record'"> <template v-if="!baseIndex || baseIndex=='record'">
<view v-for="(v,k) in baseInfo.farmWork||[]" :key="`${k}_work`" class="item" style="--c:16, 193, 118;"> <view v-for="(v,k) in baseInfo.farmWork||[]" :key="`${k}_work`" class="item" style="--c:16, 193, 118;">
<text>农事</text> <text>农事</text>
<u-notice-bar style="padding:0rpx;" icon="" speed="45" color="#777" bgColor="" :text="`${v.userName}${new Date(v.time).format('yyyy-MM-dd')}日完成了${v.plotName}${v.farmWorkName}任务`"/> <u-notice-bar style="padding:0rpx;" icon="" speed="45" color="#777" bgColor="" :text="`${new Date(v.time).format('yyyy-MM-dd')}:${v.userName} 完成了${v.plotName}${v.farmWorkName}任务`"/>
</view> </view>
</template> </template>
<template v-if="!baseIndex || baseIndex=='input'"> <template v-if="!baseIndex || baseIndex=='input'">
<view v-for="(v,k) in baseInfo.farmingInput||[]" :key="`${k}_input`" class="item" style="--c:255, 195, 83;"> <view v-for="(v,k) in baseInfo.farmingInput||[]" :key="`${k}_input`" class="item" style="--c:255, 195, 83;">
<text>投入品</text> <text>投入品</text>
<u-notice-bar style="padding:0rpx;" icon="" speed="45" color="#777" bgColor="" :text="`${v.userName}${new Date(v.time).format('yyyy-MM-dd')}日完成了${v.plotName}${v.farmWorkName}任务`"/> <u-notice-bar style="padding:0rpx;" icon="" speed="45" color="#777" bgColor="" :text="`${new Date(v.time).format('yyyy-MM-dd')}:${v.userName} 完成了${v.plotName}${v.farmWorkName}任务`"/>
</view> </view>
</template> </template>
<u-empty :show="isEmpty" text="为查询到相关信息" width="50%" icon="/static/noData.png"/> <u-empty :show="isEmpty" text="为查询到相关信息" width="50%" icon="/static/noData.png"/>

14
pages/massif/plant_info.vue

@ -32,7 +32,7 @@ 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:[]}, principal:{label:"负责人",disabled:true},
harvestTime:{label:"采收时间",type:"calendar"}, harvestTime:{label:"采收时间",type:"calendar"},
status:{label:"采收状态",type:"select",columns:[],value:[]}, status:{label:"采收状态",type:"select",columns:[],value:[]},
warehouseId:{label:"仓库",type:"select",columns:[],value:[]}, warehouseId:{label:"仓库",type:"select",columns:[],value:[]},
@ -40,7 +40,7 @@ export default {
formData:{ formData:{
harvestNum:"", harvestNum:"",
harvestBatch:"", harvestBatch:"",
principal:"", principal: this.$store.getters.userInfo.realname,
harvestTime:"", harvestTime:"",
status:"", status:"",
warehouseId:"", warehouseId:"",
@ -67,16 +67,6 @@ export default {
}, },
methods:{ methods:{
async init(){ async init(){
var res=await request("/api/plantHarvest/getUser")
if(res.statu){
this.fields.principal.columns=[res.data.map(v=>({label:v,value:v}))]
}else{
uni.showModal({
title:"提示",
content:res.msg||"获取负责人选项失败!",
showCancel:false,
})
}
// //
var res=await request("/api/plantHarvest/getWarehouse",{ var res=await request("/api/plantHarvest/getWarehouse",{
params:{ params:{

Loading…
Cancel
Save