ztxkui 3.4.0 → 3.4.3

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.
@@ -33,14 +33,14 @@ var SealCheckbox = function (_a) {
33
33
  var onNumberChange = function (count) {
34
34
  var _a, _b;
35
35
  var contractNum = (_b = (_a = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _a === void 0 ? void 0 : _a.getData().qunjSeal) === null || _b === void 0 ? void 0 : _b.contranctNum;
36
- if (!contractNum && showContranctNum) {
37
- message.info('请输入合同份数!');
38
- return;
39
- }
40
36
  var num = count;
41
37
  if (count < 0) {
42
38
  num = 0;
43
39
  }
40
+ if (!contractNum && showContranctNum) {
41
+ message.info('请输入合同份数!');
42
+ num = null;
43
+ }
44
44
  if (typeof num !== 'number') {
45
45
  Reflect.deleteProperty(value, 'sealCount');
46
46
  }
@@ -50,7 +50,7 @@ var FLOW_IDS = [
50
50
  * 实现受控,接收一个附件列表
51
51
  */
52
52
  var Sinatures = function (_a) {
53
- var needQj = _a.needQj, needDg = _a.needDg, needQys = _a.needQys, isUpload = _a.isUpload, fileList = _a.fileList, qunjSeal = _a.qunjSeal, qunjSealChange = _a.qunjSealChange, electronicSeal = _a.electronicSealIdList, electronicSealChange = _a.electronicSealChange, handleRef = _a.handleRef, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, systemCode = _a.systemCode, token = _a.token, openCustomerModalHandle = _a.openCustomerModalHandle, request = _a.request, flowId = _a.flowId, deptId = _a.deptId, canEdit = _a.canEdit, flowStatus = _a.flowStatus, caseId = _a.caseId, contract_id = _a.contractId, docAttachMap = _a.docAttachMap, checkAttachIdList = _a.checkAttachIdList, // 已盖章附件id
53
+ var needQj = _a.needQj, needDg = _a.needDg, needQys = _a.needQys, isUpload = _a.isUpload, fileList = _a.fileList, qunjSeal = _a.qunjSeal, qunjSealChange = _a.qunjSealChange, electronicSeal = _a.electronicSealIdList, electronicSealChange = _a.electronicSealChange, onSigValuesChange = _a.onSigValuesChange, handleRef = _a.handleRef, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, systemCode = _a.systemCode, token = _a.token, openCustomerModalHandle = _a.openCustomerModalHandle, request = _a.request, flowId = _a.flowId, deptId = _a.deptId, canEdit = _a.canEdit, flowStatus = _a.flowStatus, caseId = _a.caseId, contract_id = _a.contractId, docAttachMap = _a.docAttachMap, checkAttachIdList = _a.checkAttachIdList, // 已盖章附件id
54
54
  documentIdList = _a.documentIdList;
55
55
  var authToken = token || '';
56
56
  // 是否可编辑 1可编辑 0不可编辑
@@ -287,12 +287,12 @@ var Sinatures = function (_a) {
287
287
  },
288
288
  },
289
289
  {
290
- title: '群杰印章',
291
- key: 'qunjSeal',
292
- dataIndex: 'qunjSeal',
290
+ title: '电子印章',
291
+ key: 'electronicSeal',
292
+ dataIndex: 'electronicSeal',
293
293
  render: function (value, row, index) {
294
294
  var obj = {
295
- children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle, request: request, flowId: flowId, caseId: caseId, ZT_API_BASEURL: ZT_API_BASEURL, isEdit: isEdit, handleRef: handleRef, isOnlyQunj: isOnlyQunj, showContranctNum: showContranctNum })),
295
+ children: (React.createElement(ElectronicSeal, { value: electronicSeal, request: request, flowId: flowId, deptId: deptId, onChange: electronicSealChangeHandle, isEdit: isEdit })),
296
296
  props: {},
297
297
  };
298
298
  obj.props['rowSpan'] = index === 0 ? records.length : 0;
@@ -300,12 +300,12 @@ var Sinatures = function (_a) {
300
300
  },
301
301
  },
302
302
  {
303
- title: '电子印章',
304
- key: 'electronicSeal',
305
- dataIndex: 'electronicSeal',
303
+ title: '群杰印章',
304
+ key: 'qunjSeal',
305
+ dataIndex: 'qunjSeal',
306
306
  render: function (value, row, index) {
307
307
  var obj = {
308
- children: (React.createElement(ElectronicSeal, { value: electronicSeal, request: request, flowId: flowId, deptId: deptId, onChange: electronicSealChangeHandle, isEdit: isEdit })),
308
+ children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle, request: request, flowId: flowId, caseId: caseId, ZT_API_BASEURL: ZT_API_BASEURL, isEdit: isEdit, handleRef: handleRef, isOnlyQunj: isOnlyQunj, showContranctNum: showContranctNum })),
309
309
  props: {},
310
310
  };
311
311
  obj.props['rowSpan'] = index === 0 ? records.length : 0;
@@ -333,6 +333,14 @@ var Sinatures = function (_a) {
333
333
  }
334
334
  // 上传组件的数据
335
335
  var _l = useState(), originFileList = _l[0], setOriginFileList = _l[1];
336
+ /** 签章组件onChange事件 */
337
+ var sigValuesChange = function (type, value) {
338
+ var _a, _b;
339
+ var info = (_b = (_a = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _a === void 0 ? void 0 : _a.getData) === null || _b === void 0 ? void 0 : _b.call(_a);
340
+ Reflect.deleteProperty(info, type);
341
+ info[type] = value;
342
+ return info;
343
+ };
336
344
  // 是否存入样板 添加水印 电子印章发生改变触发事件
337
345
  function onCheckboxChangeHandle(e, type, index) {
338
346
  if (type === 'isElectronicSeal') {
@@ -341,19 +349,25 @@ var Sinatures = function (_a) {
341
349
  setCheckSealVisible(e.target.checked ? true : hasElecSeal.length > 1 ? true : false);
342
350
  }
343
351
  setRecords(function (preRecords) {
344
- var _a, _b;
352
+ var _a;
345
353
  var newRecords = preRecords.slice();
346
354
  // 勾选添加水印的前提 需要勾选加盖电子印章
347
- if (type === 'isWatermark' && !newRecords[index].isElectronicSeal) {
348
- message.info('请先选择是否加盖电子印章!');
349
- return newRecords;
350
- }
355
+ // if (type === 'isWatermark' && !newRecords[index].isElectronicSeal) {
356
+ // message.info('请先选择是否加盖电子印章!');
357
+ // return newRecords;
358
+ // }
351
359
  // 取消勾选电子印章时 不可添加水印
352
- if (type === 'isElectronicSeal' && !e.target.checked) {
353
- newRecords.splice(index, 1, __assign(__assign({}, newRecords[index]), (_a = { isWatermark: 0 }, _a[type] = 0, _a)));
354
- return newRecords;
355
- }
356
- newRecords.splice(index, 1, __assign(__assign({}, newRecords[index]), (_b = {}, _b[type] = e.target.checked ? 1 : 0, _b)));
360
+ // if (type === 'isElectronicSeal' && !e.target.checked) {
361
+ // newRecords.splice(index, 1, {
362
+ // ...newRecords[index],
363
+ // isWatermark: 0,
364
+ // [type]: 0,
365
+ // });
366
+ // return newRecords;
367
+ // }
368
+ newRecords.splice(index, 1, __assign(__assign({}, newRecords[index]), (_a = {}, _a[type] = e.target.checked ? 1 : 0, _a)));
369
+ onSigValuesChange &&
370
+ onSigValuesChange(sigValuesChange('fileList', newRecords));
357
371
  return newRecords;
358
372
  });
359
373
  }
@@ -389,11 +403,14 @@ var Sinatures = function (_a) {
389
403
  function qunjSealChangeHandle(value) {
390
404
  qunjSealChange && qunjSealChange(value);
391
405
  setQunjSeal(value);
406
+ onSigValuesChange && onSigValuesChange(sigValuesChange('qunjSeal', value));
392
407
  }
393
408
  /** 电子印章修改 */
394
409
  function electronicSealChangeHandle(value) {
395
410
  electronicSealChange && electronicSealChange(value);
396
411
  setElectronicSeal(value);
412
+ onSigValuesChange &&
413
+ onSigValuesChange(sigValuesChange('electronicSealIdList', value));
397
414
  }
398
415
  /**
399
416
  * 暴露方法给外部调用
@@ -77,4 +77,6 @@ export interface IProps {
77
77
  documentIdList: string[];
78
78
  /** 流程状态 */
79
79
  flowStatus: number;
80
+ /** 签章组件onChange事件 */
81
+ onSigValuesChange?: any;
80
82
  }
package/dist/index.js CHANGED
@@ -1,87 +1,117 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
- import App from './App';
4
- import { ConfigProvider } from 'antd';
5
- import zhCN from 'antd/lib/locale/zh_CN';
6
- import * as dayjs from 'dayjs';
7
- import zhCn from 'dayjs/locale/zh-cn';
8
- import { BrowserRouter, Switch, Route, Link } from 'react-router-dom';
9
- import Demo from './Demo';
10
- import TreeSelectDemo from './TreeSelectDemo';
11
- import TreeDemo from './TreeDemo';
12
- import UploadDemo from './UploadDemo';
13
- import CollapseDemo from './DemoCom/CollapseDemo';
14
- import TimelineDemo from './DemoCom/TimelineDemo';
15
- import WeChatDemo from './DemoCom/WechatDemo';
16
- import TableDemo from './DemoCom/TableDemo';
17
- import TableDemo1 from './DemoCom/TableDemo1';
18
- import BasicDemo from './DemoCom/BasicDemo';
19
- import FormDemo from './DemoCom/FormDemo';
20
- import TableAnalyse from './DemoCom/TableAnalyse';
21
- import DragSort from './DemoCom/DragSort';
22
- import PrintDemo from './DemoCom/PrintDemo';
23
- import PrintContainerDemo from './DemoCom/PrintContainerDemo';
24
- import SinaturesDemo from './DemoCom/SinaturesDemo';
25
- import TableDemoAll from './TableDemo';
26
- import CodeQueryDemo from './DemoCom/CodeQueryDemo';
27
- dayjs.locale(zhCn);
28
- ReactDOM.render(
29
- // <React.StrictMode>
30
- React.createElement(ConfigProvider, { locale: zhCN },
31
- React.createElement(BrowserRouter, null,
32
- React.createElement(Switch, null,
33
- React.createElement(Route, { exact: true, path: "/" },
34
- React.createElement(App, null)),
35
- React.createElement(Route, { exact: true, path: "/code-query" },
36
- React.createElement(CodeQueryDemo, null)),
37
- React.createElement(Route, { exact: true, path: "/select" },
38
- React.createElement(Demo, null)),
39
- React.createElement(Route, { exact: true, path: "/tree-select" },
40
- React.createElement(TreeSelectDemo, null)),
41
- React.createElement(Route, { exact: true, path: "/tree" },
42
- React.createElement(TreeDemo, null)),
43
- React.createElement(Route, { exact: true, path: "/upload" },
44
- React.createElement(UploadDemo, null)),
45
- React.createElement(Route, { exact: true, path: "/collapse" },
46
- React.createElement(CollapseDemo, null)),
47
- React.createElement(Route, { exact: true, path: "/timeline" },
48
- React.createElement(TimelineDemo, null)),
49
- React.createElement(Route, { exact: true, path: "/wechat" },
50
- React.createElement(WeChatDemo, null)),
51
- React.createElement(Route, { exact: true, path: "/table" },
52
- React.createElement(TableDemo, null)),
53
- React.createElement(Route, { exact: true, path: "/table1" },
54
- React.createElement(TableDemo1, null)),
55
- React.createElement(Route, { exact: true, path: "/basic" },
56
- React.createElement(BasicDemo, null)),
57
- React.createElement(Route, { exact: true, path: "/form" },
58
- React.createElement(FormDemo, null)),
59
- React.createElement(Route, { exact: true, path: "/print" },
60
- React.createElement(PrintDemo, null)),
61
- React.createElement(Route, { exact: true, path: "/print-container" },
62
- React.createElement(PrintContainerDemo, null)),
63
- React.createElement(Route, { exact: true, path: "/tableall" },
64
- React.createElement(TableDemoAll, null)),
65
- React.createElement(Route, { exact: true, path: "/table-analyse" },
66
- React.createElement(TableAnalyse, null)),
67
- React.createElement(Route, { exact: true, path: "/drag-sort" },
68
- React.createElement(DragSort, null)),
69
- React.createElement(Route, { exact: true, path: "/sinatures" },
70
- React.createElement(SinaturesDemo, null)),
71
- React.createElement(Route, { exact: true, path: "/test" },
72
- React.createElement("div", null,
73
- React.createElement("h1", null,
74
- React.createElement(Link, { to: "/select" }, "select")),
75
- React.createElement("h1", null,
76
- React.createElement(Link, { to: "/tree-select" }, "tree select")),
77
- React.createElement("h1", null,
78
- React.createElement(Link, { to: "/tree" }, "tree")),
79
- React.createElement("h1", null,
80
- React.createElement(Link, { to: "/upload" }, "upload")),
81
- React.createElement("h1", null,
82
- React.createElement(Link, { to: "/drag-sort" }, "drag-sort"))))))),
83
- // </React.StrictMode>,
84
- document.getElementById('root'));
1
+ // import React from 'react';
2
+ // import ReactDOM from 'react-dom';
3
+ // import App from './App';
4
+ // import { ConfigProvider } from 'antd';
5
+ // import zhCN from 'antd/lib/locale/zh_CN';
6
+ // import * as dayjs from 'dayjs';
7
+ // import zhCn from 'dayjs/locale/zh-cn';
8
+ // import { BrowserRouter, Switch, Route, Link } from 'react-router-dom';
9
+ // import Demo from './Demo';
10
+ // import TreeSelectDemo from './TreeSelectDemo';
11
+ // import TreeDemo from './TreeDemo';
12
+ // import UploadDemo from './UploadDemo';
13
+ // import CollapseDemo from './DemoCom/CollapseDemo';
14
+ // import TimelineDemo from './DemoCom/TimelineDemo';
15
+ // import WeChatDemo from './DemoCom/WechatDemo';
16
+ // import TableDemo from './DemoCom/TableDemo';
17
+ // import TableDemo1 from './DemoCom/TableDemo1';
18
+ // import BasicDemo from './DemoCom/BasicDemo';
19
+ // import FormDemo from './DemoCom/FormDemo';
20
+ // import TableAnalyse from './DemoCom/TableAnalyse';
21
+ // import DragSort from './DemoCom/DragSort';
22
+ // import PrintDemo from './DemoCom/PrintDemo';
23
+ // import PrintContainerDemo from './DemoCom/PrintContainerDemo';
24
+ // import SinaturesDemo from './DemoCom/SinaturesDemo';
25
+ // import TableDemoAll from './TableDemo';
26
+ // import CodeQueryDemo from './DemoCom/CodeQueryDemo';
27
+ // dayjs.locale(zhCn);
28
+ // ReactDOM.render(
29
+ // // <React.StrictMode>
30
+ // <ConfigProvider locale={zhCN}>
31
+ // <BrowserRouter>
32
+ // <Switch>
33
+ // <Route exact path="/">
34
+ // <App />
35
+ // </Route>
36
+ // <Route exact path="/code-query">
37
+ // <CodeQueryDemo />
38
+ // </Route>
39
+ // <Route exact path="/select">
40
+ // <Demo />
41
+ // </Route>
42
+ // <Route exact path="/tree-select">
43
+ // <TreeSelectDemo />
44
+ // </Route>
45
+ // <Route exact path="/tree">
46
+ // <TreeDemo />
47
+ // </Route>
48
+ // <Route exact path="/upload">
49
+ // <UploadDemo />
50
+ // </Route>
51
+ // <Route exact path="/collapse">
52
+ // <CollapseDemo />
53
+ // </Route>
54
+ // <Route exact path="/timeline">
55
+ // <TimelineDemo />
56
+ // </Route>
57
+ // <Route exact path="/wechat">
58
+ // <WeChatDemo />
59
+ // </Route>
60
+ // <Route exact path="/table">
61
+ // <TableDemo />
62
+ // </Route>
63
+ // <Route exact path="/table1">
64
+ // <TableDemo1 />
65
+ // </Route>
66
+ // <Route exact path="/basic">
67
+ // <BasicDemo />
68
+ // </Route>
69
+ // <Route exact path="/form">
70
+ // <FormDemo />
71
+ // </Route>
72
+ // <Route exact path="/print">
73
+ // <PrintDemo />
74
+ // </Route>
75
+ // <Route exact path="/print-container">
76
+ // <PrintContainerDemo />
77
+ // </Route>
78
+ // <Route exact path="/tableall">
79
+ // <TableDemoAll />
80
+ // </Route>
81
+ // <Route exact path="/table-analyse">
82
+ // <TableAnalyse />
83
+ // </Route>
84
+ // <Route exact path="/drag-sort">
85
+ // <DragSort />
86
+ // </Route>
87
+ // <Route exact path="/sinatures">
88
+ // <SinaturesDemo />
89
+ // </Route>
90
+ // <Route exact path="/test">
91
+ // <div>
92
+ // <h1>
93
+ // <Link to="/select">select</Link>
94
+ // </h1>
95
+ // <h1>
96
+ // <Link to="/tree-select">tree select</Link>
97
+ // </h1>
98
+ // <h1>
99
+ // <Link to="/tree">tree</Link>
100
+ // </h1>
101
+ // <h1>
102
+ // <Link to="/upload">upload</Link>
103
+ // </h1>
104
+ // <h1>
105
+ // <Link to="/drag-sort">drag-sort</Link>
106
+ // </h1>
107
+ // </div>
108
+ // </Route>
109
+ // </Switch>
110
+ // </BrowserRouter>
111
+ // </ConfigProvider>,
112
+ // // </React.StrictMode>,
113
+ // document.getElementById('root')
114
+ // );
85
115
  export { default as Button } from './components/Button';
86
116
  export { default as Calendar } from './components/Calendar';
87
117
  export { default as Checkbox } from './components/Checkbox';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "3.4.0",
3
+ "version": "3.4.3",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",