Browse Source

HL-6243制品子件报废在处理前增加编辑功能

hella_online_20241024
yufei_wang 1 month ago
parent
commit
2c4be74d91
  1. 6
      src/api/wms/productscrapRequestMain/index.ts
  2. 19
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

6
src/api/wms/productscrapRequestMain/index.ts

@ -102,3 +102,9 @@ export const handleProductscrapRequestMain = async (id) => {
export const updateProductscrapDetailRequestBom = async (id, data) => { export const updateProductscrapDetailRequestBom = async (id, data) => {
return await request.post({ url: `/wms/productscrap-request-main/updateBom?id=`+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 })
}

19
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -63,6 +63,7 @@
@submitForm="submitForm" @submitForm="submitForm"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick="buttonOperationClick"
@clearSearchInput="clearSearchInput" @clearSearchInput="clearSearchInput"
:updateTypeEdiltSubList="true"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -790,6 +791,8 @@ const openForm =async (type: string, row?: number) => {
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
} }
}) })
formRef.value.open(type, row)
} }
if(type == 'update'){ if(type == 'update'){
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => {
@ -807,8 +810,22 @@ const openForm =async (type: string, row?: number) => {
item.componentProps.isSearchList = false 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'){ if(type == 'create'){
nextTick(()=>{ nextTick(()=>{
defaultReasonCodeRequisition.value = true defaultReasonCodeRequisition.value = true

Loading…
Cancel
Save