|
|
@ -182,28 +182,21 @@ const openForm = (type: string, row?: any) => { |
|
|
|
row['upload']= row.filePathList?.map((item: any) => { |
|
|
|
return {url:item} |
|
|
|
}) |
|
|
|
if (row.sourceType == 'QAD') { |
|
|
|
FixedAssets.allSchemas.formSchema.forEach(item => { |
|
|
|
if (item.field == 'supplierNumber') { |
|
|
|
item.componentProps.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
componentPropsDisabled(row.sourceType == 'QAD'); |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} else { |
|
|
|
FixedAssets.allSchemas.formSchema.forEach(item => { |
|
|
|
if (item.field == 'supplierNumber') { |
|
|
|
item.componentProps.disabled = false |
|
|
|
componentPropsDisabled(false); |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} else { |
|
|
|
const qadDisabledTrueList = ["supplierNumber","number","name","locationNumber","beginUseDate","costSubjectDesc","manufacturer","unit","qty"]; |
|
|
|
|
|
|
|
const componentPropsDisabled = (disabled: boolean) => { |
|
|
|
FixedAssets.allSchemas.formSchema.forEach(item => { |
|
|
|
if (item.field == 'supplierNumber') { |
|
|
|
item.componentProps.disabled = false |
|
|
|
if (qadDisabledTrueList.includes(item.field)) { |
|
|
|
item.componentProps.disabled = disabled |
|
|
|
} |
|
|
|
}) |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|