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'">
<view v-for="(v,k) in baseInfo.farmWork||[]" :key="`${k}_work`" class="item" style="--c:16, 193, 118;">
<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>
</template>
<template v-if="!baseIndex || baseIndex=='input'">
<view v-for="(v,k) in baseInfo.farmingInput||[]" :key="`${k}_input`" class="item" style="--c:255, 195, 83;">
<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>
</template>
<u-empty :show="isEmpty" text="为查询到相关信息" width="50%" icon="/static/noData.png"/>

14
pages/massif/plant_info.vue

@ -32,7 +32,7 @@ export default {
fields:{
harvestNum:{label:"采收数量",suffix:'kg',type:"digit"},
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"},
status:{label:"采收状态",type:"select",columns:[],value:[]},
warehouseId:{label:"仓库",type:"select",columns:[],value:[]},
@ -40,7 +40,7 @@ export default {
formData:{
harvestNum:"",
harvestBatch:"",
principal:"",
principal: this.$store.getters.userInfo.realname,
harvestTime:"",
status:"",
warehouseId:"",
@ -67,16 +67,6 @@ export default {
},
methods:{
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",{
params:{

Loading…
Cancel
Save