ztxkui 3.2.9 → 3.2.12
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.d.ts +5 -1
- package/dist/components/EnhanceSelect/index.js +2 -2
- package/dist/components/PrintContainer/print-container.js +5 -2
- package/dist/components/Table/hooks/useColumns.js +1 -1
- package/dist/components/business/Signatures/components/CompareResult.d.ts +2 -0
- package/dist/components/business/Signatures/components/CompareResult.js +58 -10
- package/dist/components/business/Signatures/components/ElectronicSeal.js +1 -0
- package/dist/components/business/Signatures/components/QunjSeal.js +12 -3
- package/dist/components/business/Signatures/components/SealCheckbox.js +18 -12
- package/dist/components/business/Signatures/components/TemplateAttach.d.ts +4 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +3 -47
- package/dist/components/business/Signatures/index.js +33 -15
- package/package.json +1 -1
|
@@ -123,6 +123,10 @@ export interface IProps<T> extends Omit<SelectProps<T>, 'onChange'> {
|
|
|
123
123
|
* 每页多少条
|
|
124
124
|
*/
|
|
125
125
|
currentSize?: number;
|
|
126
|
+
/**
|
|
127
|
+
* 是否需要选中复制到剪切板
|
|
128
|
+
*/
|
|
129
|
+
isCopy?: boolean;
|
|
126
130
|
}
|
|
127
131
|
/**
|
|
128
132
|
* 增强下拉框功能组件
|
|
@@ -139,6 +143,6 @@ export interface IProps<T> extends Omit<SelectProps<T>, 'onChange'> {
|
|
|
139
143
|
* { code: 200, data: { records: [] } } || { status: 200, data: { code: 200, data: { records: [] } } }
|
|
140
144
|
* 如果数据不能在接口层面满足以上形式,那么组件提供transformData属性,转换接口数据格式
|
|
141
145
|
*/
|
|
142
|
-
declare function EnhanceSelect<VT extends SelectValue = SelectValue>({ list, defaultList, params, url, method, timeout, dataKey, componentKey, titleKey, showAll, isCatch, onCompleted, onChange, onSearch, request, remoteSearch, remoteSearchKey, remoteSearchDataKey, isRemoteSearchDataKey, transformData, joinKey, joinStr, lineFeedKey, lineFeedStr, mustHasParams, disabledValues, searchDeleteKeys, isHandAddItem, isPage, currentSize, ...restProps }: IProps<VT>): JSX.Element;
|
|
146
|
+
declare function EnhanceSelect<VT extends SelectValue = SelectValue>({ list, defaultList, params, url, method, timeout, dataKey, componentKey, titleKey, showAll, isCatch, onCompleted, onChange, onSearch, request, remoteSearch, remoteSearchKey, remoteSearchDataKey, isRemoteSearchDataKey, transformData, joinKey, joinStr, lineFeedKey, lineFeedStr, mustHasParams, disabledValues, searchDeleteKeys, isHandAddItem, isPage, currentSize, isCopy, ...restProps }: IProps<VT>): JSX.Element;
|
|
143
147
|
declare const _default: React.MemoExoticComponent<typeof EnhanceSelect>;
|
|
144
148
|
export default _default;
|
|
@@ -99,7 +99,7 @@ function textContent(children) {
|
|
|
99
99
|
* 如果数据不能在接口层面满足以上形式,那么组件提供transformData属性,转换接口数据格式
|
|
100
100
|
*/
|
|
101
101
|
function EnhanceSelect(_a) {
|
|
102
|
-
var list = _a.list, defaultList = _a.defaultList, params = _a.params, url = _a.url, _b = _a.method, method = _b === void 0 ? 'GET' : _b, _c = _a.timeout, timeout = _c === void 0 ? 30000 : _c, _d = _a.dataKey, dataKey = _d === void 0 ? 'id' : _d, componentKey = _a.componentKey, _e = _a.titleKey, titleKey = _e === void 0 ? 'name' : _e, showAll = _a.showAll, isCatch = _a.isCatch, onCompleted = _a.onCompleted, onChange = _a.onChange, onSearch = _a.onSearch, request = _a.request, remoteSearch = _a.remoteSearch, remoteSearchKey = _a.remoteSearchKey, remoteSearchDataKey = _a.remoteSearchDataKey, _f = _a.isRemoteSearchDataKey, isRemoteSearchDataKey = _f === void 0 ? true : _f, transformData = _a.transformData, joinKey = _a.joinKey, _g = _a.joinStr, joinStr = _g === void 0 ? '-' : _g, lineFeedKey = _a.lineFeedKey, _h = _a.lineFeedStr, lineFeedStr = _h === void 0 ? '-' : _h, mustHasParams = _a.mustHasParams, disabledValues = _a.disabledValues, searchDeleteKeys = _a.searchDeleteKeys, isHandAddItem = _a.isHandAddItem, isPage = _a.isPage, _j = _a.currentSize, currentSize = _j === void 0 ? 30 : _j, restProps = __rest(_a, ["list", "defaultList", "params", "url", "method", "timeout", "dataKey", "componentKey", "titleKey", "showAll", "isCatch", "onCompleted", "onChange", "onSearch", "request", "remoteSearch", "remoteSearchKey", "remoteSearchDataKey", "isRemoteSearchDataKey", "transformData", "joinKey", "joinStr", "lineFeedKey", "lineFeedStr", "mustHasParams", "disabledValues", "searchDeleteKeys", "isHandAddItem", "isPage", "currentSize"]);
|
|
102
|
+
var list = _a.list, defaultList = _a.defaultList, params = _a.params, url = _a.url, _b = _a.method, method = _b === void 0 ? 'GET' : _b, _c = _a.timeout, timeout = _c === void 0 ? 30000 : _c, _d = _a.dataKey, dataKey = _d === void 0 ? 'id' : _d, componentKey = _a.componentKey, _e = _a.titleKey, titleKey = _e === void 0 ? 'name' : _e, showAll = _a.showAll, isCatch = _a.isCatch, onCompleted = _a.onCompleted, onChange = _a.onChange, onSearch = _a.onSearch, request = _a.request, remoteSearch = _a.remoteSearch, remoteSearchKey = _a.remoteSearchKey, remoteSearchDataKey = _a.remoteSearchDataKey, _f = _a.isRemoteSearchDataKey, isRemoteSearchDataKey = _f === void 0 ? true : _f, transformData = _a.transformData, joinKey = _a.joinKey, _g = _a.joinStr, joinStr = _g === void 0 ? '-' : _g, lineFeedKey = _a.lineFeedKey, _h = _a.lineFeedStr, lineFeedStr = _h === void 0 ? '-' : _h, mustHasParams = _a.mustHasParams, disabledValues = _a.disabledValues, searchDeleteKeys = _a.searchDeleteKeys, isHandAddItem = _a.isHandAddItem, isPage = _a.isPage, _j = _a.currentSize, currentSize = _j === void 0 ? 30 : _j, isCopy = _a.isCopy, restProps = __rest(_a, ["list", "defaultList", "params", "url", "method", "timeout", "dataKey", "componentKey", "titleKey", "showAll", "isCatch", "onCompleted", "onChange", "onSearch", "request", "remoteSearch", "remoteSearchKey", "remoteSearchDataKey", "isRemoteSearchDataKey", "transformData", "joinKey", "joinStr", "lineFeedKey", "lineFeedStr", "mustHasParams", "disabledValues", "searchDeleteKeys", "isHandAddItem", "isPage", "currentSize", "isCopy"]);
|
|
103
103
|
var currentClick = useRef(true);
|
|
104
104
|
// 下拉数据源
|
|
105
105
|
var _k = useFetchState([]), selectList = _k[0], setSelectList = _k[1];
|
|
@@ -587,7 +587,7 @@ function EnhanceSelect(_a) {
|
|
|
587
587
|
// 选中时
|
|
588
588
|
var onSelectHandle = function (value, obj) {
|
|
589
589
|
// console.log('选中数据事件');
|
|
590
|
-
if (restProps.mode !== 'multiple') {
|
|
590
|
+
if (restProps.mode !== 'multiple' && isCopy) {
|
|
591
591
|
var text = textContent(obj.children);
|
|
592
592
|
var textarea = document.createElement('textarea');
|
|
593
593
|
textarea.setAttribute('readonly', 'readonly');
|
|
@@ -110,10 +110,13 @@ var PrintContainer = function (_a) {
|
|
|
110
110
|
pdfName: pdfName,
|
|
111
111
|
isShowPage: isAddExportPage,
|
|
112
112
|
})
|
|
113
|
-
.then(function () {
|
|
113
|
+
.then(function (pdf) {
|
|
114
|
+
// const pdfBase64 = pdf.output('dataurlstring');
|
|
115
|
+
// const pdfFile = dataURLtoFile(pdfBase64, pdfName);
|
|
116
|
+
// console.log(pdfFile);
|
|
114
117
|
setSpinning(false);
|
|
115
118
|
})
|
|
116
|
-
.catch(function () {
|
|
119
|
+
.catch(function (pdf) {
|
|
117
120
|
setSpinning(false);
|
|
118
121
|
});
|
|
119
122
|
});
|
|
@@ -190,7 +190,7 @@ function useColumns(props) {
|
|
|
190
190
|
width: 52,
|
|
191
191
|
fixed: 'left',
|
|
192
192
|
align: 'center',
|
|
193
|
-
render: function (text, render, index) { return (React.createElement(TableAddDelColumn, { onAddAndDelHandle: function (type) { return onAddAndDelHandle(type, index); }, hideAddIcon: hideAddIcon, hideDelIcon: hideDelIcon })); },
|
|
193
|
+
render: function (text, render, index) { return (React.createElement(TableAddDelColumn, { onAddAndDelHandle: function (type) { return onAddAndDelHandle(type, index); }, hideAddIcon: hideAddIcon, addIconText: addIconText, hideDelIcon: hideDelIcon, delIconText: delIconText })); },
|
|
194
194
|
};
|
|
195
195
|
_newColumns.unshift(newColumn);
|
|
196
196
|
}
|
|
@@ -7,12 +7,56 @@ import React, { useState } from 'react';
|
|
|
7
7
|
// ztxkui公共组件
|
|
8
8
|
import { Button, message } from '../../../../index';
|
|
9
9
|
var CompareResult = function (_a) {
|
|
10
|
-
var record = _a.record, index = _a.index, request = _a.request;
|
|
10
|
+
var record = _a.record, index = _a.index, request = _a.request, isEdit = _a.isEdit, getTaskId = _a.getTaskId;
|
|
11
11
|
// 设置查看比对结果按钮的loading状态
|
|
12
|
-
var _b = useState(false),
|
|
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];
|
|
13
17
|
var onClickHandle = function () {
|
|
14
|
-
console.log('
|
|
18
|
+
console.log('合同比对', index, record);
|
|
15
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
|
+
var viewCompareResult = function () {
|
|
58
|
+
console.log('查看比对结果', index, record);
|
|
59
|
+
setResultLoading(true);
|
|
16
60
|
try {
|
|
17
61
|
var task_id = record.taskId;
|
|
18
62
|
if (task_id) {
|
|
@@ -23,11 +67,14 @@ var CompareResult = function (_a) {
|
|
|
23
67
|
})
|
|
24
68
|
.then(function (res) {
|
|
25
69
|
var _a;
|
|
26
|
-
if (res.status === 200 &&
|
|
27
|
-
res.data.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
70
|
+
if (res.status === 200 && res.data.code === 200) {
|
|
71
|
+
if ((_a = res.data.data[0]) === null || _a === void 0 ? void 0 : _a.url) {
|
|
72
|
+
// 比对文件预览
|
|
73
|
+
window.open(res.data.data[0].url);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
message.info('文件比对中,请稍后再试!');
|
|
77
|
+
}
|
|
31
78
|
}
|
|
32
79
|
else {
|
|
33
80
|
message.error(res.data.msg || '出错了');
|
|
@@ -46,10 +93,11 @@ var CompareResult = function (_a) {
|
|
|
46
93
|
//
|
|
47
94
|
}
|
|
48
95
|
finally {
|
|
49
|
-
|
|
96
|
+
setResultLoading(false);
|
|
50
97
|
}
|
|
51
98
|
};
|
|
52
99
|
return (React.createElement(React.Fragment, null,
|
|
53
|
-
React.createElement(Button, { type: "
|
|
100
|
+
React.createElement(Button, { type: "primary", size: "small", disabled: !isEdit, onClick: onClickHandle, loading: loading }, "\u5408\u540C\u6BD4\u5BF9"),
|
|
101
|
+
React.createElement("div", null, isShow || record.taskId ? (React.createElement(Button, { type: "link", onClick: viewCompareResult, loading: resultLoading }, "\u67E5\u770B\u6BD4\u5BF9\u7ED3\u679C")) : (''))));
|
|
54
102
|
};
|
|
55
103
|
export default CompareResult;
|
|
@@ -12,10 +12,19 @@ import { Form, Input, InputNumber, SearchContainer, Radio, Button, message, } fr
|
|
|
12
12
|
import { SealCheckboxGroup } from './SealCheckbox';
|
|
13
13
|
// 其他文件
|
|
14
14
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
15
|
+
// 采购合同 销售合同 双边合同 部门间交易合同
|
|
16
|
+
var FLOW_IDS = [
|
|
17
|
+
'scm_order_contract_cght',
|
|
18
|
+
'scm_order_contract_xsht',
|
|
19
|
+
'scm_order_contract_sbht',
|
|
20
|
+
'scm_order_contract_bjjyht',
|
|
21
|
+
];
|
|
15
22
|
var QunjSeal = function (_a) {
|
|
16
23
|
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
24
|
var form = Form.useForm()[0];
|
|
18
25
|
var _b = useState([]), sealList = _b[0], setSealList = _b[1];
|
|
26
|
+
// 采购合同 销售合同 双边合同 部门间交易合同 需要展示合同份数 其他的不需要
|
|
27
|
+
var showContranctNum = FLOW_IDS.includes("" + flowId);
|
|
19
28
|
useEffect(function () {
|
|
20
29
|
request({
|
|
21
30
|
url: "/api/zmdms-resource/flowqjuse/query-qj-seal-list/" + flowId,
|
|
@@ -61,9 +70,9 @@ var QunjSeal = function (_a) {
|
|
|
61
70
|
React.createElement(SearchLeft, null,
|
|
62
71
|
React.createElement(Item, { name: "vertifyCode", label: "\u7FA4\u6770\u9A8C\u8BC1\u7801", width: "all" },
|
|
63
72
|
React.createElement(Input, { disabled: true })),
|
|
64
|
-
React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all" },
|
|
65
|
-
React.createElement(InputNumber, { disabled: !isEdit, min: 0 })),
|
|
66
|
-
React.createElement(Button, { type: "primary", size: "small", style: { marginLeft: '6px' }, onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001"),
|
|
73
|
+
showContranctNum ? (React.createElement(Item, { name: "contranctNum", label: "\u5408\u540C\u4EFD\u6570", width: "all" },
|
|
74
|
+
React.createElement(InputNumber, { disabled: !isEdit, min: 0 }))) : (''),
|
|
75
|
+
!!value.vertifyCode ? (React.createElement(Button, { type: "primary", size: "small", style: { marginLeft: '6px' }, onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001")) : (''),
|
|
67
76
|
React.createElement(Item, { name: "isTakeOut", label: "", noBorder: true, width: "all" },
|
|
68
77
|
React.createElement(Radio.Group, { style: { padding: '0 6px' }, disabled: !isEdit },
|
|
69
78
|
React.createElement(Radio, { value: 0 }, "\u5185\u90E8\u7528\u5370"),
|
|
@@ -42,23 +42,29 @@ var SealCheckbox = function (_a) {
|
|
|
42
42
|
var SealCheckboxGroup = function (_a) {
|
|
43
43
|
var value = _a.value, onChange = _a.onChange, sealList = _a.sealList, handleRef = _a.handleRef, isEdit = _a.isEdit;
|
|
44
44
|
var onChangeHandle = function (_value, index) {
|
|
45
|
-
var _a, _b;
|
|
45
|
+
var _a, _b, _c, _d;
|
|
46
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;
|
|
47
47
|
var valueArr = Array.isArray(value) ? __spreadArray([], value) : [];
|
|
48
48
|
valueArr.splice(index, 1, _value);
|
|
49
49
|
var totalSealNum = sumBy(valueArr, 'sealCount');
|
|
50
50
|
onChange && onChange(valueArr);
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
if (contractNum) {
|
|
52
|
+
if (totalSealNum > contractNum * 4) {
|
|
53
|
+
(_c = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _c === void 0 ? void 0 : _c.getData('4');
|
|
54
|
+
message.warning('您的用印次数远超超过合理次数范围,请修改。');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
(_d = handleRef === null || handleRef === void 0 ? void 0 : handleRef.current) === null || _d === void 0 ? void 0 : _d.getData('enable');
|
|
59
|
+
}
|
|
60
|
+
if (totalSealNum > contractNum * 3) {
|
|
61
|
+
message.warning('您的用印次数超过合理次数范围,请慎重确认!');
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (totalSealNum > contractNum * 2) {
|
|
65
|
+
message.warning('您的用印次数已超过2倍合同数量,请确认用印数量是否正确。');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
62
68
|
}
|
|
63
69
|
};
|
|
64
70
|
return (React.createElement("div", null, Array.isArray(sealList) &&
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author 陈亚雄
|
|
3
|
+
* @description 合同模板
|
|
4
|
+
*/
|
|
1
5
|
import React from 'react';
|
|
2
6
|
interface IProps {
|
|
3
7
|
record: any;
|
|
4
8
|
index: number;
|
|
5
9
|
/** 点击客户样板 */
|
|
6
10
|
openCustomerModalHandle?: any;
|
|
7
|
-
getTaskId: (id: any, index: number) => void;
|
|
8
|
-
request?: any;
|
|
9
11
|
isEdit: boolean;
|
|
10
12
|
}
|
|
11
13
|
declare const TemplateAttach: React.FC<IProps>;
|
|
@@ -2,61 +2,17 @@
|
|
|
2
2
|
* @author 陈亚雄
|
|
3
3
|
* @description 合同模板
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import React, { useState } from 'react';
|
|
7
|
-
// redux
|
|
5
|
+
import React from 'react';
|
|
8
6
|
// ztxkui公共组件
|
|
9
7
|
import { Button } from '../../../../index';
|
|
10
8
|
var TemplateAttach = function (_a) {
|
|
11
|
-
var record = _a.record, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index,
|
|
12
|
-
// 设置合同比对按钮的loading状态
|
|
13
|
-
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
14
|
-
var onClickHandle = function () {
|
|
15
|
-
console.log('合同比对', index, record);
|
|
16
|
-
setLoading(true);
|
|
17
|
-
try {
|
|
18
|
-
if (!record.templateAttachId) {
|
|
19
|
-
message.info('请选择客户样板');
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
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
|
-
})
|
|
31
|
-
.then(function (res) {
|
|
32
|
-
var _a;
|
|
33
|
-
if (res.status === 200 && res.data.code === 200) {
|
|
34
|
-
getTaskId((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.taskId, index);
|
|
35
|
-
message.success('操作成功');
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
message.error(res.data.msg || '出错了');
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
.catch(function (error) {
|
|
42
|
-
var _a, _b;
|
|
43
|
-
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) || '请求失败!');
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
catch (err) {
|
|
47
|
-
//
|
|
48
|
-
}
|
|
49
|
-
finally {
|
|
50
|
-
setLoading(false);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
9
|
+
var record = _a.record, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index, isEdit = _a.isEdit;
|
|
53
10
|
return (React.createElement("div", null,
|
|
54
11
|
React.createElement("div", null, record.templateAttachName || ''),
|
|
55
12
|
React.createElement("div", null, record.templateCrNo || ''),
|
|
56
13
|
React.createElement("div", null,
|
|
57
14
|
React.createElement(Button, { type: "link", disabled: !isEdit, onClick: function () {
|
|
58
15
|
openCustomerModalHandle && openCustomerModalHandle(index);
|
|
59
|
-
} }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F"))
|
|
60
|
-
React.createElement(Button, { type: "primary", size: "small", disabled: !isEdit, onClick: onClickHandle, loading: loading }, "\u5408\u540C\u6BD4\u5BF9")));
|
|
16
|
+
} }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F"))));
|
|
61
17
|
};
|
|
62
18
|
export default TemplateAttach;
|
|
@@ -60,6 +60,8 @@ var Sinatures = function (_a) {
|
|
|
60
60
|
var _h = useState(docAttachMap), attachMap = _h[0], setAttachMap = _h[1];
|
|
61
61
|
// 文档id列表
|
|
62
62
|
var _j = useState(documentIdList), documentIds = _j[0], setDocumentIds = _j[1];
|
|
63
|
+
// 总用印次数超过4倍
|
|
64
|
+
var _k = useState(false), isTotalSealNumTooMore = _k[0], setIsTotalSealNumTooMore = _k[1];
|
|
63
65
|
useEffect(function () {
|
|
64
66
|
// 判断入参fileList中是否有已勾选电子印章的元素
|
|
65
67
|
if (Array.isArray(fileList) &&
|
|
@@ -142,7 +144,7 @@ var Sinatures = function (_a) {
|
|
|
142
144
|
if (contractId || contract_id) {
|
|
143
145
|
request({
|
|
144
146
|
url: '/api/zmdms-resource/seal/view-seal-state',
|
|
145
|
-
data: { contractId: contractId || contract_id },
|
|
147
|
+
data: { contractId: contractId || contract_id, canEdit: canEdit },
|
|
146
148
|
method: 'POST',
|
|
147
149
|
})
|
|
148
150
|
.then(function (res) {
|
|
@@ -167,6 +169,8 @@ var Sinatures = function (_a) {
|
|
|
167
169
|
var columns = [
|
|
168
170
|
{
|
|
169
171
|
title: '序号',
|
|
172
|
+
key: 'orderNum',
|
|
173
|
+
dataIndex: 'orderNum',
|
|
170
174
|
width: 62,
|
|
171
175
|
fixed: 'left',
|
|
172
176
|
render: function (text, record, index) { return "" + (index + 1); },
|
|
@@ -202,7 +206,7 @@ var Sinatures = function (_a) {
|
|
|
202
206
|
dataIndex: 'templateAttachId',
|
|
203
207
|
width: 220,
|
|
204
208
|
render: function (text, record, index) {
|
|
205
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record,
|
|
209
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, index: index, openCustomerModalHandle: openCustomerModalHandle, isEdit: isEdit })) : ('');
|
|
206
210
|
},
|
|
207
211
|
},
|
|
208
212
|
{
|
|
@@ -211,7 +215,7 @@ var Sinatures = function (_a) {
|
|
|
211
215
|
dataIndex: 'compareAttachId',
|
|
212
216
|
width: 100,
|
|
213
217
|
render: function (text, record, index) {
|
|
214
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request })) : ('');
|
|
218
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request, getTaskId: getTaskId, isEdit: isEdit })) : ('');
|
|
215
219
|
},
|
|
216
220
|
},
|
|
217
221
|
{
|
|
@@ -276,10 +280,14 @@ var Sinatures = function (_a) {
|
|
|
276
280
|
columnsLast = columnsLast.filter(function (item) { return item.key !== 'qunjSeal'; });
|
|
277
281
|
}
|
|
278
282
|
if (!needDg && !needQys) {
|
|
279
|
-
columnsLast = columnsLast.filter(function (item) {
|
|
283
|
+
columnsLast = columnsLast.filter(function (item) {
|
|
284
|
+
return !['attachId', 'orderNum', 'attachTypeName'].includes(item.key);
|
|
285
|
+
});
|
|
280
286
|
}
|
|
281
287
|
if (!needDg) {
|
|
282
|
-
columnsLast = columnsLast.filter(function (item) {
|
|
288
|
+
columnsLast = columnsLast.filter(function (item) {
|
|
289
|
+
return !['attachTypeName', 'templateAttachId', 'compareAttachId'].includes(item.key);
|
|
290
|
+
});
|
|
283
291
|
}
|
|
284
292
|
if (!needQys) {
|
|
285
293
|
columnsLast = columnsLast.filter(function (item) {
|
|
@@ -287,7 +295,7 @@ var Sinatures = function (_a) {
|
|
|
287
295
|
});
|
|
288
296
|
}
|
|
289
297
|
// 上传组件的数据
|
|
290
|
-
var
|
|
298
|
+
var _l = useState(), originFileList = _l[0], setOriginFileList = _l[1];
|
|
291
299
|
// 是否存入样板 添加水印 电子印章发生改变触发事件
|
|
292
300
|
function onCheckboxChangeHandle(e, type, index) {
|
|
293
301
|
if (type === 'isElectronicSeal') {
|
|
@@ -354,15 +362,25 @@ var Sinatures = function (_a) {
|
|
|
354
362
|
* 暴露方法给外部调用
|
|
355
363
|
*/
|
|
356
364
|
useImperativeHandle(handleRef, function () { return ({
|
|
357
|
-
getData: function () {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
365
|
+
getData: function (flag) {
|
|
366
|
+
// 超过4倍禁止提交审批
|
|
367
|
+
if (flag === '4') {
|
|
368
|
+
setIsTotalSealNumTooMore(true);
|
|
369
|
+
}
|
|
370
|
+
else if (flag === 'enable') {
|
|
371
|
+
setIsTotalSealNumTooMore(false);
|
|
372
|
+
}
|
|
373
|
+
return {
|
|
374
|
+
fileList: records,
|
|
375
|
+
qunjSeal: innerQunjSeal,
|
|
376
|
+
electronicSealIdList: innerElectronicSeal,
|
|
377
|
+
checkAttachIdList: sealedIds,
|
|
378
|
+
docAttachMap: attachMap,
|
|
379
|
+
documentIdList: documentIds,
|
|
380
|
+
contractId: contractId,
|
|
381
|
+
isTotalSealNumTooMore: isTotalSealNumTooMore,
|
|
382
|
+
};
|
|
383
|
+
},
|
|
366
384
|
/** 更新数据 */
|
|
367
385
|
setTemplateData: function (data, index) {
|
|
368
386
|
setRecords(function (preRecords) {
|