From d01e6224f22b215feaae3cc69bae9ddb61985271 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Mon, 16 Dec 2024 09:21:42 +0800 Subject: [PATCH] =?UTF-8?q?YT-1696=E5=8F=B7=E5=8F=A3=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E8=AE=A1=E5=88=92=EF=BC=8C=E6=8F=90=E4=BA=A4=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=8A=A5=E5=BC=82=E5=B8=B8=EF=BC=8C=E5=BC=80=E5=85=B3=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=89=93=E5=BC=80=E6=97=B6=EF=BC=8C=E5=A4=87=E6=96=99?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E9=82=A3=E6=8A=A5=E9=94=99=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionMainAssemble/index.vue | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 1cbb188f7..c31de0a6e 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -422,12 +422,19 @@ const buttonTableClick = async (val, row) => { if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') await message.confirm('确认要生成备料计划吗?') tableObject.loading = true - await ProductionMainApi.generatePreparetoissue(row.number).then((PreparetoissueRes) => { + await ProductionMainApi.generatePreparetoissue(row.number).then((res) => { message.success(t('common.createSuccess')) tableObject.loading = false buttonBaseClick('refresh',null) // 生成发料申请 - ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) + if (Array.isArray(res) && res.length > 0) { + res.forEach(item => { + // 已发布 + if(item.status == '6'){ + ProductionMainApi.generateIssueRequest(item.number) + } + }); + } }).catch(err => { tableObject.loading = false console.log(err) @@ -602,11 +609,16 @@ const autoCreatePlanRequest = async (row)=>{ try { if(planSwitch.value) { - // /generatePreparetoissue?number - let PreparetoissueRes = await ProductionMainApi.generatePreparetoissue(row.number) + let res = await ProductionMainApi.generatePreparetoissue(row.number) // 生成发料申请 - // generateIssueRequest - ProductionMainApi.generateIssueRequest(PreparetoissueRes.number) + if (Array.isArray(res) && res.length > 0) { + res.forEach(item => { + // 已发布 + if(item.status == '6'){ + ProductionMainApi.generateIssueRequest(item.number) + } + }); + } } } finally { try {