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.
Files changed (71) hide show
  1. package/dist/es/applayoutsider/menu/MainMenu.js +1 -1
  2. package/dist/es/applayoutsider/menu/SubMenu.js +8 -1
  3. package/dist/es/canvastable/canvasTable.js +1 -0
  4. package/dist/es/config/MyStorage.js +11 -5
  5. package/dist/es/config/ZtxkContext.d.ts +10 -0
  6. package/dist/es/config/ZtxkContext.js +2 -0
  7. package/dist/es/config/index.js +1 -0
  8. package/dist/es/config/utils.js +58 -1
  9. package/dist/es/dynamicsetting/dynamicDrawer.js +61 -19
  10. package/dist/es/dynamicsetting/dynamicSetting.js +4 -4
  11. package/dist/es/dynamicsetting/hooks.js +4 -4
  12. package/dist/es/dynamicsetting/index.css +1 -1
  13. package/dist/es/dynamicsetting/index.js +1 -0
  14. package/dist/es/dynamicsetting/interface.d.ts +5 -0
  15. package/dist/es/dynamicsetting/useDynamic.js +5 -1
  16. package/dist/es/dynamicsetting/useSearch.js +26 -6
  17. package/dist/es/dynamicsetting/useTemplate.d.ts +4 -0
  18. package/dist/es/dynamicsetting/useTemplate.js +428 -0
  19. package/dist/es/electronsignatures/content.js +974 -0
  20. package/dist/es/electronsignatures/dgcomponents/contract-comparison.js +2 -2
  21. package/dist/es/electronsignatures/dgcomponents/file-comparison-btn.js +136 -0
  22. package/dist/es/electronsignatures/dgcomponents/new-contract-comparison.js +54 -0
  23. package/dist/es/electronsignatures/dgcomponents/useContractColumns.js +110 -39
  24. package/dist/es/electronsignatures/electron-signatures-fragment.js +11 -3
  25. package/dist/es/electronsignatures/electroncomponents/electron-seal-batch-download.js +179 -67
  26. package/dist/es/electronsignatures/electroncomponents/electron-seal-detail.js +5 -5
  27. package/dist/es/electronsignatures/electroncomponents/electron-seal-item-detail.js +15 -0
  28. package/dist/es/electronsignatures/electroncomponents/electron-seal-item.js +9 -6
  29. package/dist/es/electronsignatures/electroncomponents/useElectronColumns.js +330 -154
  30. package/dist/es/electronsignatures/electroncomponents/useFetchElectronData.js +60 -10
  31. package/dist/es/electronsignatures/electroncomponents/utils.js +119 -28
  32. package/dist/es/electronsignatures/filecomponents/file-operation.js +6 -4
  33. package/dist/es/electronsignatures/filecomponents/new-file-operation.js +56 -0
  34. package/dist/es/electronsignatures/filecomponents/useFileColumns.js +179 -102
  35. package/dist/es/electronsignatures/hooks/useGetQjVerifyCode.js +134 -0
  36. package/dist/es/electronsignatures/hooks/useMergeRecords.js +4 -3
  37. package/dist/es/electronsignatures/hooks/useParseElectronSetting.js +5 -3
  38. package/dist/es/electronsignatures/hooks/useParseIsNeedElectronData.js +21 -2
  39. package/dist/es/electronsignatures/hooks/useParseQunjSingleData.js +6 -1
  40. package/dist/es/electronsignatures/hooks/useParseRecords.js +41 -34
  41. package/dist/es/electronsignatures/index.css +1 -1
  42. package/dist/es/electronsignatures/index.js +18 -833
  43. package/dist/es/electronsignatures/interface.d.ts +129 -5
  44. package/dist/es/electronsignatures/interface.js +9 -4
  45. package/dist/es/electronsignatures/qunjcomponents/qunj-check.js +2 -2
  46. package/dist/es/electronsignatures/qunjcomponents/qunj-detail.js +135 -14
  47. package/dist/es/electronsignatures/qunjcomponents/qunj-list.js +33 -13
  48. package/dist/es/electronsignatures/qunjcomponents/useFetchQunjData.js +8 -3
  49. package/dist/es/electronsignatures/qunjcomponents/useQunjColumns.js +202 -202
  50. package/dist/es/electronsignatures/translatecomponents/TranslateButton.js +27 -0
  51. package/dist/es/electronsignatures/translatecomponents/useTranslateCom.js +35 -0
  52. package/dist/es/form/common-search-list.js +28 -9
  53. package/dist/es/form/form.js +13 -11
  54. package/dist/es/form/useCommonSearch.js +3 -4
  55. package/dist/es/table/components/EnhanceBodyBasicCell.js +9 -0
  56. package/dist/es/table/components/useDragRef.js +6 -0
  57. package/dist/es/table/constant.js +4 -1
  58. package/dist/es/table/hooks/useCtrl.js +44 -0
  59. package/dist/es/table/hooks/useSelectSubtotal.js +376 -0
  60. package/dist/es/table/index.css +1 -1
  61. package/dist/es/table/interface.d.ts +2 -0
  62. package/dist/es/table/table.js +14 -2
  63. package/dist/index.build.d.ts +1 -0
  64. package/dist/index.dark.css +1 -1
  65. package/dist/index.default.css +1 -1
  66. package/dist/index.es.js +1 -0
  67. package/dist/less/components/DynamicSetting/style/index.less +38 -0
  68. package/dist/less/components/ElectronSignatures/style/index.less +37 -5
  69. package/dist/less/components/Table/style/index.less +32 -0
  70. package/package.json +2 -2
  71. package/dist/es/electronsignatures/electroncomponents/electron-seal-download.js +0 -74
@@ -1,54 +1,66 @@
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 QunjList, { isFilterAreaType } from './qunj-list.js';
4
5
  import QunjDetail, { NoUseQj } from './qunj-detail.js';
5
6
  import QunjCheck from './qunj-check.js';
6
7
  import { getColumnMergeProp } from '../hooks/useParseRecords.js';
8
+ import { ElectronSignaturesContext } from '../index.js';
9
+ import ButtonCom from '../../button/button.js';
7
10
 
11
+ function WorkflowIdButton(props) {
12
+ var children = props.children, wfProcessInstId = props.wfProcessInstId, isShowSealApply = props.isShowSealApply, isEdit = props.isEdit, goWorkflowSeal = props.goWorkflowSeal;
13
+ var onGoWorkflowSeal = function () {
14
+ if (!wfProcessInstId) {
15
+ return;
16
+ }
17
+ goWorkflowSeal && goWorkflowSeal(wfProcessInstId);
18
+ };
19
+ return (jsxs("div", __assign({ style: {
20
+ // color: 'rgb(255, 102, 102)',
21
+ fontSize: "15px",
22
+ } }, { children: [children, isShowSealApply && !isEdit ? (jsx(ButtonCom, __assign({ type: "link", onClick: onGoWorkflowSeal }, { children: "\u7528\u5370\u589E\u52A0\u7533\u8BF7" }))) : null] })));
23
+ }
8
24
  // 群杰印章的clomuns
9
25
  function useQunjColumns(options) {
10
- var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, contractNumFlowIds = options.contractNumFlowIds, refreshCode = options.refreshCode, request = options.request, isSingleQj = options.isSingleQj, isQjUseModal = options.isQjUseModal, apiBaseUrl = options.apiBaseUrl, caseId = options.caseId;
11
- var qunjColumns = [
12
- {
13
- title: "群杰印章",
14
- align: "center",
15
- children: isSingleQj
16
- ? [
17
- {
18
- title: "盖群杰印章",
19
- dataIndex: "isStampQunj",
20
- key: "isStampQunj",
21
- width: 100,
22
- align: "center",
23
- render: function (text, record, index) {
24
- // 需要合并
25
- var _a = getColumnMergeProp({
26
- record: record,
27
- index: index,
28
- records: records,
29
- dataTypeSort: dataTypeSort,
30
- }), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
31
- var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, fileFieldsNameRef = _b.fileFieldsNameRef, onIsStampQunjChange = _b.onIsStampQunjChange,
32
- // 当前流程下的群杰章信息
33
- qunjList = _b.qunjList,
34
- // 是否显示合同分数
35
- isContranctNum = _b.isContranctNum,
36
- // 是否显示群杰章地址
37
- isQunjAddress = _b.isQunjAddress, onQunjAddressSingleChange = _b.onQunjAddressSingleChange, onQunjSealSingleChange = _b.onQunjSealSingleChange;
38
- var _c = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, isQunj = _c.isQunj, qunjSeal = _c.qunjSeal, qunjAddress = _c.qunjAddress;
39
- // 是否显示群杰印章信息
40
- var isShowQunjDetail = isQunj
41
- ? record[isQunj] + "" === "1"
42
- : false;
43
- // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
44
- var dataTypeIndex = index - preDataTypeRecordsLength;
45
- // 当前选中的群杰章信息
46
- var currentQunjSeal = qunjSeal ? record[qunjSeal] : null;
47
- // 当前选中的盖章地址信息
48
- var currentQunjAddress = qunjAddress
49
- ? record[qunjAddress]
50
- : null;
51
- return (jsx(QunjCheck, { disabled: !isEdit, checked: isShowQunjDetail, onChange: function (checked) {
26
+ var records = options.records, dataTypeSort = options.dataTypeSort, allData = options.allData, contractNumFlowIds = options.contractNumFlowIds, refreshCode = options.refreshCode, request = options.request, isSingleQj = options.isSingleQj, isQjUseModal = options.isQjUseModal, apiBaseUrl = options.apiBaseUrl, caseId = options.caseId, qjVerifyCodeData = options.qjVerifyCodeData, getQjVerifyCodeHandle = options.getQjVerifyCodeHandle, isShowSealApply = options.isShowSealApply, goWorkflowSeal = options.goWorkflowSeal, qunjListRenderFilter = options.qunjListRenderFilter;
27
+ var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
28
+ var useSealTitle = isNewQys ? "已选群杰印章" : "申请用章情况";
29
+ var qjColumn = isSingleQj
30
+ ? [
31
+ {
32
+ title: "盖群杰印章",
33
+ dataIndex: "isStampQunj",
34
+ key: "isStampQunj",
35
+ width: 100,
36
+ align: "center",
37
+ render: function (text, record, index) {
38
+ // 需要合并
39
+ var _a = getColumnMergeProp({
40
+ record: record,
41
+ index: index,
42
+ records: records,
43
+ dataTypeSort: dataTypeSort,
44
+ }), currentDataType = _a.currentDataType, preDataTypeRecordsLength = _a.preDataTypeRecordsLength;
45
+ var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, fileFieldsNameRef = _b.fileFieldsNameRef, onIsStampQunjChange = _b.onIsStampQunjChange,
46
+ // 当前流程下的群杰章信息
47
+ qunjList = _b.qunjList,
48
+ // 是否显示合同分数
49
+ isContranctNum = _b.isContranctNum,
50
+ // 是否显示群杰章地址
51
+ isQunjAddress = _b.isQunjAddress, onQunjAddressSingleChange = _b.onQunjAddressSingleChange, onQunjSealSingleChange = _b.onQunjSealSingleChange, wfProcessInstId = _b.wfProcessInstId;
52
+ var _c = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, isQunj = _c.isQunj, qunjSeal = _c.qunjSeal, qunjAddress = _c.qunjAddress;
53
+ // 是否显示群杰印章信息
54
+ var isShowQunjDetail = isQunj
55
+ ? record[isQunj] + "" === "1"
56
+ : false;
57
+ // 因为数据是按照类型来归类了,那么这个索引的长度 实际应该减去之前的所有数据类型的长度
58
+ var dataTypeIndex = index - preDataTypeRecordsLength;
59
+ // 当前选中的群杰章信息
60
+ var currentQunjSeal = qunjSeal ? record[qunjSeal] : null;
61
+ // 当前选中的盖章地址信息
62
+ var currentQunjAddress = qunjAddress ? record[qunjAddress] : null;
63
+ return (jsxs(Fragment, { children: [jsx(QunjCheck, { disabled: !isEdit, checked: isShowQunjDetail, onChange: function (checked) {
52
64
  onIsStampQunjChange === null || onIsStampQunjChange === void 0 ? void 0 : onIsStampQunjChange(checked, dataTypeIndex);
53
65
  }, qunjList: qunjList, currentQunjSeal: currentQunjSeal, currentQunjAddress: currentQunjAddress, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, onQunjAddressSingleChange: function (data) {
54
66
  var _a, _b, _c;
@@ -64,185 +76,173 @@ function useQunjColumns(options) {
64
76
  onQunjAddressSingleChange === null || onQunjAddressSingleChange === void 0 ? void 0 : onQunjAddressSingleChange(data, dataTypeIndex, qunjSeal);
65
77
  }, onQunjSealSingleChange: function (data) {
66
78
  onQunjSealSingleChange === null || onQunjSealSingleChange === void 0 ? void 0 : onQunjSealSingleChange(data, dataTypeIndex);
67
- } }));
79
+ }, qunjListRenderFilter: qunjListRenderFilter }), wfProcessInstId ? (jsx(WorkflowIdButton, __assign({ wfProcessInstId: wfProcessInstId, isShowSealApply: isShowSealApply, isEdit: isEdit, goWorkflowSeal: goWorkflowSeal }, { children: wfProcessInstId }))) : ("")] }));
80
+ },
81
+ },
82
+ {
83
+ title: useSealTitle,
84
+ dataIndex: "qunjDetail",
85
+ key: "qunjDetail",
86
+ width: 260,
87
+ align: "center",
88
+ render: function (text, record, index) {
89
+ // 需要合并
90
+ var currentDataType = getColumnMergeProp({
91
+ record: record,
92
+ index: index,
93
+ records: records,
94
+ dataTypeSort: dataTypeSort,
95
+ }).currentDataType;
96
+ var _a = allData[currentDataType] || {}, fileFieldsNameRef = _a.fileFieldsNameRef, wfProcessInstId = _a.wfProcessInstId, verifyUserIds = _a.verifyUserIds;
97
+ var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, isQunj = _b.isQunj, qunjSeal = _b.qunjSeal, qunjAddress = _b.qunjAddress;
98
+ // 是否显示群杰印章信息
99
+ var isShowQunjDetail = isQunj
100
+ ? record[isQunj] + "" === "1"
101
+ : false;
102
+ // 当前选中的群杰章信息
103
+ var currentQunjSeal = qunjSeal ? record[qunjSeal] : null;
104
+ // 当前选中的盖章地址信息
105
+ var currentQunjAddress = qunjAddress ? record[qunjAddress] : null;
106
+ // 公用信息获取
107
+ var _c = allData[currentDataType] || {}, isEdit = _c.isEdit,
108
+ // 当前流程下的群杰章信息
109
+ qunjList = _c.qunjList,
110
+ // 是否显示合同分数
111
+ isContranctNum = _c.isContranctNum,
112
+ // 是否显示群杰章地址
113
+ isQunjAddress = _c.isQunjAddress, flowStatus = _c.flowStatus;
114
+ return isShowQunjDetail ? (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, isEdit: isEdit, refreshCode: refreshCode, request: request, wfProcessInstId: wfProcessInstId, verifyUserIds: verifyUserIds, qjVerifyCodeData: qjVerifyCodeData, getQjVerifyCodeHandle: getQjVerifyCodeHandle, flowStatus: flowStatus })) : null;
115
+ },
116
+ },
117
+ ]
118
+ : isQjUseModal
119
+ ? // 这种场景是群杰相对于整个合同,但是默认不显示印章
120
+ [
121
+ {
122
+ title: "盖群杰印章",
123
+ dataIndex: "isStampQunj",
124
+ key: "isStampQunj",
125
+ width: 100,
126
+ align: "center",
127
+ render: function (text, record, index) {
128
+ var _a;
129
+ // 需要合并
130
+ var _b = getColumnMergeProp({
131
+ record: record,
132
+ index: index,
133
+ records: records,
134
+ dataTypeSort: dataTypeSort,
135
+ }), props = _b.props, currentDataType = _b.currentDataType;
136
+ var _c = allData[currentDataType] || {}, isEdit = _c.isEdit, qunjList = _c.qunjList, currentQunjSeal = _c.currentQunjSeal, onQunjSealChange = _c.onQunjSealChange, needQj = _c.needQj, isContranctNum = _c.isContranctNum, qunjChecked = _c.qunjChecked, setQunjChecked = _c.setQunjChecked, currentQunjAddress = _c.currentQunjAddress, onQunjAddressChange = _c.onQunjAddressChange, isQunjAddress = _c.isQunjAddress, wfProcessInstId = _c.wfProcessInstId;
137
+ // 是否显示群杰印章信息 如果非编辑状态下,使用数据中的字段来判断是否选择了群杰印章
138
+ var isShowQunjDetail = !isEdit
139
+ ? (currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) &&
140
+ ((_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) !== 0
141
+ : qunjChecked;
142
+ return {
143
+ children: !needQj ? (jsxs(Fragment, { children: [jsx(NoUseQj, {}), wfProcessInstId ? (jsx(WorkflowIdButton, __assign({ wfProcessInstId: wfProcessInstId, isShowSealApply: isShowSealApply, isEdit: isEdit, goWorkflowSeal: goWorkflowSeal }, { children: wfProcessInstId }))) : ("")] })) : (jsxs(Fragment, { children: [jsx(QunjCheck, { disabled: !isEdit, checked: isShowQunjDetail, onChange: function (checked) {
144
+ setQunjChecked && setQunjChecked(checked);
145
+ }, qunjList: qunjList, currentQunjSeal: currentQunjSeal, currentQunjAddress: currentQunjAddress, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, onQunjAddressSingleChange: function (data) {
146
+ var _a, _b, _c;
147
+ // 如果切换了盖章地点,需要将非当前地点的数据删除
148
+ var copyDetails = ((_c = (_b = (_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.slice()) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (detail) { return (__assign({}, detail)); })) || [];
149
+ var newDetails = copyDetails.filter(function (qunjItem) {
150
+ return isFilterAreaType(data === null || data === void 0 ? void 0 : data.id, qunjItem.areaType);
151
+ });
152
+ var qunjSeal = {};
153
+ if (copyDetails.length !== newDetails.length) {
154
+ qunjSeal.details = newDetails;
155
+ }
156
+ onQunjAddressChange &&
157
+ onQunjAddressChange(data, { qunjSeal: qunjSeal });
158
+ }, onQunjSealSingleChange: function (data) {
159
+ onQunjSealChange && onQunjSealChange(data);
160
+ }, qunjListRenderFilter: qunjListRenderFilter }), wfProcessInstId ? (jsx(WorkflowIdButton, __assign({ wfProcessInstId: wfProcessInstId, isShowSealApply: isShowSealApply, isEdit: isEdit, goWorkflowSeal: goWorkflowSeal }, { children: wfProcessInstId }))) : ("")] })),
161
+ props: props,
162
+ };
68
163
  },
69
164
  },
70
165
  {
71
- title: "申请用章情况",
166
+ title: useSealTitle,
72
167
  dataIndex: "qunjDetail",
73
168
  key: "qunjDetail",
74
169
  width: 260,
75
170
  align: "center",
76
171
  render: function (text, record, index) {
172
+ var _a;
77
173
  // 需要合并
78
- var currentDataType = getColumnMergeProp({
174
+ var _b = getColumnMergeProp({
79
175
  record: record,
80
176
  index: index,
81
177
  records: records,
82
178
  dataTypeSort: dataTypeSort,
83
- }).currentDataType;
84
- var fileFieldsNameRef = (allData[currentDataType] || {}).fileFieldsNameRef;
85
- var _a = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, isQunj = _a.isQunj, qunjSeal = _a.qunjSeal, qunjAddress = _a.qunjAddress;
86
- // 是否显示群杰印章信息
87
- var isShowQunjDetail = isQunj
88
- ? record[isQunj] + "" === "1"
89
- : false;
90
- // 当前选中的群杰章信息
91
- var currentQunjSeal = qunjSeal ? record[qunjSeal] : null;
92
- // 当前选中的盖章地址信息
93
- var currentQunjAddress = qunjAddress
94
- ? record[qunjAddress]
95
- : null;
179
+ }), props = _b.props, currentDataType = _b.currentDataType;
96
180
  // 公用信息获取
97
- var _b = allData[currentDataType] || {}, isEdit = _b.isEdit,
181
+ var _c = allData[currentDataType] || {}, isEdit = _c.isEdit,
98
182
  // 当前流程下的群杰章信息
99
- qunjList = _b.qunjList,
183
+ qunjList = _c.qunjList,
100
184
  // 是否显示合同分数
101
- isContranctNum = _b.isContranctNum,
185
+ isContranctNum = _c.isContranctNum,
102
186
  // 是否显示群杰章地址
103
- isQunjAddress = _b.isQunjAddress;
104
- return isShowQunjDetail ? (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, isEdit: isEdit, refreshCode: refreshCode, request: request })) : null;
187
+ isQunjAddress = _c.isQunjAddress, currentQunjSeal = _c.currentQunjSeal, qunjChecked = _c.qunjChecked, currentQunjAddress = _c.currentQunjAddress, wfProcessInstId = _c.wfProcessInstId, verifyUserIds = _c.verifyUserIds, flowStatus = _c.flowStatus;
188
+ // 是否显示群杰印章信息 如果非编辑状态下,使用数据中的字段来判断是否选择了群杰印章
189
+ var isShowQunjDetail = !isEdit
190
+ ? (currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) &&
191
+ ((_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) !== 0
192
+ : qunjChecked;
193
+ return {
194
+ children: isShowQunjDetail ? (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, isEdit: isEdit, refreshCode: refreshCode, request: request, apiBaseUrl: apiBaseUrl, caseId: caseId, wfProcessInstId: wfProcessInstId, verifyUserIds: verifyUserIds, qjVerifyCodeData: qjVerifyCodeData, getQjVerifyCodeHandle: getQjVerifyCodeHandle, flowStatus: flowStatus })) : null,
195
+ props: props,
196
+ };
105
197
  },
106
198
  },
107
199
  ]
108
- : isQjUseModal
109
- ? // 这种场景是群杰相对于整个合同,但是默认不显示印章
110
- [
111
- {
112
- title: "盖群杰印章",
113
- dataIndex: "isStampQunj",
114
- key: "isStampQunj",
115
- width: 100,
116
- align: "center",
117
- onCell: function (record, index) {
118
- var props = getColumnMergeProp({
119
- record: record,
120
- index: index,
121
- records: records,
122
- dataTypeSort: dataTypeSort,
123
- }).props;
124
- return props;
125
- },
126
- render: function (text, record, index) {
127
- var _a;
128
- // 需要合并
129
- var currentDataType = getColumnMergeProp({
130
- record: record,
131
- index: index,
132
- records: records,
133
- dataTypeSort: dataTypeSort,
134
- }).currentDataType;
135
- var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, qunjList = _b.qunjList, currentQunjSeal = _b.currentQunjSeal, onQunjSealChange = _b.onQunjSealChange, needQj = _b.needQj, isContranctNum = _b.isContranctNum, qunjChecked = _b.qunjChecked, setQunjChecked = _b.setQunjChecked, currentQunjAddress = _b.currentQunjAddress, onQunjAddressChange = _b.onQunjAddressChange, isQunjAddress = _b.isQunjAddress;
136
- // 是否显示群杰印章信息 如果非编辑状态下,使用数据中的字段来判断是否选择了群杰印章
137
- var isShowQunjDetail = !isEdit
138
- ? (currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) &&
139
- ((_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) !== 0
140
- : qunjChecked;
141
- return !needQj ? (jsx(NoUseQj, {})) : (jsx(QunjCheck, { disabled: !isEdit, checked: isShowQunjDetail, onChange: function (checked) {
142
- setQunjChecked && setQunjChecked(checked);
143
- }, qunjList: qunjList, currentQunjSeal: currentQunjSeal, currentQunjAddress: currentQunjAddress, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, onQunjAddressSingleChange: function (data) {
144
- var _a, _b, _c;
145
- // 如果切换了盖章地点,需要将非当前地点的数据删除
146
- var copyDetails = ((_c = (_b = (_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.slice()) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (detail) { return (__assign({}, detail)); })) || [];
147
- var newDetails = copyDetails.filter(function (qunjItem) {
148
- return isFilterAreaType(data === null || data === void 0 ? void 0 : data.id, qunjItem.areaType);
149
- });
150
- var qunjSeal = {};
151
- if (copyDetails.length !== newDetails.length) {
152
- qunjSeal.details = newDetails;
153
- }
154
- onQunjAddressChange &&
155
- onQunjAddressChange(data, { qunjSeal: qunjSeal });
156
- }, onQunjSealSingleChange: function (data) {
157
- onQunjSealChange && onQunjSealChange(data);
158
- } }));
159
- },
160
- },
161
- {
162
- title: "申请用章情况",
163
- dataIndex: "qunjDetail",
164
- key: "qunjDetail",
165
- width: 260,
166
- align: "center",
167
- onCell: function (record, index) {
168
- var props = getColumnMergeProp({
169
- record: record,
170
- index: index,
171
- records: records,
172
- dataTypeSort: dataTypeSort,
173
- }).props;
174
- return props;
175
- },
176
- render: function (text, record, index) {
177
- var _a;
178
- // 需要合并
179
- var currentDataType = getColumnMergeProp({
180
- record: record,
181
- index: index,
182
- records: records,
183
- dataTypeSort: dataTypeSort,
184
- }).currentDataType;
185
- // 公用信息获取
186
- var _b = allData[currentDataType] || {}, isEdit = _b.isEdit,
187
- // 当前流程下的群杰章信息
188
- qunjList = _b.qunjList,
189
- // 是否显示合同分数
190
- isContranctNum = _b.isContranctNum,
191
- // 是否显示群杰章地址
192
- isQunjAddress = _b.isQunjAddress, currentQunjSeal = _b.currentQunjSeal, qunjChecked = _b.qunjChecked, currentQunjAddress = _b.currentQunjAddress;
193
- // 是否显示群杰印章信息 如果非编辑状态下,使用数据中的字段来判断是否选择了群杰印章
194
- var isShowQunjDetail = !isEdit
195
- ? (currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) &&
196
- ((_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) !== 0
197
- : qunjChecked;
198
- return isShowQunjDetail ? (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, isEdit: isEdit, refreshCode: refreshCode, request: request, apiBaseUrl: apiBaseUrl, caseId: caseId })) : null;
199
- },
200
- },
201
- ]
202
- : [
203
- {
204
- title: jsx("div", { children: "\u7FA4\u6770\u7528\u5370\u7533\u8BF7" }),
205
- dataIndex: "isStampQunj",
206
- key: "isStampQunj",
207
- width: 420,
208
- align: "center",
209
- onCell: function (record, index) {
210
- var props = getColumnMergeProp({
211
- record: record,
212
- index: index,
213
- records: records,
214
- dataTypeSort: dataTypeSort,
215
- }).props;
216
- return props;
217
- },
218
- render: function (text, record, index) {
219
- // 需要合并
220
- var currentDataType = getColumnMergeProp({
221
- record: record,
222
- index: index,
223
- records: records,
224
- dataTypeSort: dataTypeSort,
225
- }).currentDataType;
226
- var _a = allData[currentDataType] || {}, isEdit = _a.isEdit, qunjList = _a.qunjList, currentQunjSeal = _a.currentQunjSeal, onQunjSealChange = _a.onQunjSealChange, needQj = _a.needQj, isContranctNum = _a.isContranctNum, qunjChecked = _a.qunjChecked, setQunjChecked = _a.setQunjChecked, qunjAddressList = _a.qunjAddressList, currentQunjAddress = _a.currentQunjAddress, onQunjAddressChange = _a.onQunjAddressChange, isQunjAddress = _a.isQunjAddress;
227
- return !needQj ? (jsx(NoUseQj, {})) : isEdit ? (jsx(QunjList, { qunjList: qunjList, contractNumFlowIds: contractNumFlowIds, qunjSeal: currentQunjSeal, onChange: onQunjSealChange, isContranctNum: isContranctNum, qunjChecked: qunjChecked, setQunjChecked: setQunjChecked, qunjAddressList: qunjAddressList, currentQunjAddress: currentQunjAddress, onQunjAddressChange: function (data) {
228
- var _a, _b, _c;
229
- // 如果切换了盖章地点,需要将非当前地点的数据删除
230
- var copyDetails = ((_c = (_b = (_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.slice()) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (detail) { return (__assign({}, detail)); })) || [];
231
- var newDetails = copyDetails.filter(function (qunjItem) {
232
- return isFilterAreaType(data === null || data === void 0 ? void 0 : data.id, qunjItem.areaType);
233
- });
234
- var qunjSeal = {};
235
- if (copyDetails.length !== newDetails.length) {
236
- qunjSeal.details = newDetails;
237
- }
238
- onQunjAddressChange &&
239
- onQunjAddressChange(data, { qunjSeal: qunjSeal });
240
- }, isQunjAddress: isQunjAddress })) : (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, refreshCode: refreshCode, request: request }));
241
- },
242
- },
243
- ],
244
- },
245
- ];
200
+ : [
201
+ {
202
+ title: jsx("div", { children: "\u7FA4\u6770\u7528\u5370\u7533\u8BF7" }),
203
+ dataIndex: "isStampQunj",
204
+ key: "isStampQunj",
205
+ width: 420,
206
+ align: "center",
207
+ render: function (text, record, index) {
208
+ // 需要合并
209
+ var _a = getColumnMergeProp({
210
+ record: record,
211
+ index: index,
212
+ records: records,
213
+ dataTypeSort: dataTypeSort,
214
+ }), props = _a.props, currentDataType = _a.currentDataType;
215
+ var _b = allData[currentDataType] || {}, isEdit = _b.isEdit, qunjList = _b.qunjList, currentQunjSeal = _b.currentQunjSeal, onQunjSealChange = _b.onQunjSealChange, needQj = _b.needQj, isContranctNum = _b.isContranctNum, qunjChecked = _b.qunjChecked, setQunjChecked = _b.setQunjChecked, qunjAddressList = _b.qunjAddressList, currentQunjAddress = _b.currentQunjAddress, onQunjAddressChange = _b.onQunjAddressChange, isQunjAddress = _b.isQunjAddress, wfProcessInstId = _b.wfProcessInstId, verifyUserIds = _b.verifyUserIds, flowStatus = _b.flowStatus;
216
+ return {
217
+ children: !needQj ? (jsx(NoUseQj, {})) : isEdit ? (jsx(QunjList, { qunjList: qunjList, contractNumFlowIds: contractNumFlowIds, qunjSeal: currentQunjSeal, onChange: onQunjSealChange, isContranctNum: isContranctNum, qunjChecked: qunjChecked, setQunjChecked: setQunjChecked, qunjAddressList: qunjAddressList, currentQunjAddress: currentQunjAddress, onQunjAddressChange: function (data) {
218
+ var _a, _b, _c;
219
+ // 如果切换了盖章地点,需要将非当前地点的数据删除
220
+ var copyDetails = ((_c = (_b = (_a = currentQunjSeal === null || currentQunjSeal === void 0 ? void 0 : currentQunjSeal.details) === null || _a === void 0 ? void 0 : _a.slice()) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (detail) { return (__assign({}, detail)); })) || [];
221
+ var newDetails = copyDetails.filter(function (qunjItem) {
222
+ return isFilterAreaType(data === null || data === void 0 ? void 0 : data.id, qunjItem.areaType);
223
+ });
224
+ var qunjSeal = {};
225
+ if (copyDetails.length !== newDetails.length) {
226
+ qunjSeal.details = newDetails;
227
+ }
228
+ onQunjAddressChange &&
229
+ onQunjAddressChange(data, { qunjSeal: qunjSeal });
230
+ }, isQunjAddress: isQunjAddress, qunjListRenderFilter: qunjListRenderFilter })) : (jsx(QunjDetail, { qunjList: qunjList, qunjSeal: currentQunjSeal, isContranctNum: isContranctNum, isQunjAddress: isQunjAddress, currentQunjAddress: currentQunjAddress, refreshCode: refreshCode, request: request, wfProcessInstId: wfProcessInstId, verifyUserIds: verifyUserIds, qjVerifyCodeData: qjVerifyCodeData, getQjVerifyCodeHandle: getQjVerifyCodeHandle, flowStatus: flowStatus })),
231
+ props: props,
232
+ };
233
+ },
234
+ },
235
+ ];
236
+ var qunjColumns = isNewQys
237
+ ? qjColumn
238
+ : // 下面是最初设计的模式
239
+ [
240
+ {
241
+ title: "群杰印章",
242
+ align: "center",
243
+ children: qjColumn,
244
+ },
245
+ ];
246
246
  return {
247
247
  qunjColumns: qunjColumns,
248
248
  };
@@ -0,0 +1,27 @@
1
+ import { __assign } from '../../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import TranslationButton from '../../translationbutton/translationButton.js';
4
+
5
+ function TranslationButtonComponents(_a) {
6
+ var isTranslation = _a.isTranslation, previewUrl = _a.previewUrl; _a.request; var record = _a.record, realIndex = _a.realIndex, setRecords = _a.setRecords;
7
+ var attachId = record.attachId, attachName = record.attachName;
8
+ // 翻译的任务id改变时触发
9
+ var tidChange = function (tid) {
10
+ // 更新tid 如果需要 将任务id存储
11
+ if (typeof realIndex === "number") {
12
+ setRecords(function (preRecords) {
13
+ var copyRecords = preRecords.slice();
14
+ var item = copyRecords[realIndex];
15
+ copyRecords.splice(realIndex, 1, __assign(__assign({}, item), { tid: tid }));
16
+ return copyRecords;
17
+ });
18
+ }
19
+ };
20
+ // 翻译组件
21
+ var transaltionCom = isTranslation && attachId && attachName && previewUrl ? (jsx(TranslationButton, { attachId: attachId, attachName: attachName, tidChange: tidChange, previewUrl: previewUrl,
22
+ // 如果业务存储了tid的话
23
+ tid: record === null || record === void 0 ? void 0 : record.tid })) : null;
24
+ return transaltionCom;
25
+ }
26
+
27
+ export { TranslationButtonComponents as default };
@@ -0,0 +1,35 @@
1
+ import { __assign } from '../../_virtual/_tslib.js';
2
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
+ import TranslationButtonComponents from './TranslateButton.js';
4
+ import { getColumnMergeProp } from '../hooks/useParseRecords.js';
5
+ import { Checkbox } from 'antd';
6
+
7
+ function useTranslateCom(_a) {
8
+ var isTranslation = _a.isTranslation, previewUrl = _a.previewUrl, request = _a.request, records = _a.records, dataTypeSort = _a.dataTypeSort, allData = _a.allData;
9
+ var translateColumns = [
10
+ {
11
+ title: "附件扩展功能",
12
+ dataIndex: "translatedFile",
13
+ key: "translatedFile",
14
+ width: 180,
15
+ align: "center",
16
+ render: function (text, record, index) {
17
+ var currentDataType = getColumnMergeProp({
18
+ record: record,
19
+ index: index,
20
+ records: records,
21
+ dataTypeSort: dataTypeSort,
22
+ }).currentDataType;
23
+ var _a = allData[currentDataType] || {}, setSameTypeRecords = _a.setRecords, isShowSaveTemplate = _a.isShowSaveTemplate;
24
+ // 是否存模板
25
+ var isCustomerReference = (record === null || record === void 0 ? void 0 : record.isCustomerReference) + "" === "1" ? true : false;
26
+ return (jsxs(Fragment, { children: [!record.isHideSaveCustomerReference && isShowSaveTemplate ? (jsx(Checkbox, __assign({ checked: isCustomerReference, disabled: true }, { children: "\u5B58\u6837\u677F" }))) : null, jsx(TranslationButtonComponents, { request: request, previewUrl: previewUrl, isTranslation: isTranslation, record: record, realIndex: index, setRecords: setSameTypeRecords })] }));
27
+ },
28
+ },
29
+ ];
30
+ return {
31
+ translateColumns: translateColumns,
32
+ };
33
+ }
34
+
35
+ export { useTranslateCom as default };
@@ -9,7 +9,7 @@ import { Popconfirm } from 'antd';
9
9
 
10
10
  var sortableType = Symbol("commonSearchList");
11
11
  var CommonSearchList = function (props) {
12
- var commonSearchList = props.commonSearchList, currentCommonSearchKey = props.currentCommonSearchKey, setCurrentCommonSearchKey = props.setCurrentCommonSearchKey, form = props.form, reTransformData = props.reTransformData, deleteData = props.deleteData, setReplaceData = props.setReplaceData, updateServerData = props.updateServerData, onSearchHandle = props.onSearchHandle;
12
+ var commonSearchList = props.commonSearchList, currentCommonSearchKey = props.currentCommonSearchKey, setCurrentCommonSearchKey = props.setCurrentCommonSearchKey, form = props.form, reTransformData = props.reTransformData, deleteData = props.deleteData, setReplaceData = props.setReplaceData, updateServerData = props.updateServerData, onSearchHandle = props.onSearchHandle, dynamicKey = props.dynamicKey, dynamicSettingRef = props.dynamicSettingRef;
13
13
  var onMoveItem = useMemoizedFn(function (dragIndex, hoverIndex) {
14
14
  // 由于对于固定列,不能进行拖拽排序,所以需要找出所有包含固定列的属性出来
15
15
  var dragCard = commonSearchList[dragIndex];
@@ -25,24 +25,43 @@ var CommonSearchList = function (props) {
25
25
  updateServerData === null || updateServerData === void 0 ? void 0 : updateServerData();
26
26
  });
27
27
  var handleClick = function (item) {
28
+ var _a, _b;
28
29
  if (currentCommonSearchKey === item.key) {
29
30
  setCurrentCommonSearchKey === null || setCurrentCommonSearchKey === void 0 ? void 0 : setCurrentCommonSearchKey("");
30
31
  return;
31
32
  }
32
33
  setCurrentCommonSearchKey === null || setCurrentCommonSearchKey === void 0 ? void 0 : setCurrentCommonSearchKey(item.key);
33
- var formData = reTransformData === null || reTransformData === void 0 ? void 0 : reTransformData(item.value, item.timeKeys);
34
- form.setFieldsValue(formData);
34
+ // 更新动态列配置,常用搜索绑定动态列配置。
35
+ if (dynamicKey && item.dynamicList) {
36
+ (_b = (_a = dynamicSettingRef.current) === null || _a === void 0 ? void 0 : _a.updateList) === null || _b === void 0 ? void 0 : _b.call(_a, item.dynamicList || [], {
37
+ isNotSaveToServer: true,
38
+ });
39
+ }
40
+ setTimeout(function () {
41
+ // 更新动态列配置
42
+ var formData = reTransformData === null || reTransformData === void 0 ? void 0 : reTransformData(item.value, item.timeKeys);
43
+ if (item.dynamicList) {
44
+ item.dynamicList.forEach(function (formItem) {
45
+ if (formItem.show) {
46
+ if (!formData.hasOwnProperty(formItem.name)) {
47
+ formData[formItem.name] = undefined;
48
+ }
49
+ }
50
+ });
51
+ }
52
+ form === null || form === void 0 ? void 0 : form.setFieldsValue(formData);
53
+ // 触发查询事件
54
+ onSearchHandle === null || onSearchHandle === void 0 ? void 0 : onSearchHandle();
55
+ }, 100);
56
+ // const formData = reTransformData?.(item.value, item.timeKeys);
57
+ // form.setFieldsValue(formData);
35
58
  };
36
59
  var deleteItem = function (index) {
37
60
  deleteData === null || deleteData === void 0 ? void 0 : deleteData(index);
38
61
  };
39
- return (jsxs("div", __assign({ className: "common-search-list--container" }, { children: [jsx("div", __assign({ className: "common-search-list--title" }, { children: "\u5E38\u7528\u641C\u7D22" })), jsx("div", __assign({ className: "common-search-list--content" }, { children: jsx(Sortable, { children: commonSearchList.map(function (item, index) {
62
+ return (commonSearchList === null || commonSearchList === void 0 ? void 0 : commonSearchList.length) ? (jsxs("div", __assign({ className: "common-search-list--container" }, { children: [jsx("div", __assign({ className: "common-search-list--title" }, { children: "\u5E38\u7528\u641C\u7D22" })), jsx("div", __assign({ className: "common-search-list--content" }, { children: jsx(Sortable, { children: commonSearchList.map(function (item, index) {
40
63
  return (jsx(Sortable.Item, __assign({ id: item.key, title: item.title, onMoveItem: onMoveItem, onMoveEnd: onMoveEnd, index: index, type: sortableType, direction: "horizontal" }, { children: jsxs(ButtonCom, __assign({ type: currentCommonSearchKey === item.key ? "default" : undefined, isWhite: currentCommonSearchKey === item.key ? false : true, onClick: function () {
41
64
  handleClick(item);
42
- if (currentCommonSearchKey === item.key) {
43
- return;
44
- }
45
- onSearchHandle === null || onSearchHandle === void 0 ? void 0 : onSearchHandle();
46
65
  } }, { children: [item.title, jsx(Popconfirm, __assign({ title: "\u786E\u8BA4\u5220\u9664\u5417\uFF1F", onConfirm: function (e) {
47
66
  var _a, _b;
48
67
  (_a = e === null || e === void 0 ? void 0 : e.preventDefault) === null || _a === void 0 ? void 0 : _a.call(e);
@@ -52,7 +71,7 @@ var CommonSearchList = function (props) {
52
71
  setCurrentCommonSearchKey === null || setCurrentCommonSearchKey === void 0 ? void 0 : setCurrentCommonSearchKey("");
53
72
  }
54
73
  }, onCancel: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); } }, { children: jsx(DeleteOutlined, { onClick: function (e) { var _a; return (_a = e === null || e === void 0 ? void 0 : e.stopPropagation) === null || _a === void 0 ? void 0 : _a.call(e); }, className: "record-common-list--delete" }) }))] })) }), item.key));
55
- }) }) }))] })));
74
+ }) }) }))] }))) : null;
56
75
  };
57
76
 
58
77
  export { CommonSearchList as default };