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/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/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/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 + } + +} + diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index ace19b85e..cc9b89330 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', @@ -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 ')] + // } + // }, } ]))