ztxkui 3.4.4 → 3.4.7
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/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 +301 -135
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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 };
|
|
@@ -22,10 +22,11 @@ import React from 'react';
|
|
|
22
22
|
import sumBy from 'lodash/sumBy';
|
|
23
23
|
// redux
|
|
24
24
|
// ztxkui公共组件
|
|
25
|
-
import { Checkbox, InputNumber } from '../../../../index';
|
|
25
|
+
import { Checkbox, InputNumber, SearchContainer } from '../../../../index';
|
|
26
26
|
import { message } from 'antd';
|
|
27
|
+
var Item = SearchContainer.SearchItem;
|
|
27
28
|
var SealCheckbox = function (_a) {
|
|
28
|
-
var name = _a.name, id = _a.id, value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum,
|
|
29
|
+
var name = _a.name, id = _a.id, value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum, handleRef = _a.handleRef;
|
|
29
30
|
var onCheckboxChange = function (e) {
|
|
30
31
|
onChange &&
|
|
31
32
|
onChange(__assign(__assign({}, (value || {})), { sealName: e.target.checked ? name : null, sealNo: e.target.checked ? id : null }));
|
|
@@ -34,14 +35,14 @@ var SealCheckbox = function (_a) {
|
|
|
34
35
|
var _a, _b;
|
|
35
36
|
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
37
|
var num = count;
|
|
37
|
-
if (count <
|
|
38
|
-
num =
|
|
38
|
+
if (count < 1) {
|
|
39
|
+
num = 1;
|
|
39
40
|
}
|
|
40
|
-
if (
|
|
41
|
+
if (typeof contractNum !== 'number' && showContranctNum && onChange) {
|
|
41
42
|
message.info('请输入合同份数!');
|
|
42
43
|
num = null;
|
|
43
44
|
}
|
|
44
|
-
if (typeof num !== 'number') {
|
|
45
|
+
if (typeof num !== 'number' && value) {
|
|
45
46
|
Reflect.deleteProperty(value, 'sealCount');
|
|
46
47
|
}
|
|
47
48
|
var info = __assign(__assign({}, (value || {})), (typeof num === 'number' ? { sealCount: num } : {}));
|
|
@@ -50,14 +51,22 @@ var SealCheckbox = function (_a) {
|
|
|
50
51
|
}
|
|
51
52
|
onChange && onChange(info, 'sealCount');
|
|
52
53
|
};
|
|
53
|
-
return (React.createElement("div", { style:
|
|
54
|
+
return (React.createElement("div", { style: {
|
|
55
|
+
display: 'flex',
|
|
56
|
+
justifyContent: 'space-between',
|
|
57
|
+
height: '32px',
|
|
58
|
+
} },
|
|
54
59
|
React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealNo ? true : false, disabled: !isEdit, style: { width: '40%' } }, name),
|
|
55
|
-
React.createElement("div",
|
|
56
|
-
React.createElement("
|
|
57
|
-
React.createElement(
|
|
60
|
+
React.createElement("div", { style: { display: 'flex', lineHeight: '32px' } },
|
|
61
|
+
React.createElement("div", { style: { marginRight: '5px' } }, "\u7528\u5370"),
|
|
62
|
+
React.createElement(Item, { noLabel: true, width: "half" },
|
|
63
|
+
React.createElement(InputNumber, { disabled: !isEdit, min: 1, size: "small", value: typeof (value === null || value === void 0 ? void 0 : value.sealCount) === 'number'
|
|
64
|
+
? value === null || value === void 0 ? void 0 : value.sealCount
|
|
65
|
+
: undefined, onChange: onNumberChange, style: { width: '60px' } })),
|
|
66
|
+
React.createElement("div", { style: { marginLeft: '50px' } }, "\u6B21"))));
|
|
58
67
|
};
|
|
59
68
|
var SealCheckboxGroup = function (_a) {
|
|
60
|
-
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList, handleRef = _a.handleRef, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum
|
|
69
|
+
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList, handleRef = _a.handleRef, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum;
|
|
61
70
|
var onChangeHandle = function (_value, index, sealNo, type) {
|
|
62
71
|
var _a, _b, _c, _d;
|
|
63
72
|
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;
|
|
@@ -81,7 +90,7 @@ var SealCheckboxGroup = function (_a) {
|
|
|
81
90
|
}
|
|
82
91
|
var totalSealNum = sumBy(valueArr, 'sealCount');
|
|
83
92
|
onChange && onChange(valueArr);
|
|
84
|
-
if (contractNum) {
|
|
93
|
+
if (typeof contractNum === 'number') {
|
|
85
94
|
if (totalSealNum > contractNum * 4) {
|
|
86
95
|
(_c = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _c === void 0 ? void 0 : _c.getData('4');
|
|
87
96
|
message.warning('您的用印次数远超超过合理次数范围,请修改。');
|
|
@@ -106,7 +115,7 @@ var SealCheckboxGroup = function (_a) {
|
|
|
106
115
|
if (Array.isArray(value)) {
|
|
107
116
|
itemValue = value.find(function (valueItem) { return valueItem.sealNo === item.sealNo; });
|
|
108
117
|
}
|
|
109
|
-
return (React.createElement(SealCheckbox, { key: item === null || item === void 0 ? void 0 : item.sealNo, name: item === null || item === void 0 ? void 0 : item.sealName, id: item === null || item === void 0 ? void 0 : item.sealNo, value: itemValue, isEdit: isEdit,
|
|
118
|
+
return (React.createElement(SealCheckbox, { key: item === null || item === void 0 ? void 0 : item.sealNo, name: item === null || item === void 0 ? void 0 : item.sealName, id: item === null || item === void 0 ? void 0 : item.sealNo, value: itemValue, isEdit: isEdit, showContranctNum: showContranctNum, handleRef: handleRef, onChange: function (value, type) {
|
|
110
119
|
onChangeHandle(value, index, item.sealNo, type);
|
|
111
120
|
} }));
|
|
112
121
|
})));
|
|
@@ -13,6 +13,6 @@ var TemplateAttach = function (_a) {
|
|
|
13
13
|
React.createElement("div", null,
|
|
14
14
|
React.createElement(Button, { type: "link", disabled: !isEdit, onClick: function () {
|
|
15
15
|
openCustomerModalHandle && openCustomerModalHandle(index);
|
|
16
|
-
} }, "\u9009\u62E9\
|
|
16
|
+
} }, "\u9009\u62E9\u6BD4\u5BF9\u6A21\u7248"))));
|
|
17
17
|
};
|
|
18
18
|
export default TemplateAttach;
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
24
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
25
|
to[j] = from[i];
|
|
@@ -21,7 +32,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
21
32
|
import React, { useImperativeHandle, useCallback, useState, useMemo, useEffect, } from 'react';
|
|
22
33
|
// redux
|
|
23
34
|
// ztxkui公共组件
|
|
24
|
-
import { Table, Upload, message,
|
|
35
|
+
import { Table, Upload, message, Button, Modal } from '../../../index';
|
|
36
|
+
import { Switch } from 'antd';
|
|
25
37
|
// 路由配置
|
|
26
38
|
// store
|
|
27
39
|
// 自定义组件
|
|
@@ -30,6 +42,7 @@ import TemplateAttach from './components/TemplateAttach';
|
|
|
30
42
|
import CompareResult from './components/CompareResult';
|
|
31
43
|
import QunjSeal from './components/QunjSeal';
|
|
32
44
|
import ElectronicSeal from './components/ElectronicSeal';
|
|
45
|
+
import DetailTable from './components/DetailTable';
|
|
33
46
|
import { useRecords, useQunjData, useElectronicData } from './hooks';
|
|
34
47
|
/** 需要存样板合同类型 采购合同 销售合同 双边合同 */
|
|
35
48
|
var NEED_SAVE_TEMPLATE = [
|
|
@@ -44,14 +57,26 @@ var FLOW_IDS = [
|
|
|
44
57
|
'scm_order_contract_sbht',
|
|
45
58
|
'scm_order_contract_bjjyht',
|
|
46
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
|
+
};
|
|
47
71
|
/**
|
|
48
72
|
* TodoList
|
|
49
73
|
* 实现可以上传文件,删除列
|
|
50
74
|
* 实现受控,接收一个附件列表
|
|
51
75
|
*/
|
|
52
76
|
var Sinatures = function (_a) {
|
|
53
|
-
var
|
|
54
|
-
|
|
77
|
+
var isUpload = _a.isUpload, qunjSealChange = _a.qunjSealChange, 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, otherParams = __rest(_a, ["isUpload", "qunjSealChange", "electronicSealChange", "onSigValuesChange", "handleRef", "ZT_API_BASEURL", "ZT_FILE_BASEURL", "systemCode", "token", "openCustomerModalHandle", "request"]);
|
|
78
|
+
var canEdit = otherParams.canEdit, needQj = otherParams.needQj, needDg = otherParams.needDg, needQys = otherParams.needQys, fileList = otherParams.fileList, qunjSeal = otherParams.qunjSeal, electronicSeal = otherParams.electronicSealIdList, flowId = otherParams.flowId, deptId = otherParams.deptId, flowStatus = otherParams.flowStatus, caseId = otherParams.caseId, contract_id = otherParams.contractId, docAttachMap = otherParams.docAttachMap, checkAttachIdList = otherParams.checkAttachIdList, // 已盖章附件id
|
|
79
|
+
documentIdList = otherParams.documentIdList;
|
|
55
80
|
var authToken = token || '';
|
|
56
81
|
// 是否可编辑 1可编辑 0不可编辑
|
|
57
82
|
var isEdit = canEdit === 1;
|
|
@@ -75,10 +100,96 @@ var Sinatures = function (_a) {
|
|
|
75
100
|
var _j = useState(documentIdList), documentIds = _j[0], setDocumentIds = _j[1];
|
|
76
101
|
// 总用印次数超过4倍
|
|
77
102
|
var _k = useState(false), isTotalSealNumTooMore = _k[0], setIsTotalSealNumTooMore = _k[1];
|
|
78
|
-
// 单独使用群杰章
|
|
79
|
-
var isOnlyQunj = !!needQj && !needDg && !needQys;
|
|
80
103
|
// 采购合同 销售合同 双边合同 部门间交易合同 需要展示合同份数 其他的不需要
|
|
81
104
|
var showContranctNum = FLOW_IDS.includes("" + flowId);
|
|
105
|
+
// 电子印章列表
|
|
106
|
+
var _l = useState([]), electronicList = _l[0], setElectronicList = _l[1];
|
|
107
|
+
// 群杰印章列表
|
|
108
|
+
var _m = useState([]), sealList = _m[0], setSealList = _m[1];
|
|
109
|
+
// 上一次盖章时的参数信息
|
|
110
|
+
var _o = useState({}), prevParam = _o[0], setPrevParam = _o[1];
|
|
111
|
+
// 请确认
|
|
112
|
+
var _p = useState(false), isSure = _p[0], setIsSure = _p[1];
|
|
113
|
+
/** 查询用印状态 */
|
|
114
|
+
var querySealStatus = function () {
|
|
115
|
+
var url = ZT_API_BASEURL + "/api/zmdms-esb-outer/outer/qj/view-stamp?caseId=" + caseId + "&systemId=1493475945847648257";
|
|
116
|
+
window.open(url);
|
|
117
|
+
};
|
|
118
|
+
/** 获取电子印章列表 */
|
|
119
|
+
var getElectronicList = useCallback(function () {
|
|
120
|
+
var params = {
|
|
121
|
+
deptId: deptId,
|
|
122
|
+
size: 200,
|
|
123
|
+
};
|
|
124
|
+
if (flowId) {
|
|
125
|
+
params.flowId = flowId;
|
|
126
|
+
}
|
|
127
|
+
request({
|
|
128
|
+
url: '/api/zmdms-resource/flowdeptseal/page',
|
|
129
|
+
params: params,
|
|
130
|
+
method: 'GET',
|
|
131
|
+
})
|
|
132
|
+
.then(function (res) {
|
|
133
|
+
var _a, _b, _c;
|
|
134
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
135
|
+
// 当前部门和流程没查到数据时 调下面接口查所有的印章
|
|
136
|
+
if (((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.records.length) === 0) {
|
|
137
|
+
request({
|
|
138
|
+
url: '/api/zmdms-resource/qyssealinfo/list',
|
|
139
|
+
method: 'GET',
|
|
140
|
+
})
|
|
141
|
+
.then(function (res) {
|
|
142
|
+
var _a, _b;
|
|
143
|
+
if ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0]) {
|
|
144
|
+
var list = res.data.data.map(function (item) { return ({
|
|
145
|
+
sealId: item.id,
|
|
146
|
+
sealName: item.sealName,
|
|
147
|
+
}); });
|
|
148
|
+
setElectronicList(list);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
message.error(res.data.msg || '出错了');
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
.catch(function (error) {
|
|
155
|
+
var _a, _b;
|
|
156
|
+
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) || '请求失败!');
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
setElectronicList((_c = (_b = res.data.data) === null || _b === void 0 ? void 0 : _b.records[0]) === null || _c === void 0 ? void 0 : _c.sealInfoList);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
message.error(res.data.msg || '出错了');
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
.catch(function (error) {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
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) || '请求失败!');
|
|
168
|
+
});
|
|
169
|
+
}, [deptId, flowId, request]);
|
|
170
|
+
/** 获取群杰印章列表 */
|
|
171
|
+
var getQunjSealList = useCallback(function () {
|
|
172
|
+
request({
|
|
173
|
+
url: "/api/zmdms-resource/flowqjuse/query-qj-seal-list/" + flowId,
|
|
174
|
+
method: 'GET',
|
|
175
|
+
})
|
|
176
|
+
.then(function (res) {
|
|
177
|
+
var _a;
|
|
178
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
179
|
+
setSealList((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ({
|
|
180
|
+
sealName: item.sealName,
|
|
181
|
+
sealNo: item.sealNo,
|
|
182
|
+
}); }));
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
message.error(res.data.msg || '出错了');
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
.catch(function (error) {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
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) || '请求失败!');
|
|
191
|
+
});
|
|
192
|
+
}, [flowId, request]);
|
|
82
193
|
useEffect(function () {
|
|
83
194
|
// 判断入参fileList中是否有已勾选电子印章的元素
|
|
84
195
|
if (Array.isArray(fileList) &&
|
|
@@ -86,34 +197,21 @@ var Sinatures = function (_a) {
|
|
|
86
197
|
setCheckSealVisible(true);
|
|
87
198
|
}
|
|
88
199
|
}, [fileList]);
|
|
200
|
+
useEffect(function () {
|
|
201
|
+
if (needQys) {
|
|
202
|
+
getElectronicList();
|
|
203
|
+
}
|
|
204
|
+
if (needQj) {
|
|
205
|
+
getQunjSealList();
|
|
206
|
+
}
|
|
207
|
+
}, [getElectronicList, getQunjSealList, needQj, needQys]);
|
|
89
208
|
/** 获取taskId */
|
|
90
209
|
var getTaskId = function (id, index) {
|
|
91
210
|
handleRef.current.setTemplateData({
|
|
92
211
|
taskId: id,
|
|
93
212
|
}, index);
|
|
94
213
|
};
|
|
95
|
-
/**
|
|
96
|
-
var downFileFn = function (_record) {
|
|
97
|
-
var xhr = new XMLHttpRequest();
|
|
98
|
-
xhr.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);
|
|
99
|
-
xhr.responseType = 'blob';
|
|
100
|
-
xhr.onload = function () {
|
|
101
|
-
var _a;
|
|
102
|
-
if (xhr.status === 200 || xhr.status === 201) {
|
|
103
|
-
var link = document.createElement('a');
|
|
104
|
-
link.href = window.URL.createObjectURL(xhr.response);
|
|
105
|
-
link.download = ((_a = _record === null || _record === void 0 ? void 0 : _record.attachName) === null || _a === void 0 ? void 0 : _a.split('.')[0]) + ".pdf";
|
|
106
|
-
// fix Firefox
|
|
107
|
-
link.style.display = 'none';
|
|
108
|
-
document.body.appendChild(link);
|
|
109
|
-
link.click();
|
|
110
|
-
document.body.removeChild(link);
|
|
111
|
-
window.URL.revokeObjectURL(link.href);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
xhr.send();
|
|
115
|
-
};
|
|
116
|
-
/** 确认盖章 */
|
|
214
|
+
/** 指定签署位置 */
|
|
117
215
|
var checkSealFn = function () {
|
|
118
216
|
// 已勾选的要加盖电子印章的附件id列表
|
|
119
217
|
var checkedElecSealIds = records
|
|
@@ -148,9 +246,11 @@ var Sinatures = function (_a) {
|
|
|
148
246
|
params.deleteAttachIdList.push(n);
|
|
149
247
|
}
|
|
150
248
|
});
|
|
249
|
+
setPrevParam(params);
|
|
151
250
|
request({
|
|
152
251
|
url: '/api/zmdms-resource/seal/confirm-seal-info',
|
|
153
252
|
method: 'POST',
|
|
253
|
+
timeout: 90000,
|
|
154
254
|
data: params,
|
|
155
255
|
})
|
|
156
256
|
.then(function (res) {
|
|
@@ -214,98 +314,143 @@ var Sinatures = function (_a) {
|
|
|
214
314
|
render: function (text, record, index) { return "" + (index + 1); },
|
|
215
315
|
},
|
|
216
316
|
{
|
|
217
|
-
title: '
|
|
218
|
-
|
|
219
|
-
|
|
317
|
+
title: '附件',
|
|
318
|
+
children: [
|
|
319
|
+
{
|
|
320
|
+
title: '类型',
|
|
321
|
+
key: 'attachTypeName',
|
|
322
|
+
dataIndex: 'attachTypeName',
|
|
323
|
+
width: 100,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
title: function () {
|
|
327
|
+
return (React.createElement("div", { className: "seal-file-upload" },
|
|
328
|
+
React.createElement("span", null, "\u540D\u79F0"),
|
|
329
|
+
React.createElement("span", null, isUpload && (React.createElement(Upload, { apiBaseUrl: ZT_API_BASEURL, method: "post", showTable: false, showTip: false, headers: {
|
|
330
|
+
'Zmdms-Auth': authToken,
|
|
331
|
+
}, data: uploadData, authToken: authToken, callback: uploadCallbackFn, originFileList: originFileList, style: { margin: 0 } },
|
|
332
|
+
React.createElement(Button, { type: "link" }, "\u6DFB\u52A0\u9644\u4EF6"))))));
|
|
333
|
+
},
|
|
334
|
+
key: 'attachId',
|
|
335
|
+
dataIndex: 'attachId',
|
|
336
|
+
width: 240,
|
|
337
|
+
render: function (text, record, index) {
|
|
338
|
+
return (React.createElement(React.Fragment, null,
|
|
339
|
+
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 })));
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
],
|
|
220
343
|
},
|
|
221
344
|
{
|
|
222
|
-
title:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
345
|
+
title: '合同',
|
|
346
|
+
key: 'needDg',
|
|
347
|
+
dataIndex: 'needDg',
|
|
348
|
+
children: [
|
|
349
|
+
{
|
|
350
|
+
title: '合同比对模板',
|
|
351
|
+
key: 'templateAttachId',
|
|
352
|
+
dataIndex: 'templateAttachId',
|
|
353
|
+
width: 160,
|
|
354
|
+
render: function (text, record, index) {
|
|
355
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, index: index, openCustomerModalHandle: openCustomerModalHandle, isEdit: isEdit })) : ('');
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
title: '合同比对结果',
|
|
360
|
+
key: 'compareAttachId',
|
|
361
|
+
dataIndex: 'compareAttachId',
|
|
362
|
+
width: 100,
|
|
363
|
+
render: function (text, record, index) {
|
|
364
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request, getTaskId: getTaskId, isEdit: isEdit })) : ('');
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
title: '保存为模版',
|
|
369
|
+
key: 'templateAttachId',
|
|
370
|
+
dataIndex: 'templateAttachId',
|
|
371
|
+
width: 80,
|
|
372
|
+
render: function (text, record, index) {
|
|
373
|
+
return NEED_SAVE_TEMPLATE.includes("" + flowId) ? (React.createElement(Switch, { checked: record.isCustomerReference, disabled: !isEdit, onChange: function (value) {
|
|
374
|
+
return onSwitchChangeHandle(value, 'isCustomerReference', index);
|
|
375
|
+
} })) : ('');
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
],
|
|
239
379
|
},
|
|
240
380
|
{
|
|
241
|
-
title: '
|
|
242
|
-
key: 'templateAttachId',
|
|
243
|
-
dataIndex: 'templateAttachId',
|
|
244
|
-
width: 220,
|
|
245
|
-
render: function (text, record, index) {
|
|
246
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, index: index, openCustomerModalHandle: openCustomerModalHandle, isEdit: isEdit })) : ('');
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
title: '合同比对结果',
|
|
251
|
-
key: 'compareAttachId',
|
|
252
|
-
dataIndex: 'compareAttachId',
|
|
253
|
-
width: 100,
|
|
254
|
-
render: function (text, record, index) {
|
|
255
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request, getTaskId: getTaskId, isEdit: isEdit })) : ('');
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
title: function () {
|
|
260
|
-
return (React.createElement(React.Fragment, null,
|
|
261
|
-
React.createElement("div", null, "\u52A0\u76D6\u7535\u5B50\u5370\u7AE0"),
|
|
262
|
-
records.length !== 0 && (React.createElement("div", null,
|
|
263
|
-
React.createElement("div", null,
|
|
264
|
-
React.createElement(Button, { type: "link", style: __assign({}, (checkSealVisible && isEdit
|
|
265
|
-
? {}
|
|
266
|
-
: { display: 'none' })), size: "small", onClick: checkSealFn }, "\u786E\u8BA4\u76D6\u7AE0")),
|
|
267
|
-
React.createElement("div", null,
|
|
268
|
-
React.createElement(Button, { type: "link", style: __assign({}, (contractId || contract_id ? {} : { display: 'none' })), size: "small", onClick: viewSealPageFn }, "\u67E5\u770B\u76D6\u7AE0\u9875\u9762"))))));
|
|
269
|
-
},
|
|
270
|
-
key: 'isElectronicSeal',
|
|
271
|
-
dataIndex: 'isElectronicSeal',
|
|
272
|
-
render: function (text, record, index) {
|
|
273
|
-
return (React.createElement(Checkbox, { checked: text, disabled: !isEdit, onChange: function (e) {
|
|
274
|
-
return onCheckboxChangeHandle(e, 'isElectronicSeal', index);
|
|
275
|
-
} }, "\u662F"));
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
title: '添加水印',
|
|
381
|
+
title: isEdit ? '添加水印' : '水印',
|
|
280
382
|
key: 'isWatermark',
|
|
281
383
|
dataIndex: 'isWatermark',
|
|
282
|
-
width:
|
|
384
|
+
width: 60,
|
|
283
385
|
render: function (text, record, index) {
|
|
284
|
-
return (React.createElement(
|
|
285
|
-
|
|
286
|
-
|
|
386
|
+
return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
|
|
387
|
+
return onSwitchChangeHandle(value, 'isWatermark', index);
|
|
388
|
+
} }));
|
|
287
389
|
},
|
|
288
390
|
},
|
|
289
391
|
{
|
|
290
392
|
title: '电子印章',
|
|
291
|
-
key: '
|
|
292
|
-
dataIndex: '
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
393
|
+
key: 'needQys',
|
|
394
|
+
dataIndex: 'needQys',
|
|
395
|
+
children: [
|
|
396
|
+
{
|
|
397
|
+
title: '盖电子印章',
|
|
398
|
+
key: 'isElectronicSeal',
|
|
399
|
+
dataIndex: 'isElectronicSeal',
|
|
400
|
+
width: 80,
|
|
401
|
+
render: function (text, record, index) {
|
|
402
|
+
return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
|
|
403
|
+
return onSwitchChangeHandle(value, 'isElectronicSeal', index);
|
|
404
|
+
} }));
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
title: '选择电子印章',
|
|
409
|
+
key: 'electronicSeal',
|
|
410
|
+
dataIndex: 'electronicSeal',
|
|
411
|
+
width: '20%',
|
|
412
|
+
render: function (value, row, index) {
|
|
413
|
+
// 是否有勾选加盖电子印章
|
|
414
|
+
var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
|
|
415
|
+
var obj = {
|
|
416
|
+
children: (React.createElement(ElectronicSeal, { value: electronicSeal, onChange: electronicSealChangeHandle, isEdit: hasElectronicSeal && isEdit, electronicList: electronicList })),
|
|
417
|
+
props: {},
|
|
418
|
+
};
|
|
419
|
+
obj.props['rowSpan'] = index === 0 ? records.length : 0;
|
|
420
|
+
return obj;
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
title: '电子印章设置',
|
|
425
|
+
key: 'setElectronicSeal',
|
|
426
|
+
dataIndex: 'setElectronicSeal',
|
|
427
|
+
width: 95,
|
|
428
|
+
render: function (value, row, index) {
|
|
429
|
+
var Comp = function () {
|
|
430
|
+
return records.length !== 0 ? (React.createElement("div", { style: { height: '100%', paddingTop: '23px' } },
|
|
431
|
+
React.createElement(Button, { type: "link", style: __assign({}, (checkSealVisible && isEdit
|
|
432
|
+
? {}
|
|
433
|
+
: { display: 'none' })), size: "small", onClick: checkSealFn }, "\u6307\u5B9A\u7B7E\u7F72\u4F4D\u7F6E"),
|
|
434
|
+
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));
|
|
435
|
+
};
|
|
436
|
+
var obj = {
|
|
437
|
+
children: React.createElement(Comp, null),
|
|
438
|
+
props: {},
|
|
439
|
+
};
|
|
440
|
+
obj.props['rowSpan'] = index === 0 ? records.length : 0;
|
|
441
|
+
return obj;
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
],
|
|
301
445
|
},
|
|
302
446
|
{
|
|
303
447
|
title: '群杰印章',
|
|
304
448
|
key: 'qunjSeal',
|
|
305
449
|
dataIndex: 'qunjSeal',
|
|
450
|
+
width: 240,
|
|
306
451
|
render: function (value, row, index) {
|
|
307
452
|
var obj = {
|
|
308
|
-
children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle,
|
|
453
|
+
children: (React.createElement(QunjSeal, { value: qunjSeal, onChange: qunjSealChangeHandle, querySealStatus: querySealStatus, ZT_API_BASEURL: ZT_API_BASEURL, isEdit: isEdit, handleRef: handleRef, showContranctNum: showContranctNum, sealList: sealList })),
|
|
309
454
|
props: {},
|
|
310
455
|
};
|
|
311
456
|
obj.props['rowSpan'] = index === 0 ? records.length : 0;
|
|
@@ -322,52 +467,40 @@ var Sinatures = function (_a) {
|
|
|
322
467
|
columnsLast = columnsLast.filter(function (item) { return !['attachTypeName'].includes(item.key); });
|
|
323
468
|
}
|
|
324
469
|
if (!needDg) {
|
|
325
|
-
columnsLast = columnsLast.filter(function (item) {
|
|
326
|
-
return !['attachTypeName', 'templateAttachId', 'compareAttachId'].includes(item.key);
|
|
327
|
-
});
|
|
470
|
+
columnsLast = columnsLast.filter(function (item) { return !['needDg'].includes(item.key); });
|
|
328
471
|
}
|
|
329
472
|
if (!needQys) {
|
|
330
|
-
columnsLast = columnsLast.filter(function (item) {
|
|
331
|
-
return !['isWatermark', 'isElectronicSeal', 'electronicSeal'].includes(item.key);
|
|
332
|
-
});
|
|
473
|
+
columnsLast = columnsLast.filter(function (item) { return !['isWatermark', 'needQys'].includes(item.key); });
|
|
333
474
|
}
|
|
334
475
|
// 上传组件的数据
|
|
335
|
-
var
|
|
476
|
+
var _q = useState(), originFileList = _q[0], setOriginFileList = _q[1];
|
|
336
477
|
/** 签章组件onChange事件 */
|
|
337
478
|
var sigValuesChange = function (type, value) {
|
|
338
479
|
var _a, _b;
|
|
339
480
|
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
481
|
Reflect.deleteProperty(info, type);
|
|
341
482
|
info[type] = value;
|
|
342
|
-
return info;
|
|
483
|
+
return __assign(__assign({}, otherParams), info);
|
|
343
484
|
};
|
|
344
485
|
// 是否存入样板 添加水印 电子印章发生改变触发事件
|
|
345
|
-
function
|
|
486
|
+
function onSwitchChangeHandle(value, type, index) {
|
|
346
487
|
if (type === 'isElectronicSeal') {
|
|
347
488
|
var hasElecSeal = records.filter(function (item) { return item.isElectronicSeal; });
|
|
348
489
|
// 勾选加盖电子印章后 显示确认盖章按钮
|
|
349
|
-
setCheckSealVisible(
|
|
490
|
+
setCheckSealVisible(value ? true : hasElecSeal.length > 1 ? true : false);
|
|
491
|
+
// 去除加盖电子印章勾选时 清除合同id 等之前的信息
|
|
492
|
+
if (!value) {
|
|
493
|
+
setSealedIds(__spreadArray([], sealedIds));
|
|
494
|
+
setContractId('');
|
|
495
|
+
setAttachMap(null);
|
|
496
|
+
setDocumentIds([]);
|
|
497
|
+
}
|
|
350
498
|
}
|
|
351
499
|
setRecords(function (preRecords) {
|
|
352
500
|
var _a;
|
|
353
501
|
var newRecords = preRecords.slice();
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
// message.info('请先选择是否加盖电子印章!');
|
|
357
|
-
// return newRecords;
|
|
358
|
-
// }
|
|
359
|
-
// 取消勾选电子印章时 不可添加水印
|
|
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));
|
|
502
|
+
newRecords.splice(index, 1, __assign(__assign({}, newRecords[index]), (_a = {}, _a[type] = value ? 1 : 0, _a)));
|
|
503
|
+
onSigValuesChange(sigValuesChange('fileList', newRecords));
|
|
371
504
|
return newRecords;
|
|
372
505
|
});
|
|
373
506
|
}
|
|
@@ -403,14 +536,14 @@ var Sinatures = function (_a) {
|
|
|
403
536
|
function qunjSealChangeHandle(value) {
|
|
404
537
|
qunjSealChange && qunjSealChange(value);
|
|
405
538
|
setQunjSeal(value);
|
|
406
|
-
onSigValuesChange
|
|
539
|
+
onSigValuesChange(sigValuesChange('qunjSeal', value));
|
|
407
540
|
}
|
|
408
541
|
/** 电子印章修改 */
|
|
409
542
|
function electronicSealChangeHandle(value) {
|
|
410
543
|
electronicSealChange && electronicSealChange(value);
|
|
411
544
|
setElectronicSeal(value);
|
|
412
|
-
onSigValuesChange
|
|
413
|
-
|
|
545
|
+
onSigValuesChange(sigValuesChange('electronicSealIdList', value));
|
|
546
|
+
isSure && setIsSure(false);
|
|
414
547
|
}
|
|
415
548
|
/**
|
|
416
549
|
* 暴露方法给外部调用
|
|
@@ -445,7 +578,25 @@ var Sinatures = function (_a) {
|
|
|
445
578
|
},
|
|
446
579
|
/** 签章组件相关校验 */
|
|
447
580
|
validateSealFn: function () {
|
|
448
|
-
var _a;
|
|
581
|
+
var _a, _b;
|
|
582
|
+
// 确认盖章后 勾选的信息有更改
|
|
583
|
+
if (needQys &&
|
|
584
|
+
((_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) &&
|
|
585
|
+
!isSure) {
|
|
586
|
+
Modal.confirm({
|
|
587
|
+
title: '当前所勾选的电子印章信息与上一次盖章时有差异,请确认是否继续?',
|
|
588
|
+
okText: '是',
|
|
589
|
+
okType: 'danger',
|
|
590
|
+
cancelText: '否',
|
|
591
|
+
onOk: function () {
|
|
592
|
+
setIsSure(true);
|
|
593
|
+
},
|
|
594
|
+
onCancel: function () {
|
|
595
|
+
setIsSure(false);
|
|
596
|
+
},
|
|
597
|
+
});
|
|
598
|
+
return false;
|
|
599
|
+
}
|
|
449
600
|
// 是否有勾选加盖电子印章
|
|
450
601
|
var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
|
|
451
602
|
// 勾选加盖电子印章时未勾选电子印章
|
|
@@ -470,7 +621,7 @@ var Sinatures = function (_a) {
|
|
|
470
621
|
return false;
|
|
471
622
|
}
|
|
472
623
|
// 勾选的群杰印章 没有填用印次数
|
|
473
|
-
if (((
|
|
624
|
+
if (((_b = innerQunjSeal === null || innerQunjSeal === void 0 ? void 0 : innerQunjSeal.details) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
474
625
|
innerQunjSeal.details.forEach(function (item) {
|
|
475
626
|
if (!item.sealCount) {
|
|
476
627
|
message.warning("\u8BF7\u586B\u5199" + item.sealName + " \u7684\u7528\u5370\u6B21\u6570\uFF01");
|
|
@@ -488,7 +639,22 @@ var Sinatures = function (_a) {
|
|
|
488
639
|
return true;
|
|
489
640
|
},
|
|
490
641
|
}); });
|
|
491
|
-
|
|
492
|
-
|
|
642
|
+
var detail = {
|
|
643
|
+
contractId: contract_id,
|
|
644
|
+
records: records,
|
|
645
|
+
electronicSealIdList: electronicSeal,
|
|
646
|
+
qunjSeal: qunjSeal,
|
|
647
|
+
ZT_API_BASEURL: ZT_API_BASEURL,
|
|
648
|
+
ZT_FILE_BASEURL: ZT_FILE_BASEURL,
|
|
649
|
+
token: token,
|
|
650
|
+
viewSealPageFn: viewSealPageFn,
|
|
651
|
+
electronicList: electronicList,
|
|
652
|
+
sealList: sealList,
|
|
653
|
+
querySealStatus: querySealStatus,
|
|
654
|
+
flow_status: FLOW_STATUS[flowStatus],
|
|
655
|
+
needQj: needQj,
|
|
656
|
+
needQys: needQys,
|
|
657
|
+
};
|
|
658
|
+
return (React.createElement(React.Fragment, null, isEdit ? (React.createElement(Table, { columns: columnsLast, rowKey: "attachId", dataSource: records, scroll: { x: 'max-content' } })) : (React.createElement(DetailTable, __assign({}, detail)))));
|
|
493
659
|
};
|
|
494
660
|
export default Sinatures;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,6 @@ export { default as UploadSingle } from './components/UploadSingle';
|
|
|
47
47
|
export { default as CodeQuery } from './components/business/CodeQuery';
|
|
48
48
|
export { default as DgColumns } from './components/business/DgColumns';
|
|
49
49
|
export { default as message } from './components/basic/message';
|
|
50
|
-
export { ConfigProvider, Drawer, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, } from 'antd';
|
|
50
|
+
export { ConfigProvider, Drawer, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, notification, } from 'antd';
|
|
51
51
|
export { default as zhCN } from 'antd/lib/locale/zh_CN';
|
|
52
52
|
export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
|
package/dist/index.js
CHANGED
|
@@ -161,6 +161,6 @@ export { default as UploadSingle } from './components/UploadSingle';
|
|
|
161
161
|
export { default as CodeQuery } from './components/business/CodeQuery';
|
|
162
162
|
export { default as DgColumns } from './components/business/DgColumns';
|
|
163
163
|
export { default as message } from './components/basic/message';
|
|
164
|
-
export { ConfigProvider, Drawer, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, } from 'antd';
|
|
164
|
+
export { ConfigProvider, Drawer, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tooltip, Descriptions, Image, Popover, Breadcrumb, Transfer, Row, Col, notification, } from 'antd';
|
|
165
165
|
export { default as zhCN } from 'antd/lib/locale/zh_CN';
|
|
166
166
|
export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
|