<template>
|
<view>
|
<view>当前库位号:{{locNo}}</view>
|
<view>当前货架码:{{barcode}}</view>
|
|
<view>
|
<view>实际库存</view>
|
<view>库位号{{containerDetl.locNo}}</view>
|
<view>货架码{{containerDetl.barcode}}</view>
|
<view>库存品类{{containerDetl.count}}</view>
|
</view>
|
<view v-if="locDetlShow">
|
<view>数据库存</view>
|
<view>库位号{{locDetl.locNo}}</view>
|
<view>货架码{{locDetl.barcode}}</view>
|
<view>库存品类{{locDetl.count}}</view>
|
</view>
|
|
<!-- 底部操作按钮 -->
|
<view class="buttom">
|
<button size="mini" type="primary" @click="agvStart('warn')">纠正库位</button>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
baseUrl: '',
|
token: '',
|
locNo: '',
|
barcode: '',
|
containerDetl: {
|
locNo: '',
|
barcode: '',
|
count: ''
|
},
|
locDetl: {
|
locNo: '',
|
barcode: '',
|
count: ''
|
},
|
dataList: [],
|
locDetlShow: false
|
}
|
},
|
onShow() {
|
let _this = this
|
this.baseUrl = uni.getStorageSync('baseUrl');
|
this.token = uni.getStorageSync('token');
|
// const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE
|
const eventChannel = this.getOpenerEventChannel();
|
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
eventChannel.on('item', function(data) {
|
console.log(data);
|
_this.locNo = data.item.locNo
|
_this.getLocDetl(data.item.locNo,data.item.barcode)
|
})
|
},
|
methods: {
|
getLocDetl(locNo,barcode) {
|
let _this = this
|
let param = {locNo:locNo,containerCode: barcode}
|
uni.request({
|
url: `${_this.baseUrl}/agvMobile/check/detl/v1`,
|
data: param,
|
method: 'POST',
|
success(res) {
|
res = res.data
|
console.log(res);
|
if (res.code === 200) {
|
_this.dataList = res.data.containerCode
|
if (res.data.containerCode[0].locNo) {
|
_this.containerDetl.locNo = res.data.containerCode[0].locNo
|
_this.containerDetl.barcode = res.data.containerCode[0].suppCode
|
_this.containerDetl.count = res.data.containerCode.length
|
}
|
if (res.data.locNo.length > 0) {
|
_this.locDetlShow = true
|
}
|
|
|
}
|
}
|
})
|
}
|
}
|
}
|
</script>
|
|
<style>
|
@import url('../../../static/css/common/order.css');
|
</style>
|