@bit-sun/business-component 2.2.44 → 2.2.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) 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/SearchSelect/index.d.ts +1 -1
  17. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  18. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  19. package/dist/index.esm.js +704 -660
  20. package/dist/index.js +703 -659
  21. package/dist/utils/LocalstorageUtils.d.ts +1 -0
  22. package/dist/utils/TableUtils.d.ts +2 -2
  23. package/dist/utils/utils.d.ts +1 -1
  24. package/docs/index.md +21 -21
  25. package/lib/assets/drag.svg +17 -17
  26. package/lib/assets/exportFail.svg +37 -37
  27. package/lib/assets/exportProcessing.svg +28 -28
  28. package/lib/assets/exportSuccess.svg +34 -34
  29. package/lib/assets/label_icon_bottom.svg +25 -25
  30. package/lib/assets/upExport.svg +22 -22
  31. package/package.json +77 -77
  32. package/src/assets/32.svg +27 -27
  33. package/src/assets/addIcon.svg +17 -17
  34. package/src/assets/allfunc.svg +27 -27
  35. package/src/assets/arrowRight.svg +24 -24
  36. package/src/assets/btn-delete.svg +29 -29
  37. package/src/assets/btn-edit.svg +19 -19
  38. package/src/assets/btn-more.svg +17 -17
  39. package/src/assets/btn-submit.svg +19 -19
  40. package/src/assets/caidan.svg +11 -11
  41. package/src/assets/close.svg +26 -26
  42. package/src/assets/drag.svg +17 -17
  43. package/src/assets/exportFail.svg +37 -37
  44. package/src/assets/exportProcessing.svg +28 -28
  45. package/src/assets/exportSuccess.svg +34 -34
  46. package/src/assets/fixed-left-active.svg +11 -11
  47. package/src/assets/fixed-left.svg +15 -15
  48. package/src/assets/fixed-right-active.svg +11 -11
  49. package/src/assets/fixed-right.svg +15 -15
  50. package/src/assets/guanbi.svg +15 -15
  51. package/src/assets/icon-quanping.svg +15 -15
  52. package/src/assets/icon-shezhi.svg +17 -17
  53. package/src/assets/label_icon_bottom.svg +25 -25
  54. package/src/assets/list-no-img.svg +21 -21
  55. package/src/assets/morentouxiang-32.svg +23 -23
  56. package/src/assets/scanning.svg +24 -24
  57. package/src/assets/upExport.svg +22 -22
  58. package/src/components/Business/AddSelectBusiness/index.md +161 -161
  59. package/src/components/Business/AddSelectBusiness/index.tsx +887 -861
  60. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  61. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  62. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  64. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  65. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  66. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  67. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  68. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  69. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  70. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  71. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  72. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  73. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  74. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  75. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  76. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  77. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  78. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  79. package/src/components/Business/BsLayouts/index.less +79 -79
  80. package/src/components/Business/BsLayouts/index.tsx +1484 -1484
  81. package/src/components/Business/BsLayouts/service.ts +10 -10
  82. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  83. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +564 -564
  84. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  85. package/src/components/Business/BsSulaQueryTable/index.tsx +527 -527
  86. package/src/components/Business/BsSulaQueryTable/setting.tsx +832 -828
  87. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  88. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  89. package/src/components/Business/CommodityEntry/index.md +70 -70
  90. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  91. package/src/components/Business/CommonAlert/index.tsx +23 -23
  92. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  93. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  94. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  95. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  96. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  97. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  98. package/src/components/Business/HomePageWrapper/index.less +33 -33
  99. package/src/components/Business/HomePageWrapper/index.md +45 -45
  100. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  101. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  102. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +201 -201
  103. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  104. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  105. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  106. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  107. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  108. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  109. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  110. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  111. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  112. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  113. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  114. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  115. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  116. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  117. package/src/components/Business/JsonQueryTable/index.less +16 -16
  118. package/src/components/Business/JsonQueryTable/index.md +328 -328
  119. package/src/components/Business/JsonQueryTable/index.tsx +320 -320
  120. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  121. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  122. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  123. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  124. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  125. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  126. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  127. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  128. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  129. package/src/components/Business/SearchSelect/BusinessUtils.ts +1732 -1732
  130. package/src/components/Business/SearchSelect/common.ts +53 -53
  131. package/src/components/Business/SearchSelect/index.md +1319 -1319
  132. package/src/components/Business/SearchSelect/index.tsx +55 -52
  133. package/src/components/Business/SearchSelect/utils.ts +100 -100
  134. package/src/components/Business/StateFlow/index.less +130 -130
  135. package/src/components/Business/StateFlow/index.md +60 -60
  136. package/src/components/Business/StateFlow/index.tsx +29 -29
  137. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  138. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  139. package/src/components/Business/TreeSearchSelect/utils.ts +69 -69
  140. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  141. package/src/components/Business/columnSettingTable/index.less +247 -247
  142. package/src/components/Business/columnSettingTable/index.md +357 -357
  143. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  144. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  145. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  146. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +86 -86
  147. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  148. package/src/components/Business/moreTreeTable/index.less +99 -99
  149. package/src/components/Business/moreTreeTable/index.md +448 -448
  150. package/src/components/Business/moreTreeTable/index.tsx +380 -380
  151. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  152. package/src/components/Functional/AddSelect/helps.ts +14 -14
  153. package/src/components/Functional/AddSelect/index.less +367 -367
  154. package/src/components/Functional/AddSelect/index.md +155 -155
  155. package/src/components/Functional/AddSelect/index.tsx +1279 -1279
  156. package/src/components/Functional/BillEntry/index.less +371 -371
  157. package/src/components/Functional/BillEntry/index.md +39 -39
  158. package/src/components/Functional/BillEntry/index.tsx +772 -772
  159. package/src/components/Functional/DataImport/index.less +63 -63
  160. package/src/components/Functional/DataImport/index.md +44 -44
  161. package/src/components/Functional/DataImport/index.tsx +695 -695
  162. package/src/components/Functional/DataValidation/index.less +63 -63
  163. package/src/components/Functional/DataValidation/index.md +39 -39
  164. package/src/components/Functional/DataValidation/index.tsx +687 -687
  165. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  166. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  167. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  168. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  169. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  170. package/src/components/Functional/SearchSelect/index.less +115 -115
  171. package/src/components/Functional/SearchSelect/index.md +141 -141
  172. package/src/components/Functional/SearchSelect/index.tsx +858 -849
  173. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  174. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  175. package/src/components/Functional/TreeSearchSelect/index.tsx +162 -162
  176. package/src/index.ts +34 -34
  177. package/src/plugin/TableColumnSetting/index.less +247 -247
  178. package/src/plugin/TableColumnSetting/index.md +50 -50
  179. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  180. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  181. package/src/styles/bsDefault.less +1912 -1912
  182. package/src/utils/CheckOneUser/index.md +39 -39
  183. package/src/utils/CheckOneUser/index.ts +51 -51
  184. package/src/utils/LocalstorageUtils.ts +95 -90
  185. package/src/utils/TableUtils.tsx +18 -18
  186. package/src/utils/checkUtils.ts +39 -39
  187. package/src/utils/enumConfig.ts +11 -11
  188. package/src/utils/getFormMode.js +12 -12
  189. package/src/utils/index.ts +3 -3
  190. package/src/utils/requestUtils.ts +34 -34
  191. package/src/utils/serialize.js +7 -7
  192. package/src/utils/utils.ts +183 -183
  193. package/tsconfig.json +29 -29
  194. 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({
@@ -2080,7 +2093,8 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2080
2093
  needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
2081
2094
  _props$getPopupContai = props.getPopupContainer,
2082
2095
  _getPopupContainer = _props$getPopupContai === void 0 ? undefined : _props$getPopupContai,
2083
- fieldComponent = props.fieldComponent;
2096
+ fieldComponent = props.fieldComponent,
2097
+ selectBusinessType = props.selectBusinessType;
2084
2098
  var _ref = requestConfig || {},
2085
2099
  url = _ref.url,
2086
2100
  otherParams = _ref.otherParams,
@@ -2284,84 +2298,85 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2284
2298
  });
2285
2299
  }
2286
2300
  // 数组对象处理,对带有特殊标记的name进行处理
2287
- for (var key in params) {
2301
+ var _loop = function _loop() {
2288
2302
  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;
2303
+ var element = params[key];
2304
+ if (element && key.indexOf('*number*') >= 0) {
2305
+ var dataParams = key.split('*number*');
2306
+ dataParams.forEach(function (value, index) {
2307
+ params[value] = element[index];
2308
+ });
2309
+ delete params[key];
2310
+ } else if (element && key.indexOf('*address*') >= 0) {
2311
+ var _dataParams = key.split('*address*');
2312
+ _dataParams.forEach(function (value, index) {
2313
+ params[value] = element.PCDCode[index];
2314
+ });
2315
+ delete params[key];
2316
+ } else if (element && key.indexOf('*costType*') >= 0) {
2317
+ var _dataParams2 = key.split('*costType*');
2318
+ // eslint-disable-next-line prefer-destructuring
2319
+ params[_dataParams2[0]] = element[1];
2320
+ delete params[key];
2321
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
2322
+ var _dataParams3 = key.split('*fullDate*');
2323
+ _dataParams3.forEach(function (value, index) {
2324
+ if (index === 0) {
2325
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2326
+ } else {
2327
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2322
2328
  }
2323
- 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
- }
2329
+ });
2330
+ delete params[key];
2331
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2332
+ var _dataParams4 = key.split('*checkBox*');
2333
+ if (element) {
2334
+ params[_dataParams4[0]] = 0;
2335
+ }
2336
+ delete params[key];
2337
+ } else if (element && key.indexOf('*cascader*') >= 0) {
2338
+ var _dataParams5 = key.split('*cascader*');
2339
+ params[_dataParams5[0]] = element[element.length - 1];
2340
+ delete params[key];
2341
+ } else if (element && key.indexOf('*date*') >= 0) {
2342
+ var _dataParams6 = key.split('*date*');
2343
+ _dataParams6.forEach(function (value, index) {
2344
+ if (index === 0) {
2345
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2354
2346
  } else {
2355
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2347
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2348
+ }
2349
+ });
2350
+ delete params[key];
2351
+ } else if (element && key.indexOf('*') >= 0) {
2352
+ var _dataParams7 = key.split('*');
2353
+ _dataParams7.forEach(function (value, index) {
2354
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
2355
+ });
2356
+ delete params[key];
2357
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
2358
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
2359
+ var _dataParams8 = key.split('_selectNumberRange')[0];
2360
+ if (params[key][0] === 'range') {
2361
+ if (params[key][1][0]) {
2362
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
2363
+ }
2364
+ if (params[key][1][1]) {
2365
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
2356
2366
  }
2357
- 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];
2367
+ } else {
2368
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2362
2369
  }
2363
- })();
2370
+ delete params[key];
2371
+ } else if (Array.isArray(element)) {
2372
+ params[key] = element.join(',');
2373
+ } else if (element == null || element === undefined || String(element).trim() === '') {
2374
+ delete params[key];
2375
+ }
2364
2376
  }
2377
+ };
2378
+ for (var key in params) {
2379
+ _loop();
2365
2380
  }
2366
2381
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
2367
2382
  pageSize: pageSize,
@@ -2485,6 +2500,13 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2485
2500
  React.useEffect(function () {
2486
2501
  makeUniqueValue();
2487
2502
  }, [resultSourceKey]);
2503
+ React.useEffect(function () {
2504
+ if (init) {
2505
+ setItems([]);
2506
+ setItemsTotal(0);
2507
+ run('init');
2508
+ }
2509
+ }, [selectBusinessType]);
2488
2510
  var showModal = function showModal() {
2489
2511
  getData({
2490
2512
  pageSize: tableInitPageSize,
@@ -9577,58 +9599,59 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
9577
9599
  * @returns 返回处理后的查询参数
9578
9600
  */
9579
9601
  function queryParams(params, flag) {
9580
- for (var key in params) {
9602
+ var _loop = function _loop() {
9581
9603
  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;
9604
+ var element = params[key];
9605
+ if (element && key.indexOf('*number*') >= 0) {
9606
+ var dataParams = key.split('*number*');
9607
+ dataParams.forEach(function (value, index) {
9608
+ params[value] = element[index];
9609
+ });
9610
+ delete params[key];
9611
+ } else if (element && key.indexOf('*address*') >= 0) {
9612
+ var _dataParams = key.split('*address*');
9613
+ _dataParams.forEach(function (value, index) {
9614
+ params[value] = element.PCDCode[index];
9615
+ });
9616
+ delete params[key];
9617
+ } else if (element && key.indexOf('*costType*') >= 0) {
9618
+ var _dataParams2 = key.split('*costType*');
9619
+ // eslint-disable-next-line prefer-destructuring
9620
+ params[_dataParams2[0]] = element[1];
9621
+ delete params[key];
9622
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
9623
+ var _dataParams3 = key.split('*fullDate*');
9624
+ _dataParams3.forEach(function (value, index) {
9625
+ if (index === 0) {
9626
+ params[value] = hooks(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
9622
9627
  } else {
9623
- params["qp-".concat(_dataParams5[0], "-like")] = element;
9624
- params["qp-".concat(_dataParams5[0], "-in")] = null;
9628
+ params[value] = hooks(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
9625
9629
  }
9626
- delete params[key];
9627
- } else if (Array.isArray(element)) {
9628
- params[key] = element.join(',');
9630
+ });
9631
+ delete params[key];
9632
+ } else if (element && key.indexOf('*') >= 0) {
9633
+ var _dataParams4 = key.split('*');
9634
+ _dataParams4.forEach(function (value, index) {
9635
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
9636
+ });
9637
+ delete params[key];
9638
+ } else if (element && key.indexOf('_likeIn_') >= 0) {
9639
+ var _dataParams5 = key.split('_likeIn_');
9640
+ if (element.indexOf(',') >= 0) {
9641
+ params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
9642
+ params["qp-".concat(_dataParams5[0], "-like")] = null;
9643
+ } else {
9644
+ params["qp-".concat(_dataParams5[0], "-like")] = element;
9645
+ params["qp-".concat(_dataParams5[0], "-in")] = null;
9629
9646
  }
9630
- })();
9647
+ delete params[key];
9648
+ } else if (Array.isArray(element)) {
9649
+ params[key] = element.join(',');
9650
+ }
9631
9651
  }
9652
+ };
9653
+ for (var key in params) {
9654
+ _loop();
9632
9655
  }
9633
9656
  return flag ? params : qs.stringify(params);
9634
9657
  }
@@ -10158,76 +10181,74 @@ var AddSelect = function AddSelect(props) {
10158
10181
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
10159
10182
  var result;
10160
10183
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10161
- while (1) {
10162
- 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;
10184
+ while (1) switch (_context.prev = _context.next) {
10185
+ case 0:
10186
+ if (!(bType == 'skc' && tList.some(function (i) {
10187
+ return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
10188
+ }))) {
10189
+ _context.next = 3;
10218
10190
  break;
10219
- 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
- }
10191
+ }
10192
+ antd.message.warning('相同skc配码不可设置相同哦');
10193
+ return _context.abrupt("return", false);
10194
+ case 3:
10195
+ if (!(bType == 'spu')) {
10196
+ _context.next = 26;
10197
+ break;
10198
+ }
10199
+ if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
10200
+ return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
10201
+ }))) {
10202
+ _context.next = 7;
10203
+ break;
10204
+ }
10205
+ antd.message.warning('相同商品相同配码颜色不可设置相同哦');
10206
+ return _context.abrupt("return", false);
10207
+ case 7:
10208
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
10209
+ _context.next = 10;
10210
+ break;
10211
+ }
10212
+ antd.message.warning('请先选择颜色!');
10213
+ return _context.abrupt("return", false);
10214
+ case 10:
10215
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
10216
+ return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
10217
+ }))) {
10218
+ _context.next = 13;
10219
+ break;
10220
+ }
10221
+ antd.message.warning('相同商品相同颜色配码不可设置相同哦');
10222
+ return _context.abrupt("return", false);
10223
+ case 13:
10224
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
10225
+ _context.next = 26;
10226
+ break;
10227
+ }
10228
+ result = true;
10229
+ _context.prev = 15;
10230
+ _context.next = 18;
10231
+ return checkSpuMatchCode({
10232
+ skcCode: recordItem[recordKey],
10233
+ matchingCode: changeValue,
10234
+ ext1: recordItem.colorName
10235
+ });
10236
+ case 18:
10237
+ result = _context.sent;
10238
+ result = true;
10239
+ _context.next = 25;
10240
+ break;
10241
+ case 22:
10242
+ _context.prev = 22;
10243
+ _context.t0 = _context["catch"](15);
10244
+ result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
10245
+ case 25:
10246
+ return _context.abrupt("return", result);
10247
+ case 26:
10248
+ return _context.abrupt("return", true);
10249
+ case 27:
10250
+ case "end":
10251
+ return _context.stop();
10231
10252
  }
10232
10253
  }, _callee, null, [[15, 22]]);
10233
10254
  }));
@@ -10419,29 +10440,27 @@ var AddSelect = function AddSelect(props) {
10419
10440
  var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
10420
10441
  var isConformToTheRules, newPopValue;
10421
10442
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
10422
- while (1) {
10423
- 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;
10443
+ while (1) switch (_context2.prev = _context2.next) {
10444
+ case 0:
10445
+ _context2.next = 2;
10446
+ return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
10447
+ case 2:
10448
+ isConformToTheRules = _context2.sent;
10449
+ if (isConformToTheRules) {
10450
+ record[item.dataIndex] = value;
10451
+ } else {
10452
+ record[item.dataIndex] = null;
10453
+ }
10454
+ newPopValue = popvalue.map(function (i, innerIndex) {
10455
+ if (innerIndex == index) {
10456
+ i[item.dataIndex] = record[item.dataIndex];
10433
10457
  }
10434
- 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
- }
10458
+ return i;
10459
+ });
10460
+ setPopValue(newPopValue);
10461
+ case 6:
10462
+ case "end":
10463
+ return _context2.stop();
10445
10464
  }
10446
10465
  }, _callee2);
10447
10466
  }));
@@ -10501,84 +10520,85 @@ var AddSelect = function AddSelect(props) {
10501
10520
  });
10502
10521
  }
10503
10522
  // 数组对象处理,对带有特殊标记的name进行处理
10504
- for (var key in params) {
10523
+ var _loop = function _loop() {
10505
10524
  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;
10525
+ var element = params[key];
10526
+ if (element && key.indexOf('*number*') >= 0) {
10527
+ var dataParams = key.split('*number*');
10528
+ dataParams.forEach(function (value, index) {
10529
+ params[value] = element[index];
10530
+ });
10531
+ delete params[key];
10532
+ } else if (element && key.indexOf('*address*') >= 0) {
10533
+ var _dataParams = key.split('*address*');
10534
+ _dataParams.forEach(function (value, index) {
10535
+ params[value] = element.PCDCode[index];
10536
+ });
10537
+ delete params[key];
10538
+ } else if (element && key.indexOf('*costType*') >= 0) {
10539
+ var _dataParams2 = key.split('*costType*');
10540
+ // eslint-disable-next-line prefer-destructuring
10541
+ params[_dataParams2[0]] = element[1];
10542
+ delete params[key];
10543
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
10544
+ var _dataParams3 = key.split('*fullDate*');
10545
+ _dataParams3.forEach(function (value, index) {
10546
+ if (index === 0) {
10547
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
10548
+ } else {
10549
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
10539
10550
  }
10540
- 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
- }
10551
+ });
10552
+ delete params[key];
10553
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
10554
+ var _dataParams4 = key.split('*checkBox*');
10555
+ if (element) {
10556
+ params[_dataParams4[0]] = 0;
10557
+ }
10558
+ delete params[key];
10559
+ } else if (element && key.indexOf('*cascader*') >= 0) {
10560
+ var _dataParams5 = key.split('*cascader*');
10561
+ params[_dataParams5[0]] = element[element.length - 1];
10562
+ delete params[key];
10563
+ } else if (element && key.indexOf('*date*') >= 0) {
10564
+ var _dataParams6 = key.split('*date*');
10565
+ _dataParams6.forEach(function (value, index) {
10566
+ if (index === 0) {
10567
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
10571
10568
  } else {
10572
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
10569
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
10573
10570
  }
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];
10571
+ });
10572
+ delete params[key];
10573
+ } else if (element && key.indexOf('*') >= 0) {
10574
+ var _dataParams7 = key.split('*');
10575
+ _dataParams7.forEach(function (value, index) {
10576
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
10577
+ });
10578
+ delete params[key];
10579
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
10580
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
10581
+ var _dataParams8 = key.split('_selectNumberRange')[0];
10582
+ if (params[key][0] === 'range') {
10583
+ if (params[key][1][0]) {
10584
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
10585
+ }
10586
+ if (params[key][1][1]) {
10587
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
10588
+ }
10589
+ } else {
10590
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
10579
10591
  }
10580
- })();
10592
+ delete params[key];
10593
+ } else if (Array.isArray(element)) {
10594
+ params[key] = element.join(',');
10595
+ } else if (element == null || element === undefined || String(element).trim() === '') {
10596
+ delete params[key];
10597
+ }
10581
10598
  }
10599
+ };
10600
+ for (var key in params) {
10601
+ _loop();
10582
10602
  }
10583
10603
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
10584
10604
  pageSize: pageSize,
@@ -10678,8 +10698,8 @@ var AddSelect = function AddSelect(props) {
10678
10698
  pageSize: 5000,
10679
10699
  currentPage: 1
10680
10700
  })]).then(function (x) {
10681
- formatSource(x, 0, 2, tableSearchForm, ['id', 'name']);
10682
- formatTreeDataSource(x, 1, 3, tableSearchForm);
10701
+ formatSource(x, 0, 3, tableSearchForm, ['id', 'name']);
10702
+ formatTreeDataSource(x, 1, 4, tableSearchForm);
10683
10703
  });
10684
10704
  }
10685
10705
  if (businessType == 'skc') {
@@ -12033,72 +12053,70 @@ var BillEntry = function BillEntry(_ref3) {
12033
12053
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
12034
12054
  var canEntryObject, _canEntryObject$error, messageInfo;
12035
12055
  return _regeneratorRuntime().wrap(function _callee$(_context) {
12036
- while (1) {
12037
- switch (_context.prev = _context.next) {
12038
- case 0:
12039
- if (data === null || data === void 0 ? void 0 : data.length) {
12040
- _context.next = 3;
12041
- break;
12042
- }
12043
- antd.message.warning('至少录入一条数据');
12044
- return _context.abrupt("return");
12045
- case 3:
12046
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
12047
- return d.skuCode && d.name;
12048
- })) {
12049
- _context.next = 6;
12050
- break;
12051
- }
12052
- antd.message.warning('请选择商品!');
12053
- return _context.abrupt("return");
12054
- case 6:
12055
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
12056
- return d.count;
12057
- })) {
12058
- _context.next = 9;
12059
- break;
12060
- }
12061
- antd.message.warning('请填写商品数量!');
12062
- return _context.abrupt("return");
12063
- case 9:
12064
- _context.next = 11;
12065
- return isSkuCanEntry(data);
12066
- case 11:
12067
- canEntryObject = _context.sent;
12068
- if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
12069
- _context.next = 16;
12070
- break;
12071
- }
12072
- messageInfo = (canEntryObject === null || canEntryObject === void 0 ? void 0 : (_canEntryObject$error = canEntryObject.errorList) === null || _canEntryObject$error === void 0 ? void 0 : _canEntryObject$error.length) && (canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.errorList.map(function (i) {
12073
- return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
12074
- }));
12075
- messageInfo && antd.message.warning({
12076
- content: messageInfo,
12077
- duration: 6
12078
- });
12079
- return _context.abrupt("return");
12080
- case 16:
12081
- setLoading(true);
12082
- onSaveCallback(data).then(function (res) {
12083
- {
12084
- var _Object$keys;
12085
- var initSuccessMessage = '保存成功';
12086
- var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
12087
- if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
12088
- (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
12089
- } else {
12090
- antd.message.success(initSuccessMessage);
12091
- }
12056
+ while (1) switch (_context.prev = _context.next) {
12057
+ case 0:
12058
+ if (data === null || data === void 0 ? void 0 : data.length) {
12059
+ _context.next = 3;
12060
+ break;
12061
+ }
12062
+ antd.message.warning('至少录入一条数据');
12063
+ return _context.abrupt("return");
12064
+ case 3:
12065
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
12066
+ return d.skuCode && d.name;
12067
+ })) {
12068
+ _context.next = 6;
12069
+ break;
12070
+ }
12071
+ antd.message.warning('请选择商品!');
12072
+ return _context.abrupt("return");
12073
+ case 6:
12074
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
12075
+ return d.count;
12076
+ })) {
12077
+ _context.next = 9;
12078
+ break;
12079
+ }
12080
+ antd.message.warning('请填写商品数量!');
12081
+ return _context.abrupt("return");
12082
+ case 9:
12083
+ _context.next = 11;
12084
+ return isSkuCanEntry(data);
12085
+ case 11:
12086
+ canEntryObject = _context.sent;
12087
+ if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
12088
+ _context.next = 16;
12089
+ break;
12090
+ }
12091
+ messageInfo = (canEntryObject === null || canEntryObject === void 0 ? void 0 : (_canEntryObject$error = canEntryObject.errorList) === null || _canEntryObject$error === void 0 ? void 0 : _canEntryObject$error.length) && (canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.errorList.map(function (i) {
12092
+ return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
12093
+ }));
12094
+ messageInfo && antd.message.warning({
12095
+ content: messageInfo,
12096
+ duration: 6
12097
+ });
12098
+ return _context.abrupt("return");
12099
+ case 16:
12100
+ setLoading(true);
12101
+ onSaveCallback(data).then(function (res) {
12102
+ {
12103
+ var _Object$keys;
12104
+ var initSuccessMessage = '保存成功';
12105
+ var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
12106
+ if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
12107
+ (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
12108
+ } else {
12109
+ antd.message.success(initSuccessMessage);
12092
12110
  }
12093
- setLoading(false);
12094
- }).catch(function (Error) {
12095
- antd.message.error(Error);
12096
- setLoading(false);
12097
- });
12098
- case 18:
12099
- case "end":
12100
- return _context.stop();
12101
- }
12111
+ }
12112
+ setLoading(false);
12113
+ }).catch(function (Error) {
12114
+ antd.message.error(Error);
12115
+ setLoading(false);
12116
+ });
12117
+ case 18:
12118
+ case "end":
12119
+ return _context.stop();
12102
12120
  }
12103
12121
  }, _callee);
12104
12122
  }));
@@ -14231,7 +14249,7 @@ var BusinessSearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
14231
14249
  needModalTable: needModalTable,
14232
14250
  modalTableProps: modalTableProps
14233
14251
  });
14234
- }, [props === null || props === void 0 ? void 0 : props.value, props.disabled]);
14252
+ }, [props === null || props === void 0 ? void 0 : props.value, props.disabled, props.selectBusinessType]);
14235
14253
  React.useImperativeHandle(ref, function () {
14236
14254
  return {
14237
14255
  getRef: function getRef() {
@@ -14253,9 +14271,13 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Busines
14253
14271
  if (props && props.disabled !== nextProps.disabled) {
14254
14272
  return false;
14255
14273
  }
14274
+ if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
14275
+ return false;
14276
+ }
14256
14277
  return true;
14257
14278
  });
14258
14279
 
14280
+ // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
14259
14281
  function handleSelectColumn(c, parentProps) {
14260
14282
  var result = c;
14261
14283
  var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
@@ -14267,7 +14289,7 @@ function handleSelectColumn(c, parentProps) {
14267
14289
  return !exceptColumns.includes(i.dataIndex);
14268
14290
  });
14269
14291
  }
14270
- // 追加
14292
+ // 追加(最好不用这个,当组件不固定时候会有影响)
14271
14293
  if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
14272
14294
  additionColumns.forEach(function (i) {
14273
14295
  result.splice(i.position, 0, i.column);
@@ -14280,6 +14302,7 @@ function handleSelectColumn(c, parentProps) {
14280
14302
  return result;
14281
14303
  }
14282
14304
  var AddSkuSelect = function AddSkuSelect(parProps) {
14305
+ var _parProps$requestConf, _parProps$requestConf2;
14283
14306
  var selectProps = {
14284
14307
  mode: 'multiple'
14285
14308
  };
@@ -14292,6 +14315,19 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14292
14315
  title: 'SKU编码',
14293
14316
  width: 150,
14294
14317
  dataIndex: 'skuCode'
14318
+ }, {
14319
+ title: '商品条码',
14320
+ width: 100,
14321
+ ellipsis: {
14322
+ showTitle: false
14323
+ },
14324
+ dataIndex: 'itemEancode',
14325
+ render: function render(text) {
14326
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14327
+ placement: "topLeft",
14328
+ title: text
14329
+ }, text);
14330
+ }
14295
14331
  }, {
14296
14332
  title: 'SKU名称',
14297
14333
  width: 200,
@@ -14379,11 +14415,11 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14379
14415
  requestConfig: _objectSpread2({
14380
14416
  url: "/items/sku/pager/v2",
14381
14417
  filter: 'qp-name-like',
14382
- otherParams: {
14418
+ otherParams: _objectSpread2({
14383
14419
  'qp-combination-eq': false,
14384
14420
  'qp-approveStatus-eq': 1,
14385
14421
  'qp-status-eq': 1
14386
- },
14422
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
14387
14423
  mappingTextField: 'name',
14388
14424
  mappingValueField: 'skuCode'
14389
14425
  }, parProps.requestConfig),
@@ -14405,6 +14441,13 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14405
14441
  }, {
14406
14442
  name: 'qp-skuName-like',
14407
14443
  label: 'SKU名称'
14444
+ }, {
14445
+ name: 'qp-code-in',
14446
+ label: '商品条码',
14447
+ field: {
14448
+ type: 'multipleQueryInput',
14449
+ props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
14450
+ }
14408
14451
  }, {
14409
14452
  name: 'qp-brandId-in',
14410
14453
  type: 'select',
@@ -14485,12 +14528,12 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14485
14528
  }));
14486
14529
  }
14487
14530
  }, {
14488
- title: '国际条码',
14531
+ title: '商品条码',
14489
14532
  width: 100,
14490
14533
  ellipsis: {
14491
14534
  showTitle: false
14492
14535
  },
14493
- dataIndex: 'barCode',
14536
+ dataIndex: 'itemEancode',
14494
14537
  render: function render(text) {
14495
14538
  return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
14496
14539
  placement: "topLeft",
@@ -14596,6 +14639,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
14596
14639
  })));
14597
14640
  };
14598
14641
  var AddSkcSelect = function AddSkcSelect(parProps) {
14642
+ var _parProps$requestConf3;
14599
14643
  var selectProps = {
14600
14644
  mode: 'multiple'
14601
14645
  };
@@ -14673,9 +14717,9 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
14673
14717
  requestConfig: _objectSpread2({
14674
14718
  url: "/items/skc/skcSelect",
14675
14719
  filter: 'qp-name-like',
14676
- otherParams: {
14720
+ otherParams: _objectSpread2({
14677
14721
  'qp-skcStatus-eq': 1
14678
- },
14722
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf3 = parProps.requestConfig) === null || _parProps$requestConf3 === void 0 ? void 0 : _parProps$requestConf3.addOtherParams) || {}),
14679
14723
  mappingTextField: 'name',
14680
14724
  mappingValueField: 'code'
14681
14725
  }, parProps.requestConfig),
@@ -14875,6 +14919,7 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
14875
14919
  })));
14876
14920
  };
14877
14921
  var AddSpuSelect = function AddSpuSelect(parProps) {
14922
+ var _parProps$requestConf4;
14878
14923
  var selectProps = {
14879
14924
  mode: 'multiple'
14880
14925
  };
@@ -14961,11 +15006,11 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
14961
15006
  requestConfig: _objectSpread2({
14962
15007
  url: "/items/item",
14963
15008
  filter: 'qp-itemCode,name-orGroup,like',
14964
- otherParams: {
15009
+ otherParams: _objectSpread2({
14965
15010
  'qp-approveStatus-eq': 1,
14966
15011
  'qp-status-eq': 1,
14967
15012
  sorter: 'desc-id'
14968
- },
15013
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf4 = parProps.requestConfig) === null || _parProps$requestConf4 === void 0 ? void 0 : _parProps$requestConf4.addOtherParams) || {}),
14969
15014
  mappingTextField: 'name',
14970
15015
  mappingValueField: 'itemCode'
14971
15016
  }, parProps.requestConfig),
@@ -15351,44 +15396,42 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
15351
15396
  var _ctx$form;
15352
15397
  var resData, coverData, data, dataList;
15353
15398
  return _regeneratorRuntime().wrap(function _callee$(_context) {
15354
- while (1) {
15355
- switch (_context.prev = _context.next) {
15356
- case 0:
15357
- resData = (res === null || res === void 0 ? void 0 : res.data) || [];
15358
- if (!(resData.status === '0' || resData.code === '000000')) {
15359
- _context.next = 13;
15360
- break;
15361
- }
15362
- data = resData.data;
15363
- if (!remoteSource.converter) {
15364
- _context.next = 9;
15365
- break;
15366
- }
15367
- _context.next = 6;
15368
- return remoteSource.converter({
15369
- data: [data]
15370
- });
15371
- case 6:
15372
- coverData = _context.sent;
15373
- _context.next = 11;
15399
+ while (1) switch (_context.prev = _context.next) {
15400
+ case 0:
15401
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
15402
+ if (!(resData.status === '0' || resData.code === '000000')) {
15403
+ _context.next = 13;
15374
15404
  break;
15375
- case 9:
15376
- dataList = data && Array.isArray(data) ? data : data && [data] || [];
15377
- coverData = dataList.length && dataList.map(function (ites) {
15378
- return mapSearchTree(ites);
15379
- }) || [];
15380
- case 11:
15381
- _context.next = 14;
15405
+ }
15406
+ data = resData.data;
15407
+ if (!remoteSource.converter) {
15408
+ _context.next = 9;
15382
15409
  break;
15383
- case 13:
15384
- coverData = [];
15385
- case 14:
15386
- setTreeData(coverData);
15387
- ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
15388
- case 16:
15389
- case "end":
15390
- return _context.stop();
15391
- }
15410
+ }
15411
+ _context.next = 6;
15412
+ return remoteSource.converter({
15413
+ data: [data]
15414
+ });
15415
+ case 6:
15416
+ coverData = _context.sent;
15417
+ _context.next = 11;
15418
+ break;
15419
+ case 9:
15420
+ dataList = data && Array.isArray(data) ? data : data && [data] || [];
15421
+ coverData = dataList.length && dataList.map(function (ites) {
15422
+ return mapSearchTree(ites);
15423
+ }) || [];
15424
+ case 11:
15425
+ _context.next = 14;
15426
+ break;
15427
+ case 13:
15428
+ coverData = [];
15429
+ case 14:
15430
+ setTreeData(coverData);
15431
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
15432
+ case 16:
15433
+ case "end":
15434
+ return _context.stop();
15392
15435
  }
15393
15436
  }, _callee);
15394
15437
  }));
@@ -17343,6 +17386,7 @@ styleInject(css_248z$e);
17343
17386
  var _excluded$d = ["className", "style"];
17344
17387
  var DragHandle$2 = reactSortableHoc.SortableHandle(function () {
17345
17388
  return /*#__PURE__*/React__default['default'].createElement("img", {
17389
+ width: 25,
17346
17390
  src: drag
17347
17391
  });
17348
17392
  });
@@ -17558,11 +17602,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
17558
17602
  }))
17559
17603
  });
17560
17604
  }
17605
+ },
17606
+ style: {
17607
+ display: 'inline-block',
17608
+ width: '24px',
17609
+ textAlign: 'center'
17561
17610
  }
17562
17611
  }, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
17563
17612
  placement: "top",
17564
17613
  title: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? '取消固定' : '固定列首'
17565
17614
  }, /*#__PURE__*/React__default['default'].createElement("img", {
17615
+ width: 18,
17566
17616
  src: (record === null || record === void 0 ? void 0 : record.fixed) === 'left' ? fixedLeftActive : fixedLeft
17567
17617
  })));
17568
17618
  }
@@ -17628,11 +17678,17 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
17628
17678
  }))
17629
17679
  });
17630
17680
  }
17681
+ },
17682
+ style: {
17683
+ display: 'inline-block',
17684
+ width: '24px',
17685
+ textAlign: 'center'
17631
17686
  }
17632
17687
  }, /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
17633
17688
  placement: "top",
17634
17689
  title: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? '取消固定' : '固定列尾'
17635
17690
  }, /*#__PURE__*/React__default['default'].createElement("img", {
17691
+ width: 18,
17636
17692
  src: (record === null || record === void 0 ? void 0 : record.fixed) === 'right' ? fixedRightActive : fixedRight
17637
17693
  })));
17638
17694
  }
@@ -17658,6 +17714,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
17658
17714
  });
17659
17715
  }
17660
17716
  }, /*#__PURE__*/React__default['default'].createElement("img", {
17717
+ width: 24,
17661
17718
  src: close
17662
17719
  }));
17663
17720
  }
@@ -18067,6 +18124,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
18067
18124
  var _excluded$e = ["className", "style"];
18068
18125
  var DragHandle$3 = reactSortableHoc.SortableHandle(function () {
18069
18126
  return /*#__PURE__*/React__default['default'].createElement("img", {
18127
+ width: 25,
18070
18128
  src: drag
18071
18129
  });
18072
18130
  });
@@ -18235,6 +18293,7 @@ var SearchItemTable = /*#__PURE__*/function (_React$Component) {
18235
18293
  });
18236
18294
  }
18237
18295
  }, /*#__PURE__*/React__default['default'].createElement("img", {
18296
+ width: 24,
18238
18297
  src: close
18239
18298
  }));
18240
18299
  }
@@ -19490,21 +19549,19 @@ function _outLogin() {
19490
19549
  _outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
19491
19550
  var res;
19492
19551
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19493
- while (1) {
19494
- switch (_context.prev = _context.next) {
19495
- case 0:
19496
- _context.next = 2;
19497
- return axios__default['default']({
19498
- url: '/user/web/loginOut',
19499
- method: 'GET'
19500
- });
19501
- case 2:
19502
- res = _context.sent;
19503
- return _context.abrupt("return", res);
19504
- case 4:
19505
- case "end":
19506
- return _context.stop();
19507
- }
19552
+ while (1) switch (_context.prev = _context.next) {
19553
+ case 0:
19554
+ _context.next = 2;
19555
+ return axios__default['default']({
19556
+ url: '/user/web/loginOut',
19557
+ method: 'GET'
19558
+ });
19559
+ case 2:
19560
+ res = _context.sent;
19561
+ return _context.abrupt("return", res);
19562
+ case 4:
19563
+ case "end":
19564
+ return _context.stop();
19508
19565
  }
19509
19566
  }, _callee);
19510
19567
  }));
@@ -19633,31 +19690,29 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
19633
19690
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
19634
19691
  var sessionId;
19635
19692
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19636
- while (1) {
19637
- switch (_context.prev = _context.next) {
19638
- case 0:
19639
- _context.next = 2;
19640
- return getSessionId();
19641
- case 2:
19642
- sessionId = _context.sent;
19643
- _context.next = 5;
19644
- return outLogin({
19645
- sessionId: sessionId
19693
+ while (1) switch (_context.prev = _context.next) {
19694
+ case 0:
19695
+ _context.next = 2;
19696
+ return getSessionId();
19697
+ case 2:
19698
+ sessionId = _context.sent;
19699
+ _context.next = 5;
19700
+ return outLogin({
19701
+ sessionId: sessionId
19702
+ });
19703
+ case 5:
19704
+ // @ts-ignore
19705
+ if (BUILD_TYPE) {
19706
+ antd.message.success('退出登录成功');
19707
+ umi.history.replace({
19708
+ pathname: '/user/login'
19646
19709
  });
19647
- case 5:
19648
- // @ts-ignore
19649
- if (BUILD_TYPE) {
19650
- antd.message.success('退出登录成功');
19651
- umi.history.replace({
19652
- pathname: '/user/login'
19653
- });
19654
- } else {
19655
- setLoginOutPath();
19656
- }
19657
- case 6:
19658
- case "end":
19659
- return _context.stop();
19660
- }
19710
+ } else {
19711
+ setLoginOutPath();
19712
+ }
19713
+ case 6:
19714
+ case "end":
19715
+ return _context.stop();
19661
19716
  }
19662
19717
  }, _callee);
19663
19718
  }));
@@ -21485,6 +21540,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
21485
21540
  showSubMenu: isShow
21486
21541
  });
21487
21542
  }, 500);
21543
+ //设置tabs标签左右滚动
21488
21544
  _this.setTabNavTransLate = function (num) {
21489
21545
  var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
21490
21546
  var globalTabsNav = (_document$getElementB = document.getElementById('globalTabs')) === null || _document$getElementB === void 0 ? void 0 : (_document$getElementB2 = _document$getElementB.getElementsByClassName('ant-tabs-nav-list')) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2[0];
@@ -22165,14 +22221,12 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
22165
22221
  request: function () {
22166
22222
  var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22167
22223
  return _regeneratorRuntime().wrap(function _callee$(_context) {
22168
- while (1) {
22169
- switch (_context.prev = _context.next) {
22170
- case 0:
22171
- return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
22172
- case 1:
22173
- case "end":
22174
- return _context.stop();
22175
- }
22224
+ while (1) switch (_context.prev = _context.next) {
22225
+ case 0:
22226
+ return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
22227
+ case 1:
22228
+ case "end":
22229
+ return _context.stop();
22176
22230
  }
22177
22231
  }, _callee);
22178
22232
  }));
@@ -29844,28 +29898,26 @@ var valueType = {
29844
29898
  var getDynamicDict = /*#__PURE__*/function () {
29845
29899
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
29846
29900
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29847
- while (1) {
29848
- switch (_context.prev = _context.next) {
29849
- case 0:
29850
- _context.next = 2;
29851
- return bssula.request({
29852
- url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
29853
- converter: function converter(_ref2) {
29854
- var data = _ref2.data;
29855
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
29856
- return {
29857
- text: d.name,
29858
- value: d.code || d.brandCode
29859
- };
29860
- });
29861
- }
29862
- });
29863
- case 2:
29864
- return _context.abrupt("return", _context.sent);
29865
- case 3:
29866
- case "end":
29867
- return _context.stop();
29868
- }
29901
+ while (1) switch (_context.prev = _context.next) {
29902
+ case 0:
29903
+ _context.next = 2;
29904
+ return bssula.request({
29905
+ url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
29906
+ converter: function converter(_ref2) {
29907
+ var data = _ref2.data;
29908
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
29909
+ return {
29910
+ text: d.name,
29911
+ value: d.code || d.brandCode
29912
+ };
29913
+ });
29914
+ }
29915
+ });
29916
+ case 2:
29917
+ return _context.abrupt("return", _context.sent);
29918
+ case 3:
29919
+ case "end":
29920
+ return _context.stop();
29869
29921
  }
29870
29922
  }, _callee);
29871
29923
  }));
@@ -29915,55 +29967,53 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
29915
29967
  ahooks.useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
29916
29968
  var _ref$current, source;
29917
29969
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29918
- while (1) {
29919
- switch (_context.prev = _context.next) {
29920
- case 0:
29921
- _context.next = 2;
29922
- return setIsShowAndType(function (prev) {
29923
- if (record.inputType === 20 || record.inputType === 30) {
29924
- return {
29925
- isShow: true,
29926
- singleOrMultiple: record.inputType,
29927
- type: record.choiceType
29928
- };
29929
- }
29930
- return prev;
29931
- });
29932
- case 2:
29933
- if (!record.dictionaryCode) {
29934
- _context.next = 17;
29935
- break;
29936
- }
29937
- if (!(record.choiceType == 20)) {
29938
- _context.next = 7;
29939
- break;
29970
+ while (1) switch (_context.prev = _context.next) {
29971
+ case 0:
29972
+ _context.next = 2;
29973
+ return setIsShowAndType(function (prev) {
29974
+ if (record.inputType === 20 || record.inputType === 30) {
29975
+ return {
29976
+ isShow: true,
29977
+ singleOrMultiple: record.inputType,
29978
+ type: record.choiceType
29979
+ };
29940
29980
  }
29941
- _context.t0 = getDictionarySource(record.dictionaryCode);
29942
- _context.next = 15;
29981
+ return prev;
29982
+ });
29983
+ case 2:
29984
+ if (!record.dictionaryCode) {
29985
+ _context.next = 17;
29943
29986
  break;
29944
- case 7:
29945
- if (!(record.choiceType == 30)) {
29946
- _context.next = 13;
29947
- break;
29948
- }
29949
- _context.next = 10;
29950
- return getDynamicDict(record.dictionaryCode);
29951
- case 10:
29952
- _context.t1 = _context.sent;
29953
- _context.next = 14;
29987
+ }
29988
+ if (!(record.choiceType == 20)) {
29989
+ _context.next = 7;
29954
29990
  break;
29955
- case 13:
29956
- _context.t1 = [];
29957
- case 14:
29958
- _context.t0 = _context.t1;
29959
- case 15:
29960
- source = _context.t0;
29961
- // @ts-ignore
29962
- ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
29963
- case 17:
29964
- case "end":
29965
- return _context.stop();
29966
- }
29991
+ }
29992
+ _context.t0 = getDictionarySource(record.dictionaryCode);
29993
+ _context.next = 15;
29994
+ break;
29995
+ case 7:
29996
+ if (!(record.choiceType == 30)) {
29997
+ _context.next = 13;
29998
+ break;
29999
+ }
30000
+ _context.next = 10;
30001
+ return getDynamicDict(record.dictionaryCode);
30002
+ case 10:
30003
+ _context.t1 = _context.sent;
30004
+ _context.next = 14;
30005
+ break;
30006
+ case 13:
30007
+ _context.t1 = [];
30008
+ case 14:
30009
+ _context.t0 = _context.t1;
30010
+ case 15:
30011
+ source = _context.t0;
30012
+ // @ts-ignore
30013
+ ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
30014
+ case 17:
30015
+ case "end":
30016
+ return _context.stop();
29967
30017
  }
29968
30018
  }, _callee);
29969
30019
  })));
@@ -30031,30 +30081,28 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
30031
30081
  var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
30032
30082
  var form, values, name, relates, source;
30033
30083
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
30034
- while (1) {
30035
- switch (_context2.prev = _context2.next) {
30036
- case 0:
30037
- form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
30038
- if (values[0]) {
30039
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
30040
- form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
30041
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
30042
- }
30043
- if (!values[1]) {
30044
- _context2.next = 9;
30045
- break;
30046
- }
30047
- _context2.next = 5;
30048
- return getDynamicDict(record.dictionaryCode || values[1]);
30049
- case 5:
30050
- source = _context2.sent;
30084
+ while (1) switch (_context2.prev = _context2.next) {
30085
+ case 0:
30086
+ form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
30087
+ if (values[0]) {
30051
30088
  form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
30052
30089
  form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
30053
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
30054
- case 9:
30055
- case "end":
30056
- return _context2.stop();
30057
- }
30090
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
30091
+ }
30092
+ if (!values[1]) {
30093
+ _context2.next = 9;
30094
+ break;
30095
+ }
30096
+ _context2.next = 5;
30097
+ return getDynamicDict(record.dictionaryCode || values[1]);
30098
+ case 5:
30099
+ source = _context2.sent;
30100
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
30101
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
30102
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
30103
+ case 9:
30104
+ case "end":
30105
+ return _context2.stop();
30058
30106
  }
30059
30107
  }, _callee2);
30060
30108
  }));
@@ -30514,43 +30562,41 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
30514
30562
  var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
30515
30563
  var values, name, form, source;
30516
30564
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
30517
- while (1) {
30518
- switch (_context3.prev = _context3.next) {
30519
- case 0:
30520
- values = _ref10.values, name = _ref10.name, form = _ref10.form;
30521
- if (values[1] === 40) {
30522
- form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
30523
- form.setFieldVisible(name, false);
30524
- }
30525
- if (!(values[0] === 30)) {
30526
- _context3.next = 10;
30527
- break;
30528
- }
30529
- _context3.next = 5;
30530
- return bssula.request({
30531
- url: '/basic/dictDynamicItem/queryList',
30532
- converter: function converter(_ref11) {
30533
- var data = _ref11.data;
30534
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
30535
- return {
30536
- text: d.dictCode,
30537
- value: d.dictCode
30538
- };
30539
- });
30540
- }
30541
- });
30542
- case 5:
30543
- source = _context3.sent;
30544
- form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
30545
- form.setFieldVisible(name, true);
30546
- _context3.next = 11;
30547
- break;
30548
- case 10:
30565
+ while (1) switch (_context3.prev = _context3.next) {
30566
+ case 0:
30567
+ values = _ref10.values, name = _ref10.name, form = _ref10.form;
30568
+ if (values[1] === 40) {
30569
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
30549
30570
  form.setFieldVisible(name, false);
30550
- case 11:
30551
- case "end":
30552
- return _context3.stop();
30553
- }
30571
+ }
30572
+ if (!(values[0] === 30)) {
30573
+ _context3.next = 10;
30574
+ break;
30575
+ }
30576
+ _context3.next = 5;
30577
+ return bssula.request({
30578
+ url: '/basic/dictDynamicItem/queryList',
30579
+ converter: function converter(_ref11) {
30580
+ var data = _ref11.data;
30581
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
30582
+ return {
30583
+ text: d.dictCode,
30584
+ value: d.dictCode
30585
+ };
30586
+ });
30587
+ }
30588
+ });
30589
+ case 5:
30590
+ source = _context3.sent;
30591
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
30592
+ form.setFieldVisible(name, true);
30593
+ _context3.next = 11;
30594
+ break;
30595
+ case 10:
30596
+ form.setFieldVisible(name, false);
30597
+ case 11:
30598
+ case "end":
30599
+ return _context3.stop();
30554
30600
  }
30555
30601
  }, _callee3);
30556
30602
  }));
@@ -30739,66 +30785,64 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
30739
30785
  var _ref$current4, _res$editableStatus;
30740
30786
  var res, _res$defaultValue;
30741
30787
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
30742
- while (1) {
30743
- switch (_context4.prev = _context4.next) {
30744
- case 0:
30745
- _context4.next = 2;
30746
- return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
30747
- case 2:
30748
- res = _context4.sent;
30749
- res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
30750
- res.fieldGroup = record.fieldGroup;
30751
- res.businessType = record.businessType;
30752
- res.info = {
30753
- enumeration: res.enumeration,
30754
- dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
30755
- formula: res.formula,
30756
- scale: res.scale,
30757
- variable: res.variable
30758
- };
30759
- res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
30760
- res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
30761
- res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
30762
- if (res.inputType === 40) {
30763
- res.valueType = 22;
30788
+ while (1) switch (_context4.prev = _context4.next) {
30789
+ case 0:
30790
+ _context4.next = 2;
30791
+ return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
30792
+ case 2:
30793
+ res = _context4.sent;
30794
+ res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
30795
+ res.fieldGroup = record.fieldGroup;
30796
+ res.businessType = record.businessType;
30797
+ res.info = {
30798
+ enumeration: res.enumeration,
30799
+ dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
30800
+ formula: res.formula,
30801
+ scale: res.scale,
30802
+ variable: res.variable
30803
+ };
30804
+ res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
30805
+ res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
30806
+ res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
30807
+ if (res.inputType === 40) {
30808
+ res.valueType = 22;
30809
+ }
30810
+ // 把数组处理成文本
30811
+ if (res.inputType === 30) {
30812
+ if (res.defaultValue) {
30813
+ res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
30764
30814
  }
30765
- // 把数组处理成文本
30766
- if (res.inputType === 30) {
30767
- if (res.defaultValue) {
30768
- res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
30769
- }
30815
+ }
30816
+ res.fieldMapping = res.fieldMapping || '';
30817
+ delete res.formula;
30818
+ delete res.showValue;
30819
+ if (!(mode === 'create')) {
30820
+ _context4.next = 18;
30821
+ break;
30822
+ }
30823
+ bssula.request({
30824
+ url: "/basic/flow/businessField",
30825
+ method: 'POST',
30826
+ params: res,
30827
+ successMessage: '创建成功!',
30828
+ converter: function converter() {
30829
+ onParentOk();
30770
30830
  }
30771
- res.fieldMapping = res.fieldMapping || '';
30772
- delete res.formula;
30773
- delete res.showValue;
30774
- if (!(mode === 'create')) {
30775
- _context4.next = 18;
30776
- break;
30831
+ });
30832
+ return _context4.abrupt("return");
30833
+ case 18:
30834
+ bssula.request({
30835
+ url: "/basic/flow/businessField/".concat(record.id),
30836
+ method: 'PATCH',
30837
+ params: res,
30838
+ successMessage: '修改成功!',
30839
+ converter: function converter() {
30840
+ onParentOk();
30777
30841
  }
30778
- bssula.request({
30779
- url: "/basic/flow/businessField",
30780
- method: 'POST',
30781
- params: res,
30782
- successMessage: '创建成功!',
30783
- converter: function converter() {
30784
- onParentOk();
30785
- }
30786
- });
30787
- return _context4.abrupt("return");
30788
- case 18:
30789
- bssula.request({
30790
- url: "/basic/flow/businessField/".concat(record.id),
30791
- method: 'PATCH',
30792
- params: res,
30793
- successMessage: '修改成功!',
30794
- converter: function converter() {
30795
- onParentOk();
30796
- }
30797
- });
30798
- case 19:
30799
- case "end":
30800
- return _context4.stop();
30801
- }
30842
+ });
30843
+ case 19:
30844
+ case "end":
30845
+ return _context4.stop();
30802
30846
  }
30803
30847
  }, _callee4);
30804
30848
  }));