Browse Source

添加农事 修改操作是否必填判断

master
邓宏 2 years ago
parent
commit
4f4f399204
  1. 2
      common/request.js
  2. 6
      pages/massif/add_farming.vue

2
common/request.js

@ -5,7 +5,7 @@ export function host(host='default',suffix='/plant_manage'){
// default:`http://i5skii.natappfree.cc` //陈
// default:`http://jjytvc.natappfree.cc` //马
// default:`http://6exd5b.natappfree.cc` //何
default:"http://192.168.0.14:7000"
default:"http://192.168.0.23:7000"
}:{
default:``
}

6
pages/massif/add_farming.vue

@ -44,7 +44,7 @@
display:flex;
align-items:center;
height:70rpx;
&:before{
&.mast:before{
content:"*";
color:red;
margin-right:5rpx;
@ -204,7 +204,7 @@
<view class="card">
<view v-if="/^用药$|^施肥$/.test(formData.farmingType)" class="item" @click="toPestRecord">
<view class="tabulation">
<view class="tabulation" :class="{mast:/^用药$/.test(formData.farmingType)}">
<text class="title">操作</text> <text class="record">病虫害记录</text><text class="plant-youbian"/>
</view>
<view class="value" v-if="formData.farmPests">
@ -341,7 +341,7 @@ export default {
}else if(/^播种$|^用药$|^施肥$/.test(this.formData.farmingType) && this.formData.inputList.length<=0){
uni.showToast({title:"请添加农资!",icon:"none"})
return false
}else if(/^用药$|^施肥$/.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