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.
Files changed (150) hide show
  1. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  2. package/dist/components/TranslationButton/DownFile.js +97 -0
  3. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  4. package/dist/components/TranslationButton/PreviewFile.js +75 -0
  5. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  6. package/dist/components/TranslationButton/TranslationButton.js +247 -0
  7. package/dist/components/TranslationButton/demoComponents/index.d.ts +3 -0
  8. package/dist/components/TranslationButton/demoComponents/index.js +9 -0
  9. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  10. package/dist/components/TranslationButton/hooks.js +143 -0
  11. package/dist/components/TranslationButton/index.d.ts +4 -0
  12. package/dist/components/TranslationButton/index.js +4 -0
  13. package/dist/components/Upload/utils.d.ts +8 -1
  14. package/dist/components/Upload/utils.js +56 -4
  15. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  16. package/dist/components/UploadCustom/hooks/useDg.js +57 -0
  17. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  18. package/dist/components/business/Signatures/components/CodeModal.js +159 -0
  19. package/dist/components/electron-signatures/content.d.ts +9 -0
  20. package/dist/components/electron-signatures/content.js +1126 -0
  21. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  22. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  23. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  24. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  25. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  26. package/dist/components/electron-signatures/demoComponents/index.js +27 -0
  27. package/dist/components/electron-signatures/demoComponents/index_old.d.ts +3 -0
  28. package/dist/components/electron-signatures/demoComponents/index_old.js +502 -0
  29. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  30. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  31. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  32. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  33. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +663 -0
  34. package/dist/components/electron-signatures/demoComponents/makingData.js +1164 -0
  35. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  36. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  37. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  38. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  39. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  40. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  41. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  42. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  43. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  44. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  45. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  46. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  47. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  48. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  49. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  50. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  51. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  52. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  53. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  54. package/dist/components/electron-signatures/electron-signatures-fragment.js +344 -0
  55. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  56. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +513 -0
  57. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  58. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  59. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  60. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +89 -0
  61. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  62. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  63. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  64. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  65. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  66. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  67. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  68. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  69. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  70. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  71. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  72. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  73. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  74. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +45 -0
  75. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  76. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +380 -0
  77. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +20 -0
  78. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +169 -0
  79. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  80. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +38 -0
  81. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  82. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  83. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  84. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  85. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  86. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  87. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  88. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  89. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  90. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  91. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  92. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +45 -0
  93. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  94. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  95. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  96. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  97. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  98. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +134 -0
  99. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  100. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  101. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  102. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  103. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +102 -0
  104. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +365 -0
  105. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  106. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  107. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  108. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  109. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  110. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  111. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  112. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  113. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  114. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  115. package/dist/components/electron-signatures/index.d.ts +13 -0
  116. package/dist/components/electron-signatures/index.js +54 -0
  117. package/dist/components/electron-signatures/index_old.d.ts +9 -0
  118. package/dist/components/electron-signatures/index_old.js +966 -0
  119. package/dist/components/electron-signatures/interface.d.ts +849 -0
  120. package/dist/components/electron-signatures/interface.js +57 -0
  121. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  122. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  123. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  124. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  125. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  126. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  127. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  128. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +346 -0
  129. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  130. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +63 -0
  131. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  132. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  133. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  134. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  135. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  136. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  137. package/dist/components/electron-signatures/utils.d.ts +26 -0
  138. package/dist/components/electron-signatures/utils.js +67 -0
  139. package/dist/components/utils/ZtxkContext.d.ts +16 -0
  140. package/dist/components/utils/ZtxkContext.js +4 -0
  141. package/dist/components/utils/useMemoizedFn.d.ts +6 -0
  142. package/dist/components/utils/useMemoizedFn.js +22 -0
  143. package/dist/components/utils/usePrevious.d.ts +3 -0
  144. package/dist/components/utils/usePrevious.js +13 -0
  145. package/dist/index.css +686 -0
  146. package/dist/index.css.map +1 -1
  147. package/dist/index.d.ts +3 -0
  148. package/dist/index.js +105 -87
  149. package/dist/request.js +1 -1
  150. package/package.json +4 -3
@@ -0,0 +1,89 @@
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 { Button } from '../../../index';
15
+ import { Switch } from 'antd';
16
+ import { sealFileBatchDownload, preCanDownload, } from '../../Upload/utils';
17
+ import { isFlowCompleted } from '../utils';
18
+ import useBaseContext from '../../utils/useBaseContext';
19
+ /**
20
+ * 下载电子印章相关逻辑
21
+ */
22
+ var ElectronSealDownload = function (props) {
23
+ var request = props.request, docAttachMap = props.docAttachMap, record = props.record, fileFieldsNameRef = props.fileFieldsNameRef, flowStatus = props.flowStatus, checked = props.checked;
24
+ // 全局配置:SCM 印章/盖章服务名,用于产品化环境替换 /zmdms-scm-system 前缀
25
+ var serviceNames = useBaseContext().serviceNames;
26
+ var _a = (serviceNames || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
27
+ var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, attachName = _b.attachName, _isElectronicSeal = _b.isElectronicSeal, _doubleSignedSealInfoDTOList = _b.doubleSignedSealInfoDTOList, _c = _b.fmsIsPushBank, fmsIsPushBank = _c === void 0 ? 'fmsIsPushBank' : _c, _d = _b.fmsIsElectronicSeal, fmsIsElectronicSeal = _d === void 0 ? 'fmsIsElectronicSeal' : _d;
28
+ // 电子签章件key值
29
+ var isElectronicSealKey = _isElectronicSeal || 'isElectronicSeal';
30
+ var doubleSignedSealInfoDTOListKey = _doubleSignedSealInfoDTOList || 'doubleSignedSealInfoDTOList';
31
+ // 下载电子印章件
32
+ var sealNoCompressBatchDownloadRef = useRef(null);
33
+ var onDownLoadHand = function () {
34
+ var qysAttachVOList = [
35
+ {
36
+ fileName: record === null || record === void 0 ? void 0 : record[attachName],
37
+ attachId: record === null || record === void 0 ? void 0 : record[attachId],
38
+ },
39
+ ];
40
+ var params = {
41
+ docAttachMap: docAttachMap,
42
+ qysAttachVOList: qysAttachVOList,
43
+ };
44
+ if (!preCanDownload(sealNoCompressBatchDownloadRef.current, function () {
45
+ sealNoCompressBatchDownloadRef.current = null;
46
+ })) {
47
+ return;
48
+ }
49
+ sealNoCompressBatchDownloadRef.current = sealFileBatchDownload(request, params, { isCompress: false }, scmServiceName);
50
+ };
51
+ // 下载双签件
52
+ var sealDoubleElectronicSealDownloadRef = useRef({});
53
+ var onDoubleElectronicSealDownLoadHand = function () {
54
+ var doubleSignedSealInfoDTOList = record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey];
55
+ if (Array.isArray(doubleSignedSealInfoDTOList)) {
56
+ doubleSignedSealInfoDTOList.forEach(function (item, index) {
57
+ var _a;
58
+ var docAttachMap = item.docAttachMap, qysAttachVOList = item.qysAttachVOList;
59
+ var params = {
60
+ docAttachMap: docAttachMap,
61
+ qysAttachVOList: (_a = qysAttachVOList === null || qysAttachVOList === void 0 ? void 0 : qysAttachVOList.map) === null || _a === void 0 ? void 0 : _a.call(qysAttachVOList, function (item) { return (__assign(__assign({}, item), { fileName: item.fileName || item.attachName })); }),
62
+ };
63
+ if (!preCanDownload(sealDoubleElectronicSealDownloadRef.current[index], function () {
64
+ sealDoubleElectronicSealDownloadRef.current[index] = null;
65
+ })) {
66
+ return;
67
+ }
68
+ sealDoubleElectronicSealDownloadRef.current[index] =
69
+ sealFileBatchDownload(request, params, { isCompress: false }, scmServiceName);
70
+ });
71
+ }
72
+ };
73
+ // 是否显示下载电子印章件
74
+ var isElectronicSeal = (record === null || record === void 0 ? void 0 : record[isElectronicSealKey]) + '' === '1';
75
+ // 是否显示下载双签件
76
+ var isDoubleElectronicSeal = (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
77
+ Array.isArray(record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
78
+ (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey].length) > 0;
79
+ return (React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
80
+ isElectronicSeal && isFlowCompleted(flowStatus) ? (React.createElement(Button, { type: "link", onClick: onDownLoadHand }, i18next.t('下载电子签章件'))) : null,
81
+ isDoubleElectronicSeal && isFlowCompleted(flowStatus) ? (React.createElement(Button, { type: "link", onClick: onDoubleElectronicSealDownLoadHand }, (record === null || record === void 0 ? void 0 : record[fmsIsPushBank]) + '' === '1' &&
82
+ (record === null || record === void 0 ? void 0 : record[fmsIsElectronicSeal]) + '' === '1'
83
+ ? i18next.t('下载三签件')
84
+ : i18next.t('下载双签件'))) : null,
85
+ (isElectronicSeal || isDoubleElectronicSeal) &&
86
+ !isFlowCompleted(flowStatus) ? (React.createElement("div", null,
87
+ React.createElement(Switch, { disabled: true, checked: checked }))) : null));
88
+ };
89
+ export default memo(ElectronSealDownload);
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ firstLevelPersonName?: string;
4
+ checked?: any;
5
+ onChange?: any;
6
+ isEdit: boolean;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<IProps>;
9
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import React, { memo } from 'react';
3
+ import { Checkbox } from '../../../index';
4
+ var ElectronSealFirstLevelPerson = function (_a) {
5
+ var firstLevelPersonName = _a.firstLevelPersonName, checked = _a.checked, onChange = _a.onChange, isEdit = _a.isEdit;
6
+ // const title = `是否加盖经济责任人手签章${
7
+ // firstLevelPersonName ? `(经济责任人: ${firstLevelPersonName})` : ''
8
+ // }`;
9
+ // 20240923 文字修改
10
+ var title = i18next.t('加盖经济责任人个人签名{{slot0}}', {
11
+ slot0: firstLevelPersonName ? "\uFF08" + firstLevelPersonName + "\uFF09" : '',
12
+ });
13
+ return firstLevelPersonName ? (React.createElement("div", { className: "electron-seal--first-level-person", title: title },
14
+ React.createElement(Checkbox, { checked: checked, onChange: onChange, disabled: !isEdit }, title))) : null;
15
+ };
16
+ export default memo(ElectronSealFirstLevelPerson);
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ isShowFms?: boolean;
4
+ fmsIsElectronicSeal?: boolean;
5
+ fmsIsElectronicSealLabel?: string;
6
+ isShowBank?: boolean;
7
+ fmsIsPushBank?: boolean;
8
+ fmsIsElectronicSealPushLabel?: string;
9
+ isShowOpeningContractSeal?: boolean;
10
+ openingContractSeal?: boolean;
11
+ openingContractSealLabel?: string;
12
+ isElectronicSeal?: boolean;
13
+ }
14
+ declare const _default: React.NamedExoticComponent<IProps>;
15
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import React, { memo } from 'react';
2
+ import { Switch } from 'antd';
3
+ import { Checkbox } from '../../../index';
4
+ /**
5
+ * 是否盖电子印章相关逻辑
6
+ */
7
+ var ElectronSealItem = function (props) {
8
+ var isShowFms = props.isShowFms, fmsIsElectronicSeal = props.fmsIsElectronicSeal, fmsIsElectronicSealLabel = props.fmsIsElectronicSealLabel, isShowBank = props.isShowBank, fmsIsPushBank = props.fmsIsPushBank, fmsIsElectronicSealPushLabel = props.fmsIsElectronicSealPushLabel, isShowOpeningContractSeal = props.isShowOpeningContractSeal, openingContractSeal = props.openingContractSeal, openingContractSealLabel = props.openingContractSealLabel, isElectronicSeal = props.isElectronicSeal;
9
+ return (React.createElement(React.Fragment, null,
10
+ React.createElement("div", null, React.createElement(Switch, { disabled: true, checked: !!isElectronicSeal })),
11
+ React.createElement("div", { className: "electron-seal--any" },
12
+ React.createElement("div", null, isShowFms || fmsIsElectronicSeal ? (React.createElement(Checkbox, { disabled: true, checked: !!fmsIsElectronicSeal }, fmsIsElectronicSealLabel)) : null),
13
+ React.createElement("div", null, isShowBank || fmsIsPushBank ? (React.createElement(Checkbox, { disabled: true, checked: !!fmsIsPushBank }, fmsIsElectronicSealPushLabel)) : null),
14
+ React.createElement("div", null, isShowOpeningContractSeal || openingContractSeal ? (React.createElement(Checkbox, { disabled: true, checked: !!openingContractSeal }, openingContractSealLabel)) : null))));
15
+ };
16
+ export default memo(ElectronSealItem);
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ needQys?: boolean;
4
+ checked?: boolean;
5
+ disabled?: boolean;
6
+ onChange?: (checked: boolean, event: any) => void;
7
+ /** 是否显示产融平台 */
8
+ isShowFms?: boolean;
9
+ isShowBank?: boolean;
10
+ fmsIsElectronicSeal?: boolean;
11
+ fmsIsElectronicSealLabel?: string;
12
+ fmsIsPushBank?: boolean;
13
+ fmsIsElectronicSealPushLabel?: string;
14
+ onFmsIsElectronicSealChange?: any;
15
+ isShowOpeningContractSeal?: boolean;
16
+ openingContractSeal?: any;
17
+ openingContractSealLabel?: any;
18
+ }
19
+ declare const _default: React.NamedExoticComponent<IProps>;
20
+ export default _default;
@@ -0,0 +1,47 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React, { memo } from 'react';
24
+ import { Switch } from 'antd';
25
+ import { Checkbox } from '../../../index';
26
+ /**
27
+ * 是否盖电子印章相关逻辑
28
+ */
29
+ var ElectronSealItem = function (props) {
30
+ var needQys = props.needQys, fmsIsElectronicSeal = props.fmsIsElectronicSeal, fmsIsElectronicSealLabel = props.fmsIsElectronicSealLabel, fmsIsPushBank = props.fmsIsPushBank, fmsIsElectronicSealPushLabel = props.fmsIsElectronicSealPushLabel, onFmsIsElectronicSealChange = props.onFmsIsElectronicSealChange, isShowFms = props.isShowFms, isShowBank = props.isShowBank, isShowOpeningContractSeal = props.isShowOpeningContractSeal, openingContractSeal = props.openingContractSeal, openingContractSealLabel = props.openingContractSealLabel, resetProps = __rest(props, ["needQys", "fmsIsElectronicSeal", "fmsIsElectronicSealLabel", "fmsIsPushBank", "fmsIsElectronicSealPushLabel", "onFmsIsElectronicSealChange", "isShowFms", "isShowBank", "isShowOpeningContractSeal", "openingContractSeal", "openingContractSealLabel"]);
31
+ return (React.createElement(React.Fragment, null,
32
+ needQys && React.createElement(Switch, __assign({}, resetProps)),
33
+ React.createElement("div", { className: "electron-seal--any" },
34
+ isShowFms ? (React.createElement(Checkbox, { checked: fmsIsElectronicSeal, disabled: resetProps.disabled, onChange: function (e) {
35
+ onFmsIsElectronicSealChange &&
36
+ onFmsIsElectronicSealChange(e.target.checked, 'fmsElectron');
37
+ } }, fmsIsElectronicSealLabel)) : null,
38
+ isShowBank ? (React.createElement(Checkbox, { checked: fmsIsPushBank, disabled: resetProps.disabled, onChange: function (e) {
39
+ onFmsIsElectronicSealChange &&
40
+ onFmsIsElectronicSealChange(e.target.checked, 'fmsPush');
41
+ } }, fmsIsElectronicSealPushLabel)) : null,
42
+ isShowOpeningContractSeal ? (React.createElement(Checkbox, { checked: openingContractSeal, disabled: resetProps.disabled, onChange: function (e) {
43
+ onFmsIsElectronicSealChange &&
44
+ onFmsIsElectronicSealChange(e.target.checked, 'openingContractSeal');
45
+ } }, openingContractSealLabel)) : null)));
46
+ };
47
+ export default memo(ElectronSealItem);
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ sealList?: any;
4
+ value?: any;
5
+ defaultValue?: any;
6
+ onChange?: any;
7
+ isEdit: boolean;
8
+ style?: any;
9
+ }
10
+ declare const _default: React.NamedExoticComponent<IProps>;
11
+ export default _default;
@@ -0,0 +1,191 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
24
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
25
+ to[j] = from[i];
26
+ return to;
27
+ };
28
+ import React, { memo, useMemo, useState, useContext, useEffect, useRef, } from 'react';
29
+ import { Checkbox, Collapse } from '../../../index';
30
+ import { ElectronSignaturesContext } from '..';
31
+ import useBaseContext from '../../utils/useBaseContext';
32
+ /** 公司简称优先排序关键词(按指定顺序排前) */
33
+ var PRIORITY_OWNERS = ['浙商中拓', '浙江中拓', '湖南中拓', '海南中拓'];
34
+ /** 按优先级排序公司简称列表 */
35
+ function sortOwners(owners) {
36
+ var prioritized = PRIORITY_OWNERS.filter(function (o) { return owners.includes(o); });
37
+ var rest = owners.filter(function (o) { return !PRIORITY_OWNERS.includes(o); });
38
+ return __spreadArray(__spreadArray([], prioritized), rest);
39
+ }
40
+ /** 公司简称 fallback 到全称 */
41
+ function getOwnerShortName(item) {
42
+ return (item === null || item === void 0 ? void 0 : item.ownerShortName) || (item === null || item === void 0 ? void 0 : item.ownerName) || '';
43
+ }
44
+ /** 印章简称 fallback 到全称 */
45
+ function getSealShortName(item) {
46
+ return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
47
+ }
48
+ /**
49
+ * 电子签章选择列表
50
+ */
51
+ var ElectronSealList = function (_a) {
52
+ var sealList = _a.sealList, onChange = _a.onChange, isEdit = _a.isEdit, value = _a.value, resetProp = __rest(_a, ["sealList", "onChange", "isEdit", "value"]);
53
+ var isNewElectronSealStyle = useContext(ElectronSignaturesContext).isNewElectronSealStyle;
54
+ var _b = useBaseContext().electronSealTabTrigger, electronSealTabTrigger = _b === void 0 ? 'hover' : _b;
55
+ // 新版:以公司简称维度拆分数据
56
+ var _c = useMemo(function () {
57
+ if (!Array.isArray(sealList)) {
58
+ return {
59
+ ownerList: [],
60
+ ownerMap: {},
61
+ };
62
+ }
63
+ var map = {};
64
+ sealList.forEach(function (item) {
65
+ var name = getOwnerShortName(item);
66
+ if (!map[name])
67
+ map[name] = [];
68
+ map[name].push(item);
69
+ });
70
+ return {
71
+ ownerList: sortOwners(Object.keys(map)),
72
+ ownerMap: map,
73
+ };
74
+ }, [sealList]), ownerList = _c.ownerList, ownerMap = _c.ownerMap;
75
+ // 旧版:以 ownerName 维度拆分数据
76
+ var _d = useMemo(function () {
77
+ if (!Array.isArray(sealList)) {
78
+ return { ownerNameList: [], ownerNameResult: {} };
79
+ }
80
+ var list = Array.from(new Set(sealList.map(function (item) { return item.ownerName; })));
81
+ var result = {};
82
+ list.forEach(function (ownerName) {
83
+ result[ownerName] = sealList.filter(function (item) { return item.ownerName === ownerName; });
84
+ });
85
+ return { ownerNameList: list, ownerNameResult: result };
86
+ }, [sealList]), ownerNameList = _d.ownerNameList, ownerNameResult = _d.ownerNameResult;
87
+ // 新版:当前选中的公司(默认第一个)
88
+ var _e = useState(ownerList[0]), selectedOwner = _e[0], setSelectedOwner = _e[1];
89
+ useEffect(function () {
90
+ // 公司列表变化时,重置选中公司为第一个
91
+ if (ownerList.length > 0 && !ownerList.includes(selectedOwner)) {
92
+ setSelectedOwner(ownerList[0]);
93
+ }
94
+ }, [ownerList, selectedOwner]);
95
+ // 悬浮延迟切换:停留 400ms 才切换,快速划过(如跨行移动)不触发
96
+ var hoverTimerRef = useRef(null);
97
+ useEffect(function () {
98
+ return function () { return clearTimeout(hoverTimerRef.current); };
99
+ }, []);
100
+ var handleOwnerHover = function (owner) {
101
+ if (selectedOwner === owner)
102
+ return;
103
+ clearTimeout(hoverTimerRef.current);
104
+ hoverTimerRef.current = setTimeout(function () {
105
+ setSelectedOwner(owner);
106
+ }, 400);
107
+ };
108
+ var clearHoverTimer = function () {
109
+ clearTimeout(hoverTimerRef.current);
110
+ };
111
+ // 新版:当前选中公司下的印章列表
112
+ var currentSeals = ownerMap[selectedOwner] || [];
113
+ // 新版:sealId → 公司简称 映射,用于统计每个公司选中了几个印章
114
+ var sealIdToOwner = useMemo(function () {
115
+ var map = {};
116
+ Object.keys(ownerMap).forEach(function (owner) {
117
+ ownerMap[owner].forEach(function (item) {
118
+ map[item.sealId] = owner;
119
+ });
120
+ });
121
+ return map;
122
+ }, [ownerMap]);
123
+ // 新版:每个公司下选中的印章数量
124
+ var ownerSelectedCount = useMemo(function () {
125
+ var countMap = {};
126
+ if (Array.isArray(value)) {
127
+ value.forEach(function (sealId) {
128
+ var owner = sealIdToOwner[sealId];
129
+ if (owner) {
130
+ countMap[owner] = (countMap[owner] || 0) + 1;
131
+ }
132
+ });
133
+ }
134
+ return countMap;
135
+ }, [value, sealIdToOwner]);
136
+ // 新版:已选印章完整信息列表
137
+ var selectedSealList = useMemo(function () {
138
+ if (!Array.isArray(value) || !Array.isArray(sealList)) {
139
+ return [];
140
+ }
141
+ return value
142
+ .map(function (id) { return sealList.find(function (item) { return item.sealId === id; }); })
143
+ .filter(Boolean);
144
+ }, [value, sealList]);
145
+ // ========= 旧版渲染(手风琴模式) =========
146
+ if (!isNewElectronSealStyle) {
147
+ return ownerNameList.length === 0 ? null : (React.createElement(Checkbox.Group, __assign({ value: value, onChange: function (e) {
148
+ onChange && onChange(e);
149
+ }, disabled: !isEdit, className: "electron-seal-list--wrap" }, resetProp),
150
+ React.createElement(Collapse, { defaultActiveKey: ownerNameList.map(function (item, index) { return index; }), style: { width: '100%' } }, ownerNameList.map(function (ownerName, index) {
151
+ var _a;
152
+ return (React.createElement(Collapse.Panel, { key: index, header: React.createElement("div", { className: "electron-seal-list--owner-name" }, ownerName) }, (_a = ownerNameResult[ownerName]) === null || _a === void 0 ? void 0 : _a.map(function (item) {
153
+ return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
154
+ })));
155
+ }))));
156
+ }
157
+ // ========= 新版渲染(三段式布局) =========
158
+ if (ownerList.length === 0) {
159
+ return null;
160
+ }
161
+ return (React.createElement("div", __assign({ className: "electron-seal-list-new--wrap" }, resetProp),
162
+ React.createElement("div", { className: "seal-owner-tabs" }, ownerList.map(function (owner) {
163
+ var _a, _b;
164
+ var count = ownerSelectedCount[owner] || 0;
165
+ return (React.createElement("div", __assign({ key: owner, className: "seal-owner-tab " + (selectedOwner === owner ? 'seal-owner-tab--active' : ''), title: ((_b = (_a = ownerMap[owner]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.ownerName) || owner }, (electronSealTabTrigger === 'hover'
166
+ ? {
167
+ onMouseEnter: function () { return handleOwnerHover(owner); },
168
+ onMouseLeave: clearHoverTimer,
169
+ }
170
+ : { onClick: function () { return setSelectedOwner(owner); } })),
171
+ React.createElement("span", { className: "seal-owner-tab--name" }, owner),
172
+ count > 0 && (React.createElement("span", { className: "seal-owner-tab--count" }, count))));
173
+ })),
174
+ React.createElement("div", { className: "seal-list-current" }, currentSeals.map(function (item) {
175
+ var checked = Array.isArray(value) && value.includes(item.sealId);
176
+ return (React.createElement(Checkbox, { key: item.sealId, checked: checked, disabled: !isEdit, onChange: function () {
177
+ var newValue = checked
178
+ ? (value || []).filter(function (id) { return id !== item.sealId; })
179
+ : __spreadArray(__spreadArray([], (value || [])), [item.sealId]);
180
+ onChange && onChange(newValue);
181
+ } },
182
+ React.createElement("span", { title: item.sealName }, getSealShortName(item))));
183
+ })),
184
+ React.createElement("div", { className: "seal-selected-summary" },
185
+ React.createElement("div", { className: "seal-selected-title" }, "\u5DF2\u9009\u5370\u7AE0"),
186
+ selectedSealList.length > 0 ? (selectedSealList.map(function (item) { return (React.createElement("div", { key: item.sealId, className: "seal-selected-item", title: ((item.ownerName || '') + " " + (item.sealName || '')).trim() },
187
+ getOwnerShortName(item),
188
+ " ",
189
+ getSealShortName(item))); })) : (React.createElement("div", { className: "seal-selected-empty" }, "\u6682\u672A\u9009\u62E9\u5370\u7AE0")))));
190
+ };
191
+ export default memo(ElectronSealList);
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { SpinProps } from 'antd/es/spin';
3
+ import { IElectronSignaturesItem, ITrackItem } from '../interface';
4
+ interface IProps {
5
+ /** 附件相关数据 */
6
+ records?: IElectronSignaturesItem['fileList'];
7
+ setLoading?: React.Dispatch<React.SetStateAction<SpinProps | undefined>>;
8
+ /** 当前同类型数据的合同id */
9
+ contractId?: IElectronSignaturesItem['contractId'];
10
+ appointSignLocation?: ITrackItem['appointSignLocation'];
11
+ viewSignPage?: ITrackItem['viewSignPage'];
12
+ isEdit?: boolean;
13
+ }
14
+ declare const _default: React.NamedExoticComponent<IProps>;
15
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import React, { memo } from 'react';
3
+ import { Button } from '../../../index';
4
+ var ElectronSealSetting = function (_a) {
5
+ var records = _a.records, setLoading = _a.setLoading, contractId = _a.contractId, appointSignLocation = _a.appointSignLocation, viewSignPage = _a.viewSignPage, isEdit = _a.isEdit;
6
+ return (React.createElement("div", { className: "electron-seal-setting--wrap" },
7
+ isEdit ? (React.createElement(Button, { type: "link", onClick: function () { return appointSignLocation === null || appointSignLocation === void 0 ? void 0 : appointSignLocation(); } }, i18next.t('指定签署位置'))) : null,
8
+ contractId ? (React.createElement(Button, { type: "link", onClick: viewSignPage }, i18next.t('预览盖章效果'))) : !isEdit ? (React.createElement("div", null, i18next.t('合同id未生成'))) : null));
9
+ };
10
+ export default memo(ElectronSealSetting);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ modalHandleRef?: any;
4
+ appointSignLocation?: any;
5
+ }
6
+ declare const _default: React.NamedExoticComponent<IProps>;
7
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import React, { memo, useImperativeHandle, useState } from 'react';
3
+ import { Modal, Button, Checkbox } from '../../../index';
4
+ /**
5
+ * 最终电子印章验证框
6
+ */
7
+ var LastQysModal = function (props) {
8
+ var modalHandleRef = props.modalHandleRef, appointSignLocation = props.appointSignLocation;
9
+ var _a = useState(), visible = _a[0], setVisible = _a[1];
10
+ var _b = useState([]), unSealList = _b[0], setUnSealList = _b[1];
11
+ var _c = useState([]), needReSealList = _c[0], setNeedReSealList = _c[1];
12
+ useImperativeHandle(modalHandleRef, function () {
13
+ return {
14
+ setInfo: function (visible, info) {
15
+ setVisible(visible);
16
+ setUnSealList(info.unSealList);
17
+ setNeedReSealList(info.unSealList.map(function (item) { return item.sealId; }));
18
+ },
19
+ clear: function () {
20
+ setVisible(false);
21
+ setUnSealList([]);
22
+ setNeedReSealList([]);
23
+ },
24
+ };
25
+ });
26
+ return (React.createElement(Modal, { title: i18next.t('下列印章未确认盖章位置,如不需要请取消勾选。'), width: 800, closable: false, visible: visible, loading: false, onCancel: function () {
27
+ setVisible(false);
28
+ }, footer: React.createElement(React.Fragment, null,
29
+ React.createElement(Button, { type: "primary", onClick: function () {
30
+ appointSignLocation({
31
+ needReSealList: needReSealList,
32
+ });
33
+ } }, needReSealList.length > 0
34
+ ? i18next.t('指定签署位置')
35
+ : i18next.t('确定'))) },
36
+ React.createElement(Checkbox.Group, { defaultValue: unSealList.map(function (item) { return item.sealId; }), value: needReSealList, onChange: function (e) {
37
+ setNeedReSealList(e);
38
+ }, className: "flex-checkbox-group" }, unSealList.map(function (item) {
39
+ return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId, style: { width: '100%', margin: '0 8px' } }, item.sealName));
40
+ }))));
41
+ };
42
+ export default memo(LastQysModal);
@@ -0,0 +1,3 @@
1
+ export default function useCheckedSealInfoList(request: any): {
2
+ getNoSealInfoList: (this: any, data: any) => Promise<unknown>;
3
+ };
@@ -0,0 +1,45 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ /**
3
+ * 验证契约锁是否全部盖章
4
+ */
5
+ import useMemoizedFn from '../../utils/useMemoizedFn';
6
+ import { message } from '../../../index';
7
+ import useServiceName from '../../../hooks/useServiceName';
8
+ export default function useCheckedSealInfoList(request) {
9
+ var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
10
+ var getNoSealInfoList = useMemoizedFn(function (data) {
11
+ return new Promise(function (resolve, reject) {
12
+ request({
13
+ url: "/api" + scmServiceName + "/seal/query-unconfirmed-position-seal-list",
14
+ data: data,
15
+ method: 'POST',
16
+ })
17
+ .then(function (res) {
18
+ var _a;
19
+ if ((res === null || res === void 0 ? void 0 : res.status) === 200 && ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.code) === 200) {
20
+ var noSealList = res.data.data;
21
+ if (Array.isArray(noSealList) && noSealList.length > 0) {
22
+ resolve(noSealList);
23
+ }
24
+ else {
25
+ resolve([]);
26
+ }
27
+ }
28
+ else {
29
+ message.error(res.data.msg || i18next.t('校验未盖章电子印章接口调用失败!'));
30
+ reject(res.data.msg || i18next.t('校验未盖章电子印章接口调用失败!'));
31
+ }
32
+ })
33
+ .catch(function (error) {
34
+ var _a, _b, _c, _d;
35
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) ||
36
+ i18next.t('校验未盖章电子印章接口调用失败!'));
37
+ reject(((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.msg) ||
38
+ i18next.t('校验未盖章电子印章接口调用失败!'));
39
+ });
40
+ });
41
+ });
42
+ return {
43
+ getNoSealInfoList: getNoSealInfoList,
44
+ };
45
+ }
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import type { ColumnsType } from 'antd/es/table';
3
+ import type { SpinProps } from 'antd/es/spin';
4
+ import { IElectronSignaturesItemPublic, IFileItem, ITrackAllData } from '../interface';
5
+ interface IOptions {
6
+ /** 请求 */
7
+ request: IElectronSignaturesItemPublic['request'];
8
+ /** 所有数据类型合并之后的数据 */
9
+ records: IFileItem[];
10
+ /** 所有数据类型的排序规则 */
11
+ dataTypeSort: string[];
12
+ /** 所有数据类型的相关操作 */
13
+ allData: ITrackAllData;
14
+ /** 表格的加载状态 */
15
+ setLoading?: React.Dispatch<React.SetStateAction<SpinProps | undefined>>;
16
+ /** 需要盖外部客户电子章吗?如果需要的话 可以更改这个文本内容 */
17
+ fmsIsElectronicSealLabel?: IElectronSignaturesItemPublic['fmsIsElectronicSealLabel'];
18
+ fmsIsElectronicSealPushLabel?: IElectronSignaturesItemPublic['fmsIsElectronicSealPushLabel'];
19
+ openingContractSealLabel?: IElectronSignaturesItemPublic['openingContractSealLabel'];
20
+ isDeleteAllFileWhenJustUseQj?: IElectronSignaturesItemPublic['isDeleteAllFileWhenJustUseQj'];
21
+ isShowOpeningContractSeal?: IElectronSignaturesItemPublic['isShowOpeningContractSeal'];
22
+ isShowOpeningContractSealNotRelyQys?: IElectronSignaturesItemPublic['isShowOpeningContractSealNotRelyQys'];
23
+ }
24
+ /**
25
+ * 生成电子印章列
26
+ */
27
+ export default function useElectronColumns(options: IOptions): {
28
+ electronColumns: ColumnsType<any>;
29
+ };
30
+ export {};