|
@@ -314,15 +314,36 @@ export default {
|
|
|
this.keyword = '';
|
|
|
this.reset();
|
|
|
},
|
|
|
- //扫码
|
|
|
+ // 扫描
|
|
|
handleScanCode(){
|
|
|
- uni.scanCode({
|
|
|
- success: (res)=> {
|
|
|
- console.log('条码类型:' + res.scanType);
|
|
|
- console.log('条码内容:' + res.result);
|
|
|
- this.queryParam.queryWord = res.result;
|
|
|
+ this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
|
|
|
+ this.mpaasScanModule.scan(
|
|
|
+ {
|
|
|
+ "scanMode":"Customized",
|
|
|
+ "scanStyle":{
|
|
|
+ "scanFrameSizePlus":{"width":250,"height":250},
|
|
|
+ "scanFrameSize":200,
|
|
|
+ "scanLight":"visible",
|
|
|
+ "scanText":"对准条形码/二维码进行识别",
|
|
|
+ "scanTitle":"扫码搜索货位产品",
|
|
|
}
|
|
|
- });
|
|
|
+ },
|
|
|
+ (result) => {
|
|
|
+ if(result.scanStatus == 1){
|
|
|
+ this.scanResult(result)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 扫描结果
|
|
|
+ scanResult(data){
|
|
|
+ // 二维码
|
|
|
+ console.log('111111',data)
|
|
|
+ if(data.scanType == 'QRCODE'){
|
|
|
+ const ret = data.scanValue.split("&")
|
|
|
+ this.queryParam.queryWord = ret[1] // 产品编码
|
|
|
+ }else{
|
|
|
+ this.queryParam.queryWord = data.scanValue;
|
|
|
+ }
|
|
|
this.loadData(this.queryParam);
|
|
|
},
|
|
|
addBackOrder(){
|
|
@@ -370,6 +391,11 @@ export default {
|
|
|
uni.showToast({
|
|
|
title:res.message
|
|
|
})
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages/shuntBackManage/cancellingStocks?sn='+res.data.sn
|
|
|
+ })
|
|
|
+ },800)
|
|
|
}
|
|
|
|
|
|
});
|