@bit-sun/business-component 2.4.31-alpha.9 → 2.4.32
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/.editorconfig +16 -16
- package/.fatherrc.ts +5 -5
- package/.gitlab-ci.yml +179 -179
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +74 -74
- package/README.md +27 -27
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +950 -1044
- package/dist/index.js +954 -1051
- package/dist/utils/auth.d.ts +0 -1
- package/docs/index.md +21 -21
- package/lib/assets/drag.svg +17 -17
- package/lib/assets/exportFail.svg +37 -37
- package/lib/assets/exportProcessing.svg +28 -28
- package/lib/assets/exportSuccess.svg +34 -34
- package/lib/assets/label_icon_bottom.svg +25 -25
- package/lib/assets/upExport.svg +22 -22
- package/package.json +80 -83
- package/src/assets/32.svg +27 -27
- package/src/assets/addIcon.svg +17 -17
- package/src/assets/allfunc.svg +27 -27
- package/src/assets/arrowRight.svg +24 -24
- package/src/assets/btn-delete.svg +29 -29
- package/src/assets/btn-edit.svg +19 -19
- package/src/assets/btn-more.svg +17 -17
- package/src/assets/btn-submit.svg +19 -19
- package/src/assets/caidan.svg +11 -11
- package/src/assets/close.svg +26 -26
- package/src/assets/drag.svg +17 -17
- package/src/assets/exportFail.svg +37 -37
- package/src/assets/exportProcessing.svg +28 -28
- package/src/assets/exportSuccess.svg +34 -34
- package/src/assets/fixed-left-active.svg +11 -11
- package/src/assets/fixed-left.svg +15 -15
- package/src/assets/fixed-right-active.svg +11 -11
- package/src/assets/fixed-right.svg +15 -15
- package/src/assets/guanbi.svg +15 -15
- package/src/assets/icon-quanping.svg +15 -15
- package/src/assets/icon-shezhi.svg +17 -17
- package/src/assets/label_icon_bottom.svg +25 -25
- package/src/assets/list-no-img.svg +21 -21
- package/src/assets/morentouxiang-32.svg +23 -23
- package/src/assets/scanning.svg +24 -24
- package/src/assets/upExport.svg +22 -22
- package/src/common/ENUM.ts +41 -41
- package/src/components/Business/AddSelectBusiness/index.md +162 -398
- package/src/components/Business/AddSelectBusiness/index.tsx +1062 -1099
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +112 -112
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +158 -157
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
- package/src/components/Business/BsLayouts/index.less +79 -79
- package/src/components/Business/BsLayouts/index.tsx +1484 -1572
- package/src/components/Business/BsLayouts/service.ts +10 -10
- package/src/components/Business/BsLayouts/utils.tsx +203 -205
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +566 -566
- package/src/components/Business/BsSulaQueryTable/index.less +221 -221
- package/src/components/Business/BsSulaQueryTable/index.tsx +606 -560
- package/src/components/Business/BsSulaQueryTable/setting.tsx +854 -854
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
- package/src/components/Business/BsSulaQueryTable/utils.tsx +690 -690
- package/src/components/Business/CommodityEntry/index.md +70 -84
- package/src/components/Business/CommodityEntry/index.tsx +81 -82
- package/src/components/Business/CommonAlert/index.tsx +23 -23
- package/src/components/Business/CommonGuideWrapper/index.less +111 -111
- package/src/components/Business/CommonGuideWrapper/index.md +39 -39
- package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
- package/src/components/Business/DetailPageWrapper/index.less +79 -79
- package/src/components/Business/DetailPageWrapper/index.tsx +315 -316
- package/src/components/Business/DetailPageWrapper/utils.tsx +164 -164
- package/src/components/Business/HomePageWrapper/index.less +33 -33
- package/src/components/Business/HomePageWrapper/index.md +45 -45
- package/src/components/Business/HomePageWrapper/index.tsx +162 -162
- package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +205 -205
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +206 -206
- package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
- package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
- package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
- package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
- package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
- package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
- package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
- package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
- package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
- package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
- package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
- package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
- package/src/components/Business/JsonQueryTable/function.ts +62 -62
- package/src/components/Business/JsonQueryTable/index.less +16 -16
- package/src/components/Business/JsonQueryTable/index.md +328 -328
- package/src/components/Business/JsonQueryTable/index.tsx +537 -537
- package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
- package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
- package/src/components/Business/JsonQueryTable/static.ts +450 -450
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +2120 -2120
- package/src/components/Business/SearchSelect/common.ts +134 -134
- package/src/components/Business/SearchSelect/index.md +1503 -1512
- package/src/components/Business/SearchSelect/index.tsx +55 -55
- package/src/components/Business/SearchSelect/utils.ts +101 -101
- package/src/components/Business/StateFlow/index.less +130 -130
- package/src/components/Business/StateFlow/index.md +60 -60
- package/src/components/Business/StateFlow/index.tsx +29 -29
- package/src/components/Business/TreeSearchSelect/index.md +185 -185
- package/src/components/Business/TreeSearchSelect/index.tsx +33 -33
- package/src/components/Business/TreeSearchSelect/utils.ts +104 -104
- package/src/components/Business/columnSettingTable/columnSetting.tsx +766 -766
- package/src/components/Business/columnSettingTable/index.less +247 -247
- package/src/components/Business/columnSettingTable/index.md +357 -357
- package/src/components/Business/columnSettingTable/index.tsx +235 -235
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +243 -243
- package/src/components/Business/columnSettingTable/utils.tsx +71 -71
- package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +87 -87
- package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
- package/src/components/Business/moreTreeTable/index.less +99 -99
- package/src/components/Business/moreTreeTable/index.md +448 -448
- package/src/components/Business/moreTreeTable/index.tsx +387 -387
- package/src/components/Business/moreTreeTable/utils.ts +126 -126
- package/src/components/Functional/AddSelect/helps.ts +80 -80
- package/src/components/Functional/AddSelect/index.less +367 -367
- package/src/components/Functional/AddSelect/index.md +155 -155
- package/src/components/Functional/AddSelect/index.tsx +1171 -1011
- package/src/components/Functional/BillEntry/index.less +371 -371
- package/src/components/Functional/BillEntry/index.md +39 -39
- package/src/components/Functional/BillEntry/index.tsx +773 -773
- package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -62
- package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -178
- package/src/components/Functional/BsAntdSula/index.ts +2 -2
- package/src/components/Functional/DataImport/index.less +63 -63
- package/src/components/Functional/DataImport/index.md +44 -44
- package/src/components/Functional/DataImport/index.tsx +696 -701
- package/src/components/Functional/DataValidation/index.less +63 -63
- package/src/components/Functional/DataValidation/index.md +39 -52
- package/src/components/Functional/DataValidation/index.tsx +688 -701
- package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -5
- package/src/components/Functional/EllipsisTooltip/index.js +36 -36
- package/src/components/Functional/EllipsisTooltip/index.md +30 -30
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +60 -60
- package/src/components/Functional/QueryMutipleInput/index.less +37 -37
- package/src/components/Functional/QueryMutipleInput/index.md +33 -33
- package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
- package/src/components/Functional/SearchSelect/index.less +115 -115
- package/src/components/Functional/SearchSelect/index.md +141 -141
- package/src/components/Functional/SearchSelect/index.tsx +897 -896
- package/src/components/Functional/SearchSelect/utils.ts +3 -3
- package/src/components/Functional/TreeSearchSelect/index.md +47 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +204 -204
- package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
- package/src/components/Solution/RuleComponent/InnerSelect.tsx +62 -62
- package/src/components/Solution/RuleComponent/index.d.ts +29 -29
- package/src/components/Solution/RuleComponent/index.js +2103 -2103
- package/src/components/Solution/RuleComponent/index.less +229 -229
- package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
- package/src/components/Solution/RuleComponent/ruleFiled.js +2293 -2293
- package/src/components/Solution/RuleComponent/services.ts +13 -13
- package/src/components/Solution/RuleComponent/util.js +143 -143
- package/src/components/Solution/RuleSetter/RuleInstance.tsx +6 -6
- package/src/components/Solution/RuleSetter/baseRule.tsx +368 -368
- package/src/components/Solution/RuleSetter/function.ts +336 -336
- package/src/components/Solution/RuleSetter/index.less +221 -221
- package/src/components/Solution/RuleSetter/index.tsx +208 -208
- package/src/components/Solution/RuleSetter/service.js +276 -276
- package/src/index.ts +40 -41
- package/src/plugin/TableColumnSetting/index.less +247 -247
- package/src/plugin/TableColumnSetting/index.md +50 -50
- package/src/plugin/TableColumnSetting/index.tsx +725 -725
- package/src/plugin/TableColumnSetting/utils.ts +19 -19
- package/src/styles/bsDefault.less +1912 -1912
- package/src/utils/CheckOneUser/index.md +39 -39
- package/src/utils/CheckOneUser/index.ts +51 -51
- package/src/utils/CustomLoginInfo.ts +55 -55
- package/src/utils/LocalstorageUtils.ts +128 -128
- package/src/utils/TableUtils.tsx +18 -18
- package/src/utils/auth.ts +32 -38
- package/src/utils/checkUtils.ts +39 -39
- package/src/utils/enumConfig.ts +16 -16
- package/src/utils/getFormMode.js +12 -12
- package/src/utils/index.ts +12 -12
- package/src/utils/requestUtils.ts +166 -166
- package/src/utils/serialize.js +7 -7
- package/src/utils/utils.ts +195 -195
- package/tsconfig.json +29 -29
- package/typings.d.ts +4 -4
- package/dist/components/Functional/AccessWrapper/index.d.ts +0 -5
- package/dist/components/Functional/AuthButton/index.d.ts +0 -3
- package/src/components/Functional/AccessWrapper/index.tsx +0 -34
- package/src/components/Functional/AuthButton/index.tsx +0 -15
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import cookie from 'js-cookie';
|
|
3
|
-
import { message as message$1, Tooltip, Image, Popover, Card, Avatar, Space, Dropdown, Button, Checkbox, Menu, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col,
|
|
4
|
-
import _, { omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
5
|
-
import memoizeOne from 'memoize-one';
|
|
3
|
+
import { message as message$1, Tooltip, Image, Popover, Card, Avatar, Space, Dropdown, Button, Checkbox, Menu, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix, Cascader, DatePicker, TimePicker, Switch } from 'antd';
|
|
4
|
+
import _, { escapeRegExp, omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
6
5
|
import { formatMessage, history, useLocation, Link, useModel, useIntl } from 'umi';
|
|
7
6
|
import isEqual from 'lodash/isEqual';
|
|
8
7
|
import React$1, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
|
|
@@ -27,9 +26,97 @@ import { parse as parse$1 } from '@babel/parser';
|
|
|
27
26
|
import { visit } from 'ast-types';
|
|
28
27
|
import isArray$1 from 'lodash/isArray';
|
|
29
28
|
|
|
29
|
+
function _arrayLikeToArray(r, a) {
|
|
30
|
+
(null == a || a > r.length) && (a = r.length);
|
|
31
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
function _arrayWithHoles(r) {
|
|
35
|
+
if (Array.isArray(r)) return r;
|
|
36
|
+
}
|
|
37
|
+
function _arrayWithoutHoles(r) {
|
|
38
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
39
|
+
}
|
|
40
|
+
function _assertThisInitialized(e) {
|
|
41
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
42
|
+
return e;
|
|
43
|
+
}
|
|
44
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
45
|
+
try {
|
|
46
|
+
var i = n[a](c),
|
|
47
|
+
u = i.value;
|
|
48
|
+
} catch (n) {
|
|
49
|
+
return void e(n);
|
|
50
|
+
}
|
|
51
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
52
|
+
}
|
|
53
|
+
function _asyncToGenerator(n) {
|
|
54
|
+
return function () {
|
|
55
|
+
var t = this,
|
|
56
|
+
e = arguments;
|
|
57
|
+
return new Promise(function (r, o) {
|
|
58
|
+
var a = n.apply(t, e);
|
|
59
|
+
function _next(n) {
|
|
60
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
61
|
+
}
|
|
62
|
+
function _throw(n) {
|
|
63
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
64
|
+
}
|
|
65
|
+
_next(void 0);
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
30
69
|
function _callSuper(t, o, e) {
|
|
31
70
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
32
71
|
}
|
|
72
|
+
function _classCallCheck(a, n) {
|
|
73
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
74
|
+
}
|
|
75
|
+
function _defineProperties(e, r) {
|
|
76
|
+
for (var t = 0; t < r.length; t++) {
|
|
77
|
+
var o = r[t];
|
|
78
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function _createClass(e, r, t) {
|
|
82
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
83
|
+
writable: !1
|
|
84
|
+
}), e;
|
|
85
|
+
}
|
|
86
|
+
function _defineProperty(e, r, t) {
|
|
87
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
88
|
+
value: t,
|
|
89
|
+
enumerable: !0,
|
|
90
|
+
configurable: !0,
|
|
91
|
+
writable: !0
|
|
92
|
+
}) : e[r] = t, e;
|
|
93
|
+
}
|
|
94
|
+
function _extends() {
|
|
95
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
96
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
97
|
+
var t = arguments[e];
|
|
98
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
99
|
+
}
|
|
100
|
+
return n;
|
|
101
|
+
}, _extends.apply(null, arguments);
|
|
102
|
+
}
|
|
103
|
+
function _getPrototypeOf(t) {
|
|
104
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
105
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
106
|
+
}, _getPrototypeOf(t);
|
|
107
|
+
}
|
|
108
|
+
function _inherits(t, e) {
|
|
109
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
110
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
111
|
+
constructor: {
|
|
112
|
+
value: t,
|
|
113
|
+
writable: !0,
|
|
114
|
+
configurable: !0
|
|
115
|
+
}
|
|
116
|
+
}), Object.defineProperty(t, "prototype", {
|
|
117
|
+
writable: !1
|
|
118
|
+
}), e && _setPrototypeOf(t, e);
|
|
119
|
+
}
|
|
33
120
|
function _isNativeReflectConstruct() {
|
|
34
121
|
try {
|
|
35
122
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -38,6 +125,9 @@ function _isNativeReflectConstruct() {
|
|
|
38
125
|
return !!t;
|
|
39
126
|
})();
|
|
40
127
|
}
|
|
128
|
+
function _iterableToArray(r) {
|
|
129
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
130
|
+
}
|
|
41
131
|
function _iterableToArrayLimit(r, l) {
|
|
42
132
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
43
133
|
if (null != t) {
|
|
@@ -65,6 +155,15 @@ function _iterableToArrayLimit(r, l) {
|
|
|
65
155
|
return a;
|
|
66
156
|
}
|
|
67
157
|
}
|
|
158
|
+
function _nonIterableRest() {
|
|
159
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
160
|
+
}
|
|
161
|
+
function _nonIterableSpread() {
|
|
162
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
163
|
+
}
|
|
164
|
+
function _objectDestructuringEmpty(t) {
|
|
165
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
166
|
+
}
|
|
68
167
|
function ownKeys(e, r) {
|
|
69
168
|
var t = Object.keys(e);
|
|
70
169
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -86,6 +185,31 @@ function _objectSpread2(e) {
|
|
|
86
185
|
}
|
|
87
186
|
return e;
|
|
88
187
|
}
|
|
188
|
+
function _objectWithoutProperties(e, t) {
|
|
189
|
+
if (null == e) return {};
|
|
190
|
+
var o,
|
|
191
|
+
r,
|
|
192
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
193
|
+
if (Object.getOwnPropertySymbols) {
|
|
194
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
195
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
196
|
+
}
|
|
197
|
+
return i;
|
|
198
|
+
}
|
|
199
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
200
|
+
if (null == r) return {};
|
|
201
|
+
var t = {};
|
|
202
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
203
|
+
if (e.indexOf(n) >= 0) continue;
|
|
204
|
+
t[n] = r[n];
|
|
205
|
+
}
|
|
206
|
+
return t;
|
|
207
|
+
}
|
|
208
|
+
function _possibleConstructorReturn(t, e) {
|
|
209
|
+
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
210
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
211
|
+
return _assertThisInitialized(t);
|
|
212
|
+
}
|
|
89
213
|
function _regeneratorRuntime() {
|
|
90
214
|
_regeneratorRuntime = function () {
|
|
91
215
|
return e;
|
|
@@ -387,6 +511,20 @@ function _regeneratorRuntime() {
|
|
|
387
511
|
}
|
|
388
512
|
}, e;
|
|
389
513
|
}
|
|
514
|
+
function _setPrototypeOf(t, e) {
|
|
515
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
516
|
+
return t.__proto__ = e, t;
|
|
517
|
+
}, _setPrototypeOf(t, e);
|
|
518
|
+
}
|
|
519
|
+
function _slicedToArray(r, e) {
|
|
520
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
521
|
+
}
|
|
522
|
+
function _toArray(r) {
|
|
523
|
+
return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
|
|
524
|
+
}
|
|
525
|
+
function _toConsumableArray(r) {
|
|
526
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
527
|
+
}
|
|
390
528
|
function _toPrimitive(t, r) {
|
|
391
529
|
if ("object" != typeof t || !t) return t;
|
|
392
530
|
var e = t[Symbol.toPrimitive];
|
|
@@ -410,194 +548,12 @@ function _typeof(o) {
|
|
|
410
548
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
411
549
|
}, _typeof(o);
|
|
412
550
|
}
|
|
413
|
-
function
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
var
|
|
417
|
-
|
|
418
|
-
reject(error);
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
if (info.done) {
|
|
422
|
-
resolve(value);
|
|
423
|
-
} else {
|
|
424
|
-
Promise.resolve(value).then(_next, _throw);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
function _asyncToGenerator(fn) {
|
|
428
|
-
return function () {
|
|
429
|
-
var self = this,
|
|
430
|
-
args = arguments;
|
|
431
|
-
return new Promise(function (resolve, reject) {
|
|
432
|
-
var gen = fn.apply(self, args);
|
|
433
|
-
function _next(value) {
|
|
434
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
435
|
-
}
|
|
436
|
-
function _throw(err) {
|
|
437
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
438
|
-
}
|
|
439
|
-
_next(undefined);
|
|
440
|
-
});
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
function _classCallCheck(instance, Constructor) {
|
|
444
|
-
if (!(instance instanceof Constructor)) {
|
|
445
|
-
throw new TypeError("Cannot call a class as a function");
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
function _defineProperties(target, props) {
|
|
449
|
-
for (var i = 0; i < props.length; i++) {
|
|
450
|
-
var descriptor = props[i];
|
|
451
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
452
|
-
descriptor.configurable = true;
|
|
453
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
454
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
458
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
459
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
460
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
461
|
-
writable: false
|
|
462
|
-
});
|
|
463
|
-
return Constructor;
|
|
464
|
-
}
|
|
465
|
-
function _defineProperty(obj, key, value) {
|
|
466
|
-
key = _toPropertyKey(key);
|
|
467
|
-
if (key in obj) {
|
|
468
|
-
Object.defineProperty(obj, key, {
|
|
469
|
-
value: value,
|
|
470
|
-
enumerable: true,
|
|
471
|
-
configurable: true,
|
|
472
|
-
writable: true
|
|
473
|
-
});
|
|
474
|
-
} else {
|
|
475
|
-
obj[key] = value;
|
|
476
|
-
}
|
|
477
|
-
return obj;
|
|
478
|
-
}
|
|
479
|
-
function _extends() {
|
|
480
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
481
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
482
|
-
var source = arguments[i];
|
|
483
|
-
for (var key in source) {
|
|
484
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
485
|
-
target[key] = source[key];
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return target;
|
|
490
|
-
};
|
|
491
|
-
return _extends.apply(this, arguments);
|
|
492
|
-
}
|
|
493
|
-
function _inherits(subClass, superClass) {
|
|
494
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
495
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
496
|
-
}
|
|
497
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
498
|
-
constructor: {
|
|
499
|
-
value: subClass,
|
|
500
|
-
writable: true,
|
|
501
|
-
configurable: true
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
Object.defineProperty(subClass, "prototype", {
|
|
505
|
-
writable: false
|
|
506
|
-
});
|
|
507
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
508
|
-
}
|
|
509
|
-
function _getPrototypeOf(o) {
|
|
510
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
511
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
512
|
-
};
|
|
513
|
-
return _getPrototypeOf(o);
|
|
514
|
-
}
|
|
515
|
-
function _setPrototypeOf(o, p) {
|
|
516
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
517
|
-
o.__proto__ = p;
|
|
518
|
-
return o;
|
|
519
|
-
};
|
|
520
|
-
return _setPrototypeOf(o, p);
|
|
521
|
-
}
|
|
522
|
-
function _objectDestructuringEmpty(obj) {
|
|
523
|
-
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
524
|
-
}
|
|
525
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
526
|
-
if (source == null) return {};
|
|
527
|
-
var target = {};
|
|
528
|
-
for (var key in source) {
|
|
529
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
530
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
531
|
-
target[key] = source[key];
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
return target;
|
|
535
|
-
}
|
|
536
|
-
function _objectWithoutProperties(source, excluded) {
|
|
537
|
-
if (source == null) return {};
|
|
538
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
539
|
-
var key, i;
|
|
540
|
-
if (Object.getOwnPropertySymbols) {
|
|
541
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
542
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
543
|
-
key = sourceSymbolKeys[i];
|
|
544
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
545
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
546
|
-
target[key] = source[key];
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
return target;
|
|
550
|
-
}
|
|
551
|
-
function _assertThisInitialized(self) {
|
|
552
|
-
if (self === void 0) {
|
|
553
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
554
|
-
}
|
|
555
|
-
return self;
|
|
556
|
-
}
|
|
557
|
-
function _possibleConstructorReturn(self, call) {
|
|
558
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
559
|
-
return call;
|
|
560
|
-
} else if (call !== void 0) {
|
|
561
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
551
|
+
function _unsupportedIterableToArray(r, a) {
|
|
552
|
+
if (r) {
|
|
553
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
554
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
555
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
562
556
|
}
|
|
563
|
-
return _assertThisInitialized(self);
|
|
564
|
-
}
|
|
565
|
-
function _slicedToArray(arr, i) {
|
|
566
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
567
|
-
}
|
|
568
|
-
function _toArray(arr) {
|
|
569
|
-
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
570
|
-
}
|
|
571
|
-
function _toConsumableArray(arr) {
|
|
572
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
573
|
-
}
|
|
574
|
-
function _arrayWithoutHoles(arr) {
|
|
575
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
576
|
-
}
|
|
577
|
-
function _arrayWithHoles(arr) {
|
|
578
|
-
if (Array.isArray(arr)) return arr;
|
|
579
|
-
}
|
|
580
|
-
function _iterableToArray(iter) {
|
|
581
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
582
|
-
}
|
|
583
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
584
|
-
if (!o) return;
|
|
585
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
586
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
587
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
588
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
589
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
590
|
-
}
|
|
591
|
-
function _arrayLikeToArray(arr, len) {
|
|
592
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
593
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
594
|
-
return arr2;
|
|
595
|
-
}
|
|
596
|
-
function _nonIterableSpread() {
|
|
597
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
598
|
-
}
|
|
599
|
-
function _nonIterableRest() {
|
|
600
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
601
557
|
}
|
|
602
558
|
|
|
603
559
|
var ENUM = {
|
|
@@ -969,6 +925,43 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
|
|
|
969
925
|
return '';
|
|
970
926
|
};
|
|
971
927
|
|
|
928
|
+
var simpleIsEqual = function simpleIsEqual(a, b) {
|
|
929
|
+
return a === b;
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
function index$1 (resultFn, isEqual) {
|
|
933
|
+
if (isEqual === void 0) {
|
|
934
|
+
isEqual = simpleIsEqual;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
var lastThis;
|
|
938
|
+
var lastArgs = [];
|
|
939
|
+
var lastResult;
|
|
940
|
+
var calledOnce = false;
|
|
941
|
+
|
|
942
|
+
var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
|
|
943
|
+
return isEqual(newArg, lastArgs[index], index);
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
var result = function result() {
|
|
947
|
+
for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
948
|
+
newArgs[_key] = arguments[_key];
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
|
|
952
|
+
return lastResult;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
lastResult = resultFn.apply(this, newArgs);
|
|
956
|
+
calledOnce = true;
|
|
957
|
+
lastThis = this;
|
|
958
|
+
lastArgs = newArgs;
|
|
959
|
+
return lastResult;
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
return result;
|
|
963
|
+
}
|
|
964
|
+
|
|
972
965
|
function styleInject(css, ref) {
|
|
973
966
|
if ( ref === void 0 ) ref = {};
|
|
974
967
|
var insertAt = ref.insertAt;
|
|
@@ -1292,7 +1285,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
|
|
|
1292
1285
|
return item;
|
|
1293
1286
|
});
|
|
1294
1287
|
};
|
|
1295
|
-
var memoizeOneFormatter =
|
|
1288
|
+
var memoizeOneFormatter = index$1(formatter, isEqual);
|
|
1296
1289
|
var go2BackAndClose = function go2BackAndClose(backHistoryPath) {
|
|
1297
1290
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
1298
1291
|
if (backHistoryPath) {
|
|
@@ -1453,7 +1446,7 @@ var judgeIsEmpty = function judgeIsEmpty(value) {
|
|
|
1453
1446
|
// 判断某个按钮/菜单 是否有权限,返回布尔值
|
|
1454
1447
|
var authFunc = function authFunc(code) {
|
|
1455
1448
|
var _JSON$parse;
|
|
1456
|
-
return
|
|
1449
|
+
return (_JSON$parse = JSON.parse(localStorage.getItem(getMenuAuthDataKey()) || '[]')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.find(function (d) {
|
|
1457
1450
|
return d === code;
|
|
1458
1451
|
});
|
|
1459
1452
|
};
|
|
@@ -1479,11 +1472,6 @@ var handleJudgeAuthButtons = function handleJudgeAuthButtons(buttonCodeArray) {
|
|
|
1479
1472
|
});
|
|
1480
1473
|
return result;
|
|
1481
1474
|
};
|
|
1482
|
-
// 判断何时菜单权限和表格权限生效
|
|
1483
|
-
var shouldUseAuth = function shouldUseAuth() {
|
|
1484
|
-
// @ts-ignore
|
|
1485
|
-
return window.__POWERED_BY_WUJIE__ ? true : false;
|
|
1486
|
-
};
|
|
1487
1475
|
|
|
1488
1476
|
var css_248z$1 = ".luckysheet {\n overflow: hidden;\n}\n.luckysheet .luckysheet-work-area.luckysheet-noselected-text {\n display: none;\n}\n.sheet_table_top {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_top .menu_item_text {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.sheet_table_footer {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_text {\n color: #8f8f8f;\n}\n.sheet_table_dnd_text {\n background: #f2f2f2;\n border: 1px solid #d8d8d8;\n display: inline-block;\n width: 100px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n";
|
|
1489
1477
|
styleInject(css_248z$1);
|
|
@@ -1532,21 +1520,8 @@ var filterLetters = function filterLetters(i) {
|
|
|
1532
1520
|
return undefined;
|
|
1533
1521
|
}
|
|
1534
1522
|
};
|
|
1535
|
-
// 抽象出创建对象的共通逻辑
|
|
1536
|
-
function createItem(idPrefix, index, title, name, format) {
|
|
1537
|
-
return {
|
|
1538
|
-
id: "".concat(idPrefix).concat(index),
|
|
1539
|
-
content: title,
|
|
1540
|
-
code: name,
|
|
1541
|
-
"ct": format //单元格值格式
|
|
1542
|
-
};
|
|
1543
|
-
}
|
|
1544
|
-
// 定义[单元格值]常量以避免魔术字符串
|
|
1545
|
-
var FORMAT_NAME_GENERAL = "General"; //格式名称为自动格式
|
|
1546
|
-
var FORMAT_TYPE_STRING = "s"; //格式类型为数字类型
|
|
1547
1523
|
var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
1548
1524
|
function DataValidation(props) {
|
|
1549
|
-
var _props$customerColumn;
|
|
1550
1525
|
var _this;
|
|
1551
1526
|
_classCallCheck(this, DataValidation);
|
|
1552
1527
|
_this = _callSuper(this, DataValidation, [props]);
|
|
@@ -1561,7 +1536,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1561
1536
|
};
|
|
1562
1537
|
_this.setConfig = function (data) {
|
|
1563
1538
|
var items = _this.state.items;
|
|
1564
|
-
var notValid = _this.props.notValid;
|
|
1565
1539
|
return {
|
|
1566
1540
|
container: 'luckysheet',
|
|
1567
1541
|
showtoolbar: false,
|
|
@@ -1570,7 +1544,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1570
1544
|
if (columnAbc.name) {
|
|
1571
1545
|
var charCode = columnAbc.name.charCodeAt();
|
|
1572
1546
|
if (charCode - 65 <= items.length) {
|
|
1573
|
-
columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content :
|
|
1547
|
+
columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : '校验结果';
|
|
1574
1548
|
} else {
|
|
1575
1549
|
columnAbc.name = '';
|
|
1576
1550
|
}
|
|
@@ -1923,7 +1897,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1923
1897
|
onClick: function onClick() {
|
|
1924
1898
|
return _this.filterData('all');
|
|
1925
1899
|
}
|
|
1926
|
-
}, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React$1.createElement(Menu.Divider, null),
|
|
1900
|
+
}, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React$1.createElement(Menu.Divider, null), /*#__PURE__*/React$1.createElement(Menu.Item, {
|
|
1927
1901
|
key: "2",
|
|
1928
1902
|
className: "sheet_table-menu_item_text"
|
|
1929
1903
|
}, /*#__PURE__*/React$1.createElement("a", {
|
|
@@ -1966,22 +1940,18 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1966
1940
|
}), provided.placeholder);
|
|
1967
1941
|
}))));
|
|
1968
1942
|
_this.props.onRef(_this);
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
|
|
1982
|
-
return createItem('item-0', index, mapping.get(item), item, format);
|
|
1983
|
-
})) || [];
|
|
1984
|
-
}
|
|
1943
|
+
itemsTemp = props.columns.map(function (item, index) {
|
|
1944
|
+
if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
|
|
1945
|
+
return {
|
|
1946
|
+
id: "item-0".concat(index),
|
|
1947
|
+
content: mapping.get(item),
|
|
1948
|
+
code: item,
|
|
1949
|
+
"ct": {
|
|
1950
|
+
"fa": "General",
|
|
1951
|
+
"t": "s" //格式类型为数字类型
|
|
1952
|
+
}
|
|
1953
|
+
};
|
|
1954
|
+
});
|
|
1985
1955
|
luckysheet = window.luckysheet || window.top.luckysheet;
|
|
1986
1956
|
_this.state = {
|
|
1987
1957
|
showErrorData: false,
|
|
@@ -2022,9 +1992,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2022
1992
|
key: "render",
|
|
2023
1993
|
value: function render() {
|
|
2024
1994
|
var errorListCheck = this.state.errorListCheck;
|
|
2025
|
-
var
|
|
2026
|
-
title = _this$props2.title,
|
|
2027
|
-
notValid = _this$props2.notValid;
|
|
1995
|
+
var title = this.props.title;
|
|
2028
1996
|
var totalSummary = this.getCount();
|
|
2029
1997
|
var luckyCss = {
|
|
2030
1998
|
margin: '0px',
|
|
@@ -2047,7 +2015,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2047
2015
|
trigger: ['click'],
|
|
2048
2016
|
overlay: this.menuList,
|
|
2049
2017
|
placement: "bottomRight"
|
|
2050
|
-
}, /*#__PURE__*/React$1.createElement(Button, null, "\u6E05\u7A7A", /*#__PURE__*/React$1.createElement(DownOutlined, null))),
|
|
2018
|
+
}, /*#__PURE__*/React$1.createElement(Button, null, "\u6E05\u7A7A", /*#__PURE__*/React$1.createElement(DownOutlined, null))), /*#__PURE__*/React$1.createElement(Button, {
|
|
2051
2019
|
type: "primary",
|
|
2052
2020
|
onClick: this.resetData
|
|
2053
2021
|
}, "\u8BC6\u522B"))), /*#__PURE__*/React$1.createElement("div", {
|
|
@@ -2058,11 +2026,11 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2058
2026
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2059
2027
|
id: "luckysheet",
|
|
2060
2028
|
style: luckyCss
|
|
2061
|
-
})),
|
|
2029
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2062
2030
|
className: "sheet_table_footer"
|
|
2063
2031
|
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2064
2032
|
className: "sheet_table_footer_l"
|
|
2065
|
-
}, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E
|
|
2033
|
+
}, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E, \u5176\u4E2D\u9519\u8BEF ", totalSummary.error, " \u9879"), /*#__PURE__*/React$1.createElement(Space, {
|
|
2066
2034
|
className: "sheet_table_footer_r"
|
|
2067
2035
|
}, /*#__PURE__*/React$1.createElement(Checkbox, {
|
|
2068
2036
|
checked: errorListCheck,
|
|
@@ -2119,21 +2087,8 @@ var filterLetters$1 = function filterLetters(i) {
|
|
|
2119
2087
|
return undefined;
|
|
2120
2088
|
}
|
|
2121
2089
|
};
|
|
2122
|
-
// 抽象出创建对象的共通逻辑
|
|
2123
|
-
function createItem$1(idPrefix, index, title, name, format) {
|
|
2124
|
-
return {
|
|
2125
|
-
id: "".concat(idPrefix).concat(index),
|
|
2126
|
-
content: title,
|
|
2127
|
-
code: name,
|
|
2128
|
-
"ct": format //单元格值格式
|
|
2129
|
-
};
|
|
2130
|
-
}
|
|
2131
|
-
// 定义[单元格值]常量以避免魔术字符串
|
|
2132
|
-
var FORMAT_NAME_GENERAL$1 = "General"; //格式名称为自动格式
|
|
2133
|
-
var FORMAT_TYPE_STRING$1 = "s"; //格式类型为数字类型
|
|
2134
2090
|
var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
2135
2091
|
function DataImport(props) {
|
|
2136
|
-
var _props$customerColumn;
|
|
2137
2092
|
var _this;
|
|
2138
2093
|
_classCallCheck(this, DataImport);
|
|
2139
2094
|
_this = _callSuper(this, DataImport, [props]);
|
|
@@ -2375,32 +2330,22 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2375
2330
|
});
|
|
2376
2331
|
return obj;
|
|
2377
2332
|
});
|
|
2378
|
-
return data
|
|
2333
|
+
return data.filter(function (item) {
|
|
2334
|
+
return item[_this.props.customerColumnsMapping[0].name];
|
|
2335
|
+
});
|
|
2379
2336
|
};
|
|
2380
2337
|
_this.resetData = function () {
|
|
2381
2338
|
var _this$props = _this.props,
|
|
2382
2339
|
validDataUrl = _this$props.validDataUrl,
|
|
2383
|
-
validDataParams = _this$props.validDataParams,
|
|
2384
2340
|
updateData = _this$props.updateData,
|
|
2385
|
-
columns = _this$props.columns
|
|
2386
|
-
isBrandAuth = _this$props.isBrandAuth,
|
|
2387
|
-
_this$props$isCheckSt = _this$props.isCheckStockNum,
|
|
2388
|
-
isCheckStockNum = _this$props$isCheckSt === void 0 ? true : _this$props$isCheckSt;
|
|
2341
|
+
columns = _this$props.columns;
|
|
2389
2342
|
var resultData = _this.getData().filter(function (d) {
|
|
2390
2343
|
return _.compact(Object.values(d)).length;
|
|
2391
2344
|
});
|
|
2392
|
-
|
|
2393
|
-
var otherParams = {};
|
|
2394
|
-
if (isBrandAuth) {
|
|
2395
|
-
otherParams = {
|
|
2396
|
-
brandAuth: 'ctl-withAuth'
|
|
2397
|
-
};
|
|
2398
|
-
}
|
|
2399
|
-
axios.post(validDataUrl, _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams), validDataParams), {}, {
|
|
2345
|
+
axios.post(validDataUrl, {
|
|
2400
2346
|
columns: columns,
|
|
2401
|
-
data: resultData
|
|
2402
|
-
|
|
2403
|
-
})).then(function (result) {
|
|
2347
|
+
data: resultData
|
|
2348
|
+
}).then(function (result) {
|
|
2404
2349
|
result = result.data;
|
|
2405
2350
|
if (judgeIsRequestError(result)) {
|
|
2406
2351
|
message$1.error(result.msg);
|
|
@@ -2553,21 +2498,31 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2553
2498
|
}), provided.placeholder);
|
|
2554
2499
|
}))));
|
|
2555
2500
|
_this.props.onRef(_this);
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2501
|
+
if (props.customerColumnsMapping) {
|
|
2502
|
+
itemsTemp$1 = props.customerColumnsMapping.map(function (item, index) {
|
|
2503
|
+
return {
|
|
2504
|
+
id: "item-0".concat(index),
|
|
2505
|
+
content: item.title,
|
|
2506
|
+
code: item.name,
|
|
2507
|
+
"ct": {
|
|
2508
|
+
"fa": "General",
|
|
2509
|
+
"t": "s" //格式类型为数字类型
|
|
2510
|
+
}
|
|
2511
|
+
};
|
|
2512
|
+
});
|
|
2565
2513
|
} else {
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2514
|
+
itemsTemp$1 = props.columns.map(function (item, index) {
|
|
2515
|
+
if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataImport component, please fix this error"));
|
|
2516
|
+
return {
|
|
2517
|
+
id: "item-0".concat(index),
|
|
2518
|
+
content: mapping$1.get(item),
|
|
2519
|
+
code: item,
|
|
2520
|
+
"ct": {
|
|
2521
|
+
"fa": "General",
|
|
2522
|
+
"t": "s" //格式类型为数字类型
|
|
2523
|
+
}
|
|
2524
|
+
};
|
|
2525
|
+
});
|
|
2571
2526
|
}
|
|
2572
2527
|
luckysheet$1 = window.luckysheet || window.top.luckysheet;
|
|
2573
2528
|
_this.state = {
|
|
@@ -2611,7 +2566,8 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2611
2566
|
var errorListCheck = this.state.errorListCheck;
|
|
2612
2567
|
var _this$props2 = this.props,
|
|
2613
2568
|
title = _this$props2.title,
|
|
2614
|
-
notValid = _this$props2.notValid
|
|
2569
|
+
notValid = _this$props2.notValid,
|
|
2570
|
+
customerColumnsMapping = _this$props2.customerColumnsMapping;
|
|
2615
2571
|
var totalSummary = this.getCount();
|
|
2616
2572
|
var luckyCss = {
|
|
2617
2573
|
margin: '0px',
|
|
@@ -2824,7 +2780,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2824
2780
|
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket,
|
|
2825
2781
|
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
2826
2782
|
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit;
|
|
2827
|
-
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) ||
|
|
2783
|
+
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2828
2784
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2829
2785
|
var initVal = value || (selectMode ? [] : null);
|
|
2830
2786
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
@@ -3425,8 +3381,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3425
3381
|
if (heightTxt === '') {
|
|
3426
3382
|
return text;
|
|
3427
3383
|
}
|
|
3384
|
+
var searchString = escapeRegExp(heightTxt);
|
|
3428
3385
|
// 前面filterOption 不区分大小写,这里用i
|
|
3429
|
-
var regexp = new RegExp(
|
|
3386
|
+
var regexp = new RegExp(searchString, 'gi');
|
|
3430
3387
|
return text.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
|
|
3431
3388
|
};
|
|
3432
3389
|
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
@@ -4488,7 +4445,7 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
|
|
|
4488
4445
|
var _item$dataSource;
|
|
4489
4446
|
var result = [];
|
|
4490
4447
|
if (item === null || item === void 0 ? void 0 : item.dataSourceCode) {
|
|
4491
|
-
result =
|
|
4448
|
+
result = record === null || record === void 0 ? void 0 : record[item === null || item === void 0 ? void 0 : item.dataSourceCode];
|
|
4492
4449
|
}
|
|
4493
4450
|
if (item === null || item === void 0 ? void 0 : (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
|
|
4494
4451
|
result = (item === null || item === void 0 ? void 0 : item.filterDataSourceCode) ? item.dataSource.filter(function (i) {
|
|
@@ -4602,11 +4559,12 @@ var ResizeableTitle = function ResizeableTitle(props) {
|
|
|
4602
4559
|
var initTableCode = {
|
|
4603
4560
|
'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
|
|
4604
4561
|
'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
|
|
4605
|
-
'spu': ['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']
|
|
4562
|
+
'spu': [['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']]
|
|
4606
4563
|
};
|
|
4607
4564
|
var Option$2 = Select.Option;
|
|
4608
4565
|
var AddSelect = function AddSelect(props) {
|
|
4609
4566
|
var value = props.value,
|
|
4567
|
+
onChange = props.onChange,
|
|
4610
4568
|
_props$selectProps = props.selectProps,
|
|
4611
4569
|
selectProps = _props$selectProps === void 0 ? {} : _props$selectProps,
|
|
4612
4570
|
_props$modalTableProp = props.modalTableProps,
|
|
@@ -4614,7 +4572,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
4614
4572
|
_props$labelInValue = props.labelInValue,
|
|
4615
4573
|
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
4616
4574
|
requestConfig = props.requestConfig,
|
|
4575
|
+
ctx = props.ctx,
|
|
4617
4576
|
sourceName = props.sourceName,
|
|
4577
|
+
_props$needModalTable = props.needModalTable,
|
|
4578
|
+
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
4579
|
+
_props$getPopupContai = props.getPopupContainer,
|
|
4618
4580
|
onSaveCallback = props.onSaveCallback,
|
|
4619
4581
|
_props$buttonText = props.buttonText,
|
|
4620
4582
|
buttonText = _props$buttonText === void 0 ? '添加' : _props$buttonText,
|
|
@@ -4631,8 +4593,15 @@ var AddSelect = function AddSelect(props) {
|
|
|
4631
4593
|
url = _ref.url,
|
|
4632
4594
|
otherParams = _ref.otherParams,
|
|
4633
4595
|
isMap = _ref.isMap,
|
|
4596
|
+
fixedparameter = _ref.fixedparameter,
|
|
4597
|
+
fieldValToParam = _ref.fieldValToParam,
|
|
4598
|
+
_ref$mappingTextField = _ref.mappingTextField,
|
|
4599
|
+
mappingTextField = _ref$mappingTextField === void 0 ? 'name' : _ref$mappingTextField,
|
|
4600
|
+
mappingTextShowKeyField = _ref.mappingTextShowKeyField,
|
|
4634
4601
|
_ref$mappingValueFiel = _ref.mappingValueField,
|
|
4635
|
-
mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel
|
|
4602
|
+
mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel,
|
|
4603
|
+
mappingTextShowTextField = _ref.mappingTextShowTextField;
|
|
4604
|
+
var resultSourceKey = sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode';
|
|
4636
4605
|
var realButtonProps = _objectSpread2({
|
|
4637
4606
|
type: "primary"
|
|
4638
4607
|
}, buttonProps);
|
|
@@ -4642,82 +4611,138 @@ var AddSelect = function AddSelect(props) {
|
|
|
4642
4611
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
4643
4612
|
var tableInitPageSize = 10; // 弹框默认分页 条数
|
|
4644
4613
|
var currentPage = 1;
|
|
4645
|
-
var
|
|
4614
|
+
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
4615
|
+
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
4616
|
+
var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
|
|
4617
|
+
// 以下属性不可更改----设计配置项
|
|
4618
|
+
showSearch: false,
|
|
4619
|
+
filterOption: false,
|
|
4620
|
+
allowClear: true,
|
|
4621
|
+
listHeight: 160,
|
|
4622
|
+
optionLabelProp: "label",
|
|
4623
|
+
autoClearSearchValue: false
|
|
4624
|
+
});
|
|
4625
|
+
var _useState = useState([]),
|
|
4646
4626
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
var _useState3 = useState(
|
|
4627
|
+
items = _useState2[0],
|
|
4628
|
+
setItems = _useState2[1];
|
|
4629
|
+
var _useState3 = useState(1),
|
|
4650
4630
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
var _useState5 = useState(
|
|
4631
|
+
scrollPage = _useState4[0],
|
|
4632
|
+
setScrollPage = _useState4[1];
|
|
4633
|
+
var _useState5 = useState(0),
|
|
4654
4634
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
var _useState7 = useState(
|
|
4635
|
+
itemsTotal = _useState6[0],
|
|
4636
|
+
setItemsTotal = _useState6[1];
|
|
4637
|
+
var _useState7 = useState(false),
|
|
4658
4638
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
var
|
|
4662
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
4663
|
-
form = _Form$useForm2[0];
|
|
4664
|
-
var _useState9 = useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
|
|
4639
|
+
fetching = _useState8[0],
|
|
4640
|
+
setFetching = _useState8[1];
|
|
4641
|
+
var _useState9 = useState(''),
|
|
4665
4642
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
var _useState11 = useState(
|
|
4643
|
+
searchValue = _useState10[0],
|
|
4644
|
+
setSearchValue = _useState10[1];
|
|
4645
|
+
var _useState11 = useState(false),
|
|
4669
4646
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
var _useState13 = useState(
|
|
4647
|
+
isModalVisible = _useState12[0],
|
|
4648
|
+
setIsModalVisible = _useState12[1];
|
|
4649
|
+
var _useState13 = useState(initVal),
|
|
4673
4650
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
var _useState15 = useState(
|
|
4651
|
+
popvalue = _useState14[0],
|
|
4652
|
+
setPopValue = _useState14[1];
|
|
4653
|
+
var _useState15 = useState(sourceName),
|
|
4654
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
4655
|
+
uniqueValue = _useState16[0],
|
|
4656
|
+
setUniqueValue = _useState16[1];
|
|
4657
|
+
var _useDebounceFn = useDebounceFn(function (v) {
|
|
4658
|
+
// 优化搜索参数 支持传多个
|
|
4659
|
+
var searchParams = {};
|
|
4660
|
+
if (typeof selectParamsKey === 'string') {
|
|
4661
|
+
searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
|
|
4662
|
+
}
|
|
4663
|
+
if (Array.isArray(selectParamsKey)) {
|
|
4664
|
+
selectParamsKey.forEach(function (i) {
|
|
4665
|
+
searchParams = _objectSpread2(_objectSpread2({}, searchParams), {}, _defineProperty({}, i, searchValue));
|
|
4666
|
+
});
|
|
4667
|
+
}
|
|
4668
|
+
// 防抖函数 待定
|
|
4669
|
+
getData(searchParams);
|
|
4670
|
+
}, {
|
|
4671
|
+
wait: 1000
|
|
4672
|
+
}),
|
|
4673
|
+
run = _useDebounceFn.run;
|
|
4674
|
+
var _Form$useForm = Form.useForm(),
|
|
4675
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
4676
|
+
form = _Form$useForm2[0];
|
|
4677
|
+
var _useState17 = useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
|
|
4678
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
4679
|
+
tableSearchForm = _useState18[0],
|
|
4680
|
+
setTableSearchForm = _useState18[1];
|
|
4681
|
+
var _useState19 = useState(true),
|
|
4682
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
4683
|
+
caretLeftFlag = _useState20[0],
|
|
4684
|
+
setCaretLeftFlag = _useState20[1];
|
|
4685
|
+
var _useState21 = useState([]),
|
|
4686
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
4687
|
+
tableData = _useState22[0],
|
|
4688
|
+
setTableData = _useState22[1];
|
|
4689
|
+
var _useState23 = useState({
|
|
4677
4690
|
total: 0,
|
|
4678
4691
|
size: "small",
|
|
4679
4692
|
current: 1,
|
|
4680
4693
|
pageSize: tableInitPageSize
|
|
4681
4694
|
}),
|
|
4682
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
4683
|
-
tablePagination = _useState16[0],
|
|
4684
|
-
setTablePagination = _useState16[1];
|
|
4685
|
-
var _useState17 = useState([]),
|
|
4686
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
4687
|
-
selectedRowKeys = _useState18[0],
|
|
4688
|
-
setSelectedRowKeys = _useState18[1];
|
|
4689
|
-
var _useState19 = useState({}),
|
|
4690
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
4691
|
-
tableFormParams = _useState20[0],
|
|
4692
|
-
setTableFormParams = _useState20[1];
|
|
4693
|
-
var _useState21 = useState(false),
|
|
4694
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
4695
|
-
confirmLoading = _useState22[0],
|
|
4696
|
-
setConfirmLoading = _useState22[1];
|
|
4697
|
-
var _useState23 = useState(false),
|
|
4698
4695
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
4699
|
-
|
|
4700
|
-
|
|
4696
|
+
tablePagination = _useState24[0],
|
|
4697
|
+
setTablePagination = _useState24[1];
|
|
4701
4698
|
var _useState25 = useState([]),
|
|
4702
4699
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
4703
|
-
|
|
4704
|
-
|
|
4700
|
+
selectedRowKeys = _useState26[0],
|
|
4701
|
+
setSelectedRowKeys = _useState26[1];
|
|
4705
4702
|
var _useState27 = useState([]),
|
|
4706
4703
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
var _useState29 = useState(
|
|
4704
|
+
doubleArr = _useState28[0],
|
|
4705
|
+
setDoubleArr = _useState28[1]; // 存放双数组的数组
|
|
4706
|
+
var _useState29 = useState(false),
|
|
4710
4707
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
var _useState31 = useState(
|
|
4708
|
+
checkedAll = _useState30[0],
|
|
4709
|
+
setCheckedAll = _useState30[1];
|
|
4710
|
+
var _useState31 = useState(false),
|
|
4714
4711
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
4715
|
-
|
|
4716
|
-
|
|
4712
|
+
indeterminate = _useState32[0],
|
|
4713
|
+
setIndeterminate = _useState32[1];
|
|
4714
|
+
var _useState33 = useState({}),
|
|
4715
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
4716
|
+
tableFormParams = _useState34[0],
|
|
4717
|
+
setTableFormParams = _useState34[1];
|
|
4718
|
+
var _useState35 = useState(false),
|
|
4719
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
4720
|
+
confirmLoading = _useState36[0],
|
|
4721
|
+
setConfirmLoading = _useState36[1];
|
|
4722
|
+
var _useState37 = useState(false),
|
|
4723
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
4724
|
+
confirmContinueLoading = _useState38[0],
|
|
4725
|
+
setConfirmContinueLoading = _useState38[1];
|
|
4726
|
+
var _useState39 = useState([]),
|
|
4727
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
4728
|
+
selectColumns = _useState40[0],
|
|
4729
|
+
setSelectColumns = _useState40[1];
|
|
4730
|
+
var _useState41 = useState([]),
|
|
4731
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
4732
|
+
showColumns = _useState42[0],
|
|
4733
|
+
setShowColumns = _useState42[1];
|
|
4734
|
+
var _useState43 = useState([]),
|
|
4735
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
4736
|
+
tableColumns = _useState44[0],
|
|
4737
|
+
setTableColumns = _useState44[1];
|
|
4738
|
+
var _useState45 = useState([]),
|
|
4739
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
4740
|
+
showToChooseColumns = _useState46[0],
|
|
4741
|
+
setShowToChooseColumns = _useState46[1];
|
|
4717
4742
|
var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
|
|
4718
4743
|
var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
|
|
4719
4744
|
var checkSelectChange = /*#__PURE__*/function () {
|
|
4720
|
-
var
|
|
4745
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
4721
4746
|
var result;
|
|
4722
4747
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4723
4748
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -4792,7 +4817,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
4792
4817
|
}, _callee, null, [[15, 22]]);
|
|
4793
4818
|
}));
|
|
4794
4819
|
return function checkSelectChange(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
4795
|
-
return
|
|
4820
|
+
return _ref4.apply(this, arguments);
|
|
4796
4821
|
};
|
|
4797
4822
|
}();
|
|
4798
4823
|
var setBusinessDefaultValue = function setBusinessDefaultValue(list, recordList) {
|
|
@@ -4858,7 +4883,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
4858
4883
|
// precision: unitAccuracy
|
|
4859
4884
|
};
|
|
4860
4885
|
}
|
|
4861
|
-
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2(
|
|
4886
|
+
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2({
|
|
4862
4887
|
value: text || '',
|
|
4863
4888
|
min: 0,
|
|
4864
4889
|
autoFocus: record.needFocus,
|
|
@@ -4866,7 +4891,13 @@ var AddSelect = function AddSelect(props) {
|
|
|
4866
4891
|
}, precisionObj), {}, {
|
|
4867
4892
|
onChange: function onChange(value) {
|
|
4868
4893
|
record[item.dataIndex] = value;
|
|
4869
|
-
|
|
4894
|
+
var newPopValue = popvalue.map(function (i, innerIndex) {
|
|
4895
|
+
if (innerIndex == index) {
|
|
4896
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
4897
|
+
}
|
|
4898
|
+
return i;
|
|
4899
|
+
});
|
|
4900
|
+
setPopValue(newPopValue);
|
|
4870
4901
|
},
|
|
4871
4902
|
// onFocus={(e)=> {
|
|
4872
4903
|
// let dom1 = e.currentTarget;
|
|
@@ -4965,90 +4996,35 @@ var AddSelect = function AddSelect(props) {
|
|
|
4965
4996
|
var selectKey = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi = item.dataSourceMapping) === null || _item$dataSourceMappi === void 0 ? void 0 : _item$dataSourceMappi[0]) || 'code';
|
|
4966
4997
|
var selectText = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi2 = item.dataSourceMapping) === null || _item$dataSourceMappi2 === void 0 ? void 0 : _item$dataSourceMappi2[1]) || 'name';
|
|
4967
4998
|
var dataSourceList = getSelectDataList(record, item, selectKey);
|
|
4968
|
-
return /*#__PURE__*/React$1.createElement(Select,
|
|
4999
|
+
return /*#__PURE__*/React$1.createElement(Select, {
|
|
4969
5000
|
value: text || null,
|
|
4970
5001
|
onChange: function () {
|
|
4971
5002
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
4972
|
-
var
|
|
5003
|
+
var isConformToTheRules, newPopValue;
|
|
4973
5004
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
4974
5005
|
while (1) switch (_context2.prev = _context2.next) {
|
|
4975
5006
|
case 0:
|
|
4976
|
-
|
|
4977
|
-
return d[selectKey] == value;
|
|
4978
|
-
})) || {};
|
|
4979
|
-
if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
|
|
4980
|
-
_context2.next = 6;
|
|
4981
|
-
break;
|
|
4982
|
-
}
|
|
4983
|
-
_context2.next = 4;
|
|
4984
|
-
return item === null || item === void 0 ? void 0 : (_item$selectChangeCal = item.selectChangeCallback) === null || _item$selectChangeCal === void 0 ? void 0 : _item$selectChangeCal.call(item, popvalue, setPopValue, {
|
|
4985
|
-
record: record,
|
|
4986
|
-
index: index,
|
|
4987
|
-
item: item,
|
|
4988
|
-
oldValue: text,
|
|
4989
|
-
changeValue: value,
|
|
4990
|
-
dataSourceSelectItem: dataSourceSelectItem,
|
|
4991
|
-
editRecord: editRecord
|
|
4992
|
-
});
|
|
4993
|
-
case 4:
|
|
4994
|
-
_context2.next = 25;
|
|
4995
|
-
break;
|
|
4996
|
-
case 6:
|
|
4997
|
-
// 更新当前行数据函数
|
|
4998
|
-
changeValue = function changeValue(v, dSSItem) {
|
|
4999
|
-
var _item$dataSourceSelec;
|
|
5000
|
-
record[item.dataIndex] = v;
|
|
5001
|
-
// 下拉框带出需要回填的数据
|
|
5002
|
-
if (item === null || item === void 0 ? void 0 : (_item$dataSourceSelec = item.dataSourceSelectBackData) === null || _item$dataSourceSelec === void 0 ? void 0 : _item$dataSourceSelec.length) {
|
|
5003
|
-
item === null || item === void 0 ? void 0 : item.dataSourceSelectBackData.forEach(function (s) {
|
|
5004
|
-
record[s] = dSSItem ? dSSItem[s] : null;
|
|
5005
|
-
});
|
|
5006
|
-
}
|
|
5007
|
-
}; // 处理校验,默认不校验
|
|
5008
|
-
isCheckPass = true;
|
|
5009
|
-
_context2.prev = 8;
|
|
5010
|
-
if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
|
|
5011
|
-
_context2.next = 15;
|
|
5012
|
-
break;
|
|
5013
|
-
}
|
|
5014
|
-
_context2.next = 12;
|
|
5015
|
-
return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
|
|
5016
|
-
record: record,
|
|
5017
|
-
index: index,
|
|
5018
|
-
item: item,
|
|
5019
|
-
oldValue: text,
|
|
5020
|
-
changeValue: value,
|
|
5021
|
-
dataSourceSelectItem: dataSourceSelectItem
|
|
5022
|
-
});
|
|
5023
|
-
case 12:
|
|
5024
|
-
isCheckPass = _context2.sent;
|
|
5025
|
-
_context2.next = 19;
|
|
5026
|
-
break;
|
|
5027
|
-
case 15:
|
|
5028
|
-
_context2.next = 17;
|
|
5007
|
+
_context2.next = 2;
|
|
5029
5008
|
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
5030
|
-
case
|
|
5009
|
+
case 2:
|
|
5031
5010
|
isConformToTheRules = _context2.sent;
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
_context2.next = 23;
|
|
5035
|
-
break;
|
|
5036
|
-
case 21:
|
|
5037
|
-
_context2.prev = 21;
|
|
5038
|
-
_context2.t0 = _context2["catch"](8);
|
|
5039
|
-
case 23:
|
|
5040
|
-
if (isCheckPass) {
|
|
5041
|
-
changeValue(value, dataSourceSelectItem);
|
|
5011
|
+
if (isConformToTheRules) {
|
|
5012
|
+
record[item.dataIndex] = value;
|
|
5042
5013
|
} else {
|
|
5043
|
-
|
|
5014
|
+
record[item.dataIndex] = null;
|
|
5044
5015
|
}
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5016
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
5017
|
+
if (innerIndex == index) {
|
|
5018
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
5019
|
+
}
|
|
5020
|
+
return i;
|
|
5021
|
+
});
|
|
5022
|
+
setPopValue(newPopValue);
|
|
5023
|
+
case 6:
|
|
5048
5024
|
case "end":
|
|
5049
5025
|
return _context2.stop();
|
|
5050
5026
|
}
|
|
5051
|
-
}, _callee2
|
|
5027
|
+
}, _callee2);
|
|
5052
5028
|
}));
|
|
5053
5029
|
function onChange(_x7) {
|
|
5054
5030
|
return _onChange.apply(this, arguments);
|
|
@@ -5056,9 +5032,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5056
5032
|
return onChange;
|
|
5057
5033
|
}(),
|
|
5058
5034
|
style: {
|
|
5059
|
-
width:
|
|
5035
|
+
width: '160px'
|
|
5060
5036
|
}
|
|
5061
|
-
}
|
|
5037
|
+
}, dataSourceList.map(function (item) {
|
|
5062
5038
|
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
5063
5039
|
value: item[selectKey]
|
|
5064
5040
|
}, item[selectText]);
|
|
@@ -5091,10 +5067,20 @@ var AddSelect = function AddSelect(props) {
|
|
|
5091
5067
|
// 获取数据源 (type: 1下拉框 2弹框 不传值默认为下拉框)
|
|
5092
5068
|
var getData = function getData() {
|
|
5093
5069
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5070
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
5094
5071
|
if (!requestConfig) return;
|
|
5095
5072
|
setFetching(true);
|
|
5096
5073
|
// 处理dependence参数
|
|
5097
5074
|
var fixedParam = {};
|
|
5075
|
+
if (fixedparameter && fieldValToParam && ctx) {
|
|
5076
|
+
fixedparameter.forEach(function (item, index) {
|
|
5077
|
+
var fixedParamVal = ctx.form.getFieldValue(fieldValToParam[index]);
|
|
5078
|
+
if (fixedParamVal) {
|
|
5079
|
+
fixedParam[item] = fixedParamVal;
|
|
5080
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, form === null || form === void 0 ? void 0 : form.getFieldsValue()), {}, _defineProperty({}, item, fixedParamVal)));
|
|
5081
|
+
}
|
|
5082
|
+
});
|
|
5083
|
+
}
|
|
5098
5084
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
5099
5085
|
var _loop = function _loop() {
|
|
5100
5086
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
@@ -5200,7 +5186,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
5200
5186
|
var keys = res.list ? 'list' : 'items';
|
|
5201
5187
|
source = res ? res[keys] ? res[keys].map(function (item) {
|
|
5202
5188
|
var _item$packingUnitList, _item$packingUnitList2;
|
|
5189
|
+
var textShowText = item[mappingTextField];
|
|
5190
|
+
if (mappingTextShowTextField) {
|
|
5191
|
+
textShowText = [];
|
|
5192
|
+
if (Array.isArray(mappingTextShowTextField)) {
|
|
5193
|
+
mappingTextShowTextField.forEach(function (r) {
|
|
5194
|
+
textShowText.push(item[r]);
|
|
5195
|
+
});
|
|
5196
|
+
} else {
|
|
5197
|
+
textShowText = item[mappingTextShowTextField];
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5203
5200
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5201
|
+
text: item[mappingTextField],
|
|
5202
|
+
textShowText: textShowText,
|
|
5203
|
+
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
5204
5204
|
value: item[mappingValueField],
|
|
5205
5205
|
baseUnitCode: item === null || item === void 0 ? void 0 : (_item$packingUnitList = item.packingUnitList) === null || _item$packingUnitList === void 0 ? void 0 : (_item$packingUnitList2 = _item$packingUnitList.find(function (item) {
|
|
5206
5206
|
return item.baseUnit === true;
|
|
@@ -5208,7 +5208,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
5208
5208
|
});
|
|
5209
5209
|
}) : Array.isArray(res) && (res === null || res === void 0 ? void 0 : res.map(function (item) {
|
|
5210
5210
|
var _item$packingUnitList3, _item$packingUnitList4;
|
|
5211
|
+
var textShowText = item[mappingTextField];
|
|
5212
|
+
if (mappingTextShowTextField) {
|
|
5213
|
+
textShowText = [];
|
|
5214
|
+
if (Array.isArray(mappingTextShowTextField)) {
|
|
5215
|
+
mappingTextShowTextField.forEach(function (r) {
|
|
5216
|
+
textShowText.push(item[r]);
|
|
5217
|
+
});
|
|
5218
|
+
} else {
|
|
5219
|
+
textShowText = item[mappingTextShowTextField];
|
|
5220
|
+
}
|
|
5221
|
+
}
|
|
5211
5222
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5223
|
+
text: item[mappingTextField],
|
|
5224
|
+
textShowText: textShowText,
|
|
5225
|
+
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
5212
5226
|
value: item[mappingValueField],
|
|
5213
5227
|
baseUnitCode: item === null || item === void 0 ? void 0 : (_item$packingUnitList3 = item.packingUnitList) === null || _item$packingUnitList3 === void 0 ? void 0 : (_item$packingUnitList4 = _item$packingUnitList3.find(function (item) {
|
|
5214
5228
|
return item.baseUnit === true;
|
|
@@ -5217,12 +5231,19 @@ var AddSelect = function AddSelect(props) {
|
|
|
5217
5231
|
})) : [];
|
|
5218
5232
|
}
|
|
5219
5233
|
source = Array.isArray(source) ? source : [];
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
}
|
|
5234
|
+
if (type === 1) {
|
|
5235
|
+
var _ctx$form;
|
|
5236
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
|
|
5237
|
+
setItems(source);
|
|
5238
|
+
setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
|
|
5239
|
+
} else {
|
|
5240
|
+
setTableData(source);
|
|
5241
|
+
setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
|
|
5242
|
+
total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
|
|
5243
|
+
pageSize: Number((res === null || res === void 0 ? void 0 : res.size) || (res === null || res === void 0 ? void 0 : res.pageSize) || (params === null || params === void 0 ? void 0 : params.pageSize) || pageSize),
|
|
5244
|
+
current: Number((res === null || res === void 0 ? void 0 : res.page) || (res === null || res === void 0 ? void 0 : res.currentPage) || (params === null || params === void 0 ? void 0 : params.currentPage) || currentPage)
|
|
5245
|
+
}));
|
|
5246
|
+
}
|
|
5226
5247
|
}).catch(function (err) {
|
|
5227
5248
|
setFetching(false);
|
|
5228
5249
|
});
|
|
@@ -5264,6 +5285,12 @@ var AddSelect = function AddSelect(props) {
|
|
|
5264
5285
|
value: i
|
|
5265
5286
|
};
|
|
5266
5287
|
}));
|
|
5288
|
+
setIndeterminate(!!value.length && value.length < itemsTotal);
|
|
5289
|
+
setCheckedAll(itemsTotal && value.length === itemsTotal);
|
|
5290
|
+
// 需清空数据
|
|
5291
|
+
if (!value.length) {
|
|
5292
|
+
setDoubleArr([]);
|
|
5293
|
+
}
|
|
5267
5294
|
} else {
|
|
5268
5295
|
setSelectedRowKeys(labelInValue ? [value.key] : [value]);
|
|
5269
5296
|
setPopValue(labelInValue ? [{
|
|
@@ -5298,6 +5325,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5298
5325
|
message$1.warning('至少选中一条数据');
|
|
5299
5326
|
return;
|
|
5300
5327
|
}
|
|
5328
|
+
// handleSelectOver(popvalue)
|
|
5301
5329
|
if (onSaveCallback) {
|
|
5302
5330
|
handleLoading(isContinue, true);
|
|
5303
5331
|
onSaveCallback(popvalue).then(function (res) {
|
|
@@ -5333,6 +5361,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5333
5361
|
setTableFormParams({});
|
|
5334
5362
|
setIsModalVisible(false);
|
|
5335
5363
|
setTableData([]);
|
|
5364
|
+
// if (selectMode) {
|
|
5365
|
+
// run();
|
|
5366
|
+
// }
|
|
5336
5367
|
};
|
|
5337
5368
|
var onSearchTable = function onSearchTable() {
|
|
5338
5369
|
var params = form.getFieldsValue();
|
|
@@ -5340,6 +5371,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5340
5371
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
5341
5372
|
pageSize: tableInitPageSize
|
|
5342
5373
|
}), 2);
|
|
5374
|
+
// if (selectMode) {
|
|
5375
|
+
// getData(params)
|
|
5376
|
+
// }
|
|
5343
5377
|
};
|
|
5344
5378
|
var onResetTable = function onResetTable() {
|
|
5345
5379
|
form.resetFields();
|
|
@@ -5378,6 +5412,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
5378
5412
|
setPopValue(selectRows);
|
|
5379
5413
|
setSelectedRowKeys(selectKeys);
|
|
5380
5414
|
}
|
|
5415
|
+
// setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
|
|
5416
|
+
// setCheckedAll(filterRows.length === tablePagination?.total);
|
|
5381
5417
|
};
|
|
5382
5418
|
// 生成唯一值
|
|
5383
5419
|
var makeUniqueValue = function makeUniqueValue() {
|
|
@@ -5506,15 +5542,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
5506
5542
|
})));
|
|
5507
5543
|
}
|
|
5508
5544
|
};
|
|
5509
|
-
var editRecord = function editRecord(record) {
|
|
5510
|
-
var newPopValue = _toConsumableArray(popvalue);
|
|
5511
|
-
var index = newPopValue.findIndex(function (item) {
|
|
5512
|
-
return record[selectRowKey] == item[selectRowKey];
|
|
5513
|
-
});
|
|
5514
|
-
var item = newPopValue[index];
|
|
5515
|
-
newPopValue.splice(index, 1, _objectSpread2(_objectSpread2({}, item), record));
|
|
5516
|
-
setPopValue(_toConsumableArray(newPopValue));
|
|
5517
|
-
};
|
|
5518
5545
|
var inputIndex = 0;
|
|
5519
5546
|
useEffect(function () {
|
|
5520
5547
|
setInitialShowColumn(codeSelected, selectColumns, function (res) {
|
|
@@ -5527,8 +5554,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
5527
5554
|
});
|
|
5528
5555
|
}, [tableColumns]);
|
|
5529
5556
|
var handleResize = function handleResize(arr, index, callback) {
|
|
5530
|
-
return function (_,
|
|
5531
|
-
var size =
|
|
5557
|
+
return function (_, _ref5) {
|
|
5558
|
+
var size = _ref5.size;
|
|
5532
5559
|
var newColumns = arr.map(function (col) {
|
|
5533
5560
|
return _objectSpread2({}, col);
|
|
5534
5561
|
});
|
|
@@ -5593,7 +5620,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5593
5620
|
id: "add_select_div_".concat(uniqueValue)
|
|
5594
5621
|
}, /*#__PURE__*/React$1.createElement(Button, _objectSpread2({
|
|
5595
5622
|
onClick: handleShowModal
|
|
5596
|
-
}, realButtonProps), buttonText)), isModalVisible && ( /*#__PURE__*/React$1.createElement(Modal, {
|
|
5623
|
+
}, realButtonProps), buttonText)), needModalTable && isModalVisible && ( /*#__PURE__*/React$1.createElement(Modal, {
|
|
5597
5624
|
width: '1200px',
|
|
5598
5625
|
style: {
|
|
5599
5626
|
top: 20
|
|
@@ -5601,6 +5628,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5601
5628
|
bodyStyle: {
|
|
5602
5629
|
padding: '0px'
|
|
5603
5630
|
},
|
|
5631
|
+
// title={modalTableProps?.modalTableTitle}
|
|
5604
5632
|
visible: isModalVisible,
|
|
5605
5633
|
closable: false,
|
|
5606
5634
|
onCancel: handleCancel,
|
|
@@ -5746,6 +5774,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5746
5774
|
columns: showSelectedCol,
|
|
5747
5775
|
dataSource: popvalue,
|
|
5748
5776
|
pagination: false,
|
|
5777
|
+
// onChange={handleTableChange}
|
|
5749
5778
|
rowKey: selectRowKey,
|
|
5750
5779
|
rowClassName: 'row-class',
|
|
5751
5780
|
scroll: {
|
|
@@ -9232,40 +9261,10 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React$1.memo(BusinessSearchSelect, fun
|
|
|
9232
9261
|
// import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
9233
9262
|
function handleSelectColumn(c, parentProps) {
|
|
9234
9263
|
var result = c;
|
|
9235
|
-
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) ||
|
|
9236
|
-
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) ||
|
|
9237
|
-
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) ||
|
|
9238
|
-
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) ||
|
|
9239
|
-
// 仅展示内容
|
|
9240
|
-
if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
|
|
9241
|
-
result = result.filter(function (i) {
|
|
9242
|
-
return showColumns.includes(i.dataIndex);
|
|
9243
|
-
});
|
|
9244
|
-
}
|
|
9245
|
-
// 过滤不需要展示内容
|
|
9246
|
-
if (exceptColumns === null || exceptColumns === void 0 ? void 0 : exceptColumns.length) {
|
|
9247
|
-
result = result.filter(function (i) {
|
|
9248
|
-
return !exceptColumns.includes(i.dataIndex);
|
|
9249
|
-
});
|
|
9250
|
-
}
|
|
9251
|
-
// 追加(最好不用这个,当组件不固定时候会有影响)
|
|
9252
|
-
if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
|
|
9253
|
-
additionColumns.forEach(function (i) {
|
|
9254
|
-
result.splice(i.position, 0, i.column);
|
|
9255
|
-
});
|
|
9256
|
-
}
|
|
9257
|
-
// 覆盖内容
|
|
9258
|
-
if (coverColumns === null || coverColumns === void 0 ? void 0 : coverColumns.length) {
|
|
9259
|
-
result = coverColumns;
|
|
9260
|
-
}
|
|
9261
|
-
return result;
|
|
9262
|
-
}
|
|
9263
|
-
function handleTableColumn(c, parentProps) {
|
|
9264
|
-
var result = c;
|
|
9265
|
-
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showTableColumns) || [];
|
|
9266
|
-
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptTableColumns) || [];
|
|
9267
|
-
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverTableColumns) || [];
|
|
9268
|
-
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionTableColumns) || [];
|
|
9264
|
+
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || [];
|
|
9265
|
+
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
|
|
9266
|
+
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || [];
|
|
9267
|
+
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || [];
|
|
9269
9268
|
// 仅展示内容
|
|
9270
9269
|
if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
|
|
9271
9270
|
result = result.filter(function (i) {
|
|
@@ -9585,7 +9584,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
9585
9584
|
},
|
|
9586
9585
|
dataIndex: 'brandName'
|
|
9587
9586
|
}]);
|
|
9588
|
-
var mTpTableColumn =
|
|
9587
|
+
var mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
|
|
9589
9588
|
var initialTableSearchForm = [{
|
|
9590
9589
|
name: 'qp-skuCode-like',
|
|
9591
9590
|
label: 'SKU编码'
|
|
@@ -9697,7 +9696,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
9697
9696
|
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
9698
9697
|
};
|
|
9699
9698
|
var modalTableProps = {
|
|
9700
|
-
modalTableTitle:
|
|
9699
|
+
modalTableTitle: '选择商品',
|
|
9701
9700
|
tableSearchForm: mTpTableSearchForm,
|
|
9702
9701
|
tableColumns: mTpTableColumn,
|
|
9703
9702
|
selectColumn: mTpSelectColumn,
|
|
@@ -9776,184 +9775,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9776
9775
|
dataIndex: 'count'
|
|
9777
9776
|
}];
|
|
9778
9777
|
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
9779
|
-
var initialTableColumn = [{
|
|
9780
|
-
title: 'SKC编码',
|
|
9781
|
-
width: 150,
|
|
9782
|
-
dataIndex: 'code'
|
|
9783
|
-
}, {
|
|
9784
|
-
title: 'SKC名称',
|
|
9785
|
-
width: 200,
|
|
9786
|
-
ellipsis: {
|
|
9787
|
-
showTitle: false
|
|
9788
|
-
},
|
|
9789
|
-
render: function render(text) {
|
|
9790
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9791
|
-
placement: "topLeft",
|
|
9792
|
-
title: text
|
|
9793
|
-
}, text);
|
|
9794
|
-
},
|
|
9795
|
-
dataIndex: 'name'
|
|
9796
|
-
}, {
|
|
9797
|
-
title: '商品名称',
|
|
9798
|
-
width: 100,
|
|
9799
|
-
ellipsis: {
|
|
9800
|
-
showTitle: false
|
|
9801
|
-
},
|
|
9802
|
-
dataIndex: 'itemName',
|
|
9803
|
-
render: function render(text) {
|
|
9804
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9805
|
-
placement: "topLeft",
|
|
9806
|
-
title: text
|
|
9807
|
-
}, text);
|
|
9808
|
-
}
|
|
9809
|
-
}, {
|
|
9810
|
-
title: '颜色',
|
|
9811
|
-
width: 100,
|
|
9812
|
-
ellipsis: {
|
|
9813
|
-
showTitle: false
|
|
9814
|
-
},
|
|
9815
|
-
render: function render(text) {
|
|
9816
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9817
|
-
placement: "topLeft",
|
|
9818
|
-
title: text
|
|
9819
|
-
}, text);
|
|
9820
|
-
},
|
|
9821
|
-
dataIndex: 'colorName'
|
|
9822
|
-
}, {
|
|
9823
|
-
title: '类目',
|
|
9824
|
-
width: 100,
|
|
9825
|
-
ellipsis: {
|
|
9826
|
-
showTitle: false
|
|
9827
|
-
},
|
|
9828
|
-
render: function render(text) {
|
|
9829
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9830
|
-
placement: "topLeft",
|
|
9831
|
-
title: text
|
|
9832
|
-
}, text);
|
|
9833
|
-
},
|
|
9834
|
-
dataIndex: 'categoryName'
|
|
9835
|
-
}, {
|
|
9836
|
-
title: '品类',
|
|
9837
|
-
width: 100,
|
|
9838
|
-
ellipsis: {
|
|
9839
|
-
showTitle: false
|
|
9840
|
-
},
|
|
9841
|
-
render: function render(text) {
|
|
9842
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9843
|
-
placement: "topLeft",
|
|
9844
|
-
title: text
|
|
9845
|
-
}, text);
|
|
9846
|
-
},
|
|
9847
|
-
dataIndex: 'className'
|
|
9848
|
-
}, {
|
|
9849
|
-
title: '品牌',
|
|
9850
|
-
width: 100,
|
|
9851
|
-
ellipsis: {
|
|
9852
|
-
showTitle: false
|
|
9853
|
-
},
|
|
9854
|
-
render: function render(text) {
|
|
9855
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9856
|
-
placement: "topLeft",
|
|
9857
|
-
title: text
|
|
9858
|
-
}, text);
|
|
9859
|
-
},
|
|
9860
|
-
dataIndex: 'brandName'
|
|
9861
|
-
}];
|
|
9862
|
-
var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
9863
|
-
var initialTableSearchForm = [{
|
|
9864
|
-
name: 'qp-code-like',
|
|
9865
|
-
label: 'SKC编码'
|
|
9866
|
-
}, {
|
|
9867
|
-
name: 'qp-skcName-like',
|
|
9868
|
-
label: 'SKC名称'
|
|
9869
|
-
}, {
|
|
9870
|
-
name: 'qp-itemName-like',
|
|
9871
|
-
label: '商品名称'
|
|
9872
|
-
}, {
|
|
9873
|
-
name: 'qp-colorName-in',
|
|
9874
|
-
type: 'select',
|
|
9875
|
-
label: '颜色',
|
|
9876
|
-
field: {
|
|
9877
|
-
type: 'select',
|
|
9878
|
-
props: {
|
|
9879
|
-
mode: 'multiple',
|
|
9880
|
-
notFoundContent: '暂无数据',
|
|
9881
|
-
allowClear: true,
|
|
9882
|
-
showSearch: true,
|
|
9883
|
-
showArrow: true,
|
|
9884
|
-
maxTagCount: 1,
|
|
9885
|
-
optionFilterProp: 'children',
|
|
9886
|
-
filterOption: function filterOption(input, option) {
|
|
9887
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9888
|
-
}
|
|
9889
|
-
}
|
|
9890
|
-
}
|
|
9891
|
-
}, {
|
|
9892
|
-
name: 'qp-categoryId-in',
|
|
9893
|
-
type: 'treeSelect',
|
|
9894
|
-
label: '类目',
|
|
9895
|
-
field: {
|
|
9896
|
-
type: 'treeSelect',
|
|
9897
|
-
props: {
|
|
9898
|
-
treeData: [],
|
|
9899
|
-
treeCheckable: true,
|
|
9900
|
-
showSearch: true,
|
|
9901
|
-
allowClear: true,
|
|
9902
|
-
showArrow: true,
|
|
9903
|
-
treeNodeFilterProp: 'title',
|
|
9904
|
-
treeDefaultExpandAll: true,
|
|
9905
|
-
maxTagCount: 1,
|
|
9906
|
-
placeholder: '请选择',
|
|
9907
|
-
style: {
|
|
9908
|
-
width: '100%'
|
|
9909
|
-
},
|
|
9910
|
-
dropdownStyle: {
|
|
9911
|
-
maxHeight: 400,
|
|
9912
|
-
maxWidth: 100,
|
|
9913
|
-
overflow: 'auto'
|
|
9914
|
-
}
|
|
9915
|
-
}
|
|
9916
|
-
}
|
|
9917
|
-
}, {
|
|
9918
|
-
name: 'qp-classId-in',
|
|
9919
|
-
type: 'select',
|
|
9920
|
-
label: '品类',
|
|
9921
|
-
field: {
|
|
9922
|
-
type: 'select',
|
|
9923
|
-
props: {
|
|
9924
|
-
mode: 'multiple',
|
|
9925
|
-
notFoundContent: '暂无数据',
|
|
9926
|
-
allowClear: true,
|
|
9927
|
-
showSearch: true,
|
|
9928
|
-
showArrow: true,
|
|
9929
|
-
maxTagCount: 1,
|
|
9930
|
-
optionFilterProp: 'children',
|
|
9931
|
-
filterOption: function filterOption(input, option) {
|
|
9932
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9933
|
-
}
|
|
9934
|
-
}
|
|
9935
|
-
}
|
|
9936
|
-
}, {
|
|
9937
|
-
name: 'qp-brandId-in',
|
|
9938
|
-
type: 'select',
|
|
9939
|
-
label: '品牌',
|
|
9940
|
-
field: {
|
|
9941
|
-
type: 'select',
|
|
9942
|
-
props: {
|
|
9943
|
-
mode: 'multiple',
|
|
9944
|
-
notFoundContent: '暂无数据',
|
|
9945
|
-
allowClear: true,
|
|
9946
|
-
showSearch: true,
|
|
9947
|
-
showArrow: true,
|
|
9948
|
-
maxTagCount: 1,
|
|
9949
|
-
optionFilterProp: 'children',
|
|
9950
|
-
filterOption: function filterOption(input, option) {
|
|
9951
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9952
|
-
}
|
|
9953
|
-
}
|
|
9954
|
-
}
|
|
9955
|
-
}];
|
|
9956
|
-
var mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
|
|
9957
9778
|
var initialPromiseLoadList = [{
|
|
9958
9779
|
url: "/items/item/propertyValue/sizeBySkcConfig",
|
|
9959
9780
|
params: {
|
|
@@ -9992,7 +9813,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9992
9813
|
resPosition: 6,
|
|
9993
9814
|
resKeyValue: ['id', 'name']
|
|
9994
9815
|
}];
|
|
9995
|
-
var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
9996
9816
|
var props = {
|
|
9997
9817
|
buttonText: parProps.buttonText || '新增',
|
|
9998
9818
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -10019,11 +9839,185 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
10019
9839
|
isAllowRepeatedSelect: (parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) !== undefined ? !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) : true // 默认开启一行选多次
|
|
10020
9840
|
};
|
|
10021
9841
|
var modalTableProps = {
|
|
10022
|
-
modalTableTitle:
|
|
10023
|
-
tableSearchForm:
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
9842
|
+
modalTableTitle: '选择商品',
|
|
9843
|
+
tableSearchForm: [{
|
|
9844
|
+
name: 'qp-code-like',
|
|
9845
|
+
label: 'SKC编码'
|
|
9846
|
+
}, {
|
|
9847
|
+
name: 'qp-skcName-like',
|
|
9848
|
+
label: 'SKC名称'
|
|
9849
|
+
}, {
|
|
9850
|
+
name: 'qp-itemName-like',
|
|
9851
|
+
label: '商品名称'
|
|
9852
|
+
}, {
|
|
9853
|
+
name: 'qp-colorName-in',
|
|
9854
|
+
type: 'select',
|
|
9855
|
+
label: '颜色',
|
|
9856
|
+
field: {
|
|
9857
|
+
type: 'select',
|
|
9858
|
+
props: {
|
|
9859
|
+
mode: 'multiple',
|
|
9860
|
+
notFoundContent: '暂无数据',
|
|
9861
|
+
allowClear: true,
|
|
9862
|
+
showSearch: true,
|
|
9863
|
+
showArrow: true,
|
|
9864
|
+
maxTagCount: 1,
|
|
9865
|
+
optionFilterProp: 'children',
|
|
9866
|
+
filterOption: function filterOption(input, option) {
|
|
9867
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9868
|
+
}
|
|
9869
|
+
}
|
|
9870
|
+
}
|
|
9871
|
+
}, {
|
|
9872
|
+
name: 'qp-categoryId-in',
|
|
9873
|
+
type: 'treeSelect',
|
|
9874
|
+
label: '类目',
|
|
9875
|
+
field: {
|
|
9876
|
+
type: 'treeSelect',
|
|
9877
|
+
props: {
|
|
9878
|
+
treeData: [],
|
|
9879
|
+
treeCheckable: true,
|
|
9880
|
+
showSearch: true,
|
|
9881
|
+
allowClear: true,
|
|
9882
|
+
showArrow: true,
|
|
9883
|
+
treeNodeFilterProp: 'title',
|
|
9884
|
+
treeDefaultExpandAll: true,
|
|
9885
|
+
maxTagCount: 1,
|
|
9886
|
+
placeholder: '请选择',
|
|
9887
|
+
style: {
|
|
9888
|
+
width: '100%'
|
|
9889
|
+
},
|
|
9890
|
+
dropdownStyle: {
|
|
9891
|
+
maxHeight: 400,
|
|
9892
|
+
maxWidth: 100,
|
|
9893
|
+
overflow: 'auto'
|
|
9894
|
+
}
|
|
9895
|
+
}
|
|
9896
|
+
}
|
|
9897
|
+
}, {
|
|
9898
|
+
name: 'qp-classId-in',
|
|
9899
|
+
type: 'select',
|
|
9900
|
+
label: '品类',
|
|
9901
|
+
field: {
|
|
9902
|
+
type: 'select',
|
|
9903
|
+
props: {
|
|
9904
|
+
mode: 'multiple',
|
|
9905
|
+
notFoundContent: '暂无数据',
|
|
9906
|
+
allowClear: true,
|
|
9907
|
+
showSearch: true,
|
|
9908
|
+
showArrow: true,
|
|
9909
|
+
maxTagCount: 1,
|
|
9910
|
+
optionFilterProp: 'children',
|
|
9911
|
+
filterOption: function filterOption(input, option) {
|
|
9912
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9913
|
+
}
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
}, {
|
|
9917
|
+
name: 'qp-brandId-in',
|
|
9918
|
+
type: 'select',
|
|
9919
|
+
label: '品牌',
|
|
9920
|
+
field: {
|
|
9921
|
+
type: 'select',
|
|
9922
|
+
props: {
|
|
9923
|
+
mode: 'multiple',
|
|
9924
|
+
notFoundContent: '暂无数据',
|
|
9925
|
+
allowClear: true,
|
|
9926
|
+
showSearch: true,
|
|
9927
|
+
showArrow: true,
|
|
9928
|
+
maxTagCount: 1,
|
|
9929
|
+
optionFilterProp: 'children',
|
|
9930
|
+
filterOption: function filterOption(input, option) {
|
|
9931
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9932
|
+
}
|
|
9933
|
+
}
|
|
9934
|
+
}
|
|
9935
|
+
}],
|
|
9936
|
+
tableColumns: [{
|
|
9937
|
+
title: 'SKC编码',
|
|
9938
|
+
width: 150,
|
|
9939
|
+
dataIndex: 'code'
|
|
9940
|
+
}, {
|
|
9941
|
+
title: 'SKC名称',
|
|
9942
|
+
width: 200,
|
|
9943
|
+
ellipsis: {
|
|
9944
|
+
showTitle: false
|
|
9945
|
+
},
|
|
9946
|
+
render: function render(text) {
|
|
9947
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9948
|
+
placement: "topLeft",
|
|
9949
|
+
title: text
|
|
9950
|
+
}, text);
|
|
9951
|
+
},
|
|
9952
|
+
dataIndex: 'name'
|
|
9953
|
+
}, {
|
|
9954
|
+
title: '商品名称',
|
|
9955
|
+
width: 100,
|
|
9956
|
+
ellipsis: {
|
|
9957
|
+
showTitle: false
|
|
9958
|
+
},
|
|
9959
|
+
dataIndex: 'itemName',
|
|
9960
|
+
render: function render(text) {
|
|
9961
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9962
|
+
placement: "topLeft",
|
|
9963
|
+
title: text
|
|
9964
|
+
}, text);
|
|
9965
|
+
}
|
|
9966
|
+
}, {
|
|
9967
|
+
title: '颜色',
|
|
9968
|
+
width: 100,
|
|
9969
|
+
ellipsis: {
|
|
9970
|
+
showTitle: false
|
|
9971
|
+
},
|
|
9972
|
+
render: function render(text) {
|
|
9973
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9974
|
+
placement: "topLeft",
|
|
9975
|
+
title: text
|
|
9976
|
+
}, text);
|
|
9977
|
+
},
|
|
9978
|
+
dataIndex: 'colorName'
|
|
9979
|
+
}, {
|
|
9980
|
+
title: '类目',
|
|
9981
|
+
width: 100,
|
|
9982
|
+
ellipsis: {
|
|
9983
|
+
showTitle: false
|
|
9984
|
+
},
|
|
9985
|
+
render: function render(text) {
|
|
9986
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9987
|
+
placement: "topLeft",
|
|
9988
|
+
title: text
|
|
9989
|
+
}, text);
|
|
9990
|
+
},
|
|
9991
|
+
dataIndex: 'categoryName'
|
|
9992
|
+
}, {
|
|
9993
|
+
title: '品类',
|
|
9994
|
+
width: 100,
|
|
9995
|
+
ellipsis: {
|
|
9996
|
+
showTitle: false
|
|
9997
|
+
},
|
|
9998
|
+
render: function render(text) {
|
|
9999
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10000
|
+
placement: "topLeft",
|
|
10001
|
+
title: text
|
|
10002
|
+
}, text);
|
|
10003
|
+
},
|
|
10004
|
+
dataIndex: 'className'
|
|
10005
|
+
}, {
|
|
10006
|
+
title: '品牌',
|
|
10007
|
+
width: 100,
|
|
10008
|
+
ellipsis: {
|
|
10009
|
+
showTitle: false
|
|
10010
|
+
},
|
|
10011
|
+
render: function render(text) {
|
|
10012
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10013
|
+
placement: "topLeft",
|
|
10014
|
+
title: text
|
|
10015
|
+
}, text);
|
|
10016
|
+
},
|
|
10017
|
+
dataIndex: 'brandName'
|
|
10018
|
+
}],
|
|
10019
|
+
selectColumn: mTpSelectColumn,
|
|
10020
|
+
promiseLoadList: initialPromiseLoadList
|
|
10027
10021
|
};
|
|
10028
10022
|
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10029
10023
|
modalTableProps: modalTableProps
|
|
@@ -10084,191 +10078,29 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10084
10078
|
}, {
|
|
10085
10079
|
title: '配码',
|
|
10086
10080
|
dataIndex: 'selectPropertyGroupCode',
|
|
10087
|
-
width: 160,
|
|
10088
|
-
isSelectItem: true,
|
|
10089
|
-
dataSource: propertyList,
|
|
10090
|
-
filterDataSourceCode: 'matchingCodes'
|
|
10091
|
-
}, {
|
|
10092
|
-
title: '数量',
|
|
10093
|
-
width: 100,
|
|
10094
|
-
isInputItem: true,
|
|
10095
|
-
dataIndex: 'count'
|
|
10096
|
-
}, {
|
|
10097
|
-
title: '所属组织',
|
|
10098
|
-
dataIndex: 'ownOrgSignName'
|
|
10099
|
-
}, {
|
|
10100
|
-
title: '品牌',
|
|
10101
|
-
dataIndex: 'brandName'
|
|
10102
|
-
}, {
|
|
10103
|
-
title: '类目',
|
|
10104
|
-
dataIndex: 'categoryText'
|
|
10105
|
-
}, {
|
|
10106
|
-
title: '品类',
|
|
10107
|
-
dataIndex: 'className'
|
|
10108
|
-
}];
|
|
10109
|
-
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
10110
|
-
var initialTableColumn = [{
|
|
10111
|
-
title: '商品编码',
|
|
10112
|
-
width: 150,
|
|
10113
|
-
dataIndex: 'itemCode'
|
|
10114
|
-
}, {
|
|
10115
|
-
title: '商品名称',
|
|
10116
|
-
width: 200,
|
|
10117
|
-
ellipsis: {
|
|
10118
|
-
showTitle: false
|
|
10119
|
-
},
|
|
10120
|
-
render: function render(text) {
|
|
10121
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10122
|
-
placement: "topLeft",
|
|
10123
|
-
title: text
|
|
10124
|
-
}, text);
|
|
10125
|
-
},
|
|
10126
|
-
dataIndex: 'name'
|
|
10127
|
-
}, {
|
|
10128
|
-
title: '所属组织',
|
|
10129
|
-
width: 100,
|
|
10130
|
-
ellipsis: {
|
|
10131
|
-
showTitle: false
|
|
10132
|
-
},
|
|
10133
|
-
render: function render(text) {
|
|
10134
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10135
|
-
placement: "topLeft",
|
|
10136
|
-
title: text
|
|
10137
|
-
}, text);
|
|
10138
|
-
},
|
|
10139
|
-
dataIndex: 'ownOrgSignName'
|
|
10140
|
-
}, {
|
|
10141
|
-
title: '品牌',
|
|
10142
|
-
width: 100,
|
|
10143
|
-
ellipsis: {
|
|
10144
|
-
showTitle: false
|
|
10145
|
-
},
|
|
10146
|
-
render: function render(text) {
|
|
10147
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10148
|
-
placement: "topLeft",
|
|
10149
|
-
title: text
|
|
10150
|
-
}, text);
|
|
10151
|
-
},
|
|
10152
|
-
dataIndex: 'brandName'
|
|
10153
|
-
}, {
|
|
10154
|
-
title: '类目',
|
|
10155
|
-
width: 100,
|
|
10156
|
-
ellipsis: {
|
|
10157
|
-
showTitle: false
|
|
10158
|
-
},
|
|
10159
|
-
render: function render(text) {
|
|
10160
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10161
|
-
placement: "topLeft",
|
|
10162
|
-
title: text
|
|
10163
|
-
}, text);
|
|
10164
|
-
},
|
|
10165
|
-
dataIndex: 'categoryName'
|
|
10166
|
-
}, {
|
|
10167
|
-
title: '品类',
|
|
10168
|
-
width: 100,
|
|
10169
|
-
ellipsis: {
|
|
10170
|
-
showTitle: false
|
|
10171
|
-
},
|
|
10172
|
-
render: function render(text) {
|
|
10173
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10174
|
-
placement: "topLeft",
|
|
10175
|
-
title: text
|
|
10176
|
-
}, text);
|
|
10177
|
-
},
|
|
10178
|
-
dataIndex: 'className'
|
|
10179
|
-
}];
|
|
10180
|
-
var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
10181
|
-
var initialTableSearchForm = [{
|
|
10182
|
-
name: 'qp-itemCode-like',
|
|
10183
|
-
label: '商品编码'
|
|
10184
|
-
}, {
|
|
10185
|
-
name: 'qp-name-like',
|
|
10186
|
-
label: '商品名称'
|
|
10187
|
-
}, {
|
|
10188
|
-
name: 'qp-ownOrgSign-in',
|
|
10189
|
-
type: 'select',
|
|
10190
|
-
label: '所属组织',
|
|
10191
|
-
field: {
|
|
10192
|
-
type: 'select',
|
|
10193
|
-
props: {
|
|
10194
|
-
mode: 'multiple',
|
|
10195
|
-
notFoundContent: '暂无数据',
|
|
10196
|
-
allowClear: true,
|
|
10197
|
-
showSearch: true,
|
|
10198
|
-
showArrow: true,
|
|
10199
|
-
maxTagCount: 1,
|
|
10200
|
-
optionFilterProp: 'children',
|
|
10201
|
-
filterOption: function filterOption(input, option) {
|
|
10202
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10203
|
-
}
|
|
10204
|
-
}
|
|
10205
|
-
}
|
|
10206
|
-
}, {
|
|
10207
|
-
name: 'qp-brandId-in',
|
|
10208
|
-
type: 'select',
|
|
10209
|
-
label: '品牌',
|
|
10210
|
-
field: {
|
|
10211
|
-
type: 'select',
|
|
10212
|
-
props: {
|
|
10213
|
-
mode: 'multiple',
|
|
10214
|
-
notFoundContent: '暂无数据',
|
|
10215
|
-
allowClear: true,
|
|
10216
|
-
showSearch: true,
|
|
10217
|
-
showArrow: true,
|
|
10218
|
-
maxTagCount: 1,
|
|
10219
|
-
optionFilterProp: 'children',
|
|
10220
|
-
filterOption: function filterOption(input, option) {
|
|
10221
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10222
|
-
}
|
|
10223
|
-
}
|
|
10224
|
-
}
|
|
10225
|
-
}, {
|
|
10226
|
-
name: 'qp-categoryId-in',
|
|
10227
|
-
type: 'treeSelect',
|
|
10228
|
-
label: '类目',
|
|
10229
|
-
field: {
|
|
10230
|
-
type: 'treeSelect',
|
|
10231
|
-
props: {
|
|
10232
|
-
treeData: [],
|
|
10233
|
-
treeCheckable: true,
|
|
10234
|
-
showSearch: true,
|
|
10235
|
-
allowClear: true,
|
|
10236
|
-
showArrow: true,
|
|
10237
|
-
treeNodeFilterProp: 'title',
|
|
10238
|
-
treeDefaultExpandAll: true,
|
|
10239
|
-
maxTagCount: 1,
|
|
10240
|
-
placeholder: '请选择',
|
|
10241
|
-
style: {
|
|
10242
|
-
width: '100%'
|
|
10243
|
-
},
|
|
10244
|
-
dropdownStyle: {
|
|
10245
|
-
maxHeight: 400,
|
|
10246
|
-
maxWidth: 100,
|
|
10247
|
-
overflow: 'auto'
|
|
10248
|
-
}
|
|
10249
|
-
}
|
|
10250
|
-
}
|
|
10081
|
+
width: 160,
|
|
10082
|
+
isSelectItem: true,
|
|
10083
|
+
dataSource: propertyList,
|
|
10084
|
+
filterDataSourceCode: 'matchingCodes'
|
|
10251
10085
|
}, {
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
}
|
|
10269
|
-
}
|
|
10086
|
+
title: '数量',
|
|
10087
|
+
width: 100,
|
|
10088
|
+
isInputItem: true,
|
|
10089
|
+
dataIndex: 'count'
|
|
10090
|
+
}, {
|
|
10091
|
+
title: '所属组织',
|
|
10092
|
+
dataIndex: 'ownOrgSignName'
|
|
10093
|
+
}, {
|
|
10094
|
+
title: '品牌',
|
|
10095
|
+
dataIndex: 'brandName'
|
|
10096
|
+
}, {
|
|
10097
|
+
title: '类目',
|
|
10098
|
+
dataIndex: 'categoryText'
|
|
10099
|
+
}, {
|
|
10100
|
+
title: '品类',
|
|
10101
|
+
dataIndex: 'className'
|
|
10270
10102
|
}];
|
|
10271
|
-
var
|
|
10103
|
+
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
10272
10104
|
var initialPromiseLoadList = [{
|
|
10273
10105
|
url: "/user/orgViewNode/listNoPage",
|
|
10274
10106
|
params: {
|
|
@@ -10307,7 +10139,6 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10307
10139
|
resPosition: 5,
|
|
10308
10140
|
resKeyValue: ['id', 'name']
|
|
10309
10141
|
}];
|
|
10310
|
-
var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
10311
10142
|
var props = {
|
|
10312
10143
|
buttonText: parProps.buttonText || '新增',
|
|
10313
10144
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -10336,11 +10167,169 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10336
10167
|
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
10337
10168
|
};
|
|
10338
10169
|
var modalTableProps = {
|
|
10339
|
-
modalTableTitle:
|
|
10340
|
-
tableSearchForm:
|
|
10341
|
-
|
|
10170
|
+
modalTableTitle: '选择商品',
|
|
10171
|
+
tableSearchForm: [{
|
|
10172
|
+
name: 'qp-itemCode-like',
|
|
10173
|
+
label: '商品编码'
|
|
10174
|
+
}, {
|
|
10175
|
+
name: 'qp-name-like',
|
|
10176
|
+
label: '商品名称'
|
|
10177
|
+
}, {
|
|
10178
|
+
name: 'qp-ownOrgSign-in',
|
|
10179
|
+
type: 'select',
|
|
10180
|
+
label: '所属组织',
|
|
10181
|
+
field: {
|
|
10182
|
+
type: 'select',
|
|
10183
|
+
props: {
|
|
10184
|
+
mode: 'multiple',
|
|
10185
|
+
notFoundContent: '暂无数据',
|
|
10186
|
+
allowClear: true,
|
|
10187
|
+
showSearch: true,
|
|
10188
|
+
showArrow: true,
|
|
10189
|
+
maxTagCount: 1,
|
|
10190
|
+
optionFilterProp: 'children',
|
|
10191
|
+
filterOption: function filterOption(input, option) {
|
|
10192
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10193
|
+
}
|
|
10194
|
+
}
|
|
10195
|
+
}
|
|
10196
|
+
}, {
|
|
10197
|
+
name: 'qp-brandId-in',
|
|
10198
|
+
type: 'select',
|
|
10199
|
+
label: '品牌',
|
|
10200
|
+
field: {
|
|
10201
|
+
type: 'select',
|
|
10202
|
+
props: {
|
|
10203
|
+
mode: 'multiple',
|
|
10204
|
+
notFoundContent: '暂无数据',
|
|
10205
|
+
allowClear: true,
|
|
10206
|
+
showSearch: true,
|
|
10207
|
+
showArrow: true,
|
|
10208
|
+
maxTagCount: 1,
|
|
10209
|
+
optionFilterProp: 'children',
|
|
10210
|
+
filterOption: function filterOption(input, option) {
|
|
10211
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10212
|
+
}
|
|
10213
|
+
}
|
|
10214
|
+
}
|
|
10215
|
+
}, {
|
|
10216
|
+
name: 'qp-categoryId-in',
|
|
10217
|
+
type: 'treeSelect',
|
|
10218
|
+
label: '类目',
|
|
10219
|
+
field: {
|
|
10220
|
+
type: 'treeSelect',
|
|
10221
|
+
props: {
|
|
10222
|
+
treeData: [],
|
|
10223
|
+
treeCheckable: true,
|
|
10224
|
+
showSearch: true,
|
|
10225
|
+
allowClear: true,
|
|
10226
|
+
showArrow: true,
|
|
10227
|
+
treeNodeFilterProp: 'title',
|
|
10228
|
+
treeDefaultExpandAll: true,
|
|
10229
|
+
maxTagCount: 1,
|
|
10230
|
+
placeholder: '请选择',
|
|
10231
|
+
style: {
|
|
10232
|
+
width: '100%'
|
|
10233
|
+
},
|
|
10234
|
+
dropdownStyle: {
|
|
10235
|
+
maxHeight: 400,
|
|
10236
|
+
maxWidth: 100,
|
|
10237
|
+
overflow: 'auto'
|
|
10238
|
+
}
|
|
10239
|
+
}
|
|
10240
|
+
}
|
|
10241
|
+
}, {
|
|
10242
|
+
name: 'qp-classId-in',
|
|
10243
|
+
type: 'select',
|
|
10244
|
+
label: '品类',
|
|
10245
|
+
field: {
|
|
10246
|
+
type: 'select',
|
|
10247
|
+
props: {
|
|
10248
|
+
mode: 'multiple',
|
|
10249
|
+
notFoundContent: '暂无数据',
|
|
10250
|
+
allowClear: true,
|
|
10251
|
+
showSearch: true,
|
|
10252
|
+
showArrow: true,
|
|
10253
|
+
maxTagCount: 1,
|
|
10254
|
+
optionFilterProp: 'children',
|
|
10255
|
+
filterOption: function filterOption(input, option) {
|
|
10256
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10257
|
+
}
|
|
10258
|
+
}
|
|
10259
|
+
}
|
|
10260
|
+
}],
|
|
10261
|
+
tableColumns: [{
|
|
10262
|
+
title: '商品编码',
|
|
10263
|
+
width: 150,
|
|
10264
|
+
dataIndex: 'itemCode'
|
|
10265
|
+
}, {
|
|
10266
|
+
title: '商品名称',
|
|
10267
|
+
width: 200,
|
|
10268
|
+
ellipsis: {
|
|
10269
|
+
showTitle: false
|
|
10270
|
+
},
|
|
10271
|
+
render: function render(text) {
|
|
10272
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10273
|
+
placement: "topLeft",
|
|
10274
|
+
title: text
|
|
10275
|
+
}, text);
|
|
10276
|
+
},
|
|
10277
|
+
dataIndex: 'name'
|
|
10278
|
+
}, {
|
|
10279
|
+
title: '所属组织',
|
|
10280
|
+
width: 100,
|
|
10281
|
+
ellipsis: {
|
|
10282
|
+
showTitle: false
|
|
10283
|
+
},
|
|
10284
|
+
render: function render(text) {
|
|
10285
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10286
|
+
placement: "topLeft",
|
|
10287
|
+
title: text
|
|
10288
|
+
}, text);
|
|
10289
|
+
},
|
|
10290
|
+
dataIndex: 'ownOrgSignName'
|
|
10291
|
+
}, {
|
|
10292
|
+
title: '品牌',
|
|
10293
|
+
width: 100,
|
|
10294
|
+
ellipsis: {
|
|
10295
|
+
showTitle: false
|
|
10296
|
+
},
|
|
10297
|
+
render: function render(text) {
|
|
10298
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10299
|
+
placement: "topLeft",
|
|
10300
|
+
title: text
|
|
10301
|
+
}, text);
|
|
10302
|
+
},
|
|
10303
|
+
dataIndex: 'brandName'
|
|
10304
|
+
}, {
|
|
10305
|
+
title: '类目',
|
|
10306
|
+
width: 100,
|
|
10307
|
+
ellipsis: {
|
|
10308
|
+
showTitle: false
|
|
10309
|
+
},
|
|
10310
|
+
render: function render(text) {
|
|
10311
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10312
|
+
placement: "topLeft",
|
|
10313
|
+
title: text
|
|
10314
|
+
}, text);
|
|
10315
|
+
},
|
|
10316
|
+
dataIndex: 'categoryName'
|
|
10317
|
+
}, {
|
|
10318
|
+
title: '品类',
|
|
10319
|
+
width: 100,
|
|
10320
|
+
ellipsis: {
|
|
10321
|
+
showTitle: false
|
|
10322
|
+
},
|
|
10323
|
+
render: function render(text) {
|
|
10324
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10325
|
+
placement: "topLeft",
|
|
10326
|
+
title: text
|
|
10327
|
+
}, text);
|
|
10328
|
+
},
|
|
10329
|
+
dataIndex: 'className'
|
|
10330
|
+
}],
|
|
10342
10331
|
selectColumn: mTpSelectColumn,
|
|
10343
|
-
promiseLoadList:
|
|
10332
|
+
promiseLoadList: initialPromiseLoadList
|
|
10344
10333
|
};
|
|
10345
10334
|
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10346
10335
|
modalTableProps: modalTableProps
|
|
@@ -10416,7 +10405,7 @@ var CommodityEntry = function CommodityEntry(props) {
|
|
|
10416
10405
|
onCancel: handleCancel,
|
|
10417
10406
|
destroyOnClose: true,
|
|
10418
10407
|
zIndex: 15
|
|
10419
|
-
}, otherModalProps), /*#__PURE__*/React$1.createElement(DataValidation,
|
|
10408
|
+
}, otherModalProps), /*#__PURE__*/React$1.createElement(DataValidation, {
|
|
10420
10409
|
onRef: function onRef(ref) {
|
|
10421
10410
|
dataValidationRef = ref;
|
|
10422
10411
|
},
|
|
@@ -10424,7 +10413,7 @@ var CommodityEntry = function CommodityEntry(props) {
|
|
|
10424
10413
|
validDataUrl: validDataUrl,
|
|
10425
10414
|
isBrandAuth: isBrandAuth,
|
|
10426
10415
|
isCheckStockNum: isCheckStockNum
|
|
10427
|
-
})))
|
|
10416
|
+
}))) || '');
|
|
10428
10417
|
};
|
|
10429
10418
|
|
|
10430
10419
|
/*
|
|
@@ -10434,7 +10423,7 @@ var CommodityEntry = function CommodityEntry(props) {
|
|
|
10434
10423
|
* @LastEditTime: 2022-01-14 17:17:26
|
|
10435
10424
|
* @LastEditors: rodchen
|
|
10436
10425
|
*/
|
|
10437
|
-
var index$
|
|
10426
|
+
var index$2 = (function (storageKeyString) {
|
|
10438
10427
|
var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
10439
10428
|
var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
|
|
10440
10429
|
if (typeof seconds !== 'number') throw new Error('seconds should be number');
|
|
@@ -10874,7 +10863,7 @@ var BusinessTreeSearchSelect$1 = /*#__PURE__*/React$1.memo(BusinessTreeSearchSel
|
|
|
10874
10863
|
var css_248z$8 = ".form-status-label {\n height: 48px;\n margin-right: 12px;\n display: inline-block;\n position: relative;\n background-color: #B0B4B7;\n align-items: center;\n}\n.choosed-status-label.form-status-label {\n background-color: #005CFF;\n}\n.form-status-label:last-child {\n margin-right: 0px;\n}\n.form-status-label:first-child::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.choosed-status-label.form-status-label::after {\n border-left: 12px solid #005CFF;\n}\n.choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {\n border-left: 12px solid #005CFF;\n}\n.form-status-label:last-child::after {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::before {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.status-label-index {\n display: inline-block;\n width: 24px;\n height: 24px;\n border: 1px solid #FFFFFF;\n color: #FFFFFF;\n border-radius: 50%;\n font-family: Montserrat;\n font-size: 14px;\n line-height: 24px;\n text-align: center;\n margin: 0 6px 0 20px;\n}\n.status-label-key {\n width: 50px;\n height: 100%;\n display: inline-flex;\n float: left;\n align-items: center;\n justify-content: center;\n}\n.status-label-operate {\n float: left;\n width: calc(100% - 50px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 100%;\n margin: 4px 0;\n}\n.status-label-operate > div {\n font-size: 12px;\n height: 20px;\n line-height: 20px;\n color: #FFFFFF;\n font-family: PingFangSC;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.status-label-operate > div:first-child {\n font-size: 14px;\n font-weight: 600;\n}\n.only-one-child.form-status-label::after,\n.only-one-child.form-status-label::before {\n border-left: 0px;\n}\n";
|
|
10875
10864
|
styleInject(css_248z$8);
|
|
10876
10865
|
|
|
10877
|
-
var index$
|
|
10866
|
+
var index$3 = (function (props) {
|
|
10878
10867
|
var _props$formStatusMapp = props.formStatusMapping,
|
|
10879
10868
|
formStatusMapping = _props$formStatusMapp === void 0 ? [] : _props$formStatusMapp;
|
|
10880
10869
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
@@ -12355,7 +12344,7 @@ var iconMap = {
|
|
|
12355
12344
|
src: moreIcon
|
|
12356
12345
|
})
|
|
12357
12346
|
};
|
|
12358
|
-
var index$
|
|
12347
|
+
var index$4 = (function (props) {
|
|
12359
12348
|
var _useLocation = useLocation(),
|
|
12360
12349
|
pathname = _useLocation.pathname;
|
|
12361
12350
|
var _useState = useState(pathname + 'id'),
|
|
@@ -12448,7 +12437,7 @@ var DetailWrapper = /*#__PURE__*/React$1.memo(function (_ref) {
|
|
|
12448
12437
|
var renderPageActionList = function renderPageActionList(actionLists) {
|
|
12449
12438
|
var authButton = localStorage.getItem(getMenuAuthDataKey()) ? JSON.parse(localStorage.getItem(getMenuAuthDataKey())) : [];
|
|
12450
12439
|
var visibleActions = actionLists.filter(function (action) {
|
|
12451
|
-
return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (
|
|
12440
|
+
return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (judgeIsEmpty$1(action.code) || authButton.filter(function (item) {
|
|
12452
12441
|
return item === action.code;
|
|
12453
12442
|
}));
|
|
12454
12443
|
});
|
|
@@ -12573,7 +12562,7 @@ var css_248z$d = ".home_page_head {\n height: 54px;\n display: flex;\n justif
|
|
|
12573
12562
|
styleInject(css_248z$d);
|
|
12574
12563
|
|
|
12575
12564
|
var _excluded$c = ["children"];
|
|
12576
|
-
var index$
|
|
12565
|
+
var index$5 = (function (props) {
|
|
12577
12566
|
var _useLocation = useLocation(),
|
|
12578
12567
|
pathname = _useLocation.pathname;
|
|
12579
12568
|
var _useState = useState(pathname + 'id'),
|
|
@@ -13959,6 +13948,14 @@ var ResizeableTitle$2 = function ResizeableTitle(props) {
|
|
|
13959
13948
|
};
|
|
13960
13949
|
var BsSulaQueryTable = (function (props) {
|
|
13961
13950
|
var bsTableCode = (props === null || props === void 0 ? void 0 : props.tableCode) || window.location.hash; //设置列字段的唯一标识
|
|
13951
|
+
// 获取 table columns中所有的 key 防止有的地方是 dataindex
|
|
13952
|
+
var checkedList = useMemo(function () {
|
|
13953
|
+
return props.columns.filter(function (col) {
|
|
13954
|
+
return !col.hidden;
|
|
13955
|
+
}).map(function (d) {
|
|
13956
|
+
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
13957
|
+
});
|
|
13958
|
+
}, [props.columns]);
|
|
13962
13959
|
var getConfigFromlocalstorage = function getConfigFromlocalstorage(type) {
|
|
13963
13960
|
var config = localStorage.getItem(type) || '[]';
|
|
13964
13961
|
var configArray = JSON.parse(config);
|
|
@@ -13970,66 +13967,97 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13970
13967
|
}
|
|
13971
13968
|
return [];
|
|
13972
13969
|
};
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13970
|
+
/**
|
|
13971
|
+
* 根据保存的配置和原始配置,获取设置的字段或列。
|
|
13972
|
+
* @param savedConfig 保存的配置数组,可能包含字段或列的配置。
|
|
13973
|
+
* @param originConfig 原始配置数组,包含完整的字段或列信息。
|
|
13974
|
+
* @param type 字段或列的类型,用于确定配置的属性。
|
|
13975
|
+
* @returns 返回根据保存的配置处理后的字段或列数组,如果未保存任何配置,则返回原始配置。
|
|
13976
|
+
*/
|
|
13977
|
+
var getSettingFieldOrColumn = function getSettingFieldOrColumn(savedConfig, originConfig, type) {
|
|
13978
|
+
/**
|
|
13979
|
+
* 判断值是否为字符串数组。
|
|
13980
|
+
* @param value 待判断的值。
|
|
13981
|
+
* @returns 如果值是字符串数组,则返回true,否则返回false。
|
|
13982
|
+
*/
|
|
13983
|
+
var isStringArray = function isStringArray(value) {
|
|
13984
|
+
return Array.isArray(value) && value.every(function (v) {
|
|
13985
|
+
return typeof v === 'string';
|
|
13986
|
+
});
|
|
13987
|
+
};
|
|
13988
|
+
/**
|
|
13989
|
+
* 根据配置项和类型,获取配置项的键。
|
|
13990
|
+
* @param config 配置项,可以是字段或列。
|
|
13991
|
+
* @param type 配置项的类型。
|
|
13992
|
+
* @returns 返回配置项的键,如果无法获取,则返回空字符串。
|
|
13993
|
+
*/
|
|
13994
|
+
var getItemKey = function getItemKey(config, type) {
|
|
13995
|
+
try {
|
|
13996
|
+
if (type === 'columns') {
|
|
13997
|
+
return isStringArray(config.key) ? JSON.stringify(config.key) : isStringArray(config.dataIndex) ? JSON.stringify(config.dataIndex) : config.key || config.dataIndex || '';
|
|
13998
|
+
}
|
|
13999
|
+
return isStringArray(config.name) ? JSON.stringify(config.name) : config.name || '';
|
|
14000
|
+
} catch (e) {}
|
|
14001
|
+
return '';
|
|
14002
|
+
};
|
|
14003
|
+
var newConfig = [];
|
|
14004
|
+
if (savedConfig.length) {
|
|
14005
|
+
var hash = originConfig.reduce(function (prev, inneritem) {
|
|
14006
|
+
prev[getItemKey(inneritem, type)] = inneritem;
|
|
14007
|
+
return prev;
|
|
14008
|
+
}, {});
|
|
14009
|
+
savedConfig.forEach(function (config, index) {
|
|
14010
|
+
var inner = hash[getItemKey(config, type)];
|
|
14011
|
+
inner && newConfig.push(_objectSpread2(_objectSpread2({}, inner), config));
|
|
14012
|
+
});
|
|
14013
|
+
}
|
|
14014
|
+
if (newConfig.length) return newConfig;
|
|
14015
|
+
if (type === 'columns') {
|
|
14016
|
+
return originConfig.filter(function (column) {
|
|
14017
|
+
var columnKey = getItemKey(column, type);
|
|
14018
|
+
return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
|
|
14019
|
+
});
|
|
14020
|
+
}
|
|
14021
|
+
return _toConsumableArray(originConfig);
|
|
13987
14022
|
};
|
|
13988
14023
|
var refs = useRef(null);
|
|
13989
14024
|
var _useState = useState(''),
|
|
13990
14025
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13991
14026
|
pagePath = _useState2[0],
|
|
13992
14027
|
setPagePath = _useState2[1];
|
|
13993
|
-
// 获取 table columns中所有的 key 防止有的地方是 dataindex
|
|
13994
|
-
var _useState3 = useState(props.columns.filter(function (col) {
|
|
13995
|
-
return !col.hidden;
|
|
13996
|
-
}).map(function (d) {
|
|
13997
|
-
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
13998
|
-
})),
|
|
13999
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
14000
|
-
checkedList = _useState4[0],
|
|
14001
|
-
setCheckedList = _useState4[1];
|
|
14002
14028
|
var _useLocation = useLocation(),
|
|
14003
14029
|
pathname = _useLocation.pathname;
|
|
14004
|
-
var
|
|
14005
|
-
|
|
14006
|
-
id =
|
|
14007
|
-
var
|
|
14008
|
-
|
|
14009
|
-
isFullScreen =
|
|
14010
|
-
setIsFnllScreen =
|
|
14030
|
+
var _useState3 = useState(Number(Math.random().toString().substr(2, 0) + Date.now()).toString(36)),
|
|
14031
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
14032
|
+
id = _useState4[0];
|
|
14033
|
+
var _useState5 = useState(false),
|
|
14034
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14035
|
+
isFullScreen = _useState6[0],
|
|
14036
|
+
setIsFnllScreen = _useState6[1];
|
|
14011
14037
|
// @ts-nocheck
|
|
14012
|
-
var
|
|
14038
|
+
var _useState7 = useState(props),
|
|
14039
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
14040
|
+
value = _useState8[0],
|
|
14041
|
+
setValue = _useState8[1];
|
|
14042
|
+
var _props$fields = props.fields,
|
|
14043
|
+
fields = _props$fields === void 0 ? [] : _props$fields;
|
|
14044
|
+
var _useState9 = useState([]),
|
|
14013
14045
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
var
|
|
14046
|
+
showColumn = _useState10[0],
|
|
14047
|
+
setShowColumns = _useState10[1]; // 列字段
|
|
14048
|
+
var originSearchFields = getSettingFieldOrColumn(getConfigFromlocalstorage(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION), fields, 'searchFields');
|
|
14049
|
+
var _useState11 = useState(originSearchFields),
|
|
14017
14050
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
var originSearchFields = getInitialSearchFieldsInfo();
|
|
14021
|
-
var _useState13 = useState(originSearchFields),
|
|
14022
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
14023
|
-
showSearchFields = _useState14[0],
|
|
14024
|
-
setShowSearchFields = _useState14[1]; //搜索项字段
|
|
14051
|
+
showSearchFields = _useState12[0],
|
|
14052
|
+
setShowSearchFields = _useState12[1]; //搜索项字段
|
|
14025
14053
|
var _props$isPage = props.isPage,
|
|
14026
14054
|
pagination = props.pagination,
|
|
14027
14055
|
tableCode = props.tableCode,
|
|
14028
14056
|
appRequestConfig = props.appRequestConfig;
|
|
14029
|
-
var
|
|
14030
|
-
|
|
14031
|
-
height =
|
|
14032
|
-
setHeight =
|
|
14057
|
+
var _useState13 = useState('100vh'),
|
|
14058
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
14059
|
+
height = _useState14[0],
|
|
14060
|
+
setHeight = _useState14[1];
|
|
14033
14061
|
var sortTableRef = useRef(null);
|
|
14034
14062
|
var searchTableRef = useRef(null);
|
|
14035
14063
|
// 获取table高度
|
|
@@ -14090,7 +14118,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
14090
14118
|
if (Number(item.slice(-1)) >= 1) {
|
|
14091
14119
|
Item = item.substr(0, item.length - 1);
|
|
14092
14120
|
}
|
|
14093
|
-
if (
|
|
14121
|
+
if (!authButton.filter(function (itemInner) {
|
|
14094
14122
|
return Item === itemInner;
|
|
14095
14123
|
}).length) {
|
|
14096
14124
|
resourceCodeArray[item].visible = false;
|
|
@@ -14102,17 +14130,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
14102
14130
|
}));
|
|
14103
14131
|
var columns = props.columns;
|
|
14104
14132
|
var columnConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.COLUMN_CONDITION);
|
|
14105
|
-
var showColumns = columnConfig
|
|
14106
|
-
var inner = columns.filter(function (inneritem) {
|
|
14107
|
-
var innerKey = Array.isArray(inneritem.key || inneritem.dataIndex) ? JSON.stringify(inneritem.key || inneritem.dataIndex) : inneritem.key || inneritem.dataIndex;
|
|
14108
|
-
var itemKey = Array.isArray(item.key || item.dataIndex) ? JSON.stringify(item.key || item.dataIndex) : item.key || item.dataIndex;
|
|
14109
|
-
return innerKey && innerKey === itemKey;
|
|
14110
|
-
})[0];
|
|
14111
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
14112
|
-
}) : columns.filter(function (column) {
|
|
14113
|
-
var columnKey = Array.isArray(column.key || column.dataIndex) ? JSON.stringify(column.key || column.dataIndex) : column.key || column.dataIndex;
|
|
14114
|
-
return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
|
|
14115
|
-
});
|
|
14133
|
+
var showColumns = getSettingFieldOrColumn(columnConfig, columns, 'columns');
|
|
14116
14134
|
showColumns.forEach(function (item, index) {
|
|
14117
14135
|
item.width = item.width || getItemDefaultWidth(item);
|
|
14118
14136
|
handleBssulaColumnsSpecialParams(item);
|
|
@@ -14526,7 +14544,7 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
|
14526
14544
|
routesData.splice(i, 1);
|
|
14527
14545
|
return 0; // continue
|
|
14528
14546
|
}
|
|
14529
|
-
if (
|
|
14547
|
+
if (routesData[i].code && authButton.every(function (item) {
|
|
14530
14548
|
return routesData[i].code != item;
|
|
14531
14549
|
})) {
|
|
14532
14550
|
routesData.splice(i, 1);
|
|
@@ -15169,7 +15187,9 @@ var GlobalHeaderCom = function GlobalHeaderCom(props) {
|
|
|
15169
15187
|
deep(item.routes);
|
|
15170
15188
|
} else if (!item.hideInMenu && (name ? formatMessage({
|
|
15171
15189
|
id: "menu.".concat(item.name)
|
|
15172
|
-
}).indexOf(name) !== -1 : true)) {
|
|
15190
|
+
}).indexOf(name) !== -1 : true) && btnAuth.find(function (d) {
|
|
15191
|
+
return d === item.code;
|
|
15192
|
+
})) {
|
|
15173
15193
|
resultList.push(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
15174
15194
|
fullPathName: getFullPathName(item.name)
|
|
15175
15195
|
}));
|
|
@@ -16456,70 +16476,10 @@ var CustomerMenuHeader = function CustomerMenuHeader(_ref) {
|
|
|
16456
16476
|
var css_248z$m = ".customer_menu_content {\n color: #b1bad4;\n background: #141620;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n height: 40px;\n border-bottom: 1px solid #3d4047;\n}\n.customer_menu_content .ant-btn-link {\n color: #b1bad4 !important;\n font-size: 16px;\n height: 36px;\n}\n.menu_item {\n line-height: 30px;\n height: 30px;\n color: rgba(44, 47, 46);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.link_style:hover {\n background-color: #e4e7ed;\n cursor: pointer;\n color: #1890ff;\n}\n.sub_menu_content {\n box-shadow: 2px 0px 4px 0px rgba(185, 185, 185, 0.5);\n position: fixed;\n top: 50px;\n left: 140px;\n width: 200px;\n height: 100%;\n background-color: #fff;\n padding-top: 10px;\n z-index: 9999;\n}\n.tab_left_operate {\n display: flex;\n height: 28px;\n align-items: center;\n}\n.tab_left_operate > div {\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n cursor: pointer;\n}\n.tab_left_operate > div:last-child {\n box-shadow: 2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n}\n.tab_right_operate {\n height: 28px;\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n box-shadow: -2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n cursor: pointer;\n position: relative;\n}\n";
|
|
16457
16477
|
styleInject(css_248z$m);
|
|
16458
16478
|
|
|
16459
|
-
/*
|
|
16460
|
-
* @Date: 2022-04-01 15:42:51
|
|
16461
|
-
* @LastEditors: 追随
|
|
16462
|
-
* @LastEditTime: 2022-09-16 20:53:23
|
|
16463
|
-
*/
|
|
16464
|
-
var NoFoundPage = function NoFoundPage(props) {
|
|
16465
|
-
return /*#__PURE__*/React$1.createElement("div", {
|
|
16466
|
-
style: {
|
|
16467
|
-
height: 'calc(100vh - 88px)',
|
|
16468
|
-
background: '#fff',
|
|
16469
|
-
display: 'flex',
|
|
16470
|
-
justifyContent: 'center',
|
|
16471
|
-
alignItems: 'center'
|
|
16472
|
-
}
|
|
16473
|
-
}, /*#__PURE__*/React$1.createElement(Result, {
|
|
16474
|
-
status: "404",
|
|
16475
|
-
title: "404",
|
|
16476
|
-
subTitle: /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("div", null, "\u62B1\u6B49\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u8BE5\u9875\u9762\uFF01"), /*#__PURE__*/React$1.createElement("div", null, "\u8BF7\u5173\u95ED\u5F53\u524D\u9875\u7B7E"))
|
|
16477
|
-
}));
|
|
16478
|
-
};
|
|
16479
|
-
|
|
16480
16479
|
var _excluded$g = ["route"];
|
|
16481
16480
|
var TabPane = Tabs.TabPane;
|
|
16482
|
-
var getId = function getId(str) {
|
|
16483
|
-
// 找到最后一个 / 的位置
|
|
16484
|
-
var lastSlashIndex = str.lastIndexOf("/");
|
|
16485
|
-
// 如果找到了 /,则返回它后面的部分
|
|
16486
|
-
if (lastSlashIndex !== -1) {
|
|
16487
|
-
return str.substring(lastSlashIndex + 1);
|
|
16488
|
-
} else {
|
|
16489
|
-
// 如果没有找到 /,则返回整个字符串
|
|
16490
|
-
return null;
|
|
16491
|
-
}
|
|
16492
|
-
};
|
|
16493
|
-
// 获取权限菜单path&通用单据id
|
|
16494
|
-
var getAuthMenuPathAndDocsId = function getAuthMenuPathAndDocsId(pathToRegexp) {
|
|
16495
|
-
var limitedMenuData = localStorage.getItem(getLimitMenuDataKey()) ? JSON.parse(localStorage.getItem(getLimitMenuDataKey())) : [];
|
|
16496
|
-
var menuKeys = [];
|
|
16497
|
-
var docsId = [];
|
|
16498
|
-
var getLimitedMenuKeys = function getLimitedMenuKeys(data) {
|
|
16499
|
-
data.forEach(function (item) {
|
|
16500
|
-
if (item.children && item.children.length > 0) {
|
|
16501
|
-
getLimitedMenuKeys(item.children);
|
|
16502
|
-
} else {
|
|
16503
|
-
var originPath = item.path.replace(/^\/\w+\//, '/');
|
|
16504
|
-
menuKeys.push(originPath);
|
|
16505
|
-
if (pathToRegexp('/operation-and-maintenance-center/configuration-management/all-general-documents-specific/:id').test(originPath)) {
|
|
16506
|
-
getId(originPath) && docsId.push(getId(originPath));
|
|
16507
|
-
}
|
|
16508
|
-
}
|
|
16509
|
-
});
|
|
16510
|
-
};
|
|
16511
|
-
try {
|
|
16512
|
-
getLimitedMenuKeys(limitedMenuData);
|
|
16513
|
-
} catch (e) {}
|
|
16514
|
-
return {
|
|
16515
|
-
menuKeys: menuKeys,
|
|
16516
|
-
docsId: docsId
|
|
16517
|
-
};
|
|
16518
|
-
};
|
|
16519
16481
|
var UN_LISTTEN_DRP;
|
|
16520
16482
|
var routerArray = [];
|
|
16521
|
-
var authMenuPathList = [];
|
|
16522
|
-
var docsId = [];
|
|
16523
16483
|
var lastTwoRouterArray = [1, 2];
|
|
16524
16484
|
var type = 'DraggableTabNode';
|
|
16525
16485
|
var DraggableTabNode = function DraggableTabNode(_ref) {
|
|
@@ -16712,7 +16672,6 @@ var ItemMenu = function ItemMenu(props) {
|
|
|
16712
16672
|
};
|
|
16713
16673
|
var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
16714
16674
|
function BasicLayout(props) {
|
|
16715
|
-
var _getAuthMenuPathAndDo, _getAuthMenuPathAndDo2;
|
|
16716
16675
|
var _this;
|
|
16717
16676
|
_classCallCheck(this, BasicLayout);
|
|
16718
16677
|
_this = _callSuper(this, BasicLayout, [props]);
|
|
@@ -16729,41 +16688,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
16729
16688
|
return queryString;
|
|
16730
16689
|
};
|
|
16731
16690
|
_this.updateTree = function (Tree) {
|
|
16732
|
-
var authMenuKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
16733
16691
|
var treeData = Tree;
|
|
16734
16692
|
var treeList = [];
|
|
16735
|
-
// 是否为权限菜单路径
|
|
16736
|
-
var getLimitedMenuPath = function getLimitedMenuPath(node) {
|
|
16737
|
-
return authMenuKeys.some(function (item) {
|
|
16738
|
-
return (node.path || '').includes(item);
|
|
16739
|
-
});
|
|
16740
|
-
};
|
|
16741
|
-
// 是否为通用单据菜单路径
|
|
16742
|
-
var getGenerateDocs = function getGenerateDocs(node) {
|
|
16743
|
-
return (node.path || '').includes('all-general-documents');
|
|
16744
|
-
};
|
|
16745
16693
|
// 递归获取树列表
|
|
16746
16694
|
var getTreeList = function getTreeList(data) {
|
|
16747
16695
|
data.forEach(function (node) {
|
|
16748
16696
|
if (node.routes && node.routes.length > 0) {
|
|
16749
16697
|
getTreeList(node.routes);
|
|
16750
|
-
|
|
16751
|
-
}
|
|
16752
|
-
// todo:暂时处理非wujie环境不做404管控
|
|
16753
|
-
if (!window.__POWERED_BY_WUJIE__) {
|
|
16754
|
-
treeList.push({
|
|
16755
|
-
tab: node.locale,
|
|
16756
|
-
key: node.path,
|
|
16757
|
-
locale: node.locale,
|
|
16758
|
-
closable: true,
|
|
16759
|
-
content: node.component,
|
|
16760
|
-
name: node.name,
|
|
16761
|
-
hideInMenu: node.hideInMenu,
|
|
16762
|
-
isOnlyOnePage: node.isOnlyOnePage
|
|
16763
|
-
});
|
|
16764
|
-
return;
|
|
16765
|
-
}
|
|
16766
|
-
if (node.path === '/' || getLimitedMenuPath(node) || getGenerateDocs(node)) {
|
|
16698
|
+
} else {
|
|
16767
16699
|
treeList.push({
|
|
16768
16700
|
tab: node.locale,
|
|
16769
16701
|
key: node.path,
|
|
@@ -16830,6 +16762,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
16830
16762
|
return moment$1(timeStr).add(8, 'hours').format(format) || '- -';
|
|
16831
16763
|
};
|
|
16832
16764
|
_this.onChange = function (key) {
|
|
16765
|
+
// console.log('onChange');
|
|
16833
16766
|
if (key !== _this.state.activeKey) {
|
|
16834
16767
|
_this.setState({
|
|
16835
16768
|
activeKey: key
|
|
@@ -17115,9 +17048,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17115
17048
|
});
|
|
17116
17049
|
}
|
|
17117
17050
|
};
|
|
17118
|
-
|
|
17119
|
-
docsId = ((_getAuthMenuPathAndDo2 = getAuthMenuPathAndDocsId(props.pathToRegexp)) === null || _getAuthMenuPathAndDo2 === void 0 ? void 0 : _getAuthMenuPathAndDo2.docsId) || [];
|
|
17120
|
-
routerArray = _this.updateTree(props.route.routes, authMenuPathList);
|
|
17051
|
+
routerArray = _this.updateTree(props.route.routes);
|
|
17121
17052
|
var homeRouter = routerArray.filter(function (itemroute) {
|
|
17122
17053
|
return itemroute.key === '/';
|
|
17123
17054
|
})[0];
|
|
@@ -17217,28 +17148,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17217
17148
|
hideMenuArray = _this2$state.hideMenuArray;
|
|
17218
17149
|
var newListenRouterState = _toConsumableArray(listenRouterState);
|
|
17219
17150
|
var newListenRouterKey = _toConsumableArray(listenRouterKey);
|
|
17220
|
-
/**
|
|
17221
|
-
* 根据给定的路由数组和当前路由信息,筛选出与当前路由匹配的路由项。
|
|
17222
|
-
*
|
|
17223
|
-
* @param routerArray 路由数组,包含多个路由项,每个路由项有一个键(key)。
|
|
17224
|
-
* @param route 当前的路由信息,包含路径(pathname)等信息。
|
|
17225
|
-
* @param docsId 通用单据ID的数组,用于进一步筛选路由。
|
|
17226
|
-
* @returns 返回与当前路由匹配的第一个路由项,如果没有匹配项则返回undefined。
|
|
17227
|
-
*/
|
|
17228
17151
|
var replaceRouter = routerArray.filter(function (itemRoute) {
|
|
17229
|
-
var _route$pathname, _route$pathname2;
|
|
17230
|
-
// 单独处理通用单据预览
|
|
17231
|
-
if (window.top !== window && !window.__POWERED_BY_WUJIE__ && ((_route$pathname = route.pathname) === null || _route$pathname === void 0 ? void 0 : _route$pathname.includes('all-general-documents'))) {
|
|
17232
|
-
return pathToRegexp(itemRoute.key || '').test(route.pathname);
|
|
17233
|
-
}
|
|
17234
|
-
// 当路由路径包含'all-general-documents'时,按通用单据处理
|
|
17235
|
-
if (((_route$pathname2 = route.pathname) === null || _route$pathname2 === void 0 ? void 0 : _route$pathname2.includes('all-general-documents')) && shouldUseAuth()) {
|
|
17236
|
-
// 检查路由路径是否匹配路由项的键,并且路径中包含至少一个通用单据ID
|
|
17237
|
-
return pathToRegexp(itemRoute.key || '').test(route.pathname) && docsId.some(function (item) {
|
|
17238
|
-
return route.pathname.includes(item);
|
|
17239
|
-
});
|
|
17240
|
-
}
|
|
17241
|
-
// 对于不包含'all-general-documents'的路径,只检查路由路径是否匹配路由项的键
|
|
17242
17152
|
return pathToRegexp(itemRoute.key || '').test(route.pathname);
|
|
17243
17153
|
})[0];
|
|
17244
17154
|
var currentKey = '';
|
|
@@ -17262,15 +17172,20 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17262
17172
|
}
|
|
17263
17173
|
if (!listenRouterKey.includes(currentKey)) {
|
|
17264
17174
|
if (!replaceRouter) {
|
|
17265
|
-
|
|
17266
|
-
|
|
17267
|
-
key
|
|
17268
|
-
|
|
17269
|
-
|
|
17270
|
-
|
|
17271
|
-
|
|
17272
|
-
|
|
17273
|
-
|
|
17175
|
+
var _routerArray$filter;
|
|
17176
|
+
replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
|
|
17177
|
+
return itemroute.key === '/404';
|
|
17178
|
+
})) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
|
|
17179
|
+
_this2.setState({
|
|
17180
|
+
listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
|
|
17181
|
+
key: currentKey,
|
|
17182
|
+
tab: '404'
|
|
17183
|
+
})]),
|
|
17184
|
+
activeKey: currentKey,
|
|
17185
|
+
listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
|
|
17186
|
+
}, function () {
|
|
17187
|
+
_this2.checkisNavSlide();
|
|
17188
|
+
});
|
|
17274
17189
|
} else {
|
|
17275
17190
|
var match = matchPath(route.pathname, {
|
|
17276
17191
|
path: replaceRouter.key
|
|
@@ -17788,7 +17703,8 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
17788
17703
|
getDictionaryTextByValue = _this$props4.getDictionaryTextByValue,
|
|
17789
17704
|
timeFormat = _this$props4.timeFormat,
|
|
17790
17705
|
transparentProps = _this$props4.transparentProps;
|
|
17791
|
-
|
|
17706
|
+
console.log('child wrapper conpent', this.props);
|
|
17707
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
17792
17708
|
getDictionarySource: getDictionarySource,
|
|
17793
17709
|
getDictionaryTextByValue: getDictionaryTextByValue,
|
|
17794
17710
|
timeFormat: timeFormat
|
|
@@ -17798,7 +17714,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
17798
17714
|
}
|
|
17799
17715
|
}]);
|
|
17800
17716
|
}(React$1.Component);
|
|
17801
|
-
var index$
|
|
17717
|
+
var index$6 = (function (props) {
|
|
17802
17718
|
var _useModel = useModel('@@initialState'),
|
|
17803
17719
|
_useModel$initialStat = _useModel.initialState,
|
|
17804
17720
|
initialState = _useModel$initialStat === void 0 ? {} : _useModel$initialStat;
|
|
@@ -18040,7 +17956,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
|
|
|
18040
17956
|
};
|
|
18041
17957
|
var FixedScrollBar$1 = /*#__PURE__*/React$1.forwardRef(FixedScrollBar);
|
|
18042
17958
|
|
|
18043
|
-
var index$
|
|
17959
|
+
var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18044
17960
|
var _useState = useState(false),
|
|
18045
17961
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18046
17962
|
show = _useState2[0],
|
|
@@ -27059,16 +26975,6 @@ var JsonQueryTable = /*#__PURE__*/React$1.memo(function (props) {
|
|
|
27059
26975
|
}, "setting"));
|
|
27060
26976
|
});
|
|
27061
26977
|
|
|
27062
|
-
var AuthButton = function AuthButton(props) {
|
|
27063
|
-
var code = props.code,
|
|
27064
|
-
children = props.children;
|
|
27065
|
-
return /*#__PURE__*/React$1.createElement("span", {
|
|
27066
|
-
style: {
|
|
27067
|
-
display: authFunc(code) ? 'inline-block' : 'none'
|
|
27068
|
-
}
|
|
27069
|
-
}, children);
|
|
27070
|
-
};
|
|
27071
|
-
|
|
27072
26978
|
var EllipsisTooltip = /*#__PURE__*/function (_React$Component) {
|
|
27073
26979
|
function EllipsisTooltip() {
|
|
27074
26980
|
var _this;
|
|
@@ -32550,7 +32456,7 @@ var BaseRule = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32550
32456
|
}, "\u6A21\u677F")))))));
|
|
32551
32457
|
});
|
|
32552
32458
|
|
|
32553
|
-
var index$
|
|
32459
|
+
var index$8 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
32554
32460
|
var currentSceneId = (props === null || props === void 0 ? void 0 : props.id) || (props === null || props === void 0 ? void 0 : props.sceneId); // 规则模板id
|
|
32555
32461
|
var extStrField01 = props === null || props === void 0 ? void 0 : props.extStrField01; // 上层业务关键字段
|
|
32556
32462
|
var instanceName = props === null || props === void 0 ? void 0 : props.name; // 实例名称
|
|
@@ -32763,4 +32669,4 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32763
32669
|
})));
|
|
32764
32670
|
});
|
|
32765
32671
|
|
|
32766
|
-
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect,
|
|
32672
|
+
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, BsCascader, index$6 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$2 as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$4 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, index$5 as HomePageWrapper, JsonQueryTable, index$7 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$8 as RuleSetter, SearchSelect, index$3 as StateFlow, ColumnSettingSulaTable as SulaColumnSettingTable, TableColumnSetting, TreeSearchSelect, authFunc, checkQuantityAccuracy, downloadExcel, formatter, getAccountID, getAccountId, getConfigTableColumns, getCurrentTargetBgId, getCurrentTenantId, getDictionarySource, getEmployeeCode, getEmployeeId, getLastKey, getLimitMenuDataKey, getLocalStorageSaveKey, getMenuAuthDataKey, getSessionId, getTenantList, getUserId, getUserName, go2BackAndClose, handleAntdColumnsSpecialParams, handleBssulaColumnsSpecialParams, handleError, handleJudgeAuthButtons, handleRequestAuthHeader, handleRequestUrl, handleUserPhone, judgeIsEmpty, judgeIsRequestError, judgeIsRequestSuccess, memoizeOneFormatter, precisionQuantity, removeCurrentTenantId, removeTenantList, saveCurrentTenantId, saveTenantList, setConfigTableColumns, uuid };
|