@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.js
CHANGED
|
@@ -153,6 +153,33 @@ axios__default['default'].interceptors.request.use(function (config) {
|
|
|
153
153
|
return config;
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
function _iterableToArrayLimit(arr, i) {
|
|
157
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
158
|
+
if (null != _i) {
|
|
159
|
+
var _s,
|
|
160
|
+
_e,
|
|
161
|
+
_x,
|
|
162
|
+
_r,
|
|
163
|
+
_arr = [],
|
|
164
|
+
_n = !0,
|
|
165
|
+
_d = !1;
|
|
166
|
+
try {
|
|
167
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
168
|
+
if (Object(_i) !== _i) return;
|
|
169
|
+
_n = !1;
|
|
170
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
171
|
+
} catch (err) {
|
|
172
|
+
_d = !0, _e = err;
|
|
173
|
+
} finally {
|
|
174
|
+
try {
|
|
175
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
176
|
+
} finally {
|
|
177
|
+
if (_d) throw _e;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return _arr;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
156
183
|
function ownKeys(object, enumerableOnly) {
|
|
157
184
|
var keys = Object.keys(object);
|
|
158
185
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -309,14 +336,9 @@ function _regeneratorRuntime() {
|
|
|
309
336
|
};
|
|
310
337
|
}
|
|
311
338
|
function maybeInvokeDelegate(delegate, context) {
|
|
312
|
-
var
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
316
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
317
|
-
}
|
|
318
|
-
return ContinueSentinel;
|
|
319
|
-
}
|
|
339
|
+
var methodName = context.method,
|
|
340
|
+
method = delegate.iterator[methodName];
|
|
341
|
+
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;
|
|
320
342
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
321
343
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
322
344
|
var info = record.arg;
|
|
@@ -530,7 +552,7 @@ function _defineProperties(target, props) {
|
|
|
530
552
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
531
553
|
descriptor.configurable = true;
|
|
532
554
|
if ("value" in descriptor) descriptor.writable = true;
|
|
533
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
555
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
534
556
|
}
|
|
535
557
|
}
|
|
536
558
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -542,6 +564,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
542
564
|
return Constructor;
|
|
543
565
|
}
|
|
544
566
|
function _defineProperty(obj, key, value) {
|
|
567
|
+
key = _toPropertyKey(key);
|
|
545
568
|
if (key in obj) {
|
|
546
569
|
Object.defineProperty(obj, key, {
|
|
547
570
|
value: value,
|
|
@@ -670,30 +693,6 @@ function _arrayWithHoles(arr) {
|
|
|
670
693
|
function _iterableToArray(iter) {
|
|
671
694
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
672
695
|
}
|
|
673
|
-
function _iterableToArrayLimit(arr, i) {
|
|
674
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
675
|
-
if (_i == null) return;
|
|
676
|
-
var _arr = [];
|
|
677
|
-
var _n = true;
|
|
678
|
-
var _d = false;
|
|
679
|
-
var _s, _e;
|
|
680
|
-
try {
|
|
681
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
682
|
-
_arr.push(_s.value);
|
|
683
|
-
if (i && _arr.length === i) break;
|
|
684
|
-
}
|
|
685
|
-
} catch (err) {
|
|
686
|
-
_d = true;
|
|
687
|
-
_e = err;
|
|
688
|
-
} finally {
|
|
689
|
-
try {
|
|
690
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
691
|
-
} finally {
|
|
692
|
-
if (_d) throw _e;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
return _arr;
|
|
696
|
-
}
|
|
697
696
|
function _unsupportedIterableToArray(o, minLen) {
|
|
698
697
|
if (!o) return;
|
|
699
698
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -713,6 +712,20 @@ function _nonIterableSpread() {
|
|
|
713
712
|
function _nonIterableRest() {
|
|
714
713
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
715
714
|
}
|
|
715
|
+
function _toPrimitive(input, hint) {
|
|
716
|
+
if (typeof input !== "object" || input === null) return input;
|
|
717
|
+
var prim = input[Symbol.toPrimitive];
|
|
718
|
+
if (prim !== undefined) {
|
|
719
|
+
var res = prim.call(input, hint || "default");
|
|
720
|
+
if (typeof res !== "object") return res;
|
|
721
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
722
|
+
}
|
|
723
|
+
return (hint === "string" ? String : Number)(input);
|
|
724
|
+
}
|
|
725
|
+
function _toPropertyKey(arg) {
|
|
726
|
+
var key = _toPrimitive(arg, "string");
|
|
727
|
+
return typeof key === "symbol" ? key : String(key);
|
|
728
|
+
}
|
|
716
729
|
|
|
717
730
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
718
731
|
var errorMessage = _objectSpread2({
|
|
@@ -2080,7 +2093,8 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2080
2093
|
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
2081
2094
|
_props$getPopupContai = props.getPopupContainer,
|
|
2082
2095
|
_getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
|
|
2083
|
-
fieldComponent = props.fieldComponent
|
|
2096
|
+
fieldComponent = props.fieldComponent,
|
|
2097
|
+
selectBusinessType = props.selectBusinessType;
|
|
2084
2098
|
var _ref = requestConfig || {},
|
|
2085
2099
|
url = _ref.url,
|
|
2086
2100
|
otherParams = _ref.otherParams,
|
|
@@ -2284,84 +2298,85 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2284
2298
|
});
|
|
2285
2299
|
}
|
|
2286
2300
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
2287
|
-
|
|
2301
|
+
var _loop = function _loop() {
|
|
2288
2302
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2315
|
-
}
|
|
2316
|
-
});
|
|
2317
|
-
delete params[key];
|
|
2318
|
-
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2319
|
-
var _dataParams4 = key.split('*checkBox*');
|
|
2320
|
-
if (element) {
|
|
2321
|
-
params[_dataParams4[0]] = 0;
|
|
2303
|
+
var element = params[key];
|
|
2304
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
2305
|
+
var dataParams = key.split('*number*');
|
|
2306
|
+
dataParams.forEach(function (value, index) {
|
|
2307
|
+
params[value] = element[index];
|
|
2308
|
+
});
|
|
2309
|
+
delete params[key];
|
|
2310
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
2311
|
+
var _dataParams = key.split('*address*');
|
|
2312
|
+
_dataParams.forEach(function (value, index) {
|
|
2313
|
+
params[value] = element.PCDCode[index];
|
|
2314
|
+
});
|
|
2315
|
+
delete params[key];
|
|
2316
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
2317
|
+
var _dataParams2 = key.split('*costType*');
|
|
2318
|
+
// eslint-disable-next-line prefer-destructuring
|
|
2319
|
+
params[_dataParams2[0]] = element[1];
|
|
2320
|
+
delete params[key];
|
|
2321
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
2322
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
2323
|
+
_dataParams3.forEach(function (value, index) {
|
|
2324
|
+
if (index === 0) {
|
|
2325
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
2326
|
+
} else {
|
|
2327
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2322
2328
|
}
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
_dataParams7.forEach(function (value, index) {
|
|
2341
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2342
|
-
});
|
|
2343
|
-
delete params[key];
|
|
2344
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2345
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2346
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2347
|
-
if (params[key][0] === 'range') {
|
|
2348
|
-
if (params[key][1][0]) {
|
|
2349
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2350
|
-
}
|
|
2351
|
-
if (params[key][1][1]) {
|
|
2352
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2353
|
-
}
|
|
2329
|
+
});
|
|
2330
|
+
delete params[key];
|
|
2331
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2332
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
2333
|
+
if (element) {
|
|
2334
|
+
params[_dataParams4[0]] = 0;
|
|
2335
|
+
}
|
|
2336
|
+
delete params[key];
|
|
2337
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
2338
|
+
var _dataParams5 = key.split('*cascader*');
|
|
2339
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
2340
|
+
delete params[key];
|
|
2341
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
2342
|
+
var _dataParams6 = key.split('*date*');
|
|
2343
|
+
_dataParams6.forEach(function (value, index) {
|
|
2344
|
+
if (index === 0) {
|
|
2345
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2354
2346
|
} else {
|
|
2355
|
-
params[
|
|
2347
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2348
|
+
}
|
|
2349
|
+
});
|
|
2350
|
+
delete params[key];
|
|
2351
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
2352
|
+
var _dataParams7 = key.split('*');
|
|
2353
|
+
_dataParams7.forEach(function (value, index) {
|
|
2354
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2355
|
+
});
|
|
2356
|
+
delete params[key];
|
|
2357
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2358
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2359
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2360
|
+
if (params[key][0] === 'range') {
|
|
2361
|
+
if (params[key][1][0]) {
|
|
2362
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2363
|
+
}
|
|
2364
|
+
if (params[key][1][1]) {
|
|
2365
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2356
2366
|
}
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
params[key] = element.join(',');
|
|
2360
|
-
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2361
|
-
delete params[key];
|
|
2367
|
+
} else {
|
|
2368
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
2362
2369
|
}
|
|
2363
|
-
|
|
2370
|
+
delete params[key];
|
|
2371
|
+
} else if (Array.isArray(element)) {
|
|
2372
|
+
params[key] = element.join(',');
|
|
2373
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2374
|
+
delete params[key];
|
|
2375
|
+
}
|
|
2364
2376
|
}
|
|
2377
|
+
};
|
|
2378
|
+
for (var key in params) {
|
|
2379
|
+
_loop();
|
|
2365
2380
|
}
|
|
2366
2381
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
2367
2382
|
pageSize: pageSize,
|
|
@@ -2485,6 +2500,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2485
2500
|
React.useEffect(function () {
|
|
2486
2501
|
makeUniqueValue();
|
|
2487
2502
|
}, [resultSourceKey]);
|
|
2503
|
+
React.useEffect(function () {
|
|
2504
|
+
if (init) {
|
|
2505
|
+
setItems([]);
|
|
2506
|
+
setItemsTotal(0);
|
|
2507
|
+
run('init');
|
|
2508
|
+
}
|
|
2509
|
+
}, [selectBusinessType]);
|
|
2488
2510
|
var showModal = function showModal() {
|
|
2489
2511
|
getData({
|
|
2490
2512
|
pageSize: tableInitPageSize,
|
|
@@ -9577,58 +9599,59 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
|
|
|
9577
9599
|
* @returns 返回处理后的查询参数
|
|
9578
9600
|
*/
|
|
9579
9601
|
function queryParams(params, flag) {
|
|
9580
|
-
|
|
9602
|
+
var _loop = function _loop() {
|
|
9581
9603
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9606
|
-
} else {
|
|
9607
|
-
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9608
|
-
}
|
|
9609
|
-
});
|
|
9610
|
-
delete params[key];
|
|
9611
|
-
} else if (element && key.indexOf('*') >= 0) {
|
|
9612
|
-
var _dataParams4 = key.split('*');
|
|
9613
|
-
_dataParams4.forEach(function (value, index) {
|
|
9614
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9615
|
-
});
|
|
9616
|
-
delete params[key];
|
|
9617
|
-
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9618
|
-
var _dataParams5 = key.split('_likeIn_');
|
|
9619
|
-
if (element.indexOf(',') >= 0) {
|
|
9620
|
-
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9621
|
-
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9604
|
+
var element = params[key];
|
|
9605
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
9606
|
+
var dataParams = key.split('*number*');
|
|
9607
|
+
dataParams.forEach(function (value, index) {
|
|
9608
|
+
params[value] = element[index];
|
|
9609
|
+
});
|
|
9610
|
+
delete params[key];
|
|
9611
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
9612
|
+
var _dataParams = key.split('*address*');
|
|
9613
|
+
_dataParams.forEach(function (value, index) {
|
|
9614
|
+
params[value] = element.PCDCode[index];
|
|
9615
|
+
});
|
|
9616
|
+
delete params[key];
|
|
9617
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
9618
|
+
var _dataParams2 = key.split('*costType*');
|
|
9619
|
+
// eslint-disable-next-line prefer-destructuring
|
|
9620
|
+
params[_dataParams2[0]] = element[1];
|
|
9621
|
+
delete params[key];
|
|
9622
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
9623
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
9624
|
+
_dataParams3.forEach(function (value, index) {
|
|
9625
|
+
if (index === 0) {
|
|
9626
|
+
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9622
9627
|
} else {
|
|
9623
|
-
params[
|
|
9624
|
-
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9628
|
+
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9625
9629
|
}
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9630
|
+
});
|
|
9631
|
+
delete params[key];
|
|
9632
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
9633
|
+
var _dataParams4 = key.split('*');
|
|
9634
|
+
_dataParams4.forEach(function (value, index) {
|
|
9635
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9636
|
+
});
|
|
9637
|
+
delete params[key];
|
|
9638
|
+
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9639
|
+
var _dataParams5 = key.split('_likeIn_');
|
|
9640
|
+
if (element.indexOf(',') >= 0) {
|
|
9641
|
+
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9642
|
+
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9643
|
+
} else {
|
|
9644
|
+
params["qp-".concat(_dataParams5[0], "-like")] = element;
|
|
9645
|
+
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9629
9646
|
}
|
|
9630
|
-
|
|
9647
|
+
delete params[key];
|
|
9648
|
+
} else if (Array.isArray(element)) {
|
|
9649
|
+
params[key] = element.join(',');
|
|
9650
|
+
}
|
|
9631
9651
|
}
|
|
9652
|
+
};
|
|
9653
|
+
for (var key in params) {
|
|
9654
|
+
_loop();
|
|
9632
9655
|
}
|
|
9633
9656
|
return flag ? params : qs.stringify(params);
|
|
9634
9657
|
}
|
|
@@ -10158,76 +10181,74 @@ var AddSelect = function AddSelect(props) {
|
|
|
10158
10181
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
10159
10182
|
var result;
|
|
10160
10183
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10161
|
-
while (1) {
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
_context.next = 3;
|
|
10168
|
-
break;
|
|
10169
|
-
}
|
|
10170
|
-
antd.message.warning('相同skc配码不可设置相同哦');
|
|
10171
|
-
return _context.abrupt("return", false);
|
|
10172
|
-
case 3:
|
|
10173
|
-
if (!(bType == 'spu')) {
|
|
10174
|
-
_context.next = 26;
|
|
10175
|
-
break;
|
|
10176
|
-
}
|
|
10177
|
-
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10178
|
-
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10179
|
-
}))) {
|
|
10180
|
-
_context.next = 7;
|
|
10181
|
-
break;
|
|
10182
|
-
}
|
|
10183
|
-
antd.message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10184
|
-
return _context.abrupt("return", false);
|
|
10185
|
-
case 7:
|
|
10186
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10187
|
-
_context.next = 10;
|
|
10188
|
-
break;
|
|
10189
|
-
}
|
|
10190
|
-
antd.message.warning('请先选择颜色!');
|
|
10191
|
-
return _context.abrupt("return", false);
|
|
10192
|
-
case 10:
|
|
10193
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10194
|
-
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10195
|
-
}))) {
|
|
10196
|
-
_context.next = 13;
|
|
10197
|
-
break;
|
|
10198
|
-
}
|
|
10199
|
-
antd.message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10200
|
-
return _context.abrupt("return", false);
|
|
10201
|
-
case 13:
|
|
10202
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10203
|
-
_context.next = 26;
|
|
10204
|
-
break;
|
|
10205
|
-
}
|
|
10206
|
-
result = true;
|
|
10207
|
-
_context.prev = 15;
|
|
10208
|
-
_context.next = 18;
|
|
10209
|
-
return checkSpuMatchCode({
|
|
10210
|
-
skcCode: recordItem[recordKey],
|
|
10211
|
-
matchingCode: changeValue,
|
|
10212
|
-
ext1: recordItem.colorName
|
|
10213
|
-
});
|
|
10214
|
-
case 18:
|
|
10215
|
-
result = _context.sent;
|
|
10216
|
-
result = true;
|
|
10217
|
-
_context.next = 25;
|
|
10184
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10185
|
+
case 0:
|
|
10186
|
+
if (!(bType == 'skc' && tList.some(function (i) {
|
|
10187
|
+
return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
|
|
10188
|
+
}))) {
|
|
10189
|
+
_context.next = 3;
|
|
10218
10190
|
break;
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10191
|
+
}
|
|
10192
|
+
antd.message.warning('相同skc配码不可设置相同哦');
|
|
10193
|
+
return _context.abrupt("return", false);
|
|
10194
|
+
case 3:
|
|
10195
|
+
if (!(bType == 'spu')) {
|
|
10196
|
+
_context.next = 26;
|
|
10197
|
+
break;
|
|
10198
|
+
}
|
|
10199
|
+
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10200
|
+
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10201
|
+
}))) {
|
|
10202
|
+
_context.next = 7;
|
|
10203
|
+
break;
|
|
10204
|
+
}
|
|
10205
|
+
antd.message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10206
|
+
return _context.abrupt("return", false);
|
|
10207
|
+
case 7:
|
|
10208
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10209
|
+
_context.next = 10;
|
|
10210
|
+
break;
|
|
10211
|
+
}
|
|
10212
|
+
antd.message.warning('请先选择颜色!');
|
|
10213
|
+
return _context.abrupt("return", false);
|
|
10214
|
+
case 10:
|
|
10215
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10216
|
+
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10217
|
+
}))) {
|
|
10218
|
+
_context.next = 13;
|
|
10219
|
+
break;
|
|
10220
|
+
}
|
|
10221
|
+
antd.message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10222
|
+
return _context.abrupt("return", false);
|
|
10223
|
+
case 13:
|
|
10224
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10225
|
+
_context.next = 26;
|
|
10226
|
+
break;
|
|
10227
|
+
}
|
|
10228
|
+
result = true;
|
|
10229
|
+
_context.prev = 15;
|
|
10230
|
+
_context.next = 18;
|
|
10231
|
+
return checkSpuMatchCode({
|
|
10232
|
+
skcCode: recordItem[recordKey],
|
|
10233
|
+
matchingCode: changeValue,
|
|
10234
|
+
ext1: recordItem.colorName
|
|
10235
|
+
});
|
|
10236
|
+
case 18:
|
|
10237
|
+
result = _context.sent;
|
|
10238
|
+
result = true;
|
|
10239
|
+
_context.next = 25;
|
|
10240
|
+
break;
|
|
10241
|
+
case 22:
|
|
10242
|
+
_context.prev = 22;
|
|
10243
|
+
_context.t0 = _context["catch"](15);
|
|
10244
|
+
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10245
|
+
case 25:
|
|
10246
|
+
return _context.abrupt("return", result);
|
|
10247
|
+
case 26:
|
|
10248
|
+
return _context.abrupt("return", true);
|
|
10249
|
+
case 27:
|
|
10250
|
+
case "end":
|
|
10251
|
+
return _context.stop();
|
|
10231
10252
|
}
|
|
10232
10253
|
}, _callee, null, [[15, 22]]);
|
|
10233
10254
|
}));
|
|
@@ -10419,29 +10440,27 @@ var AddSelect = function AddSelect(props) {
|
|
|
10419
10440
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
10420
10441
|
var isConformToTheRules, newPopValue;
|
|
10421
10442
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10422
|
-
while (1) {
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10443
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10444
|
+
case 0:
|
|
10445
|
+
_context2.next = 2;
|
|
10446
|
+
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
10447
|
+
case 2:
|
|
10448
|
+
isConformToTheRules = _context2.sent;
|
|
10449
|
+
if (isConformToTheRules) {
|
|
10450
|
+
record[item.dataIndex] = value;
|
|
10451
|
+
} else {
|
|
10452
|
+
record[item.dataIndex] = null;
|
|
10453
|
+
}
|
|
10454
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10455
|
+
if (innerIndex == index) {
|
|
10456
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
10433
10457
|
}
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
setPopValue(newPopValue);
|
|
10441
|
-
case 6:
|
|
10442
|
-
case "end":
|
|
10443
|
-
return _context2.stop();
|
|
10444
|
-
}
|
|
10458
|
+
return i;
|
|
10459
|
+
});
|
|
10460
|
+
setPopValue(newPopValue);
|
|
10461
|
+
case 6:
|
|
10462
|
+
case "end":
|
|
10463
|
+
return _context2.stop();
|
|
10445
10464
|
}
|
|
10446
10465
|
}, _callee2);
|
|
10447
10466
|
}));
|
|
@@ -10501,84 +10520,85 @@ var AddSelect = function AddSelect(props) {
|
|
|
10501
10520
|
});
|
|
10502
10521
|
}
|
|
10503
10522
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
10504
|
-
|
|
10523
|
+
var _loop = function _loop() {
|
|
10505
10524
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10532
|
-
}
|
|
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;
|
|
10525
|
+
var element = params[key];
|
|
10526
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
10527
|
+
var dataParams = key.split('*number*');
|
|
10528
|
+
dataParams.forEach(function (value, index) {
|
|
10529
|
+
params[value] = element[index];
|
|
10530
|
+
});
|
|
10531
|
+
delete params[key];
|
|
10532
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
10533
|
+
var _dataParams = key.split('*address*');
|
|
10534
|
+
_dataParams.forEach(function (value, index) {
|
|
10535
|
+
params[value] = element.PCDCode[index];
|
|
10536
|
+
});
|
|
10537
|
+
delete params[key];
|
|
10538
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
10539
|
+
var _dataParams2 = key.split('*costType*');
|
|
10540
|
+
// eslint-disable-next-line prefer-destructuring
|
|
10541
|
+
params[_dataParams2[0]] = element[1];
|
|
10542
|
+
delete params[key];
|
|
10543
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
10544
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
10545
|
+
_dataParams3.forEach(function (value, index) {
|
|
10546
|
+
if (index === 0) {
|
|
10547
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
10548
|
+
} else {
|
|
10549
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10539
10550
|
}
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
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
|
-
}
|
|
10551
|
+
});
|
|
10552
|
+
delete params[key];
|
|
10553
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
10554
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
10555
|
+
if (element) {
|
|
10556
|
+
params[_dataParams4[0]] = 0;
|
|
10557
|
+
}
|
|
10558
|
+
delete params[key];
|
|
10559
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
10560
|
+
var _dataParams5 = key.split('*cascader*');
|
|
10561
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
10562
|
+
delete params[key];
|
|
10563
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
10564
|
+
var _dataParams6 = key.split('*date*');
|
|
10565
|
+
_dataParams6.forEach(function (value, index) {
|
|
10566
|
+
if (index === 0) {
|
|
10567
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10571
10568
|
} else {
|
|
10572
|
-
params[
|
|
10569
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10573
10570
|
}
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10571
|
+
});
|
|
10572
|
+
delete params[key];
|
|
10573
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
10574
|
+
var _dataParams7 = key.split('*');
|
|
10575
|
+
_dataParams7.forEach(function (value, index) {
|
|
10576
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10577
|
+
});
|
|
10578
|
+
delete params[key];
|
|
10579
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10580
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10581
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10582
|
+
if (params[key][0] === 'range') {
|
|
10583
|
+
if (params[key][1][0]) {
|
|
10584
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10585
|
+
}
|
|
10586
|
+
if (params[key][1][1]) {
|
|
10587
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10588
|
+
}
|
|
10589
|
+
} else {
|
|
10590
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
10579
10591
|
}
|
|
10580
|
-
|
|
10592
|
+
delete params[key];
|
|
10593
|
+
} else if (Array.isArray(element)) {
|
|
10594
|
+
params[key] = element.join(',');
|
|
10595
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
10596
|
+
delete params[key];
|
|
10597
|
+
}
|
|
10581
10598
|
}
|
|
10599
|
+
};
|
|
10600
|
+
for (var key in params) {
|
|
10601
|
+
_loop();
|
|
10582
10602
|
}
|
|
10583
10603
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
10584
10604
|
pageSize: pageSize,
|
|
@@ -10678,8 +10698,8 @@ var AddSelect = function AddSelect(props) {
|
|
|
10678
10698
|
pageSize: 5000,
|
|
10679
10699
|
currentPage: 1
|
|
10680
10700
|
})]).then(function (x) {
|
|
10681
|
-
formatSource(x, 0,
|
|
10682
|
-
formatTreeDataSource(x, 1,
|
|
10701
|
+
formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
|
|
10702
|
+
formatTreeDataSource(x, 1, 4, tableSearchForm);
|
|
10683
10703
|
});
|
|
10684
10704
|
}
|
|
10685
10705
|
if (businessType == 'skc') {
|
|
@@ -12033,72 +12053,70 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
12033
12053
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
12034
12054
|
var canEntryObject, _canEntryObject$error, messageInfo;
|
|
12035
12055
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
12036
|
-
while (1) {
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
messageInfo
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
antd.message.success(initSuccessMessage);
|
|
12091
|
-
}
|
|
12056
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12057
|
+
case 0:
|
|
12058
|
+
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
12059
|
+
_context.next = 3;
|
|
12060
|
+
break;
|
|
12061
|
+
}
|
|
12062
|
+
antd.message.warning('至少录入一条数据');
|
|
12063
|
+
return _context.abrupt("return");
|
|
12064
|
+
case 3:
|
|
12065
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12066
|
+
return d.skuCode && d.name;
|
|
12067
|
+
})) {
|
|
12068
|
+
_context.next = 6;
|
|
12069
|
+
break;
|
|
12070
|
+
}
|
|
12071
|
+
antd.message.warning('请选择商品!');
|
|
12072
|
+
return _context.abrupt("return");
|
|
12073
|
+
case 6:
|
|
12074
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12075
|
+
return d.count;
|
|
12076
|
+
})) {
|
|
12077
|
+
_context.next = 9;
|
|
12078
|
+
break;
|
|
12079
|
+
}
|
|
12080
|
+
antd.message.warning('请填写商品数量!');
|
|
12081
|
+
return _context.abrupt("return");
|
|
12082
|
+
case 9:
|
|
12083
|
+
_context.next = 11;
|
|
12084
|
+
return isSkuCanEntry(data);
|
|
12085
|
+
case 11:
|
|
12086
|
+
canEntryObject = _context.sent;
|
|
12087
|
+
if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
|
|
12088
|
+
_context.next = 16;
|
|
12089
|
+
break;
|
|
12090
|
+
}
|
|
12091
|
+
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) {
|
|
12092
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
|
|
12093
|
+
}));
|
|
12094
|
+
messageInfo && antd.message.warning({
|
|
12095
|
+
content: messageInfo,
|
|
12096
|
+
duration: 6
|
|
12097
|
+
});
|
|
12098
|
+
return _context.abrupt("return");
|
|
12099
|
+
case 16:
|
|
12100
|
+
setLoading(true);
|
|
12101
|
+
onSaveCallback(data).then(function (res) {
|
|
12102
|
+
{
|
|
12103
|
+
var _Object$keys;
|
|
12104
|
+
var initSuccessMessage = '保存成功';
|
|
12105
|
+
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
12106
|
+
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
12107
|
+
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
12108
|
+
} else {
|
|
12109
|
+
antd.message.success(initSuccessMessage);
|
|
12092
12110
|
}
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12111
|
+
}
|
|
12112
|
+
setLoading(false);
|
|
12113
|
+
}).catch(function (Error) {
|
|
12114
|
+
antd.message.error(Error);
|
|
12115
|
+
setLoading(false);
|
|
12116
|
+
});
|
|
12117
|
+
case 18:
|
|
12118
|
+
case "end":
|
|
12119
|
+
return _context.stop();
|
|
12102
12120
|
}
|
|
12103
12121
|
}, _callee);
|
|
12104
12122
|
}));
|
|
@@ -14231,7 +14249,7 @@ var BusinessSearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14231
14249
|
needModalTable: needModalTable,
|
|
14232
14250
|
modalTableProps: modalTableProps
|
|
14233
14251
|
});
|
|
14234
|
-
}, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
|
|
14252
|
+
}, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
|
|
14235
14253
|
React.useImperativeHandle(ref, function () {
|
|
14236
14254
|
return {
|
|
14237
14255
|
getRef: function getRef() {
|
|
@@ -14253,9 +14271,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Busines
|
|
|
14253
14271
|
if (props && props.disabled !== nextProps.disabled) {
|
|
14254
14272
|
return false;
|
|
14255
14273
|
}
|
|
14274
|
+
if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
|
|
14275
|
+
return false;
|
|
14276
|
+
}
|
|
14256
14277
|
return true;
|
|
14257
14278
|
});
|
|
14258
14279
|
|
|
14280
|
+
// import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
|
|
14259
14281
|
function handleSelectColumn(c, parentProps) {
|
|
14260
14282
|
var result = c;
|
|
14261
14283
|
var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
|
|
@@ -14267,7 +14289,7 @@ function handleSelectColumn(c, parentProps) {
|
|
|
14267
14289
|
return !exceptColumns.includes(i.dataIndex);
|
|
14268
14290
|
});
|
|
14269
14291
|
}
|
|
14270
|
-
// 追加
|
|
14292
|
+
// 追加(最好不用这个,当组件不固定时候会有影响)
|
|
14271
14293
|
if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
|
|
14272
14294
|
additionColumns.forEach(function (i) {
|
|
14273
14295
|
result.splice(i.position, 0, i.column);
|
|
@@ -14280,6 +14302,7 @@ function handleSelectColumn(c, parentProps) {
|
|
|
14280
14302
|
return result;
|
|
14281
14303
|
}
|
|
14282
14304
|
var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
14305
|
+
var _parProps$requestConf, _parProps$requestConf2;
|
|
14283
14306
|
var selectProps = {
|
|
14284
14307
|
mode: 'multiple'
|
|
14285
14308
|
};
|
|
@@ -14292,6 +14315,19 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14292
14315
|
title: 'SKU编码',
|
|
14293
14316
|
width: 150,
|
|
14294
14317
|
dataIndex: 'skuCode'
|
|
14318
|
+
}, {
|
|
14319
|
+
title: '商品条码',
|
|
14320
|
+
width: 100,
|
|
14321
|
+
ellipsis: {
|
|
14322
|
+
showTitle: false
|
|
14323
|
+
},
|
|
14324
|
+
dataIndex: 'itemEancode',
|
|
14325
|
+
render: function render(text) {
|
|
14326
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
14327
|
+
placement: "topLeft",
|
|
14328
|
+
title: text
|
|
14329
|
+
}, text);
|
|
14330
|
+
}
|
|
14295
14331
|
}, {
|
|
14296
14332
|
title: 'SKU名称',
|
|
14297
14333
|
width: 200,
|
|
@@ -14379,11 +14415,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14379
14415
|
requestConfig: _objectSpread2({
|
|
14380
14416
|
url: "/items/sku/pager/v2",
|
|
14381
14417
|
filter: 'qp-name-like',
|
|
14382
|
-
otherParams: {
|
|
14418
|
+
otherParams: _objectSpread2({
|
|
14383
14419
|
'qp-combination-eq': false,
|
|
14384
14420
|
'qp-approveStatus-eq': 1,
|
|
14385
14421
|
'qp-status-eq': 1
|
|
14386
|
-
},
|
|
14422
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
|
|
14387
14423
|
mappingTextField: 'name',
|
|
14388
14424
|
mappingValueField: 'skuCode'
|
|
14389
14425
|
}, parProps.requestConfig),
|
|
@@ -14405,6 +14441,13 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14405
14441
|
}, {
|
|
14406
14442
|
name: 'qp-skuName-like',
|
|
14407
14443
|
label: 'SKU名称'
|
|
14444
|
+
}, {
|
|
14445
|
+
name: 'qp-code-in',
|
|
14446
|
+
label: '商品条码',
|
|
14447
|
+
field: {
|
|
14448
|
+
type: 'multipleQueryInput',
|
|
14449
|
+
props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
|
|
14450
|
+
}
|
|
14408
14451
|
}, {
|
|
14409
14452
|
name: 'qp-brandId-in',
|
|
14410
14453
|
type: 'select',
|
|
@@ -14485,12 +14528,12 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14485
14528
|
}));
|
|
14486
14529
|
}
|
|
14487
14530
|
}, {
|
|
14488
|
-
title: '
|
|
14531
|
+
title: '商品条码',
|
|
14489
14532
|
width: 100,
|
|
14490
14533
|
ellipsis: {
|
|
14491
14534
|
showTitle: false
|
|
14492
14535
|
},
|
|
14493
|
-
dataIndex: '
|
|
14536
|
+
dataIndex: 'itemEancode',
|
|
14494
14537
|
render: function render(text) {
|
|
14495
14538
|
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
14496
14539
|
placement: "topLeft",
|
|
@@ -14596,6 +14639,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
14596
14639
|
})));
|
|
14597
14640
|
};
|
|
14598
14641
|
var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
14642
|
+
var _parProps$requestConf3;
|
|
14599
14643
|
var selectProps = {
|
|
14600
14644
|
mode: 'multiple'
|
|
14601
14645
|
};
|
|
@@ -14673,9 +14717,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14673
14717
|
requestConfig: _objectSpread2({
|
|
14674
14718
|
url: "/items/skc/skcSelect",
|
|
14675
14719
|
filter: 'qp-name-like',
|
|
14676
|
-
otherParams: {
|
|
14720
|
+
otherParams: _objectSpread2({
|
|
14677
14721
|
'qp-skcStatus-eq': 1
|
|
14678
|
-
},
|
|
14722
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
|
|
14679
14723
|
mappingTextField: 'name',
|
|
14680
14724
|
mappingValueField: 'code'
|
|
14681
14725
|
}, parProps.requestConfig),
|
|
@@ -14875,6 +14919,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
|
|
|
14875
14919
|
})));
|
|
14876
14920
|
};
|
|
14877
14921
|
var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
14922
|
+
var _parProps$requestConf4;
|
|
14878
14923
|
var selectProps = {
|
|
14879
14924
|
mode: 'multiple'
|
|
14880
14925
|
};
|
|
@@ -14961,11 +15006,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
|
|
|
14961
15006
|
requestConfig: _objectSpread2({
|
|
14962
15007
|
url: "/items/item",
|
|
14963
15008
|
filter: 'qp-itemCode,name-orGroup,like',
|
|
14964
|
-
otherParams: {
|
|
15009
|
+
otherParams: _objectSpread2({
|
|
14965
15010
|
'qp-approveStatus-eq': 1,
|
|
14966
15011
|
'qp-status-eq': 1,
|
|
14967
15012
|
sorter: 'desc-id'
|
|
14968
|
-
},
|
|
15013
|
+
}, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
|
|
14969
15014
|
mappingTextField: 'name',
|
|
14970
15015
|
mappingValueField: 'itemCode'
|
|
14971
15016
|
}, parProps.requestConfig),
|
|
@@ -15351,44 +15396,42 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
15351
15396
|
var _ctx$form;
|
|
15352
15397
|
var resData, coverData, data, dataList;
|
|
15353
15398
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15354
|
-
while (1) {
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
_context.next = 13;
|
|
15360
|
-
break;
|
|
15361
|
-
}
|
|
15362
|
-
data = resData.data;
|
|
15363
|
-
if (!remoteSource.converter) {
|
|
15364
|
-
_context.next = 9;
|
|
15365
|
-
break;
|
|
15366
|
-
}
|
|
15367
|
-
_context.next = 6;
|
|
15368
|
-
return remoteSource.converter({
|
|
15369
|
-
data: [data]
|
|
15370
|
-
});
|
|
15371
|
-
case 6:
|
|
15372
|
-
coverData = _context.sent;
|
|
15373
|
-
_context.next = 11;
|
|
15399
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15400
|
+
case 0:
|
|
15401
|
+
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
15402
|
+
if (!(resData.status === '0' || resData.code === '000000')) {
|
|
15403
|
+
_context.next = 13;
|
|
15374
15404
|
break;
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
}) || [];
|
|
15380
|
-
case 11:
|
|
15381
|
-
_context.next = 14;
|
|
15405
|
+
}
|
|
15406
|
+
data = resData.data;
|
|
15407
|
+
if (!remoteSource.converter) {
|
|
15408
|
+
_context.next = 9;
|
|
15382
15409
|
break;
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15410
|
+
}
|
|
15411
|
+
_context.next = 6;
|
|
15412
|
+
return remoteSource.converter({
|
|
15413
|
+
data: [data]
|
|
15414
|
+
});
|
|
15415
|
+
case 6:
|
|
15416
|
+
coverData = _context.sent;
|
|
15417
|
+
_context.next = 11;
|
|
15418
|
+
break;
|
|
15419
|
+
case 9:
|
|
15420
|
+
dataList = data && Array.isArray(data) ? data : data && [data] || [];
|
|
15421
|
+
coverData = dataList.length && dataList.map(function (ites) {
|
|
15422
|
+
return mapSearchTree(ites);
|
|
15423
|
+
}) || [];
|
|
15424
|
+
case 11:
|
|
15425
|
+
_context.next = 14;
|
|
15426
|
+
break;
|
|
15427
|
+
case 13:
|
|
15428
|
+
coverData = [];
|
|
15429
|
+
case 14:
|
|
15430
|
+
setTreeData(coverData);
|
|
15431
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
|
|
15432
|
+
case 16:
|
|
15433
|
+
case "end":
|
|
15434
|
+
return _context.stop();
|
|
15392
15435
|
}
|
|
15393
15436
|
}, _callee);
|
|
15394
15437
|
}));
|
|
@@ -17343,6 +17386,7 @@ styleInject(css_248z$e);
|
|
|
17343
17386
|
var _excluded$d = ["className", "style"];
|
|
17344
17387
|
var DragHandle$2 = reactSortableHoc.SortableHandle(function () {
|
|
17345
17388
|
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
17389
|
+
width: 25,
|
|
17346
17390
|
src: drag
|
|
17347
17391
|
});
|
|
17348
17392
|
});
|
|
@@ -17558,11 +17602,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17558
17602
|
}))
|
|
17559
17603
|
});
|
|
17560
17604
|
}
|
|
17605
|
+
},
|
|
17606
|
+
style: {
|
|
17607
|
+
display: 'inline-block',
|
|
17608
|
+
width: '24px',
|
|
17609
|
+
textAlign: 'center'
|
|
17561
17610
|
}
|
|
17562
17611
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
17563
17612
|
placement: "top",
|
|
17564
17613
|
title: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? '取消固定' : '固定列首'
|
|
17565
17614
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
17615
|
+
width: 18,
|
|
17566
17616
|
src: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? fixedLeftActive : fixedLeft
|
|
17567
17617
|
})));
|
|
17568
17618
|
}
|
|
@@ -17628,11 +17678,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17628
17678
|
}))
|
|
17629
17679
|
});
|
|
17630
17680
|
}
|
|
17681
|
+
},
|
|
17682
|
+
style: {
|
|
17683
|
+
display: 'inline-block',
|
|
17684
|
+
width: '24px',
|
|
17685
|
+
textAlign: 'center'
|
|
17631
17686
|
}
|
|
17632
17687
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
17633
17688
|
placement: "top",
|
|
17634
17689
|
title: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? '取消固定' : '固定列尾'
|
|
17635
17690
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
17691
|
+
width: 18,
|
|
17636
17692
|
src: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? fixedRightActive : fixedRight
|
|
17637
17693
|
})));
|
|
17638
17694
|
}
|
|
@@ -17658,6 +17714,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
17658
17714
|
});
|
|
17659
17715
|
}
|
|
17660
17716
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
17717
|
+
width: 24,
|
|
17661
17718
|
src: close
|
|
17662
17719
|
}));
|
|
17663
17720
|
}
|
|
@@ -18067,6 +18124,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
18067
18124
|
var _excluded$e = ["className", "style"];
|
|
18068
18125
|
var DragHandle$3 = reactSortableHoc.SortableHandle(function () {
|
|
18069
18126
|
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
18127
|
+
width: 25,
|
|
18070
18128
|
src: drag
|
|
18071
18129
|
});
|
|
18072
18130
|
});
|
|
@@ -18235,6 +18293,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
|
|
|
18235
18293
|
});
|
|
18236
18294
|
}
|
|
18237
18295
|
}, /*#__PURE__*/React__default['default'].createElement("img", {
|
|
18296
|
+
width: 24,
|
|
18238
18297
|
src: close
|
|
18239
18298
|
}));
|
|
18240
18299
|
}
|
|
@@ -19490,21 +19549,19 @@ function _outLogin() {
|
|
|
19490
19549
|
_outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
19491
19550
|
var res;
|
|
19492
19551
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19493
|
-
while (1) {
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
return _context.stop();
|
|
19507
|
-
}
|
|
19552
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19553
|
+
case 0:
|
|
19554
|
+
_context.next = 2;
|
|
19555
|
+
return axios__default['default']({
|
|
19556
|
+
url: '/user/web/loginOut',
|
|
19557
|
+
method: 'GET'
|
|
19558
|
+
});
|
|
19559
|
+
case 2:
|
|
19560
|
+
res = _context.sent;
|
|
19561
|
+
return _context.abrupt("return", res);
|
|
19562
|
+
case 4:
|
|
19563
|
+
case "end":
|
|
19564
|
+
return _context.stop();
|
|
19508
19565
|
}
|
|
19509
19566
|
}, _callee);
|
|
19510
19567
|
}));
|
|
@@ -19633,31 +19690,29 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19633
19690
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19634
19691
|
var sessionId;
|
|
19635
19692
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19636
|
-
while (1) {
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19693
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19694
|
+
case 0:
|
|
19695
|
+
_context.next = 2;
|
|
19696
|
+
return getSessionId();
|
|
19697
|
+
case 2:
|
|
19698
|
+
sessionId = _context.sent;
|
|
19699
|
+
_context.next = 5;
|
|
19700
|
+
return outLogin({
|
|
19701
|
+
sessionId: sessionId
|
|
19702
|
+
});
|
|
19703
|
+
case 5:
|
|
19704
|
+
// @ts-ignore
|
|
19705
|
+
if (BUILD_TYPE) {
|
|
19706
|
+
antd.message.success('退出登录成功');
|
|
19707
|
+
umi.history.replace({
|
|
19708
|
+
pathname: '/user/login'
|
|
19646
19709
|
});
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
});
|
|
19654
|
-
} else {
|
|
19655
|
-
setLoginOutPath();
|
|
19656
|
-
}
|
|
19657
|
-
case 6:
|
|
19658
|
-
case "end":
|
|
19659
|
-
return _context.stop();
|
|
19660
|
-
}
|
|
19710
|
+
} else {
|
|
19711
|
+
setLoginOutPath();
|
|
19712
|
+
}
|
|
19713
|
+
case 6:
|
|
19714
|
+
case "end":
|
|
19715
|
+
return _context.stop();
|
|
19661
19716
|
}
|
|
19662
19717
|
}, _callee);
|
|
19663
19718
|
}));
|
|
@@ -21485,6 +21540,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
21485
21540
|
showSubMenu: isShow
|
|
21486
21541
|
});
|
|
21487
21542
|
}, 500);
|
|
21543
|
+
//设置tabs标签左右滚动
|
|
21488
21544
|
_this.setTabNavTransLate = function (num) {
|
|
21489
21545
|
var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
|
|
21490
21546
|
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];
|
|
@@ -22165,14 +22221,12 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
22165
22221
|
request: function () {
|
|
22166
22222
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
22167
22223
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22168
|
-
while (1) {
|
|
22169
|
-
|
|
22170
|
-
|
|
22171
|
-
|
|
22172
|
-
|
|
22173
|
-
|
|
22174
|
-
return _context.stop();
|
|
22175
|
-
}
|
|
22224
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22225
|
+
case 0:
|
|
22226
|
+
return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
|
|
22227
|
+
case 1:
|
|
22228
|
+
case "end":
|
|
22229
|
+
return _context.stop();
|
|
22176
22230
|
}
|
|
22177
22231
|
}, _callee);
|
|
22178
22232
|
}));
|
|
@@ -29844,28 +29898,26 @@ var valueType = {
|
|
|
29844
29898
|
var getDynamicDict = /*#__PURE__*/function () {
|
|
29845
29899
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
|
|
29846
29900
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29847
|
-
while (1) {
|
|
29848
|
-
|
|
29849
|
-
|
|
29850
|
-
|
|
29851
|
-
|
|
29852
|
-
|
|
29853
|
-
|
|
29854
|
-
|
|
29855
|
-
return
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29860
|
-
|
|
29861
|
-
|
|
29862
|
-
|
|
29863
|
-
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
return _context.stop();
|
|
29868
|
-
}
|
|
29901
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29902
|
+
case 0:
|
|
29903
|
+
_context.next = 2;
|
|
29904
|
+
return bssula.request({
|
|
29905
|
+
url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
|
|
29906
|
+
converter: function converter(_ref2) {
|
|
29907
|
+
var data = _ref2.data;
|
|
29908
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
29909
|
+
return {
|
|
29910
|
+
text: d.name,
|
|
29911
|
+
value: d.code || d.brandCode
|
|
29912
|
+
};
|
|
29913
|
+
});
|
|
29914
|
+
}
|
|
29915
|
+
});
|
|
29916
|
+
case 2:
|
|
29917
|
+
return _context.abrupt("return", _context.sent);
|
|
29918
|
+
case 3:
|
|
29919
|
+
case "end":
|
|
29920
|
+
return _context.stop();
|
|
29869
29921
|
}
|
|
29870
29922
|
}, _callee);
|
|
29871
29923
|
}));
|
|
@@ -29915,55 +29967,53 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29915
29967
|
ahooks.useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29916
29968
|
var _ref$current, source;
|
|
29917
29969
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29918
|
-
while (1) {
|
|
29919
|
-
|
|
29920
|
-
|
|
29921
|
-
|
|
29922
|
-
|
|
29923
|
-
|
|
29924
|
-
|
|
29925
|
-
|
|
29926
|
-
|
|
29927
|
-
|
|
29928
|
-
};
|
|
29929
|
-
}
|
|
29930
|
-
return prev;
|
|
29931
|
-
});
|
|
29932
|
-
case 2:
|
|
29933
|
-
if (!record.dictionaryCode) {
|
|
29934
|
-
_context.next = 17;
|
|
29935
|
-
break;
|
|
29936
|
-
}
|
|
29937
|
-
if (!(record.choiceType == 20)) {
|
|
29938
|
-
_context.next = 7;
|
|
29939
|
-
break;
|
|
29970
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29971
|
+
case 0:
|
|
29972
|
+
_context.next = 2;
|
|
29973
|
+
return setIsShowAndType(function (prev) {
|
|
29974
|
+
if (record.inputType === 20 || record.inputType === 30) {
|
|
29975
|
+
return {
|
|
29976
|
+
isShow: true,
|
|
29977
|
+
singleOrMultiple: record.inputType,
|
|
29978
|
+
type: record.choiceType
|
|
29979
|
+
};
|
|
29940
29980
|
}
|
|
29941
|
-
|
|
29942
|
-
|
|
29981
|
+
return prev;
|
|
29982
|
+
});
|
|
29983
|
+
case 2:
|
|
29984
|
+
if (!record.dictionaryCode) {
|
|
29985
|
+
_context.next = 17;
|
|
29943
29986
|
break;
|
|
29944
|
-
|
|
29945
|
-
|
|
29946
|
-
|
|
29947
|
-
break;
|
|
29948
|
-
}
|
|
29949
|
-
_context.next = 10;
|
|
29950
|
-
return getDynamicDict(record.dictionaryCode);
|
|
29951
|
-
case 10:
|
|
29952
|
-
_context.t1 = _context.sent;
|
|
29953
|
-
_context.next = 14;
|
|
29987
|
+
}
|
|
29988
|
+
if (!(record.choiceType == 20)) {
|
|
29989
|
+
_context.next = 7;
|
|
29954
29990
|
break;
|
|
29955
|
-
|
|
29956
|
-
|
|
29957
|
-
|
|
29958
|
-
|
|
29959
|
-
|
|
29960
|
-
|
|
29961
|
-
|
|
29962
|
-
|
|
29963
|
-
|
|
29964
|
-
|
|
29965
|
-
|
|
29966
|
-
|
|
29991
|
+
}
|
|
29992
|
+
_context.t0 = getDictionarySource(record.dictionaryCode);
|
|
29993
|
+
_context.next = 15;
|
|
29994
|
+
break;
|
|
29995
|
+
case 7:
|
|
29996
|
+
if (!(record.choiceType == 30)) {
|
|
29997
|
+
_context.next = 13;
|
|
29998
|
+
break;
|
|
29999
|
+
}
|
|
30000
|
+
_context.next = 10;
|
|
30001
|
+
return getDynamicDict(record.dictionaryCode);
|
|
30002
|
+
case 10:
|
|
30003
|
+
_context.t1 = _context.sent;
|
|
30004
|
+
_context.next = 14;
|
|
30005
|
+
break;
|
|
30006
|
+
case 13:
|
|
30007
|
+
_context.t1 = [];
|
|
30008
|
+
case 14:
|
|
30009
|
+
_context.t0 = _context.t1;
|
|
30010
|
+
case 15:
|
|
30011
|
+
source = _context.t0;
|
|
30012
|
+
// @ts-ignore
|
|
30013
|
+
ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
|
|
30014
|
+
case 17:
|
|
30015
|
+
case "end":
|
|
30016
|
+
return _context.stop();
|
|
29967
30017
|
}
|
|
29968
30018
|
}, _callee);
|
|
29969
30019
|
})));
|
|
@@ -30031,30 +30081,28 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30031
30081
|
var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
30032
30082
|
var form, values, name, relates, source;
|
|
30033
30083
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
30034
|
-
while (1) {
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
if (values[0]) {
|
|
30039
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30040
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30041
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
30042
|
-
}
|
|
30043
|
-
if (!values[1]) {
|
|
30044
|
-
_context2.next = 9;
|
|
30045
|
-
break;
|
|
30046
|
-
}
|
|
30047
|
-
_context2.next = 5;
|
|
30048
|
-
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
30049
|
-
case 5:
|
|
30050
|
-
source = _context2.sent;
|
|
30084
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
30085
|
+
case 0:
|
|
30086
|
+
form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
|
|
30087
|
+
if (values[0]) {
|
|
30051
30088
|
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30052
30089
|
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30053
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0],
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30090
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
30091
|
+
}
|
|
30092
|
+
if (!values[1]) {
|
|
30093
|
+
_context2.next = 9;
|
|
30094
|
+
break;
|
|
30095
|
+
}
|
|
30096
|
+
_context2.next = 5;
|
|
30097
|
+
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
30098
|
+
case 5:
|
|
30099
|
+
source = _context2.sent;
|
|
30100
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
30101
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
30102
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
|
|
30103
|
+
case 9:
|
|
30104
|
+
case "end":
|
|
30105
|
+
return _context2.stop();
|
|
30058
30106
|
}
|
|
30059
30107
|
}, _callee2);
|
|
30060
30108
|
}));
|
|
@@ -30514,43 +30562,41 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30514
30562
|
var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
|
|
30515
30563
|
var values, name, form, source;
|
|
30516
30564
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
30517
|
-
while (1) {
|
|
30518
|
-
|
|
30519
|
-
|
|
30520
|
-
|
|
30521
|
-
|
|
30522
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30523
|
-
form.setFieldVisible(name, false);
|
|
30524
|
-
}
|
|
30525
|
-
if (!(values[0] === 30)) {
|
|
30526
|
-
_context3.next = 10;
|
|
30527
|
-
break;
|
|
30528
|
-
}
|
|
30529
|
-
_context3.next = 5;
|
|
30530
|
-
return bssula.request({
|
|
30531
|
-
url: '/basic/dictDynamicItem/queryList',
|
|
30532
|
-
converter: function converter(_ref11) {
|
|
30533
|
-
var data = _ref11.data;
|
|
30534
|
-
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30535
|
-
return {
|
|
30536
|
-
text: d.dictCode,
|
|
30537
|
-
value: d.dictCode
|
|
30538
|
-
};
|
|
30539
|
-
});
|
|
30540
|
-
}
|
|
30541
|
-
});
|
|
30542
|
-
case 5:
|
|
30543
|
-
source = _context3.sent;
|
|
30544
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30545
|
-
form.setFieldVisible(name, true);
|
|
30546
|
-
_context3.next = 11;
|
|
30547
|
-
break;
|
|
30548
|
-
case 10:
|
|
30565
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
30566
|
+
case 0:
|
|
30567
|
+
values = _ref10.values, name = _ref10.name, form = _ref10.form;
|
|
30568
|
+
if (values[1] === 40) {
|
|
30569
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30549
30570
|
form.setFieldVisible(name, false);
|
|
30550
|
-
|
|
30551
|
-
|
|
30552
|
-
|
|
30553
|
-
|
|
30571
|
+
}
|
|
30572
|
+
if (!(values[0] === 30)) {
|
|
30573
|
+
_context3.next = 10;
|
|
30574
|
+
break;
|
|
30575
|
+
}
|
|
30576
|
+
_context3.next = 5;
|
|
30577
|
+
return bssula.request({
|
|
30578
|
+
url: '/basic/dictDynamicItem/queryList',
|
|
30579
|
+
converter: function converter(_ref11) {
|
|
30580
|
+
var data = _ref11.data;
|
|
30581
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30582
|
+
return {
|
|
30583
|
+
text: d.dictCode,
|
|
30584
|
+
value: d.dictCode
|
|
30585
|
+
};
|
|
30586
|
+
});
|
|
30587
|
+
}
|
|
30588
|
+
});
|
|
30589
|
+
case 5:
|
|
30590
|
+
source = _context3.sent;
|
|
30591
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30592
|
+
form.setFieldVisible(name, true);
|
|
30593
|
+
_context3.next = 11;
|
|
30594
|
+
break;
|
|
30595
|
+
case 10:
|
|
30596
|
+
form.setFieldVisible(name, false);
|
|
30597
|
+
case 11:
|
|
30598
|
+
case "end":
|
|
30599
|
+
return _context3.stop();
|
|
30554
30600
|
}
|
|
30555
30601
|
}, _callee3);
|
|
30556
30602
|
}));
|
|
@@ -30739,66 +30785,64 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30739
30785
|
var _ref$current4, _res$editableStatus;
|
|
30740
30786
|
var res, _res$defaultValue;
|
|
30741
30787
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30742
|
-
while (1) {
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
res.
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30788
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
30789
|
+
case 0:
|
|
30790
|
+
_context4.next = 2;
|
|
30791
|
+
return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
|
|
30792
|
+
case 2:
|
|
30793
|
+
res = _context4.sent;
|
|
30794
|
+
res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
|
|
30795
|
+
res.fieldGroup = record.fieldGroup;
|
|
30796
|
+
res.businessType = record.businessType;
|
|
30797
|
+
res.info = {
|
|
30798
|
+
enumeration: res.enumeration,
|
|
30799
|
+
dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
|
|
30800
|
+
formula: res.formula,
|
|
30801
|
+
scale: res.scale,
|
|
30802
|
+
variable: res.variable
|
|
30803
|
+
};
|
|
30804
|
+
res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
|
|
30805
|
+
res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
|
|
30806
|
+
res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
|
|
30807
|
+
if (res.inputType === 40) {
|
|
30808
|
+
res.valueType = 22;
|
|
30809
|
+
}
|
|
30810
|
+
// 把数组处理成文本
|
|
30811
|
+
if (res.inputType === 30) {
|
|
30812
|
+
if (res.defaultValue) {
|
|
30813
|
+
res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
|
|
30764
30814
|
}
|
|
30765
|
-
|
|
30766
|
-
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30815
|
+
}
|
|
30816
|
+
res.fieldMapping = res.fieldMapping || '';
|
|
30817
|
+
delete res.formula;
|
|
30818
|
+
delete res.showValue;
|
|
30819
|
+
if (!(mode === 'create')) {
|
|
30820
|
+
_context4.next = 18;
|
|
30821
|
+
break;
|
|
30822
|
+
}
|
|
30823
|
+
bssula.request({
|
|
30824
|
+
url: "/basic/flow/businessField",
|
|
30825
|
+
method: 'POST',
|
|
30826
|
+
params: res,
|
|
30827
|
+
successMessage: '创建成功!',
|
|
30828
|
+
converter: function converter() {
|
|
30829
|
+
onParentOk();
|
|
30770
30830
|
}
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30831
|
+
});
|
|
30832
|
+
return _context4.abrupt("return");
|
|
30833
|
+
case 18:
|
|
30834
|
+
bssula.request({
|
|
30835
|
+
url: "/basic/flow/businessField/".concat(record.id),
|
|
30836
|
+
method: 'PATCH',
|
|
30837
|
+
params: res,
|
|
30838
|
+
successMessage: '修改成功!',
|
|
30839
|
+
converter: function converter() {
|
|
30840
|
+
onParentOk();
|
|
30777
30841
|
}
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
successMessage: '创建成功!',
|
|
30783
|
-
converter: function converter() {
|
|
30784
|
-
onParentOk();
|
|
30785
|
-
}
|
|
30786
|
-
});
|
|
30787
|
-
return _context4.abrupt("return");
|
|
30788
|
-
case 18:
|
|
30789
|
-
bssula.request({
|
|
30790
|
-
url: "/basic/flow/businessField/".concat(record.id),
|
|
30791
|
-
method: 'PATCH',
|
|
30792
|
-
params: res,
|
|
30793
|
-
successMessage: '修改成功!',
|
|
30794
|
-
converter: function converter() {
|
|
30795
|
-
onParentOk();
|
|
30796
|
-
}
|
|
30797
|
-
});
|
|
30798
|
-
case 19:
|
|
30799
|
-
case "end":
|
|
30800
|
-
return _context4.stop();
|
|
30801
|
-
}
|
|
30842
|
+
});
|
|
30843
|
+
case 19:
|
|
30844
|
+
case "end":
|
|
30845
|
+
return _context4.stop();
|
|
30802
30846
|
}
|
|
30803
30847
|
}, _callee4);
|
|
30804
30848
|
}));
|