ztxkui 3.4.2 → 3.4.5
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.
- package/dist/components/EnhanceSelect/index.js +28 -16
- package/dist/components/Upload/upload.js +1 -0
- package/dist/components/business/Signatures/components/CompareResult.js +1 -46
- package/dist/components/business/Signatures/components/DetailTable.d.ts +30 -0
- package/dist/components/business/Signatures/components/DetailTable.js +184 -0
- package/dist/components/business/Signatures/components/ElectronicSeal.d.ts +3 -5
- package/dist/components/business/Signatures/components/ElectronicSeal.js +13 -60
- package/dist/components/business/Signatures/components/QunjSeal.d.ts +2 -4
- package/dist/components/business/Signatures/components/QunjSeal.js +43 -74
- package/dist/components/business/Signatures/components/SealCheckbox.d.ts +0 -2
- package/dist/components/business/Signatures/components/SealCheckbox.js +22 -13
- package/dist/components/business/Signatures/components/TemplateAttach.js +1 -1
- package/dist/components/business/Signatures/index.js +304 -129
- package/dist/components/business/Signatures/props.d.ts +2 -0
- package/dist/components/utils/upload.js +1 -0
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
|
@@ -293,15 +293,21 @@ function EnhanceSelect(_a) {
|
|
|
293
293
|
var _a;
|
|
294
294
|
// 当value有值时才进行搜索
|
|
295
295
|
// if (value) {
|
|
296
|
+
setIsOpen(true);
|
|
296
297
|
if (isHandAddItem) {
|
|
297
|
-
|
|
298
|
-
(
|
|
299
|
-
_a
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
298
|
+
if (value) {
|
|
299
|
+
setHandleAddItems([
|
|
300
|
+
(_a = {},
|
|
301
|
+
_a[dataKey] = value,
|
|
302
|
+
_a[titleKey] = value,
|
|
303
|
+
_a.__hand_add_key = '_hand_add_key_symbol_001',
|
|
304
|
+
_a.__is_hand_add = true,
|
|
305
|
+
_a),
|
|
306
|
+
]);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
setHandleAddItems([]);
|
|
310
|
+
}
|
|
305
311
|
}
|
|
306
312
|
onSearch && onSearch(value);
|
|
307
313
|
getRemoteDataHandle(value, '');
|
|
@@ -310,15 +316,21 @@ function EnhanceSelect(_a) {
|
|
|
310
316
|
var onSearchHandle = debounce(searchHandle, 800);
|
|
311
317
|
var onSearchHandleInner = function (value) {
|
|
312
318
|
var _a;
|
|
319
|
+
setIsOpen(true);
|
|
313
320
|
if (isHandAddItem) {
|
|
314
|
-
|
|
315
|
-
(
|
|
316
|
-
_a
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
if (value) {
|
|
322
|
+
setHandleAddItems([
|
|
323
|
+
(_a = {},
|
|
324
|
+
_a[dataKey] = value,
|
|
325
|
+
_a[titleKey] = value,
|
|
326
|
+
_a.__hand_add_key = '_hand_add_key_symbol_001',
|
|
327
|
+
_a.__is_hand_add = true,
|
|
328
|
+
_a),
|
|
329
|
+
]);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
setHandleAddItems([]);
|
|
333
|
+
}
|
|
322
334
|
}
|
|
323
335
|
onSearch && onSearch(value);
|
|
324
336
|
};
|
|
@@ -10,50 +10,6 @@ var CompareResult = function (_a) {
|
|
|
10
10
|
var record = _a.record, index = _a.index, request = _a.request, isEdit = _a.isEdit, getTaskId = _a.getTaskId;
|
|
11
11
|
// 设置查看比对结果按钮的loading状态
|
|
12
12
|
var _b = useState(false), resultLoading = _b[0], setResultLoading = _b[1];
|
|
13
|
-
// 设置合同比对按钮的loading状态
|
|
14
|
-
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
15
|
-
// 设置查看结果按钮是否显示
|
|
16
|
-
var _d = useState(false), isShow = _d[0], setIsShow = _d[1];
|
|
17
|
-
var onClickHandle = function () {
|
|
18
|
-
console.log('合同比对', index, record);
|
|
19
|
-
setLoading(true);
|
|
20
|
-
try {
|
|
21
|
-
if (!record.templateAttachId) {
|
|
22
|
-
message.info('请选择客户样板');
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
var params = {
|
|
26
|
-
leftAttachId: record.attachId,
|
|
27
|
-
rightAttachId: record.templateAttachId,
|
|
28
|
-
};
|
|
29
|
-
// 发起比对任务
|
|
30
|
-
request({
|
|
31
|
-
url: "/api/zmdms-resource/seal/create-compare-task/" + params.leftAttachId + "/" + params.rightAttachId,
|
|
32
|
-
method: 'GET',
|
|
33
|
-
})
|
|
34
|
-
.then(function (res) {
|
|
35
|
-
var _a;
|
|
36
|
-
if (res.status === 200 && res.data.code === 200) {
|
|
37
|
-
getTaskId((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.taskId, index);
|
|
38
|
-
setIsShow(true);
|
|
39
|
-
message.success('操作成功');
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
message.error(res.data.msg || '出错了');
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
.catch(function (error) {
|
|
46
|
-
var _a, _b;
|
|
47
|
-
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) || '请求失败!');
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
//
|
|
52
|
-
}
|
|
53
|
-
finally {
|
|
54
|
-
setLoading(false);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
13
|
var viewCompareResult = function () {
|
|
58
14
|
console.log('查看比对结果', index, record);
|
|
59
15
|
setResultLoading(true);
|
|
@@ -97,7 +53,6 @@ var CompareResult = function (_a) {
|
|
|
97
53
|
}
|
|
98
54
|
};
|
|
99
55
|
return (React.createElement(React.Fragment, null,
|
|
100
|
-
React.createElement(Button, { type: "
|
|
101
|
-
React.createElement("div", null, isShow || record.taskId ? (React.createElement(Button, { type: "link", onClick: viewCompareResult, loading: resultLoading }, "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C")) : (''))));
|
|
56
|
+
React.createElement("div", null, record.taskId ? (React.createElement(Button, { type: "link", onClick: viewCompareResult, loading: resultLoading }, "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C")) : (React.createElement(React.Fragment, null)))));
|
|
102
57
|
};
|
|
103
58
|
export default CompareResult;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author zyh
|
|
3
|
+
* @description 审批中审批后详情展示
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
interface IProps {
|
|
7
|
+
/** 接口api */
|
|
8
|
+
ZT_API_BASEURL: string;
|
|
9
|
+
/** 附件api */
|
|
10
|
+
ZT_FILE_BASEURL: string;
|
|
11
|
+
/** token */
|
|
12
|
+
token?: any;
|
|
13
|
+
/** 合同id */
|
|
14
|
+
contractId: string;
|
|
15
|
+
electronicList: any;
|
|
16
|
+
sealList: any;
|
|
17
|
+
querySealStatus?: () => void;
|
|
18
|
+
flow_status: string;
|
|
19
|
+
needQj: number;
|
|
20
|
+
needQys: number;
|
|
21
|
+
records: any;
|
|
22
|
+
/** 已选中的电子印章列表 */
|
|
23
|
+
electronicSealIdList: any;
|
|
24
|
+
/** 已选中群杰印章列表 */
|
|
25
|
+
qunjSeal: any;
|
|
26
|
+
/** 查看盖章页面 */
|
|
27
|
+
viewSealPageFn: any;
|
|
28
|
+
}
|
|
29
|
+
declare const _default: React.NamedExoticComponent<IProps>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author zyh
|
|
3
|
+
* @description 审批中审批后详情展示
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import React, { memo } from 'react';
|
|
17
|
+
import { Table, Button } from '../../../../index';
|
|
18
|
+
// 自定义组件
|
|
19
|
+
import AttachOperation from './AttachOperation';
|
|
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;
|
|
22
|
+
var authToken = token || '';
|
|
23
|
+
/** 下载水印附件 */
|
|
24
|
+
var downFileFn = function (_record) {
|
|
25
|
+
try {
|
|
26
|
+
var xhr_1 = new XMLHttpRequest();
|
|
27
|
+
xhr_1.open('GET', ZT_API_BASEURL + "/api/zmdms-resource/seal/download-watermark-attach/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?Zmdms-Auth=bearer " + token, true);
|
|
28
|
+
xhr_1.responseType = 'blob';
|
|
29
|
+
xhr_1.onload = function () {
|
|
30
|
+
var _a;
|
|
31
|
+
if (xhr_1.status === 200 || xhr_1.status === 201) {
|
|
32
|
+
var link = document.createElement('a');
|
|
33
|
+
link.href = window.URL.createObjectURL(xhr_1.response);
|
|
34
|
+
link.download = ((_a = _record === null || _record === void 0 ? void 0 : _record.attachName) === null || _a === void 0 ? void 0 : _a.split('.')[0]) + ".pdf";
|
|
35
|
+
// fix Firefox
|
|
36
|
+
link.style.display = 'none';
|
|
37
|
+
document.body.appendChild(link);
|
|
38
|
+
link.click();
|
|
39
|
+
document.body.removeChild(link);
|
|
40
|
+
window.URL.revokeObjectURL(link.href);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
xhr_1.send();
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
//
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var columns = [
|
|
50
|
+
{
|
|
51
|
+
title: '序号',
|
|
52
|
+
key: 'orderNum',
|
|
53
|
+
dataIndex: 'orderNum',
|
|
54
|
+
width: 62,
|
|
55
|
+
fixed: 'left',
|
|
56
|
+
render: function (text, record, index) { return "" + (index + 1); },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: '附件类型',
|
|
60
|
+
key: 'attachTypeName',
|
|
61
|
+
dataIndex: 'attachTypeName',
|
|
62
|
+
width: 100,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: '附件名称',
|
|
66
|
+
key: 'attachId',
|
|
67
|
+
dataIndex: 'attachId',
|
|
68
|
+
width: 240,
|
|
69
|
+
render: function (text, record, index) {
|
|
70
|
+
return (React.createElement(React.Fragment, null,
|
|
71
|
+
React.createElement(AttachOperation, { ZT_API_BASEURL: ZT_API_BASEURL, ZT_FILE_BASEURL: ZT_FILE_BASEURL, token: authToken, attachId: record === null || record === void 0 ? void 0 : record.attachId, attachName: record === null || record === void 0 ? void 0 : record.attachName, attachSize: record === null || record === void 0 ? void 0 : record.attachSize })));
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: '水印',
|
|
76
|
+
key: 'isWatermark',
|
|
77
|
+
dataIndex: 'isWatermark',
|
|
78
|
+
width: 60,
|
|
79
|
+
render: function (text, record, index) {
|
|
80
|
+
return (React.createElement(Button, { type: "link", onClick: function () { return downFileFn(record); } }, "\u4E0B\u8F7D\u6C34\u5370\u7248"));
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
title: '电子印章',
|
|
85
|
+
key: 'electronicSeal',
|
|
86
|
+
dataIndex: 'electronicSeal',
|
|
87
|
+
width: '20%',
|
|
88
|
+
render: function (value, row, index) {
|
|
89
|
+
var obj = {
|
|
90
|
+
children: (React.createElement("div", { style: { height: '100%', padding: '10px 0' } },
|
|
91
|
+
React.createElement(Button, { type: "link", style: __assign({}, (contractId ? {} : { display: 'none' })), size: "small", onClick: function () {
|
|
92
|
+
viewSealPageFn && viewSealPageFn();
|
|
93
|
+
} }, "\u9884\u89C8\u76D6\u7AE0\u6548\u679C"),
|
|
94
|
+
(electronicList || [])
|
|
95
|
+
.filter(function (item) { return electronicSeal.includes(item.sealId); })
|
|
96
|
+
.map(function (n) { return (React.createElement("div", { style: { padding: '3px 0' }, key: n.sealId }, n.sealName || '')); }))),
|
|
97
|
+
props: {},
|
|
98
|
+
};
|
|
99
|
+
obj.props['rowSpan'] = index === 0 ? records.length : 0;
|
|
100
|
+
return obj;
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: '群杰印章-用印申请',
|
|
105
|
+
key: 'qunjSeal',
|
|
106
|
+
dataIndex: 'qunjSeal',
|
|
107
|
+
width: 240,
|
|
108
|
+
render: function (value, row, index) {
|
|
109
|
+
var obj = {
|
|
110
|
+
children: (React.createElement("div", { style: { height: '100%', padding: '10px 0' } },
|
|
111
|
+
React.createElement("div", { style: {
|
|
112
|
+
display: 'flex',
|
|
113
|
+
justifyContent: 'space-between',
|
|
114
|
+
height: '50px',
|
|
115
|
+
borderBottom: '1px solid #EBEBEB',
|
|
116
|
+
} },
|
|
117
|
+
React.createElement("div", { style: {
|
|
118
|
+
width: '160px',
|
|
119
|
+
height: '38px',
|
|
120
|
+
background: '#FCECC8',
|
|
121
|
+
borderRadius: '4px',
|
|
122
|
+
padding: '0 10px',
|
|
123
|
+
lineHeight: '38px',
|
|
124
|
+
} },
|
|
125
|
+
"\u7FA4\u6770\u9A8C\u8BC1\u7801",
|
|
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))),
|
|
135
|
+
React.createElement("div", { style: {
|
|
136
|
+
borderBottom: '1px solid #EBEBEB',
|
|
137
|
+
} },
|
|
138
|
+
React.createElement("div", { style: __assign({}, (!!(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode) ? {} : { display: 'none' })) },
|
|
139
|
+
React.createElement(Button, { type: "link", size: "small", onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001")),
|
|
140
|
+
React.createElement("div", null,
|
|
141
|
+
React.createElement("span", { style: {
|
|
142
|
+
color: '#888888',
|
|
143
|
+
} }, "\u5408\u540C\u4EFD\u6570\uFF1A"),
|
|
144
|
+
(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.contranctNum) || '',
|
|
145
|
+
" \u4EFD"),
|
|
146
|
+
React.createElement("div", null,
|
|
147
|
+
React.createElement("span", { style: {
|
|
148
|
+
color: '#888888',
|
|
149
|
+
} }, "\u7528\u5370\u7C7B\u578B\uFF1A"),
|
|
150
|
+
"" + (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.isTakeOut) === '1' ? '外部用印' : '内部用印')),
|
|
151
|
+
React.createElement("div", null, (sealList || [])
|
|
152
|
+
.filter(function (item) {
|
|
153
|
+
return ((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) || [])
|
|
154
|
+
.map(function (n) { return n.sealNo; })
|
|
155
|
+
.includes(item.sealNo);
|
|
156
|
+
})
|
|
157
|
+
.map(function (m) {
|
|
158
|
+
var ele = ((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) || []).find(function (element) { return element.sealNo === m.sealNo; });
|
|
159
|
+
return (React.createElement("div", { style: { padding: '5px 0' }, key: m.sealNo },
|
|
160
|
+
m.sealName,
|
|
161
|
+
' ',
|
|
162
|
+
"\u7528\u5370",
|
|
163
|
+
ele.sealCount || '',
|
|
164
|
+
"\u6B21"));
|
|
165
|
+
})))),
|
|
166
|
+
props: {},
|
|
167
|
+
};
|
|
168
|
+
obj.props['rowSpan'] = index === 0 ? records.length : 0;
|
|
169
|
+
return obj;
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
];
|
|
173
|
+
// 由外部传入needQj needQys参数过滤出需展示的列
|
|
174
|
+
var columnsLast = columns;
|
|
175
|
+
if (!needQj) {
|
|
176
|
+
columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunjSeal'; });
|
|
177
|
+
}
|
|
178
|
+
if (!needQys) {
|
|
179
|
+
columnsLast = columnsLast.filter(function (item) { return !['electronicSeal'].includes(item.key); });
|
|
180
|
+
}
|
|
181
|
+
return (React.createElement(React.Fragment, null,
|
|
182
|
+
React.createElement(Table, { columns: columnsLast, rowKey: "attachId", dataSource: records, scroll: { x: 'max-content' } })));
|
|
183
|
+
};
|
|
184
|
+
export default memo(DetailTable);
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
interface IProps {
|
|
7
|
+
electronicList: any;
|
|
7
8
|
value?: any;
|
|
8
9
|
onChange?: any;
|
|
9
|
-
request?: any;
|
|
10
|
-
flowId: number;
|
|
11
|
-
deptId: any;
|
|
12
10
|
isEdit: boolean;
|
|
13
11
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export default
|
|
12
|
+
declare const _default: React.NamedExoticComponent<IProps>;
|
|
13
|
+
export default _default;
|
|
@@ -2,67 +2,20 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description
|
|
4
4
|
*/
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { memo } from 'react';
|
|
6
6
|
// redux
|
|
7
7
|
// ztxkui公共组件
|
|
8
|
-
import { Checkbox
|
|
8
|
+
import { Checkbox } from '../../../../index';
|
|
9
9
|
var ElectronicSeal = function (_a) {
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
request({
|
|
21
|
-
url: '/api/zmdms-resource/flowdeptseal/page',
|
|
22
|
-
params: params,
|
|
23
|
-
method: 'GET',
|
|
24
|
-
})
|
|
25
|
-
.then(function (res) {
|
|
26
|
-
var _a, _b, _c;
|
|
27
|
-
if (res.status === 200 && res.data.code === 200) {
|
|
28
|
-
// 当前部门和流程没查到数据时 调下面接口查所有的印章
|
|
29
|
-
if (((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.records.length) === 0) {
|
|
30
|
-
request({
|
|
31
|
-
url: '/api/zmdms-resource/qyssealinfo/list',
|
|
32
|
-
method: 'GET',
|
|
33
|
-
})
|
|
34
|
-
.then(function (res) {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
if ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0]) {
|
|
37
|
-
var list = res.data.data.map(function (item) { return ({
|
|
38
|
-
sealId: item.id,
|
|
39
|
-
sealName: item.sealName,
|
|
40
|
-
}); });
|
|
41
|
-
setElectronicList(list);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
message.error(res.data.msg || '出错了');
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
.catch(function (error) {
|
|
48
|
-
var _a, _b;
|
|
49
|
-
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) || '请求失败!');
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
setElectronicList((_c = (_b = res.data.data) === null || _b === void 0 ? void 0 : _b.records[0]) === null || _c === void 0 ? void 0 : _c.sealInfoList);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
message.error(res.data.msg || '出错了');
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
.catch(function (error) {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
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) || '请求失败!');
|
|
61
|
-
});
|
|
62
|
-
}, [request, flowId, deptId]);
|
|
63
|
-
return (React.createElement(Checkbox.Group, { defaultValue: value, onChange: onChange, className: "flex-checkbox-group", disabled: !isEdit }, Array.isArray(electronicList) &&
|
|
64
|
-
electronicList.map(function (item) {
|
|
65
|
-
return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
|
|
66
|
-
})));
|
|
10
|
+
var electronicList = _a.electronicList, value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit;
|
|
11
|
+
return (React.createElement("div", { style: {
|
|
12
|
+
height: '100%',
|
|
13
|
+
overflowY: 'auto',
|
|
14
|
+
overflowX: 'hidden',
|
|
15
|
+
} },
|
|
16
|
+
React.createElement(Checkbox.Group, { defaultValue: value, onChange: onChange, className: "flex-checkbox-group", disabled: !isEdit }, Array.isArray(electronicList) &&
|
|
17
|
+
electronicList.map(function (item) {
|
|
18
|
+
return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
|
|
19
|
+
}))));
|
|
67
20
|
};
|
|
68
|
-
export default ElectronicSeal;
|
|
21
|
+
export default memo(ElectronicSeal);
|
|
@@ -6,14 +6,12 @@ import React from 'react';
|
|
|
6
6
|
interface IProps {
|
|
7
7
|
value?: any;
|
|
8
8
|
onChange?: any;
|
|
9
|
-
request?: any;
|
|
10
|
-
flowId: number;
|
|
11
|
-
caseId: string;
|
|
12
9
|
ZT_API_BASEURL: string;
|
|
13
10
|
isEdit: boolean;
|
|
14
|
-
isOnlyQunj: boolean;
|
|
15
11
|
showContranctNum: boolean;
|
|
12
|
+
sealList: any;
|
|
16
13
|
handleRef?: any;
|
|
14
|
+
querySealStatus?: () => void;
|
|
17
15
|
}
|
|
18
16
|
declare const QunjSeal: React.FC<IProps>;
|
|
19
17
|
export default QunjSeal;
|
|
@@ -16,41 +16,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
16
16
|
import React, { useEffect, useState } from 'react';
|
|
17
17
|
// redux
|
|
18
18
|
// ztxkui公共组件
|
|
19
|
-
import { Form,
|
|
19
|
+
import { Form, InputNumber, SearchContainer, Radio, Checkbox, } from '../../../../index';
|
|
20
20
|
// 路由配置
|
|
21
21
|
// store
|
|
22
22
|
// 自定义组件
|
|
23
23
|
import { SealCheckboxGroup } from './SealCheckbox';
|
|
24
|
-
|
|
25
|
-
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
24
|
+
var Item = SearchContainer.SearchItem;
|
|
26
25
|
var QunjSeal = function (_a) {
|
|
27
|
-
var value = _a.value, onChange = _a.onChange,
|
|
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;
|
|
28
27
|
var form = Form.useForm()[0];
|
|
29
28
|
// 是否加盖群杰印章
|
|
30
|
-
var _b = useState(
|
|
31
|
-
var _c = useState([]), sealList = _c[0], setSealList = _c[1];
|
|
32
|
-
useEffect(function () {
|
|
33
|
-
request({
|
|
34
|
-
url: "/api/zmdms-resource/flowqjuse/query-qj-seal-list/" + flowId,
|
|
35
|
-
method: 'GET',
|
|
36
|
-
})
|
|
37
|
-
.then(function (res) {
|
|
38
|
-
var _a;
|
|
39
|
-
if (res.status === 200 && res.data.code === 200) {
|
|
40
|
-
setSealList((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ({
|
|
41
|
-
sealName: item.sealName,
|
|
42
|
-
sealNo: item.sealNo,
|
|
43
|
-
}); }));
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
message.error(res.data.msg || '出错了');
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
.catch(function (error) {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
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) || '请求失败!');
|
|
52
|
-
});
|
|
53
|
-
}, [request, flowId]);
|
|
29
|
+
var _b = useState(true), checked = _b[0], setChecked = _b[1];
|
|
54
30
|
useEffect(function () {
|
|
55
31
|
var _a;
|
|
56
32
|
if (value) {
|
|
@@ -64,26 +40,34 @@ var QunjSeal = function (_a) {
|
|
|
64
40
|
}
|
|
65
41
|
}
|
|
66
42
|
}, [value, form]);
|
|
67
|
-
/** 查询用印状态 */
|
|
68
|
-
var querySealStatus = function () {
|
|
69
|
-
var url = ZT_API_BASEURL + "/api/zmdms-esb-outer/outer/qj/view-stamp?caseId=" + caseId + "&systemId=1493475945847648257";
|
|
70
|
-
window.open(url);
|
|
71
|
-
};
|
|
72
43
|
/** 是否加盖群杰印章 */
|
|
73
44
|
var needQjSealFn = function (e) {
|
|
74
45
|
if (!e.target.checked) {
|
|
75
|
-
form.
|
|
46
|
+
form.setFieldsValue({
|
|
47
|
+
isTakeOut: 0,
|
|
48
|
+
details: [],
|
|
49
|
+
});
|
|
50
|
+
onChange && onChange({});
|
|
76
51
|
}
|
|
77
52
|
setChecked(e.target.checked);
|
|
78
53
|
};
|
|
79
|
-
var onSealCheckboxHandle = function (
|
|
54
|
+
var onSealCheckboxHandle = function (values) {
|
|
80
55
|
form.setFieldsValue({
|
|
81
|
-
|
|
56
|
+
values: values,
|
|
82
57
|
});
|
|
83
58
|
};
|
|
84
59
|
var onValuesChangeHandle = function (value, allValues) {
|
|
85
|
-
|
|
86
|
-
|
|
60
|
+
var _a;
|
|
61
|
+
var result = allValues;
|
|
62
|
+
if (result &&
|
|
63
|
+
Object.keys(result).length === 1 &&
|
|
64
|
+
Object.keys(result)[0] === 'needQj' &&
|
|
65
|
+
Object.keys(result)[0]) {
|
|
66
|
+
result = __assign(__assign({}, result), { isTakeOut: 0, details: [], contranctNum: 1 });
|
|
67
|
+
(_a = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _a === void 0 ? void 0 : _a.getData('enable');
|
|
68
|
+
}
|
|
69
|
+
onChange && onChange(result);
|
|
70
|
+
form.setFieldsValue(result);
|
|
87
71
|
};
|
|
88
72
|
/** 渲染SealCheckboxGroup组件 */
|
|
89
73
|
var getSealCheckboxGroupRender = function () {
|
|
@@ -92,42 +76,27 @@ var QunjSeal = function (_a) {
|
|
|
92
76
|
overflowY: 'auto',
|
|
93
77
|
overflowX: 'hidden',
|
|
94
78
|
} },
|
|
95
|
-
React.createElement(SealCheckboxGroup, { sealList: sealList, onChange: onSealCheckboxHandle, handleRef: handleRef, isEdit: isEdit,
|
|
79
|
+
React.createElement(SealCheckboxGroup, { sealList: sealList, onChange: onSealCheckboxHandle, handleRef: handleRef, isEdit: isEdit, showContranctNum: showContranctNum })));
|
|
96
80
|
};
|
|
97
|
-
return
|
|
98
|
-
React.createElement(
|
|
99
|
-
React.createElement(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
React.createElement(InputNumber, { disabled: !isEdit, min: 0 }))) : (''),
|
|
118
|
-
getSealCheckboxGroupRender())) : (React.createElement(React.Fragment, null)))))) : (React.createElement(Form, { form: form, onValuesChange: onValuesChangeHandle },
|
|
119
|
-
React.createElement(Item, { name: "needQj", label: "", valuePropName: "checked", noBorder: true, width: "all" },
|
|
120
|
-
React.createElement(Checkbox, { checked: checked, disabled: !isEdit, style: { marginTop: '8px' }, onChange: function (e) { return needQjSealFn(e); } }, "\u662F\u5426\u52A0\u76D6\u7FA4\u6770\u5370\u7AE0")),
|
|
121
|
-
React.createElement(SearchContainer, null, checked ? (React.createElement(SearchLeft, null,
|
|
122
|
-
React.createElement(Item, { name: "vertifyCode", label: "\u7FA4\u6770\u9A8C\u8BC1\u7801", width: "all" },
|
|
123
|
-
React.createElement(Input, { disabled: true })),
|
|
124
|
-
showContranctNum ? (React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all" },
|
|
125
|
-
React.createElement(InputNumber, { disabled: !isEdit, min: 0 }))) : (''),
|
|
126
|
-
!!value.vertifyCode ? (React.createElement(Button, { type: "primary", size: "small", style: { marginLeft: '6px' }, onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001")) : (''),
|
|
127
|
-
React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "all" },
|
|
128
|
-
React.createElement(Radio.Group, { style: { padding: '0 6px' }, disabled: !isEdit },
|
|
129
|
-
React.createElement(Radio, { value: 0 }, "\u5185\u90E8\u7528\u5370"),
|
|
130
|
-
React.createElement(Radio, { value: 1 }, "\u5916\u90E8\u7528\u5370"))),
|
|
131
|
-
getSealCheckboxGroupRender())) : (React.createElement(React.Fragment, null)))));
|
|
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 },
|
|
94
|
+
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))));
|
|
132
101
|
};
|
|
133
102
|
export default QunjSeal;
|
|
@@ -10,7 +10,6 @@ interface IProps {
|
|
|
10
10
|
showContranctNum: boolean;
|
|
11
11
|
value?: any;
|
|
12
12
|
onChange?: any;
|
|
13
|
-
isOnlyQunj?: boolean;
|
|
14
13
|
handleRef?: any;
|
|
15
14
|
}
|
|
16
15
|
declare const SealCheckbox: React.FC<IProps>;
|
|
@@ -26,7 +25,6 @@ interface ISealProps {
|
|
|
26
25
|
handleRef?: any;
|
|
27
26
|
isEdit: boolean;
|
|
28
27
|
showContranctNum: boolean;
|
|
29
|
-
isOnlyQunj?: boolean;
|
|
30
28
|
}
|
|
31
29
|
declare const SealCheckboxGroup: React.FC<ISealProps>;
|
|
32
30
|
export { SealCheckboxGroup };
|