ztxkui 3.4.17 → 3.5.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.
@@ -146,7 +146,10 @@ var UploadTable = function (_a) {
146
146
  ((typeof operationAuth === 'string'
147
147
  ? authDownloadBtn
148
148
  : showDownloadBtn) ||
149
- (record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) && (React.createElement(Button, { type: "link", style: {
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: {
150
153
  height: 28,
151
154
  }, onClick: function () {
152
155
  if (isPublic) {
@@ -250,7 +253,10 @@ var UploadTable = function (_a) {
250
253
  ((typeof operationAuth === 'string'
251
254
  ? authDownloadBtn
252
255
  : showDownloadBtn) ||
253
- (record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) && (React.createElement(Button, { type: "link", style: {
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: {
254
260
  height: 28,
255
261
  }, onClick: function () {
256
262
  if (isPublic) {
@@ -8,6 +8,7 @@ export interface IProps extends ColProps {
8
8
  titleHorizontal?: 'flex-start' | 'flex-end' | 'center' | 'normal';
9
9
  titleVertical?: 'flex-start' | 'flex-end' | 'center' | 'normal';
10
10
  required?: boolean;
11
+ titleBackColor?: string;
11
12
  }
12
13
  declare const Item: React.FC<IProps>;
13
14
  export default Item;
@@ -24,7 +24,7 @@ import React from 'react';
24
24
  import { Col } from 'antd';
25
25
  import classNames from 'classnames';
26
26
  var Item = function (_a) {
27
- var children = _a.children, className = _a.className, title = _a.title, colon = _a.colon, span = _a.span, titleSpan = _a.titleSpan, _b = _a.titleHorizontal, titleHorizontal = _b === void 0 ? 'normal' : _b, _c = _a.titleVertical, titleVertical = _c === void 0 ? 'normal' : _c, required = _a.required, restProps = __rest(_a, ["children", "className", "title", "colon", "span", "titleSpan", "titleHorizontal", "titleVertical", "required"]);
27
+ var children = _a.children, className = _a.className, title = _a.title, colon = _a.colon, span = _a.span, titleSpan = _a.titleSpan, _b = _a.titleHorizontal, titleHorizontal = _b === void 0 ? 'normal' : _b, _c = _a.titleVertical, titleVertical = _c === void 0 ? 'normal' : _c, required = _a.required, titleBackColor = _a.titleBackColor, restProps = __rest(_a, ["children", "className", "title", "colon", "span", "titleSpan", "titleHorizontal", "titleVertical", "required", "titleBackColor"]);
28
28
  var classes = classNames('zt-grid-item', className);
29
29
  return (React.createElement(Col, __assign({ className: classes, span: span }, restProps),
30
30
  React.createElement("span", { className: "zt-grid-item--title", style: {
@@ -32,6 +32,7 @@ var Item = function (_a) {
32
32
  display: 'flex',
33
33
  alignItems: titleVertical,
34
34
  justifyContent: titleHorizontal,
35
+ background: titleBackColor,
35
36
  } },
36
37
  required && React.createElement("span", { className: "zt-grid-item--required" }, "*"),
37
38
  title,
@@ -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,6 +10,7 @@ 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
  } },
@@ -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;
@@ -56,7 +56,7 @@ 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%' } }, name),
60
60
  React.createElement("div", { style: { display: 'flex', lineHeight: '32px' } },
61
61
  React.createElement("div", { style: { marginRight: '5px' } }, "\u7528\u5370"),
62
62
  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,26 @@ 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
+ /** 是否加盖群杰印章 */
107
+ var needQjSealFn = function (e) {
108
+ if (!e.target.checked) {
109
+ form.setFieldsValue({
110
+ isTakeOut: 0,
111
+ contranctNum: 1,
112
+ details: [],
113
+ });
114
+ qunjSealChangeHandle({
115
+ isTakeOut: 0,
116
+ contranctNum: 1,
117
+ details: [],
118
+ });
119
+ }
120
+ setChecked(e.target.checked);
121
+ };
113
122
  /** 查询用印状态 */
114
123
  var querySealStatus = function () {
115
124
  var url = ZT_API_BASEURL + "/api/zmdms-esb-outer/outer/qj/view-stamp?caseId=" + caseId + "&systemId=1493475945847648257";
@@ -351,7 +360,7 @@ var Sinatures = function (_a) {
351
360
  title: '合同比对模板',
352
361
  key: 'templateAttachId',
353
362
  dataIndex: 'templateAttachId',
354
- width: 160,
363
+ width: 150,
355
364
  render: function (text, record, index) {
356
365
  return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, index: index, openCustomerModalHandle: openCustomerModalHandle, isEdit: isEdit })) : ('');
357
366
  },
@@ -360,7 +369,7 @@ var Sinatures = function (_a) {
360
369
  title: '合同比对结果',
361
370
  key: 'compareAttachId',
362
371
  dataIndex: 'compareAttachId',
363
- width: 100,
372
+ width: 150,
364
373
  render: function (text, record, index) {
365
374
  return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request, getTaskId: getTaskId, isEdit: isEdit })) : ('');
366
375
  },
@@ -369,7 +378,7 @@ var Sinatures = function (_a) {
369
378
  title: '保存为模版',
370
379
  key: 'templateAttachId',
371
380
  dataIndex: 'templateAttachId',
372
- width: 80,
381
+ width: 90,
373
382
  render: function (text, record, index) {
374
383
  return NEED_SAVE_TEMPLATE.includes("" + flowId) ? (React.createElement(Switch, { checked: record.isCustomerReference, disabled: !isEdit, onChange: function (value) {
375
384
  return onSwitchChangeHandle(value, 'isCustomerReference', index);
@@ -398,7 +407,7 @@ var Sinatures = function (_a) {
398
407
  title: '盖电子印章',
399
408
  key: 'isElectronicSeal',
400
409
  dataIndex: 'isElectronicSeal',
401
- width: 80,
410
+ width: 90,
402
411
  render: function (text, record, index) {
403
412
  return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
404
413
  return onSwitchChangeHandle(value, 'isElectronicSeal', index);
@@ -425,7 +434,7 @@ var Sinatures = function (_a) {
425
434
  title: '电子印章设置',
426
435
  key: 'setElectronicSeal',
427
436
  dataIndex: 'setElectronicSeal',
428
- width: 95,
437
+ width: 110,
429
438
  render: function (value, row, index) {
430
439
  var Comp = function () {
431
440
  return records.length !== 0 ? (React.createElement("div", { style: { height: '100%', paddingTop: '23px' } },
@@ -445,24 +454,34 @@ var Sinatures = function (_a) {
445
454
  ],
446
455
  },
447
456
  {
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
- },
457
+ title: function () { return (React.createElement("div", { style: { width: '100%', textAlign: 'center' } }, "\u7FA4\u6770\u5370\u7AE0")); },
458
+ key: 'qunJ',
459
+ dataIndex: 'qunJ',
460
+ width: 500,
461
+ children: [
462
+ {
463
+ title: function () {
464
+ return (React.createElement(Checkbox, { checked: checked, disabled: !isEdit, onChange: function (e) { return needQjSealFn(e); } }, "\u7FA4\u6770\u5370\u7AE0-\u7528\u5370\u7533\u8BF7"));
465
+ },
466
+ key: 'qunjSeal',
467
+ dataIndex: 'qunjSeal',
468
+ width: 500,
469
+ render: function (value, row, index) {
470
+ var obj = {
471
+ 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 })),
472
+ props: {},
473
+ };
474
+ obj.props['rowSpan'] = index === 0 ? records.length : 0;
475
+ return obj;
476
+ },
477
+ },
478
+ ],
460
479
  },
461
480
  ];
462
481
  // 由外部传入needQj needDg needQys参数过滤出需展示的列
463
482
  var columnsLast = columns;
464
483
  if (!needQj) {
465
- columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunjSeal'; });
484
+ columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunJ'; });
466
485
  }
467
486
  if (!needDg && !needQys) {
468
487
  columnsLast = columnsLast.filter(function (item) { return !['attachTypeName'].includes(item.key); });
@@ -474,7 +493,7 @@ var Sinatures = function (_a) {
474
493
  columnsLast = columnsLast.filter(function (item) { return !['isWatermark', 'needQys'].includes(item.key); });
475
494
  }
476
495
  // 上传组件的数据
477
- var _q = useState(), originFileList = _q[0], setOriginFileList = _q[1];
496
+ var _r = useState(), originFileList = _r[0], setOriginFileList = _r[1];
478
497
  /** 签章组件onChange事件 */
479
498
  var sigValuesChange = function (type, value) {
480
499
  var _a, _b;
@@ -490,7 +509,7 @@ var Sinatures = function (_a) {
490
509
  // 勾选加盖电子印章后 显示确认盖章按钮
491
510
  setCheckSealVisible(value ? true : hasElecSeal.length > 1 ? true : false);
492
511
  // 去除加盖电子印章勾选时 清除合同id 等之前的信息
493
- if (!value) {
512
+ if (!value && hasElecSeal.length === 1) {
494
513
  setSealedIds(__spreadArray([], sealedIds));
495
514
  setContractId('');
496
515
  setAttachMap(null);
@@ -581,10 +600,12 @@ var Sinatures = function (_a) {
581
600
  },
582
601
  /** 签章组件相关校验 */
583
602
  validateSealFn: function () {
584
- var _a, _b;
603
+ var _a;
585
604
  // 确认盖章后 勾选的信息有更改
586
- if (needQys &&
587
- ((_a = prevParam === null || prevParam === void 0 ? void 0 : prevParam.sealIdList) === null || _a === void 0 ? void 0 : _a.length) !== (innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) &&
605
+ if (isEdit &&
606
+ needQys &&
607
+ (prevParam === null || prevParam === void 0 ? void 0 : prevParam.sealIdList) &&
608
+ (prevParam === null || prevParam === void 0 ? void 0 : prevParam.sealIdList.length) !== (innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) &&
588
609
  !isSure) {
589
610
  Modal.confirm({
590
611
  title: '当前所勾选的电子印章信息与上一次盖章时有差异,请确认是否继续?',
@@ -603,28 +624,34 @@ var Sinatures = function (_a) {
603
624
  // 是否有勾选加盖电子印章
604
625
  var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
605
626
  // 勾选加盖电子印章时未勾选电子印章
606
- if ((innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) === 0 && hasElectronicSeal) {
627
+ if (needQys &&
628
+ isEdit &&
629
+ (innerElectronicSeal === null || innerElectronicSeal === void 0 ? void 0 : innerElectronicSeal.length) === 0 &&
630
+ hasElectronicSeal) {
607
631
  message.warning('请勾选加盖电子印章所需要的印章列表!');
608
632
  return false;
609
633
  }
610
634
  // 超过4倍禁止提交审批
611
- if (needQj && isTotalSealNumTooMore) {
635
+ if (isEdit && needQj && isTotalSealNumTooMore) {
612
636
  message.warning('您的用印次数远超超过合理次数范围,请修改。');
613
637
  return false;
614
638
  }
615
639
  // 没有确认盖章
616
- if (needQys && hasElectronicSeal && !(contractId || contract_id)) {
640
+ if (isEdit &&
641
+ needQys &&
642
+ hasElectronicSeal &&
643
+ !(contractId || contract_id)) {
617
644
  message.warning('请点击确认盖章按钮,确认盖章位置后方可提交!');
618
645
  return false;
619
646
  }
620
- if (innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.needQj) {
647
+ if (isEdit && checked && needQj) {
621
648
  // 合同份数为空
622
649
  if (!(innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.contranctNum) && showContranctNum) {
623
650
  message.warning('请填写合同份数!');
624
651
  return false;
625
652
  }
626
653
  // 勾选的群杰印章 没有填用印次数
627
- if (((_b = innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.details) === null || _b === void 0 ? void 0 : _b.length) > 0) {
654
+ if (((_a = innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) > 0) {
628
655
  innerQunjSeal.details.forEach(function (item) {
629
656
  if (!item.sealCount) {
630
657
  message.warning("\u8BF7\u586B\u5199" + item.sealName + " \u7684\u7528\u5370\u6B21\u6570\uFF01");
@@ -654,7 +681,6 @@ var Sinatures = function (_a) {
654
681
  electronicList: electronicList,
655
682
  sealList: sealList,
656
683
  querySealStatus: querySealStatus,
657
- flow_status: FLOW_STATUS[flowStatus],
658
684
  needQj: needQj,
659
685
  needQys: needQys,
660
686
  };
@@ -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.17",
3
+ "version": "3.5.0",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",
@@ -22,7 +22,8 @@
22
22
  "react-dnd-html5-backend": "^14.0.0",
23
23
  "react-infinite-scroll-component": "^6.1.0",
24
24
  "react-resizable": "^3.0.4",
25
- "react-to-print": "^2.14.7"
25
+ "react-to-print": "^2.14.7",
26
+ "ztxkutils": "^2.8.19"
26
27
  },
27
28
  "scripts": {
28
29
  "analyze": "source-map-explorer 'dist/static/js/*.js'",