@bit-sun/business-component 2.2.36 → 2.2.38
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/Functional/SearchSelect/index.d.ts +1 -1
- package/dist/index.esm.js +653 -642
- package/dist/index.js +653 -642
- 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 +861 -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 +538 -538
- package/src/components/Business/BsSulaQueryTable/index.less +219 -219
- package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
- package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
- 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 -1731
- 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 +51 -51
- 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/index.less +99 -99
- package/src/components/Business/moreTreeTable/index.md +448 -448
- package/src/components/Business/moreTreeTable/index.tsx +368 -365
- 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 +849 -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 +90 -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,33 +153,6 @@ 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
|
-
}
|
|
183
156
|
function ownKeys(object, enumerableOnly) {
|
|
184
157
|
var keys = Object.keys(object);
|
|
185
158
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -336,9 +309,14 @@ function _regeneratorRuntime() {
|
|
|
336
309
|
};
|
|
337
310
|
}
|
|
338
311
|
function maybeInvokeDelegate(delegate, context) {
|
|
339
|
-
var
|
|
340
|
-
|
|
341
|
-
|
|
312
|
+
var method = delegate.iterator[context.method];
|
|
313
|
+
if (undefined === method) {
|
|
314
|
+
if (context.delegate = null, "throw" === context.method) {
|
|
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
|
+
}
|
|
342
320
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
343
321
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
344
322
|
var info = record.arg;
|
|
@@ -552,7 +530,7 @@ function _defineProperties(target, props) {
|
|
|
552
530
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
553
531
|
descriptor.configurable = true;
|
|
554
532
|
if ("value" in descriptor) descriptor.writable = true;
|
|
555
|
-
Object.defineProperty(target,
|
|
533
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
556
534
|
}
|
|
557
535
|
}
|
|
558
536
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -564,7 +542,6 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
564
542
|
return Constructor;
|
|
565
543
|
}
|
|
566
544
|
function _defineProperty(obj, key, value) {
|
|
567
|
-
key = _toPropertyKey(key);
|
|
568
545
|
if (key in obj) {
|
|
569
546
|
Object.defineProperty(obj, key, {
|
|
570
547
|
value: value,
|
|
@@ -693,6 +670,30 @@ function _arrayWithHoles(arr) {
|
|
|
693
670
|
function _iterableToArray(iter) {
|
|
694
671
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
695
672
|
}
|
|
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
|
+
}
|
|
696
697
|
function _unsupportedIterableToArray(o, minLen) {
|
|
697
698
|
if (!o) return;
|
|
698
699
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -712,20 +713,6 @@ function _nonIterableSpread() {
|
|
|
712
713
|
function _nonIterableRest() {
|
|
713
714
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
714
715
|
}
|
|
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
|
-
}
|
|
729
716
|
|
|
730
717
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
731
718
|
var errorMessage = _objectSpread2({
|
|
@@ -2297,85 +2284,84 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
2297
2284
|
});
|
|
2298
2285
|
}
|
|
2299
2286
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
2300
|
-
var
|
|
2287
|
+
for (var key in params) {
|
|
2301
2288
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2289
|
+
(function () {
|
|
2290
|
+
var element = params[key];
|
|
2291
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
2292
|
+
var dataParams = key.split('*number*');
|
|
2293
|
+
dataParams.forEach(function (value, index) {
|
|
2294
|
+
params[value] = element[index];
|
|
2295
|
+
});
|
|
2296
|
+
delete params[key];
|
|
2297
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
2298
|
+
var _dataParams = key.split('*address*');
|
|
2299
|
+
_dataParams.forEach(function (value, index) {
|
|
2300
|
+
params[value] = element.PCDCode[index];
|
|
2301
|
+
});
|
|
2302
|
+
delete params[key];
|
|
2303
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
2304
|
+
var _dataParams2 = key.split('*costType*');
|
|
2305
|
+
// eslint-disable-next-line prefer-destructuring
|
|
2306
|
+
params[_dataParams2[0]] = element[1];
|
|
2307
|
+
delete params[key];
|
|
2308
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
2309
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
2310
|
+
_dataParams3.forEach(function (value, index) {
|
|
2311
|
+
if (index === 0) {
|
|
2312
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
2313
|
+
} else {
|
|
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;
|
|
2327
2322
|
}
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2323
|
+
delete params[key];
|
|
2324
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
2325
|
+
var _dataParams5 = key.split('*cascader*');
|
|
2326
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
2327
|
+
delete params[key];
|
|
2328
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
2329
|
+
var _dataParams6 = key.split('*date*');
|
|
2330
|
+
_dataParams6.forEach(function (value, index) {
|
|
2331
|
+
if (index === 0) {
|
|
2332
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2333
|
+
} else {
|
|
2334
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
delete params[key];
|
|
2338
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
2339
|
+
var _dataParams7 = key.split('*');
|
|
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
|
+
}
|
|
2345
2354
|
} else {
|
|
2346
|
-
params[
|
|
2347
|
-
}
|
|
2348
|
-
});
|
|
2349
|
-
delete params[key];
|
|
2350
|
-
} else if (element && key.indexOf('*') >= 0) {
|
|
2351
|
-
var _dataParams7 = key.split('*');
|
|
2352
|
-
_dataParams7.forEach(function (value, index) {
|
|
2353
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2354
|
-
});
|
|
2355
|
-
delete params[key];
|
|
2356
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2357
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2358
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2359
|
-
if (params[key][0] === 'range') {
|
|
2360
|
-
if (params[key][1][0]) {
|
|
2361
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2362
|
-
}
|
|
2363
|
-
if (params[key][1][1]) {
|
|
2364
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2355
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
2365
2356
|
}
|
|
2366
|
-
|
|
2367
|
-
|
|
2357
|
+
delete params[key];
|
|
2358
|
+
} else if (Array.isArray(element)) {
|
|
2359
|
+
params[key] = element.join(',');
|
|
2360
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2361
|
+
delete params[key];
|
|
2368
2362
|
}
|
|
2369
|
-
|
|
2370
|
-
} else if (Array.isArray(element)) {
|
|
2371
|
-
params[key] = element.join(',');
|
|
2372
|
-
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2373
|
-
delete params[key];
|
|
2374
|
-
}
|
|
2363
|
+
})();
|
|
2375
2364
|
}
|
|
2376
|
-
};
|
|
2377
|
-
for (var key in params) {
|
|
2378
|
-
_loop();
|
|
2379
2365
|
}
|
|
2380
2366
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
2381
2367
|
pageSize: pageSize,
|
|
@@ -9591,59 +9577,58 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
|
|
|
9591
9577
|
* @returns 返回处理后的查询参数
|
|
9592
9578
|
*/
|
|
9593
9579
|
function queryParams(params, flag) {
|
|
9594
|
-
var
|
|
9580
|
+
for (var key in params) {
|
|
9595
9581
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9582
|
+
(function () {
|
|
9583
|
+
var element = params[key];
|
|
9584
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
9585
|
+
var dataParams = key.split('*number*');
|
|
9586
|
+
dataParams.forEach(function (value, index) {
|
|
9587
|
+
params[value] = element[index];
|
|
9588
|
+
});
|
|
9589
|
+
delete params[key];
|
|
9590
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
9591
|
+
var _dataParams = key.split('*address*');
|
|
9592
|
+
_dataParams.forEach(function (value, index) {
|
|
9593
|
+
params[value] = element.PCDCode[index];
|
|
9594
|
+
});
|
|
9595
|
+
delete params[key];
|
|
9596
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
9597
|
+
var _dataParams2 = key.split('*costType*');
|
|
9598
|
+
// eslint-disable-next-line prefer-destructuring
|
|
9599
|
+
params[_dataParams2[0]] = element[1];
|
|
9600
|
+
delete params[key];
|
|
9601
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
9602
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
9603
|
+
_dataParams3.forEach(function (value, index) {
|
|
9604
|
+
if (index === 0) {
|
|
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;
|
|
9619
9622
|
} else {
|
|
9620
|
-
params[
|
|
9623
|
+
params["qp-".concat(_dataParams5[0], "-like")] = element;
|
|
9624
|
+
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9621
9625
|
}
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
var _dataParams4 = key.split('*');
|
|
9626
|
-
_dataParams4.forEach(function (value, index) {
|
|
9627
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9628
|
-
});
|
|
9629
|
-
delete params[key];
|
|
9630
|
-
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9631
|
-
var _dataParams5 = key.split('_likeIn_');
|
|
9632
|
-
if (element.indexOf(',') >= 0) {
|
|
9633
|
-
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9634
|
-
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9635
|
-
} else {
|
|
9636
|
-
params["qp-".concat(_dataParams5[0], "-like")] = element;
|
|
9637
|
-
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9626
|
+
delete params[key];
|
|
9627
|
+
} else if (Array.isArray(element)) {
|
|
9628
|
+
params[key] = element.join(',');
|
|
9638
9629
|
}
|
|
9639
|
-
|
|
9640
|
-
} else if (Array.isArray(element)) {
|
|
9641
|
-
params[key] = element.join(',');
|
|
9642
|
-
}
|
|
9630
|
+
})();
|
|
9643
9631
|
}
|
|
9644
|
-
};
|
|
9645
|
-
for (var key in params) {
|
|
9646
|
-
_loop();
|
|
9647
9632
|
}
|
|
9648
9633
|
return flag ? params : qs.stringify(params);
|
|
9649
9634
|
}
|
|
@@ -10173,74 +10158,76 @@ var AddSelect = function AddSelect(props) {
|
|
|
10173
10158
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
10174
10159
|
var result;
|
|
10175
10160
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10176
|
-
while (1)
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10161
|
+
while (1) {
|
|
10162
|
+
switch (_context.prev = _context.next) {
|
|
10163
|
+
case 0:
|
|
10164
|
+
if (!(bType == 'skc' && tList.some(function (i) {
|
|
10165
|
+
return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
|
|
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;
|
|
10218
10218
|
break;
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
_context.next = 25;
|
|
10232
|
-
break;
|
|
10233
|
-
case 22:
|
|
10234
|
-
_context.prev = 22;
|
|
10235
|
-
_context.t0 = _context["catch"](15);
|
|
10236
|
-
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10237
|
-
case 25:
|
|
10238
|
-
return _context.abrupt("return", result);
|
|
10239
|
-
case 26:
|
|
10240
|
-
return _context.abrupt("return", true);
|
|
10241
|
-
case 27:
|
|
10242
|
-
case "end":
|
|
10243
|
-
return _context.stop();
|
|
10219
|
+
case 22:
|
|
10220
|
+
_context.prev = 22;
|
|
10221
|
+
_context.t0 = _context["catch"](15);
|
|
10222
|
+
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10223
|
+
case 25:
|
|
10224
|
+
return _context.abrupt("return", result);
|
|
10225
|
+
case 26:
|
|
10226
|
+
return _context.abrupt("return", true);
|
|
10227
|
+
case 27:
|
|
10228
|
+
case "end":
|
|
10229
|
+
return _context.stop();
|
|
10230
|
+
}
|
|
10244
10231
|
}
|
|
10245
10232
|
}, _callee, null, [[15, 22]]);
|
|
10246
10233
|
}));
|
|
@@ -10432,27 +10419,29 @@ var AddSelect = function AddSelect(props) {
|
|
|
10432
10419
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
10433
10420
|
var isConformToTheRules, newPopValue;
|
|
10434
10421
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10435
|
-
while (1)
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10447
|
-
if (innerIndex == index) {
|
|
10448
|
-
i[item.dataIndex] = record[item.dataIndex];
|
|
10422
|
+
while (1) {
|
|
10423
|
+
switch (_context2.prev = _context2.next) {
|
|
10424
|
+
case 0:
|
|
10425
|
+
_context2.next = 2;
|
|
10426
|
+
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
10427
|
+
case 2:
|
|
10428
|
+
isConformToTheRules = _context2.sent;
|
|
10429
|
+
if (isConformToTheRules) {
|
|
10430
|
+
record[item.dataIndex] = value;
|
|
10431
|
+
} else {
|
|
10432
|
+
record[item.dataIndex] = null;
|
|
10449
10433
|
}
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10434
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10435
|
+
if (innerIndex == index) {
|
|
10436
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
10437
|
+
}
|
|
10438
|
+
return i;
|
|
10439
|
+
});
|
|
10440
|
+
setPopValue(newPopValue);
|
|
10441
|
+
case 6:
|
|
10442
|
+
case "end":
|
|
10443
|
+
return _context2.stop();
|
|
10444
|
+
}
|
|
10456
10445
|
}
|
|
10457
10446
|
}, _callee2);
|
|
10458
10447
|
}));
|
|
@@ -10512,85 +10501,84 @@ var AddSelect = function AddSelect(props) {
|
|
|
10512
10501
|
});
|
|
10513
10502
|
}
|
|
10514
10503
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
10515
|
-
var
|
|
10504
|
+
for (var key in params) {
|
|
10516
10505
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10506
|
+
(function () {
|
|
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');
|
|
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;
|
|
10542
10539
|
}
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
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');
|
|
10550
|
+
} else {
|
|
10551
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10552
|
+
}
|
|
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
|
+
}
|
|
10560
10571
|
} else {
|
|
10561
|
-
params[
|
|
10572
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
10562
10573
|
}
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10569
|
-
});
|
|
10570
|
-
delete params[key];
|
|
10571
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10572
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10573
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10574
|
-
if (params[key][0] === 'range') {
|
|
10575
|
-
if (params[key][1][0]) {
|
|
10576
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10577
|
-
}
|
|
10578
|
-
if (params[key][1][1]) {
|
|
10579
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10580
|
-
}
|
|
10581
|
-
} else {
|
|
10582
|
-
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
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];
|
|
10583
10579
|
}
|
|
10584
|
-
|
|
10585
|
-
} else if (Array.isArray(element)) {
|
|
10586
|
-
params[key] = element.join(',');
|
|
10587
|
-
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
10588
|
-
delete params[key];
|
|
10589
|
-
}
|
|
10580
|
+
})();
|
|
10590
10581
|
}
|
|
10591
|
-
};
|
|
10592
|
-
for (var key in params) {
|
|
10593
|
-
_loop();
|
|
10594
10582
|
}
|
|
10595
10583
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
10596
10584
|
pageSize: pageSize,
|
|
@@ -12045,70 +12033,72 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
12045
12033
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
12046
12034
|
var canEntryObject, _canEntryObject$error, messageInfo;
|
|
12047
12035
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
12048
|
-
while (1)
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
antd.message.warning('至少录入一条数据');
|
|
12055
|
-
return _context.abrupt("return");
|
|
12056
|
-
case 3:
|
|
12057
|
-
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12058
|
-
return d.skuCode && d.name;
|
|
12059
|
-
})) {
|
|
12060
|
-
_context.next = 6;
|
|
12061
|
-
break;
|
|
12062
|
-
}
|
|
12063
|
-
antd.message.warning('请选择商品!');
|
|
12064
|
-
return _context.abrupt("return");
|
|
12065
|
-
case 6:
|
|
12066
|
-
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12067
|
-
return d.count;
|
|
12068
|
-
})) {
|
|
12069
|
-
_context.next = 9;
|
|
12070
|
-
break;
|
|
12071
|
-
}
|
|
12072
|
-
antd.message.warning('请填写商品数量!');
|
|
12073
|
-
return _context.abrupt("return");
|
|
12074
|
-
case 9:
|
|
12075
|
-
_context.next = 11;
|
|
12076
|
-
return isSkuCanEntry(data);
|
|
12077
|
-
case 11:
|
|
12078
|
-
canEntryObject = _context.sent;
|
|
12079
|
-
if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
|
|
12080
|
-
_context.next = 16;
|
|
12081
|
-
break;
|
|
12082
|
-
}
|
|
12083
|
-
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) {
|
|
12084
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
|
|
12085
|
-
}));
|
|
12086
|
-
messageInfo && antd.message.warning({
|
|
12087
|
-
content: messageInfo,
|
|
12088
|
-
duration: 6
|
|
12089
|
-
});
|
|
12090
|
-
return _context.abrupt("return");
|
|
12091
|
-
case 16:
|
|
12092
|
-
setLoading(true);
|
|
12093
|
-
onSaveCallback(data).then(function (res) {
|
|
12094
|
-
{
|
|
12095
|
-
var _Object$keys;
|
|
12096
|
-
var initSuccessMessage = '保存成功';
|
|
12097
|
-
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
12098
|
-
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
12099
|
-
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
12100
|
-
} else {
|
|
12101
|
-
antd.message.success(initSuccessMessage);
|
|
12102
|
-
}
|
|
12036
|
+
while (1) {
|
|
12037
|
+
switch (_context.prev = _context.next) {
|
|
12038
|
+
case 0:
|
|
12039
|
+
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
12040
|
+
_context.next = 3;
|
|
12041
|
+
break;
|
|
12103
12042
|
}
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12043
|
+
antd.message.warning('至少录入一条数据');
|
|
12044
|
+
return _context.abrupt("return");
|
|
12045
|
+
case 3:
|
|
12046
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12047
|
+
return d.skuCode && d.name;
|
|
12048
|
+
})) {
|
|
12049
|
+
_context.next = 6;
|
|
12050
|
+
break;
|
|
12051
|
+
}
|
|
12052
|
+
antd.message.warning('请选择商品!');
|
|
12053
|
+
return _context.abrupt("return");
|
|
12054
|
+
case 6:
|
|
12055
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12056
|
+
return d.count;
|
|
12057
|
+
})) {
|
|
12058
|
+
_context.next = 9;
|
|
12059
|
+
break;
|
|
12060
|
+
}
|
|
12061
|
+
antd.message.warning('请填写商品数量!');
|
|
12062
|
+
return _context.abrupt("return");
|
|
12063
|
+
case 9:
|
|
12064
|
+
_context.next = 11;
|
|
12065
|
+
return isSkuCanEntry(data);
|
|
12066
|
+
case 11:
|
|
12067
|
+
canEntryObject = _context.sent;
|
|
12068
|
+
if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
|
|
12069
|
+
_context.next = 16;
|
|
12070
|
+
break;
|
|
12071
|
+
}
|
|
12072
|
+
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) {
|
|
12073
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
|
|
12074
|
+
}));
|
|
12075
|
+
messageInfo && antd.message.warning({
|
|
12076
|
+
content: messageInfo,
|
|
12077
|
+
duration: 6
|
|
12078
|
+
});
|
|
12079
|
+
return _context.abrupt("return");
|
|
12080
|
+
case 16:
|
|
12081
|
+
setLoading(true);
|
|
12082
|
+
onSaveCallback(data).then(function (res) {
|
|
12083
|
+
{
|
|
12084
|
+
var _Object$keys;
|
|
12085
|
+
var initSuccessMessage = '保存成功';
|
|
12086
|
+
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
12087
|
+
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
12088
|
+
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
12089
|
+
} else {
|
|
12090
|
+
antd.message.success(initSuccessMessage);
|
|
12091
|
+
}
|
|
12092
|
+
}
|
|
12093
|
+
setLoading(false);
|
|
12094
|
+
}).catch(function (Error) {
|
|
12095
|
+
antd.message.error(Error);
|
|
12096
|
+
setLoading(false);
|
|
12097
|
+
});
|
|
12098
|
+
case 18:
|
|
12099
|
+
case "end":
|
|
12100
|
+
return _context.stop();
|
|
12101
|
+
}
|
|
12112
12102
|
}
|
|
12113
12103
|
}, _callee);
|
|
12114
12104
|
}));
|
|
@@ -13523,6 +13513,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13523
13513
|
mappingTextField: 'name',
|
|
13524
13514
|
mappingValueField: 'code',
|
|
13525
13515
|
otherParams: {
|
|
13516
|
+
'qp-isMain-eq': 1,
|
|
13526
13517
|
'qp-status-eq': 1,
|
|
13527
13518
|
sorter: 'desc-id'
|
|
13528
13519
|
},
|
|
@@ -15360,42 +15351,44 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
15360
15351
|
var _ctx$form;
|
|
15361
15352
|
var resData, coverData, data, dataList;
|
|
15362
15353
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15363
|
-
while (1)
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
|
|
15367
|
-
|
|
15354
|
+
while (1) {
|
|
15355
|
+
switch (_context.prev = _context.next) {
|
|
15356
|
+
case 0:
|
|
15357
|
+
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
15358
|
+
if (!(resData.status === '0' || resData.code === '000000')) {
|
|
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;
|
|
15368
15374
|
break;
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15375
|
+
case 9:
|
|
15376
|
+
dataList = data && Array.isArray(data) ? data : data && [data] || [];
|
|
15377
|
+
coverData = dataList.length && dataList.map(function (ites) {
|
|
15378
|
+
return mapSearchTree(ites);
|
|
15379
|
+
}) || [];
|
|
15380
|
+
case 11:
|
|
15381
|
+
_context.next = 14;
|
|
15373
15382
|
break;
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
case 9:
|
|
15384
|
-
dataList = data && Array.isArray(data) ? data : data && [data] || [];
|
|
15385
|
-
coverData = dataList.length && dataList.map(function (ites) {
|
|
15386
|
-
return mapSearchTree(ites);
|
|
15387
|
-
}) || [];
|
|
15388
|
-
case 11:
|
|
15389
|
-
_context.next = 14;
|
|
15390
|
-
break;
|
|
15391
|
-
case 13:
|
|
15392
|
-
coverData = [];
|
|
15393
|
-
case 14:
|
|
15394
|
-
setTreeData(coverData);
|
|
15395
|
-
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
|
|
15396
|
-
case 16:
|
|
15397
|
-
case "end":
|
|
15398
|
-
return _context.stop();
|
|
15383
|
+
case 13:
|
|
15384
|
+
coverData = [];
|
|
15385
|
+
case 14:
|
|
15386
|
+
setTreeData(coverData);
|
|
15387
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
|
|
15388
|
+
case 16:
|
|
15389
|
+
case "end":
|
|
15390
|
+
return _context.stop();
|
|
15391
|
+
}
|
|
15399
15392
|
}
|
|
15400
15393
|
}, _callee);
|
|
15401
15394
|
}));
|
|
@@ -19433,19 +19426,21 @@ function _outLogin() {
|
|
|
19433
19426
|
_outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
19434
19427
|
var res;
|
|
19435
19428
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19436
|
-
while (1)
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19429
|
+
while (1) {
|
|
19430
|
+
switch (_context.prev = _context.next) {
|
|
19431
|
+
case 0:
|
|
19432
|
+
_context.next = 2;
|
|
19433
|
+
return axios__default['default']({
|
|
19434
|
+
url: '/user/web/loginOut',
|
|
19435
|
+
method: 'GET'
|
|
19436
|
+
});
|
|
19437
|
+
case 2:
|
|
19438
|
+
res = _context.sent;
|
|
19439
|
+
return _context.abrupt("return", res);
|
|
19440
|
+
case 4:
|
|
19441
|
+
case "end":
|
|
19442
|
+
return _context.stop();
|
|
19443
|
+
}
|
|
19449
19444
|
}
|
|
19450
19445
|
}, _callee);
|
|
19451
19446
|
}));
|
|
@@ -19574,29 +19569,31 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19574
19569
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19575
19570
|
var sessionId;
|
|
19576
19571
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19577
|
-
while (1)
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
case 5:
|
|
19588
|
-
// @ts-ignore
|
|
19589
|
-
if (BUILD_TYPE) {
|
|
19590
|
-
antd.message.success('退出登录成功');
|
|
19591
|
-
umi.history.replace({
|
|
19592
|
-
pathname: '/user/login'
|
|
19572
|
+
while (1) {
|
|
19573
|
+
switch (_context.prev = _context.next) {
|
|
19574
|
+
case 0:
|
|
19575
|
+
_context.next = 2;
|
|
19576
|
+
return getSessionId();
|
|
19577
|
+
case 2:
|
|
19578
|
+
sessionId = _context.sent;
|
|
19579
|
+
_context.next = 5;
|
|
19580
|
+
return outLogin({
|
|
19581
|
+
sessionId: sessionId
|
|
19593
19582
|
});
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19583
|
+
case 5:
|
|
19584
|
+
// @ts-ignore
|
|
19585
|
+
if (BUILD_TYPE) {
|
|
19586
|
+
antd.message.success('退出登录成功');
|
|
19587
|
+
umi.history.replace({
|
|
19588
|
+
pathname: '/user/login'
|
|
19589
|
+
});
|
|
19590
|
+
} else {
|
|
19591
|
+
setLoginOutPath();
|
|
19592
|
+
}
|
|
19593
|
+
case 6:
|
|
19594
|
+
case "end":
|
|
19595
|
+
return _context.stop();
|
|
19596
|
+
}
|
|
19600
19597
|
}
|
|
19601
19598
|
}, _callee);
|
|
19602
19599
|
}));
|
|
@@ -21424,7 +21421,6 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
21424
21421
|
showSubMenu: isShow
|
|
21425
21422
|
});
|
|
21426
21423
|
}, 500);
|
|
21427
|
-
//设置tabs标签左右滚动
|
|
21428
21424
|
_this.setTabNavTransLate = function (num) {
|
|
21429
21425
|
var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
|
|
21430
21426
|
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];
|
|
@@ -22105,12 +22101,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
22105
22101
|
request: function () {
|
|
22106
22102
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
22107
22103
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22108
|
-
while (1)
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22104
|
+
while (1) {
|
|
22105
|
+
switch (_context.prev = _context.next) {
|
|
22106
|
+
case 0:
|
|
22107
|
+
return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
|
|
22108
|
+
case 1:
|
|
22109
|
+
case "end":
|
|
22110
|
+
return _context.stop();
|
|
22111
|
+
}
|
|
22114
22112
|
}
|
|
22115
22113
|
}, _callee);
|
|
22116
22114
|
}));
|
|
@@ -22636,10 +22634,13 @@ var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
22636
22634
|
}, /*#__PURE__*/React__default['default'].createElement("tbody", null, config.colLastData.map(function (item, index) {
|
|
22637
22635
|
var fixedTop = item.fixed ? "".concat(index * 40 + config.colHeaderToTop, "px") : 0;
|
|
22638
22636
|
return /*#__PURE__*/React__default['default'].createElement("tr", null, colTableData.map(function (record, index) {
|
|
22639
|
-
var _record$_rowConfig;
|
|
22637
|
+
var _record$_rowConfig, _item$onCell;
|
|
22640
22638
|
var tdHidden = (record === null || record === void 0 ? void 0 : (_record$_rowConfig = record['_rowConfig']) === null || _record$_rowConfig === void 0 ? void 0 : _record$_rowConfig.hidden) ? 'none' : 'table-cell';
|
|
22639
|
+
var onCellResult = ((_item$onCell = item.onCell) === null || _item$onCell === void 0 ? void 0 : _item$onCell.call(item, record, index)) || {};
|
|
22640
|
+
var _onCellResult$addStyl = onCellResult.addStyle,
|
|
22641
|
+
addStyle = _onCellResult$addStyl === void 0 ? {} : _onCellResult$addStyl;
|
|
22641
22642
|
return /*#__PURE__*/React__default['default'].createElement("td", {
|
|
22642
|
-
style: {
|
|
22643
|
+
style: _objectSpread2(_objectSpread2({}, addStyle), {}, {
|
|
22643
22644
|
display: tdHidden,
|
|
22644
22645
|
background: index % 2 === 1 || item.fixed ? '#f7f8fb' : '#fff',
|
|
22645
22646
|
minWidth: '100px',
|
|
@@ -22649,7 +22650,7 @@ var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
22649
22650
|
top: fixedTop,
|
|
22650
22651
|
color: item.fixed ? '#000000' : 'inherit',
|
|
22651
22652
|
zIndex: item.fixed ? 10 : ''
|
|
22652
|
-
}
|
|
22653
|
+
})
|
|
22653
22654
|
}, item.render ? item.render({
|
|
22654
22655
|
text: record[item.key || item.dataIndex],
|
|
22655
22656
|
record: record,
|
|
@@ -29670,26 +29671,28 @@ var valueType = {
|
|
|
29670
29671
|
var getDynamicDict = /*#__PURE__*/function () {
|
|
29671
29672
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
|
|
29672
29673
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29673
|
-
while (1)
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29677
|
-
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
|
|
29681
|
-
return {
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29674
|
+
while (1) {
|
|
29675
|
+
switch (_context.prev = _context.next) {
|
|
29676
|
+
case 0:
|
|
29677
|
+
_context.next = 2;
|
|
29678
|
+
return bssula.request({
|
|
29679
|
+
url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
|
|
29680
|
+
converter: function converter(_ref2) {
|
|
29681
|
+
var data = _ref2.data;
|
|
29682
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
29683
|
+
return {
|
|
29684
|
+
text: d.name,
|
|
29685
|
+
value: d.code || d.brandCode
|
|
29686
|
+
};
|
|
29687
|
+
});
|
|
29688
|
+
}
|
|
29689
|
+
});
|
|
29690
|
+
case 2:
|
|
29691
|
+
return _context.abrupt("return", _context.sent);
|
|
29692
|
+
case 3:
|
|
29693
|
+
case "end":
|
|
29694
|
+
return _context.stop();
|
|
29695
|
+
}
|
|
29693
29696
|
}
|
|
29694
29697
|
}, _callee);
|
|
29695
29698
|
}));
|
|
@@ -29739,53 +29742,55 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29739
29742
|
ahooks.useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29740
29743
|
var _ref$current, source;
|
|
29741
29744
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29742
|
-
while (1)
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29745
|
+
while (1) {
|
|
29746
|
+
switch (_context.prev = _context.next) {
|
|
29747
|
+
case 0:
|
|
29748
|
+
_context.next = 2;
|
|
29749
|
+
return setIsShowAndType(function (prev) {
|
|
29750
|
+
if (record.inputType === 20 || record.inputType === 30) {
|
|
29751
|
+
return {
|
|
29752
|
+
isShow: true,
|
|
29753
|
+
singleOrMultiple: record.inputType,
|
|
29754
|
+
type: record.choiceType
|
|
29755
|
+
};
|
|
29756
|
+
}
|
|
29757
|
+
return prev;
|
|
29758
|
+
});
|
|
29759
|
+
case 2:
|
|
29760
|
+
if (!record.dictionaryCode) {
|
|
29761
|
+
_context.next = 17;
|
|
29762
|
+
break;
|
|
29752
29763
|
}
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29757
|
-
_context.
|
|
29758
|
-
|
|
29759
|
-
}
|
|
29760
|
-
if (!(record.choiceType == 20)) {
|
|
29761
|
-
_context.next = 7;
|
|
29764
|
+
if (!(record.choiceType == 20)) {
|
|
29765
|
+
_context.next = 7;
|
|
29766
|
+
break;
|
|
29767
|
+
}
|
|
29768
|
+
_context.t0 = getDictionarySource(record.dictionaryCode);
|
|
29769
|
+
_context.next = 15;
|
|
29762
29770
|
break;
|
|
29763
|
-
|
|
29764
|
-
|
|
29765
|
-
|
|
29766
|
-
|
|
29767
|
-
|
|
29768
|
-
|
|
29769
|
-
|
|
29771
|
+
case 7:
|
|
29772
|
+
if (!(record.choiceType == 30)) {
|
|
29773
|
+
_context.next = 13;
|
|
29774
|
+
break;
|
|
29775
|
+
}
|
|
29776
|
+
_context.next = 10;
|
|
29777
|
+
return getDynamicDict(record.dictionaryCode);
|
|
29778
|
+
case 10:
|
|
29779
|
+
_context.t1 = _context.sent;
|
|
29780
|
+
_context.next = 14;
|
|
29770
29781
|
break;
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
source = _context.t0;
|
|
29784
|
-
// @ts-ignore
|
|
29785
|
-
ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
|
|
29786
|
-
case 17:
|
|
29787
|
-
case "end":
|
|
29788
|
-
return _context.stop();
|
|
29782
|
+
case 13:
|
|
29783
|
+
_context.t1 = [];
|
|
29784
|
+
case 14:
|
|
29785
|
+
_context.t0 = _context.t1;
|
|
29786
|
+
case 15:
|
|
29787
|
+
source = _context.t0;
|
|
29788
|
+
// @ts-ignore
|
|
29789
|
+
ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
|
|
29790
|
+
case 17:
|
|
29791
|
+
case "end":
|
|
29792
|
+
return _context.stop();
|
|
29793
|
+
}
|
|
29789
29794
|
}
|
|
29790
29795
|
}, _callee);
|
|
29791
29796
|
})));
|
|
@@ -29853,28 +29858,30 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29853
29858
|
var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
29854
29859
|
var form, values, name, relates, source;
|
|
29855
29860
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
29856
|
-
while (1)
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29861
|
+
while (1) {
|
|
29862
|
+
switch (_context2.prev = _context2.next) {
|
|
29863
|
+
case 0:
|
|
29864
|
+
form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
|
|
29865
|
+
if (values[0]) {
|
|
29866
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29867
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29868
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
29869
|
+
}
|
|
29870
|
+
if (!values[1]) {
|
|
29871
|
+
_context2.next = 9;
|
|
29872
|
+
break;
|
|
29873
|
+
}
|
|
29874
|
+
_context2.next = 5;
|
|
29875
|
+
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
29876
|
+
case 5:
|
|
29877
|
+
source = _context2.sent;
|
|
29860
29878
|
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29861
29879
|
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29862
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0],
|
|
29863
|
-
|
|
29864
|
-
|
|
29865
|
-
_context2.
|
|
29866
|
-
|
|
29867
|
-
}
|
|
29868
|
-
_context2.next = 5;
|
|
29869
|
-
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
29870
|
-
case 5:
|
|
29871
|
-
source = _context2.sent;
|
|
29872
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29873
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29874
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
|
|
29875
|
-
case 9:
|
|
29876
|
-
case "end":
|
|
29877
|
-
return _context2.stop();
|
|
29880
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
|
|
29881
|
+
case 9:
|
|
29882
|
+
case "end":
|
|
29883
|
+
return _context2.stop();
|
|
29884
|
+
}
|
|
29878
29885
|
}
|
|
29879
29886
|
}, _callee2);
|
|
29880
29887
|
}));
|
|
@@ -30334,41 +30341,43 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30334
30341
|
var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
|
|
30335
30342
|
var values, name, form, source;
|
|
30336
30343
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
30337
|
-
while (1)
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
if (!(values[0] === 30)) {
|
|
30345
|
-
_context3.next = 10;
|
|
30346
|
-
break;
|
|
30347
|
-
}
|
|
30348
|
-
_context3.next = 5;
|
|
30349
|
-
return bssula.request({
|
|
30350
|
-
url: '/basic/dictDynamicItem/queryList',
|
|
30351
|
-
converter: function converter(_ref11) {
|
|
30352
|
-
var data = _ref11.data;
|
|
30353
|
-
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30354
|
-
return {
|
|
30355
|
-
text: d.dictCode,
|
|
30356
|
-
value: d.dictCode
|
|
30357
|
-
};
|
|
30358
|
-
});
|
|
30344
|
+
while (1) {
|
|
30345
|
+
switch (_context3.prev = _context3.next) {
|
|
30346
|
+
case 0:
|
|
30347
|
+
values = _ref10.values, name = _ref10.name, form = _ref10.form;
|
|
30348
|
+
if (values[1] === 40) {
|
|
30349
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30350
|
+
form.setFieldVisible(name, false);
|
|
30359
30351
|
}
|
|
30360
|
-
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
|
|
30365
|
-
|
|
30366
|
-
|
|
30367
|
-
|
|
30368
|
-
|
|
30369
|
-
|
|
30370
|
-
|
|
30371
|
-
|
|
30352
|
+
if (!(values[0] === 30)) {
|
|
30353
|
+
_context3.next = 10;
|
|
30354
|
+
break;
|
|
30355
|
+
}
|
|
30356
|
+
_context3.next = 5;
|
|
30357
|
+
return bssula.request({
|
|
30358
|
+
url: '/basic/dictDynamicItem/queryList',
|
|
30359
|
+
converter: function converter(_ref11) {
|
|
30360
|
+
var data = _ref11.data;
|
|
30361
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30362
|
+
return {
|
|
30363
|
+
text: d.dictCode,
|
|
30364
|
+
value: d.dictCode
|
|
30365
|
+
};
|
|
30366
|
+
});
|
|
30367
|
+
}
|
|
30368
|
+
});
|
|
30369
|
+
case 5:
|
|
30370
|
+
source = _context3.sent;
|
|
30371
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30372
|
+
form.setFieldVisible(name, true);
|
|
30373
|
+
_context3.next = 11;
|
|
30374
|
+
break;
|
|
30375
|
+
case 10:
|
|
30376
|
+
form.setFieldVisible(name, false);
|
|
30377
|
+
case 11:
|
|
30378
|
+
case "end":
|
|
30379
|
+
return _context3.stop();
|
|
30380
|
+
}
|
|
30372
30381
|
}
|
|
30373
30382
|
}, _callee3);
|
|
30374
30383
|
}));
|
|
@@ -30557,64 +30566,66 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30557
30566
|
var _ref$current4, _res$editableStatus;
|
|
30558
30567
|
var res, _res$defaultValue;
|
|
30559
30568
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30560
|
-
while (1)
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30566
|
-
|
|
30567
|
-
|
|
30568
|
-
|
|
30569
|
-
|
|
30570
|
-
|
|
30571
|
-
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
|
|
30579
|
-
|
|
30580
|
-
res.
|
|
30581
|
-
|
|
30582
|
-
// 把数组处理成文本
|
|
30583
|
-
if (res.inputType === 30) {
|
|
30584
|
-
if (res.defaultValue) {
|
|
30585
|
-
res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
|
|
30569
|
+
while (1) {
|
|
30570
|
+
switch (_context4.prev = _context4.next) {
|
|
30571
|
+
case 0:
|
|
30572
|
+
_context4.next = 2;
|
|
30573
|
+
return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
|
|
30574
|
+
case 2:
|
|
30575
|
+
res = _context4.sent;
|
|
30576
|
+
res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
|
|
30577
|
+
res.fieldGroup = record.fieldGroup;
|
|
30578
|
+
res.businessType = record.businessType;
|
|
30579
|
+
res.info = {
|
|
30580
|
+
enumeration: res.enumeration,
|
|
30581
|
+
dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
|
|
30582
|
+
formula: res.formula,
|
|
30583
|
+
scale: res.scale,
|
|
30584
|
+
variable: res.variable
|
|
30585
|
+
};
|
|
30586
|
+
res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
|
|
30587
|
+
res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
|
|
30588
|
+
res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
|
|
30589
|
+
if (res.inputType === 40) {
|
|
30590
|
+
res.valueType = 22;
|
|
30586
30591
|
}
|
|
30587
|
-
|
|
30588
|
-
|
|
30589
|
-
|
|
30590
|
-
|
|
30591
|
-
|
|
30592
|
-
_context4.next = 18;
|
|
30593
|
-
break;
|
|
30594
|
-
}
|
|
30595
|
-
bssula.request({
|
|
30596
|
-
url: "/basic/flow/businessField",
|
|
30597
|
-
method: 'POST',
|
|
30598
|
-
params: res,
|
|
30599
|
-
successMessage: '创建成功!',
|
|
30600
|
-
converter: function converter() {
|
|
30601
|
-
onParentOk();
|
|
30592
|
+
// 把数组处理成文本
|
|
30593
|
+
if (res.inputType === 30) {
|
|
30594
|
+
if (res.defaultValue) {
|
|
30595
|
+
res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
|
|
30596
|
+
}
|
|
30602
30597
|
}
|
|
30603
|
-
|
|
30604
|
-
|
|
30605
|
-
|
|
30606
|
-
|
|
30607
|
-
|
|
30608
|
-
|
|
30609
|
-
params: res,
|
|
30610
|
-
successMessage: '修改成功!',
|
|
30611
|
-
converter: function converter() {
|
|
30612
|
-
onParentOk();
|
|
30598
|
+
res.fieldMapping = res.fieldMapping || '';
|
|
30599
|
+
delete res.formula;
|
|
30600
|
+
delete res.showValue;
|
|
30601
|
+
if (!(mode === 'create')) {
|
|
30602
|
+
_context4.next = 18;
|
|
30603
|
+
break;
|
|
30613
30604
|
}
|
|
30614
|
-
|
|
30615
|
-
|
|
30616
|
-
|
|
30617
|
-
|
|
30605
|
+
bssula.request({
|
|
30606
|
+
url: "/basic/flow/businessField",
|
|
30607
|
+
method: 'POST',
|
|
30608
|
+
params: res,
|
|
30609
|
+
successMessage: '创建成功!',
|
|
30610
|
+
converter: function converter() {
|
|
30611
|
+
onParentOk();
|
|
30612
|
+
}
|
|
30613
|
+
});
|
|
30614
|
+
return _context4.abrupt("return");
|
|
30615
|
+
case 18:
|
|
30616
|
+
bssula.request({
|
|
30617
|
+
url: "/basic/flow/businessField/".concat(record.id),
|
|
30618
|
+
method: 'PATCH',
|
|
30619
|
+
params: res,
|
|
30620
|
+
successMessage: '修改成功!',
|
|
30621
|
+
converter: function converter() {
|
|
30622
|
+
onParentOk();
|
|
30623
|
+
}
|
|
30624
|
+
});
|
|
30625
|
+
case 19:
|
|
30626
|
+
case "end":
|
|
30627
|
+
return _context4.stop();
|
|
30628
|
+
}
|
|
30618
30629
|
}
|
|
30619
30630
|
}, _callee4);
|
|
30620
30631
|
}));
|