Merge remote-tracking branch 'origin/dev-auto-sign'
| | |
| | | "AppType": true, |
| | | "AreaType": true, |
| | | "AuthorizeType": true, |
| | | "AutoSignPowerAttorneyTempUrl": true, |
| | | "BooleanOptions": true, |
| | | "CategoryCode": true, |
| | | "CertificateTypeCodeEnum": true, |
| | |
| | | const AppType: typeof import('./src/constants/app')['AppType'] |
| | | const AreaType: typeof import('./src/constants/enum')['AreaType'] |
| | | const AuthorizeType: typeof import('./src/constants/enum')['AuthorizeType'] |
| | | const AutoSignPowerAttorneyTempUrl: typeof import('./src/constants/electronSign')['AutoSignPowerAttorneyTempUrl'] |
| | | const BooleanOptions: typeof import('./src/constants/enum')['BooleanOptions'] |
| | | const CategoryCode: typeof import('./src/constants/dic')['CategoryCode'] |
| | | const CertificateTypeCodeEnum: typeof import('./src/constants/dic')['CertificateTypeCodeEnum'] |
| | |
| | | readonly AppType: UnwrapRef<typeof import('./src/constants/app')['AppType']> |
| | | readonly AreaType: UnwrapRef<typeof import('./src/constants/enum')['AreaType']> |
| | | readonly AuthorizeType: UnwrapRef<typeof import('./src/constants/enum')['AuthorizeType']> |
| | | readonly AutoSignPowerAttorneyTempUrl: UnwrapRef<typeof import('./src/constants/electronSign')['AutoSignPowerAttorneyTempUrl']> |
| | | readonly BooleanOptions: UnwrapRef<typeof import('./src/constants/enum')['BooleanOptions']> |
| | | readonly CategoryCode: UnwrapRef<typeof import('./src/constants/dic')['CategoryCode']> |
| | | readonly CertificateTypeCodeEnum: UnwrapRef<typeof import('./src/constants/dic')['CertificateTypeCodeEnum']> |
| | |
| | | import { EnumContractTemplateValueRecorder } from './apiEnum'; |
| | | import { TempFolderPath } from './enum'; |
| | | |
| | | export const EnumContractTemplateStatusText = { |
| | | [EnumContractTemplateStatus.Wait]: '待制版', |
| | |
| | | [EnumContractTemplateValueRecorder.Creator]: '发件人', |
| | | [EnumContractTemplateValueRecorder.Signer]: '签署人', |
| | | }; |
| | | |
| | | export const AutoSignPowerAttorneyTempUrl = `https://parkmanagement.oss-cn-hangzhou.aliyuncs.com/FlexJob/temp/%E3%80%90%E5%85%AC%E5%AF%B9%E5%85%AC%E3%80%91%E7%94%B5%E5%AD%90%E7%AD%BE%E5%90%8D%E6%8E%88%E6%9D%83%E4%B9%A6%EF%BC%88%E4%BB%A3%E4%B8%BA%E7%AD%BE%E7%BD%B2%26%E8%87%AA%E5%8A%A8%E7%AD%BE%EF%BC%89-V4-20220315.docx`; |
| | |
| | | showDownloadBtn: false, |
| | | formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) => setOSSLink(row.file), |
| | | }, |
| | | isAutoSign: { |
| | | formatter: (row: API.GetEnterpriseContractTemplatesQueryResultItem) => |
| | | row.isAutoSign ? '是' : '否', |
| | | }, |
| | | }, |
| | | } |
| | | ); |
| | |
| | | isEnterpriseUserCreated: false, |
| | | templateEditData: '', |
| | | enterpriseId: '', |
| | | isAutoSign: false, |
| | | autoSignPowerAttorneyUrl: [] as UploadUserFile[], |
| | | }, |
| | | closeAfterConfirm: false, |
| | | }); |
| | |
| | | access: row.access, |
| | | isEnterpriseUserCreated: detail.isEnterpriseUserCreated, |
| | | templateEditData: detail.templateEditData, |
| | | isAutoSign: detail.isAutoSign ?? false, |
| | | autoSignPowerAttorneyUrl: convertApi2FormUrlOnlyOne(detail.autoSignPowerAttorneyUrl), |
| | | enterpriseId: enterpriseId, |
| | | }); |
| | | } else { |
| | |
| | | code: editForm.code, |
| | | access: editForm.access, |
| | | templateId: editForm.templateId, |
| | | autoSignPowerAttorneyUrl: editForm.autoSignPowerAttorneyUrl?.[0]?.path ?? '', |
| | | templateEditData: JSON.stringify( |
| | | pdfToImage.map( |
| | | (x) => |
| | |
| | | ) |
| | | ), |
| | | }; |
| | | if (editForm.access === EnumElectronSignAccess.BestSign) { |
| | | params.isAutoSign = editForm.isAutoSign; |
| | | } else { |
| | | params.isAutoSign = false; |
| | | } |
| | | if (isEdit) { |
| | | params.id = editForm.id; |
| | | } |
| | |
| | | accept="pdf" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="自动签约:" |
| | | prop="isAutoSign" |
| | | required |
| | | v-if="form.access === EnumElectronSignAccess.BestSign" |
| | | > |
| | | <ProFormSwitch v-model="form.isAutoSign"></ProFormSwitch> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="上传授权书:" |
| | | prop="autoSignPowerAttorneyUrl" |
| | | :check-rules="form.isAutoSign && [{ message: '请上传签授权书', type: 'upload' }]" |
| | | :required="form.isAutoSign" |
| | | > |
| | | <ProFormUpload |
| | | v-model:file-url="form.autoSignPowerAttorneyUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="pdf,doc,docx,png,jpg,jpeg" |
| | | ></ProFormUpload> |
| | | <el-button type="primary" link @click="handleDownload">下载模板</el-button> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | ProFormText, |
| | | ProFormUpload, |
| | | ProFormSelect, |
| | | ProFormSwitch, |
| | | } from '@bole-core/components'; |
| | | import { filterCN, filterNumbersFromString } from '@/utils'; |
| | | import { FormInstance } from 'element-plus'; |
| | | import { EnumElectronSignAccessText } from '@/constants'; |
| | | import { filterCN, filterNumbersFromString, downloadFileByUrl } from '@/utils'; |
| | | import { FormInstance, FormRules } from 'element-plus'; |
| | | import { |
| | | EnumElectronSignAccessText, |
| | | EnumElectronSignAccess, |
| | | AutoSignPowerAttorneyTempUrl, |
| | | } from '@/constants'; |
| | | import * as electronSignServices from '@/services/api/electronSign'; |
| | | import { Message } from '@bole-core/core'; |
| | | |
| | |
| | | access: EnumElectronSignAccess; |
| | | isEnterpriseUserCreated: boolean; |
| | | enterpriseId: string; |
| | | isAutoSign: boolean; |
| | | autoSignPowerAttorneyUrl: UploadUserFile[]; |
| | | }; |
| | | |
| | | const form = defineModel<Form>('form'); |
| | |
| | | (e: 'onCancel'): void; |
| | | }>(); |
| | | |
| | | watch( |
| | | () => form.value.isAutoSign, |
| | | () => { |
| | | if (form.value.isAutoSign && dialogForm.value) { |
| | | dialogForm.value.clearValidate('autoSignPowerAttorneyUrl'); |
| | | } |
| | | } |
| | | ); |
| | | const { enabledElectronSignSettings } = useEnabledElectronSignSettings({ |
| | | enterpriseId: computed(() => form.value.enterpriseId), |
| | | all: true, |
| | |
| | | } catch (error) {} |
| | | } |
| | | |
| | | function handleDownload() { |
| | | downloadFileByUrl(AutoSignPowerAttorneyTempUrl, '自动签授权书模板'); |
| | | } |
| | | |
| | | const dialogForm = ref<FormInstance>(); |
| | | |
| | | function onDialogClose() { |