From 6907fe30e89b733a482e184b26153d0842c681ef Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Fri, 23 May 2025 11:29:54 +0800 Subject: [PATCH] =?UTF-8?q?YT-2645=EF=BC=9A=E8=A6=81=E8=B4=A7=E9=A2=84?= =?UTF-8?q?=E6=B5=8B=E5=AF=B9=E6=8E=A5QAD=E6=8E=A5=E5=8F=A3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingMain/index.ts | 5 +++++ src/locales/en-US.ts | 1 + src/locales/zh-CN.ts | 1 + src/utils/disposition/defaultButtons.ts | 13 ++++++++++++ .../demandforecastingMain/index.vue | 20 +++++++++++++++++++ 5 files changed, 40 insertions(+) diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index e15029d57..c9d231426 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -185,3 +185,8 @@ export const batchPublish = async(ids: string) => { return await request.post({ url: `/wms/demandforecasting-main/batchPublish`, data }) } +//更新要货预测 +export const updateDemandforecaste = async (data) => { + return await request.post({ url: `/wms/demandforecasting-detail/queryQADDemandforecasting`,data }) +} + diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index dda4ee904..b7f8b4b26 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1334,5 +1334,6 @@ export default { 批量重试:'Batch retry', 全部重试:'All retry', 导出对账单:'Export the statement of account', + 更新要货预测:'Update the order forecast', }, } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 18ed7ad66..2a94d7071 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1333,6 +1333,7 @@ export default { 批量重试:'批量重试', 全部重试:'全部重试', 导出对账单:'导出对账单', + 更新要货预测:'更新要货预测', }, } diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 47d704671..87b7430f1 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1571,6 +1571,19 @@ export function invoicedExportBtn(option: any) { hasPermi: '' }) } + +// 主列表-更新要货预测QAD信息 +export function mainUpdataForecastBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.更新要货预测`).replace('ts.', ''), + name: 'updataForecast', + hide: false, + type: 'primary', + color: '', + link: false, // 文本展现按钮 + hasPermi: '' + }) +} // 默认按钮规则 function __defaultBtnOption(option: any, specific: any) { return { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 2381af75f..f4acffd5d 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -177,6 +177,7 @@ defaultButtons.defaultFreshBtn(null), // 刷新 // defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 defaultButtons.mainListSelectionOrderPubBtn(null), // 批量发布按钮 + defaultButtons.mainUpdataForecastBtn(null), // 更新要货预测 ] // 头部按钮事件 @@ -200,6 +201,8 @@ const buttonBaseClick = async (val, item) => { selectionPlan() } else if (val == 'mainOrderSelectionPub') { // 批量发布要货计划 handleSelectionPublish() + } else if (val == 'updataForecast') { // 要货预测调用QAD + updateDemandforecaste() } else { // 其他按钮 console.log('其他按钮', item) } @@ -397,6 +400,23 @@ const handleSelectionPublish = async ()=>{ // }) } +//点击要货预测调用QAD拉数据 +const updateDemandforecaste = async ()=>{ + let submitData = { + "supplierCodes":"", + "itemCodes":"" + } + tableObject.loading = true + try { + let res = await DemandforecastingMainApi.updateDemandforecaste(submitData) + console.log('更新结果',res) + message.success(t('更新成功')) + } finally{ + tableObject.loading = false + } + +} +