From 9580129c489decb4d036888e03c2c297c54764ea Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Sat, 22 Aug 2026 18:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E6=8B=A3?= =?UTF-8?q?=E8=B4=A7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.js | 4 +-- pages/work/order/picking.vue | 61 ++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/env.js b/env.js index b87b72a..c33f58a 100644 --- a/env.js +++ b/env.js @@ -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 diff --git a/pages/work/order/picking.vue b/pages/work/order/picking.vue index 24959e2..13cee20 100644 --- a/pages/work/order/picking.vue +++ b/pages/work/order/picking.vue @@ -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({