From 6907fe30e89b733a482e184b26153d0842c681ef Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Fri, 23 May 2025 11:29:54 +0800 Subject: [PATCH 1/3] =?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 + } + +} + From be77166073ef2accad11f587f0cc91f789a2702b Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Fri, 23 May 2025 14:48:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingDetail/index.ts | 5 +++++ .../demandforecastingMain.data.ts | 18 +++++++++++++----- .../demandforecastingMain.data.ts | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/api/wms/demandforecastingDetail/index.ts b/src/api/wms/demandforecastingDetail/index.ts index e900faf38..9347bc48e 100644 --- a/src/api/wms/demandforecastingDetail/index.ts +++ b/src/api/wms/demandforecastingDetail/index.ts @@ -126,6 +126,11 @@ export const queryVersion = async (params) => { return await request.get({ url: `/wms/demandforecasting-detail/queryVersion`, params }) } +// 查询SCP版本号 +export const queryScpVersion = async (params) => { + return await request.get({ url: `/wms/demandforecasting-detail/queryScpVersion`, params }) +} + // 预览要货计划 export const getPreviewPlan = async (params) => { return await request.get({ url: `/wms/demandforecasting-detail/preview`, params }) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index 28a9da76c..49bd1e137 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -245,7 +245,7 @@ hiddenSearchHigh:true, searchField: 'detailVersion', // 查询弹窗赋值字段 searchTitle: '版本号', // 查询弹窗标题 searchAllSchemas: Version.allSchemas, // 查询弹窗所需类 - searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法 + searchPage: DemandforecastingDetailApi.queryScpVersion, // 查询弹窗所需分页方法 searchCondition: [{ key: 'supplierCodes', value: 'supplierCode', @@ -294,13 +294,21 @@ hiddenSearchHigh:true, isForm: false, search: { component: 'DatePicker', - value: [dayjs(), dayjs().subtract(-3,'month')], componentProps: { - valueFormat: 'YYYY-MM-DD', - type: 'daterange', - defaultTime: [new Date('1 '), new Date('1 ')] + clearable:false, + type: 'month', + valueFormat: 'YYYY-MM', } }, + // search: { + // component: 'DatePicker', + // value: [dayjs(), dayjs().subtract(-3,'month')], + // componentProps: { + // valueFormat: 'YYYY-MM-DD', + // type: 'daterange', + // defaultTime: [new Date('1 '), new Date('1 ')] + // } + // }, }, { label: '操作', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index ace19b85e..91958aad8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -137,7 +137,7 @@ hiddenSearchHigh:true, searchField: 'detailVersion', // 查询弹窗赋值字段 searchTitle: '版本号', // 查询弹窗标题 searchAllSchemas: Version.allSchemas, // 查询弹窗所需类 - searchPage: DemandforecastingDetailApi.queryVersion, // 查询弹窗所需分页方法 + searchPage: DemandforecastingDetailApi.queryScpVersion, // 查询弹窗所需分页方法 searchCondition: [{ key: 'supplierCodes', value: 'supplierCode', From f87c6c78c11d928ad5786b2470f0004bd03ddf73 Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Mon, 26 May 2025 08:27:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandforecastingMain.data.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index 91958aad8..cc9b89330 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -200,14 +200,22 @@ hiddenSearchHigh:true, isTable:false, isForm: false, search: { - value: [dayjs(), dayjs().subtract(-3,'month')], component: 'DatePicker', componentProps: { - valueFormat: 'YYYY-MM-DD', - type: 'daterange', - defaultTime: [new Date('1 '), new Date('1 ')] + clearable:false, + type: 'month', + valueFormat: 'YYYY-MM', } }, + // search: { + // value: [dayjs(), dayjs().subtract(-3,'month')], + // component: 'DatePicker', + // componentProps: { + // valueFormat: 'YYYY-MM-DD', + // type: 'daterange', + // defaultTime: [new Date('1 '), new Date('1 ')] + // } + // }, } ]))