|
@@ -13,7 +13,7 @@
|
|
|
<view class="ptxt flex align_center justify_between">
|
|
|
<view>{{productInfo.code}}</view>
|
|
|
<view class="pcode">
|
|
|
- 可用库存:<text>{{productInfo.currQty||0}} </text> {{productInfo.unit}}
|
|
|
+ 可用库存:<text>{{productInfo.shelfCartApi?productInfo.shelfCartApi.qty:0}} </text> {{productInfo.unit}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="pname">
|
|
@@ -41,13 +41,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 确认弹框 -->
|
|
|
- <u-popup v-model="confirmModal" closeable mode="center" border-radius="14" width="80%" @close="modalConfirm">
|
|
|
- <view style="display: flex;flex-direction:column;justify-content: center;padding: 30rpx;">
|
|
|
+ <u-popup v-model="confirmModal" closeable mode="bottom" border-radius="14" width="80%" @close="modalConfirm">
|
|
|
+ <view style="display: flex;flex-direction:column;justify-content: center;padding: 30rpx 30rpx 120rpx;">
|
|
|
<view style="margin-top: 40rpx;text-align: center;">没有找到该产品,请重新扫描</view>
|
|
|
- <view style="color: dodgerblue;padding: 30upx 30upx 50upx;text-align: center;">试一试</view>
|
|
|
+ <view style="color: #999;padding: 30upx 30upx 50upx;text-align: center;">试一试</view>
|
|
|
<view style="text-align: center;display: flex;justify-content: space-between;">
|
|
|
- <u-button style="width: 40%;" shape="circle" @click="searchProduct()" size="medium">按产品编码搜索</u-button>
|
|
|
- <u-button style="width: 40%;" @click="modalConfirm" type='primary' shape="circle" size="medium">继续扫码</u-button>
|
|
|
+ <u-button style="width: 40%;" type='primary' shape="circle" @click="searchProduct()" size="medium">按产品编码搜索</u-button>
|
|
|
+ <!-- <u-button style="width: 40%;" @click="modalConfirm" type='primary' shape="circle" size="medium">继续扫码</u-button> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
@@ -70,12 +70,16 @@
|
|
|
shelfCartSn: '',
|
|
|
curQty: '',
|
|
|
scleft: 0,
|
|
|
- fromPage: null
|
|
|
+ fromPage: null,
|
|
|
+ qrCode: ''
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
|
// 初始化摄像头
|
|
|
this.init()
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: '扫描条形码—' +this.layer+'层'
|
|
|
+ })
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.shelfSn = options.shelfSn
|
|
@@ -83,9 +87,6 @@
|
|
|
this.shelfName = options.shelfName
|
|
|
this.customerSn = options.customerSn
|
|
|
this.fromPage = options.from
|
|
|
- uni.setNavigationBarTitle({
|
|
|
- title: '扫描条形码——' +this.layer+'层'
|
|
|
- })
|
|
|
},
|
|
|
onBackPress(e) {
|
|
|
uni.$emit("updateTempHw")
|
|
@@ -111,13 +112,13 @@
|
|
|
})
|
|
|
},
|
|
|
// 扫码结果
|
|
|
- scanResult(qrCode){
|
|
|
+ scanResult(){
|
|
|
const _this = this
|
|
|
uni.showLoading({
|
|
|
title: "正在查询产品信息"
|
|
|
})
|
|
|
let params = {
|
|
|
- qrCode: qrCode,
|
|
|
+ qrCode: this.qrCode,
|
|
|
shelfSn: this.shelfSn,
|
|
|
shelfTierCode: this.layer
|
|
|
}
|
|
@@ -173,6 +174,7 @@
|
|
|
this.toashMsg('保存成功,继续扫描')
|
|
|
this.curQty = nums
|
|
|
this.shelfCartSn = res.data.shelfCartSn
|
|
|
+ this.scanResult()
|
|
|
}
|
|
|
setTimeout(()=>{
|
|
|
uni.hideLoading()
|
|
@@ -193,7 +195,7 @@
|
|
|
top:'0px',
|
|
|
left:'0px',
|
|
|
width: '100%',
|
|
|
- height: '50%',
|
|
|
+ height: '45%',
|
|
|
position: 'static',
|
|
|
frameColor: '#00aaff',
|
|
|
scanbarColor: '#00aaff'
|
|
@@ -210,7 +212,8 @@
|
|
|
// 扫码成功后
|
|
|
this.barcode.onmarked = function(type, result) {
|
|
|
console.log(type,result)
|
|
|
- _this.scanResult(result)
|
|
|
+ _this.qrCode = result
|
|
|
+ _this.scanResult()
|
|
|
}
|
|
|
// 扫码识别出错
|
|
|
this.barcode.onerror = function(error){
|