|
@ -133,7 +133,7 @@ |
|
|
<view class="recovery" style="--c:#FFC760;">已采收:{{v.harvested}}kg</view> |
|
|
<view class="recovery" style="--c:#FFC760;">已采收:{{v.harvested}}kg</view> |
|
|
<view class="mu"> |
|
|
<view class="mu"> |
|
|
<text>{{v.plantArea}}</text> |
|
|
<text>{{v.plantArea}}</text> |
|
|
<button class="cu-btn bg-white sm plant-shanchu" @click.stop="del">删除</button> |
|
|
<button class="cu-btn bg-white sm plant-shanchu" v-if="v.status!=2" @click.stop="del(k)">删除</button> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -250,13 +250,32 @@ export default { |
|
|
events:{ toRecovery:()=> this.$emit("trigger",{tabIndex:2,plantId}) } |
|
|
events:{ toRecovery:()=> this.$emit("trigger",{tabIndex:2,plantId}) } |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
del(){ |
|
|
del(index){ |
|
|
uni.showModal({ |
|
|
uni.showModal({ |
|
|
title:"提示", |
|
|
title:"提示", |
|
|
content:"确定删除!", |
|
|
content:"确定删除!", |
|
|
success: async e=>{ |
|
|
success: async e=>{ |
|
|
if(e.confirm){ |
|
|
if(e.confirm){ |
|
|
|
|
|
var res=await request("/api/plantPlan/deletePlantPlanSchedule",{ |
|
|
|
|
|
method:"delete", |
|
|
|
|
|
params:{id: this.list[index].id} |
|
|
|
|
|
}) |
|
|
|
|
|
if(res.statu){ |
|
|
|
|
|
uni.showToast({title:"删除成功!",icon:"success"}) |
|
|
|
|
|
if(this.list.length>this.searchVal.pageNo+3)this.list.splice(index,1); |
|
|
|
|
|
else{ |
|
|
|
|
|
this.list=[] |
|
|
|
|
|
this.total=0 |
|
|
|
|
|
this.searchVal.pageNo=1 |
|
|
|
|
|
this.search() |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
uni.showModal({ |
|
|
|
|
|
title:"提示", |
|
|
|
|
|
content:res.msg||"删除失败!", |
|
|
|
|
|
showCancel:false, |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|