Browse Source

联调

master
邓宏 2 years ago
parent
commit
531d7ea803
  1. 16
      pages/stock/list.vue
  2. 11
      pages/stock/mana.vue

16
pages/stock/list.vue

@ -173,17 +173,19 @@
</view>
</view>
<!-- <view class="card specs">
<view class="title_mast">规格</view>
<view style="display:flex;">
<view class="card specs">
<view class="title_mast">
<text>规格</text> <text></text>
</view>
<!-- <view style="display:flex;">
<view class="select">
<text>请添加规格</text>
<text class="plant-youbian"/>
</view>
<text class="plant-xinjian">新建</text>
</view>
</view> -->
<view class="tip">库存2(200kg)</view>
</view> -->
</view>
<view class="card purchase">
<view class="title_mast">{{({out:"出",in:"入"})[mode]}}库数量</view>
@ -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]

11
pages/stock/mana.vue

@ -142,8 +142,8 @@
<view class="num">
<text>库存量{{v.equivalentInventory||0}}kg</text>
<view class="btns">
<button class="cu-btn" @click="toList('out')">出库</button>
<button class="cu-btn" @click="toList('in')">入库</button>
<button class="cu-btn" @click="toList('out',v)">出库</button>
<button class="cu-btn" @click="toList('in',v)">入库</button>
</view>
</view>
</view>
@ -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)
}
})
},
}

Loading…
Cancel
Save