ztxkui 4.2.23-578 → 4.2.23-579
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/UI/Detail/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
-
import React, { useMemo } from 'react';
|
|
2
|
+
import React, { useMemo, useRef } from 'react';
|
|
3
3
|
import { DetailHeader, OperationBtnGroup, Container, Button, InputNumber, Input, Tabs, Dropdown, DatePicker, } from '../../index.build';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
4
5
|
var Detail = function () {
|
|
6
|
+
var rangeDatesRef = useRef(null);
|
|
5
7
|
var items = useMemo(function () {
|
|
6
8
|
return Array.from({ length: 26 }, function (_, i) { return ({
|
|
7
9
|
name: "key" + i,
|
|
@@ -16,7 +18,24 @@ var Detail = function () {
|
|
|
16
18
|
React.createElement(DatePicker.TimePicker, null),
|
|
17
19
|
React.createElement(DatePicker.WeekPicker, null),
|
|
18
20
|
React.createElement(DatePicker.YearPicker, null),
|
|
19
|
-
React.createElement(DatePicker.RangePicker,
|
|
21
|
+
React.createElement(DatePicker.RangePicker, { disabledDate: function (current) {
|
|
22
|
+
var _a;
|
|
23
|
+
if (!((_a = rangeDatesRef.current) === null || _a === void 0 ? void 0 : _a[0])) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return (dayjs(current).isAfter(dayjs(rangeDatesRef.current[0]).add(366, 'day')) ||
|
|
27
|
+
dayjs(current).isBefore(dayjs(rangeDatesRef.current[0]).subtract(366, 'day')));
|
|
28
|
+
}, onCalendarChange: function (dates) {
|
|
29
|
+
rangeDatesRef.current = dates;
|
|
30
|
+
}, onOpenChange: function (open) {
|
|
31
|
+
var _a;
|
|
32
|
+
if (!open) {
|
|
33
|
+
// 只在半选状态(只选了开始日期)关闭时清空,完整选择后保留
|
|
34
|
+
if (!((_a = rangeDatesRef.current) === null || _a === void 0 ? void 0 : _a[1])) {
|
|
35
|
+
rangeDatesRef.current = null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} }),
|
|
20
39
|
React.createElement("div", null, i18next.t('详情头部')),
|
|
21
40
|
React.createElement(DetailHeader, { headerName: i18next.t('详情头部'), createrName: i18next.t('创建人'), createDate: "2023-08-01", code: "123456", type: i18next.t('巡检'), detailType: i18next.t('风控巡检'), progress: i18next.t('已完成') }),
|
|
22
41
|
React.createElement("div", { style: { width: 140 } },
|
|
@@ -424,15 +424,9 @@ var Sinatures = function (_a) {
|
|
|
424
424
|
.filter(Boolean);
|
|
425
425
|
var hasMatch = requiredIds.some(function (id) { return selectedSealIds_1.has(id); });
|
|
426
426
|
if (!hasMatch) {
|
|
427
|
-
var requiredSealNames = requiredIds
|
|
428
|
-
.map(function (id) {
|
|
429
|
-
var found = electronicList.find(function (s) { return s.sealId + '' === id; });
|
|
430
|
-
return (found === null || found === void 0 ? void 0 : found.sealName) || id;
|
|
431
|
-
})
|
|
432
|
-
.join('、');
|
|
433
427
|
var msg = i18next.t('当前所选的{{sealName}},要求必须和{{requiredSealNames}}其中之一一起使用,请重新勾选印章。', {
|
|
434
428
|
sealName: seal.sealName,
|
|
435
|
-
requiredSealNames:
|
|
429
|
+
requiredSealNames: seal.useWithSealNames,
|
|
436
430
|
});
|
|
437
431
|
message.warning(msg);
|
|
438
432
|
return;
|
|
@@ -1128,7 +1122,7 @@ var Sinatures = function (_a) {
|
|
|
1128
1122
|
},
|
|
1129
1123
|
/** 签章组件相关校验 */
|
|
1130
1124
|
validateSealFn: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1131
|
-
var hasElectronicSeal, selectedSealIds_2, _i, electronicList_2, seal, requiredIds, hasMatch
|
|
1125
|
+
var hasElectronicSeal, selectedSealIds_2, _i, electronicList_2, seal, requiredIds, hasMatch;
|
|
1132
1126
|
var _a;
|
|
1133
1127
|
return __generator(this, function (_b) {
|
|
1134
1128
|
switch (_b.label) {
|
|
@@ -1212,15 +1206,9 @@ var Sinatures = function (_a) {
|
|
|
1212
1206
|
.filter(Boolean);
|
|
1213
1207
|
hasMatch = requiredIds.some(function (id) { return selectedSealIds_2.has(id); });
|
|
1214
1208
|
if (!hasMatch) {
|
|
1215
|
-
requiredSealNames = requiredIds
|
|
1216
|
-
.map(function (id) {
|
|
1217
|
-
var found = electronicList.find(function (s) { return s.sealId + '' === id; });
|
|
1218
|
-
return (found === null || found === void 0 ? void 0 : found.sealName) || id;
|
|
1219
|
-
})
|
|
1220
|
-
.join('、');
|
|
1221
1209
|
message.warning(i18next.t('当前所选的{{sealName}},要求必须和{{requiredSealNames}}其中之一一起使用,请重新勾选印章。', {
|
|
1222
1210
|
sealName: seal.sealName,
|
|
1223
|
-
requiredSealNames:
|
|
1211
|
+
requiredSealNames: seal.useWithSealNames,
|
|
1224
1212
|
}));
|
|
1225
1213
|
return [2 /*return*/, false];
|
|
1226
1214
|
}
|
|
@@ -461,7 +461,7 @@ var ElectronSignatures = function (props) {
|
|
|
461
461
|
},
|
|
462
462
|
/** 验证组件是否通过校验 */
|
|
463
463
|
validateElectronTable: function (validateInfo) { return __awaiter(void 0, void 0, void 0, function () {
|
|
464
|
-
var validateAttachType, resultData, submitData, currentData, _a, _b, isQunjKey, _c, qunjSealKey, fileList, hasElectronicSeal, electronicSealFileList, hasQunj, electronicSealIdList, docAttachMap, qunjSeal, contractId, isContranctNum, isEdit, needDg, needQys, needQj, preElectronicSealIdList, qunjChecked, isOnlyQj, isValidateAttachTypeIndex, msg, isValidateDgIndex, msg, isValidateAttachType, msg, msg, checkElectron, electronicSealedFileList_1, isMoreQunjCountIndex, msg, isMoreQunjCount, msg, isCheckTakeOutNoAddress, isCheckTakeOutNoAddressIndex, msg, msg, msg, hasNoWritContranctNum, msg, hasNoCheckedQjSeal, msg, noNumSealName_1, hasNoNumCheckedQjSeal, msg, msg,
|
|
464
|
+
var validateAttachType, resultData, submitData, currentData, _a, _b, isQunjKey, _c, qunjSealKey, fileList, hasElectronicSeal, electronicSealFileList, hasQunj, electronicSealIdList, docAttachMap, qunjSeal, contractId, isContranctNum, isEdit, needDg, needQys, needQj, preElectronicSealIdList, qunjChecked, isOnlyQj, isValidateAttachTypeIndex, msg, isValidateDgIndex, msg, isValidateAttachType, msg, msg, checkElectron, electronicSealedFileList_1, isMoreQunjCountIndex, msg, isMoreQunjCount, msg, isCheckTakeOutNoAddress, isCheckTakeOutNoAddressIndex, msg, msg, msg, hasNoWritContranctNum, msg, hasNoCheckedQjSeal, msg, noNumSealName_1, hasNoNumCheckedQjSeal, msg, msg, electronList, selectedSealIds_1, _i, electronList_1, seal, requiredIds, hasMatch, msg;
|
|
465
465
|
var _d, _e, _f, _g, _h, _j, _k;
|
|
466
466
|
return __generator(this, function (_l) {
|
|
467
467
|
validateAttachType = (validateInfo || {}).validateAttachType;
|
|
@@ -767,9 +767,9 @@ var ElectronSignatures = function (props) {
|
|
|
767
767
|
}
|
|
768
768
|
// 5.1 校验契约锁印章中带有"必须共同使用"标识的印章(mustUseWithOthers + useWithSealIds)
|
|
769
769
|
if (isEdit && needQys && electronicSealIdList.length > 0) {
|
|
770
|
-
|
|
770
|
+
electronList = currentData.electronList || [];
|
|
771
771
|
selectedSealIds_1 = new Set(electronicSealIdList.map(function (id) { return id + ''; }));
|
|
772
|
-
for (_i = 0, electronList_1 =
|
|
772
|
+
for (_i = 0, electronList_1 = electronList; _i < electronList_1.length; _i++) {
|
|
773
773
|
seal = electronList_1[_i];
|
|
774
774
|
if (selectedSealIds_1.has(seal.sealId + '') &&
|
|
775
775
|
seal.mustUseWithOthers &&
|
|
@@ -782,15 +782,9 @@ var ElectronSignatures = function (props) {
|
|
|
782
782
|
return selectedSealIds_1.has(id);
|
|
783
783
|
});
|
|
784
784
|
if (!hasMatch) {
|
|
785
|
-
requiredSealNames = requiredIds
|
|
786
|
-
.map(function (id) {
|
|
787
|
-
var found = electronList_2.find(function (s) { return s.sealId + '' === id; });
|
|
788
|
-
return (found === null || found === void 0 ? void 0 : found.sealName) || id;
|
|
789
|
-
})
|
|
790
|
-
.join('、');
|
|
791
785
|
msg = i18next.t('当前所选的{{sealName}},要求必须和{{requiredSealNames}}其中之一一起使用,请重新勾选印章。', {
|
|
792
786
|
sealName: seal.sealName,
|
|
793
|
-
requiredSealNames:
|
|
787
|
+
requiredSealNames: seal.useWithSealNames,
|
|
794
788
|
});
|
|
795
789
|
message.warning(msg);
|
|
796
790
|
return [2 /*return*/, Promise.reject(msg)];
|
|
@@ -81,15 +81,9 @@ export default function useParseElectronSetting(options) {
|
|
|
81
81
|
.filter(Boolean);
|
|
82
82
|
var hasMatch = requiredIds.some(function (id) { return selectedSealIds_1.has(id); });
|
|
83
83
|
if (!hasMatch) {
|
|
84
|
-
var requiredSealNames = requiredIds
|
|
85
|
-
.map(function (id) {
|
|
86
|
-
var found = electronList.find(function (s) { return s.sealId + '' === id; });
|
|
87
|
-
return (found === null || found === void 0 ? void 0 : found.sealName) || id;
|
|
88
|
-
})
|
|
89
|
-
.join('、');
|
|
90
84
|
var msg = i18next.t('当前所选的{{sealName}},要求必须和{{requiredSealNames}}其中之一一起使用,请重新勾选印章。', {
|
|
91
85
|
sealName: seal.sealName,
|
|
92
|
-
requiredSealNames:
|
|
86
|
+
requiredSealNames: seal.useWithSealNames,
|
|
93
87
|
});
|
|
94
88
|
message.warning(msg);
|
|
95
89
|
return;
|