@bit-sun/business-component 2.4.31-alpha.9 → 2.4.32

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 (210) 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/index.d.ts +0 -1
  9. package/dist/index.esm.js +950 -1044
  10. package/dist/index.js +954 -1051
  11. package/dist/utils/auth.d.ts +0 -1
  12. package/docs/index.md +21 -21
  13. package/lib/assets/drag.svg +17 -17
  14. package/lib/assets/exportFail.svg +37 -37
  15. package/lib/assets/exportProcessing.svg +28 -28
  16. package/lib/assets/exportSuccess.svg +34 -34
  17. package/lib/assets/label_icon_bottom.svg +25 -25
  18. package/lib/assets/upExport.svg +22 -22
  19. package/package.json +80 -83
  20. package/src/assets/32.svg +27 -27
  21. package/src/assets/addIcon.svg +17 -17
  22. package/src/assets/allfunc.svg +27 -27
  23. package/src/assets/arrowRight.svg +24 -24
  24. package/src/assets/btn-delete.svg +29 -29
  25. package/src/assets/btn-edit.svg +19 -19
  26. package/src/assets/btn-more.svg +17 -17
  27. package/src/assets/btn-submit.svg +19 -19
  28. package/src/assets/caidan.svg +11 -11
  29. package/src/assets/close.svg +26 -26
  30. package/src/assets/drag.svg +17 -17
  31. package/src/assets/exportFail.svg +37 -37
  32. package/src/assets/exportProcessing.svg +28 -28
  33. package/src/assets/exportSuccess.svg +34 -34
  34. package/src/assets/fixed-left-active.svg +11 -11
  35. package/src/assets/fixed-left.svg +15 -15
  36. package/src/assets/fixed-right-active.svg +11 -11
  37. package/src/assets/fixed-right.svg +15 -15
  38. package/src/assets/guanbi.svg +15 -15
  39. package/src/assets/icon-quanping.svg +15 -15
  40. package/src/assets/icon-shezhi.svg +17 -17
  41. package/src/assets/label_icon_bottom.svg +25 -25
  42. package/src/assets/list-no-img.svg +21 -21
  43. package/src/assets/morentouxiang-32.svg +23 -23
  44. package/src/assets/scanning.svg +24 -24
  45. package/src/assets/upExport.svg +22 -22
  46. package/src/common/ENUM.ts +41 -41
  47. package/src/components/Business/AddSelectBusiness/index.md +162 -398
  48. package/src/components/Business/AddSelectBusiness/index.tsx +1062 -1099
  49. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +112 -112
  50. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  51. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  61. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  62. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +158 -157
  63. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  64. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  65. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +155 -155
  66. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  67. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  68. package/src/components/Business/BsLayouts/index.less +79 -79
  69. package/src/components/Business/BsLayouts/index.tsx +1484 -1572
  70. package/src/components/Business/BsLayouts/service.ts +10 -10
  71. package/src/components/Business/BsLayouts/utils.tsx +203 -205
  72. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +566 -566
  73. package/src/components/Business/BsSulaQueryTable/index.less +221 -221
  74. package/src/components/Business/BsSulaQueryTable/index.tsx +606 -560
  75. package/src/components/Business/BsSulaQueryTable/setting.tsx +854 -854
  76. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  77. package/src/components/Business/BsSulaQueryTable/utils.tsx +690 -690
  78. package/src/components/Business/CommodityEntry/index.md +70 -84
  79. package/src/components/Business/CommodityEntry/index.tsx +81 -82
  80. package/src/components/Business/CommonAlert/index.tsx +23 -23
  81. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  82. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  83. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  84. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  85. package/src/components/Business/DetailPageWrapper/index.tsx +315 -316
  86. package/src/components/Business/DetailPageWrapper/utils.tsx +164 -164
  87. package/src/components/Business/HomePageWrapper/index.less +33 -33
  88. package/src/components/Business/HomePageWrapper/index.md +45 -45
  89. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  90. package/src/components/Business/JsonQueryTable/components/FieldsModifyModal.tsx +824 -824
  91. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +205 -205
  92. package/src/components/Business/JsonQueryTable/components/Formula.tsx +206 -206
  93. package/src/components/Business/JsonQueryTable/components/MaintainOptions.tsx +127 -127
  94. package/src/components/Business/JsonQueryTable/configButton/index.js +20 -20
  95. package/src/components/Business/JsonQueryTable/configTree/component/compactArrayView.js +25 -25
  96. package/src/components/Business/JsonQueryTable/configTree/component/compactObjectView.js +30 -30
  97. package/src/components/Business/JsonQueryTable/configTree/index.js +82 -82
  98. package/src/components/Business/JsonQueryTable/configTree/index.less +44 -44
  99. package/src/components/Business/JsonQueryTable/configTree/parser/highlight.js +57 -57
  100. package/src/components/Business/JsonQueryTable/configTree/parser/index.js +124 -124
  101. package/src/components/Business/JsonQueryTable/configTree/render/iconRender.js +29 -29
  102. package/src/components/Business/JsonQueryTable/configTree/render/nameRender.js +22 -22
  103. package/src/components/Business/JsonQueryTable/configTree/treeNode.js +116 -116
  104. package/src/components/Business/JsonQueryTable/drawer/index.tsx +12 -12
  105. package/src/components/Business/JsonQueryTable/function.ts +62 -62
  106. package/src/components/Business/JsonQueryTable/index.less +16 -16
  107. package/src/components/Business/JsonQueryTable/index.md +328 -328
  108. package/src/components/Business/JsonQueryTable/index.tsx +537 -537
  109. package/src/components/Business/JsonQueryTable/jsonEditor/index.js +346 -346
  110. package/src/components/Business/JsonQueryTable/jsonEditor/index.less +22 -22
  111. package/src/components/Business/JsonQueryTable/jsonEditor/lint/basicType.js +147 -147
  112. package/src/components/Business/JsonQueryTable/jsonEditor/lint/index.js +389 -389
  113. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/actions.js +118 -118
  114. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/dependency.js +22 -22
  115. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/index.js +21 -21
  116. package/src/components/Business/JsonQueryTable/jsonEditor/suggestions/request.js +65 -65
  117. package/src/components/Business/JsonQueryTable/static.ts +450 -450
  118. package/src/components/Business/SearchSelect/BusinessUtils.tsx +2120 -2120
  119. package/src/components/Business/SearchSelect/common.ts +134 -134
  120. package/src/components/Business/SearchSelect/index.md +1503 -1512
  121. package/src/components/Business/SearchSelect/index.tsx +55 -55
  122. package/src/components/Business/SearchSelect/utils.ts +101 -101
  123. package/src/components/Business/StateFlow/index.less +130 -130
  124. package/src/components/Business/StateFlow/index.md +60 -60
  125. package/src/components/Business/StateFlow/index.tsx +29 -29
  126. package/src/components/Business/TreeSearchSelect/index.md +185 -185
  127. package/src/components/Business/TreeSearchSelect/index.tsx +33 -33
  128. package/src/components/Business/TreeSearchSelect/utils.ts +104 -104
  129. package/src/components/Business/columnSettingTable/columnSetting.tsx +766 -766
  130. package/src/components/Business/columnSettingTable/index.less +247 -247
  131. package/src/components/Business/columnSettingTable/index.md +357 -357
  132. package/src/components/Business/columnSettingTable/index.tsx +235 -235
  133. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +243 -243
  134. package/src/components/Business/columnSettingTable/utils.tsx +71 -71
  135. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +87 -87
  136. package/src/components/Business/moreTreeTable/hooks/useSticky.ts +21 -21
  137. package/src/components/Business/moreTreeTable/index.less +99 -99
  138. package/src/components/Business/moreTreeTable/index.md +448 -448
  139. package/src/components/Business/moreTreeTable/index.tsx +387 -387
  140. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  141. package/src/components/Functional/AddSelect/helps.ts +80 -80
  142. package/src/components/Functional/AddSelect/index.less +367 -367
  143. package/src/components/Functional/AddSelect/index.md +155 -155
  144. package/src/components/Functional/AddSelect/index.tsx +1171 -1011
  145. package/src/components/Functional/BillEntry/index.less +371 -371
  146. package/src/components/Functional/BillEntry/index.md +39 -39
  147. package/src/components/Functional/BillEntry/index.tsx +773 -773
  148. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -62
  149. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -178
  150. package/src/components/Functional/BsAntdSula/index.ts +2 -2
  151. package/src/components/Functional/DataImport/index.less +63 -63
  152. package/src/components/Functional/DataImport/index.md +44 -44
  153. package/src/components/Functional/DataImport/index.tsx +696 -701
  154. package/src/components/Functional/DataValidation/index.less +63 -63
  155. package/src/components/Functional/DataValidation/index.md +39 -52
  156. package/src/components/Functional/DataValidation/index.tsx +688 -701
  157. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -5
  158. package/src/components/Functional/EllipsisTooltip/index.js +36 -36
  159. package/src/components/Functional/EllipsisTooltip/index.md +30 -30
  160. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  161. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +60 -60
  162. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  163. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  164. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  165. package/src/components/Functional/SearchSelect/index.less +115 -115
  166. package/src/components/Functional/SearchSelect/index.md +141 -141
  167. package/src/components/Functional/SearchSelect/index.tsx +897 -896
  168. package/src/components/Functional/SearchSelect/utils.ts +3 -3
  169. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  170. package/src/components/Functional/TreeSearchSelect/index.tsx +204 -204
  171. package/src/components/Solution/RuleComponent/Formula.tsx +335 -335
  172. package/src/components/Solution/RuleComponent/InnerSelect.tsx +62 -62
  173. package/src/components/Solution/RuleComponent/index.d.ts +29 -29
  174. package/src/components/Solution/RuleComponent/index.js +2103 -2103
  175. package/src/components/Solution/RuleComponent/index.less +229 -229
  176. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -99
  177. package/src/components/Solution/RuleComponent/ruleFiled.js +2293 -2293
  178. package/src/components/Solution/RuleComponent/services.ts +13 -13
  179. package/src/components/Solution/RuleComponent/util.js +143 -143
  180. package/src/components/Solution/RuleSetter/RuleInstance.tsx +6 -6
  181. package/src/components/Solution/RuleSetter/baseRule.tsx +368 -368
  182. package/src/components/Solution/RuleSetter/function.ts +336 -336
  183. package/src/components/Solution/RuleSetter/index.less +221 -221
  184. package/src/components/Solution/RuleSetter/index.tsx +208 -208
  185. package/src/components/Solution/RuleSetter/service.js +276 -276
  186. package/src/index.ts +40 -41
  187. package/src/plugin/TableColumnSetting/index.less +247 -247
  188. package/src/plugin/TableColumnSetting/index.md +50 -50
  189. package/src/plugin/TableColumnSetting/index.tsx +725 -725
  190. package/src/plugin/TableColumnSetting/utils.ts +19 -19
  191. package/src/styles/bsDefault.less +1912 -1912
  192. package/src/utils/CheckOneUser/index.md +39 -39
  193. package/src/utils/CheckOneUser/index.ts +51 -51
  194. package/src/utils/CustomLoginInfo.ts +55 -55
  195. package/src/utils/LocalstorageUtils.ts +128 -128
  196. package/src/utils/TableUtils.tsx +18 -18
  197. package/src/utils/auth.ts +32 -38
  198. package/src/utils/checkUtils.ts +39 -39
  199. package/src/utils/enumConfig.ts +16 -16
  200. package/src/utils/getFormMode.js +12 -12
  201. package/src/utils/index.ts +12 -12
  202. package/src/utils/requestUtils.ts +166 -166
  203. package/src/utils/serialize.js +7 -7
  204. package/src/utils/utils.ts +195 -195
  205. package/tsconfig.json +29 -29
  206. package/typings.d.ts +4 -4
  207. package/dist/components/Functional/AccessWrapper/index.d.ts +0 -5
  208. package/dist/components/Functional/AuthButton/index.d.ts +0 -3
  209. package/src/components/Functional/AccessWrapper/index.tsx +0 -34
  210. package/src/components/Functional/AuthButton/index.tsx +0 -15
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ var axios = require('axios');
6
6
  var cookie = require('js-cookie');
7
7
  var antd = require('antd');
8
8
  var _ = require('lodash');
9
- var memoizeOne = require('memoize-one');
10
9
  var umi = require('umi');
11
10
  var isEqual = require('lodash/isEqual');
12
11
  var React$1 = require('react');
@@ -36,7 +35,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
36
35
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
37
36
  var cookie__default = /*#__PURE__*/_interopDefaultLegacy(cookie);
38
37
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
39
- var memoizeOne__default = /*#__PURE__*/_interopDefaultLegacy(memoizeOne);
40
38
  var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
41
39
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
42
40
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment$1);
@@ -48,9 +46,97 @@ var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize);
48
46
  var castArray__default = /*#__PURE__*/_interopDefaultLegacy(castArray);
49
47
  var isArray__default = /*#__PURE__*/_interopDefaultLegacy(isArray$1);
50
48
 
49
+ function _arrayLikeToArray(r, a) {
50
+ (null == a || a > r.length) && (a = r.length);
51
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
52
+ return n;
53
+ }
54
+ function _arrayWithHoles(r) {
55
+ if (Array.isArray(r)) return r;
56
+ }
57
+ function _arrayWithoutHoles(r) {
58
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
59
+ }
60
+ function _assertThisInitialized(e) {
61
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
62
+ return e;
63
+ }
64
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
65
+ try {
66
+ var i = n[a](c),
67
+ u = i.value;
68
+ } catch (n) {
69
+ return void e(n);
70
+ }
71
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
72
+ }
73
+ function _asyncToGenerator(n) {
74
+ return function () {
75
+ var t = this,
76
+ e = arguments;
77
+ return new Promise(function (r, o) {
78
+ var a = n.apply(t, e);
79
+ function _next(n) {
80
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
81
+ }
82
+ function _throw(n) {
83
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
84
+ }
85
+ _next(void 0);
86
+ });
87
+ };
88
+ }
51
89
  function _callSuper(t, o, e) {
52
90
  return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
53
91
  }
92
+ function _classCallCheck(a, n) {
93
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
94
+ }
95
+ function _defineProperties(e, r) {
96
+ for (var t = 0; t < r.length; t++) {
97
+ var o = r[t];
98
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
99
+ }
100
+ }
101
+ function _createClass(e, r, t) {
102
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
103
+ writable: !1
104
+ }), e;
105
+ }
106
+ function _defineProperty(e, r, t) {
107
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
108
+ value: t,
109
+ enumerable: !0,
110
+ configurable: !0,
111
+ writable: !0
112
+ }) : e[r] = t, e;
113
+ }
114
+ function _extends() {
115
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
116
+ for (var e = 1; e < arguments.length; e++) {
117
+ var t = arguments[e];
118
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
119
+ }
120
+ return n;
121
+ }, _extends.apply(null, arguments);
122
+ }
123
+ function _getPrototypeOf(t) {
124
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
125
+ return t.__proto__ || Object.getPrototypeOf(t);
126
+ }, _getPrototypeOf(t);
127
+ }
128
+ function _inherits(t, e) {
129
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
130
+ t.prototype = Object.create(e && e.prototype, {
131
+ constructor: {
132
+ value: t,
133
+ writable: !0,
134
+ configurable: !0
135
+ }
136
+ }), Object.defineProperty(t, "prototype", {
137
+ writable: !1
138
+ }), e && _setPrototypeOf(t, e);
139
+ }
54
140
  function _isNativeReflectConstruct() {
55
141
  try {
56
142
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
@@ -59,6 +145,9 @@ function _isNativeReflectConstruct() {
59
145
  return !!t;
60
146
  })();
61
147
  }
148
+ function _iterableToArray(r) {
149
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
150
+ }
62
151
  function _iterableToArrayLimit(r, l) {
63
152
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
64
153
  if (null != t) {
@@ -86,6 +175,15 @@ function _iterableToArrayLimit(r, l) {
86
175
  return a;
87
176
  }
88
177
  }
178
+ function _nonIterableRest() {
179
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
180
+ }
181
+ function _nonIterableSpread() {
182
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
183
+ }
184
+ function _objectDestructuringEmpty(t) {
185
+ if (null == t) throw new TypeError("Cannot destructure " + t);
186
+ }
89
187
  function ownKeys(e, r) {
90
188
  var t = Object.keys(e);
91
189
  if (Object.getOwnPropertySymbols) {
@@ -107,6 +205,31 @@ function _objectSpread2(e) {
107
205
  }
108
206
  return e;
109
207
  }
208
+ function _objectWithoutProperties(e, t) {
209
+ if (null == e) return {};
210
+ var o,
211
+ r,
212
+ i = _objectWithoutPropertiesLoose(e, t);
213
+ if (Object.getOwnPropertySymbols) {
214
+ var n = Object.getOwnPropertySymbols(e);
215
+ for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
216
+ }
217
+ return i;
218
+ }
219
+ function _objectWithoutPropertiesLoose(r, e) {
220
+ if (null == r) return {};
221
+ var t = {};
222
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
223
+ if (e.indexOf(n) >= 0) continue;
224
+ t[n] = r[n];
225
+ }
226
+ return t;
227
+ }
228
+ function _possibleConstructorReturn(t, e) {
229
+ if (e && ("object" == typeof e || "function" == typeof e)) return e;
230
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
231
+ return _assertThisInitialized(t);
232
+ }
110
233
  function _regeneratorRuntime() {
111
234
  _regeneratorRuntime = function () {
112
235
  return e;
@@ -408,6 +531,20 @@ function _regeneratorRuntime() {
408
531
  }
409
532
  }, e;
410
533
  }
534
+ function _setPrototypeOf(t, e) {
535
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
536
+ return t.__proto__ = e, t;
537
+ }, _setPrototypeOf(t, e);
538
+ }
539
+ function _slicedToArray(r, e) {
540
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
541
+ }
542
+ function _toArray(r) {
543
+ return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
544
+ }
545
+ function _toConsumableArray(r) {
546
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
547
+ }
411
548
  function _toPrimitive(t, r) {
412
549
  if ("object" != typeof t || !t) return t;
413
550
  var e = t[Symbol.toPrimitive];
@@ -431,194 +568,12 @@ function _typeof(o) {
431
568
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
432
569
  }, _typeof(o);
433
570
  }
434
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
435
- try {
436
- var info = gen[key](arg);
437
- var value = info.value;
438
- } catch (error) {
439
- reject(error);
440
- return;
441
- }
442
- if (info.done) {
443
- resolve(value);
444
- } else {
445
- Promise.resolve(value).then(_next, _throw);
446
- }
447
- }
448
- function _asyncToGenerator(fn) {
449
- return function () {
450
- var self = this,
451
- args = arguments;
452
- return new Promise(function (resolve, reject) {
453
- var gen = fn.apply(self, args);
454
- function _next(value) {
455
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
456
- }
457
- function _throw(err) {
458
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
459
- }
460
- _next(undefined);
461
- });
462
- };
463
- }
464
- function _classCallCheck(instance, Constructor) {
465
- if (!(instance instanceof Constructor)) {
466
- throw new TypeError("Cannot call a class as a function");
467
- }
468
- }
469
- function _defineProperties(target, props) {
470
- for (var i = 0; i < props.length; i++) {
471
- var descriptor = props[i];
472
- descriptor.enumerable = descriptor.enumerable || false;
473
- descriptor.configurable = true;
474
- if ("value" in descriptor) descriptor.writable = true;
475
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
476
- }
477
- }
478
- function _createClass(Constructor, protoProps, staticProps) {
479
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
480
- if (staticProps) _defineProperties(Constructor, staticProps);
481
- Object.defineProperty(Constructor, "prototype", {
482
- writable: false
483
- });
484
- return Constructor;
485
- }
486
- function _defineProperty(obj, key, value) {
487
- key = _toPropertyKey(key);
488
- if (key in obj) {
489
- Object.defineProperty(obj, key, {
490
- value: value,
491
- enumerable: true,
492
- configurable: true,
493
- writable: true
494
- });
495
- } else {
496
- obj[key] = value;
497
- }
498
- return obj;
499
- }
500
- function _extends() {
501
- _extends = Object.assign ? Object.assign.bind() : function (target) {
502
- for (var i = 1; i < arguments.length; i++) {
503
- var source = arguments[i];
504
- for (var key in source) {
505
- if (Object.prototype.hasOwnProperty.call(source, key)) {
506
- target[key] = source[key];
507
- }
508
- }
509
- }
510
- return target;
511
- };
512
- return _extends.apply(this, arguments);
513
- }
514
- function _inherits(subClass, superClass) {
515
- if (typeof superClass !== "function" && superClass !== null) {
516
- throw new TypeError("Super expression must either be null or a function");
517
- }
518
- subClass.prototype = Object.create(superClass && superClass.prototype, {
519
- constructor: {
520
- value: subClass,
521
- writable: true,
522
- configurable: true
523
- }
524
- });
525
- Object.defineProperty(subClass, "prototype", {
526
- writable: false
527
- });
528
- if (superClass) _setPrototypeOf(subClass, superClass);
529
- }
530
- function _getPrototypeOf(o) {
531
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
532
- return o.__proto__ || Object.getPrototypeOf(o);
533
- };
534
- return _getPrototypeOf(o);
535
- }
536
- function _setPrototypeOf(o, p) {
537
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
538
- o.__proto__ = p;
539
- return o;
540
- };
541
- return _setPrototypeOf(o, p);
542
- }
543
- function _objectDestructuringEmpty(obj) {
544
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
545
- }
546
- function _objectWithoutPropertiesLoose(source, excluded) {
547
- if (source == null) return {};
548
- var target = {};
549
- for (var key in source) {
550
- if (Object.prototype.hasOwnProperty.call(source, key)) {
551
- if (excluded.indexOf(key) >= 0) continue;
552
- target[key] = source[key];
553
- }
554
- }
555
- return target;
556
- }
557
- function _objectWithoutProperties(source, excluded) {
558
- if (source == null) return {};
559
- var target = _objectWithoutPropertiesLoose(source, excluded);
560
- var key, i;
561
- if (Object.getOwnPropertySymbols) {
562
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
563
- for (i = 0; i < sourceSymbolKeys.length; i++) {
564
- key = sourceSymbolKeys[i];
565
- if (excluded.indexOf(key) >= 0) continue;
566
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
567
- target[key] = source[key];
568
- }
569
- }
570
- return target;
571
- }
572
- function _assertThisInitialized(self) {
573
- if (self === void 0) {
574
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
575
- }
576
- return self;
577
- }
578
- function _possibleConstructorReturn(self, call) {
579
- if (call && (typeof call === "object" || typeof call === "function")) {
580
- return call;
581
- } else if (call !== void 0) {
582
- throw new TypeError("Derived constructors may only return object or undefined");
571
+ function _unsupportedIterableToArray(r, a) {
572
+ if (r) {
573
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
574
+ var t = {}.toString.call(r).slice(8, -1);
575
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
583
576
  }
584
- return _assertThisInitialized(self);
585
- }
586
- function _slicedToArray(arr, i) {
587
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
588
- }
589
- function _toArray(arr) {
590
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
591
- }
592
- function _toConsumableArray(arr) {
593
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
594
- }
595
- function _arrayWithoutHoles(arr) {
596
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
597
- }
598
- function _arrayWithHoles(arr) {
599
- if (Array.isArray(arr)) return arr;
600
- }
601
- function _iterableToArray(iter) {
602
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
603
- }
604
- function _unsupportedIterableToArray(o, minLen) {
605
- if (!o) return;
606
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
607
- var n = Object.prototype.toString.call(o).slice(8, -1);
608
- if (n === "Object" && o.constructor) n = o.constructor.name;
609
- if (n === "Map" || n === "Set") return Array.from(o);
610
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
611
- }
612
- function _arrayLikeToArray(arr, len) {
613
- if (len == null || len > arr.length) len = arr.length;
614
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
615
- return arr2;
616
- }
617
- function _nonIterableSpread() {
618
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
619
- }
620
- function _nonIterableRest() {
621
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
622
577
  }
623
578
 
624
579
  var ENUM = {
@@ -990,6 +945,43 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
990
945
  return '';
991
946
  };
992
947
 
948
+ var simpleIsEqual = function simpleIsEqual(a, b) {
949
+ return a === b;
950
+ };
951
+
952
+ function index$1 (resultFn, isEqual) {
953
+ if (isEqual === void 0) {
954
+ isEqual = simpleIsEqual;
955
+ }
956
+
957
+ var lastThis;
958
+ var lastArgs = [];
959
+ var lastResult;
960
+ var calledOnce = false;
961
+
962
+ var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
963
+ return isEqual(newArg, lastArgs[index], index);
964
+ };
965
+
966
+ var result = function result() {
967
+ for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
968
+ newArgs[_key] = arguments[_key];
969
+ }
970
+
971
+ if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
972
+ return lastResult;
973
+ }
974
+
975
+ lastResult = resultFn.apply(this, newArgs);
976
+ calledOnce = true;
977
+ lastThis = this;
978
+ lastArgs = newArgs;
979
+ return lastResult;
980
+ };
981
+
982
+ return result;
983
+ }
984
+
993
985
  function styleInject(css, ref) {
994
986
  if ( ref === void 0 ) ref = {};
995
987
  var insertAt = ref.insertAt;
@@ -1313,7 +1305,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
1313
1305
  return item;
1314
1306
  });
1315
1307
  };
1316
- var memoizeOneFormatter = memoizeOne__default['default'](formatter, isEqual__default['default']);
1308
+ var memoizeOneFormatter = index$1(formatter, isEqual__default['default']);
1317
1309
  var go2BackAndClose = function go2BackAndClose(backHistoryPath) {
1318
1310
  localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
1319
1311
  if (backHistoryPath) {
@@ -1474,7 +1466,7 @@ var judgeIsEmpty = function judgeIsEmpty(value) {
1474
1466
  // 判断某个按钮/菜单 是否有权限,返回布尔值
1475
1467
  var authFunc = function authFunc(code) {
1476
1468
  var _JSON$parse;
1477
- return !shouldUseAuth() ? true : (_JSON$parse = JSON.parse(localStorage.getItem(getMenuAuthDataKey()) || '[]')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.find(function (d) {
1469
+ return (_JSON$parse = JSON.parse(localStorage.getItem(getMenuAuthDataKey()) || '[]')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.find(function (d) {
1478
1470
  return d === code;
1479
1471
  });
1480
1472
  };
@@ -1500,11 +1492,6 @@ var handleJudgeAuthButtons = function handleJudgeAuthButtons(buttonCodeArray) {
1500
1492
  });
1501
1493
  return result;
1502
1494
  };
1503
- // 判断何时菜单权限和表格权限生效
1504
- var shouldUseAuth = function shouldUseAuth() {
1505
- // @ts-ignore
1506
- return window.__POWERED_BY_WUJIE__ ? true : false;
1507
- };
1508
1495
 
1509
1496
  var css_248z$1 = ".luckysheet {\n overflow: hidden;\n}\n.luckysheet .luckysheet-work-area.luckysheet-noselected-text {\n display: none;\n}\n.sheet_table_top {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_top .menu_item_text {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.sheet_table_footer {\n height: 50px;\n background: #f2f2f2;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border: 1px solid #d8d8d8;\n}\n.sheet_table_text {\n color: #8f8f8f;\n}\n.sheet_table_dnd_text {\n background: #f2f2f2;\n border: 1px solid #d8d8d8;\n display: inline-block;\n width: 100px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n";
1510
1497
  styleInject(css_248z$1);
@@ -1553,21 +1540,8 @@ var filterLetters = function filterLetters(i) {
1553
1540
  return undefined;
1554
1541
  }
1555
1542
  };
1556
- // 抽象出创建对象的共通逻辑
1557
- function createItem(idPrefix, index, title, name, format) {
1558
- return {
1559
- id: "".concat(idPrefix).concat(index),
1560
- content: title,
1561
- code: name,
1562
- "ct": format //单元格值格式
1563
- };
1564
- }
1565
- // 定义[单元格值]常量以避免魔术字符串
1566
- var FORMAT_NAME_GENERAL = "General"; //格式名称为自动格式
1567
- var FORMAT_TYPE_STRING = "s"; //格式类型为数字类型
1568
1543
  var DataValidation = /*#__PURE__*/function (_React$Component) {
1569
1544
  function DataValidation(props) {
1570
- var _props$customerColumn;
1571
1545
  var _this;
1572
1546
  _classCallCheck(this, DataValidation);
1573
1547
  _this = _callSuper(this, DataValidation, [props]);
@@ -1582,7 +1556,6 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1582
1556
  };
1583
1557
  _this.setConfig = function (data) {
1584
1558
  var items = _this.state.items;
1585
- var notValid = _this.props.notValid;
1586
1559
  return {
1587
1560
  container: 'luckysheet',
1588
1561
  showtoolbar: false,
@@ -1591,7 +1564,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1591
1564
  if (columnAbc.name) {
1592
1565
  var charCode = columnAbc.name.charCodeAt();
1593
1566
  if (charCode - 65 <= items.length) {
1594
- columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : !notValid ? '校验结果' : '';
1567
+ columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : '校验结果';
1595
1568
  } else {
1596
1569
  columnAbc.name = '';
1597
1570
  }
@@ -1944,7 +1917,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1944
1917
  onClick: function onClick() {
1945
1918
  return _this.filterData('all');
1946
1919
  }
1947
- }, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Divider, null), !_this.props.notValid && /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, {
1920
+ }, "\u6E05\u7A7A\u5168\u90E8\u6570\u636E")), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Divider, null), /*#__PURE__*/React__default['default'].createElement(antd.Menu.Item, {
1948
1921
  key: "2",
1949
1922
  className: "sheet_table-menu_item_text"
1950
1923
  }, /*#__PURE__*/React__default['default'].createElement("a", {
@@ -1987,22 +1960,18 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
1987
1960
  }), provided.placeholder);
1988
1961
  }))));
1989
1962
  _this.props.onRef(_this);
1990
- var format = {
1991
- fa: FORMAT_NAME_GENERAL,
1992
- t: FORMAT_TYPE_STRING
1993
- };
1994
- if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
1995
- var _props$customerColumn2;
1996
- itemsTemp = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
1997
- return createItem('item-0', index, item.title, item.name, format);
1998
- })) || [];
1999
- } else {
2000
- var _props$columns;
2001
- itemsTemp = (props === null || props === void 0 ? void 0 : (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (item, index) {
2002
- if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
2003
- return createItem('item-0', index, mapping.get(item), item, format);
2004
- })) || [];
2005
- }
1963
+ itemsTemp = props.columns.map(function (item, index) {
1964
+ if (!mapping.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
1965
+ return {
1966
+ id: "item-0".concat(index),
1967
+ content: mapping.get(item),
1968
+ code: item,
1969
+ "ct": {
1970
+ "fa": "General",
1971
+ "t": "s" //格式类型为数字类型
1972
+ }
1973
+ };
1974
+ });
2006
1975
  luckysheet = window.luckysheet || window.top.luckysheet;
2007
1976
  _this.state = {
2008
1977
  showErrorData: false,
@@ -2043,9 +2012,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2043
2012
  key: "render",
2044
2013
  value: function render() {
2045
2014
  var errorListCheck = this.state.errorListCheck;
2046
- var _this$props2 = this.props,
2047
- title = _this$props2.title,
2048
- notValid = _this$props2.notValid;
2015
+ var title = this.props.title;
2049
2016
  var totalSummary = this.getCount();
2050
2017
  var luckyCss = {
2051
2018
  margin: '0px',
@@ -2068,7 +2035,7 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2068
2035
  trigger: ['click'],
2069
2036
  overlay: this.menuList,
2070
2037
  placement: "bottomRight"
2071
- }, /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u6E05\u7A7A", /*#__PURE__*/React__default['default'].createElement(icons.DownOutlined, null))), !notValid && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
2038
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u6E05\u7A7A", /*#__PURE__*/React__default['default'].createElement(icons.DownOutlined, null))), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
2072
2039
  type: "primary",
2073
2040
  onClick: this.resetData
2074
2041
  }, "\u8BC6\u522B"))), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -2079,11 +2046,11 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2079
2046
  }, /*#__PURE__*/React__default['default'].createElement("div", {
2080
2047
  id: "luckysheet",
2081
2048
  style: luckyCss
2082
- })), !this.props.notValid && /*#__PURE__*/React__default['default'].createElement("div", {
2049
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
2083
2050
  className: "sheet_table_footer"
2084
2051
  }, /*#__PURE__*/React__default['default'].createElement("span", {
2085
2052
  className: "sheet_table_footer_l"
2086
- }, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E", !notValid && ", \u5176\u4E2D\u9519\u8BEF ".concat(totalSummary.error, " \u9879")), !notValid && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
2053
+ }, "\u5171 ", totalSummary.total, " \u6761\u6570\u636E, \u5176\u4E2D\u9519\u8BEF ", totalSummary.error, " \u9879"), /*#__PURE__*/React__default['default'].createElement(antd.Space, {
2087
2054
  className: "sheet_table_footer_r"
2088
2055
  }, /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
2089
2056
  checked: errorListCheck,
@@ -2140,21 +2107,8 @@ var filterLetters$1 = function filterLetters(i) {
2140
2107
  return undefined;
2141
2108
  }
2142
2109
  };
2143
- // 抽象出创建对象的共通逻辑
2144
- function createItem$1(idPrefix, index, title, name, format) {
2145
- return {
2146
- id: "".concat(idPrefix).concat(index),
2147
- content: title,
2148
- code: name,
2149
- "ct": format //单元格值格式
2150
- };
2151
- }
2152
- // 定义[单元格值]常量以避免魔术字符串
2153
- var FORMAT_NAME_GENERAL$1 = "General"; //格式名称为自动格式
2154
- var FORMAT_TYPE_STRING$1 = "s"; //格式类型为数字类型
2155
2110
  var DataImport = /*#__PURE__*/function (_React$Component) {
2156
2111
  function DataImport(props) {
2157
- var _props$customerColumn;
2158
2112
  var _this;
2159
2113
  _classCallCheck(this, DataImport);
2160
2114
  _this = _callSuper(this, DataImport, [props]);
@@ -2396,32 +2350,22 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
2396
2350
  });
2397
2351
  return obj;
2398
2352
  });
2399
- return data;
2353
+ return data.filter(function (item) {
2354
+ return item[_this.props.customerColumnsMapping[0].name];
2355
+ });
2400
2356
  };
2401
2357
  _this.resetData = function () {
2402
2358
  var _this$props = _this.props,
2403
2359
  validDataUrl = _this$props.validDataUrl,
2404
- validDataParams = _this$props.validDataParams,
2405
2360
  updateData = _this$props.updateData,
2406
- columns = _this$props.columns,
2407
- isBrandAuth = _this$props.isBrandAuth,
2408
- _this$props$isCheckSt = _this$props.isCheckStockNum,
2409
- isCheckStockNum = _this$props$isCheckSt === void 0 ? true : _this$props$isCheckSt;
2361
+ columns = _this$props.columns;
2410
2362
  var resultData = _this.getData().filter(function (d) {
2411
2363
  return ___default['default'].compact(Object.values(d)).length;
2412
2364
  });
2413
- // 处理业务参数
2414
- var otherParams = {};
2415
- if (isBrandAuth) {
2416
- otherParams = {
2417
- brandAuth: 'ctl-withAuth'
2418
- };
2419
- }
2420
- axios__default['default'].post(validDataUrl, _objectSpread2(_objectSpread2(_objectSpread2({}, otherParams), validDataParams), {}, {
2365
+ axios__default['default'].post(validDataUrl, {
2421
2366
  columns: columns,
2422
- data: resultData,
2423
- checkStockNum: isCheckStockNum
2424
- })).then(function (result) {
2367
+ data: resultData
2368
+ }).then(function (result) {
2425
2369
  result = result.data;
2426
2370
  if (judgeIsRequestError(result)) {
2427
2371
  antd.message.error(result.msg);
@@ -2574,21 +2518,31 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
2574
2518
  }), provided.placeholder);
2575
2519
  }))));
2576
2520
  _this.props.onRef(_this);
2577
- var format = {
2578
- fa: FORMAT_NAME_GENERAL$1,
2579
- t: FORMAT_TYPE_STRING$1
2580
- };
2581
- if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
2582
- var _props$customerColumn2;
2583
- itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
2584
- return createItem$1('item-0', index, item.title, item.name, format);
2585
- })) || [];
2521
+ if (props.customerColumnsMapping) {
2522
+ itemsTemp$1 = props.customerColumnsMapping.map(function (item, index) {
2523
+ return {
2524
+ id: "item-0".concat(index),
2525
+ content: item.title,
2526
+ code: item.name,
2527
+ "ct": {
2528
+ "fa": "General",
2529
+ "t": "s" //格式类型为数字类型
2530
+ }
2531
+ };
2532
+ });
2586
2533
  } else {
2587
- var _props$columns;
2588
- itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.map(function (item, index) {
2589
- if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataValidation component, please fix this error"));
2590
- return createItem$1('item-0', index, mapping$1.get(item), item, format);
2591
- })) || [];
2534
+ itemsTemp$1 = props.columns.map(function (item, index) {
2535
+ if (!mapping$1.get(item)) throw Error("".concat(item, " is not in DataImport component, please fix this error"));
2536
+ return {
2537
+ id: "item-0".concat(index),
2538
+ content: mapping$1.get(item),
2539
+ code: item,
2540
+ "ct": {
2541
+ "fa": "General",
2542
+ "t": "s" //格式类型为数字类型
2543
+ }
2544
+ };
2545
+ });
2592
2546
  }
2593
2547
  luckysheet$1 = window.luckysheet || window.top.luckysheet;
2594
2548
  _this.state = {
@@ -2632,7 +2586,8 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
2632
2586
  var errorListCheck = this.state.errorListCheck;
2633
2587
  var _this$props2 = this.props,
2634
2588
  title = _this$props2.title,
2635
- notValid = _this$props2.notValid;
2589
+ notValid = _this$props2.notValid,
2590
+ customerColumnsMapping = _this$props2.customerColumnsMapping;
2636
2591
  var totalSummary = this.getCount();
2637
2592
  var luckyCss = {
2638
2593
  margin: '0px',
@@ -2845,7 +2800,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
2845
2800
  specialBracket = _ref$specialBracket === void 0 ? false : _ref$specialBracket,
2846
2801
  _ref$noNeedSplit = _ref.noNeedSplit,
2847
2802
  noNeedSplit = _ref$noNeedSplit === void 0 ? false : _ref$noNeedSplit;
2848
- var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || (ctx === null || ctx === void 0 ? void 0 : ctx.name) || 'supplierCode');
2803
+ var resultSourceKey = handleSourceName(sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode');
2849
2804
  var selectMode = selectProps === null || selectProps === void 0 ? void 0 : selectProps.mode; // 设定当前选择器 为单选或者多选模式 无设定为单选模式(默认)
2850
2805
  var initVal = value || (selectMode ? [] : null);
2851
2806
  var pageSize = 100; // 下拉框默认分页 条数
@@ -3446,8 +3401,9 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
3446
3401
  if (heightTxt === '') {
3447
3402
  return text;
3448
3403
  }
3404
+ var searchString = _.escapeRegExp(heightTxt);
3449
3405
  // 前面filterOption 不区分大小写,这里用i
3450
- var regexp = new RegExp(heightTxt, 'gi');
3406
+ var regexp = new RegExp(searchString, 'gi');
3451
3407
  return text.replace(regexp, "<span style=\"color:red\">".concat(heightTxt, "</span>"));
3452
3408
  };
3453
3409
  return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
@@ -4509,7 +4465,7 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
4509
4465
  var _item$dataSource;
4510
4466
  var result = [];
4511
4467
  if (item === null || item === void 0 ? void 0 : item.dataSourceCode) {
4512
- result = (record === null || record === void 0 ? void 0 : record[item === null || item === void 0 ? void 0 : item.dataSourceCode]) || [];
4468
+ result = record === null || record === void 0 ? void 0 : record[item === null || item === void 0 ? void 0 : item.dataSourceCode];
4513
4469
  }
4514
4470
  if (item === null || item === void 0 ? void 0 : (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.length) {
4515
4471
  result = (item === null || item === void 0 ? void 0 : item.filterDataSourceCode) ? item.dataSource.filter(function (i) {
@@ -4623,11 +4579,12 @@ var ResizeableTitle = function ResizeableTitle(props) {
4623
4579
  var initTableCode = {
4624
4580
  'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
4625
4581
  'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
4626
- 'spu': ['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']
4582
+ 'spu': [['spuSelect-tableOptionsToChoosePartCode', 'spuSelect-tableSelectedItemPartCode']]
4627
4583
  };
4628
4584
  var Option$2 = antd.Select.Option;
4629
4585
  var AddSelect = function AddSelect(props) {
4630
4586
  var value = props.value,
4587
+ onChange = props.onChange,
4631
4588
  _props$selectProps = props.selectProps,
4632
4589
  selectProps = _props$selectProps === void 0 ? {} : _props$selectProps,
4633
4590
  _props$modalTableProp = props.modalTableProps,
@@ -4635,7 +4592,11 @@ var AddSelect = function AddSelect(props) {
4635
4592
  _props$labelInValue = props.labelInValue,
4636
4593
  labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
4637
4594
  requestConfig = props.requestConfig,
4595
+ ctx = props.ctx,
4638
4596
  sourceName = props.sourceName,
4597
+ _props$needModalTable = props.needModalTable,
4598
+ needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
4599
+ _props$getPopupContai = props.getPopupContainer,
4639
4600
  onSaveCallback = props.onSaveCallback,
4640
4601
  _props$buttonText = props.buttonText,
4641
4602
  buttonText = _props$buttonText === void 0 ? '添加' : _props$buttonText,
@@ -4652,8 +4613,15 @@ var AddSelect = function AddSelect(props) {
4652
4613
  url = _ref.url,
4653
4614
  otherParams = _ref.otherParams,
4654
4615
  isMap = _ref.isMap,
4616
+ fixedparameter = _ref.fixedparameter,
4617
+ fieldValToParam = _ref.fieldValToParam,
4618
+ _ref$mappingTextField = _ref.mappingTextField,
4619
+ mappingTextField = _ref$mappingTextField === void 0 ? 'name' : _ref$mappingTextField,
4620
+ mappingTextShowKeyField = _ref.mappingTextShowKeyField,
4655
4621
  _ref$mappingValueFiel = _ref.mappingValueField,
4656
- mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel;
4622
+ mappingValueField = _ref$mappingValueFiel === void 0 ? 'code' : _ref$mappingValueFiel,
4623
+ mappingTextShowTextField = _ref.mappingTextShowTextField;
4624
+ var resultSourceKey = sourceName || (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.sourceName) || 'supplierCode';
4657
4625
  var realButtonProps = _objectSpread2({
4658
4626
  type: "primary"
4659
4627
  }, buttonProps);
@@ -4663,82 +4631,138 @@ var AddSelect = function AddSelect(props) {
4663
4631
  var pageSize = 100; // 下拉框默认分页 条数
4664
4632
  var tableInitPageSize = 10; // 弹框默认分页 条数
4665
4633
  var currentPage = 1;
4666
- var _useState = React$1.useState(false),
4634
+ var selectParamsKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filter) || 'qp-codeAndName-like';
4635
+ var selectParamsInitKey = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.filterInit) || selectParamsKey;
4636
+ var currentSelectProps = _objectSpread2(_objectSpread2({}, selectProps), {}, {
4637
+ // 以下属性不可更改----设计配置项
4638
+ showSearch: false,
4639
+ filterOption: false,
4640
+ allowClear: true,
4641
+ listHeight: 160,
4642
+ optionLabelProp: "label",
4643
+ autoClearSearchValue: false
4644
+ });
4645
+ var _useState = React$1.useState([]),
4667
4646
  _useState2 = _slicedToArray(_useState, 2),
4668
- fetching = _useState2[0],
4669
- setFetching = _useState2[1];
4670
- var _useState3 = React$1.useState(false),
4647
+ items = _useState2[0],
4648
+ setItems = _useState2[1];
4649
+ var _useState3 = React$1.useState(1),
4671
4650
  _useState4 = _slicedToArray(_useState3, 2),
4672
- isModalVisible = _useState4[0],
4673
- setIsModalVisible = _useState4[1];
4674
- var _useState5 = React$1.useState(initVal),
4651
+ scrollPage = _useState4[0],
4652
+ setScrollPage = _useState4[1];
4653
+ var _useState5 = React$1.useState(0),
4675
4654
  _useState6 = _slicedToArray(_useState5, 2),
4676
- popvalue = _useState6[0],
4677
- setPopValue = _useState6[1];
4678
- var _useState7 = React$1.useState(sourceName),
4655
+ itemsTotal = _useState6[0],
4656
+ setItemsTotal = _useState6[1];
4657
+ var _useState7 = React$1.useState(false),
4679
4658
  _useState8 = _slicedToArray(_useState7, 2),
4680
- uniqueValue = _useState8[0],
4681
- setUniqueValue = _useState8[1];
4682
- var _Form$useForm = antd.Form.useForm(),
4683
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
4684
- form = _Form$useForm2[0];
4685
- var _useState9 = React$1.useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
4659
+ fetching = _useState8[0],
4660
+ setFetching = _useState8[1];
4661
+ var _useState9 = React$1.useState(''),
4686
4662
  _useState10 = _slicedToArray(_useState9, 2),
4687
- tableSearchForm = _useState10[0],
4688
- setTableSearchForm = _useState10[1];
4689
- var _useState11 = React$1.useState(true),
4663
+ searchValue = _useState10[0],
4664
+ setSearchValue = _useState10[1];
4665
+ var _useState11 = React$1.useState(false),
4690
4666
  _useState12 = _slicedToArray(_useState11, 2),
4691
- caretLeftFlag = _useState12[0],
4692
- setCaretLeftFlag = _useState12[1];
4693
- var _useState13 = React$1.useState([]),
4667
+ isModalVisible = _useState12[0],
4668
+ setIsModalVisible = _useState12[1];
4669
+ var _useState13 = React$1.useState(initVal),
4694
4670
  _useState14 = _slicedToArray(_useState13, 2),
4695
- tableData = _useState14[0],
4696
- setTableData = _useState14[1];
4697
- var _useState15 = React$1.useState({
4671
+ popvalue = _useState14[0],
4672
+ setPopValue = _useState14[1];
4673
+ var _useState15 = React$1.useState(sourceName),
4674
+ _useState16 = _slicedToArray(_useState15, 2),
4675
+ uniqueValue = _useState16[0],
4676
+ setUniqueValue = _useState16[1];
4677
+ var _useDebounceFn = ahooks.useDebounceFn(function (v) {
4678
+ // 优化搜索参数 支持传多个
4679
+ var searchParams = {};
4680
+ if (typeof selectParamsKey === 'string') {
4681
+ searchParams = v ? _defineProperty({}, selectParamsInitKey, initVal) : _defineProperty({}, selectParamsKey, searchValue);
4682
+ }
4683
+ if (Array.isArray(selectParamsKey)) {
4684
+ selectParamsKey.forEach(function (i) {
4685
+ searchParams = _objectSpread2(_objectSpread2({}, searchParams), {}, _defineProperty({}, i, searchValue));
4686
+ });
4687
+ }
4688
+ // 防抖函数 待定
4689
+ getData(searchParams);
4690
+ }, {
4691
+ wait: 1000
4692
+ }),
4693
+ run = _useDebounceFn.run;
4694
+ var _Form$useForm = antd.Form.useForm(),
4695
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
4696
+ form = _Form$useForm2[0];
4697
+ var _useState17 = React$1.useState(modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.tableSearchForm),
4698
+ _useState18 = _slicedToArray(_useState17, 2),
4699
+ tableSearchForm = _useState18[0],
4700
+ setTableSearchForm = _useState18[1];
4701
+ var _useState19 = React$1.useState(true),
4702
+ _useState20 = _slicedToArray(_useState19, 2),
4703
+ caretLeftFlag = _useState20[0],
4704
+ setCaretLeftFlag = _useState20[1];
4705
+ var _useState21 = React$1.useState([]),
4706
+ _useState22 = _slicedToArray(_useState21, 2),
4707
+ tableData = _useState22[0],
4708
+ setTableData = _useState22[1];
4709
+ var _useState23 = React$1.useState({
4698
4710
  total: 0,
4699
4711
  size: "small",
4700
4712
  current: 1,
4701
4713
  pageSize: tableInitPageSize
4702
4714
  }),
4703
- _useState16 = _slicedToArray(_useState15, 2),
4704
- tablePagination = _useState16[0],
4705
- setTablePagination = _useState16[1];
4706
- var _useState17 = React$1.useState([]),
4707
- _useState18 = _slicedToArray(_useState17, 2),
4708
- selectedRowKeys = _useState18[0],
4709
- setSelectedRowKeys = _useState18[1];
4710
- var _useState19 = React$1.useState({}),
4711
- _useState20 = _slicedToArray(_useState19, 2),
4712
- tableFormParams = _useState20[0],
4713
- setTableFormParams = _useState20[1];
4714
- var _useState21 = React$1.useState(false),
4715
- _useState22 = _slicedToArray(_useState21, 2),
4716
- confirmLoading = _useState22[0],
4717
- setConfirmLoading = _useState22[1];
4718
- var _useState23 = React$1.useState(false),
4719
4715
  _useState24 = _slicedToArray(_useState23, 2),
4720
- confirmContinueLoading = _useState24[0],
4721
- setConfirmContinueLoading = _useState24[1];
4716
+ tablePagination = _useState24[0],
4717
+ setTablePagination = _useState24[1];
4722
4718
  var _useState25 = React$1.useState([]),
4723
4719
  _useState26 = _slicedToArray(_useState25, 2),
4724
- selectColumns = _useState26[0],
4725
- setSelectColumns = _useState26[1];
4720
+ selectedRowKeys = _useState26[0],
4721
+ setSelectedRowKeys = _useState26[1];
4726
4722
  var _useState27 = React$1.useState([]),
4727
4723
  _useState28 = _slicedToArray(_useState27, 2),
4728
- showColumns = _useState28[0],
4729
- setShowColumns = _useState28[1];
4730
- var _useState29 = React$1.useState([]),
4724
+ doubleArr = _useState28[0],
4725
+ setDoubleArr = _useState28[1]; // 存放双数组的数组
4726
+ var _useState29 = React$1.useState(false),
4731
4727
  _useState30 = _slicedToArray(_useState29, 2),
4732
- tableColumns = _useState30[0],
4733
- setTableColumns = _useState30[1];
4734
- var _useState31 = React$1.useState([]),
4728
+ checkedAll = _useState30[0],
4729
+ setCheckedAll = _useState30[1];
4730
+ var _useState31 = React$1.useState(false),
4735
4731
  _useState32 = _slicedToArray(_useState31, 2),
4736
- showToChooseColumns = _useState32[0],
4737
- setShowToChooseColumns = _useState32[1];
4732
+ indeterminate = _useState32[0],
4733
+ setIndeterminate = _useState32[1];
4734
+ var _useState33 = React$1.useState({}),
4735
+ _useState34 = _slicedToArray(_useState33, 2),
4736
+ tableFormParams = _useState34[0],
4737
+ setTableFormParams = _useState34[1];
4738
+ var _useState35 = React$1.useState(false),
4739
+ _useState36 = _slicedToArray(_useState35, 2),
4740
+ confirmLoading = _useState36[0],
4741
+ setConfirmLoading = _useState36[1];
4742
+ var _useState37 = React$1.useState(false),
4743
+ _useState38 = _slicedToArray(_useState37, 2),
4744
+ confirmContinueLoading = _useState38[0],
4745
+ setConfirmContinueLoading = _useState38[1];
4746
+ var _useState39 = React$1.useState([]),
4747
+ _useState40 = _slicedToArray(_useState39, 2),
4748
+ selectColumns = _useState40[0],
4749
+ setSelectColumns = _useState40[1];
4750
+ var _useState41 = React$1.useState([]),
4751
+ _useState42 = _slicedToArray(_useState41, 2),
4752
+ showColumns = _useState42[0],
4753
+ setShowColumns = _useState42[1];
4754
+ var _useState43 = React$1.useState([]),
4755
+ _useState44 = _slicedToArray(_useState43, 2),
4756
+ tableColumns = _useState44[0],
4757
+ setTableColumns = _useState44[1];
4758
+ var _useState45 = React$1.useState([]),
4759
+ _useState46 = _slicedToArray(_useState45, 2),
4760
+ showToChooseColumns = _useState46[0],
4761
+ setShowToChooseColumns = _useState46[1];
4738
4762
  var codeToChoose = tableCodeList[0] || initTableCode[businessType][0];
4739
4763
  var codeSelected = tableCodeList[1] || initTableCode[businessType][1];
4740
4764
  var checkSelectChange = /*#__PURE__*/function () {
4741
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
4765
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(bType, tList, recordKey, recordItem, selectItem, changeValue) {
4742
4766
  var result;
4743
4767
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4744
4768
  while (1) switch (_context.prev = _context.next) {
@@ -4813,7 +4837,7 @@ var AddSelect = function AddSelect(props) {
4813
4837
  }, _callee, null, [[15, 22]]);
4814
4838
  }));
4815
4839
  return function checkSelectChange(_x, _x2, _x3, _x4, _x5, _x6) {
4816
- return _ref2.apply(this, arguments);
4840
+ return _ref4.apply(this, arguments);
4817
4841
  };
4818
4842
  }();
4819
4843
  var setBusinessDefaultValue = function setBusinessDefaultValue(list, recordList) {
@@ -4879,7 +4903,7 @@ var AddSelect = function AddSelect(props) {
4879
4903
  // precision: unitAccuracy
4880
4904
  };
4881
4905
  }
4882
- return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2(_objectSpread2({}, item.inputProps), {}, {
4906
+ return /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({
4883
4907
  value: text || '',
4884
4908
  min: 0,
4885
4909
  autoFocus: record.needFocus,
@@ -4887,7 +4911,13 @@ var AddSelect = function AddSelect(props) {
4887
4911
  }, precisionObj), {}, {
4888
4912
  onChange: function onChange(value) {
4889
4913
  record[item.dataIndex] = value;
4890
- editRecord(record);
4914
+ var newPopValue = popvalue.map(function (i, innerIndex) {
4915
+ if (innerIndex == index) {
4916
+ i[item.dataIndex] = record[item.dataIndex];
4917
+ }
4918
+ return i;
4919
+ });
4920
+ setPopValue(newPopValue);
4891
4921
  },
4892
4922
  // onFocus={(e)=> {
4893
4923
  // let dom1 = e.currentTarget;
@@ -4986,90 +5016,35 @@ var AddSelect = function AddSelect(props) {
4986
5016
  var selectKey = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi = item.dataSourceMapping) === null || _item$dataSourceMappi === void 0 ? void 0 : _item$dataSourceMappi[0]) || 'code';
4987
5017
  var selectText = (item === null || item === void 0 ? void 0 : (_item$dataSourceMappi2 = item.dataSourceMapping) === null || _item$dataSourceMappi2 === void 0 ? void 0 : _item$dataSourceMappi2[1]) || 'name';
4988
5018
  var dataSourceList = getSelectDataList(record, item, selectKey);
4989
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, item.selectProps), {}, {
5019
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
4990
5020
  value: text || null,
4991
5021
  onChange: function () {
4992
5022
  var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
4993
- var dataSourceSelectItem, _item$selectChangeCal, changeValue, isCheckPass, isConformToTheRules;
5023
+ var isConformToTheRules, newPopValue;
4994
5024
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4995
5025
  while (1) switch (_context2.prev = _context2.next) {
4996
5026
  case 0:
4997
- dataSourceSelectItem = (dataSourceList === null || dataSourceList === void 0 ? void 0 : dataSourceList.find(function (d) {
4998
- return d[selectKey] == value;
4999
- })) || {};
5000
- if (!(item === null || item === void 0 ? void 0 : item.selectChangeCallback)) {
5001
- _context2.next = 6;
5002
- break;
5003
- }
5004
- _context2.next = 4;
5005
- return item === null || item === void 0 ? void 0 : (_item$selectChangeCal = item.selectChangeCallback) === null || _item$selectChangeCal === void 0 ? void 0 : _item$selectChangeCal.call(item, popvalue, setPopValue, {
5006
- record: record,
5007
- index: index,
5008
- item: item,
5009
- oldValue: text,
5010
- changeValue: value,
5011
- dataSourceSelectItem: dataSourceSelectItem,
5012
- editRecord: editRecord
5013
- });
5014
- case 4:
5015
- _context2.next = 25;
5016
- break;
5017
- case 6:
5018
- // 更新当前行数据函数
5019
- changeValue = function changeValue(v, dSSItem) {
5020
- var _item$dataSourceSelec;
5021
- record[item.dataIndex] = v;
5022
- // 下拉框带出需要回填的数据
5023
- if (item === null || item === void 0 ? void 0 : (_item$dataSourceSelec = item.dataSourceSelectBackData) === null || _item$dataSourceSelec === void 0 ? void 0 : _item$dataSourceSelec.length) {
5024
- item === null || item === void 0 ? void 0 : item.dataSourceSelectBackData.forEach(function (s) {
5025
- record[s] = dSSItem ? dSSItem[s] : null;
5026
- });
5027
- }
5028
- }; // 处理校验,默认不校验
5029
- isCheckPass = true;
5030
- _context2.prev = 8;
5031
- if (!(item === null || item === void 0 ? void 0 : item.selectCheckCallback)) {
5032
- _context2.next = 15;
5033
- break;
5034
- }
5035
- _context2.next = 12;
5036
- return item === null || item === void 0 ? void 0 : item.selectCheckCallback(popvalue, {
5037
- record: record,
5038
- index: index,
5039
- item: item,
5040
- oldValue: text,
5041
- changeValue: value,
5042
- dataSourceSelectItem: dataSourceSelectItem
5043
- });
5044
- case 12:
5045
- isCheckPass = _context2.sent;
5046
- _context2.next = 19;
5047
- break;
5048
- case 15:
5049
- _context2.next = 17;
5027
+ _context2.next = 2;
5050
5028
  return checkSelectChange(businessType, popvalue, mappingValueField, record, item, value);
5051
- case 17:
5029
+ case 2:
5052
5030
  isConformToTheRules = _context2.sent;
5053
- isCheckPass = !isConformToTheRules;
5054
- case 19:
5055
- _context2.next = 23;
5056
- break;
5057
- case 21:
5058
- _context2.prev = 21;
5059
- _context2.t0 = _context2["catch"](8);
5060
- case 23:
5061
- if (isCheckPass) {
5062
- changeValue(value, dataSourceSelectItem);
5031
+ if (isConformToTheRules) {
5032
+ record[item.dataIndex] = value;
5063
5033
  } else {
5064
- changeValue(null);
5034
+ record[item.dataIndex] = null;
5065
5035
  }
5066
- // 更新已选表格函数
5067
- editRecord(record);
5068
- case 25:
5036
+ newPopValue = popvalue.map(function (i, innerIndex) {
5037
+ if (innerIndex == index) {
5038
+ i[item.dataIndex] = record[item.dataIndex];
5039
+ }
5040
+ return i;
5041
+ });
5042
+ setPopValue(newPopValue);
5043
+ case 6:
5069
5044
  case "end":
5070
5045
  return _context2.stop();
5071
5046
  }
5072
- }, _callee2, null, [[8, 21]]);
5047
+ }, _callee2);
5073
5048
  }));
5074
5049
  function onChange(_x7) {
5075
5050
  return _onChange.apply(this, arguments);
@@ -5077,9 +5052,9 @@ var AddSelect = function AddSelect(props) {
5077
5052
  return onChange;
5078
5053
  }(),
5079
5054
  style: {
5080
- width: "".concat((item === null || item === void 0 ? void 0 : item.width) && (item === null || item === void 0 ? void 0 : item.width) - 20 || '160', "px")
5055
+ width: '160px'
5081
5056
  }
5082
- }), dataSourceList === null || dataSourceList === void 0 ? void 0 : dataSourceList.map(function (item) {
5057
+ }, dataSourceList.map(function (item) {
5083
5058
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
5084
5059
  value: item[selectKey]
5085
5060
  }, item[selectText]);
@@ -5112,10 +5087,20 @@ var AddSelect = function AddSelect(props) {
5112
5087
  // 获取数据源 (type: 1下拉框 2弹框 不传值默认为下拉框)
5113
5088
  var getData = function getData() {
5114
5089
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5090
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
5115
5091
  if (!requestConfig) return;
5116
5092
  setFetching(true);
5117
5093
  // 处理dependence参数
5118
5094
  var fixedParam = {};
5095
+ if (fixedparameter && fieldValToParam && ctx) {
5096
+ fixedparameter.forEach(function (item, index) {
5097
+ var fixedParamVal = ctx.form.getFieldValue(fieldValToParam[index]);
5098
+ if (fixedParamVal) {
5099
+ fixedParam[item] = fixedParamVal;
5100
+ form.setFieldsValue(_objectSpread2(_objectSpread2({}, form === null || form === void 0 ? void 0 : form.getFieldsValue()), {}, _defineProperty({}, item, fixedParamVal)));
5101
+ }
5102
+ });
5103
+ }
5119
5104
  // 数组对象处理,对带有特殊标记的name进行处理
5120
5105
  var _loop = function _loop() {
5121
5106
  if (Object.prototype.hasOwnProperty.call(params, key)) {
@@ -5221,7 +5206,21 @@ var AddSelect = function AddSelect(props) {
5221
5206
  var keys = res.list ? 'list' : 'items';
5222
5207
  source = res ? res[keys] ? res[keys].map(function (item) {
5223
5208
  var _item$packingUnitList, _item$packingUnitList2;
5209
+ var textShowText = item[mappingTextField];
5210
+ if (mappingTextShowTextField) {
5211
+ textShowText = [];
5212
+ if (Array.isArray(mappingTextShowTextField)) {
5213
+ mappingTextShowTextField.forEach(function (r) {
5214
+ textShowText.push(item[r]);
5215
+ });
5216
+ } else {
5217
+ textShowText = item[mappingTextShowTextField];
5218
+ }
5219
+ }
5224
5220
  return _objectSpread2(_objectSpread2({}, item), {}, {
5221
+ text: item[mappingTextField],
5222
+ textShowText: textShowText,
5223
+ textShowKey: item[mappingTextShowKeyField || mappingValueField],
5225
5224
  value: item[mappingValueField],
5226
5225
  baseUnitCode: item === null || item === void 0 ? void 0 : (_item$packingUnitList = item.packingUnitList) === null || _item$packingUnitList === void 0 ? void 0 : (_item$packingUnitList2 = _item$packingUnitList.find(function (item) {
5227
5226
  return item.baseUnit === true;
@@ -5229,7 +5228,21 @@ var AddSelect = function AddSelect(props) {
5229
5228
  });
5230
5229
  }) : Array.isArray(res) && (res === null || res === void 0 ? void 0 : res.map(function (item) {
5231
5230
  var _item$packingUnitList3, _item$packingUnitList4;
5231
+ var textShowText = item[mappingTextField];
5232
+ if (mappingTextShowTextField) {
5233
+ textShowText = [];
5234
+ if (Array.isArray(mappingTextShowTextField)) {
5235
+ mappingTextShowTextField.forEach(function (r) {
5236
+ textShowText.push(item[r]);
5237
+ });
5238
+ } else {
5239
+ textShowText = item[mappingTextShowTextField];
5240
+ }
5241
+ }
5232
5242
  return _objectSpread2(_objectSpread2({}, item), {}, {
5243
+ text: item[mappingTextField],
5244
+ textShowText: textShowText,
5245
+ textShowKey: item[mappingTextShowKeyField || mappingValueField],
5233
5246
  value: item[mappingValueField],
5234
5247
  baseUnitCode: item === null || item === void 0 ? void 0 : (_item$packingUnitList3 = item.packingUnitList) === null || _item$packingUnitList3 === void 0 ? void 0 : (_item$packingUnitList4 = _item$packingUnitList3.find(function (item) {
5235
5248
  return item.baseUnit === true;
@@ -5238,12 +5251,19 @@ var AddSelect = function AddSelect(props) {
5238
5251
  })) : [];
5239
5252
  }
5240
5253
  source = Array.isArray(source) ? source : [];
5241
- setTableData(source);
5242
- setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
5243
- total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
5244
- pageSize: Number((res === null || res === void 0 ? void 0 : res.size) || (res === null || res === void 0 ? void 0 : res.pageSize) || (params === null || params === void 0 ? void 0 : params.pageSize) || pageSize),
5245
- current: Number((res === null || res === void 0 ? void 0 : res.page) || (res === null || res === void 0 ? void 0 : res.currentPage) || (params === null || params === void 0 ? void 0 : params.currentPage) || currentPage)
5246
- }));
5254
+ if (type === 1) {
5255
+ var _ctx$form;
5256
+ ctx === null || ctx === void 0 ? void 0 : (_ctx$form = ctx.form) === null || _ctx$form === void 0 ? void 0 : _ctx$form.setFieldSource(resultSourceKey, source);
5257
+ setItems(source);
5258
+ setItemsTotal(Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length));
5259
+ } else {
5260
+ setTableData(source);
5261
+ setTablePagination(_objectSpread2(_objectSpread2({}, tablePagination), {}, {
5262
+ total: Number((res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : res.totalCount) || source.length),
5263
+ pageSize: Number((res === null || res === void 0 ? void 0 : res.size) || (res === null || res === void 0 ? void 0 : res.pageSize) || (params === null || params === void 0 ? void 0 : params.pageSize) || pageSize),
5264
+ current: Number((res === null || res === void 0 ? void 0 : res.page) || (res === null || res === void 0 ? void 0 : res.currentPage) || (params === null || params === void 0 ? void 0 : params.currentPage) || currentPage)
5265
+ }));
5266
+ }
5247
5267
  }).catch(function (err) {
5248
5268
  setFetching(false);
5249
5269
  });
@@ -5285,6 +5305,12 @@ var AddSelect = function AddSelect(props) {
5285
5305
  value: i
5286
5306
  };
5287
5307
  }));
5308
+ setIndeterminate(!!value.length && value.length < itemsTotal);
5309
+ setCheckedAll(itemsTotal && value.length === itemsTotal);
5310
+ // 需清空数据
5311
+ if (!value.length) {
5312
+ setDoubleArr([]);
5313
+ }
5288
5314
  } else {
5289
5315
  setSelectedRowKeys(labelInValue ? [value.key] : [value]);
5290
5316
  setPopValue(labelInValue ? [{
@@ -5319,6 +5345,7 @@ var AddSelect = function AddSelect(props) {
5319
5345
  antd.message.warning('至少选中一条数据');
5320
5346
  return;
5321
5347
  }
5348
+ // handleSelectOver(popvalue)
5322
5349
  if (onSaveCallback) {
5323
5350
  handleLoading(isContinue, true);
5324
5351
  onSaveCallback(popvalue).then(function (res) {
@@ -5354,6 +5381,9 @@ var AddSelect = function AddSelect(props) {
5354
5381
  setTableFormParams({});
5355
5382
  setIsModalVisible(false);
5356
5383
  setTableData([]);
5384
+ // if (selectMode) {
5385
+ // run();
5386
+ // }
5357
5387
  };
5358
5388
  var onSearchTable = function onSearchTable() {
5359
5389
  var params = form.getFieldsValue();
@@ -5361,6 +5391,9 @@ var AddSelect = function AddSelect(props) {
5361
5391
  getData(_objectSpread2(_objectSpread2({}, params), {}, {
5362
5392
  pageSize: tableInitPageSize
5363
5393
  }), 2);
5394
+ // if (selectMode) {
5395
+ // getData(params)
5396
+ // }
5364
5397
  };
5365
5398
  var onResetTable = function onResetTable() {
5366
5399
  form.resetFields();
@@ -5399,6 +5432,8 @@ var AddSelect = function AddSelect(props) {
5399
5432
  setPopValue(selectRows);
5400
5433
  setSelectedRowKeys(selectKeys);
5401
5434
  }
5435
+ // setIndeterminate(!!filterRows.length && filterRows.length < tablePagination?.total);
5436
+ // setCheckedAll(filterRows.length === tablePagination?.total);
5402
5437
  };
5403
5438
  // 生成唯一值
5404
5439
  var makeUniqueValue = function makeUniqueValue() {
@@ -5527,15 +5562,6 @@ var AddSelect = function AddSelect(props) {
5527
5562
  })));
5528
5563
  }
5529
5564
  };
5530
- var editRecord = function editRecord(record) {
5531
- var newPopValue = _toConsumableArray(popvalue);
5532
- var index = newPopValue.findIndex(function (item) {
5533
- return record[selectRowKey] == item[selectRowKey];
5534
- });
5535
- var item = newPopValue[index];
5536
- newPopValue.splice(index, 1, _objectSpread2(_objectSpread2({}, item), record));
5537
- setPopValue(_toConsumableArray(newPopValue));
5538
- };
5539
5565
  var inputIndex = 0;
5540
5566
  React$1.useEffect(function () {
5541
5567
  setInitialShowColumn(codeSelected, selectColumns, function (res) {
@@ -5548,8 +5574,8 @@ var AddSelect = function AddSelect(props) {
5548
5574
  });
5549
5575
  }, [tableColumns]);
5550
5576
  var handleResize = function handleResize(arr, index, callback) {
5551
- return function (_, _ref3) {
5552
- var size = _ref3.size;
5577
+ return function (_, _ref5) {
5578
+ var size = _ref5.size;
5553
5579
  var newColumns = arr.map(function (col) {
5554
5580
  return _objectSpread2({}, col);
5555
5581
  });
@@ -5614,7 +5640,7 @@ var AddSelect = function AddSelect(props) {
5614
5640
  id: "add_select_div_".concat(uniqueValue)
5615
5641
  }, /*#__PURE__*/React__default['default'].createElement(antd.Button, _objectSpread2({
5616
5642
  onClick: handleShowModal
5617
- }, realButtonProps), buttonText)), isModalVisible && ( /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
5643
+ }, realButtonProps), buttonText)), needModalTable && isModalVisible && ( /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
5618
5644
  width: '1200px',
5619
5645
  style: {
5620
5646
  top: 20
@@ -5622,6 +5648,7 @@ var AddSelect = function AddSelect(props) {
5622
5648
  bodyStyle: {
5623
5649
  padding: '0px'
5624
5650
  },
5651
+ // title={modalTableProps?.modalTableTitle}
5625
5652
  visible: isModalVisible,
5626
5653
  closable: false,
5627
5654
  onCancel: handleCancel,
@@ -5767,6 +5794,7 @@ var AddSelect = function AddSelect(props) {
5767
5794
  columns: showSelectedCol,
5768
5795
  dataSource: popvalue,
5769
5796
  pagination: false,
5797
+ // onChange={handleTableChange}
5770
5798
  rowKey: selectRowKey,
5771
5799
  rowClassName: 'row-class',
5772
5800
  scroll: {
@@ -9253,40 +9281,10 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Busines
9253
9281
  // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
9254
9282
  function handleSelectColumn(c, parentProps) {
9255
9283
  var result = c;
9256
- var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showSelectColumns) || [];
9257
- var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptSelectColumns) || [];
9258
- var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverSelectColumns) || [];
9259
- var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionSelectColumns) || [];
9260
- // 仅展示内容
9261
- if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
9262
- result = result.filter(function (i) {
9263
- return showColumns.includes(i.dataIndex);
9264
- });
9265
- }
9266
- // 过滤不需要展示内容
9267
- if (exceptColumns === null || exceptColumns === void 0 ? void 0 : exceptColumns.length) {
9268
- result = result.filter(function (i) {
9269
- return !exceptColumns.includes(i.dataIndex);
9270
- });
9271
- }
9272
- // 追加(最好不用这个,当组件不固定时候会有影响)
9273
- if (additionColumns === null || additionColumns === void 0 ? void 0 : additionColumns.length) {
9274
- additionColumns.forEach(function (i) {
9275
- result.splice(i.position, 0, i.column);
9276
- });
9277
- }
9278
- // 覆盖内容
9279
- if (coverColumns === null || coverColumns === void 0 ? void 0 : coverColumns.length) {
9280
- result = coverColumns;
9281
- }
9282
- return result;
9283
- }
9284
- function handleTableColumn(c, parentProps) {
9285
- var result = c;
9286
- var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showTableColumns) || [];
9287
- var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptTableColumns) || [];
9288
- var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverTableColumns) || [];
9289
- var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionTableColumns) || [];
9284
+ var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || [];
9285
+ var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
9286
+ var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || [];
9287
+ var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || [];
9290
9288
  // 仅展示内容
9291
9289
  if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
9292
9290
  result = result.filter(function (i) {
@@ -9606,7 +9604,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9606
9604
  },
9607
9605
  dataIndex: 'brandName'
9608
9606
  }]);
9609
- var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
9607
+ var mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
9610
9608
  var initialTableSearchForm = [{
9611
9609
  name: 'qp-skuCode-like',
9612
9610
  label: 'SKU编码'
@@ -9718,7 +9716,7 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
9718
9716
  isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
9719
9717
  };
9720
9718
  var modalTableProps = {
9721
- modalTableTitle: parProps.modalTableTitle || '选择商品',
9719
+ modalTableTitle: '选择商品',
9722
9720
  tableSearchForm: mTpTableSearchForm,
9723
9721
  tableColumns: mTpTableColumn,
9724
9722
  selectColumn: mTpSelectColumn,
@@ -9797,184 +9795,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9797
9795
  dataIndex: 'count'
9798
9796
  }];
9799
9797
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
9800
- var initialTableColumn = [{
9801
- title: 'SKC编码',
9802
- width: 150,
9803
- dataIndex: 'code'
9804
- }, {
9805
- title: 'SKC名称',
9806
- width: 200,
9807
- ellipsis: {
9808
- showTitle: false
9809
- },
9810
- render: function render(text) {
9811
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9812
- placement: "topLeft",
9813
- title: text
9814
- }, text);
9815
- },
9816
- dataIndex: 'name'
9817
- }, {
9818
- title: '商品名称',
9819
- width: 100,
9820
- ellipsis: {
9821
- showTitle: false
9822
- },
9823
- dataIndex: 'itemName',
9824
- render: function render(text) {
9825
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9826
- placement: "topLeft",
9827
- title: text
9828
- }, text);
9829
- }
9830
- }, {
9831
- title: '颜色',
9832
- width: 100,
9833
- ellipsis: {
9834
- showTitle: false
9835
- },
9836
- render: function render(text) {
9837
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9838
- placement: "topLeft",
9839
- title: text
9840
- }, text);
9841
- },
9842
- dataIndex: 'colorName'
9843
- }, {
9844
- title: '类目',
9845
- width: 100,
9846
- ellipsis: {
9847
- showTitle: false
9848
- },
9849
- render: function render(text) {
9850
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9851
- placement: "topLeft",
9852
- title: text
9853
- }, text);
9854
- },
9855
- dataIndex: 'categoryName'
9856
- }, {
9857
- title: '品类',
9858
- width: 100,
9859
- ellipsis: {
9860
- showTitle: false
9861
- },
9862
- render: function render(text) {
9863
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9864
- placement: "topLeft",
9865
- title: text
9866
- }, text);
9867
- },
9868
- dataIndex: 'className'
9869
- }, {
9870
- title: '品牌',
9871
- width: 100,
9872
- ellipsis: {
9873
- showTitle: false
9874
- },
9875
- render: function render(text) {
9876
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9877
- placement: "topLeft",
9878
- title: text
9879
- }, text);
9880
- },
9881
- dataIndex: 'brandName'
9882
- }];
9883
- var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
9884
- var initialTableSearchForm = [{
9885
- name: 'qp-code-like',
9886
- label: 'SKC编码'
9887
- }, {
9888
- name: 'qp-skcName-like',
9889
- label: 'SKC名称'
9890
- }, {
9891
- name: 'qp-itemName-like',
9892
- label: '商品名称'
9893
- }, {
9894
- name: 'qp-colorName-in',
9895
- type: 'select',
9896
- label: '颜色',
9897
- field: {
9898
- type: 'select',
9899
- props: {
9900
- mode: 'multiple',
9901
- notFoundContent: '暂无数据',
9902
- allowClear: true,
9903
- showSearch: true,
9904
- showArrow: true,
9905
- maxTagCount: 1,
9906
- optionFilterProp: 'children',
9907
- filterOption: function filterOption(input, option) {
9908
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9909
- }
9910
- }
9911
- }
9912
- }, {
9913
- name: 'qp-categoryId-in',
9914
- type: 'treeSelect',
9915
- label: '类目',
9916
- field: {
9917
- type: 'treeSelect',
9918
- props: {
9919
- treeData: [],
9920
- treeCheckable: true,
9921
- showSearch: true,
9922
- allowClear: true,
9923
- showArrow: true,
9924
- treeNodeFilterProp: 'title',
9925
- treeDefaultExpandAll: true,
9926
- maxTagCount: 1,
9927
- placeholder: '请选择',
9928
- style: {
9929
- width: '100%'
9930
- },
9931
- dropdownStyle: {
9932
- maxHeight: 400,
9933
- maxWidth: 100,
9934
- overflow: 'auto'
9935
- }
9936
- }
9937
- }
9938
- }, {
9939
- name: 'qp-classId-in',
9940
- type: 'select',
9941
- label: '品类',
9942
- field: {
9943
- type: 'select',
9944
- props: {
9945
- mode: 'multiple',
9946
- notFoundContent: '暂无数据',
9947
- allowClear: true,
9948
- showSearch: true,
9949
- showArrow: true,
9950
- maxTagCount: 1,
9951
- optionFilterProp: 'children',
9952
- filterOption: function filterOption(input, option) {
9953
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9954
- }
9955
- }
9956
- }
9957
- }, {
9958
- name: 'qp-brandId-in',
9959
- type: 'select',
9960
- label: '品牌',
9961
- field: {
9962
- type: 'select',
9963
- props: {
9964
- mode: 'multiple',
9965
- notFoundContent: '暂无数据',
9966
- allowClear: true,
9967
- showSearch: true,
9968
- showArrow: true,
9969
- maxTagCount: 1,
9970
- optionFilterProp: 'children',
9971
- filterOption: function filterOption(input, option) {
9972
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9973
- }
9974
- }
9975
- }
9976
- }];
9977
- var mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
9978
9798
  var initialPromiseLoadList = [{
9979
9799
  url: "/items/item/propertyValue/sizeBySkcConfig",
9980
9800
  params: {
@@ -10013,7 +9833,6 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
10013
9833
  resPosition: 6,
10014
9834
  resKeyValue: ['id', 'name']
10015
9835
  }];
10016
- var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
10017
9836
  var props = {
10018
9837
  buttonText: parProps.buttonText || '新增',
10019
9838
  buttonProps: parProps.buttonProps || {},
@@ -10040,11 +9859,185 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
10040
9859
  isAllowRepeatedSelect: (parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) !== undefined ? !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect) : true // 默认开启一行选多次
10041
9860
  };
10042
9861
  var modalTableProps = {
10043
- modalTableTitle: parProps.modalTableTitle || '选择商品',
10044
- tableSearchForm: mTpTableSearchForm,
10045
- tableColumns: mTpTableColumn,
10046
- selectColumn: mTpSelectColumn,
10047
- promiseLoadList: mTpPromiseLoadList
9862
+ modalTableTitle: '选择商品',
9863
+ tableSearchForm: [{
9864
+ name: 'qp-code-like',
9865
+ label: 'SKC编码'
9866
+ }, {
9867
+ name: 'qp-skcName-like',
9868
+ label: 'SKC名称'
9869
+ }, {
9870
+ name: 'qp-itemName-like',
9871
+ label: '商品名称'
9872
+ }, {
9873
+ name: 'qp-colorName-in',
9874
+ type: 'select',
9875
+ label: '颜色',
9876
+ field: {
9877
+ type: 'select',
9878
+ props: {
9879
+ mode: 'multiple',
9880
+ notFoundContent: '暂无数据',
9881
+ allowClear: true,
9882
+ showSearch: true,
9883
+ showArrow: true,
9884
+ maxTagCount: 1,
9885
+ optionFilterProp: 'children',
9886
+ filterOption: function filterOption(input, option) {
9887
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9888
+ }
9889
+ }
9890
+ }
9891
+ }, {
9892
+ name: 'qp-categoryId-in',
9893
+ type: 'treeSelect',
9894
+ label: '类目',
9895
+ field: {
9896
+ type: 'treeSelect',
9897
+ props: {
9898
+ treeData: [],
9899
+ treeCheckable: true,
9900
+ showSearch: true,
9901
+ allowClear: true,
9902
+ showArrow: true,
9903
+ treeNodeFilterProp: 'title',
9904
+ treeDefaultExpandAll: true,
9905
+ maxTagCount: 1,
9906
+ placeholder: '请选择',
9907
+ style: {
9908
+ width: '100%'
9909
+ },
9910
+ dropdownStyle: {
9911
+ maxHeight: 400,
9912
+ maxWidth: 100,
9913
+ overflow: 'auto'
9914
+ }
9915
+ }
9916
+ }
9917
+ }, {
9918
+ name: 'qp-classId-in',
9919
+ type: 'select',
9920
+ label: '品类',
9921
+ field: {
9922
+ type: 'select',
9923
+ props: {
9924
+ mode: 'multiple',
9925
+ notFoundContent: '暂无数据',
9926
+ allowClear: true,
9927
+ showSearch: true,
9928
+ showArrow: true,
9929
+ maxTagCount: 1,
9930
+ optionFilterProp: 'children',
9931
+ filterOption: function filterOption(input, option) {
9932
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9933
+ }
9934
+ }
9935
+ }
9936
+ }, {
9937
+ name: 'qp-brandId-in',
9938
+ type: 'select',
9939
+ label: '品牌',
9940
+ field: {
9941
+ type: 'select',
9942
+ props: {
9943
+ mode: 'multiple',
9944
+ notFoundContent: '暂无数据',
9945
+ allowClear: true,
9946
+ showSearch: true,
9947
+ showArrow: true,
9948
+ maxTagCount: 1,
9949
+ optionFilterProp: 'children',
9950
+ filterOption: function filterOption(input, option) {
9951
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
9952
+ }
9953
+ }
9954
+ }
9955
+ }],
9956
+ tableColumns: [{
9957
+ title: 'SKC编码',
9958
+ width: 150,
9959
+ dataIndex: 'code'
9960
+ }, {
9961
+ title: 'SKC名称',
9962
+ width: 200,
9963
+ ellipsis: {
9964
+ showTitle: false
9965
+ },
9966
+ render: function render(text) {
9967
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9968
+ placement: "topLeft",
9969
+ title: text
9970
+ }, text);
9971
+ },
9972
+ dataIndex: 'name'
9973
+ }, {
9974
+ title: '商品名称',
9975
+ width: 100,
9976
+ ellipsis: {
9977
+ showTitle: false
9978
+ },
9979
+ dataIndex: 'itemName',
9980
+ render: function render(text) {
9981
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9982
+ placement: "topLeft",
9983
+ title: text
9984
+ }, text);
9985
+ }
9986
+ }, {
9987
+ title: '颜色',
9988
+ width: 100,
9989
+ ellipsis: {
9990
+ showTitle: false
9991
+ },
9992
+ render: function render(text) {
9993
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9994
+ placement: "topLeft",
9995
+ title: text
9996
+ }, text);
9997
+ },
9998
+ dataIndex: 'colorName'
9999
+ }, {
10000
+ title: '类目',
10001
+ width: 100,
10002
+ ellipsis: {
10003
+ showTitle: false
10004
+ },
10005
+ render: function render(text) {
10006
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10007
+ placement: "topLeft",
10008
+ title: text
10009
+ }, text);
10010
+ },
10011
+ dataIndex: 'categoryName'
10012
+ }, {
10013
+ title: '品类',
10014
+ width: 100,
10015
+ ellipsis: {
10016
+ showTitle: false
10017
+ },
10018
+ render: function render(text) {
10019
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10020
+ placement: "topLeft",
10021
+ title: text
10022
+ }, text);
10023
+ },
10024
+ dataIndex: 'className'
10025
+ }, {
10026
+ title: '品牌',
10027
+ width: 100,
10028
+ ellipsis: {
10029
+ showTitle: false
10030
+ },
10031
+ render: function render(text) {
10032
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10033
+ placement: "topLeft",
10034
+ title: text
10035
+ }, text);
10036
+ },
10037
+ dataIndex: 'brandName'
10038
+ }],
10039
+ selectColumn: mTpSelectColumn,
10040
+ promiseLoadList: initialPromiseLoadList
10048
10041
  };
10049
10042
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
10050
10043
  modalTableProps: modalTableProps
@@ -10105,191 +10098,29 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
10105
10098
  }, {
10106
10099
  title: '配码',
10107
10100
  dataIndex: 'selectPropertyGroupCode',
10108
- width: 160,
10109
- isSelectItem: true,
10110
- dataSource: propertyList,
10111
- filterDataSourceCode: 'matchingCodes'
10112
- }, {
10113
- title: '数量',
10114
- width: 100,
10115
- isInputItem: true,
10116
- dataIndex: 'count'
10117
- }, {
10118
- title: '所属组织',
10119
- dataIndex: 'ownOrgSignName'
10120
- }, {
10121
- title: '品牌',
10122
- dataIndex: 'brandName'
10123
- }, {
10124
- title: '类目',
10125
- dataIndex: 'categoryText'
10126
- }, {
10127
- title: '品类',
10128
- dataIndex: 'className'
10129
- }];
10130
- var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
10131
- var initialTableColumn = [{
10132
- title: '商品编码',
10133
- width: 150,
10134
- dataIndex: 'itemCode'
10135
- }, {
10136
- title: '商品名称',
10137
- width: 200,
10138
- ellipsis: {
10139
- showTitle: false
10140
- },
10141
- render: function render(text) {
10142
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10143
- placement: "topLeft",
10144
- title: text
10145
- }, text);
10146
- },
10147
- dataIndex: 'name'
10148
- }, {
10149
- title: '所属组织',
10150
- width: 100,
10151
- ellipsis: {
10152
- showTitle: false
10153
- },
10154
- render: function render(text) {
10155
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10156
- placement: "topLeft",
10157
- title: text
10158
- }, text);
10159
- },
10160
- dataIndex: 'ownOrgSignName'
10161
- }, {
10162
- title: '品牌',
10163
- width: 100,
10164
- ellipsis: {
10165
- showTitle: false
10166
- },
10167
- render: function render(text) {
10168
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10169
- placement: "topLeft",
10170
- title: text
10171
- }, text);
10172
- },
10173
- dataIndex: 'brandName'
10174
- }, {
10175
- title: '类目',
10176
- width: 100,
10177
- ellipsis: {
10178
- showTitle: false
10179
- },
10180
- render: function render(text) {
10181
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10182
- placement: "topLeft",
10183
- title: text
10184
- }, text);
10185
- },
10186
- dataIndex: 'categoryName'
10187
- }, {
10188
- title: '品类',
10189
- width: 100,
10190
- ellipsis: {
10191
- showTitle: false
10192
- },
10193
- render: function render(text) {
10194
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10195
- placement: "topLeft",
10196
- title: text
10197
- }, text);
10198
- },
10199
- dataIndex: 'className'
10200
- }];
10201
- var mTpTableColumn = handleTableColumn(initialTableColumn, parProps);
10202
- var initialTableSearchForm = [{
10203
- name: 'qp-itemCode-like',
10204
- label: '商品编码'
10205
- }, {
10206
- name: 'qp-name-like',
10207
- label: '商品名称'
10208
- }, {
10209
- name: 'qp-ownOrgSign-in',
10210
- type: 'select',
10211
- label: '所属组织',
10212
- field: {
10213
- type: 'select',
10214
- props: {
10215
- mode: 'multiple',
10216
- notFoundContent: '暂无数据',
10217
- allowClear: true,
10218
- showSearch: true,
10219
- showArrow: true,
10220
- maxTagCount: 1,
10221
- optionFilterProp: 'children',
10222
- filterOption: function filterOption(input, option) {
10223
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10224
- }
10225
- }
10226
- }
10227
- }, {
10228
- name: 'qp-brandId-in',
10229
- type: 'select',
10230
- label: '品牌',
10231
- field: {
10232
- type: 'select',
10233
- props: {
10234
- mode: 'multiple',
10235
- notFoundContent: '暂无数据',
10236
- allowClear: true,
10237
- showSearch: true,
10238
- showArrow: true,
10239
- maxTagCount: 1,
10240
- optionFilterProp: 'children',
10241
- filterOption: function filterOption(input, option) {
10242
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10243
- }
10244
- }
10245
- }
10246
- }, {
10247
- name: 'qp-categoryId-in',
10248
- type: 'treeSelect',
10249
- label: '类目',
10250
- field: {
10251
- type: 'treeSelect',
10252
- props: {
10253
- treeData: [],
10254
- treeCheckable: true,
10255
- showSearch: true,
10256
- allowClear: true,
10257
- showArrow: true,
10258
- treeNodeFilterProp: 'title',
10259
- treeDefaultExpandAll: true,
10260
- maxTagCount: 1,
10261
- placeholder: '请选择',
10262
- style: {
10263
- width: '100%'
10264
- },
10265
- dropdownStyle: {
10266
- maxHeight: 400,
10267
- maxWidth: 100,
10268
- overflow: 'auto'
10269
- }
10270
- }
10271
- }
10101
+ width: 160,
10102
+ isSelectItem: true,
10103
+ dataSource: propertyList,
10104
+ filterDataSourceCode: 'matchingCodes'
10272
10105
  }, {
10273
- name: 'qp-classId-in',
10274
- type: 'select',
10275
- label: '品类',
10276
- field: {
10277
- type: 'select',
10278
- props: {
10279
- mode: 'multiple',
10280
- notFoundContent: '暂无数据',
10281
- allowClear: true,
10282
- showSearch: true,
10283
- showArrow: true,
10284
- maxTagCount: 1,
10285
- optionFilterProp: 'children',
10286
- filterOption: function filterOption(input, option) {
10287
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10288
- }
10289
- }
10290
- }
10106
+ title: '数量',
10107
+ width: 100,
10108
+ isInputItem: true,
10109
+ dataIndex: 'count'
10110
+ }, {
10111
+ title: '所属组织',
10112
+ dataIndex: 'ownOrgSignName'
10113
+ }, {
10114
+ title: '品牌',
10115
+ dataIndex: 'brandName'
10116
+ }, {
10117
+ title: '类目',
10118
+ dataIndex: 'categoryText'
10119
+ }, {
10120
+ title: '品类',
10121
+ dataIndex: 'className'
10291
10122
  }];
10292
- var mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
10123
+ var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
10293
10124
  var initialPromiseLoadList = [{
10294
10125
  url: "/user/orgViewNode/listNoPage",
10295
10126
  params: {
@@ -10328,7 +10159,6 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
10328
10159
  resPosition: 5,
10329
10160
  resKeyValue: ['id', 'name']
10330
10161
  }];
10331
- var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
10332
10162
  var props = {
10333
10163
  buttonText: parProps.buttonText || '新增',
10334
10164
  buttonProps: parProps.buttonProps || {},
@@ -10357,11 +10187,169 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
10357
10187
  isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
10358
10188
  };
10359
10189
  var modalTableProps = {
10360
- modalTableTitle: parProps.modalTableTitle || '选择商品',
10361
- tableSearchForm: mTpTableSearchForm,
10362
- tableColumns: mTpTableColumn,
10190
+ modalTableTitle: '选择商品',
10191
+ tableSearchForm: [{
10192
+ name: 'qp-itemCode-like',
10193
+ label: '商品编码'
10194
+ }, {
10195
+ name: 'qp-name-like',
10196
+ label: '商品名称'
10197
+ }, {
10198
+ name: 'qp-ownOrgSign-in',
10199
+ type: 'select',
10200
+ label: '所属组织',
10201
+ field: {
10202
+ type: 'select',
10203
+ props: {
10204
+ mode: 'multiple',
10205
+ notFoundContent: '暂无数据',
10206
+ allowClear: true,
10207
+ showSearch: true,
10208
+ showArrow: true,
10209
+ maxTagCount: 1,
10210
+ optionFilterProp: 'children',
10211
+ filterOption: function filterOption(input, option) {
10212
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10213
+ }
10214
+ }
10215
+ }
10216
+ }, {
10217
+ name: 'qp-brandId-in',
10218
+ type: 'select',
10219
+ label: '品牌',
10220
+ field: {
10221
+ type: 'select',
10222
+ props: {
10223
+ mode: 'multiple',
10224
+ notFoundContent: '暂无数据',
10225
+ allowClear: true,
10226
+ showSearch: true,
10227
+ showArrow: true,
10228
+ maxTagCount: 1,
10229
+ optionFilterProp: 'children',
10230
+ filterOption: function filterOption(input, option) {
10231
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10232
+ }
10233
+ }
10234
+ }
10235
+ }, {
10236
+ name: 'qp-categoryId-in',
10237
+ type: 'treeSelect',
10238
+ label: '类目',
10239
+ field: {
10240
+ type: 'treeSelect',
10241
+ props: {
10242
+ treeData: [],
10243
+ treeCheckable: true,
10244
+ showSearch: true,
10245
+ allowClear: true,
10246
+ showArrow: true,
10247
+ treeNodeFilterProp: 'title',
10248
+ treeDefaultExpandAll: true,
10249
+ maxTagCount: 1,
10250
+ placeholder: '请选择',
10251
+ style: {
10252
+ width: '100%'
10253
+ },
10254
+ dropdownStyle: {
10255
+ maxHeight: 400,
10256
+ maxWidth: 100,
10257
+ overflow: 'auto'
10258
+ }
10259
+ }
10260
+ }
10261
+ }, {
10262
+ name: 'qp-classId-in',
10263
+ type: 'select',
10264
+ label: '品类',
10265
+ field: {
10266
+ type: 'select',
10267
+ props: {
10268
+ mode: 'multiple',
10269
+ notFoundContent: '暂无数据',
10270
+ allowClear: true,
10271
+ showSearch: true,
10272
+ showArrow: true,
10273
+ maxTagCount: 1,
10274
+ optionFilterProp: 'children',
10275
+ filterOption: function filterOption(input, option) {
10276
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
10277
+ }
10278
+ }
10279
+ }
10280
+ }],
10281
+ tableColumns: [{
10282
+ title: '商品编码',
10283
+ width: 150,
10284
+ dataIndex: 'itemCode'
10285
+ }, {
10286
+ title: '商品名称',
10287
+ width: 200,
10288
+ ellipsis: {
10289
+ showTitle: false
10290
+ },
10291
+ render: function render(text) {
10292
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10293
+ placement: "topLeft",
10294
+ title: text
10295
+ }, text);
10296
+ },
10297
+ dataIndex: 'name'
10298
+ }, {
10299
+ title: '所属组织',
10300
+ width: 100,
10301
+ ellipsis: {
10302
+ showTitle: false
10303
+ },
10304
+ render: function render(text) {
10305
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10306
+ placement: "topLeft",
10307
+ title: text
10308
+ }, text);
10309
+ },
10310
+ dataIndex: 'ownOrgSignName'
10311
+ }, {
10312
+ title: '品牌',
10313
+ width: 100,
10314
+ ellipsis: {
10315
+ showTitle: false
10316
+ },
10317
+ render: function render(text) {
10318
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10319
+ placement: "topLeft",
10320
+ title: text
10321
+ }, text);
10322
+ },
10323
+ dataIndex: 'brandName'
10324
+ }, {
10325
+ title: '类目',
10326
+ width: 100,
10327
+ ellipsis: {
10328
+ showTitle: false
10329
+ },
10330
+ render: function render(text) {
10331
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10332
+ placement: "topLeft",
10333
+ title: text
10334
+ }, text);
10335
+ },
10336
+ dataIndex: 'categoryName'
10337
+ }, {
10338
+ title: '品类',
10339
+ width: 100,
10340
+ ellipsis: {
10341
+ showTitle: false
10342
+ },
10343
+ render: function render(text) {
10344
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
10345
+ placement: "topLeft",
10346
+ title: text
10347
+ }, text);
10348
+ },
10349
+ dataIndex: 'className'
10350
+ }],
10363
10351
  selectColumn: mTpSelectColumn,
10364
- promiseLoadList: mTpPromiseLoadList
10352
+ promiseLoadList: initialPromiseLoadList
10365
10353
  };
10366
10354
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
10367
10355
  modalTableProps: modalTableProps
@@ -10437,7 +10425,7 @@ var CommodityEntry = function CommodityEntry(props) {
10437
10425
  onCancel: handleCancel,
10438
10426
  destroyOnClose: true,
10439
10427
  zIndex: 15
10440
- }, otherModalProps), /*#__PURE__*/React__default['default'].createElement(DataValidation, _objectSpread2(_objectSpread2({}, props), {}, {
10428
+ }, otherModalProps), /*#__PURE__*/React__default['default'].createElement(DataValidation, {
10441
10429
  onRef: function onRef(ref) {
10442
10430
  dataValidationRef = ref;
10443
10431
  },
@@ -10445,7 +10433,7 @@ var CommodityEntry = function CommodityEntry(props) {
10445
10433
  validDataUrl: validDataUrl,
10446
10434
  isBrandAuth: isBrandAuth,
10447
10435
  isCheckStockNum: isCheckStockNum
10448
- })))) || '');
10436
+ }))) || '');
10449
10437
  };
10450
10438
 
10451
10439
  /*
@@ -10455,7 +10443,7 @@ var CommodityEntry = function CommodityEntry(props) {
10455
10443
  * @LastEditTime: 2022-01-14 17:17:26
10456
10444
  * @LastEditors: rodchen
10457
10445
  */
10458
- var index$1 = (function (storageKeyString) {
10446
+ var index$2 = (function (storageKeyString) {
10459
10447
  var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
10460
10448
  var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
10461
10449
  if (typeof seconds !== 'number') throw new Error('seconds should be number');
@@ -10895,7 +10883,7 @@ var BusinessTreeSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Bus
10895
10883
  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";
10896
10884
  styleInject(css_248z$8);
10897
10885
 
10898
- var index$2 = (function (props) {
10886
+ var index$3 = (function (props) {
10899
10887
  var _props$formStatusMapp = props.formStatusMapping,
10900
10888
  formStatusMapping = _props$formStatusMapp === void 0 ? [] : _props$formStatusMapp;
10901
10889
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -12376,7 +12364,7 @@ var iconMap = {
12376
12364
  src: moreIcon
12377
12365
  })
12378
12366
  };
12379
- var index$3 = (function (props) {
12367
+ var index$4 = (function (props) {
12380
12368
  var _useLocation = umi.useLocation(),
12381
12369
  pathname = _useLocation.pathname;
12382
12370
  var _useState = React$1.useState(pathname + 'id'),
@@ -12469,7 +12457,7 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
12469
12457
  var renderPageActionList = function renderPageActionList(actionLists) {
12470
12458
  var authButton = localStorage.getItem(getMenuAuthDataKey()) ? JSON.parse(localStorage.getItem(getMenuAuthDataKey())) : [];
12471
12459
  var visibleActions = actionLists.filter(function (action) {
12472
- return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (!shouldUseAuth() || judgeIsEmpty$1(action.code) || authButton.filter(function (item) {
12460
+ return (action.visible && action.visible !== 'false' || judgeIsEmpty$1(action.visible)) && (judgeIsEmpty$1(action.code) || authButton.filter(function (item) {
12473
12461
  return item === action.code;
12474
12462
  }));
12475
12463
  });
@@ -12594,7 +12582,7 @@ var css_248z$d = ".home_page_head {\n height: 54px;\n display: flex;\n justif
12594
12582
  styleInject(css_248z$d);
12595
12583
 
12596
12584
  var _excluded$c = ["children"];
12597
- var index$4 = (function (props) {
12585
+ var index$5 = (function (props) {
12598
12586
  var _useLocation = umi.useLocation(),
12599
12587
  pathname = _useLocation.pathname;
12600
12588
  var _useState = React$1.useState(pathname + 'id'),
@@ -13980,6 +13968,14 @@ var ResizeableTitle$2 = function ResizeableTitle(props) {
13980
13968
  };
13981
13969
  var BsSulaQueryTable = (function (props) {
13982
13970
  var bsTableCode = (props === null || props === void 0 ? void 0 : props.tableCode) || window.location.hash; //设置列字段的唯一标识
13971
+ // 获取 table columns中所有的 key 防止有的地方是 dataindex
13972
+ var checkedList = React$1.useMemo(function () {
13973
+ return props.columns.filter(function (col) {
13974
+ return !col.hidden;
13975
+ }).map(function (d) {
13976
+ return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
13977
+ });
13978
+ }, [props.columns]);
13983
13979
  var getConfigFromlocalstorage = function getConfigFromlocalstorage(type) {
13984
13980
  var config = localStorage.getItem(type) || '[]';
13985
13981
  var configArray = JSON.parse(config);
@@ -13991,66 +13987,97 @@ var BsSulaQueryTable = (function (props) {
13991
13987
  }
13992
13988
  return [];
13993
13989
  };
13994
- var getInitialSearchFieldsInfo = function getInitialSearchFieldsInfo() {
13995
- //获取搜索字段的缓存配置
13996
- var _props$fields = props.fields,
13997
- fields = _props$fields === void 0 ? [] : _props$fields;
13998
- var searchFieldsConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION);
13999
- var showSearchFields = searchFieldsConfig.length ? searchFieldsConfig.map(function (item) {
14000
- var inner = fields.filter(function (inneritem) {
14001
- var innerKey = Array.isArray(inneritem.name) ? JSON.stringify(inneritem.name) : inneritem.name;
14002
- var itemKey = Array.isArray(item.name) ? JSON.stringify(item.name) : item.name;
14003
- return innerKey && innerKey === itemKey;
14004
- })[0];
14005
- return _objectSpread2(_objectSpread2({}, inner), item);
14006
- }) : fields;
14007
- return _toConsumableArray(showSearchFields);
13990
+ /**
13991
+ * 根据保存的配置和原始配置,获取设置的字段或列。
13992
+ * @param savedConfig 保存的配置数组,可能包含字段或列的配置。
13993
+ * @param originConfig 原始配置数组,包含完整的字段或列信息。
13994
+ * @param type 字段或列的类型,用于确定配置的属性。
13995
+ * @returns 返回根据保存的配置处理后的字段或列数组,如果未保存任何配置,则返回原始配置。
13996
+ */
13997
+ var getSettingFieldOrColumn = function getSettingFieldOrColumn(savedConfig, originConfig, type) {
13998
+ /**
13999
+ * 判断值是否为字符串数组。
14000
+ * @param value 待判断的值。
14001
+ * @returns 如果值是字符串数组,则返回true,否则返回false。
14002
+ */
14003
+ var isStringArray = function isStringArray(value) {
14004
+ return Array.isArray(value) && value.every(function (v) {
14005
+ return typeof v === 'string';
14006
+ });
14007
+ };
14008
+ /**
14009
+ * 根据配置项和类型,获取配置项的键。
14010
+ * @param config 配置项,可以是字段或列。
14011
+ * @param type 配置项的类型。
14012
+ * @returns 返回配置项的键,如果无法获取,则返回空字符串。
14013
+ */
14014
+ var getItemKey = function getItemKey(config, type) {
14015
+ try {
14016
+ if (type === 'columns') {
14017
+ return isStringArray(config.key) ? JSON.stringify(config.key) : isStringArray(config.dataIndex) ? JSON.stringify(config.dataIndex) : config.key || config.dataIndex || '';
14018
+ }
14019
+ return isStringArray(config.name) ? JSON.stringify(config.name) : config.name || '';
14020
+ } catch (e) {}
14021
+ return '';
14022
+ };
14023
+ var newConfig = [];
14024
+ if (savedConfig.length) {
14025
+ var hash = originConfig.reduce(function (prev, inneritem) {
14026
+ prev[getItemKey(inneritem, type)] = inneritem;
14027
+ return prev;
14028
+ }, {});
14029
+ savedConfig.forEach(function (config, index) {
14030
+ var inner = hash[getItemKey(config, type)];
14031
+ inner && newConfig.push(_objectSpread2(_objectSpread2({}, inner), config));
14032
+ });
14033
+ }
14034
+ if (newConfig.length) return newConfig;
14035
+ if (type === 'columns') {
14036
+ return originConfig.filter(function (column) {
14037
+ var columnKey = getItemKey(column, type);
14038
+ return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
14039
+ });
14040
+ }
14041
+ return _toConsumableArray(originConfig);
14008
14042
  };
14009
14043
  var refs = React$1.useRef(null);
14010
14044
  var _useState = React$1.useState(''),
14011
14045
  _useState2 = _slicedToArray(_useState, 2),
14012
14046
  pagePath = _useState2[0],
14013
14047
  setPagePath = _useState2[1];
14014
- // 获取 table columns中所有的 key 防止有的地方是 dataindex
14015
- var _useState3 = React$1.useState(props.columns.filter(function (col) {
14016
- return !col.hidden;
14017
- }).map(function (d) {
14018
- return Array.isArray(d.key || d.dataIndex) ? JSON.stringify(d.key || d.dataIndex) : d.key || d.dataIndex;
14019
- })),
14020
- _useState4 = _slicedToArray(_useState3, 2),
14021
- checkedList = _useState4[0],
14022
- setCheckedList = _useState4[1];
14023
14048
  var _useLocation = umi.useLocation(),
14024
14049
  pathname = _useLocation.pathname;
14025
- var _useState5 = React$1.useState(Number(Math.random().toString().substr(2, 0) + Date.now()).toString(36)),
14026
- _useState6 = _slicedToArray(_useState5, 1),
14027
- id = _useState6[0];
14028
- var _useState7 = React$1.useState(false),
14029
- _useState8 = _slicedToArray(_useState7, 2),
14030
- isFullScreen = _useState8[0],
14031
- setIsFnllScreen = _useState8[1];
14050
+ var _useState3 = React$1.useState(Number(Math.random().toString().substr(2, 0) + Date.now()).toString(36)),
14051
+ _useState4 = _slicedToArray(_useState3, 1),
14052
+ id = _useState4[0];
14053
+ var _useState5 = React$1.useState(false),
14054
+ _useState6 = _slicedToArray(_useState5, 2),
14055
+ isFullScreen = _useState6[0],
14056
+ setIsFnllScreen = _useState6[1];
14032
14057
  // @ts-nocheck
14033
- var _useState9 = React$1.useState(props),
14058
+ var _useState7 = React$1.useState(props),
14059
+ _useState8 = _slicedToArray(_useState7, 2),
14060
+ value = _useState8[0],
14061
+ setValue = _useState8[1];
14062
+ var _props$fields = props.fields,
14063
+ fields = _props$fields === void 0 ? [] : _props$fields;
14064
+ var _useState9 = React$1.useState([]),
14034
14065
  _useState10 = _slicedToArray(_useState9, 2),
14035
- value = _useState10[0],
14036
- setValue = _useState10[1];
14037
- var _useState11 = React$1.useState([]),
14066
+ showColumn = _useState10[0],
14067
+ setShowColumns = _useState10[1]; // 列字段
14068
+ var originSearchFields = getSettingFieldOrColumn(getConfigFromlocalstorage(ENUM.BROWSER_CACHE.SEARCH_FIELDS_CONDITION), fields, 'searchFields');
14069
+ var _useState11 = React$1.useState(originSearchFields),
14038
14070
  _useState12 = _slicedToArray(_useState11, 2),
14039
- showColumn = _useState12[0],
14040
- setShowColumns = _useState12[1]; // 列字段
14041
- var originSearchFields = getInitialSearchFieldsInfo();
14042
- var _useState13 = React$1.useState(originSearchFields),
14043
- _useState14 = _slicedToArray(_useState13, 2),
14044
- showSearchFields = _useState14[0],
14045
- setShowSearchFields = _useState14[1]; //搜索项字段
14071
+ showSearchFields = _useState12[0],
14072
+ setShowSearchFields = _useState12[1]; //搜索项字段
14046
14073
  var _props$isPage = props.isPage,
14047
14074
  pagination = props.pagination,
14048
14075
  tableCode = props.tableCode,
14049
14076
  appRequestConfig = props.appRequestConfig;
14050
- var _useState15 = React$1.useState('100vh'),
14051
- _useState16 = _slicedToArray(_useState15, 2),
14052
- height = _useState16[0],
14053
- setHeight = _useState16[1];
14077
+ var _useState13 = React$1.useState('100vh'),
14078
+ _useState14 = _slicedToArray(_useState13, 2),
14079
+ height = _useState14[0],
14080
+ setHeight = _useState14[1];
14054
14081
  var sortTableRef = React$1.useRef(null);
14055
14082
  var searchTableRef = React$1.useRef(null);
14056
14083
  // 获取table高度
@@ -14111,7 +14138,7 @@ var BsSulaQueryTable = (function (props) {
14111
14138
  if (Number(item.slice(-1)) >= 1) {
14112
14139
  Item = item.substr(0, item.length - 1);
14113
14140
  }
14114
- if (shouldUseAuth() && !authButton.filter(function (itemInner) {
14141
+ if (!authButton.filter(function (itemInner) {
14115
14142
  return Item === itemInner;
14116
14143
  }).length) {
14117
14144
  resourceCodeArray[item].visible = false;
@@ -14123,17 +14150,7 @@ var BsSulaQueryTable = (function (props) {
14123
14150
  }));
14124
14151
  var columns = props.columns;
14125
14152
  var columnConfig = getConfigFromlocalstorage(ENUM.BROWSER_CACHE.COLUMN_CONDITION);
14126
- var showColumns = columnConfig.length ? columnConfig.map(function (item) {
14127
- var inner = columns.filter(function (inneritem) {
14128
- var innerKey = Array.isArray(inneritem.key || inneritem.dataIndex) ? JSON.stringify(inneritem.key || inneritem.dataIndex) : inneritem.key || inneritem.dataIndex;
14129
- var itemKey = Array.isArray(item.key || item.dataIndex) ? JSON.stringify(item.key || item.dataIndex) : item.key || item.dataIndex;
14130
- return innerKey && innerKey === itemKey;
14131
- })[0];
14132
- return _objectSpread2(_objectSpread2({}, inner), item);
14133
- }) : columns.filter(function (column) {
14134
- var columnKey = Array.isArray(column.key || column.dataIndex) ? JSON.stringify(column.key || column.dataIndex) : column.key || column.dataIndex;
14135
- return column.notRegularCheckList || checkedList.indexOf(columnKey) > -1;
14136
- });
14153
+ var showColumns = getSettingFieldOrColumn(columnConfig, columns, 'columns');
14137
14154
  showColumns.forEach(function (item, index) {
14138
14155
  item.width = item.width || getItemDefaultWidth(item);
14139
14156
  handleBssulaColumnsSpecialParams(item);
@@ -14547,7 +14564,7 @@ var setMenuTreeData = function setMenuTreeData(routesData) {
14547
14564
  routesData.splice(i, 1);
14548
14565
  return 0; // continue
14549
14566
  }
14550
- if (shouldUseAuth() && routesData[i].code && authButton.every(function (item) {
14567
+ if (routesData[i].code && authButton.every(function (item) {
14551
14568
  return routesData[i].code != item;
14552
14569
  })) {
14553
14570
  routesData.splice(i, 1);
@@ -15190,7 +15207,9 @@ var GlobalHeaderCom = function GlobalHeaderCom(props) {
15190
15207
  deep(item.routes);
15191
15208
  } else if (!item.hideInMenu && (name ? umi.formatMessage({
15192
15209
  id: "menu.".concat(item.name)
15193
- }).indexOf(name) !== -1 : true)) {
15210
+ }).indexOf(name) !== -1 : true) && btnAuth.find(function (d) {
15211
+ return d === item.code;
15212
+ })) {
15194
15213
  resultList.push(_objectSpread2(_objectSpread2({}, item), {}, {
15195
15214
  fullPathName: getFullPathName(item.name)
15196
15215
  }));
@@ -16477,70 +16496,10 @@ var CustomerMenuHeader = function CustomerMenuHeader(_ref) {
16477
16496
  var css_248z$m = ".customer_menu_content {\n color: #b1bad4;\n background: #141620;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n height: 40px;\n border-bottom: 1px solid #3d4047;\n}\n.customer_menu_content .ant-btn-link {\n color: #b1bad4 !important;\n font-size: 16px;\n height: 36px;\n}\n.menu_item {\n line-height: 30px;\n height: 30px;\n color: rgba(44, 47, 46);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.link_style:hover {\n background-color: #e4e7ed;\n cursor: pointer;\n color: #1890ff;\n}\n.sub_menu_content {\n box-shadow: 2px 0px 4px 0px rgba(185, 185, 185, 0.5);\n position: fixed;\n top: 50px;\n left: 140px;\n width: 200px;\n height: 100%;\n background-color: #fff;\n padding-top: 10px;\n z-index: 9999;\n}\n.tab_left_operate {\n display: flex;\n height: 28px;\n align-items: center;\n}\n.tab_left_operate > div {\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n cursor: pointer;\n}\n.tab_left_operate > div:last-child {\n box-shadow: 2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n}\n.tab_right_operate {\n height: 28px;\n width: 28px;\n font-size: 12px;\n color: #2C2F2ECC;\n display: flex;\n align-items: center;\n justify-content: center;\n border-right: 1px solid #E4E4E4;\n background-color: #fff;\n box-shadow: -2px -2px 4px 0px rgba(185, 185, 185, 0.9);\n z-index: 99;\n cursor: pointer;\n position: relative;\n}\n";
16478
16497
  styleInject(css_248z$m);
16479
16498
 
16480
- /*
16481
- * @Date: 2022-04-01 15:42:51
16482
- * @LastEditors: 追随
16483
- * @LastEditTime: 2022-09-16 20:53:23
16484
- */
16485
- var NoFoundPage = function NoFoundPage(props) {
16486
- return /*#__PURE__*/React__default['default'].createElement("div", {
16487
- style: {
16488
- height: 'calc(100vh - 88px)',
16489
- background: '#fff',
16490
- display: 'flex',
16491
- justifyContent: 'center',
16492
- alignItems: 'center'
16493
- }
16494
- }, /*#__PURE__*/React__default['default'].createElement(antd.Result, {
16495
- status: "404",
16496
- title: "404",
16497
- subTitle: /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u62B1\u6B49\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u8BE5\u9875\u9762\uFF01"), /*#__PURE__*/React__default['default'].createElement("div", null, "\u8BF7\u5173\u95ED\u5F53\u524D\u9875\u7B7E"))
16498
- }));
16499
- };
16500
-
16501
16499
  var _excluded$g = ["route"];
16502
16500
  var TabPane = antd.Tabs.TabPane;
16503
- var getId = function getId(str) {
16504
- // 找到最后一个 / 的位置
16505
- var lastSlashIndex = str.lastIndexOf("/");
16506
- // 如果找到了 /,则返回它后面的部分
16507
- if (lastSlashIndex !== -1) {
16508
- return str.substring(lastSlashIndex + 1);
16509
- } else {
16510
- // 如果没有找到 /,则返回整个字符串
16511
- return null;
16512
- }
16513
- };
16514
- // 获取权限菜单path&通用单据id
16515
- var getAuthMenuPathAndDocsId = function getAuthMenuPathAndDocsId(pathToRegexp) {
16516
- var limitedMenuData = localStorage.getItem(getLimitMenuDataKey()) ? JSON.parse(localStorage.getItem(getLimitMenuDataKey())) : [];
16517
- var menuKeys = [];
16518
- var docsId = [];
16519
- var getLimitedMenuKeys = function getLimitedMenuKeys(data) {
16520
- data.forEach(function (item) {
16521
- if (item.children && item.children.length > 0) {
16522
- getLimitedMenuKeys(item.children);
16523
- } else {
16524
- var originPath = item.path.replace(/^\/\w+\//, '/');
16525
- menuKeys.push(originPath);
16526
- if (pathToRegexp('/operation-and-maintenance-center/configuration-management/all-general-documents-specific/:id').test(originPath)) {
16527
- getId(originPath) && docsId.push(getId(originPath));
16528
- }
16529
- }
16530
- });
16531
- };
16532
- try {
16533
- getLimitedMenuKeys(limitedMenuData);
16534
- } catch (e) {}
16535
- return {
16536
- menuKeys: menuKeys,
16537
- docsId: docsId
16538
- };
16539
- };
16540
16501
  var UN_LISTTEN_DRP;
16541
16502
  var routerArray = [];
16542
- var authMenuPathList = [];
16543
- var docsId = [];
16544
16503
  var lastTwoRouterArray = [1, 2];
16545
16504
  var type = 'DraggableTabNode';
16546
16505
  var DraggableTabNode = function DraggableTabNode(_ref) {
@@ -16733,7 +16692,6 @@ var ItemMenu = function ItemMenu(props) {
16733
16692
  };
16734
16693
  var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16735
16694
  function BasicLayout(props) {
16736
- var _getAuthMenuPathAndDo, _getAuthMenuPathAndDo2;
16737
16695
  var _this;
16738
16696
  _classCallCheck(this, BasicLayout);
16739
16697
  _this = _callSuper(this, BasicLayout, [props]);
@@ -16750,41 +16708,14 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16750
16708
  return queryString;
16751
16709
  };
16752
16710
  _this.updateTree = function (Tree) {
16753
- var authMenuKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
16754
16711
  var treeData = Tree;
16755
16712
  var treeList = [];
16756
- // 是否为权限菜单路径
16757
- var getLimitedMenuPath = function getLimitedMenuPath(node) {
16758
- return authMenuKeys.some(function (item) {
16759
- return (node.path || '').includes(item);
16760
- });
16761
- };
16762
- // 是否为通用单据菜单路径
16763
- var getGenerateDocs = function getGenerateDocs(node) {
16764
- return (node.path || '').includes('all-general-documents');
16765
- };
16766
16713
  // 递归获取树列表
16767
16714
  var getTreeList = function getTreeList(data) {
16768
16715
  data.forEach(function (node) {
16769
16716
  if (node.routes && node.routes.length > 0) {
16770
16717
  getTreeList(node.routes);
16771
- return;
16772
- }
16773
- // todo:暂时处理非wujie环境不做404管控
16774
- if (!window.__POWERED_BY_WUJIE__) {
16775
- treeList.push({
16776
- tab: node.locale,
16777
- key: node.path,
16778
- locale: node.locale,
16779
- closable: true,
16780
- content: node.component,
16781
- name: node.name,
16782
- hideInMenu: node.hideInMenu,
16783
- isOnlyOnePage: node.isOnlyOnePage
16784
- });
16785
- return;
16786
- }
16787
- if (node.path === '/' || getLimitedMenuPath(node) || getGenerateDocs(node)) {
16718
+ } else {
16788
16719
  treeList.push({
16789
16720
  tab: node.locale,
16790
16721
  key: node.path,
@@ -16851,6 +16782,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
16851
16782
  return moment__default['default'](timeStr).add(8, 'hours').format(format) || '- -';
16852
16783
  };
16853
16784
  _this.onChange = function (key) {
16785
+ // console.log('onChange');
16854
16786
  if (key !== _this.state.activeKey) {
16855
16787
  _this.setState({
16856
16788
  activeKey: key
@@ -17136,9 +17068,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
17136
17068
  });
17137
17069
  }
17138
17070
  };
17139
- authMenuPathList = ((_getAuthMenuPathAndDo = getAuthMenuPathAndDocsId(props.pathToRegexp)) === null || _getAuthMenuPathAndDo === void 0 ? void 0 : _getAuthMenuPathAndDo.menuKeys) || [];
17140
- docsId = ((_getAuthMenuPathAndDo2 = getAuthMenuPathAndDocsId(props.pathToRegexp)) === null || _getAuthMenuPathAndDo2 === void 0 ? void 0 : _getAuthMenuPathAndDo2.docsId) || [];
17141
- routerArray = _this.updateTree(props.route.routes, authMenuPathList);
17071
+ routerArray = _this.updateTree(props.route.routes);
17142
17072
  var homeRouter = routerArray.filter(function (itemroute) {
17143
17073
  return itemroute.key === '/';
17144
17074
  })[0];
@@ -17238,28 +17168,7 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
17238
17168
  hideMenuArray = _this2$state.hideMenuArray;
17239
17169
  var newListenRouterState = _toConsumableArray(listenRouterState);
17240
17170
  var newListenRouterKey = _toConsumableArray(listenRouterKey);
17241
- /**
17242
- * 根据给定的路由数组和当前路由信息,筛选出与当前路由匹配的路由项。
17243
- *
17244
- * @param routerArray 路由数组,包含多个路由项,每个路由项有一个键(key)。
17245
- * @param route 当前的路由信息,包含路径(pathname)等信息。
17246
- * @param docsId 通用单据ID的数组,用于进一步筛选路由。
17247
- * @returns 返回与当前路由匹配的第一个路由项,如果没有匹配项则返回undefined。
17248
- */
17249
17171
  var replaceRouter = routerArray.filter(function (itemRoute) {
17250
- var _route$pathname, _route$pathname2;
17251
- // 单独处理通用单据预览
17252
- if (window.top !== window && !window.__POWERED_BY_WUJIE__ && ((_route$pathname = route.pathname) === null || _route$pathname === void 0 ? void 0 : _route$pathname.includes('all-general-documents'))) {
17253
- return pathToRegexp(itemRoute.key || '').test(route.pathname);
17254
- }
17255
- // 当路由路径包含'all-general-documents'时,按通用单据处理
17256
- if (((_route$pathname2 = route.pathname) === null || _route$pathname2 === void 0 ? void 0 : _route$pathname2.includes('all-general-documents')) && shouldUseAuth()) {
17257
- // 检查路由路径是否匹配路由项的键,并且路径中包含至少一个通用单据ID
17258
- return pathToRegexp(itemRoute.key || '').test(route.pathname) && docsId.some(function (item) {
17259
- return route.pathname.includes(item);
17260
- });
17261
- }
17262
- // 对于不包含'all-general-documents'的路径,只检查路由路径是否匹配路由项的键
17263
17172
  return pathToRegexp(itemRoute.key || '').test(route.pathname);
17264
17173
  })[0];
17265
17174
  var currentKey = '';
@@ -17283,15 +17192,20 @@ var BasicLayout = /*#__PURE__*/function (_React$PureComponent) {
17283
17192
  }
17284
17193
  if (!listenRouterKey.includes(currentKey)) {
17285
17194
  if (!replaceRouter) {
17286
- replaceRouter = {
17287
- content: currentKey,
17288
- key: currentKey,
17289
- name: '404',
17290
- tab: '404',
17291
- isNotFound: true
17292
- };
17293
- newListenRouterState = [].concat(_toConsumableArray(newListenRouterState), [_objectSpread2({}, replaceRouter)]);
17294
- newListenRouterKey = [].concat(_toConsumableArray(listenRouterKey), [currentKey]);
17195
+ var _routerArray$filter;
17196
+ replaceRouter = (_routerArray$filter = routerArray.filter(function (itemroute) {
17197
+ return itemroute.key === '/404';
17198
+ })) === null || _routerArray$filter === void 0 ? void 0 : _routerArray$filter[0];
17199
+ _this2.setState({
17200
+ listenRouterState: [].concat(_toConsumableArray(listenRouterState), [_objectSpread2(_objectSpread2({}, replaceRouter), {}, {
17201
+ key: currentKey,
17202
+ tab: '404'
17203
+ })]),
17204
+ activeKey: currentKey,
17205
+ listenRouterKey: [].concat(_toConsumableArray(listenRouterKey), [currentKey])
17206
+ }, function () {
17207
+ _this2.checkisNavSlide();
17208
+ });
17295
17209
  } else {
17296
17210
  var match = matchPath(route.pathname, {
17297
17211
  path: replaceRouter.key
@@ -17809,7 +17723,8 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
17809
17723
  getDictionaryTextByValue = _this$props4.getDictionaryTextByValue,
17810
17724
  timeFormat = _this$props4.timeFormat,
17811
17725
  transparentProps = _this$props4.transparentProps;
17812
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, item.isNotFound ? ( /*#__PURE__*/React__default['default'].createElement(NoFoundPage, null)) : /*#__PURE__*/React__default['default'].createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
17726
+ console.log('child wrapper conpent', this.props);
17727
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(item.content, _objectSpread2(_objectSpread2(_objectSpread2({
17813
17728
  getDictionarySource: getDictionarySource,
17814
17729
  getDictionaryTextByValue: getDictionaryTextByValue,
17815
17730
  timeFormat: timeFormat
@@ -17819,7 +17734,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
17819
17734
  }
17820
17735
  }]);
17821
17736
  }(React__default['default'].Component);
17822
- var index$5 = (function (props) {
17737
+ var index$6 = (function (props) {
17823
17738
  var _useModel = umi.useModel('@@initialState'),
17824
17739
  _useModel$initialStat = _useModel.initialState,
17825
17740
  initialState = _useModel$initialStat === void 0 ? {} : _useModel$initialStat;
@@ -18061,7 +17976,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
18061
17976
  };
18062
17977
  var FixedScrollBar$1 = /*#__PURE__*/React__default['default'].forwardRef(FixedScrollBar);
18063
17978
 
18064
- var index$6 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
17979
+ var index$7 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
18065
17980
  var _useState = React$1.useState(false),
18066
17981
  _useState2 = _slicedToArray(_useState, 2),
18067
17982
  show = _useState2[0],
@@ -27080,16 +26995,6 @@ var JsonQueryTable = /*#__PURE__*/React__default['default'].memo(function (props
27080
26995
  }, "setting"));
27081
26996
  });
27082
26997
 
27083
- var AuthButton = function AuthButton(props) {
27084
- var code = props.code,
27085
- children = props.children;
27086
- return /*#__PURE__*/React__default['default'].createElement("span", {
27087
- style: {
27088
- display: authFunc(code) ? 'inline-block' : 'none'
27089
- }
27090
- }, children);
27091
- };
27092
-
27093
26998
  var EllipsisTooltip = /*#__PURE__*/function (_React$Component) {
27094
26999
  function EllipsisTooltip() {
27095
27000
  var _this;
@@ -32571,7 +32476,7 @@ var BaseRule = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
32571
32476
  }, "\u6A21\u677F")))))));
32572
32477
  });
32573
32478
 
32574
- var index$7 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
32479
+ var index$8 = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
32575
32480
  var currentSceneId = (props === null || props === void 0 ? void 0 : props.id) || (props === null || props === void 0 ? void 0 : props.sceneId); // 规则模板id
32576
32481
  var extStrField01 = props === null || props === void 0 ? void 0 : props.extStrField01; // 上层业务关键字段
32577
32482
  var instanceName = props === null || props === void 0 ? void 0 : props.name; // 实例名称
@@ -32788,30 +32693,29 @@ exports.AddSelect = AddSelect;
32788
32693
  exports.AddSkcSelect = AddSkcSelect;
32789
32694
  exports.AddSkuSelect = AddSkuSelect;
32790
32695
  exports.AddSpuSelect = AddSpuSelect;
32791
- exports.AuthButton = AuthButton;
32792
32696
  exports.BillEntry = BillEntry;
32793
32697
  exports.BsCascader = BsCascader;
32794
- exports.BsLayout = index$5;
32698
+ exports.BsLayout = index$6;
32795
32699
  exports.BsSulaQueryTable = BsSulaQueryTable;
32796
32700
  exports.BusinessSearchSelect = BusinessSearchSelect$1;
32797
32701
  exports.BusinessTreeSearchSelect = BusinessTreeSearchSelect$1;
32798
- exports.CheckOneUser = index$1;
32702
+ exports.CheckOneUser = index$2;
32799
32703
  exports.ColumnSettingTable = ColumnSettingTable;
32800
32704
  exports.CommodityEntry = CommodityEntry;
32801
32705
  exports.DataImport = DataImport;
32802
32706
  exports.DataValidation = DataValidation;
32803
- exports.DetailPageWrapper = index$3;
32707
+ exports.DetailPageWrapper = index$4;
32804
32708
  exports.EllipsisTooltip = EllipsisTooltip;
32805
32709
  exports.ExportIcon = ExportIcon;
32806
32710
  exports.GuideWrapper = GuideWrapper;
32807
- exports.HomePageWrapper = index$4;
32711
+ exports.HomePageWrapper = index$5;
32808
32712
  exports.JsonQueryTable = JsonQueryTable;
32809
- exports.MoreTreeTable = index$6;
32713
+ exports.MoreTreeTable = index$7;
32810
32714
  exports.QueryMutipleInput = QueryMutipleInput;
32811
32715
  exports.RuleComponent = RuleObjectComponent;
32812
- exports.RuleSetter = index$7;
32716
+ exports.RuleSetter = index$8;
32813
32717
  exports.SearchSelect = SearchSelect;
32814
- exports.StateFlow = index$2;
32718
+ exports.StateFlow = index$3;
32815
32719
  exports.SulaColumnSettingTable = ColumnSettingSulaTable;
32816
32720
  exports.TableColumnSetting = TableColumnSetting;
32817
32721
  exports.TreeSearchSelect = TreeSearchSelect;
@@ -32853,5 +32757,4 @@ exports.removeTenantList = removeTenantList;
32853
32757
  exports.saveCurrentTenantId = saveCurrentTenantId;
32854
32758
  exports.saveTenantList = saveTenantList;
32855
32759
  exports.setConfigTableColumns = setConfigTableColumns;
32856
- exports.shouldUseAuth = shouldUseAuth;
32857
32760
  exports.uuid = uuid;