|
@ -280,6 +280,31 @@ const buttonTableClick = async (val, row) => { |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
|
|
// 新增与修改 修改车间和生产线的编辑属性 |
|
|
|
|
|
if(type == 'create'){ |
|
|
|
|
|
ProductionMain.allSchemas.formSchema.forEach((itemColumn) =>{ |
|
|
|
|
|
if(itemColumn.field == 'workshop'){ |
|
|
|
|
|
itemColumn.componentProps.isSearchList=true |
|
|
|
|
|
itemColumn.componentProps.disabled=true |
|
|
|
|
|
} |
|
|
|
|
|
if(itemColumn.field == 'productionLine'){ |
|
|
|
|
|
itemColumn.componentProps.isSearchList=true |
|
|
|
|
|
itemColumn.componentProps.disabled=true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
if(type == 'update'){ |
|
|
|
|
|
ProductionMain.allSchemas.formSchema.forEach((itemColumn) =>{ |
|
|
|
|
|
if(itemColumn.field == 'workshop'){ |
|
|
|
|
|
itemColumn.componentProps.isSearchList=false |
|
|
|
|
|
itemColumn.componentProps.disabled=true |
|
|
|
|
|
} |
|
|
|
|
|
if(itemColumn.field == 'productionLine'){ |
|
|
|
|
|
itemColumn.componentProps.isSearchList=false |
|
|
|
|
|
itemColumn.componentProps.disabled=true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|