Browse Source

添加农事 修改农事类型判断

master
邓宏 2 years ago
parent
commit
5dcaea101c
  1. 6
      pages/massif/add_farming.vue

6
pages/massif/add_farming.vue

@ -198,7 +198,7 @@
</view>
<view class="card">
<view v-if="/^3$|^5$/.test(formData.farmingType)" class="item" @click="toPestRecord">
<view v-if="/^用药$|^施肥$/.test(formData.farmingType)" class="item" @click="toPestRecord">
<view class="tabulation">
<text class="title">操作</text> <text class="record">病虫害记录</text><text class="plant-youbian"/>
</view>
@ -333,10 +333,10 @@ export default {
uni.showToast({title:"农资类型必选!",icon:"none"})
return false
//
}else if(/^1$|^3$|^5$/.test(this.formData.farmingType) && this.formData.inputList.length<=0){
}else if(/^播种$|^用药$|^施肥$/.test(this.formData.farmingType) && this.formData.inputList.length<=0){
uni.showToast({title:"请添加农资!",icon:"none"})
return false
}else if(/^3$|^5$/.test(this.formData.farmingType) && !this.formData.farmPests){
}else if(/^用药$|^施肥$/.test(this.formData.farmingType) && !this.formData.farmPests){
uni.showToast({title:"请添加病虫害记录!",icon:"none"})
return false
}

Loading…
Cancel
Save