ztxkui 10.0.95 → 10.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/TranslationButton/DownFile.d.ts +7 -0
- package/dist/components/TranslationButton/DownFile.js +97 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +75 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +247 -0
- package/dist/components/TranslationButton/demoComponents/index.d.ts +3 -0
- package/dist/components/TranslationButton/demoComponents/index.js +9 -0
- package/dist/components/TranslationButton/hooks.d.ts +8 -0
- package/dist/components/TranslationButton/hooks.js +143 -0
- package/dist/components/TranslationButton/index.d.ts +4 -0
- package/dist/components/TranslationButton/index.js +4 -0
- package/dist/components/Upload/utils.d.ts +8 -1
- package/dist/components/Upload/utils.js +56 -4
- package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
- package/dist/components/UploadCustom/hooks/useDg.js +57 -0
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +159 -0
- package/dist/components/electron-signatures/content.d.ts +9 -0
- package/dist/components/electron-signatures/content.js +1126 -0
- package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
- package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
- package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
- package/dist/components/electron-signatures/demoComponents/index.js +27 -0
- package/dist/components/electron-signatures/demoComponents/index_old.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/index_old.js +502 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
- package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/making.js +211 -0
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +663 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +1164 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
- package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/test.js +119 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +344 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +513 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +89 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +45 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +380 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +169 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +38 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +45 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +134 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +102 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +365 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
- package/dist/components/electron-signatures/index.d.ts +13 -0
- package/dist/components/electron-signatures/index.js +54 -0
- package/dist/components/electron-signatures/index_old.d.ts +9 -0
- package/dist/components/electron-signatures/index_old.js +966 -0
- package/dist/components/electron-signatures/interface.d.ts +849 -0
- package/dist/components/electron-signatures/interface.js +57 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +346 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +63 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
- package/dist/components/electron-signatures/utils.d.ts +26 -0
- package/dist/components/electron-signatures/utils.js +67 -0
- package/dist/components/utils/ZtxkContext.d.ts +16 -0
- package/dist/components/utils/ZtxkContext.js +4 -0
- package/dist/components/utils/useMemoizedFn.d.ts +6 -0
- package/dist/components/utils/useMemoizedFn.js +22 -0
- package/dist/components/utils/usePrevious.d.ts +3 -0
- package/dist/components/utils/usePrevious.js +13 -0
- package/dist/index.css +686 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +105 -87
- package/dist/request.js +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IFileItem, IElectronSignaturesItem } from '../interface';
|
|
3
|
+
interface IContractComparisonProps {
|
|
4
|
+
isEdit?: boolean;
|
|
5
|
+
/** 是否需要合同模板相关逻辑 */
|
|
6
|
+
isNeedComparison?: boolean;
|
|
7
|
+
/** 任务id 生成比对结果后 有一个任务id 如果没有这个任务id的话 需要重新比对一下 */
|
|
8
|
+
taskId?: string;
|
|
9
|
+
/** 模板附件名 */
|
|
10
|
+
templateAttachName?: IFileItem['templateAttachName'];
|
|
11
|
+
/** 模板附件ID */
|
|
12
|
+
templateAttachId?: IFileItem['templateAttachId'];
|
|
13
|
+
/** 需要比对的附件id */
|
|
14
|
+
attachId?: IFileItem['attachId'];
|
|
15
|
+
/** 需要比对的附件名称 */
|
|
16
|
+
attachName?: IFileItem['attachName'];
|
|
17
|
+
/** 是否保存为模板 */
|
|
18
|
+
isCustomerReference?: boolean;
|
|
19
|
+
onIsCustomerReferenceChange?: any;
|
|
20
|
+
/** 选择比对合同点击事件 */
|
|
21
|
+
onCheckedComparison?: (info: any) => void;
|
|
22
|
+
compareHandle?: any;
|
|
23
|
+
lookCompareHandle?: any;
|
|
24
|
+
realIndex?: number;
|
|
25
|
+
setRecords?: any;
|
|
26
|
+
dgInfoRef?: any;
|
|
27
|
+
myCompareHandle?: any;
|
|
28
|
+
/**
|
|
29
|
+
* 是否显示保存为模板
|
|
30
|
+
*/
|
|
31
|
+
isShowSaveTemplate?: IElectronSignaturesItem['isShowSaveTemplate'];
|
|
32
|
+
/**
|
|
33
|
+
* 是否显示选择比对模板
|
|
34
|
+
*/
|
|
35
|
+
isShowChioseTemplate?: IElectronSignaturesItem['isShowChioseTemplate'];
|
|
36
|
+
record?: any;
|
|
37
|
+
onWatermarkChange?: any;
|
|
38
|
+
showAddWater?: boolean;
|
|
39
|
+
showImportant?: boolean;
|
|
40
|
+
isWater?: boolean;
|
|
41
|
+
onImportantChange?: any;
|
|
42
|
+
isImportantBool?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare const _default: React.NamedExoticComponent<IContractComparisonProps>;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import React, { memo, useState } from 'react';
|
|
3
|
+
import { Button, Checkbox } from '../../../index';
|
|
4
|
+
var ContractComparison = function (props) {
|
|
5
|
+
var isNeedComparison = props.isNeedComparison, isEdit = props.isEdit, taskId = props.taskId, templateAttachName = props.templateAttachName, templateAttachId = props.templateAttachId, attachId = props.attachId, isCustomerReference = props.isCustomerReference, onIsCustomerReferenceChange = props.onIsCustomerReferenceChange, onCheckedComparison = props.onCheckedComparison, realIndex = props.realIndex, setRecords = props.setRecords, lookCompareHandle = props.lookCompareHandle, dgInfoRef = props.dgInfoRef, myCompareHandle = props.myCompareHandle, record = props.record, isShowChioseTemplate = props.isShowChioseTemplate, isShowSaveTemplate = props.isShowSaveTemplate, onWatermarkChange = props.onWatermarkChange, _a = props.showAddWater, showAddWater = _a === void 0 ? true : _a, isWater = props.isWater, onImportantChange = props.onImportantChange, _b = props.showImportant, showImportant = _b === void 0 ? false : _b, isImportantBool = props.isImportantBool;
|
|
6
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
7
|
+
return isEdit ? (React.createElement("div", { className: "contract-comparison--wrap new-contract-comparison--wrap" },
|
|
8
|
+
isNeedComparison ? (React.createElement(React.Fragment, null,
|
|
9
|
+
React.createElement("div", { style: { width: '100%', textAlign: 'left' } }, templateAttachName),
|
|
10
|
+
React.createElement("div", { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
11
|
+
!record.isHideChoiseChangeTemplate && isShowChioseTemplate ? (React.createElement(Button, { type: "link", onClick: function () {
|
|
12
|
+
// 记录当前点击产生的一些参数
|
|
13
|
+
dgInfoRef.current = {
|
|
14
|
+
realIndex: realIndex,
|
|
15
|
+
attachId: attachId,
|
|
16
|
+
setRecords: setRecords,
|
|
17
|
+
};
|
|
18
|
+
onCheckedComparison &&
|
|
19
|
+
onCheckedComparison({
|
|
20
|
+
realIndex: realIndex,
|
|
21
|
+
attachId: attachId,
|
|
22
|
+
setRecords: setRecords,
|
|
23
|
+
record: record,
|
|
24
|
+
});
|
|
25
|
+
} }, i18next.t('选择比对模板'))) : null,
|
|
26
|
+
taskId ? (React.createElement(Button, { type: "link", onClick: function () {
|
|
27
|
+
lookCompareHandle(taskId);
|
|
28
|
+
} }, i18next.t('查看比对结果'))) : templateAttachId && attachId ? (React.createElement(Button, { type: "link", style: { color: 'rgb(255, 77, 79)' }, loading: loading, onClick: function () {
|
|
29
|
+
// 记录当前点击产生的一些参数
|
|
30
|
+
dgInfoRef.current = {
|
|
31
|
+
realIndex: realIndex,
|
|
32
|
+
attachId: attachId,
|
|
33
|
+
setRecords: setRecords,
|
|
34
|
+
};
|
|
35
|
+
setLoading(true);
|
|
36
|
+
myCompareHandle(templateAttachId)
|
|
37
|
+
.then(function () {
|
|
38
|
+
setLoading(false);
|
|
39
|
+
})
|
|
40
|
+
.catch(function () {
|
|
41
|
+
setLoading(false);
|
|
42
|
+
});
|
|
43
|
+
} }, i18next.t('无任务ID,开始比对'))) : null))) : null,
|
|
44
|
+
React.createElement("div", { style: { display: 'flex' } },
|
|
45
|
+
!record.isHideSaveCustomerReference && isShowSaveTemplate ? (React.createElement(Checkbox, { checked: isCustomerReference, onChange: function (e) {
|
|
46
|
+
onIsCustomerReferenceChange &&
|
|
47
|
+
onIsCustomerReferenceChange(e.target.checked);
|
|
48
|
+
} }, i18next.t('存样板'))) : null,
|
|
49
|
+
showAddWater && isEdit && attachId && (React.createElement("div", { className: "file-operation--isWater" },
|
|
50
|
+
React.createElement(Checkbox, { checked: isWater, onChange: function (e) {
|
|
51
|
+
onWatermarkChange && onWatermarkChange(e.target.checked);
|
|
52
|
+
} }, i18next.t('加水印')))),
|
|
53
|
+
showImportant && isEdit && attachId && (React.createElement("div", { className: "file-operation--isWater" },
|
|
54
|
+
React.createElement(Checkbox, { checked: isImportantBool, onChange: function (e) {
|
|
55
|
+
onImportantChange && onImportantChange(e.target.checked);
|
|
56
|
+
} }, i18next.t('标为重要'))))))) : (React.createElement("div", { className: "contract-comparison--wrap" },
|
|
57
|
+
React.createElement("div", null, templateAttachName),
|
|
58
|
+
React.createElement("div", { style: { display: 'flex' } },
|
|
59
|
+
!record.isHideSaveCustomerReference && isShowSaveTemplate ? (React.createElement(Checkbox, { checked: isCustomerReference, disabled: true }, i18next.t('存样板'))) : null,
|
|
60
|
+
showAddWater && attachId && (React.createElement("div", { className: "file-operation--isWater" },
|
|
61
|
+
React.createElement(Checkbox, { checked: isWater, disabled: true }, i18next.t('加水印')))),
|
|
62
|
+
showImportant && attachId && (React.createElement("div", { className: "file-operation--isWater" },
|
|
63
|
+
React.createElement(Checkbox, { checked: isImportantBool, disabled: true }, i18next.t('标为重要'))))),
|
|
64
|
+
taskId && isNeedComparison ? (React.createElement(Button, { type: "link", onClick: function () {
|
|
65
|
+
lookCompareHandle(taskId);
|
|
66
|
+
} }, i18next.t('查看比对结果'))) : null));
|
|
67
|
+
};
|
|
68
|
+
export default memo(ContractComparison);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ColumnsType } from 'antd/es/table';
|
|
2
|
+
import { ITrackAllData, IFileItem } from '../interface';
|
|
3
|
+
interface IOptions {
|
|
4
|
+
/** 所有数据类型合并之后的数据 */
|
|
5
|
+
records: IFileItem[];
|
|
6
|
+
/** 所有数据类型的排序规则 */
|
|
7
|
+
dataTypeSort: string[];
|
|
8
|
+
/** 所有数据类型的相关操作 */
|
|
9
|
+
allData: ITrackAllData;
|
|
10
|
+
lookCompareHandle?: any;
|
|
11
|
+
dgInfoRef?: any;
|
|
12
|
+
myCompareHandle?: any;
|
|
13
|
+
onCheckedComparison?: any;
|
|
14
|
+
isTranslation?: boolean;
|
|
15
|
+
request?: any;
|
|
16
|
+
previewUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
export default function useContractColumns(options: IOptions): {
|
|
19
|
+
contractColumns: ColumnsType<any>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
13
|
+
import React, { useContext, useMemo } from 'react';
|
|
14
|
+
import { DATA_TYPE_KEY, getColumnMergeProp } from '../hooks/useParseRecords';
|
|
15
|
+
import ContractComparison from './contract-comparison';
|
|
16
|
+
import NewContractComparison from './new-contract-comparison';
|
|
17
|
+
import { currentRecordIsOnlyQunj } from '../utils';
|
|
18
|
+
import { ElectronSignaturesContext } from '..';
|
|
19
|
+
import TranslationButton from '../translateComponents/TranslateButton';
|
|
20
|
+
/**
|
|
21
|
+
* 根据各行实际显示的按钮/复选框组合计算列宽(表格为 table-layout: fixed,列宽无法内容自适应,需按内容条件动态计算)
|
|
22
|
+
* - 比对双按钮行(选择比对模板 + 查看比对结果/开始比对)或三复选框齐全(存样板+加水印+标为重要):240
|
|
23
|
+
* - 两个复选框:180
|
|
24
|
+
* - 其他:160
|
|
25
|
+
*/
|
|
26
|
+
function calcContractColumnWidth(records, allData) {
|
|
27
|
+
var _a;
|
|
28
|
+
var width = 160;
|
|
29
|
+
(_a = records === null || records === void 0 ? void 0 : records.forEach) === null || _a === void 0 ? void 0 : _a.call(records, function (record) {
|
|
30
|
+
var _a;
|
|
31
|
+
var currentDataType = record === null || record === void 0 ? void 0 : record[DATA_TYPE_KEY];
|
|
32
|
+
var _b = allData[currentDataType] || {}, isShowChioseTemplate = _b.isShowChioseTemplate, isShowSaveTemplate = _b.isShowSaveTemplate, isShowContractComparsionHandle = _b.isShowContractComparsionHandle;
|
|
33
|
+
var isNeedComparison = isShowContractComparsionHandle === null || isShowContractComparsionHandle === void 0 ? void 0 : isShowContractComparsionHandle(record, records);
|
|
34
|
+
// 比对双按钮同行:选择比对模板 +(查看比对结果 或 无任务ID开始比对)
|
|
35
|
+
if (isNeedComparison &&
|
|
36
|
+
!record.isHideChoiseChangeTemplate &&
|
|
37
|
+
isShowChioseTemplate &&
|
|
38
|
+
(record.taskId || (record.templateAttachId && record.attachId))) {
|
|
39
|
+
width = Math.max(width, 240);
|
|
40
|
+
}
|
|
41
|
+
// 复选框数量:存样板 / 加水印(showAddWater 未传时默认显示)/ 标为重要
|
|
42
|
+
var checkboxCount = [
|
|
43
|
+
!record.isHideSaveCustomerReference && isShowSaveTemplate,
|
|
44
|
+
((_a = record.showAddWater) !== null && _a !== void 0 ? _a : true) && record.attachId,
|
|
45
|
+
record.showImportant && record.attachId,
|
|
46
|
+
].filter(Boolean).length;
|
|
47
|
+
if (checkboxCount >= 3) {
|
|
48
|
+
width = Math.max(width, 240);
|
|
49
|
+
}
|
|
50
|
+
else if (checkboxCount === 2) {
|
|
51
|
+
width = Math.max(width, 180);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return width;
|
|
55
|
+
}
|
|
56
|
+
// 合同比对的clomuns
|
|
57
|
+
export default function useContractColumns(options) {
|
|
58
|
+
var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, lookCompareHandle = options.lookCompareHandle, dgInfoRef = options.dgInfoRef, myCompareHandle = options.myCompareHandle, onCheckedComparison = options.onCheckedComparison, request = options.request, previewUrl = options.previewUrl, isTranslation = options.isTranslation;
|
|
59
|
+
var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
|
|
60
|
+
// 列宽随各行按钮/复选框组合自适应(table-layout: fixed 下 width 即列宽)
|
|
61
|
+
var contractColumnWidth = useMemo(function () { return calcContractColumnWidth(records, allData); }, [records, allData]);
|
|
62
|
+
var contractColumns = isNewQys
|
|
63
|
+
? [
|
|
64
|
+
{
|
|
65
|
+
// title: '智能合同比对模板',
|
|
66
|
+
title: i18next.t('附件扩展功能'),
|
|
67
|
+
dataIndex: 'contractComparison',
|
|
68
|
+
key: 'contractComparison',
|
|
69
|
+
width: contractColumnWidth,
|
|
70
|
+
align: 'center',
|
|
71
|
+
render: function (text, record, index) {
|
|
72
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
73
|
+
if (currentOnlyQunj) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
var _a = getColumnMergeProp({
|
|
77
|
+
record: record,
|
|
78
|
+
index: index,
|
|
79
|
+
records: records,
|
|
80
|
+
dataTypeSort: dataTypeSort,
|
|
81
|
+
}), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
|
|
82
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, isShowContractComparsionHandle = _b.isShowContractComparsionHandle, setSameTypeRecords = _b.setRecords, isShowChioseTemplate = _b.isShowChioseTemplate, isShowSaveTemplate = _b.isShowSaveTemplate;
|
|
83
|
+
// 是否需要合同比对功能
|
|
84
|
+
var isNeedComparison = isShowContractComparsionHandle === null || isShowContractComparsionHandle === void 0 ? void 0 : isShowContractComparsionHandle(record, records);
|
|
85
|
+
// 是否存模板
|
|
86
|
+
var isCustomerReference = (record === null || record === void 0 ? void 0 : record.isCustomerReference) + '' === '1' ? true : false;
|
|
87
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
88
|
+
// 是否添加水印
|
|
89
|
+
var isWater = (record === null || record === void 0 ? void 0 : record.isWatermark) + '' === '1' ? true : false;
|
|
90
|
+
var showAddWater = record === null || record === void 0 ? void 0 : record.showAddWater;
|
|
91
|
+
//是否添加重要文件
|
|
92
|
+
var isImportantBool = (record === null || record === void 0 ? void 0 : record.isImportant) + '' === '1' ? true : false;
|
|
93
|
+
var showImportant = record === null || record === void 0 ? void 0 : record.showImportant;
|
|
94
|
+
return (React.createElement(React.Fragment, null,
|
|
95
|
+
React.createElement(NewContractComparison, { isEdit: isEdit, isNeedComparison: isNeedComparison, taskId: record === null || record === void 0 ? void 0 : record.taskId, templateAttachId: record === null || record === void 0 ? void 0 : record.templateAttachId, templateAttachName: record === null || record === void 0 ? void 0 : record.templateAttachName, isShowChioseTemplate: isShowChioseTemplate, isShowSaveTemplate: isShowSaveTemplate, attachId: record === null || record === void 0 ? void 0 : record.attachId, attachName: record === null || record === void 0 ? void 0 : record.attachName, isCustomerReference: isCustomerReference, lookCompareHandle: lookCompareHandle, realIndex: dataTypeIndex, setRecords: setSameTypeRecords, dgInfoRef: dgInfoRef, myCompareHandle: myCompareHandle, record: record, onCheckedComparison: onCheckedComparison, onIsCustomerReferenceChange: function (checked) {
|
|
96
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
97
|
+
setSameTypeRecords(function (preRecords) {
|
|
98
|
+
var _a;
|
|
99
|
+
var copyRecords = preRecords.slice();
|
|
100
|
+
var item = copyRecords[dataTypeIndex];
|
|
101
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isCustomerReference: checked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
102
|
+
return copyRecords;
|
|
103
|
+
});
|
|
104
|
+
}, showAddWater: showAddWater, isWater: isWater, isImportantBool: isImportantBool, showImportant: showImportant, onWatermarkChange: function (isChecked) {
|
|
105
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
106
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
107
|
+
setSameTypeRecords(function (preRecords) {
|
|
108
|
+
var _a;
|
|
109
|
+
var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
|
|
110
|
+
var item = copyRecords[dataTypeIndex];
|
|
111
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isWatermark: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
112
|
+
return copyRecords;
|
|
113
|
+
});
|
|
114
|
+
}, onImportantChange: function (isChecked) {
|
|
115
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
116
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
117
|
+
setSameTypeRecords(function (preRecords) {
|
|
118
|
+
var _a;
|
|
119
|
+
var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
|
|
120
|
+
var item = copyRecords[dataTypeIndex];
|
|
121
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isImportant: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
122
|
+
return copyRecords;
|
|
123
|
+
});
|
|
124
|
+
} }),
|
|
125
|
+
React.createElement(TranslationButton, { request: request, previewUrl: previewUrl, isTranslation: isTranslation, record: record, realIndex: dataTypeIndex, setRecords: setSameTypeRecords })));
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
]
|
|
129
|
+
: // 下面是最初设计的模式
|
|
130
|
+
[
|
|
131
|
+
{
|
|
132
|
+
// title: '智能合同比对模板',
|
|
133
|
+
title: i18next.t('比对模板附件名称'),
|
|
134
|
+
dataIndex: 'contractComparison',
|
|
135
|
+
key: 'contractComparison',
|
|
136
|
+
width: 180,
|
|
137
|
+
align: 'center',
|
|
138
|
+
render: function (text, record, index) {
|
|
139
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
140
|
+
if (currentOnlyQunj) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
var _a = getColumnMergeProp({
|
|
144
|
+
record: record,
|
|
145
|
+
index: index,
|
|
146
|
+
records: records,
|
|
147
|
+
dataTypeSort: dataTypeSort,
|
|
148
|
+
}), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
|
|
149
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, isShowContractComparsionHandle = _b.isShowContractComparsionHandle, setSameTypeRecords = _b.setRecords, isShowChioseTemplate = _b.isShowChioseTemplate, isShowSaveTemplate = _b.isShowSaveTemplate;
|
|
150
|
+
// 是否需要合同比对功能
|
|
151
|
+
var isNeedComparison = isShowContractComparsionHandle === null || isShowContractComparsionHandle === void 0 ? void 0 : isShowContractComparsionHandle(record, records);
|
|
152
|
+
// 是否存模板
|
|
153
|
+
var isCustomerReference = (record === null || record === void 0 ? void 0 : record.isCustomerReference) + '' === '1' ? true : false;
|
|
154
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
155
|
+
return (React.createElement(ContractComparison, { isEdit: isEdit, isNeedComparison: isNeedComparison, taskId: record === null || record === void 0 ? void 0 : record.taskId, templateAttachId: record === null || record === void 0 ? void 0 : record.templateAttachId, templateAttachName: record === null || record === void 0 ? void 0 : record.templateAttachName, isShowChioseTemplate: isShowChioseTemplate, isShowSaveTemplate: isShowSaveTemplate, attachId: record === null || record === void 0 ? void 0 : record.attachId, attachName: record === null || record === void 0 ? void 0 : record.attachName, isCustomerReference: isCustomerReference, lookCompareHandle: lookCompareHandle, realIndex: dataTypeIndex, setRecords: setSameTypeRecords, dgInfoRef: dgInfoRef, myCompareHandle: myCompareHandle, record: record, onCheckedComparison: onCheckedComparison, onIsCustomerReferenceChange: function (checked) {
|
|
156
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
157
|
+
setSameTypeRecords(function (preRecords) {
|
|
158
|
+
var _a;
|
|
159
|
+
var copyRecords = preRecords.slice();
|
|
160
|
+
var item = copyRecords[dataTypeIndex];
|
|
161
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isCustomerReference: checked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
162
|
+
return copyRecords;
|
|
163
|
+
});
|
|
164
|
+
} }));
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
];
|
|
168
|
+
return {
|
|
169
|
+
contractColumns: contractColumns,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IElectronSignaturesItem, IElectronSignaturesItemPublic, ITrackItem } from './interface';
|
|
3
|
+
import type { SpinProps } from 'antd/es/spin';
|
|
4
|
+
declare const _default: React.NamedExoticComponent<IElectronSignaturesItem & IElectronSignaturesItemPublic & {
|
|
5
|
+
onTrackChange?: (dataType: string, info: ITrackItem) => void;
|
|
6
|
+
setLoading?: React.Dispatch<React.SetStateAction<SpinProps>>;
|
|
7
|
+
}>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React, { memo, useEffect, useRef } from 'react';
|
|
13
|
+
import { FILE_FIELDS_NAME, } from './interface';
|
|
14
|
+
import useMemoizedFn from '../utils/useMemoizedFn';
|
|
15
|
+
// 附件数据处理
|
|
16
|
+
import useParseRecords from './hooks/useParseRecords';
|
|
17
|
+
// 获取附件类型数据
|
|
18
|
+
import useFetchFileTypeData from './fileComponents/useFetchFileTypeData';
|
|
19
|
+
// 电子印章
|
|
20
|
+
import useFetchElectronData from './electronComponents/useFetchElectronData';
|
|
21
|
+
import useParseIsNeedElectronData from './hooks/useParseIsNeedElectronData';
|
|
22
|
+
import useParseElectronListData from './hooks/useParseElectronListData';
|
|
23
|
+
import useParseElectronSetting from './hooks/useParseElectronSetting';
|
|
24
|
+
// 群杰章
|
|
25
|
+
import useFetchQunjData from './qunjComponents/useFetchQunjData';
|
|
26
|
+
import useParseQunjListData from './hooks/useParseQunjListData';
|
|
27
|
+
// 群杰章针对每个附件都盖群杰章逻辑的控制
|
|
28
|
+
import useParseIsNeedQunjData from './hooks/useParseIsNeedQunjData';
|
|
29
|
+
import useParseQunjSingleData from './hooks/useParseQunjSingleData';
|
|
30
|
+
var ElectronSignaturesFragment = function (props) {
|
|
31
|
+
var request = props.request, isUnControlled = props.isUnControlled, contractNumFlowIds = props.contractNumFlowIds, isAllowedPatchFileType = props.isAllowedPatchFileType, fileTypeKey = props.fileTypeKey, fileTypeList = props.fileTypeList, fileTypeFilterList = props.fileTypeFilterList, useOutsideFileTypeList = props.useOutsideFileTypeList, needQys = props.needQys, needQj = props.needQj, needDg = props.needDg, isShowContractComparsion = props.isShowContractComparsion, isDefaultQunj = props.isDefaultQunj, qunjAddressList = props.qunjAddressList, qunjAddress = props.qunjAddress, _a = props.isQunjAddress, isQunjAddress = _a === void 0 ? true : _a, deptId = props.deptId, secondDepId = props.secondDepId, qunjReplaceDeptId = props.qunjReplaceDeptId, flowId = props.flowId, electronicSealIdList = props.electronicSealIdList, qunjSeal = props.qunjSeal, _b = props.isCheckedEconomic, isCheckedEconomic = _b === void 0 ? 1 : _b, docAttachMap = props.docAttachMap, contractId = props.contractId, documentIdList = props.documentIdList, onValueChange = props.onValueChange, fileList = props.fileList, _c = props.dataType, dataType = _c === void 0 ? '' : _c, dataTypeName = props.dataTypeName, isBgColor = props.isBgColor, canEdit = props.canEdit, flowStatus = props.flowStatus, onTrackChange = props.onTrackChange, setLoading = props.setLoading, apiBaseUrl = props.apiBaseUrl, fileBaseUrl = props.fileBaseUrl, fileFieldsName = props.fileFieldsName, fileSplitRules = props.fileSplitRules, fileSplitStringRules = props.fileSplitStringRules, parseCurrentUploadFile = props.parseCurrentUploadFile, isShowSaveTemplate = props.isShowSaveTemplate, isShowChioseTemplate = props.isShowChioseTemplate, companyTypes = props.companyTypes, isSingleQj = props.isSingleQj, wfProcessInstId = props.wfProcessInstId, verifyUserIds = props.verifyUserIds, isSupportNoAttachQj = props.isSupportNoAttachQj;
|
|
32
|
+
var fileFieldsNameRef = useRef(FILE_FIELDS_NAME);
|
|
33
|
+
fileFieldsNameRef.current = __assign(__assign({}, FILE_FIELDS_NAME), fileFieldsName);
|
|
34
|
+
// 代理函数
|
|
35
|
+
var isShowContractComparsionHandle = useMemoizedFn(function (record, records) {
|
|
36
|
+
// 如果需要自定义的话 那就交给用户自定义
|
|
37
|
+
if (isShowContractComparsion) {
|
|
38
|
+
return isShowContractComparsion(record, records);
|
|
39
|
+
}
|
|
40
|
+
return record.attachType === '001' ? true : false;
|
|
41
|
+
});
|
|
42
|
+
// 解析附件数据
|
|
43
|
+
var _d = useParseRecords({
|
|
44
|
+
isUnControlled: isUnControlled,
|
|
45
|
+
onValueChange: onValueChange,
|
|
46
|
+
dataType: dataType,
|
|
47
|
+
fileList: fileList,
|
|
48
|
+
fileSplitRules: fileSplitRules,
|
|
49
|
+
fileSplitStringRules: fileSplitStringRules,
|
|
50
|
+
isSingleQj: isSingleQj,
|
|
51
|
+
isSupportNoAttachQj: isSupportNoAttachQj,
|
|
52
|
+
}), records = _d.records, setRecords = _d.setRecords, innerSetRecords = _d.innerSetRecords;
|
|
53
|
+
// 电子印章列表相关数据
|
|
54
|
+
var _e = useFetchElectronData({
|
|
55
|
+
request: request,
|
|
56
|
+
needQys: needQys,
|
|
57
|
+
deptId: deptId,
|
|
58
|
+
secondDepId: secondDepId,
|
|
59
|
+
flowId: flowId,
|
|
60
|
+
records: records,
|
|
61
|
+
canEdit: canEdit,
|
|
62
|
+
}), electronList = _e.electronList, firstLevelPersonName = _e.firstLevelPersonName;
|
|
63
|
+
// 群杰物理章列表相关数据
|
|
64
|
+
var qunjList = useFetchQunjData({
|
|
65
|
+
request: request,
|
|
66
|
+
needQj: needQj,
|
|
67
|
+
flowId: flowId,
|
|
68
|
+
deptId: deptId,
|
|
69
|
+
companyTypes: companyTypes,
|
|
70
|
+
qunjReplaceDeptId: qunjReplaceDeptId,
|
|
71
|
+
}).qunjList;
|
|
72
|
+
// 附件类型列表相关数据
|
|
73
|
+
var fileTypeFetchList = useFetchFileTypeData({
|
|
74
|
+
request: request,
|
|
75
|
+
fileTypeKey: fileTypeKey,
|
|
76
|
+
fileTypeList: fileTypeList,
|
|
77
|
+
fileTypeFilterList: fileTypeFilterList,
|
|
78
|
+
useOutsideFileTypeList: useOutsideFileTypeList,
|
|
79
|
+
isAllowedPatchFileType: isAllowedPatchFileType,
|
|
80
|
+
}).fileTypeFetchList;
|
|
81
|
+
// 选择电子印章相关逻辑
|
|
82
|
+
var _f = useParseElectronListData({
|
|
83
|
+
isUnControlled: isUnControlled,
|
|
84
|
+
onValueChange: onValueChange,
|
|
85
|
+
dataType: dataType,
|
|
86
|
+
electronicSealIdList: electronicSealIdList,
|
|
87
|
+
isCheckedEconomic: isCheckedEconomic,
|
|
88
|
+
docAttachMap: docAttachMap,
|
|
89
|
+
}), currentCheckedElectronicSealIdList = _f.currentCheckedElectronicSealIdList, onElectronicSealIdChange = _f.onElectronicSealIdChange, currentIsCheckedEconomic = _f.currentIsCheckedEconomic, setCurrentIsCheckedEconomic = _f.setCurrentIsCheckedEconomic, onCheckedEconomicChange = _f.onCheckedEconomicChange, onClearElectronListData = _f.onClearElectronListData;
|
|
90
|
+
// 电子印章设置相关逻辑
|
|
91
|
+
var _g = useParseElectronSetting({
|
|
92
|
+
isUnControlled: isUnControlled,
|
|
93
|
+
onValueChange: onValueChange,
|
|
94
|
+
request: request,
|
|
95
|
+
setLoading: setLoading,
|
|
96
|
+
records: records,
|
|
97
|
+
dataType: dataType,
|
|
98
|
+
contractId: contractId,
|
|
99
|
+
docAttachMap: docAttachMap,
|
|
100
|
+
documentIdList: documentIdList,
|
|
101
|
+
electronicSealIdList: currentCheckedElectronicSealIdList,
|
|
102
|
+
isCheckedEconomic: currentIsCheckedEconomic,
|
|
103
|
+
setCurrentIsCheckedEconomic: setCurrentIsCheckedEconomic,
|
|
104
|
+
canEdit: canEdit,
|
|
105
|
+
flowStatus: flowStatus,
|
|
106
|
+
deptId: deptId,
|
|
107
|
+
secondDepId: secondDepId,
|
|
108
|
+
onElectronicSealIdChange: onElectronicSealIdChange,
|
|
109
|
+
electronList: electronList,
|
|
110
|
+
}), currentContractId = _g.currentContractId, currentDocAttachMap = _g.currentDocAttachMap, currentDocumentIdList = _g.currentDocumentIdList, appointSignLocation = _g.appointSignLocation, viewSignPage = _g.viewSignPage, checkUnStampedSealList = _g.checkUnStampedSealList, unElectronicSealList = _g.unElectronicSealList, unElectronicSealIdList = _g.unElectronicSealIdList, onClearElectronSetting = _g.onClearElectronSetting, clickElectronicSealIdList = _g.clickElectronicSealIdList;
|
|
111
|
+
// 盖电子印章相关逻辑
|
|
112
|
+
var _h = useParseIsNeedElectronData({
|
|
113
|
+
isUnControlled: isUnControlled,
|
|
114
|
+
onValueChange: onValueChange,
|
|
115
|
+
dataType: dataType,
|
|
116
|
+
records: records,
|
|
117
|
+
setRecords: innerSetRecords,
|
|
118
|
+
onClearElectronListData: onClearElectronListData,
|
|
119
|
+
onClearElectronSetting: onClearElectronSetting,
|
|
120
|
+
deptId: deptId,
|
|
121
|
+
secondDepId: secondDepId,
|
|
122
|
+
electronicSealIdList: electronicSealIdList,
|
|
123
|
+
}), onIsStampElectronChange = _h.onIsStampElectronChange, isStampElectron = _h.isStampElectron, clearAllElectronDataHandler = _h.clearAllElectronDataHandler;
|
|
124
|
+
// 这个是整体逻辑。如果每个附件都需要选择是否盖群杰印章,走其他逻辑
|
|
125
|
+
// 群杰物理章切换数据相关逻辑
|
|
126
|
+
var _j = useParseQunjListData({
|
|
127
|
+
isUnControlled: isUnControlled,
|
|
128
|
+
onValueChange: onValueChange,
|
|
129
|
+
dataType: dataType,
|
|
130
|
+
qunjSeal: qunjSeal,
|
|
131
|
+
contractNumFlowIds: contractNumFlowIds,
|
|
132
|
+
deptId: deptId,
|
|
133
|
+
flowId: flowId,
|
|
134
|
+
isDefaultQunj: isDefaultQunj,
|
|
135
|
+
qunjAddress: qunjAddress,
|
|
136
|
+
isSingleQj: isSingleQj,
|
|
137
|
+
}), currentQunjSeal = _j.currentQunjSeal, onQunjSealChange = _j.onQunjSealChange, isContranctNum = _j.isContranctNum, qunjChecked = _j.qunjChecked, setQunjChecked = _j.setQunjChecked, currentQunjAddress = _j.currentQunjAddress, onQunjAddressChange = _j.onQunjAddressChange;
|
|
138
|
+
// 是否盖群杰章相关逻辑
|
|
139
|
+
var onIsStampQunjChange = useParseIsNeedQunjData({
|
|
140
|
+
isUnControlled: isUnControlled,
|
|
141
|
+
onValueChange: onValueChange,
|
|
142
|
+
dataType: dataType,
|
|
143
|
+
records: records,
|
|
144
|
+
setRecords: innerSetRecords,
|
|
145
|
+
fileFieldsNameRef: fileFieldsNameRef,
|
|
146
|
+
}).onIsStampQunjChange;
|
|
147
|
+
// 针对每个附件加盖群杰章的逻辑
|
|
148
|
+
var _k = useParseQunjSingleData({
|
|
149
|
+
onValueChange: onValueChange,
|
|
150
|
+
dataType: dataType,
|
|
151
|
+
records: records,
|
|
152
|
+
setRecords: innerSetRecords,
|
|
153
|
+
fileFieldsNameRef: fileFieldsNameRef,
|
|
154
|
+
isContranctNum: isContranctNum,
|
|
155
|
+
isSingleQj: isSingleQj,
|
|
156
|
+
flowId: flowId,
|
|
157
|
+
}), onQunjAddressSingleChange = _k.onQunjAddressSingleChange, onQunjSealSingleChange = _k.onQunjSealSingleChange;
|
|
158
|
+
// 触发收集状态
|
|
159
|
+
useEffect(function () {
|
|
160
|
+
onTrackChange &&
|
|
161
|
+
onTrackChange(dataType, {
|
|
162
|
+
electronList: electronList,
|
|
163
|
+
firstLevelPersonName: firstLevelPersonName,
|
|
164
|
+
});
|
|
165
|
+
}, [dataType, onTrackChange, electronList, firstLevelPersonName]);
|
|
166
|
+
useEffect(function () {
|
|
167
|
+
onTrackChange &&
|
|
168
|
+
onTrackChange(dataType, {
|
|
169
|
+
qunjList: qunjList,
|
|
170
|
+
});
|
|
171
|
+
}, [dataType, onTrackChange, qunjList]);
|
|
172
|
+
useEffect(function () {
|
|
173
|
+
onTrackChange &&
|
|
174
|
+
onTrackChange(dataType, {
|
|
175
|
+
fileTypeFetchList: fileTypeFetchList,
|
|
176
|
+
});
|
|
177
|
+
}, [dataType, onTrackChange, fileTypeFetchList]);
|
|
178
|
+
// 电子印章列表相关操作 收集状态
|
|
179
|
+
useEffect(function () {
|
|
180
|
+
onTrackChange &&
|
|
181
|
+
onTrackChange(dataType, {
|
|
182
|
+
currentCheckedElectronicSealIdList: currentCheckedElectronicSealIdList,
|
|
183
|
+
onElectronicSealIdChange: onElectronicSealIdChange,
|
|
184
|
+
currentIsCheckedEconomic: currentIsCheckedEconomic,
|
|
185
|
+
onCheckedEconomicChange: onCheckedEconomicChange,
|
|
186
|
+
onClearElectronListData: onClearElectronListData,
|
|
187
|
+
onClearElectronSetting: onClearElectronSetting,
|
|
188
|
+
});
|
|
189
|
+
}, [
|
|
190
|
+
dataType,
|
|
191
|
+
onTrackChange,
|
|
192
|
+
currentCheckedElectronicSealIdList,
|
|
193
|
+
onElectronicSealIdChange,
|
|
194
|
+
currentIsCheckedEconomic,
|
|
195
|
+
onCheckedEconomicChange,
|
|
196
|
+
onClearElectronListData,
|
|
197
|
+
onClearElectronSetting,
|
|
198
|
+
]);
|
|
199
|
+
// 附件相关数据 收集状态
|
|
200
|
+
useEffect(function () {
|
|
201
|
+
onTrackChange &&
|
|
202
|
+
onTrackChange(dataType, {
|
|
203
|
+
records: records,
|
|
204
|
+
setRecords: setRecords,
|
|
205
|
+
fileFieldsNameRef: fileFieldsNameRef,
|
|
206
|
+
fileSplitRules: fileSplitRules,
|
|
207
|
+
fileSplitStringRules: fileSplitStringRules,
|
|
208
|
+
parseCurrentUploadFile: parseCurrentUploadFile,
|
|
209
|
+
});
|
|
210
|
+
}, [
|
|
211
|
+
dataType,
|
|
212
|
+
onTrackChange,
|
|
213
|
+
records,
|
|
214
|
+
setRecords,
|
|
215
|
+
fileSplitRules,
|
|
216
|
+
fileSplitStringRules,
|
|
217
|
+
parseCurrentUploadFile,
|
|
218
|
+
]);
|
|
219
|
+
// 选择是否加盖电子印章 收集状态
|
|
220
|
+
useEffect(function () {
|
|
221
|
+
onTrackChange &&
|
|
222
|
+
onTrackChange(dataType, {
|
|
223
|
+
onIsStampElectronChange: onIsStampElectronChange,
|
|
224
|
+
isStampElectron: isStampElectron,
|
|
225
|
+
clearAllElectronDataHandler: clearAllElectronDataHandler,
|
|
226
|
+
});
|
|
227
|
+
}, [
|
|
228
|
+
dataType,
|
|
229
|
+
onTrackChange,
|
|
230
|
+
onIsStampElectronChange,
|
|
231
|
+
isStampElectron,
|
|
232
|
+
clearAllElectronDataHandler,
|
|
233
|
+
]);
|
|
234
|
+
// 电子印章相关设置 收集状态
|
|
235
|
+
useEffect(function () {
|
|
236
|
+
onTrackChange &&
|
|
237
|
+
onTrackChange(dataType, {
|
|
238
|
+
currentContractId: currentContractId,
|
|
239
|
+
currentDocAttachMap: currentDocAttachMap,
|
|
240
|
+
currentDocumentIdList: currentDocumentIdList,
|
|
241
|
+
appointSignLocation: appointSignLocation,
|
|
242
|
+
viewSignPage: viewSignPage,
|
|
243
|
+
checkUnStampedSealList: checkUnStampedSealList,
|
|
244
|
+
unElectronicSealList: unElectronicSealList,
|
|
245
|
+
unElectronicSealIdList: unElectronicSealIdList,
|
|
246
|
+
clickElectronicSealIdList: clickElectronicSealIdList,
|
|
247
|
+
});
|
|
248
|
+
}, [
|
|
249
|
+
dataType,
|
|
250
|
+
onTrackChange,
|
|
251
|
+
currentContractId,
|
|
252
|
+
currentDocAttachMap,
|
|
253
|
+
currentDocumentIdList,
|
|
254
|
+
appointSignLocation,
|
|
255
|
+
viewSignPage,
|
|
256
|
+
checkUnStampedSealList,
|
|
257
|
+
unElectronicSealList,
|
|
258
|
+
unElectronicSealIdList,
|
|
259
|
+
clickElectronicSealIdList,
|
|
260
|
+
]);
|
|
261
|
+
// 群杰物理章相关配置
|
|
262
|
+
useEffect(function () {
|
|
263
|
+
onTrackChange &&
|
|
264
|
+
onTrackChange(dataType, {
|
|
265
|
+
currentQunjSeal: currentQunjSeal,
|
|
266
|
+
onQunjSealChange: onQunjSealChange,
|
|
267
|
+
isContranctNum: isContranctNum,
|
|
268
|
+
qunjChecked: qunjChecked,
|
|
269
|
+
setQunjChecked: setQunjChecked,
|
|
270
|
+
currentQunjAddress: currentQunjAddress,
|
|
271
|
+
onQunjAddressChange: onQunjAddressChange,
|
|
272
|
+
isShowContractComparsionHandle: isShowContractComparsionHandle,
|
|
273
|
+
isShowSaveTemplate: isShowSaveTemplate,
|
|
274
|
+
isShowChioseTemplate: isShowChioseTemplate,
|
|
275
|
+
});
|
|
276
|
+
}, [
|
|
277
|
+
dataType,
|
|
278
|
+
onTrackChange,
|
|
279
|
+
currentQunjSeal,
|
|
280
|
+
onQunjSealChange,
|
|
281
|
+
isContranctNum,
|
|
282
|
+
qunjChecked,
|
|
283
|
+
setQunjChecked,
|
|
284
|
+
currentQunjAddress,
|
|
285
|
+
onQunjAddressChange,
|
|
286
|
+
isShowContractComparsionHandle,
|
|
287
|
+
isShowSaveTemplate,
|
|
288
|
+
isShowChioseTemplate,
|
|
289
|
+
]);
|
|
290
|
+
// 选择是否加盖物理章 收集状态
|
|
291
|
+
useEffect(function () {
|
|
292
|
+
onTrackChange &&
|
|
293
|
+
onTrackChange(dataType, {
|
|
294
|
+
onIsStampQunjChange: onIsStampQunjChange,
|
|
295
|
+
onQunjAddressSingleChange: onQunjAddressSingleChange,
|
|
296
|
+
onQunjSealSingleChange: onQunjSealSingleChange,
|
|
297
|
+
});
|
|
298
|
+
}, [
|
|
299
|
+
dataType,
|
|
300
|
+
onTrackChange,
|
|
301
|
+
onIsStampQunjChange,
|
|
302
|
+
onQunjAddressSingleChange,
|
|
303
|
+
onQunjSealSingleChange,
|
|
304
|
+
]);
|
|
305
|
+
// 一些基本数据 收集状态
|
|
306
|
+
useEffect(function () {
|
|
307
|
+
onTrackChange &&
|
|
308
|
+
onTrackChange(dataType, {
|
|
309
|
+
isEdit: canEdit + '' === '1',
|
|
310
|
+
needQys: needQys + '' === '1',
|
|
311
|
+
needQj: needQj + '' === '1',
|
|
312
|
+
needDg: needDg + '' === '1',
|
|
313
|
+
qunjAddressList: qunjAddressList,
|
|
314
|
+
isQunjAddress: isQunjAddress,
|
|
315
|
+
dataTypeName: dataTypeName,
|
|
316
|
+
isBgColor: isBgColor,
|
|
317
|
+
isAllowedPatchFileType: isAllowedPatchFileType,
|
|
318
|
+
apiBaseUrl: apiBaseUrl,
|
|
319
|
+
fileBaseUrl: fileBaseUrl,
|
|
320
|
+
flowStatus: flowStatus,
|
|
321
|
+
wfProcessInstId: wfProcessInstId,
|
|
322
|
+
verifyUserIds: verifyUserIds,
|
|
323
|
+
});
|
|
324
|
+
}, [
|
|
325
|
+
dataType,
|
|
326
|
+
onTrackChange,
|
|
327
|
+
canEdit,
|
|
328
|
+
needQys,
|
|
329
|
+
needQj,
|
|
330
|
+
needDg,
|
|
331
|
+
qunjAddressList,
|
|
332
|
+
isQunjAddress,
|
|
333
|
+
dataTypeName,
|
|
334
|
+
isBgColor,
|
|
335
|
+
isAllowedPatchFileType,
|
|
336
|
+
apiBaseUrl,
|
|
337
|
+
fileBaseUrl,
|
|
338
|
+
flowStatus,
|
|
339
|
+
wfProcessInstId,
|
|
340
|
+
verifyUserIds,
|
|
341
|
+
]);
|
|
342
|
+
return React.createElement(React.Fragment, null);
|
|
343
|
+
};
|
|
344
|
+
export default memo(ElectronSignaturesFragment);
|