|
|
@ -27,6 +27,11 @@ |
|
|
|
margin:0 30rpx 20rpx 0; |
|
|
|
width:calc(100%/4 - 30rpx); |
|
|
|
text-align: center; |
|
|
|
transition: all 0.3s; |
|
|
|
&.active{ |
|
|
|
color:#fff; |
|
|
|
background:#10C176; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -106,22 +111,18 @@ |
|
|
|
<view class="type"> |
|
|
|
<view class="title">农事类型</view> |
|
|
|
<view class="content"> |
|
|
|
<text v-for="(v,k) in typeList" :key="k">{{v.label}}</text> |
|
|
|
<text :class="{active:formData.farmingType==v.value}" v-for="(v,k) in typeList" :key="k" @click="formData.farmingType=v.value">{{v.label}}</text> |
|
|
|
<text>自定义+</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card"> |
|
|
|
<view class="plant-dikuaimianji">{{massif.plotName}}</view> |
|
|
|
<view class="plant-batch-add" @click="toCollectList"/> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card"> |
|
|
|
<view class="plant-dikuaimianji">阳光玫瑰种植1号地块</view> |
|
|
|
<view class="plant-batch-add" @click="toAdd"/> |
|
|
|
<view class="info"> |
|
|
|
<text>化肥</text> <text>中量元素水溶肥</text> <text>200kg</text> |
|
|
|
</view> |
|
|
|
<button class="cu-btn round bg-green shadow submit" @click="$u.route({url:'pages/massif/collectList'})">+继续添加农资</button> |
|
|
|
<button class="cu-btn round bg-green shadow submit" @click="toAdd">+继续添加农资</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="card"> |
|
|
@ -132,7 +133,7 @@ |
|
|
|
v-bind="v" |
|
|
|
:field="k" |
|
|
|
:required="!!rules[k]" |
|
|
|
:value="[]"/> |
|
|
|
:value="formData[k]"/> |
|
|
|
</u-form> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -144,37 +145,26 @@ export default { |
|
|
|
return{ |
|
|
|
typeList:[], |
|
|
|
fields:{ |
|
|
|
people:{label:"操作人",styleType:"parallel"}, |
|
|
|
date:{label:"操作日期",styleType:"parallel",type:"calendar"}, |
|
|
|
imgs:{label:"农事图片",type:"upImg"}, |
|
|
|
intro:{label:"产品介绍",type:"textarea"}, |
|
|
|
principal:{label:"操作人",styleType:"parallel", disabled:true}, |
|
|
|
farmingTime:{label:"操作日期",styleType:"parallel",type:"calendar"}, |
|
|
|
images:{label:"农事图片",type:"upImg"}, |
|
|
|
farmingRemarks:{label:"产品介绍",type:"textarea"}, |
|
|
|
}, |
|
|
|
formData:{ |
|
|
|
companyId: "", |
|
|
|
farmingId: "", |
|
|
|
farmingMaterial: "", |
|
|
|
farmingPlanId: "", |
|
|
|
farmingRemarks: "", |
|
|
|
farmingTime: "", |
|
|
|
farmingType: "", |
|
|
|
inputName: "", |
|
|
|
inputQuantity: 0, |
|
|
|
inputTotal: 0, |
|
|
|
inputType: "", |
|
|
|
inventoryId: "", |
|
|
|
plotId: this.$store.state.plantBaseInfoId, |
|
|
|
principal: "", |
|
|
|
principalId: "", |
|
|
|
specificationDes: "", |
|
|
|
specificationId: "" |
|
|
|
}, |
|
|
|
rules:{ |
|
|
|
intro:{required:true}, |
|
|
|
farmingType:"", |
|
|
|
principal: this.$store.getters['userInfo'].realname, |
|
|
|
farmingTime:"", |
|
|
|
images:[], |
|
|
|
|
|
|
|
plotId:"", |
|
|
|
plantBaseInfoId: this.$store.state.plantBaseInfoId, |
|
|
|
}, |
|
|
|
rules:{ }, |
|
|
|
massif:{} |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
this.formData.plotId=options.plotId |
|
|
|
this.init() |
|
|
|
this.getMassifDetail(options.plotId) |
|
|
|
}, |
|
|
@ -223,7 +213,12 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
toAdd(){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:"/pages/stock/already?intoPage=formRecord" |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |