ztxkui 3.4.19 → 3.5.2

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.
@@ -39,7 +39,7 @@ import Upload from 'components/Upload';
39
39
  import { useState, useEffect, useCallback, useRef } from 'react';
40
40
  import { UploadSingle } from './index';
41
41
  var originFileList = [];
42
- var token = "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoiY2hlbnl4IiwiZW1wX25hbWUiOm51bGwsImVtcF9udW1iZXIiOm51bGwsImltdF9pZCI6bnVsbCwicmVhbF9uYW1lIjoi6ZmI5Lqa6ZuEIiwiY2xpZW50X3R5cGUiOiJ3ZWIiLCJkYXRhX3JvbGVfaWQiOiIxMzQzNDkwNjg2MjYwMjI4MDk3LDEzNDU5Nzg1MDUzMDIwNTY5NjIsMTQ2ODAzNTM1MTYyNTI4NTYzNCwxNTQyMDc2MzA4NTc4MDI1NDc0IiwiY2xpZW50X2lkIjoic3dvcmQiLCJ1c2VyX3R5cGUiOiJ3ZWIiLCJyb2xlX2lkIjoiMTEyMzU5ODgxNjczODY3NTIwMSwxNDY3MDE1OTc1NDg0NzYwMDY2LDE0NjgwMzQ0MzcxNTc5NjE3MjksMTQ4MDgyOTMzNzkzOTEzMjQxNyIsInBvc3RfbmFtZSI6bnVsbCwic2NvcGUiOlsiYWxsIl0sImludGVydmlld19pZCI6bnVsbCwiZXhwIjoxNjU5MDU2NTgxLCJvcmdfbmFtZSI6bnVsbCwianRpIjoiYzI5NDlhYmQtNTRlYS00ODhkLTg2MzQtMzEyYTZkMzdhZjE0IiwibWVtYmVyX2lkIjoxLCJjb21wYW55X2lkIjpudWxsLCJzeXN0ZW1faWQiOm51bGwsImRlcHRfbmFtZSI6bnVsbCwiYXZhdGFyIjoiIiwiZGF0YV9yb2xlX25hbWUiOiJudWxsLGFkbWluLGFkbWluLGFkbWluIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW4iLCJ1c2VyIiwiYWRtaW5pc3RyYXRvciJdLCJyb2xlX25hbWUiOiJhZG1pbmlzdHJhdG9yLHVzZXIsYWRtaW4sYWRtaW4iLCJyZXN1bWVfdGVtcGxhdGUiOm51bGwsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IHptZG1zIiwicG9zdF9pZCI6IiIsInVzZXJfaWQiOiIxNDEyOTUzODA0MzMzNTU1NzE0Iiwib3JnX2lkIjpudWxsLCJuaWNrX25hbWUiOiLpmYjkuprpm4QiLCJjb21wYW55X25hbWUiOm51bGwsImRlcHRfaWQiOiIiLCJoYW5kbGVfaHJfbmFtZSI6bnVsbCwiYWNjb3VudCI6ImNoZW55eCIsInJlc3VtZV9pZCI6bnVsbH0.oekbQq3Q_7PWmPgR_A1G48oN9pE2pzDMSSvmkdqg6KM";
42
+ var token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoid2YxMCIsImVtcF9uYW1lIjoi5rWB56iL5Lit5b-DMTAiLCJlbXBfbnVtYmVyIjoiWUcyMjAzMDUwIiwiaW10X2lkIjpudWxsLCJyZWFsX25hbWUiOiLmtYHnqIvkuK3lv4MxMCIsImNsaWVudF90eXBlIjoid2ViIiwiZGF0YV9yb2xlX2lkIjoiMTM0NTk3ODUwNTMwMjA1Njk2MiwxNTQyMDc2MzA4NTc4MDI1NDc0IiwiY2xpZW50X2lkIjoic3dvcmQiLCJ1c2VyX3R5cGUiOiJ3ZWIiLCJyb2xlX2lkIjoiMTQ0NjgxOTQ2MzY5Mzg0NDQ4MiwxNDgwODI5MDYzNTY0NTQxOTU0IiwicG9zdF9uYW1lIjpudWxsLCJzY29wZSI6WyJhbGwiXSwiaW50ZXJ2aWV3X2lkIjpudWxsLCJleHAiOjE2NjA4MjM2OTUsIm9yZ19uYW1lIjoi5rWZ5ZWG5Lit5ouT6ZuG5Zui6IKh5Lu95pyJ6ZmQ5YWs5Y-4IiwianRpIjoiYzEyZTUxOTctZTg1OS00ZTYzLWJhNDQtYjVkOTQ2NzBlMjYzIiwibWVtYmVyX2lkIjoxNTA5NTA5ODExODI5OTUyNTEzLCJjb21wYW55X2lkIjoxNDE1ODM3OTkxNzAxMDM3MDU3LCJzeXN0ZW1faWQiOm51bGwsImRlcHRfbmFtZSI6bnVsbCwiYXZhdGFyIjoiIiwiZGF0YV9yb2xlX25hbWUiOiJhZG1pbixhZG1pbiIsImF1dGhvcml0aWVzIjpbInVzZXIiLCJhZG1pbmlzdHJhdG9yIl0sInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3IsdXNlciIsInJlc3VtZV90ZW1wbGF0ZSI6bnVsbCwibGljZW5zZSI6InBvd2VyZWQgYnkgem1kbXMiLCJwb3N0X2lkIjoiIiwidXNlcl9pZCI6IjE1MDk1MTAyMzAzNjY5MjQ4MDIiLCJvcmdfaWQiOjE0NTc1Mjc3NjU5MTg1MTUyMDEsIm5pY2tfbmFtZSI6Iua1geeoi-S4reW_gzEwIiwiY29tcGFueV9uYW1lIjoi5rWZ5ZWG5Lit5ouT6ZuG5Zui6IKh5Lu95pyJ6ZmQ5YWs5Y-4IiwiZGVwdF9pZCI6IjE0MzI5NTYyMDI2NzQxODgyODkiLCJoYW5kbGVfaHJfbmFtZSI6bnVsbCwiYWNjb3VudCI6IndmMTAiLCJyZXN1bWVfaWQiOm51bGx9.mz7PP0RGshNbc6ynDibJASDvw1q1tmHn1rCBWQ2khEI";
43
43
  function UploadDemo() {
44
44
  var _this = this;
45
45
  var _a = useState(originFileList), fileList = _a[0], setFileList = _a[1];
@@ -176,7 +176,7 @@ function UploadDemo() {
176
176
  };
177
177
  var tableHandleRef = useRef();
178
178
  return (React.createElement("div", null,
179
- React.createElement(UploadSingle, { action: "http://192.168.0.83:8888/api/zmdms-resource/oss/endpoint/put-file-attach", data: {
179
+ React.createElement(UploadSingle, { action: "http://192.168.0.83:8000/api/zmdms-resource/oss/endpoint/put-file-attach", data: {
180
180
  system: '2',
181
181
  }, headers: {
182
182
  'Zmdms-Auth': token,
@@ -197,7 +197,7 @@ function UploadDemo() {
197
197
  system: '2',
198
198
  },
199
199
  // ztAccept={['.ttf']}
200
- apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", originFileList: fileList, callback: uploadCallbackFn, onDeleteCallback: function (index, file) {
200
+ apiBaseUrl: "http://192.168.0.83:8000", fileBaseUrl: "http://192.168.0.83:88", originFileList: fileList, callback: uploadCallbackFn, onDeleteCallback: function (index, file) {
201
201
  console.log(index, file);
202
202
  }, upload: upload, rowSelection: "checkbox", uploadTableRef: uploadTableRef, tableRestProps: {
203
203
  tableHandleRef: tableHandleRef,
@@ -61,7 +61,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
61
61
  to[j] = from[i];
62
62
  return to;
63
63
  };
64
- import React, { useState, useEffect, memo, useMemo, useImperativeHandle, } from 'react';
64
+ import React, { useState, useEffect, memo, useMemo, useImperativeHandle, useRef, } from 'react';
65
65
  import { Button, Progress, message, Popconfirm } from '../../index';
66
66
  import Table from '../Table';
67
67
  import dayjs from 'dayjs';
@@ -73,6 +73,10 @@ var UploadTable = function (_a) {
73
73
  var _e = useState([]), dataSource = _e[0], setDataSource = _e[1];
74
74
  var _f = useState(false), loading = _f[0], setLoading = _f[1];
75
75
  var _g = useState(), selectedRows = _g[0], setSelectedRows = _g[1];
76
+ var dataSourceRef = useRef([]);
77
+ useEffect(function () {
78
+ dataSourceRef.current = dataSource;
79
+ }, [dataSource]);
76
80
  useImperativeHandle(uploadTableRef, function () { return ({
77
81
  getSelectedRows: function () { return selectedRows; },
78
82
  }); }, [selectedRows]);
@@ -128,72 +132,7 @@ var UploadTable = function (_a) {
128
132
  ellipsis: false,
129
133
  fixed: 'right',
130
134
  render: function (text, record, index) {
131
- var operationAuth = record === null || record === void 0 ? void 0 : record.operationAuth;
132
- // '1' 预览 '2' 下载 '3' 删除
133
- var authDownloadBtn = typeof operationAuth === 'string' &&
134
- operationAuth.indexOf('2') !== -1
135
- ? true
136
- : false;
137
- var authPreviewBtn = typeof operationAuth === 'string' &&
138
- operationAuth.indexOf('1') !== -1
139
- ? true
140
- : false;
141
- var authDeleteBtn = typeof operationAuth === 'string' &&
142
- operationAuth.indexOf('3') !== -1
143
- ? true
144
- : false;
145
- return (React.createElement(React.Fragment, null,
146
- ((typeof operationAuth === 'string'
147
- ? authDownloadBtn
148
- : showDownloadBtn) ||
149
- ((typeof operationAuth === 'string'
150
- ? authPreviewBtn
151
- : showPreviewBtn) &&
152
- (record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024)) && (React.createElement(Button, { type: "link", style: {
153
- height: 28,
154
- }, onClick: function () {
155
- if (isPublic) {
156
- downloadPublicFile(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName);
157
- }
158
- else {
159
- // downloadFile(
160
- // apiBaseUrl,
161
- // record?.fileId,
162
- // record?.fileName,
163
- // authToken
164
- // );
165
- downloadFileCallBack(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName, {
166
- authToken: authToken,
167
- callbackAfter: function () {
168
- onDownLoadCallbackAfter &&
169
- onDownLoadCallbackAfter(record);
170
- },
171
- });
172
- }
173
- } }, "\u4E0B\u8F7D")),
174
- (typeof operationAuth === 'string'
175
- ? authPreviewBtn
176
- : showPreviewBtn) && (React.createElement(Button, { type: "link", style: {
177
- height: 28,
178
- }, onClick: function () {
179
- if ((record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) {
180
- message.warning('文件过大,暂不支持在线预览,请先下载后查看!');
181
- }
182
- else {
183
- previewFile(fileBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, {
184
- titleName: record === null || record === void 0 ? void 0 : record.fileName,
185
- authToken: authToken,
186
- });
187
- onPreviewCallbackBefore &&
188
- onPreviewCallbackBefore(record);
189
- }
190
- } }, "\u9884\u89C8")),
191
- (typeof operationAuth === 'string'
192
- ? authDeleteBtn
193
- : showDeleteBtn) && (React.createElement(Popconfirm, { title: "\u662F\u5426\u5220\u9664\u8BE5\u6761\u6570\u636E?", cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onDeleteFile(record, index); } },
194
- React.createElement(Button, { style: {
195
- height: 28,
196
- }, type: "link" }, "\u5220\u9664")))));
135
+ return createOpt(text, record, index);
197
136
  },
198
137
  },
199
138
  ]) : __spreadArray(__spreadArray(__spreadArray(__spreadArray([], startColumns), [
@@ -235,75 +174,108 @@ var UploadTable = function (_a) {
235
174
  ellipsis: false,
236
175
  fixed: 'right',
237
176
  render: function (text, record, index) {
238
- var operationAuth = record === null || record === void 0 ? void 0 : record.operationAuth;
239
- // '1' 预览 '2' 下载 '3' 删除
240
- var authDownloadBtn = typeof operationAuth === 'string' &&
241
- operationAuth.indexOf('2') !== -1
242
- ? true
243
- : false;
244
- var authPreviewBtn = typeof operationAuth === 'string' &&
245
- operationAuth.indexOf('1') !== -1
246
- ? true
247
- : false;
248
- var authDeleteBtn = typeof operationAuth === 'string' &&
249
- operationAuth.indexOf('3') !== -1
250
- ? true
251
- : false;
252
- return (React.createElement(React.Fragment, null,
253
- ((typeof operationAuth === 'string'
254
- ? authDownloadBtn
255
- : showDownloadBtn) ||
256
- ((typeof operationAuth === 'string'
257
- ? authPreviewBtn
258
- : showPreviewBtn) &&
259
- (record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024)) && (React.createElement(Button, { type: "link", style: {
260
- height: 28,
261
- }, onClick: function () {
262
- if (isPublic) {
263
- downloadPublicFile(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName);
264
- }
265
- else {
266
- // downloadFile(
267
- // apiBaseUrl,
268
- // record?.fileId,
269
- // record?.fileName,
270
- // authToken
271
- // );
272
- downloadFileCallBack(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName, {
273
- authToken: authToken,
274
- callbackAfter: function () {
275
- onDownLoadCallbackAfter &&
276
- onDownLoadCallbackAfter(record);
277
- },
278
- });
279
- }
280
- } }, "\u4E0B\u8F7D")),
281
- (typeof operationAuth === 'string'
282
- ? authPreviewBtn
283
- : showPreviewBtn) && (React.createElement(Button, { type: "link", style: {
284
- height: 28,
285
- }, onClick: function () {
286
- if ((record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) {
287
- message.warning('文件过大,暂不支持在线预览,请先下载后查看!');
288
- }
289
- else {
290
- previewFile(fileBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, {
291
- titleName: record === null || record === void 0 ? void 0 : record.fileName,
292
- authToken: authToken,
293
- });
294
- onPreviewCallbackBefore &&
295
- onPreviewCallbackBefore(record);
296
- }
297
- } }, "\u9884\u89C8")),
298
- (typeof operationAuth === 'string'
299
- ? authDeleteBtn
300
- : showDeleteBtn) && (React.createElement(Popconfirm, { title: "\u662F\u5426\u5220\u9664\u8BE5\u6761\u6570\u636E?", cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onDeleteFile(record, index); } },
301
- React.createElement(Button, { style: {
302
- height: 28,
303
- }, type: "link" }, "\u5220\u9664")))));
177
+ return createOpt(text, record, index);
304
178
  },
305
179
  },
306
180
  ]);
181
+ function createOpt(text, record, index) {
182
+ var operationAuth = record === null || record === void 0 ? void 0 : record.operationAuth;
183
+ // '1' 预览 '2' 下载 '3' 删除
184
+ var authDownloadBtn = typeof operationAuth === 'string' && operationAuth.indexOf('2') !== -1
185
+ ? true
186
+ : false;
187
+ var authPreviewBtn = typeof operationAuth === 'string' && operationAuth.indexOf('1') !== -1
188
+ ? true
189
+ : false;
190
+ var authDeleteBtn = typeof operationAuth === 'string' && operationAuth.indexOf('3') !== -1
191
+ ? true
192
+ : false;
193
+ return (React.createElement(React.Fragment, null,
194
+ ((typeof operationAuth === 'string'
195
+ ? authDownloadBtn
196
+ : showDownloadBtn) ||
197
+ ((typeof operationAuth === 'string'
198
+ ? authPreviewBtn
199
+ : showPreviewBtn) &&
200
+ (record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024)) && (React.createElement(Button, { type: "link", style: {
201
+ height: 28,
202
+ }, loading: record === null || record === void 0 ? void 0 : record.loading, onClick: function () {
203
+ var newDataSource = dataSource.slice();
204
+ newDataSource.splice(index, 1, __assign(__assign({}, record), { loading: true }));
205
+ setDataSource(newDataSource);
206
+ if (isPublic) {
207
+ downloadPublicFile(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName, {
208
+ callbackAfter: function () {
209
+ var _a, _b, _c;
210
+ var newDataSource = ((_b = (_a = (dataSourceRef.current || [])) === null || _a === void 0 ? void 0 : _a.slice) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
211
+ if ((_c = newDataSource[index]) === null || _c === void 0 ? void 0 : _c.loading) {
212
+ newDataSource.splice(index, 1, __assign(__assign({}, record), { loading: false }));
213
+ setDataSource(newDataSource);
214
+ }
215
+ },
216
+ callbackError: function () {
217
+ var _a, _b, _c;
218
+ var newDataSource = ((_b = (_a = (dataSourceRef.current || [])) === null || _a === void 0 ? void 0 : _a.slice) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
219
+ if ((_c = newDataSource[index]) === null || _c === void 0 ? void 0 : _c.loading) {
220
+ newDataSource.splice(index, 1, __assign(__assign({}, record), { loading: false }));
221
+ setDataSource(newDataSource);
222
+ }
223
+ },
224
+ });
225
+ }
226
+ else {
227
+ // downloadFile(
228
+ // apiBaseUrl,
229
+ // record?.fileId,
230
+ // record?.fileName,
231
+ // authToken
232
+ // );
233
+ downloadFileCallBack(apiBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, record === null || record === void 0 ? void 0 : record.fileName, {
234
+ authToken: authToken,
235
+ callbackAfter: function () {
236
+ var _a, _b, _c;
237
+ var newDataSource = ((_b = (_a = (dataSourceRef.current || [])) === null || _a === void 0 ? void 0 : _a.slice) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
238
+ if ((_c = newDataSource[index]) === null || _c === void 0 ? void 0 : _c.loading) {
239
+ newDataSource.splice(index, 1, __assign(__assign({}, record), { loading: false }));
240
+ setDataSource(newDataSource);
241
+ }
242
+ onDownLoadCallbackAfter &&
243
+ onDownLoadCallbackAfter(record);
244
+ },
245
+ callbackError: function () {
246
+ var _a, _b, _c;
247
+ var newDataSource = ((_b = (_a = (dataSourceRef.current || [])) === null || _a === void 0 ? void 0 : _a.slice) === null || _b === void 0 ? void 0 : _b.call(_a)) || [];
248
+ if ((_c = newDataSource[index]) === null || _c === void 0 ? void 0 : _c.loading) {
249
+ newDataSource.splice(index, 1, __assign(__assign({}, record), { loading: false }));
250
+ setDataSource(newDataSource);
251
+ }
252
+ },
253
+ });
254
+ }
255
+ } }, "\u4E0B\u8F7D")),
256
+ (typeof operationAuth === 'string'
257
+ ? authPreviewBtn
258
+ : showPreviewBtn) && (React.createElement(Button, { type: "link", style: {
259
+ height: 28,
260
+ }, onClick: function () {
261
+ if ((record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) {
262
+ message.warning('文件过大,暂不支持在线预览,请先下载后查看!');
263
+ }
264
+ else {
265
+ previewFile(fileBaseUrl, record === null || record === void 0 ? void 0 : record.fileId, {
266
+ titleName: record === null || record === void 0 ? void 0 : record.fileName,
267
+ authToken: authToken,
268
+ });
269
+ onPreviewCallbackBefore && onPreviewCallbackBefore(record);
270
+ }
271
+ } }, "\u9884\u89C8")),
272
+ (typeof operationAuth === 'string'
273
+ ? authDeleteBtn
274
+ : showDeleteBtn) && (React.createElement(Popconfirm, { title: "\u662F\u5426\u5220\u9664\u8BE5\u6761\u6570\u636E?", cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onDeleteFile(record, index); } },
275
+ React.createElement(Button, { style: {
276
+ height: 28,
277
+ }, type: "link" }, "\u5220\u9664")))));
278
+ }
307
279
  /**重新上传 */
308
280
  function onSubmitFile(file, index) {
309
281
  return __awaiter(this, void 0, void 0, function () {
@@ -466,7 +438,11 @@ var UploadTable = function (_a) {
466
438
  ? {
467
439
  type: rowSelection,
468
440
  onChange: function (selectedRowKeys, selectedRows) {
469
- setSelectedRows(selectedRows);
441
+ setSelectedRows(selectedRows.map(function (item) {
442
+ var newItem = __assign({}, item);
443
+ Reflect.deleteProperty(newItem, 'loading');
444
+ return newItem;
445
+ }));
470
446
  },
471
447
  }
472
448
  : rowSelection;
@@ -15,7 +15,6 @@ interface IProps {
15
15
  electronicList: any;
16
16
  sealList: any;
17
17
  querySealStatus?: () => void;
18
- flow_status: string;
19
18
  needQj: number;
20
19
  needQys: number;
21
20
  records: any;
@@ -18,7 +18,7 @@ import { Table, Button } from '../../../../index';
18
18
  // 自定义组件
19
19
  import AttachOperation from './AttachOperation';
20
20
  var DetailTable = function (_a) {
21
- var needQj = _a.needQj, needQys = _a.needQys, records = _a.records, qunjSeal = _a.qunjSeal, electronicSeal = _a.electronicSealIdList, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, viewSealPageFn = _a.viewSealPageFn, contractId = _a.contractId, electronicList = _a.electronicList, sealList = _a.sealList, querySealStatus = _a.querySealStatus, flow_status = _a.flow_status;
21
+ var needQj = _a.needQj, needQys = _a.needQys, records = _a.records, qunjSeal = _a.qunjSeal, electronicSeal = _a.electronicSealIdList, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, viewSealPageFn = _a.viewSealPageFn, contractId = _a.contractId, electronicList = _a.electronicList, sealList = _a.sealList, querySealStatus = _a.querySealStatus;
22
22
  var authToken = token || '';
23
23
  /** 下载水印附件 */
24
24
  var downFileFn = function (_record) {
@@ -124,14 +124,7 @@ var DetailTable = function (_a) {
124
124
  } },
125
125
  "\u7FA4\u6770\u9A8C\u8BC1\u7801",
126
126
  ' ',
127
- React.createElement("span", { style: { color: '#FF6666', fontSize: '16px' } }, (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode) || '')),
128
- !!flow_status && (React.createElement("div", { style: {
129
- height: '38px',
130
- background: '#FCECC8',
131
- borderRadius: '4px',
132
- padding: '0 10px',
133
- lineHeight: '38px',
134
- } }, flow_status))),
127
+ React.createElement("span", { style: { color: '#FF6666', fontSize: '16px' } }, (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode) || ''))),
135
128
  React.createElement("div", { style: {
136
129
  borderBottom: '1px solid #EBEBEB',
137
130
  } },
@@ -172,7 +165,7 @@ var DetailTable = function (_a) {
172
165
  ];
173
166
  // 由外部传入needQj needQys参数过滤出需展示的列
174
167
  var columnsLast = columns;
175
- if (!needQj) {
168
+ if (!needQj || ((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) && (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details.length) === 0)) {
176
169
  columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunjSeal'; });
177
170
  }
178
171
  if (!needQys) {
@@ -10,10 +10,11 @@ var ElectronicSeal = function (_a) {
10
10
  var electronicList = _a.electronicList, value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit;
11
11
  return (React.createElement("div", { style: {
12
12
  height: '100%',
13
+ minHeight: '150px',
13
14
  overflowY: 'auto',
14
15
  overflowX: 'hidden',
15
16
  } },
16
- React.createElement(Checkbox.Group, { defaultValue: value, onChange: onChange, className: "flex-checkbox-group", disabled: !isEdit }, Array.isArray(electronicList) &&
17
+ React.createElement(Checkbox.Group, { defaultValue: value, value: value, onChange: onChange, className: "flex-checkbox-group", disabled: !isEdit }, Array.isArray(electronicList) &&
17
18
  electronicList.map(function (item) {
18
19
  return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
19
20
  }))));
@@ -12,6 +12,8 @@ interface IProps {
12
12
  sealList: any;
13
13
  handleRef?: any;
14
14
  querySealStatus?: () => void;
15
+ checked: boolean;
16
+ form: any;
15
17
  }
16
18
  declare const QunjSeal: React.FC<IProps>;
17
19
  export default QunjSeal;
@@ -13,44 +13,22 @@ var __assign = (this && this.__assign) || function () {
13
13
  * @author 陈亚雄
14
14
  * @description
15
15
  */
16
- import React, { useEffect, useState } from 'react';
16
+ import React, { useEffect } from 'react';
17
17
  // redux
18
18
  // ztxkui公共组件
19
- import { Form, InputNumber, SearchContainer, Radio, Checkbox, } from '../../../../index';
19
+ import { Form, InputNumber, SearchContainer, Radio } from '../../../../index';
20
20
  // 路由配置
21
21
  // store
22
22
  // 自定义组件
23
23
  import { SealCheckboxGroup } from './SealCheckbox';
24
24
  var Item = SearchContainer.SearchItem;
25
25
  var QunjSeal = function (_a) {
26
- var value = _a.value, onChange = _a.onChange, ZT_API_BASEURL = _a.ZT_API_BASEURL, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum, sealList = _a.sealList, handleRef = _a.handleRef, querySealStatus = _a.querySealStatus;
27
- var form = Form.useForm()[0];
28
- // 是否加盖群杰印章
29
- var _b = useState(true), checked = _b[0], setChecked = _b[1];
26
+ var value = _a.value, onChange = _a.onChange, ZT_API_BASEURL = _a.ZT_API_BASEURL, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum, sealList = _a.sealList, handleRef = _a.handleRef, querySealStatus = _a.querySealStatus, checked = _a.checked, form = _a.form;
30
27
  useEffect(function () {
31
- var _a;
32
28
  if (value) {
33
29
  form.setFieldsValue(__assign(__assign({}, value), { isTakeOut: "" + value.isTakeOut === '1' ? 1 : 0 }));
34
- // 有已勾选群杰用印时 展示群杰组件
35
- if (((_a = value.details) === null || _a === void 0 ? void 0 : _a.length) > 0) {
36
- setChecked(true);
37
- form.setFieldsValue({
38
- needQj: true,
39
- });
40
- }
41
30
  }
42
31
  }, [value, form]);
43
- /** 是否加盖群杰印章 */
44
- var needQjSealFn = function (e) {
45
- if (!e.target.checked) {
46
- form.setFieldsValue({
47
- isTakeOut: 0,
48
- details: [],
49
- });
50
- onChange && onChange({});
51
- }
52
- setChecked(e.target.checked);
53
- };
54
32
  var onSealCheckboxHandle = function (values) {
55
33
  form.setFieldsValue({
56
34
  values: values,
@@ -72,31 +50,29 @@ var QunjSeal = function (_a) {
72
50
  /** 渲染SealCheckboxGroup组件 */
73
51
  var getSealCheckboxGroupRender = function () {
74
52
  return (React.createElement(Item, { name: "details", label: "", noBorder: true, width: "all", style: {
75
- height: '200px',
53
+ height: '180px',
76
54
  overflowY: 'auto',
77
55
  overflowX: 'hidden',
78
56
  } },
79
57
  React.createElement(SealCheckboxGroup, { sealList: sealList, onChange: onSealCheckboxHandle, handleRef: handleRef, isEdit: isEdit, showContranctNum: showContranctNum })));
80
58
  };
81
- return (React.createElement(Form, { form: form, onValuesChange: onValuesChangeHandle },
82
- React.createElement(Item, { name: "needQj", valuePropName: "checked", noBorder: true, width: "all" },
83
- React.createElement(Checkbox, { checked: checked, disabled: !isEdit, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u7FA4\u6770\u5370\u7AE0-\u7528\u5370\u7533\u8BF7")),
84
- checked ? (React.createElement(React.Fragment, null,
85
- React.createElement("div", { style: {
86
- display: 'flex',
87
- justifyContent: 'space-between',
88
- height: '36px',
89
- borderBottom: '1px solid #EBEBEB',
90
- marginBottom: '5px',
91
- } },
92
- React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "halfAll" },
93
- React.createElement(Radio.Group, { style: { width: '40%' }, disabled: !isEdit },
59
+ return (React.createElement(Form, { form: form, onValuesChange: onValuesChangeHandle }, checked ? (React.createElement(React.Fragment, null,
60
+ React.createElement("div", { style: {
61
+ display: 'flex',
62
+ justifyContent: 'space-between',
63
+ height: '36px',
64
+ borderBottom: '1px solid #EBEBEB',
65
+ marginBottom: '5px',
66
+ } },
67
+ React.createElement("div", { style: { width: '60%' } },
68
+ React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "all" },
69
+ React.createElement(Radio.Group, { disabled: !isEdit },
94
70
  React.createElement(Radio, { value: 0 }, "\u5185\u90E8\u7528\u5370"),
95
- React.createElement(Radio, { value: 1 }, "\u5916\u90E8\u7528\u5370"))),
96
- showContranctNum ? (React.createElement("div", { style: { display: 'flex', lineHeight: '32px' } },
97
- React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all", colon: false },
98
- React.createElement(InputNumber, { disabled: !isEdit, size: "small", min: 0, style: { width: '60px' } })),
99
- React.createElement("div", { style: { margin: 'auto 42px auto 16px' } }, "\u4EFD"))) : ('')),
100
- getSealCheckboxGroupRender())) : (React.createElement(React.Fragment, null))));
71
+ React.createElement(Radio, { value: 1 }, "\u5916\u90E8\u7528\u5370")))),
72
+ showContranctNum ? (React.createElement("div", { style: { display: 'flex', lineHeight: '32px' } },
73
+ React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all", colon: false },
74
+ React.createElement(InputNumber, { disabled: !isEdit, size: "small", min: 0, style: { width: '60px' } })),
75
+ React.createElement("div", { style: { margin: 'auto 42px auto 16px' } }, "\u4EFD"))) : ('')),
76
+ getSealCheckboxGroupRender())) : (React.createElement(React.Fragment, null))));
101
77
  };
102
78
  export default QunjSeal;
@@ -39,7 +39,7 @@ var SealCheckbox = function (_a) {
39
39
  num = 1;
40
40
  }
41
41
  if (typeof contractNum !== 'number' && showContranctNum && onChange) {
42
- message.info('请输入合同份数!');
42
+ message.info('请先输入合同份数,重新填写用印次数!');
43
43
  num = null;
44
44
  }
45
45
  if (typeof num !== 'number' && value) {
@@ -56,7 +56,13 @@ var SealCheckbox = function (_a) {
56
56
  justifyContent: 'space-between',
57
57
  height: '32px',
58
58
  } },
59
- React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealNo ? true : false, disabled: !isEdit, style: { width: '40%' } }, name),
59
+ React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealNo ? true : false, disabled: !isEdit, style: { width: '70%' } },
60
+ React.createElement("div", { style: {
61
+ textOverflow: 'ellipsis',
62
+ overflow: 'hidden',
63
+ width: '320px',
64
+ whiteSpace: 'nowrap',
65
+ }, title: name }, name)),
60
66
  React.createElement("div", { style: { display: 'flex', lineHeight: '32px' } },
61
67
  React.createElement("div", { style: { marginRight: '5px' } }, "\u7528\u5370"),
62
68
  React.createElement(Item, { noLabel: true, width: "half" },
@@ -32,7 +32,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
32
32
  import React, { useImperativeHandle, useCallback, useState, useMemo, useEffect, } from 'react';
33
33
  // redux
34
34
  // ztxkui公共组件
35
- import { Table, Upload, message, Button, Modal } from '../../../index';
35
+ import { Table, Upload, message, Button, Modal, Checkbox, Form, } from '../../../index';
36
36
  import { Switch } from 'antd';
37
37
  // 路由配置
38
38
  // store
@@ -57,17 +57,6 @@ var FLOW_IDS = [
57
57
  'scm_order_contract_sbht',
58
58
  'scm_order_contract_bjjyht',
59
59
  ];
60
- /** 流程状态 */
61
- var FLOW_STATUS = {
62
- 10: '草稿',
63
- 15: '审批中',
64
- 20: '已驳回',
65
- 50: '已生效',
66
- 60: '收货完成',
67
- 70: '结算完成',
68
- 9: '已作废',
69
- 99: '同步失败', // APPROVE_FAIL
70
- };
71
60
  /**
72
61
  * TodoList
73
62
  * 实现可以上传文件,删除列
@@ -110,6 +99,28 @@ var Sinatures = function (_a) {
110
99
  var _o = useState({}), prevParam = _o[0], setPrevParam = _o[1];
111
100
  // 请确认
112
101
  var _p = useState(false), isSure = _p[0], setIsSure = _p[1];
102
+ // 群杰表单
103
+ var form = Form.useForm()[0];
104
+ // 是否加盖群杰印章
105
+ var _q = useState(true), checked = _q[0], setChecked = _q[1];
106
+ // 盖章按钮loading
107
+ var _r = useState(false), loading = _r[0], setLoading = _r[1];
108
+ /** 是否加盖群杰印章 */
109
+ var needQjSealFn = function (e) {
110
+ if (!e.target.checked) {
111
+ form.setFieldsValue({
112
+ isTakeOut: 0,
113
+ contranctNum: 1,
114
+ details: [],
115
+ });
116
+ qunjSealChangeHandle({
117
+ isTakeOut: 0,
118
+ contranctNum: 1,
119
+ details: [],
120
+ });
121
+ }
122
+ setChecked(e.target.checked);
123
+ };
113
124
  /** 查询用印状态 */
114
125
  var querySealStatus = function () {
115
126
  var url = ZT_API_BASEURL + "/api/zmdms-esb-outer/outer/qj/view-stamp?caseId=" + caseId + "&systemId=1493475945847648257";
@@ -213,6 +224,7 @@ var Sinatures = function (_a) {
213
224
  };
214
225
  /** 指定签署位置 */
215
226
  var checkSealFn = function () {
227
+ setLoading(true);
216
228
  // 已勾选的要加盖电子印章的附件id列表
217
229
  var checkedElecSealIds = records
218
230
  .filter(function (item) { return item.isElectronicSeal; })
@@ -255,15 +267,17 @@ var Sinatures = function (_a) {
255
267
  })
256
268
  .then(function (res) {
257
269
  var _a;
270
+ setLoading(false);
258
271
  if (res.status === 200 &&
259
272
  res.data.code === 200 &&
260
273
  res.data.data.preSignUrl) {
261
- for (var i = sealedIds.length; i--; i >= 0) {
262
- if ((_a = res.data.data.deleteAttachIdList) === null || _a === void 0 ? void 0 : _a.includes(sealedIds[i])) {
263
- sealedIds.splice(i, 1);
274
+ var sealedIdsCopy = __spreadArray([], sealedIds);
275
+ for (var i = sealedIdsCopy.length; i--; i >= 0) {
276
+ if ((_a = res.data.data.deleteAttachIdList) === null || _a === void 0 ? void 0 : _a.includes(sealedIdsCopy[i])) {
277
+ sealedIdsCopy.splice(i, 1);
264
278
  }
265
279
  }
266
- setSealedIds(__spreadArray(__spreadArray([], sealedIds), res.data.data.attachIdList));
280
+ setSealedIds(__spreadArray(__spreadArray([], sealedIdsCopy), res.data.data.attachIdList));
267
281
  setContractId(res.data.data.contractId);
268
282
  setAttachMap(res.data.data.docAttachMap);
269
283
  setDocumentIds(res.data.data.documentIdList);
@@ -275,6 +289,7 @@ var Sinatures = function (_a) {
275
289
  })
276
290
  .catch(function (error) {
277
291
  var _a, _b;
292
+ setLoading(false);
278
293
  message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '请求失败!');
279
294
  });
280
295
  };
@@ -351,7 +366,7 @@ var Sinatures = function (_a) {
351
366
  title: '合同比对模板',
352
367
  key: 'templateAttachId',
353
368
  dataIndex: 'templateAttachId',
354
- width: 160,
369
+ width: 150,
355
370
  render: function (text, record, index) {
356
371
  return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, index: index, openCustomerModalHandle: openCustomerModalHandle, isEdit: isEdit })) : ('');
357
372
  },
@@ -360,7 +375,7 @@ var Sinatures = function (_a) {
360
375
  title: '合同比对结果',
361
376
  key: 'compareAttachId',
362
377
  dataIndex: 'compareAttachId',
363
- width: 100,
378
+ width: 150,
364
379
  render: function (text, record, index) {
365
380
  return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request, getTaskId: getTaskId, isEdit: isEdit })) : ('');
366
381
  },
@@ -369,7 +384,7 @@ var Sinatures = function (_a) {
369
384
  title: '保存为模版',
370
385
  key: 'templateAttachId',
371
386
  dataIndex: 'templateAttachId',
372
- width: 80,
387
+ width: 90,
373
388
  render: function (text, record, index) {
374
389
  return NEED_SAVE_TEMPLATE.includes("" + flowId) ? (React.createElement(Switch, { checked: record.isCustomerReference, disabled: !isEdit, onChange: function (value) {
375
390
  return onSwitchChangeHandle(value, 'isCustomerReference', index);
@@ -398,7 +413,7 @@ var Sinatures = function (_a) {
398
413
  title: '盖电子印章',
399
414
  key: 'isElectronicSeal',
400
415
  dataIndex: 'isElectronicSeal',
401
- width: 80,
416
+ width: 90,
402
417
  render: function (text, record, index) {
403
418
  return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
404
419
  return onSwitchChangeHandle(value, 'isElectronicSeal', index);
@@ -414,7 +429,7 @@ var Sinatures = function (_a) {
414
429
  // 是否有勾选加盖电子印章
415
430
  var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
416
431
  var obj = {
417
- children: (React.createElement(ElectronicSeal, { value: electronicSeal, onChange: electronicSealChangeHandle, isEdit: hasElectronicSeal && isEdit, electronicList: electronicList })),
432
+ children: (React.createElement(ElectronicSeal, { value: innerElectronicSeal, onChange: electronicSealChangeHandle, isEdit: hasElectronicSeal && isEdit, electronicList: electronicList })),
418
433
  props: {},
419
434
  };
420
435
  obj.props['rowSpan'] = index === 0 ? records.length : 0;
@@ -425,13 +440,13 @@ var Sinatures = function (_a) {
425
440
  title: '电子印章设置',
426
441
  key: 'setElectronicSeal',
427
442
  dataIndex: 'setElectronicSeal',
428
- width: 95,
443
+ width: 135,
429
444
  render: function (value, row, index) {
430
445
  var Comp = function () {
431
446
  return records.length !== 0 ? (React.createElement("div", { style: { height: '100%', paddingTop: '23px' } },
432
447
  React.createElement(Button, { type: "link", style: __assign({}, (checkSealVisible && isEdit
433
448
  ? {}
434
- : { display: 'none' })), size: "small", onClick: checkSealFn }, "\u6307\u5B9A\u7B7E\u7F72\u4F4D\u7F6E"),
449
+ : { display: 'none' })), size: "small", loading: loading, onClick: checkSealFn }, "\u6307\u5B9A\u7B7E\u7F72\u4F4D\u7F6E"),
435
450
  React.createElement(Button, { type: "link", style: __assign({}, (contractId || contract_id ? {} : { display: 'none' })), size: "small", onClick: viewSealPageFn }, "\u9884\u89C8\u76D6\u7AE0\u6548\u679C"))) : (React.createElement(React.Fragment, null));
436
451
  };
437
452
  var obj = {
@@ -445,24 +460,34 @@ var Sinatures = function (_a) {
445
460
  ],
446
461
  },
447
462
  {
448
- title: '群杰印章',
449
- key: 'qunjSeal',
450
- dataIndex: 'qunjSeal',
451
- width: 240,
452
- render: function (value, row, index) {
453
- var obj = {
454
- children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle, querySealStatus: querySealStatus, ZT_API_BASEURL: ZT_API_BASEURL, isEdit: isEdit, handleRef: handleRef, showContranctNum: showContranctNum, sealList: sealList })),
455
- props: {},
456
- };
457
- obj.props['rowSpan'] = index === 0 ? records.length : 0;
458
- return obj;
459
- },
463
+ title: function () { return (React.createElement("div", { style: { width: '100%', textAlign: 'center' } }, "\u7FA4\u6770\u5370\u7AE0")); },
464
+ key: 'qunJ',
465
+ dataIndex: 'qunJ',
466
+ width: 620,
467
+ children: [
468
+ {
469
+ title: function () {
470
+ return (React.createElement(Checkbox, { checked: checked, disabled: !isEdit, onChange: function (e) { return needQjSealFn(e); } }, "\u7FA4\u6770\u5370\u7AE0-\u7528\u5370\u7533\u8BF7"));
471
+ },
472
+ key: 'qunjSeal',
473
+ dataIndex: 'qunjSeal',
474
+ width: 620,
475
+ render: function (value, row, index) {
476
+ var obj = {
477
+ children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle, querySealStatus: querySealStatus, ZT_API_BASEURL: ZT_API_BASEURL, isEdit: isEdit, handleRef: handleRef, showContranctNum: showContranctNum, sealList: sealList, checked: checked, form: form })),
478
+ props: {},
479
+ };
480
+ obj.props['rowSpan'] = index === 0 ? records.length : 0;
481
+ return obj;
482
+ },
483
+ },
484
+ ],
460
485
  },
461
486
  ];
462
487
  // 由外部传入needQj needDg needQys参数过滤出需展示的列
463
488
  var columnsLast = columns;
464
489
  if (!needQj) {
465
- columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunjSeal'; });
490
+ columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunJ'; });
466
491
  }
467
492
  if (!needDg && !needQys) {
468
493
  columnsLast = columnsLast.filter(function (item) { return !['attachTypeName'].includes(item.key); });
@@ -474,7 +499,7 @@ var Sinatures = function (_a) {
474
499
  columnsLast = columnsLast.filter(function (item) { return !['isWatermark', 'needQys'].includes(item.key); });
475
500
  }
476
501
  // 上传组件的数据
477
- var _q = useState(), originFileList = _q[0], setOriginFileList = _q[1];
502
+ var _s = useState(), originFileList = _s[0], setOriginFileList = _s[1];
478
503
  /** 签章组件onChange事件 */
479
504
  var sigValuesChange = function (type, value) {
480
505
  var _a, _b;
@@ -490,11 +515,12 @@ var Sinatures = function (_a) {
490
515
  // 勾选加盖电子印章后 显示确认盖章按钮
491
516
  setCheckSealVisible(value ? true : hasElecSeal.length > 1 ? true : false);
492
517
  // 去除加盖电子印章勾选时 清除合同id 等之前的信息
493
- if (!value) {
494
- setSealedIds(__spreadArray([], sealedIds));
518
+ if (!value && hasElecSeal.length === 1) {
519
+ setSealedIds([]);
495
520
  setContractId('');
496
521
  setAttachMap(null);
497
522
  setDocumentIds([]);
523
+ setElectronicSeal([]);
498
524
  }
499
525
  }
500
526
  setRecords(function (preRecords) {
@@ -583,7 +609,8 @@ var Sinatures = function (_a) {
583
609
  validateSealFn: function () {
584
610
  var _a;
585
611
  // 确认盖章后 勾选的信息有更改
586
- if (needQys &&
612
+ if (isEdit &&
613
+ needQys &&
587
614
  (prevParam === null || prevParam === void 0 ? void 0 : prevParam.sealIdList) &&
588
615
  (prevParam === null || prevParam === void 0 ? void 0 : prevParam.sealIdList.length) !== (innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) &&
589
616
  !isSure) {
@@ -604,21 +631,27 @@ var Sinatures = function (_a) {
604
631
  // 是否有勾选加盖电子印章
605
632
  var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
606
633
  // 勾选加盖电子印章时未勾选电子印章
607
- if ((innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) === 0 && hasElectronicSeal) {
634
+ if (needQys &&
635
+ isEdit &&
636
+ (innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) === 0 &&
637
+ hasElectronicSeal) {
608
638
  message.warning('请勾选加盖电子印章所需要的印章列表!');
609
639
  return false;
610
640
  }
611
641
  // 超过4倍禁止提交审批
612
- if (needQj && isTotalSealNumTooMore) {
642
+ if (isEdit && needQj && isTotalSealNumTooMore) {
613
643
  message.warning('您的用印次数远超超过合理次数范围,请修改。');
614
644
  return false;
615
645
  }
616
646
  // 没有确认盖章
617
- if (needQys && hasElectronicSeal && !(contractId || contract_id)) {
647
+ if (isEdit &&
648
+ needQys &&
649
+ hasElectronicSeal &&
650
+ !(contractId || contract_id)) {
618
651
  message.warning('请点击确认盖章按钮,确认盖章位置后方可提交!');
619
652
  return false;
620
653
  }
621
- if (innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.needQj) {
654
+ if (isEdit && checked && needQj) {
622
655
  // 合同份数为空
623
656
  if (!(innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.contranctNum) && showContranctNum) {
624
657
  message.warning('请填写合同份数!');
@@ -655,7 +688,6 @@ var Sinatures = function (_a) {
655
688
  electronicList: electronicList,
656
689
  sealList: sealList,
657
690
  querySealStatus: querySealStatus,
658
- flow_status: FLOW_STATUS[flowStatus],
659
691
  needQj: needQj,
660
692
  needQys: needQys,
661
693
  };
@@ -67,12 +67,20 @@ function useFormatter(formatterType, currencySymbol) {
67
67
  function formatCurrency(n) {
68
68
  if (n != null) {
69
69
  var _n = n.toString();
70
- var pointIndex = _n.indexOf('.');
70
+ var pointBeforeNum = '';
71
71
  var pointAfterNum = '';
72
+ if (_n.startsWith('-')) {
73
+ pointBeforeNum = '-';
74
+ _n = _n.slice(1);
75
+ }
76
+ var pointIndex = _n.indexOf('.');
72
77
  if (pointIndex !== -1) {
73
78
  n = _n.slice(0, pointIndex);
74
79
  pointAfterNum = _n.slice(pointIndex);
75
80
  }
81
+ else {
82
+ n = _n;
83
+ }
76
84
  var res = '';
77
85
  var s = n.toString();
78
86
  var length_1 = s.length;
@@ -90,7 +98,7 @@ function formatCurrency(n) {
90
98
  res = s[i] + res;
91
99
  }
92
100
  }
93
- return res + pointAfterNum;
101
+ return pointBeforeNum + res + pointAfterNum;
94
102
  }
95
103
  else {
96
104
  return n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "3.4.19",
3
+ "version": "3.5.2",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",
@@ -23,7 +23,7 @@
23
23
  "react-infinite-scroll-component": "^6.1.0",
24
24
  "react-resizable": "^3.0.4",
25
25
  "react-to-print": "^2.14.7",
26
- "ztxkutils": "^2.8.19"
26
+ "ztxkutils": "^2.9.1"
27
27
  },
28
28
  "scripts": {
29
29
  "analyze": "source-map-explorer 'dist/static/js/*.js'",