@bit-sun/business-component 2.4.31-alpha.8 → 2.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +983 -969
- package/dist/index.js +982 -970
- package/dist/utils/auth.d.ts +0 -1
- package/package.json +5 -8
- package/src/components/Business/AddSelectBusiness/index.md +0 -236
- package/src/components/Business/AddSelectBusiness/index.tsx +296 -333
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +1 -0
- package/src/components/Business/BsLayouts/index.tsx +23 -111
- package/src/components/Business/BsLayouts/utils.tsx +0 -2
- package/src/components/Business/BsSulaQueryTable/index.tsx +90 -44
- package/src/components/Business/CommodityEntry/index.md +1 -15
- package/src/components/Business/CommodityEntry/index.tsx +0 -1
- package/src/components/Business/DetailPageWrapper/index.tsx +1 -2
- package/src/components/Business/SearchSelect/index.md +1 -10
- package/src/components/Functional/AddSelect/helps.ts +1 -1
- package/src/components/Functional/AddSelect/index.tsx +223 -63
- package/src/components/Functional/DataImport/index.tsx +30 -35
- package/src/components/Functional/DataValidation/index.md +2 -15
- package/src/components/Functional/DataValidation/index.tsx +26 -39
- package/src/components/Functional/SearchSelect/index.tsx +1 -1
- package/src/utils/auth.ts +0 -6
- package/dist/components/Functional/AccessWrapper/index.d.ts +0 -5
- package/src/components/Functional/AccessWrapper/index.tsx +0 -34
package/dist/index.esm.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
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,
|
|
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
4
|
import _, { omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
5
|
-
import memoizeOne from 'memoize-one';
|
|
6
5
|
import { formatMessage, history, useLocation, Link, useModel, useIntl } from 'umi';
|
|
7
|
-
import isEqual from 'lodash/isEqual';
|
|
6
|
+
import isEqual$1 from 'lodash/isEqual';
|
|
8
7
|
import React$1, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
|
|
9
8
|
import moment$1 from 'moment';
|
|
10
9
|
import { ProfileTwoTone, ExclamationCircleOutlined, DownOutlined, UnorderedListOutlined, CopyOutlined, SearchOutlined, CaretLeftOutlined, CloseCircleOutlined, ArrowLeftOutlined, FolderOutlined, EllipsisOutlined, CaretDownOutlined, HomeOutlined, DoubleLeftOutlined, DoubleRightOutlined, MenuUnfoldOutlined, DashOutlined, SettingOutlined, BulbOutlined, PlayCircleOutlined, SaveOutlined, FullscreenExitOutlined, EditOutlined, MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons';
|
|
@@ -27,97 +26,9 @@ 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
|
|
|
30
|
-
function _arrayLikeToArray(r, a) {
|
|
31
|
-
(null == a || a > r.length) && (a = r.length);
|
|
32
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
33
|
-
return n;
|
|
34
|
-
}
|
|
35
|
-
function _arrayWithHoles(r) {
|
|
36
|
-
if (Array.isArray(r)) return r;
|
|
37
|
-
}
|
|
38
|
-
function _arrayWithoutHoles(r) {
|
|
39
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
40
|
-
}
|
|
41
|
-
function _assertThisInitialized(e) {
|
|
42
|
-
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
43
|
-
return e;
|
|
44
|
-
}
|
|
45
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
46
|
-
try {
|
|
47
|
-
var i = n[a](c),
|
|
48
|
-
u = i.value;
|
|
49
|
-
} catch (n) {
|
|
50
|
-
return void e(n);
|
|
51
|
-
}
|
|
52
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
53
|
-
}
|
|
54
|
-
function _asyncToGenerator(n) {
|
|
55
|
-
return function () {
|
|
56
|
-
var t = this,
|
|
57
|
-
e = arguments;
|
|
58
|
-
return new Promise(function (r, o) {
|
|
59
|
-
var a = n.apply(t, e);
|
|
60
|
-
function _next(n) {
|
|
61
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
62
|
-
}
|
|
63
|
-
function _throw(n) {
|
|
64
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
65
|
-
}
|
|
66
|
-
_next(void 0);
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
29
|
function _callSuper(t, o, e) {
|
|
71
30
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
72
31
|
}
|
|
73
|
-
function _classCallCheck(a, n) {
|
|
74
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
75
|
-
}
|
|
76
|
-
function _defineProperties(e, r) {
|
|
77
|
-
for (var t = 0; t < r.length; t++) {
|
|
78
|
-
var o = r[t];
|
|
79
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function _createClass(e, r, t) {
|
|
83
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
84
|
-
writable: !1
|
|
85
|
-
}), e;
|
|
86
|
-
}
|
|
87
|
-
function _defineProperty(e, r, t) {
|
|
88
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
89
|
-
value: t,
|
|
90
|
-
enumerable: !0,
|
|
91
|
-
configurable: !0,
|
|
92
|
-
writable: !0
|
|
93
|
-
}) : e[r] = t, e;
|
|
94
|
-
}
|
|
95
|
-
function _extends() {
|
|
96
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
97
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
98
|
-
var t = arguments[e];
|
|
99
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
100
|
-
}
|
|
101
|
-
return n;
|
|
102
|
-
}, _extends.apply(null, arguments);
|
|
103
|
-
}
|
|
104
|
-
function _getPrototypeOf(t) {
|
|
105
|
-
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
106
|
-
return t.__proto__ || Object.getPrototypeOf(t);
|
|
107
|
-
}, _getPrototypeOf(t);
|
|
108
|
-
}
|
|
109
|
-
function _inherits(t, e) {
|
|
110
|
-
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
111
|
-
t.prototype = Object.create(e && e.prototype, {
|
|
112
|
-
constructor: {
|
|
113
|
-
value: t,
|
|
114
|
-
writable: !0,
|
|
115
|
-
configurable: !0
|
|
116
|
-
}
|
|
117
|
-
}), Object.defineProperty(t, "prototype", {
|
|
118
|
-
writable: !1
|
|
119
|
-
}), e && _setPrototypeOf(t, e);
|
|
120
|
-
}
|
|
121
32
|
function _isNativeReflectConstruct() {
|
|
122
33
|
try {
|
|
123
34
|
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
@@ -126,9 +37,6 @@ function _isNativeReflectConstruct() {
|
|
|
126
37
|
return !!t;
|
|
127
38
|
})();
|
|
128
39
|
}
|
|
129
|
-
function _iterableToArray(r) {
|
|
130
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
131
|
-
}
|
|
132
40
|
function _iterableToArrayLimit(r, l) {
|
|
133
41
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
134
42
|
if (null != t) {
|
|
@@ -156,15 +64,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
156
64
|
return a;
|
|
157
65
|
}
|
|
158
66
|
}
|
|
159
|
-
function _nonIterableRest() {
|
|
160
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
161
|
-
}
|
|
162
|
-
function _nonIterableSpread() {
|
|
163
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
164
|
-
}
|
|
165
|
-
function _objectDestructuringEmpty(t) {
|
|
166
|
-
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
167
|
-
}
|
|
168
67
|
function ownKeys(e, r) {
|
|
169
68
|
var t = Object.keys(e);
|
|
170
69
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -186,31 +85,6 @@ function _objectSpread2(e) {
|
|
|
186
85
|
}
|
|
187
86
|
return e;
|
|
188
87
|
}
|
|
189
|
-
function _objectWithoutProperties(e, t) {
|
|
190
|
-
if (null == e) return {};
|
|
191
|
-
var o,
|
|
192
|
-
r,
|
|
193
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
194
|
-
if (Object.getOwnPropertySymbols) {
|
|
195
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
196
|
-
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
197
|
-
}
|
|
198
|
-
return i;
|
|
199
|
-
}
|
|
200
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
201
|
-
if (null == r) return {};
|
|
202
|
-
var t = {};
|
|
203
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
204
|
-
if (e.indexOf(n) >= 0) continue;
|
|
205
|
-
t[n] = r[n];
|
|
206
|
-
}
|
|
207
|
-
return t;
|
|
208
|
-
}
|
|
209
|
-
function _possibleConstructorReturn(t, e) {
|
|
210
|
-
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
211
|
-
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
212
|
-
return _assertThisInitialized(t);
|
|
213
|
-
}
|
|
214
88
|
function _regeneratorRuntime() {
|
|
215
89
|
_regeneratorRuntime = function () {
|
|
216
90
|
return e;
|
|
@@ -512,20 +386,6 @@ function _regeneratorRuntime() {
|
|
|
512
386
|
}
|
|
513
387
|
}, e;
|
|
514
388
|
}
|
|
515
|
-
function _setPrototypeOf(t, e) {
|
|
516
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
517
|
-
return t.__proto__ = e, t;
|
|
518
|
-
}, _setPrototypeOf(t, e);
|
|
519
|
-
}
|
|
520
|
-
function _slicedToArray(r, e) {
|
|
521
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
522
|
-
}
|
|
523
|
-
function _toArray(r) {
|
|
524
|
-
return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
|
|
525
|
-
}
|
|
526
|
-
function _toConsumableArray(r) {
|
|
527
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
528
|
-
}
|
|
529
389
|
function _toPrimitive(t, r) {
|
|
530
390
|
if ("object" != typeof t || !t) return t;
|
|
531
391
|
var e = t[Symbol.toPrimitive];
|
|
@@ -549,12 +409,194 @@ function _typeof(o) {
|
|
|
549
409
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
550
410
|
}, _typeof(o);
|
|
551
411
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
var
|
|
556
|
-
|
|
412
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
413
|
+
try {
|
|
414
|
+
var info = gen[key](arg);
|
|
415
|
+
var value = info.value;
|
|
416
|
+
} catch (error) {
|
|
417
|
+
reject(error);
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (info.done) {
|
|
421
|
+
resolve(value);
|
|
422
|
+
} else {
|
|
423
|
+
Promise.resolve(value).then(_next, _throw);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function _asyncToGenerator(fn) {
|
|
427
|
+
return function () {
|
|
428
|
+
var self = this,
|
|
429
|
+
args = arguments;
|
|
430
|
+
return new Promise(function (resolve, reject) {
|
|
431
|
+
var gen = fn.apply(self, args);
|
|
432
|
+
function _next(value) {
|
|
433
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
434
|
+
}
|
|
435
|
+
function _throw(err) {
|
|
436
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
437
|
+
}
|
|
438
|
+
_next(undefined);
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
function _classCallCheck(instance, Constructor) {
|
|
443
|
+
if (!(instance instanceof Constructor)) {
|
|
444
|
+
throw new TypeError("Cannot call a class as a function");
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function _defineProperties(target, props) {
|
|
448
|
+
for (var i = 0; i < props.length; i++) {
|
|
449
|
+
var descriptor = props[i];
|
|
450
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
451
|
+
descriptor.configurable = true;
|
|
452
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
453
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
457
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
458
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
459
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
460
|
+
writable: false
|
|
461
|
+
});
|
|
462
|
+
return Constructor;
|
|
463
|
+
}
|
|
464
|
+
function _defineProperty(obj, key, value) {
|
|
465
|
+
key = _toPropertyKey(key);
|
|
466
|
+
if (key in obj) {
|
|
467
|
+
Object.defineProperty(obj, key, {
|
|
468
|
+
value: value,
|
|
469
|
+
enumerable: true,
|
|
470
|
+
configurable: true,
|
|
471
|
+
writable: true
|
|
472
|
+
});
|
|
473
|
+
} else {
|
|
474
|
+
obj[key] = value;
|
|
475
|
+
}
|
|
476
|
+
return obj;
|
|
477
|
+
}
|
|
478
|
+
function _extends() {
|
|
479
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
480
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
481
|
+
var source = arguments[i];
|
|
482
|
+
for (var key in source) {
|
|
483
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
484
|
+
target[key] = source[key];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return target;
|
|
489
|
+
};
|
|
490
|
+
return _extends.apply(this, arguments);
|
|
491
|
+
}
|
|
492
|
+
function _inherits(subClass, superClass) {
|
|
493
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
494
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
495
|
+
}
|
|
496
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
497
|
+
constructor: {
|
|
498
|
+
value: subClass,
|
|
499
|
+
writable: true,
|
|
500
|
+
configurable: true
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
Object.defineProperty(subClass, "prototype", {
|
|
504
|
+
writable: false
|
|
505
|
+
});
|
|
506
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
507
|
+
}
|
|
508
|
+
function _getPrototypeOf(o) {
|
|
509
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
510
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
511
|
+
};
|
|
512
|
+
return _getPrototypeOf(o);
|
|
513
|
+
}
|
|
514
|
+
function _setPrototypeOf(o, p) {
|
|
515
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
516
|
+
o.__proto__ = p;
|
|
517
|
+
return o;
|
|
518
|
+
};
|
|
519
|
+
return _setPrototypeOf(o, p);
|
|
520
|
+
}
|
|
521
|
+
function _objectDestructuringEmpty(obj) {
|
|
522
|
+
if (obj == null) throw new TypeError("Cannot destructure " + obj);
|
|
523
|
+
}
|
|
524
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
525
|
+
if (source == null) return {};
|
|
526
|
+
var target = {};
|
|
527
|
+
for (var key in source) {
|
|
528
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
529
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
530
|
+
target[key] = source[key];
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return target;
|
|
534
|
+
}
|
|
535
|
+
function _objectWithoutProperties(source, excluded) {
|
|
536
|
+
if (source == null) return {};
|
|
537
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
538
|
+
var key, i;
|
|
539
|
+
if (Object.getOwnPropertySymbols) {
|
|
540
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
541
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
542
|
+
key = sourceSymbolKeys[i];
|
|
543
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
544
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
545
|
+
target[key] = source[key];
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return target;
|
|
549
|
+
}
|
|
550
|
+
function _assertThisInitialized(self) {
|
|
551
|
+
if (self === void 0) {
|
|
552
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
553
|
+
}
|
|
554
|
+
return self;
|
|
555
|
+
}
|
|
556
|
+
function _possibleConstructorReturn(self, call) {
|
|
557
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
558
|
+
return call;
|
|
559
|
+
} else if (call !== void 0) {
|
|
560
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
557
561
|
}
|
|
562
|
+
return _assertThisInitialized(self);
|
|
563
|
+
}
|
|
564
|
+
function _slicedToArray(arr, i) {
|
|
565
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
566
|
+
}
|
|
567
|
+
function _toArray(arr) {
|
|
568
|
+
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
569
|
+
}
|
|
570
|
+
function _toConsumableArray(arr) {
|
|
571
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
572
|
+
}
|
|
573
|
+
function _arrayWithoutHoles(arr) {
|
|
574
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
575
|
+
}
|
|
576
|
+
function _arrayWithHoles(arr) {
|
|
577
|
+
if (Array.isArray(arr)) return arr;
|
|
578
|
+
}
|
|
579
|
+
function _iterableToArray(iter) {
|
|
580
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
581
|
+
}
|
|
582
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
583
|
+
if (!o) return;
|
|
584
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
585
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
586
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
587
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
588
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
589
|
+
}
|
|
590
|
+
function _arrayLikeToArray(arr, len) {
|
|
591
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
592
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
593
|
+
return arr2;
|
|
594
|
+
}
|
|
595
|
+
function _nonIterableSpread() {
|
|
596
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
597
|
+
}
|
|
598
|
+
function _nonIterableRest() {
|
|
599
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
558
600
|
}
|
|
559
601
|
|
|
560
602
|
var ENUM = {
|
|
@@ -926,6 +968,56 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
|
|
|
926
968
|
return '';
|
|
927
969
|
};
|
|
928
970
|
|
|
971
|
+
var safeIsNaN = Number.isNaN ||
|
|
972
|
+
function ponyfill(value) {
|
|
973
|
+
return typeof value === 'number' && value !== value;
|
|
974
|
+
};
|
|
975
|
+
function isEqual(first, second) {
|
|
976
|
+
if (first === second) {
|
|
977
|
+
return true;
|
|
978
|
+
}
|
|
979
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
980
|
+
return true;
|
|
981
|
+
}
|
|
982
|
+
return false;
|
|
983
|
+
}
|
|
984
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
985
|
+
if (newInputs.length !== lastInputs.length) {
|
|
986
|
+
return false;
|
|
987
|
+
}
|
|
988
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
989
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
990
|
+
return false;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
function memoizeOne(resultFn, isEqual) {
|
|
997
|
+
if (isEqual === void 0) { isEqual = areInputsEqual; }
|
|
998
|
+
var cache = null;
|
|
999
|
+
function memoized() {
|
|
1000
|
+
var newArgs = [];
|
|
1001
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1002
|
+
newArgs[_i] = arguments[_i];
|
|
1003
|
+
}
|
|
1004
|
+
if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {
|
|
1005
|
+
return cache.lastResult;
|
|
1006
|
+
}
|
|
1007
|
+
var lastResult = resultFn.apply(this, newArgs);
|
|
1008
|
+
cache = {
|
|
1009
|
+
lastResult: lastResult,
|
|
1010
|
+
lastArgs: newArgs,
|
|
1011
|
+
lastThis: this,
|
|
1012
|
+
};
|
|
1013
|
+
return lastResult;
|
|
1014
|
+
}
|
|
1015
|
+
memoized.clear = function clear() {
|
|
1016
|
+
cache = null;
|
|
1017
|
+
};
|
|
1018
|
+
return memoized;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
929
1021
|
function styleInject(css, ref) {
|
|
930
1022
|
if ( ref === void 0 ) ref = {};
|
|
931
1023
|
var insertAt = ref.insertAt;
|
|
@@ -1249,7 +1341,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
|
|
|
1249
1341
|
return item;
|
|
1250
1342
|
});
|
|
1251
1343
|
};
|
|
1252
|
-
var memoizeOneFormatter = memoizeOne(formatter, isEqual);
|
|
1344
|
+
var memoizeOneFormatter = memoizeOne(formatter, isEqual$1);
|
|
1253
1345
|
var go2BackAndClose = function go2BackAndClose(backHistoryPath) {
|
|
1254
1346
|
localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
|
|
1255
1347
|
if (backHistoryPath) {
|
|
@@ -1436,11 +1528,6 @@ var handleJudgeAuthButtons = function handleJudgeAuthButtons(buttonCodeArray) {
|
|
|
1436
1528
|
});
|
|
1437
1529
|
return result;
|
|
1438
1530
|
};
|
|
1439
|
-
// 判断何时菜单权限和表格权限生效
|
|
1440
|
-
var shouldUseAuth = function shouldUseAuth() {
|
|
1441
|
-
// @ts-ignore
|
|
1442
|
-
return window.__POWERED_BY_WUJIE__ ? true : false;
|
|
1443
|
-
};
|
|
1444
1531
|
|
|
1445
1532
|
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";
|
|
1446
1533
|
styleInject(css_248z$1);
|
|
@@ -1489,21 +1576,8 @@ var filterLetters = function filterLetters(i) {
|
|
|
1489
1576
|
return undefined;
|
|
1490
1577
|
}
|
|
1491
1578
|
};
|
|
1492
|
-
// 抽象出创建对象的共通逻辑
|
|
1493
|
-
function createItem(idPrefix, index, title, name, format) {
|
|
1494
|
-
return {
|
|
1495
|
-
id: "".concat(idPrefix).concat(index),
|
|
1496
|
-
content: title,
|
|
1497
|
-
code: name,
|
|
1498
|
-
"ct": format //单元格值格式
|
|
1499
|
-
};
|
|
1500
|
-
}
|
|
1501
|
-
// 定义[单元格值]常量以避免魔术字符串
|
|
1502
|
-
var FORMAT_NAME_GENERAL = "General"; //格式名称为自动格式
|
|
1503
|
-
var FORMAT_TYPE_STRING = "s"; //格式类型为数字类型
|
|
1504
1579
|
var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
1505
1580
|
function DataValidation(props) {
|
|
1506
|
-
var _props$customerColumn;
|
|
1507
1581
|
var _this;
|
|
1508
1582
|
_classCallCheck(this, DataValidation);
|
|
1509
1583
|
_this = _callSuper(this, DataValidation, [props]);
|
|
@@ -1518,7 +1592,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1518
1592
|
};
|
|
1519
1593
|
_this.setConfig = function (data) {
|
|
1520
1594
|
var items = _this.state.items;
|
|
1521
|
-
var notValid = _this.props.notValid;
|
|
1522
1595
|
return {
|
|
1523
1596
|
container: 'luckysheet',
|
|
1524
1597
|
showtoolbar: false,
|
|
@@ -1527,7 +1600,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1527
1600
|
if (columnAbc.name) {
|
|
1528
1601
|
var charCode = columnAbc.name.charCodeAt();
|
|
1529
1602
|
if (charCode - 65 <= items.length) {
|
|
1530
|
-
columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content :
|
|
1603
|
+
columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : '校验结果';
|
|
1531
1604
|
} else {
|
|
1532
1605
|
columnAbc.name = '';
|
|
1533
1606
|
}
|
|
@@ -1880,7 +1953,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1880
1953
|
onClick: function onClick() {
|
|
1881
1954
|
return _this.filterData('all');
|
|
1882
1955
|
}
|
|
1883
|
-
}, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React$1.createElement(Menu.Divider, null),
|
|
1956
|
+
}, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React$1.createElement(Menu.Divider, null), /*#__PURE__*/React$1.createElement(Menu.Item, {
|
|
1884
1957
|
key: "2",
|
|
1885
1958
|
className: "sheet_table-menu_item_text"
|
|
1886
1959
|
}, /*#__PURE__*/React$1.createElement("a", {
|
|
@@ -1923,22 +1996,18 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1923
1996
|
}), provided.placeholder);
|
|
1924
1997
|
}))));
|
|
1925
1998
|
_this.props.onRef(_this);
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
|
|
1939
|
-
return createItem('item-0', index, mapping.get(item), item, format);
|
|
1940
|
-
})) || [];
|
|
1941
|
-
}
|
|
1999
|
+
itemsTemp = props.columns.map(function (item, index) {
|
|
2000
|
+
if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
|
|
2001
|
+
return {
|
|
2002
|
+
id: "item-0".concat(index),
|
|
2003
|
+
content: mapping.get(item),
|
|
2004
|
+
code: item,
|
|
2005
|
+
"ct": {
|
|
2006
|
+
"fa": "General",
|
|
2007
|
+
"t": "s" //格式类型为数字类型
|
|
2008
|
+
}
|
|
2009
|
+
};
|
|
2010
|
+
});
|
|
1942
2011
|
luckysheet = window.luckysheet || window.top.luckysheet;
|
|
1943
2012
|
_this.state = {
|
|
1944
2013
|
showErrorData: false,
|
|
@@ -1979,9 +2048,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1979
2048
|
key: "render",
|
|
1980
2049
|
value: function render() {
|
|
1981
2050
|
var errorListCheck = this.state.errorListCheck;
|
|
1982
|
-
var
|
|
1983
|
-
title = _this$props2.title,
|
|
1984
|
-
notValid = _this$props2.notValid;
|
|
2051
|
+
var title = this.props.title;
|
|
1985
2052
|
var totalSummary = this.getCount();
|
|
1986
2053
|
var luckyCss = {
|
|
1987
2054
|
margin: '0px',
|
|
@@ -2004,7 +2071,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2004
2071
|
trigger: ['click'],
|
|
2005
2072
|
overlay: this.menuList,
|
|
2006
2073
|
placement: "bottomRight"
|
|
2007
|
-
}, /*#__PURE__*/React$1.createElement(Button, null, "\u6E05\u7A7A", /*#__PURE__*/React$1.createElement(DownOutlined, null))),
|
|
2074
|
+
}, /*#__PURE__*/React$1.createElement(Button, null, "\u6E05\u7A7A", /*#__PURE__*/React$1.createElement(DownOutlined, null))), /*#__PURE__*/React$1.createElement(Button, {
|
|
2008
2075
|
type: "primary",
|
|
2009
2076
|
onClick: this.resetData
|
|
2010
2077
|
}, "\u8BC6\u522B"))), /*#__PURE__*/React$1.createElement("div", {
|
|
@@ -2015,11 +2082,11 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2015
2082
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2016
2083
|
id: "luckysheet",
|
|
2017
2084
|
style: luckyCss
|
|
2018
|
-
})),
|
|
2085
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2019
2086
|
className: "sheet_table_footer"
|
|
2020
2087
|
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2021
2088
|
className: "sheet_table_footer_l"
|
|
2022
|
-
}, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E
|
|
2089
|
+
}, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E, \u5176\u4E2D\u9519\u8BEF ", totalSummary.error, " \u9879"), /*#__PURE__*/React$1.createElement(Space, {
|
|
2023
2090
|
className: "sheet_table_footer_r"
|
|
2024
2091
|
}, /*#__PURE__*/React$1.createElement(Checkbox, {
|
|
2025
2092
|
checked: errorListCheck,
|
|
@@ -2076,21 +2143,8 @@ var filterLetters$1 = function filterLetters(i) {
|
|
|
2076
2143
|
return undefined;
|
|
2077
2144
|
}
|
|
2078
2145
|
};
|
|
2079
|
-
// 抽象出创建对象的共通逻辑
|
|
2080
|
-
function createItem$1(idPrefix, index, title, name, format) {
|
|
2081
|
-
return {
|
|
2082
|
-
id: "".concat(idPrefix).concat(index),
|
|
2083
|
-
content: title,
|
|
2084
|
-
code: name,
|
|
2085
|
-
"ct": format //单元格值格式
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
// 定义[单元格值]常量以避免魔术字符串
|
|
2089
|
-
var FORMAT_NAME_GENERAL$1 = "General"; //格式名称为自动格式
|
|
2090
|
-
var FORMAT_TYPE_STRING$1 = "s"; //格式类型为数字类型
|
|
2091
2146
|
var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
2092
2147
|
function DataImport(props) {
|
|
2093
|
-
var _props$customerColumn;
|
|
2094
2148
|
var _this;
|
|
2095
2149
|
_classCallCheck(this, DataImport);
|
|
2096
2150
|
_this = _callSuper(this, DataImport, [props]);
|
|
@@ -2332,32 +2386,22 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2332
2386
|
});
|
|
2333
2387
|
return obj;
|
|
2334
2388
|
});
|
|
2335
|
-
return data
|
|
2389
|
+
return data.filter(function (item) {
|
|
2390
|
+
return item[_this.props.customerColumnsMapping[0].name];
|
|
2391
|
+
});
|
|
2336
2392
|
};
|
|
2337
2393
|
_this.resetData = function () {
|
|
2338
2394
|
var _this$props = _this.props,
|
|
2339
2395
|
validDataUrl = _this$props.validDataUrl,
|
|
2340
|
-
validDataParams = _this$props.validDataParams,
|
|
2341
2396
|
updateData = _this$props.updateData,
|
|
2342
|
-
columns = _this$props.columns
|
|
2343
|
-
isBrandAuth = _this$props.isBrandAuth,
|
|
2344
|
-
_this$props$isCheckSt = _this$props.isCheckStockNum,
|
|
2345
|
-
isCheckStockNum = _this$props$isCheckSt === void 0 ? true : _this$props$isCheckSt;
|
|
2397
|
+
columns = _this$props.columns;
|
|
2346
2398
|
var resultData = _this.getData().filter(function (d) {
|
|
2347
2399
|
return _.compact(Object.values(d)).length;
|
|
2348
2400
|
});
|
|
2349
|
-
|
|
2350
|
-
var otherParams = {};
|
|
2351
|
-
if (isBrandAuth) {
|
|
2352
|
-
otherParams = {
|
|
2353
|
-
brandAuth: 'ctl-withAuth'
|
|
2354
|
-
};
|
|
2355
|
-
}
|
|
2356
|
-
axios.post(validDataUrl, _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams), validDataParams), {}, {
|
|
2401
|
+
axios.post(validDataUrl, {
|
|
2357
2402
|
columns: columns,
|
|
2358
|
-
data: resultData
|
|
2359
|
-
|
|
2360
|
-
})).then(function (result) {
|
|
2403
|
+
data: resultData
|
|
2404
|
+
}).then(function (result) {
|
|
2361
2405
|
result = result.data;
|
|
2362
2406
|
if (judgeIsRequestError(result)) {
|
|
2363
2407
|
message$1.error(result.msg);
|
|
@@ -2510,21 +2554,31 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2510
2554
|
}), provided.placeholder);
|
|
2511
2555
|
}))));
|
|
2512
2556
|
_this.props.onRef(_this);
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2557
|
+
if (props.customerColumnsMapping) {
|
|
2558
|
+
itemsTemp$1 = props.customerColumnsMapping.map(function (item, index) {
|
|
2559
|
+
return {
|
|
2560
|
+
id: "item-0".concat(index),
|
|
2561
|
+
content: item.title,
|
|
2562
|
+
code: item.name,
|
|
2563
|
+
"ct": {
|
|
2564
|
+
"fa": "General",
|
|
2565
|
+
"t": "s" //格式类型为数字类型
|
|
2566
|
+
}
|
|
2567
|
+
};
|
|
2568
|
+
});
|
|
2522
2569
|
} else {
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2570
|
+
itemsTemp$1 = props.columns.map(function (item, index) {
|
|
2571
|
+
if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataImport component, please fix this error"));
|
|
2572
|
+
return {
|
|
2573
|
+
id: "item-0".concat(index),
|
|
2574
|
+
content: mapping$1.get(item),
|
|
2575
|
+
code: item,
|
|
2576
|
+
"ct": {
|
|
2577
|
+
"fa": "General",
|
|
2578
|
+
"t": "s" //格式类型为数字类型
|
|
2579
|
+
}
|
|
2580
|
+
};
|
|
2581
|
+
});
|
|
2528
2582
|
}
|
|
2529
2583
|
luckysheet$1 = window.luckysheet || window.top.luckysheet;
|
|
2530
2584
|
_this.state = {
|
|
@@ -2568,7 +2622,8 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
|
|
|
2568
2622
|
var errorListCheck = this.state.errorListCheck;
|
|
2569
2623
|
var _this$props2 = this.props,
|
|
2570
2624
|
title = _this$props2.title,
|
|
2571
|
-
notValid = _this$props2.notValid
|
|
2625
|
+
notValid = _this$props2.notValid,
|
|
2626
|
+
customerColumnsMapping = _this$props2.customerColumnsMapping;
|
|
2572
2627
|
var totalSummary = this.getCount();
|
|
2573
2628
|
var luckyCss = {
|
|
2574
2629
|
margin: '0px',
|
|
@@ -2781,7 +2836,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2781
2836
|
specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket,
|
|
2782
2837
|
_ref$noNeedSplit = _ref.noNeedSplit,
|
|
2783
2838
|
noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit;
|
|
2784
|
-
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) ||
|
|
2839
|
+
var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
|
|
2785
2840
|
var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
|
|
2786
2841
|
var initVal = value || (selectMode ? [] : null);
|
|
2787
2842
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
@@ -4445,7 +4500,7 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
|
|
|
4445
4500
|
var _item$dataSource;
|
|
4446
4501
|
var result = [];
|
|
4447
4502
|
if (item === null || item === void 0 ? void 0 : item.dataSourceCode) {
|
|
4448
|
-
result =
|
|
4503
|
+
result = record === null || record === void 0 ? void 0 : record[item === null || item === void 0 ? void 0 : item.dataSourceCode];
|
|
4449
4504
|
}
|
|
4450
4505
|
if (item === null || item === void 0 ? void 0 : (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
|
|
4451
4506
|
result = (item === null || item === void 0 ? void 0 : item.filterDataSourceCode) ? item.dataSource.filter(function (i) {
|
|
@@ -4559,11 +4614,12 @@ var ResizeableTitle = function ResizeableTitle(props) {
|
|
|
4559
4614
|
var initTableCode = {
|
|
4560
4615
|
'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
|
|
4561
4616
|
'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
|
|
4562
|
-
'spu': ['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']
|
|
4617
|
+
'spu': [['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']]
|
|
4563
4618
|
};
|
|
4564
4619
|
var Option$2 = Select.Option;
|
|
4565
4620
|
var AddSelect = function AddSelect(props) {
|
|
4566
4621
|
var value = props.value,
|
|
4622
|
+
onChange = props.onChange,
|
|
4567
4623
|
_props$selectProps = props.selectProps,
|
|
4568
4624
|
selectProps = _props$selectProps === void 0 ? {} : _props$selectProps,
|
|
4569
4625
|
_props$modalTableProp = props.modalTableProps,
|
|
@@ -4571,7 +4627,11 @@ var AddSelect = function AddSelect(props) {
|
|
|
4571
4627
|
_props$labelInValue = props.labelInValue,
|
|
4572
4628
|
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
4573
4629
|
requestConfig = props.requestConfig,
|
|
4630
|
+
ctx = props.ctx,
|
|
4574
4631
|
sourceName = props.sourceName,
|
|
4632
|
+
_props$needModalTable = props.needModalTable,
|
|
4633
|
+
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
4634
|
+
_props$getPopupContai = props.getPopupContainer,
|
|
4575
4635
|
onSaveCallback = props.onSaveCallback,
|
|
4576
4636
|
_props$buttonText = props.buttonText,
|
|
4577
4637
|
buttonText = _props$buttonText === void 0 ? '添加' : _props$buttonText,
|
|
@@ -4588,8 +4648,15 @@ var AddSelect = function AddSelect(props) {
|
|
|
4588
4648
|
url = _ref.url,
|
|
4589
4649
|
otherParams = _ref.otherParams,
|
|
4590
4650
|
isMap = _ref.isMap,
|
|
4651
|
+
fixedparameter = _ref.fixedparameter,
|
|
4652
|
+
fieldValToParam = _ref.fieldValToParam,
|
|
4653
|
+
_ref$mappingTextField = _ref.mappingTextField,
|
|
4654
|
+
mappingTextField = _ref$mappingTextField === void 0 ? 'name' : _ref$mappingTextField,
|
|
4655
|
+
mappingTextShowKeyField = _ref.mappingTextShowKeyField,
|
|
4591
4656
|
_ref$mappingValueFiel = _ref.mappingValueField,
|
|
4592
|
-
mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel
|
|
4657
|
+
mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel,
|
|
4658
|
+
mappingTextShowTextField = _ref.mappingTextShowTextField;
|
|
4659
|
+
var resultSourceKey = sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode';
|
|
4593
4660
|
var realButtonProps = _objectSpread2({
|
|
4594
4661
|
type: "primary"
|
|
4595
4662
|
}, buttonProps);
|
|
@@ -4599,82 +4666,138 @@ var AddSelect = function AddSelect(props) {
|
|
|
4599
4666
|
var pageSize = 100; // 下拉框默认分页 条数
|
|
4600
4667
|
var tableInitPageSize = 10; // 弹框默认分页 条数
|
|
4601
4668
|
var currentPage = 1;
|
|
4602
|
-
var
|
|
4669
|
+
var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
|
|
4670
|
+
var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
|
|
4671
|
+
var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
|
|
4672
|
+
// 以下属性不可更改----设计配置项
|
|
4673
|
+
showSearch: false,
|
|
4674
|
+
filterOption: false,
|
|
4675
|
+
allowClear: true,
|
|
4676
|
+
listHeight: 160,
|
|
4677
|
+
optionLabelProp: "label",
|
|
4678
|
+
autoClearSearchValue: false
|
|
4679
|
+
});
|
|
4680
|
+
var _useState = useState([]),
|
|
4603
4681
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
var _useState3 = useState(
|
|
4682
|
+
items = _useState2[0],
|
|
4683
|
+
setItems = _useState2[1];
|
|
4684
|
+
var _useState3 = useState(1),
|
|
4607
4685
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
var _useState5 = useState(
|
|
4686
|
+
scrollPage = _useState4[0],
|
|
4687
|
+
setScrollPage = _useState4[1];
|
|
4688
|
+
var _useState5 = useState(0),
|
|
4611
4689
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
var _useState7 = useState(
|
|
4690
|
+
itemsTotal = _useState6[0],
|
|
4691
|
+
setItemsTotal = _useState6[1];
|
|
4692
|
+
var _useState7 = useState(false),
|
|
4615
4693
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
var
|
|
4619
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
4620
|
-
form = _Form$useForm2[0];
|
|
4621
|
-
var _useState9 = useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
|
|
4694
|
+
fetching = _useState8[0],
|
|
4695
|
+
setFetching = _useState8[1];
|
|
4696
|
+
var _useState9 = useState(''),
|
|
4622
4697
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
var _useState11 = useState(
|
|
4698
|
+
searchValue = _useState10[0],
|
|
4699
|
+
setSearchValue = _useState10[1];
|
|
4700
|
+
var _useState11 = useState(false),
|
|
4626
4701
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
var _useState13 = useState(
|
|
4702
|
+
isModalVisible = _useState12[0],
|
|
4703
|
+
setIsModalVisible = _useState12[1];
|
|
4704
|
+
var _useState13 = useState(initVal),
|
|
4630
4705
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
var _useState15 = useState(
|
|
4706
|
+
popvalue = _useState14[0],
|
|
4707
|
+
setPopValue = _useState14[1];
|
|
4708
|
+
var _useState15 = useState(sourceName),
|
|
4709
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
4710
|
+
uniqueValue = _useState16[0],
|
|
4711
|
+
setUniqueValue = _useState16[1];
|
|
4712
|
+
var _useDebounceFn = useDebounceFn(function (v) {
|
|
4713
|
+
// 优化搜索参数 支持传多个
|
|
4714
|
+
var searchParams = {};
|
|
4715
|
+
if (typeof selectParamsKey === 'string') {
|
|
4716
|
+
searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
|
|
4717
|
+
}
|
|
4718
|
+
if (Array.isArray(selectParamsKey)) {
|
|
4719
|
+
selectParamsKey.forEach(function (i) {
|
|
4720
|
+
searchParams = _objectSpread2(_objectSpread2({}, searchParams), {}, _defineProperty({}, i, searchValue));
|
|
4721
|
+
});
|
|
4722
|
+
}
|
|
4723
|
+
// 防抖函数 待定
|
|
4724
|
+
getData(searchParams);
|
|
4725
|
+
}, {
|
|
4726
|
+
wait: 1000
|
|
4727
|
+
}),
|
|
4728
|
+
run = _useDebounceFn.run;
|
|
4729
|
+
var _Form$useForm = Form.useForm(),
|
|
4730
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
4731
|
+
form = _Form$useForm2[0];
|
|
4732
|
+
var _useState17 = useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
|
|
4733
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
4734
|
+
tableSearchForm = _useState18[0],
|
|
4735
|
+
setTableSearchForm = _useState18[1];
|
|
4736
|
+
var _useState19 = useState(true),
|
|
4737
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
4738
|
+
caretLeftFlag = _useState20[0],
|
|
4739
|
+
setCaretLeftFlag = _useState20[1];
|
|
4740
|
+
var _useState21 = useState([]),
|
|
4741
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
4742
|
+
tableData = _useState22[0],
|
|
4743
|
+
setTableData = _useState22[1];
|
|
4744
|
+
var _useState23 = useState({
|
|
4634
4745
|
total: 0,
|
|
4635
4746
|
size: "small",
|
|
4636
4747
|
current: 1,
|
|
4637
4748
|
pageSize: tableInitPageSize
|
|
4638
4749
|
}),
|
|
4639
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
4640
|
-
tablePagination = _useState16[0],
|
|
4641
|
-
setTablePagination = _useState16[1];
|
|
4642
|
-
var _useState17 = useState([]),
|
|
4643
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
4644
|
-
selectedRowKeys = _useState18[0],
|
|
4645
|
-
setSelectedRowKeys = _useState18[1];
|
|
4646
|
-
var _useState19 = useState({}),
|
|
4647
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
4648
|
-
tableFormParams = _useState20[0],
|
|
4649
|
-
setTableFormParams = _useState20[1];
|
|
4650
|
-
var _useState21 = useState(false),
|
|
4651
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
4652
|
-
confirmLoading = _useState22[0],
|
|
4653
|
-
setConfirmLoading = _useState22[1];
|
|
4654
|
-
var _useState23 = useState(false),
|
|
4655
4750
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
4656
|
-
|
|
4657
|
-
|
|
4751
|
+
tablePagination = _useState24[0],
|
|
4752
|
+
setTablePagination = _useState24[1];
|
|
4658
4753
|
var _useState25 = useState([]),
|
|
4659
4754
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
4660
|
-
|
|
4661
|
-
|
|
4755
|
+
selectedRowKeys = _useState26[0],
|
|
4756
|
+
setSelectedRowKeys = _useState26[1];
|
|
4662
4757
|
var _useState27 = useState([]),
|
|
4663
4758
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
var _useState29 = useState(
|
|
4759
|
+
doubleArr = _useState28[0],
|
|
4760
|
+
setDoubleArr = _useState28[1]; // 存放双数组的数组
|
|
4761
|
+
var _useState29 = useState(false),
|
|
4667
4762
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
var _useState31 = useState(
|
|
4763
|
+
checkedAll = _useState30[0],
|
|
4764
|
+
setCheckedAll = _useState30[1];
|
|
4765
|
+
var _useState31 = useState(false),
|
|
4671
4766
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
4672
|
-
|
|
4673
|
-
|
|
4767
|
+
indeterminate = _useState32[0],
|
|
4768
|
+
setIndeterminate = _useState32[1];
|
|
4769
|
+
var _useState33 = useState({}),
|
|
4770
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
4771
|
+
tableFormParams = _useState34[0],
|
|
4772
|
+
setTableFormParams = _useState34[1];
|
|
4773
|
+
var _useState35 = useState(false),
|
|
4774
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
4775
|
+
confirmLoading = _useState36[0],
|
|
4776
|
+
setConfirmLoading = _useState36[1];
|
|
4777
|
+
var _useState37 = useState(false),
|
|
4778
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
4779
|
+
confirmContinueLoading = _useState38[0],
|
|
4780
|
+
setConfirmContinueLoading = _useState38[1];
|
|
4781
|
+
var _useState39 = useState([]),
|
|
4782
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
4783
|
+
selectColumns = _useState40[0],
|
|
4784
|
+
setSelectColumns = _useState40[1];
|
|
4785
|
+
var _useState41 = useState([]),
|
|
4786
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
4787
|
+
showColumns = _useState42[0],
|
|
4788
|
+
setShowColumns = _useState42[1];
|
|
4789
|
+
var _useState43 = useState([]),
|
|
4790
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
4791
|
+
tableColumns = _useState44[0],
|
|
4792
|
+
setTableColumns = _useState44[1];
|
|
4793
|
+
var _useState45 = useState([]),
|
|
4794
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
4795
|
+
showToChooseColumns = _useState46[0],
|
|
4796
|
+
setShowToChooseColumns = _useState46[1];
|
|
4674
4797
|
var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
|
|
4675
4798
|
var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
|
|
4676
4799
|
var checkSelectChange = /*#__PURE__*/function () {
|
|
4677
|
-
var
|
|
4800
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
4678
4801
|
var result;
|
|
4679
4802
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4680
4803
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -4749,7 +4872,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
4749
4872
|
}, _callee, null, [[15, 22]]);
|
|
4750
4873
|
}));
|
|
4751
4874
|
return function checkSelectChange(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
4752
|
-
return
|
|
4875
|
+
return _ref4.apply(this, arguments);
|
|
4753
4876
|
};
|
|
4754
4877
|
}();
|
|
4755
4878
|
var setBusinessDefaultValue = function setBusinessDefaultValue(list, recordList) {
|
|
@@ -4815,7 +4938,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
4815
4938
|
// precision: unitAccuracy
|
|
4816
4939
|
};
|
|
4817
4940
|
}
|
|
4818
|
-
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2(
|
|
4941
|
+
return /*#__PURE__*/React$1.createElement(InputNumber, _objectSpread2(_objectSpread2({
|
|
4819
4942
|
value: text || '',
|
|
4820
4943
|
min: 0,
|
|
4821
4944
|
autoFocus: record.needFocus,
|
|
@@ -4823,7 +4946,13 @@ var AddSelect = function AddSelect(props) {
|
|
|
4823
4946
|
}, precisionObj), {}, {
|
|
4824
4947
|
onChange: function onChange(value) {
|
|
4825
4948
|
record[item.dataIndex] = value;
|
|
4826
|
-
|
|
4949
|
+
var newPopValue = popvalue.map(function (i, innerIndex) {
|
|
4950
|
+
if (innerIndex == index) {
|
|
4951
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
4952
|
+
}
|
|
4953
|
+
return i;
|
|
4954
|
+
});
|
|
4955
|
+
setPopValue(newPopValue);
|
|
4827
4956
|
},
|
|
4828
4957
|
// onFocus={(e)=> {
|
|
4829
4958
|
// let dom1 = e.currentTarget;
|
|
@@ -4922,90 +5051,35 @@ var AddSelect = function AddSelect(props) {
|
|
|
4922
5051
|
var selectKey = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi = item.dataSourceMapping) === null || _item$dataSourceMappi === void 0 ? void 0 : _item$dataSourceMappi[0]) || 'code';
|
|
4923
5052
|
var selectText = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi2 = item.dataSourceMapping) === null || _item$dataSourceMappi2 === void 0 ? void 0 : _item$dataSourceMappi2[1]) || 'name';
|
|
4924
5053
|
var dataSourceList = getSelectDataList(record, item, selectKey);
|
|
4925
|
-
return /*#__PURE__*/React$1.createElement(Select,
|
|
5054
|
+
return /*#__PURE__*/React$1.createElement(Select, {
|
|
4926
5055
|
value: text || null,
|
|
4927
5056
|
onChange: function () {
|
|
4928
5057
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
4929
|
-
var
|
|
5058
|
+
var isConformToTheRules, newPopValue;
|
|
4930
5059
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
4931
5060
|
while (1) switch (_context2.prev = _context2.next) {
|
|
4932
5061
|
case 0:
|
|
4933
|
-
|
|
4934
|
-
return d[selectKey] == value;
|
|
4935
|
-
})) || {};
|
|
4936
|
-
if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
|
|
4937
|
-
_context2.next = 6;
|
|
4938
|
-
break;
|
|
4939
|
-
}
|
|
4940
|
-
_context2.next = 4;
|
|
4941
|
-
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, {
|
|
4942
|
-
record: record,
|
|
4943
|
-
index: index,
|
|
4944
|
-
item: item,
|
|
4945
|
-
oldValue: text,
|
|
4946
|
-
changeValue: value,
|
|
4947
|
-
dataSourceSelectItem: dataSourceSelectItem,
|
|
4948
|
-
editRecord: editRecord
|
|
4949
|
-
});
|
|
4950
|
-
case 4:
|
|
4951
|
-
_context2.next = 25;
|
|
4952
|
-
break;
|
|
4953
|
-
case 6:
|
|
4954
|
-
// 更新当前行数据函数
|
|
4955
|
-
changeValue = function changeValue(v, dSSItem) {
|
|
4956
|
-
var _item$dataSourceSelec;
|
|
4957
|
-
record[item.dataIndex] = v;
|
|
4958
|
-
// 下拉框带出需要回填的数据
|
|
4959
|
-
if (item === null || item === void 0 ? void 0 : (_item$dataSourceSelec = item.dataSourceSelectBackData) === null || _item$dataSourceSelec === void 0 ? void 0 : _item$dataSourceSelec.length) {
|
|
4960
|
-
item === null || item === void 0 ? void 0 : item.dataSourceSelectBackData.forEach(function (s) {
|
|
4961
|
-
record[s] = dSSItem ? dSSItem[s] : null;
|
|
4962
|
-
});
|
|
4963
|
-
}
|
|
4964
|
-
}; // 处理校验,默认不校验
|
|
4965
|
-
isCheckPass = true;
|
|
4966
|
-
_context2.prev = 8;
|
|
4967
|
-
if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
|
|
4968
|
-
_context2.next = 15;
|
|
4969
|
-
break;
|
|
4970
|
-
}
|
|
4971
|
-
_context2.next = 12;
|
|
4972
|
-
return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
|
|
4973
|
-
record: record,
|
|
4974
|
-
index: index,
|
|
4975
|
-
item: item,
|
|
4976
|
-
oldValue: text,
|
|
4977
|
-
changeValue: value,
|
|
4978
|
-
dataSourceSelectItem: dataSourceSelectItem
|
|
4979
|
-
});
|
|
4980
|
-
case 12:
|
|
4981
|
-
isCheckPass = _context2.sent;
|
|
4982
|
-
_context2.next = 19;
|
|
4983
|
-
break;
|
|
4984
|
-
case 15:
|
|
4985
|
-
_context2.next = 17;
|
|
5062
|
+
_context2.next = 2;
|
|
4986
5063
|
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
4987
|
-
case
|
|
5064
|
+
case 2:
|
|
4988
5065
|
isConformToTheRules = _context2.sent;
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
_context2.next = 23;
|
|
4992
|
-
break;
|
|
4993
|
-
case 21:
|
|
4994
|
-
_context2.prev = 21;
|
|
4995
|
-
_context2.t0 = _context2["catch"](8);
|
|
4996
|
-
case 23:
|
|
4997
|
-
if (isCheckPass) {
|
|
4998
|
-
changeValue(value, dataSourceSelectItem);
|
|
5066
|
+
if (isConformToTheRules) {
|
|
5067
|
+
record[item.dataIndex] = value;
|
|
4999
5068
|
} else {
|
|
5000
|
-
|
|
5069
|
+
record[item.dataIndex] = null;
|
|
5001
5070
|
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5071
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
5072
|
+
if (innerIndex == index) {
|
|
5073
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
5074
|
+
}
|
|
5075
|
+
return i;
|
|
5076
|
+
});
|
|
5077
|
+
setPopValue(newPopValue);
|
|
5078
|
+
case 6:
|
|
5005
5079
|
case "end":
|
|
5006
5080
|
return _context2.stop();
|
|
5007
5081
|
}
|
|
5008
|
-
}, _callee2
|
|
5082
|
+
}, _callee2);
|
|
5009
5083
|
}));
|
|
5010
5084
|
function onChange(_x7) {
|
|
5011
5085
|
return _onChange.apply(this, arguments);
|
|
@@ -5013,9 +5087,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5013
5087
|
return onChange;
|
|
5014
5088
|
}(),
|
|
5015
5089
|
style: {
|
|
5016
|
-
width:
|
|
5090
|
+
width: '160px'
|
|
5017
5091
|
}
|
|
5018
|
-
}
|
|
5092
|
+
}, dataSourceList.map(function (item) {
|
|
5019
5093
|
return /*#__PURE__*/React$1.createElement(Select.Option, {
|
|
5020
5094
|
value: item[selectKey]
|
|
5021
5095
|
}, item[selectText]);
|
|
@@ -5048,10 +5122,20 @@ var AddSelect = function AddSelect(props) {
|
|
|
5048
5122
|
// 获取数据源 (type: 1下拉框 2弹框 不传值默认为下拉框)
|
|
5049
5123
|
var getData = function getData() {
|
|
5050
5124
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5125
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
5051
5126
|
if (!requestConfig) return;
|
|
5052
5127
|
setFetching(true);
|
|
5053
5128
|
// 处理dependence参数
|
|
5054
5129
|
var fixedParam = {};
|
|
5130
|
+
if (fixedparameter && fieldValToParam && ctx) {
|
|
5131
|
+
fixedparameter.forEach(function (item, index) {
|
|
5132
|
+
var fixedParamVal = ctx.form.getFieldValue(fieldValToParam[index]);
|
|
5133
|
+
if (fixedParamVal) {
|
|
5134
|
+
fixedParam[item] = fixedParamVal;
|
|
5135
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, form === null || form === void 0 ? void 0 : form.getFieldsValue()), {}, _defineProperty({}, item, fixedParamVal)));
|
|
5136
|
+
}
|
|
5137
|
+
});
|
|
5138
|
+
}
|
|
5055
5139
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
5056
5140
|
var _loop = function _loop() {
|
|
5057
5141
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
@@ -5157,7 +5241,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
5157
5241
|
var keys = res.list ? 'list' : 'items';
|
|
5158
5242
|
source = res ? res[keys] ? res[keys].map(function (item) {
|
|
5159
5243
|
var _item$packingUnitList, _item$packingUnitList2;
|
|
5244
|
+
var textShowText = item[mappingTextField];
|
|
5245
|
+
if (mappingTextShowTextField) {
|
|
5246
|
+
textShowText = [];
|
|
5247
|
+
if (Array.isArray(mappingTextShowTextField)) {
|
|
5248
|
+
mappingTextShowTextField.forEach(function (r) {
|
|
5249
|
+
textShowText.push(item[r]);
|
|
5250
|
+
});
|
|
5251
|
+
} else {
|
|
5252
|
+
textShowText = item[mappingTextShowTextField];
|
|
5253
|
+
}
|
|
5254
|
+
}
|
|
5160
5255
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5256
|
+
text: item[mappingTextField],
|
|
5257
|
+
textShowText: textShowText,
|
|
5258
|
+
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
5161
5259
|
value: item[mappingValueField],
|
|
5162
5260
|
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) {
|
|
5163
5261
|
return item.baseUnit === true;
|
|
@@ -5165,7 +5263,21 @@ var AddSelect = function AddSelect(props) {
|
|
|
5165
5263
|
});
|
|
5166
5264
|
}) : Array.isArray(res) && (res === null || res === void 0 ? void 0 : res.map(function (item) {
|
|
5167
5265
|
var _item$packingUnitList3, _item$packingUnitList4;
|
|
5266
|
+
var textShowText = item[mappingTextField];
|
|
5267
|
+
if (mappingTextShowTextField) {
|
|
5268
|
+
textShowText = [];
|
|
5269
|
+
if (Array.isArray(mappingTextShowTextField)) {
|
|
5270
|
+
mappingTextShowTextField.forEach(function (r) {
|
|
5271
|
+
textShowText.push(item[r]);
|
|
5272
|
+
});
|
|
5273
|
+
} else {
|
|
5274
|
+
textShowText = item[mappingTextShowTextField];
|
|
5275
|
+
}
|
|
5276
|
+
}
|
|
5168
5277
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5278
|
+
text: item[mappingTextField],
|
|
5279
|
+
textShowText: textShowText,
|
|
5280
|
+
textShowKey: item[mappingTextShowKeyField || mappingValueField],
|
|
5169
5281
|
value: item[mappingValueField],
|
|
5170
5282
|
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) {
|
|
5171
5283
|
return item.baseUnit === true;
|
|
@@ -5174,12 +5286,19 @@ var AddSelect = function AddSelect(props) {
|
|
|
5174
5286
|
})) : [];
|
|
5175
5287
|
}
|
|
5176
5288
|
source = Array.isArray(source) ? source : [];
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
}
|
|
5289
|
+
if (type === 1) {
|
|
5290
|
+
var _ctx$form;
|
|
5291
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
|
|
5292
|
+
setItems(source);
|
|
5293
|
+
setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
|
|
5294
|
+
} else {
|
|
5295
|
+
setTableData(source);
|
|
5296
|
+
setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
|
|
5297
|
+
total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
|
|
5298
|
+
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),
|
|
5299
|
+
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)
|
|
5300
|
+
}));
|
|
5301
|
+
}
|
|
5183
5302
|
}).catch(function (err) {
|
|
5184
5303
|
setFetching(false);
|
|
5185
5304
|
});
|
|
@@ -5221,6 +5340,12 @@ var AddSelect = function AddSelect(props) {
|
|
|
5221
5340
|
value: i
|
|
5222
5341
|
};
|
|
5223
5342
|
}));
|
|
5343
|
+
setIndeterminate(!!value.length && value.length < itemsTotal);
|
|
5344
|
+
setCheckedAll(itemsTotal && value.length === itemsTotal);
|
|
5345
|
+
// 需清空数据
|
|
5346
|
+
if (!value.length) {
|
|
5347
|
+
setDoubleArr([]);
|
|
5348
|
+
}
|
|
5224
5349
|
} else {
|
|
5225
5350
|
setSelectedRowKeys(labelInValue ? [value.key] : [value]);
|
|
5226
5351
|
setPopValue(labelInValue ? [{
|
|
@@ -5255,6 +5380,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5255
5380
|
message$1.warning('至少选中一条数据');
|
|
5256
5381
|
return;
|
|
5257
5382
|
}
|
|
5383
|
+
// handleSelectOver(popvalue)
|
|
5258
5384
|
if (onSaveCallback) {
|
|
5259
5385
|
handleLoading(isContinue, true);
|
|
5260
5386
|
onSaveCallback(popvalue).then(function (res) {
|
|
@@ -5290,6 +5416,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5290
5416
|
setTableFormParams({});
|
|
5291
5417
|
setIsModalVisible(false);
|
|
5292
5418
|
setTableData([]);
|
|
5419
|
+
// if (selectMode) {
|
|
5420
|
+
// run();
|
|
5421
|
+
// }
|
|
5293
5422
|
};
|
|
5294
5423
|
var onSearchTable = function onSearchTable() {
|
|
5295
5424
|
var params = form.getFieldsValue();
|
|
@@ -5297,6 +5426,9 @@ var AddSelect = function AddSelect(props) {
|
|
|
5297
5426
|
getData(_objectSpread2(_objectSpread2({}, params), {}, {
|
|
5298
5427
|
pageSize: tableInitPageSize
|
|
5299
5428
|
}), 2);
|
|
5429
|
+
// if (selectMode) {
|
|
5430
|
+
// getData(params)
|
|
5431
|
+
// }
|
|
5300
5432
|
};
|
|
5301
5433
|
var onResetTable = function onResetTable() {
|
|
5302
5434
|
form.resetFields();
|
|
@@ -5335,6 +5467,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
5335
5467
|
setPopValue(selectRows);
|
|
5336
5468
|
setSelectedRowKeys(selectKeys);
|
|
5337
5469
|
}
|
|
5470
|
+
// setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
|
|
5471
|
+
// setCheckedAll(filterRows.length === tablePagination?.total);
|
|
5338
5472
|
};
|
|
5339
5473
|
// 生成唯一值
|
|
5340
5474
|
var makeUniqueValue = function makeUniqueValue() {
|
|
@@ -5463,15 +5597,6 @@ var AddSelect = function AddSelect(props) {
|
|
|
5463
5597
|
})));
|
|
5464
5598
|
}
|
|
5465
5599
|
};
|
|
5466
|
-
var editRecord = function editRecord(record) {
|
|
5467
|
-
var newPopValue = _toConsumableArray(popvalue);
|
|
5468
|
-
var index = newPopValue.findIndex(function (item) {
|
|
5469
|
-
return record[selectRowKey] == item[selectRowKey];
|
|
5470
|
-
});
|
|
5471
|
-
var item = newPopValue[index];
|
|
5472
|
-
newPopValue.splice(index, 1, _objectSpread2(_objectSpread2({}, item), record));
|
|
5473
|
-
setPopValue(_toConsumableArray(newPopValue));
|
|
5474
|
-
};
|
|
5475
5600
|
var inputIndex = 0;
|
|
5476
5601
|
useEffect(function () {
|
|
5477
5602
|
setInitialShowColumn(codeSelected, selectColumns, function (res) {
|
|
@@ -5484,8 +5609,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
5484
5609
|
});
|
|
5485
5610
|
}, [tableColumns]);
|
|
5486
5611
|
var handleResize = function handleResize(arr, index, callback) {
|
|
5487
|
-
return function (_,
|
|
5488
|
-
var size =
|
|
5612
|
+
return function (_, _ref5) {
|
|
5613
|
+
var size = _ref5.size;
|
|
5489
5614
|
var newColumns = arr.map(function (col) {
|
|
5490
5615
|
return _objectSpread2({}, col);
|
|
5491
5616
|
});
|
|
@@ -5550,7 +5675,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5550
5675
|
id: "add_select_div_".concat(uniqueValue)
|
|
5551
5676
|
}, /*#__PURE__*/React$1.createElement(Button, _objectSpread2({
|
|
5552
5677
|
onClick: handleShowModal
|
|
5553
|
-
}, realButtonProps), buttonText)), isModalVisible && ( /*#__PURE__*/React$1.createElement(Modal, {
|
|
5678
|
+
}, realButtonProps), buttonText)), needModalTable && isModalVisible && ( /*#__PURE__*/React$1.createElement(Modal, {
|
|
5554
5679
|
width: '1200px',
|
|
5555
5680
|
style: {
|
|
5556
5681
|
top: 20
|
|
@@ -5558,6 +5683,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5558
5683
|
bodyStyle: {
|
|
5559
5684
|
padding: '0px'
|
|
5560
5685
|
},
|
|
5686
|
+
// title={modalTableProps?.modalTableTitle}
|
|
5561
5687
|
visible: isModalVisible,
|
|
5562
5688
|
closable: false,
|
|
5563
5689
|
onCancel: handleCancel,
|
|
@@ -5703,6 +5829,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
5703
5829
|
columns: showSelectedCol,
|
|
5704
5830
|
dataSource: popvalue,
|
|
5705
5831
|
pagination: false,
|
|
5832
|
+
// onChange={handleTableChange}
|
|
5706
5833
|
rowKey: selectRowKey,
|
|
5707
5834
|
rowClassName: 'row-class',
|
|
5708
5835
|
scroll: {
|
|
@@ -9189,40 +9316,10 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React$1.memo(BusinessSearchSelect, fun
|
|
|
9189
9316
|
// import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
9190
9317
|
function handleSelectColumn(c, parentProps) {
|
|
9191
9318
|
var result = c;
|
|
9192
|
-
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) ||
|
|
9193
|
-
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) ||
|
|
9194
|
-
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) ||
|
|
9195
|
-
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) ||
|
|
9196
|
-
// 仅展示内容
|
|
9197
|
-
if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
|
|
9198
|
-
result = result.filter(function (i) {
|
|
9199
|
-
return showColumns.includes(i.dataIndex);
|
|
9200
|
-
});
|
|
9201
|
-
}
|
|
9202
|
-
// 过滤不需要展示内容
|
|
9203
|
-
if (exceptColumns === null || exceptColumns === void 0 ? void 0 : exceptColumns.length) {
|
|
9204
|
-
result = result.filter(function (i) {
|
|
9205
|
-
return !exceptColumns.includes(i.dataIndex);
|
|
9206
|
-
});
|
|
9207
|
-
}
|
|
9208
|
-
// 追加(最好不用这个,当组件不固定时候会有影响)
|
|
9209
|
-
if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
|
|
9210
|
-
additionColumns.forEach(function (i) {
|
|
9211
|
-
result.splice(i.position, 0, i.column);
|
|
9212
|
-
});
|
|
9213
|
-
}
|
|
9214
|
-
// 覆盖内容
|
|
9215
|
-
if (coverColumns === null || coverColumns === void 0 ? void 0 : coverColumns.length) {
|
|
9216
|
-
result = coverColumns;
|
|
9217
|
-
}
|
|
9218
|
-
return result;
|
|
9219
|
-
}
|
|
9220
|
-
function handleTableColumn(c, parentProps) {
|
|
9221
|
-
var result = c;
|
|
9222
|
-
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showTableColumns) || [];
|
|
9223
|
-
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptTableColumns) || [];
|
|
9224
|
-
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverTableColumns) || [];
|
|
9225
|
-
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionTableColumns) || [];
|
|
9319
|
+
var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || [];
|
|
9320
|
+
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
|
|
9321
|
+
var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || [];
|
|
9322
|
+
var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || [];
|
|
9226
9323
|
// 仅展示内容
|
|
9227
9324
|
if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
|
|
9228
9325
|
result = result.filter(function (i) {
|
|
@@ -9542,7 +9639,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
9542
9639
|
},
|
|
9543
9640
|
dataIndex: 'brandName'
|
|
9544
9641
|
}]);
|
|
9545
|
-
var mTpTableColumn =
|
|
9642
|
+
var mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
|
|
9546
9643
|
var initialTableSearchForm = [{
|
|
9547
9644
|
name: 'qp-skuCode-like',
|
|
9548
9645
|
label: 'SKU编码'
|
|
@@ -9654,7 +9751,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
9654
9751
|
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
9655
9752
|
};
|
|
9656
9753
|
var modalTableProps = {
|
|
9657
|
-
modalTableTitle:
|
|
9754
|
+
modalTableTitle: '选择商品',
|
|
9658
9755
|
tableSearchForm: mTpTableSearchForm,
|
|
9659
9756
|
tableColumns: mTpTableColumn,
|
|
9660
9757
|
selectColumn: mTpSelectColumn,
|
|
@@ -9733,184 +9830,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9733
9830
|
dataIndex: 'count'
|
|
9734
9831
|
}];
|
|
9735
9832
|
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
9736
|
-
var initialTableColumn = [{
|
|
9737
|
-
title: 'SKC编码',
|
|
9738
|
-
width: 150,
|
|
9739
|
-
dataIndex: 'code'
|
|
9740
|
-
}, {
|
|
9741
|
-
title: 'SKC名称',
|
|
9742
|
-
width: 200,
|
|
9743
|
-
ellipsis: {
|
|
9744
|
-
showTitle: false
|
|
9745
|
-
},
|
|
9746
|
-
render: function render(text) {
|
|
9747
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9748
|
-
placement: "topLeft",
|
|
9749
|
-
title: text
|
|
9750
|
-
}, text);
|
|
9751
|
-
},
|
|
9752
|
-
dataIndex: 'name'
|
|
9753
|
-
}, {
|
|
9754
|
-
title: '商品名称',
|
|
9755
|
-
width: 100,
|
|
9756
|
-
ellipsis: {
|
|
9757
|
-
showTitle: false
|
|
9758
|
-
},
|
|
9759
|
-
dataIndex: 'itemName',
|
|
9760
|
-
render: function render(text) {
|
|
9761
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9762
|
-
placement: "topLeft",
|
|
9763
|
-
title: text
|
|
9764
|
-
}, text);
|
|
9765
|
-
}
|
|
9766
|
-
}, {
|
|
9767
|
-
title: '颜色',
|
|
9768
|
-
width: 100,
|
|
9769
|
-
ellipsis: {
|
|
9770
|
-
showTitle: false
|
|
9771
|
-
},
|
|
9772
|
-
render: function render(text) {
|
|
9773
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9774
|
-
placement: "topLeft",
|
|
9775
|
-
title: text
|
|
9776
|
-
}, text);
|
|
9777
|
-
},
|
|
9778
|
-
dataIndex: 'colorName'
|
|
9779
|
-
}, {
|
|
9780
|
-
title: '类目',
|
|
9781
|
-
width: 100,
|
|
9782
|
-
ellipsis: {
|
|
9783
|
-
showTitle: false
|
|
9784
|
-
},
|
|
9785
|
-
render: function render(text) {
|
|
9786
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9787
|
-
placement: "topLeft",
|
|
9788
|
-
title: text
|
|
9789
|
-
}, text);
|
|
9790
|
-
},
|
|
9791
|
-
dataIndex: 'categoryName'
|
|
9792
|
-
}, {
|
|
9793
|
-
title: '品类',
|
|
9794
|
-
width: 100,
|
|
9795
|
-
ellipsis: {
|
|
9796
|
-
showTitle: false
|
|
9797
|
-
},
|
|
9798
|
-
render: function render(text) {
|
|
9799
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9800
|
-
placement: "topLeft",
|
|
9801
|
-
title: text
|
|
9802
|
-
}, text);
|
|
9803
|
-
},
|
|
9804
|
-
dataIndex: 'className'
|
|
9805
|
-
}, {
|
|
9806
|
-
title: '品牌',
|
|
9807
|
-
width: 100,
|
|
9808
|
-
ellipsis: {
|
|
9809
|
-
showTitle: false
|
|
9810
|
-
},
|
|
9811
|
-
render: function render(text) {
|
|
9812
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
9813
|
-
placement: "topLeft",
|
|
9814
|
-
title: text
|
|
9815
|
-
}, text);
|
|
9816
|
-
},
|
|
9817
|
-
dataIndex: 'brandName'
|
|
9818
|
-
}];
|
|
9819
|
-
var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
9820
|
-
var initialTableSearchForm = [{
|
|
9821
|
-
name: 'qp-code-like',
|
|
9822
|
-
label: 'SKC编码'
|
|
9823
|
-
}, {
|
|
9824
|
-
name: 'qp-skcName-like',
|
|
9825
|
-
label: 'SKC名称'
|
|
9826
|
-
}, {
|
|
9827
|
-
name: 'qp-itemName-like',
|
|
9828
|
-
label: '商品名称'
|
|
9829
|
-
}, {
|
|
9830
|
-
name: 'qp-colorName-in',
|
|
9831
|
-
type: 'select',
|
|
9832
|
-
label: '颜色',
|
|
9833
|
-
field: {
|
|
9834
|
-
type: 'select',
|
|
9835
|
-
props: {
|
|
9836
|
-
mode: 'multiple',
|
|
9837
|
-
notFoundContent: '暂无数据',
|
|
9838
|
-
allowClear: true,
|
|
9839
|
-
showSearch: true,
|
|
9840
|
-
showArrow: true,
|
|
9841
|
-
maxTagCount: 1,
|
|
9842
|
-
optionFilterProp: 'children',
|
|
9843
|
-
filterOption: function filterOption(input, option) {
|
|
9844
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9845
|
-
}
|
|
9846
|
-
}
|
|
9847
|
-
}
|
|
9848
|
-
}, {
|
|
9849
|
-
name: 'qp-categoryId-in',
|
|
9850
|
-
type: 'treeSelect',
|
|
9851
|
-
label: '类目',
|
|
9852
|
-
field: {
|
|
9853
|
-
type: 'treeSelect',
|
|
9854
|
-
props: {
|
|
9855
|
-
treeData: [],
|
|
9856
|
-
treeCheckable: true,
|
|
9857
|
-
showSearch: true,
|
|
9858
|
-
allowClear: true,
|
|
9859
|
-
showArrow: true,
|
|
9860
|
-
treeNodeFilterProp: 'title',
|
|
9861
|
-
treeDefaultExpandAll: true,
|
|
9862
|
-
maxTagCount: 1,
|
|
9863
|
-
placeholder: '请选择',
|
|
9864
|
-
style: {
|
|
9865
|
-
width: '100%'
|
|
9866
|
-
},
|
|
9867
|
-
dropdownStyle: {
|
|
9868
|
-
maxHeight: 400,
|
|
9869
|
-
maxWidth: 100,
|
|
9870
|
-
overflow: 'auto'
|
|
9871
|
-
}
|
|
9872
|
-
}
|
|
9873
|
-
}
|
|
9874
|
-
}, {
|
|
9875
|
-
name: 'qp-classId-in',
|
|
9876
|
-
type: 'select',
|
|
9877
|
-
label: '品类',
|
|
9878
|
-
field: {
|
|
9879
|
-
type: 'select',
|
|
9880
|
-
props: {
|
|
9881
|
-
mode: 'multiple',
|
|
9882
|
-
notFoundContent: '暂无数据',
|
|
9883
|
-
allowClear: true,
|
|
9884
|
-
showSearch: true,
|
|
9885
|
-
showArrow: true,
|
|
9886
|
-
maxTagCount: 1,
|
|
9887
|
-
optionFilterProp: 'children',
|
|
9888
|
-
filterOption: function filterOption(input, option) {
|
|
9889
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9890
|
-
}
|
|
9891
|
-
}
|
|
9892
|
-
}
|
|
9893
|
-
}, {
|
|
9894
|
-
name: 'qp-brandId-in',
|
|
9895
|
-
type: 'select',
|
|
9896
|
-
label: '品牌',
|
|
9897
|
-
field: {
|
|
9898
|
-
type: 'select',
|
|
9899
|
-
props: {
|
|
9900
|
-
mode: 'multiple',
|
|
9901
|
-
notFoundContent: '暂无数据',
|
|
9902
|
-
allowClear: true,
|
|
9903
|
-
showSearch: true,
|
|
9904
|
-
showArrow: true,
|
|
9905
|
-
maxTagCount: 1,
|
|
9906
|
-
optionFilterProp: 'children',
|
|
9907
|
-
filterOption: function filterOption(input, option) {
|
|
9908
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9909
|
-
}
|
|
9910
|
-
}
|
|
9911
|
-
}
|
|
9912
|
-
}];
|
|
9913
|
-
var mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
|
|
9914
9833
|
var initialPromiseLoadList = [{
|
|
9915
9834
|
url: "/items/item/propertyValue/sizeBySkcConfig",
|
|
9916
9835
|
params: {
|
|
@@ -9949,7 +9868,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9949
9868
|
resPosition: 6,
|
|
9950
9869
|
resKeyValue: ['id', 'name']
|
|
9951
9870
|
}];
|
|
9952
|
-
var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
9953
9871
|
var props = {
|
|
9954
9872
|
buttonText: parProps.buttonText || '新增',
|
|
9955
9873
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -9976,11 +9894,185 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
9976
9894
|
isAllowRepeatedSelect: (parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) !== undefined ? !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) : true // 默认开启一行选多次
|
|
9977
9895
|
};
|
|
9978
9896
|
var modalTableProps = {
|
|
9979
|
-
modalTableTitle:
|
|
9980
|
-
tableSearchForm:
|
|
9981
|
-
|
|
9897
|
+
modalTableTitle: '选择商品',
|
|
9898
|
+
tableSearchForm: [{
|
|
9899
|
+
name: 'qp-code-like',
|
|
9900
|
+
label: 'SKC编码'
|
|
9901
|
+
}, {
|
|
9902
|
+
name: 'qp-skcName-like',
|
|
9903
|
+
label: 'SKC名称'
|
|
9904
|
+
}, {
|
|
9905
|
+
name: 'qp-itemName-like',
|
|
9906
|
+
label: '商品名称'
|
|
9907
|
+
}, {
|
|
9908
|
+
name: 'qp-colorName-in',
|
|
9909
|
+
type: 'select',
|
|
9910
|
+
label: '颜色',
|
|
9911
|
+
field: {
|
|
9912
|
+
type: 'select',
|
|
9913
|
+
props: {
|
|
9914
|
+
mode: 'multiple',
|
|
9915
|
+
notFoundContent: '暂无数据',
|
|
9916
|
+
allowClear: true,
|
|
9917
|
+
showSearch: true,
|
|
9918
|
+
showArrow: true,
|
|
9919
|
+
maxTagCount: 1,
|
|
9920
|
+
optionFilterProp: 'children',
|
|
9921
|
+
filterOption: function filterOption(input, option) {
|
|
9922
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9923
|
+
}
|
|
9924
|
+
}
|
|
9925
|
+
}
|
|
9926
|
+
}, {
|
|
9927
|
+
name: 'qp-categoryId-in',
|
|
9928
|
+
type: 'treeSelect',
|
|
9929
|
+
label: '类目',
|
|
9930
|
+
field: {
|
|
9931
|
+
type: 'treeSelect',
|
|
9932
|
+
props: {
|
|
9933
|
+
treeData: [],
|
|
9934
|
+
treeCheckable: true,
|
|
9935
|
+
showSearch: true,
|
|
9936
|
+
allowClear: true,
|
|
9937
|
+
showArrow: true,
|
|
9938
|
+
treeNodeFilterProp: 'title',
|
|
9939
|
+
treeDefaultExpandAll: true,
|
|
9940
|
+
maxTagCount: 1,
|
|
9941
|
+
placeholder: '请选择',
|
|
9942
|
+
style: {
|
|
9943
|
+
width: '100%'
|
|
9944
|
+
},
|
|
9945
|
+
dropdownStyle: {
|
|
9946
|
+
maxHeight: 400,
|
|
9947
|
+
maxWidth: 100,
|
|
9948
|
+
overflow: 'auto'
|
|
9949
|
+
}
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
}, {
|
|
9953
|
+
name: 'qp-classId-in',
|
|
9954
|
+
type: 'select',
|
|
9955
|
+
label: '品类',
|
|
9956
|
+
field: {
|
|
9957
|
+
type: 'select',
|
|
9958
|
+
props: {
|
|
9959
|
+
mode: 'multiple',
|
|
9960
|
+
notFoundContent: '暂无数据',
|
|
9961
|
+
allowClear: true,
|
|
9962
|
+
showSearch: true,
|
|
9963
|
+
showArrow: true,
|
|
9964
|
+
maxTagCount: 1,
|
|
9965
|
+
optionFilterProp: 'children',
|
|
9966
|
+
filterOption: function filterOption(input, option) {
|
|
9967
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9968
|
+
}
|
|
9969
|
+
}
|
|
9970
|
+
}
|
|
9971
|
+
}, {
|
|
9972
|
+
name: 'qp-brandId-in',
|
|
9973
|
+
type: 'select',
|
|
9974
|
+
label: '品牌',
|
|
9975
|
+
field: {
|
|
9976
|
+
type: 'select',
|
|
9977
|
+
props: {
|
|
9978
|
+
mode: 'multiple',
|
|
9979
|
+
notFoundContent: '暂无数据',
|
|
9980
|
+
allowClear: true,
|
|
9981
|
+
showSearch: true,
|
|
9982
|
+
showArrow: true,
|
|
9983
|
+
maxTagCount: 1,
|
|
9984
|
+
optionFilterProp: 'children',
|
|
9985
|
+
filterOption: function filterOption(input, option) {
|
|
9986
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
9987
|
+
}
|
|
9988
|
+
}
|
|
9989
|
+
}
|
|
9990
|
+
}],
|
|
9991
|
+
tableColumns: [{
|
|
9992
|
+
title: 'SKC编码',
|
|
9993
|
+
width: 150,
|
|
9994
|
+
dataIndex: 'code'
|
|
9995
|
+
}, {
|
|
9996
|
+
title: 'SKC名称',
|
|
9997
|
+
width: 200,
|
|
9998
|
+
ellipsis: {
|
|
9999
|
+
showTitle: false
|
|
10000
|
+
},
|
|
10001
|
+
render: function render(text) {
|
|
10002
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10003
|
+
placement: "topLeft",
|
|
10004
|
+
title: text
|
|
10005
|
+
}, text);
|
|
10006
|
+
},
|
|
10007
|
+
dataIndex: 'name'
|
|
10008
|
+
}, {
|
|
10009
|
+
title: '商品名称',
|
|
10010
|
+
width: 100,
|
|
10011
|
+
ellipsis: {
|
|
10012
|
+
showTitle: false
|
|
10013
|
+
},
|
|
10014
|
+
dataIndex: 'itemName',
|
|
10015
|
+
render: function render(text) {
|
|
10016
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10017
|
+
placement: "topLeft",
|
|
10018
|
+
title: text
|
|
10019
|
+
}, text);
|
|
10020
|
+
}
|
|
10021
|
+
}, {
|
|
10022
|
+
title: '颜色',
|
|
10023
|
+
width: 100,
|
|
10024
|
+
ellipsis: {
|
|
10025
|
+
showTitle: false
|
|
10026
|
+
},
|
|
10027
|
+
render: function render(text) {
|
|
10028
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10029
|
+
placement: "topLeft",
|
|
10030
|
+
title: text
|
|
10031
|
+
}, text);
|
|
10032
|
+
},
|
|
10033
|
+
dataIndex: 'colorName'
|
|
10034
|
+
}, {
|
|
10035
|
+
title: '类目',
|
|
10036
|
+
width: 100,
|
|
10037
|
+
ellipsis: {
|
|
10038
|
+
showTitle: false
|
|
10039
|
+
},
|
|
10040
|
+
render: function render(text) {
|
|
10041
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10042
|
+
placement: "topLeft",
|
|
10043
|
+
title: text
|
|
10044
|
+
}, text);
|
|
10045
|
+
},
|
|
10046
|
+
dataIndex: 'categoryName'
|
|
10047
|
+
}, {
|
|
10048
|
+
title: '品类',
|
|
10049
|
+
width: 100,
|
|
10050
|
+
ellipsis: {
|
|
10051
|
+
showTitle: false
|
|
10052
|
+
},
|
|
10053
|
+
render: function render(text) {
|
|
10054
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10055
|
+
placement: "topLeft",
|
|
10056
|
+
title: text
|
|
10057
|
+
}, text);
|
|
10058
|
+
},
|
|
10059
|
+
dataIndex: 'className'
|
|
10060
|
+
}, {
|
|
10061
|
+
title: '品牌',
|
|
10062
|
+
width: 100,
|
|
10063
|
+
ellipsis: {
|
|
10064
|
+
showTitle: false
|
|
10065
|
+
},
|
|
10066
|
+
render: function render(text) {
|
|
10067
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10068
|
+
placement: "topLeft",
|
|
10069
|
+
title: text
|
|
10070
|
+
}, text);
|
|
10071
|
+
},
|
|
10072
|
+
dataIndex: 'brandName'
|
|
10073
|
+
}],
|
|
9982
10074
|
selectColumn: mTpSelectColumn,
|
|
9983
|
-
promiseLoadList:
|
|
10075
|
+
promiseLoadList: initialPromiseLoadList
|
|
9984
10076
|
};
|
|
9985
10077
|
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9986
10078
|
modalTableProps: modalTableProps
|
|
@@ -10052,180 +10144,18 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10052
10144
|
dataIndex: 'count'
|
|
10053
10145
|
}, {
|
|
10054
10146
|
title: '所属组织',
|
|
10055
|
-
dataIndex: 'ownOrgSignName'
|
|
10056
|
-
}, {
|
|
10057
|
-
title: '品牌',
|
|
10058
|
-
dataIndex: 'brandName'
|
|
10059
|
-
}, {
|
|
10060
|
-
title: '类目',
|
|
10061
|
-
dataIndex: 'categoryText'
|
|
10062
|
-
}, {
|
|
10063
|
-
title: '品类',
|
|
10064
|
-
dataIndex: 'className'
|
|
10065
|
-
}];
|
|
10066
|
-
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
10067
|
-
var initialTableColumn = [{
|
|
10068
|
-
title: '商品编码',
|
|
10069
|
-
width: 150,
|
|
10070
|
-
dataIndex: 'itemCode'
|
|
10071
|
-
}, {
|
|
10072
|
-
title: '商品名称',
|
|
10073
|
-
width: 200,
|
|
10074
|
-
ellipsis: {
|
|
10075
|
-
showTitle: false
|
|
10076
|
-
},
|
|
10077
|
-
render: function render(text) {
|
|
10078
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10079
|
-
placement: "topLeft",
|
|
10080
|
-
title: text
|
|
10081
|
-
}, text);
|
|
10082
|
-
},
|
|
10083
|
-
dataIndex: 'name'
|
|
10084
|
-
}, {
|
|
10085
|
-
title: '所属组织',
|
|
10086
|
-
width: 100,
|
|
10087
|
-
ellipsis: {
|
|
10088
|
-
showTitle: false
|
|
10089
|
-
},
|
|
10090
|
-
render: function render(text) {
|
|
10091
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10092
|
-
placement: "topLeft",
|
|
10093
|
-
title: text
|
|
10094
|
-
}, text);
|
|
10095
|
-
},
|
|
10096
|
-
dataIndex: 'ownOrgSignName'
|
|
10097
|
-
}, {
|
|
10098
|
-
title: '品牌',
|
|
10099
|
-
width: 100,
|
|
10100
|
-
ellipsis: {
|
|
10101
|
-
showTitle: false
|
|
10102
|
-
},
|
|
10103
|
-
render: function render(text) {
|
|
10104
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10105
|
-
placement: "topLeft",
|
|
10106
|
-
title: text
|
|
10107
|
-
}, text);
|
|
10108
|
-
},
|
|
10109
|
-
dataIndex: 'brandName'
|
|
10110
|
-
}, {
|
|
10111
|
-
title: '类目',
|
|
10112
|
-
width: 100,
|
|
10113
|
-
ellipsis: {
|
|
10114
|
-
showTitle: false
|
|
10115
|
-
},
|
|
10116
|
-
render: function render(text) {
|
|
10117
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10118
|
-
placement: "topLeft",
|
|
10119
|
-
title: text
|
|
10120
|
-
}, text);
|
|
10121
|
-
},
|
|
10122
|
-
dataIndex: 'categoryName'
|
|
10123
|
-
}, {
|
|
10124
|
-
title: '品类',
|
|
10125
|
-
width: 100,
|
|
10126
|
-
ellipsis: {
|
|
10127
|
-
showTitle: false
|
|
10128
|
-
},
|
|
10129
|
-
render: function render(text) {
|
|
10130
|
-
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10131
|
-
placement: "topLeft",
|
|
10132
|
-
title: text
|
|
10133
|
-
}, text);
|
|
10134
|
-
},
|
|
10135
|
-
dataIndex: 'className'
|
|
10136
|
-
}];
|
|
10137
|
-
var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
|
|
10138
|
-
var initialTableSearchForm = [{
|
|
10139
|
-
name: 'qp-itemCode-like',
|
|
10140
|
-
label: '商品编码'
|
|
10141
|
-
}, {
|
|
10142
|
-
name: 'qp-name-like',
|
|
10143
|
-
label: '商品名称'
|
|
10144
|
-
}, {
|
|
10145
|
-
name: 'qp-ownOrgSign-in',
|
|
10146
|
-
type: 'select',
|
|
10147
|
-
label: '所属组织',
|
|
10148
|
-
field: {
|
|
10149
|
-
type: 'select',
|
|
10150
|
-
props: {
|
|
10151
|
-
mode: 'multiple',
|
|
10152
|
-
notFoundContent: '暂无数据',
|
|
10153
|
-
allowClear: true,
|
|
10154
|
-
showSearch: true,
|
|
10155
|
-
showArrow: true,
|
|
10156
|
-
maxTagCount: 1,
|
|
10157
|
-
optionFilterProp: 'children',
|
|
10158
|
-
filterOption: function filterOption(input, option) {
|
|
10159
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10160
|
-
}
|
|
10161
|
-
}
|
|
10162
|
-
}
|
|
10163
|
-
}, {
|
|
10164
|
-
name: 'qp-brandId-in',
|
|
10165
|
-
type: 'select',
|
|
10166
|
-
label: '品牌',
|
|
10167
|
-
field: {
|
|
10168
|
-
type: 'select',
|
|
10169
|
-
props: {
|
|
10170
|
-
mode: 'multiple',
|
|
10171
|
-
notFoundContent: '暂无数据',
|
|
10172
|
-
allowClear: true,
|
|
10173
|
-
showSearch: true,
|
|
10174
|
-
showArrow: true,
|
|
10175
|
-
maxTagCount: 1,
|
|
10176
|
-
optionFilterProp: 'children',
|
|
10177
|
-
filterOption: function filterOption(input, option) {
|
|
10178
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10179
|
-
}
|
|
10180
|
-
}
|
|
10181
|
-
}
|
|
10147
|
+
dataIndex: 'ownOrgSignName'
|
|
10182
10148
|
}, {
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
label: '类目',
|
|
10186
|
-
field: {
|
|
10187
|
-
type: 'treeSelect',
|
|
10188
|
-
props: {
|
|
10189
|
-
treeData: [],
|
|
10190
|
-
treeCheckable: true,
|
|
10191
|
-
showSearch: true,
|
|
10192
|
-
allowClear: true,
|
|
10193
|
-
showArrow: true,
|
|
10194
|
-
treeNodeFilterProp: 'title',
|
|
10195
|
-
treeDefaultExpandAll: true,
|
|
10196
|
-
maxTagCount: 1,
|
|
10197
|
-
placeholder: '请选择',
|
|
10198
|
-
style: {
|
|
10199
|
-
width: '100%'
|
|
10200
|
-
},
|
|
10201
|
-
dropdownStyle: {
|
|
10202
|
-
maxHeight: 400,
|
|
10203
|
-
maxWidth: 100,
|
|
10204
|
-
overflow: 'auto'
|
|
10205
|
-
}
|
|
10206
|
-
}
|
|
10207
|
-
}
|
|
10149
|
+
title: '品牌',
|
|
10150
|
+
dataIndex: 'brandName'
|
|
10208
10151
|
}, {
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
props: {
|
|
10215
|
-
mode: 'multiple',
|
|
10216
|
-
notFoundContent: '暂无数据',
|
|
10217
|
-
allowClear: true,
|
|
10218
|
-
showSearch: true,
|
|
10219
|
-
showArrow: true,
|
|
10220
|
-
maxTagCount: 1,
|
|
10221
|
-
optionFilterProp: 'children',
|
|
10222
|
-
filterOption: function filterOption(input, option) {
|
|
10223
|
-
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10224
|
-
}
|
|
10225
|
-
}
|
|
10226
|
-
}
|
|
10152
|
+
title: '类目',
|
|
10153
|
+
dataIndex: 'categoryText'
|
|
10154
|
+
}, {
|
|
10155
|
+
title: '品类',
|
|
10156
|
+
dataIndex: 'className'
|
|
10227
10157
|
}];
|
|
10228
|
-
var
|
|
10158
|
+
var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
|
|
10229
10159
|
var initialPromiseLoadList = [{
|
|
10230
10160
|
url: "/user/orgViewNode/listNoPage",
|
|
10231
10161
|
params: {
|
|
@@ -10264,7 +10194,6 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10264
10194
|
resPosition: 5,
|
|
10265
10195
|
resKeyValue: ['id', 'name']
|
|
10266
10196
|
}];
|
|
10267
|
-
var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
|
|
10268
10197
|
var props = {
|
|
10269
10198
|
buttonText: parProps.buttonText || '新增',
|
|
10270
10199
|
buttonProps: parProps.buttonProps || {},
|
|
@@ -10293,11 +10222,169 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
10293
10222
|
isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
|
|
10294
10223
|
};
|
|
10295
10224
|
var modalTableProps = {
|
|
10296
|
-
modalTableTitle:
|
|
10297
|
-
tableSearchForm:
|
|
10298
|
-
|
|
10225
|
+
modalTableTitle: '选择商品',
|
|
10226
|
+
tableSearchForm: [{
|
|
10227
|
+
name: 'qp-itemCode-like',
|
|
10228
|
+
label: '商品编码'
|
|
10229
|
+
}, {
|
|
10230
|
+
name: 'qp-name-like',
|
|
10231
|
+
label: '商品名称'
|
|
10232
|
+
}, {
|
|
10233
|
+
name: 'qp-ownOrgSign-in',
|
|
10234
|
+
type: 'select',
|
|
10235
|
+
label: '所属组织',
|
|
10236
|
+
field: {
|
|
10237
|
+
type: 'select',
|
|
10238
|
+
props: {
|
|
10239
|
+
mode: 'multiple',
|
|
10240
|
+
notFoundContent: '暂无数据',
|
|
10241
|
+
allowClear: true,
|
|
10242
|
+
showSearch: true,
|
|
10243
|
+
showArrow: true,
|
|
10244
|
+
maxTagCount: 1,
|
|
10245
|
+
optionFilterProp: 'children',
|
|
10246
|
+
filterOption: function filterOption(input, option) {
|
|
10247
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10248
|
+
}
|
|
10249
|
+
}
|
|
10250
|
+
}
|
|
10251
|
+
}, {
|
|
10252
|
+
name: 'qp-brandId-in',
|
|
10253
|
+
type: 'select',
|
|
10254
|
+
label: '品牌',
|
|
10255
|
+
field: {
|
|
10256
|
+
type: 'select',
|
|
10257
|
+
props: {
|
|
10258
|
+
mode: 'multiple',
|
|
10259
|
+
notFoundContent: '暂无数据',
|
|
10260
|
+
allowClear: true,
|
|
10261
|
+
showSearch: true,
|
|
10262
|
+
showArrow: true,
|
|
10263
|
+
maxTagCount: 1,
|
|
10264
|
+
optionFilterProp: 'children',
|
|
10265
|
+
filterOption: function filterOption(input, option) {
|
|
10266
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10267
|
+
}
|
|
10268
|
+
}
|
|
10269
|
+
}
|
|
10270
|
+
}, {
|
|
10271
|
+
name: 'qp-categoryId-in',
|
|
10272
|
+
type: 'treeSelect',
|
|
10273
|
+
label: '类目',
|
|
10274
|
+
field: {
|
|
10275
|
+
type: 'treeSelect',
|
|
10276
|
+
props: {
|
|
10277
|
+
treeData: [],
|
|
10278
|
+
treeCheckable: true,
|
|
10279
|
+
showSearch: true,
|
|
10280
|
+
allowClear: true,
|
|
10281
|
+
showArrow: true,
|
|
10282
|
+
treeNodeFilterProp: 'title',
|
|
10283
|
+
treeDefaultExpandAll: true,
|
|
10284
|
+
maxTagCount: 1,
|
|
10285
|
+
placeholder: '请选择',
|
|
10286
|
+
style: {
|
|
10287
|
+
width: '100%'
|
|
10288
|
+
},
|
|
10289
|
+
dropdownStyle: {
|
|
10290
|
+
maxHeight: 400,
|
|
10291
|
+
maxWidth: 100,
|
|
10292
|
+
overflow: 'auto'
|
|
10293
|
+
}
|
|
10294
|
+
}
|
|
10295
|
+
}
|
|
10296
|
+
}, {
|
|
10297
|
+
name: 'qp-classId-in',
|
|
10298
|
+
type: 'select',
|
|
10299
|
+
label: '品类',
|
|
10300
|
+
field: {
|
|
10301
|
+
type: 'select',
|
|
10302
|
+
props: {
|
|
10303
|
+
mode: 'multiple',
|
|
10304
|
+
notFoundContent: '暂无数据',
|
|
10305
|
+
allowClear: true,
|
|
10306
|
+
showSearch: true,
|
|
10307
|
+
showArrow: true,
|
|
10308
|
+
maxTagCount: 1,
|
|
10309
|
+
optionFilterProp: 'children',
|
|
10310
|
+
filterOption: function filterOption(input, option) {
|
|
10311
|
+
return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
10312
|
+
}
|
|
10313
|
+
}
|
|
10314
|
+
}
|
|
10315
|
+
}],
|
|
10316
|
+
tableColumns: [{
|
|
10317
|
+
title: '商品编码',
|
|
10318
|
+
width: 150,
|
|
10319
|
+
dataIndex: 'itemCode'
|
|
10320
|
+
}, {
|
|
10321
|
+
title: '商品名称',
|
|
10322
|
+
width: 200,
|
|
10323
|
+
ellipsis: {
|
|
10324
|
+
showTitle: false
|
|
10325
|
+
},
|
|
10326
|
+
render: function render(text) {
|
|
10327
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10328
|
+
placement: "topLeft",
|
|
10329
|
+
title: text
|
|
10330
|
+
}, text);
|
|
10331
|
+
},
|
|
10332
|
+
dataIndex: 'name'
|
|
10333
|
+
}, {
|
|
10334
|
+
title: '所属组织',
|
|
10335
|
+
width: 100,
|
|
10336
|
+
ellipsis: {
|
|
10337
|
+
showTitle: false
|
|
10338
|
+
},
|
|
10339
|
+
render: function render(text) {
|
|
10340
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10341
|
+
placement: "topLeft",
|
|
10342
|
+
title: text
|
|
10343
|
+
}, text);
|
|
10344
|
+
},
|
|
10345
|
+
dataIndex: 'ownOrgSignName'
|
|
10346
|
+
}, {
|
|
10347
|
+
title: '品牌',
|
|
10348
|
+
width: 100,
|
|
10349
|
+
ellipsis: {
|
|
10350
|
+
showTitle: false
|
|
10351
|
+
},
|
|
10352
|
+
render: function render(text) {
|
|
10353
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10354
|
+
placement: "topLeft",
|
|
10355
|
+
title: text
|
|
10356
|
+
}, text);
|
|
10357
|
+
},
|
|
10358
|
+
dataIndex: 'brandName'
|
|
10359
|
+
}, {
|
|
10360
|
+
title: '类目',
|
|
10361
|
+
width: 100,
|
|
10362
|
+
ellipsis: {
|
|
10363
|
+
showTitle: false
|
|
10364
|
+
},
|
|
10365
|
+
render: function render(text) {
|
|
10366
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10367
|
+
placement: "topLeft",
|
|
10368
|
+
title: text
|
|
10369
|
+
}, text);
|
|
10370
|
+
},
|
|
10371
|
+
dataIndex: 'categoryName'
|
|
10372
|
+
}, {
|
|
10373
|
+
title: '品类',
|
|
10374
|
+
width: 100,
|
|
10375
|
+
ellipsis: {
|
|
10376
|
+
showTitle: false
|
|
10377
|
+
},
|
|
10378
|
+
render: function render(text) {
|
|
10379
|
+
return /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
10380
|
+
placement: "topLeft",
|
|
10381
|
+
title: text
|
|
10382
|
+
}, text);
|
|
10383
|
+
},
|
|
10384
|
+
dataIndex: 'className'
|
|
10385
|
+
}],
|
|
10299
10386
|
selectColumn: mTpSelectColumn,
|
|
10300
|
-
promiseLoadList:
|
|
10387
|
+
promiseLoadList: initialPromiseLoadList
|
|
10301
10388
|
};
|
|
10302
10389
|
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
10303
10390
|
modalTableProps: modalTableProps
|
|
@@ -10373,7 +10460,7 @@ var CommodityEntry = function CommodityEntry(props) {
|
|
|
10373
10460
|
onCancel: handleCancel,
|
|
10374
10461
|
destroyOnClose: true,
|
|
10375
10462
|
zIndex: 15
|
|
10376
|
-
}, otherModalProps), /*#__PURE__*/React$1.createElement(DataValidation,
|
|
10463
|
+
}, otherModalProps), /*#__PURE__*/React$1.createElement(DataValidation, {
|
|
10377
10464
|
onRef: function onRef(ref) {
|
|
10378
10465
|
dataValidationRef = ref;
|
|
10379
10466
|
},
|
|
@@ -10381,7 +10468,7 @@ var CommodityEntry = function CommodityEntry(props) {
|
|
|
10381
10468
|
validDataUrl: validDataUrl,
|
|
10382
10469
|
isBrandAuth: isBrandAuth,
|
|
10383
10470
|
isCheckStockNum: isCheckStockNum
|
|
10384
|
-
})))
|
|
10471
|
+
}))) || '');
|
|
10385
10472
|
};
|
|
10386
10473
|
|
|
10387
10474
|
/*
|
|
@@ -12405,7 +12492,7 @@ var DetailWrapper = /*#__PURE__*/React$1.memo(function (_ref) {
|
|
|
12405
12492
|
var renderPageActionList = function renderPageActionList(actionLists) {
|
|
12406
12493
|
var authButton = localStorage.getItem(getMenuAuthDataKey()) ? JSON.parse(localStorage.getItem(getMenuAuthDataKey())) : [];
|
|
12407
12494
|
var visibleActions = actionLists.filter(function (action) {
|
|
12408
|
-
return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (
|
|
12495
|
+
return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (judgeIsEmpty$1(action.code) || authButton.filter(function (item) {
|
|
12409
12496
|
return item === action.code;
|
|
12410
12497
|
}));
|
|
12411
12498
|
});
|
|
@@ -13916,6 +14003,14 @@ var ResizeableTitle$2 = function ResizeableTitle(props) {
|
|
|
13916
14003
|
};
|
|
13917
14004
|
var BsSulaQueryTable = (function (props) {
|
|
13918
14005
|
var bsTableCode = (props === null || props === void 0 ? void 0 : props.tableCode) || window.location.hash; //设置列字段的唯一标识
|
|
14006
|
+
// 获取 table columns中所有的 key 防止有的地方是 dataindex
|
|
14007
|
+
var checkedList = useMemo(function () {
|
|
14008
|
+
return props.columns.filter(function (col) {
|
|
14009
|
+
return !col.hidden;
|
|
14010
|
+
}).map(function (d) {
|
|
14011
|
+
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
14012
|
+
});
|
|
14013
|
+
}, [props.columns]);
|
|
13919
14014
|
var getConfigFromlocalstorage = function getConfigFromlocalstorage(type) {
|
|
13920
14015
|
var config = localStorage.getItem(type) || '[]';
|
|
13921
14016
|
var configArray = JSON.parse(config);
|
|
@@ -13927,66 +14022,97 @@ var BsSulaQueryTable = (function (props) {
|
|
|
13927
14022
|
}
|
|
13928
14023
|
return [];
|
|
13929
14024
|
};
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
14025
|
+
/**
|
|
14026
|
+
* 根据保存的配置和原始配置,获取设置的字段或列。
|
|
14027
|
+
* @param savedConfig 保存的配置数组,可能包含字段或列的配置。
|
|
14028
|
+
* @param originConfig 原始配置数组,包含完整的字段或列信息。
|
|
14029
|
+
* @param type 字段或列的类型,用于确定配置的属性。
|
|
14030
|
+
* @returns 返回根据保存的配置处理后的字段或列数组,如果未保存任何配置,则返回原始配置。
|
|
14031
|
+
*/
|
|
14032
|
+
var getSettingFieldOrColumn = function getSettingFieldOrColumn(savedConfig, originConfig, type) {
|
|
14033
|
+
/**
|
|
14034
|
+
* 判断值是否为字符串数组。
|
|
14035
|
+
* @param value 待判断的值。
|
|
14036
|
+
* @returns 如果值是字符串数组,则返回true,否则返回false。
|
|
14037
|
+
*/
|
|
14038
|
+
var isStringArray = function isStringArray(value) {
|
|
14039
|
+
return Array.isArray(value) && value.every(function (v) {
|
|
14040
|
+
return typeof v === 'string';
|
|
14041
|
+
});
|
|
14042
|
+
};
|
|
14043
|
+
/**
|
|
14044
|
+
* 根据配置项和类型,获取配置项的键。
|
|
14045
|
+
* @param config 配置项,可以是字段或列。
|
|
14046
|
+
* @param type 配置项的类型。
|
|
14047
|
+
* @returns 返回配置项的键,如果无法获取,则返回空字符串。
|
|
14048
|
+
*/
|
|
14049
|
+
var getItemKey = function getItemKey(config, type) {
|
|
14050
|
+
try {
|
|
14051
|
+
if (type === 'columns') {
|
|
14052
|
+
return isStringArray(config.key) ? JSON.stringify(config.key) : isStringArray(config.dataIndex) ? JSON.stringify(config.dataIndex) : config.key || config.dataIndex || '';
|
|
14053
|
+
}
|
|
14054
|
+
return isStringArray(config.name) ? JSON.stringify(config.name) : config.name || '';
|
|
14055
|
+
} catch (e) {}
|
|
14056
|
+
return '';
|
|
14057
|
+
};
|
|
14058
|
+
var newConfig = [];
|
|
14059
|
+
if (savedConfig.length) {
|
|
14060
|
+
var hash = originConfig.reduce(function (prev, inneritem) {
|
|
14061
|
+
prev[getItemKey(inneritem, type)] = inneritem;
|
|
14062
|
+
return prev;
|
|
14063
|
+
}, {});
|
|
14064
|
+
savedConfig.forEach(function (config, index) {
|
|
14065
|
+
var inner = hash[getItemKey(config, type)];
|
|
14066
|
+
inner && newConfig.push(_objectSpread2(_objectSpread2({}, inner), config));
|
|
14067
|
+
});
|
|
14068
|
+
}
|
|
14069
|
+
if (newConfig.length) return newConfig;
|
|
14070
|
+
if (type === 'columns') {
|
|
14071
|
+
return originConfig.filter(function (column) {
|
|
14072
|
+
var columnKey = getItemKey(column, type);
|
|
14073
|
+
return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
|
|
14074
|
+
});
|
|
14075
|
+
}
|
|
14076
|
+
return _toConsumableArray(originConfig);
|
|
13944
14077
|
};
|
|
13945
14078
|
var refs = useRef(null);
|
|
13946
14079
|
var _useState = useState(''),
|
|
13947
14080
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13948
14081
|
pagePath = _useState2[0],
|
|
13949
14082
|
setPagePath = _useState2[1];
|
|
13950
|
-
// 获取 table columns中所有的 key 防止有的地方是 dataindex
|
|
13951
|
-
var _useState3 = useState(props.columns.filter(function (col) {
|
|
13952
|
-
return !col.hidden;
|
|
13953
|
-
}).map(function (d) {
|
|
13954
|
-
return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
|
|
13955
|
-
})),
|
|
13956
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
13957
|
-
checkedList = _useState4[0],
|
|
13958
|
-
setCheckedList = _useState4[1];
|
|
13959
14083
|
var _useLocation = useLocation(),
|
|
13960
14084
|
pathname = _useLocation.pathname;
|
|
13961
|
-
var
|
|
13962
|
-
|
|
13963
|
-
id =
|
|
13964
|
-
var
|
|
13965
|
-
|
|
13966
|
-
isFullScreen =
|
|
13967
|
-
setIsFnllScreen =
|
|
14085
|
+
var _useState3 = useState(Number(Math.random().toString().substr(2, 0) + Date.now()).toString(36)),
|
|
14086
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
14087
|
+
id = _useState4[0];
|
|
14088
|
+
var _useState5 = useState(false),
|
|
14089
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
14090
|
+
isFullScreen = _useState6[0],
|
|
14091
|
+
setIsFnllScreen = _useState6[1];
|
|
13968
14092
|
// @ts-nocheck
|
|
13969
|
-
var
|
|
14093
|
+
var _useState7 = useState(props),
|
|
14094
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
14095
|
+
value = _useState8[0],
|
|
14096
|
+
setValue = _useState8[1];
|
|
14097
|
+
var _props$fields = props.fields,
|
|
14098
|
+
fields = _props$fields === void 0 ? [] : _props$fields;
|
|
14099
|
+
var _useState9 = useState([]),
|
|
13970
14100
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
var
|
|
14101
|
+
showColumn = _useState10[0],
|
|
14102
|
+
setShowColumns = _useState10[1]; // 列字段
|
|
14103
|
+
var originSearchFields = getSettingFieldOrColumn(getConfigFromlocalstorage(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION), fields, 'searchFields');
|
|
14104
|
+
var _useState11 = useState(originSearchFields),
|
|
13974
14105
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
13975
|
-
|
|
13976
|
-
|
|
13977
|
-
var originSearchFields = getInitialSearchFieldsInfo();
|
|
13978
|
-
var _useState13 = useState(originSearchFields),
|
|
13979
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
13980
|
-
showSearchFields = _useState14[0],
|
|
13981
|
-
setShowSearchFields = _useState14[1]; //搜索项字段
|
|
14106
|
+
showSearchFields = _useState12[0],
|
|
14107
|
+
setShowSearchFields = _useState12[1]; //搜索项字段
|
|
13982
14108
|
var _props$isPage = props.isPage,
|
|
13983
14109
|
pagination = props.pagination,
|
|
13984
14110
|
tableCode = props.tableCode,
|
|
13985
14111
|
appRequestConfig = props.appRequestConfig;
|
|
13986
|
-
var
|
|
13987
|
-
|
|
13988
|
-
height =
|
|
13989
|
-
setHeight =
|
|
14112
|
+
var _useState13 = useState('100vh'),
|
|
14113
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
14114
|
+
height = _useState14[0],
|
|
14115
|
+
setHeight = _useState14[1];
|
|
13990
14116
|
var sortTableRef = useRef(null);
|
|
13991
14117
|
var searchTableRef = useRef(null);
|
|
13992
14118
|
// 获取table高度
|
|
@@ -14047,7 +14173,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
14047
14173
|
if (Number(item.slice(-1)) >= 1) {
|
|
14048
14174
|
Item = item.substr(0, item.length - 1);
|
|
14049
14175
|
}
|
|
14050
|
-
if (
|
|
14176
|
+
if (!authButton.filter(function (itemInner) {
|
|
14051
14177
|
return Item === itemInner;
|
|
14052
14178
|
}).length) {
|
|
14053
14179
|
resourceCodeArray[item].visible = false;
|
|
@@ -14059,17 +14185,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
14059
14185
|
}));
|
|
14060
14186
|
var columns = props.columns;
|
|
14061
14187
|
var columnConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.COLUMN_CONDITION);
|
|
14062
|
-
var showColumns = columnConfig
|
|
14063
|
-
var inner = columns.filter(function (inneritem) {
|
|
14064
|
-
var innerKey = Array.isArray(inneritem.key || inneritem.dataIndex) ? JSON.stringify(inneritem.key || inneritem.dataIndex) : inneritem.key || inneritem.dataIndex;
|
|
14065
|
-
var itemKey = Array.isArray(item.key || item.dataIndex) ? JSON.stringify(item.key || item.dataIndex) : item.key || item.dataIndex;
|
|
14066
|
-
return innerKey && innerKey === itemKey;
|
|
14067
|
-
})[0];
|
|
14068
|
-
return _objectSpread2(_objectSpread2({}, inner), item);
|
|
14069
|
-
}) : columns.filter(function (column) {
|
|
14070
|
-
var columnKey = Array.isArray(column.key || column.dataIndex) ? JSON.stringify(column.key || column.dataIndex) : column.key || column.dataIndex;
|
|
14071
|
-
return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
|
|
14072
|
-
});
|
|
14188
|
+
var showColumns = getSettingFieldOrColumn(columnConfig, columns, 'columns');
|
|
14073
14189
|
showColumns.forEach(function (item, index) {
|
|
14074
14190
|
item.width = item.width || getItemDefaultWidth(item);
|
|
14075
14191
|
handleBssulaColumnsSpecialParams(item);
|
|
@@ -14483,7 +14599,7 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
|
|
|
14483
14599
|
routesData.splice(i, 1);
|
|
14484
14600
|
return 0; // continue
|
|
14485
14601
|
}
|
|
14486
|
-
if (
|
|
14602
|
+
if (routesData[i].code && authButton.every(function (item) {
|
|
14487
14603
|
return routesData[i].code != item;
|
|
14488
14604
|
})) {
|
|
14489
14605
|
routesData.splice(i, 1);
|
|
@@ -15126,7 +15242,9 @@ var GlobalHeaderCom = function GlobalHeaderCom(props) {
|
|
|
15126
15242
|
deep(item.routes);
|
|
15127
15243
|
} else if (!item.hideInMenu && (name ? formatMessage({
|
|
15128
15244
|
id: "menu.".concat(item.name)
|
|
15129
|
-
}).indexOf(name) !== -1 : true)) {
|
|
15245
|
+
}).indexOf(name) !== -1 : true) && btnAuth.find(function (d) {
|
|
15246
|
+
return d === item.code;
|
|
15247
|
+
})) {
|
|
15130
15248
|
resultList.push(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
15131
15249
|
fullPathName: getFullPathName(item.name)
|
|
15132
15250
|
}));
|
|
@@ -16413,70 +16531,10 @@ var CustomerMenuHeader = function CustomerMenuHeader(_ref) {
|
|
|
16413
16531
|
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";
|
|
16414
16532
|
styleInject(css_248z$m);
|
|
16415
16533
|
|
|
16416
|
-
/*
|
|
16417
|
-
* @Date: 2022-04-01 15:42:51
|
|
16418
|
-
* @LastEditors: 追随
|
|
16419
|
-
* @LastEditTime: 2022-09-16 20:53:23
|
|
16420
|
-
*/
|
|
16421
|
-
var NoFoundPage = function NoFoundPage(props) {
|
|
16422
|
-
return /*#__PURE__*/React$1.createElement("div", {
|
|
16423
|
-
style: {
|
|
16424
|
-
height: 'calc(100vh - 88px)',
|
|
16425
|
-
background: '#fff',
|
|
16426
|
-
display: 'flex',
|
|
16427
|
-
justifyContent: 'center',
|
|
16428
|
-
alignItems: 'center'
|
|
16429
|
-
}
|
|
16430
|
-
}, /*#__PURE__*/React$1.createElement(Result, {
|
|
16431
|
-
status: "404",
|
|
16432
|
-
title: "404",
|
|
16433
|
-
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"))
|
|
16434
|
-
}));
|
|
16435
|
-
};
|
|
16436
|
-
|
|
16437
16534
|
var _excluded$g = ["route"];
|
|
16438
16535
|
var TabPane = Tabs.TabPane;
|
|
16439
|
-
var getId = function getId(str) {
|
|
16440
|
-
// 找到最后一个 / 的位置
|
|
16441
|
-
var lastSlashIndex = str.lastIndexOf("/");
|
|
16442
|
-
// 如果找到了 /,则返回它后面的部分
|
|
16443
|
-
if (lastSlashIndex !== -1) {
|
|
16444
|
-
return str.substring(lastSlashIndex + 1);
|
|
16445
|
-
} else {
|
|
16446
|
-
// 如果没有找到 /,则返回整个字符串
|
|
16447
|
-
return null;
|
|
16448
|
-
}
|
|
16449
|
-
};
|
|
16450
|
-
// 获取权限菜单path&通用单据id
|
|
16451
|
-
var getAuthMenuPathAndDocsId = function getAuthMenuPathAndDocsId(pathToRegexp) {
|
|
16452
|
-
var limitedMenuData = localStorage.getItem(getLimitMenuDataKey()) ? JSON.parse(localStorage.getItem(getLimitMenuDataKey())) : [];
|
|
16453
|
-
var menuKeys = [];
|
|
16454
|
-
var docsId = [];
|
|
16455
|
-
var getLimitedMenuKeys = function getLimitedMenuKeys(data) {
|
|
16456
|
-
data.forEach(function (item) {
|
|
16457
|
-
if (item.children && item.children.length > 0) {
|
|
16458
|
-
getLimitedMenuKeys(item.children);
|
|
16459
|
-
} else {
|
|
16460
|
-
var originPath = item.path.replace(/^\/\w+\//, '/');
|
|
16461
|
-
menuKeys.push(originPath);
|
|
16462
|
-
if (pathToRegexp('/operation-and-maintenance-center/configuration-management/all-general-documents-specific/:id').test(originPath)) {
|
|
16463
|
-
getId(originPath) && docsId.push(getId(originPath));
|
|
16464
|
-
}
|
|
16465
|
-
}
|
|
16466
|
-
});
|
|
16467
|
-
};
|
|
16468
|
-
try {
|
|
16469
|
-
getLimitedMenuKeys(limitedMenuData);
|
|
16470
|
-
} catch (e) {}
|
|
16471
|
-
return {
|
|
16472
|
-
menuKeys: menuKeys,
|
|
16473
|
-
docsId: docsId
|
|
16474
|
-
};
|
|
16475
|
-
};
|
|
16476
16536
|
var UN_LISTTEN_DRP;
|
|
16477
16537
|
var routerArray = [];
|
|
16478
|
-
var authMenuPathList = [];
|
|
16479
|
-
var docsId = [];
|
|
16480
16538
|
var lastTwoRouterArray = [1, 2];
|
|
16481
16539
|
var type = 'DraggableTabNode';
|
|
16482
16540
|
var DraggableTabNode = function DraggableTabNode(_ref) {
|
|
@@ -16669,7 +16727,6 @@ var ItemMenu = function ItemMenu(props) {
|
|
|
16669
16727
|
};
|
|
16670
16728
|
var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
16671
16729
|
function BasicLayout(props) {
|
|
16672
|
-
var _getAuthMenuPathAndDo, _getAuthMenuPathAndDo2;
|
|
16673
16730
|
var _this;
|
|
16674
16731
|
_classCallCheck(this, BasicLayout);
|
|
16675
16732
|
_this = _callSuper(this, BasicLayout, [props]);
|
|
@@ -16686,41 +16743,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
16686
16743
|
return queryString;
|
|
16687
16744
|
};
|
|
16688
16745
|
_this.updateTree = function (Tree) {
|
|
16689
|
-
var authMenuKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
16690
16746
|
var treeData = Tree;
|
|
16691
16747
|
var treeList = [];
|
|
16692
|
-
// 是否为权限菜单路径
|
|
16693
|
-
var getLimitedMenuPath = function getLimitedMenuPath(node) {
|
|
16694
|
-
return authMenuKeys.some(function (item) {
|
|
16695
|
-
return (node.path || '').includes(item);
|
|
16696
|
-
});
|
|
16697
|
-
};
|
|
16698
|
-
// 是否为通用单据菜单路径
|
|
16699
|
-
var getGenerateDocs = function getGenerateDocs(node) {
|
|
16700
|
-
return (node.path || '').includes('all-general-documents');
|
|
16701
|
-
};
|
|
16702
16748
|
// 递归获取树列表
|
|
16703
16749
|
var getTreeList = function getTreeList(data) {
|
|
16704
16750
|
data.forEach(function (node) {
|
|
16705
16751
|
if (node.routes && node.routes.length > 0) {
|
|
16706
16752
|
getTreeList(node.routes);
|
|
16707
|
-
|
|
16708
|
-
}
|
|
16709
|
-
// todo:暂时处理非wujie环境不做404管控
|
|
16710
|
-
if (!window.__POWERED_BY_WUJIE__) {
|
|
16711
|
-
treeList.push({
|
|
16712
|
-
tab: node.locale,
|
|
16713
|
-
key: node.path,
|
|
16714
|
-
locale: node.locale,
|
|
16715
|
-
closable: true,
|
|
16716
|
-
content: node.component,
|
|
16717
|
-
name: node.name,
|
|
16718
|
-
hideInMenu: node.hideInMenu,
|
|
16719
|
-
isOnlyOnePage: node.isOnlyOnePage
|
|
16720
|
-
});
|
|
16721
|
-
return;
|
|
16722
|
-
}
|
|
16723
|
-
if (node.path === '/' || getLimitedMenuPath(node) || getGenerateDocs(node)) {
|
|
16753
|
+
} else {
|
|
16724
16754
|
treeList.push({
|
|
16725
16755
|
tab: node.locale,
|
|
16726
16756
|
key: node.path,
|
|
@@ -16787,6 +16817,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
16787
16817
|
return moment$1(timeStr).add(8, 'hours').format(format) || '- -';
|
|
16788
16818
|
};
|
|
16789
16819
|
_this.onChange = function (key) {
|
|
16820
|
+
// console.log('onChange');
|
|
16790
16821
|
if (key !== _this.state.activeKey) {
|
|
16791
16822
|
_this.setState({
|
|
16792
16823
|
activeKey: key
|
|
@@ -17072,9 +17103,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17072
17103
|
});
|
|
17073
17104
|
}
|
|
17074
17105
|
};
|
|
17075
|
-
|
|
17076
|
-
docsId = ((_getAuthMenuPathAndDo2 = getAuthMenuPathAndDocsId(props.pathToRegexp)) === null || _getAuthMenuPathAndDo2 === void 0 ? void 0 : _getAuthMenuPathAndDo2.docsId) || [];
|
|
17077
|
-
routerArray = _this.updateTree(props.route.routes, authMenuPathList);
|
|
17106
|
+
routerArray = _this.updateTree(props.route.routes);
|
|
17078
17107
|
var homeRouter = routerArray.filter(function (itemroute) {
|
|
17079
17108
|
return itemroute.key === '/';
|
|
17080
17109
|
})[0];
|
|
@@ -17174,28 +17203,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17174
17203
|
hideMenuArray = _this2$state.hideMenuArray;
|
|
17175
17204
|
var newListenRouterState = _toConsumableArray(listenRouterState);
|
|
17176
17205
|
var newListenRouterKey = _toConsumableArray(listenRouterKey);
|
|
17177
|
-
/**
|
|
17178
|
-
* 根据给定的路由数组和当前路由信息,筛选出与当前路由匹配的路由项。
|
|
17179
|
-
*
|
|
17180
|
-
* @param routerArray 路由数组,包含多个路由项,每个路由项有一个键(key)。
|
|
17181
|
-
* @param route 当前的路由信息,包含路径(pathname)等信息。
|
|
17182
|
-
* @param docsId 通用单据ID的数组,用于进一步筛选路由。
|
|
17183
|
-
* @returns 返回与当前路由匹配的第一个路由项,如果没有匹配项则返回undefined。
|
|
17184
|
-
*/
|
|
17185
17206
|
var replaceRouter = routerArray.filter(function (itemRoute) {
|
|
17186
|
-
var _route$pathname, _route$pathname2;
|
|
17187
|
-
// 单独处理通用单据预览
|
|
17188
|
-
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'))) {
|
|
17189
|
-
return pathToRegexp(itemRoute.key || '').test(route.pathname);
|
|
17190
|
-
}
|
|
17191
|
-
// 当路由路径包含'all-general-documents'时,按通用单据处理
|
|
17192
|
-
if (((_route$pathname2 = route.pathname) === null || _route$pathname2 === void 0 ? void 0 : _route$pathname2.includes('all-general-documents')) && shouldUseAuth()) {
|
|
17193
|
-
// 检查路由路径是否匹配路由项的键,并且路径中包含至少一个通用单据ID
|
|
17194
|
-
return pathToRegexp(itemRoute.key || '').test(route.pathname) && docsId.some(function (item) {
|
|
17195
|
-
return route.pathname.includes(item);
|
|
17196
|
-
});
|
|
17197
|
-
}
|
|
17198
|
-
// 对于不包含'all-general-documents'的路径,只检查路由路径是否匹配路由项的键
|
|
17199
17207
|
return pathToRegexp(itemRoute.key || '').test(route.pathname);
|
|
17200
17208
|
})[0];
|
|
17201
17209
|
var currentKey = '';
|
|
@@ -17219,15 +17227,20 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
17219
17227
|
}
|
|
17220
17228
|
if (!listenRouterKey.includes(currentKey)) {
|
|
17221
17229
|
if (!replaceRouter) {
|
|
17222
|
-
|
|
17223
|
-
|
|
17224
|
-
key
|
|
17225
|
-
|
|
17226
|
-
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17230
|
+
var _routerArray$filter;
|
|
17231
|
+
replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
|
|
17232
|
+
return itemroute.key === '/404';
|
|
17233
|
+
})) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
|
|
17234
|
+
_this2.setState({
|
|
17235
|
+
listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
|
|
17236
|
+
key: currentKey,
|
|
17237
|
+
tab: '404'
|
|
17238
|
+
})]),
|
|
17239
|
+
activeKey: currentKey,
|
|
17240
|
+
listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
|
|
17241
|
+
}, function () {
|
|
17242
|
+
_this2.checkisNavSlide();
|
|
17243
|
+
});
|
|
17231
17244
|
} else {
|
|
17232
17245
|
var match = matchPath(route.pathname, {
|
|
17233
17246
|
path: replaceRouter.key
|
|
@@ -17745,7 +17758,8 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
17745
17758
|
getDictionaryTextByValue = _this$props4.getDictionaryTextByValue,
|
|
17746
17759
|
timeFormat = _this$props4.timeFormat,
|
|
17747
17760
|
transparentProps = _this$props4.transparentProps;
|
|
17748
|
-
|
|
17761
|
+
console.log('child wrapper conpent', this.props);
|
|
17762
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
|
|
17749
17763
|
getDictionarySource: getDictionarySource,
|
|
17750
17764
|
getDictionaryTextByValue: getDictionaryTextByValue,
|
|
17751
17765
|
timeFormat: timeFormat
|
|
@@ -32710,4 +32724,4 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32710
32724
|
})));
|
|
32711
32725
|
});
|
|
32712
32726
|
|
|
32713
|
-
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 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,
|
|
32727
|
+
export { AddSelect, AddSkcSelect, AddSkuSelect, AddSpuSelect, BillEntry, BsCascader, index$5 as BsLayout, BsSulaQueryTable, BusinessSearchSelect$1 as BusinessSearchSelect, BusinessTreeSearchSelect$1 as BusinessTreeSearchSelect, index$1 as CheckOneUser, ColumnSettingTable, CommodityEntry, DataImport, DataValidation, index$3 as DetailPageWrapper, EllipsisTooltip, ExportIcon, GuideWrapper, index$4 as HomePageWrapper, JsonQueryTable, index$6 as MoreTreeTable, QueryMutipleInput, RuleObjectComponent as RuleComponent, index$7 as RuleSetter, SearchSelect, index$2 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 };
|