| | |
| | | name?: string; |
| | | /** 模板 */ |
| | | file?: string; |
| | | /** 小程序码 */ |
| | | wxmpQrCode?: string; |
| | | /** 制版模板照片 */ |
| | | templateEditData?: string; |
| | | /** 制版变量JSON */ |
| | |
| | | templateId?: string; |
| | | /** 变量 */ |
| | | values?: GetContractTemplateQueryResultValue[]; |
| | | /** 创建操作人 */ |
| | | createdUserId?: string; |
| | | /** 是否企业用户创建 */ |
| | | isEnterpriseUserCreated?: boolean; |
| | | } |
| | | |
| | | interface GetContractTemplateQueryResultValue { |
| | |
| | | code?: string; |
| | | /** 模板 */ |
| | | file?: string; |
| | | /** 小程序码 */ |
| | | wxmpQrCode?: string; |
| | | status?: EnumContractTemplateStatus; |
| | | /** 制版时间 */ |
| | | completedTime?: string; |
| | |
| | | proxy?: boolean; |
| | | /** 企业授权书 */ |
| | | proxyPowerAttorneyUrl?: string; |
| | | /** 实名Id */ |
| | | realId?: string; |
| | | } |
| | | |
| | | type SyncHumanResourcesAreaDictionaryDataCommand = Record<string, any>; |
| | |
| | | const operationBtnMap: Record<string, OperationBtnType> = { |
| | | editBtn: { |
| | | emits: { onClick: (role) => openDialog(role) }, |
| | | extraProps: { |
| | | hide: (row: API.GetEnterpriseContractTemplatesQueryResultItem) => |
| | | row.status !== EnumContractTemplateStatus.Completed, |
| | | }, |
| | | }, |
| | | editTemplateBtn: { |
| | | emits: { onClick: (role) => goEditTemplate(role) }, |
| | |
| | | file: [] as UploadUserFile[], |
| | | access: '' as any as EnumElectronSignAccess, |
| | | title: '新增模板', |
| | | isEnterpriseUserCreated: false, |
| | | templateEditData: '', |
| | | }, |
| | | }); |
| | | |
| | | function openDialog(row?: API.GetEnterpriseContractTemplatesQueryResultItem) { |
| | | if (row) { |
| | | handleEdit({ |
| | | id: row.id, |
| | | templateId: row.templateId, |
| | | name: row.name, |
| | | code: row.code, |
| | | file: convertApi2FormUrlOnlyOne(row.file), |
| | | access: row.access, |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | } |
| | | async function openDialog(row?: API.GetEnterpriseContractTemplatesQueryResultItem) { |
| | | try { |
| | | if (row) { |
| | | let detail = await electronSignServices.getContractTemplate({ id: row.id }); |
| | | handleEdit({ |
| | | id: row.id, |
| | | templateId: row.templateId, |
| | | name: row.name, |
| | | code: row.code, |
| | | file: convertApi2FormUrlOnlyOne(row.file), |
| | | access: row.access, |
| | | isEnterpriseUserCreated: detail.isEnterpriseUserCreated, |
| | | templateEditData: detail.templateEditData, |
| | | }); |
| | | } else { |
| | | handleAdd(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |
| | | async function handleAddOrEdit() { |
| | |
| | | placeholder="请输入模板名称" |
| | | v-model.trim="form.name" |
| | | :maxlength="15" |
| | | :disabled="form.isEnterpriseUserCreated" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | |
| | | code: string; |
| | | file: UploadUserFile[]; |
| | | access: EnumElectronSignAccess; |
| | | isEnterpriseUserCreated: boolean; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |