|
|
@ -566,6 +566,45 @@ const handleHandle = async (id: number) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
|
|
|
|
UnplannedreceiptRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(type == "update"){ |
|
|
|
if (item.field == 'costCenterCode') { |
|
|
|
//成本中心代码 |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
if (item.field == 'reasonCodeRequisition') { |
|
|
|
//领用原因代码 |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
if (item.field == 'toWarehouseCode') { |
|
|
|
//到仓库代码 |
|
|
|
item.componentProps.isSearchList = false |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
if (item.field == 'costCenterCode') { |
|
|
|
//成本中心代码 |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
if (item.field == 'reasonCodeRequisition') { |
|
|
|
//领用原因代码 |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
if (item.field == 'toWarehouseCode') { |
|
|
|
//到仓库代码 |
|
|
|
item.componentProps.isSearchList = true |
|
|
|
item.componentProps.disabled = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
tableData.value = [] // 重置明细数据 |
|
|
|
formRef.value.open(type, row) |
|
|
|
} |
|
|
|