@bit-sun/business-component 2.2.44 → 2.2.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +16 -16
- package/.fatherrc.ts +5 -5
- package/.gitlab-ci.yml +179 -179
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +74 -74
- package/README.md +27 -27
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/index.d.ts +2 -2
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +2 -2
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/index.esm.js +704 -660
- package/dist/index.js +703 -659
- package/dist/utils/LocalstorageUtils.d.ts +1 -0
- package/dist/utils/TableUtils.d.ts +2 -2
- package/dist/utils/utils.d.ts +1 -1
- package/docs/index.md +21 -21
- package/lib/assets/drag.svg +17 -17
- package/lib/assets/exportFail.svg +37 -37
- package/lib/assets/exportProcessing.svg +28 -28
- package/lib/assets/exportSuccess.svg +34 -34
- package/lib/assets/label_icon_bottom.svg +25 -25
- package/lib/assets/upExport.svg +22 -22
- package/package.json +77 -77
- package/src/assets/32.svg +27 -27
- package/src/assets/addIcon.svg +17 -17
- package/src/assets/allfunc.svg +27 -27
- package/src/assets/arrowRight.svg +24 -24
- package/src/assets/btn-delete.svg +29 -29
- package/src/assets/btn-edit.svg +19 -19
- package/src/assets/btn-more.svg +17 -17
- package/src/assets/btn-submit.svg +19 -19
- package/src/assets/caidan.svg +11 -11
- package/src/assets/close.svg +26 -26
- package/src/assets/drag.svg +17 -17
- package/src/assets/exportFail.svg +37 -37
- package/src/assets/exportProcessing.svg +28 -28
- package/src/assets/exportSuccess.svg +34 -34
- package/src/assets/fixed-left-active.svg +11 -11
- package/src/assets/fixed-left.svg +15 -15
- package/src/assets/fixed-right-active.svg +11 -11
- package/src/assets/fixed-right.svg +15 -15
- package/src/assets/guanbi.svg +15 -15
- package/src/assets/icon-quanping.svg +15 -15
- package/src/assets/icon-shezhi.svg +17 -17
- package/src/assets/label_icon_bottom.svg +25 -25
- package/src/assets/list-no-img.svg +21 -21
- package/src/assets/morentouxiang-32.svg +23 -23
- package/src/assets/scanning.svg +24 -24
- package/src/assets/upExport.svg +22 -22
- package/src/components/Business/AddSelectBusiness/index.md +161 -161
- package/src/components/Business/AddSelectBusiness/index.tsx +887 -861
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
- package/src/components/Business/BsLayouts/index.less +79 -79
- package/src/components/Business/BsLayouts/index.tsx +1484 -1484
- package/src/components/Business/BsLayouts/service.ts +10 -10
- package/src/components/Business/BsLayouts/utils.tsx +203 -203
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +564 -564
- package/src/components/Business/BsSulaQueryTable/index.less +221 -221
- package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
- package/src/components/Business/BsSulaQueryTable/setting.tsx +832 -828
- package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
- package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
- package/src/components/Business/CommodityEntry/index.md +70 -70
- package/src/components/Business/CommodityEntry/index.tsx +80 -80
- package/src/components/Business/CommonAlert/index.tsx +23 -23
- package/src/components/Business/CommonGuideWrapper/index.less +111 -111
- package/src/components/Business/CommonGuideWrapper/index.md +39 -39
- package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
- package/src/components/Business/DetailPageWrapper/index.less +79 -79
- package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
- package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
- package/src/components/Business/HomePageWrapper/index.less +33 -33
- package/src/components/Business/HomePageWrapper/index.md +45 -45
- package/src/components/Business/HomePageWrapper/index.tsx +162 -162
- package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
- package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
- package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
- package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
- package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
- package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
- package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
- package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
- package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
- package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
- package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
- package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
- package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
- package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
- package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
- package/src/components/Business/JsonQueryTable/function.ts +62 -62
- package/src/components/Business/JsonQueryTable/index.less +16 -16
- package/src/components/Business/JsonQueryTable/index.md +328 -328
- package/src/components/Business/JsonQueryTable/index.tsx +320 -320
- package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
- package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
- package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
- package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
- package/src/components/Business/JsonQueryTable/static.ts +390 -390
- package/src/components/Business/SearchSelect/BusinessUtils.ts +1732 -1732
- package/src/components/Business/SearchSelect/common.ts +53 -53
- package/src/components/Business/SearchSelect/index.md +1319 -1319
- package/src/components/Business/SearchSelect/index.tsx +55 -52
- package/src/components/Business/SearchSelect/utils.ts +100 -100
- package/src/components/Business/StateFlow/index.less +130 -130
- package/src/components/Business/StateFlow/index.md +60 -60
- package/src/components/Business/StateFlow/index.tsx +29 -29
- package/src/components/Business/TreeSearchSelect/index.md +154 -154
- package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
- package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
- package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
- package/src/components/Business/columnSettingTable/index.less +247 -247
- package/src/components/Business/columnSettingTable/index.md +357 -357
- package/src/components/Business/columnSettingTable/index.tsx +232 -232
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
- package/src/components/Business/columnSettingTable/utils.tsx +68 -68
- package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +86 -86
- package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
- package/src/components/Business/moreTreeTable/index.less +99 -99
- package/src/components/Business/moreTreeTable/index.md +448 -448
- package/src/components/Business/moreTreeTable/index.tsx +380 -380
- package/src/components/Business/moreTreeTable/utils.ts +126 -126
- package/src/components/Functional/AddSelect/helps.ts +14 -14
- package/src/components/Functional/AddSelect/index.less +367 -367
- package/src/components/Functional/AddSelect/index.md +155 -155
- package/src/components/Functional/AddSelect/index.tsx +1279 -1279
- package/src/components/Functional/BillEntry/index.less +371 -371
- package/src/components/Functional/BillEntry/index.md +39 -39
- package/src/components/Functional/BillEntry/index.tsx +772 -772
- package/src/components/Functional/DataImport/index.less +63 -63
- package/src/components/Functional/DataImport/index.md +44 -44
- package/src/components/Functional/DataImport/index.tsx +695 -695
- package/src/components/Functional/DataValidation/index.less +63 -63
- package/src/components/Functional/DataValidation/index.md +39 -39
- package/src/components/Functional/DataValidation/index.tsx +687 -687
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
- package/src/components/Functional/QueryMutipleInput/index.less +37 -37
- package/src/components/Functional/QueryMutipleInput/index.md +33 -33
- package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
- package/src/components/Functional/SearchSelect/index.less +115 -115
- package/src/components/Functional/SearchSelect/index.md +141 -141
- package/src/components/Functional/SearchSelect/index.tsx +858 -849
- package/src/components/Functional/SearchSelect/utils.ts +3 -3
- package/src/components/Functional/TreeSearchSelect/index.md +47 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +162 -162
- package/src/index.ts +34 -34
- package/src/plugin/TableColumnSetting/index.less +247 -247
- package/src/plugin/TableColumnSetting/index.md +50 -50
- package/src/plugin/TableColumnSetting/index.tsx +724 -724
- package/src/plugin/TableColumnSetting/utils.ts +19 -19
- package/src/styles/bsDefault.less +1912 -1912
- package/src/utils/CheckOneUser/index.md +39 -39
- package/src/utils/CheckOneUser/index.ts +51 -51
- package/src/utils/LocalstorageUtils.ts +95 -90
- package/src/utils/TableUtils.tsx +18 -18
- package/src/utils/checkUtils.ts +39 -39
- package/src/utils/enumConfig.ts +11 -11
- package/src/utils/getFormMode.js +12 -12
- package/src/utils/index.ts +3 -3
- package/src/utils/requestUtils.ts +34 -34
- package/src/utils/serialize.js +7 -7
- package/src/utils/utils.ts +183 -183
- package/tsconfig.json +29 -29
- package/typings.d.ts +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, Popover, Card, Avatar,
|
|
2
|
+
import { message, Menu, Space, Dropdown, Tooltip, Button, Checkbox, Input, Modal, Select, Form, Divider, Spin, Table, TreeSelect, Tag, Image, Popover, Card, Avatar, InputNumber, Typography, Alert, Anchor, Breadcrumb, Drawer as Drawer$1, List, Tree, Row, Col, Tabs, Affix } from 'antd';
|
|
3
3
|
import _, { omit, debounce, cloneDeep as cloneDeep$1, throttle, isEmpty } from 'lodash';
|
|
4
4
|
import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef, useMemo, Component, useLayoutEffect, createRef } from 'react';
|
|
5
5
|
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
@@ -135,6 +135,33 @@ axios.interceptors.request.use(function (config) {
|
|
|
135
135
|
return config;
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
+
function _iterableToArrayLimit(arr, i) {
|
|
139
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
140
|
+
if (null != _i) {
|
|
141
|
+
var _s,
|
|
142
|
+
_e,
|
|
143
|
+
_x,
|
|
144
|
+
_r,
|
|
145
|
+
_arr = [],
|
|
146
|
+
_n = !0,
|
|
147
|
+
_d = !1;
|
|
148
|
+
try {
|
|
149
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
150
|
+
if (Object(_i) !== _i) return;
|
|
151
|
+
_n = !1;
|
|
152
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
153
|
+
} catch (err) {
|
|
154
|
+
_d = !0, _e = err;
|
|
155
|
+
} finally {
|
|
156
|
+
try {
|
|
157
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
158
|
+
} finally {
|
|
159
|
+
if (_d) throw _e;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return _arr;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
138
165
|
function ownKeys(object, enumerableOnly) {
|
|
139
166
|
var keys = Object.keys(object);
|
|
140
167
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -291,14 +318,9 @@ function _regeneratorRuntime() {
|
|
|
291
318
|
};
|
|
292
319
|
}
|
|
293
320
|
function maybeInvokeDelegate(delegate, context) {
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
298
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
299
|
-
}
|
|
300
|
-
return ContinueSentinel;
|
|
301
|
-
}
|
|
321
|
+
var methodName = context.method,
|
|
322
|
+
method = delegate.iterator[methodName];
|
|
323
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
302
324
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
303
325
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
304
326
|
var info = record.arg;
|
|
@@ -512,7 +534,7 @@ function _defineProperties(target, props) {
|
|
|
512
534
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
513
535
|
descriptor.configurable = true;
|
|
514
536
|
if ("value" in descriptor) descriptor.writable = true;
|
|
515
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
537
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
516
538
|
}
|
|
517
539
|
}
|
|
518
540
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -524,6 +546,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
524
546
|
return Constructor;
|
|
525
547
|
}
|
|
526
548
|
function _defineProperty(obj, key, value) {
|
|
549
|
+
key = _toPropertyKey(key);
|
|
527
550
|
if (key in obj) {
|
|
528
551
|
Object.defineProperty(obj, key, {
|
|
529
552
|
value: value,
|
|
@@ -652,30 +675,6 @@ function _arrayWithHoles(arr) {
|
|
|
652
675
|
function _iterableToArray(iter) {
|
|
653
676
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
654
677
|
}
|
|
655
|
-
function _iterableToArrayLimit(arr, i) {
|
|
656
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
657
|
-
if (_i == null) return;
|
|
658
|
-
var _arr = [];
|
|
659
|
-
var _n = true;
|
|
660
|
-
var _d = false;
|
|
661
|
-
var _s, _e;
|
|
662
|
-
try {
|
|
663
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
664
|
-
_arr.push(_s.value);
|
|
665
|
-
if (i && _arr.length === i) break;
|
|
666
|
-
}
|
|
667
|
-
} catch (err) {
|
|
668
|
-
_d = true;
|
|
669
|
-
_e = err;
|
|
670
|
-
} finally {
|
|
671
|
-
try {
|
|
672
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
673
|
-
} finally {
|
|
674
|
-
if (_d) throw _e;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
return _arr;
|
|
678
|
-
}
|
|
679
678
|
function _unsupportedIterableToArray(o, minLen) {
|
|
680
679
|
if (!o) return;
|
|
681
680
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -695,6 +694,20 @@ function _nonIterableSpread() {
|
|
|
695
694
|
function _nonIterableRest() {
|
|
696
695
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
697
696
|
}
|
|
697
|
+
function _toPrimitive(input, hint) {
|
|
698
|
+
if (typeof input !== "object" || input === null) return input;
|
|
699
|
+
var prim = input[Symbol.toPrimitive];
|
|
700
|
+
if (prim !== undefined) {
|
|
701
|
+
var res = prim.call(input, hint || "default");
|
|
702
|
+
if (typeof res !== "object") return res;
|
|
703
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
704
|
+
}
|
|
705
|
+
return (hint === "string" ? String : Number)(input);
|
|
706
|
+
}
|
|
707
|
+
function _toPropertyKey(arg) {
|
|
708
|
+
var key = _toPrimitive(arg, "string");
|
|
709
|
+
return typeof key === "symbol" ? key : String(key);
|
|
710
|
+
}
|
|
698
711
|
|
|
699
712
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
700
713
|
var errorMessage = _objectSpread2({
|
|
@@ -2062,7 +2075,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2062
2075
|
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
2063
2076
|
_props$getPopupContai = props.getPopupContainer,
|
|
2064
2077
|
_getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
|
|
2065
|
-
fieldComponent = props.fieldComponent
|
|
2078
|
+
fieldComponent = props.fieldComponent,
|
|
2079
|
+
selectBusinessType = props.selectBusinessType;
|
|
2066
2080
|
var _ref = requestConfig || {},
|
|
2067
2081
|
url = _ref.url,
|
|
2068
2082
|
otherParams = _ref.otherParams,
|
|
@@ -2266,84 +2280,85 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2266
2280
|
});
|
|
2267
2281
|
}
|
|
2268
2282
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
2269
|
-
|
|
2283
|
+
var _loop = function _loop() {
|
|
2270
2284
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2297
|
-
}
|
|
2298
|
-
});
|
|
2299
|
-
delete params[key];
|
|
2300
|
-
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2301
|
-
var _dataParams4 = key.split('*checkBox*');
|
|
2302
|
-
if (element) {
|
|
2303
|
-
params[_dataParams4[0]] = 0;
|
|
2285
|
+
var element = params[key];
|
|
2286
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
2287
|
+
var dataParams = key.split('*number*');
|
|
2288
|
+
dataParams.forEach(function (value, index) {
|
|
2289
|
+
params[value] = element[index];
|
|
2290
|
+
});
|
|
2291
|
+
delete params[key];
|
|
2292
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
2293
|
+
var _dataParams = key.split('*address*');
|
|
2294
|
+
_dataParams.forEach(function (value, index) {
|
|
2295
|
+
params[value] = element.PCDCode[index];
|
|
2296
|
+
});
|
|
2297
|
+
delete params[key];
|
|
2298
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
2299
|
+
var _dataParams2 = key.split('*costType*');
|
|
2300
|
+
// eslint-disable-next-line prefer-destructuring
|
|
2301
|
+
params[_dataParams2[0]] = element[1];
|
|
2302
|
+
delete params[key];
|
|
2303
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
2304
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
2305
|
+
_dataParams3.forEach(function (value, index) {
|
|
2306
|
+
if (index === 0) {
|
|
2307
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
2308
|
+
} else {
|
|
2309
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2304
2310
|
}
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
_dataParams7.forEach(function (value, index) {
|
|
2323
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2324
|
-
});
|
|
2325
|
-
delete params[key];
|
|
2326
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2327
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2328
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2329
|
-
if (params[key][0] === 'range') {
|
|
2330
|
-
if (params[key][1][0]) {
|
|
2331
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2332
|
-
}
|
|
2333
|
-
if (params[key][1][1]) {
|
|
2334
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2335
|
-
}
|
|
2311
|
+
});
|
|
2312
|
+
delete params[key];
|
|
2313
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2314
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
2315
|
+
if (element) {
|
|
2316
|
+
params[_dataParams4[0]] = 0;
|
|
2317
|
+
}
|
|
2318
|
+
delete params[key];
|
|
2319
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
2320
|
+
var _dataParams5 = key.split('*cascader*');
|
|
2321
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
2322
|
+
delete params[key];
|
|
2323
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
2324
|
+
var _dataParams6 = key.split('*date*');
|
|
2325
|
+
_dataParams6.forEach(function (value, index) {
|
|
2326
|
+
if (index === 0) {
|
|
2327
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2336
2328
|
} else {
|
|
2337
|
-
params[
|
|
2329
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
delete params[key];
|
|
2333
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
2334
|
+
var _dataParams7 = key.split('*');
|
|
2335
|
+
_dataParams7.forEach(function (value, index) {
|
|
2336
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2337
|
+
});
|
|
2338
|
+
delete params[key];
|
|
2339
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2340
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2341
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2342
|
+
if (params[key][0] === 'range') {
|
|
2343
|
+
if (params[key][1][0]) {
|
|
2344
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2345
|
+
}
|
|
2346
|
+
if (params[key][1][1]) {
|
|
2347
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2338
2348
|
}
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
params[key] = element.join(',');
|
|
2342
|
-
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2343
|
-
delete params[key];
|
|
2349
|
+
} else {
|
|
2350
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
2344
2351
|
}
|
|
2345
|
-
|
|
2352
|
+
delete params[key];
|
|
2353
|
+
} else if (Array.isArray(element)) {
|
|
2354
|
+
params[key] = element.join(',');
|
|
2355
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2356
|
+
delete params[key];
|
|
2357
|
+
}
|
|
2346
2358
|
}
|
|
2359
|
+
};
|
|
2360
|
+
for (var key in params) {
|
|
2361
|
+
_loop();
|
|
2347
2362
|
}
|
|
2348
2363
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
2349
2364
|
pageSize: pageSize,
|
|
@@ -2467,6 +2482,13 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2467
2482
|
useEffect(function () {
|
|
2468
2483
|
makeUniqueValue();
|
|
2469
2484
|
}, [resultSourceKey]);
|
|
2485
|
+
useEffect(function () {
|
|
2486
|
+
if (init) {
|
|
2487
|
+
setItems([]);
|
|
2488
|
+
setItemsTotal(0);
|
|
2489
|
+
run('init');
|
|
2490
|
+
}
|
|
2491
|
+
}, [selectBusinessType]);
|
|
2470
2492
|
var showModal = function showModal() {
|
|
2471
2493
|
getData({
|
|
2472
2494
|
pageSize: tableInitPageSize,
|
|
@@ -9559,58 +9581,59 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
|
|
|
9559
9581
|
* @returns 返回处理后的查询参数
|
|
9560
9582
|
*/
|
|
9561
9583
|
function queryParams(params, flag) {
|
|
9562
|
-
|
|
9584
|
+
var _loop = function _loop() {
|
|
9563
9585
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9588
|
-
} else {
|
|
9589
|
-
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9590
|
-
}
|
|
9591
|
-
});
|
|
9592
|
-
delete params[key];
|
|
9593
|
-
} else if (element && key.indexOf('*') >= 0) {
|
|
9594
|
-
var _dataParams4 = key.split('*');
|
|
9595
|
-
_dataParams4.forEach(function (value, index) {
|
|
9596
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9597
|
-
});
|
|
9598
|
-
delete params[key];
|
|
9599
|
-
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9600
|
-
var _dataParams5 = key.split('_likeIn_');
|
|
9601
|
-
if (element.indexOf(',') >= 0) {
|
|
9602
|
-
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9603
|
-
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9586
|
+
var element = params[key];
|
|
9587
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
9588
|
+
var dataParams = key.split('*number*');
|
|
9589
|
+
dataParams.forEach(function (value, index) {
|
|
9590
|
+
params[value] = element[index];
|
|
9591
|
+
});
|
|
9592
|
+
delete params[key];
|
|
9593
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
9594
|
+
var _dataParams = key.split('*address*');
|
|
9595
|
+
_dataParams.forEach(function (value, index) {
|
|
9596
|
+
params[value] = element.PCDCode[index];
|
|
9597
|
+
});
|
|
9598
|
+
delete params[key];
|
|
9599
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
9600
|
+
var _dataParams2 = key.split('*costType*');
|
|
9601
|
+
// eslint-disable-next-line prefer-destructuring
|
|
9602
|
+
params[_dataParams2[0]] = element[1];
|
|
9603
|
+
delete params[key];
|
|
9604
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
9605
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
9606
|
+
_dataParams3.forEach(function (value, index) {
|
|
9607
|
+
if (index === 0) {
|
|
9608
|
+
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9604
9609
|
} else {
|
|
9605
|
-
params[
|
|
9606
|
-
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9610
|
+
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9607
9611
|
}
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9612
|
+
});
|
|
9613
|
+
delete params[key];
|
|
9614
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
9615
|
+
var _dataParams4 = key.split('*');
|
|
9616
|
+
_dataParams4.forEach(function (value, index) {
|
|
9617
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9618
|
+
});
|
|
9619
|
+
delete params[key];
|
|
9620
|
+
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9621
|
+
var _dataParams5 = key.split('_likeIn_');
|
|
9622
|
+
if (element.indexOf(',') >= 0) {
|
|
9623
|
+
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9624
|
+
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9625
|
+
} else {
|
|
9626
|
+
params["qp-".concat(_dataParams5[0], "-like")] = element;
|
|
9627
|
+
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9611
9628
|
}
|
|
9612
|
-
|
|
9629
|
+
delete params[key];
|
|
9630
|
+
} else if (Array.isArray(element)) {
|
|
9631
|
+
params[key] = element.join(',');
|
|
9632
|
+
}
|
|
9613
9633
|
}
|
|
9634
|
+
};
|
|
9635
|
+
for (var key in params) {
|
|
9636
|
+
_loop();
|
|
9614
9637
|
}
|
|
9615
9638
|
return flag ? params : qs.stringify(params);
|
|
9616
9639
|
}
|
|
@@ -10140,76 +10163,74 @@ var AddSelect = function AddSelect(props) {
|
|
|
10140
10163
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
10141
10164
|
var result;
|
|
10142
10165
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10143
|
-
while (1) {
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
_context.next = 3;
|
|
10150
|
-
break;
|
|
10151
|
-
}
|
|
10152
|
-
message.warning('相同skc配码不可设置相同哦');
|
|
10153
|
-
return _context.abrupt("return", false);
|
|
10154
|
-
case 3:
|
|
10155
|
-
if (!(bType == 'spu')) {
|
|
10156
|
-
_context.next = 26;
|
|
10157
|
-
break;
|
|
10158
|
-
}
|
|
10159
|
-
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10160
|
-
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10161
|
-
}))) {
|
|
10162
|
-
_context.next = 7;
|
|
10163
|
-
break;
|
|
10164
|
-
}
|
|
10165
|
-
message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10166
|
-
return _context.abrupt("return", false);
|
|
10167
|
-
case 7:
|
|
10168
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10169
|
-
_context.next = 10;
|
|
10170
|
-
break;
|
|
10171
|
-
}
|
|
10172
|
-
message.warning('请先选择颜色!');
|
|
10173
|
-
return _context.abrupt("return", false);
|
|
10174
|
-
case 10:
|
|
10175
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10176
|
-
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10177
|
-
}))) {
|
|
10178
|
-
_context.next = 13;
|
|
10179
|
-
break;
|
|
10180
|
-
}
|
|
10181
|
-
message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10182
|
-
return _context.abrupt("return", false);
|
|
10183
|
-
case 13:
|
|
10184
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10185
|
-
_context.next = 26;
|
|
10186
|
-
break;
|
|
10187
|
-
}
|
|
10188
|
-
result = true;
|
|
10189
|
-
_context.prev = 15;
|
|
10190
|
-
_context.next = 18;
|
|
10191
|
-
return checkSpuMatchCode({
|
|
10192
|
-
skcCode: recordItem[recordKey],
|
|
10193
|
-
matchingCode: changeValue,
|
|
10194
|
-
ext1: recordItem.colorName
|
|
10195
|
-
});
|
|
10196
|
-
case 18:
|
|
10197
|
-
result = _context.sent;
|
|
10198
|
-
result = true;
|
|
10199
|
-
_context.next = 25;
|
|
10166
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10167
|
+
case 0:
|
|
10168
|
+
if (!(bType == 'skc' && tList.some(function (i) {
|
|
10169
|
+
return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
|
|
10170
|
+
}))) {
|
|
10171
|
+
_context.next = 3;
|
|
10200
10172
|
break;
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10173
|
+
}
|
|
10174
|
+
message.warning('相同skc配码不可设置相同哦');
|
|
10175
|
+
return _context.abrupt("return", false);
|
|
10176
|
+
case 3:
|
|
10177
|
+
if (!(bType == 'spu')) {
|
|
10178
|
+
_context.next = 26;
|
|
10179
|
+
break;
|
|
10180
|
+
}
|
|
10181
|
+
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10182
|
+
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10183
|
+
}))) {
|
|
10184
|
+
_context.next = 7;
|
|
10185
|
+
break;
|
|
10186
|
+
}
|
|
10187
|
+
message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10188
|
+
return _context.abrupt("return", false);
|
|
10189
|
+
case 7:
|
|
10190
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10191
|
+
_context.next = 10;
|
|
10192
|
+
break;
|
|
10193
|
+
}
|
|
10194
|
+
message.warning('请先选择颜色!');
|
|
10195
|
+
return _context.abrupt("return", false);
|
|
10196
|
+
case 10:
|
|
10197
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10198
|
+
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10199
|
+
}))) {
|
|
10200
|
+
_context.next = 13;
|
|
10201
|
+
break;
|
|
10202
|
+
}
|
|
10203
|
+
message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10204
|
+
return _context.abrupt("return", false);
|
|
10205
|
+
case 13:
|
|
10206
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10207
|
+
_context.next = 26;
|
|
10208
|
+
break;
|
|
10209
|
+
}
|
|
10210
|
+
result = true;
|
|
10211
|
+
_context.prev = 15;
|
|
10212
|
+
_context.next = 18;
|
|
10213
|
+
return checkSpuMatchCode({
|
|
10214
|
+
skcCode: recordItem[recordKey],
|
|
10215
|
+
matchingCode: changeValue,
|
|
10216
|
+
ext1: recordItem.colorName
|
|
10217
|
+
});
|
|
10218
|
+
case 18:
|
|
10219
|
+
result = _context.sent;
|
|
10220
|
+
result = true;
|
|
10221
|
+
_context.next = 25;
|
|
10222
|
+
break;
|
|
10223
|
+
case 22:
|
|
10224
|
+
_context.prev = 22;
|
|
10225
|
+
_context.t0 = _context["catch"](15);
|
|
10226
|
+
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10227
|
+
case 25:
|
|
10228
|
+
return _context.abrupt("return", result);
|
|
10229
|
+
case 26:
|
|
10230
|
+
return _context.abrupt("return", true);
|
|
10231
|
+
case 27:
|
|
10232
|
+
case "end":
|
|
10233
|
+
return _context.stop();
|
|
10213
10234
|
}
|
|
10214
10235
|
}, _callee, null, [[15, 22]]);
|
|
10215
10236
|
}));
|
|
@@ -10401,29 +10422,27 @@ var AddSelect = function AddSelect(props) {
|
|
|
10401
10422
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
10402
10423
|
var isConformToTheRules, newPopValue;
|
|
10403
10424
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10404
|
-
while (1) {
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10425
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10426
|
+
case 0:
|
|
10427
|
+
_context2.next = 2;
|
|
10428
|
+
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
10429
|
+
case 2:
|
|
10430
|
+
isConformToTheRules = _context2.sent;
|
|
10431
|
+
if (isConformToTheRules) {
|
|
10432
|
+
record[item.dataIndex] = value;
|
|
10433
|
+
} else {
|
|
10434
|
+
record[item.dataIndex] = null;
|
|
10435
|
+
}
|
|
10436
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10437
|
+
if (innerIndex == index) {
|
|
10438
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
10415
10439
|
}
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
setPopValue(newPopValue);
|
|
10423
|
-
case 6:
|
|
10424
|
-
case "end":
|
|
10425
|
-
return _context2.stop();
|
|
10426
|
-
}
|
|
10440
|
+
return i;
|
|
10441
|
+
});
|
|
10442
|
+
setPopValue(newPopValue);
|
|
10443
|
+
case 6:
|
|
10444
|
+
case "end":
|
|
10445
|
+
return _context2.stop();
|
|
10427
10446
|
}
|
|
10428
10447
|
}, _callee2);
|
|
10429
10448
|
}));
|
|
@@ -10483,84 +10502,85 @@ var AddSelect = function AddSelect(props) {
|
|
|
10483
10502
|
});
|
|
10484
10503
|
}
|
|
10485
10504
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
10486
|
-
|
|
10505
|
+
var _loop = function _loop() {
|
|
10487
10506
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10514
|
-
}
|
|
10515
|
-
});
|
|
10516
|
-
delete params[key];
|
|
10517
|
-
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
10518
|
-
var _dataParams4 = key.split('*checkBox*');
|
|
10519
|
-
if (element) {
|
|
10520
|
-
params[_dataParams4[0]] = 0;
|
|
10507
|
+
var element = params[key];
|
|
10508
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
10509
|
+
var dataParams = key.split('*number*');
|
|
10510
|
+
dataParams.forEach(function (value, index) {
|
|
10511
|
+
params[value] = element[index];
|
|
10512
|
+
});
|
|
10513
|
+
delete params[key];
|
|
10514
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
10515
|
+
var _dataParams = key.split('*address*');
|
|
10516
|
+
_dataParams.forEach(function (value, index) {
|
|
10517
|
+
params[value] = element.PCDCode[index];
|
|
10518
|
+
});
|
|
10519
|
+
delete params[key];
|
|
10520
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
10521
|
+
var _dataParams2 = key.split('*costType*');
|
|
10522
|
+
// eslint-disable-next-line prefer-destructuring
|
|
10523
|
+
params[_dataParams2[0]] = element[1];
|
|
10524
|
+
delete params[key];
|
|
10525
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
10526
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
10527
|
+
_dataParams3.forEach(function (value, index) {
|
|
10528
|
+
if (index === 0) {
|
|
10529
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
10530
|
+
} else {
|
|
10531
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10521
10532
|
}
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
_dataParams7.forEach(function (value, index) {
|
|
10540
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10541
|
-
});
|
|
10542
|
-
delete params[key];
|
|
10543
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10544
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10545
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10546
|
-
if (params[key][0] === 'range') {
|
|
10547
|
-
if (params[key][1][0]) {
|
|
10548
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10549
|
-
}
|
|
10550
|
-
if (params[key][1][1]) {
|
|
10551
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10552
|
-
}
|
|
10533
|
+
});
|
|
10534
|
+
delete params[key];
|
|
10535
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
10536
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
10537
|
+
if (element) {
|
|
10538
|
+
params[_dataParams4[0]] = 0;
|
|
10539
|
+
}
|
|
10540
|
+
delete params[key];
|
|
10541
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
10542
|
+
var _dataParams5 = key.split('*cascader*');
|
|
10543
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
10544
|
+
delete params[key];
|
|
10545
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
10546
|
+
var _dataParams6 = key.split('*date*');
|
|
10547
|
+
_dataParams6.forEach(function (value, index) {
|
|
10548
|
+
if (index === 0) {
|
|
10549
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10553
10550
|
} else {
|
|
10554
|
-
params[
|
|
10551
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10555
10552
|
}
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10553
|
+
});
|
|
10554
|
+
delete params[key];
|
|
10555
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
10556
|
+
var _dataParams7 = key.split('*');
|
|
10557
|
+
_dataParams7.forEach(function (value, index) {
|
|
10558
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10559
|
+
});
|
|
10560
|
+
delete params[key];
|
|
10561
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10562
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10563
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10564
|
+
if (params[key][0] === 'range') {
|
|
10565
|
+
if (params[key][1][0]) {
|
|
10566
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10567
|
+
}
|
|
10568
|
+
if (params[key][1][1]) {
|
|
10569
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10570
|
+
}
|
|
10571
|
+
} else {
|
|
10572
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
10561
10573
|
}
|
|
10562
|
-
|
|
10574
|
+
delete params[key];
|
|
10575
|
+
} else if (Array.isArray(element)) {
|
|
10576
|
+
params[key] = element.join(',');
|
|
10577
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
10578
|
+
delete params[key];
|
|
10579
|
+
}
|
|
10563
10580
|
}
|
|
10581
|
+
};
|
|
10582
|
+
for (var key in params) {
|
|
10583
|
+
_loop();
|
|
10564
10584
|
}
|
|
10565
10585
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
10566
10586
|
pageSize: pageSize,
|
|
@@ -10660,8 +10680,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
10660
10680
|
pageSize: 5000,
|
|
10661
10681
|
currentPage: 1
|
|
10662
10682
|
})]).then(function (x) {
|
|
10663
|
-
formatSource(x, 0,
|
|
10664
|
-
formatTreeDataSource(x, 1,
|
|
10683
|
+
formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
|
|
10684
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm);
|
|
10665
10685
|
});
|
|
10666
10686
|
}
|
|
10667
10687
|
if (businessType == 'skc') {
|
|
@@ -12015,72 +12035,70 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
12015
12035
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
12016
12036
|
var canEntryObject, _canEntryObject$error, messageInfo;
|
|
12017
12037
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
12018
|
-
while (1) {
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
messageInfo
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
message.success(initSuccessMessage);
|
|
12073
|
-
}
|
|
12038
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12039
|
+
case 0:
|
|
12040
|
+
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
12041
|
+
_context.next = 3;
|
|
12042
|
+
break;
|
|
12043
|
+
}
|
|
12044
|
+
message.warning('至少录入一条数据');
|
|
12045
|
+
return _context.abrupt("return");
|
|
12046
|
+
case 3:
|
|
12047
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12048
|
+
return d.skuCode && d.name;
|
|
12049
|
+
})) {
|
|
12050
|
+
_context.next = 6;
|
|
12051
|
+
break;
|
|
12052
|
+
}
|
|
12053
|
+
message.warning('请选择商品!');
|
|
12054
|
+
return _context.abrupt("return");
|
|
12055
|
+
case 6:
|
|
12056
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12057
|
+
return d.count;
|
|
12058
|
+
})) {
|
|
12059
|
+
_context.next = 9;
|
|
12060
|
+
break;
|
|
12061
|
+
}
|
|
12062
|
+
message.warning('请填写商品数量!');
|
|
12063
|
+
return _context.abrupt("return");
|
|
12064
|
+
case 9:
|
|
12065
|
+
_context.next = 11;
|
|
12066
|
+
return isSkuCanEntry(data);
|
|
12067
|
+
case 11:
|
|
12068
|
+
canEntryObject = _context.sent;
|
|
12069
|
+
if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
|
|
12070
|
+
_context.next = 16;
|
|
12071
|
+
break;
|
|
12072
|
+
}
|
|
12073
|
+
messageInfo = (canEntryObject === null || canEntryObject === void 0 ? void 0 : (_canEntryObject$error = canEntryObject.errorList) === null || _canEntryObject$error === void 0 ? void 0 : _canEntryObject$error.length) && (canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.errorList.map(function (i) {
|
|
12074
|
+
return /*#__PURE__*/React.createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
|
|
12075
|
+
}));
|
|
12076
|
+
messageInfo && message.warning({
|
|
12077
|
+
content: messageInfo,
|
|
12078
|
+
duration: 6
|
|
12079
|
+
});
|
|
12080
|
+
return _context.abrupt("return");
|
|
12081
|
+
case 16:
|
|
12082
|
+
setLoading(true);
|
|
12083
|
+
onSaveCallback(data).then(function (res) {
|
|
12084
|
+
{
|
|
12085
|
+
var _Object$keys;
|
|
12086
|
+
var initSuccessMessage = '保存成功';
|
|
12087
|
+
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
12088
|
+
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
12089
|
+
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
12090
|
+
} else {
|
|
12091
|
+
message.success(initSuccessMessage);
|
|
12074
12092
|
}
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12093
|
+
}
|
|
12094
|
+
setLoading(false);
|
|
12095
|
+
}).catch(function (Error) {
|
|
12096
|
+
message.error(Error);
|
|
12097
|
+
setLoading(false);
|
|
12098
|
+
});
|
|
12099
|
+
case 18:
|
|
12100
|
+
case "end":
|
|
12101
|
+
return _context.stop();
|
|
12084
12102
|
}
|
|
12085
12103
|
}, _callee);
|
|
12086
12104
|
}));
|
|
@@ -14213,7 +14231,7 @@ var BusinessSearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
14213
14231
|
needModalTable: needModalTable,
|
|
14214
14232
|
modalTableProps: modalTableProps
|
|
14215
14233
|
});
|
|
14216
|
-
}, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
|
|
14234
|
+
}, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
|
|
14217
14235
|
useImperativeHandle(ref, function () {
|
|
14218
14236
|
return {
|
|
14219
14237
|
getRef: function getRef() {
|
|
@@ -14235,9 +14253,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React.memo(BusinessSearchSelect, funct
|
|
|
14235
14253
|
if (props && props.disabled !== nextProps.disabled) {
|
|
14236
14254
|
return false;
|
|
14237
14255
|
}
|
|
14256
|
+
if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
|
|
14257
|
+
return false;
|
|
14258
|
+
}
|
|
14238
14259
|
return true;
|
|
14239
14260
|
});
|
|
14240
14261
|
|
|
14262
|
+
// import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
14241
14263
|
function handleSelectColumn(c, parentProps) {
|
|
14242
14264
|
var result = c;
|
|
14243
14265
|
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
|
|
@@ -14249,7 +14271,7 @@ function handleSelectColumn(c, parentProps) {
|
|
|
14249
14271
|
return !exceptColumns.includes(i.dataIndex);
|
|
14250
14272
|
});
|
|
14251
14273
|
}
|
|
14252
|
-
// 追加
|
|
14274
|
+
// 追加(最好不用这个,当组件不固定时候会有影响)
|
|
14253
14275
|
if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
|
|
14254
14276
|
additionColumns.forEach(function (i) {
|
|
14255
14277
|
result.splice(i.position, 0, i.column);
|
|
@@ -14262,6 +14284,7 @@ function handleSelectColumn(c, parentProps) {
|
|
|
14262
14284
|
return result;
|
|
14263
14285
|
}
|
|
14264
14286
|
var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
14287
|
+
var _parProps$requestConf, _parProps$requestConf2;
|
|
14265
14288
|
var selectProps = {
|
|
14266
14289
|
mode: 'multiple'
|
|
14267
14290
|
};
|
|
@@ -14274,6 +14297,19 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14274
14297
|
title: 'SKU编码',
|
|
14275
14298
|
width: 150,
|
|
14276
14299
|
dataIndex: 'skuCode'
|
|
14300
|
+
}, {
|
|
14301
|
+
title: '商品条码',
|
|
14302
|
+
width: 100,
|
|
14303
|
+
ellipsis: {
|
|
14304
|
+
showTitle: false
|
|
14305
|
+
},
|
|
14306
|
+
dataIndex: 'itemEancode',
|
|
14307
|
+
render: function render(text) {
|
|
14308
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14309
|
+
placement: "topLeft",
|
|
14310
|
+
title: text
|
|
14311
|
+
}, text);
|
|
14312
|
+
}
|
|
14277
14313
|
}, {
|
|
14278
14314
|
title: 'SKU名称',
|
|
14279
14315
|
width: 200,
|
|
@@ -14361,11 +14397,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14361
14397
|
requestConfig: _objectSpread2({
|
|
14362
14398
|
url: "/items/sku/pager/v2",
|
|
14363
14399
|
filter: 'qp-name-like',
|
|
14364
|
-
otherParams: {
|
|
14400
|
+
otherParams: _objectSpread2({
|
|
14365
14401
|
'qp-combination-eq': false,
|
|
14366
14402
|
'qp-approveStatus-eq': 1,
|
|
14367
14403
|
'qp-status-eq': 1
|
|
14368
|
-
},
|
|
14404
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
|
|
14369
14405
|
mappingTextField: 'name',
|
|
14370
14406
|
mappingValueField: 'skuCode'
|
|
14371
14407
|
}, parProps.requestConfig),
|
|
@@ -14387,6 +14423,13 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14387
14423
|
}, {
|
|
14388
14424
|
name: 'qp-skuName-like',
|
|
14389
14425
|
label: 'SKU名称'
|
|
14426
|
+
}, {
|
|
14427
|
+
name: 'qp-code-in',
|
|
14428
|
+
label: '商品条码',
|
|
14429
|
+
field: {
|
|
14430
|
+
type: 'multipleQueryInput',
|
|
14431
|
+
props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
|
|
14432
|
+
}
|
|
14390
14433
|
}, {
|
|
14391
14434
|
name: 'qp-brandId-in',
|
|
14392
14435
|
type: 'select',
|
|
@@ -14467,12 +14510,12 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14467
14510
|
}));
|
|
14468
14511
|
}
|
|
14469
14512
|
}, {
|
|
14470
|
-
title: '
|
|
14513
|
+
title: '商品条码',
|
|
14471
14514
|
width: 100,
|
|
14472
14515
|
ellipsis: {
|
|
14473
14516
|
showTitle: false
|
|
14474
14517
|
},
|
|
14475
|
-
dataIndex: '
|
|
14518
|
+
dataIndex: 'itemEancode',
|
|
14476
14519
|
render: function render(text) {
|
|
14477
14520
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14478
14521
|
placement: "topLeft",
|
|
@@ -14578,6 +14621,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14578
14621
|
})));
|
|
14579
14622
|
};
|
|
14580
14623
|
var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
14624
|
+
var _parProps$requestConf3;
|
|
14581
14625
|
var selectProps = {
|
|
14582
14626
|
mode: 'multiple'
|
|
14583
14627
|
};
|
|
@@ -14655,9 +14699,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14655
14699
|
requestConfig: _objectSpread2({
|
|
14656
14700
|
url: "/items/skc/skcSelect",
|
|
14657
14701
|
filter: 'qp-name-like',
|
|
14658
|
-
otherParams: {
|
|
14702
|
+
otherParams: _objectSpread2({
|
|
14659
14703
|
'qp-skcStatus-eq': 1
|
|
14660
|
-
},
|
|
14704
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
|
|
14661
14705
|
mappingTextField: 'name',
|
|
14662
14706
|
mappingValueField: 'code'
|
|
14663
14707
|
}, parProps.requestConfig),
|
|
@@ -14857,6 +14901,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14857
14901
|
})));
|
|
14858
14902
|
};
|
|
14859
14903
|
var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
14904
|
+
var _parProps$requestConf4;
|
|
14860
14905
|
var selectProps = {
|
|
14861
14906
|
mode: 'multiple'
|
|
14862
14907
|
};
|
|
@@ -14943,11 +14988,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
14943
14988
|
requestConfig: _objectSpread2({
|
|
14944
14989
|
url: "/items/item",
|
|
14945
14990
|
filter: 'qp-itemCode,name-orGroup,like',
|
|
14946
|
-
otherParams: {
|
|
14991
|
+
otherParams: _objectSpread2({
|
|
14947
14992
|
'qp-approveStatus-eq': 1,
|
|
14948
14993
|
'qp-status-eq': 1,
|
|
14949
14994
|
sorter: 'desc-id'
|
|
14950
|
-
},
|
|
14995
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
|
|
14951
14996
|
mappingTextField: 'name',
|
|
14952
14997
|
mappingValueField: 'itemCode'
|
|
14953
14998
|
}, parProps.requestConfig),
|
|
@@ -15333,44 +15378,42 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
15333
15378
|
var _ctx$form;
|
|
15334
15379
|
var resData, coverData, data, dataList;
|
|
15335
15380
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15336
|
-
while (1) {
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
_context.next = 13;
|
|
15342
|
-
break;
|
|
15343
|
-
}
|
|
15344
|
-
data = resData.data;
|
|
15345
|
-
if (!remoteSource.converter) {
|
|
15346
|
-
_context.next = 9;
|
|
15347
|
-
break;
|
|
15348
|
-
}
|
|
15349
|
-
_context.next = 6;
|
|
15350
|
-
return remoteSource.converter({
|
|
15351
|
-
data: [data]
|
|
15352
|
-
});
|
|
15353
|
-
case 6:
|
|
15354
|
-
coverData = _context.sent;
|
|
15355
|
-
_context.next = 11;
|
|
15381
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15382
|
+
case 0:
|
|
15383
|
+
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
15384
|
+
if (!(resData.status === '0' || resData.code === '000000')) {
|
|
15385
|
+
_context.next = 13;
|
|
15356
15386
|
break;
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
}) || [];
|
|
15362
|
-
case 11:
|
|
15363
|
-
_context.next = 14;
|
|
15387
|
+
}
|
|
15388
|
+
data = resData.data;
|
|
15389
|
+
if (!remoteSource.converter) {
|
|
15390
|
+
_context.next = 9;
|
|
15364
15391
|
break;
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15392
|
+
}
|
|
15393
|
+
_context.next = 6;
|
|
15394
|
+
return remoteSource.converter({
|
|
15395
|
+
data: [data]
|
|
15396
|
+
});
|
|
15397
|
+
case 6:
|
|
15398
|
+
coverData = _context.sent;
|
|
15399
|
+
_context.next = 11;
|
|
15400
|
+
break;
|
|
15401
|
+
case 9:
|
|
15402
|
+
dataList = data && Array.isArray(data) ? data : data && [data] || [];
|
|
15403
|
+
coverData = dataList.length && dataList.map(function (ites) {
|
|
15404
|
+
return mapSearchTree(ites);
|
|
15405
|
+
}) || [];
|
|
15406
|
+
case 11:
|
|
15407
|
+
_context.next = 14;
|
|
15408
|
+
break;
|
|
15409
|
+
case 13:
|
|
15410
|
+
coverData = [];
|
|
15411
|
+
case 14:
|
|
15412
|
+
setTreeData(coverData);
|
|
15413
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
|
|
15414
|
+
case 16:
|
|
15415
|
+
case "end":
|
|
15416
|
+
return _context.stop();
|
|
15374
15417
|
}
|
|
15375
15418
|
}, _callee);
|
|
15376
15419
|
}));
|
|
@@ -17325,6 +17368,7 @@ styleInject(css_248z$e);
|
|
|
17325
17368
|
var _excluded$d = ["className", "style"];
|
|
17326
17369
|
var DragHandle$2 = SortableHandle(function () {
|
|
17327
17370
|
return /*#__PURE__*/React.createElement("img", {
|
|
17371
|
+
width: 25,
|
|
17328
17372
|
src: drag
|
|
17329
17373
|
});
|
|
17330
17374
|
});
|
|
@@ -17540,11 +17584,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17540
17584
|
}))
|
|
17541
17585
|
});
|
|
17542
17586
|
}
|
|
17587
|
+
},
|
|
17588
|
+
style: {
|
|
17589
|
+
display: 'inline-block',
|
|
17590
|
+
width: '24px',
|
|
17591
|
+
textAlign: 'center'
|
|
17543
17592
|
}
|
|
17544
17593
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
17545
17594
|
placement: "top",
|
|
17546
17595
|
title: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? '取消固定' : '固定列首'
|
|
17547
17596
|
}, /*#__PURE__*/React.createElement("img", {
|
|
17597
|
+
width: 18,
|
|
17548
17598
|
src: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? fixedLeftActive : fixedLeft
|
|
17549
17599
|
})));
|
|
17550
17600
|
}
|
|
@@ -17610,11 +17660,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17610
17660
|
}))
|
|
17611
17661
|
});
|
|
17612
17662
|
}
|
|
17663
|
+
},
|
|
17664
|
+
style: {
|
|
17665
|
+
display: 'inline-block',
|
|
17666
|
+
width: '24px',
|
|
17667
|
+
textAlign: 'center'
|
|
17613
17668
|
}
|
|
17614
17669
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
17615
17670
|
placement: "top",
|
|
17616
17671
|
title: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? '取消固定' : '固定列尾'
|
|
17617
17672
|
}, /*#__PURE__*/React.createElement("img", {
|
|
17673
|
+
width: 18,
|
|
17618
17674
|
src: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? fixedRightActive : fixedRight
|
|
17619
17675
|
})));
|
|
17620
17676
|
}
|
|
@@ -17640,6 +17696,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17640
17696
|
});
|
|
17641
17697
|
}
|
|
17642
17698
|
}, /*#__PURE__*/React.createElement("img", {
|
|
17699
|
+
width: 24,
|
|
17643
17700
|
src: close
|
|
17644
17701
|
}));
|
|
17645
17702
|
}
|
|
@@ -18049,6 +18106,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
18049
18106
|
var _excluded$e = ["className", "style"];
|
|
18050
18107
|
var DragHandle$3 = SortableHandle(function () {
|
|
18051
18108
|
return /*#__PURE__*/React.createElement("img", {
|
|
18109
|
+
width: 25,
|
|
18052
18110
|
src: drag
|
|
18053
18111
|
});
|
|
18054
18112
|
});
|
|
@@ -18217,6 +18275,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18217
18275
|
});
|
|
18218
18276
|
}
|
|
18219
18277
|
}, /*#__PURE__*/React.createElement("img", {
|
|
18278
|
+
width: 24,
|
|
18220
18279
|
src: close
|
|
18221
18280
|
}));
|
|
18222
18281
|
}
|
|
@@ -19472,21 +19531,19 @@ function _outLogin() {
|
|
|
19472
19531
|
_outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
19473
19532
|
var res;
|
|
19474
19533
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19475
|
-
while (1) {
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
return _context.stop();
|
|
19489
|
-
}
|
|
19534
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19535
|
+
case 0:
|
|
19536
|
+
_context.next = 2;
|
|
19537
|
+
return axios({
|
|
19538
|
+
url: '/user/web/loginOut',
|
|
19539
|
+
method: 'GET'
|
|
19540
|
+
});
|
|
19541
|
+
case 2:
|
|
19542
|
+
res = _context.sent;
|
|
19543
|
+
return _context.abrupt("return", res);
|
|
19544
|
+
case 4:
|
|
19545
|
+
case "end":
|
|
19546
|
+
return _context.stop();
|
|
19490
19547
|
}
|
|
19491
19548
|
}, _callee);
|
|
19492
19549
|
}));
|
|
@@ -19615,31 +19672,29 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19615
19672
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19616
19673
|
var sessionId;
|
|
19617
19674
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19618
|
-
while (1) {
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
|
|
19624
|
-
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19675
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19676
|
+
case 0:
|
|
19677
|
+
_context.next = 2;
|
|
19678
|
+
return getSessionId();
|
|
19679
|
+
case 2:
|
|
19680
|
+
sessionId = _context.sent;
|
|
19681
|
+
_context.next = 5;
|
|
19682
|
+
return outLogin({
|
|
19683
|
+
sessionId: sessionId
|
|
19684
|
+
});
|
|
19685
|
+
case 5:
|
|
19686
|
+
// @ts-ignore
|
|
19687
|
+
if (BUILD_TYPE) {
|
|
19688
|
+
message.success('退出登录成功');
|
|
19689
|
+
history.replace({
|
|
19690
|
+
pathname: '/user/login'
|
|
19628
19691
|
});
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
});
|
|
19636
|
-
} else {
|
|
19637
|
-
setLoginOutPath();
|
|
19638
|
-
}
|
|
19639
|
-
case 6:
|
|
19640
|
-
case "end":
|
|
19641
|
-
return _context.stop();
|
|
19642
|
-
}
|
|
19692
|
+
} else {
|
|
19693
|
+
setLoginOutPath();
|
|
19694
|
+
}
|
|
19695
|
+
case 6:
|
|
19696
|
+
case "end":
|
|
19697
|
+
return _context.stop();
|
|
19643
19698
|
}
|
|
19644
19699
|
}, _callee);
|
|
19645
19700
|
}));
|
|
@@ -21467,6 +21522,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
21467
21522
|
showSubMenu: isShow
|
|
21468
21523
|
});
|
|
21469
21524
|
}, 500);
|
|
21525
|
+
//设置tabs标签左右滚动
|
|
21470
21526
|
_this.setTabNavTransLate = function (num) {
|
|
21471
21527
|
var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
|
|
21472
21528
|
var globalTabsNav = (_document$getElementB = document.getElementById('globalTabs')) === null || _document$getElementB === void 0 ? void 0 : (_document$getElementB2 = _document$getElementB.getElementsByClassName('ant-tabs-nav-list')) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2[0];
|
|
@@ -22147,14 +22203,12 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
22147
22203
|
request: function () {
|
|
22148
22204
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
22149
22205
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22150
|
-
while (1) {
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
|
|
22154
|
-
|
|
22155
|
-
|
|
22156
|
-
return _context.stop();
|
|
22157
|
-
}
|
|
22206
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22207
|
+
case 0:
|
|
22208
|
+
return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
|
|
22209
|
+
case 1:
|
|
22210
|
+
case "end":
|
|
22211
|
+
return _context.stop();
|
|
22158
22212
|
}
|
|
22159
22213
|
}, _callee);
|
|
22160
22214
|
}));
|
|
@@ -29826,28 +29880,26 @@ var valueType = {
|
|
|
29826
29880
|
var getDynamicDict = /*#__PURE__*/function () {
|
|
29827
29881
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
|
|
29828
29882
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29829
|
-
while (1) {
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
|
|
29835
|
-
|
|
29836
|
-
|
|
29837
|
-
return
|
|
29838
|
-
|
|
29839
|
-
|
|
29840
|
-
|
|
29841
|
-
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29848
|
-
|
|
29849
|
-
return _context.stop();
|
|
29850
|
-
}
|
|
29883
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29884
|
+
case 0:
|
|
29885
|
+
_context.next = 2;
|
|
29886
|
+
return request$1({
|
|
29887
|
+
url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
|
|
29888
|
+
converter: function converter(_ref2) {
|
|
29889
|
+
var data = _ref2.data;
|
|
29890
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
29891
|
+
return {
|
|
29892
|
+
text: d.name,
|
|
29893
|
+
value: d.code || d.brandCode
|
|
29894
|
+
};
|
|
29895
|
+
});
|
|
29896
|
+
}
|
|
29897
|
+
});
|
|
29898
|
+
case 2:
|
|
29899
|
+
return _context.abrupt("return", _context.sent);
|
|
29900
|
+
case 3:
|
|
29901
|
+
case "end":
|
|
29902
|
+
return _context.stop();
|
|
29851
29903
|
}
|
|
29852
29904
|
}, _callee);
|
|
29853
29905
|
}));
|
|
@@ -29897,55 +29949,53 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29897
29949
|
useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29898
29950
|
var _ref$current, source;
|
|
29899
29951
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29900
|
-
while (1) {
|
|
29901
|
-
|
|
29902
|
-
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
|
|
29906
|
-
|
|
29907
|
-
|
|
29908
|
-
|
|
29909
|
-
|
|
29910
|
-
};
|
|
29911
|
-
}
|
|
29912
|
-
return prev;
|
|
29913
|
-
});
|
|
29914
|
-
case 2:
|
|
29915
|
-
if (!record.dictionaryCode) {
|
|
29916
|
-
_context.next = 17;
|
|
29917
|
-
break;
|
|
29918
|
-
}
|
|
29919
|
-
if (!(record.choiceType == 20)) {
|
|
29920
|
-
_context.next = 7;
|
|
29921
|
-
break;
|
|
29952
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29953
|
+
case 0:
|
|
29954
|
+
_context.next = 2;
|
|
29955
|
+
return setIsShowAndType(function (prev) {
|
|
29956
|
+
if (record.inputType === 20 || record.inputType === 30) {
|
|
29957
|
+
return {
|
|
29958
|
+
isShow: true,
|
|
29959
|
+
singleOrMultiple: record.inputType,
|
|
29960
|
+
type: record.choiceType
|
|
29961
|
+
};
|
|
29922
29962
|
}
|
|
29923
|
-
|
|
29924
|
-
|
|
29963
|
+
return prev;
|
|
29964
|
+
});
|
|
29965
|
+
case 2:
|
|
29966
|
+
if (!record.dictionaryCode) {
|
|
29967
|
+
_context.next = 17;
|
|
29925
29968
|
break;
|
|
29926
|
-
|
|
29927
|
-
|
|
29928
|
-
|
|
29929
|
-
break;
|
|
29930
|
-
}
|
|
29931
|
-
_context.next = 10;
|
|
29932
|
-
return getDynamicDict(record.dictionaryCode);
|
|
29933
|
-
case 10:
|
|
29934
|
-
_context.t1 = _context.sent;
|
|
29935
|
-
_context.next = 14;
|
|
29969
|
+
}
|
|
29970
|
+
if (!(record.choiceType == 20)) {
|
|
29971
|
+
_context.next = 7;
|
|
29936
29972
|
break;
|
|
29937
|
-
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
29944
|
-
|
|
29945
|
-
|
|
29946
|
-
|
|
29947
|
-
|
|
29948
|
-
|
|
29973
|
+
}
|
|
29974
|
+
_context.t0 = getDictionarySource(record.dictionaryCode);
|
|
29975
|
+
_context.next = 15;
|
|
29976
|
+
break;
|
|
29977
|
+
case 7:
|
|
29978
|
+
if (!(record.choiceType == 30)) {
|
|
29979
|
+
_context.next = 13;
|
|
29980
|
+
break;
|
|
29981
|
+
}
|
|
29982
|
+
_context.next = 10;
|
|
29983
|
+
return getDynamicDict(record.dictionaryCode);
|
|
29984
|
+
case 10:
|
|
29985
|
+
_context.t1 = _context.sent;
|
|
29986
|
+
_context.next = 14;
|
|
29987
|
+
break;
|
|
29988
|
+
case 13:
|
|
29989
|
+
_context.t1 = [];
|
|
29990
|
+
case 14:
|
|
29991
|
+
_context.t0 = _context.t1;
|
|
29992
|
+
case 15:
|
|
29993
|
+
source = _context.t0;
|
|
29994
|
+
// @ts-ignore
|
|
29995
|
+
ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
|
|
29996
|
+
case 17:
|
|
29997
|
+
case "end":
|
|
29998
|
+
return _context.stop();
|
|
29949
29999
|
}
|
|
29950
30000
|
}, _callee);
|
|
29951
30001
|
})));
|
|
@@ -30013,30 +30063,28 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30013
30063
|
var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
30014
30064
|
var form, values, name, relates, source;
|
|
30015
30065
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
30016
|
-
while (1) {
|
|
30017
|
-
|
|
30018
|
-
|
|
30019
|
-
|
|
30020
|
-
if (values[0]) {
|
|
30021
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30022
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30023
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
30024
|
-
}
|
|
30025
|
-
if (!values[1]) {
|
|
30026
|
-
_context2.next = 9;
|
|
30027
|
-
break;
|
|
30028
|
-
}
|
|
30029
|
-
_context2.next = 5;
|
|
30030
|
-
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
30031
|
-
case 5:
|
|
30032
|
-
source = _context2.sent;
|
|
30066
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
30067
|
+
case 0:
|
|
30068
|
+
form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
|
|
30069
|
+
if (values[0]) {
|
|
30033
30070
|
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30034
30071
|
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30035
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0],
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
|
|
30039
|
-
|
|
30072
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
30073
|
+
}
|
|
30074
|
+
if (!values[1]) {
|
|
30075
|
+
_context2.next = 9;
|
|
30076
|
+
break;
|
|
30077
|
+
}
|
|
30078
|
+
_context2.next = 5;
|
|
30079
|
+
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
30080
|
+
case 5:
|
|
30081
|
+
source = _context2.sent;
|
|
30082
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30083
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30084
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
|
|
30085
|
+
case 9:
|
|
30086
|
+
case "end":
|
|
30087
|
+
return _context2.stop();
|
|
30040
30088
|
}
|
|
30041
30089
|
}, _callee2);
|
|
30042
30090
|
}));
|
|
@@ -30496,43 +30544,41 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30496
30544
|
var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
|
|
30497
30545
|
var values, name, form, source;
|
|
30498
30546
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
30499
|
-
while (1) {
|
|
30500
|
-
|
|
30501
|
-
|
|
30502
|
-
|
|
30503
|
-
|
|
30504
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30505
|
-
form.setFieldVisible(name, false);
|
|
30506
|
-
}
|
|
30507
|
-
if (!(values[0] === 30)) {
|
|
30508
|
-
_context3.next = 10;
|
|
30509
|
-
break;
|
|
30510
|
-
}
|
|
30511
|
-
_context3.next = 5;
|
|
30512
|
-
return request$1({
|
|
30513
|
-
url: '/basic/dictDynamicItem/queryList',
|
|
30514
|
-
converter: function converter(_ref11) {
|
|
30515
|
-
var data = _ref11.data;
|
|
30516
|
-
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30517
|
-
return {
|
|
30518
|
-
text: d.dictCode,
|
|
30519
|
-
value: d.dictCode
|
|
30520
|
-
};
|
|
30521
|
-
});
|
|
30522
|
-
}
|
|
30523
|
-
});
|
|
30524
|
-
case 5:
|
|
30525
|
-
source = _context3.sent;
|
|
30526
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30527
|
-
form.setFieldVisible(name, true);
|
|
30528
|
-
_context3.next = 11;
|
|
30529
|
-
break;
|
|
30530
|
-
case 10:
|
|
30547
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
30548
|
+
case 0:
|
|
30549
|
+
values = _ref10.values, name = _ref10.name, form = _ref10.form;
|
|
30550
|
+
if (values[1] === 40) {
|
|
30551
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30531
30552
|
form.setFieldVisible(name, false);
|
|
30532
|
-
|
|
30533
|
-
|
|
30534
|
-
|
|
30535
|
-
|
|
30553
|
+
}
|
|
30554
|
+
if (!(values[0] === 30)) {
|
|
30555
|
+
_context3.next = 10;
|
|
30556
|
+
break;
|
|
30557
|
+
}
|
|
30558
|
+
_context3.next = 5;
|
|
30559
|
+
return request$1({
|
|
30560
|
+
url: '/basic/dictDynamicItem/queryList',
|
|
30561
|
+
converter: function converter(_ref11) {
|
|
30562
|
+
var data = _ref11.data;
|
|
30563
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30564
|
+
return {
|
|
30565
|
+
text: d.dictCode,
|
|
30566
|
+
value: d.dictCode
|
|
30567
|
+
};
|
|
30568
|
+
});
|
|
30569
|
+
}
|
|
30570
|
+
});
|
|
30571
|
+
case 5:
|
|
30572
|
+
source = _context3.sent;
|
|
30573
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30574
|
+
form.setFieldVisible(name, true);
|
|
30575
|
+
_context3.next = 11;
|
|
30576
|
+
break;
|
|
30577
|
+
case 10:
|
|
30578
|
+
form.setFieldVisible(name, false);
|
|
30579
|
+
case 11:
|
|
30580
|
+
case "end":
|
|
30581
|
+
return _context3.stop();
|
|
30536
30582
|
}
|
|
30537
30583
|
}, _callee3);
|
|
30538
30584
|
}));
|
|
@@ -30721,66 +30767,64 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30721
30767
|
var _ref$current4, _res$editableStatus;
|
|
30722
30768
|
var res, _res$defaultValue;
|
|
30723
30769
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30724
|
-
while (1) {
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
res.
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30770
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
30771
|
+
case 0:
|
|
30772
|
+
_context4.next = 2;
|
|
30773
|
+
return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
|
|
30774
|
+
case 2:
|
|
30775
|
+
res = _context4.sent;
|
|
30776
|
+
res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
|
|
30777
|
+
res.fieldGroup = record.fieldGroup;
|
|
30778
|
+
res.businessType = record.businessType;
|
|
30779
|
+
res.info = {
|
|
30780
|
+
enumeration: res.enumeration,
|
|
30781
|
+
dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
|
|
30782
|
+
formula: res.formula,
|
|
30783
|
+
scale: res.scale,
|
|
30784
|
+
variable: res.variable
|
|
30785
|
+
};
|
|
30786
|
+
res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
|
|
30787
|
+
res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
|
|
30788
|
+
res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
|
|
30789
|
+
if (res.inputType === 40) {
|
|
30790
|
+
res.valueType = 22;
|
|
30791
|
+
}
|
|
30792
|
+
// 把数组处理成文本
|
|
30793
|
+
if (res.inputType === 30) {
|
|
30794
|
+
if (res.defaultValue) {
|
|
30795
|
+
res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
|
|
30746
30796
|
}
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30797
|
+
}
|
|
30798
|
+
res.fieldMapping = res.fieldMapping || '';
|
|
30799
|
+
delete res.formula;
|
|
30800
|
+
delete res.showValue;
|
|
30801
|
+
if (!(mode === 'create')) {
|
|
30802
|
+
_context4.next = 18;
|
|
30803
|
+
break;
|
|
30804
|
+
}
|
|
30805
|
+
request$1({
|
|
30806
|
+
url: "/basic/flow/businessField",
|
|
30807
|
+
method: 'POST',
|
|
30808
|
+
params: res,
|
|
30809
|
+
successMessage: '创建成功!',
|
|
30810
|
+
converter: function converter() {
|
|
30811
|
+
onParentOk();
|
|
30752
30812
|
}
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30758
|
-
|
|
30813
|
+
});
|
|
30814
|
+
return _context4.abrupt("return");
|
|
30815
|
+
case 18:
|
|
30816
|
+
request$1({
|
|
30817
|
+
url: "/basic/flow/businessField/".concat(record.id),
|
|
30818
|
+
method: 'PATCH',
|
|
30819
|
+
params: res,
|
|
30820
|
+
successMessage: '修改成功!',
|
|
30821
|
+
converter: function converter() {
|
|
30822
|
+
onParentOk();
|
|
30759
30823
|
}
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
successMessage: '创建成功!',
|
|
30765
|
-
converter: function converter() {
|
|
30766
|
-
onParentOk();
|
|
30767
|
-
}
|
|
30768
|
-
});
|
|
30769
|
-
return _context4.abrupt("return");
|
|
30770
|
-
case 18:
|
|
30771
|
-
request$1({
|
|
30772
|
-
url: "/basic/flow/businessField/".concat(record.id),
|
|
30773
|
-
method: 'PATCH',
|
|
30774
|
-
params: res,
|
|
30775
|
-
successMessage: '修改成功!',
|
|
30776
|
-
converter: function converter() {
|
|
30777
|
-
onParentOk();
|
|
30778
|
-
}
|
|
30779
|
-
});
|
|
30780
|
-
case 19:
|
|
30781
|
-
case "end":
|
|
30782
|
-
return _context4.stop();
|
|
30783
|
-
}
|
|
30824
|
+
});
|
|
30825
|
+
case 19:
|
|
30826
|
+
case "end":
|
|
30827
|
+
return _context4.stop();
|
|
30784
30828
|
}
|
|
30785
30829
|
}, _callee4);
|
|
30786
30830
|
}));
|