@bit-sun/business-component 2.2.35 → 2.2.36
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/JsonQueryTable/static.d.ts +1 -1
- 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 +657 -649
- package/dist/index.js +657 -649
- 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 +1 -1
- 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 +1731 -1730
- 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 +23 -23
- 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 -1272
- 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 -766
- 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.esm.js
CHANGED
|
@@ -135,6 +135,33 @@ axios.interceptors.request.use(function (config) {
|
|
|
135
135
|
return config;
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
+
function _iterableToArrayLimit(arr, i) {
|
|
139
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
140
|
+
if (null != _i) {
|
|
141
|
+
var _s,
|
|
142
|
+
_e,
|
|
143
|
+
_x,
|
|
144
|
+
_r,
|
|
145
|
+
_arr = [],
|
|
146
|
+
_n = !0,
|
|
147
|
+
_d = !1;
|
|
148
|
+
try {
|
|
149
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
150
|
+
if (Object(_i) !== _i) return;
|
|
151
|
+
_n = !1;
|
|
152
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
153
|
+
} catch (err) {
|
|
154
|
+
_d = !0, _e = err;
|
|
155
|
+
} finally {
|
|
156
|
+
try {
|
|
157
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
158
|
+
} finally {
|
|
159
|
+
if (_d) throw _e;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return _arr;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
138
165
|
function ownKeys(object, enumerableOnly) {
|
|
139
166
|
var keys = Object.keys(object);
|
|
140
167
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -291,14 +318,9 @@ function _regeneratorRuntime() {
|
|
|
291
318
|
};
|
|
292
319
|
}
|
|
293
320
|
function maybeInvokeDelegate(delegate, context) {
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
298
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
299
|
-
}
|
|
300
|
-
return ContinueSentinel;
|
|
301
|
-
}
|
|
321
|
+
var methodName = context.method,
|
|
322
|
+
method = delegate.iterator[methodName];
|
|
323
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
302
324
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
303
325
|
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
304
326
|
var info = record.arg;
|
|
@@ -512,7 +534,7 @@ function _defineProperties(target, props) {
|
|
|
512
534
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
513
535
|
descriptor.configurable = true;
|
|
514
536
|
if ("value" in descriptor) descriptor.writable = true;
|
|
515
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
537
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
516
538
|
}
|
|
517
539
|
}
|
|
518
540
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
@@ -524,6 +546,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
524
546
|
return Constructor;
|
|
525
547
|
}
|
|
526
548
|
function _defineProperty(obj, key, value) {
|
|
549
|
+
key = _toPropertyKey(key);
|
|
527
550
|
if (key in obj) {
|
|
528
551
|
Object.defineProperty(obj, key, {
|
|
529
552
|
value: value,
|
|
@@ -652,30 +675,6 @@ function _arrayWithHoles(arr) {
|
|
|
652
675
|
function _iterableToArray(iter) {
|
|
653
676
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
654
677
|
}
|
|
655
|
-
function _iterableToArrayLimit(arr, i) {
|
|
656
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
657
|
-
if (_i == null) return;
|
|
658
|
-
var _arr = [];
|
|
659
|
-
var _n = true;
|
|
660
|
-
var _d = false;
|
|
661
|
-
var _s, _e;
|
|
662
|
-
try {
|
|
663
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
664
|
-
_arr.push(_s.value);
|
|
665
|
-
if (i && _arr.length === i) break;
|
|
666
|
-
}
|
|
667
|
-
} catch (err) {
|
|
668
|
-
_d = true;
|
|
669
|
-
_e = err;
|
|
670
|
-
} finally {
|
|
671
|
-
try {
|
|
672
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
673
|
-
} finally {
|
|
674
|
-
if (_d) throw _e;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
return _arr;
|
|
678
|
-
}
|
|
679
678
|
function _unsupportedIterableToArray(o, minLen) {
|
|
680
679
|
if (!o) return;
|
|
681
680
|
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
@@ -695,6 +694,20 @@ function _nonIterableSpread() {
|
|
|
695
694
|
function _nonIterableRest() {
|
|
696
695
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
697
696
|
}
|
|
697
|
+
function _toPrimitive(input, hint) {
|
|
698
|
+
if (typeof input !== "object" || input === null) return input;
|
|
699
|
+
var prim = input[Symbol.toPrimitive];
|
|
700
|
+
if (prim !== undefined) {
|
|
701
|
+
var res = prim.call(input, hint || "default");
|
|
702
|
+
if (typeof res !== "object") return res;
|
|
703
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
704
|
+
}
|
|
705
|
+
return (hint === "string" ? String : Number)(input);
|
|
706
|
+
}
|
|
707
|
+
function _toPropertyKey(arg) {
|
|
708
|
+
var key = _toPrimitive(arg, "string");
|
|
709
|
+
return typeof key === "symbol" ? key : String(key);
|
|
710
|
+
}
|
|
698
711
|
|
|
699
712
|
var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
|
|
700
713
|
var errorMessage = _objectSpread2({
|
|
@@ -2266,84 +2279,85 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
2266
2279
|
});
|
|
2267
2280
|
}
|
|
2268
2281
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
2269
|
-
|
|
2282
|
+
var _loop = function _loop() {
|
|
2270
2283
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2297
|
-
}
|
|
2298
|
-
});
|
|
2299
|
-
delete params[key];
|
|
2300
|
-
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2301
|
-
var _dataParams4 = key.split('*checkBox*');
|
|
2302
|
-
if (element) {
|
|
2303
|
-
params[_dataParams4[0]] = 0;
|
|
2284
|
+
var element = params[key];
|
|
2285
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
2286
|
+
var dataParams = key.split('*number*');
|
|
2287
|
+
dataParams.forEach(function (value, index) {
|
|
2288
|
+
params[value] = element[index];
|
|
2289
|
+
});
|
|
2290
|
+
delete params[key];
|
|
2291
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
2292
|
+
var _dataParams = key.split('*address*');
|
|
2293
|
+
_dataParams.forEach(function (value, index) {
|
|
2294
|
+
params[value] = element.PCDCode[index];
|
|
2295
|
+
});
|
|
2296
|
+
delete params[key];
|
|
2297
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
2298
|
+
var _dataParams2 = key.split('*costType*');
|
|
2299
|
+
// eslint-disable-next-line prefer-destructuring
|
|
2300
|
+
params[_dataParams2[0]] = element[1];
|
|
2301
|
+
delete params[key];
|
|
2302
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
2303
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
2304
|
+
_dataParams3.forEach(function (value, index) {
|
|
2305
|
+
if (index === 0) {
|
|
2306
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
2307
|
+
} else {
|
|
2308
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
2304
2309
|
}
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
_dataParams7.forEach(function (value, index) {
|
|
2323
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2324
|
-
});
|
|
2325
|
-
delete params[key];
|
|
2326
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2327
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2328
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2329
|
-
if (params[key][0] === 'range') {
|
|
2330
|
-
if (params[key][1][0]) {
|
|
2331
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2332
|
-
}
|
|
2333
|
-
if (params[key][1][1]) {
|
|
2334
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2335
|
-
}
|
|
2310
|
+
});
|
|
2311
|
+
delete params[key];
|
|
2312
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
2313
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
2314
|
+
if (element) {
|
|
2315
|
+
params[_dataParams4[0]] = 0;
|
|
2316
|
+
}
|
|
2317
|
+
delete params[key];
|
|
2318
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
2319
|
+
var _dataParams5 = key.split('*cascader*');
|
|
2320
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
2321
|
+
delete params[key];
|
|
2322
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
2323
|
+
var _dataParams6 = key.split('*date*');
|
|
2324
|
+
_dataParams6.forEach(function (value, index) {
|
|
2325
|
+
if (index === 0) {
|
|
2326
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2336
2327
|
} else {
|
|
2337
|
-
params[
|
|
2328
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
delete params[key];
|
|
2332
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
2333
|
+
var _dataParams7 = key.split('*');
|
|
2334
|
+
_dataParams7.forEach(function (value, index) {
|
|
2335
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
2336
|
+
});
|
|
2337
|
+
delete params[key];
|
|
2338
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
2339
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
2340
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
2341
|
+
if (params[key][0] === 'range') {
|
|
2342
|
+
if (params[key][1][0]) {
|
|
2343
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
2344
|
+
}
|
|
2345
|
+
if (params[key][1][1]) {
|
|
2346
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
2338
2347
|
}
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
params[key] = element.join(',');
|
|
2342
|
-
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2343
|
-
delete params[key];
|
|
2348
|
+
} else {
|
|
2349
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
2344
2350
|
}
|
|
2345
|
-
|
|
2351
|
+
delete params[key];
|
|
2352
|
+
} else if (Array.isArray(element)) {
|
|
2353
|
+
params[key] = element.join(',');
|
|
2354
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
2355
|
+
delete params[key];
|
|
2356
|
+
}
|
|
2346
2357
|
}
|
|
2358
|
+
};
|
|
2359
|
+
for (var key in params) {
|
|
2360
|
+
_loop();
|
|
2347
2361
|
}
|
|
2348
2362
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
2349
2363
|
pageSize: pageSize,
|
|
@@ -9559,58 +9573,59 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
|
|
|
9559
9573
|
* @returns 返回处理后的查询参数
|
|
9560
9574
|
*/
|
|
9561
9575
|
function queryParams(params, flag) {
|
|
9562
|
-
|
|
9576
|
+
var _loop = function _loop() {
|
|
9563
9577
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9588
|
-
} else {
|
|
9589
|
-
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9590
|
-
}
|
|
9591
|
-
});
|
|
9592
|
-
delete params[key];
|
|
9593
|
-
} else if (element && key.indexOf('*') >= 0) {
|
|
9594
|
-
var _dataParams4 = key.split('*');
|
|
9595
|
-
_dataParams4.forEach(function (value, index) {
|
|
9596
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9597
|
-
});
|
|
9598
|
-
delete params[key];
|
|
9599
|
-
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9600
|
-
var _dataParams5 = key.split('_likeIn_');
|
|
9601
|
-
if (element.indexOf(',') >= 0) {
|
|
9602
|
-
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9603
|
-
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9578
|
+
var element = params[key];
|
|
9579
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
9580
|
+
var dataParams = key.split('*number*');
|
|
9581
|
+
dataParams.forEach(function (value, index) {
|
|
9582
|
+
params[value] = element[index];
|
|
9583
|
+
});
|
|
9584
|
+
delete params[key];
|
|
9585
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
9586
|
+
var _dataParams = key.split('*address*');
|
|
9587
|
+
_dataParams.forEach(function (value, index) {
|
|
9588
|
+
params[value] = element.PCDCode[index];
|
|
9589
|
+
});
|
|
9590
|
+
delete params[key];
|
|
9591
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
9592
|
+
var _dataParams2 = key.split('*costType*');
|
|
9593
|
+
// eslint-disable-next-line prefer-destructuring
|
|
9594
|
+
params[_dataParams2[0]] = element[1];
|
|
9595
|
+
delete params[key];
|
|
9596
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
9597
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
9598
|
+
_dataParams3.forEach(function (value, index) {
|
|
9599
|
+
if (index === 0) {
|
|
9600
|
+
params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
9604
9601
|
} else {
|
|
9605
|
-
params[
|
|
9606
|
-
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9602
|
+
params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
9607
9603
|
}
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9604
|
+
});
|
|
9605
|
+
delete params[key];
|
|
9606
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
9607
|
+
var _dataParams4 = key.split('*');
|
|
9608
|
+
_dataParams4.forEach(function (value, index) {
|
|
9609
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
9610
|
+
});
|
|
9611
|
+
delete params[key];
|
|
9612
|
+
} else if (element && key.indexOf('_likeIn_') >= 0) {
|
|
9613
|
+
var _dataParams5 = key.split('_likeIn_');
|
|
9614
|
+
if (element.indexOf(',') >= 0) {
|
|
9615
|
+
params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
|
|
9616
|
+
params["qp-".concat(_dataParams5[0], "-like")] = null;
|
|
9617
|
+
} else {
|
|
9618
|
+
params["qp-".concat(_dataParams5[0], "-like")] = element;
|
|
9619
|
+
params["qp-".concat(_dataParams5[0], "-in")] = null;
|
|
9611
9620
|
}
|
|
9612
|
-
|
|
9621
|
+
delete params[key];
|
|
9622
|
+
} else if (Array.isArray(element)) {
|
|
9623
|
+
params[key] = element.join(',');
|
|
9624
|
+
}
|
|
9613
9625
|
}
|
|
9626
|
+
};
|
|
9627
|
+
for (var key in params) {
|
|
9628
|
+
_loop();
|
|
9614
9629
|
}
|
|
9615
9630
|
return flag ? params : qs.stringify(params);
|
|
9616
9631
|
}
|
|
@@ -10140,76 +10155,74 @@ var AddSelect = function AddSelect(props) {
|
|
|
10140
10155
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
|
|
10141
10156
|
var result;
|
|
10142
10157
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10143
|
-
while (1) {
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
_context.next = 3;
|
|
10150
|
-
break;
|
|
10151
|
-
}
|
|
10152
|
-
message.warning('相同skc配码不可设置相同哦');
|
|
10153
|
-
return _context.abrupt("return", false);
|
|
10154
|
-
case 3:
|
|
10155
|
-
if (!(bType == 'spu')) {
|
|
10156
|
-
_context.next = 26;
|
|
10157
|
-
break;
|
|
10158
|
-
}
|
|
10159
|
-
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10160
|
-
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10161
|
-
}))) {
|
|
10162
|
-
_context.next = 7;
|
|
10163
|
-
break;
|
|
10164
|
-
}
|
|
10165
|
-
message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10166
|
-
return _context.abrupt("return", false);
|
|
10167
|
-
case 7:
|
|
10168
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10169
|
-
_context.next = 10;
|
|
10170
|
-
break;
|
|
10171
|
-
}
|
|
10172
|
-
message.warning('请先选择颜色!');
|
|
10173
|
-
return _context.abrupt("return", false);
|
|
10174
|
-
case 10:
|
|
10175
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10176
|
-
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10177
|
-
}))) {
|
|
10178
|
-
_context.next = 13;
|
|
10179
|
-
break;
|
|
10180
|
-
}
|
|
10181
|
-
message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10182
|
-
return _context.abrupt("return", false);
|
|
10183
|
-
case 13:
|
|
10184
|
-
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10185
|
-
_context.next = 26;
|
|
10186
|
-
break;
|
|
10187
|
-
}
|
|
10188
|
-
result = true;
|
|
10189
|
-
_context.prev = 15;
|
|
10190
|
-
_context.next = 18;
|
|
10191
|
-
return checkSpuMatchCode({
|
|
10192
|
-
skcCode: recordItem[recordKey],
|
|
10193
|
-
matchingCode: changeValue,
|
|
10194
|
-
ext1: recordItem.colorName
|
|
10195
|
-
});
|
|
10196
|
-
case 18:
|
|
10197
|
-
result = _context.sent;
|
|
10198
|
-
result = true;
|
|
10199
|
-
_context.next = 25;
|
|
10158
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10159
|
+
case 0:
|
|
10160
|
+
if (!(bType == 'skc' && tList.some(function (i) {
|
|
10161
|
+
return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
|
|
10162
|
+
}))) {
|
|
10163
|
+
_context.next = 3;
|
|
10200
10164
|
break;
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
|
|
10165
|
+
}
|
|
10166
|
+
message.warning('相同skc配码不可设置相同哦');
|
|
10167
|
+
return _context.abrupt("return", false);
|
|
10168
|
+
case 3:
|
|
10169
|
+
if (!(bType == 'spu')) {
|
|
10170
|
+
_context.next = 26;
|
|
10171
|
+
break;
|
|
10172
|
+
}
|
|
10173
|
+
if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
|
|
10174
|
+
return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
|
|
10175
|
+
}))) {
|
|
10176
|
+
_context.next = 7;
|
|
10177
|
+
break;
|
|
10178
|
+
}
|
|
10179
|
+
message.warning('相同商品相同配码颜色不可设置相同哦');
|
|
10180
|
+
return _context.abrupt("return", false);
|
|
10181
|
+
case 7:
|
|
10182
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
|
|
10183
|
+
_context.next = 10;
|
|
10184
|
+
break;
|
|
10185
|
+
}
|
|
10186
|
+
message.warning('请先选择颜色!');
|
|
10187
|
+
return _context.abrupt("return", false);
|
|
10188
|
+
case 10:
|
|
10189
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
|
|
10190
|
+
return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
|
|
10191
|
+
}))) {
|
|
10192
|
+
_context.next = 13;
|
|
10193
|
+
break;
|
|
10194
|
+
}
|
|
10195
|
+
message.warning('相同商品相同颜色配码不可设置相同哦');
|
|
10196
|
+
return _context.abrupt("return", false);
|
|
10197
|
+
case 13:
|
|
10198
|
+
if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
|
|
10199
|
+
_context.next = 26;
|
|
10200
|
+
break;
|
|
10201
|
+
}
|
|
10202
|
+
result = true;
|
|
10203
|
+
_context.prev = 15;
|
|
10204
|
+
_context.next = 18;
|
|
10205
|
+
return checkSpuMatchCode({
|
|
10206
|
+
skcCode: recordItem[recordKey],
|
|
10207
|
+
matchingCode: changeValue,
|
|
10208
|
+
ext1: recordItem.colorName
|
|
10209
|
+
});
|
|
10210
|
+
case 18:
|
|
10211
|
+
result = _context.sent;
|
|
10212
|
+
result = true;
|
|
10213
|
+
_context.next = 25;
|
|
10214
|
+
break;
|
|
10215
|
+
case 22:
|
|
10216
|
+
_context.prev = 22;
|
|
10217
|
+
_context.t0 = _context["catch"](15);
|
|
10218
|
+
result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
|
|
10219
|
+
case 25:
|
|
10220
|
+
return _context.abrupt("return", result);
|
|
10221
|
+
case 26:
|
|
10222
|
+
return _context.abrupt("return", true);
|
|
10223
|
+
case 27:
|
|
10224
|
+
case "end":
|
|
10225
|
+
return _context.stop();
|
|
10213
10226
|
}
|
|
10214
10227
|
}, _callee, null, [[15, 22]]);
|
|
10215
10228
|
}));
|
|
@@ -10401,29 +10414,27 @@ var AddSelect = function AddSelect(props) {
|
|
|
10401
10414
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
10402
10415
|
var isConformToTheRules, newPopValue;
|
|
10403
10416
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10404
|
-
while (1) {
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10417
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10418
|
+
case 0:
|
|
10419
|
+
_context2.next = 2;
|
|
10420
|
+
return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
|
|
10421
|
+
case 2:
|
|
10422
|
+
isConformToTheRules = _context2.sent;
|
|
10423
|
+
if (isConformToTheRules) {
|
|
10424
|
+
record[item.dataIndex] = value;
|
|
10425
|
+
} else {
|
|
10426
|
+
record[item.dataIndex] = null;
|
|
10427
|
+
}
|
|
10428
|
+
newPopValue = popvalue.map(function (i, innerIndex) {
|
|
10429
|
+
if (innerIndex == index) {
|
|
10430
|
+
i[item.dataIndex] = record[item.dataIndex];
|
|
10415
10431
|
}
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
setPopValue(newPopValue);
|
|
10423
|
-
case 6:
|
|
10424
|
-
case "end":
|
|
10425
|
-
return _context2.stop();
|
|
10426
|
-
}
|
|
10432
|
+
return i;
|
|
10433
|
+
});
|
|
10434
|
+
setPopValue(newPopValue);
|
|
10435
|
+
case 6:
|
|
10436
|
+
case "end":
|
|
10437
|
+
return _context2.stop();
|
|
10427
10438
|
}
|
|
10428
10439
|
}, _callee2);
|
|
10429
10440
|
}));
|
|
@@ -10483,84 +10494,85 @@ var AddSelect = function AddSelect(props) {
|
|
|
10483
10494
|
});
|
|
10484
10495
|
}
|
|
10485
10496
|
// 数组对象处理,对带有特殊标记的name进行处理
|
|
10486
|
-
|
|
10497
|
+
var _loop = function _loop() {
|
|
10487
10498
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10514
|
-
}
|
|
10515
|
-
});
|
|
10516
|
-
delete params[key];
|
|
10517
|
-
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
10518
|
-
var _dataParams4 = key.split('*checkBox*');
|
|
10519
|
-
if (element) {
|
|
10520
|
-
params[_dataParams4[0]] = 0;
|
|
10499
|
+
var element = params[key];
|
|
10500
|
+
if (element && key.indexOf('*number*') >= 0) {
|
|
10501
|
+
var dataParams = key.split('*number*');
|
|
10502
|
+
dataParams.forEach(function (value, index) {
|
|
10503
|
+
params[value] = element[index];
|
|
10504
|
+
});
|
|
10505
|
+
delete params[key];
|
|
10506
|
+
} else if (element && key.indexOf('*address*') >= 0) {
|
|
10507
|
+
var _dataParams = key.split('*address*');
|
|
10508
|
+
_dataParams.forEach(function (value, index) {
|
|
10509
|
+
params[value] = element.PCDCode[index];
|
|
10510
|
+
});
|
|
10511
|
+
delete params[key];
|
|
10512
|
+
} else if (element && key.indexOf('*costType*') >= 0) {
|
|
10513
|
+
var _dataParams2 = key.split('*costType*');
|
|
10514
|
+
// eslint-disable-next-line prefer-destructuring
|
|
10515
|
+
params[_dataParams2[0]] = element[1];
|
|
10516
|
+
delete params[key];
|
|
10517
|
+
} else if (element && key.indexOf('*fullDate*') >= 0) {
|
|
10518
|
+
var _dataParams3 = key.split('*fullDate*');
|
|
10519
|
+
_dataParams3.forEach(function (value, index) {
|
|
10520
|
+
if (index === 0) {
|
|
10521
|
+
params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
|
|
10522
|
+
} else {
|
|
10523
|
+
params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
|
|
10521
10524
|
}
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
_dataParams7.forEach(function (value, index) {
|
|
10540
|
-
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10541
|
-
});
|
|
10542
|
-
delete params[key];
|
|
10543
|
-
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10544
|
-
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10545
|
-
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10546
|
-
if (params[key][0] === 'range') {
|
|
10547
|
-
if (params[key][1][0]) {
|
|
10548
|
-
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10549
|
-
}
|
|
10550
|
-
if (params[key][1][1]) {
|
|
10551
|
-
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10552
|
-
}
|
|
10525
|
+
});
|
|
10526
|
+
delete params[key];
|
|
10527
|
+
} else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
|
|
10528
|
+
var _dataParams4 = key.split('*checkBox*');
|
|
10529
|
+
if (element) {
|
|
10530
|
+
params[_dataParams4[0]] = 0;
|
|
10531
|
+
}
|
|
10532
|
+
delete params[key];
|
|
10533
|
+
} else if (element && key.indexOf('*cascader*') >= 0) {
|
|
10534
|
+
var _dataParams5 = key.split('*cascader*');
|
|
10535
|
+
params[_dataParams5[0]] = element[element.length - 1];
|
|
10536
|
+
delete params[key];
|
|
10537
|
+
} else if (element && key.indexOf('*date*') >= 0) {
|
|
10538
|
+
var _dataParams6 = key.split('*date*');
|
|
10539
|
+
_dataParams6.forEach(function (value, index) {
|
|
10540
|
+
if (index === 0) {
|
|
10541
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10553
10542
|
} else {
|
|
10554
|
-
params[
|
|
10543
|
+
params[value] = moment(element[index]).format('YYYY-MM-DD');
|
|
10555
10544
|
}
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10545
|
+
});
|
|
10546
|
+
delete params[key];
|
|
10547
|
+
} else if (element && key.indexOf('*') >= 0) {
|
|
10548
|
+
var _dataParams7 = key.split('*');
|
|
10549
|
+
_dataParams7.forEach(function (value, index) {
|
|
10550
|
+
params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
|
|
10551
|
+
});
|
|
10552
|
+
delete params[key];
|
|
10553
|
+
} else if (element && key.indexOf('_selectNumberRange') >= 0) {
|
|
10554
|
+
// key = xxxxx_selectNumberRange qp-xxxxx-gt
|
|
10555
|
+
var _dataParams8 = key.split('_selectNumberRange')[0];
|
|
10556
|
+
if (params[key][0] === 'range') {
|
|
10557
|
+
if (params[key][1][0]) {
|
|
10558
|
+
params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
|
|
10559
|
+
}
|
|
10560
|
+
if (params[key][1][1]) {
|
|
10561
|
+
params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
|
|
10562
|
+
}
|
|
10563
|
+
} else {
|
|
10564
|
+
params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
|
|
10561
10565
|
}
|
|
10562
|
-
|
|
10566
|
+
delete params[key];
|
|
10567
|
+
} else if (Array.isArray(element)) {
|
|
10568
|
+
params[key] = element.join(',');
|
|
10569
|
+
} else if (element == null || element === undefined || String(element).trim() === '') {
|
|
10570
|
+
delete params[key];
|
|
10571
|
+
}
|
|
10563
10572
|
}
|
|
10573
|
+
};
|
|
10574
|
+
for (var key in params) {
|
|
10575
|
+
_loop();
|
|
10564
10576
|
}
|
|
10565
10577
|
var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
|
|
10566
10578
|
pageSize: pageSize,
|
|
@@ -10781,8 +10793,15 @@ var AddSelect = function AddSelect(props) {
|
|
|
10781
10793
|
handleLoading(isContinue, true);
|
|
10782
10794
|
onSaveCallback(popvalue).then(function (res) {
|
|
10783
10795
|
{
|
|
10784
|
-
var _document$getElementB3;
|
|
10785
|
-
|
|
10796
|
+
var _Object$keys, _document$getElementB3;
|
|
10797
|
+
// 成功信息可以在调用处处理 即resolve({messageSuccessBackInfo: { needThrowSuccess: false } })、resolve({messageSuccessBackInfo: { needThrowSuccess: true, successMessage: '已保存' } })
|
|
10798
|
+
var initSuccessMessage = '保存成功';
|
|
10799
|
+
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
10800
|
+
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
10801
|
+
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
10802
|
+
} else {
|
|
10803
|
+
message.success(initSuccessMessage);
|
|
10804
|
+
}
|
|
10786
10805
|
deleteSelectRows();
|
|
10787
10806
|
(_document$getElementB3 = document.getElementById('first-query')) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.focus();
|
|
10788
10807
|
!isContinue && handleCancel();
|
|
@@ -12008,65 +12027,70 @@ var BillEntry = function BillEntry(_ref3) {
|
|
|
12008
12027
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
12009
12028
|
var canEntryObject, _canEntryObject$error, messageInfo;
|
|
12010
12029
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
12011
|
-
while (1) {
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
messageInfo
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12030
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12031
|
+
case 0:
|
|
12032
|
+
if (data === null || data === void 0 ? void 0 : data.length) {
|
|
12033
|
+
_context.next = 3;
|
|
12034
|
+
break;
|
|
12035
|
+
}
|
|
12036
|
+
message.warning('至少录入一条数据');
|
|
12037
|
+
return _context.abrupt("return");
|
|
12038
|
+
case 3:
|
|
12039
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12040
|
+
return d.skuCode && d.name;
|
|
12041
|
+
})) {
|
|
12042
|
+
_context.next = 6;
|
|
12043
|
+
break;
|
|
12044
|
+
}
|
|
12045
|
+
message.warning('请选择商品!');
|
|
12046
|
+
return _context.abrupt("return");
|
|
12047
|
+
case 6:
|
|
12048
|
+
if (data === null || data === void 0 ? void 0 : data.every(function (d) {
|
|
12049
|
+
return d.count;
|
|
12050
|
+
})) {
|
|
12051
|
+
_context.next = 9;
|
|
12052
|
+
break;
|
|
12053
|
+
}
|
|
12054
|
+
message.warning('请填写商品数量!');
|
|
12055
|
+
return _context.abrupt("return");
|
|
12056
|
+
case 9:
|
|
12057
|
+
_context.next = 11;
|
|
12058
|
+
return isSkuCanEntry(data);
|
|
12059
|
+
case 11:
|
|
12060
|
+
canEntryObject = _context.sent;
|
|
12061
|
+
if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
|
|
12062
|
+
_context.next = 16;
|
|
12063
|
+
break;
|
|
12064
|
+
}
|
|
12065
|
+
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) {
|
|
12066
|
+
return /*#__PURE__*/React.createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
|
|
12067
|
+
}));
|
|
12068
|
+
messageInfo && message.warning({
|
|
12069
|
+
content: messageInfo,
|
|
12070
|
+
duration: 6
|
|
12071
|
+
});
|
|
12072
|
+
return _context.abrupt("return");
|
|
12073
|
+
case 16:
|
|
12074
|
+
setLoading(true);
|
|
12075
|
+
onSaveCallback(data).then(function (res) {
|
|
12076
|
+
{
|
|
12077
|
+
var _Object$keys;
|
|
12078
|
+
var initSuccessMessage = '保存成功';
|
|
12079
|
+
var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
|
|
12080
|
+
if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
|
|
12081
|
+
(rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
|
|
12082
|
+
} else {
|
|
12083
|
+
message.success(initSuccessMessage);
|
|
12060
12084
|
}
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12085
|
+
}
|
|
12086
|
+
setLoading(false);
|
|
12087
|
+
}).catch(function (Error) {
|
|
12088
|
+
message.error(Error);
|
|
12089
|
+
setLoading(false);
|
|
12090
|
+
});
|
|
12091
|
+
case 18:
|
|
12092
|
+
case "end":
|
|
12093
|
+
return _context.stop();
|
|
12070
12094
|
}
|
|
12071
12095
|
}, _callee);
|
|
12072
12096
|
}));
|
|
@@ -13481,6 +13505,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
13481
13505
|
mappingTextField: 'name',
|
|
13482
13506
|
mappingValueField: 'code',
|
|
13483
13507
|
otherParams: {
|
|
13508
|
+
'qp-status-eq': 1,
|
|
13484
13509
|
sorter: 'desc-id'
|
|
13485
13510
|
},
|
|
13486
13511
|
sourceName: 'customCode'
|
|
@@ -14119,7 +14144,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
14119
14144
|
}]
|
|
14120
14145
|
}, modalTableBusProps);
|
|
14121
14146
|
}
|
|
14122
|
-
//
|
|
14147
|
+
// 规则模板选择器
|
|
14123
14148
|
if (type === 'ruleTemplate') {
|
|
14124
14149
|
requestConfig = _objectSpread2({
|
|
14125
14150
|
url: "".concat(prefixUrl.selectPrefix, "/ruleTemplate"),
|
|
@@ -14134,19 +14159,19 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
14134
14159
|
}, requestConfigProp);
|
|
14135
14160
|
tableSearchForm = [{
|
|
14136
14161
|
name: 'qp-name-like',
|
|
14137
|
-
label: '
|
|
14162
|
+
label: '规则模板名称'
|
|
14138
14163
|
}, {
|
|
14139
14164
|
name: 'qp-code-like',
|
|
14140
|
-
label: '
|
|
14165
|
+
label: '规则模板编码'
|
|
14141
14166
|
}];
|
|
14142
14167
|
modalTableProps = _objectSpread2({
|
|
14143
|
-
modalTableTitle: '
|
|
14168
|
+
modalTableTitle: '选择规则模板',
|
|
14144
14169
|
tableSearchForm: tableSearchForm,
|
|
14145
14170
|
tableColumns: [{
|
|
14146
|
-
title: '
|
|
14171
|
+
title: '规则模板编码',
|
|
14147
14172
|
dataIndex: 'code'
|
|
14148
14173
|
}, {
|
|
14149
|
-
title: '
|
|
14174
|
+
title: '规则模板名称',
|
|
14150
14175
|
dataIndex: 'name',
|
|
14151
14176
|
render: function render(text) {
|
|
14152
14177
|
return handleTextOverflow(text);
|
|
@@ -15317,44 +15342,42 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
15317
15342
|
var _ctx$form;
|
|
15318
15343
|
var resData, coverData, data, dataList;
|
|
15319
15344
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
15320
|
-
while (1) {
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
_context.next = 13;
|
|
15326
|
-
break;
|
|
15327
|
-
}
|
|
15328
|
-
data = resData.data;
|
|
15329
|
-
if (!remoteSource.converter) {
|
|
15330
|
-
_context.next = 9;
|
|
15331
|
-
break;
|
|
15332
|
-
}
|
|
15333
|
-
_context.next = 6;
|
|
15334
|
-
return remoteSource.converter({
|
|
15335
|
-
data: [data]
|
|
15336
|
-
});
|
|
15337
|
-
case 6:
|
|
15338
|
-
coverData = _context.sent;
|
|
15339
|
-
_context.next = 11;
|
|
15345
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15346
|
+
case 0:
|
|
15347
|
+
resData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
15348
|
+
if (!(resData.status === '0' || resData.code === '000000')) {
|
|
15349
|
+
_context.next = 13;
|
|
15340
15350
|
break;
|
|
15341
|
-
|
|
15342
|
-
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
}) || [];
|
|
15346
|
-
case 11:
|
|
15347
|
-
_context.next = 14;
|
|
15351
|
+
}
|
|
15352
|
+
data = resData.data;
|
|
15353
|
+
if (!remoteSource.converter) {
|
|
15354
|
+
_context.next = 9;
|
|
15348
15355
|
break;
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15356
|
+
}
|
|
15357
|
+
_context.next = 6;
|
|
15358
|
+
return remoteSource.converter({
|
|
15359
|
+
data: [data]
|
|
15360
|
+
});
|
|
15361
|
+
case 6:
|
|
15362
|
+
coverData = _context.sent;
|
|
15363
|
+
_context.next = 11;
|
|
15364
|
+
break;
|
|
15365
|
+
case 9:
|
|
15366
|
+
dataList = data && Array.isArray(data) ? data : data && [data] || [];
|
|
15367
|
+
coverData = dataList.length && dataList.map(function (ites) {
|
|
15368
|
+
return mapSearchTree(ites);
|
|
15369
|
+
}) || [];
|
|
15370
|
+
case 11:
|
|
15371
|
+
_context.next = 14;
|
|
15372
|
+
break;
|
|
15373
|
+
case 13:
|
|
15374
|
+
coverData = [];
|
|
15375
|
+
case 14:
|
|
15376
|
+
setTreeData(coverData);
|
|
15377
|
+
ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
|
|
15378
|
+
case 16:
|
|
15379
|
+
case "end":
|
|
15380
|
+
return _context.stop();
|
|
15358
15381
|
}
|
|
15359
15382
|
}, _callee);
|
|
15360
15383
|
}));
|
|
@@ -19392,21 +19415,19 @@ function _outLogin() {
|
|
|
19392
19415
|
_outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
19393
19416
|
var res;
|
|
19394
19417
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19395
|
-
while (1) {
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
return _context.stop();
|
|
19409
|
-
}
|
|
19418
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19419
|
+
case 0:
|
|
19420
|
+
_context.next = 2;
|
|
19421
|
+
return axios({
|
|
19422
|
+
url: '/user/web/loginOut',
|
|
19423
|
+
method: 'GET'
|
|
19424
|
+
});
|
|
19425
|
+
case 2:
|
|
19426
|
+
res = _context.sent;
|
|
19427
|
+
return _context.abrupt("return", res);
|
|
19428
|
+
case 4:
|
|
19429
|
+
case "end":
|
|
19430
|
+
return _context.stop();
|
|
19410
19431
|
}
|
|
19411
19432
|
}, _callee);
|
|
19412
19433
|
}));
|
|
@@ -19535,31 +19556,29 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
|
|
|
19535
19556
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
19536
19557
|
var sessionId;
|
|
19537
19558
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19538
|
-
while (1) {
|
|
19539
|
-
|
|
19540
|
-
|
|
19541
|
-
|
|
19542
|
-
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
|
|
19547
|
-
|
|
19559
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19560
|
+
case 0:
|
|
19561
|
+
_context.next = 2;
|
|
19562
|
+
return getSessionId();
|
|
19563
|
+
case 2:
|
|
19564
|
+
sessionId = _context.sent;
|
|
19565
|
+
_context.next = 5;
|
|
19566
|
+
return outLogin({
|
|
19567
|
+
sessionId: sessionId
|
|
19568
|
+
});
|
|
19569
|
+
case 5:
|
|
19570
|
+
// @ts-ignore
|
|
19571
|
+
if (BUILD_TYPE) {
|
|
19572
|
+
message.success('退出登录成功');
|
|
19573
|
+
history.replace({
|
|
19574
|
+
pathname: '/user/login'
|
|
19548
19575
|
});
|
|
19549
|
-
|
|
19550
|
-
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
});
|
|
19556
|
-
} else {
|
|
19557
|
-
setLoginOutPath();
|
|
19558
|
-
}
|
|
19559
|
-
case 6:
|
|
19560
|
-
case "end":
|
|
19561
|
-
return _context.stop();
|
|
19562
|
-
}
|
|
19576
|
+
} else {
|
|
19577
|
+
setLoginOutPath();
|
|
19578
|
+
}
|
|
19579
|
+
case 6:
|
|
19580
|
+
case "end":
|
|
19581
|
+
return _context.stop();
|
|
19563
19582
|
}
|
|
19564
19583
|
}, _callee);
|
|
19565
19584
|
}));
|
|
@@ -21387,6 +21406,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
21387
21406
|
showSubMenu: isShow
|
|
21388
21407
|
});
|
|
21389
21408
|
}, 500);
|
|
21409
|
+
//设置tabs标签左右滚动
|
|
21390
21410
|
_this.setTabNavTransLate = function (num) {
|
|
21391
21411
|
var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
|
|
21392
21412
|
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];
|
|
@@ -22067,14 +22087,12 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
22067
22087
|
request: function () {
|
|
22068
22088
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
22069
22089
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22070
|
-
while (1) {
|
|
22071
|
-
|
|
22072
|
-
|
|
22073
|
-
|
|
22074
|
-
|
|
22075
|
-
|
|
22076
|
-
return _context.stop();
|
|
22077
|
-
}
|
|
22090
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22091
|
+
case 0:
|
|
22092
|
+
return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
|
|
22093
|
+
case 1:
|
|
22094
|
+
case "end":
|
|
22095
|
+
return _context.stop();
|
|
22078
22096
|
}
|
|
22079
22097
|
}, _callee);
|
|
22080
22098
|
}));
|
|
@@ -22605,7 +22623,7 @@ var index$7 = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
22605
22623
|
return /*#__PURE__*/React.createElement("td", {
|
|
22606
22624
|
style: {
|
|
22607
22625
|
display: tdHidden,
|
|
22608
|
-
background: index % 2 === 1 || item.fixed ? '#
|
|
22626
|
+
background: index % 2 === 1 || item.fixed ? '#f7f8fb' : '#fff',
|
|
22609
22627
|
minWidth: '100px',
|
|
22610
22628
|
width: "".concat(itemWidth, "px"),
|
|
22611
22629
|
height: '40px',
|
|
@@ -29612,7 +29630,7 @@ var choiceType = Object.freeze({
|
|
|
29612
29630
|
280: '库存组织选择器',
|
|
29613
29631
|
310: '配送方式选择器',
|
|
29614
29632
|
330: '变量',
|
|
29615
|
-
340: '
|
|
29633
|
+
340: '规则模板选择器',
|
|
29616
29634
|
350: '营销区域选择器'
|
|
29617
29635
|
});
|
|
29618
29636
|
var inputType = {
|
|
@@ -29634,28 +29652,26 @@ var valueType = {
|
|
|
29634
29652
|
var getDynamicDict = /*#__PURE__*/function () {
|
|
29635
29653
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
|
|
29636
29654
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29637
|
-
while (1) {
|
|
29638
|
-
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
return
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
return _context.stop();
|
|
29658
|
-
}
|
|
29655
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29656
|
+
case 0:
|
|
29657
|
+
_context.next = 2;
|
|
29658
|
+
return request$1({
|
|
29659
|
+
url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
|
|
29660
|
+
converter: function converter(_ref2) {
|
|
29661
|
+
var data = _ref2.data;
|
|
29662
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
29663
|
+
return {
|
|
29664
|
+
text: d.name,
|
|
29665
|
+
value: d.code || d.brandCode
|
|
29666
|
+
};
|
|
29667
|
+
});
|
|
29668
|
+
}
|
|
29669
|
+
});
|
|
29670
|
+
case 2:
|
|
29671
|
+
return _context.abrupt("return", _context.sent);
|
|
29672
|
+
case 3:
|
|
29673
|
+
case "end":
|
|
29674
|
+
return _context.stop();
|
|
29659
29675
|
}
|
|
29660
29676
|
}, _callee);
|
|
29661
29677
|
}));
|
|
@@ -29705,55 +29721,53 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29705
29721
|
useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29706
29722
|
var _ref$current, source;
|
|
29707
29723
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29708
|
-
while (1) {
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
};
|
|
29719
|
-
}
|
|
29720
|
-
return prev;
|
|
29721
|
-
});
|
|
29722
|
-
case 2:
|
|
29723
|
-
if (!record.dictionaryCode) {
|
|
29724
|
-
_context.next = 17;
|
|
29725
|
-
break;
|
|
29726
|
-
}
|
|
29727
|
-
if (!(record.choiceType == 20)) {
|
|
29728
|
-
_context.next = 7;
|
|
29729
|
-
break;
|
|
29724
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29725
|
+
case 0:
|
|
29726
|
+
_context.next = 2;
|
|
29727
|
+
return setIsShowAndType(function (prev) {
|
|
29728
|
+
if (record.inputType === 20 || record.inputType === 30) {
|
|
29729
|
+
return {
|
|
29730
|
+
isShow: true,
|
|
29731
|
+
singleOrMultiple: record.inputType,
|
|
29732
|
+
type: record.choiceType
|
|
29733
|
+
};
|
|
29730
29734
|
}
|
|
29731
|
-
|
|
29732
|
-
|
|
29735
|
+
return prev;
|
|
29736
|
+
});
|
|
29737
|
+
case 2:
|
|
29738
|
+
if (!record.dictionaryCode) {
|
|
29739
|
+
_context.next = 17;
|
|
29733
29740
|
break;
|
|
29734
|
-
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
break;
|
|
29738
|
-
}
|
|
29739
|
-
_context.next = 10;
|
|
29740
|
-
return getDynamicDict(record.dictionaryCode);
|
|
29741
|
-
case 10:
|
|
29742
|
-
_context.t1 = _context.sent;
|
|
29743
|
-
_context.next = 14;
|
|
29741
|
+
}
|
|
29742
|
+
if (!(record.choiceType == 20)) {
|
|
29743
|
+
_context.next = 7;
|
|
29744
29744
|
break;
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29745
|
+
}
|
|
29746
|
+
_context.t0 = getDictionarySource(record.dictionaryCode);
|
|
29747
|
+
_context.next = 15;
|
|
29748
|
+
break;
|
|
29749
|
+
case 7:
|
|
29750
|
+
if (!(record.choiceType == 30)) {
|
|
29751
|
+
_context.next = 13;
|
|
29752
|
+
break;
|
|
29753
|
+
}
|
|
29754
|
+
_context.next = 10;
|
|
29755
|
+
return getDynamicDict(record.dictionaryCode);
|
|
29756
|
+
case 10:
|
|
29757
|
+
_context.t1 = _context.sent;
|
|
29758
|
+
_context.next = 14;
|
|
29759
|
+
break;
|
|
29760
|
+
case 13:
|
|
29761
|
+
_context.t1 = [];
|
|
29762
|
+
case 14:
|
|
29763
|
+
_context.t0 = _context.t1;
|
|
29764
|
+
case 15:
|
|
29765
|
+
source = _context.t0;
|
|
29766
|
+
// @ts-ignore
|
|
29767
|
+
ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
|
|
29768
|
+
case 17:
|
|
29769
|
+
case "end":
|
|
29770
|
+
return _context.stop();
|
|
29757
29771
|
}
|
|
29758
29772
|
}, _callee);
|
|
29759
29773
|
})));
|
|
@@ -29821,30 +29835,28 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
29821
29835
|
var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
|
|
29822
29836
|
var form, values, name, relates, source;
|
|
29823
29837
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
29824
|
-
while (1) {
|
|
29825
|
-
|
|
29826
|
-
|
|
29827
|
-
|
|
29828
|
-
if (values[0]) {
|
|
29829
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29830
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29831
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
29832
|
-
}
|
|
29833
|
-
if (!values[1]) {
|
|
29834
|
-
_context2.next = 9;
|
|
29835
|
-
break;
|
|
29836
|
-
}
|
|
29837
|
-
_context2.next = 5;
|
|
29838
|
-
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
29839
|
-
case 5:
|
|
29840
|
-
source = _context2.sent;
|
|
29838
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
29839
|
+
case 0:
|
|
29840
|
+
form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
|
|
29841
|
+
if (values[0]) {
|
|
29841
29842
|
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29842
29843
|
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29843
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0],
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29844
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
|
|
29845
|
+
}
|
|
29846
|
+
if (!values[1]) {
|
|
29847
|
+
_context2.next = 9;
|
|
29848
|
+
break;
|
|
29849
|
+
}
|
|
29850
|
+
_context2.next = 5;
|
|
29851
|
+
return getDynamicDict(record.dictionaryCode || values[1]);
|
|
29852
|
+
case 5:
|
|
29853
|
+
source = _context2.sent;
|
|
29854
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
|
|
29855
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
|
|
29856
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
|
|
29857
|
+
case 9:
|
|
29858
|
+
case "end":
|
|
29859
|
+
return _context2.stop();
|
|
29848
29860
|
}
|
|
29849
29861
|
}, _callee2);
|
|
29850
29862
|
}));
|
|
@@ -30304,43 +30316,41 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30304
30316
|
var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
|
|
30305
30317
|
var values, name, form, source;
|
|
30306
30318
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
30307
|
-
while (1) {
|
|
30308
|
-
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
30312
|
-
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30313
|
-
form.setFieldVisible(name, false);
|
|
30314
|
-
}
|
|
30315
|
-
if (!(values[0] === 30)) {
|
|
30316
|
-
_context3.next = 10;
|
|
30317
|
-
break;
|
|
30318
|
-
}
|
|
30319
|
-
_context3.next = 5;
|
|
30320
|
-
return request$1({
|
|
30321
|
-
url: '/basic/dictDynamicItem/queryList',
|
|
30322
|
-
converter: function converter(_ref11) {
|
|
30323
|
-
var data = _ref11.data;
|
|
30324
|
-
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30325
|
-
return {
|
|
30326
|
-
text: d.dictCode,
|
|
30327
|
-
value: d.dictCode
|
|
30328
|
-
};
|
|
30329
|
-
});
|
|
30330
|
-
}
|
|
30331
|
-
});
|
|
30332
|
-
case 5:
|
|
30333
|
-
source = _context3.sent;
|
|
30334
|
-
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30335
|
-
form.setFieldVisible(name, true);
|
|
30336
|
-
_context3.next = 11;
|
|
30337
|
-
break;
|
|
30338
|
-
case 10:
|
|
30319
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
30320
|
+
case 0:
|
|
30321
|
+
values = _ref10.values, name = _ref10.name, form = _ref10.form;
|
|
30322
|
+
if (values[1] === 40) {
|
|
30323
|
+
form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
|
|
30339
30324
|
form.setFieldVisible(name, false);
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30325
|
+
}
|
|
30326
|
+
if (!(values[0] === 30)) {
|
|
30327
|
+
_context3.next = 10;
|
|
30328
|
+
break;
|
|
30329
|
+
}
|
|
30330
|
+
_context3.next = 5;
|
|
30331
|
+
return request$1({
|
|
30332
|
+
url: '/basic/dictDynamicItem/queryList',
|
|
30333
|
+
converter: function converter(_ref11) {
|
|
30334
|
+
var data = _ref11.data;
|
|
30335
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
30336
|
+
return {
|
|
30337
|
+
text: d.dictCode,
|
|
30338
|
+
value: d.dictCode
|
|
30339
|
+
};
|
|
30340
|
+
});
|
|
30341
|
+
}
|
|
30342
|
+
});
|
|
30343
|
+
case 5:
|
|
30344
|
+
source = _context3.sent;
|
|
30345
|
+
form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
|
|
30346
|
+
form.setFieldVisible(name, true);
|
|
30347
|
+
_context3.next = 11;
|
|
30348
|
+
break;
|
|
30349
|
+
case 10:
|
|
30350
|
+
form.setFieldVisible(name, false);
|
|
30351
|
+
case 11:
|
|
30352
|
+
case "end":
|
|
30353
|
+
return _context3.stop();
|
|
30344
30354
|
}
|
|
30345
30355
|
}, _callee3);
|
|
30346
30356
|
}));
|
|
@@ -30529,66 +30539,64 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
|
|
|
30529
30539
|
var _ref$current4, _res$editableStatus;
|
|
30530
30540
|
var res, _res$defaultValue;
|
|
30531
30541
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30532
|
-
while (1) {
|
|
30533
|
-
|
|
30534
|
-
|
|
30535
|
-
|
|
30536
|
-
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
res.
|
|
30543
|
-
|
|
30544
|
-
|
|
30545
|
-
|
|
30546
|
-
|
|
30547
|
-
|
|
30548
|
-
|
|
30549
|
-
|
|
30550
|
-
|
|
30551
|
-
|
|
30552
|
-
|
|
30553
|
-
|
|
30542
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
30543
|
+
case 0:
|
|
30544
|
+
_context4.next = 2;
|
|
30545
|
+
return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
|
|
30546
|
+
case 2:
|
|
30547
|
+
res = _context4.sent;
|
|
30548
|
+
res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
|
|
30549
|
+
res.fieldGroup = record.fieldGroup;
|
|
30550
|
+
res.businessType = record.businessType;
|
|
30551
|
+
res.info = {
|
|
30552
|
+
enumeration: res.enumeration,
|
|
30553
|
+
dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
|
|
30554
|
+
formula: res.formula,
|
|
30555
|
+
scale: res.scale,
|
|
30556
|
+
variable: res.variable
|
|
30557
|
+
};
|
|
30558
|
+
res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
|
|
30559
|
+
res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
|
|
30560
|
+
res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
|
|
30561
|
+
if (res.inputType === 40) {
|
|
30562
|
+
res.valueType = 22;
|
|
30563
|
+
}
|
|
30564
|
+
// 把数组处理成文本
|
|
30565
|
+
if (res.inputType === 30) {
|
|
30566
|
+
if (res.defaultValue) {
|
|
30567
|
+
res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
|
|
30554
30568
|
}
|
|
30555
|
-
|
|
30556
|
-
|
|
30557
|
-
|
|
30558
|
-
|
|
30559
|
-
|
|
30569
|
+
}
|
|
30570
|
+
res.fieldMapping = res.fieldMapping || '';
|
|
30571
|
+
delete res.formula;
|
|
30572
|
+
delete res.showValue;
|
|
30573
|
+
if (!(mode === 'create')) {
|
|
30574
|
+
_context4.next = 18;
|
|
30575
|
+
break;
|
|
30576
|
+
}
|
|
30577
|
+
request$1({
|
|
30578
|
+
url: "/basic/flow/businessField",
|
|
30579
|
+
method: 'POST',
|
|
30580
|
+
params: res,
|
|
30581
|
+
successMessage: '创建成功!',
|
|
30582
|
+
converter: function converter() {
|
|
30583
|
+
onParentOk();
|
|
30560
30584
|
}
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30566
|
-
|
|
30585
|
+
});
|
|
30586
|
+
return _context4.abrupt("return");
|
|
30587
|
+
case 18:
|
|
30588
|
+
request$1({
|
|
30589
|
+
url: "/basic/flow/businessField/".concat(record.id),
|
|
30590
|
+
method: 'PATCH',
|
|
30591
|
+
params: res,
|
|
30592
|
+
successMessage: '修改成功!',
|
|
30593
|
+
converter: function converter() {
|
|
30594
|
+
onParentOk();
|
|
30567
30595
|
}
|
|
30568
|
-
|
|
30569
|
-
|
|
30570
|
-
|
|
30571
|
-
|
|
30572
|
-
successMessage: '创建成功!',
|
|
30573
|
-
converter: function converter() {
|
|
30574
|
-
onParentOk();
|
|
30575
|
-
}
|
|
30576
|
-
});
|
|
30577
|
-
return _context4.abrupt("return");
|
|
30578
|
-
case 18:
|
|
30579
|
-
request$1({
|
|
30580
|
-
url: "/basic/flow/businessField/".concat(record.id),
|
|
30581
|
-
method: 'PATCH',
|
|
30582
|
-
params: res,
|
|
30583
|
-
successMessage: '修改成功!',
|
|
30584
|
-
converter: function converter() {
|
|
30585
|
-
onParentOk();
|
|
30586
|
-
}
|
|
30587
|
-
});
|
|
30588
|
-
case 19:
|
|
30589
|
-
case "end":
|
|
30590
|
-
return _context4.stop();
|
|
30591
|
-
}
|
|
30596
|
+
});
|
|
30597
|
+
case 19:
|
|
30598
|
+
case "end":
|
|
30599
|
+
return _context4.stop();
|
|
30592
30600
|
}
|
|
30593
30601
|
}, _callee4);
|
|
30594
30602
|
}));
|