|
|
@ -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 |
|
|
|
} |
|
|
|