From 781ccd1900a4d94ecaeeffc3548ed443ab347506 Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Sat, 22 Mar 2025 15:19:00 +0800 Subject: [PATCH] =?UTF-8?q?YT-2150=EF=BC=9ASCP=E3=80=8A=E8=A6=81=E8=B4=A7?= =?UTF-8?q?=E9=A2=84=E6=B5=8B-=E8=AE=A1=E5=88=92=E5=91=98=E3=80=8B?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=B9=E9=87=8F=E5=8F=91=E5=B8=83=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=8B=BE=E9=80=89=E5=A4=9A?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=89=B9=E9=87=8F=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/demandforecastingMain/index.ts | 4 +- .../demandforecastingMain/index.vue | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/api/wms/demandforecastingMain/index.ts b/src/api/wms/demandforecastingMain/index.ts index 7bade4c22..e15029d57 100644 --- a/src/api/wms/demandforecastingMain/index.ts +++ b/src/api/wms/demandforecastingMain/index.ts @@ -173,7 +173,7 @@ export const publish = async (data) => { } -//批量重试 +//批量发布 export const batchPublish = async(ids: string) => { // return request.get({ // url: '/wms/outer/batchRetry?ids=' + ids+'&type='+type @@ -182,6 +182,6 @@ export const batchPublish = async(ids: string) => { let data={ 'ids':ids } - return await request.post({ url: `/wms/outer/batchRetry`, data }) + return await request.post({ url: `/wms/demandforecasting-main/batchPublish`, data }) } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 3f98521ed..5bc12936e 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -174,6 +174,7 @@ defaultButtons.defaultExportBtn({hasPermi:'wms:demandforecasting-main:export'}), defaultButtons.defaultFreshBtn(null), // 刷新 // defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 + defaultButtons.mainListSelectionOrderPubBtn(null), // 批量发布按钮 ] // 头部按钮事件 @@ -195,6 +196,8 @@ const buttonBaseClick = async (val, item) => { } else if (val == 'filtrate') { // 筛选 } else if (val == 'selectionPlan') { // 批量生成要货计划 selectionPlan() + } else if (val == 'mainOrderSelectionPub') { // 批量发布要货计划 + handleSelectionPublish() } else { // 其他按钮 console.log('其他按钮', item) } @@ -357,6 +360,41 @@ const getSelectionRowsPlan = (currentPage, currentPageSelectionRows) => { } } +// 批量发布 +const handleSelectionPublish = async ()=>{ + tableObject.loading = true + let rows: any = [] + selectionRows.value.forEach((item) => { + rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)] + }) + console.log('批量生成要货计划', rows.join(',')) + let ids = rows.join(',') + await DemandforecastingMainApi.batchPublish(ids) + .then((res) => { + // if (res?.status == '2') { + // message.error(res.message) + // } else { + // message.success(res.message) + // } + console.log('获取到的数据',res); + message.success(res.message) + tableObject.loading = false + buttonBaseClick('refresh', null) + }) + .catch((err) => { + tableObject.loading = false + console.log(err) + }) + // await PackageApi.batchPrintingLable(rows.join(',')).then(res => { + // console.log(res) + // window.open(srcPoint.value+'&relateNumber='+res) + // message.success('创建标签成功') + // }).catch(err => { + // console.log(err) + // message.error('创建标签失败') + // }) +} +