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
|
@@ -0,0 +1,346 @@
|
|
|
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, useMemo, useState, useContext, useEffect, } from 'react';
|
|
14
|
+
import { Checkbox, Collapse, InputNumber, Radio, EnhanceSelect, } from '../../../index';
|
|
15
|
+
import { ElectronSignaturesContext } from '..';
|
|
16
|
+
import useBaseContext from '../../utils/useBaseContext';
|
|
17
|
+
var defaultQunjAddressList = [
|
|
18
|
+
{ id: '1', name: i18next.t('杭州') },
|
|
19
|
+
{ id: '2', name: i18next.t('长沙') },
|
|
20
|
+
];
|
|
21
|
+
/** 获取公司名称(fallback companyType) */
|
|
22
|
+
function getCompanyName(item) {
|
|
23
|
+
return (item === null || item === void 0 ? void 0 : item.companyTypeName) || (item === null || item === void 0 ? void 0 : item.companyType) || '';
|
|
24
|
+
}
|
|
25
|
+
/** 获取印章简称(fallback sealName) */
|
|
26
|
+
function getSealShortName(item) {
|
|
27
|
+
return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
|
|
28
|
+
}
|
|
29
|
+
var QunjList = function (props) {
|
|
30
|
+
var qunjList = props.qunjList, qunjSeal = props.qunjSeal, onChange = props.onChange, isContranctNum = props.isContranctNum, qunjChecked = props.qunjChecked, setQunjChecked = props.setQunjChecked, _a = props.qunjAddressList, qunjAddressList = _a === void 0 ? defaultQunjAddressList : _a, currentQunjAddress = props.currentQunjAddress, onQunjAddressChange = props.onQunjAddressChange, isQunjAddress = props.isQunjAddress, _b = props.isShowChecked, isShowChecked = _b === void 0 ? true : _b, qunjListRenderFilter = props.qunjListRenderFilter;
|
|
31
|
+
var isNewQunjSealStyle = useContext(ElectronSignaturesContext).isNewQunjSealStyle;
|
|
32
|
+
var _c = useBaseContext().qunjSealTabTrigger, qunjSealTabTrigger = _c === void 0 ? 'hover' : _c;
|
|
33
|
+
var contranctNumRef = useRef(null);
|
|
34
|
+
var _d = qunjSeal || {}, contranctNum = _d.contranctNum, isTakeOut = _d.isTakeOut, details = _d.details;
|
|
35
|
+
// ========= 新版:按公司名称分组 =========
|
|
36
|
+
var _e = useMemo(function () {
|
|
37
|
+
if (!Array.isArray(qunjList)) {
|
|
38
|
+
return {
|
|
39
|
+
companyList: [],
|
|
40
|
+
companyMap: {},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var map = {};
|
|
44
|
+
qunjList.forEach(function (item) {
|
|
45
|
+
var name = getCompanyName(item);
|
|
46
|
+
if (!map[name])
|
|
47
|
+
map[name] = [];
|
|
48
|
+
map[name].push(item);
|
|
49
|
+
});
|
|
50
|
+
return { companyList: Object.keys(map), companyMap: map };
|
|
51
|
+
}, [qunjList]), companyList = _e.companyList, companyMap = _e.companyMap;
|
|
52
|
+
// 新版:当前选中公司
|
|
53
|
+
var _f = useState(companyList[0]), selectedCompany = _f[0], setSelectedCompany = _f[1];
|
|
54
|
+
useEffect(function () {
|
|
55
|
+
if (companyList.length > 0 && !companyList.includes(selectedCompany)) {
|
|
56
|
+
setSelectedCompany(companyList[0]);
|
|
57
|
+
}
|
|
58
|
+
}, [companyList, selectedCompany]);
|
|
59
|
+
// 悬浮延迟切换:停留 400ms 才切换,快速划过(如跨行移动)不触发
|
|
60
|
+
var hoverTimerRef = useRef(null);
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
return function () { return clearTimeout(hoverTimerRef.current); };
|
|
63
|
+
}, []);
|
|
64
|
+
var handleCompanyHover = function (company) {
|
|
65
|
+
if (selectedCompany === company)
|
|
66
|
+
return;
|
|
67
|
+
clearTimeout(hoverTimerRef.current);
|
|
68
|
+
hoverTimerRef.current = setTimeout(function () {
|
|
69
|
+
setSelectedCompany(company);
|
|
70
|
+
}, 400);
|
|
71
|
+
};
|
|
72
|
+
var clearHoverTimer = function () {
|
|
73
|
+
clearTimeout(hoverTimerRef.current);
|
|
74
|
+
};
|
|
75
|
+
// 新版:当前公司印章列表(含盖章地点过滤)
|
|
76
|
+
var currentCompanySeals = useMemo(function () {
|
|
77
|
+
var list = companyMap[selectedCompany] || [];
|
|
78
|
+
list = list.filter(function (item) {
|
|
79
|
+
return isFilterAreaType(currentQunjAddress === null || currentQunjAddress === void 0 ? void 0 : currentQunjAddress.id, item.areaType);
|
|
80
|
+
});
|
|
81
|
+
if (qunjListRenderFilter) {
|
|
82
|
+
list = qunjListRenderFilter(list);
|
|
83
|
+
}
|
|
84
|
+
return list;
|
|
85
|
+
}, [companyMap, selectedCompany, currentQunjAddress, qunjListRenderFilter]);
|
|
86
|
+
// 新版:每个公司选中的印章数量
|
|
87
|
+
var companySelectedCount = useMemo(function () {
|
|
88
|
+
var countMap = {};
|
|
89
|
+
var sealNoToCompany = {};
|
|
90
|
+
Object.keys(companyMap).forEach(function (company) {
|
|
91
|
+
companyMap[company].forEach(function (item) {
|
|
92
|
+
sealNoToCompany[item.sealNo] = company;
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
(details || []).forEach(function (detail) {
|
|
96
|
+
var company = sealNoToCompany[detail.sealNo];
|
|
97
|
+
if (company) {
|
|
98
|
+
countMap[company] = (countMap[company] || 0) + 1;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return countMap;
|
|
102
|
+
}, [companyMap, details]);
|
|
103
|
+
// 新版:已选印章完整列表
|
|
104
|
+
var selectedDetails = details || [];
|
|
105
|
+
// 旧版:按 useType 分组
|
|
106
|
+
var qunjListTypeMemo = useMemo(function () {
|
|
107
|
+
var _a;
|
|
108
|
+
var newData = [];
|
|
109
|
+
var set = new Set();
|
|
110
|
+
(_a = qunjList === null || qunjList === void 0 ? void 0 : qunjList.forEach) === null || _a === void 0 ? void 0 : _a.call(qunjList, function (item, index) {
|
|
111
|
+
var useType = item.useType, useTypeName = item.useTypeName;
|
|
112
|
+
if (set.has(useType)) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
set.add(useType);
|
|
117
|
+
newData.push({
|
|
118
|
+
useType: useType,
|
|
119
|
+
useTypeName: useTypeName,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return newData;
|
|
124
|
+
}, [qunjList]);
|
|
125
|
+
// ========= 新版渲染 =========
|
|
126
|
+
if (isNewQunjSealStyle) {
|
|
127
|
+
// 没有印章数据时不显示内容
|
|
128
|
+
if (companyList.length === 0) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return (React.createElement("div", { className: "qunj-list-new--wrap" },
|
|
132
|
+
React.createElement("div", { className: "qunj-list-new--title" },
|
|
133
|
+
React.createElement("div", { className: "qunj-list-new--left" },
|
|
134
|
+
React.createElement(Radio.Group, { value: isTakeOut, onChange: function (e) {
|
|
135
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({ isTakeOut: e.target.value });
|
|
136
|
+
} },
|
|
137
|
+
React.createElement(Radio, { value: 0 }, i18next.t('内部用印')),
|
|
138
|
+
React.createElement(Radio, { value: 1 }, i18next.t('外部用印'))),
|
|
139
|
+
isQunjAddress && isTakeOut + '' === '1' ? (React.createElement(EnhanceSelect, { style: { width: 70 }, list: qunjAddressList, size: "small", value: currentQunjAddress === null || currentQunjAddress === void 0 ? void 0 : currentQunjAddress.id, onChange: function (value, option, completeData) {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
// 切换盖章地点时,清理非当前地点的已选印章
|
|
142
|
+
var copyDetails = ((_b = (_a = details === null || details === void 0 ? void 0 : details.slice()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, function (d) { return (__assign({}, d)); })) || [];
|
|
143
|
+
var newDetails = copyDetails.filter(function (qunjItem) {
|
|
144
|
+
return isFilterAreaType(completeData === null || completeData === void 0 ? void 0 : completeData.id, qunjItem.areaType);
|
|
145
|
+
});
|
|
146
|
+
var qunjSealUpdate = {};
|
|
147
|
+
if (copyDetails.length !== newDetails.length) {
|
|
148
|
+
qunjSealUpdate.details = newDetails;
|
|
149
|
+
}
|
|
150
|
+
onQunjAddressChange(completeData, {
|
|
151
|
+
qunjSeal: qunjSealUpdate,
|
|
152
|
+
});
|
|
153
|
+
} })) : null),
|
|
154
|
+
React.createElement("div", { className: "qunj-list-new--right" }, isContranctNum ? (React.createElement("div", { className: "qunj-list-new--contract" },
|
|
155
|
+
React.createElement("span", null, i18next.t('文件份数')),
|
|
156
|
+
React.createElement(InputNumber, { size: "small", value: contranctNum === null ? undefined : contranctNum, onChange: function (e) {
|
|
157
|
+
contranctNumRef.current = e;
|
|
158
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({ contranctNum: contranctNumRef.current });
|
|
159
|
+
}, min: 1 }))) : null)),
|
|
160
|
+
React.createElement("div", { className: "seal-owner-tabs" }, companyList.map(function (company) {
|
|
161
|
+
var count = companySelectedCount[company] || 0;
|
|
162
|
+
return (React.createElement("div", __assign({ key: company, className: "seal-owner-tab " + (selectedCompany === company ? 'seal-owner-tab--active' : ''), title: company }, (qunjSealTabTrigger === 'hover'
|
|
163
|
+
? {
|
|
164
|
+
onMouseEnter: function () { return handleCompanyHover(company); },
|
|
165
|
+
onMouseLeave: clearHoverTimer,
|
|
166
|
+
}
|
|
167
|
+
: { onClick: function () { return setSelectedCompany(company); } })),
|
|
168
|
+
React.createElement("span", { className: "seal-owner-tab--name" }, company),
|
|
169
|
+
count > 0 && (React.createElement("span", { className: "seal-owner-tab--count" }, count))));
|
|
170
|
+
})),
|
|
171
|
+
React.createElement("div", { className: "qunj-seal-list-current" }, currentCompanySeals.map(function (qunjItem) {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
var sealNo = qunjItem.sealNo;
|
|
174
|
+
var copyDetails = ((_b = (_a = details === null || details === void 0 ? void 0 : details.slice()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, function (d) { return (__assign({}, d)); })) || [];
|
|
175
|
+
var findItem = copyDetails.find(function (d) { return d.sealNo === sealNo; });
|
|
176
|
+
return (React.createElement("div", { className: "qunj-list-new--item", key: sealNo },
|
|
177
|
+
React.createElement(Checkbox, { checked: !!findItem, onChange: function (e) {
|
|
178
|
+
var isChecked = e.target.checked;
|
|
179
|
+
if (isChecked) {
|
|
180
|
+
copyDetails.push(__assign({}, qunjItem));
|
|
181
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
182
|
+
details: copyDetails,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
var index = copyDetails.findIndex(function (d) { return d.sealNo === sealNo; });
|
|
187
|
+
copyDetails.splice(index, 1);
|
|
188
|
+
var data = { details: copyDetails };
|
|
189
|
+
if (copyDetails.length === 0) {
|
|
190
|
+
data.contranctNum = undefined;
|
|
191
|
+
}
|
|
192
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
193
|
+
}
|
|
194
|
+
} },
|
|
195
|
+
React.createElement("span", { title: qunjItem.sealName }, getSealShortName(qunjItem))),
|
|
196
|
+
React.createElement("div", { className: "qunj-list-new--seal-count" },
|
|
197
|
+
i18next.t('次数'),
|
|
198
|
+
React.createElement(InputNumber, { size: "small", value: findItem === null || findItem === void 0 ? void 0 : findItem.sealCount, min: 1, onChange: function (e) {
|
|
199
|
+
var index = copyDetails.findIndex(function (d) { return d.sealNo === sealNo; });
|
|
200
|
+
if (index === -1) {
|
|
201
|
+
copyDetails.push(__assign(__assign({}, qunjItem), { sealCount: e }));
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
copyDetails[index].sealCount = e;
|
|
205
|
+
}
|
|
206
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
207
|
+
details: copyDetails,
|
|
208
|
+
contranctNum: contranctNum ? contranctNum : 1,
|
|
209
|
+
});
|
|
210
|
+
} }))));
|
|
211
|
+
})),
|
|
212
|
+
React.createElement("div", { className: "seal-selected-summary" },
|
|
213
|
+
React.createElement("div", { className: "seal-selected-title" }, i18next.t('已选印章')),
|
|
214
|
+
selectedDetails.length > 0 ? (selectedDetails.map(function (detail) { return (React.createElement("div", { key: detail.sealNo, className: "seal-selected-item seal-selected-item--qunj", title: detail.sealName },
|
|
215
|
+
React.createElement("span", { className: "seal-selected-name" },
|
|
216
|
+
getCompanyName(detail),
|
|
217
|
+
" ",
|
|
218
|
+
getSealShortName(detail)),
|
|
219
|
+
React.createElement("span", { className: "seal-selected-use-count" },
|
|
220
|
+
i18next.t('用印'),
|
|
221
|
+
detail.sealCount,
|
|
222
|
+
i18next.t('次')))); })) : (React.createElement("div", { className: "seal-selected-empty" }, i18next.t('暂未选择印章'))))));
|
|
223
|
+
}
|
|
224
|
+
// ========= 旧版渲染(按 useType 分组 + 用印申请勾选) =========
|
|
225
|
+
return (React.createElement("div", { className: "qunj-list--wrap" },
|
|
226
|
+
React.createElement("div", { className: "qunj-list--need" },
|
|
227
|
+
isShowChecked ? (React.createElement(Checkbox, { checked: qunjChecked, onChange: function (e) {
|
|
228
|
+
setQunjChecked && setQunjChecked(e.target.checked);
|
|
229
|
+
} }, i18next.t('群杰印章-用印申请'))) : null,
|
|
230
|
+
isQunjAddress && isTakeOut + '' === '1' && qunjChecked ? (React.createElement("div", { className: "qunj-list--area" },
|
|
231
|
+
React.createElement("label", null,
|
|
232
|
+
React.createElement("span", null, "*"),
|
|
233
|
+
i18next.t('盖章地点')),
|
|
234
|
+
React.createElement(EnhanceSelect, { style: { width: 108 }, list: qunjAddressList, size: "small", value: currentQunjAddress === null || currentQunjAddress === void 0 ? void 0 : currentQunjAddress.id, onChange: function (value, option, completeData) {
|
|
235
|
+
onQunjAddressChange(completeData);
|
|
236
|
+
} }))) : null),
|
|
237
|
+
qunjChecked ? (React.createElement(React.Fragment, null,
|
|
238
|
+
React.createElement("div", { className: "qunj-list--title" },
|
|
239
|
+
React.createElement(Radio.Group, { value: isTakeOut, onChange: function (e) {
|
|
240
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
241
|
+
isTakeOut: e.target.value,
|
|
242
|
+
});
|
|
243
|
+
} },
|
|
244
|
+
React.createElement(Radio, { value: 0 }, i18next.t('内部用印')),
|
|
245
|
+
React.createElement(Radio, { value: 1 }, i18next.t('外部用印'))),
|
|
246
|
+
isContranctNum ? (React.createElement("div", { className: "qunj-list--contract count" },
|
|
247
|
+
React.createElement("span", null, i18next.t('盖章文件数量')),
|
|
248
|
+
React.createElement(InputNumber, { size: "small", value: contranctNum === null ? undefined : contranctNum, onChange: function (e) {
|
|
249
|
+
contranctNumRef.current = e;
|
|
250
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
251
|
+
contranctNum: contranctNumRef.current,
|
|
252
|
+
});
|
|
253
|
+
}, min: 1 }),
|
|
254
|
+
i18next.t('份'))) : null),
|
|
255
|
+
React.createElement("div", { className: "qunj-list" }, (qunjList === null || qunjList === void 0 ? void 0 : qunjList.length) > 0 ? (React.createElement(Collapse, { defaultActiveKey: qunjListTypeMemo.map(function (item) { return "" + item.useType; }), style: { width: '100%' } }, qunjListTypeMemo.map(function (item) {
|
|
256
|
+
var currentQunjList = qunjList.filter(function (qunjItem) {
|
|
257
|
+
return qunjItem.useType === item.useType &&
|
|
258
|
+
isFilterAreaType(currentQunjAddress === null || currentQunjAddress === void 0 ? void 0 : currentQunjAddress.id, qunjItem.areaType);
|
|
259
|
+
});
|
|
260
|
+
if (qunjListRenderFilter) {
|
|
261
|
+
currentQunjList = qunjListRenderFilter(currentQunjList);
|
|
262
|
+
}
|
|
263
|
+
if (currentQunjList.length === 0) {
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
return (React.createElement(Collapse.Panel, { key: "" + item.useType, header: item.useTypeName }, currentQunjList === null || currentQunjList === void 0 ? void 0 : currentQunjList.map(function (qunjItem) {
|
|
267
|
+
var _a, _b;
|
|
268
|
+
var sealNo = qunjItem.sealNo, sealName = qunjItem.sealName;
|
|
269
|
+
// redux数据所有属性都被冻结了,需要"深拷贝"。这里只有一层
|
|
270
|
+
var copyDetails = ((_b = (_a = details === null || details === void 0 ? void 0 : details.slice()) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.call(_a, function (detail) { return (__assign({}, detail)); })) || [];
|
|
271
|
+
var findItem = copyDetails === null || copyDetails === void 0 ? void 0 : copyDetails.find(function (detailItem) { return detailItem.sealNo === sealNo; });
|
|
272
|
+
return (React.createElement("div", { className: "qunj-list--item", key: sealNo },
|
|
273
|
+
React.createElement(Checkbox, { value: sealNo, checked: !!findItem, onChange: function (e) {
|
|
274
|
+
// 当前操作是取消 还是 选中
|
|
275
|
+
var isChecked = e.target.checked;
|
|
276
|
+
// 如果是选中操作
|
|
277
|
+
if (isChecked) {
|
|
278
|
+
copyDetails.push(__assign(__assign({}, qunjItem), {
|
|
279
|
+
// sealCount: undefined,
|
|
280
|
+
// 20250424 默认选中时,数量为1
|
|
281
|
+
sealCount: 1 }));
|
|
282
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
283
|
+
details: copyDetails,
|
|
284
|
+
// 赋值默认值
|
|
285
|
+
contranctNum: contranctNum
|
|
286
|
+
? contranctNum
|
|
287
|
+
: 1,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
// 如果是取消操作
|
|
292
|
+
var index = copyDetails === null || copyDetails === void 0 ? void 0 : copyDetails.findIndex(function (detailItem) { return detailItem.sealNo === sealNo; });
|
|
293
|
+
copyDetails.splice(index, 1);
|
|
294
|
+
var data = {
|
|
295
|
+
details: copyDetails,
|
|
296
|
+
};
|
|
297
|
+
if (copyDetails.length === 0) {
|
|
298
|
+
data.contranctNum = undefined;
|
|
299
|
+
}
|
|
300
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
301
|
+
}
|
|
302
|
+
} }, sealName),
|
|
303
|
+
React.createElement("div", { className: "qunj-list--contract" },
|
|
304
|
+
i18next.t('用印'),
|
|
305
|
+
React.createElement(InputNumber, { size: "small", value: findItem === null || findItem === void 0 ? void 0 : findItem.sealCount, min: 1, onChange: function (e) {
|
|
306
|
+
var index = copyDetails === null || copyDetails === void 0 ? void 0 : copyDetails.findIndex(function (detailItem) { return detailItem.sealNo === sealNo; });
|
|
307
|
+
// 如果没有在已选中找到数据
|
|
308
|
+
if (index === -1) {
|
|
309
|
+
copyDetails.push(__assign(__assign({}, qunjItem), { sealCount: e }));
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
var item_1 = copyDetails[index];
|
|
313
|
+
if (item_1) {
|
|
314
|
+
item_1.sealCount = e;
|
|
315
|
+
}
|
|
316
|
+
copyDetails.splice(index, 1, item_1);
|
|
317
|
+
}
|
|
318
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
319
|
+
details: copyDetails,
|
|
320
|
+
// 赋值默认值
|
|
321
|
+
contranctNum: contranctNum
|
|
322
|
+
? contranctNum
|
|
323
|
+
: 1,
|
|
324
|
+
});
|
|
325
|
+
} }),
|
|
326
|
+
i18next.t('次'))));
|
|
327
|
+
})));
|
|
328
|
+
}))) : null))) : null));
|
|
329
|
+
};
|
|
330
|
+
// 判断盖章地点过滤逻辑
|
|
331
|
+
// 如果是长沙那么只显示长沙章
|
|
332
|
+
export function isFilterAreaType(currentAreaType, itemAreaType) {
|
|
333
|
+
// 如果当前没明确盖章地点 都显示
|
|
334
|
+
if (currentAreaType == null || itemAreaType == null) {
|
|
335
|
+
return true;
|
|
336
|
+
}
|
|
337
|
+
// 如果数据的盖章地点是所有区域,那么也显示
|
|
338
|
+
if (itemAreaType + '' === '0') {
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
if (currentAreaType + '' === itemAreaType + '') {
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
export default memo(QunjList);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IElectronSignaturesProps, IElectronSignaturesItem } from '../interface';
|
|
2
|
+
interface IOptions {
|
|
3
|
+
request?: IElectronSignaturesProps['request'];
|
|
4
|
+
needQj?: IElectronSignaturesItem['needQj'];
|
|
5
|
+
flowId?: IElectronSignaturesItem['flowId'];
|
|
6
|
+
deptId?: IElectronSignaturesItem['deptId'];
|
|
7
|
+
companyTypes?: IElectronSignaturesItem['companyTypes'];
|
|
8
|
+
/**
|
|
9
|
+
* 群杰印章查询时替代部门ID参数
|
|
10
|
+
*/
|
|
11
|
+
qunjReplaceDeptId?: IElectronSignaturesItem['qunjReplaceDeptId'];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 获取电子印章远程数据
|
|
15
|
+
*/
|
|
16
|
+
export default function useFetchQunjData(options: IOptions): {
|
|
17
|
+
/** 当前群杰列表数据 */
|
|
18
|
+
qunjList: any;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { message } from '../../../index';
|
|
4
|
+
/**
|
|
5
|
+
* 获取电子印章远程数据
|
|
6
|
+
*/
|
|
7
|
+
export default function useFetchQunjData(options) {
|
|
8
|
+
var request = options.request, needQj = options.needQj, flowId = options.flowId, deptId = options.deptId, companyTypes = options.companyTypes, qunjReplaceDeptId = options.qunjReplaceDeptId;
|
|
9
|
+
// 印章列表数据
|
|
10
|
+
var _a = useState(), qunjList = _a[0], setQunjList = _a[1];
|
|
11
|
+
// 获取群杰印章数据
|
|
12
|
+
var getQunjList = useCallback(function (flowId, params) {
|
|
13
|
+
return request === null || request === void 0 ? void 0 : request({
|
|
14
|
+
url: "/api/zmdms-resource/flowqjuse/query-qj-seal-list/" + flowId,
|
|
15
|
+
method: 'GET',
|
|
16
|
+
params: params,
|
|
17
|
+
}).then(function (res) {
|
|
18
|
+
var _a;
|
|
19
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
20
|
+
return (((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ({
|
|
21
|
+
companyType: item.companyType,
|
|
22
|
+
companyTypeName: item.companyTypeName,
|
|
23
|
+
sealName: item.sealName,
|
|
24
|
+
sealNo: item.sealNo,
|
|
25
|
+
areaType: item.areaType,
|
|
26
|
+
areaTypeName: item.areaTypeName,
|
|
27
|
+
useType: item.useType,
|
|
28
|
+
useTypeName: item.useTypeName,
|
|
29
|
+
}); })) || []);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
message.error(res.data.msg || i18next.t('出错了'));
|
|
33
|
+
}
|
|
34
|
+
}).catch(function (error) {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
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) || i18next.t('请求失败!'));
|
|
37
|
+
return Promise.reject(error);
|
|
38
|
+
});
|
|
39
|
+
}, [request]);
|
|
40
|
+
// 获取群杰印章列表数据
|
|
41
|
+
useEffect(function () {
|
|
42
|
+
// 如果不需要群杰数据
|
|
43
|
+
if (needQj + '' !== '1') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (!flowId) {
|
|
47
|
+
message.info(i18next.t('请传入流程ID'));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
getQunjList(flowId, {
|
|
51
|
+
companyTypes: companyTypes,
|
|
52
|
+
deptId: qunjReplaceDeptId || deptId,
|
|
53
|
+
}).then(function (res) {
|
|
54
|
+
setQunjList(res);
|
|
55
|
+
});
|
|
56
|
+
}, [needQj, flowId, getQunjList, deptId, qunjReplaceDeptId, companyTypes]);
|
|
57
|
+
return {
|
|
58
|
+
/** 当前群杰列表数据 */
|
|
59
|
+
qunjList: qunjList,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ColumnsType } from 'antd/es/table';
|
|
3
|
+
import type { SpinProps } from 'antd/es/spin';
|
|
4
|
+
import { IElectronSignaturesItemPublic, IElectronSignaturesItem, IElectronSignaturesProps, IFileItem, ITrackAllData } from '../interface';
|
|
5
|
+
import { IQjVerifyCode } from '../hooks/useGetQjVerifyCode';
|
|
6
|
+
interface IOptions {
|
|
7
|
+
/** 所有数据类型合并之后的数据 */
|
|
8
|
+
records: IFileItem[];
|
|
9
|
+
/** 所有数据类型的排序规则 */
|
|
10
|
+
dataTypeSort: string[];
|
|
11
|
+
/** 所有数据类型的相关操作 */
|
|
12
|
+
allData: ITrackAllData;
|
|
13
|
+
/** 表格的加载状态 */
|
|
14
|
+
setLoading?: React.Dispatch<React.SetStateAction<SpinProps | undefined>>;
|
|
15
|
+
/**
|
|
16
|
+
* 需要显示合同份数的流程id列表 群杰物理章那里 是否需要计算每个印章的用印次数 不能大于合同总份数的 多少倍
|
|
17
|
+
*/
|
|
18
|
+
contractNumFlowIds?: IElectronSignaturesProps['contractNumFlowIds'];
|
|
19
|
+
refreshCode?: IElectronSignaturesProps['refreshCode'];
|
|
20
|
+
request?: IElectronSignaturesProps['request'];
|
|
21
|
+
isSingleQj?: IElectronSignaturesItemPublic['isSingleQj'];
|
|
22
|
+
isQjUseModal?: IElectronSignaturesItemPublic['isQjUseModal'];
|
|
23
|
+
apiBaseUrl?: IElectronSignaturesItemPublic['apiBaseUrl'];
|
|
24
|
+
caseId?: IElectronSignaturesItemPublic['caseId'];
|
|
25
|
+
qjVerifyCodeData?: IQjVerifyCode[];
|
|
26
|
+
getQjVerifyCodeHandle?: (params: any) => Promise<any>;
|
|
27
|
+
isShowSealApply?: IElectronSignaturesItemPublic['isShowSealApply'];
|
|
28
|
+
/** 前往流程中心用印申请逻辑 */
|
|
29
|
+
goWorkflowSeal?: (wfProcessInstId: string) => void;
|
|
30
|
+
/** 群杰印章列表显示过滤方法 */
|
|
31
|
+
qunjListRenderFilter?: IElectronSignaturesItem['qunjListRenderFilter'];
|
|
32
|
+
}
|
|
33
|
+
export default function useQunjColumns(options: IOptions): {
|
|
34
|
+
qunjColumns: ColumnsType<any>;
|
|
35
|
+
};
|
|
36
|
+
export {};
|