|
|
@ -49,6 +49,14 @@ |
|
|
|
<BasicForm |
|
|
|
ref="basicFormRef" |
|
|
|
@success="formsSuccess" |
|
|
|
:sumFormDataByForm=" |
|
|
|
(formRef, formModel) => { |
|
|
|
const { claimAddress } = formModel |
|
|
|
formRef.value.setValues({ |
|
|
|
installPackageUrl: claimAddress |
|
|
|
}) |
|
|
|
} |
|
|
|
" |
|
|
|
:rules="Q2Rules" |
|
|
|
:formAllSchemas="Q2.allSchemas" |
|
|
|
:apiUpdate="Q2Api.updateQ2" |
|
|
@ -446,7 +454,19 @@ const handleFinish = async (id: number) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
if (row && row.claimAddress?.trim()) { |
|
|
|
row.filePathList = row.claimAddress.split(',') |
|
|
|
} |
|
|
|
|
|
|
|
if (row && row.filePathList && row.filePathList.length > 0) { |
|
|
|
row.filePathListView = row.filePathList.map((item) => { |
|
|
|
return { |
|
|
|
name: item, |
|
|
|
url: item |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if(!row || !row.claimAmount){ |
|
|
|
nextTick(() => { |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
@ -463,7 +483,26 @@ const openForm = (type: string, row?: any) => { |
|
|
|
disbursementAmount: 0 |
|
|
|
}) |
|
|
|
}) |
|
|
|
const currentTime = new Date().getTime() |
|
|
|
const fileId = Q2.allSchemas.formSchema.find((item) => item.field == 'fileId') |
|
|
|
const uploadFile = Q2.allSchemas.formSchema.find( |
|
|
|
(item) => item.field == 'claimAddress' |
|
|
|
) |
|
|
|
if (fileId) { |
|
|
|
fileId['value'] = currentTime |
|
|
|
} |
|
|
|
if (uploadFile) { |
|
|
|
uploadFile['componentProps']['upData']['tableId'] = currentTime |
|
|
|
uploadFile['componentProps']['modelValue'] = [] |
|
|
|
} |
|
|
|
} |
|
|
|
else if (type == 'update') { |
|
|
|
const uploadFile = Q2.allSchemas.formSchema.find( |
|
|
|
(item) => item.field == 'claimAddress' |
|
|
|
) |
|
|
|
uploadFile['componentProps']['modelValue'] = row.filePathListView |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|