修改订单拣货页面

This commit is contained in:
zm2000 2026-08-22 18:55:53 +08:00
parent a665fb40ed
commit 9580129c48
2 changed files with 63 additions and 2 deletions

4
env.js
View File

@ -1,4 +1,4 @@
export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
export const API_URL = `${BASE_URL}/system` //后台接口域名
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss

View File

@ -1336,6 +1336,57 @@ import voice from '@/core/utils/voice';
}
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 = '提示') {
uni.showModal({
title,
@ -1360,6 +1411,11 @@ import voice from '@/core/utils/voice';
keyword: normalizedKeyword
}, '', false);
if (String(response?.flag || '').toLowerCase() === 'failure') {
const waveClaim = this.extractWaveClaimAction(response);
if (waveClaim) {
this.promptGoToClaim(waveClaim.message);
return;
}
this.showErrorModal(response?.message || '任务查询失败');
return;
}
@ -1375,6 +1431,11 @@ import voice from '@/core/utils/voice';
this.keyword = '';
await this.requestWavePickTaskDetail();
} catch (error) {
const waveClaim = this.extractWaveClaimAction(error);
if (waveClaim) {
this.promptGoToClaim(waveClaim.message);
return;
}
const conflictInfo = this.extractPickTaskConflictInfo(error);
if (conflictInfo.isConflict) {
uni.showModal({