|
@@ -366,17 +366,18 @@
|
|
// 扫描
|
|
// 扫描
|
|
if(index == 0){
|
|
if(index == 0){
|
|
uni.scanCode({
|
|
uni.scanCode({
|
|
- success: function (res) {
|
|
|
|
- console.log(res);
|
|
|
|
|
|
+ success: function (ret) {
|
|
|
|
+ console.log(ret);
|
|
const params = {
|
|
const params = {
|
|
- codeType: res.scanType == 'QR_CODE' ? 0 : 1,
|
|
|
|
|
|
+ codeType: ret.scanType == 'QR_CODE' ? 0 : 1,
|
|
}
|
|
}
|
|
|
|
+ const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
|
|
// 二维码
|
|
// 二维码
|
|
- if(res.scanType == 'QR_CODE'){
|
|
|
|
- const ret = res.result.split("&")
|
|
|
|
|
|
+ if(ret.scanType == 'QR_CODE'){
|
|
|
|
+ const ret = ret.result.split("&")
|
|
params.productSn = ret[2] // 产品编码sn
|
|
params.productSn = ret[2] // 产品编码sn
|
|
}else{
|
|
}else{
|
|
- params.qrCode = res.result
|
|
|
|
|
|
+ params.qrCode = ret.result
|
|
}
|
|
}
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "正在查询产品..."
|
|
title: "正在查询产品..."
|
|
@@ -385,7 +386,7 @@
|
|
getProductfindByScanCode(params).then(res => {
|
|
getProductfindByScanCode(params).then(res => {
|
|
if(res.status == 200 && res.data){
|
|
if(res.status == 200 && res.data){
|
|
if(res.data.currentInven){
|
|
if(res.data.currentInven){
|
|
- const params = Object.assign({shelfSn: shelfSn, billSource: res.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'},res.data)
|
|
|
|
|
|
+ const params = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
|
|
_this.$store.state.vuex_tempData = params
|
|
_this.$store.state.vuex_tempData = params
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/queryByCode/confirmQh'
|
|
url: '/pages/queryByCode/confirmQh'
|