|
@@ -69,7 +69,8 @@
|
|
shelfPlaceCode: '',
|
|
shelfPlaceCode: '',
|
|
shelfCartSn: '',
|
|
shelfCartSn: '',
|
|
curQty: '',
|
|
curQty: '',
|
|
- scleft: 0
|
|
+ scleft: 0,
|
|
|
|
+ fromPage: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
@@ -81,14 +82,21 @@
|
|
this.layer = options.layer
|
|
this.layer = options.layer
|
|
this.shelfName = options.shelfName
|
|
this.shelfName = options.shelfName
|
|
this.customerSn = options.customerSn
|
|
this.customerSn = options.customerSn
|
|
|
|
+ this.fromPage = options.from
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
title: '扫描条形码——' +this.layer+'层'
|
|
title: '扫描条形码——' +this.layer+'层'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- onBackPress() {
|
|
+ onBackPress(e) {
|
|
- uni.redirectTo({
|
|
+ uni.$emit("updateTempHw")
|
|
- url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
|
|
+ if(!this.fromPage){
|
|
- })
|
|
+ uni.redirectTo({
|
|
|
|
+ url: "/pages/batchShelves/cartList?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ return true
|
|
},
|
|
},
|
|
onNavigationBarButtonTap(e) {
|
|
onNavigationBarButtonTap(e) {
|
|
this.searchProduct()
|
|
this.searchProduct()
|
|
@@ -99,7 +107,7 @@
|
|
},
|
|
},
|
|
searchProduct(){
|
|
searchProduct(){
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
- url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn
|
|
+ url: "/pages/batchShelves/searchProduct?shelfSn="+this.shelfSn+'&layer='+this.layer+'&shelfName='+this.shelfName+'&customerSn='+this.customerSn+'&from='+this.fromPage
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 扫码结果
|
|
// 扫码结果
|
|
@@ -155,7 +163,7 @@
|
|
productCode: this.productInfo.code,
|
|
productCode: this.productInfo.code,
|
|
qty: nums,
|
|
qty: nums,
|
|
price: this.productInfo.price,
|
|
price: this.productInfo.price,
|
|
- cost: this.productInfo.cost,
|
|
+ cost: this.productInfo.terminalPrice,
|
|
shelfCartSn: this.shelfCartSn
|
|
shelfCartSn: this.shelfCartSn
|
|
}
|
|
}
|
|
console.log(params)
|
|
console.log(params)
|
|
@@ -185,7 +193,7 @@
|
|
top:'0px',
|
|
top:'0px',
|
|
left:'0px',
|
|
left:'0px',
|
|
width: '100%',
|
|
width: '100%',
|
|
- height: '35%',
|
|
+ height: '50%',
|
|
position: 'static',
|
|
position: 'static',
|
|
frameColor: '#00aaff',
|
|
frameColor: '#00aaff',
|
|
scanbarColor: '#00aaff'
|
|
scanbarColor: '#00aaff'
|
|
@@ -194,6 +202,7 @@
|
|
const query = uni.createSelectorQuery().in(this);
|
|
const query = uni.createSelectorQuery().in(this);
|
|
query.select('#barcode').boundingClientRect(data => {
|
|
query.select('#barcode').boundingClientRect(data => {
|
|
this.barcode.setStyle({
|
|
this.barcode.setStyle({
|
|
|
|
+ width: data.width + 'px',
|
|
height: data.height + 'px' // 调整扫码控件的位置
|
|
height: data.height + 'px' // 调整扫码控件的位置
|
|
})
|
|
})
|
|
}).exec()
|
|
}).exec()
|
|
@@ -228,7 +237,7 @@
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
.barCode{
|
|
.barCode{
|
|
- height: 35%;
|
|
+ height: 45%;
|
|
}
|
|
}
|
|
.info-body{
|
|
.info-body{
|
|
flex-grow: 1;
|
|
flex-grow: 1;
|