|
|
@ -456,6 +456,24 @@ const buttonTableClick = async (val, row) => { |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
// 编辑时 车间代码不可修改 |
|
|
|
if (type == 'update') { |
|
|
|
// 修改 tableform 属性 |
|
|
|
ProductionreturnRequestMain.allSchemas.formSchema.map(itemColumns => { |
|
|
|
if(itemColumns.field == 'workshopCode') { |
|
|
|
itemColumns.componentProps.isSearchList = false |
|
|
|
itemColumns.componentProps.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 修改 tableform 属性 |
|
|
|
ProductionreturnRequestMain.allSchemas.formSchema.map(itemColumns => { |
|
|
|
if(itemColumns.field == 'workshopCode') { |
|
|
|
itemColumns.componentProps.isSearchList = true |
|
|
|
itemColumns.componentProps.disabled = false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|