修改订单拣货页面
This commit is contained in:
parent
a665fb40ed
commit
9580129c48
4
env.js
4
env.js
@ -1,4 +1,4 @@
|
|||||||
export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
||||||
// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
||||||
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
||||||
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
||||||
|
|||||||
@ -1336,6 +1336,57 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
return lines.join('\n');
|
return lines.join('\n');
|
||||||
},
|
},
|
||||||
|
extractWaveClaimAction(source) {
|
||||||
|
if (!source) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const actionCandidates = [
|
||||||
|
source?.action,
|
||||||
|
source?.data?.action,
|
||||||
|
source?.response?.data?.action,
|
||||||
|
source?.data?.data?.action,
|
||||||
|
source?.response?.data?.data?.action,
|
||||||
|
source?.result?.action
|
||||||
|
];
|
||||||
|
let action = '';
|
||||||
|
for (let i = 0; i < actionCandidates.length; i += 1) {
|
||||||
|
const candidate = actionCandidates[i];
|
||||||
|
if (candidate !== null && candidate !== undefined) {
|
||||||
|
action = String(candidate).trim();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (String(action).toLowerCase() !== 'wave_claim') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const message = String(
|
||||||
|
source?.message ||
|
||||||
|
source?.data?.message ||
|
||||||
|
source?.response?.data?.message ||
|
||||||
|
source?.data?.data?.message ||
|
||||||
|
source?.response?.data?.data?.message ||
|
||||||
|
'订单未领料,请先领料后再拣货'
|
||||||
|
).trim();
|
||||||
|
return {
|
||||||
|
action: 'wave_claim',
|
||||||
|
message
|
||||||
|
};
|
||||||
|
},
|
||||||
|
promptGoToClaim(message) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: String(message || '订单未领料,请先领料后再拣货'),
|
||||||
|
confirmText: '去领料',
|
||||||
|
cancelText: '取消',
|
||||||
|
success: res => {
|
||||||
|
if (res.confirm) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/claim/shippingLabel'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
showErrorModal(message, title = '提示') {
|
showErrorModal(message, title = '提示') {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title,
|
title,
|
||||||
@ -1360,6 +1411,11 @@ import voice from '@/core/utils/voice';
|
|||||||
keyword: normalizedKeyword
|
keyword: normalizedKeyword
|
||||||
}, '', false);
|
}, '', false);
|
||||||
if (String(response?.flag || '').toLowerCase() === 'failure') {
|
if (String(response?.flag || '').toLowerCase() === 'failure') {
|
||||||
|
const waveClaim = this.extractWaveClaimAction(response);
|
||||||
|
if (waveClaim) {
|
||||||
|
this.promptGoToClaim(waveClaim.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.showErrorModal(response?.message || '任务查询失败');
|
this.showErrorModal(response?.message || '任务查询失败');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1375,6 +1431,11 @@ import voice from '@/core/utils/voice';
|
|||||||
this.keyword = '';
|
this.keyword = '';
|
||||||
await this.requestWavePickTaskDetail();
|
await this.requestWavePickTaskDetail();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
const waveClaim = this.extractWaveClaimAction(error);
|
||||||
|
if (waveClaim) {
|
||||||
|
this.promptGoToClaim(waveClaim.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const conflictInfo = this.extractPickTaskConflictInfo(error);
|
const conflictInfo = this.extractPickTaskConflictInfo(error);
|
||||||
if (conflictInfo.isConflict) {
|
if (conflictInfo.isConflict) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user