From 2c4be74d91a68832981cdc1ac0ccf141fa57a334 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Fri, 18 Oct 2024 16:17:47 +0800 Subject: [PATCH] =?UTF-8?q?HL-6243=E5=88=B6=E5=93=81=E5=AD=90=E4=BB=B6?= =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E5=9C=A8=E5=A4=84=E7=90=86=E5=89=8D=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=BC=96=E8=BE=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productscrapRequestMain/index.ts | 6 ++++++ .../productscrapRequestMain/index.vue | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/api/wms/productscrapRequestMain/index.ts b/src/api/wms/productscrapRequestMain/index.ts index 6d49382bf..2a0a38edd 100644 --- a/src/api/wms/productscrapRequestMain/index.ts +++ b/src/api/wms/productscrapRequestMain/index.ts @@ -102,3 +102,9 @@ export const handleProductscrapRequestMain = async (id) => { export const updateProductscrapDetailRequestBom = async (id, data) => { return await request.post({ url: `/wms/productscrap-request-main/updateBom?id=`+id, data }) } + +// 编辑 +export const editReturnNew = async (params) => { + return await request.get({ url: `/wms/productscrap-request-main/editReturnNew`, params }) +} + diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index a30c247da..c974d9d8a 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -63,6 +63,7 @@ @submitForm="submitForm" @buttonOperationClick="buttonOperationClick" @clearSearchInput="clearSearchInput" + :updateTypeEdiltSubList="true" /> @@ -790,6 +791,8 @@ const openForm =async (type: string, row?: number) => { item.componentProps.isSearchList = true } }) + formRef.value.open(type, row) + } if(type == 'update'){ ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { @@ -807,8 +810,22 @@ const openForm =async (type: string, row?: number) => { item.componentProps.isSearchList = false } }) + let updateData = await ProductscrapRequestMainApi.editReturnNew({ + masterId:row.masterId + }) + console.log('updateData',updateData) + updateData['masterId'] = row['masterId'] + tableData.value = updateData.subList||[] + tableData.value.forEach(item=>{ + item['bomVersionInitOptions'] = item['bomList'].map(item1=>({ + label:item1, + value:item1 + })) + }) + + formRef.value.open(type, updateData) + } - formRef.value.open(type, row) if(type == 'create'){ nextTick(()=>{ defaultReasonCodeRequisition.value = true