From 531d7ea803adc641063c5e96d7a760d6f47d6f2a Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 10 Feb 2023 09:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/stock/list.vue | 16 +++++++++++----- pages/stock/mana.vue | 11 +++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pages/stock/list.vue b/pages/stock/list.vue index 01f7253..b00e9a5 100644 --- a/pages/stock/list.vue +++ b/pages/stock/list.vue @@ -173,17 +173,19 @@ - 库存:2袋(200kg) - --> + {{({out:"出",in:"入"})[mode]}}库数量 @@ -217,9 +219,13 @@ export default{ return{ mode:"", stockList:[], + eventChannel:null, + detail:{}, } }, onLoad(options){ + this.eventChannel=this.getOpenerEventChannel() + this.eventChannel.on("detail", e=>this.detail=e) this.mode=options.mode uni.setNavigationBarTitle({ title:({out:"出库",in:"入库列表"})[this.mode] diff --git a/pages/stock/mana.vue b/pages/stock/mana.vue index 86f834d..550498c 100644 --- a/pages/stock/mana.vue +++ b/pages/stock/mana.vue @@ -142,8 +142,8 @@ 库存量:{{v.equivalentInventory||0}}kg - - + + @@ -199,9 +199,12 @@ export default { } } }, - toList(mode){ + toList(mode,val){ uni.navigateTo({ - url:`/pages/stock/list?mode=${mode}&type=${this.searchVal.substanceType}&warehouseId=${this.searchVal.warehouseId||''}` + url:`/pages/stock/list?mode=${mode}&type=${this.searchVal.substanceType}&warehouseId=${this.searchVal.warehouseId||''}`, + success(res){ + res.eventChannel.emit('detail', val) + } }) }, }