ztxkui 3.5.6 → 3.5.9
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/PrintContainerDemo.js +54 -28
- package/dist/TableDemo/EditableTable.js +2 -2
- package/dist/UploadDemo.js +1 -3
- package/dist/components/PrintContainer/lodop.d.ts +12 -0
- package/dist/components/PrintContainer/lodop.js +43 -0
- package/dist/components/PrintContainer/print-container.d.ts +3 -1
- package/dist/components/PrintContainer/print-container.js +82 -32
- package/dist/components/Table/table.js +1 -0
- package/dist/components/Table/utils/validate.js +3 -3
- package/dist/components/business/Signatures/components/DetailTable.d.ts +1 -0
- package/dist/components/business/Signatures/components/DetailTable.js +3 -3
- package/dist/components/business/Signatures/components/QunjSeal.js +2 -2
- package/dist/components/business/Signatures/index.js +10 -14
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
17
17
|
// redux
|
|
18
18
|
// ztxkui公共组件
|
|
19
19
|
import { PrintContainer } from '../index';
|
|
20
|
+
// import Table, { ColumnsType } from 'components/Table';
|
|
20
21
|
// 路由配置
|
|
21
22
|
// store
|
|
22
23
|
// 自定义组件
|
|
@@ -44,41 +45,66 @@ var dataSource1 = new Array(10).fill('1').map(function (item, index) { return ({
|
|
|
44
45
|
id: "" + index,
|
|
45
46
|
}); });
|
|
46
47
|
var PrintContainerDemo = function () {
|
|
47
|
-
|
|
48
|
+
// const [dataSource, setDataSource] = useState([]);
|
|
49
|
+
var _a = useState([]), setDataSource = _a[1];
|
|
48
50
|
var _b = useState(true), loading = _b[0], setLoading = _b[1];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
];
|
|
51
|
+
// const columns: ColumnsType<any> = [
|
|
52
|
+
// {
|
|
53
|
+
// title: '测试一',
|
|
54
|
+
// width: 100,
|
|
55
|
+
// dataIndex: 'test1',
|
|
56
|
+
// key: 'test1',
|
|
57
|
+
// },
|
|
58
|
+
// {
|
|
59
|
+
// title: '测试一',
|
|
60
|
+
// width: 100,
|
|
61
|
+
// dataIndex: 'test2',
|
|
62
|
+
// key: 'test2',
|
|
63
|
+
// },
|
|
64
|
+
// {
|
|
65
|
+
// title: '测试一',
|
|
66
|
+
// width: 100,
|
|
67
|
+
// dataIndex: 'test3',
|
|
68
|
+
// key: 'test3',
|
|
69
|
+
// },
|
|
70
|
+
// {
|
|
71
|
+
// title: '测试一',
|
|
72
|
+
// width: 100,
|
|
73
|
+
// dataIndex: 'test4',
|
|
74
|
+
// key: 'test4',
|
|
75
|
+
// },
|
|
76
|
+
// ];
|
|
75
77
|
useEffect(function () {
|
|
76
78
|
setTimeout(function () {
|
|
77
79
|
setLoading(false);
|
|
78
80
|
setDataSource(dataSource1);
|
|
79
81
|
}, 1000);
|
|
80
82
|
}, []);
|
|
81
|
-
return (React.createElement(PrintContainer, { isAddExportPage: true, loading: loading, request: request, deptId: "1527122794329313281", flowId: "scm_print_thd", fileId: "1551837561144905730", keywordList: keywordList, imgWaterBg: water
|
|
83
|
+
return (React.createElement(PrintContainer, { isAddExportPage: true, loading: loading, request: request, deptId: "1527122794329313281", flowId: "scm_print_thd", fileId: "1551837561144905730", keywordList: keywordList, imgWaterBg: water, showPrintMessage: true,
|
|
84
|
+
// onPrintBeforeCallback={() => {
|
|
85
|
+
// setLoading(true);
|
|
86
|
+
// return new Promise((resolve, reject) => {
|
|
87
|
+
// setTimeout(() => {
|
|
88
|
+
// setLoading(false);
|
|
89
|
+
// // 这样子会导致不会执行
|
|
90
|
+
// // reject(false);
|
|
91
|
+
// // 这样子会执行
|
|
92
|
+
// resolve(true);
|
|
93
|
+
// }, 2000);
|
|
94
|
+
// });
|
|
95
|
+
// }}
|
|
96
|
+
onPrintCallback: function () {
|
|
97
|
+
setLoading(true);
|
|
98
|
+
return new Promise(function (resolve, reject) {
|
|
99
|
+
setTimeout(function () {
|
|
100
|
+
setLoading(false);
|
|
101
|
+
// 这样子不会执行
|
|
102
|
+
// reject(false);
|
|
103
|
+
// 这样子会执行
|
|
104
|
+
resolve(true);
|
|
105
|
+
}, 0);
|
|
106
|
+
});
|
|
107
|
+
} },
|
|
82
108
|
React.createElement("div", null,
|
|
83
109
|
React.createElement("div", { className: "html2canvas-container-page simple-print" },
|
|
84
110
|
React.createElement("div", { className: "print-header" },
|
|
@@ -129,7 +129,7 @@ var EditableTable = function () {
|
|
|
129
129
|
return Promise.reject({
|
|
130
130
|
errorFields: [
|
|
131
131
|
{
|
|
132
|
-
errors: "\
|
|
132
|
+
errors: "\u6D4B\u8BD5-\u660E\u7EC6\u8868 \u7B2C" + index + "\u884C \u6D4B\u8BD52 \u4E0D\u80FD\u5C0F\u4E8E102\uFF01",
|
|
133
133
|
},
|
|
134
134
|
],
|
|
135
135
|
});
|
|
@@ -331,6 +331,6 @@ var EditableTable = function () {
|
|
|
331
331
|
// tableValidate
|
|
332
332
|
tableHandleRef: tableHandleRef, tableName: "\u6211\u662F\u4E00\u4E2A\u8868\u683C",
|
|
333
333
|
// 显隐配置
|
|
334
|
-
configInfo: tableConfig })));
|
|
334
|
+
configInfo: tableConfig, showColumnDynamic: true, showColumnDynamicKey: "test-o-0011" })));
|
|
335
335
|
};
|
|
336
336
|
export default EditableTable;
|
package/dist/UploadDemo.js
CHANGED
|
@@ -210,9 +210,7 @@ function UploadDemo() {
|
|
|
210
210
|
showPreviewIcon: true,
|
|
211
211
|
showDownloadIcon: true,
|
|
212
212
|
showRemoveIcon: true,
|
|
213
|
-
}, apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", showTable: false, showTip: false, originFileList: fileList1, maxCount: 1, callback: uploadCallbackFn,
|
|
214
|
-
console.log(1111);
|
|
215
|
-
}, onDeleteCallback: function (index, file) {
|
|
213
|
+
}, apiBaseUrl: "http://192.168.0.83:8888", fileBaseUrl: "http://192.168.0.83:88", showTable: false, showTip: false, originFileList: fileList1, maxCount: 1, callback: uploadCallbackFn, onDeleteCallback: function (index, file) {
|
|
216
214
|
console.log(index, file);
|
|
217
215
|
}, authToken: token }),
|
|
218
216
|
React.createElement("button", { onClick: checkHandle }, "\u68C0\u67E5"),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { getLodop } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* 创建打印任务
|
|
4
|
+
* @param {*} taskName 任务名称
|
|
5
|
+
* @param {*} width 纸张宽度
|
|
6
|
+
* @param {*} height 纸张高度
|
|
7
|
+
*/
|
|
8
|
+
var createTask = function (_a) {
|
|
9
|
+
var taskName = _a.taskName, width = _a.width, height = _a.height;
|
|
10
|
+
var config = Object.assign({}, {
|
|
11
|
+
taskName: taskName,
|
|
12
|
+
width: width,
|
|
13
|
+
height: height,
|
|
14
|
+
});
|
|
15
|
+
var LODOP = getLodop();
|
|
16
|
+
// 打印检查安装,必装
|
|
17
|
+
CheckIsInstall(LODOP);
|
|
18
|
+
// 任务名称
|
|
19
|
+
LODOP.PRINT_INIT(config.taskName);
|
|
20
|
+
// 展示模式
|
|
21
|
+
LODOP.SET_SHOW_MODE('NP_NO_RESULT', true);
|
|
22
|
+
// 纸张大小 intOrient,intPageWidth,intPageHeight,strPageName
|
|
23
|
+
LODOP.SET_PRINT_PAGESIZE(0, width, height, 'Note');
|
|
24
|
+
return LODOP;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 打印检查安装,必装
|
|
28
|
+
*/
|
|
29
|
+
var CheckIsInstall = function (LODOP) {
|
|
30
|
+
try {
|
|
31
|
+
if (LODOP.VERSION) {
|
|
32
|
+
if (LODOP.CVERSION) {
|
|
33
|
+
// alert('当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:' + LODOP.CVERSION + '(内含Lodop' + LODOP.VERSION + ')') } else { alert('本机已成功安装了Lodop控件!\n 版本号:' + LODOP.VERSION)
|
|
34
|
+
// Vue.prototype.$message('当前有WEB打印服务C-Lodop可用' + LODOP.CVERSION)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.log('安装lodop');
|
|
40
|
+
window.open('http://www.lodop.net/download.html');
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export { createTask };
|
|
@@ -38,8 +38,10 @@ export interface IProps {
|
|
|
38
38
|
flowId?: string;
|
|
39
39
|
/** 水印图片 */
|
|
40
40
|
imgWaterBg?: string;
|
|
41
|
+
/** 点击打印前端的回调函数 */
|
|
42
|
+
onPrintBeforeCallback?: () => Promise<any> | void;
|
|
41
43
|
/** 点击打印的回调函数 */
|
|
42
|
-
onPrintCallback?: () => void;
|
|
44
|
+
onPrintCallback?: () => Promise<any> | void;
|
|
43
45
|
/** 是否添加点击打印提示 */
|
|
44
46
|
showPrintMessage?: boolean;
|
|
45
47
|
}
|
|
@@ -75,7 +75,7 @@ function downloadFontTTF(_a) {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
var PrintContainer = function (_a) {
|
|
78
|
-
var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, autoSealIdList = _a.autoSealIdList, keywordList = _a.keywordList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage;
|
|
78
|
+
var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, autoSealIdList = _a.autoSealIdList, keywordList = _a.keywordList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage, onPrintBeforeCallback = _a.onPrintBeforeCallback;
|
|
79
79
|
var _h = useState(false), showWater = _h[0], setShowWater = _h[1];
|
|
80
80
|
var containerRef = useRef();
|
|
81
81
|
var allDomRef = useRef();
|
|
@@ -230,39 +230,89 @@ var PrintContainer = function (_a) {
|
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
232
|
// 打印
|
|
233
|
-
var onPrintHandle = function () {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
233
|
+
var onPrintHandle = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
+
var result, err_1, isOkSure_1;
|
|
235
|
+
return __generator(this, function (_a) {
|
|
236
|
+
switch (_a.label) {
|
|
237
|
+
case 0:
|
|
238
|
+
result = true;
|
|
239
|
+
if (!onPrintBeforeCallback) return [3 /*break*/, 4];
|
|
240
|
+
_a.label = 1;
|
|
241
|
+
case 1:
|
|
242
|
+
_a.trys.push([1, 3, , 4]);
|
|
243
|
+
return [4 /*yield*/, onPrintBeforeCallback()];
|
|
244
|
+
case 2:
|
|
245
|
+
result = _a.sent();
|
|
246
|
+
return [3 /*break*/, 4];
|
|
247
|
+
case 3:
|
|
248
|
+
err_1 = _a.sent();
|
|
249
|
+
result = null;
|
|
250
|
+
return [3 /*break*/, 4];
|
|
251
|
+
case 4:
|
|
252
|
+
if (!result) {
|
|
253
|
+
return [2 /*return*/];
|
|
254
|
+
}
|
|
255
|
+
if (showPrintMessage) {
|
|
256
|
+
isOkSure_1 = false;
|
|
257
|
+
Modal.confirm({
|
|
258
|
+
title: '打印提示',
|
|
259
|
+
content: '点击确认按钮后,将作为一次成功的打印,并记录到系统!你确认要打印吗?',
|
|
260
|
+
okText: '确认',
|
|
261
|
+
onOk: function () {
|
|
262
|
+
if (onPrintCallback) {
|
|
263
|
+
var result_1 = onPrintCallback();
|
|
264
|
+
if (result_1 instanceof Promise) {
|
|
265
|
+
var startTime_1 = Date.now();
|
|
266
|
+
result_1.then(function (res) {
|
|
267
|
+
if (res) {
|
|
268
|
+
if (Date.now() - startTime_1 > 1000) {
|
|
269
|
+
isOkSure_1 = true;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
setTimeout(function () {
|
|
273
|
+
printCurrentDom({
|
|
274
|
+
hiddenClassNames: __spreadArray([
|
|
275
|
+
'.print-container--header'
|
|
276
|
+
], (hiddenClassName || [])),
|
|
277
|
+
});
|
|
278
|
+
}, 1000);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
isOkSure_1 = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
isOkSure_1 = true;
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
afterClose: function () {
|
|
292
|
+
if (isOkSure_1) {
|
|
293
|
+
setTimeout(function () {
|
|
294
|
+
printCurrentDom({
|
|
295
|
+
hiddenClassNames: __spreadArray([
|
|
296
|
+
'.print-container--header'
|
|
297
|
+
], (hiddenClassName || [])),
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
},
|
|
252
302
|
});
|
|
253
303
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
};
|
|
304
|
+
else {
|
|
305
|
+
onPrintCallback && onPrintCallback();
|
|
306
|
+
printCurrentDom({
|
|
307
|
+
hiddenClassNames: __spreadArray([
|
|
308
|
+
'.print-container--header'
|
|
309
|
+
], (hiddenClassName || [])),
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
return [2 /*return*/];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}); };
|
|
266
316
|
// 生成pdf
|
|
267
317
|
var onPdfHandle = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
268
318
|
var html2canvasDom;
|
|
@@ -42,11 +42,11 @@ import { ERROR_TD_CLASSNAME } from '../index';
|
|
|
42
42
|
export function tableValidate(dataSource, mergeColumns, restParams) {
|
|
43
43
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
44
44
|
return __awaiter(this, void 0, void 0, function () {
|
|
45
|
-
var getCurrentTable, rowSelection, tableName, requiredFileds, resultTr, i, item, j, _o, dataIndex, title, validate, index, value, err_1, errorTr, errorTds, errorTd, errorTr, errorTds, errorTd, errorTr, errorTds, errorTd;
|
|
45
|
+
var getCurrentTable, rowSelection, tableName, expandable, requiredFileds, resultTr, i, item, j, _o, dataIndex, title, validate, index, value, err_1, errorTr, errorTds, errorTd, errorTr, errorTds, errorTd, errorTr, errorTds, errorTd;
|
|
46
46
|
return __generator(this, function (_p) {
|
|
47
47
|
switch (_p.label) {
|
|
48
48
|
case 0:
|
|
49
|
-
getCurrentTable = restParams.getCurrentTable, rowSelection = restParams.rowSelection, tableName = restParams.tableName;
|
|
49
|
+
getCurrentTable = restParams.getCurrentTable, rowSelection = restParams.rowSelection, tableName = restParams.tableName, expandable = restParams.expandable;
|
|
50
50
|
if (!Array.isArray(dataSource) || dataSource.length === 0) {
|
|
51
51
|
console.info('没有数据,无需验证!');
|
|
52
52
|
return [2 /*return*/];
|
|
@@ -63,7 +63,7 @@ export function tableValidate(dataSource, mergeColumns, restParams) {
|
|
|
63
63
|
dataIndex: column.validate.dataIndex || column.dataIndex,
|
|
64
64
|
title: column.validate.title || column.title,
|
|
65
65
|
validate: column.validate.validate,
|
|
66
|
-
index: index + (rowSelection ? 1 : 0),
|
|
66
|
+
index: index + (rowSelection ? 1 : 0) + (expandable ? 1 : 0),
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
});
|
|
@@ -18,7 +18,7 @@ import { Table, Button } from '../../../../index';
|
|
|
18
18
|
// 自定义组件
|
|
19
19
|
import AttachOperation from './AttachOperation';
|
|
20
20
|
var DetailTable = function (_a) {
|
|
21
|
-
var needQj = _a.needQj, needQys = _a.needQys, records = _a.records, qunjSeal = _a.qunjSeal, electronicSeal = _a.electronicSealIdList, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, viewSealPageFn = _a.viewSealPageFn, contractId = _a.contractId, electronicList = _a.electronicList, sealList = _a.sealList, querySealStatus = _a.querySealStatus;
|
|
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, showContranctNum = _a.showContranctNum;
|
|
22
22
|
var authToken = token || '';
|
|
23
23
|
/** 下载水印附件 */
|
|
24
24
|
var downFileFn = function (_record) {
|
|
@@ -130,12 +130,12 @@ var DetailTable = function (_a) {
|
|
|
130
130
|
} },
|
|
131
131
|
React.createElement("div", { style: __assign({}, (!!(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode) ? {} : { display: 'none' })) },
|
|
132
132
|
React.createElement(Button, { type: "link", size: "small", onClick: querySealStatus }, "\u67E5\u8BE2\u7528\u5370\u72B6\u6001")),
|
|
133
|
-
React.createElement("div", null,
|
|
133
|
+
showContranctNum && (React.createElement("div", null,
|
|
134
134
|
React.createElement("span", { style: {
|
|
135
135
|
color: '#888888',
|
|
136
136
|
} }, "\u5408\u540C\u4EFD\u6570\uFF1A"),
|
|
137
137
|
(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.contranctNum) || '',
|
|
138
|
-
" \u4EFD"),
|
|
138
|
+
" \u4EFD")),
|
|
139
139
|
React.createElement("div", null,
|
|
140
140
|
React.createElement("span", { style: {
|
|
141
141
|
color: '#888888',
|
|
@@ -26,11 +26,11 @@ var QunjSeal = function (_a) {
|
|
|
26
26
|
var value = _a.value, onChange = _a.onChange, isEdit = _a.isEdit, showContranctNum = _a.showContranctNum, sealList = _a.sealList, handleRef = _a.handleRef, checked = _a.checked, form = _a.form, setQunjSeal = _a.setQunjSeal;
|
|
27
27
|
useEffect(function () {
|
|
28
28
|
if (value) {
|
|
29
|
-
var _value = __assign(__assign(__assign({}, value), { isTakeOut: "" + value.isTakeOut === '1' ? 1 : 0 }), (value.contranctNum ? {} : { contranctNum: 1 }));
|
|
29
|
+
var _value = __assign(__assign(__assign({}, value), { isTakeOut: "" + value.isTakeOut === '1' ? 1 : 0 }), (value.contranctNum || !showContranctNum ? {} : { contranctNum: 1 }));
|
|
30
30
|
form.setFieldsValue(_value);
|
|
31
31
|
setQunjSeal(_value);
|
|
32
32
|
}
|
|
33
|
-
}, [value, form, setQunjSeal]);
|
|
33
|
+
}, [value, form, setQunjSeal, showContranctNum]);
|
|
34
34
|
var onSealCheckboxHandle = function (values) {
|
|
35
35
|
form.setFieldsValue({
|
|
36
36
|
values: values,
|
|
@@ -107,18 +107,12 @@ var Sinatures = function (_a) {
|
|
|
107
107
|
var _r = useState(false), loading = _r[0], setLoading = _r[1];
|
|
108
108
|
/** 是否加盖群杰印章 */
|
|
109
109
|
var needQjSealFn = function (e) {
|
|
110
|
+
var _value = __assign(__assign({ isTakeOut: 0 }, (showContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
110
111
|
if (!e.target.checked) {
|
|
111
|
-
|
|
112
|
-
isTakeOut: 0,
|
|
113
|
-
contranctNum: 1,
|
|
114
|
-
details: [],
|
|
115
|
-
});
|
|
116
|
-
qunjSealChangeHandle({
|
|
117
|
-
isTakeOut: 0,
|
|
118
|
-
contranctNum: 1,
|
|
119
|
-
details: [],
|
|
120
|
-
});
|
|
112
|
+
_value.contranctNum = null;
|
|
121
113
|
}
|
|
114
|
+
form.setFieldsValue(_value);
|
|
115
|
+
qunjSealChangeHandle(_value);
|
|
122
116
|
setChecked(e.target.checked);
|
|
123
117
|
};
|
|
124
118
|
/** 查询用印状态 */
|
|
@@ -384,7 +378,7 @@ var Sinatures = function (_a) {
|
|
|
384
378
|
title: '保存为模版',
|
|
385
379
|
key: 'templateAttachId',
|
|
386
380
|
dataIndex: 'templateAttachId',
|
|
387
|
-
width:
|
|
381
|
+
width: 110,
|
|
388
382
|
render: function (text, record, index) {
|
|
389
383
|
return NEED_SAVE_TEMPLATE.includes("" + flowId) ? (React.createElement(Switch, { checked: record.isCustomerReference, disabled: !isEdit, onChange: function (value) {
|
|
390
384
|
return onSwitchChangeHandle(value, 'isCustomerReference', index);
|
|
@@ -408,12 +402,13 @@ var Sinatures = function (_a) {
|
|
|
408
402
|
title: '电子印章',
|
|
409
403
|
key: 'needQys',
|
|
410
404
|
dataIndex: 'needQys',
|
|
405
|
+
width: 610,
|
|
411
406
|
children: [
|
|
412
407
|
{
|
|
413
408
|
title: '盖电子印章',
|
|
414
409
|
key: 'isElectronicSeal',
|
|
415
410
|
dataIndex: 'isElectronicSeal',
|
|
416
|
-
width:
|
|
411
|
+
width: 110,
|
|
417
412
|
render: function (text, record, index) {
|
|
418
413
|
return (React.createElement(Switch, { checked: text, disabled: !isEdit, onChange: function (value) {
|
|
419
414
|
return onSwitchChangeHandle(value, 'isElectronicSeal', index);
|
|
@@ -424,7 +419,7 @@ var Sinatures = function (_a) {
|
|
|
424
419
|
title: '选择电子印章',
|
|
425
420
|
key: 'electronicSeal',
|
|
426
421
|
dataIndex: 'electronicSeal',
|
|
427
|
-
width:
|
|
422
|
+
width: 320,
|
|
428
423
|
render: function (value, row, index) {
|
|
429
424
|
// 是否有勾选加盖电子印章
|
|
430
425
|
var hasElectronicSeal = records === null || records === void 0 ? void 0 : records.some(function (item) { return !!item.isElectronicSeal; });
|
|
@@ -440,7 +435,7 @@ var Sinatures = function (_a) {
|
|
|
440
435
|
title: '电子印章设置',
|
|
441
436
|
key: 'setElectronicSeal',
|
|
442
437
|
dataIndex: 'setElectronicSeal',
|
|
443
|
-
width:
|
|
438
|
+
width: 180,
|
|
444
439
|
render: function (value, row, index) {
|
|
445
440
|
var Comp = function () {
|
|
446
441
|
return records.length !== 0 ? (React.createElement("div", { style: {
|
|
@@ -695,6 +690,7 @@ var Sinatures = function (_a) {
|
|
|
695
690
|
querySealStatus: querySealStatus,
|
|
696
691
|
needQj: needQj,
|
|
697
692
|
needQys: needQys,
|
|
693
|
+
showContranctNum: showContranctNum,
|
|
698
694
|
};
|
|
699
695
|
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)))));
|
|
700
696
|
};
|