zmdms-webui 3.1.8 → 3.2.0
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 +60 -10
- 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 +2 -0
- package/dist/es/table/table.js +14 -2
- 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 +32 -0
- package/package.json +2 -2
- package/dist/es/electronsignatures/electroncomponents/electron-seal-download.js +0 -74
|
@@ -23,7 +23,7 @@ var ContractComparison = function (props) {
|
|
|
23
23
|
});
|
|
24
24
|
} }, { children: "\u9009\u62E9\u6BD4\u5BF9\u6A21\u677F" }))) : null, taskId ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
25
25
|
lookCompareHandle(taskId);
|
|
26
|
-
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" }))) : templateAttachId && attachId ? (jsx(ButtonCom, __assign({ type: "link", style: { color:
|
|
26
|
+
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" }))) : templateAttachId && attachId ? (jsx(ButtonCom, __assign({ type: "link", style: { color: "rgb(255, 77, 79)" }, loading: loading, onClick: function () {
|
|
27
27
|
// 记录当前点击产生的一些参数
|
|
28
28
|
dgInfoRef.current = {
|
|
29
29
|
realIndex: realIndex,
|
|
@@ -41,7 +41,7 @@ var ContractComparison = function (props) {
|
|
|
41
41
|
} }, { children: "\u65E0\u4EFB\u52A1ID\uFF0C\u5F00\u59CB\u6BD4\u5BF9" }))) : null] })) : null, !record.isHideSaveCustomerReference && isShowSaveTemplate ? (jsx(Checkbox, __assign({ checked: isCustomerReference, onChange: function (e) {
|
|
42
42
|
onIsCustomerReferenceChange &&
|
|
43
43
|
onIsCustomerReferenceChange(e.target.checked);
|
|
44
|
-
} }, { children: "\u5B58\u5165\u6837\u677F" }))) : null] }))) : (jsxs("div", __assign({ className: "contract-comparison--wrap" }, { children: [jsx("div", { children: templateAttachName }), taskId && isNeedComparison ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
44
|
+
} }, { children: "\u5B58\u5165\u6837\u677F" }))) : null] }))) : (jsxs("div", __assign({ className: "contract-comparison--wrap" }, { children: [jsx("div", { children: templateAttachName }), !record.isHideSaveCustomerReference && isShowSaveTemplate ? (jsx(Checkbox, __assign({ checked: isCustomerReference, disabled: true }, { children: "\u5B58\u6837\u677F" }))) : null, taskId && isNeedComparison ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
45
45
|
lookCompareHandle(taskId);
|
|
46
46
|
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" }))) : null] })));
|
|
47
47
|
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { __spreadArray, __assign, __awaiter, __generator } from '../../_virtual/_tslib.js';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React__default, { useState, useImperativeHandle } from 'react';
|
|
4
|
+
import { unstable_batchedUpdates } from 'react-dom';
|
|
5
|
+
import { previewFile } from 'zmdms-utils';
|
|
6
|
+
import ButtonCom from '../../button/button.js';
|
|
7
|
+
import ModalComponent from '../../modal/modal.js';
|
|
8
|
+
import MemoTable from '../../table/table.js';
|
|
9
|
+
|
|
10
|
+
var FileComparisonBtn = function (props, ref) {
|
|
11
|
+
var compareHandle = props.compareHandle, lookCompareHandle = props.lookCompareHandle, onCompareClick = props.onCompareClick, fileBaseUrl = props.fileBaseUrl;
|
|
12
|
+
var _a = useState(false), loading = _a[0], setLoading = _a[1];
|
|
13
|
+
var _b = useState(false), visible = _b[0], setVisible = _b[1];
|
|
14
|
+
var _c = useState([]), data = _c[0], setData = _c[1];
|
|
15
|
+
var columns = [
|
|
16
|
+
{
|
|
17
|
+
title: "序号",
|
|
18
|
+
width: 62,
|
|
19
|
+
key: "index",
|
|
20
|
+
render: function (_text, _record, index) { return "".concat(index + 1); },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "附件1",
|
|
24
|
+
width: 300,
|
|
25
|
+
dataIndex: "attachId1",
|
|
26
|
+
key: "attachId1",
|
|
27
|
+
render: function (text, record) {
|
|
28
|
+
return (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
29
|
+
// previewFile(fileBaseUrl, text, {
|
|
30
|
+
// titleName: dangerouslySetXss(record.attach1Name),
|
|
31
|
+
// });
|
|
32
|
+
previewFile(text, record.attach1Name || "", {
|
|
33
|
+
API_BASEURL: fileBaseUrl,
|
|
34
|
+
});
|
|
35
|
+
} }, { children: record.attach1Name })));
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: "附件2",
|
|
40
|
+
width: 300,
|
|
41
|
+
dataIndex: "attachId2",
|
|
42
|
+
key: "attachId2",
|
|
43
|
+
render: function (text, record) {
|
|
44
|
+
return (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
45
|
+
// previewFile(fileBaseUrl, text, {
|
|
46
|
+
// titleName: dangerouslySetXss(record.attach2Name),
|
|
47
|
+
// });
|
|
48
|
+
previewFile(text, record.attach2Name || "", {
|
|
49
|
+
API_BASEURL: fileBaseUrl,
|
|
50
|
+
});
|
|
51
|
+
} }, { children: record.attach2Name })));
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "查看比对结果",
|
|
56
|
+
width: 100,
|
|
57
|
+
dataIndex: "taskId",
|
|
58
|
+
key: "taskId",
|
|
59
|
+
render: function (text, record) {
|
|
60
|
+
return (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
61
|
+
lookCompareHandle(text);
|
|
62
|
+
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" })));
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
useImperativeHandle(ref, function () {
|
|
67
|
+
return {
|
|
68
|
+
appendData: function (data) {
|
|
69
|
+
setData(function (preData) {
|
|
70
|
+
return __spreadArray(__spreadArray([], preData, true), [data], false);
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
return (jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "primary", style: { marginRight: "10px" }, loading: loading, onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var result_1, item_1, res;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
setLoading(true);
|
|
81
|
+
_a.label = 1;
|
|
82
|
+
case 1:
|
|
83
|
+
_a.trys.push([1, 4, , 5]);
|
|
84
|
+
return [4 /*yield*/, onCompareClick()];
|
|
85
|
+
case 2:
|
|
86
|
+
result_1 = _a.sent();
|
|
87
|
+
if (typeof result_1 === "string") {
|
|
88
|
+
setVisible(true);
|
|
89
|
+
setLoading(false);
|
|
90
|
+
return [2 /*return*/];
|
|
91
|
+
}
|
|
92
|
+
item_1 = {
|
|
93
|
+
attachId1: result_1[0].attachId,
|
|
94
|
+
attach1Name: result_1[0].attachName,
|
|
95
|
+
attachId2: result_1[1].attachId,
|
|
96
|
+
attach2Name: result_1[1].attachName,
|
|
97
|
+
taskId: "",
|
|
98
|
+
};
|
|
99
|
+
// 如果当前添加的附件,在data中存在,就不添加
|
|
100
|
+
if (data.some(function (item) {
|
|
101
|
+
return ((item.attachId1 === result_1[0].attachId &&
|
|
102
|
+
item.attachId2 === result_1[1].attachId) ||
|
|
103
|
+
(item.attachId1 === result_1[1].attachId &&
|
|
104
|
+
item.attachId2 === result_1[0].attachId));
|
|
105
|
+
})) {
|
|
106
|
+
setVisible(true);
|
|
107
|
+
setLoading(false);
|
|
108
|
+
return [2 /*return*/];
|
|
109
|
+
}
|
|
110
|
+
return [4 /*yield*/, compareHandle(item_1.attachId1, item_1.attachId2)];
|
|
111
|
+
case 3:
|
|
112
|
+
res = _a.sent();
|
|
113
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
114
|
+
item_1.taskId = res.data.data.taskId;
|
|
115
|
+
}
|
|
116
|
+
unstable_batchedUpdates(function () {
|
|
117
|
+
setData(function (preData) {
|
|
118
|
+
return __spreadArray(__spreadArray([], preData, true), [item_1], false).map(function (item, index) { return (__assign(__assign({}, item), { index: index })); });
|
|
119
|
+
});
|
|
120
|
+
setVisible(true);
|
|
121
|
+
setLoading(false);
|
|
122
|
+
});
|
|
123
|
+
return [3 /*break*/, 5];
|
|
124
|
+
case 4:
|
|
125
|
+
_a.sent();
|
|
126
|
+
setLoading(false);
|
|
127
|
+
return [3 /*break*/, 5];
|
|
128
|
+
case 5: return [2 /*return*/];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}); } }, { children: "\u6587\u4EF6\u6BD4\u5BF9" })), jsx(ModalComponent, __assign({ title: "\u81EA\u5B9A\u4E49\u6BD4\u5BF9", open: visible, width: "70%", footer: null, onCancel: function () { return setVisible(false); } }, { children: jsx(MemoTable, { rowKey: "index", columns: columns, dataSource: data }) }))] }));
|
|
132
|
+
};
|
|
133
|
+
/** 相对独立的合同比对接口。传入两个附件id,即可完成比对。 */
|
|
134
|
+
var FileComparisonBtn$1 = React__default.forwardRef(FileComparisonBtn);
|
|
135
|
+
|
|
136
|
+
export { FileComparisonBtn$1 as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { __assign } from '../../_virtual/_tslib.js';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { memo, useState } from 'react';
|
|
4
|
+
import ButtonCom from '../../button/button.js';
|
|
5
|
+
import { Checkbox } from 'antd';
|
|
6
|
+
|
|
7
|
+
var ContractComparison = function (props) {
|
|
8
|
+
var isNeedComparison = props.isNeedComparison, isEdit = props.isEdit, taskId = props.taskId, templateAttachName = props.templateAttachName, templateAttachId = props.templateAttachId, attachId = props.attachId, isCustomerReference = props.isCustomerReference, onIsCustomerReferenceChange = props.onIsCustomerReferenceChange, onCheckedComparison = props.onCheckedComparison, realIndex = props.realIndex, setRecords = props.setRecords, lookCompareHandle = props.lookCompareHandle, dgInfoRef = props.dgInfoRef, myCompareHandle = props.myCompareHandle, record = props.record, isShowChioseTemplate = props.isShowChioseTemplate, isShowSaveTemplate = props.isShowSaveTemplate, onWatermarkChange = props.onWatermarkChange, _a = props.showAddWater, showAddWater = _a === void 0 ? true : _a, isWater = props.isWater, onImportantChange = props.onImportantChange, _b = props.showImportant, showImportant = _b === void 0 ? false : _b, isImportantBool = props.isImportantBool;
|
|
9
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
10
|
+
return isEdit ? (jsxs("div", __assign({ className: "contract-comparison--wrap new-contract-comparison--wrap" }, { children: [isNeedComparison ? (jsxs(Fragment, { children: [jsx("div", __assign({ style: { width: "100%", textAlign: "left" } }, { children: templateAttachName })), jsxs("div", __assign({ style: { display: "flex", justifyContent: "space-between" } }, { children: [!record.isHideChoiseChangeTemplate && isShowChioseTemplate ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
11
|
+
// 记录当前点击产生的一些参数
|
|
12
|
+
dgInfoRef.current = {
|
|
13
|
+
realIndex: realIndex,
|
|
14
|
+
attachId: attachId,
|
|
15
|
+
setRecords: setRecords,
|
|
16
|
+
};
|
|
17
|
+
onCheckedComparison &&
|
|
18
|
+
onCheckedComparison({
|
|
19
|
+
realIndex: realIndex,
|
|
20
|
+
attachId: attachId,
|
|
21
|
+
setRecords: setRecords,
|
|
22
|
+
record: record,
|
|
23
|
+
});
|
|
24
|
+
} }, { children: "\u9009\u62E9\u6BD4\u5BF9\u6A21\u677F" }))) : null, taskId ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
25
|
+
lookCompareHandle(taskId);
|
|
26
|
+
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" }))) : templateAttachId && attachId ? (jsx(ButtonCom, __assign({ type: "link", style: { color: "rgb(255, 77, 79)" }, loading: loading, onClick: function () {
|
|
27
|
+
// 记录当前点击产生的一些参数
|
|
28
|
+
dgInfoRef.current = {
|
|
29
|
+
realIndex: realIndex,
|
|
30
|
+
attachId: attachId,
|
|
31
|
+
setRecords: setRecords,
|
|
32
|
+
};
|
|
33
|
+
setLoading(true);
|
|
34
|
+
myCompareHandle(templateAttachId)
|
|
35
|
+
.then(function () {
|
|
36
|
+
setLoading(false);
|
|
37
|
+
})
|
|
38
|
+
.catch(function () {
|
|
39
|
+
setLoading(false);
|
|
40
|
+
});
|
|
41
|
+
} }, { children: "\u65E0\u4EFB\u52A1ID\uFF0C\u5F00\u59CB\u6BD4\u5BF9" }))) : null] }))] })) : null, jsxs("div", __assign({ style: { display: "flex" } }, { children: [!record.isHideSaveCustomerReference && isShowSaveTemplate ? (jsx(Checkbox, __assign({ checked: isCustomerReference, onChange: function (e) {
|
|
42
|
+
onIsCustomerReferenceChange &&
|
|
43
|
+
onIsCustomerReferenceChange(e.target.checked);
|
|
44
|
+
} }, { children: "\u5B58\u6837\u677F" }))) : null, showAddWater && isEdit && attachId && (jsx("div", __assign({ className: "file-operation--isWater" }, { children: jsx(Checkbox, __assign({ checked: isWater, onChange: function (e) {
|
|
45
|
+
onWatermarkChange && onWatermarkChange(e.target.checked);
|
|
46
|
+
} }, { children: "\u52A0\u6C34\u5370" })) }))), showImportant && isEdit && attachId && (jsx("div", __assign({ className: "file-operation--isWater" }, { children: jsx(Checkbox, __assign({ checked: isImportantBool, onChange: function (e) {
|
|
47
|
+
onImportantChange && onImportantChange(e.target.checked);
|
|
48
|
+
} }, { children: "\u6807\u4E3A\u91CD\u8981" })) })))] }))] }))) : (jsxs("div", __assign({ className: "contract-comparison--wrap" }, { children: [jsx("div", { children: templateAttachName }), jsxs("div", __assign({ style: { display: "flex" } }, { children: [!record.isHideSaveCustomerReference && isShowSaveTemplate ? (jsx(Checkbox, __assign({ checked: isCustomerReference, disabled: true }, { children: "\u5B58\u6837\u677F" }))) : null, showAddWater && attachId && (jsx("div", __assign({ className: "file-operation--isWater" }, { children: jsx(Checkbox, __assign({ checked: isWater, disabled: true }, { children: "\u52A0\u6C34\u5370" })) }))), showImportant && attachId && (jsx("div", __assign({ className: "file-operation--isWater" }, { children: jsx(Checkbox, __assign({ checked: isImportantBool, disabled: true }, { children: "\u6807\u4E3A\u91CD\u8981" })) })))] })), taskId && isNeedComparison ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () {
|
|
49
|
+
lookCompareHandle(taskId);
|
|
50
|
+
} }, { children: "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C" }))) : null] })));
|
|
51
|
+
};
|
|
52
|
+
var NewContractComparison = memo(ContractComparison);
|
|
53
|
+
|
|
54
|
+
export { NewContractComparison as default };
|
|
@@ -1,50 +1,121 @@
|
|
|
1
1
|
import { __assign } from '../../_virtual/_tslib.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useContext } from 'react';
|
|
3
4
|
import { getColumnMergeProp, DATA_TYPE_KEY } from '../hooks/useParseRecords.js';
|
|
4
5
|
import ContractComparison from './contract-comparison.js';
|
|
6
|
+
import NewContractComparison from './new-contract-comparison.js';
|
|
5
7
|
import { currentRecordIsOnlyQunj } from '../utils.js';
|
|
8
|
+
import { ElectronSignaturesContext } from '../index.js';
|
|
9
|
+
import TranslationButtonComponents from '../translatecomponents/TranslateButton.js';
|
|
6
10
|
|
|
7
11
|
// 合同比对的clomuns
|
|
8
12
|
function useContractColumns(options) {
|
|
9
|
-
var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, lookCompareHandle = options.lookCompareHandle, dgInfoRef = options.dgInfoRef, myCompareHandle = options.myCompareHandle, onCheckedComparison = options.onCheckedComparison;
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
13
|
+
var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, lookCompareHandle = options.lookCompareHandle, dgInfoRef = options.dgInfoRef, myCompareHandle = options.myCompareHandle, onCheckedComparison = options.onCheckedComparison, request = options.request, previewUrl = options.previewUrl, isTranslation = options.isTranslation;
|
|
14
|
+
var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
|
|
15
|
+
var contractColumns = isNewQys
|
|
16
|
+
? [
|
|
17
|
+
{
|
|
18
|
+
// title: '智能合同比对模板',
|
|
19
|
+
title: "附件扩展功能",
|
|
20
|
+
dataIndex: "contractComparison",
|
|
21
|
+
key: "contractComparison",
|
|
22
|
+
width: 220,
|
|
23
|
+
align: "center",
|
|
24
|
+
render: function (text, record, index) {
|
|
25
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
26
|
+
if (currentOnlyQunj) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
var _a = getColumnMergeProp({
|
|
30
|
+
record: record,
|
|
31
|
+
index: index,
|
|
32
|
+
records: records,
|
|
33
|
+
dataTypeSort: dataTypeSort,
|
|
34
|
+
}), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
|
|
35
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, isShowContractComparsionHandle = _b.isShowContractComparsionHandle, setSameTypeRecords = _b.setRecords, isShowChioseTemplate = _b.isShowChioseTemplate, isShowSaveTemplate = _b.isShowSaveTemplate;
|
|
36
|
+
// 是否需要合同比对功能
|
|
37
|
+
var isNeedComparison = isShowContractComparsionHandle === null || isShowContractComparsionHandle === void 0 ? void 0 : isShowContractComparsionHandle(record, records);
|
|
38
|
+
// 是否存模板
|
|
39
|
+
var isCustomerReference = (record === null || record === void 0 ? void 0 : record.isCustomerReference) + "" === "1" ? true : false;
|
|
40
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
41
|
+
// 是否添加水印
|
|
42
|
+
var isWater = (record === null || record === void 0 ? void 0 : record.isWatermark) + "" === "1" ? true : false;
|
|
43
|
+
var showAddWater = record === null || record === void 0 ? void 0 : record.showAddWater;
|
|
44
|
+
//是否添加重要文件
|
|
45
|
+
var isImportantBool = (record === null || record === void 0 ? void 0 : record.isImportant) + "" === "1" ? true : false;
|
|
46
|
+
var showImportant = record === null || record === void 0 ? void 0 : record.showImportant;
|
|
47
|
+
return (jsxs(Fragment, { children: [jsx(NewContractComparison, { isEdit: isEdit, isNeedComparison: isNeedComparison, taskId: record === null || record === void 0 ? void 0 : record.taskId, templateAttachId: record === null || record === void 0 ? void 0 : record.templateAttachId, templateAttachName: record === null || record === void 0 ? void 0 : record.templateAttachName, isShowChioseTemplate: isShowChioseTemplate, isShowSaveTemplate: isShowSaveTemplate, attachId: record === null || record === void 0 ? void 0 : record.attachId, attachName: record === null || record === void 0 ? void 0 : record.attachName, isCustomerReference: isCustomerReference, lookCompareHandle: lookCompareHandle, realIndex: dataTypeIndex, setRecords: setSameTypeRecords, dgInfoRef: dgInfoRef, myCompareHandle: myCompareHandle, record: record, onCheckedComparison: onCheckedComparison, onIsCustomerReferenceChange: function (checked) {
|
|
48
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
49
|
+
setSameTypeRecords(function (preRecords) {
|
|
50
|
+
var _a;
|
|
51
|
+
var copyRecords = preRecords.slice();
|
|
52
|
+
var item = copyRecords[dataTypeIndex];
|
|
53
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isCustomerReference: checked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
54
|
+
return copyRecords;
|
|
55
|
+
});
|
|
56
|
+
}, showAddWater: showAddWater, isWater: isWater, isImportantBool: isImportantBool, showImportant: showImportant, onWatermarkChange: function (isChecked) {
|
|
57
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
58
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
59
|
+
setSameTypeRecords(function (preRecords) {
|
|
60
|
+
var _a;
|
|
61
|
+
var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
|
|
62
|
+
var item = copyRecords[dataTypeIndex];
|
|
63
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isWatermark: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
64
|
+
return copyRecords;
|
|
65
|
+
});
|
|
66
|
+
}, onImportantChange: function (isChecked) {
|
|
67
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
68
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
69
|
+
setSameTypeRecords(function (preRecords) {
|
|
70
|
+
var _a;
|
|
71
|
+
var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
|
|
72
|
+
var item = copyRecords[dataTypeIndex];
|
|
73
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isImportant: isChecked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
74
|
+
return copyRecords;
|
|
75
|
+
});
|
|
76
|
+
} }), jsx(TranslationButtonComponents, { request: request, previewUrl: previewUrl, isTranslation: isTranslation, record: record, realIndex: dataTypeIndex, setRecords: setSameTypeRecords })] }));
|
|
77
|
+
},
|
|
45
78
|
},
|
|
46
|
-
|
|
47
|
-
|
|
79
|
+
]
|
|
80
|
+
: // 下面是最初设计的模式
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
// title: '智能合同比对模板',
|
|
84
|
+
title: "比对模板附件名称",
|
|
85
|
+
dataIndex: "contractComparison",
|
|
86
|
+
key: "contractComparison",
|
|
87
|
+
width: 180,
|
|
88
|
+
align: "center",
|
|
89
|
+
render: function (text, record, index) {
|
|
90
|
+
var currentOnlyQunj = currentRecordIsOnlyQunj(record);
|
|
91
|
+
if (currentOnlyQunj) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
var _a = getColumnMergeProp({
|
|
95
|
+
record: record,
|
|
96
|
+
index: index,
|
|
97
|
+
records: records,
|
|
98
|
+
dataTypeSort: dataTypeSort,
|
|
99
|
+
}), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
|
|
100
|
+
var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, isShowContractComparsionHandle = _b.isShowContractComparsionHandle, setSameTypeRecords = _b.setRecords, isShowChioseTemplate = _b.isShowChioseTemplate, isShowSaveTemplate = _b.isShowSaveTemplate;
|
|
101
|
+
// 是否需要合同比对功能
|
|
102
|
+
var isNeedComparison = isShowContractComparsionHandle === null || isShowContractComparsionHandle === void 0 ? void 0 : isShowContractComparsionHandle(record, records);
|
|
103
|
+
// 是否存模板
|
|
104
|
+
var isCustomerReference = (record === null || record === void 0 ? void 0 : record.isCustomerReference) + "" === "1" ? true : false;
|
|
105
|
+
var dataTypeIndex = index - preDataTypeRecordsLength;
|
|
106
|
+
return (jsx(ContractComparison, { isEdit: isEdit, isNeedComparison: isNeedComparison, taskId: record === null || record === void 0 ? void 0 : record.taskId, templateAttachId: record === null || record === void 0 ? void 0 : record.templateAttachId, templateAttachName: record === null || record === void 0 ? void 0 : record.templateAttachName, isShowChioseTemplate: isShowChioseTemplate, isShowSaveTemplate: isShowSaveTemplate, attachId: record === null || record === void 0 ? void 0 : record.attachId, attachName: record === null || record === void 0 ? void 0 : record.attachName, isCustomerReference: isCustomerReference, lookCompareHandle: lookCompareHandle, realIndex: dataTypeIndex, setRecords: setSameTypeRecords, dgInfoRef: dgInfoRef, myCompareHandle: myCompareHandle, record: record, onCheckedComparison: onCheckedComparison, onIsCustomerReferenceChange: function (checked) {
|
|
107
|
+
// 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
|
|
108
|
+
setSameTypeRecords(function (preRecords) {
|
|
109
|
+
var _a;
|
|
110
|
+
var copyRecords = preRecords.slice();
|
|
111
|
+
var item = copyRecords[dataTypeIndex];
|
|
112
|
+
copyRecords.splice(dataTypeIndex, 1, __assign(__assign({}, item), (_a = { isCustomerReference: checked ? 1 : 0 }, _a[DATA_TYPE_KEY] = currentDataType, _a)));
|
|
113
|
+
return copyRecords;
|
|
114
|
+
});
|
|
115
|
+
} }));
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
];
|
|
48
119
|
return {
|
|
49
120
|
contractColumns: contractColumns,
|
|
50
121
|
};
|
|
@@ -15,7 +15,7 @@ import useParseIsNeedQunjData from './hooks/useParseIsNeedQunjData.js';
|
|
|
15
15
|
import useParseQunjSingleData from './hooks/useParseQunjSingleData.js';
|
|
16
16
|
|
|
17
17
|
var ElectronSignaturesFragment = function (props) {
|
|
18
|
-
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, 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;
|
|
18
|
+
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;
|
|
19
19
|
var fileFieldsNameRef = useRef(FILE_FIELDS_NAME);
|
|
20
20
|
fileFieldsNameRef.current = __assign(__assign({}, FILE_FIELDS_NAME), fileFieldsName);
|
|
21
21
|
// 代理函数
|
|
@@ -35,24 +35,26 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
35
35
|
fileSplitRules: fileSplitRules,
|
|
36
36
|
fileSplitStringRules: fileSplitStringRules,
|
|
37
37
|
isSingleQj: isSingleQj,
|
|
38
|
+
isSupportNoAttachQj: isSupportNoAttachQj,
|
|
38
39
|
}), records = _d.records, setRecords = _d.setRecords, innerSetRecords = _d.innerSetRecords;
|
|
39
40
|
// 电子印章列表相关数据
|
|
40
41
|
var _e = useFetchElectronData({
|
|
41
42
|
request: request,
|
|
42
43
|
needQys: needQys,
|
|
43
44
|
deptId: deptId,
|
|
45
|
+
secondDepId: secondDepId,
|
|
44
46
|
flowId: flowId,
|
|
45
47
|
records: records,
|
|
46
48
|
canEdit: canEdit,
|
|
47
49
|
}), electronList = _e.electronList, firstLevelPersonName = _e.firstLevelPersonName;
|
|
48
|
-
console.log("deptId", deptId);
|
|
49
50
|
// 群杰物理章列表相关数据
|
|
50
51
|
var qunjList = useFetchQunjData({
|
|
51
52
|
request: request,
|
|
52
53
|
needQj: needQj,
|
|
53
54
|
flowId: flowId,
|
|
54
|
-
companyTypes: companyTypes,
|
|
55
55
|
deptId: deptId,
|
|
56
|
+
companyTypes: companyTypes,
|
|
57
|
+
qunjReplaceDeptId: qunjReplaceDeptId,
|
|
56
58
|
}).qunjList;
|
|
57
59
|
// 附件类型列表相关数据
|
|
58
60
|
var fileTypeFetchList = useFetchFileTypeData({
|
|
@@ -89,6 +91,7 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
89
91
|
canEdit: canEdit,
|
|
90
92
|
flowStatus: flowStatus,
|
|
91
93
|
deptId: deptId,
|
|
94
|
+
secondDepId: secondDepId,
|
|
92
95
|
onElectronicSealIdChange: onElectronicSealIdChange,
|
|
93
96
|
}), currentContractId = _g.currentContractId, currentDocAttachMap = _g.currentDocAttachMap, currentDocumentIdList = _g.currentDocumentIdList, appointSignLocation = _g.appointSignLocation, viewSignPage = _g.viewSignPage, checkUnStampedSealList = _g.checkUnStampedSealList, unElectronicSealList = _g.unElectronicSealList, unElectronicSealIdList = _g.unElectronicSealIdList, onClearElectronSetting = _g.onClearElectronSetting, clickElectronicSealIdList = _g.clickElectronicSealIdList;
|
|
94
97
|
// 盖电子印章相关逻辑
|
|
@@ -101,6 +104,7 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
101
104
|
onClearElectronListData: onClearElectronListData,
|
|
102
105
|
onClearElectronSetting: onClearElectronSetting,
|
|
103
106
|
deptId: deptId,
|
|
107
|
+
secondDepId: secondDepId,
|
|
104
108
|
electronicSealIdList: electronicSealIdList,
|
|
105
109
|
}), onIsStampElectronChange = _h.onIsStampElectronChange, isStampElectron = _h.isStampElectron, clearAllElectronDataHandler = _h.clearAllElectronDataHandler;
|
|
106
110
|
// 这个是整体逻辑。如果每个附件都需要选择是否盖群杰印章,走其他逻辑
|
|
@@ -300,6 +304,8 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
300
304
|
apiBaseUrl: apiBaseUrl,
|
|
301
305
|
fileBaseUrl: fileBaseUrl,
|
|
302
306
|
flowStatus: flowStatus,
|
|
307
|
+
wfProcessInstId: wfProcessInstId,
|
|
308
|
+
verifyUserIds: verifyUserIds,
|
|
303
309
|
});
|
|
304
310
|
}, [
|
|
305
311
|
dataType,
|
|
@@ -316,6 +322,8 @@ var ElectronSignaturesFragment = function (props) {
|
|
|
316
322
|
apiBaseUrl,
|
|
317
323
|
fileBaseUrl,
|
|
318
324
|
flowStatus,
|
|
325
|
+
wfProcessInstId,
|
|
326
|
+
verifyUserIds,
|
|
319
327
|
]);
|
|
320
328
|
return jsx(Fragment, {});
|
|
321
329
|
};
|