diff --git a/pages/massif/add_farming.vue b/pages/massif/add_farming.vue index a553901..059bc6e 100644 --- a/pages/massif/add_farming.vue +++ b/pages/massif/add_farming.vue @@ -198,7 +198,7 @@ - + 操作 病虫害记录 @@ -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 }