From 9c4e34d06e251667e650055412256e5743b90d72 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 07 十一月 2025 19:05:06 +0800
Subject: [PATCH] fix: bug
---
src/views/ProtocolManage/EditTemplate.vue | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/views/ProtocolManage/EditTemplate.vue b/src/views/ProtocolManage/EditTemplate.vue
index c0c486a..691ff38 100644
--- a/src/views/ProtocolManage/EditTemplate.vue
+++ b/src/views/ProtocolManage/EditTemplate.vue
@@ -181,11 +181,15 @@
showDownloadBtn: false,
formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) => setOSSLink(row.file),
},
+ isAutoSign: {
+ formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) =>
+ row.isAutoSign ? '鏄�' : '鍚�',
+ },
},
}
);
-const { dialogProps, handleEdit, handleAdd, editForm } = useFormDialog({
+const { dialogProps, handleEdit, handleAdd, editForm, dialogState } = useFormDialog({
onConfirm: handleAddOrEdit,
defaultFormParams: {
id: '',
@@ -197,7 +201,13 @@
title: '鏂板妯℃澘',
isEnterpriseUserCreated: false,
templateEditData: '',
+ enterpriseId: '',
+ isAutoSign: false,
+ autoSignPowerAttorneyUrl: [] as UploadUserFile[],
+
+ customContents: [] as string[],
},
+ closeAfterConfirm: false,
});
async function openDialog(row?: API.GetEnterpriseContractTemplatesQueryResultItem) {
@@ -213,6 +223,11 @@
access: row.access,
isEnterpriseUserCreated: detail.isEnterpriseUserCreated,
templateEditData: detail.templateEditData,
+ isAutoSign: detail.isAutoSign ?? false,
+ autoSignPowerAttorneyUrl: convertApi2FormUrlOnlyOne(detail.autoSignPowerAttorneyUrl),
+ enterpriseId: enterpriseId,
+
+ customContents: detail.customContents.map((x) => x.name),
});
} else {
handleAdd();
@@ -231,6 +246,7 @@
code: editForm.code,
access: editForm.access,
templateId: editForm.templateId,
+ autoSignPowerAttorneyUrl: editForm.autoSignPowerAttorneyUrl?.[0]?.path ?? '',
templateEditData: JSON.stringify(
pdfToImage.map(
(x) =>
@@ -241,7 +257,13 @@
} as TemplateEditDataItem)
)
),
+ customContents: editForm.customContents,
};
+ if (editForm.access === EnumElectronSignAccess.BestSign) {
+ params.isAutoSign = editForm.isAutoSign;
+ } else {
+ params.isAutoSign = false;
+ }
if (isEdit) {
params.id = editForm.id;
}
@@ -249,8 +271,11 @@
if (res) {
Message.successMessage('鎿嶄綔鎴愬姛');
getList();
+ dialogState.dialogVisible = false;
}
- } catch (error) {}
+ } catch (error) {
+ dialogState.dialogVisible = true;
+ }
}
function handleDownload(row: API.GetEnterpriseContractTemplatesQueryResultItem) {
--
Gitblit v1.9.1