ztxkui 3.1.15 → 3.1.16
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/DemoCom/SinaturesDemo.js +55 -34
- package/dist/components/business/Signatures/components/CompareResult.d.ts +0 -1
- package/dist/components/business/Signatures/components/CompareResult.js +33 -20
- package/dist/components/business/Signatures/components/ElectronicSeal.d.ts +4 -1
- package/dist/components/business/Signatures/components/ElectronicSeal.js +27 -5
- package/dist/components/business/Signatures/components/QunjSeal.d.ts +6 -1
- package/dist/components/business/Signatures/components/QunjSeal.js +37 -14
- package/dist/components/business/Signatures/components/SealCheckbox.d.ts +5 -1
- package/dist/components/business/Signatures/components/SealCheckbox.js +27 -10
- package/dist/components/business/Signatures/components/TemplateAttach.d.ts +1 -5
- package/dist/components/business/Signatures/components/TemplateAttach.js +38 -19
- package/dist/components/business/Signatures/hooks.js +1 -1
- package/dist/components/business/Signatures/index.js +154 -71
- package/dist/components/business/Signatures/props.d.ts +28 -17
- package/dist/{DemoCom/Template.d.ts → components/business/Template/index.d.ts} +3 -0
- package/dist/{DemoCom/Template.js → components/business/Template/index.js} +41 -33
- package/dist/index.css +10 -8
- package/dist/index.css.map +1 -1
- package/package.json +95 -95
|
@@ -52,22 +52,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
52
52
|
import React, { useRef, useState } from 'react';
|
|
53
53
|
// redux
|
|
54
54
|
// ztxkui公共组件
|
|
55
|
-
import { Sinatures } from '../index';
|
|
56
|
-
import Template from './Template';
|
|
55
|
+
import { Sinatures, Template } from '../index';
|
|
57
56
|
import { stringify } from 'qs';
|
|
58
57
|
// 路由配置
|
|
59
58
|
// store
|
|
60
59
|
// 自定义组件
|
|
61
60
|
// 其他文件
|
|
62
61
|
var ZT_API_BASEURL = 'http://192.168.0.83:8000';
|
|
63
|
-
var token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
62
|
+
var token = 'bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoi5ZGo54Sw5rW3IiwiZW1wX25hbWUiOiLlkajnhLDmtbciLCJlbXBfbnVtYmVyIjoiWUcyMjA1MDAyIiwiaW10X2lkIjpudWxsLCJyZWFsX25hbWUiOiLlkajnhLDmtbciLCJjbGllbnRfdHlwZSI6IndlYiIsImRhdGFfcm9sZV9pZCI6IjEzNDU5Nzg1MDUzMDIwNTY5NjIsMTQ2ODAzNTM1MTYyNTI4NTYzNCIsImNsaWVudF9pZCI6InN3b3JkIiwidXNlcl90eXBlIjoid2ViIiwicm9sZV9pZCI6IjE0NDY4MTk0NjM2OTM4NDQ0ODIsMTQ2NzAxNTk3NTQ4NDc2MDA2NiwxNDY4MDM0NDM3MTU3OTYxNzI5IiwicG9zdF9uYW1lIjpudWxsLCJzY29wZSI6WyJhbGwiXSwiaW50ZXJ2aWV3X2lkIjpudWxsLCJleHAiOjE2NTc3ODQyNDEsIm9yZ19uYW1lIjoi5rWZ5ZWG5Lit5ouT6ZuG5Zui6IKh5Lu95pyJ6ZmQ5YWs5Y-4IiwianRpIjoiYmVjNGJkZGItODM3MC00MGM2LThlNzYtZDQ4YWJiODFlMmMxIiwibWVtYmVyX2lkIjoxNTI2MTEwOTQ1Mjk4MjcyMjU3LCJjb21wYW55X2lkIjoxNDE1ODM3OTkxNzAxMDM3MDU3LCJzeXN0ZW1faWQiOiIzIiwiZGVwdF9uYW1lIjoi5rWZ5ZWG5Lit5ouTLeW3peeoi-mFjemAgeS6jOmDqCIsImF2YXRhciI6IiIsImRhdGFfcm9sZV9uYW1lIjoiYWRtaW4sYWRtaW4iLCJhdXRob3JpdGllcyI6WyJhZG1pbiIsInVzZXIiLCJhZG1pbmlzdHJhdG9yIl0sInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3IsdXNlcixhZG1pbiIsInJlc3VtZV90ZW1wbGF0ZSI6bnVsbCwibGljZW5zZSI6InBvd2VyZWQgYnkgem1kbXMiLCJwb3N0X2lkIjoiIiwidXNlcl9pZCI6IjE1MjYxMTEzMTgwNDYwNjg3MzciLCJvcmdfaWQiOjE0NTc1Mjc3NjU5MTg1MTUyMDEsIm5pY2tfbmFtZSI6IuWRqOeEsOa1tyIsImNvbXBhbnlfbmFtZSI6Iua1meWVhuS4reaLk-mbhuWbouiCoeS7veaciemZkOWFrOWPuCIsImRlcHRfaWQiOiIxNDE0ODUyODQ3MDM1MDAyODgxIiwiaGFuZGxlX2hyX25hbWUiOm51bGwsImFjY291bnQiOiLlkajnhLDmtbciLCJyZXN1bWVfaWQiOm51bGx9.GkDpjLcI1-1X2zI3MLj9XQyRXb25uaQAA_T8eKLa66w';
|
|
64
63
|
/**
|
|
65
64
|
* @description 封装请求方法
|
|
66
65
|
*/
|
|
67
|
-
function myRequest(
|
|
66
|
+
function myRequest(options) {
|
|
68
67
|
var _this = this;
|
|
69
|
-
|
|
70
|
-
if (method === void 0) { method = 'GET'; }
|
|
68
|
+
var url = options.url, _a = options.method, method = _a === void 0 ? 'GET' : _a, _b = options.params, params = _b === void 0 ? null : _b, _c = options.data, data = _c === void 0 ? null : _c;
|
|
71
69
|
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
72
70
|
var headers, config, response, error_1;
|
|
73
71
|
return __generator(this, function (_a) {
|
|
@@ -90,20 +88,28 @@ function myRequest(url, params, method) {
|
|
|
90
88
|
method: method,
|
|
91
89
|
headers: __assign({ 'Content-Type': 'application/json', Authorization: 'Basic c3dvcmQ6c3dvcmRfc2VjcmV0' }, config.headers),
|
|
92
90
|
};
|
|
93
|
-
if (
|
|
94
|
-
config = __assign(__assign({}, config), { body: JSON.stringify(
|
|
91
|
+
if (data) {
|
|
92
|
+
config = __assign(__assign({}, config), { body: JSON.stringify(data) });
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
_a.label = 1;
|
|
98
96
|
case 1:
|
|
99
97
|
_a.trys.push([1, 3, , 4]);
|
|
100
|
-
return [4 /*yield*/, fetch(
|
|
98
|
+
return [4 /*yield*/, fetch("" + ZT_API_BASEURL + url, __assign({}, config))];
|
|
101
99
|
case 2:
|
|
102
100
|
response = _a.sent();
|
|
103
101
|
response
|
|
104
102
|
.json()
|
|
105
103
|
.then(function (res) {
|
|
106
|
-
|
|
104
|
+
var result = {
|
|
105
|
+
status: res.code,
|
|
106
|
+
data: {
|
|
107
|
+
code: res.code,
|
|
108
|
+
data: res.data,
|
|
109
|
+
msg: res.msg,
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
resolve(result);
|
|
107
113
|
})
|
|
108
114
|
.catch(function (error) {
|
|
109
115
|
reject(error);
|
|
@@ -118,6 +124,7 @@ function myRequest(url, params, method) {
|
|
|
118
124
|
});
|
|
119
125
|
}); });
|
|
120
126
|
}
|
|
127
|
+
/** 已选择的附件列表 */
|
|
121
128
|
var list = [
|
|
122
129
|
{
|
|
123
130
|
attachId: '1326475920778194945',
|
|
@@ -137,37 +144,26 @@ var list = [
|
|
|
137
144
|
templateAttachName: '模板文件1.jpg',
|
|
138
145
|
},
|
|
139
146
|
];
|
|
140
|
-
|
|
141
|
-
{ dictKey: '001', dictValue: '合同本身' },
|
|
142
|
-
{ dictKey: '002', dictValue: '担保文件' },
|
|
143
|
-
{ dictKey: '003', dictValue: '客户资信资料' },
|
|
144
|
-
{ dictKey: '004', dictValue: '纪要' },
|
|
145
|
-
{ dictKey: '005', dictValue: '授权类' },
|
|
146
|
-
];
|
|
147
|
-
var qunjSealList = [
|
|
148
|
-
{ name: '浙商中拓集团股份有限公司合同章' },
|
|
149
|
-
{ name: '浙江中拓供应链管理有限公司合同章' },
|
|
150
|
-
];
|
|
147
|
+
/** 已选中群杰印章信息 */
|
|
151
148
|
var qunjSeal = {
|
|
152
149
|
code: '222',
|
|
153
150
|
contractNum: 4444,
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
isTakeOut: '1',
|
|
152
|
+
details: [
|
|
156
153
|
{
|
|
157
|
-
|
|
154
|
+
sealName: '浙商中拓(物流金融业务专用章)',
|
|
155
|
+
sealNo: '2021030911448826',
|
|
156
|
+
sealCount: 2,
|
|
158
157
|
},
|
|
159
158
|
{
|
|
160
|
-
|
|
159
|
+
sealName: '浙商中拓集团(湖南)有限公司合同专用章(杭州)',
|
|
160
|
+
sealNo: '202003041053255P',
|
|
161
|
+
sealCount: 3,
|
|
161
162
|
},
|
|
162
163
|
],
|
|
163
164
|
};
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
{ name: '浙商/浙江中拓法人签字章', id: '2980019871597904544' },
|
|
167
|
-
];
|
|
168
|
-
var electronicSeal = [
|
|
169
|
-
{ name: '浙商中拓集团(上海)合同专用章', id: '2980019783467188885' },
|
|
170
|
-
];
|
|
165
|
+
/** 已勾选的契约锁印章id列表 */
|
|
166
|
+
var electronicSeal = ['2969500030189355150'];
|
|
171
167
|
var SinaturesDemo = function () {
|
|
172
168
|
var _a = useState(0), rIndex = _a[0], setRIndex = _a[1];
|
|
173
169
|
var openCustomerModalHandle = function (index) {
|
|
@@ -177,9 +173,34 @@ var SinaturesDemo = function () {
|
|
|
177
173
|
};
|
|
178
174
|
var handleRef = useRef({});
|
|
179
175
|
var templateRef = useRef({});
|
|
176
|
+
/** 是否可编辑 1可编辑 0不可编辑 */
|
|
177
|
+
var canEdit = 1;
|
|
178
|
+
/** 是否展示添加附件按钮 0不展示 1展示 */
|
|
179
|
+
var showAddBtn = 0;
|
|
180
|
+
var params = {
|
|
181
|
+
needQj: 1,
|
|
182
|
+
needDg: 1,
|
|
183
|
+
needQys: 1,
|
|
184
|
+
isUpload: !!showAddBtn && !!canEdit,
|
|
185
|
+
fileList: list,
|
|
186
|
+
qunjSeal: qunjSeal,
|
|
187
|
+
electronicSeal: electronicSeal,
|
|
188
|
+
ZT_API_BASEURL: ZT_API_BASEURL,
|
|
189
|
+
ZT_FILE_BASEURL: 'http://192.168.0.83:88',
|
|
190
|
+
token: token,
|
|
191
|
+
flowId: 1231231,
|
|
192
|
+
deptId: '1262999321077198849',
|
|
193
|
+
canEdit: canEdit,
|
|
194
|
+
caseId: 'bf21be574ce741398e8f0769b61ac983',
|
|
195
|
+
contractId: '2982140578506318463',
|
|
196
|
+
docAttachMap: {},
|
|
197
|
+
checkAttachIdList: [],
|
|
198
|
+
documentIdList: [],
|
|
199
|
+
};
|
|
180
200
|
return (React.createElement("div", null,
|
|
181
|
-
React.createElement(Sinatures, {
|
|
182
|
-
React.createElement(Template, { handleRef: handleRef, rIndex: rIndex, templateRef: templateRef
|
|
201
|
+
React.createElement(Sinatures, __assign({ openCustomerModalHandle: openCustomerModalHandle, handleRef: handleRef, request: myRequest }, params)),
|
|
202
|
+
React.createElement(Template, { handleRef: handleRef, rIndex: rIndex, templateRef: templateRef, request: myRequest, deptId: "1262999321077198849", memberId: "3334" // 客商id
|
|
203
|
+
}),
|
|
183
204
|
React.createElement("button", { onClick: function () {
|
|
184
205
|
var _a;
|
|
185
206
|
console.log((_a = handleRef.current) === null || _a === void 0 ? void 0 : _a.getData());
|
|
@@ -2,35 +2,48 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description 合同比对结果
|
|
4
4
|
*/
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
6
|
// redux
|
|
7
7
|
// ztxkui公共组件
|
|
8
8
|
import { Button, message } from '../../../../index';
|
|
9
9
|
import { previewFile } from '../utils';
|
|
10
|
-
// 路由配置
|
|
11
|
-
// store
|
|
12
|
-
// 自定义组件
|
|
13
|
-
import AttachOperation from './AttachOperation';
|
|
14
10
|
var CompareResult = function (_a) {
|
|
15
|
-
var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, index = _a.index,
|
|
11
|
+
var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, index = _a.index, request = _a.request;
|
|
12
|
+
// 设置查看比对结果按钮的loading状态
|
|
13
|
+
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
16
14
|
var onClickHandle = function () {
|
|
17
15
|
console.log('查看比对结果', index, record);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
setLoading(true);
|
|
17
|
+
try {
|
|
18
|
+
var task_id_1 = record.taskId;
|
|
19
|
+
if (task_id_1) {
|
|
20
|
+
// 比对任务状态查询
|
|
21
|
+
request({
|
|
22
|
+
url: "/api/zmdms-resource/seal/query-compare-task/" + task_id_1,
|
|
23
|
+
method: 'GET',
|
|
24
|
+
}).then(function (res) {
|
|
25
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
26
|
+
var url = ZT_API_BASEURL + "/zmdms-resource/seal/download-compare-file/" + task_id_1 + "?Zmdms-Auth=" + token + "&fullfilename=1.zip";
|
|
27
|
+
// 比对文件下载
|
|
28
|
+
previewFile(ZT_FILE_BASEURL, url);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
message.error(res.data.msg || '出错了');
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
message.info('缺少taskId');
|
|
37
|
+
}
|
|
26
38
|
}
|
|
27
|
-
|
|
28
|
-
|
|
39
|
+
catch (err) {
|
|
40
|
+
//
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
setLoading(false);
|
|
29
44
|
}
|
|
30
45
|
};
|
|
31
|
-
return (React.createElement(
|
|
32
|
-
React.createElement(
|
|
33
|
-
React.createElement(Button, { type: "link", onClick: onClickHandle }, "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C")),
|
|
34
|
-
(record === null || record === void 0 ? void 0 : record.compareAttachId) && (React.createElement(AttachOperation, { ZT_API_BASEURL: ZT_API_BASEURL, ZT_FILE_BASEURL: ZT_FILE_BASEURL, token: token, attachId: record === null || record === void 0 ? void 0 : record.compareAttachId, attachName: record === null || record === void 0 ? void 0 : record.compareAttachName, attachSize: record === null || record === void 0 ? void 0 : record.compareAttachSize }))));
|
|
46
|
+
return (React.createElement(React.Fragment, null,
|
|
47
|
+
React.createElement(Button, { type: "link", onClick: onClickHandle, loading: loading }, "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C")));
|
|
35
48
|
};
|
|
36
49
|
export default CompareResult;
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
interface IProps {
|
|
7
|
-
electronicList?: any[];
|
|
8
7
|
value?: any;
|
|
9
8
|
onChange?: any;
|
|
9
|
+
request?: any;
|
|
10
|
+
flowId: number;
|
|
11
|
+
deptId: any;
|
|
12
|
+
isEdit: boolean;
|
|
10
13
|
}
|
|
11
14
|
declare const ElectronicSeal: React.FC<IProps>;
|
|
12
15
|
export default ElectronicSeal;
|
|
@@ -2,15 +2,37 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description
|
|
4
4
|
*/
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
6
|
// redux
|
|
7
7
|
// ztxkui公共组件
|
|
8
|
-
import { Checkbox } from '../../../../index';
|
|
8
|
+
import { Checkbox, message } from '../../../../index';
|
|
9
9
|
var ElectronicSeal = function (_a) {
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
var value = _a.value, onChange = _a.onChange, request = _a.request, flowId = _a.flowId, deptId = _a.deptId, isEdit = _a.isEdit;
|
|
11
|
+
var _b = useState([]), electronicList = _b[0], setElectronicList = _b[1];
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
var params = {
|
|
14
|
+
deptId: deptId,
|
|
15
|
+
};
|
|
16
|
+
if (flowId) {
|
|
17
|
+
params.flowId = flowId;
|
|
18
|
+
}
|
|
19
|
+
request({
|
|
20
|
+
url: '/api/zmdms-resource/flowdeptseal/page',
|
|
21
|
+
params: params,
|
|
22
|
+
method: 'GET',
|
|
23
|
+
}).then(function (res) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
26
|
+
setElectronicList((_b = (_a = res.data.data) === null || _a === void 0 ? void 0 : _a.records[0]) === null || _b === void 0 ? void 0 : _b.sealInfoList);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
message.error(res.data.msg || '出错了');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}, [request, flowId, deptId]);
|
|
33
|
+
return (React.createElement(Checkbox.Group, { defaultValue: value, onChange: onChange, className: "flex-checkbox-group", disabled: !isEdit }, Array.isArray(electronicList) &&
|
|
12
34
|
electronicList.map(function (item) {
|
|
13
|
-
return (React.createElement(Checkbox, { key: item.
|
|
35
|
+
return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
|
|
14
36
|
})));
|
|
15
37
|
};
|
|
16
38
|
export default ElectronicSeal;
|
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
interface IProps {
|
|
7
|
-
sealList?: any[];
|
|
8
7
|
value?: any;
|
|
9
8
|
onChange?: any;
|
|
9
|
+
request?: any;
|
|
10
|
+
flowId: number;
|
|
11
|
+
caseId: string;
|
|
12
|
+
ZT_API_BASEURL: string;
|
|
13
|
+
isEdit: boolean;
|
|
14
|
+
handleRef?: any;
|
|
10
15
|
}
|
|
11
16
|
declare const QunjSeal: React.FC<IProps>;
|
|
12
17
|
export default QunjSeal;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description
|
|
4
4
|
*/
|
|
5
|
-
import React, { useEffect } from 'react';
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
6
|
// redux
|
|
7
7
|
// ztxkui公共组件
|
|
8
|
-
import { Form, Input, InputNumber, SearchContainer, Radio, Button, } from '../../../../index';
|
|
8
|
+
import { Form, Input, InputNumber, SearchContainer, Radio, Button, message, } from '../../../../index';
|
|
9
9
|
// 路由配置
|
|
10
10
|
// store
|
|
11
11
|
// 自定义组件
|
|
@@ -13,13 +13,36 @@ import { SealCheckboxGroup } from './SealCheckbox';
|
|
|
13
13
|
// 其他文件
|
|
14
14
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
15
15
|
var QunjSeal = function (_a) {
|
|
16
|
-
var value = _a.value, onChange = _a.onChange,
|
|
16
|
+
var value = _a.value, onChange = _a.onChange, request = _a.request, flowId = _a.flowId, caseId = _a.caseId, ZT_API_BASEURL = _a.ZT_API_BASEURL, isEdit = _a.isEdit, handleRef = _a.handleRef;
|
|
17
17
|
var form = Form.useForm()[0];
|
|
18
|
+
var _b = useState([]), sealList = _b[0], setSealList = _b[1];
|
|
19
|
+
useEffect(function () {
|
|
20
|
+
request({
|
|
21
|
+
url: "/api/zmdms-resource/flowqjuse/query-qj-seal-list/" + flowId,
|
|
22
|
+
method: 'GET',
|
|
23
|
+
}).then(function (res) {
|
|
24
|
+
var _a;
|
|
25
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
26
|
+
setSealList((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.map(function (item, index) { return ({
|
|
27
|
+
sealName: item.sealName,
|
|
28
|
+
sealNo: item.sealNo,
|
|
29
|
+
}); }));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
message.error(res.data.msg || '出错了');
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, [request, flowId]);
|
|
18
36
|
useEffect(function () {
|
|
19
37
|
if (value) {
|
|
20
38
|
form.setFieldsValue(value);
|
|
21
39
|
}
|
|
22
40
|
}, [value, form]);
|
|
41
|
+
/** 查询用印状态 */
|
|
42
|
+
var querySealStatus = function () {
|
|
43
|
+
var url = ZT_API_BASEURL + "/api/zmdms-esb-outer/outer/qj/view-stamp?caseId=" + caseId + "&systemId=1493475945847648257";
|
|
44
|
+
window.open(url);
|
|
45
|
+
};
|
|
23
46
|
var onSealCheckboxHandle = function (sealList) {
|
|
24
47
|
form.setFieldsValue({
|
|
25
48
|
sealList: sealList,
|
|
@@ -31,16 +54,16 @@ var QunjSeal = function (_a) {
|
|
|
31
54
|
return (React.createElement(Form, { form: form, onValuesChange: onValuesChangeHandle },
|
|
32
55
|
React.createElement(SearchContainer, null,
|
|
33
56
|
React.createElement(SearchLeft, null,
|
|
34
|
-
React.createElement(Item, { name: "
|
|
35
|
-
React.createElement(Input, {
|
|
36
|
-
React.createElement(Item, { name: "
|
|
37
|
-
React.createElement(InputNumber, {
|
|
38
|
-
React.createElement(Button, { type: "primary", size: "small", style: { marginLeft: '6px' } }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001"),
|
|
39
|
-
React.createElement(Item, { name: "
|
|
40
|
-
React.createElement(Radio.Group, { style: { padding: '0 6px' } },
|
|
41
|
-
React.createElement(Radio, { value:
|
|
42
|
-
React.createElement(Radio, { value:
|
|
43
|
-
React.createElement(Item, { name: "
|
|
44
|
-
React.createElement(SealCheckboxGroup, { sealList: sealList, onChange: onSealCheckboxHandle }))))));
|
|
57
|
+
React.createElement(Item, { name: "vertifyCode", label: "\u7FA4\u6770\u9A8C\u8BC1\u7801", width: "all" },
|
|
58
|
+
React.createElement(Input, { disabled: true })),
|
|
59
|
+
React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all" },
|
|
60
|
+
React.createElement(InputNumber, { disabled: !isEdit, min: 0 })),
|
|
61
|
+
React.createElement(Button, { type: "primary", size: "small", style: { marginLeft: '6px' }, onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001"),
|
|
62
|
+
React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "all" },
|
|
63
|
+
React.createElement(Radio.Group, { style: { padding: '0 6px' }, disabled: !isEdit },
|
|
64
|
+
React.createElement(Radio, { value: 0 }, "\u5185\u90E8\u7528\u5370"),
|
|
65
|
+
React.createElement(Radio, { value: 1 }, "\u5916\u90E8\u7528\u5370"))),
|
|
66
|
+
React.createElement(Item, { name: "details", label: "", noBorder: true, width: "all", style: { height: '200px', overflowY: 'auto', overflowX: 'hidden' } },
|
|
67
|
+
React.createElement(SealCheckboxGroup, { sealList: sealList, onChange: onSealCheckboxHandle, handleRef: handleRef }))))));
|
|
45
68
|
};
|
|
46
69
|
export default QunjSeal;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
interface IProps {
|
|
7
7
|
name: string;
|
|
8
|
+
id: string;
|
|
8
9
|
value?: any;
|
|
9
10
|
onChange?: any;
|
|
10
11
|
}
|
|
@@ -14,8 +15,11 @@ interface ISealProps {
|
|
|
14
15
|
onChange?: any;
|
|
15
16
|
/** 所有印章列表 */
|
|
16
17
|
sealList?: {
|
|
17
|
-
|
|
18
|
+
sealName: string;
|
|
19
|
+
sealNo: string;
|
|
20
|
+
sealCount: number;
|
|
18
21
|
}[];
|
|
22
|
+
handleRef?: any;
|
|
19
23
|
}
|
|
20
24
|
declare const SealCheckboxGroup: React.FC<ISealProps>;
|
|
21
25
|
export { SealCheckboxGroup };
|
|
@@ -19,38 +19,55 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
19
19
|
* @description
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
+
import sumBy from 'lodash/sumBy';
|
|
22
23
|
// redux
|
|
23
24
|
// ztxkui公共组件
|
|
24
25
|
import { Checkbox, InputNumber } from '../../../../index';
|
|
26
|
+
import { message } from 'antd';
|
|
25
27
|
var SealCheckbox = function (_a) {
|
|
26
|
-
var name = _a.name, value = _a.value, onChange = _a.onChange;
|
|
28
|
+
var name = _a.name, id = _a.id, value = _a.value, onChange = _a.onChange;
|
|
27
29
|
var onCheckboxChange = function (e) {
|
|
28
30
|
onChange &&
|
|
29
|
-
onChange(__assign(__assign({}, (value || {})), {
|
|
31
|
+
onChange(__assign(__assign({}, (value || {})), { sealName: e.target.checked ? name : null, sealNo: e.target.checked ? id : null }));
|
|
30
32
|
};
|
|
31
|
-
var onNumberChange = function (
|
|
32
|
-
onChange && onChange(__assign(__assign({}, (value || {})), {
|
|
33
|
+
var onNumberChange = function (sealCount) {
|
|
34
|
+
onChange && onChange(__assign(__assign({}, (value || {})), { sealCount: sealCount }));
|
|
33
35
|
};
|
|
34
36
|
return (React.createElement("div", { style: { padding: '0 6px' } },
|
|
35
|
-
React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.
|
|
37
|
+
React.createElement(Checkbox, { onChange: onCheckboxChange, checked: value && value.sealName ? true : false }, name),
|
|
36
38
|
React.createElement("div", null,
|
|
37
|
-
React.createElement("span", null, "\u7528\u5370\u6B21\u6570"),
|
|
38
|
-
React.createElement(InputNumber, { bordered: false, size: "small", value: value && value.
|
|
39
|
+
React.createElement("span", null, "\u7528\u5370\u6B21\u6570\uFF1A"),
|
|
40
|
+
React.createElement(InputNumber, { bordered: false, size: "small", value: value && value.sealCount ? value.sealCount : undefined, onChange: onNumberChange, style: { borderBottom: '1px solid #e9ecf3' } }))));
|
|
39
41
|
};
|
|
40
42
|
var SealCheckboxGroup = function (_a) {
|
|
41
|
-
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList;
|
|
43
|
+
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList, handleRef = _a.handleRef;
|
|
42
44
|
var onChangeHandle = function (_value, index) {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
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;
|
|
43
47
|
var valueArr = Array.isArray(value) ? __spreadArray([], value) : [];
|
|
44
48
|
valueArr.splice(index, 1, _value);
|
|
49
|
+
var totalSealNum = sumBy(valueArr, 'sealCount');
|
|
45
50
|
onChange && onChange(valueArr);
|
|
51
|
+
if (totalSealNum > contractNum * 4) {
|
|
52
|
+
message.warning('您的用印次数远超超过合理次数范围,请修改。');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (totalSealNum > contractNum * 3) {
|
|
56
|
+
message.warning('您的用印次数超过合理次数范围,请慎重确认!');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (totalSealNum > contractNum * 2) {
|
|
60
|
+
message.warning('您的用印次数已超过2倍合同数量,请确认用印数量是否正确。');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
46
63
|
};
|
|
47
64
|
return (React.createElement("div", null, Array.isArray(sealList) &&
|
|
48
65
|
sealList.map(function (item, index) {
|
|
49
66
|
var itemValue = {};
|
|
50
67
|
if (Array.isArray(value)) {
|
|
51
|
-
itemValue = value.find(function (valueItem) { return valueItem.
|
|
68
|
+
itemValue = value.find(function (valueItem) { return valueItem.sealName === item.sealName; });
|
|
52
69
|
}
|
|
53
|
-
return (React.createElement(SealCheckbox, { key: item === null || item === void 0 ? void 0 : item.
|
|
70
|
+
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, onChange: function (value) {
|
|
54
71
|
onChangeHandle(value, index);
|
|
55
72
|
} }));
|
|
56
73
|
})));
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 陈亚雄
|
|
3
|
-
* @description 合同模板
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
2
|
interface IProps {
|
|
7
3
|
record: any;
|
|
@@ -11,9 +7,9 @@ interface IProps {
|
|
|
11
7
|
index: number;
|
|
12
8
|
/** 点击客户样板 */
|
|
13
9
|
openCustomerModalHandle?: any;
|
|
14
|
-
compareTaskUrl?: string;
|
|
15
10
|
getTaskId: (id: any, index: number) => void;
|
|
16
11
|
request?: any;
|
|
12
|
+
isEdit: boolean;
|
|
17
13
|
}
|
|
18
14
|
declare const TemplateAttach: React.FC<IProps>;
|
|
19
15
|
export default TemplateAttach;
|
|
@@ -2,35 +2,54 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description 合同模板
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import { message } from 'antd';
|
|
6
|
+
import React, { useState } from 'react';
|
|
6
7
|
// redux
|
|
7
8
|
// ztxkui公共组件
|
|
8
9
|
import { Button } from '../../../../index';
|
|
9
|
-
// 路由配置
|
|
10
|
-
// store
|
|
11
|
-
// 自定义组件
|
|
12
|
-
import AttachOperation from './AttachOperation';
|
|
13
10
|
var TemplateAttach = function (_a) {
|
|
14
|
-
var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index,
|
|
11
|
+
var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index, request = _a.request, getTaskId = _a.getTaskId, isEdit = _a.isEdit;
|
|
12
|
+
// 设置合同比对按钮的loading状态
|
|
13
|
+
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
15
14
|
var onClickHandle = function () {
|
|
16
15
|
console.log('合同比对', index, record);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _a;
|
|
23
|
-
if (res.code === 200) {
|
|
24
|
-
getTaskId((_a = res.data) === null || _a === void 0 ? void 0 : _a.taskId, index);
|
|
16
|
+
setLoading(true);
|
|
17
|
+
try {
|
|
18
|
+
if (!record.templateAttachId) {
|
|
19
|
+
message.info('请选择客户样板');
|
|
20
|
+
return;
|
|
25
21
|
}
|
|
26
|
-
|
|
22
|
+
var params = {
|
|
23
|
+
leftAttachId: record.attachId,
|
|
24
|
+
rightAttachId: record.templateAttachId,
|
|
25
|
+
};
|
|
26
|
+
// 发起比对任务
|
|
27
|
+
request({
|
|
28
|
+
url: "/api/zmdms-resource/seal/create-compare-task/" + params.leftAttachId + "/" + params.rightAttachId,
|
|
29
|
+
method: 'GET',
|
|
30
|
+
}).then(function (res) {
|
|
31
|
+
var _a;
|
|
32
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
33
|
+
getTaskId((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.taskId, index);
|
|
34
|
+
message.success('操作成功');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
message.error(res.data.msg || '出错了');
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
//
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
setLoading(false);
|
|
46
|
+
}
|
|
27
47
|
};
|
|
28
48
|
return (React.createElement("div", null,
|
|
29
|
-
React.createElement("div",
|
|
49
|
+
React.createElement("div", null,
|
|
30
50
|
React.createElement(Button, { type: "link", onClick: function () {
|
|
31
51
|
openCustomerModalHandle && openCustomerModalHandle(index);
|
|
32
|
-
} }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F"),
|
|
33
|
-
|
|
34
|
-
(record === null || record === void 0 ? void 0 : record.templateAttachId) && (React.createElement(AttachOperation, { ZT_API_BASEURL: ZT_API_BASEURL, ZT_FILE_BASEURL: ZT_FILE_BASEURL, token: token, attachId: record === null || record === void 0 ? void 0 : record.templateAttachId, attachName: record === null || record === void 0 ? void 0 : record.templateAttachName, attachSize: record === null || record === void 0 ? void 0 : record.templateAttachSize }))));
|
|
52
|
+
} }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F")),
|
|
53
|
+
React.createElement(Button, { type: "primary", size: "small", disabled: !isEdit, onClick: onClickHandle, loading: loading }, "\u5408\u540C\u6BD4\u5BF9")));
|
|
35
54
|
};
|
|
36
55
|
export default TemplateAttach;
|
|
@@ -15,7 +15,7 @@ export function useRecords(fileList) {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
export function useQunjData(data) {
|
|
18
|
-
var _a = useState(
|
|
18
|
+
var _a = useState({}), qunjSeal = _a[0], setQunjSeal = _a[1];
|
|
19
19
|
useEffect(function () {
|
|
20
20
|
if (typeof data === 'object') {
|
|
21
21
|
setQunjSeal(data);
|