ztxkui 10.0.95 → 10.0.96
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 +95 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +73 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +245 -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 +139 -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 +55 -0
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +157 -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 +43 -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 +167 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -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 +43 -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 +132 -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 +363 -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 +61 -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
package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IElectronSignaturesItemPublic } from '../interface';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/** 请求 */
|
|
5
|
+
request: IElectronSignaturesItemPublic['request'];
|
|
6
|
+
apiBaseUrl: IElectronSignaturesItemPublic['apiBaseUrl'];
|
|
7
|
+
/** 当前选中的数据 */
|
|
8
|
+
selectRows: any;
|
|
9
|
+
allData?: any;
|
|
10
|
+
/**
|
|
11
|
+
* 是否显示批量下载附件原件按钮
|
|
12
|
+
*/
|
|
13
|
+
isShowDownloadBatchBtn?: IElectronSignaturesItemPublic['isShowDownloadBatchBtn'];
|
|
14
|
+
/**
|
|
15
|
+
* 是否显示批量下载电子签章件按钮
|
|
16
|
+
*/
|
|
17
|
+
isShowElectronBatchBtn?: IElectronSignaturesItemPublic['isShowElectronBatchBtn'];
|
|
18
|
+
isShowDoubleSignedBatchBtn?: IElectronSignaturesItemPublic['isShowDoubleSignedBatchBtn'];
|
|
19
|
+
batchDownloadZipName?: IElectronSignaturesItemPublic['batchDownloadZipName'];
|
|
20
|
+
children?: any;
|
|
21
|
+
firstDataType?: any;
|
|
22
|
+
organizationId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 是否编辑状态
|
|
25
|
+
*/
|
|
26
|
+
isEdit?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 是否需要契约锁
|
|
29
|
+
*/
|
|
30
|
+
isNeedQys?: boolean;
|
|
31
|
+
records?: any;
|
|
32
|
+
setRecords?: any;
|
|
33
|
+
/** 所有数据 */
|
|
34
|
+
mergeRecords?: any;
|
|
35
|
+
/**
|
|
36
|
+
* 是否显示批量使用电子印章(这个组件内部还会判断编辑状态以及该流程是否使用了电子章)
|
|
37
|
+
*/
|
|
38
|
+
isShowBatchUseElectronicSealBtn?: IElectronSignaturesItemPublic['isShowBatchUseElectronicSealBtn'];
|
|
39
|
+
/**
|
|
40
|
+
* 是否显示批量盖户用电子章(这个组件内部还会判断编辑状态以及该流程是否使用了盖户用电子章)
|
|
41
|
+
*/
|
|
42
|
+
isShowBatchUseOpeningContractSealBtn?: IElectronSignaturesItemPublic['isShowBatchUseOpeningContractSealBtn'];
|
|
43
|
+
dataTypeSort?: any;
|
|
44
|
+
onValueChange?: any;
|
|
45
|
+
isShowOpeningContractSealNotRelyQys?: IElectronSignaturesItemPublic['isShowOpeningContractSealNotRelyQys'];
|
|
46
|
+
/**
|
|
47
|
+
* 允许下载盖章件的流程状态,逗号分隔,如 '50,60,70',默认为 '50'
|
|
48
|
+
*/
|
|
49
|
+
sealDownloadFlowStatus?: string;
|
|
50
|
+
}
|
|
51
|
+
declare const _default: React.NamedExoticComponent<IProps>;
|
|
52
|
+
export default _default;
|
package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js
ADDED
|
@@ -0,0 +1,513 @@
|
|
|
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, { memo, useRef } from 'react';
|
|
14
|
+
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
15
|
+
import { Button, Dropdown, Menu, message, Tooltip } from '../../../index';
|
|
16
|
+
import { sealFileBatchDownload, preCanDownload, fileBatchDownload, nextDownload, } from '../../Upload/utils';
|
|
17
|
+
import { DATA_TYPE_KEY } from '../hooks/useParseRecords';
|
|
18
|
+
import { getToken } from 'ztxkutils/dist/authority';
|
|
19
|
+
import { isFlowCompleted } from '../utils';
|
|
20
|
+
import useBaseContext from '../../utils/useBaseContext';
|
|
21
|
+
/**
|
|
22
|
+
* 下载电子印章相关逻辑
|
|
23
|
+
*/
|
|
24
|
+
var ElectronSealBatchDownload = function (props) {
|
|
25
|
+
var request = props.request, apiBaseUrl = props.apiBaseUrl, selectRows = props.selectRows, allData = props.allData, isShowDownloadBatchBtn = props.isShowDownloadBatchBtn, isShowElectronBatchBtn = props.isShowElectronBatchBtn, isShowDoubleSignedBatchBtn = props.isShowDoubleSignedBatchBtn, batchDownloadZipName = props.batchDownloadZipName, children = props.children, firstDataType = props.firstDataType, organizationId = props.organizationId, isEdit = props.isEdit, isNeedQys = props.isNeedQys, records = props.records, setRecords = props.setRecords, isShowBatchUseElectronicSealBtn = props.isShowBatchUseElectronicSealBtn, isShowBatchUseOpeningContractSealBtn = props.isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSealNotRelyQys = props.isShowOpeningContractSealNotRelyQys, _a = props.sealDownloadFlowStatus, sealDownloadFlowStatus = _a === void 0 ? '50' : _a;
|
|
26
|
+
// 全局配置:SCM 印章/盖章服务名,用于产品化环境替换 /zmdms-scm-system 前缀
|
|
27
|
+
var serviceNames = useBaseContext().serviceNames;
|
|
28
|
+
var _b = (serviceNames || {}).scmServiceName, scmServiceName = _b === void 0 ? '/zmdms-scm-system' : _b;
|
|
29
|
+
/**
|
|
30
|
+
* @author 陈亚雄
|
|
31
|
+
* @description 批量下载
|
|
32
|
+
*/
|
|
33
|
+
var batchDownloadRef = useRef(null);
|
|
34
|
+
var noCompressBatchDownloadRef = useRef(null);
|
|
35
|
+
var onAllDownloadHandle = function (options) {
|
|
36
|
+
var _a = options.isCompress, isCompress = _a === void 0 ? true : _a, _b = options.isWater, isWater = _b === void 0 ? false : _b;
|
|
37
|
+
var selectFiles = selectRows.current;
|
|
38
|
+
var authToken = getToken() || '';
|
|
39
|
+
if (isCompress) {
|
|
40
|
+
if (!preCanDownload(batchDownloadRef.current, function () {
|
|
41
|
+
batchDownloadRef.current = null;
|
|
42
|
+
})) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
if (!preCanDownload(noCompressBatchDownloadRef.current, function () {
|
|
48
|
+
noCompressBatchDownloadRef.current = null;
|
|
49
|
+
})) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (Array.isArray(selectFiles) && selectFiles.length > 0) {
|
|
54
|
+
var list_1 = [];
|
|
55
|
+
try {
|
|
56
|
+
var listResult_1 = {};
|
|
57
|
+
selectFiles.forEach(function (item) {
|
|
58
|
+
var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
|
|
59
|
+
if (!listResult_1[key]) {
|
|
60
|
+
listResult_1[key] = [item];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
listResult_1[key].push(item);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.keys(listResult_1).forEach(function (key) {
|
|
67
|
+
var checkedRecords = listResult_1[key];
|
|
68
|
+
var _a = allData[key], records = _a.records, fileFieldsNameRef = _a.fileFieldsNameRef;
|
|
69
|
+
var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, attachName = _b.attachName;
|
|
70
|
+
checkedRecords.forEach(function (checkedRecord) {
|
|
71
|
+
if (records.find(function (record) { return record[attachId] === checkedRecord[attachId]; })) {
|
|
72
|
+
list_1.push({
|
|
73
|
+
fileName: checkedRecord[attachName],
|
|
74
|
+
fileId: checkedRecord[attachId],
|
|
75
|
+
isWatermark: isWater,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
list_1 = selectFiles.map(function (item) { return ({
|
|
83
|
+
fileName: item.attachName,
|
|
84
|
+
fileId: item.attachId,
|
|
85
|
+
isWatermark: isWater,
|
|
86
|
+
}); });
|
|
87
|
+
}
|
|
88
|
+
if (isCompress) {
|
|
89
|
+
// 根据相关信息生成下载的链接
|
|
90
|
+
if (!preCanDownload(batchDownloadRef.current, function () {
|
|
91
|
+
batchDownloadRef.current = null;
|
|
92
|
+
})) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
batchDownloadRef.current = fileBatchDownload(list_1, {
|
|
96
|
+
authToken: authToken,
|
|
97
|
+
apiBaseUrl: apiBaseUrl || window.location.origin,
|
|
98
|
+
isCompress: isCompress,
|
|
99
|
+
zipName: batchDownloadZipName,
|
|
100
|
+
});
|
|
101
|
+
nextDownload(batchDownloadRef.current, function () {
|
|
102
|
+
batchDownloadRef.current = null;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
// 根据相关信息生成下载的链接
|
|
107
|
+
if (!preCanDownload(noCompressBatchDownloadRef.current, function () {
|
|
108
|
+
noCompressBatchDownloadRef.current = null;
|
|
109
|
+
})) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
noCompressBatchDownloadRef.current = fileBatchDownload(list_1, {
|
|
113
|
+
authToken: authToken,
|
|
114
|
+
apiBaseUrl: apiBaseUrl || window.location.origin,
|
|
115
|
+
isCompress: isCompress,
|
|
116
|
+
zipName: batchDownloadZipName,
|
|
117
|
+
});
|
|
118
|
+
nextDownload(noCompressBatchDownloadRef.current, function () {
|
|
119
|
+
noCompressBatchDownloadRef.current = null;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
message.info(i18next.t('请选择需要下载的附件!'));
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
/** 批量下载盖章件 */
|
|
128
|
+
var sealBatchDownloadRef = useRef(null);
|
|
129
|
+
var sealNoCompressBatchDownloadRef = useRef(null);
|
|
130
|
+
var batchDownload = function (options) {
|
|
131
|
+
var _a = options || {}, _b = _a.isCompress, isCompress = _b === void 0 ? true : _b, _c = _a.isWater, isWater = _c === void 0 ? false : _c;
|
|
132
|
+
var list = selectRows.current;
|
|
133
|
+
// 计算能下载盖章件的数据
|
|
134
|
+
if (Array.isArray(list) && list.length > 0) {
|
|
135
|
+
var listResult_2 = {};
|
|
136
|
+
list.forEach(function (item) {
|
|
137
|
+
var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
|
|
138
|
+
if (!listResult_2[key]) {
|
|
139
|
+
listResult_2[key] = [item];
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
listResult_2[key].push(item);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var canDownloadFileList_1 = {};
|
|
146
|
+
Object.keys(listResult_2).forEach(function (key) {
|
|
147
|
+
var checkedRecords = listResult_2[key];
|
|
148
|
+
var _a = allData[key], records = _a.records, currentDocAttachMap = _a.currentDocAttachMap, fileFieldsNameRef = _a.fileFieldsNameRef, flowStatus = _a.flowStatus;
|
|
149
|
+
var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, attachName = _b.attachName, isElectronicSeal = _b.isElectronicSeal;
|
|
150
|
+
// 这里加上流程状态是50时,才能下载盖章件的逻辑
|
|
151
|
+
if (currentDocAttachMap &&
|
|
152
|
+
isFlowCompleted(flowStatus, sealDownloadFlowStatus)) {
|
|
153
|
+
var resultRecords = checkedRecords.map(function (record) {
|
|
154
|
+
var currentRecord = records.find(function (item) { return (item === null || item === void 0 ? void 0 : item[attachId]) === (record === null || record === void 0 ? void 0 : record[attachId]); });
|
|
155
|
+
if (currentRecord) {
|
|
156
|
+
return currentRecord;
|
|
157
|
+
}
|
|
158
|
+
return record;
|
|
159
|
+
});
|
|
160
|
+
var qysAttachVOList = resultRecords
|
|
161
|
+
.filter(function (record) {
|
|
162
|
+
return (record === null || record === void 0 ? void 0 : record[isElectronicSeal || 'isElectronicSeal']) + '' === '1';
|
|
163
|
+
})
|
|
164
|
+
.map(function (item) { return ({
|
|
165
|
+
fileName: item === null || item === void 0 ? void 0 : item[attachName],
|
|
166
|
+
attachId: item === null || item === void 0 ? void 0 : item[attachId],
|
|
167
|
+
}); });
|
|
168
|
+
if (qysAttachVOList.length !== 0) {
|
|
169
|
+
var data = {
|
|
170
|
+
docAttachMap: currentDocAttachMap,
|
|
171
|
+
qysAttachVOList: qysAttachVOList,
|
|
172
|
+
};
|
|
173
|
+
if (isWater) {
|
|
174
|
+
data['watermarkOrganizationType'] = '12';
|
|
175
|
+
data['watermarkOrganizationId'] = organizationId;
|
|
176
|
+
}
|
|
177
|
+
canDownloadFileList_1[key] = {
|
|
178
|
+
params: data,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
var keys = Object.keys(canDownloadFileList_1);
|
|
184
|
+
if (keys.length === 0) {
|
|
185
|
+
message.info(i18next.t('请选择可以下载的盖章件的数据!'));
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
keys.forEach(function (key) {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
var params = canDownloadFileList_1[key].params;
|
|
191
|
+
if (isCompress) {
|
|
192
|
+
// 根据相关信息生成下载的链接
|
|
193
|
+
if (!sealBatchDownloadRef.current) {
|
|
194
|
+
sealBatchDownloadRef.current = (_a = {},
|
|
195
|
+
_a[key] = null,
|
|
196
|
+
_a);
|
|
197
|
+
}
|
|
198
|
+
if (!preCanDownload(sealBatchDownloadRef.current[key], function () {
|
|
199
|
+
if (sealBatchDownloadRef.current) {
|
|
200
|
+
sealBatchDownloadRef.current[key] = null;
|
|
201
|
+
}
|
|
202
|
+
})) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
sealBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
|
|
206
|
+
isCompress: isCompress,
|
|
207
|
+
isWater: isWater,
|
|
208
|
+
}, scmServiceName);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
// 根据相关信息生成下载的链接
|
|
212
|
+
if (!sealNoCompressBatchDownloadRef.current) {
|
|
213
|
+
sealNoCompressBatchDownloadRef.current = (_b = {},
|
|
214
|
+
_b[key] = null,
|
|
215
|
+
_b);
|
|
216
|
+
}
|
|
217
|
+
if (!preCanDownload(sealNoCompressBatchDownloadRef.current[key], function () {
|
|
218
|
+
if (sealNoCompressBatchDownloadRef.current) {
|
|
219
|
+
sealNoCompressBatchDownloadRef.current[key] = null;
|
|
220
|
+
}
|
|
221
|
+
})) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
sealNoCompressBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
|
|
225
|
+
isCompress: isCompress,
|
|
226
|
+
isWater: isWater,
|
|
227
|
+
}, scmServiceName);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
message.info(i18next.t('请选择需要下载的盖章件!'));
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
/** 批量下载双签件 */
|
|
236
|
+
var sealDoubleBatchDownloadRef = useRef(null);
|
|
237
|
+
var sealDoubleNoCompressBatchDownloadRef = useRef(null);
|
|
238
|
+
var batchDoubleDownload = function (options) {
|
|
239
|
+
var _a = options.isCompress, isCompress = _a === void 0 ? true : _a, _b = options.isWater, isWater = _b === void 0 ? false : _b;
|
|
240
|
+
var list = selectRows.current;
|
|
241
|
+
// 计算能下载盖章件的数据
|
|
242
|
+
if (Array.isArray(list) && list.length > 0) {
|
|
243
|
+
var listResult_3 = {};
|
|
244
|
+
list.forEach(function (item) {
|
|
245
|
+
var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
|
|
246
|
+
if (!listResult_3[key]) {
|
|
247
|
+
listResult_3[key] = [item];
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
listResult_3[key].push(item);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
var canDownloadFileList_2 = {};
|
|
254
|
+
Object.keys(listResult_3).forEach(function (key) {
|
|
255
|
+
var checkedRecords = listResult_3[key];
|
|
256
|
+
var _a = allData[key], records = _a.records, fileFieldsNameRef = _a.fileFieldsNameRef, flowStatus = _a.flowStatus;
|
|
257
|
+
var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, _doubleSignedSealInfoDTOList = _b.doubleSignedSealInfoDTOList;
|
|
258
|
+
var doubleSignedSealInfoDTOListKey = _doubleSignedSealInfoDTOList || 'doubleSignedSealInfoDTOList';
|
|
259
|
+
// 这里加上流程状态是50时,才能下载双签件的逻辑
|
|
260
|
+
if (isFlowCompleted(flowStatus, sealDownloadFlowStatus)) {
|
|
261
|
+
var resultRecords = checkedRecords.map(function (record) {
|
|
262
|
+
var currentRecord = records.find(function (item) { return (item === null || item === void 0 ? void 0 : item[attachId]) === (record === null || record === void 0 ? void 0 : record[attachId]); });
|
|
263
|
+
if (currentRecord) {
|
|
264
|
+
return currentRecord;
|
|
265
|
+
}
|
|
266
|
+
return record;
|
|
267
|
+
});
|
|
268
|
+
var qysAttachVOList = resultRecords.filter(function (record) {
|
|
269
|
+
return (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
|
|
270
|
+
Array.isArray(record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
|
|
271
|
+
(record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey].length) > 0;
|
|
272
|
+
});
|
|
273
|
+
if (qysAttachVOList.length !== 0) {
|
|
274
|
+
// 这里每个附件的双签件 都有一个合同模板信息
|
|
275
|
+
qysAttachVOList.forEach(function (record) {
|
|
276
|
+
var _a, _b, _c;
|
|
277
|
+
var key = record[attachId];
|
|
278
|
+
var doubleSignedSealInfoDTOObj = (_a = record[doubleSignedSealInfoDTOListKey]) === null || _a === void 0 ? void 0 : _a[0];
|
|
279
|
+
canDownloadFileList_2[key] = {
|
|
280
|
+
params: {
|
|
281
|
+
docAttachMap: doubleSignedSealInfoDTOObj === null || doubleSignedSealInfoDTOObj === void 0 ? void 0 : doubleSignedSealInfoDTOObj.docAttachMap,
|
|
282
|
+
qysAttachVOList: (_c = (_b = doubleSignedSealInfoDTOObj === null || doubleSignedSealInfoDTOObj === void 0 ? void 0 : doubleSignedSealInfoDTOObj.qysAttachVOList) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (item) { return (__assign(__assign({}, item), { fileName: item.fileName || item.attachName })); }),
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
var keys = Object.keys(canDownloadFileList_2);
|
|
290
|
+
if (keys.length === 0) {
|
|
291
|
+
message.info(i18next.t('请选择可以下载的双签件的数据!'));
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
keys.forEach(function (key) {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
var params = canDownloadFileList_2[key].params;
|
|
297
|
+
if (isCompress) {
|
|
298
|
+
// 根据相关信息生成下载的链接
|
|
299
|
+
if (!sealDoubleBatchDownloadRef.current) {
|
|
300
|
+
sealDoubleBatchDownloadRef.current = (_a = {},
|
|
301
|
+
_a[key] = null,
|
|
302
|
+
_a);
|
|
303
|
+
}
|
|
304
|
+
if (!preCanDownload(sealDoubleBatchDownloadRef.current[key], function () {
|
|
305
|
+
if (sealDoubleBatchDownloadRef.current) {
|
|
306
|
+
sealDoubleBatchDownloadRef.current[key] = null;
|
|
307
|
+
}
|
|
308
|
+
})) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
sealDoubleBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
|
|
312
|
+
isCompress: isCompress,
|
|
313
|
+
isWater: isWater,
|
|
314
|
+
}, scmServiceName);
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
// 根据相关信息生成下载的链接
|
|
318
|
+
if (!sealDoubleNoCompressBatchDownloadRef.current) {
|
|
319
|
+
sealDoubleNoCompressBatchDownloadRef.current = (_b = {},
|
|
320
|
+
_b[key] = null,
|
|
321
|
+
_b);
|
|
322
|
+
}
|
|
323
|
+
if (!preCanDownload(sealDoubleNoCompressBatchDownloadRef.current[key], function () {
|
|
324
|
+
if (sealDoubleNoCompressBatchDownloadRef.current) {
|
|
325
|
+
sealDoubleNoCompressBatchDownloadRef.current[key] = null;
|
|
326
|
+
}
|
|
327
|
+
})) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
sealDoubleNoCompressBatchDownloadRef.current[key] =
|
|
331
|
+
sealFileBatchDownload(request, params, {
|
|
332
|
+
isCompress: isCompress,
|
|
333
|
+
isWater: isWater,
|
|
334
|
+
}, scmServiceName);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
message.info(i18next.t('请选择需要下载的盖章件!'));
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
// 流程完结才能显示批量导出按钮
|
|
343
|
+
var isShowDownloadBtn = function () {
|
|
344
|
+
var _a, _b;
|
|
345
|
+
if (((_a = Object.keys(allData)) === null || _a === void 0 ? void 0 : _a.length) > 1 ||
|
|
346
|
+
isFlowCompleted((_b = allData === null || allData === void 0 ? void 0 : allData[firstDataType]) === null || _b === void 0 ? void 0 : _b.flowStatus, sealDownloadFlowStatus)) {
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
return false;
|
|
350
|
+
};
|
|
351
|
+
// 批量盖电子印章
|
|
352
|
+
var onBatchUseQys = function () {
|
|
353
|
+
if (!selectRows.current || selectRows.current.length === 0) {
|
|
354
|
+
message.info(i18next.t('请选择需要盖电子印章的文件'));
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (records) {
|
|
358
|
+
var newRecords_1 = [];
|
|
359
|
+
records.forEach(function (record, index) {
|
|
360
|
+
// 当前record 是否存在选中项中
|
|
361
|
+
var isCheck = selectRows.current.some(function (item) { return item.attachId === record.attachId; });
|
|
362
|
+
if (!isCheck) {
|
|
363
|
+
newRecords_1.push(record);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
var currentData = allData[firstDataType];
|
|
367
|
+
var fileFieldsNameRef = currentData === null || currentData === void 0 ? void 0 : currentData.fileFieldsNameRef;
|
|
368
|
+
var _a = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, _b = _a.fmsIsElectronicSeal, fmsIsElectronicSealKey = _b === void 0 ? 'fmsIsElectronicSeal' : _b, _c = _a.openingContractSeal, openingContractSealKey = _c === void 0 ? 'openingContractSeal' : _c;
|
|
369
|
+
var newRecord = Object.assign({}, record);
|
|
370
|
+
// 如果当前选项勾中了盖户用电子章那也不处理
|
|
371
|
+
if ((newRecord === null || newRecord === void 0 ? void 0 : newRecord[openingContractSealKey]) + '' === '1') {
|
|
372
|
+
newRecords_1.push(newRecord);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
// 勾选盖电子印章逻辑
|
|
376
|
+
newRecord.isElectronicSeal = 1;
|
|
377
|
+
// 勾选加盖产融章逻辑
|
|
378
|
+
var isShowFms = (newRecord === null || newRecord === void 0 ? void 0 : newRecord.showFmsIsElectronicSeal) &&
|
|
379
|
+
(newRecord === null || newRecord === void 0 ? void 0 : newRecord[fmsIsElectronicSealKey]) != null &&
|
|
380
|
+
(newRecord === null || newRecord === void 0 ? void 0 : newRecord.attachType) === '001' &&
|
|
381
|
+
(newRecord === null || newRecord === void 0 ? void 0 : newRecord.isElectronicSeal);
|
|
382
|
+
if (isShowFms) {
|
|
383
|
+
// 这里的逻辑是 如果勾选了我们自己的电子印章 那么默认选中加盖产融章
|
|
384
|
+
var defaultValue = newRecord.defaultFmsIsElectronicSeal + '' === '1' ||
|
|
385
|
+
newRecord.defaultFmsIsElectronicSeal + '' === '0'
|
|
386
|
+
? newRecord.defaultFmsIsElectronicSeal
|
|
387
|
+
: 1;
|
|
388
|
+
newRecord[fmsIsElectronicSealKey] = defaultValue;
|
|
389
|
+
}
|
|
390
|
+
// 勾选盖户用电子章逻辑
|
|
391
|
+
newRecord[openingContractSealKey] = 0;
|
|
392
|
+
newRecords_1.push(newRecord);
|
|
393
|
+
});
|
|
394
|
+
setRecords(newRecords_1);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
// 是否显示户用合同章复选框
|
|
398
|
+
var isShowOpeningContractSeal = records === null || records === void 0 ? void 0 : records.find(function (record) { return (record === null || record === void 0 ? void 0 : record.showOpeningContractSeal) + '' === '1'; });
|
|
399
|
+
// 批量盖户用电子章
|
|
400
|
+
var onBatchUseContractSeal = function () {
|
|
401
|
+
if (!selectRows.current || selectRows.current.length === 0) {
|
|
402
|
+
message.info(i18next.t('请选择需要盖电子印章的文件'));
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if (records) {
|
|
406
|
+
var newRecords_2 = [];
|
|
407
|
+
records.forEach(function (record, index) {
|
|
408
|
+
// 当前record 是否存在选中项中
|
|
409
|
+
var isCheck = selectRows.current.some(function (item) { return item.attachId === record.attachId; });
|
|
410
|
+
if (!isCheck) {
|
|
411
|
+
newRecords_2.push(record);
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
var newRecord = Object.assign({}, record);
|
|
415
|
+
// 如果当前选项勾中了盖电子印章那也不处理
|
|
416
|
+
if (newRecord.isElectronicSeal + '' === '1' &&
|
|
417
|
+
!isShowOpeningContractSealNotRelyQys) {
|
|
418
|
+
newRecords_2.push(newRecord);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
// 勾选加盖产融章逻辑
|
|
422
|
+
var currentData = allData[firstDataType];
|
|
423
|
+
var fileFieldsNameRef = currentData === null || currentData === void 0 ? void 0 : currentData.fileFieldsNameRef;
|
|
424
|
+
var _a = ((fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}).openingContractSeal, openingContractSealKey = _a === void 0 ? 'openingContractSeal' : _a;
|
|
425
|
+
// 勾选盖户用电子章逻辑
|
|
426
|
+
if (newRecord === null || newRecord === void 0 ? void 0 : newRecord.showOpeningContractSeal) {
|
|
427
|
+
newRecord[openingContractSealKey] = 1;
|
|
428
|
+
}
|
|
429
|
+
newRecords_2.push(newRecord);
|
|
430
|
+
});
|
|
431
|
+
setRecords(newRecords_2);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
return (React.createElement("div", { className: "batch-download--container", style: { marginBottom: 10 } },
|
|
435
|
+
children,
|
|
436
|
+
isShowDownloadBatchBtn ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
|
|
437
|
+
if (e.key === 'compress') {
|
|
438
|
+
onAllDownloadHandle({ isCompress: true, isWater: false });
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
if (e.key === 'no-compress') {
|
|
442
|
+
onAllDownloadHandle({ isCompress: false, isWater: false });
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
if (e.key === 'water--compress') {
|
|
446
|
+
onAllDownloadHandle({ isCompress: true, isWater: true });
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (e.key === 'water--no-compress') {
|
|
450
|
+
onAllDownloadHandle({ isCompress: false, isWater: true });
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
} },
|
|
454
|
+
React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
|
|
455
|
+
React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')),
|
|
456
|
+
React.createElement(Menu.Item, { key: "water--compress" }, i18next.t('水印版-打包下载')),
|
|
457
|
+
React.createElement(Menu.Item, { key: "water--no-compress" }, i18next.t('水印版-逐个下载')))); }, placement: "bottomLeft" },
|
|
458
|
+
React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载原件')))) : null,
|
|
459
|
+
isShowElectronBatchBtn && isShowDownloadBtn() ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
|
|
460
|
+
if (e.key === 'compress') {
|
|
461
|
+
batchDownload({ isCompress: true, isWater: false });
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (e.key === 'no-compress') {
|
|
465
|
+
batchDownload({ isCompress: false, isWater: false });
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
if (e.key === 'water--compress') {
|
|
469
|
+
batchDownload({ isCompress: true, isWater: true });
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
if (e.key === 'water--no-compress') {
|
|
473
|
+
batchDownload({ isCompress: false, isWater: true });
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
} },
|
|
477
|
+
React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
|
|
478
|
+
React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')))); }, placement: "bottomLeft" },
|
|
479
|
+
React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载盖章件')))) : null,
|
|
480
|
+
isShowDoubleSignedBatchBtn && isShowDownloadBtn() ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
|
|
481
|
+
if (e.key === 'compress') {
|
|
482
|
+
batchDoubleDownload({ isCompress: true, isWater: false });
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
if (e.key === 'no-compress') {
|
|
486
|
+
batchDoubleDownload({ isCompress: false, isWater: false });
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (e.key === 'water--compress') {
|
|
490
|
+
batchDoubleDownload({ isCompress: true, isWater: true });
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
if (e.key === 'water--no-compress') {
|
|
494
|
+
batchDoubleDownload({ isCompress: false, isWater: true });
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
} },
|
|
498
|
+
React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
|
|
499
|
+
React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')))); }, placement: "bottomLeft" },
|
|
500
|
+
React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载双签件')))) : null,
|
|
501
|
+
isEdit && isNeedQys && isShowBatchUseElectronicSealBtn ? (React.createElement(Button, { type: "primary", onClick: onBatchUseQys },
|
|
502
|
+
i18next.t('批量使用电子印章'),
|
|
503
|
+
React.createElement(Tooltip, { placement: "bottomLeft", title: i18next.t('已经勾选了户用电子章的不会处理!') },
|
|
504
|
+
React.createElement(QuestionCircleOutlined, null)))) : null,
|
|
505
|
+
isEdit &&
|
|
506
|
+
isShowBatchUseOpeningContractSealBtn &&
|
|
507
|
+
(isShowOpeningContractSealNotRelyQys || isNeedQys) &&
|
|
508
|
+
!!isShowOpeningContractSeal ? (React.createElement(Button, { type: "primary", onClick: onBatchUseContractSeal },
|
|
509
|
+
i18next.t('批量盖光盈电子章'),
|
|
510
|
+
React.createElement(Tooltip, { placement: "bottomLeft", title: i18next.t('已经勾选了电子印章的不会处理!') },
|
|
511
|
+
React.createElement(QuestionCircleOutlined, null)))) : null));
|
|
512
|
+
};
|
|
513
|
+
export default memo(ElectronSealBatchDownload);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import React, { memo, useContext } from 'react';
|
|
3
|
+
import { ElectronSignaturesContext } from '..';
|
|
4
|
+
/** 公司简称 fallback 到全称 */
|
|
5
|
+
function getOwnerShortName(item) {
|
|
6
|
+
return (item === null || item === void 0 ? void 0 : item.ownerShortName) || (item === null || item === void 0 ? void 0 : item.ownerName) || '';
|
|
7
|
+
}
|
|
8
|
+
/** 印章简称 fallback 到全称 */
|
|
9
|
+
function getSealShortName(item) {
|
|
10
|
+
return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
|
|
11
|
+
}
|
|
12
|
+
export var NoUseElectronSeal = function () {
|
|
13
|
+
return (React.createElement("div", { style: {
|
|
14
|
+
height: '100%',
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
} }, i18next.t('本次流程未使用电子印章')));
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 电子签章选择列表
|
|
22
|
+
*/
|
|
23
|
+
var ElectronSealDetail = function (_a) {
|
|
24
|
+
var sealList = _a.sealList, value = _a.value;
|
|
25
|
+
var isNewElectronSealStyle = useContext(ElectronSignaturesContext).isNewElectronSealStyle;
|
|
26
|
+
// 电子印章数据没有加载完成或者加载出错
|
|
27
|
+
if (!Array.isArray(sealList)) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
// 本流程、部门下没有配置电子印章数据
|
|
31
|
+
if (sealList.length === 0) {
|
|
32
|
+
return React.createElement(NoUseElectronSeal, null);
|
|
33
|
+
}
|
|
34
|
+
// 非编辑模式下,没有选中任何印章
|
|
35
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
36
|
+
return React.createElement(NoUseElectronSeal, null);
|
|
37
|
+
}
|
|
38
|
+
// 新版展示样式:按照"公司简称 印章简称"模式展示,带"已选印章"标题
|
|
39
|
+
if (isNewElectronSealStyle) {
|
|
40
|
+
return (React.createElement("div", { className: "electron-seal-detail-new--wrap" },
|
|
41
|
+
React.createElement("div", { className: "seal-selected-title" }, "\u5DF2\u9009\u5370\u7AE0"),
|
|
42
|
+
value.map(function (id) {
|
|
43
|
+
var _a;
|
|
44
|
+
var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
|
|
45
|
+
return (React.createElement("div", { key: id, className: "seal-selected-item", title: (((completeItem === null || completeItem === void 0 ? void 0 : completeItem.ownerName) || '') + " " + ((completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName) || '')).trim() },
|
|
46
|
+
getOwnerShortName(completeItem),
|
|
47
|
+
" ",
|
|
48
|
+
getSealShortName(completeItem)));
|
|
49
|
+
})));
|
|
50
|
+
}
|
|
51
|
+
// 旧版展示样式:只显示印章简称
|
|
52
|
+
return (React.createElement("div", { className: "electron-seal-detail--wrap" }, value === null || value === void 0 ? void 0 : value.map(function (id) {
|
|
53
|
+
var _a;
|
|
54
|
+
var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
|
|
55
|
+
var displayName = (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealShortName) || (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName);
|
|
56
|
+
return (React.createElement("div", { key: id, className: "electron-seal-detail--wrap__item", title: completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName }, displayName));
|
|
57
|
+
})));
|
|
58
|
+
};
|
|
59
|
+
export default memo(ElectronSealDetail);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IElectronSignaturesItemPublic, IElectronSignaturesItem, IFileItem, ITrackItem } from '../interface';
|
|
3
|
+
interface IProps {
|
|
4
|
+
/** 请求 */
|
|
5
|
+
request: IElectronSignaturesItemPublic['request'];
|
|
6
|
+
/** 电子签章件相关信息 */
|
|
7
|
+
docAttachMap: IElectronSignaturesItem['docAttachMap'];
|
|
8
|
+
/** 当前行数据 */
|
|
9
|
+
record?: IFileItem;
|
|
10
|
+
/** 字段对应关系 */
|
|
11
|
+
fileFieldsNameRef: ITrackItem['fileFieldsNameRef'];
|
|
12
|
+
flowStatus: IElectronSignaturesItem['flowStatus'];
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: React.NamedExoticComponent<IProps>;
|
|
16
|
+
export default _default;
|