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)
+ }
})
},
}