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