|
|
@ -776,36 +776,29 @@ const openForm =async (type: string, row?: number) => { |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
if(type == 'create'){ |
|
|
|
|
|
|
|
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'workshopCode') { |
|
|
|
item.componentProps.disabled = true |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
} |
|
|
|
if (item.field == 'scrappingReason'){ |
|
|
|
item.value = '' |
|
|
|
} |
|
|
|
if(item.field == 'productionLineCode'){ |
|
|
|
item.componentProps.disabled = false |
|
|
|
item.componentProps.enterSearch = true |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
} |
|
|
|
if(item.field == 'q3Number' || item.field == 'costCenterCode' || item.field == 'reasonCodeRequisition' || item.field == 'workshopCode' || item.field == 'productionLineCode'){ |
|
|
|
// Q3通知单号 成本中心代码 原因代码 车间 生产线 |
|
|
|
item.componentProps.enterSearch = true |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
} |
|
|
|
if (item.field == 'scrappingReason'){ // 报废原因 |
|
|
|
item.value = '' |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
}) |
|
|
|
formRef.value.open(type, row) |
|
|
|
|
|
|
|
} |
|
|
|
if(type == 'update'){ |
|
|
|
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if (item.field == 'workshopCode') { |
|
|
|
item.componentProps.disabled = true |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
} |
|
|
|
if(item.field == 'productionLineCode'){ |
|
|
|
item.componentProps.enterSearch = true |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
} |
|
|
|
if(item.field == 'productionLineCode'){ |
|
|
|
item.componentProps.disabled = true |
|
|
|
item.componentProps.disabled = true |
|
|
|
if(item.field == 'q3Number' || item.field == 'costCenterCode' || item.field == 'reasonCodeRequisition' || item.field == 'workshopCode' || item.field == 'productionLineCode'){ |
|
|
|
// Q3通知单号 成本中心代码 原因代码 车间 生产线 |
|
|
|
item.componentProps.enterSearch = false |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
} |
|
|
@ -817,7 +810,7 @@ const openForm =async (type: string, row?: number) => { |
|
|
|
updateData['masterId'] = row['masterId'] |
|
|
|
tableData.value = updateData.subList||[] |
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
item['bomVersionInitOptions'] = item['bomList'].map(item1=>({ |
|
|
|
item['bomVersionInitOptions'] = item['bomList']?.map(item1=>({ |
|
|
|
label:item1, |
|
|
|
value:item1 |
|
|
|
})) |
|
|
|