ztxkui 4.2.18-112 → 4.2.18-113
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/electron-signatures/content.js +360 -340
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/index.js +4 -1
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +12 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +14 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +74 -26
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +20 -2
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +4 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +103 -16
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +13 -4
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +238 -165
- package/dist/components/electron-signatures/index.d.ts +2 -0
- package/dist/components/electron-signatures/index.js +14 -5
- package/dist/components/electron-signatures/interface.d.ts +16 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +14 -5
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +5 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +2 -2
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +48 -12
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,255 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
49
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
50
|
+
import ElectronSignatures from '../index';
|
|
51
|
+
import request from '../../../request';
|
|
52
|
+
import dayjs from 'dayjs';
|
|
53
|
+
/**
|
|
54
|
+
* 契约锁详情回显 demo
|
|
55
|
+
* 场景:详情数据中 群杰印章 details 只有 sealNo/sealCount 等基础字段
|
|
56
|
+
* 用于验证 已选印章汇总按 sealNo 去列表匹配补全名称等字段的回显
|
|
57
|
+
*/
|
|
58
|
+
var CoUseDetail = function () {
|
|
59
|
+
var electronHandleRef = useRef();
|
|
60
|
+
var _a = useState(null), params = _a[0], setParams = _a[1];
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
// 模拟接口请求
|
|
63
|
+
setTimeout(function () {
|
|
64
|
+
setParams({
|
|
65
|
+
canEdit: 0,
|
|
66
|
+
needDg: 1,
|
|
67
|
+
needQys: 1,
|
|
68
|
+
needQj: 1,
|
|
69
|
+
deptId: '7504463040532194928',
|
|
70
|
+
secondDepId: null,
|
|
71
|
+
memberId: '10001070',
|
|
72
|
+
flowId: 'scm_order_contract_cght',
|
|
73
|
+
contractId: '3550437515999076381',
|
|
74
|
+
caseId: '00d84c13-a100-48e5-af87-77e2e814d772',
|
|
75
|
+
docAttachMap: '{"needYjzrr":"true","282374244080593997":"3550437514072826831"}',
|
|
76
|
+
checkAttachIdList: [],
|
|
77
|
+
documentIdList: ['3550437514072826831'],
|
|
78
|
+
fileList: [
|
|
79
|
+
{
|
|
80
|
+
id: '282375163203593295',
|
|
81
|
+
attachId: '282374244080593997',
|
|
82
|
+
attachName: '泰裕达-浙商中拓455吨 SA001261021004.pdf',
|
|
83
|
+
attachTypeName: '合同本身',
|
|
84
|
+
attachType: '001',
|
|
85
|
+
isCustomerReference: 0,
|
|
86
|
+
templateAttachId: null,
|
|
87
|
+
templateAttachName: null,
|
|
88
|
+
templateCrNo: null,
|
|
89
|
+
taskId: null,
|
|
90
|
+
isWatermark: 0,
|
|
91
|
+
isElectronicSeal: 1,
|
|
92
|
+
busiId: null,
|
|
93
|
+
showFmsIsElectronicSeal: null,
|
|
94
|
+
fmsIsElectronicSeal: 0,
|
|
95
|
+
oldVersionId: null,
|
|
96
|
+
createTime: '2026-10-21 16:11:38',
|
|
97
|
+
sealInfoDTOList: null,
|
|
98
|
+
doubleSignedSealInfoDTOList: null,
|
|
99
|
+
mark: null,
|
|
100
|
+
isReplaceFile: null,
|
|
101
|
+
tid: null,
|
|
102
|
+
openingContractSeal: 0,
|
|
103
|
+
isOther: 0,
|
|
104
|
+
isAiApproval: null,
|
|
105
|
+
isCommissionTemplate: 0,
|
|
106
|
+
isUserUpload: null,
|
|
107
|
+
attachSize: null,
|
|
108
|
+
fileSize: null,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: '282375163203593294',
|
|
112
|
+
attachId: '282377010039539631',
|
|
113
|
+
attachName: '泰裕达455吨合同盈利分析.xlsx',
|
|
114
|
+
attachTypeName: '其他',
|
|
115
|
+
attachType: '007',
|
|
116
|
+
isCustomerReference: 0,
|
|
117
|
+
templateAttachId: null,
|
|
118
|
+
templateAttachName: null,
|
|
119
|
+
templateCrNo: null,
|
|
120
|
+
taskId: null,
|
|
121
|
+
isWatermark: 0,
|
|
122
|
+
isElectronicSeal: 0,
|
|
123
|
+
busiId: null,
|
|
124
|
+
showFmsIsElectronicSeal: null,
|
|
125
|
+
fmsIsElectronicSeal: null,
|
|
126
|
+
oldVersionId: null,
|
|
127
|
+
createTime: '2026-10-21 16:11:38',
|
|
128
|
+
sealInfoDTOList: null,
|
|
129
|
+
doubleSignedSealInfoDTOList: null,
|
|
130
|
+
mark: null,
|
|
131
|
+
isReplaceFile: null,
|
|
132
|
+
tid: null,
|
|
133
|
+
openingContractSeal: null,
|
|
134
|
+
isOther: 0,
|
|
135
|
+
isAiApproval: null,
|
|
136
|
+
isCommissionTemplate: 0,
|
|
137
|
+
isUserUpload: null,
|
|
138
|
+
attachSize: null,
|
|
139
|
+
fileSize: null,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: '282375163203593296',
|
|
143
|
+
attachId: '282374244080593998',
|
|
144
|
+
attachName: '曹总确认截图.jpg',
|
|
145
|
+
attachTypeName: '其他',
|
|
146
|
+
attachType: '007',
|
|
147
|
+
isCustomerReference: 0,
|
|
148
|
+
templateAttachId: null,
|
|
149
|
+
templateAttachName: null,
|
|
150
|
+
templateCrNo: null,
|
|
151
|
+
taskId: null,
|
|
152
|
+
isWatermark: 0,
|
|
153
|
+
isElectronicSeal: 0,
|
|
154
|
+
busiId: null,
|
|
155
|
+
showFmsIsElectronicSeal: null,
|
|
156
|
+
fmsIsElectronicSeal: null,
|
|
157
|
+
oldVersionId: null,
|
|
158
|
+
createTime: '2026-10-21 16:11:38',
|
|
159
|
+
sealInfoDTOList: null,
|
|
160
|
+
doubleSignedSealInfoDTOList: null,
|
|
161
|
+
mark: null,
|
|
162
|
+
isReplaceFile: null,
|
|
163
|
+
tid: null,
|
|
164
|
+
openingContractSeal: null,
|
|
165
|
+
isOther: 0,
|
|
166
|
+
isAiApproval: null,
|
|
167
|
+
isCommissionTemplate: 0,
|
|
168
|
+
isUserUpload: null,
|
|
169
|
+
attachSize: null,
|
|
170
|
+
fileSize: null,
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
// 群杰印章详情回显 只有印章编号等基础字段
|
|
174
|
+
qunjSeal: {
|
|
175
|
+
vertifyCode: 482522,
|
|
176
|
+
contranctNum: 4,
|
|
177
|
+
isTakeOut: 0,
|
|
178
|
+
details: [
|
|
179
|
+
{
|
|
180
|
+
sealNo: 'YZ-2023-011',
|
|
181
|
+
sealCount: 8,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
electronicSealIdList: ['2743322618777923922'],
|
|
186
|
+
// 个人签署(手签章)已勾选用户 回显使用
|
|
187
|
+
personalSignUserIds: [1123581321],
|
|
188
|
+
flowStatus: 50,
|
|
189
|
+
qunjAddress: {
|
|
190
|
+
id: null,
|
|
191
|
+
name: null,
|
|
192
|
+
},
|
|
193
|
+
contractNo: '20254706',
|
|
194
|
+
wfProcessInstId: 1418047,
|
|
195
|
+
verifyUserIds: '1565246142656483330,1467046624988288987,1467046624988289029,1467046624988287202,8727929005011083374,7937915228846497802',
|
|
196
|
+
});
|
|
197
|
+
}, 1000);
|
|
198
|
+
}, []);
|
|
199
|
+
return (React.createElement(React.Fragment, null,
|
|
200
|
+
React.createElement(ElectronSignatures, __assign({ request: request, dataTypeName: i18next.t('新附件1'), dataType: "key1", isBgColor: true,
|
|
201
|
+
// 是否显示上传附件按钮
|
|
202
|
+
isShowFileUpload: true,
|
|
203
|
+
// 附件类型是否允许修改
|
|
204
|
+
isAllowedPatchFileType: true,
|
|
205
|
+
// 是否显示批量下载电子签章件
|
|
206
|
+
isShowElectronBatchBtn: true,
|
|
207
|
+
// 是否显示批量下载原件
|
|
208
|
+
isShowDownloadBatchBtn: true,
|
|
209
|
+
// 是否显示双签件
|
|
210
|
+
isShowDoubleSignedBatchBtn: true, isShowChioseTemplate: true, isShowBatchDeleteBtn: true, isShowBatchPreviewBtn: true, isQunjAddress: true,
|
|
211
|
+
// 新版简称展示样式
|
|
212
|
+
isNewElectronSealStyle: true, isNewQunjSealStyle: true }, params, { refreshCode: true,
|
|
213
|
+
// 数据改变时 触发
|
|
214
|
+
onValueChange: function (info) {
|
|
215
|
+
console.log(info);
|
|
216
|
+
setParams(function (preParams) {
|
|
217
|
+
var _a, _b;
|
|
218
|
+
var newParams = __assign(__assign({}, preParams), info.key1);
|
|
219
|
+
if (info.key1.fileList) {
|
|
220
|
+
newParams.fileList = (_b = (_a = info.key1) === null || _a === void 0 ? void 0 : _a.fileList) === null || _b === void 0 ? void 0 : _b.map(function (item) {
|
|
221
|
+
return __assign(__assign({}, item), { createTime: item.createTime || dayjs().format('YYYY-MM-DD HH:mm:ss') });
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return newParams;
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
// 组件对外暴露的一些方法 获取数据 校验方法
|
|
228
|
+
electronHandleRef: electronHandleRef, isValidateSuccess: function () {
|
|
229
|
+
console.log(i18next.t('最终校验通过了!!!'));
|
|
230
|
+
}, isNewQys: true })),
|
|
231
|
+
React.createElement("button", { onClick: function () {
|
|
232
|
+
console.log(electronHandleRef.current.getAllData());
|
|
233
|
+
} }, i18next.t('获取数据')),
|
|
234
|
+
React.createElement("button", { onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
235
|
+
var err_1;
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
switch (_a.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
_a.trys.push([0, 2, , 3]);
|
|
240
|
+
return [4 /*yield*/, electronHandleRef.current.validateElectronTable()];
|
|
241
|
+
case 1:
|
|
242
|
+
_a.sent();
|
|
243
|
+
console.log(i18next.t('校验通过'));
|
|
244
|
+
console.log(electronHandleRef.current.getAllData());
|
|
245
|
+
return [3 /*break*/, 3];
|
|
246
|
+
case 2:
|
|
247
|
+
err_1 = _a.sent();
|
|
248
|
+
console.log(err_1);
|
|
249
|
+
return [3 /*break*/, 3];
|
|
250
|
+
case 3: return [2 /*return*/];
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}); } }, i18next.t('校验逻辑'))));
|
|
254
|
+
};
|
|
255
|
+
export default CoUseDetail;
|
|
@@ -8,6 +8,7 @@ import SingleQjDetail from './singleQjDetail';
|
|
|
8
8
|
import NewDetail from './newDetail';
|
|
9
9
|
import Jgqrd from './jgqrd';
|
|
10
10
|
import Test from './test';
|
|
11
|
+
import CoUseDetail from './coUseDetail';
|
|
11
12
|
export default function Demo() {
|
|
12
13
|
return (React.createElement(Tabs, null,
|
|
13
14
|
React.createElement(Tabs.TabPane, { tab: i18next.t('编辑-价格确认单'), key: "111" },
|
|
@@ -23,5 +24,7 @@ export default function Demo() {
|
|
|
23
24
|
React.createElement(Tabs.TabPane, { tab: i18next.t('详情-共用一个群杰印章按钮'), key: "4" },
|
|
24
25
|
React.createElement(SingleQjDetail, null)),
|
|
25
26
|
React.createElement(Tabs.TabPane, { tab: i18next.t('最新版-共用一个群杰印章按钮'), key: "5" },
|
|
26
|
-
React.createElement(NewDetail, null))
|
|
27
|
+
React.createElement(NewDetail, null)),
|
|
28
|
+
React.createElement(Tabs.TabPane, { tab: i18next.t('详情-简称版回显'), key: "6" },
|
|
29
|
+
React.createElement(CoUseDetail, null))));
|
|
27
30
|
}
|
|
@@ -339,6 +339,18 @@ declare const cghtData: {
|
|
|
339
339
|
id: any;
|
|
340
340
|
name: any;
|
|
341
341
|
};
|
|
342
|
+
qunjSeal: {
|
|
343
|
+
qjCaseId: any;
|
|
344
|
+
vertifyCode: any;
|
|
345
|
+
contranctNum: number;
|
|
346
|
+
isTakeOut: number;
|
|
347
|
+
details: {
|
|
348
|
+
sealNo: string;
|
|
349
|
+
sealCount: number;
|
|
350
|
+
useType: number;
|
|
351
|
+
areaType: number;
|
|
352
|
+
}[];
|
|
353
|
+
};
|
|
342
354
|
contractNo: string;
|
|
343
355
|
wfProcessInstId: any;
|
|
344
356
|
verifyUserIds: string;
|
|
@@ -786,6 +786,20 @@ var cghtData = {
|
|
|
786
786
|
id: null,
|
|
787
787
|
name: null,
|
|
788
788
|
},
|
|
789
|
+
qunjSeal: {
|
|
790
|
+
qjCaseId: null,
|
|
791
|
+
vertifyCode: null,
|
|
792
|
+
contranctNum: 1,
|
|
793
|
+
isTakeOut: 0,
|
|
794
|
+
details: [
|
|
795
|
+
{
|
|
796
|
+
sealNo: 'YZ-2025-022',
|
|
797
|
+
sealCount: 1,
|
|
798
|
+
useType: 3,
|
|
799
|
+
areaType: 2,
|
|
800
|
+
},
|
|
801
|
+
],
|
|
802
|
+
},
|
|
789
803
|
contractNo: 'PC25000324',
|
|
790
804
|
wfProcessInstId: null,
|
|
791
805
|
verifyUserIds: '1513784927865917441,1462750580155428866,1462750580155428866',
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, { memo, useEffect, useRef } from 'react';
|
|
12
|
+
import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
13
13
|
import { FILE_FIELDS_NAME, } from './interface';
|
|
14
14
|
import useMemoizedFn from '../utils/useMemoizedFn';
|
|
15
15
|
// 附件数据处理
|
|
@@ -28,7 +28,7 @@ import useParseQunjListData from './hooks/useParseQunjListData';
|
|
|
28
28
|
import useParseIsNeedQunjData from './hooks/useParseIsNeedQunjData';
|
|
29
29
|
import useParseQunjSingleData from './hooks/useParseQunjSingleData';
|
|
30
30
|
var ElectronSignaturesFragment = function (props) {
|
|
31
|
-
var request = props.request, isUnControlled = props.isUnControlled, contractNumFlowIds = props.contractNumFlowIds, isAllowedPatchFileType = props.isAllowedPatchFileType, fileTypeKey = props.fileTypeKey, fileTypeList = props.fileTypeList, fileTypeFilterList = props.fileTypeFilterList, useOutsideFileTypeList = props.useOutsideFileTypeList, needQys = props.needQys, needQj = props.needQj, needDg = props.needDg, isShowContractComparsion = props.isShowContractComparsion, isDefaultQunj = props.isDefaultQunj, qunjAddressList = props.qunjAddressList, qunjAddress = props.qunjAddress, _a = props.isQunjAddress, isQunjAddress = _a === void 0 ? true : _a, deptId = props.deptId, secondDepId = props.secondDepId, qunjReplaceDeptId = props.qunjReplaceDeptId, flowId = props.flowId, electronicSealIdList = props.electronicSealIdList, qunjSeal = props.qunjSeal, _b = props.isCheckedEconomic, isCheckedEconomic = _b === void 0 ? 1 : _b, docAttachMap = props.docAttachMap, contractId = props.contractId, documentIdList = props.documentIdList, onValueChange = props.onValueChange, fileList = props.fileList, _c = props.dataType, dataType = _c === void 0 ? '' : _c, dataTypeName = props.dataTypeName, isBgColor = props.isBgColor, canEdit = props.canEdit, flowStatus = props.flowStatus, onTrackChange = props.onTrackChange, setLoading = props.setLoading, apiBaseUrl = props.apiBaseUrl, fileBaseUrl = props.fileBaseUrl, fileFieldsName = props.fileFieldsName, fileSplitRules = props.fileSplitRules, fileSplitStringRules = props.fileSplitStringRules, parseCurrentUploadFile = props.parseCurrentUploadFile, isShowSaveTemplate = props.isShowSaveTemplate, isShowChioseTemplate = props.isShowChioseTemplate, companyTypes = props.companyTypes, isSingleQj = props.isSingleQj, wfProcessInstId = props.wfProcessInstId, verifyUserIds = props.verifyUserIds, isSupportNoAttachQj = props.isSupportNoAttachQj;
|
|
31
|
+
var request = props.request, isUnControlled = props.isUnControlled, contractNumFlowIds = props.contractNumFlowIds, isAllowedPatchFileType = props.isAllowedPatchFileType, fileTypeKey = props.fileTypeKey, fileTypeList = props.fileTypeList, fileTypeFilterList = props.fileTypeFilterList, useOutsideFileTypeList = props.useOutsideFileTypeList, needQys = props.needQys, needQj = props.needQj, needDg = props.needDg, isShowContractComparsion = props.isShowContractComparsion, isDefaultQunj = props.isDefaultQunj, qunjAddressList = props.qunjAddressList, qunjAddress = props.qunjAddress, _a = props.isQunjAddress, isQunjAddress = _a === void 0 ? true : _a, deptId = props.deptId, secondDepId = props.secondDepId, qunjReplaceDeptId = props.qunjReplaceDeptId, flowId = props.flowId, organizationType = props.organizationType, electronicSealIdList = props.electronicSealIdList, qunjSeal = props.qunjSeal, _b = props.isCheckedEconomic, isCheckedEconomic = _b === void 0 ? 1 : _b, docAttachMap = props.docAttachMap, contractId = props.contractId, personalSignUserIds = props.personalSignUserIds, documentIdList = props.documentIdList, onValueChange = props.onValueChange, fileList = props.fileList, _c = props.dataType, dataType = _c === void 0 ? '' : _c, dataTypeName = props.dataTypeName, isBgColor = props.isBgColor, canEdit = props.canEdit, flowStatus = props.flowStatus, onTrackChange = props.onTrackChange, setLoading = props.setLoading, apiBaseUrl = props.apiBaseUrl, fileBaseUrl = props.fileBaseUrl, fileFieldsName = props.fileFieldsName, fileSplitRules = props.fileSplitRules, fileSplitStringRules = props.fileSplitStringRules, parseCurrentUploadFile = props.parseCurrentUploadFile, isShowSaveTemplate = props.isShowSaveTemplate, isShowChioseTemplate = props.isShowChioseTemplate, companyTypes = props.companyTypes, isSingleQj = props.isSingleQj, wfProcessInstId = props.wfProcessInstId, verifyUserIds = props.verifyUserIds, isSupportNoAttachQj = props.isSupportNoAttachQj;
|
|
32
32
|
var fileFieldsNameRef = useRef(FILE_FIELDS_NAME);
|
|
33
33
|
fileFieldsNameRef.current = __assign(__assign({}, FILE_FIELDS_NAME), fileFieldsName);
|
|
34
34
|
// 代理函数
|
|
@@ -57,9 +57,32 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
57
57
|
deptId: deptId,
|
|
58
58
|
secondDepId: secondDepId,
|
|
59
59
|
flowId: flowId,
|
|
60
|
+
organizationType: organizationType,
|
|
60
61
|
records: records,
|
|
61
62
|
canEdit: canEdit,
|
|
62
|
-
}), electronList = _e.electronList, firstLevelPersonName = _e.firstLevelPersonName;
|
|
63
|
+
}), electronList = _e.electronList, personalSignList = _e.personalSignList, firstLevelPersonName = _e.firstLevelPersonName;
|
|
64
|
+
// 个人签署(手签章)已勾选的用户id列表
|
|
65
|
+
var _f = useState(function () {
|
|
66
|
+
return Array.isArray(personalSignUserIds) ? personalSignUserIds : [];
|
|
67
|
+
}), currentPersonalSignUserIds = _f[0], setPersonalSignUserIds = _f[1];
|
|
68
|
+
// 手签用户勾选变化
|
|
69
|
+
var onPersonalSignUserIdsChange = useCallback(function (userIds) {
|
|
70
|
+
setPersonalSignUserIds(userIds);
|
|
71
|
+
}, []);
|
|
72
|
+
// 详情数据异步加载时 props 回显同步(详情接口数据到达后覆盖本地状态)
|
|
73
|
+
var personalSignEchoRef = useRef(Array.isArray(personalSignUserIds) ? personalSignUserIds : undefined);
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
if (!Array.isArray(personalSignUserIds)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// props 从无到有(异步详情数据到达)或内容变化时 同步到内部状态
|
|
79
|
+
var preIds = personalSignEchoRef.current;
|
|
80
|
+
var isChanged = JSON.stringify(preIds || []) !== JSON.stringify(personalSignUserIds);
|
|
81
|
+
if (preIds === undefined || isChanged) {
|
|
82
|
+
setPersonalSignUserIds(personalSignUserIds);
|
|
83
|
+
}
|
|
84
|
+
personalSignEchoRef.current = personalSignUserIds;
|
|
85
|
+
}, [personalSignUserIds]);
|
|
63
86
|
// 群杰物理章列表相关数据
|
|
64
87
|
var qunjList = useFetchQunjData({
|
|
65
88
|
request: request,
|
|
@@ -79,16 +102,30 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
79
102
|
isAllowedPatchFileType: isAllowedPatchFileType,
|
|
80
103
|
}).fileTypeFetchList;
|
|
81
104
|
// 选择电子印章相关逻辑
|
|
82
|
-
var
|
|
105
|
+
var _g = useParseElectronListData({
|
|
83
106
|
isUnControlled: isUnControlled,
|
|
84
107
|
onValueChange: onValueChange,
|
|
85
108
|
dataType: dataType,
|
|
86
109
|
electronicSealIdList: electronicSealIdList,
|
|
87
110
|
isCheckedEconomic: isCheckedEconomic,
|
|
88
111
|
docAttachMap: docAttachMap,
|
|
89
|
-
}), currentCheckedElectronicSealIdList =
|
|
112
|
+
}), currentCheckedElectronicSealIdList = _g.currentCheckedElectronicSealIdList, onElectronicSealIdChange = _g.onElectronicSealIdChange, currentIsCheckedEconomic = _g.currentIsCheckedEconomic, setCurrentIsCheckedEconomic = _g.setCurrentIsCheckedEconomic, onCheckedEconomicChange = _g.onCheckedEconomicChange, onClearElectronListData = _g.onClearElectronListData;
|
|
113
|
+
// 这个是整体逻辑。如果每个附件都需要选择是否盖群杰印章,走其他逻辑
|
|
114
|
+
// 群杰物理章切换数据相关逻辑
|
|
115
|
+
var _h = useParseQunjListData({
|
|
116
|
+
isUnControlled: isUnControlled,
|
|
117
|
+
onValueChange: onValueChange,
|
|
118
|
+
dataType: dataType,
|
|
119
|
+
qunjSeal: qunjSeal,
|
|
120
|
+
contractNumFlowIds: contractNumFlowIds,
|
|
121
|
+
deptId: deptId,
|
|
122
|
+
flowId: flowId,
|
|
123
|
+
isDefaultQunj: isDefaultQunj,
|
|
124
|
+
qunjAddress: qunjAddress,
|
|
125
|
+
isSingleQj: isSingleQj,
|
|
126
|
+
}), currentQunjSeal = _h.currentQunjSeal, onQunjSealChange = _h.onQunjSealChange, isContranctNum = _h.isContranctNum, qunjChecked = _h.qunjChecked, setQunjChecked = _h.setQunjChecked, currentQunjAddress = _h.currentQunjAddress, onQunjAddressChange = _h.onQunjAddressChange;
|
|
90
127
|
// 电子印章设置相关逻辑
|
|
91
|
-
var
|
|
128
|
+
var _j = useParseElectronSetting({
|
|
92
129
|
isUnControlled: isUnControlled,
|
|
93
130
|
onValueChange: onValueChange,
|
|
94
131
|
request: request,
|
|
@@ -101,15 +138,18 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
101
138
|
electronicSealIdList: currentCheckedElectronicSealIdList,
|
|
102
139
|
isCheckedEconomic: currentIsCheckedEconomic,
|
|
103
140
|
setCurrentIsCheckedEconomic: setCurrentIsCheckedEconomic,
|
|
141
|
+
personalSignUserIds: currentPersonalSignUserIds,
|
|
142
|
+
setPersonalSignUserIds: setPersonalSignUserIds,
|
|
104
143
|
canEdit: canEdit,
|
|
105
144
|
flowStatus: flowStatus,
|
|
106
145
|
deptId: deptId,
|
|
107
146
|
secondDepId: secondDepId,
|
|
108
147
|
onElectronicSealIdChange: onElectronicSealIdChange,
|
|
109
|
-
|
|
110
|
-
|
|
148
|
+
qunjSeal: currentQunjSeal,
|
|
149
|
+
fileFieldsNameRef: fileFieldsNameRef,
|
|
150
|
+
}), currentContractId = _j.currentContractId, currentDocAttachMap = _j.currentDocAttachMap, currentDocumentIdList = _j.currentDocumentIdList, appointSignLocation = _j.appointSignLocation, viewSignPage = _j.viewSignPage, checkUnStampedSealList = _j.checkUnStampedSealList, unElectronicSealList = _j.unElectronicSealList, unElectronicSealIdList = _j.unElectronicSealIdList, onClearElectronSetting = _j.onClearElectronSetting, clickElectronicSealIdList = _j.clickElectronicSealIdList;
|
|
111
151
|
// 盖电子印章相关逻辑
|
|
112
|
-
var
|
|
152
|
+
var _k = useParseIsNeedElectronData({
|
|
113
153
|
isUnControlled: isUnControlled,
|
|
114
154
|
onValueChange: onValueChange,
|
|
115
155
|
dataType: dataType,
|
|
@@ -120,21 +160,9 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
120
160
|
deptId: deptId,
|
|
121
161
|
secondDepId: secondDepId,
|
|
122
162
|
electronicSealIdList: electronicSealIdList,
|
|
123
|
-
}), onIsStampElectronChange =
|
|
163
|
+
}), onIsStampElectronChange = _k.onIsStampElectronChange, isStampElectron = _k.isStampElectron, clearAllElectronDataHandler = _k.clearAllElectronDataHandler;
|
|
124
164
|
// 这个是整体逻辑。如果每个附件都需要选择是否盖群杰印章,走其他逻辑
|
|
125
|
-
//
|
|
126
|
-
var _j = useParseQunjListData({
|
|
127
|
-
isUnControlled: isUnControlled,
|
|
128
|
-
onValueChange: onValueChange,
|
|
129
|
-
dataType: dataType,
|
|
130
|
-
qunjSeal: qunjSeal,
|
|
131
|
-
contractNumFlowIds: contractNumFlowIds,
|
|
132
|
-
deptId: deptId,
|
|
133
|
-
flowId: flowId,
|
|
134
|
-
isDefaultQunj: isDefaultQunj,
|
|
135
|
-
qunjAddress: qunjAddress,
|
|
136
|
-
isSingleQj: isSingleQj,
|
|
137
|
-
}), currentQunjSeal = _j.currentQunjSeal, onQunjSealChange = _j.onQunjSealChange, isContranctNum = _j.isContranctNum, qunjChecked = _j.qunjChecked, setQunjChecked = _j.setQunjChecked, currentQunjAddress = _j.currentQunjAddress, onQunjAddressChange = _j.onQunjAddressChange;
|
|
165
|
+
// 群杰物理章切换数据相关逻辑(已提前到 useParseElectronSetting 之前调用)
|
|
138
166
|
// 是否盖群杰章相关逻辑
|
|
139
167
|
var onIsStampQunjChange = useParseIsNeedQunjData({
|
|
140
168
|
isUnControlled: isUnControlled,
|
|
@@ -145,7 +173,7 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
145
173
|
fileFieldsNameRef: fileFieldsNameRef,
|
|
146
174
|
}).onIsStampQunjChange;
|
|
147
175
|
// 针对每个附件加盖群杰章的逻辑
|
|
148
|
-
var
|
|
176
|
+
var _l = useParseQunjSingleData({
|
|
149
177
|
onValueChange: onValueChange,
|
|
150
178
|
dataType: dataType,
|
|
151
179
|
records: records,
|
|
@@ -154,15 +182,35 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
154
182
|
isContranctNum: isContranctNum,
|
|
155
183
|
isSingleQj: isSingleQj,
|
|
156
184
|
flowId: flowId,
|
|
157
|
-
}), onQunjAddressSingleChange =
|
|
185
|
+
}), onQunjAddressSingleChange = _l.onQunjAddressSingleChange, onQunjSealSingleChange = _l.onQunjSealSingleChange;
|
|
158
186
|
// 触发收集状态
|
|
159
187
|
useEffect(function () {
|
|
160
188
|
onTrackChange &&
|
|
161
189
|
onTrackChange(dataType, {
|
|
162
190
|
electronList: electronList,
|
|
163
191
|
firstLevelPersonName: firstLevelPersonName,
|
|
192
|
+
personalSignList: personalSignList,
|
|
164
193
|
});
|
|
165
|
-
}, [
|
|
194
|
+
}, [
|
|
195
|
+
dataType,
|
|
196
|
+
onTrackChange,
|
|
197
|
+
electronList,
|
|
198
|
+
firstLevelPersonName,
|
|
199
|
+
personalSignList,
|
|
200
|
+
]);
|
|
201
|
+
// 个人签署(手签章)勾选状态收集
|
|
202
|
+
useEffect(function () {
|
|
203
|
+
onTrackChange &&
|
|
204
|
+
onTrackChange(dataType, {
|
|
205
|
+
currentPersonalSignUserIds: currentPersonalSignUserIds,
|
|
206
|
+
onPersonalSignUserIdsChange: onPersonalSignUserIdsChange,
|
|
207
|
+
});
|
|
208
|
+
}, [
|
|
209
|
+
dataType,
|
|
210
|
+
onTrackChange,
|
|
211
|
+
currentPersonalSignUserIds,
|
|
212
|
+
onPersonalSignUserIdsChange,
|
|
213
|
+
]);
|
|
166
214
|
useEffect(function () {
|
|
167
215
|
onTrackChange &&
|
|
168
216
|
onTrackChange(dataType, {
|
package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IPersonalSignUser {
|
|
3
|
+
userId: number;
|
|
4
|
+
userName: string;
|
|
5
|
+
}
|
|
6
|
+
interface IPersonalSignItem {
|
|
7
|
+
/** 唯一标识 */
|
|
8
|
+
id: number | string;
|
|
9
|
+
/** 展示文案 如"请部门经理签字" */
|
|
10
|
+
displayText: string;
|
|
11
|
+
/** user=指定用户 role_line=角色线 null=仅展示文字 */
|
|
12
|
+
configType?: 'user' | 'role_line' | null;
|
|
13
|
+
/** 配置值 用户id或角色线id */
|
|
14
|
+
configValue?: string | number | null;
|
|
15
|
+
/** 配置名称 用户名或角色线名称 */
|
|
16
|
+
configValueName?: string;
|
|
17
|
+
/** 后端展开好的最终签署用户列表 */
|
|
18
|
+
signUsers?: IPersonalSignUser[];
|
|
19
|
+
}
|
|
20
|
+
interface IProps {
|
|
21
|
+
/** 个人签署配置列表 */
|
|
22
|
+
personalSignList?: IPersonalSignItem[];
|
|
23
|
+
/** 已勾选的手签用户id列表 */
|
|
24
|
+
value?: Array<number | string>;
|
|
25
|
+
/** 是否可编辑 */
|
|
26
|
+
isEdit?: boolean;
|
|
27
|
+
onChange?: (userIds: Array<number | string>) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 个人签署(手签章)选择
|
|
31
|
+
* 每条配置展示 displayText 文案,signUsers 渲染用户多选框;
|
|
32
|
+
* signUsers 为空的配置仅展示文字
|
|
33
|
+
*/
|
|
34
|
+
declare const ElectronSealPersonalSign: React.FC<IProps>;
|
|
35
|
+
export default ElectronSealPersonalSign;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
2
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
3
|
+
to[j] = from[i];
|
|
4
|
+
return to;
|
|
5
|
+
};
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { Checkbox } from 'antd';
|
|
8
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
9
|
+
/**
|
|
10
|
+
* 个人签署(手签章)选择
|
|
11
|
+
* 每条配置展示 displayText 文案,signUsers 渲染用户多选框;
|
|
12
|
+
* signUsers 为空的配置仅展示文字
|
|
13
|
+
*/
|
|
14
|
+
var ElectronSealPersonalSign = function (props) {
|
|
15
|
+
var personalSignList = props.personalSignList, _a = props.value, value = _a === void 0 ? [] : _a, isEdit = props.isEdit, onChange = props.onChange;
|
|
16
|
+
if (!Array.isArray(personalSignList) || personalSignList.length === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
var checkedList = value || [];
|
|
20
|
+
/** 勾选/取消某个手签用户 */
|
|
21
|
+
var handleUserChange = function (userId, checked) {
|
|
22
|
+
var newUserIds = checked
|
|
23
|
+
? Array.from(new Set(__spreadArray(__spreadArray([], checkedList), [userId])))
|
|
24
|
+
: checkedList.filter(function (item) { return item !== userId; });
|
|
25
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newUserIds);
|
|
26
|
+
};
|
|
27
|
+
return (React.createElement("div", { className: "electron-seal--personal-sign" }, personalSignList.map(function (item) {
|
|
28
|
+
var signUsers = Array.isArray(item.signUsers) ? item.signUsers : [];
|
|
29
|
+
return (React.createElement("div", { key: item.id, className: "electron-seal--personal-sign__item", title: item.displayText },
|
|
30
|
+
React.createElement("div", { className: "electron-seal--personal-sign__text" }, i18next.t(item.displayText)),
|
|
31
|
+
signUsers.length > 0 && (React.createElement("div", { className: "electron-seal--personal-sign__users" }, signUsers.map(function (user) {
|
|
32
|
+
var checked = checkedList.includes(user.userId);
|
|
33
|
+
return (React.createElement(Checkbox, { key: user.userId, checked: checked, disabled: !isEdit, onChange: function (e) {
|
|
34
|
+
return handleUserChange(user.userId, e.target.checked);
|
|
35
|
+
} }, i18next.t(user.userName)));
|
|
36
|
+
})))));
|
|
37
|
+
})));
|
|
38
|
+
};
|
|
39
|
+
export default ElectronSealPersonalSign;
|
|
@@ -18,6 +18,7 @@ import ElectronSealItem from './electron-seal-item';
|
|
|
18
18
|
import ElectronSealList from './electron-seal-list';
|
|
19
19
|
import ElectronSealDetail, { NoUseElectronSeal } from './electron-seal-detail';
|
|
20
20
|
import ElectronSealFirstLevelPerson from './electron-seal-firstLevelPerson';
|
|
21
|
+
import ElectronSealPersonalSign from './electron-seal-personal-sign';
|
|
21
22
|
import ElectronSealSetting from './electron-seal-setting';
|
|
22
23
|
import { currentRecordIsOnlyQunj } from '../utils';
|
|
23
24
|
import { ElectronSignaturesContext } from '..';
|
|
@@ -158,7 +159,7 @@ export default function useElectronColumns(options) {
|
|
|
158
159
|
props: props,
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, needQys = _b.needQys, firstLevelPersonName = _b.firstLevelPersonName, currentCheckedElectronicSealIdList = _b.currentCheckedElectronicSealIdList, currentContractId = _b.currentContractId, currentIsCheckedEconomic = _b.currentIsCheckedEconomic, onCheckedEconomicChange = _b.onCheckedEconomicChange, electronList = _b.electronList, onElectronicSealIdChange = _b.onElectronicSealIdChange, isStampElectron = _b.isStampElectron, appointSignLocation = _b.appointSignLocation;
|
|
162
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, needQys = _b.needQys, firstLevelPersonName = _b.firstLevelPersonName, currentCheckedElectronicSealIdList = _b.currentCheckedElectronicSealIdList, currentContractId = _b.currentContractId, currentIsCheckedEconomic = _b.currentIsCheckedEconomic, onCheckedEconomicChange = _b.onCheckedEconomicChange, electronList = _b.electronList, onElectronicSealIdChange = _b.onElectronicSealIdChange, isStampElectron = _b.isStampElectron, appointSignLocation = _b.appointSignLocation, personalSignList = _b.personalSignList, currentPersonalSignUserIds = _b.currentPersonalSignUserIds, onPersonalSignUserIdsChange = _b.onPersonalSignUserIdsChange;
|
|
162
163
|
// 1. 处理当前类型的数据需不需要契约锁
|
|
163
164
|
// 2. 处理当前类型的数据处不处于编辑状态
|
|
164
165
|
return {
|
|
@@ -181,7 +182,24 @@ export default function useElectronColumns(options) {
|
|
|
181
182
|
onCheckedEconomicChange(e);
|
|
182
183
|
}
|
|
183
184
|
} }),
|
|
184
|
-
React.createElement(
|
|
185
|
+
React.createElement(ElectronSealPersonalSign, { personalSignList: personalSignList, value: currentPersonalSignUserIds, isEdit: !!isStampElectron, onChange: function (userIds) {
|
|
186
|
+
// 已指定签署位置时 与一级责任人一致 重新调用指定签署位置接口
|
|
187
|
+
if ((currentCheckedElectronicSealIdList === null || currentCheckedElectronicSealIdList === void 0 ? void 0 : currentCheckedElectronicSealIdList.length) > 0 &&
|
|
188
|
+
currentContractId) {
|
|
189
|
+
appointSignLocation === null || appointSignLocation === void 0 ? void 0 : appointSignLocation({
|
|
190
|
+
otherParams: { personalSignUserIds: userIds },
|
|
191
|
+
isCheckUnStampedSeal: true,
|
|
192
|
+
spinningTip: i18next.t('接口调用中...'),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
onPersonalSignUserIdsChange === null || onPersonalSignUserIdsChange === void 0 ? void 0 : onPersonalSignUserIdsChange(userIds);
|
|
197
|
+
}
|
|
198
|
+
} }),
|
|
199
|
+
React.createElement(ElectronSealList, { sealList: electronList, value: currentCheckedElectronicSealIdList, onChange: onElectronicSealIdChange, isEdit: !!isStampElectron, style: { marginBottom: '30px' } }))) : (React.createElement(React.Fragment, null,
|
|
200
|
+
React.createElement(ElectronSealFirstLevelPerson, { firstLevelPersonName: firstLevelPersonName, checked: currentIsCheckedEconomic, isEdit: false, onChange: function () { } }),
|
|
201
|
+
React.createElement(ElectronSealPersonalSign, { personalSignList: personalSignList, value: currentPersonalSignUserIds, isEdit: false, onChange: function () { } }),
|
|
202
|
+
React.createElement(ElectronSealDetail, { sealList: electronList, value: currentCheckedElectronicSealIdList }))),
|
|
185
203
|
props: props,
|
|
186
204
|
};
|
|
187
205
|
};
|
|
@@ -5,6 +5,8 @@ interface IOptions {
|
|
|
5
5
|
deptId?: IElectronSignaturesItem['deptId'];
|
|
6
6
|
secondDepId?: IElectronSignaturesItem['secondDepId'];
|
|
7
7
|
flowId?: IElectronSignaturesItem['flowId'];
|
|
8
|
+
/** 个人签署配置的组织机构类型 1=业务组织机构(默认) 2=行政组织机构 4=人事范围 */
|
|
9
|
+
organizationType?: number | string;
|
|
8
10
|
records?: any;
|
|
9
11
|
canEdit?: any;
|
|
10
12
|
}
|
|
@@ -14,6 +16,8 @@ interface IOptions {
|
|
|
14
16
|
export default function useFetchElectronData(options: IOptions): {
|
|
15
17
|
/** 当前印章列表数据 */
|
|
16
18
|
electronList: any;
|
|
19
|
+
/** 个人签署(手签章)配置列表 后端已展开最终签署用户 signUsers */
|
|
20
|
+
personalSignList: any[];
|
|
17
21
|
/** 当前经济责任人(一级责任人)数据 */
|
|
18
22
|
firstLevelPersonName: string;
|
|
19
23
|
};
|