@bit-sun/business-component 2.3.8 → 2.3.10-alpha.1

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 (202) 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/CustomerMenu/MenuSetting/index.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  10. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +2 -2
  11. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  12. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  13. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  14. package/dist/index.esm.js +1075 -957
  15. package/dist/index.js +1081 -963
  16. package/dist/utils/utils.d.ts +1 -1
  17. package/docs/index.md +21 -21
  18. package/lib/assets/drag.svg +17 -17
  19. package/lib/assets/exportFail.svg +37 -37
  20. package/lib/assets/exportProcessing.svg +28 -28
  21. package/lib/assets/exportSuccess.svg +34 -34
  22. package/lib/assets/label_icon_bottom.svg +25 -25
  23. package/lib/assets/upExport.svg +22 -22
  24. package/package.json +78 -78
  25. package/src/assets/32.svg +27 -27
  26. package/src/assets/addIcon.svg +17 -17
  27. package/src/assets/allfunc.svg +27 -27
  28. package/src/assets/arrowRight.svg +24 -24
  29. package/src/assets/btn-delete.svg +29 -29
  30. package/src/assets/btn-edit.svg +19 -19
  31. package/src/assets/btn-more.svg +17 -17
  32. package/src/assets/btn-submit.svg +19 -19
  33. package/src/assets/caidan.svg +11 -11
  34. package/src/assets/close.svg +26 -26
  35. package/src/assets/drag.svg +17 -17
  36. package/src/assets/exportFail.svg +37 -37
  37. package/src/assets/exportProcessing.svg +28 -28
  38. package/src/assets/exportSuccess.svg +34 -34
  39. package/src/assets/fixed-left-active.svg +11 -11
  40. package/src/assets/fixed-left.svg +15 -15
  41. package/src/assets/fixed-right-active.svg +11 -11
  42. package/src/assets/fixed-right.svg +15 -15
  43. package/src/assets/guanbi.svg +15 -15
  44. package/src/assets/icon-quanping.svg +15 -15
  45. package/src/assets/icon-shezhi.svg +17 -17
  46. package/src/assets/label_icon_bottom.svg +25 -25
  47. package/src/assets/list-no-img.svg +21 -21
  48. package/src/assets/morentouxiang-32.svg +23 -23
  49. package/src/assets/scanning.svg +24 -24
  50. package/src/assets/upExport.svg +22 -22
  51. package/src/common/ENUM.ts +41 -41
  52. package/src/components/Business/AddSelectBusiness/index.md +161 -161
  53. package/src/components/Business/AddSelectBusiness/index.tsx +861 -861
  54. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  55. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  56. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  64. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  65. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  66. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  67. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  68. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  69. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  70. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  71. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  72. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  73. package/src/components/Business/BsLayouts/index.less +79 -79
  74. package/src/components/Business/BsLayouts/index.tsx +1535 -1484
  75. package/src/components/Business/BsLayouts/service.ts +10 -10
  76. package/src/components/Business/BsLayouts/utils.tsx +203 -203
  77. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +564 -564
  78. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  79. package/src/components/Business/BsSulaQueryTable/index.tsx +532 -527
  80. package/src/components/Business/BsSulaQueryTable/setting.tsx +852 -832
  81. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  82. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  83. package/src/components/Business/CommodityEntry/index.md +70 -70
  84. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  85. package/src/components/Business/CommonAlert/index.tsx +23 -23
  86. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  87. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  88. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  89. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  90. package/src/components/Business/DetailPageWrapper/index.tsx +313 -313
  91. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  92. package/src/components/Business/HomePageWrapper/index.less +33 -33
  93. package/src/components/Business/HomePageWrapper/index.md +45 -45
  94. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  95. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  96. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +205 -205
  97. package/src/components/Business/JsonQueryTable/components/Formula.tsx +205 -205
  98. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  99. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  100. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  101. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  102. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  103. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  104. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  105. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  106. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  107. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  108. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  109. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  110. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  111. package/src/components/Business/JsonQueryTable/index.less +16 -16
  112. package/src/components/Business/JsonQueryTable/index.md +328 -328
  113. package/src/components/Business/JsonQueryTable/index.tsx +535 -535
  114. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  115. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  116. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  117. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  118. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  119. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  120. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  121. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  122. package/src/components/Business/JsonQueryTable/static.ts +390 -390
  123. package/src/components/Business/SearchSelect/BusinessUtils.ts +1732 -1732
  124. package/src/components/Business/SearchSelect/common.ts +53 -53
  125. package/src/components/Business/SearchSelect/index.md +1319 -1319
  126. package/src/components/Business/SearchSelect/index.tsx +51 -51
  127. package/src/components/Business/SearchSelect/utils.ts +100 -100
  128. package/src/components/Business/StateFlow/index.less +130 -130
  129. package/src/components/Business/StateFlow/index.md +60 -60
  130. package/src/components/Business/StateFlow/index.tsx +29 -29
  131. package/src/components/Business/TreeSearchSelect/index.md +154 -154
  132. package/src/components/Business/TreeSearchSelect/index.tsx +33 -33
  133. package/src/components/Business/TreeSearchSelect/utils.ts +75 -75
  134. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  135. package/src/components/Business/columnSettingTable/index.less +247 -247
  136. package/src/components/Business/columnSettingTable/index.md +357 -357
  137. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  138. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  139. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  140. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +86 -86
  141. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  142. package/src/components/Business/moreTreeTable/index.less +99 -99
  143. package/src/components/Business/moreTreeTable/index.md +448 -448
  144. package/src/components/Business/moreTreeTable/index.tsx +387 -387
  145. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  146. package/src/components/Functional/AddSelect/helps.ts +14 -14
  147. package/src/components/Functional/AddSelect/index.less +367 -367
  148. package/src/components/Functional/AddSelect/index.md +155 -155
  149. package/src/components/Functional/AddSelect/index.tsx +1279 -1279
  150. package/src/components/Functional/BillEntry/index.less +371 -371
  151. package/src/components/Functional/BillEntry/index.md +39 -39
  152. package/src/components/Functional/BillEntry/index.tsx +772 -772
  153. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -62
  154. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -178
  155. package/src/components/Functional/BsAntdSula/index.ts +2 -2
  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/EllipsisTooltip/index.d.ts +5 -5
  163. package/src/components/Functional/EllipsisTooltip/index.js +36 -36
  164. package/src/components/Functional/EllipsisTooltip/index.md +30 -30
  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 -858
  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 +163 -163
  176. package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
  177. package/src/components/Solution/RuleComponent/index.d.ts +29 -29
  178. package/src/components/Solution/RuleComponent/index.js +2028 -2028
  179. package/src/components/Solution/RuleComponent/index.less +230 -230
  180. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
  181. package/src/components/Solution/RuleComponent/ruleFiled.js +2107 -2107
  182. package/src/components/Solution/RuleComponent/services.ts +13 -13
  183. package/src/components/Solution/RuleComponent/util.js +139 -139
  184. package/src/index.ts +38 -38
  185. package/src/plugin/TableColumnSetting/index.less +247 -247
  186. package/src/plugin/TableColumnSetting/index.md +50 -50
  187. package/src/plugin/TableColumnSetting/index.tsx +724 -724
  188. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  189. package/src/styles/bsDefault.less +1912 -1912
  190. package/src/utils/CheckOneUser/index.md +39 -39
  191. package/src/utils/CheckOneUser/index.ts +51 -51
  192. package/src/utils/LocalstorageUtils.ts +90 -90
  193. package/src/utils/TableUtils.tsx +18 -18
  194. package/src/utils/checkUtils.ts +39 -39
  195. package/src/utils/enumConfig.ts +11 -11
  196. package/src/utils/getFormMode.js +12 -12
  197. package/src/utils/index.ts +4 -4
  198. package/src/utils/requestUtils.ts +34 -34
  199. package/src/utils/serialize.js +7 -7
  200. package/src/utils/utils.ts +212 -212
  201. package/tsconfig.json +29 -29
  202. package/typings.d.ts +4 -4
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var axios = require('axios');
6
6
  var antd = require('antd');
7
7
  var _ = require('lodash');
8
8
  var umi = require('umi');
9
- var isEqual = require('lodash/isEqual');
9
+ var isEqual$1 = require('lodash/isEqual');
10
10
  var React = require('react');
11
11
  var moment$1 = require('moment');
12
12
  var icons = require('@ant-design/icons');
@@ -33,7 +33,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
33
33
 
34
34
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
35
35
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
36
- var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
36
+ var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual$1);
37
37
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
38
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment$1);
39
39
  var ProLayout__default = /*#__PURE__*/_interopDefaultLegacy(ProLayout);
@@ -781,41 +781,52 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
781
781
  return '';
782
782
  };
783
783
 
784
- var simpleIsEqual = function simpleIsEqual(a, b) {
785
- return a === b;
786
- };
787
-
788
- function index$1 (resultFn, isEqual) {
789
- if (isEqual === void 0) {
790
- isEqual = simpleIsEqual;
791
- }
792
-
793
- var lastThis;
794
- var lastArgs = [];
795
- var lastResult;
796
- var calledOnce = false;
797
-
798
- var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
799
- return isEqual(newArg, lastArgs[index], index);
800
- };
801
-
802
- var result = function result() {
803
- for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
804
- newArgs[_key] = arguments[_key];
784
+ var safeIsNaN = Number.isNaN ||
785
+ function ponyfill(value) {
786
+ return typeof value === 'number' && value !== value;
787
+ };
788
+ function isEqual(first, second) {
789
+ if (first === second) {
790
+ return true;
805
791
  }
806
-
807
- if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
808
- return lastResult;
792
+ if (safeIsNaN(first) && safeIsNaN(second)) {
793
+ return true;
809
794
  }
795
+ return false;
796
+ }
797
+ function areInputsEqual(newInputs, lastInputs) {
798
+ if (newInputs.length !== lastInputs.length) {
799
+ return false;
800
+ }
801
+ for (var i = 0; i < newInputs.length; i++) {
802
+ if (!isEqual(newInputs[i], lastInputs[i])) {
803
+ return false;
804
+ }
805
+ }
806
+ return true;
807
+ }
810
808
 
811
- lastResult = resultFn.apply(this, newArgs);
812
- calledOnce = true;
813
- lastThis = this;
814
- lastArgs = newArgs;
815
- return lastResult;
816
- };
817
-
818
- return result;
809
+ function memoizeOne(resultFn, isEqual) {
810
+ if (isEqual === void 0) { isEqual = areInputsEqual; }
811
+ var lastThis;
812
+ var lastArgs = [];
813
+ var lastResult;
814
+ var calledOnce = false;
815
+ function memoized() {
816
+ var newArgs = [];
817
+ for (var _i = 0; _i < arguments.length; _i++) {
818
+ newArgs[_i] = arguments[_i];
819
+ }
820
+ if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
821
+ return lastResult;
822
+ }
823
+ lastResult = resultFn.apply(this, newArgs);
824
+ calledOnce = true;
825
+ lastThis = this;
826
+ lastArgs = newArgs;
827
+ return lastResult;
828
+ }
829
+ return memoized;
819
830
  }
820
831
 
821
832
  function styleInject(css, ref) {
@@ -1029,59 +1040,58 @@ var getItemDefaultWidth = function getItemDefaultWidth(item) {
1029
1040
  * @returns 返回处理后的查询参数
1030
1041
  */
1031
1042
  function queryParams(params, flag) {
1032
- var _loop = function _loop() {
1043
+ for (var key in params) {
1033
1044
  if (Object.prototype.hasOwnProperty.call(params, key)) {
1034
- var element = params[key];
1035
- if (element && key.indexOf('*number*') >= 0) {
1036
- var dataParams = key.split('*number*');
1037
- dataParams.forEach(function (value, index) {
1038
- params[value] = element[index];
1039
- });
1040
- delete params[key];
1041
- } else if (element && key.indexOf('*address*') >= 0) {
1042
- var _dataParams = key.split('*address*');
1043
- _dataParams.forEach(function (value, index) {
1044
- params[value] = element.PCDCode[index];
1045
- });
1046
- delete params[key];
1047
- } else if (element && key.indexOf('*costType*') >= 0) {
1048
- var _dataParams2 = key.split('*costType*');
1049
- // eslint-disable-next-line prefer-destructuring
1050
- params[_dataParams2[0]] = element[1];
1051
- delete params[key];
1052
- } else if (element && key.indexOf('*fullDate*') >= 0) {
1053
- var _dataParams3 = key.split('*fullDate*');
1054
- _dataParams3.forEach(function (value, index) {
1055
- if (index === 0) {
1056
- params[value] = moment__default['default'](element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
1045
+ (function () {
1046
+ var element = params[key];
1047
+ if (element && key.indexOf('*number*') >= 0) {
1048
+ var dataParams = key.split('*number*');
1049
+ dataParams.forEach(function (value, index) {
1050
+ params[value] = element[index];
1051
+ });
1052
+ delete params[key];
1053
+ } else if (element && key.indexOf('*address*') >= 0) {
1054
+ var _dataParams = key.split('*address*');
1055
+ _dataParams.forEach(function (value, index) {
1056
+ params[value] = element.PCDCode[index];
1057
+ });
1058
+ delete params[key];
1059
+ } else if (element && key.indexOf('*costType*') >= 0) {
1060
+ var _dataParams2 = key.split('*costType*');
1061
+ // eslint-disable-next-line prefer-destructuring
1062
+ params[_dataParams2[0]] = element[1];
1063
+ delete params[key];
1064
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
1065
+ var _dataParams3 = key.split('*fullDate*');
1066
+ _dataParams3.forEach(function (value, index) {
1067
+ if (index === 0) {
1068
+ params[value] = moment__default['default'](element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
1069
+ } else {
1070
+ params[value] = moment__default['default'](element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
1071
+ }
1072
+ });
1073
+ delete params[key];
1074
+ } else if (element && key.indexOf('*') >= 0) {
1075
+ var _dataParams4 = key.split('*');
1076
+ _dataParams4.forEach(function (value, index) {
1077
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
1078
+ });
1079
+ delete params[key];
1080
+ } else if (element && key.indexOf('_likeIn_') >= 0) {
1081
+ var _dataParams5 = key.split('_likeIn_');
1082
+ if (element.indexOf(',') >= 0) {
1083
+ params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
1084
+ params["qp-".concat(_dataParams5[0], "-like")] = null;
1057
1085
  } else {
1058
- params[value] = moment__default['default'](element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
1086
+ params["qp-".concat(_dataParams5[0], "-like")] = element;
1087
+ params["qp-".concat(_dataParams5[0], "-in")] = null;
1059
1088
  }
1060
- });
1061
- delete params[key];
1062
- } else if (element && key.indexOf('*') >= 0) {
1063
- var _dataParams4 = key.split('*');
1064
- _dataParams4.forEach(function (value, index) {
1065
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
1066
- });
1067
- delete params[key];
1068
- } else if (element && key.indexOf('_likeIn_') >= 0) {
1069
- var _dataParams5 = key.split('_likeIn_');
1070
- if (element.indexOf(',') >= 0) {
1071
- params["qp-".concat(_dataParams5[0], "-in")] = element.split(',').join(',');
1072
- params["qp-".concat(_dataParams5[0], "-like")] = null;
1073
- } else {
1074
- params["qp-".concat(_dataParams5[0], "-like")] = element;
1075
- params["qp-".concat(_dataParams5[0], "-in")] = null;
1089
+ delete params[key];
1090
+ } else if (Array.isArray(element)) {
1091
+ params[key] = element.join(',');
1076
1092
  }
1077
- delete params[key];
1078
- } else if (Array.isArray(element)) {
1079
- params[key] = element.join(',');
1080
- }
1093
+ })();
1081
1094
  }
1082
- };
1083
- for (var key in params) {
1084
- _loop();
1085
1095
  }
1086
1096
  return flag ? params : qs.stringify(params);
1087
1097
  }
@@ -1127,7 +1137,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
1127
1137
  return item;
1128
1138
  });
1129
1139
  };
1130
- var memoizeOneFormatter = index$1(formatter, isEqual__default['default']);
1140
+ var memoizeOneFormatter = memoizeOne(formatter, isEqual__default['default']);
1131
1141
  var go2BackAndClose = function go2BackAndClose() {
1132
1142
  localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
1133
1143
  umi.history.goBack();
@@ -2806,85 +2816,84 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
2806
2816
  });
2807
2817
  }
2808
2818
  // 数组对象处理,对带有特殊标记的name进行处理
2809
- var _loop = function _loop() {
2819
+ for (var key in params) {
2810
2820
  if (Object.prototype.hasOwnProperty.call(params, key)) {
2811
- var element = params[key];
2812
- if (element && key.indexOf('*number*') >= 0) {
2813
- var dataParams = key.split('*number*');
2814
- dataParams.forEach(function (value, index) {
2815
- params[value] = element[index];
2816
- });
2817
- delete params[key];
2818
- } else if (element && key.indexOf('*address*') >= 0) {
2819
- var _dataParams = key.split('*address*');
2820
- _dataParams.forEach(function (value, index) {
2821
- params[value] = element.PCDCode[index];
2822
- });
2823
- delete params[key];
2824
- } else if (element && key.indexOf('*costType*') >= 0) {
2825
- var _dataParams2 = key.split('*costType*');
2826
- // eslint-disable-next-line prefer-destructuring
2827
- params[_dataParams2[0]] = element[1];
2828
- delete params[key];
2829
- } else if (element && key.indexOf('*fullDate*') >= 0) {
2830
- var _dataParams3 = key.split('*fullDate*');
2831
- _dataParams3.forEach(function (value, index) {
2832
- if (index === 0) {
2833
- params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2834
- } else {
2835
- params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2821
+ (function () {
2822
+ var element = params[key];
2823
+ if (element && key.indexOf('*number*') >= 0) {
2824
+ var dataParams = key.split('*number*');
2825
+ dataParams.forEach(function (value, index) {
2826
+ params[value] = element[index];
2827
+ });
2828
+ delete params[key];
2829
+ } else if (element && key.indexOf('*address*') >= 0) {
2830
+ var _dataParams = key.split('*address*');
2831
+ _dataParams.forEach(function (value, index) {
2832
+ params[value] = element.PCDCode[index];
2833
+ });
2834
+ delete params[key];
2835
+ } else if (element && key.indexOf('*costType*') >= 0) {
2836
+ var _dataParams2 = key.split('*costType*');
2837
+ // eslint-disable-next-line prefer-destructuring
2838
+ params[_dataParams2[0]] = element[1];
2839
+ delete params[key];
2840
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
2841
+ var _dataParams3 = key.split('*fullDate*');
2842
+ _dataParams3.forEach(function (value, index) {
2843
+ if (index === 0) {
2844
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
2845
+ } else {
2846
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
2847
+ }
2848
+ });
2849
+ delete params[key];
2850
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2851
+ var _dataParams4 = key.split('*checkBox*');
2852
+ if (element) {
2853
+ params[_dataParams4[0]] = 0;
2836
2854
  }
2837
- });
2838
- delete params[key];
2839
- } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
2840
- var _dataParams4 = key.split('*checkBox*');
2841
- if (element) {
2842
- params[_dataParams4[0]] = 0;
2843
- }
2844
- delete params[key];
2845
- } else if (element && key.indexOf('*cascader*') >= 0) {
2846
- var _dataParams5 = key.split('*cascader*');
2847
- params[_dataParams5[0]] = element[element.length - 1];
2848
- delete params[key];
2849
- } else if (element && key.indexOf('*date*') >= 0) {
2850
- var _dataParams6 = key.split('*date*');
2851
- _dataParams6.forEach(function (value, index) {
2852
- if (index === 0) {
2853
- params[value] = moment(element[index]).format('YYYY-MM-DD');
2855
+ delete params[key];
2856
+ } else if (element && key.indexOf('*cascader*') >= 0) {
2857
+ var _dataParams5 = key.split('*cascader*');
2858
+ params[_dataParams5[0]] = element[element.length - 1];
2859
+ delete params[key];
2860
+ } else if (element && key.indexOf('*date*') >= 0) {
2861
+ var _dataParams6 = key.split('*date*');
2862
+ _dataParams6.forEach(function (value, index) {
2863
+ if (index === 0) {
2864
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2865
+ } else {
2866
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
2867
+ }
2868
+ });
2869
+ delete params[key];
2870
+ } else if (element && key.indexOf('*') >= 0) {
2871
+ var _dataParams7 = key.split('*');
2872
+ _dataParams7.forEach(function (value, index) {
2873
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
2874
+ });
2875
+ delete params[key];
2876
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
2877
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
2878
+ var _dataParams8 = key.split('_selectNumberRange')[0];
2879
+ if (params[key][0] === 'range') {
2880
+ if (params[key][1][0]) {
2881
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
2882
+ }
2883
+ if (params[key][1][1]) {
2884
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
2885
+ }
2854
2886
  } else {
2855
- params[value] = moment(element[index]).format('YYYY-MM-DD');
2887
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2856
2888
  }
2857
- });
2858
- delete params[key];
2859
- } else if (element && key.indexOf('*') >= 0) {
2860
- var _dataParams7 = key.split('*');
2861
- _dataParams7.forEach(function (value, index) {
2862
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
2863
- });
2864
- delete params[key];
2865
- } else if (element && key.indexOf('_selectNumberRange') >= 0) {
2866
- // key = xxxxx_selectNumberRange qp-xxxxx-gt
2867
- var _dataParams8 = key.split('_selectNumberRange')[0];
2868
- if (params[key][0] === 'range') {
2869
- if (params[key][1][0]) {
2870
- params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
2871
- }
2872
- if (params[key][1][1]) {
2873
- params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
2874
- }
2875
- } else {
2876
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
2889
+ delete params[key];
2890
+ } else if (Array.isArray(element)) {
2891
+ params[key] = element.join(',');
2892
+ } else if (element == null || element === undefined || String(element).trim() === '') {
2893
+ delete params[key];
2877
2894
  }
2878
- delete params[key];
2879
- } else if (Array.isArray(element)) {
2880
- params[key] = element.join(',');
2881
- } else if (element == null || element === undefined || String(element).trim() === '') {
2882
- delete params[key];
2883
- }
2895
+ })();
2884
2896
  }
2885
- };
2886
- for (var key in params) {
2887
- _loop();
2888
2897
  }
2889
2898
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
2890
2899
  pageSize: pageSize,
@@ -4543,74 +4552,76 @@ var AddSelect = function AddSelect(props) {
4543
4552
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
4544
4553
  var result;
4545
4554
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4546
- while (1) switch (_context.prev = _context.next) {
4547
- case 0:
4548
- if (!(bType == 'skc' && tList.some(function (i) {
4549
- return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
4550
- }))) {
4551
- _context.next = 3;
4552
- break;
4553
- }
4554
- antd.message.warning('相同skc配码不可设置相同哦');
4555
- return _context.abrupt("return", false);
4556
- case 3:
4557
- if (!(bType == 'spu')) {
4558
- _context.next = 26;
4559
- break;
4560
- }
4561
- if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
4562
- return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
4563
- }))) {
4564
- _context.next = 7;
4565
- break;
4566
- }
4567
- antd.message.warning('相同商品相同配码颜色不可设置相同哦');
4568
- return _context.abrupt("return", false);
4569
- case 7:
4570
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
4571
- _context.next = 10;
4572
- break;
4573
- }
4574
- antd.message.warning('请先选择颜色!');
4575
- return _context.abrupt("return", false);
4576
- case 10:
4577
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
4578
- return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
4579
- }))) {
4580
- _context.next = 13;
4581
- break;
4582
- }
4583
- antd.message.warning('相同商品相同颜色配码不可设置相同哦');
4584
- return _context.abrupt("return", false);
4585
- case 13:
4586
- if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
4587
- _context.next = 26;
4555
+ while (1) {
4556
+ switch (_context.prev = _context.next) {
4557
+ case 0:
4558
+ if (!(bType == 'skc' && tList.some(function (i) {
4559
+ return i[recordKey] == recordItem[recordKey] && i[selectItem.dataIndex] == changeValue;
4560
+ }))) {
4561
+ _context.next = 3;
4562
+ break;
4563
+ }
4564
+ antd.message.warning('相同skc配码不可设置相同哦');
4565
+ return _context.abrupt("return", false);
4566
+ case 3:
4567
+ if (!(bType == 'spu')) {
4568
+ _context.next = 26;
4569
+ break;
4570
+ }
4571
+ if (!(selectItem.dataIndex == 'colorName' && tList.some(function (i) {
4572
+ return i[recordKey] == recordItem[recordKey] && i.selectPropertyGroupCode == recordItem.selectPropertyGroupCode && i[selectItem.dataIndex] == changeValue;
4573
+ }))) {
4574
+ _context.next = 7;
4575
+ break;
4576
+ }
4577
+ antd.message.warning('相同商品相同配码颜色不可设置相同哦');
4578
+ return _context.abrupt("return", false);
4579
+ case 7:
4580
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && !recordItem.colorName)) {
4581
+ _context.next = 10;
4582
+ break;
4583
+ }
4584
+ antd.message.warning('请先选择颜色!');
4585
+ return _context.abrupt("return", false);
4586
+ case 10:
4587
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode' && tList.some(function (i) {
4588
+ return i[recordKey] == recordItem[recordKey] && i.colorName == recordItem.colorName && i[selectItem.dataIndex] == changeValue;
4589
+ }))) {
4590
+ _context.next = 13;
4591
+ break;
4592
+ }
4593
+ antd.message.warning('相同商品相同颜色配码不可设置相同哦');
4594
+ return _context.abrupt("return", false);
4595
+ case 13:
4596
+ if (!(selectItem.dataIndex == 'selectPropertyGroupCode')) {
4597
+ _context.next = 26;
4598
+ break;
4599
+ }
4600
+ result = true;
4601
+ _context.prev = 15;
4602
+ _context.next = 18;
4603
+ return checkSpuMatchCode({
4604
+ skcCode: recordItem[recordKey],
4605
+ matchingCode: changeValue,
4606
+ ext1: recordItem.colorName
4607
+ });
4608
+ case 18:
4609
+ result = _context.sent;
4610
+ result = true;
4611
+ _context.next = 25;
4588
4612
  break;
4589
- }
4590
- result = true;
4591
- _context.prev = 15;
4592
- _context.next = 18;
4593
- return checkSpuMatchCode({
4594
- skcCode: recordItem[recordKey],
4595
- matchingCode: changeValue,
4596
- ext1: recordItem.colorName
4597
- });
4598
- case 18:
4599
- result = _context.sent;
4600
- result = true;
4601
- _context.next = 25;
4602
- break;
4603
- case 22:
4604
- _context.prev = 22;
4605
- _context.t0 = _context["catch"](15);
4606
- result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
4607
- case 25:
4608
- return _context.abrupt("return", result);
4609
- case 26:
4610
- return _context.abrupt("return", true);
4611
- case 27:
4612
- case "end":
4613
- return _context.stop();
4613
+ case 22:
4614
+ _context.prev = 22;
4615
+ _context.t0 = _context["catch"](15);
4616
+ result = typeof _context.t0 == 'boolean' ? _context.t0 : false;
4617
+ case 25:
4618
+ return _context.abrupt("return", result);
4619
+ case 26:
4620
+ return _context.abrupt("return", true);
4621
+ case 27:
4622
+ case "end":
4623
+ return _context.stop();
4624
+ }
4614
4625
  }
4615
4626
  }, _callee, null, [[15, 22]]);
4616
4627
  }));
@@ -4802,27 +4813,29 @@ var AddSelect = function AddSelect(props) {
4802
4813
  var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
4803
4814
  var isConformToTheRules, newPopValue;
4804
4815
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4805
- while (1) switch (_context2.prev = _context2.next) {
4806
- case 0:
4807
- _context2.next = 2;
4808
- return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
4809
- case 2:
4810
- isConformToTheRules = _context2.sent;
4811
- if (isConformToTheRules) {
4812
- record[item.dataIndex] = value;
4813
- } else {
4814
- record[item.dataIndex] = null;
4815
- }
4816
- newPopValue = popvalue.map(function (i, innerIndex) {
4817
- if (innerIndex == index) {
4818
- i[item.dataIndex] = record[item.dataIndex];
4816
+ while (1) {
4817
+ switch (_context2.prev = _context2.next) {
4818
+ case 0:
4819
+ _context2.next = 2;
4820
+ return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
4821
+ case 2:
4822
+ isConformToTheRules = _context2.sent;
4823
+ if (isConformToTheRules) {
4824
+ record[item.dataIndex] = value;
4825
+ } else {
4826
+ record[item.dataIndex] = null;
4819
4827
  }
4820
- return i;
4821
- });
4822
- setPopValue(newPopValue);
4823
- case 6:
4824
- case "end":
4825
- return _context2.stop();
4828
+ newPopValue = popvalue.map(function (i, innerIndex) {
4829
+ if (innerIndex == index) {
4830
+ i[item.dataIndex] = record[item.dataIndex];
4831
+ }
4832
+ return i;
4833
+ });
4834
+ setPopValue(newPopValue);
4835
+ case 6:
4836
+ case "end":
4837
+ return _context2.stop();
4838
+ }
4826
4839
  }
4827
4840
  }, _callee2);
4828
4841
  }));
@@ -4882,85 +4895,84 @@ var AddSelect = function AddSelect(props) {
4882
4895
  });
4883
4896
  }
4884
4897
  // 数组对象处理,对带有特殊标记的name进行处理
4885
- var _loop = function _loop() {
4898
+ for (var key in params) {
4886
4899
  if (Object.prototype.hasOwnProperty.call(params, key)) {
4887
- var element = params[key];
4888
- if (element && key.indexOf('*number*') >= 0) {
4889
- var dataParams = key.split('*number*');
4890
- dataParams.forEach(function (value, index) {
4891
- params[value] = element[index];
4892
- });
4893
- delete params[key];
4894
- } else if (element && key.indexOf('*address*') >= 0) {
4895
- var _dataParams = key.split('*address*');
4896
- _dataParams.forEach(function (value, index) {
4897
- params[value] = element.PCDCode[index];
4898
- });
4899
- delete params[key];
4900
- } else if (element && key.indexOf('*costType*') >= 0) {
4901
- var _dataParams2 = key.split('*costType*');
4902
- // eslint-disable-next-line prefer-destructuring
4903
- params[_dataParams2[0]] = element[1];
4904
- delete params[key];
4905
- } else if (element && key.indexOf('*fullDate*') >= 0) {
4906
- var _dataParams3 = key.split('*fullDate*');
4907
- _dataParams3.forEach(function (value, index) {
4908
- if (index === 0) {
4909
- params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
4910
- } else {
4911
- params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
4900
+ (function () {
4901
+ var element = params[key];
4902
+ if (element && key.indexOf('*number*') >= 0) {
4903
+ var dataParams = key.split('*number*');
4904
+ dataParams.forEach(function (value, index) {
4905
+ params[value] = element[index];
4906
+ });
4907
+ delete params[key];
4908
+ } else if (element && key.indexOf('*address*') >= 0) {
4909
+ var _dataParams = key.split('*address*');
4910
+ _dataParams.forEach(function (value, index) {
4911
+ params[value] = element.PCDCode[index];
4912
+ });
4913
+ delete params[key];
4914
+ } else if (element && key.indexOf('*costType*') >= 0) {
4915
+ var _dataParams2 = key.split('*costType*');
4916
+ // eslint-disable-next-line prefer-destructuring
4917
+ params[_dataParams2[0]] = element[1];
4918
+ delete params[key];
4919
+ } else if (element && key.indexOf('*fullDate*') >= 0) {
4920
+ var _dataParams3 = key.split('*fullDate*');
4921
+ _dataParams3.forEach(function (value, index) {
4922
+ if (index === 0) {
4923
+ params[value] = moment(element[index]).millisecond(0).second(0).minute(0).hour(0).format('YYYY-MM-DD HH:mm:ss');
4924
+ } else {
4925
+ params[value] = moment(element[index]).millisecond(59).second(59).minute(59).hour(23).format('YYYY-MM-DD HH:mm:ss');
4926
+ }
4927
+ });
4928
+ delete params[key];
4929
+ } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
4930
+ var _dataParams4 = key.split('*checkBox*');
4931
+ if (element) {
4932
+ params[_dataParams4[0]] = 0;
4912
4933
  }
4913
- });
4914
- delete params[key];
4915
- } else if (typeof element === 'boolean' && key.indexOf('*checkBox*') >= 0) {
4916
- var _dataParams4 = key.split('*checkBox*');
4917
- if (element) {
4918
- params[_dataParams4[0]] = 0;
4919
- }
4920
- delete params[key];
4921
- } else if (element && key.indexOf('*cascader*') >= 0) {
4922
- var _dataParams5 = key.split('*cascader*');
4923
- params[_dataParams5[0]] = element[element.length - 1];
4924
- delete params[key];
4925
- } else if (element && key.indexOf('*date*') >= 0) {
4926
- var _dataParams6 = key.split('*date*');
4927
- _dataParams6.forEach(function (value, index) {
4928
- if (index === 0) {
4929
- params[value] = moment(element[index]).format('YYYY-MM-DD');
4934
+ delete params[key];
4935
+ } else if (element && key.indexOf('*cascader*') >= 0) {
4936
+ var _dataParams5 = key.split('*cascader*');
4937
+ params[_dataParams5[0]] = element[element.length - 1];
4938
+ delete params[key];
4939
+ } else if (element && key.indexOf('*date*') >= 0) {
4940
+ var _dataParams6 = key.split('*date*');
4941
+ _dataParams6.forEach(function (value, index) {
4942
+ if (index === 0) {
4943
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
4944
+ } else {
4945
+ params[value] = moment(element[index]).format('YYYY-MM-DD');
4946
+ }
4947
+ });
4948
+ delete params[key];
4949
+ } else if (element && key.indexOf('*') >= 0) {
4950
+ var _dataParams7 = key.split('*');
4951
+ _dataParams7.forEach(function (value, index) {
4952
+ params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
4953
+ });
4954
+ delete params[key];
4955
+ } else if (element && key.indexOf('_selectNumberRange') >= 0) {
4956
+ // key = xxxxx_selectNumberRange qp-xxxxx-gt
4957
+ var _dataParams8 = key.split('_selectNumberRange')[0];
4958
+ if (params[key][0] === 'range') {
4959
+ if (params[key][1][0]) {
4960
+ params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
4961
+ }
4962
+ if (params[key][1][1]) {
4963
+ params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
4964
+ }
4930
4965
  } else {
4931
- params[value] = moment(element[index]).format('YYYY-MM-DD');
4932
- }
4933
- });
4934
- delete params[key];
4935
- } else if (element && key.indexOf('*') >= 0) {
4936
- var _dataParams7 = key.split('*');
4937
- _dataParams7.forEach(function (value, index) {
4938
- params[value] = element[index].format('YYYY-MM-DD HH:mm:ss');
4939
- });
4940
- delete params[key];
4941
- } else if (element && key.indexOf('_selectNumberRange') >= 0) {
4942
- // key = xxxxx_selectNumberRange qp-xxxxx-gt
4943
- var _dataParams8 = key.split('_selectNumberRange')[0];
4944
- if (params[key][0] === 'range') {
4945
- if (params[key][1][0]) {
4946
- params["qp-".concat(_dataParams8, "-ge")] = params[key][1][0];
4947
- }
4948
- if (params[key][1][1]) {
4949
- params["qp-".concat(_dataParams8, "-le")] = params[key][1][1];
4966
+ params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
4950
4967
  }
4951
- } else {
4952
- params["qp-".concat(_dataParams8, "-").concat(params[key][0])] = params[key][1];
4968
+ delete params[key];
4969
+ } else if (Array.isArray(element)) {
4970
+ params[key] = element.join(',');
4971
+ } else if (element == null || element === undefined || String(element).trim() === '') {
4972
+ delete params[key];
4953
4973
  }
4954
- delete params[key];
4955
- } else if (Array.isArray(element)) {
4956
- params[key] = element.join(',');
4957
- } else if (element == null || element === undefined || String(element).trim() === '') {
4958
- delete params[key];
4959
- }
4974
+ })();
4960
4975
  }
4961
- };
4962
- for (var key in params) {
4963
- _loop();
4964
4976
  }
4965
4977
  var queryParams = _objectSpread2(_objectSpread2(_objectSpread2({
4966
4978
  pageSize: pageSize,
@@ -6415,70 +6427,72 @@ var BillEntry = function BillEntry(_ref3) {
6415
6427
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6416
6428
  var canEntryObject, _canEntryObject$error, messageInfo;
6417
6429
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6418
- while (1) switch (_context.prev = _context.next) {
6419
- case 0:
6420
- if (data === null || data === void 0 ? void 0 : data.length) {
6421
- _context.next = 3;
6422
- break;
6423
- }
6424
- antd.message.warning('至少录入一条数据');
6425
- return _context.abrupt("return");
6426
- case 3:
6427
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6428
- return d.skuCode && d.name;
6429
- })) {
6430
- _context.next = 6;
6431
- break;
6432
- }
6433
- antd.message.warning('请选择商品!');
6434
- return _context.abrupt("return");
6435
- case 6:
6436
- if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6437
- return d.count;
6438
- })) {
6439
- _context.next = 9;
6440
- break;
6441
- }
6442
- antd.message.warning('请填写商品数量!');
6443
- return _context.abrupt("return");
6444
- case 9:
6445
- _context.next = 11;
6446
- return isSkuCanEntry(data);
6447
- case 11:
6448
- canEntryObject = _context.sent;
6449
- if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
6450
- _context.next = 16;
6451
- break;
6452
- }
6453
- 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) {
6454
- return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
6455
- }));
6456
- messageInfo && antd.message.warning({
6457
- content: messageInfo,
6458
- duration: 6
6459
- });
6460
- return _context.abrupt("return");
6461
- case 16:
6462
- setLoading(true);
6463
- onSaveCallback(data).then(function (res) {
6464
- {
6465
- var _Object$keys;
6466
- var initSuccessMessage = '保存成功';
6467
- var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
6468
- if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
6469
- (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
6470
- } else {
6471
- antd.message.success(initSuccessMessage);
6472
- }
6430
+ while (1) {
6431
+ switch (_context.prev = _context.next) {
6432
+ case 0:
6433
+ if (data === null || data === void 0 ? void 0 : data.length) {
6434
+ _context.next = 3;
6435
+ break;
6473
6436
  }
6474
- setLoading(false);
6475
- }).catch(function (Error) {
6476
- antd.message.error(Error);
6477
- setLoading(false);
6478
- });
6479
- case 18:
6480
- case "end":
6481
- return _context.stop();
6437
+ antd.message.warning('至少录入一条数据');
6438
+ return _context.abrupt("return");
6439
+ case 3:
6440
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6441
+ return d.skuCode && d.name;
6442
+ })) {
6443
+ _context.next = 6;
6444
+ break;
6445
+ }
6446
+ antd.message.warning('请选择商品!');
6447
+ return _context.abrupt("return");
6448
+ case 6:
6449
+ if (data === null || data === void 0 ? void 0 : data.every(function (d) {
6450
+ return d.count;
6451
+ })) {
6452
+ _context.next = 9;
6453
+ break;
6454
+ }
6455
+ antd.message.warning('请填写商品数量!');
6456
+ return _context.abrupt("return");
6457
+ case 9:
6458
+ _context.next = 11;
6459
+ return isSkuCanEntry(data);
6460
+ case 11:
6461
+ canEntryObject = _context.sent;
6462
+ if (!((canEntryObject === null || canEntryObject === void 0 ? void 0 : canEntryObject.flag) === false)) {
6463
+ _context.next = 16;
6464
+ break;
6465
+ }
6466
+ 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) {
6467
+ return /*#__PURE__*/React__default['default'].createElement("div", null, i.skuCode, "\u6821\u9A8C\u5931\u8D25\uFF1A", i.checkResults);
6468
+ }));
6469
+ messageInfo && antd.message.warning({
6470
+ content: messageInfo,
6471
+ duration: 6
6472
+ });
6473
+ return _context.abrupt("return");
6474
+ case 16:
6475
+ setLoading(true);
6476
+ onSaveCallback(data).then(function (res) {
6477
+ {
6478
+ var _Object$keys;
6479
+ var initSuccessMessage = '保存成功';
6480
+ var rmsbi = (res === null || res === void 0 ? void 0 : res.messageSuccessBackInfo) || {};
6481
+ if (rmsbi && ((_Object$keys = Object.keys(rmsbi)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length)) {
6482
+ (rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.needThrowSuccess) ? antd.message.success((rmsbi === null || rmsbi === void 0 ? void 0 : rmsbi.successMessage) || initSuccessMessage) : null;
6483
+ } else {
6484
+ antd.message.success(initSuccessMessage);
6485
+ }
6486
+ }
6487
+ setLoading(false);
6488
+ }).catch(function (Error) {
6489
+ antd.message.error(Error);
6490
+ setLoading(false);
6491
+ });
6492
+ case 18:
6493
+ case "end":
6494
+ return _context.stop();
6495
+ }
6482
6496
  }
6483
6497
  }, _callee);
6484
6498
  }));
@@ -9613,7 +9627,7 @@ var CommodityEntry = function CommodityEntry(props) {
9613
9627
  * @LastEditTime: 2022-01-14 17:17:26
9614
9628
  * @LastEditors: rodchen
9615
9629
  */
9616
- var index$2 = (function (storageKeyString) {
9630
+ var index$1 = (function (storageKeyString) {
9617
9631
  var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
9618
9632
  var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
9619
9633
  if (typeof seconds !== 'number') throw new Error('seconds should be number');
@@ -9734,42 +9748,44 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
9734
9748
  var _ctx$form;
9735
9749
  var resData, coverData, data, dataList;
9736
9750
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9737
- while (1) switch (_context.prev = _context.next) {
9738
- case 0:
9739
- resData = (res === null || res === void 0 ? void 0 : res.data) || [];
9740
- if (!(resData.status === '0' || resData.code === '000000')) {
9741
- _context.next = 13;
9751
+ while (1) {
9752
+ switch (_context.prev = _context.next) {
9753
+ case 0:
9754
+ resData = (res === null || res === void 0 ? void 0 : res.data) || [];
9755
+ if (!(resData.status === '0' || resData.code === '000000')) {
9756
+ _context.next = 13;
9757
+ break;
9758
+ }
9759
+ data = resData.data;
9760
+ if (!remoteSource.converter) {
9761
+ _context.next = 9;
9762
+ break;
9763
+ }
9764
+ _context.next = 6;
9765
+ return remoteSource.converter({
9766
+ data: [data]
9767
+ });
9768
+ case 6:
9769
+ coverData = _context.sent;
9770
+ _context.next = 11;
9742
9771
  break;
9743
- }
9744
- data = resData.data;
9745
- if (!remoteSource.converter) {
9746
- _context.next = 9;
9772
+ case 9:
9773
+ dataList = data && Array.isArray(data) ? data : data && [data] || [];
9774
+ coverData = dataList.length && dataList.map(function (ites) {
9775
+ return mapSearchTree(ites);
9776
+ }) || [];
9777
+ case 11:
9778
+ _context.next = 14;
9747
9779
  break;
9748
- }
9749
- _context.next = 6;
9750
- return remoteSource.converter({
9751
- data: [data]
9752
- });
9753
- case 6:
9754
- coverData = _context.sent;
9755
- _context.next = 11;
9756
- break;
9757
- case 9:
9758
- dataList = data && Array.isArray(data) ? data : data && [data] || [];
9759
- coverData = dataList.length && dataList.map(function (ites) {
9760
- return mapSearchTree(ites);
9761
- }) || [];
9762
- case 11:
9763
- _context.next = 14;
9764
- break;
9765
- case 13:
9766
- coverData = [];
9767
- case 14:
9768
- setTreeData(coverData);
9769
- ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
9770
- case 16:
9771
- case "end":
9772
- return _context.stop();
9780
+ case 13:
9781
+ coverData = [];
9782
+ case 14:
9783
+ setTreeData(coverData);
9784
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(ctx.name, coverData);
9785
+ case 16:
9786
+ case "end":
9787
+ return _context.stop();
9788
+ }
9773
9789
  }
9774
9790
  }, _callee);
9775
9791
  }));
@@ -9976,7 +9992,7 @@ var BusinessTreeSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Bus
9976
9992
  var css_248z$8 = ".form-status-label {\n height: 48px;\n margin-right: 12px;\n display: inline-block;\n position: relative;\n background-color: #B0B4B7;\n align-items: center;\n}\n.choosed-status-label.form-status-label {\n background-color: #005CFF;\n}\n.form-status-label:last-child {\n margin-right: 0px;\n}\n.form-status-label:first-child::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.choosed-status-label.form-status-label::after {\n border-left: 12px solid #005CFF;\n}\n.choosed-status-label.form-status-label:not(:first-child):not(:last-child)::after {\n border-left: 12px solid #005CFF;\n}\n.form-status-label:last-child::after {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::before {\n position: absolute;\n display: block;\n content: '';\n left: 0;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #ffffff;\n}\n.form-status-label:not(:first-child):not(:last-child)::after {\n position: absolute;\n display: block;\n content: '';\n right: -48px;\n top: 0;\n width: 48px;\n height: 48px;\n border: 24px solid;\n border-color: transparent transparent transparent transparent;\n border-left: 12px solid #B0B4B7;\n}\n.status-label-index {\n display: inline-block;\n width: 24px;\n height: 24px;\n border: 1px solid #FFFFFF;\n color: #FFFFFF;\n border-radius: 50%;\n font-family: Montserrat;\n font-size: 14px;\n line-height: 24px;\n text-align: center;\n margin: 0 6px 0 20px;\n}\n.status-label-key {\n width: 50px;\n height: 100%;\n display: inline-flex;\n float: left;\n align-items: center;\n justify-content: center;\n}\n.status-label-operate {\n float: left;\n width: calc(100% - 50px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n height: 100%;\n margin: 4px 0;\n}\n.status-label-operate > div {\n font-size: 12px;\n height: 20px;\n line-height: 20px;\n color: #FFFFFF;\n font-family: PingFangSC;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.status-label-operate > div:first-child {\n font-size: 14px;\n font-weight: 600;\n}\n.only-one-child.form-status-label::after,\n.only-one-child.form-status-label::before {\n border-left: 0px;\n}\n";
9977
9993
  styleInject(css_248z$8);
9978
9994
 
9979
- var index$3 = (function (props) {
9995
+ var index$2 = (function (props) {
9980
9996
  var _props$formStatusMapp = props.formStatusMapping,
9981
9997
  formStatusMapping = _props$formStatusMapp === void 0 ? [] : _props$formStatusMapp;
9982
9998
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -11400,7 +11416,7 @@ var iconMap = {
11400
11416
  src: moreIcon
11401
11417
  })
11402
11418
  };
11403
- var index$4 = (function (props) {
11419
+ var index$3 = (function (props) {
11404
11420
  var _useLocation = umi.useLocation(),
11405
11421
  pathname = _useLocation.pathname;
11406
11422
  var _useState = React.useState(pathname + 'id'),
@@ -11617,7 +11633,7 @@ var css_248z$d = ".home_page_head {\n height: 54px;\n display: flex;\n justif
11617
11633
  styleInject(css_248z$d);
11618
11634
 
11619
11635
  var _excluded$c = ["children"];
11620
- var index$5 = (function (props) {
11636
+ var index$4 = (function (props) {
11621
11637
  var _useLocation = umi.useLocation(),
11622
11638
  pathname = _useLocation.pathname;
11623
11639
  var _useState = React.useState(pathname + 'id'),
@@ -11772,20 +11788,26 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
11772
11788
  fixed: item.fixed
11773
11789
  };
11774
11790
  }) : '';
11775
- axios__default['default']({
11776
- url: '/user/appConfig/saveUserOrder',
11777
- method: 'POST',
11778
- data: {
11779
- code: that.state.bsTableCode,
11780
- detail: configvalue ? JSON.stringify(configvalue) : ''
11781
- }
11782
- }).then(function (res) {
11783
- var _res$data;
11784
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
11785
- _this.patchConfigToLocalstorage(configvalue);
11786
- } else {
11787
- antd.message.error('保存表头列自定义失败,请稍后尝试');
11788
- }
11791
+ return new Promise(function (resolve, reject) {
11792
+ axios__default['default']({
11793
+ url: '/user/appConfig/saveUserOrder',
11794
+ method: 'POST',
11795
+ data: {
11796
+ code: that.state.bsTableCode,
11797
+ detail: configvalue ? JSON.stringify(configvalue) : ''
11798
+ }
11799
+ }).then(function (res) {
11800
+ var _res$data;
11801
+ if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status) === '0') {
11802
+ _this.patchConfigToLocalstorage(configvalue);
11803
+ resolve({
11804
+ status: '0'
11805
+ });
11806
+ } else {
11807
+ antd.message.error('保存表头列自定义失败,请稍后尝试');
11808
+ reject('');
11809
+ }
11810
+ });
11789
11811
  });
11790
11812
  };
11791
11813
  _this.getConfigFromlocalstorage = function () {
@@ -12089,7 +12111,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12089
12111
  // this.patchUserColumnConfig('');
12090
12112
  // return;
12091
12113
  // }
12092
- _this.patchUserColumnConfig(sortDataSource);
12114
+ return _this.patchUserColumnConfig(sortDataSource);
12093
12115
  };
12094
12116
  _this.handleCancel = function (e) {
12095
12117
  console.log(e);
@@ -12114,7 +12136,14 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12114
12136
  return item;
12115
12137
  }))
12116
12138
  }, function () {
12117
- _this.handleOk();
12139
+ _this.handleOk().then(function (res) {
12140
+ if (res.status === '0') {
12141
+ antd.message.success( /*#__PURE__*/React__default['default'].createElement("span", null, "\u5B57\u6BB5\u5DF2\u9690\u85CF\uFF0C\u5982\u9700\u91CD\u65B0\u663E\u793A\u8BF7\u524D\u5F80", /*#__PURE__*/React__default['default'].createElement(antd.Typography.Link, {
12142
+ underline: true,
12143
+ onClick: _this.showModal
12144
+ }, "\u5217\u8BBE\u7F6E")));
12145
+ }
12146
+ });
12118
12147
  });
12119
12148
  };
12120
12149
  _this.onSortEnd = function (_ref) {
@@ -12284,6 +12313,7 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12284
12313
  key: "render",
12285
12314
  value: function render() {
12286
12315
  var _this2 = this;
12316
+ var onlyModal = this.props.onlyModal;
12287
12317
  var _this$state5 = this.state,
12288
12318
  dataSource = _this$state5.dataSource,
12289
12319
  searchDataSource = _this$state5.searchDataSource,
@@ -12454,12 +12484,12 @@ var SortableTable$1 = /*#__PURE__*/function (_React$Component) {
12454
12484
  row: this.DraggableBodyRow
12455
12485
  }
12456
12486
  }
12457
- }))))), /*#__PURE__*/React__default['default'].createElement("div", {
12487
+ }))))), !onlyModal ? /*#__PURE__*/React__default['default'].createElement("div", {
12458
12488
  onClick: this.showModal,
12459
12489
  style: {
12460
12490
  fontSize: 14
12461
12491
  }
12462
- }, "\u5217\u8BBE\u7F6E"));
12492
+ }, "\u5217\u8BBE\u7F6E") : '');
12463
12493
  }
12464
12494
  }]);
12465
12495
  return SortableTable;
@@ -13035,6 +13065,7 @@ var BsSulaQueryTable = (function (props) {
13035
13065
  height = _useState16[0],
13036
13066
  setHeight = _useState16[1];
13037
13067
  var sortTableRef = React.useRef(null);
13068
+ var searchTableRef = React.useRef(null);
13038
13069
  var bsTableCode = tableCode || window.location.hash; //设置列字段的唯一标识
13039
13070
  // 获取table高度
13040
13071
  var getTableHeight = function getTableHeight() {
@@ -13284,7 +13315,7 @@ var BsSulaQueryTable = (function (props) {
13284
13315
  }
13285
13316
  };
13286
13317
  var handleTimeValue = function handleTimeValue() {
13287
- var _value$exportConfig, _value$exportConfig2, _value$exportConfig3;
13318
+ var _sortTableRef$current, _value$exportConfig, _value$exportConfig2, _value$exportConfig3;
13288
13319
  var actionsRender = value.actionsRender || [];
13289
13320
  actionsRender = [].concat(_toConsumableArray(actionsRender), [{
13290
13321
  type: 'text',
@@ -13292,20 +13323,19 @@ var BsSulaQueryTable = (function (props) {
13292
13323
  children: /*#__PURE__*/React__default['default'].createElement("span", {
13293
13324
  className: "ant-dropdown-link"
13294
13325
  }, /*#__PURE__*/React__default['default'].createElement(antd.Dropdown, {
13295
- overlay: /*#__PURE__*/React__default['default'].createElement(antd.Menu, null, /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SortableTable$1, {
13296
- ref: sortTableRef,
13297
- setShowColumns: setShowColumns,
13298
- showColumn: showColumn,
13299
- datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
13300
- bsTableCode: bsTableCode
13301
- })), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SearchItemTable, {
13302
- ref: sortTableRef,
13326
+ overlay: /*#__PURE__*/React__default['default'].createElement(antd.Menu, null, /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
13327
+ onClick: sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current = sortTableRef.current) === null || _sortTableRef$current === void 0 ? void 0 : _sortTableRef$current.showModal,
13328
+ style: {
13329
+ fontSize: 14
13330
+ }
13331
+ }, "\u5217\u8BBE\u7F6E")), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, null, /*#__PURE__*/React__default['default'].createElement(SearchItemTable, {
13332
+ ref: searchTableRef,
13303
13333
  setShowSearchFields: setShowSearchFields,
13304
13334
  showSearchFields: showSearchFields,
13305
13335
  datasource: (value === null || value === void 0 ? void 0 : value.fields) || [],
13306
13336
  bsTableCode: bsTableCode
13307
13337
  }))),
13308
- placement: "bottom"
13338
+ placement: "bottomRight"
13309
13339
  }, /*#__PURE__*/React__default['default'].createElement("span", {
13310
13340
  className: "ant-dropdown-link"
13311
13341
  }, /*#__PURE__*/React__default['default'].createElement("img", {
@@ -13369,8 +13399,8 @@ var BsSulaQueryTable = (function (props) {
13369
13399
  };
13370
13400
  };
13371
13401
  var setVisibleColumn = function setVisibleColumn(columnTitle) {
13372
- var _sortTableRef$current, _sortTableRef$current2;
13373
- sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current = sortTableRef.current) === null || _sortTableRef$current === void 0 ? void 0 : (_sortTableRef$current2 = _sortTableRef$current.handleTableHeadHidden) === null || _sortTableRef$current2 === void 0 ? void 0 : _sortTableRef$current2.call(_sortTableRef$current, columnTitle);
13402
+ var _sortTableRef$current2, _sortTableRef$current3;
13403
+ sortTableRef === null || sortTableRef === void 0 ? void 0 : (_sortTableRef$current2 = sortTableRef.current) === null || _sortTableRef$current2 === void 0 ? void 0 : (_sortTableRef$current3 = _sortTableRef$current2.handleTableHeadHidden) === null || _sortTableRef$current3 === void 0 ? void 0 : _sortTableRef$current3.call(_sortTableRef$current2, columnTitle);
13374
13404
  };
13375
13405
  var config = _objectSpread2(_objectSpread2({
13376
13406
  visibleFieldsCount: 3,
@@ -13418,7 +13448,14 @@ var BsSulaQueryTable = (function (props) {
13418
13448
  statusMapping: props.statusMapping
13419
13449
  });
13420
13450
  }, [value, checkedList, showColumn, props.statusMapping, showSearchFields]);
13421
- return /*#__PURE__*/React__default['default'].createElement(MemoQueryTable, _objectSpread2({}, memoConfig));
13451
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(MemoQueryTable, _objectSpread2({}, memoConfig)), /*#__PURE__*/React__default['default'].createElement(SortableTable$1, {
13452
+ ref: sortTableRef,
13453
+ setShowColumns: setShowColumns,
13454
+ showColumn: showColumn,
13455
+ datasource: (value === null || value === void 0 ? void 0 : value.columns) || [],
13456
+ bsTableCode: bsTableCode,
13457
+ onlyModal: true
13458
+ }));
13422
13459
  });
13423
13460
 
13424
13461
  var css_248z$f = ".menu .anticon {\n margin-right: 8px;\n}\n.menu .ant-dropdown-menu-item {\n min-width: 160px;\n}\n.right {\n display: flex;\n float: right;\n height: 48px;\n margin-left: auto;\n overflow: hidden;\n}\n.right .action {\n display: flex;\n align-items: center;\n height: 48px;\n padding: 0 12px;\n cursor: pointer;\n transition: all 0.3s;\n}\n.right .action > span {\n vertical-align: middle;\n}\n.right .action:hover {\n background: rgba(0, 0, 0, 0.025);\n}\n.right .action .opened {\n background: rgba(0, 0, 0, 0.025);\n}\n.right .search {\n padding: 0 12px;\n}\n.right .search:hover {\n background: transparent;\n}\n.right .account .avatar {\n margin-right: 8px;\n color: #005cff;\n vertical-align: top;\n background: rgba(255, 255, 255, 0.85);\n}\n.dark .action:hover {\n background: #252a3d;\n}\n.dark .action .opened {\n background: #252a3d;\n}\n.allFunsList {\n margin-bottom: 10px;\n}\n.isClons {\n position: relative;\n left: -8px;\n width: 30px;\n height: 36px;\n}\n.drawerWarp {\n -moz-column-count: 3;\n column-count: 3;\n}\n.allFunsListWarp {\n width: 200px;\n margin-right: 10px;\n border-radius: 4px;\n -moz-column-break-inside: avoid;\n break-inside: avoid;\n}\n.drawerWarp_p {\n color: #8c8c8c;\n font-weight: 400;\n font-size: 14px;\n font-family: PingFangSC, PingFangSC-Regular;\n line-height: 20px;\n text-align: left;\n}\n.searchTop {\n display: flex;\n align-items: center;\n}\n.searchTopInp {\n width: 528px;\n height: 40px;\n background: #f8f9fa;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n.searchTopInp .ant-input {\n background: #f8f9fa;\n}\n.searchTopBtn {\n position: relative;\n left: -1px;\n width: 92px;\n height: 40px;\n background: #005cff;\n border-radius: 0px 4px 4px 0px;\n}\n.contentWarp {\n margin-top: 54px;\n font-size: 14px;\n font-weight: 400;\n text-align: left;\n color: #8c8c8c;\n}\n.themeColor {\n color: #005CFF;\n}\n.serachView {\n margin-top: 36px;\n margin-bottom: 32px;\n}\n.content {\n display: flex;\n flex-wrap: wrap;\n}\n.content div {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 8px 20px;\n font-size: 14px;\n font-weight: 400;\n color: #000000;\n background: #f8f9fa;\n border-radius: 100px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n.content div:hover {\n cursor: pointer;\n}\n";
@@ -13893,19 +13930,21 @@ function _outLogin() {
13893
13930
  _outLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
13894
13931
  var res;
13895
13932
  return _regeneratorRuntime().wrap(function _callee$(_context) {
13896
- while (1) switch (_context.prev = _context.next) {
13897
- case 0:
13898
- _context.next = 2;
13899
- return axios__default['default']({
13900
- url: '/user/web/loginOut',
13901
- method: 'GET'
13902
- });
13903
- case 2:
13904
- res = _context.sent;
13905
- return _context.abrupt("return", res);
13906
- case 4:
13907
- case "end":
13908
- return _context.stop();
13933
+ while (1) {
13934
+ switch (_context.prev = _context.next) {
13935
+ case 0:
13936
+ _context.next = 2;
13937
+ return axios__default['default']({
13938
+ url: '/user/web/loginOut',
13939
+ method: 'GET'
13940
+ });
13941
+ case 2:
13942
+ res = _context.sent;
13943
+ return _context.abrupt("return", res);
13944
+ case 4:
13945
+ case "end":
13946
+ return _context.stop();
13947
+ }
13909
13948
  }
13910
13949
  }, _callee);
13911
13950
  }));
@@ -14034,29 +14073,31 @@ var GlobalHeaderRight = function GlobalHeaderRight(_ref) {
14034
14073
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14035
14074
  var sessionId;
14036
14075
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14037
- while (1) switch (_context.prev = _context.next) {
14038
- case 0:
14039
- _context.next = 2;
14040
- return getSessionId();
14041
- case 2:
14042
- sessionId = _context.sent;
14043
- _context.next = 5;
14044
- return outLogin({
14045
- sessionId: sessionId
14046
- });
14047
- case 5:
14048
- // @ts-ignore
14049
- if (BUILD_TYPE) {
14050
- antd.message.success('退出登录成功');
14051
- umi.history.replace({
14052
- pathname: '/user/login'
14076
+ while (1) {
14077
+ switch (_context.prev = _context.next) {
14078
+ case 0:
14079
+ _context.next = 2;
14080
+ return getSessionId();
14081
+ case 2:
14082
+ sessionId = _context.sent;
14083
+ _context.next = 5;
14084
+ return outLogin({
14085
+ sessionId: sessionId
14053
14086
  });
14054
- } else {
14055
- setLoginOutPath();
14056
- }
14057
- case 6:
14058
- case "end":
14059
- return _context.stop();
14087
+ case 5:
14088
+ // @ts-ignore
14089
+ if (BUILD_TYPE) {
14090
+ antd.message.success('退出登录成功');
14091
+ umi.history.replace({
14092
+ pathname: '/user/login'
14093
+ });
14094
+ } else {
14095
+ setLoginOutPath();
14096
+ }
14097
+ case 6:
14098
+ case "end":
14099
+ return _context.stop();
14100
+ }
14060
14101
  }
14061
14102
  }, _callee);
14062
14103
  }));
@@ -15670,6 +15711,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
15670
15711
  _this.allFunc = /*#__PURE__*/React.createRef('');
15671
15712
  _this.customerMenuRef = /*#__PURE__*/React.createRef('');
15672
15713
  _this.actionRef = /*#__PURE__*/React.createRef();
15714
+ _this.handleBeforeUnload = function () {
15715
+ // 储存当前router信息
15716
+ sessionStorage.setItem('@listenRouterState', JSON.stringify(_this.state.listenRouterState));
15717
+ };
15673
15718
  _this.parseQueryString = function (queryString) {
15674
15719
  if (!queryString) {
15675
15720
  return '';
@@ -15884,7 +15929,6 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
15884
15929
  showSubMenu: isShow
15885
15930
  });
15886
15931
  }, 500);
15887
- //设置tabs标签左右滚动
15888
15932
  _this.setTabNavTransLate = function (num) {
15889
15933
  var _document$getElementB, _document$getElementB2, _document$getElementB3, _document$getElementB4, _document$defaultView;
15890
15934
  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];
@@ -16074,15 +16118,49 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16074
16118
  },
16075
16119
  currentSubMenuData: [],
16076
16120
  showSubMenu: false,
16077
- isSlider: false
16121
+ isSlider: false,
16122
+ _routerArray: routerArray
16078
16123
  };
16079
16124
  return _this;
16080
16125
  }
16081
16126
  _createClass(BasicLayout, [{
16127
+ key: "componentWillMount",
16128
+ value: function componentWillMount() {
16129
+ var _this2 = this;
16130
+ // 检查页面是否为刷新之后的
16131
+ if (sessionStorage.getItem('@listenRouterState')) {
16132
+ var lastListenRouterState = JSON.parse(sessionStorage.getItem('@listenRouterState')),
16133
+ showListenRouterState = [],
16134
+ nowItem = {};
16135
+ if (lastListenRouterState.length === 1) {
16136
+ sessionStorage.removeItem('@listenRouterState');
16137
+ return;
16138
+ }
16139
+ lastListenRouterState.forEach(function (item) {
16140
+ var _this2$state;
16141
+ nowItem = _this2 === null || _this2 === void 0 ? void 0 : (_this2$state = _this2.state) === null || _this2$state === void 0 ? void 0 : _this2$state._routerArray.find(function (i) {
16142
+ var _item$match;
16143
+ return item.key === i.key || (item === null || item === void 0 ? void 0 : item.match) && (item === null || item === void 0 ? void 0 : (_item$match = item.match) === null || _item$match === void 0 ? void 0 : _item$match.path) === i.key;
16144
+ });
16145
+ // 详情页保留问题尚未解决
16146
+ if (nowItem) {
16147
+ showListenRouterState.push(_objectSpread2(_objectSpread2({}, item), {}, {
16148
+ content: nowItem.content,
16149
+ tab: item.tab || _this2.getPageTitle(nowItem.key)
16150
+ }));
16151
+ }
16152
+ });
16153
+ this.setState({
16154
+ listenRouterState: [].concat(showListenRouterState)
16155
+ });
16156
+ sessionStorage.removeItem('@listenRouterState');
16157
+ }
16158
+ }
16159
+ }, {
16082
16160
  key: "componentDidMount",
16083
16161
  value: function componentDidMount() {
16084
16162
  var _window$$wujie,
16085
- _this2 = this,
16163
+ _this3 = this,
16086
16164
  _localStorage$getItem,
16087
16165
  _localStorage$getItem2;
16088
16166
  var _this$props = this.props,
@@ -16132,11 +16210,11 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16132
16210
  // if (window.location.href.indexOf(`/${itemPath}`) === -1) return;
16133
16211
  // }
16134
16212
  if (route.pathname.startsWith("/".concat(itemPath, "/"))) return;
16135
- var _this2$state = _this2.state,
16136
- listenRouterState = _this2$state.listenRouterState,
16137
- listenRouterKey = _this2$state.listenRouterKey,
16138
- customerMatchs = _this2$state.customerMatchs,
16139
- hideMenuArray = _this2$state.hideMenuArray;
16213
+ var _this3$state = _this3.state,
16214
+ listenRouterState = _this3$state.listenRouterState,
16215
+ listenRouterKey = _this3$state.listenRouterKey,
16216
+ customerMatchs = _this3$state.customerMatchs,
16217
+ hideMenuArray = _this3$state.hideMenuArray;
16140
16218
  var newListenRouterState = _toConsumableArray(listenRouterState);
16141
16219
  var newListenRouterKey = _toConsumableArray(listenRouterKey);
16142
16220
  var replaceRouter = routerArray.filter(function (itemRoute) {
@@ -16147,7 +16225,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16147
16225
  // 处理中英文和特殊字符
16148
16226
  currentKey = decodeURIComponent(route.pathname);
16149
16227
  } else {
16150
- currentKey = decodeURIComponent(route.pathname + _this2.parseQueryString(route.search));
16228
+ currentKey = decodeURIComponent(route.pathname + _this3.parseQueryString(route.search));
16151
16229
  }
16152
16230
  if (!istParent) {
16153
16231
  var _window$$wujie2;
@@ -16167,7 +16245,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16167
16245
  replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
16168
16246
  return itemroute.key === '/404';
16169
16247
  })) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
16170
- _this2.setState({
16248
+ _this3.setState({
16171
16249
  listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
16172
16250
  key: currentKey,
16173
16251
  tab: '404'
@@ -16175,7 +16253,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16175
16253
  activeKey: currentKey,
16176
16254
  listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
16177
16255
  }, function () {
16178
- _this2.checkisNavSlide();
16256
+ _this3.checkisNavSlide();
16179
16257
  });
16180
16258
  } else {
16181
16259
  var match = matchPath(route.pathname, {
@@ -16185,7 +16263,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16185
16263
  query: route.query,
16186
16264
  match: match,
16187
16265
  key: currentKey,
16188
- tab: _this2.getPageTitle(route.pathname) + ''
16266
+ tab: _this3.getPageTitle(route.pathname) + ''
16189
16267
  })]);
16190
16268
  newListenRouterKey = [].concat(_toConsumableArray(listenRouterKey), [currentKey]);
16191
16269
  }
@@ -16223,13 +16301,13 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16223
16301
  localStorage.removeItem('isMenuClick');
16224
16302
  }, 0);
16225
16303
  }
16226
- _this2.setState({
16304
+ _this3.setState({
16227
16305
  //路由监听函数最后执行setState,避免处理hideMenu类型页面自动关闭的逻辑块内获取不到最新state的listenRouterState和listenRouterKey
16228
16306
  activeKey: currentKey,
16229
16307
  listenRouterState: newListenRouterState,
16230
16308
  listenRouterKey: newListenRouterKey
16231
16309
  }, function () {
16232
- _this2.checkisNavSlide();
16310
+ _this3.checkisNavSlide();
16233
16311
  });
16234
16312
  istParent = 0;
16235
16313
  });
@@ -16244,17 +16322,35 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16244
16322
  } else {
16245
16323
  history.push(location);
16246
16324
  }
16325
+ try {
16326
+ window.addEventListener('beforeunload', this.handleBeforeUnload);
16327
+ } catch (error) {
16328
+ console.log("\uD83D\uDE80 => componentDidMount => error:", error);
16329
+ }
16247
16330
  }
16248
16331
  }, {
16249
16332
  key: "componentWillUnmount",
16250
16333
  value: function componentWillUnmount() {
16334
+ window.removeEventListener('beforeunload', this.handleBeforeUnload);
16251
16335
  // eslint-disable-next-line no-unused-expressions
16252
16336
  UN_LISTTEN_DRP && UN_LISTTEN_DRP();
16253
16337
  }
16338
+ }, {
16339
+ key: "getWelcomePage",
16340
+ value: function getWelcomePage() {
16341
+ var homeRouter = routerArray.filter(function (itemroute) {
16342
+ return itemroute.key === '/';
16343
+ })[0];
16344
+ return _objectSpread2(_objectSpread2({}, homeRouter), {}, {
16345
+ key: '/',
16346
+ tab: '欢迎',
16347
+ closable: false
16348
+ });
16349
+ }
16254
16350
  }, {
16255
16351
  key: "render",
16256
16352
  value: function render() {
16257
- var _this3 = this;
16353
+ var _this4 = this;
16258
16354
  var _this$state4 = this.state,
16259
16355
  listenRouterState = _this$state4.listenRouterState,
16260
16356
  activeKey = _this$state4.activeKey,
@@ -16278,7 +16374,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16278
16374
  className: "tab_title_content"
16279
16375
  }, item.tab, item.key !== '/' && /*#__PURE__*/React__default['default'].createElement(ItemMenu, {
16280
16376
  info: item,
16281
- operateFun: _this3.operateFun,
16377
+ operateFun: _this4.operateFun,
16282
16378
  listenRouterState: listenRouterState
16283
16379
  }));
16284
16380
  };
@@ -16312,7 +16408,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16312
16408
  }, /*#__PURE__*/React__default['default'].createElement("a", {
16313
16409
  onClick: function onClick() {
16314
16410
  // 关闭全部
16315
- _this3.updateState([_objectSpread2(_objectSpread2({}, _this3.state.homeRouter), {}, {
16411
+ _this4.updateState([_objectSpread2(_objectSpread2({}, _this4.state.homeRouter), {}, {
16316
16412
  key: '/',
16317
16413
  tab: '欢迎',
16318
16414
  closable: false
@@ -16338,7 +16434,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16338
16434
  } else {
16339
16435
  newActiveKey = listenRouterState[1].key;
16340
16436
  }
16341
- _this3.updateState(listenRouterState.filter(function (d) {
16437
+ _this4.updateState(listenRouterState.filter(function (d) {
16342
16438
  return d.key !== activeKey;
16343
16439
  }), listenRouterKey.filter(function (d) {
16344
16440
  return d !== activeKey;
@@ -16365,7 +16461,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16365
16461
  // message.warning('首页不可关闭。');
16366
16462
  // return;
16367
16463
  // }
16368
- _this3.updateState(listenRouterState.filter(function (d, i) {
16464
+ _this4.updateState(listenRouterState.filter(function (d, i) {
16369
16465
  return i >= index || d.key === '/';
16370
16466
  }), listenRouterKey.filter(function (d, i) {
16371
16467
  return i >= index || d === '/';
@@ -16382,7 +16478,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16382
16478
  var index = listenRouterState.findIndex(function (item) {
16383
16479
  return item.key === activeKey;
16384
16480
  });
16385
- _this3.updateState(listenRouterState.filter(function (d, i) {
16481
+ _this4.updateState(listenRouterState.filter(function (d, i) {
16386
16482
  return i <= index || d.key === '/';
16387
16483
  }), listenRouterKey.filter(function (d, i) {
16388
16484
  return i <= index || d === '/';
@@ -16425,7 +16521,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16425
16521
  opacity: this.state.isSlider ? 1 : 0.5
16426
16522
  },
16427
16523
  onClick: function onClick() {
16428
- _this3.setTabNavTransLate(-100);
16524
+ _this4.setTabNavTransLate(-100);
16429
16525
  }
16430
16526
  }, /*#__PURE__*/React__default['default'].createElement(icons.DoubleLeftOutlined, null))),
16431
16527
  right: /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16434,7 +16530,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16434
16530
  },
16435
16531
  className: 'tab_right_operate',
16436
16532
  onClick: function onClick() {
16437
- _this3.setTabNavTransLate(100);
16533
+ _this4.setTabNavTransLate(100);
16438
16534
  }
16439
16535
  }, /*#__PURE__*/React__default['default'].createElement(icons.DoubleRightOutlined, null))
16440
16536
  };
@@ -16448,7 +16544,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16448
16544
  return /*#__PURE__*/React__default['default'].createElement(CustomerMenuHeader, {
16449
16545
  originRoutes: originRoutes,
16450
16546
  itemPath: itemPath,
16451
- handleClose: _this3.handleClose,
16547
+ handleClose: _this4.handleClose,
16452
16548
  collapsed: collapse
16453
16549
  });
16454
16550
  },
@@ -16457,10 +16553,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16457
16553
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(CustomerMenu, {
16458
16554
  originRoutes: originRoutes,
16459
16555
  itemPath: itemPath,
16460
- ref: _this3.customerMenuRef,
16461
- actionRef: _this3.actionRef,
16462
- handleClose: _this3.handleClose,
16463
- isCollapse: _this3.state.collapse
16556
+ ref: _this4.customerMenuRef,
16557
+ actionRef: _this4.actionRef,
16558
+ handleClose: _this4.handleClose,
16559
+ isCollapse: _this4.state.collapse
16464
16560
  }));
16465
16561
  }
16466
16562
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16468,7 +16564,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16468
16564
  }, /*#__PURE__*/React__default['default'].createElement("span", {
16469
16565
  className: "collapse_icon",
16470
16566
  onClick: function onClick() {
16471
- _this3.setState({
16567
+ _this4.setState({
16472
16568
  collapse: !collapse
16473
16569
  });
16474
16570
  }
@@ -16481,7 +16577,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16481
16577
  },
16482
16578
  collapsed: collapse,
16483
16579
  onCollapse: function onCollapse(boo) {
16484
- _this3.setState({
16580
+ _this4.setState({
16485
16581
  collapse: boo
16486
16582
  });
16487
16583
  },
@@ -16517,14 +16613,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16517
16613
  },
16518
16614
  onMouseEnter: function onMouseEnter() {
16519
16615
  if (menuItemProps.pro_layout_parentKeys && menuItemProps.pro_layout_parentKeys.length) return;
16520
- _this3.setState({
16616
+ _this4.setState({
16521
16617
  currentSubMenuData: menuItemProps.children,
16522
16618
  currentSubPath: menuItemProps.path
16523
16619
  });
16524
- _this3.setShowMenu(true);
16620
+ _this4.setShowMenu(true);
16525
16621
  },
16526
16622
  onMouseLeave: function onMouseLeave() {
16527
- _this3.setShowMenu(false);
16623
+ _this4.setShowMenu(false);
16528
16624
  }
16529
16625
  }, defaultDom, showSubMenu && currentSubPath === menuItemProps.path && !collapse && /*#__PURE__*/React__default['default'].createElement(icons.CaretLeftOutlined, {
16530
16626
  style: {
@@ -16543,7 +16639,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16543
16639
  }, '');
16544
16640
  },
16545
16641
  postMenuData: function postMenuData(menus) {
16546
- return _toConsumableArray(filterByMenuDate(menus || [], _this3.state.keyWord));
16642
+ return _toConsumableArray(filterByMenuDate(menus || [], _this4.state.keyWord));
16547
16643
  },
16548
16644
  links: [!this.state.collapse ? /*#__PURE__*/React__default['default'].createElement(AllFunc$1, {
16549
16645
  ref: this.allFunc,
@@ -16565,12 +16661,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16565
16661
  request: function () {
16566
16662
  var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
16567
16663
  return _regeneratorRuntime().wrap(function _callee$(_context) {
16568
- while (1) switch (_context.prev = _context.next) {
16569
- case 0:
16570
- return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
16571
- case 1:
16572
- case "end":
16573
- return _context.stop();
16664
+ while (1) {
16665
+ switch (_context.prev = _context.next) {
16666
+ case 0:
16667
+ return _context.abrupt("return", JSON.parse(localStorage.getItem("customerMenu_".concat(itemPath, "_front")) || '[]'));
16668
+ case 1:
16669
+ case "end":
16670
+ return _context.stop();
16671
+ }
16574
16672
  }
16575
16673
  }, _callee);
16576
16674
  }));
@@ -16615,7 +16713,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16615
16713
  tab: /*#__PURE__*/React__default['default'].createElement(TabTitle, {
16616
16714
  item: item,
16617
16715
  index: index,
16618
- updateState: _this3.updateState
16716
+ updateState: _this4.updateState
16619
16717
  }),
16620
16718
  style: {
16621
16719
  marginTop: isWeiqianduan ? 0 : 30
@@ -16627,10 +16725,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16627
16725
  })
16628
16726
  }, /*#__PURE__*/React__default['default'].createElement(WrapperComponent, {
16629
16727
  item: item,
16630
- routerProps: _this3.props,
16631
- getDictionarySource: _this3.getDictionarySource,
16632
- getDictionaryTextByValue: _this3.getDictionaryTextByValue,
16633
- timeFormat: _this3.timeFormat,
16728
+ routerProps: _this4.props,
16729
+ getDictionarySource: _this4.getDictionarySource,
16730
+ getDictionaryTextByValue: _this4.getDictionaryTextByValue,
16731
+ timeFormat: _this4.timeFormat,
16634
16732
  transparentProps: transparentProps
16635
16733
  }));
16636
16734
  })), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -16655,10 +16753,10 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16655
16753
  itemPath: itemPath
16656
16754
  }, drawerLeftParams)), /*#__PURE__*/React__default['default'].createElement("div", {
16657
16755
  onMouseEnter: function onMouseEnter() {
16658
- _this3.setShowMenu(true);
16756
+ _this4.setShowMenu(true);
16659
16757
  },
16660
16758
  onMouseLeave: function onMouseLeave() {
16661
- _this3.setShowMenu(false);
16759
+ _this4.setShowMenu(false);
16662
16760
  },
16663
16761
  className: 'sub_menu_content',
16664
16762
  style: {
@@ -16708,7 +16806,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
16708
16806
  }]);
16709
16807
  return WrapperComponent;
16710
16808
  }(React__default['default'].Component);
16711
- var index$6 = (function (props) {
16809
+ var index$5 = (function (props) {
16712
16810
  var _useModel = umi.useModel('@@initialState'),
16713
16811
  _useModel$initialStat = _useModel.initialState,
16714
16812
  initialState = _useModel$initialStat === void 0 ? {} : _useModel$initialStat;
@@ -16949,7 +17047,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
16949
17047
  };
16950
17048
  var FixedScrollBar$1 = /*#__PURE__*/React__default['default'].forwardRef(FixedScrollBar);
16951
17049
 
16952
- var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
17050
+ var index$6 = /*#__PURE__*/React.forwardRef(function (props, ref) {
16953
17051
  var _useState = React.useState(false),
16954
17052
  _useState2 = _slicedToArray(_useState, 2),
16955
17053
  show = _useState2[0],
@@ -24250,26 +24348,28 @@ var valueType = {
24250
24348
  var getDynamicDict = /*#__PURE__*/function () {
24251
24349
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dictionaryCode) {
24252
24350
  return _regeneratorRuntime().wrap(function _callee$(_context) {
24253
- while (1) switch (_context.prev = _context.next) {
24254
- case 0:
24255
- _context.next = 2;
24256
- return bssula.request({
24257
- url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
24258
- converter: function converter(_ref2) {
24259
- var data = _ref2.data;
24260
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
24261
- return {
24262
- text: d.name,
24263
- value: d.code || d.brandCode
24264
- };
24265
- });
24266
- }
24267
- });
24268
- case 2:
24269
- return _context.abrupt("return", _context.sent);
24270
- case 3:
24271
- case "end":
24272
- return _context.stop();
24351
+ while (1) {
24352
+ switch (_context.prev = _context.next) {
24353
+ case 0:
24354
+ _context.next = 2;
24355
+ return bssula.request({
24356
+ url: "/basic/dictDynamicItem/getDynamicData/".concat(dictionaryCode),
24357
+ converter: function converter(_ref2) {
24358
+ var data = _ref2.data;
24359
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
24360
+ return {
24361
+ text: d.name,
24362
+ value: d.code || d.brandCode
24363
+ };
24364
+ });
24365
+ }
24366
+ });
24367
+ case 2:
24368
+ return _context.abrupt("return", _context.sent);
24369
+ case 3:
24370
+ case "end":
24371
+ return _context.stop();
24372
+ }
24273
24373
  }
24274
24374
  }, _callee);
24275
24375
  }));
@@ -24319,53 +24419,55 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24319
24419
  ahooks.useMount( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
24320
24420
  var _ref$current, source;
24321
24421
  return _regeneratorRuntime().wrap(function _callee$(_context) {
24322
- while (1) switch (_context.prev = _context.next) {
24323
- case 0:
24324
- _context.next = 2;
24325
- return setIsShowAndType(function (prev) {
24326
- if (record.inputType === 20 || record.inputType === 30) {
24327
- return {
24328
- isShow: true,
24329
- singleOrMultiple: record.inputType,
24330
- type: record.choiceType
24331
- };
24422
+ while (1) {
24423
+ switch (_context.prev = _context.next) {
24424
+ case 0:
24425
+ _context.next = 2;
24426
+ return setIsShowAndType(function (prev) {
24427
+ if (record.inputType === 20 || record.inputType === 30) {
24428
+ return {
24429
+ isShow: true,
24430
+ singleOrMultiple: record.inputType,
24431
+ type: record.choiceType
24432
+ };
24433
+ }
24434
+ return prev;
24435
+ });
24436
+ case 2:
24437
+ if (!record.dictionaryCode) {
24438
+ _context.next = 17;
24439
+ break;
24332
24440
  }
24333
- return prev;
24334
- });
24335
- case 2:
24336
- if (!record.dictionaryCode) {
24337
- _context.next = 17;
24338
- break;
24339
- }
24340
- if (!(record.choiceType == 20)) {
24341
- _context.next = 7;
24441
+ if (!(record.choiceType == 20)) {
24442
+ _context.next = 7;
24443
+ break;
24444
+ }
24445
+ _context.t0 = getDictionarySource(record.dictionaryCode);
24446
+ _context.next = 15;
24342
24447
  break;
24343
- }
24344
- _context.t0 = getDictionarySource(record.dictionaryCode);
24345
- _context.next = 15;
24346
- break;
24347
- case 7:
24348
- if (!(record.choiceType == 30)) {
24349
- _context.next = 13;
24448
+ case 7:
24449
+ if (!(record.choiceType == 30)) {
24450
+ _context.next = 13;
24451
+ break;
24452
+ }
24453
+ _context.next = 10;
24454
+ return getDynamicDict(record.dictionaryCode);
24455
+ case 10:
24456
+ _context.t1 = _context.sent;
24457
+ _context.next = 14;
24350
24458
  break;
24351
- }
24352
- _context.next = 10;
24353
- return getDynamicDict(record.dictionaryCode);
24354
- case 10:
24355
- _context.t1 = _context.sent;
24356
- _context.next = 14;
24357
- break;
24358
- case 13:
24359
- _context.t1 = [];
24360
- case 14:
24361
- _context.t0 = _context.t1;
24362
- case 15:
24363
- source = _context.t0;
24364
- // @ts-ignore
24365
- ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
24366
- case 17:
24367
- case "end":
24368
- return _context.stop();
24459
+ case 13:
24460
+ _context.t1 = [];
24461
+ case 14:
24462
+ _context.t0 = _context.t1;
24463
+ case 15:
24464
+ source = _context.t0;
24465
+ // @ts-ignore
24466
+ ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setFieldSource('defaultValue', source);
24467
+ case 17:
24468
+ case "end":
24469
+ return _context.stop();
24470
+ }
24369
24471
  }
24370
24472
  }, _callee);
24371
24473
  })));
@@ -24433,28 +24535,30 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24433
24535
  var _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
24434
24536
  var form, values, name, relates, source;
24435
24537
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
24436
- while (1) switch (_context2.prev = _context2.next) {
24437
- case 0:
24438
- form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
24439
- if (values[0]) {
24538
+ while (1) {
24539
+ switch (_context2.prev = _context2.next) {
24540
+ case 0:
24541
+ form = _ref3.form, values = _ref3.values, name = _ref3.name, relates = _ref3.relates;
24542
+ if (values[0]) {
24543
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24544
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24545
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
24546
+ }
24547
+ if (!values[1]) {
24548
+ _context2.next = 9;
24549
+ break;
24550
+ }
24551
+ _context2.next = 5;
24552
+ return getDynamicDict(record.dictionaryCode || values[1]);
24553
+ case 5:
24554
+ source = _context2.sent;
24440
24555
  form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24441
24556
  form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24442
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], getDictionarySource(values[0]));
24443
- }
24444
- if (!values[1]) {
24445
- _context2.next = 9;
24446
- break;
24447
- }
24448
- _context2.next = 5;
24449
- return getDynamicDict(record.dictionaryCode || values[1]);
24450
- case 5:
24451
- source = _context2.sent;
24452
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], []);
24453
- form === null || form === void 0 ? void 0 : form.setFieldValue(name[0], undefined);
24454
- form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
24455
- case 9:
24456
- case "end":
24457
- return _context2.stop();
24557
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name[0], source);
24558
+ case 9:
24559
+ case "end":
24560
+ return _context2.stop();
24561
+ }
24458
24562
  }
24459
24563
  }, _callee2);
24460
24564
  }));
@@ -24914,41 +25018,43 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
24914
25018
  var _type2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref10) {
24915
25019
  var values, name, form, source;
24916
25020
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
24917
- while (1) switch (_context3.prev = _context3.next) {
24918
- case 0:
24919
- values = _ref10.values, name = _ref10.name, form = _ref10.form;
24920
- if (values[1] === 40) {
24921
- form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
24922
- form.setFieldVisible(name, false);
24923
- }
24924
- if (!(values[0] === 30)) {
24925
- _context3.next = 10;
24926
- break;
24927
- }
24928
- _context3.next = 5;
24929
- return bssula.request({
24930
- url: '/basic/dictDynamicItem/queryList',
24931
- converter: function converter(_ref11) {
24932
- var data = _ref11.data;
24933
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
24934
- return {
24935
- text: d.dictCode,
24936
- value: d.dictCode
24937
- };
24938
- });
25021
+ while (1) {
25022
+ switch (_context3.prev = _context3.next) {
25023
+ case 0:
25024
+ values = _ref10.values, name = _ref10.name, form = _ref10.form;
25025
+ if (values[1] === 40) {
25026
+ form === null || form === void 0 ? void 0 : form.setFieldValue(name, null);
25027
+ form.setFieldVisible(name, false);
24939
25028
  }
24940
- });
24941
- case 5:
24942
- source = _context3.sent;
24943
- form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
24944
- form.setFieldVisible(name, true);
24945
- _context3.next = 11;
24946
- break;
24947
- case 10:
24948
- form.setFieldVisible(name, false);
24949
- case 11:
24950
- case "end":
24951
- return _context3.stop();
25029
+ if (!(values[0] === 30)) {
25030
+ _context3.next = 10;
25031
+ break;
25032
+ }
25033
+ _context3.next = 5;
25034
+ return bssula.request({
25035
+ url: '/basic/dictDynamicItem/queryList',
25036
+ converter: function converter(_ref11) {
25037
+ var data = _ref11.data;
25038
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
25039
+ return {
25040
+ text: d.dictCode,
25041
+ value: d.dictCode
25042
+ };
25043
+ });
25044
+ }
25045
+ });
25046
+ case 5:
25047
+ source = _context3.sent;
25048
+ form === null || form === void 0 ? void 0 : form.setFieldSource(name, source);
25049
+ form.setFieldVisible(name, true);
25050
+ _context3.next = 11;
25051
+ break;
25052
+ case 10:
25053
+ form.setFieldVisible(name, false);
25054
+ case 11:
25055
+ case "end":
25056
+ return _context3.stop();
25057
+ }
24952
25058
  }
24953
25059
  }, _callee3);
24954
25060
  }));
@@ -25137,64 +25243,66 @@ var FieldsModifyModal = function FieldsModifyModal(props) {
25137
25243
  var _ref$current4, _res$editableStatus;
25138
25244
  var res, _res$defaultValue;
25139
25245
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
25140
- while (1) switch (_context4.prev = _context4.next) {
25141
- case 0:
25142
- _context4.next = 2;
25143
- return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
25144
- case 2:
25145
- res = _context4.sent;
25146
- res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
25147
- res.fieldGroup = record.fieldGroup;
25148
- res.businessType = record.businessType;
25149
- res.info = {
25150
- enumeration: res.enumeration,
25151
- dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
25152
- formula: res.formula,
25153
- scale: res.scale,
25154
- variable: res.variable
25155
- };
25156
- res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
25157
- res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
25158
- res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
25159
- if (res.inputType === 40) {
25160
- res.valueType = 22;
25161
- }
25162
- // 把数组处理成文本
25163
- if (res.inputType === 30) {
25164
- if (res.defaultValue) {
25165
- res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
25246
+ while (1) {
25247
+ switch (_context4.prev = _context4.next) {
25248
+ case 0:
25249
+ _context4.next = 2;
25250
+ return ref === null || ref === void 0 ? void 0 : (_ref$current4 = ref.current) === null || _ref$current4 === void 0 ? void 0 : _ref$current4.validateFields();
25251
+ case 2:
25252
+ res = _context4.sent;
25253
+ res.editableStatus = (_res$editableStatus = res.editableStatus) === null || _res$editableStatus === void 0 ? void 0 : _res$editableStatus.join(',');
25254
+ res.fieldGroup = record.fieldGroup;
25255
+ res.businessType = record.businessType;
25256
+ res.info = {
25257
+ enumeration: res.enumeration,
25258
+ dictionaryCode: res.dictionaryCode || (res === null || res === void 0 ? void 0 : res['dictionaryCode_dynamic']),
25259
+ formula: res.formula,
25260
+ scale: res.scale,
25261
+ variable: res.variable
25262
+ };
25263
+ res.createVisibleFlag = res.showValue.indexOf('createVisibleFlag') >= 0;
25264
+ res.editVisibleFlag = res.showValue.indexOf('editVisibleFlag') >= 0;
25265
+ res.createEditableFlag = res.showValue.indexOf('createEditableFlag') >= 0;
25266
+ if (res.inputType === 40) {
25267
+ res.valueType = 22;
25166
25268
  }
25167
- }
25168
- res.fieldMapping = res.fieldMapping || '';
25169
- delete res.formula;
25170
- delete res.showValue;
25171
- if (!(mode === 'create')) {
25172
- _context4.next = 18;
25173
- break;
25174
- }
25175
- bssula.request({
25176
- url: "/basic/flow/businessField",
25177
- method: 'POST',
25178
- params: res,
25179
- successMessage: '创建成功!',
25180
- converter: function converter() {
25181
- onParentOk();
25269
+ // 把数组处理成文本
25270
+ if (res.inputType === 30) {
25271
+ if (res.defaultValue) {
25272
+ res.defaultValue = (_res$defaultValue = res.defaultValue) === null || _res$defaultValue === void 0 ? void 0 : _res$defaultValue.join(',');
25273
+ }
25182
25274
  }
25183
- });
25184
- return _context4.abrupt("return");
25185
- case 18:
25186
- bssula.request({
25187
- url: "/basic/flow/businessField/".concat(record.id),
25188
- method: 'PATCH',
25189
- params: res,
25190
- successMessage: '修改成功!',
25191
- converter: function converter() {
25192
- onParentOk();
25275
+ res.fieldMapping = res.fieldMapping || '';
25276
+ delete res.formula;
25277
+ delete res.showValue;
25278
+ if (!(mode === 'create')) {
25279
+ _context4.next = 18;
25280
+ break;
25193
25281
  }
25194
- });
25195
- case 19:
25196
- case "end":
25197
- return _context4.stop();
25282
+ bssula.request({
25283
+ url: "/basic/flow/businessField",
25284
+ method: 'POST',
25285
+ params: res,
25286
+ successMessage: '创建成功!',
25287
+ converter: function converter() {
25288
+ onParentOk();
25289
+ }
25290
+ });
25291
+ return _context4.abrupt("return");
25292
+ case 18:
25293
+ bssula.request({
25294
+ url: "/basic/flow/businessField/".concat(record.id),
25295
+ method: 'PATCH',
25296
+ params: res,
25297
+ successMessage: '修改成功!',
25298
+ converter: function converter() {
25299
+ onParentOk();
25300
+ }
25301
+ });
25302
+ case 19:
25303
+ case "end":
25304
+ return _context4.stop();
25305
+ }
25198
25306
  }
25199
25307
  }, _callee4);
25200
25308
  }));
@@ -25979,26 +26087,28 @@ var BsCascader = function BsCascader(_ref) {
25979
26087
  React.useEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
25980
26088
  var resData, data;
25981
26089
  return _regeneratorRuntime().wrap(function _callee$(_context) {
25982
- while (1) switch (_context.prev = _context.next) {
25983
- case 0:
25984
- if (!(!source && initRequestSource)) {
25985
- _context.next = 6;
25986
- break;
25987
- }
25988
- _context.next = 3;
25989
- return initRequestSource();
25990
- case 3:
25991
- resData = _context.sent;
25992
- data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
25993
- return _objectSpread2(_objectSpread2({}, item), {}, {
25994
- label: item.text,
25995
- isLeaf: false
25996
- });
25997
- })) || [];
25998
- setHandSource(data);
25999
- case 6:
26000
- case "end":
26001
- return _context.stop();
26090
+ while (1) {
26091
+ switch (_context.prev = _context.next) {
26092
+ case 0:
26093
+ if (!(!source && initRequestSource)) {
26094
+ _context.next = 6;
26095
+ break;
26096
+ }
26097
+ _context.next = 3;
26098
+ return initRequestSource();
26099
+ case 3:
26100
+ resData = _context.sent;
26101
+ data = (resData === null || resData === void 0 ? void 0 : resData.map(function (item) {
26102
+ return _objectSpread2(_objectSpread2({}, item), {}, {
26103
+ label: item.text,
26104
+ isLeaf: false
26105
+ });
26106
+ })) || [];
26107
+ setHandSource(data);
26108
+ case 6:
26109
+ case "end":
26110
+ return _context.stop();
26111
+ }
26002
26112
  }
26003
26113
  }, _callee);
26004
26114
  })), []);
@@ -26130,18 +26240,20 @@ function getRegularThresholdRange(_x) {
26130
26240
  function _getRegularThresholdRange() {
26131
26241
  _getRegularThresholdRange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
26132
26242
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26133
- while (1) switch (_context.prev = _context.next) {
26134
- case 0:
26135
- return _context.abrupt("return", axios__default['default']({
26136
- url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
26137
- method: 'POST',
26138
- data: _objectSpread2(_objectSpread2({}, params), {}, {
26139
- queryIdentify: undefined
26140
- })
26141
- }));
26142
- case 1:
26143
- case "end":
26144
- return _context.stop();
26243
+ while (1) {
26244
+ switch (_context.prev = _context.next) {
26245
+ case 0:
26246
+ return _context.abrupt("return", axios__default['default']({
26247
+ url: "/basic/regularThresholdRange/getVals/".concat(params.queryIdentify),
26248
+ method: 'POST',
26249
+ data: _objectSpread2(_objectSpread2({}, params), {}, {
26250
+ queryIdentify: undefined
26251
+ })
26252
+ }));
26253
+ case 1:
26254
+ case "end":
26255
+ return _context.stop();
26256
+ }
26145
26257
  }
26146
26258
  }, _callee);
26147
26259
  }));
@@ -26280,136 +26392,137 @@ var RuleField = /*#__PURE__*/function (_Component) {
26280
26392
  _this.getRegularThresholdRange(queryIdentify, propertyCode, queryIdentifyType);
26281
26393
  });
26282
26394
  };
26283
- //规则对象属性枚举值查询处理 queryIdentify有值是表示该属性有枚举选择
26284
26395
  _this.getRegularThresholdRange = /*#__PURE__*/function () {
26285
26396
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queryIdentify, propertyCode, queryIdentifyType) {
26286
26397
  var thresholdQuery, extraRequestUrl, querParams, needQueryList, res;
26287
26398
  return _regeneratorRuntime().wrap(function _callee$(_context) {
26288
- while (1) switch (_context.prev = _context.next) {
26289
- case 0:
26290
- if (queryIdentify) {
26291
- _context.next = 2;
26292
- break;
26293
- }
26294
- return _context.abrupt("return");
26295
- case 2:
26296
- thresholdQuery = _this.state.thresholdQuery;
26297
- extraRequestUrl = '';
26298
- querParams = setParams(propertyCode, thresholdQuery);
26299
- if (!queryIdentityInfo.find(function (item) {
26300
- return item.identity == propertyCode;
26301
- })) {
26302
- _context.next = 10;
26303
- break;
26304
- }
26305
- //判断查询属性枚举时有没有必传参数,如果必传参数没有值则不调用查询接口
26306
- needQueryList = queryIdentityInfo.find(function (item) {
26307
- return item.identity == propertyCode;
26308
- }).queryParam.filter(function (item) {
26309
- return item.isRequired;
26310
- }).map(function (item) {
26311
- return item.queryKey;
26312
- });
26313
- if (!needQueryList.some(function (item) {
26314
- return !querParams[item] || !querParams[item].length;
26315
- })) {
26316
- _context.next = 9;
26317
- break;
26318
- }
26319
- return _context.abrupt("return");
26320
- case 9:
26321
- extraRequestUrl = queryIdentityInfo.find(function (item) {
26322
- return item.identity == propertyCode;
26323
- }).requestUrl || '';
26324
- case 10:
26325
- if (queryIdentifyType === 'dictCodeIdentify') {
26326
- extraRequestUrl = "bscDictItem/selectDictItemsByDictCode"; // 字典接口
26327
- querParams = {
26328
- dictCode: queryIdentify
26329
- };
26330
- } else if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26331
- extraRequestUrl = "dictDynamicItem/getDynamicData/".concat(queryIdentify); // 字典接口
26332
- // querParams = { dictCode: queryIdentify }
26333
- }
26334
- if (!extraRequestUrl) {
26335
- _context.next = 16;
26336
- break;
26337
- }
26338
- if (queryIdentify == 'maintain_area_code') {
26339
- extraRequestUrl = "/basic/".concat(extraRequestUrl).concat(querParams.memberCardCode, "?").concat(querystring.stringify(querParams));
26340
- } else if (queryIdentifyType == 'dictCodeIdentify') {
26341
- extraRequestUrl = "/basic/".concat(extraRequestUrl, "?").concat(querystring.stringify(querParams));
26342
- } else if (queryIdentifyType == 'dynamicDictCodeIdentify') {
26343
- extraRequestUrl = "/basic/".concat(extraRequestUrl);
26344
- }
26345
- bssula.request({
26346
- url: extraRequestUrl,
26347
- method: 'get',
26348
- converter: function converter(res) {
26349
- if (handleError(res)) {
26350
- var _handleData = (res === null || res === void 0 ? void 0 : res.data) || [];
26351
- if (queryIdentifyType === 'dictCodeIdentify') {
26352
- var _handleData2;
26353
- _handleData = ((_handleData2 = _handleData) === null || _handleData2 === void 0 ? void 0 : _handleData2.length) ? _handleData.map(function (i) {
26354
- return {
26355
- code: i.dictItemCode,
26356
- name: i.dictItemName
26357
- };
26358
- }) : [];
26359
- }
26360
- if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26361
- var _handleData3;
26362
- _handleData = ((_handleData3 = _handleData) === null || _handleData3 === void 0 ? void 0 : _handleData3.length) ? _handleData.map(function (i) {
26363
- return {
26364
- code: i.code.toString(),
26365
- name: i.name
26366
- };
26367
- }) : [];
26399
+ while (1) {
26400
+ switch (_context.prev = _context.next) {
26401
+ case 0:
26402
+ if (queryIdentify) {
26403
+ _context.next = 2;
26404
+ break;
26405
+ }
26406
+ return _context.abrupt("return");
26407
+ case 2:
26408
+ thresholdQuery = _this.state.thresholdQuery;
26409
+ extraRequestUrl = '';
26410
+ querParams = setParams(propertyCode, thresholdQuery);
26411
+ if (!queryIdentityInfo.find(function (item) {
26412
+ return item.identity == propertyCode;
26413
+ })) {
26414
+ _context.next = 10;
26415
+ break;
26416
+ }
26417
+ //判断查询属性枚举时有没有必传参数,如果必传参数没有值则不调用查询接口
26418
+ needQueryList = queryIdentityInfo.find(function (item) {
26419
+ return item.identity == propertyCode;
26420
+ }).queryParam.filter(function (item) {
26421
+ return item.isRequired;
26422
+ }).map(function (item) {
26423
+ return item.queryKey;
26424
+ });
26425
+ if (!needQueryList.some(function (item) {
26426
+ return !querParams[item] || !querParams[item].length;
26427
+ })) {
26428
+ _context.next = 9;
26429
+ break;
26430
+ }
26431
+ return _context.abrupt("return");
26432
+ case 9:
26433
+ extraRequestUrl = queryIdentityInfo.find(function (item) {
26434
+ return item.identity == propertyCode;
26435
+ }).requestUrl || '';
26436
+ case 10:
26437
+ if (queryIdentifyType === 'dictCodeIdentify') {
26438
+ extraRequestUrl = "bscDictItem/selectDictItemsByDictCode"; // 字典接口
26439
+ querParams = {
26440
+ dictCode: queryIdentify
26441
+ };
26442
+ } else if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26443
+ extraRequestUrl = "dictDynamicItem/getDynamicData/".concat(queryIdentify); // 字典接口
26444
+ // querParams = { dictCode: queryIdentify }
26445
+ }
26446
+ if (!extraRequestUrl) {
26447
+ _context.next = 16;
26448
+ break;
26449
+ }
26450
+ if (queryIdentify == 'maintain_area_code') {
26451
+ extraRequestUrl = "/basic/".concat(extraRequestUrl).concat(querParams.memberCardCode, "?").concat(querystring.stringify(querParams));
26452
+ } else if (queryIdentifyType == 'dictCodeIdentify') {
26453
+ extraRequestUrl = "/basic/".concat(extraRequestUrl, "?").concat(querystring.stringify(querParams));
26454
+ } else if (queryIdentifyType == 'dynamicDictCodeIdentify') {
26455
+ extraRequestUrl = "/basic/".concat(extraRequestUrl);
26456
+ }
26457
+ bssula.request({
26458
+ url: extraRequestUrl,
26459
+ method: 'get',
26460
+ converter: function converter(res) {
26461
+ if (handleError(res)) {
26462
+ var _handleData = (res === null || res === void 0 ? void 0 : res.data) || [];
26463
+ if (queryIdentifyType === 'dictCodeIdentify') {
26464
+ var _handleData2;
26465
+ _handleData = ((_handleData2 = _handleData) === null || _handleData2 === void 0 ? void 0 : _handleData2.length) ? _handleData.map(function (i) {
26466
+ return {
26467
+ code: i.dictItemCode,
26468
+ name: i.dictItemName
26469
+ };
26470
+ }) : [];
26471
+ }
26472
+ if (queryIdentifyType === 'dynamicDictCodeIdentify') {
26473
+ var _handleData3;
26474
+ _handleData = ((_handleData3 = _handleData) === null || _handleData3 === void 0 ? void 0 : _handleData3.length) ? _handleData.map(function (i) {
26475
+ return {
26476
+ code: i.code.toString(),
26477
+ name: i.name
26478
+ };
26479
+ }) : [];
26480
+ }
26481
+ _this.setState({
26482
+ thresholdList: _handleData
26483
+ });
26368
26484
  }
26369
- _this.setState({
26370
- thresholdList: _handleData
26371
- });
26485
+ return handleData;
26372
26486
  }
26373
- return handleData;
26374
- }
26375
- });
26376
- _context.next = 29;
26377
- break;
26378
- case 16:
26379
- if (!(queryIdentifyType == 'objectPropertyListIdentify')) {
26380
- _context.next = 20;
26487
+ });
26488
+ _context.next = 29;
26381
26489
  break;
26382
- }
26383
- _this.setState({
26384
- thresholdList: queryIdentify
26385
- });
26386
- _context.next = 29;
26387
- break;
26388
- case 20:
26389
- if (!(queryIdentifyType == 'objectPropertyCodeIdentify')) {
26390
- _context.next = 24;
26490
+ case 16:
26491
+ if (!(queryIdentifyType == 'objectPropertyListIdentify')) {
26492
+ _context.next = 20;
26493
+ break;
26494
+ }
26495
+ _this.setState({
26496
+ thresholdList: queryIdentify
26497
+ });
26498
+ _context.next = 29;
26391
26499
  break;
26392
- }
26393
- // TODO待处理
26394
- _this.setState({
26395
- thresholdList: []
26396
- });
26397
- _context.next = 29;
26398
- break;
26399
- case 24:
26400
- querParams.queryIdentify = queryIdentify;
26401
- _context.next = 27;
26402
- return getRegularThresholdRange(querParams);
26403
- case 27:
26404
- res = _context.sent;
26405
- if (handleError(res)) {
26500
+ case 20:
26501
+ if (!(queryIdentifyType == 'objectPropertyCodeIdentify')) {
26502
+ _context.next = 24;
26503
+ break;
26504
+ }
26505
+ // TODO待处理
26406
26506
  _this.setState({
26407
- thresholdList: (res === null || res === void 0 ? void 0 : res.data) || []
26507
+ thresholdList: []
26408
26508
  });
26409
- }
26410
- case 29:
26411
- case "end":
26412
- return _context.stop();
26509
+ _context.next = 29;
26510
+ break;
26511
+ case 24:
26512
+ querParams.queryIdentify = queryIdentify;
26513
+ _context.next = 27;
26514
+ return getRegularThresholdRange(querParams);
26515
+ case 27:
26516
+ res = _context.sent;
26517
+ if (handleError(res)) {
26518
+ _this.setState({
26519
+ thresholdList: (res === null || res === void 0 ? void 0 : res.data) || []
26520
+ });
26521
+ }
26522
+ case 29:
26523
+ case "end":
26524
+ return _context.stop();
26525
+ }
26413
26526
  }
26414
26527
  }, _callee);
26415
26528
  }));
@@ -27228,30 +27341,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27228
27341
  notChangeOnSelect: true,
27229
27342
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
27230
27343
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
27231
- while (1) switch (_context2.prev = _context2.next) {
27232
- case 0:
27233
- _context2.next = 2;
27234
- return bssula.request({
27235
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27236
- method: 'get',
27237
- converter: function converter(_ref3) {
27238
- var data = _ref3.data;
27239
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27240
- return {
27241
- text: item.name,
27242
- value: item.id,
27243
- level: item.level,
27244
- id: item.id
27245
- };
27246
- }) : [];
27247
- return handleData;
27248
- }
27249
- });
27250
- case 2:
27251
- return _context2.abrupt("return", _context2.sent);
27252
- case 3:
27253
- case "end":
27254
- return _context2.stop();
27344
+ while (1) {
27345
+ switch (_context2.prev = _context2.next) {
27346
+ case 0:
27347
+ _context2.next = 2;
27348
+ return bssula.request({
27349
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27350
+ method: 'get',
27351
+ converter: function converter(_ref3) {
27352
+ var data = _ref3.data;
27353
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27354
+ return {
27355
+ text: item.name,
27356
+ value: item.id,
27357
+ level: item.level,
27358
+ id: item.id
27359
+ };
27360
+ }) : [];
27361
+ return handleData;
27362
+ }
27363
+ });
27364
+ case 2:
27365
+ return _context2.abrupt("return", _context2.sent);
27366
+ case 3:
27367
+ case "end":
27368
+ return _context2.stop();
27369
+ }
27255
27370
  }
27256
27371
  }, _callee2);
27257
27372
  })),
@@ -27277,30 +27392,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27277
27392
  notChangeOnSelect: true,
27278
27393
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
27279
27394
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
27280
- while (1) switch (_context3.prev = _context3.next) {
27281
- case 0:
27282
- _context3.next = 2;
27283
- return bssula.request({
27284
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27285
- method: 'get',
27286
- converter: function converter(_ref5) {
27287
- var data = _ref5.data;
27288
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27289
- return {
27290
- text: item.name,
27291
- value: item.id,
27292
- level: item.level,
27293
- id: item.id
27294
- };
27295
- }) : [];
27296
- return handleData;
27297
- }
27298
- });
27299
- case 2:
27300
- return _context3.abrupt("return", _context3.sent);
27301
- case 3:
27302
- case "end":
27303
- return _context3.stop();
27395
+ while (1) {
27396
+ switch (_context3.prev = _context3.next) {
27397
+ case 0:
27398
+ _context3.next = 2;
27399
+ return bssula.request({
27400
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27401
+ method: 'get',
27402
+ converter: function converter(_ref5) {
27403
+ var data = _ref5.data;
27404
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27405
+ return {
27406
+ text: item.name,
27407
+ value: item.id,
27408
+ level: item.level,
27409
+ id: item.id
27410
+ };
27411
+ }) : [];
27412
+ return handleData;
27413
+ }
27414
+ });
27415
+ case 2:
27416
+ return _context3.abrupt("return", _context3.sent);
27417
+ case 3:
27418
+ case "end":
27419
+ return _context3.stop();
27420
+ }
27304
27421
  }
27305
27422
  }, _callee3);
27306
27423
  })),
@@ -27328,30 +27445,32 @@ var RuleField = /*#__PURE__*/function (_Component) {
27328
27445
  notChangeOnSelect: true,
27329
27446
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
27330
27447
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
27331
- while (1) switch (_context4.prev = _context4.next) {
27332
- case 0:
27333
- _context4.next = 2;
27334
- return bssula.request({
27335
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27336
- method: 'get',
27337
- converter: function converter(_ref7) {
27338
- var data = _ref7.data;
27339
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27340
- return {
27341
- text: item.name,
27342
- value: item.id,
27343
- level: item.level,
27344
- id: item.id
27345
- };
27346
- }) : [];
27347
- return handleData;
27348
- }
27349
- });
27350
- case 2:
27351
- return _context4.abrupt("return", _context4.sent);
27352
- case 3:
27353
- case "end":
27354
- return _context4.stop();
27448
+ while (1) {
27449
+ switch (_context4.prev = _context4.next) {
27450
+ case 0:
27451
+ _context4.next = 2;
27452
+ return bssula.request({
27453
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
27454
+ method: 'get',
27455
+ converter: function converter(_ref7) {
27456
+ var data = _ref7.data;
27457
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
27458
+ return {
27459
+ text: item.name,
27460
+ value: item.id,
27461
+ level: item.level,
27462
+ id: item.id
27463
+ };
27464
+ }) : [];
27465
+ return handleData;
27466
+ }
27467
+ });
27468
+ case 2:
27469
+ return _context4.abrupt("return", _context4.sent);
27470
+ case 3:
27471
+ case "end":
27472
+ return _context4.stop();
27473
+ }
27355
27474
  }
27356
27475
  }, _callee4);
27357
27476
  })),
@@ -28468,6 +28587,8 @@ var RuleField = /*#__PURE__*/function (_Component) {
28468
28587
  });
28469
28588
  }
28470
28589
  }
28590
+
28591
+ //规则对象属性枚举值查询处理 queryIdentify有值是表示该属性有枚举选择
28471
28592
  }, {
28472
28593
  key: "render",
28473
28594
  value: function render() {
@@ -29298,7 +29419,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29298
29419
  callBack(ruleClassData);
29299
29420
  });
29300
29421
  };
29301
- // 树结构 转化成 平行树 (递归函数)
29302
29422
  _this.coverToParallel = function (treeData, result) {
29303
29423
  treeData.forEach(function (el) {
29304
29424
  result.push(el);
@@ -29552,7 +29672,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29552
29672
  callBack(ruleClassData);
29553
29673
  });
29554
29674
  };
29555
- // 场景需要返回值2022.11.15
29556
29675
  _this.renderResItem = function (itemDetail, parentDetail, ruleReturnConfig, disabled, boxStyle) {
29557
29676
  var _ruleReturnConfig$rig;
29558
29677
  var isShowResponse = itemDetail.response['enable'];
@@ -29850,30 +29969,32 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
29850
29969
  notChangeOnSelect: true,
29851
29970
  initRequestSource: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
29852
29971
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29853
- while (1) switch (_context.prev = _context.next) {
29854
- case 0:
29855
- _context.next = 2;
29856
- return bssula.request({
29857
- url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
29858
- method: 'get',
29859
- converter: function converter(_ref2) {
29860
- var data = _ref2.data;
29861
- var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
29862
- return {
29863
- text: item.name,
29864
- value: item.id,
29865
- level: item.level,
29866
- id: item.id
29867
- };
29868
- }) : [];
29869
- return handleData;
29870
- }
29871
- });
29872
- case 2:
29873
- return _context.abrupt("return", _context.sent);
29874
- case 3:
29875
- case "end":
29876
- return _context.stop();
29972
+ while (1) {
29973
+ switch (_context.prev = _context.next) {
29974
+ case 0:
29975
+ _context.next = 2;
29976
+ return bssula.request({
29977
+ url: '/basic/bscArea/getBscAreaList?qp-level-eq=1&qp-pid-eq=100000',
29978
+ method: 'get',
29979
+ converter: function converter(_ref2) {
29980
+ var data = _ref2.data;
29981
+ var handleData = data && data[0] ? data === null || data === void 0 ? void 0 : data.map(function (item) {
29982
+ return {
29983
+ text: item.name,
29984
+ value: item.id,
29985
+ level: item.level,
29986
+ id: item.id
29987
+ };
29988
+ }) : [];
29989
+ return handleData;
29990
+ }
29991
+ });
29992
+ case 2:
29993
+ return _context.abrupt("return", _context.sent);
29994
+ case 3:
29995
+ case "end":
29996
+ return _context.stop();
29997
+ }
29877
29998
  }
29878
29999
  }, _callee);
29879
30000
  })),
@@ -30207,7 +30328,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30207
30328
  }
30208
30329
  }, "\u65B0\u589E\u8FD4\u56DE\u503C")), isHaveRuleReturnConfig && _this.renderResItem(itemDetail, parentDetail, ruleReturnConfig, disabled, RuleActionItemStyle) || null, isHaveRuleTypeData && _this.renderActionList(itemDetail, parentDetail, handleRuleTypeData, selectRuleActionData, classDataIndex, disabled, RuleActionItemStyle) || null);
30209
30330
  };
30210
- //添加同一层级条件
30211
30331
  _this.addPeerRule = function (itemDetail) {
30212
30332
  var ruleClassData = _this.state.ruleClassData;
30213
30333
  var _this$props4 = _this.props,
@@ -30228,7 +30348,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30228
30348
  callBack(ruleClassData);
30229
30349
  });
30230
30350
  };
30231
- //添加子层级条件
30232
30351
  _this.addChildRules = function (itemDetail) {
30233
30352
  var ruleClassData = _this.state.ruleClassData;
30234
30353
  var callBack = _this.props.callBack;
@@ -30304,7 +30423,6 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
30304
30423
  callBack(ruleClassData);
30305
30424
  });
30306
30425
  };
30307
- // 新增执行顺序
30308
30426
  _this.handleSelectRuleAction = function (keys, classDataIndex, callback) {
30309
30427
  callback();
30310
30428
  var callBack = _this.props.callBack;
@@ -30461,26 +30579,26 @@ exports.AddSkuSelect = AddSkuSelect;
30461
30579
  exports.AddSpuSelect = AddSpuSelect;
30462
30580
  exports.BillEntry = BillEntry;
30463
30581
  exports.BsCascader = BsCascader;
30464
- exports.BsLayout = index$6;
30582
+ exports.BsLayout = index$5;
30465
30583
  exports.BsSulaQueryTable = BsSulaQueryTable;
30466
30584
  exports.BusinessSearchSelect = BusinessSearchSelect$1;
30467
30585
  exports.BusinessTreeSearchSelect = BusinessTreeSearchSelect$1;
30468
- exports.CheckOneUser = index$2;
30586
+ exports.CheckOneUser = index$1;
30469
30587
  exports.ColumnSettingTable = ColumnSettingTable;
30470
30588
  exports.CommodityEntry = CommodityEntry;
30471
30589
  exports.DataImport = DataImport;
30472
30590
  exports.DataValidation = DataValidation;
30473
- exports.DetailPageWrapper = index$4;
30591
+ exports.DetailPageWrapper = index$3;
30474
30592
  exports.EllipsisTooltip = EllipsisTooltip;
30475
30593
  exports.ExportIcon = ExportIcon;
30476
30594
  exports.GuideWrapper = GuideWrapper;
30477
- exports.HomePageWrapper = index$5;
30595
+ exports.HomePageWrapper = index$4;
30478
30596
  exports.JsonQueryTable = JsonQueryTable;
30479
- exports.MoreTreeTable = index$7;
30597
+ exports.MoreTreeTable = index$6;
30480
30598
  exports.QueryMutipleInput = QueryMutipleInput;
30481
30599
  exports.RuleComponent = RuleObjectComponent;
30482
30600
  exports.SearchSelect = SearchSelect;
30483
- exports.StateFlow = index$3;
30601
+ exports.StateFlow = index$2;
30484
30602
  exports.SulaColumnSettingTable = ColumnSettingSulaTable;
30485
30603
  exports.TableColumnSetting = TableColumnSetting;
30486
30604
  exports.TreeSearchSelect = TreeSearchSelect;