@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.
Files changed (191) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +1 -1
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  11. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  12. package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +2 -2
  13. package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +2 -2
  14. package/dist/components/Business/BsLayouts/index.d.ts +2 -2
  15. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +2 -2
  16. package/dist/components/Business/JsonQueryTable/static.d.ts +1 -1
  17. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  18. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  19. package/dist/index.esm.js +657 -649
  20. package/dist/index.js +657 -649
  21. package/dist/utils/TableUtils.d.ts +2 -2
  22. package/dist/utils/utils.d.ts +1 -1
  23. package/docs/index.md +21 -21
  24. package/lib/assets/drag.svg +17 -17
  25. package/lib/assets/exportFail.svg +37 -37
  26. package/lib/assets/exportProcessing.svg +28 -28
  27. package/lib/assets/exportSuccess.svg +34 -34
  28. package/lib/assets/label_icon_bottom.svg +25 -25
  29. package/lib/assets/upExport.svg +22 -22
  30. package/package.json +1 -1
  31. package/src/assets/32.svg +27 -27
  32. package/src/assets/addIcon.svg +17 -17
  33. package/src/assets/allfunc.svg +27 -27
  34. package/src/assets/arrowRight.svg +24 -24
  35. package/src/assets/btn-delete.svg +29 -29
  36. package/src/assets/btn-edit.svg +19 -19
  37. package/src/assets/btn-more.svg +17 -17
  38. package/src/assets/btn-submit.svg +19 -19
  39. package/src/assets/caidan.svg +11 -11
  40. package/src/assets/close.svg +26 -26
  41. package/src/assets/drag.svg +17 -17
  42. package/src/assets/exportFail.svg +37 -37
  43. package/src/assets/exportProcessing.svg +28 -28
  44. package/src/assets/exportSuccess.svg +34 -34
  45. package/src/assets/fixed-left-active.svg +11 -11
  46. package/src/assets/fixed-left.svg +15 -15
  47. package/src/assets/fixed-right-active.svg +11 -11
  48. package/src/assets/fixed-right.svg +15 -15
  49. package/src/assets/guanbi.svg +15 -15
  50. package/src/assets/icon-quanping.svg +15 -15
  51. package/src/assets/icon-shezhi.svg +17 -17
  52. package/src/assets/label_icon_bottom.svg +25 -25
  53. package/src/assets/list-no-img.svg +21 -21
  54. package/src/assets/morentouxiang-32.svg +23 -23
  55. package/src/assets/scanning.svg +24 -24
  56. package/src/assets/upExport.svg +22 -22
  57. package/src/components/Business/AddSelectBusiness/index.md +161 -161
  58. package/src/components/Business/AddSelectBusiness/index.tsx +861 -861
  59. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  60. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  61. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  64. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  65. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  66. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  67. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  68. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  69. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  70. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  71. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  72. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  73. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  74. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  75. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  76. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  77. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  78. package/src/components/Business/BsLayouts/index.less +79 -79
  79. package/src/components/Business/BsLayouts/index.tsx +1484 -1484
  80. package/src/components/Business/BsLayouts/service.ts +10 -10
  81. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  82. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +538 -538
  83. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  84. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  85. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -802
  86. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  87. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  88. package/src/components/Business/CommodityEntry/index.md +70 -70
  89. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  90. package/src/components/Business/CommonAlert/index.tsx +23 -23
  91. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  92. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  93. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  94. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  95. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  96. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  97. package/src/components/Business/HomePageWrapper/index.less +33 -33
  98. package/src/components/Business/HomePageWrapper/index.md +45 -45
  99. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  100. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  101. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  102. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  103. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  104. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  105. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  106. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  107. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  108. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  109. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  110. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  111. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  112. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  113. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  114. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  115. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  116. package/src/components/Business/JsonQueryTable/index.less +16 -16
  117. package/src/components/Business/JsonQueryTable/index.md +328 -328
  118. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  119. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  120. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  121. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  122. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  123. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  124. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  125. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  126. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  127. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  128. package/src/components/Business/SearchSelect/BusinessUtils.ts +1731 -1730
  129. package/src/components/Business/SearchSelect/common.ts +53 -53
  130. package/src/components/Business/SearchSelect/index.md +1319 -1319
  131. package/src/components/Business/SearchSelect/index.tsx +51 -51
  132. package/src/components/Business/SearchSelect/utils.ts +100 -100
  133. package/src/components/Business/StateFlow/index.less +130 -130
  134. package/src/components/Business/StateFlow/index.md +60 -60
  135. package/src/components/Business/StateFlow/index.tsx +29 -29
  136. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  137. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  138. package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
  139. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  140. package/src/components/Business/columnSettingTable/index.less +247 -247
  141. package/src/components/Business/columnSettingTable/index.md +357 -357
  142. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  143. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  144. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  145. package/src/components/Business/moreTreeTable/index.less +99 -99
  146. package/src/components/Business/moreTreeTable/index.md +448 -448
  147. package/src/components/Business/moreTreeTable/index.tsx +23 -23
  148. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  149. package/src/components/Functional/AddSelect/helps.ts +14 -14
  150. package/src/components/Functional/AddSelect/index.less +367 -367
  151. package/src/components/Functional/AddSelect/index.md +155 -155
  152. package/src/components/Functional/AddSelect/index.tsx +1279 -1272
  153. package/src/components/Functional/BillEntry/index.less +371 -371
  154. package/src/components/Functional/BillEntry/index.md +39 -39
  155. package/src/components/Functional/BillEntry/index.tsx +772 -766
  156. package/src/components/Functional/DataImport/index.less +63 -63
  157. package/src/components/Functional/DataImport/index.md +44 -44
  158. package/src/components/Functional/DataImport/index.tsx +695 -695
  159. package/src/components/Functional/DataValidation/index.less +63 -63
  160. package/src/components/Functional/DataValidation/index.md +39 -39
  161. package/src/components/Functional/DataValidation/index.tsx +687 -687
  162. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  163. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  164. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  165. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  166. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  167. package/src/components/Functional/SearchSelect/index.less +115 -115
  168. package/src/components/Functional/SearchSelect/index.md +141 -141
  169. package/src/components/Functional/SearchSelect/index.tsx +849 -849
  170. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  171. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  172. package/src/components/Functional/TreeSearchSelect/index.tsx +162 -162
  173. package/src/index.ts +34 -34
  174. package/src/plugin/TableColumnSetting/index.less +247 -247
  175. package/src/plugin/TableColumnSetting/index.md +50 -50
  176. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  177. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  178. package/src/styles/bsDefault.less +1912 -1912
  179. package/src/utils/CheckOneUser/index.md +39 -39
  180. package/src/utils/CheckOneUser/index.ts +51 -51
  181. package/src/utils/LocalstorageUtils.ts +90 -90
  182. package/src/utils/TableUtils.tsx +18 -18
  183. package/src/utils/checkUtils.ts +39 -39
  184. package/src/utils/enumConfig.ts +11 -11
  185. package/src/utils/getFormMode.js +12 -12
  186. package/src/utils/index.ts +3 -3
  187. package/src/utils/requestUtils.ts +34 -34
  188. package/src/utils/serialize.js +7 -7
  189. package/src/utils/utils.ts +183 -183
  190. package/tsconfig.json +29 -29
  191. package/typings.d.ts +4 -4
package/dist/index.js CHANGED
@@ -153,6 +153,33 @@ axios__default['default'].interceptors.request.use(function (config) {
153
153
  return config;
154
154
  });
155
155
 
156
+ function _iterableToArrayLimit(arr, i) {
157
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
158
+ if (null != _i) {
159
+ var _s,
160
+ _e,
161
+ _x,
162
+ _r,
163
+ _arr = [],
164
+ _n = !0,
165
+ _d = !1;
166
+ try {
167
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
168
+ if (Object(_i) !== _i) return;
169
+ _n = !1;
170
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
171
+ } catch (err) {
172
+ _d = !0, _e = err;
173
+ } finally {
174
+ try {
175
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
176
+ } finally {
177
+ if (_d) throw _e;
178
+ }
179
+ }
180
+ return _arr;
181
+ }
182
+ }
156
183
  function ownKeys(object, enumerableOnly) {
157
184
  var keys = Object.keys(object);
158
185
  if (Object.getOwnPropertySymbols) {
@@ -309,14 +336,9 @@ function _regeneratorRuntime() {
309
336
  };
310
337
  }
311
338
  function maybeInvokeDelegate(delegate, context) {
312
- var 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
- }
339
+ var methodName = context.method,
340
+ method = delegate.iterator[methodName];
341
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
320
342
  var record = tryCatch(method, delegate.iterator, context.arg);
321
343
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
322
344
  var info = record.arg;
@@ -530,7 +552,7 @@ function _defineProperties(target, props) {
530
552
  descriptor.enumerable = descriptor.enumerable || false;
531
553
  descriptor.configurable = true;
532
554
  if ("value" in descriptor) descriptor.writable = true;
533
- Object.defineProperty(target, descriptor.key, descriptor);
555
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
534
556
  }
535
557
  }
536
558
  function _createClass(Constructor, protoProps, staticProps) {
@@ -542,6 +564,7 @@ function _createClass(Constructor, protoProps, staticProps) {
542
564
  return Constructor;
543
565
  }
544
566
  function _defineProperty(obj, key, value) {
567
+ key = _toPropertyKey(key);
545
568
  if (key in obj) {
546
569
  Object.defineProperty(obj, key, {
547
570
  value: value,
@@ -670,30 +693,6 @@ function _arrayWithHoles(arr) {
670
693
  function _iterableToArray(iter) {
671
694
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
672
695
  }
673
- function _iterableToArrayLimit(arr, i) {
674
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
675
- if (_i == null) return;
676
- var _arr = [];
677
- var _n = true;
678
- var _d = false;
679
- var _s, _e;
680
- try {
681
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
682
- _arr.push(_s.value);
683
- if (i && _arr.length === i) break;
684
- }
685
- } catch (err) {
686
- _d = true;
687
- _e = err;
688
- } finally {
689
- try {
690
- if (!_n && _i["return"] != null) _i["return"]();
691
- } finally {
692
- if (_d) throw _e;
693
- }
694
- }
695
- return _arr;
696
- }
697
696
  function _unsupportedIterableToArray(o, minLen) {
698
697
  if (!o) return;
699
698
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -713,6 +712,20 @@ function _nonIterableSpread() {
713
712
  function _nonIterableRest() {
714
713
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
715
714
  }
715
+ function _toPrimitive(input, hint) {
716
+ if (typeof input !== "object" || input === null) return input;
717
+ var prim = input[Symbol.toPrimitive];
718
+ if (prim !== undefined) {
719
+ var res = prim.call(input, hint || "default");
720
+ if (typeof res !== "object") return res;
721
+ throw new TypeError("@@toPrimitive must return a primitive value.");
722
+ }
723
+ return (hint === "string" ? String : Number)(input);
724
+ }
725
+ function _toPropertyKey(arg) {
726
+ var key = _toPrimitive(arg, "string");
727
+ return typeof key === "symbol" ? key : String(key);
728
+ }
716
729
 
717
730
  var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
718
731
  var errorMessage = _objectSpread2({
@@ -2284,84 +2297,85 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2284
2297
  });
2285
2298
  }
2286
2299
  // 数组对象处理,对带有特殊标记的name进行处理
2287
- for (var key in params) {
2300
+ var _loop = function _loop() {
2288
2301
  if (Object.prototype.hasOwnProperty.call(params, key)) {
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;
2302
+ var element = params[key];
2303
+ if (element && key.indexOf('*number*') >= 0) {
2304
+ var dataParams = key.split('*number*');
2305
+ dataParams.forEach(function (value, index) {
2306
+ params[value] = element[index];
2307
+ });
2308
+ delete params[key];
2309
+ } else if (element && key.indexOf('*address*') >= 0) {
2310
+ var _dataParams = key.split('*address*');
2311
+ _dataParams.forEach(function (value, index) {
2312
+ params[value] = element.PCDCode[index];
2313
+ });
2314
+ delete params[key];
2315
+ } else if (element && key.indexOf('*costType*') >= 0) {
2316
+ var _dataParams2 = key.split('*costType*');
2317
+ // eslint-disable-next-line prefer-destructuring
2318
+ params[_dataParams2[0]] = element[1];
2319
+ delete params[key];
2320
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
2321
+ var _dataParams3 = key.split('*fullDate*');
2322
+ _dataParams3.forEach(function (value, index) {
2323
+ if (index === 0) {
2324
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2325
+ } else {
2326
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2322
2327
  }
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
- }
2328
+ });
2329
+ delete params[key];
2330
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2331
+ var _dataParams4 = key.split('*checkBox*');
2332
+ if (element) {
2333
+ params[_dataParams4[0]] = 0;
2334
+ }
2335
+ delete params[key];
2336
+ } else if (element && key.indexOf('*cascader*') >= 0) {
2337
+ var _dataParams5 = key.split('*cascader*');
2338
+ params[_dataParams5[0]] = element[element.length - 1];
2339
+ delete params[key];
2340
+ } else if (element && key.indexOf('*date*') >= 0) {
2341
+ var _dataParams6 = key.split('*date*');
2342
+ _dataParams6.forEach(function (value, index) {
2343
+ if (index === 0) {
2344
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2354
2345
  } else {
2355
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2346
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
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];
2356
2365
  }
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];
2366
+ } else {
2367
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2362
2368
  }
2363
- })();
2369
+ delete params[key];
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
+ }
2364
2375
  }
2376
+ };
2377
+ for (var key in params) {
2378
+ _loop();
2365
2379
  }
2366
2380
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
2367
2381
  pageSize: pageSize,
@@ -9577,58 +9591,59 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
9577
9591
  * @returns 返回处理后的查询参数
9578
9592
  */
9579
9593
  function queryParams(params, flag) {
9580
- for (var key in params) {
9594
+ var _loop = function _loop() {
9581
9595
  if (Object.prototype.hasOwnProperty.call(params, key)) {
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;
9596
+ var element = params[key];
9597
+ if (element && key.indexOf('*number*') >= 0) {
9598
+ var dataParams = key.split('*number*');
9599
+ dataParams.forEach(function (value, index) {
9600
+ params[value] = element[index];
9601
+ });
9602
+ delete params[key];
9603
+ } else if (element && key.indexOf('*address*') >= 0) {
9604
+ var _dataParams = key.split('*address*');
9605
+ _dataParams.forEach(function (value, index) {
9606
+ params[value] = element.PCDCode[index];
9607
+ });
9608
+ delete params[key];
9609
+ } else if (element && key.indexOf('*costType*') >= 0) {
9610
+ var _dataParams2 = key.split('*costType*');
9611
+ // eslint-disable-next-line prefer-destructuring
9612
+ params[_dataParams2[0]] = element[1];
9613
+ delete params[key];
9614
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
9615
+ var _dataParams3 = key.split('*fullDate*');
9616
+ _dataParams3.forEach(function (value, index) {
9617
+ if (index === 0) {
9618
+ params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
9622
9619
  } else {
9623
- params["qp-".concat(_dataParams5[0], "-like")] = element;
9624
- params["qp-".concat(_dataParams5[0], "-in")] = null;
9620
+ params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
9625
9621
  }
9626
- delete params[key];
9627
- } else if (Array.isArray(element)) {
9628
- params[key] = element.join(',');
9622
+ });
9623
+ delete params[key];
9624
+ } else if (element && key.indexOf('*') >= 0) {
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;
9629
9638
  }
9630
- })();
9639
+ delete params[key];
9640
+ } else if (Array.isArray(element)) {
9641
+ params[key] = element.join(',');
9642
+ }
9631
9643
  }
9644
+ };
9645
+ for (var key in params) {
9646
+ _loop();
9632
9647
  }
9633
9648
  return flag ? params : qs.stringify(params);
9634
9649
  }
@@ -10158,76 +10173,74 @@ var AddSelect = function AddSelect(props) {
10158
10173
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
10159
10174
  var result;
10160
10175
  return _regeneratorRuntime().wrap(function _callee$(_context) {
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;
10176
+ while (1) switch (_context.prev = _context.next) {
10177
+ case 0:
10178
+ if (!(bType == 'skc' && tList.some(function (i) {
10179
+ return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
10180
+ }))) {
10181
+ _context.next = 3;
10218
10182
  break;
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
- }
10183
+ }
10184
+ antd.message.warning('相同skc配码不可设置相同哦');
10185
+ return _context.abrupt("return", false);
10186
+ case 3:
10187
+ if (!(bType == 'spu')) {
10188
+ _context.next = 26;
10189
+ break;
10190
+ }
10191
+ if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
10192
+ return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
10193
+ }))) {
10194
+ _context.next = 7;
10195
+ break;
10196
+ }
10197
+ antd.message.warning('相同商品相同配码颜色不可设置相同哦');
10198
+ return _context.abrupt("return", false);
10199
+ case 7:
10200
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
10201
+ _context.next = 10;
10202
+ break;
10203
+ }
10204
+ antd.message.warning('请先选择颜色!');
10205
+ return _context.abrupt("return", false);
10206
+ case 10:
10207
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
10208
+ return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
10209
+ }))) {
10210
+ _context.next = 13;
10211
+ break;
10212
+ }
10213
+ antd.message.warning('相同商品相同颜色配码不可设置相同哦');
10214
+ return _context.abrupt("return", false);
10215
+ case 13:
10216
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
10217
+ _context.next = 26;
10218
+ break;
10219
+ }
10220
+ result = true;
10221
+ _context.prev = 15;
10222
+ _context.next = 18;
10223
+ return checkSpuMatchCode({
10224
+ skcCode: recordItem[recordKey],
10225
+ matchingCode: changeValue,
10226
+ ext1: recordItem.colorName
10227
+ });
10228
+ case 18:
10229
+ result = _context.sent;
10230
+ result = true;
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();
10231
10244
  }
10232
10245
  }, _callee, null, [[15, 22]]);
10233
10246
  }));
@@ -10419,29 +10432,27 @@ var AddSelect = function AddSelect(props) {
10419
10432
  var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
10420
10433
  var isConformToTheRules, newPopValue;
10421
10434
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
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;
10435
+ while (1) switch (_context2.prev = _context2.next) {
10436
+ case 0:
10437
+ _context2.next = 2;
10438
+ return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
10439
+ case 2:
10440
+ isConformToTheRules = _context2.sent;
10441
+ if (isConformToTheRules) {
10442
+ record[item.dataIndex] = value;
10443
+ } else {
10444
+ record[item.dataIndex] = null;
10445
+ }
10446
+ newPopValue = popvalue.map(function (i, innerIndex) {
10447
+ if (innerIndex == index) {
10448
+ i[item.dataIndex] = record[item.dataIndex];
10433
10449
  }
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
- }
10450
+ return i;
10451
+ });
10452
+ setPopValue(newPopValue);
10453
+ case 6:
10454
+ case "end":
10455
+ return _context2.stop();
10445
10456
  }
10446
10457
  }, _callee2);
10447
10458
  }));
@@ -10501,84 +10512,85 @@ var AddSelect = function AddSelect(props) {
10501
10512
  });
10502
10513
  }
10503
10514
  // 数组对象处理,对带有特殊标记的name进行处理
10504
- for (var key in params) {
10515
+ var _loop = function _loop() {
10505
10516
  if (Object.prototype.hasOwnProperty.call(params, key)) {
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;
10517
+ var element = params[key];
10518
+ if (element && key.indexOf('*number*') >= 0) {
10519
+ var dataParams = key.split('*number*');
10520
+ dataParams.forEach(function (value, index) {
10521
+ params[value] = element[index];
10522
+ });
10523
+ delete params[key];
10524
+ } else if (element && key.indexOf('*address*') >= 0) {
10525
+ var _dataParams = key.split('*address*');
10526
+ _dataParams.forEach(function (value, index) {
10527
+ params[value] = element.PCDCode[index];
10528
+ });
10529
+ delete params[key];
10530
+ } else if (element && key.indexOf('*costType*') >= 0) {
10531
+ var _dataParams2 = key.split('*costType*');
10532
+ // eslint-disable-next-line prefer-destructuring
10533
+ params[_dataParams2[0]] = element[1];
10534
+ delete params[key];
10535
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
10536
+ var _dataParams3 = key.split('*fullDate*');
10537
+ _dataParams3.forEach(function (value, index) {
10538
+ if (index === 0) {
10539
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
10540
+ } else {
10541
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
10539
10542
  }
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
- }
10543
+ });
10544
+ delete params[key];
10545
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
10546
+ var _dataParams4 = key.split('*checkBox*');
10547
+ if (element) {
10548
+ params[_dataParams4[0]] = 0;
10549
+ }
10550
+ delete params[key];
10551
+ } else if (element && key.indexOf('*cascader*') >= 0) {
10552
+ var _dataParams5 = key.split('*cascader*');
10553
+ params[_dataParams5[0]] = element[element.length - 1];
10554
+ delete params[key];
10555
+ } else if (element && key.indexOf('*date*') >= 0) {
10556
+ var _dataParams6 = key.split('*date*');
10557
+ _dataParams6.forEach(function (value, index) {
10558
+ if (index === 0) {
10559
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
10571
10560
  } else {
10572
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
10561
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
10573
10562
  }
10574
- delete params[key];
10575
- } else if (Array.isArray(element)) {
10576
- params[key] = element.join(',');
10577
- } else if (element == null || element === undefined || String(element).trim() === '') {
10578
- delete params[key];
10563
+ });
10564
+ delete params[key];
10565
+ } else if (element && key.indexOf('*') >= 0) {
10566
+ var _dataParams7 = key.split('*');
10567
+ _dataParams7.forEach(function (value, index) {
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];
10579
10583
  }
10580
- })();
10584
+ delete params[key];
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
+ }
10581
10590
  }
10591
+ };
10592
+ for (var key in params) {
10593
+ _loop();
10582
10594
  }
10583
10595
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
10584
10596
  pageSize: pageSize,
@@ -10799,8 +10811,15 @@ var AddSelect = function AddSelect(props) {
10799
10811
  handleLoading(isContinue, true);
10800
10812
  onSaveCallback(popvalue).then(function (res) {
10801
10813
  {
10802
- var _document$getElementB3;
10803
- antd.message.success('保存成功');
10814
+ var _Object$keys, _document$getElementB3;
10815
+ // 成功信息可以在调用处处理 即resolve({messageSuccessBackInfo: { needThrowSuccess: false } })、resolve({messageSuccessBackInfo: { needThrowSuccess: true, successMessage: '已保存' } })
10816
+ var initSuccessMessage = '保存成功';
10817
+ var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
10818
+ if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
10819
+ (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
10820
+ } else {
10821
+ antd.message.success(initSuccessMessage);
10822
+ }
10804
10823
  deleteSelectRows();
10805
10824
  (_document$getElementB3 = document.getElementById('first-query')) === null || _document$getElementB3 === void 0 ? void 0 : _document$getElementB3.focus();
10806
10825
  !isContinue && handleCancel();
@@ -12026,65 +12045,70 @@ var BillEntry = function BillEntry(_ref3) {
12026
12045
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
12027
12046
  var canEntryObject, _canEntryObject$error, messageInfo;
12028
12047
  return _regeneratorRuntime().wrap(function _callee$(_context) {
12029
- while (1) {
12030
- 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
- antd.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
- antd.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
- antd.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__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
12067
- }));
12068
- messageInfo && antd.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
- antd.message.success('保存成功');
12048
+ while (1) switch (_context.prev = _context.next) {
12049
+ case 0:
12050
+ if (data === null || data === void 0 ? void 0 : data.length) {
12051
+ _context.next = 3;
12052
+ break;
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);
12078
12102
  }
12079
- setLoading(false);
12080
- }).catch(function (Error) {
12081
- antd.message.error(Error);
12082
- setLoading(false);
12083
- });
12084
- case 18:
12085
- case "end":
12086
- return _context.stop();
12087
- }
12103
+ }
12104
+ setLoading(false);
12105
+ }).catch(function (Error) {
12106
+ antd.message.error(Error);
12107
+ setLoading(false);
12108
+ });
12109
+ case 18:
12110
+ case "end":
12111
+ return _context.stop();
12088
12112
  }
12089
12113
  }, _callee);
12090
12114
  }));
@@ -13499,6 +13523,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
13499
13523
  mappingTextField: 'name',
13500
13524
  mappingValueField: 'code',
13501
13525
  otherParams: {
13526
+ 'qp-status-eq': 1,
13502
13527
  sorter: 'desc-id'
13503
13528
  },
13504
13529
  sourceName: 'customCode'
@@ -14137,7 +14162,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
14137
14162
  }]
14138
14163
  }, modalTableBusProps);
14139
14164
  }
14140
- // 规则场景选择器
14165
+ // 规则模板选择器
14141
14166
  if (type === 'ruleTemplate') {
14142
14167
  requestConfig = _objectSpread2({
14143
14168
  url: "".concat(prefixUrl.selectPrefix, "/ruleTemplate"),
@@ -14152,19 +14177,19 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
14152
14177
  }, requestConfigProp);
14153
14178
  tableSearchForm = [{
14154
14179
  name: 'qp-name-like',
14155
- label: '规则场景名称'
14180
+ label: '规则模板名称'
14156
14181
  }, {
14157
14182
  name: 'qp-code-like',
14158
- label: '规则场景编码'
14183
+ label: '规则模板编码'
14159
14184
  }];
14160
14185
  modalTableProps = _objectSpread2({
14161
- modalTableTitle: '选择规则场景',
14186
+ modalTableTitle: '选择规则模板',
14162
14187
  tableSearchForm: tableSearchForm,
14163
14188
  tableColumns: [{
14164
- title: '规则场景编码',
14189
+ title: '规则模板编码',
14165
14190
  dataIndex: 'code'
14166
14191
  }, {
14167
- title: '规则场景名称',
14192
+ title: '规则模板名称',
14168
14193
  dataIndex: 'name',
14169
14194
  render: function render(text) {
14170
14195
  return handleTextOverflow(text);
@@ -15335,44 +15360,42 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
15335
15360
  var _ctx$form;
15336
15361
  var resData, coverData, data, dataList;
15337
15362
  return _regeneratorRuntime().wrap(function _callee$(_context) {
15338
- while (1) {
15339
- switch (_context.prev = _context.next) {
15340
- case 0:
15341
- resData = (res === null || res === void 0 ? void 0 : res.data) || [];
15342
- if (!(resData.status === '0' || resData.code === '000000')) {
15343
- _context.next = 13;
15344
- break;
15345
- }
15346
- data = resData.data;
15347
- if (!remoteSource.converter) {
15348
- _context.next = 9;
15349
- break;
15350
- }
15351
- _context.next = 6;
15352
- return remoteSource.converter({
15353
- data: [data]
15354
- });
15355
- case 6:
15356
- coverData = _context.sent;
15357
- _context.next = 11;
15363
+ while (1) switch (_context.prev = _context.next) {
15364
+ case 0:
15365
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
15366
+ if (!(resData.status === '0' || resData.code === '000000')) {
15367
+ _context.next = 13;
15358
15368
  break;
15359
- case 9:
15360
- dataList = data && Array.isArray(data) ? data : data && [data] || [];
15361
- coverData = dataList.length && dataList.map(function (ites) {
15362
- return mapSearchTree(ites);
15363
- }) || [];
15364
- case 11:
15365
- _context.next = 14;
15369
+ }
15370
+ data = resData.data;
15371
+ if (!remoteSource.converter) {
15372
+ _context.next = 9;
15366
15373
  break;
15367
- case 13:
15368
- coverData = [];
15369
- case 14:
15370
- setTreeData(coverData);
15371
- ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
15372
- case 16:
15373
- case "end":
15374
- return _context.stop();
15375
- }
15374
+ }
15375
+ _context.next = 6;
15376
+ return remoteSource.converter({
15377
+ data: [data]
15378
+ });
15379
+ case 6:
15380
+ coverData = _context.sent;
15381
+ _context.next = 11;
15382
+ break;
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();
15376
15399
  }
15377
15400
  }, _callee);
15378
15401
  }));
@@ -19410,21 +19433,19 @@ function _outLogin() {
19410
19433
  _outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
19411
19434
  var res;
19412
19435
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19413
- while (1) {
19414
- switch (_context.prev = _context.next) {
19415
- case 0:
19416
- _context.next = 2;
19417
- return axios__default['default']({
19418
- url: '/user/web/loginOut',
19419
- method: 'GET'
19420
- });
19421
- case 2:
19422
- res = _context.sent;
19423
- return _context.abrupt("return", res);
19424
- case 4:
19425
- case "end":
19426
- return _context.stop();
19427
- }
19436
+ while (1) switch (_context.prev = _context.next) {
19437
+ case 0:
19438
+ _context.next = 2;
19439
+ return axios__default['default']({
19440
+ url: '/user/web/loginOut',
19441
+ method: 'GET'
19442
+ });
19443
+ case 2:
19444
+ res = _context.sent;
19445
+ return _context.abrupt("return", res);
19446
+ case 4:
19447
+ case "end":
19448
+ return _context.stop();
19428
19449
  }
19429
19450
  }, _callee);
19430
19451
  }));
@@ -19553,31 +19574,29 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19553
19574
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19554
19575
  var sessionId;
19555
19576
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19556
- while (1) {
19557
- switch (_context.prev = _context.next) {
19558
- case 0:
19559
- _context.next = 2;
19560
- return getSessionId();
19561
- case 2:
19562
- sessionId = _context.sent;
19563
- _context.next = 5;
19564
- return outLogin({
19565
- sessionId: sessionId
19577
+ while (1) switch (_context.prev = _context.next) {
19578
+ case 0:
19579
+ _context.next = 2;
19580
+ return getSessionId();
19581
+ case 2:
19582
+ sessionId = _context.sent;
19583
+ _context.next = 5;
19584
+ return outLogin({
19585
+ sessionId: sessionId
19586
+ });
19587
+ case 5:
19588
+ // @ts-ignore
19589
+ if (BUILD_TYPE) {
19590
+ antd.message.success('退出登录成功');
19591
+ umi.history.replace({
19592
+ pathname: '/user/login'
19566
19593
  });
19567
- case 5:
19568
- // @ts-ignore
19569
- if (BUILD_TYPE) {
19570
- antd.message.success('退出登录成功');
19571
- umi.history.replace({
19572
- pathname: '/user/login'
19573
- });
19574
- } else {
19575
- setLoginOutPath();
19576
- }
19577
- case 6:
19578
- case "end":
19579
- return _context.stop();
19580
- }
19594
+ } else {
19595
+ setLoginOutPath();
19596
+ }
19597
+ case 6:
19598
+ case "end":
19599
+ return _context.stop();
19581
19600
  }
19582
19601
  }, _callee);
19583
19602
  }));
@@ -21405,6 +21424,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
21405
21424
  showSubMenu: isShow
21406
21425
  });
21407
21426
  }, 500);
21427
+ //设置tabs标签左右滚动
21408
21428
  _this.setTabNavTransLate = function (num) {
21409
21429
  var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
21410
21430
  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];
@@ -22085,14 +22105,12 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
22085
22105
  request: function () {
22086
22106
  var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22087
22107
  return _regeneratorRuntime().wrap(function _callee$(_context) {
22088
- while (1) {
22089
- switch (_context.prev = _context.next) {
22090
- case 0:
22091
- return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
22092
- case 1:
22093
- case "end":
22094
- return _context.stop();
22095
- }
22108
+ while (1) switch (_context.prev = _context.next) {
22109
+ case 0:
22110
+ return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
22111
+ case 1:
22112
+ case "end":
22113
+ return _context.stop();
22096
22114
  }
22097
22115
  }, _callee);
22098
22116
  }));
@@ -22623,7 +22641,7 @@ var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
22623
22641
  return /*#__PURE__*/React__default['default'].createElement("td", {
22624
22642
  style: {
22625
22643
  display: tdHidden,
22626
- background: index % 2 === 1 || item.fixed ? '#FAFAFA' : '#fff',
22644
+ background: index % 2 === 1 || item.fixed ? '#f7f8fb' : '#fff',
22627
22645
  minWidth: '100px',
22628
22646
  width: "".concat(itemWidth, "px"),
22629
22647
  height: '40px',
@@ -29630,7 +29648,7 @@ var choiceType = Object.freeze({
29630
29648
  280: '库存组织选择器',
29631
29649
  310: '配送方式选择器',
29632
29650
  330: '变量',
29633
- 340: '规则场景选择器',
29651
+ 340: '规则模板选择器',
29634
29652
  350: '营销区域选择器'
29635
29653
  });
29636
29654
  var inputType = {
@@ -29652,28 +29670,26 @@ var valueType = {
29652
29670
  var getDynamicDict = /*#__PURE__*/function () {
29653
29671
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
29654
29672
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29655
- while (1) {
29656
- switch (_context.prev = _context.next) {
29657
- case 0:
29658
- _context.next = 2;
29659
- return bssula.request({
29660
- url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
29661
- converter: function converter(_ref2) {
29662
- var data = _ref2.data;
29663
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
29664
- return {
29665
- text: d.name,
29666
- value: d.code || d.brandCode
29667
- };
29668
- });
29669
- }
29670
- });
29671
- case 2:
29672
- return _context.abrupt("return", _context.sent);
29673
- case 3:
29674
- case "end":
29675
- return _context.stop();
29676
- }
29673
+ while (1) switch (_context.prev = _context.next) {
29674
+ case 0:
29675
+ _context.next = 2;
29676
+ return bssula.request({
29677
+ url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
29678
+ converter: function converter(_ref2) {
29679
+ var data = _ref2.data;
29680
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
29681
+ return {
29682
+ text: d.name,
29683
+ value: d.code || d.brandCode
29684
+ };
29685
+ });
29686
+ }
29687
+ });
29688
+ case 2:
29689
+ return _context.abrupt("return", _context.sent);
29690
+ case 3:
29691
+ case "end":
29692
+ return _context.stop();
29677
29693
  }
29678
29694
  }, _callee);
29679
29695
  }));
@@ -29723,55 +29739,53 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
29723
29739
  ahooks.useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
29724
29740
  var _ref$current, source;
29725
29741
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29726
- while (1) {
29727
- switch (_context.prev = _context.next) {
29728
- case 0:
29729
- _context.next = 2;
29730
- return setIsShowAndType(function (prev) {
29731
- if (record.inputType === 20 || record.inputType === 30) {
29732
- return {
29733
- isShow: true,
29734
- singleOrMultiple: record.inputType,
29735
- type: record.choiceType
29736
- };
29737
- }
29738
- return prev;
29739
- });
29740
- case 2:
29741
- if (!record.dictionaryCode) {
29742
- _context.next = 17;
29743
- break;
29744
- }
29745
- if (!(record.choiceType == 20)) {
29746
- _context.next = 7;
29747
- break;
29742
+ while (1) switch (_context.prev = _context.next) {
29743
+ case 0:
29744
+ _context.next = 2;
29745
+ return setIsShowAndType(function (prev) {
29746
+ if (record.inputType === 20 || record.inputType === 30) {
29747
+ return {
29748
+ isShow: true,
29749
+ singleOrMultiple: record.inputType,
29750
+ type: record.choiceType
29751
+ };
29748
29752
  }
29749
- _context.t0 = getDictionarySource(record.dictionaryCode);
29750
- _context.next = 15;
29753
+ return prev;
29754
+ });
29755
+ case 2:
29756
+ if (!record.dictionaryCode) {
29757
+ _context.next = 17;
29751
29758
  break;
29752
- case 7:
29753
- if (!(record.choiceType == 30)) {
29754
- _context.next = 13;
29755
- break;
29756
- }
29757
- _context.next = 10;
29758
- return getDynamicDict(record.dictionaryCode);
29759
- case 10:
29760
- _context.t1 = _context.sent;
29761
- _context.next = 14;
29759
+ }
29760
+ if (!(record.choiceType == 20)) {
29761
+ _context.next = 7;
29762
29762
  break;
29763
- case 13:
29764
- _context.t1 = [];
29765
- case 14:
29766
- _context.t0 = _context.t1;
29767
- case 15:
29768
- source = _context.t0;
29769
- // @ts-ignore
29770
- ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
29771
- case 17:
29772
- case "end":
29773
- return _context.stop();
29774
- }
29763
+ }
29764
+ _context.t0 = getDictionarySource(record.dictionaryCode);
29765
+ _context.next = 15;
29766
+ break;
29767
+ case 7:
29768
+ if (!(record.choiceType == 30)) {
29769
+ _context.next = 13;
29770
+ break;
29771
+ }
29772
+ _context.next = 10;
29773
+ return getDynamicDict(record.dictionaryCode);
29774
+ case 10:
29775
+ _context.t1 = _context.sent;
29776
+ _context.next = 14;
29777
+ break;
29778
+ case 13:
29779
+ _context.t1 = [];
29780
+ case 14:
29781
+ _context.t0 = _context.t1;
29782
+ case 15:
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();
29775
29789
  }
29776
29790
  }, _callee);
29777
29791
  })));
@@ -29839,30 +29853,28 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
29839
29853
  var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
29840
29854
  var form, values, name, relates, source;
29841
29855
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
29842
- while (1) {
29843
- switch (_context2.prev = _context2.next) {
29844
- case 0:
29845
- form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
29846
- if (values[0]) {
29847
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
29848
- form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
29849
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
29850
- }
29851
- if (!values[1]) {
29852
- _context2.next = 9;
29853
- break;
29854
- }
29855
- _context2.next = 5;
29856
- return getDynamicDict(record.dictionaryCode || values[1]);
29857
- case 5:
29858
- source = _context2.sent;
29856
+ while (1) switch (_context2.prev = _context2.next) {
29857
+ case 0:
29858
+ form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
29859
+ if (values[0]) {
29859
29860
  form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
29860
29861
  form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
29861
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
29862
- case 9:
29863
- case "end":
29864
- return _context2.stop();
29865
- }
29862
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
29863
+ }
29864
+ if (!values[1]) {
29865
+ _context2.next = 9;
29866
+ break;
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();
29866
29878
  }
29867
29879
  }, _callee2);
29868
29880
  }));
@@ -30322,43 +30334,41 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
30322
30334
  var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
30323
30335
  var values, name, form, source;
30324
30336
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
30325
- while (1) {
30326
- switch (_context3.prev = _context3.next) {
30327
- case 0:
30328
- values = _ref10.values, name = _ref10.name, form = _ref10.form;
30329
- if (values[1] === 40) {
30330
- form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
30331
- form.setFieldVisible(name, false);
30332
- }
30333
- if (!(values[0] === 30)) {
30334
- _context3.next = 10;
30335
- break;
30336
- }
30337
- _context3.next = 5;
30338
- return bssula.request({
30339
- url: '/basic/dictDynamicItem/queryList',
30340
- converter: function converter(_ref11) {
30341
- var data = _ref11.data;
30342
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
30343
- return {
30344
- text: d.dictCode,
30345
- value: d.dictCode
30346
- };
30347
- });
30348
- }
30349
- });
30350
- case 5:
30351
- source = _context3.sent;
30352
- form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
30353
- form.setFieldVisible(name, true);
30354
- _context3.next = 11;
30355
- break;
30356
- case 10:
30337
+ while (1) switch (_context3.prev = _context3.next) {
30338
+ case 0:
30339
+ values = _ref10.values, name = _ref10.name, form = _ref10.form;
30340
+ if (values[1] === 40) {
30341
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
30357
30342
  form.setFieldVisible(name, false);
30358
- case 11:
30359
- case "end":
30360
- return _context3.stop();
30361
- }
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
+ });
30359
+ }
30360
+ });
30361
+ case 5:
30362
+ source = _context3.sent;
30363
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
30364
+ form.setFieldVisible(name, true);
30365
+ _context3.next = 11;
30366
+ break;
30367
+ case 10:
30368
+ form.setFieldVisible(name, false);
30369
+ case 11:
30370
+ case "end":
30371
+ return _context3.stop();
30362
30372
  }
30363
30373
  }, _callee3);
30364
30374
  }));
@@ -30547,66 +30557,64 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
30547
30557
  var _ref$current4, _res$editableStatus;
30548
30558
  var res, _res$defaultValue;
30549
30559
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
30550
- while (1) {
30551
- switch (_context4.prev = _context4.next) {
30552
- case 0:
30553
- _context4.next = 2;
30554
- return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
30555
- case 2:
30556
- res = _context4.sent;
30557
- res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
30558
- res.fieldGroup = record.fieldGroup;
30559
- res.businessType = record.businessType;
30560
- res.info = {
30561
- enumeration: res.enumeration,
30562
- dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
30563
- formula: res.formula,
30564
- scale: res.scale,
30565
- variable: res.variable
30566
- };
30567
- res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
30568
- res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
30569
- res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
30570
- if (res.inputType === 40) {
30571
- res.valueType = 22;
30560
+ while (1) switch (_context4.prev = _context4.next) {
30561
+ case 0:
30562
+ _context4.next = 2;
30563
+ return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
30564
+ case 2:
30565
+ res = _context4.sent;
30566
+ res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
30567
+ res.fieldGroup = record.fieldGroup;
30568
+ res.businessType = record.businessType;
30569
+ res.info = {
30570
+ enumeration: res.enumeration,
30571
+ dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
30572
+ formula: res.formula,
30573
+ scale: res.scale,
30574
+ variable: res.variable
30575
+ };
30576
+ res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
30577
+ res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
30578
+ res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
30579
+ if (res.inputType === 40) {
30580
+ res.valueType = 22;
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(',');
30572
30586
  }
30573
- // 把数组处理成文本
30574
- if (res.inputType === 30) {
30575
- if (res.defaultValue) {
30576
- res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
30577
- }
30587
+ }
30588
+ res.fieldMapping = res.fieldMapping || '';
30589
+ delete res.formula;
30590
+ delete res.showValue;
30591
+ if (!(mode === 'create')) {
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();
30578
30602
  }
30579
- res.fieldMapping = res.fieldMapping || '';
30580
- delete res.formula;
30581
- delete res.showValue;
30582
- if (!(mode === 'create')) {
30583
- _context4.next = 18;
30584
- break;
30603
+ });
30604
+ return _context4.abrupt("return");
30605
+ case 18:
30606
+ bssula.request({
30607
+ url: "/basic/flow/businessField/".concat(record.id),
30608
+ method: 'PATCH',
30609
+ params: res,
30610
+ successMessage: '修改成功!',
30611
+ converter: function converter() {
30612
+ onParentOk();
30585
30613
  }
30586
- bssula.request({
30587
- url: "/basic/flow/businessField",
30588
- method: 'POST',
30589
- params: res,
30590
- successMessage: '创建成功!',
30591
- converter: function converter() {
30592
- onParentOk();
30593
- }
30594
- });
30595
- return _context4.abrupt("return");
30596
- case 18:
30597
- bssula.request({
30598
- url: "/basic/flow/businessField/".concat(record.id),
30599
- method: 'PATCH',
30600
- params: res,
30601
- successMessage: '修改成功!',
30602
- converter: function converter() {
30603
- onParentOk();
30604
- }
30605
- });
30606
- case 19:
30607
- case "end":
30608
- return _context4.stop();
30609
- }
30614
+ });
30615
+ case 19:
30616
+ case "end":
30617
+ return _context4.stop();
30610
30618
  }
30611
30619
  }, _callee4);
30612
30620
  }));