From 758558164c1a32a85e36f3d49e4f8e2dc2a3dc9e Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 10 Feb 2023 18:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/massif/mana/plantPlan.vue | 25 ++++++++++++++++++++++--- pages/stock/list.vue | 2 +- router/stock.js | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pages/massif/mana/plantPlan.vue b/pages/massif/mana/plantPlan.vue index c60b84c..4c9cf15 100644 --- a/pages/massif/mana/plantPlan.vue +++ b/pages/massif/mana/plantPlan.vue @@ -133,7 +133,7 @@ 已采收:{{v.harvested}}kg {{v.plantArea}} - + @@ -250,13 +250,32 @@ export default { events:{ toRecovery:()=> this.$emit("trigger",{tabIndex:2,plantId}) } }) }, - del(){ + del(index){ uni.showModal({ title:"提示", content:"确定删除!", success: async e=>{ 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, + }) + } } } }) diff --git a/pages/stock/list.vue b/pages/stock/list.vue index fb33d24..78a61a2 100644 --- a/pages/stock/list.vue +++ b/pages/stock/list.vue @@ -268,7 +268,7 @@ export default{ this.formData.substanceType = ({nz:1, ncp:2})[options.type], this.mode=options.mode uni.setNavigationBarTitle({ - title:({out:"出库",in:"入库列表"})[this.mode] + title:({out:"出库",in:"入库"})[this.mode] }) this.init() }, diff --git a/router/stock.js b/router/stock.js index 0c0a6cd..8ecd465 100644 --- a/router/stock.js +++ b/router/stock.js @@ -30,10 +30,10 @@ module.exports=[ } } }, - { + {//出入库列表 path:"pages/stock/list", style:{ - navigationBarTitleText:"出入库列表", + navigationBarTitleText:"", navigationBarBackgroundColor:"#10C176", navigationBarTextStyle:"white", "app-plus":{