ztxkui 10.0.95 → 10.0.97

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 (150) hide show
  1. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  2. package/dist/components/TranslationButton/DownFile.js +97 -0
  3. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  4. package/dist/components/TranslationButton/PreviewFile.js +75 -0
  5. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  6. package/dist/components/TranslationButton/TranslationButton.js +247 -0
  7. package/dist/components/TranslationButton/demoComponents/index.d.ts +3 -0
  8. package/dist/components/TranslationButton/demoComponents/index.js +9 -0
  9. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  10. package/dist/components/TranslationButton/hooks.js +143 -0
  11. package/dist/components/TranslationButton/index.d.ts +4 -0
  12. package/dist/components/TranslationButton/index.js +4 -0
  13. package/dist/components/Upload/utils.d.ts +8 -1
  14. package/dist/components/Upload/utils.js +56 -4
  15. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  16. package/dist/components/UploadCustom/hooks/useDg.js +57 -0
  17. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  18. package/dist/components/business/Signatures/components/CodeModal.js +159 -0
  19. package/dist/components/electron-signatures/content.d.ts +9 -0
  20. package/dist/components/electron-signatures/content.js +1126 -0
  21. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  22. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  23. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  24. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  25. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  26. package/dist/components/electron-signatures/demoComponents/index.js +27 -0
  27. package/dist/components/electron-signatures/demoComponents/index_old.d.ts +3 -0
  28. package/dist/components/electron-signatures/demoComponents/index_old.js +502 -0
  29. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  30. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  31. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  32. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  33. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +663 -0
  34. package/dist/components/electron-signatures/demoComponents/makingData.js +1164 -0
  35. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  36. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  37. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  38. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  39. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  40. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  41. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  42. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  43. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  44. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  45. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  46. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  47. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  48. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  49. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  50. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  51. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  52. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  53. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  54. package/dist/components/electron-signatures/electron-signatures-fragment.js +344 -0
  55. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  56. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +513 -0
  57. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  58. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  59. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  60. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +89 -0
  61. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  62. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  63. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  64. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  65. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  66. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  67. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  68. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  69. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  70. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  71. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  72. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  73. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  74. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +45 -0
  75. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  76. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +380 -0
  77. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +20 -0
  78. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +169 -0
  79. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  80. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +38 -0
  81. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  82. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  83. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  84. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  85. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  86. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  87. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  88. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  89. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  90. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  91. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  92. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +45 -0
  93. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  94. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  95. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  96. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  97. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  98. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +134 -0
  99. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  100. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  101. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  102. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  103. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +102 -0
  104. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +365 -0
  105. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  106. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  107. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  108. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  109. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  110. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  111. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  112. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  113. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  114. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  115. package/dist/components/electron-signatures/index.d.ts +13 -0
  116. package/dist/components/electron-signatures/index.js +54 -0
  117. package/dist/components/electron-signatures/index_old.d.ts +9 -0
  118. package/dist/components/electron-signatures/index_old.js +966 -0
  119. package/dist/components/electron-signatures/interface.d.ts +849 -0
  120. package/dist/components/electron-signatures/interface.js +57 -0
  121. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  122. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  123. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  124. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  125. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  126. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  127. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  128. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +346 -0
  129. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  130. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +63 -0
  131. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  132. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  133. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  134. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  135. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  136. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  137. package/dist/components/electron-signatures/utils.d.ts +26 -0
  138. package/dist/components/electron-signatures/utils.js +67 -0
  139. package/dist/components/utils/ZtxkContext.d.ts +16 -0
  140. package/dist/components/utils/ZtxkContext.js +4 -0
  141. package/dist/components/utils/useMemoizedFn.d.ts +6 -0
  142. package/dist/components/utils/useMemoizedFn.js +22 -0
  143. package/dist/components/utils/usePrevious.d.ts +3 -0
  144. package/dist/components/utils/usePrevious.js +13 -0
  145. package/dist/index.css +686 -0
  146. package/dist/index.css.map +1 -1
  147. package/dist/index.d.ts +3 -0
  148. package/dist/index.js +105 -87
  149. package/dist/request.js +1 -1
  150. package/package.json +4 -3
@@ -0,0 +1,211 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import i18next from 'ztxkutils/dist/i18next';
49
+ import React, { useState, useRef, useEffect } from 'react';
50
+ import { unstable_batchedUpdates } from 'react-dom';
51
+ import ElectronSignatures from '../index';
52
+ import { Button } from '../../../index';
53
+ import request from '../../../request';
54
+ import dayjs from 'dayjs';
55
+ import { cghtData, historyData, } from './makingData';
56
+ /**
57
+ * 契约锁编辑模式 每个附件,都使用一个群杰印章按钮
58
+ */
59
+ var Making = function () {
60
+ var electronHandleRef = useRef();
61
+ var _a = useState(null), params = _a[0], setParams = _a[1];
62
+ var _b = useState(null), otherOptions = _b[0], setOtherOptions = _b[1];
63
+ var childRef = useRef(null);
64
+ var _c = useState(true), show = _c[0], setShow = _c[1];
65
+ useEffect(function () {
66
+ // 模拟接口请求
67
+ setTimeout(function () {
68
+ unstable_batchedUpdates(function () {
69
+ setParams(cghtData);
70
+ setOtherOptions(historyData);
71
+ });
72
+ }, 1000);
73
+ }, []);
74
+ console.log(params);
75
+ return (React.createElement(React.Fragment, null,
76
+ React.createElement(Button, { type: "link", disabled: true }, i18next.t('我是一个链接按钮111')),
77
+ React.createElement(ElectronSignatures, __assign({ request: request, dataTypeName: i18next.t('新附件1'), dataType: "key1", otherOptions: otherOptions, customButtons: React.createElement(React.Fragment, null,
78
+ React.createElement(Button, { type: "primary" }, i18next.t('挑选合同附件'))), isNewQys: true, isBgColor: true,
79
+ // isDefaultQunj={false}
80
+ // 是否显示上传附件按钮
81
+ isShowFileUpload: true,
82
+ // 附件类型是否允许修改
83
+ isAllowedPatchFileType: true,
84
+ // 是否显示批量下载电子签章件
85
+ isShowElectronBatchBtn: true,
86
+ // 是否显示批量下载原件
87
+ isShowDownloadBatchBtn: true,
88
+ // 是否显示双签件
89
+ isShowDoubleSignedBatchBtn: true, isShowChioseTemplate: true, isShowBatchDeleteBtn: true, isShowBatchPreviewBtn: true,
90
+ // 文件比对
91
+ isShowFileComparisonBtn: true,
92
+ // 是否显示附件归属
93
+ // isShowFileTypeMerge={false}
94
+ // 是否群杰印章对每个附件生效
95
+ // isSingleQj
96
+ // 是否开启文档翻译功能
97
+ isTranslation: true, isShowSaveTemplate: true, isShowBatchUseOpeningContractSealBtn: true,
98
+ // isTranslation
99
+ previewUrl: "/document-translation-preview" }, params, { isNeedComparison: true, refreshCode: true, isQunjAddress: true, isShowSealApply: true, goWorkflowSeal: function (id) {
100
+ console.log(id);
101
+ }, qunjListRenderFilter: function (qunjList) {
102
+ console.log(111111, qunjList);
103
+ return qunjList.filter(function (item) { return item.id !== '8581271574280391987'; });
104
+ // return qunjList.filter((item) => item.companyType !== 'K000');
105
+ return qunjList;
106
+ }, isShowOpeningContractSealNotRelyQys: true,
107
+ // 如果是否需要契约锁不由组件内部控制 需要传递这个字段 需要配合 needQys为 0时
108
+ // isControlNeedQys={false}
109
+ // 如果默认不需要契约锁 需要传递这个属性 需要配置needQys为 0
110
+ defaultJustNeedQj: true,
111
+ // fileSplitRules={(record) => {
112
+ // if (record.oldVersionId) {
113
+ // return {
114
+ // key: 'key2',
115
+ // name: '替换附件',
116
+ // };
117
+ // }
118
+ // return {
119
+ // key: 'key1',
120
+ // name: '新附件',
121
+ // };
122
+ // }}
123
+ // 按照何种排序
124
+ // fileSplitStringRules={['key1', 'key2']}
125
+ // 第二种数据类型的配置 基本外部配置 只是值可能不同
126
+ // otherOptions={[
127
+ // {
128
+ // dataType: 'key2',
129
+ // dataTypeName: '历史附件',
130
+ // ...params1,
131
+ // },
132
+ // ]}
133
+ // 数据改变时 触发
134
+ onValueChange: function (info) {
135
+ console.log(info);
136
+ setParams(function (preParams) {
137
+ var _a, _b;
138
+ var newParams = __assign(__assign({}, preParams), info.key1);
139
+ if (info.key1.fileList) {
140
+ newParams.fileList = (_b = (_a = info.key1) === null || _a === void 0 ? void 0 : _a.fileList) === null || _b === void 0 ? void 0 : _b.map(function (item) {
141
+ return __assign(__assign({}, item), { createTime: item.createTime || dayjs().format('YYYY-MM-DD HH:mm:ss') });
142
+ });
143
+ }
144
+ return newParams;
145
+ });
146
+ // if (info.key1) {
147
+ // setParams((preParams) => {
148
+ // return {
149
+ // ...preParams,
150
+ // ...info.key1,
151
+ // };
152
+ // });
153
+ // } else {
154
+ // setParams1((preParams1) => {
155
+ // return {
156
+ // ...preParams1,
157
+ // ...info.key2,
158
+ // };
159
+ // });
160
+ // }
161
+ },
162
+ // 组件对外暴露的一些方法 获取数据 校验方法
163
+ electronHandleRef: electronHandleRef, isValidateSuccess: function () {
164
+ // 最后会调用一个接口 验证下是否所选的电子印章都已经盖了章 如果没有盖章 就会弹出一个选择框 让用户重新选择 重新选择后 如果用户把所有未盖章的电子印章都取消勾选的话 那么就会调用这个方法 说明校验通过 可以进行下一步
165
+ console.log(i18next.t('最终校验通过了!!!'));
166
+ },
167
+ // 是否显示合同分数
168
+ isContranctNum: true })),
169
+ React.createElement("button", { onClick: function () {
170
+ setParams(function (preParams) {
171
+ return __assign(__assign({}, preParams), { deptId: preParams.deptId === '1514842376723976194'
172
+ ? '1514842546870112258'
173
+ : '1514842376723976194' });
174
+ });
175
+ // 修改了哪个数据的部门需要清空部门下的契约锁数据
176
+ // electronHandleRef.current.changeDeptIdClearQysDataHandler('key1');
177
+ } }, i18next.t('修改部门id')),
178
+ React.createElement("button", { onClick: function () {
179
+ setParams(function (preParams) {
180
+ return __assign(__assign({}, preParams), { flowId: preParams.flowId === 'scm_general_yyzj_operation'
181
+ ? 'scm_general_yyzj_common'
182
+ : 'scm_general_yyzj_operation' });
183
+ });
184
+ // 修改了哪个数据的部门需要清空部门下的契约锁数据
185
+ // electronHandleRef.current.changeDeptIdClearQysDataHandler('key1');
186
+ } }, i18next.t('修改流程id')),
187
+ React.createElement("button", { onClick: function () {
188
+ console.log(electronHandleRef.current.getAllData());
189
+ } }, i18next.t('获取数据')),
190
+ React.createElement("button", { onClick: function () { return __awaiter(void 0, void 0, void 0, function () {
191
+ var err_1;
192
+ return __generator(this, function (_a) {
193
+ switch (_a.label) {
194
+ case 0:
195
+ _a.trys.push([0, 2, , 3]);
196
+ return [4 /*yield*/, electronHandleRef.current.validateElectronTable()];
197
+ case 1:
198
+ _a.sent();
199
+ console.log(i18next.t('校验通过'));
200
+ console.log(electronHandleRef.current.getAllData());
201
+ return [3 /*break*/, 3];
202
+ case 2:
203
+ err_1 = _a.sent();
204
+ console.log(err_1);
205
+ return [3 /*break*/, 3];
206
+ case 3: return [2 /*return*/];
207
+ }
208
+ });
209
+ }); } }, i18next.t('校验逻辑'))));
210
+ };
211
+ export default Making;