<template>
|
<view>
|
<view class="status_bar">
|
<!-- 这里是状态栏 -->
|
</view>
|
<uni-nav-bar left-icon="left" background-color="#f8f8f8" title="多次并板" @clickLeft="back" :fixed="true"
|
:border="false" rightWidth="160rpx" leftWidth="160rpx"
|
>
|
<block slot="right">
|
<view class="city">
|
<view>
|
<text class="uni-nav-bar-text">{{store}}</text>
|
</view>
|
</view>
|
</block>
|
</uni-nav-bar>
|
<!-- 搜索框 -->
|
<view class="search-bar">
|
<uni-search-bar v-model="wrkNo" placeholder=" 输入托盘码" bgColor="#EEEEEE" @input="search" />
|
</view>
|
<view class="card" v-for="item in menuList" @click="chose(item.barcode)">
|
<view class="item">工作号:{{item.wrkNo}}</view>
|
<view class="item">托盘码:{{item.barcode}}</view>
|
<view class="item">库位号:{{item.sourceLocNo}}</view>
|
</view>
|
</view>
|
</template>
|
<script>
|
export default {
|
data() {
|
return {
|
baseUrl: '',
|
token: '',
|
storeId: 0,
|
store: '',
|
wrkNo: '',
|
menuList: []
|
}
|
},
|
onShow() {
|
this.baseUrl = uni.getStorageSync('baseUrl');
|
this.token = uni.getStorageSync('token');
|
this.storeId = uni.getStorageSync('store')
|
if (this.storeId == 1) {
|
this.store = '宁波仓'
|
}
|
if (this.storeId == 2) {
|
this.store = '新昌仓'
|
}
|
this.getOrderNoList()
|
},
|
methods: {
|
back() {
|
uni.navigateBack({})
|
},
|
getOrderNoList() {
|
let that = this
|
uni.request({
|
url: this.baseUrl + '/mobile/barcode/list/all',
|
data: "",
|
header: {
|
'token': uni.getStorageSync('token')
|
},
|
method: 'POST',
|
success(res) {
|
res = res.data
|
that.menuList = res.data
|
}
|
})
|
},
|
search() {
|
let that = this
|
uni.request({
|
url: this.baseUrl + '/mobile/barcode/list/all',
|
data: that.wrkNo,
|
header: {
|
'token': uni.getStorageSync('token')
|
},
|
method: 'POST',
|
success(res) {
|
res = res.data
|
that.menuList = res.data
|
}
|
})
|
},
|
chose(item) {
|
let that = this
|
uni.navigateTo({
|
url: "../pakin/WarehouseOutMergeBoardMany",
|
success: function(res) {
|
// 通过eventChannel向被打开页面传送数据 向另外一个页面传递值的
|
res.eventChannel.emit('data', {
|
barcode: item
|
})
|
},
|
events: {
|
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 另外一个页面传过来的
|
acceptDataFromOpenedPage: function(data) {
|
// that.matnr = data.data
|
that.input(that.matnr)
|
},
|
},
|
});
|
}
|
}
|
}
|
</script>
|
|
<style>
|
@import url('../../static/css/wms.css/wms.css');
|
.card {
|
margin: 20rpx;
|
padding: 30rpx;
|
background-color: #157ec1;
|
border-radius: 20rpx;
|
color: #FFF;
|
}
|
</style>
|