zmdms-webui 3.1.7 → 3.1.9
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/es/applayoutsider/menu/MainMenu.js +1 -1
- package/dist/es/applayoutsider/menu/SubMenu.js +8 -1
- package/dist/es/canvastable/canvasTable.js +1 -0
- package/dist/es/config/MyStorage.js +11 -5
- package/dist/es/config/ZtxkContext.d.ts +10 -0
- package/dist/es/config/ZtxkContext.js +2 -0
- package/dist/es/config/index.js +1 -0
- package/dist/es/config/utils.js +58 -1
- package/dist/es/dynamicsetting/dynamicDrawer.js +61 -19
- package/dist/es/dynamicsetting/dynamicSetting.js +4 -4
- package/dist/es/dynamicsetting/hooks.js +4 -4
- package/dist/es/dynamicsetting/index.css +1 -1
- package/dist/es/dynamicsetting/index.js +1 -0
- package/dist/es/dynamicsetting/interface.d.ts +5 -0
- package/dist/es/dynamicsetting/useDynamic.js +5 -1
- package/dist/es/dynamicsetting/useSearch.js +26 -6
- package/dist/es/dynamicsetting/useTemplate.d.ts +4 -0
- package/dist/es/dynamicsetting/useTemplate.js +428 -0
- package/dist/es/electronsignatures/content.js +974 -0
- package/dist/es/electronsignatures/dgcomponents/contract-comparison.js +2 -2
- package/dist/es/electronsignatures/dgcomponents/file-comparison-btn.js +136 -0
- package/dist/es/electronsignatures/dgcomponents/new-contract-comparison.js +54 -0
- package/dist/es/electronsignatures/dgcomponents/useContractColumns.js +110 -39
- package/dist/es/electronsignatures/electron-signatures-fragment.js +11 -3
- package/dist/es/electronsignatures/electroncomponents/electron-seal-batch-download.js +179 -67
- package/dist/es/electronsignatures/electroncomponents/electron-seal-detail.js +5 -5
- package/dist/es/electronsignatures/electroncomponents/electron-seal-item-detail.js +15 -0
- package/dist/es/electronsignatures/electroncomponents/electron-seal-item.js +9 -6
- package/dist/es/electronsignatures/electroncomponents/useElectronColumns.js +330 -154
- package/dist/es/electronsignatures/electroncomponents/useFetchElectronData.js +58 -9
- package/dist/es/electronsignatures/electroncomponents/utils.js +119 -28
- package/dist/es/electronsignatures/filecomponents/file-operation.js +6 -4
- package/dist/es/electronsignatures/filecomponents/new-file-operation.js +56 -0
- package/dist/es/electronsignatures/filecomponents/useFileColumns.js +179 -102
- package/dist/es/electronsignatures/hooks/useGetQjVerifyCode.js +134 -0
- package/dist/es/electronsignatures/hooks/useMergeRecords.js +4 -3
- package/dist/es/electronsignatures/hooks/useParseElectronSetting.js +5 -3
- package/dist/es/electronsignatures/hooks/useParseIsNeedElectronData.js +21 -2
- package/dist/es/electronsignatures/hooks/useParseQunjSingleData.js +6 -1
- package/dist/es/electronsignatures/hooks/useParseRecords.js +41 -34
- package/dist/es/electronsignatures/index.css +1 -1
- package/dist/es/electronsignatures/index.js +18 -833
- package/dist/es/electronsignatures/interface.d.ts +129 -5
- package/dist/es/electronsignatures/interface.js +9 -4
- package/dist/es/electronsignatures/qunjcomponents/qunj-check.js +2 -2
- package/dist/es/electronsignatures/qunjcomponents/qunj-detail.js +135 -14
- package/dist/es/electronsignatures/qunjcomponents/qunj-list.js +33 -13
- package/dist/es/electronsignatures/qunjcomponents/useFetchQunjData.js +8 -3
- package/dist/es/electronsignatures/qunjcomponents/useQunjColumns.js +202 -202
- package/dist/es/electronsignatures/translatecomponents/TranslateButton.js +27 -0
- package/dist/es/electronsignatures/translatecomponents/useTranslateCom.js +35 -0
- package/dist/es/form/common-search-list.js +28 -9
- package/dist/es/form/form.js +13 -11
- package/dist/es/form/useCommonSearch.js +3 -4
- package/dist/es/table/components/EnhanceBodyBasicCell.js +9 -0
- package/dist/es/table/components/useDragRef.js +6 -0
- package/dist/es/table/constant.js +4 -1
- package/dist/es/table/hooks/useCtrl.js +44 -0
- package/dist/es/table/hooks/useSelectSubtotal.js +376 -0
- package/dist/es/table/index.css +1 -1
- package/dist/es/table/interface.d.ts +6 -0
- package/dist/es/table/table.js +15 -3
- package/dist/index.build.d.ts +1 -0
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/dist/index.es.js +1 -0
- package/dist/less/components/DynamicSetting/style/index.less +38 -0
- package/dist/less/components/ElectronSignatures/style/index.less +37 -5
- package/dist/less/components/Table/style/index.less +41 -0
- package/package.json +1 -1
- package/dist/es/electronsignatures/electroncomponents/electron-seal-download.js +0 -74
|
@@ -1,178 +1,354 @@
|
|
|
1
1
|
import { __assign } from '../../_virtual/_tslib.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useContext } from 'react';
|
|
3
4
|
import { getColumnMergeProp, DATA_TYPE_KEY } from '../hooks/useParseRecords.js';
|
|
4
|
-
import
|
|
5
|
+
import ElectronSealItemDetail from './electron-seal-item-detail.js';
|
|
5
6
|
import ElectronSealItem from './electron-seal-item.js';
|
|
6
7
|
import ElectronSealList from './electron-seal-list.js';
|
|
7
8
|
import ElectronSealDetail, { NoUseElectronSeal } from './electron-seal-detail.js';
|
|
8
9
|
import ElectronSealFirstLevelPerson from './electron-seal-firstLevelPerson.js';
|
|
9
10
|
import ElectronSealSetting from './electron-seal-setting.js';
|
|
10
11
|
import { currentRecordIsOnlyQunj } from '../utils.js';
|
|
12
|
+
import { ElectronSignaturesContext } from '../index.js';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* 生成电子印章列
|
|
14
16
|
*/
|
|
15
17
|
function useElectronColumns(options) {
|
|
16
|
-
var
|
|
18
|
+
var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, fmsIsElectronicSealLabel = options.fmsIsElectronicSealLabel, fmsIsElectronicSealPushLabel = options.fmsIsElectronicSealPushLabel, openingContractSealLabel = options.openingContractSealLabel, isDeleteAllFileWhenJustUseQj = options.isDeleteAllFileWhenJustUseQj, isShowOpeningContractSealHand = options.isShowOpeningContractSeal, isShowOpeningContractSealNotRelyQys = options.isShowOpeningContractSealNotRelyQys;
|
|
19
|
+
var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
|
|
17
20
|
var currentDataType = dataTypeSort === null || dataTypeSort === void 0 ? void 0 : dataTypeSort[0];
|
|
18
21
|
var _a = allData[currentDataType] || {}, isStampElectron = _a.isStampElectron, needQys = _a.needQys, currentContractId = _a.currentContractId, appointSignLocation = _a.appointSignLocation, viewSignPage = _a.viewSignPage, isEdit = _a.isEdit;
|
|
19
22
|
var currentOnlyQunj = currentRecordIsOnlyQunj(records === null || records === void 0 ? void 0 : records[0]);
|
|
20
|
-
//
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
// 盖电子印章逻辑
|
|
24
|
+
var checkElectronColumn = {
|
|
25
|
+
title: "盖电子印章",
|
|
26
|
+
dataIndex: "isStampElectron",
|
|
27
|
+
key: "isStampElectron",
|
|
28
|
+
width: 135,
|
|
29
|
+
align: "center",
|
|
30
|
+
render: function (text, record, index) {
|
|
31
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
32
|
+
if (currentOnlyQunj) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
var _a = getColumnMergeProp({
|
|
36
|
+
record: record,
|
|
37
|
+
index: index,
|
|
38
|
+
records: records,
|
|
39
|
+
dataTypeSort: dataTypeSort,
|
|
40
|
+
}), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
|
|
41
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, onIsStampElectronChange = _b.onIsStampElectronChange, setSameTypeRecords = _b.setRecords,
|
|
42
|
+
// currentDocAttachMap,
|
|
43
|
+
fileFieldsNameRef = _b.fileFieldsNameRef,
|
|
44
|
+
// flowStatus,
|
|
45
|
+
needQys = _b.needQys;
|
|
46
|
+
var _c = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, _d = _c.fmsIsPushBank, fmsIsPushBankKey = _d === void 0 ? "fmsIsPushBank" : _d, _e = _c.fmsIsElectronicSeal, fmsIsElectronicSealKey = _e === void 0 ? "fmsIsElectronicSeal" : _e, _f = _c.openingContractSeal, openingContractSealKey = _f === void 0 ? "openingContractSeal" : _f;
|
|
47
|
+
// 是否显示产融平台复选框
|
|
48
|
+
var isShowFms = (record === null || record === void 0 ? void 0 : record.showFmsIsElectronicSeal) &&
|
|
49
|
+
(record === null || record === void 0 ? void 0 : record[fmsIsElectronicSealKey]) != null &&
|
|
50
|
+
(record === null || record === void 0 ? void 0 : record.attachType) === "001" &&
|
|
51
|
+
(record === null || record === void 0 ? void 0 : record.isElectronicSeal);
|
|
52
|
+
// 20250526 这里的加盖产融章逻辑之前是与是否勾选盖章件有关的
|
|
53
|
+
// 如果产品再次提出这个需求,可以使用这个属性
|
|
54
|
+
// const isDetialShowFms =
|
|
55
|
+
// record?.showFmsIsElectronicSeal &&
|
|
56
|
+
// record?.[fmsIsElectronicSealKey] != null &&
|
|
57
|
+
// record?.attachType === '001';
|
|
58
|
+
// 是否显示推送银行复选框
|
|
59
|
+
var isShowBank = (record === null || record === void 0 ? void 0 : record.showFmsIsPushBank) &&
|
|
60
|
+
(record === null || record === void 0 ? void 0 : record[fmsIsPushBankKey]) != null &&
|
|
61
|
+
(record === null || record === void 0 ? void 0 : record.attachType) === "001" &&
|
|
62
|
+
(record === null || record === void 0 ? void 0 : record.isElectronicSeal);
|
|
63
|
+
// 是否显示户用合同章复选框
|
|
64
|
+
var getShowOpeningContractSeal = isShowOpeningContractSealHand
|
|
65
|
+
? isShowOpeningContractSealHand(record, {
|
|
66
|
+
dataTypeIndex: index - preDataTypeRecordsLength,
|
|
67
|
+
dataType: currentDataType,
|
|
68
|
+
})
|
|
69
|
+
: false;
|
|
70
|
+
var isShowOpeningContractSeal = isShowOpeningContractSealHand
|
|
71
|
+
? getShowOpeningContractSeal
|
|
72
|
+
: record === null || record === void 0 ? void 0 : record.showOpeningContractSeal;
|
|
73
|
+
// 20250416这个条件是多余的,如果默认盖电子印章已经勾选了,这个值不会被赋值。
|
|
74
|
+
// 上面的产融和银行,有同样的问题。但是为了防止对现有代码做出改造,还是不做任何处理。
|
|
75
|
+
// record?.[openingContractSealKey] != null &&
|
|
76
|
+
// 户用合同章显示与否,跟附件类型无关。
|
|
77
|
+
// && record?.attachType === '001';
|
|
78
|
+
// 户用合同章的显示与否,只跟自身相关。
|
|
79
|
+
// && record?.isElectronicSeal;
|
|
80
|
+
// 是否盖产融平台
|
|
81
|
+
var fmsIsElectronicSeal = (record === null || record === void 0 ? void 0 : record[fmsIsElectronicSealKey]) + "" === "1" ? true : false;
|
|
82
|
+
// 是否推送银行
|
|
83
|
+
var fmsIsPushBank = (record === null || record === void 0 ? void 0 : record[fmsIsPushBankKey]) + "" === "1" ? true : false;
|
|
84
|
+
// 是否盖户用合同章
|
|
85
|
+
var openingContractSeal = (record === null || record === void 0 ? void 0 : record[openingContractSealKey]) + "" === "1" ? true : false;
|
|
86
|
+
// 是否盖电子印章
|
|
87
|
+
var isElectronicSeal = (record === null || record === void 0 ? void 0 : record.isElectronicSeal) + "" === "1" ? true : false;
|
|
88
|
+
// 处理能否切换是否盖电子印章逻辑
|
|
89
|
+
return !needQys &&
|
|
90
|
+
!isShowOpeningContractSealNotRelyQys ? null : isEdit ? (jsx(ElectronSealItem, { disabled: !isEdit, checked: record === null || record === void 0 ? void 0 : record.isElectronicSeal, needQys: needQys, onChange: function (checked) {
|
|
91
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
92
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
93
|
+
onIsStampElectronChange(checked, dataTypeIndex);
|
|
94
|
+
}, isShowFms: isShowFms, isShowBank: isShowBank, fmsIsElectronicSealPushLabel: fmsIsElectronicSealPushLabel, fmsIsPushBank: fmsIsPushBank, fmsIsElectronicSealLabel: fmsIsElectronicSealLabel, fmsIsElectronicSeal: fmsIsElectronicSeal, isShowOpeningContractSeal: isShowOpeningContractSeal, openingContractSeal: openingContractSeal, openingContractSealLabel: openingContractSealLabel, onFmsIsElectronicSealChange: function (checked, type) {
|
|
95
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
96
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
97
|
+
setSameTypeRecords(function (preRecords) {
|
|
98
|
+
var _a;
|
|
99
|
+
var copyRecords = preRecords.slice();
|
|
100
|
+
var item = copyRecords[dataTypeIndex];
|
|
101
|
+
var key = "";
|
|
102
|
+
var clearItem = {};
|
|
103
|
+
switch (type) {
|
|
104
|
+
case "fmsElectron":
|
|
105
|
+
key = fmsIsElectronicSealKey;
|
|
106
|
+
break;
|
|
107
|
+
case "fmsPush":
|
|
108
|
+
key = fmsIsPushBankKey;
|
|
109
|
+
break;
|
|
110
|
+
// 户用合同章的逻辑与盖电子印章的逻辑互斥
|
|
111
|
+
case "openingContractSeal":
|
|
112
|
+
// 如果当前选中 并且盖电子印章也选中了 那么需要清空盖电子印章的逻辑
|
|
113
|
+
if (checked && item.isElectronicSeal + "" === "1") {
|
|
114
|
+
clearItem.isElectronicSeal = 0;
|
|
115
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
116
|
+
var dataTypeIndex_1 = index - preDataTypeRecordsLength;
|
|
117
|
+
onIsStampElectronChange(false, dataTypeIndex_1);
|
|
118
|
+
}
|
|
119
|
+
key = openingContractSealKey;
|
|
120
|
+
break;
|
|
36
121
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
122
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign(__assign({}, item), clearItem), (_a = {}, _a[key] = checked ? 1 : 0, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
123
|
+
return copyRecords;
|
|
124
|
+
});
|
|
125
|
+
} })) : (jsx(ElectronSealItemDetail, { isElectronicSeal: isElectronicSeal, isShowFms: isShowFms, fmsIsElectronicSeal: fmsIsElectronicSeal, fmsIsElectronicSealLabel: fmsIsElectronicSealLabel, isShowBank: isShowBank, fmsIsPushBank: fmsIsPushBank, fmsIsElectronicSealPushLabel: fmsIsElectronicSealPushLabel, isShowOpeningContractSeal: isShowOpeningContractSeal, openingContractSeal: openingContractSeal, openingContractSealLabel: openingContractSealLabel }));
|
|
126
|
+
// (
|
|
127
|
+
// // 这里按照最新的逻辑,不在显示下载按钮,只显示勾选了哪些印章(是否盖电子印章、是否加盖产融平台章、是否盖户用合同章)
|
|
128
|
+
// <ElectronSealDownload
|
|
129
|
+
// docAttachMap={currentDocAttachMap}
|
|
130
|
+
// record={record}
|
|
131
|
+
// fileFieldsNameRef={fileFieldsNameRef}
|
|
132
|
+
// request={request}
|
|
133
|
+
// flowStatus={flowStatus}
|
|
134
|
+
// checked={record?.isElectronicSeal}
|
|
135
|
+
// />
|
|
136
|
+
// );
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
// 选择电子印章逻辑
|
|
140
|
+
var selectElectronRender = function (text, record, index) {
|
|
141
|
+
// 需要合并
|
|
142
|
+
var _a = getColumnMergeProp({
|
|
143
|
+
record: record,
|
|
144
|
+
index: index,
|
|
145
|
+
records: records,
|
|
146
|
+
dataTypeSort: dataTypeSort,
|
|
147
|
+
}), props = _a.props, currentDataType = _a.currentDataType;
|
|
148
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
149
|
+
if (currentOnlyQunj && isDeleteAllFileWhenJustUseQj) {
|
|
150
|
+
return {
|
|
151
|
+
children: null,
|
|
152
|
+
props: props,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
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;
|
|
156
|
+
// 1. 处理当前类型的数据需不需要契约锁
|
|
157
|
+
// 2. 处理当前类型的数据处不处于编辑状态
|
|
158
|
+
return {
|
|
159
|
+
children: !needQys ? (jsx(NoUseElectronSeal, {})) : isEdit ? (jsxs(Fragment, { children: [jsx(ElectronSealFirstLevelPerson, { firstLevelPersonName: firstLevelPersonName, checked: currentIsCheckedEconomic, isEdit: !!isStampElectron, onChange: function (e) {
|
|
160
|
+
// 如果此时已经选了电子印章的话,更改是否切换一级责任人
|
|
161
|
+
// 将重新调用 指定签署位置的 逻辑(因为指定签署位置 需要传递是否选中一级责任人 如果这个一级责任人是否选中更改了的话 需要重新告诉后端 处理一些逻辑)
|
|
162
|
+
// 前提是已经去契约锁盖过章了(已经产生合同ID了)
|
|
163
|
+
if ((currentCheckedElectronicSealIdList === null || currentCheckedElectronicSealIdList === void 0 ? void 0 : currentCheckedElectronicSealIdList.length) > 0 &&
|
|
164
|
+
currentContractId) {
|
|
165
|
+
appointSignLocation === null || appointSignLocation === void 0 ? void 0 : appointSignLocation({
|
|
166
|
+
otherParams: {
|
|
167
|
+
needYjzrr: e.target.checked,
|
|
168
|
+
},
|
|
169
|
+
isCheckUnStampedSeal: true,
|
|
170
|
+
spinningTip: "接口调用中...",
|
|
75
171
|
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
onCheckedEconomicChange(e);
|
|
175
|
+
}
|
|
176
|
+
} }), jsx(ElectronSealList, { sealList: electronList, value: currentCheckedElectronicSealIdList, onChange: onElectronicSealIdChange, isEdit: !!isStampElectron, style: { marginBottom: "30px" } })] })) : (jsx(ElectronSealDetail, { sealList: electronList, value: currentCheckedElectronicSealIdList })),
|
|
177
|
+
props: props,
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
// 契约锁相关配置
|
|
181
|
+
var electronColumns = isNewQys
|
|
182
|
+
? [
|
|
183
|
+
checkElectronColumn,
|
|
184
|
+
{
|
|
185
|
+
title: (jsxs("div", __assign({ className: "file-title" }, { children: [jsx("div", __assign({ className: "file-label" }, { children: "\u9009\u62E9\u7535\u5B50\u5370\u7AE0" })), jsx("div", __assign({ className: "file-upload" }, { children: currentOnlyQunj ? null : !needQys ? null : isStampElectron ? (jsx(ElectronSealSetting, { contractId: currentContractId, appointSignLocation: appointSignLocation, viewSignPage: viewSignPage, isEdit: isEdit })) : null }))] }))),
|
|
186
|
+
dataIndex: "electronList",
|
|
187
|
+
key: "electronList",
|
|
188
|
+
width: 320,
|
|
189
|
+
align: "center",
|
|
190
|
+
render: selectElectronRender,
|
|
191
|
+
},
|
|
192
|
+
]
|
|
193
|
+
: // 下面是最初设计的模式
|
|
194
|
+
[
|
|
79
195
|
{
|
|
80
|
-
title:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
196
|
+
// title: '电子印章',
|
|
197
|
+
title: (jsxs("div", __assign({ className: "file-title" }, { children: [jsx("div", __assign({ className: "file-label" }, { children: "\u7535\u5B50\u5370\u7AE0" })), jsx("div", __assign({ className: "file-upload" }, { children: currentOnlyQunj ? null : !needQys ? null : isStampElectron ? (jsx(ElectronSealSetting, { contractId: currentContractId, appointSignLocation: appointSignLocation, viewSignPage: viewSignPage, isEdit: isEdit })) : null }))] }))),
|
|
198
|
+
children: [
|
|
199
|
+
checkElectronColumn,
|
|
200
|
+
// {
|
|
201
|
+
// title: '盖电子印章',
|
|
202
|
+
// dataIndex: 'isStampElectron',
|
|
203
|
+
// key: 'isStampElectron',
|
|
204
|
+
// width: 100,
|
|
205
|
+
// align: 'center',
|
|
206
|
+
// render: (text, record, index) => {
|
|
207
|
+
// const currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
208
|
+
// if (currentOnlyQunj) {
|
|
209
|
+
// return null;
|
|
210
|
+
// }
|
|
211
|
+
// const { currentDataType, preDataTypeRecordsLength } =
|
|
212
|
+
// getColumnMergeProp({
|
|
213
|
+
// record,
|
|
214
|
+
// index,
|
|
215
|
+
// records,
|
|
216
|
+
// dataTypeSort,
|
|
217
|
+
// });
|
|
218
|
+
// const {
|
|
219
|
+
// isEdit,
|
|
220
|
+
// onIsStampElectronChange,
|
|
221
|
+
// setRecords: setSameTypeRecords,
|
|
222
|
+
// currentDocAttachMap,
|
|
223
|
+
// fileFieldsNameRef,
|
|
224
|
+
// flowStatus,
|
|
225
|
+
// needQys,
|
|
226
|
+
// } = allData[currentDataType] || {};
|
|
227
|
+
// const {
|
|
228
|
+
// fmsIsPushBank: fmsIsPushBankKey = 'fmsIsPushBank',
|
|
229
|
+
// fmsIsElectronicSeal:
|
|
230
|
+
// fmsIsElectronicSealKey = 'fmsIsElectronicSeal',
|
|
231
|
+
// } = fileFieldsNameRef?.current || {};
|
|
232
|
+
// // 是否显示产融平台相关逻辑
|
|
233
|
+
// const isShowFms =
|
|
234
|
+
// record?.showFmsIsElectronicSeal &&
|
|
235
|
+
// record?.[fmsIsElectronicSealKey] != null &&
|
|
236
|
+
// record?.attachType === '001' &&
|
|
237
|
+
// record?.isElectronicSeal;
|
|
238
|
+
// // 是否推送银行
|
|
239
|
+
// const isShowBank =
|
|
240
|
+
// record?.showFmsIsPushBank &&
|
|
241
|
+
// record?.[fmsIsPushBankKey] != null &&
|
|
242
|
+
// record?.attachType === '001' &&
|
|
243
|
+
// record?.isElectronicSeal;
|
|
244
|
+
// // 是否盖产融平台
|
|
245
|
+
// const fmsIsElectronicSeal =
|
|
246
|
+
// record?.[fmsIsElectronicSealKey] + '' === '1' ? true : false;
|
|
247
|
+
// // 是否推送银行
|
|
248
|
+
// const fmsIsPushBank =
|
|
249
|
+
// record?.[fmsIsPushBankKey] + '' === '1' ? true : false;
|
|
250
|
+
// // 处理能否切换是否盖电子印章逻辑
|
|
251
|
+
// return !needQys ? null : isEdit ? (
|
|
252
|
+
// <ElectronSealItem
|
|
253
|
+
// disabled={!isEdit}
|
|
254
|
+
// checked={record?.isElectronicSeal}
|
|
255
|
+
// onChange={(checked) => {
|
|
256
|
+
// // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
257
|
+
// const dataTypeIndex = index - preDataTypeRecordsLength;
|
|
258
|
+
// onIsStampElectronChange(checked, dataTypeIndex);
|
|
259
|
+
// }}
|
|
260
|
+
// isShowFms={isShowFms}
|
|
261
|
+
// isShowBank={isShowBank}
|
|
262
|
+
// fmsIsElectronicSealPushLabel={fmsIsElectronicSealPushLabel}
|
|
263
|
+
// fmsIsPushBank={fmsIsPushBank}
|
|
264
|
+
// fmsIsElectronicSealLabel={fmsIsElectronicSealLabel}
|
|
265
|
+
// fmsIsElectronicSeal={fmsIsElectronicSeal}
|
|
266
|
+
// onFmsIsElectronicSealChange={(checked, type) => {
|
|
267
|
+
// // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
268
|
+
// const dataTypeIndex = index - preDataTypeRecordsLength;
|
|
269
|
+
// setSameTypeRecords((preRecords) => {
|
|
270
|
+
// const copyRecords = preRecords.slice();
|
|
271
|
+
// const item = copyRecords[dataTypeIndex];
|
|
272
|
+
// copyRecords.splice(dataTypeIndex, 1, {
|
|
273
|
+
// ...item,
|
|
274
|
+
// [type === 'fmsElectron'
|
|
275
|
+
// ? fmsIsElectronicSealKey
|
|
276
|
+
// : fmsIsPushBankKey]: checked ? 1 : 0,
|
|
277
|
+
// [DATA_TYPE_KEY]: currentDataType,
|
|
278
|
+
// });
|
|
279
|
+
// return copyRecords;
|
|
280
|
+
// });
|
|
281
|
+
// }}
|
|
282
|
+
// />
|
|
283
|
+
// ) : (
|
|
284
|
+
// <ElectronSealDownload
|
|
285
|
+
// docAttachMap={currentDocAttachMap}
|
|
286
|
+
// record={record}
|
|
287
|
+
// fileFieldsNameRef={fileFieldsNameRef}
|
|
288
|
+
// request={request}
|
|
289
|
+
// flowStatus={flowStatus}
|
|
290
|
+
// checked={record?.isElectronicSeal}
|
|
291
|
+
// />
|
|
292
|
+
// );
|
|
293
|
+
// },
|
|
294
|
+
// },
|
|
295
|
+
{
|
|
296
|
+
title: "选择电子印章",
|
|
297
|
+
dataIndex: "electronList",
|
|
298
|
+
key: "electronList",
|
|
299
|
+
width: 260,
|
|
300
|
+
align: "center",
|
|
301
|
+
render: selectElectronRender,
|
|
302
|
+
},
|
|
303
|
+
// 2024-07-30
|
|
304
|
+
// 产品要求去掉每种类型的指定位置 预览盖章效果等字样
|
|
305
|
+
// {
|
|
306
|
+
// title: '电子印章设置',
|
|
307
|
+
// dataIndex: 'isElectronSetting',
|
|
308
|
+
// key: 'isElectronSetting',
|
|
309
|
+
// width: 100,
|
|
310
|
+
// align: 'center',
|
|
311
|
+
// render: (text, record, index) => {
|
|
312
|
+
// // 需要合并
|
|
313
|
+
// const { currentDataType, props } = getColumnMergeProp({
|
|
314
|
+
// record,
|
|
315
|
+
// index,
|
|
316
|
+
// records,
|
|
317
|
+
// dataTypeSort,
|
|
318
|
+
// });
|
|
319
|
+
// const {
|
|
320
|
+
// isStampElectron,
|
|
321
|
+
// needQys,
|
|
322
|
+
// currentContractId,
|
|
323
|
+
// appointSignLocation,
|
|
324
|
+
// viewSignPage,
|
|
325
|
+
// isEdit,
|
|
326
|
+
// } = allData[currentDataType] || {};
|
|
327
|
+
// const currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
328
|
+
// if (currentOnlyQunj) {
|
|
329
|
+
// return {
|
|
330
|
+
// children: null,
|
|
331
|
+
// props,
|
|
332
|
+
// };
|
|
333
|
+
// }
|
|
334
|
+
// return {
|
|
335
|
+
// children: !needQys ? (
|
|
336
|
+
// '暂不需要契约锁数据'
|
|
337
|
+
// ) : isStampElectron ? (
|
|
338
|
+
// <ElectronSealSetting
|
|
339
|
+
// contractId={currentContractId}
|
|
340
|
+
// appointSignLocation={appointSignLocation}
|
|
341
|
+
// viewSignPage={viewSignPage}
|
|
342
|
+
// isEdit={isEdit}
|
|
343
|
+
// />
|
|
344
|
+
// ) : null,
|
|
345
|
+
// props,
|
|
346
|
+
// };
|
|
347
|
+
// },
|
|
348
|
+
// },
|
|
349
|
+
],
|
|
126
350
|
},
|
|
127
|
-
|
|
128
|
-
// 产品要求去掉每种类型的指定位置 预览盖章效果等字样
|
|
129
|
-
// {
|
|
130
|
-
// title: '电子印章设置',
|
|
131
|
-
// dataIndex: 'isElectronSetting',
|
|
132
|
-
// key: 'isElectronSetting',
|
|
133
|
-
// width: 100,
|
|
134
|
-
// align: 'center',
|
|
135
|
-
// render: (text, record, index) => {
|
|
136
|
-
// // 需要合并
|
|
137
|
-
// const { currentDataType, props } = getColumnMergeProp({
|
|
138
|
-
// record,
|
|
139
|
-
// index,
|
|
140
|
-
// records,
|
|
141
|
-
// dataTypeSort,
|
|
142
|
-
// });
|
|
143
|
-
// const {
|
|
144
|
-
// isStampElectron,
|
|
145
|
-
// needQys,
|
|
146
|
-
// currentContractId,
|
|
147
|
-
// appointSignLocation,
|
|
148
|
-
// viewSignPage,
|
|
149
|
-
// isEdit,
|
|
150
|
-
// } = allData[currentDataType] || {};
|
|
151
|
-
// const currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
152
|
-
// if (currentOnlyQunj) {
|
|
153
|
-
// return {
|
|
154
|
-
// children: null,
|
|
155
|
-
// props,
|
|
156
|
-
// };
|
|
157
|
-
// }
|
|
158
|
-
// return {
|
|
159
|
-
// children: !needQys ? (
|
|
160
|
-
// '暂不需要契约锁数据'
|
|
161
|
-
// ) : isStampElectron ? (
|
|
162
|
-
// <ElectronSealSetting
|
|
163
|
-
// contractId={currentContractId}
|
|
164
|
-
// appointSignLocation={appointSignLocation}
|
|
165
|
-
// viewSignPage={viewSignPage}
|
|
166
|
-
// isEdit={isEdit}
|
|
167
|
-
// />
|
|
168
|
-
// ) : null,
|
|
169
|
-
// props,
|
|
170
|
-
// };
|
|
171
|
-
// },
|
|
172
|
-
// },
|
|
173
|
-
],
|
|
174
|
-
},
|
|
175
|
-
];
|
|
351
|
+
];
|
|
176
352
|
return {
|
|
177
353
|
electronColumns: electronColumns,
|
|
178
354
|
};
|
|
@@ -5,7 +5,7 @@ import myMessage from '../../message/index.js';
|
|
|
5
5
|
* 获取电子印章远程数据
|
|
6
6
|
*/
|
|
7
7
|
function useFetchElectronData(options) {
|
|
8
|
-
var request = options.request, needQys = options.needQys, deptId = options.deptId, flowId = options.flowId, records = options.records;
|
|
8
|
+
var request = options.request, needQys = options.needQys, deptId = options.deptId, secondDepId = options.secondDepId, flowId = options.flowId, records = options.records;
|
|
9
9
|
// records里面是否有勾选了电子印章的数据
|
|
10
10
|
var hasElectronMemo = useMemo(function () {
|
|
11
11
|
var _a;
|
|
@@ -27,6 +27,9 @@ function useFetchElectronData(options) {
|
|
|
27
27
|
if (params.flowId) {
|
|
28
28
|
newParam.flowId = params.flowId;
|
|
29
29
|
}
|
|
30
|
+
if (params.secondDepId) {
|
|
31
|
+
newParam.secondDepId = params.secondDepId;
|
|
32
|
+
}
|
|
30
33
|
return request === null || request === void 0 ? void 0 : request({
|
|
31
34
|
url: "/api/zmdms-resource/flowdeptseal/select-seal-info-list",
|
|
32
35
|
params: newParam,
|
|
@@ -73,6 +76,33 @@ function useFetchElectronData(options) {
|
|
|
73
76
|
return Promise.reject(error);
|
|
74
77
|
});
|
|
75
78
|
}, [request]);
|
|
79
|
+
// 获取一级责任人名字 通过二级单元
|
|
80
|
+
var getFirstLevelPersonBysecondDepId = useCallback(function (secondDepId) {
|
|
81
|
+
return request({
|
|
82
|
+
url: "/api/zmdms-resource/seal/get-yjzrr-name-by-sec-unit/".concat(secondDepId),
|
|
83
|
+
method: "GET",
|
|
84
|
+
})
|
|
85
|
+
.then(function (res) {
|
|
86
|
+
var _a;
|
|
87
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
88
|
+
return (_a = res.data.data) === null || _a === void 0 ? void 0 : _a.userName;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
// 20240920:不需要报错提示
|
|
92
|
+
// if (canEdit) {
|
|
93
|
+
// message.error(res.data.msg || '出错了');
|
|
94
|
+
// }
|
|
95
|
+
return Promise.reject(res);
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
.catch(function (error) {
|
|
99
|
+
// 20240920:不需要报错提示
|
|
100
|
+
// if (canEdit) {
|
|
101
|
+
// message.error(error?.response?.data?.msg || '请求失败!');
|
|
102
|
+
// }
|
|
103
|
+
return Promise.reject(error);
|
|
104
|
+
});
|
|
105
|
+
}, [request]);
|
|
76
106
|
// 获取契约锁列表数据
|
|
77
107
|
useEffect(function () {
|
|
78
108
|
// 如果不需要契约锁数据
|
|
@@ -98,15 +128,34 @@ function useFetchElectronData(options) {
|
|
|
98
128
|
}
|
|
99
129
|
if (!isFirstRenderRef.current && hasElectronMemo) {
|
|
100
130
|
isFirstRenderRef.current = true;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
131
|
+
if (deptId) {
|
|
132
|
+
getFirstLevelPerson(deptId)
|
|
133
|
+
.then(function (res) {
|
|
134
|
+
setFirstLevelPersonName(res);
|
|
135
|
+
})
|
|
136
|
+
.catch(function (err) {
|
|
137
|
+
setFirstLevelPersonName("");
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
else if (secondDepId) {
|
|
141
|
+
getFirstLevelPersonBysecondDepId(secondDepId)
|
|
142
|
+
.then(function (res) {
|
|
143
|
+
setFirstLevelPersonName(res);
|
|
144
|
+
})
|
|
145
|
+
.catch(function (err) {
|
|
146
|
+
setFirstLevelPersonName("");
|
|
147
|
+
});
|
|
148
|
+
}
|
|
108
149
|
}
|
|
109
|
-
}, [
|
|
150
|
+
}, [
|
|
151
|
+
getFirstLevelPerson,
|
|
152
|
+
getFirstLevelPersonBysecondDepId,
|
|
153
|
+
needQys,
|
|
154
|
+
deptId,
|
|
155
|
+
secondDepId,
|
|
156
|
+
hasElectronMemo,
|
|
157
|
+
isFirstRenderRef,
|
|
158
|
+
]);
|
|
110
159
|
return {
|
|
111
160
|
/** 当前印章列表数据 */
|
|
112
161
|
electronList: electronList,
|