@bit-sun/business-component 2.3.24-alpha.2 → 2.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var axios = require('axios');
6
6
  var antd = require('antd');
7
7
  var _ = require('lodash');
8
8
  var umi = require('umi');
9
- var isEqual = require('lodash/isEqual');
9
+ var isEqual$1 = require('lodash/isEqual');
10
10
  var React = require('react');
11
11
  var moment$1 = require('moment');
12
12
  var icons = require('@ant-design/icons');
@@ -33,7 +33,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
33
33
 
34
34
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
35
35
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
36
- var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
36
+ var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual$1);
37
37
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
38
38
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment$1);
39
39
  var ProLayout__default = /*#__PURE__*/_interopDefaultLegacy(ProLayout);
@@ -155,6 +155,33 @@ axios__default['default'].interceptors.request.use(function (config) {
155
155
  return config;
156
156
  });
157
157
 
158
+ function _iterableToArrayLimit(arr, i) {
159
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
160
+ if (null != _i) {
161
+ var _s,
162
+ _e,
163
+ _x,
164
+ _r,
165
+ _arr = [],
166
+ _n = !0,
167
+ _d = !1;
168
+ try {
169
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
170
+ if (Object(_i) !== _i) return;
171
+ _n = !1;
172
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
173
+ } catch (err) {
174
+ _d = !0, _e = err;
175
+ } finally {
176
+ try {
177
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
178
+ } finally {
179
+ if (_d) throw _e;
180
+ }
181
+ }
182
+ return _arr;
183
+ }
184
+ }
158
185
  function ownKeys(object, enumerableOnly) {
159
186
  var keys = Object.keys(object);
160
187
  if (Object.getOwnPropertySymbols) {
@@ -311,14 +338,9 @@ function _regeneratorRuntime() {
311
338
  };
312
339
  }
313
340
  function maybeInvokeDelegate(delegate, context) {
314
- var method = delegate.iterator[context.method];
315
- if (undefined === method) {
316
- if (context.delegate = null, "throw" === context.method) {
317
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
318
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
319
- }
320
- return ContinueSentinel;
321
- }
341
+ var methodName = context.method,
342
+ method = delegate.iterator[methodName];
343
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
322
344
  var record = tryCatch(method, delegate.iterator, context.arg);
323
345
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
324
346
  var info = record.arg;
@@ -532,7 +554,7 @@ function _defineProperties(target, props) {
532
554
  descriptor.enumerable = descriptor.enumerable || false;
533
555
  descriptor.configurable = true;
534
556
  if ("value" in descriptor) descriptor.writable = true;
535
- Object.defineProperty(target, descriptor.key, descriptor);
557
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
536
558
  }
537
559
  }
538
560
  function _createClass(Constructor, protoProps, staticProps) {
@@ -544,6 +566,7 @@ function _createClass(Constructor, protoProps, staticProps) {
544
566
  return Constructor;
545
567
  }
546
568
  function _defineProperty(obj, key, value) {
569
+ key = _toPropertyKey(key);
547
570
  if (key in obj) {
548
571
  Object.defineProperty(obj, key, {
549
572
  value: value,
@@ -686,30 +709,6 @@ function _arrayWithHoles(arr) {
686
709
  function _iterableToArray(iter) {
687
710
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
688
711
  }
689
- function _iterableToArrayLimit(arr, i) {
690
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
691
- if (_i == null) return;
692
- var _arr = [];
693
- var _n = true;
694
- var _d = false;
695
- var _s, _e;
696
- try {
697
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
698
- _arr.push(_s.value);
699
- if (i && _arr.length === i) break;
700
- }
701
- } catch (err) {
702
- _d = true;
703
- _e = err;
704
- } finally {
705
- try {
706
- if (!_n && _i["return"] != null) _i["return"]();
707
- } finally {
708
- if (_d) throw _e;
709
- }
710
- }
711
- return _arr;
712
- }
713
712
  function _unsupportedIterableToArray(o, minLen) {
714
713
  if (!o) return;
715
714
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -729,6 +728,20 @@ function _nonIterableSpread() {
729
728
  function _nonIterableRest() {
730
729
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
731
730
  }
731
+ function _toPrimitive(input, hint) {
732
+ if (typeof input !== "object" || input === null) return input;
733
+ var prim = input[Symbol.toPrimitive];
734
+ if (prim !== undefined) {
735
+ var res = prim.call(input, hint || "default");
736
+ if (typeof res !== "object") return res;
737
+ throw new TypeError("@@toPrimitive must return a primitive value.");
738
+ }
739
+ return (hint === "string" ? String : Number)(input);
740
+ }
741
+ function _toPropertyKey(arg) {
742
+ var key = _toPrimitive(arg, "string");
743
+ return typeof key === "symbol" ? key : String(key);
744
+ }
732
745
 
733
746
  var checkQuantityAccuracy = function checkQuantityAccuracy(value, accuracy, errorInfo) {
734
747
  var errorMessage = _objectSpread2({
@@ -768,41 +781,52 @@ var precisionQuantity = function precisionQuantity(num, accuracy) {
768
781
  return '';
769
782
  };
770
783
 
771
- var simpleIsEqual = function simpleIsEqual(a, b) {
772
- return a === b;
773
- };
774
-
775
- function index$1 (resultFn, isEqual) {
776
- if (isEqual === void 0) {
777
- isEqual = simpleIsEqual;
778
- }
779
-
780
- var lastThis;
781
- var lastArgs = [];
782
- var lastResult;
783
- var calledOnce = false;
784
-
785
- var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
786
- return isEqual(newArg, lastArgs[index], index);
787
- };
788
-
789
- var result = function result() {
790
- for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
791
- newArgs[_key] = arguments[_key];
784
+ var safeIsNaN = Number.isNaN ||
785
+ function ponyfill(value) {
786
+ return typeof value === 'number' && value !== value;
787
+ };
788
+ function isEqual(first, second) {
789
+ if (first === second) {
790
+ return true;
792
791
  }
793
-
794
- if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
795
- return lastResult;
792
+ if (safeIsNaN(first) && safeIsNaN(second)) {
793
+ return true;
796
794
  }
795
+ return false;
796
+ }
797
+ function areInputsEqual(newInputs, lastInputs) {
798
+ if (newInputs.length !== lastInputs.length) {
799
+ return false;
800
+ }
801
+ for (var i = 0; i < newInputs.length; i++) {
802
+ if (!isEqual(newInputs[i], lastInputs[i])) {
803
+ return false;
804
+ }
805
+ }
806
+ return true;
807
+ }
797
808
 
798
- lastResult = resultFn.apply(this, newArgs);
799
- calledOnce = true;
800
- lastThis = this;
801
- lastArgs = newArgs;
802
- return lastResult;
803
- };
804
-
805
- return result;
809
+ function memoizeOne(resultFn, isEqual) {
810
+ if (isEqual === void 0) { isEqual = areInputsEqual; }
811
+ var lastThis;
812
+ var lastArgs = [];
813
+ var lastResult;
814
+ var calledOnce = false;
815
+ function memoized() {
816
+ var newArgs = [];
817
+ for (var _i = 0; _i < arguments.length; _i++) {
818
+ newArgs[_i] = arguments[_i];
819
+ }
820
+ if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
821
+ return lastResult;
822
+ }
823
+ lastResult = resultFn.apply(this, newArgs);
824
+ calledOnce = true;
825
+ lastThis = this;
826
+ lastArgs = newArgs;
827
+ return lastResult;
828
+ }
829
+ return memoized;
806
830
  }
807
831
 
808
832
  function styleInject(css, ref) {
@@ -981,32 +1005,35 @@ function handleCommonTimeRender(text, format) {
981
1005
  }
982
1006
  //设置queryTable默认列宽
983
1007
  var getItemDefaultWidth = function getItemDefaultWidth(item) {
1008
+ var _ref;
984
1009
  var defaultWidth = 200;
985
- var lowerCaseKey = (item.key || item.dataIndex).toLowerCase();
986
- switch (true) {
987
- case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
988
- defaultWidth = 60;
989
- break;
990
- case lowerCaseKey.indexOf('number') > -1:
991
- case lowerCaseKey.indexOf('quantity') > -1:
992
- case lowerCaseKey.indexOf('amount') > -1:
993
- defaultWidth = 90;
994
- break;
995
- case lowerCaseKey.indexOf('no') > -1:
996
- defaultWidth = 200;
997
- break;
998
- case lowerCaseKey.indexOf('code') > -1:
999
- defaultWidth = 170;
1000
- break;
1001
- case lowerCaseKey.indexOf('time') > -1:
1002
- defaultWidth = 130;
1003
- break;
1004
- case lowerCaseKey.indexOf('status') > -1:
1005
- defaultWidth = 100;
1006
- break;
1007
- case lowerCaseKey.indexOf('user') > -1:
1008
- defaultWidth = 130;
1009
- break;
1010
+ var lowerCaseKey = (_ref = item.key || item.dataIndex) === null || _ref === void 0 ? void 0 : _ref.toLowerCase();
1011
+ if (lowerCaseKey) {
1012
+ switch (true) {
1013
+ case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
1014
+ defaultWidth = 60;
1015
+ break;
1016
+ case lowerCaseKey.indexOf('number') > -1:
1017
+ case lowerCaseKey.indexOf('quantity') > -1:
1018
+ case lowerCaseKey.indexOf('amount') > -1:
1019
+ defaultWidth = 90;
1020
+ break;
1021
+ case lowerCaseKey.indexOf('no') > -1:
1022
+ defaultWidth = 200;
1023
+ break;
1024
+ case lowerCaseKey.indexOf('code') > -1:
1025
+ defaultWidth = 170;
1026
+ break;
1027
+ case lowerCaseKey.indexOf('time') > -1:
1028
+ defaultWidth = 130;
1029
+ break;
1030
+ case lowerCaseKey.indexOf('status') > -1:
1031
+ defaultWidth = 100;
1032
+ break;
1033
+ case lowerCaseKey.indexOf('user') > -1:
1034
+ defaultWidth = 130;
1035
+ break;
1036
+ }
1010
1037
  }
1011
1038
  return defaultWidth;
1012
1039
  };
@@ -1113,7 +1140,7 @@ var formatter = function formatter(data, parentAuthority, parentName) {
1113
1140
  return item;
1114
1141
  });
1115
1142
  };
1116
- var memoizeOneFormatter = index$1(formatter, isEqual__default['default']);
1143
+ var memoizeOneFormatter = memoizeOne(formatter, isEqual__default['default']);
1117
1144
  var go2BackAndClose = function go2BackAndClose() {
1118
1145
  localStorage.setItem(ENUM.BROWSER_CACHE.CHILD_APP_BACK, 1);
1119
1146
  umi.history.goBack();
@@ -3454,6 +3481,9 @@ var SearchSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
3454
3481
  }, currentSelectProps), {}, {
3455
3482
  getPopupContainer: function getPopupContainer(triggerNode) {
3456
3483
  return _getPopupContainer && _getPopupContainer(triggerNode) || triggerNode.parentElement;
3484
+ },
3485
+ onClear: function onClear() {
3486
+ run();
3457
3487
  }
3458
3488
  }), items.map(function (item) {
3459
3489
  return /*#__PURE__*/React__default['default'].createElement(Option$1, {
@@ -4222,30 +4252,32 @@ var getItemDefaultWidth$1 = function getItemDefaultWidth(item) {
4222
4252
  var _ref;
4223
4253
  var defaultWidth = 200;
4224
4254
  var lowerCaseKey = (_ref = item.key || item.dataIndex) === null || _ref === void 0 ? void 0 : _ref.toLowerCase();
4225
- switch (true) {
4226
- case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
4227
- defaultWidth = 60;
4228
- break;
4229
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('number')) > -1:
4230
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('quantity')) > -1:
4231
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('amount')) > -1:
4232
- defaultWidth = 90;
4233
- break;
4234
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('no')) > -1:
4235
- defaultWidth = 200;
4236
- break;
4237
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('code')) > -1:
4238
- defaultWidth = 170;
4239
- break;
4240
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('time')) > -1:
4241
- defaultWidth = 130;
4242
- break;
4243
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('status')) > -1:
4244
- defaultWidth = 100;
4245
- break;
4246
- case (lowerCaseKey === null || lowerCaseKey === void 0 ? void 0 : lowerCaseKey.indexOf('user')) > -1:
4247
- defaultWidth = 130;
4248
- break;
4255
+ if (lowerCaseKey) {
4256
+ switch (true) {
4257
+ case (item === null || item === void 0 ? void 0 : item.title) === '操作' || lowerCaseKey === 'operate':
4258
+ defaultWidth = 60;
4259
+ break;
4260
+ case lowerCaseKey.indexOf('number') > -1:
4261
+ case lowerCaseKey.indexOf('quantity') > -1:
4262
+ case lowerCaseKey.indexOf('amount') > -1:
4263
+ defaultWidth = 90;
4264
+ break;
4265
+ case lowerCaseKey.indexOf('no') > -1:
4266
+ defaultWidth = 200;
4267
+ break;
4268
+ case lowerCaseKey.indexOf('code') > -1:
4269
+ defaultWidth = 170;
4270
+ break;
4271
+ case lowerCaseKey.indexOf('time') > -1:
4272
+ defaultWidth = 130;
4273
+ break;
4274
+ case lowerCaseKey.indexOf('status') > -1:
4275
+ defaultWidth = 100;
4276
+ break;
4277
+ case lowerCaseKey.indexOf('user') > -1:
4278
+ defaultWidth = 130;
4279
+ break;
4280
+ }
4249
4281
  }
4250
4282
  return defaultWidth;
4251
4283
  };
@@ -4270,8 +4302,6 @@ var getSelectDataList = function getSelectDataList(record, item, selectKey) {
4270
4302
  }
4271
4303
  return result;
4272
4304
  };
4273
-
4274
- var _excluded$3 = ["onResize", "width"];
4275
4305
  var loadSelectSource = function loadSelectSource(url, params) {
4276
4306
  return new Promise(function (resolve, reject) {
4277
4307
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(params))).then(function (result) {
@@ -4279,6 +4309,7 @@ var loadSelectSource = function loadSelectSource(url, params) {
4279
4309
  result = result.data;
4280
4310
  if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
4281
4311
  antd.message.error(result.msg);
4312
+ resolve(result);
4282
4313
  return;
4283
4314
  }
4284
4315
  resolve(result);
@@ -4287,38 +4318,6 @@ var loadSelectSource = function loadSelectSource(url, params) {
4287
4318
  });
4288
4319
  });
4289
4320
  };
4290
- var checkSpuMatchCode = function checkSpuMatchCode(data) {
4291
- return new Promise(function (resolve, reject) {
4292
- axios__default['default'].post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
4293
- var _result3, _result4;
4294
- result = result.data;
4295
- if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
4296
- antd.message.error(result.msg);
4297
- reject(false);
4298
- return;
4299
- }
4300
- resolve(result);
4301
- }).catch(function (err) {
4302
- reject(err);
4303
- });
4304
- });
4305
- };
4306
- var ResizeableTitle = function ResizeableTitle(props) {
4307
- var onResize = props.onResize,
4308
- width = props.width,
4309
- restProps = _objectWithoutProperties(props, _excluded$3);
4310
- if (!width) {
4311
- return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread2({}, restProps));
4312
- }
4313
- return /*#__PURE__*/React__default['default'].createElement(reactResizable.Resizable, {
4314
- width: width,
4315
- height: 0,
4316
- onResize: onResize,
4317
- draggableOpts: {
4318
- enableUserSelectHack: false
4319
- }
4320
- }, /*#__PURE__*/React__default['default'].createElement("th", _objectSpread2({}, restProps)));
4321
- };
4322
4321
  var formatSource = function formatSource(reData, position, changePosition, changeSearchForm) {
4323
4322
  var _reData$position;
4324
4323
  var resKeyValue = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ['code', 'name'];
@@ -4358,6 +4357,52 @@ var formatTreeDataSource = function formatTreeDataSource(reData, position, chang
4358
4357
  }) || [];
4359
4358
  changeSearchForm[changePosition].field.props.treeData = formatData;
4360
4359
  };
4360
+ var formatFormSourceList = function formatFormSourceList(x, loadList, tableSearchForm) {
4361
+ loadList.forEach(function (i, index) {
4362
+ if (i.resType == 'list') {
4363
+ var resKeyValue = i.resKeyValue || ['code', 'name'];
4364
+ formatSource(x, index, i.resPosition, tableSearchForm, resKeyValue);
4365
+ }
4366
+ if (i.resType == 'treeList') {
4367
+ var _resKeyValue = i.resKeyValue || ['id', 'name'];
4368
+ formatTreeDataSource(x, index, i.resPosition, tableSearchForm, _resKeyValue);
4369
+ }
4370
+ });
4371
+ };
4372
+
4373
+ var _excluded$3 = ["onResize", "width"];
4374
+ var checkSpuMatchCode = function checkSpuMatchCode(data) {
4375
+ return new Promise(function (resolve, reject) {
4376
+ axios__default['default'].post("/stock/rwFrontRecordSkcDetail/checkSpuMatchCode", data).then(function (result) {
4377
+ var _result, _result2;
4378
+ result = result.data;
4379
+ if (((_result = result) === null || _result === void 0 ? void 0 : _result.status) && result.status !== '0' || ((_result2 = result) === null || _result2 === void 0 ? void 0 : _result2.code) && result.code !== '000000') {
4380
+ antd.message.error(result.msg);
4381
+ reject(false);
4382
+ return;
4383
+ }
4384
+ resolve(result);
4385
+ }).catch(function (err) {
4386
+ reject(err);
4387
+ });
4388
+ });
4389
+ };
4390
+ var ResizeableTitle = function ResizeableTitle(props) {
4391
+ var onResize = props.onResize,
4392
+ width = props.width,
4393
+ restProps = _objectWithoutProperties(props, _excluded$3);
4394
+ if (!width) {
4395
+ return /*#__PURE__*/React__default['default'].createElement("th", _objectSpread2({}, restProps));
4396
+ }
4397
+ return /*#__PURE__*/React__default['default'].createElement(reactResizable.Resizable, {
4398
+ width: width,
4399
+ height: 0,
4400
+ onResize: onResize,
4401
+ draggableOpts: {
4402
+ enableUserSelectHack: false
4403
+ }
4404
+ }, /*#__PURE__*/React__default['default'].createElement("th", _objectSpread2({}, restProps)));
4405
+ };
4361
4406
  var initTableCode = {
4362
4407
  'sku': ['skuSelect-tableOptionsToChoosePartCode', 'skuSelect-tableSelectedItemPartCode'],
4363
4408
  'skc': ['skcSelect-tableOptionsToChoosePartCode', 'skcSelect-tableSelectedItemPartCode'],
@@ -4390,9 +4435,7 @@ var AddSelect = function AddSelect(props) {
4390
4435
  _props$businessType = props.businessType,
4391
4436
  businessType = _props$businessType === void 0 ? 'sku' : _props$businessType,
4392
4437
  _props$isAllowRepeate = props.isAllowRepeatedSelect,
4393
- isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate,
4394
- _props$noUseItemEanco = props.noUseItemEancode,
4395
- noUseItemEancode = _props$noUseItemEanco === void 0 ? true : _props$noUseItemEanco;
4438
+ isAllowRepeatedSelect = _props$isAllowRepeate === void 0 ? false : _props$isAllowRepeate;
4396
4439
  var _ref = requestConfig || {},
4397
4440
  url = _ref.url,
4398
4441
  otherParams = _ref.otherParams,
@@ -4976,10 +5019,10 @@ var AddSelect = function AddSelect(props) {
4976
5019
  currentPage: currentPage
4977
5020
  }, otherParams), fixedParam), params);
4978
5021
  axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(queryParams))).then(function (result) {
4979
- var _result5, _result6;
5022
+ var _result3, _result4;
4980
5023
  setFetching(false);
4981
5024
  result = result.data;
4982
- if (((_result5 = result) === null || _result5 === void 0 ? void 0 : _result5.status) && result.status !== '0' || ((_result6 = result) === null || _result6 === void 0 ? void 0 : _result6.code) && result.code !== '000000') {
5025
+ if (((_result3 = result) === null || _result3 === void 0 ? void 0 : _result3.status) && result.status !== '0' || ((_result4 = result) === null || _result4 === void 0 ? void 0 : _result4.code) && result.code !== '000000') {
4983
5026
  antd.message.error(result.msg);
4984
5027
  return;
4985
5028
  }
@@ -5060,65 +5103,14 @@ var AddSelect = function AddSelect(props) {
5060
5103
  };
5061
5104
 
5062
5105
  React.useEffect(function () {
5063
- if (businessType == 'sku') {
5064
- Promise.all([loadSelectSource("/items/brand/queryBrandList", {
5065
- pageSize: 5000,
5066
- currentPage: 1,
5067
- 'ctl-withAuth': true
5068
- }), loadSelectSource("/items/category/queryCategoryTree", {
5069
- pageSize: 5000,
5070
- currentPage: 1
5071
- })]).then(function (x) {
5072
- var searchPosition1 = noUseItemEancode ? 3 : 2;
5073
- var searchPosition2 = noUseItemEancode ? 4 : 3;
5074
- formatSource(x, 0, searchPosition1, tableSearchForm, ['id', 'name']);
5075
- formatTreeDataSource(x, 1, searchPosition2, tableSearchForm);
5076
- });
5077
- }
5078
- if (businessType == 'skc') {
5079
- Promise.all([loadSelectSource("/items/item/propertyValue/sizeBySkcConfig", {
5080
- pageSize: 10000,
5081
- currentPage: 1,
5082
- type: 2 // 类型:1尺码;2颜色
5083
- }), loadSelectSource("/items/category/queryCategoryTree", {
5084
- pageSize: 5000,
5085
- currentPage: 1
5086
- }), loadSelectSource("/items/class/withProperty", {
5087
- pageSize: 5000,
5088
- currentPage: 1
5089
- }), loadSelectSource("/items/brand/queryBrandList", {
5090
- pageSize: 5000,
5091
- currentPage: 1,
5092
- 'ctl-withAuth': true
5093
- })]).then(function (x) {
5094
- formatSource(x, 0, 3, tableSearchForm, ['value', 'value']);
5095
- formatTreeDataSource(x, 1, 4, tableSearchForm);
5096
- formatSource(x, 2, 5, tableSearchForm, ['id', 'name']);
5097
- formatSource(x, 3, 6, tableSearchForm, ['id', 'name']);
5098
- });
5099
- }
5100
- if (businessType == 'spu') {
5101
- Promise.all([loadSelectSource("/user/orgViewNode/listNoPage", {
5102
- 'qp-employeeId-eq': getEmployeeId(),
5103
- 'qp-orgViewCode-eq': 'business-organizational-view',
5104
- 'ctl-withDefaultOrg': true
5105
- }), loadSelectSource("/items/brand/queryBrandList", {
5106
- pageSize: 5000,
5107
- currentPage: 1,
5108
- 'ctl-withAuth': true
5109
- }), loadSelectSource("/items/category/queryCategoryTree", {
5110
- pageSize: 5000,
5111
- currentPage: 1
5112
- }), loadSelectSource("/items/class/withProperty", {
5113
- pageSize: 5000,
5114
- currentPage: 1
5115
- })]).then(function (x) {
5116
- formatSource(x, 0, 2, tableSearchForm, ['targetId', 'name']);
5117
- formatSource(x, 1, 3, tableSearchForm, ['id', 'name']);
5118
- formatTreeDataSource(x, 2, 4, tableSearchForm);
5119
- formatSource(x, 3, 5, tableSearchForm, ['id', 'name']);
5120
- });
5121
- }
5106
+ var pList = (modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.promiseLoadList) || [];
5107
+ if (!(pList === null || pList === void 0 ? void 0 : pList.length)) return;
5108
+ var list = pList.map(function (i) {
5109
+ return loadSelectSource(i.url, i.params);
5110
+ });
5111
+ Promise.all(list).then(function (x) {
5112
+ formatFormSourceList(x, pList, tableSearchForm);
5113
+ });
5122
5114
  }, [businessType]);
5123
5115
  React.useEffect(function () {
5124
5116
  if (value) {
@@ -5399,10 +5391,10 @@ var AddSelect = function AddSelect(props) {
5399
5391
  setSelectedRowKeys([]);
5400
5392
  } else {
5401
5393
  setPopValue(popvalue.filter(function (item) {
5402
- return item.skuCode !== record.skuCode;
5394
+ return item[selectRowKey] !== record[selectRowKey];
5403
5395
  }));
5404
5396
  setSelectedRowKeys(_toConsumableArray(selectedRowKeys.filter(function (item) {
5405
- return item !== record.skuCode;
5397
+ return item !== record[selectRowKey];
5406
5398
  })));
5407
5399
  }
5408
5400
  };
@@ -8735,9 +8727,16 @@ var BusinessSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Busines
8735
8727
  // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
8736
8728
  function handleSelectColumn(c, parentProps) {
8737
8729
  var result = c;
8730
+ var showColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showColumns) || [];
8738
8731
  var exceptColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptColumns) || [];
8739
8732
  var coverColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverColumns) || [];
8740
8733
  var additionColumns = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.additionColumns) || [];
8734
+ // 仅展示内容
8735
+ if (showColumns === null || showColumns === void 0 ? void 0 : showColumns.length) {
8736
+ result = result.filter(function (i) {
8737
+ return showColumns.includes(i.dataIndex);
8738
+ });
8739
+ }
8741
8740
  // 过滤不需要展示内容
8742
8741
  if (exceptColumns === null || exceptColumns === void 0 ? void 0 : exceptColumns.length) {
8743
8742
  result = result.filter(function (i) {
@@ -8756,6 +8755,57 @@ function handleSelectColumn(c, parentProps) {
8756
8755
  }
8757
8756
  return result;
8758
8757
  }
8758
+ function handleSearchForm(c, parentProps) {
8759
+ var result = c;
8760
+ var showTableSearchForm = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showTableSearchForm) || [];
8761
+ var exceptTableSearchForm = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptTableSearchForm) || [];
8762
+ var coverTableSearchForm = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverTableSearchForm) || [];
8763
+ // 仅展示内容
8764
+ if (showTableSearchForm === null || showTableSearchForm === void 0 ? void 0 : showTableSearchForm.length) {
8765
+ result = result.filter(function (i) {
8766
+ return showTableSearchForm.includes(i.name);
8767
+ });
8768
+ }
8769
+ // 过滤不需要展示内容
8770
+ if (exceptTableSearchForm === null || exceptTableSearchForm === void 0 ? void 0 : exceptTableSearchForm.length) {
8771
+ result = result.filter(function (i) {
8772
+ return !exceptTableSearchForm.includes(i.name);
8773
+ });
8774
+ }
8775
+ // 覆盖内容
8776
+ if (coverTableSearchForm === null || coverTableSearchForm === void 0 ? void 0 : coverTableSearchForm.length) {
8777
+ result = coverTableSearchForm;
8778
+ }
8779
+ return result;
8780
+ }
8781
+ function handleFormSearchSourceLoad(c, parentProps) {
8782
+ var result = c;
8783
+ var showTableFormSearchSourceLoad = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.showTableFormSearchSourceLoad) || [];
8784
+ var exceptTableFormSearchSourceLoad = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.exceptTableFormSearchSourceLoad) || [];
8785
+ var coverTableFormSearchSourceLoad = (parentProps === null || parentProps === void 0 ? void 0 : parentProps.coverTableFormSearchSourceLoad) || [];
8786
+ var noNeedTableFormSearchSourceLoad = parentProps === null || parentProps === void 0 ? void 0 : parentProps.noNeedTableFormSearchSourceLoad;
8787
+ // 仅展示内容
8788
+ if (showTableFormSearchSourceLoad === null || showTableFormSearchSourceLoad === void 0 ? void 0 : showTableFormSearchSourceLoad.length) {
8789
+ result = result.filter(function (i) {
8790
+ return showTableFormSearchSourceLoad.includes(i.url);
8791
+ });
8792
+ }
8793
+ // 过滤不需要展示内容
8794
+ if (exceptTableFormSearchSourceLoad === null || exceptTableFormSearchSourceLoad === void 0 ? void 0 : exceptTableFormSearchSourceLoad.length) {
8795
+ result = result.filter(function (i) {
8796
+ return !exceptTableFormSearchSourceLoad.includes(i.url);
8797
+ });
8798
+ }
8799
+ // 覆盖内容
8800
+ if (coverTableFormSearchSourceLoad === null || coverTableFormSearchSourceLoad === void 0 ? void 0 : coverTableFormSearchSourceLoad.length) {
8801
+ result = coverTableFormSearchSourceLoad;
8802
+ }
8803
+ // 不需要默认请求
8804
+ if (noNeedTableFormSearchSourceLoad) {
8805
+ result = [];
8806
+ }
8807
+ return result;
8808
+ }
8759
8809
  var AddSkuSelect = function AddSkuSelect(parProps) {
8760
8810
  var _parProps$requestConf, _parProps$requestConf2;
8761
8811
  var selectProps = {
@@ -8862,234 +8912,258 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
8862
8912
  dataIndex: 'propertyNameAndValue'
8863
8913
  }]);
8864
8914
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
8865
- var props = {
8866
- buttonText: parProps.buttonText || '新增',
8867
- buttonProps: parProps.buttonProps || {},
8868
- tableCodeList: parProps.tableCodeList || [],
8869
- value: value,
8870
- // labelInValue: true, // 非必填 默认为false
8871
- requestConfig: _objectSpread2({
8872
- url: "/items/sku/pager/v2",
8873
- filter: 'qp-name-like',
8874
- otherParams: _objectSpread2({
8875
- 'qp-combination-eq': false,
8876
- 'qp-approveStatus-eq': 1,
8877
- 'qp-status-eq': 1
8878
- }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.addOtherParams) || {}),
8879
- mappingTextField: 'name',
8880
- mappingValueField: 'skuCode'
8881
- }, parProps.requestConfig),
8882
- selectProps: selectProps,
8883
- onChange: function onChange(value) {
8884
- console.log(value);
8885
- setValue(value);
8915
+ var initialTableColumn = [{
8916
+ title: 'SKU编码',
8917
+ width: 150,
8918
+ dataIndex: 'skuCode'
8919
+ }, {
8920
+ title: 'SKU名称',
8921
+ width: 200,
8922
+ ellipsis: {
8923
+ showTitle: false
8886
8924
  },
8887
- beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
8888
- onSaveCallback: parProps.onSaveCallback,
8889
- businessType: 'sku',
8890
- isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect),
8891
- noUseItemEancode: isNoUseItemBarcode
8892
- };
8893
- var modalTableProps = {
8894
- modalTableTitle: '选择商品',
8895
- tableSearchForm: [{
8896
- name: 'qp-skuCode-like',
8897
- label: 'SKU编码'
8898
- }, {
8899
- name: 'qp-skuName-like',
8900
- label: 'SKU名称'
8901
- }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8902
- name: 'qp-code-in',
8903
- label: '商品条码',
8904
- field: {
8905
- type: 'multipleQueryInput',
8906
- props: _objectSpread2({}, ((_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.itemEancodeValueRequestConfig) || {})
8907
- }
8908
- }]), [{
8909
- name: 'qp-brandId-in',
8910
- type: 'select',
8911
- label: '品牌',
8912
- field: {
8913
- type: 'select',
8914
- props: {
8915
- mode: 'multiple',
8916
- notFoundContent: '暂无数据',
8917
- allowClear: true,
8918
- showSearch: true,
8919
- showArrow: true,
8920
- maxTagCount: 1,
8921
- optionFilterProp: 'children',
8922
- filterOption: function filterOption(input, option) {
8923
- return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
8924
- }
8925
- }
8926
- }
8927
- }, {
8928
- name: 'qp-categoryId-in',
8929
- type: 'treeSelect',
8930
- label: '类目',
8931
- field: {
8932
- type: 'treeSelect',
8933
- props: {
8934
- treeData: [],
8935
- treeCheckable: true,
8936
- showSearch: true,
8937
- allowClear: true,
8938
- showArrow: true,
8939
- treeNodeFilterProp: 'title',
8940
- treeDefaultExpandAll: true,
8941
- maxTagCount: 1,
8942
- placeholder: '请选择',
8943
- style: {
8944
- width: '100%'
8945
- },
8946
- dropdownStyle: {
8947
- maxHeight: 400,
8948
- maxWidth: 100,
8949
- overflow: 'auto'
8950
- }
8925
+ render: function render(text) {
8926
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8927
+ placement: "topLeft",
8928
+ title: text
8929
+ }, text);
8930
+ },
8931
+ dataIndex: 'name'
8932
+ }, {
8933
+ title: '图片',
8934
+ dataIndex: 'itemUrl',
8935
+ width: 200,
8936
+ ellipsis: {
8937
+ showTitle: false
8938
+ },
8939
+ render: function render(text, record) {
8940
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8941
+ placement: "topLeft",
8942
+ title: text
8943
+ }, tableColumnsImage(getSkuImg(record), {
8944
+ width: 20,
8945
+ height: 20
8946
+ }));
8947
+ }
8948
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8949
+ title: '商品条码',
8950
+ width: 100,
8951
+ ellipsis: {
8952
+ showTitle: false
8953
+ },
8954
+ dataIndex: 'itemEancode',
8955
+ render: function render(text) {
8956
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8957
+ placement: "topLeft",
8958
+ title: text
8959
+ }, text);
8960
+ }
8961
+ }]), [{
8962
+ title: '所属SPU名称',
8963
+ width: 100,
8964
+ ellipsis: {
8965
+ showTitle: false
8966
+ },
8967
+ dataIndex: 'itemName',
8968
+ render: function render(text) {
8969
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8970
+ placement: "topLeft",
8971
+ title: text
8972
+ }, text);
8973
+ }
8974
+ }, {
8975
+ title: '所属SPU编码',
8976
+ width: 100,
8977
+ ellipsis: {
8978
+ showTitle: false
8979
+ },
8980
+ dataIndex: 'itemCode',
8981
+ render: function render(text) {
8982
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8983
+ placement: "topLeft",
8984
+ title: text
8985
+ }, text);
8986
+ }
8987
+ }, {
8988
+ title: '外部编码',
8989
+ width: 100,
8990
+ ellipsis: {
8991
+ showTitle: false
8992
+ },
8993
+ render: function render(text) {
8994
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8995
+ placement: "topLeft",
8996
+ title: text
8997
+ }, text);
8998
+ },
8999
+ dataIndex: 'externalCode'
9000
+ }, {
9001
+ title: '规格',
9002
+ width: 100,
9003
+ ellipsis: {
9004
+ showTitle: false
9005
+ },
9006
+ render: function render(text) {
9007
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9008
+ placement: "topLeft",
9009
+ title: text
9010
+ }, text);
9011
+ },
9012
+ dataIndex: 'propertyNameAndValue'
9013
+ }, {
9014
+ title: '类目',
9015
+ width: 100,
9016
+ ellipsis: {
9017
+ showTitle: false
9018
+ },
9019
+ render: function render(text) {
9020
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9021
+ placement: "topLeft",
9022
+ title: text
9023
+ }, text);
9024
+ },
9025
+ dataIndex: 'categoryName'
9026
+ }, {
9027
+ title: '品类',
9028
+ width: 100,
9029
+ ellipsis: {
9030
+ showTitle: false
9031
+ },
9032
+ render: function render(text) {
9033
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9034
+ placement: "topLeft",
9035
+ title: text
9036
+ }, text);
9037
+ },
9038
+ dataIndex: 'className'
9039
+ }, {
9040
+ title: '品牌',
9041
+ width: 100,
9042
+ ellipsis: {
9043
+ showTitle: false
9044
+ },
9045
+ render: function render(text) {
9046
+ return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9047
+ placement: "topLeft",
9048
+ title: text
9049
+ }, text);
9050
+ },
9051
+ dataIndex: 'brandName'
9052
+ }]);
9053
+ var mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
9054
+ var initialTableSearchForm = [{
9055
+ name: 'qp-skuCode-like',
9056
+ label: 'SKU编码'
9057
+ }, {
9058
+ name: 'qp-skuName-like',
9059
+ label: 'SKU名称'
9060
+ }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
9061
+ name: 'qp-code-in',
9062
+ label: '商品条码',
9063
+ field: {
9064
+ type: 'multipleQueryInput',
9065
+ props: _objectSpread2({}, ((_parProps$requestConf = parProps.requestConfig) === null || _parProps$requestConf === void 0 ? void 0 : _parProps$requestConf.itemEancodeValueRequestConfig) || {})
9066
+ }
9067
+ }]), [{
9068
+ name: 'qp-brandId-in',
9069
+ type: 'select',
9070
+ label: '品牌',
9071
+ field: {
9072
+ type: 'select',
9073
+ props: {
9074
+ mode: 'multiple',
9075
+ notFoundContent: '暂无数据',
9076
+ allowClear: true,
9077
+ showSearch: true,
9078
+ showArrow: true,
9079
+ maxTagCount: 1,
9080
+ optionFilterProp: 'children',
9081
+ filterOption: function filterOption(input, option) {
9082
+ return option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
8951
9083
  }
8952
9084
  }
8953
- }]),
8954
- tableColumns: [{
8955
- title: 'SKU编码',
8956
- width: 150,
8957
- dataIndex: 'skuCode'
8958
- }, {
8959
- title: 'SKU名称',
8960
- width: 200,
8961
- ellipsis: {
8962
- showTitle: false
8963
- },
8964
- render: function render(text) {
8965
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8966
- placement: "topLeft",
8967
- title: text
8968
- }, text);
8969
- },
8970
- dataIndex: 'name'
8971
- }, {
8972
- title: '图片',
8973
- dataIndex: 'itemUrl',
8974
- width: 200,
8975
- ellipsis: {
8976
- showTitle: false
8977
- },
8978
- render: function render(text, record) {
8979
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8980
- placement: "topLeft",
8981
- title: text
8982
- }, tableColumnsImage(getSkuImg(record), {
8983
- width: 20,
8984
- height: 20
8985
- }));
8986
- }
8987
- }].concat(_toConsumableArray(isNoUseItemBarcode ? [] : [{
8988
- title: '商品条码',
8989
- width: 100,
8990
- ellipsis: {
8991
- showTitle: false
8992
- },
8993
- dataIndex: 'itemEancode',
8994
- render: function render(text) {
8995
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
8996
- placement: "topLeft",
8997
- title: text
8998
- }, text);
8999
- }
9000
- }]), [{
9001
- title: '所属SPU名称',
9002
- width: 100,
9003
- ellipsis: {
9004
- showTitle: false
9005
- },
9006
- dataIndex: 'itemName',
9007
- render: function render(text) {
9008
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9009
- placement: "topLeft",
9010
- title: text
9011
- }, text);
9012
- }
9013
- }, {
9014
- title: '所属SPU编码',
9015
- width: 100,
9016
- ellipsis: {
9017
- showTitle: false
9018
- },
9019
- dataIndex: 'itemCode',
9020
- render: function render(text) {
9021
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9022
- placement: "topLeft",
9023
- title: text
9024
- }, text);
9085
+ }
9086
+ }, {
9087
+ name: 'qp-categoryId-in',
9088
+ type: 'treeSelect',
9089
+ label: '类目',
9090
+ field: {
9091
+ type: 'treeSelect',
9092
+ props: {
9093
+ treeData: [],
9094
+ treeCheckable: true,
9095
+ showSearch: true,
9096
+ allowClear: true,
9097
+ showArrow: true,
9098
+ treeNodeFilterProp: 'title',
9099
+ treeDefaultExpandAll: true,
9100
+ maxTagCount: 1,
9101
+ placeholder: '请选择',
9102
+ style: {
9103
+ width: '100%'
9104
+ },
9105
+ dropdownStyle: {
9106
+ maxHeight: 400,
9107
+ maxWidth: 100,
9108
+ overflow: 'auto'
9109
+ }
9025
9110
  }
9026
- }, {
9027
- title: '外部编码',
9028
- width: 100,
9029
- ellipsis: {
9030
- showTitle: false
9031
- },
9032
- render: function render(text) {
9033
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9034
- placement: "topLeft",
9035
- title: text
9036
- }, text);
9037
- },
9038
- dataIndex: 'externalCode'
9039
- }, {
9040
- title: '规格',
9041
- width: 100,
9042
- ellipsis: {
9043
- showTitle: false
9044
- },
9045
- render: function render(text) {
9046
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9047
- placement: "topLeft",
9048
- title: text
9049
- }, text);
9050
- },
9051
- dataIndex: 'propertyNameAndValue'
9052
- }, {
9053
- title: '类目',
9054
- width: 100,
9055
- ellipsis: {
9056
- showTitle: false
9057
- },
9058
- render: function render(text) {
9059
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9060
- placement: "topLeft",
9061
- title: text
9062
- }, text);
9063
- },
9064
- dataIndex: 'categoryName'
9065
- }, {
9066
- title: '品类',
9067
- width: 100,
9068
- ellipsis: {
9069
- showTitle: false
9070
- },
9071
- render: function render(text) {
9072
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9073
- placement: "topLeft",
9074
- title: text
9075
- }, text);
9076
- },
9077
- dataIndex: 'className'
9078
- }, {
9079
- title: '品牌',
9080
- width: 100,
9081
- ellipsis: {
9082
- showTitle: false
9083
- },
9084
- render: function render(text) {
9085
- return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
9086
- placement: "topLeft",
9087
- title: text
9088
- }, text);
9089
- },
9090
- dataIndex: 'brandName'
9091
- }]),
9092
- selectColumn: mTpSelectColumn
9111
+ }
9112
+ }], _toConsumableArray((parProps === null || parProps === void 0 ? void 0 : parProps.addTableSearchForm) || []));
9113
+ var mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
9114
+ var initialPromiseLoadList = [{
9115
+ url: "/items/brand/queryBrandList",
9116
+ params: {
9117
+ pageSize: 5000,
9118
+ currentPage: 1,
9119
+ 'ctl-withAuth': true
9120
+ },
9121
+ resType: 'list',
9122
+ resPosition: isNoUseItemBarcode ? 2 : 3,
9123
+ resKeyValue: ['id', 'name']
9124
+ }, {
9125
+ url: "/items/category/queryCategoryTree",
9126
+ params: {
9127
+ pageSize: 5000,
9128
+ currentPage: 1
9129
+ },
9130
+ resType: 'treeList',
9131
+ resPosition: isNoUseItemBarcode ? 3 : 4
9132
+ }];
9133
+ var mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
9134
+ var props = {
9135
+ buttonText: parProps.buttonText || '新增',
9136
+ buttonProps: parProps.buttonProps || {},
9137
+ tableCodeList: parProps.tableCodeList || [],
9138
+ value: value,
9139
+ // labelInValue: true, // 非必填 默认为false
9140
+ requestConfig: _objectSpread2({
9141
+ url: "/items/sku/pager/v2",
9142
+ filter: 'qp-name-like',
9143
+ otherParams: _objectSpread2({
9144
+ 'qp-combination-eq': false,
9145
+ 'qp-approveStatus-eq': 1,
9146
+ 'qp-status-eq': 1
9147
+ }, (parProps === null || parProps === void 0 ? void 0 : (_parProps$requestConf2 = parProps.requestConfig) === null || _parProps$requestConf2 === void 0 ? void 0 : _parProps$requestConf2.addOtherParams) || {}),
9148
+ mappingTextField: 'name',
9149
+ mappingValueField: 'skuCode'
9150
+ }, parProps.requestConfig),
9151
+ selectProps: selectProps,
9152
+ onChange: function onChange(value) {
9153
+ console.log(value);
9154
+ setValue(value);
9155
+ },
9156
+ beforeShowModal: parProps === null || parProps === void 0 ? void 0 : parProps.beforeShowModal,
9157
+ onSaveCallback: parProps.onSaveCallback,
9158
+ businessType: 'sku',
9159
+ isAllowRepeatedSelect: !!(parProps === null || parProps === void 0 ? void 0 : parProps.isAllowRepeatedSelect)
9160
+ };
9161
+ var modalTableProps = {
9162
+ modalTableTitle: '选择商品',
9163
+ tableSearchForm: mTpTableSearchForm,
9164
+ tableColumns: mTpTableColumn,
9165
+ selectColumn: mTpSelectColumn,
9166
+ promiseLoadList: mTpPromiseLoadList
9093
9167
  };
9094
9168
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
9095
9169
  modalTableProps: modalTableProps
@@ -9165,6 +9239,45 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9165
9239
  dataIndex: 'count'
9166
9240
  }];
9167
9241
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
9242
+ var initialPromiseLoadList = [{
9243
+ url: "/items/item/propertyValue/sizeBySkcConfig",
9244
+ params: {
9245
+ pageSize: 10000,
9246
+ currentPage: 1,
9247
+ type: 2 // 类型:1尺码;2颜色
9248
+ },
9249
+
9250
+ resType: 'list',
9251
+ resPosition: 3,
9252
+ resKeyValue: ['value', 'value']
9253
+ }, {
9254
+ url: "/items/category/queryCategoryTree",
9255
+ params: {
9256
+ pageSize: 5000,
9257
+ currentPage: 1
9258
+ },
9259
+ resType: 'treeList',
9260
+ resPosition: 4
9261
+ }, {
9262
+ url: "/items/class/withProperty",
9263
+ params: {
9264
+ pageSize: 5000,
9265
+ currentPage: 1
9266
+ },
9267
+ resType: 'list',
9268
+ resPosition: 5,
9269
+ resKeyValue: ['id', 'name']
9270
+ }, {
9271
+ url: "/items/brand/queryBrandList",
9272
+ params: {
9273
+ pageSize: 5000,
9274
+ currentPage: 1,
9275
+ 'ctl-withAuth': true
9276
+ },
9277
+ resType: 'list',
9278
+ resPosition: 6,
9279
+ resKeyValue: ['id', 'name']
9280
+ }];
9168
9281
  var props = {
9169
9282
  buttonText: parProps.buttonText || '新增',
9170
9283
  buttonProps: parProps.buttonProps || {},
@@ -9369,7 +9482,8 @@ var AddSkcSelect = function AddSkcSelect(parProps) {
9369
9482
  },
9370
9483
  dataIndex: 'brandName'
9371
9484
  }],
9372
- selectColumn: mTpSelectColumn
9485
+ selectColumn: mTpSelectColumn,
9486
+ promiseLoadList: initialPromiseLoadList
9373
9487
  };
9374
9488
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
9375
9489
  modalTableProps: modalTableProps
@@ -9454,6 +9568,44 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9454
9568
  dataIndex: 'className'
9455
9569
  }];
9456
9570
  var mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
9571
+ var initialPromiseLoadList = [{
9572
+ url: "/user/orgViewNode/listNoPage",
9573
+ params: {
9574
+ 'qp-employeeId-eq': getEmployeeId(),
9575
+ 'qp-orgViewCode-eq': 'business-organizational-view',
9576
+ 'ctl-withDefaultOrg': true
9577
+ },
9578
+ resType: 'list',
9579
+ resPosition: 2,
9580
+ resKeyValue: ['targetId', 'name']
9581
+ }, {
9582
+ url: "/items/brand/queryBrandList",
9583
+ params: {
9584
+ pageSize: 5000,
9585
+ currentPage: 1,
9586
+ 'ctl-withAuth': true
9587
+ },
9588
+ resType: 'list',
9589
+ resPosition: 3,
9590
+ resKeyValue: ['id', 'name']
9591
+ }, {
9592
+ url: "/items/category/queryCategoryTree",
9593
+ params: {
9594
+ pageSize: 5000,
9595
+ currentPage: 1
9596
+ },
9597
+ resType: 'treeList',
9598
+ resPosition: 4
9599
+ }, {
9600
+ url: "/items/class/withProperty",
9601
+ params: {
9602
+ pageSize: 5000,
9603
+ currentPage: 1
9604
+ },
9605
+ resType: 'list',
9606
+ resPosition: 5,
9607
+ resKeyValue: ['id', 'name']
9608
+ }];
9457
9609
  var props = {
9458
9610
  buttonText: parProps.buttonText || '新增',
9459
9611
  buttonProps: parProps.buttonProps || {},
@@ -9643,7 +9795,8 @@ var AddSpuSelect = function AddSpuSelect(parProps) {
9643
9795
  },
9644
9796
  dataIndex: 'className'
9645
9797
  }],
9646
- selectColumn: mTpSelectColumn
9798
+ selectColumn: mTpSelectColumn,
9799
+ promiseLoadList: initialPromiseLoadList
9647
9800
  };
9648
9801
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(AddSelect, _objectSpread2(_objectSpread2({}, props), {}, {
9649
9802
  modalTableProps: modalTableProps
@@ -9735,7 +9888,7 @@ var CommodityEntry = function CommodityEntry(props) {
9735
9888
  * @LastEditTime: 2022-01-14 17:17:26
9736
9889
  * @LastEditors: rodchen
9737
9890
  */
9738
- var index$2 = (function (storageKeyString) {
9891
+ var index$1 = (function (storageKeyString) {
9739
9892
  var seconds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
9740
9893
  var tipsCallFunction = arguments.length > 2 ? arguments[2] : undefined;
9741
9894
  if (typeof seconds !== 'number') throw new Error('seconds should be number');
@@ -10149,7 +10302,7 @@ var BusinessTreeSearchSelect$1 = /*#__PURE__*/React__default['default'].memo(Bus
10149
10302
  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";
10150
10303
  styleInject(css_248z$8);
10151
10304
 
10152
- var index$3 = (function (props) {
10305
+ var index$2 = (function (props) {
10153
10306
  var _props$formStatusMapp = props.formStatusMapping,
10154
10307
  formStatusMapping = _props$formStatusMapp === void 0 ? [] : _props$formStatusMapp;
10155
10308
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -11573,7 +11726,7 @@ var iconMap = {
11573
11726
  src: moreIcon
11574
11727
  })
11575
11728
  };
11576
- var index$4 = (function (props) {
11729
+ var index$3 = (function (props) {
11577
11730
  var _useLocation = umi.useLocation(),
11578
11731
  pathname = _useLocation.pathname;
11579
11732
  var _useState = React.useState(pathname + 'id'),
@@ -11718,10 +11871,7 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
11718
11871
  };
11719
11872
  return /*#__PURE__*/React__default['default'].createElement(antd.Anchor, {
11720
11873
  key: "".concat(pathname, "_anchor"),
11721
- offsetTop: window.top == window ? 78 : 0,
11722
- getContainer: function getContainer() {
11723
- return window.document.body;
11724
- }
11874
+ offsetTop: window.top == window ? 78 : 0
11725
11875
  }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
11726
11876
  className: 'detail_page_head'
11727
11877
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -11793,7 +11943,7 @@ var css_248z$d = ".home_page_head {\n height: 54px;\n display: flex;\n justif
11793
11943
  styleInject(css_248z$d);
11794
11944
 
11795
11945
  var _excluded$c = ["children"];
11796
- var index$5 = (function (props) {
11946
+ var index$4 = (function (props) {
11797
11947
  var _useLocation = umi.useLocation(),
11798
11948
  pathname = _useLocation.pathname;
11799
11949
  var _useState = React.useState(pathname + 'id'),
@@ -16912,7 +17062,7 @@ var WrapperComponent = /*#__PURE__*/function (_React$Component) {
16912
17062
  }]);
16913
17063
  return WrapperComponent;
16914
17064
  }(React__default['default'].Component);
16915
- var index$6 = (function (props) {
17065
+ var index$5 = (function (props) {
16916
17066
  var _useModel = umi.useModel('@@initialState'),
16917
17067
  _useModel$initialStat = _useModel.initialState,
16918
17068
  initialState = _useModel$initialStat === void 0 ? {} : _useModel$initialStat;
@@ -17154,7 +17304,7 @@ var FixedScrollBar = function FixedScrollBar(_ref, ref) {
17154
17304
  };
17155
17305
  var FixedScrollBar$1 = /*#__PURE__*/React__default['default'].forwardRef(FixedScrollBar);
17156
17306
 
17157
- var index$7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
17307
+ var index$6 = /*#__PURE__*/React.forwardRef(function (props, ref) {
17158
17308
  var _useState = React.useState(false),
17159
17309
  _useState2 = _slicedToArray(_useState, 2),
17160
17310
  show = _useState2[0],
@@ -24226,7 +24376,8 @@ var inputTypes = {
24226
24376
  type: 'bs-employeeSearchSelect',
24227
24377
  props: _objectSpread2(_objectSpread2({}, normalSingleSelectProps), {}, {
24228
24378
  requestConfig: {
24229
- mappingValueField: 'employeeNumber'
24379
+ mappingValueField: 'employeeNumber',
24380
+ filterInit: 'qp-employeeNumber-like'
24230
24381
  }
24231
24382
  })
24232
24383
  },
@@ -24372,7 +24523,8 @@ var inputTypes = {
24372
24523
  type: 'bs-employeeSearchSelect',
24373
24524
  props: _objectSpread2(_objectSpread2({}, normalMultipleSelectProps), {}, {
24374
24525
  requestConfig: {
24375
- mappingValueField: 'employeeNumber'
24526
+ mappingValueField: 'employeeNumber',
24527
+ filterInit: 'qp-employeeNumber-like'
24376
24528
  }
24377
24529
  })
24378
24530
  },
@@ -30688,26 +30840,26 @@ exports.AddSkuSelect = AddSkuSelect;
30688
30840
  exports.AddSpuSelect = AddSpuSelect;
30689
30841
  exports.BillEntry = BillEntry;
30690
30842
  exports.BsCascader = BsCascader;
30691
- exports.BsLayout = index$6;
30843
+ exports.BsLayout = index$5;
30692
30844
  exports.BsSulaQueryTable = BsSulaQueryTable;
30693
30845
  exports.BusinessSearchSelect = BusinessSearchSelect$1;
30694
30846
  exports.BusinessTreeSearchSelect = BusinessTreeSearchSelect$1;
30695
- exports.CheckOneUser = index$2;
30847
+ exports.CheckOneUser = index$1;
30696
30848
  exports.ColumnSettingTable = ColumnSettingTable;
30697
30849
  exports.CommodityEntry = CommodityEntry;
30698
30850
  exports.DataImport = DataImport;
30699
30851
  exports.DataValidation = DataValidation;
30700
- exports.DetailPageWrapper = index$4;
30852
+ exports.DetailPageWrapper = index$3;
30701
30853
  exports.EllipsisTooltip = EllipsisTooltip;
30702
30854
  exports.ExportIcon = ExportIcon;
30703
30855
  exports.GuideWrapper = GuideWrapper;
30704
- exports.HomePageWrapper = index$5;
30856
+ exports.HomePageWrapper = index$4;
30705
30857
  exports.JsonQueryTable = JsonQueryTable;
30706
- exports.MoreTreeTable = index$7;
30858
+ exports.MoreTreeTable = index$6;
30707
30859
  exports.QueryMutipleInput = QueryMutipleInput;
30708
30860
  exports.RuleComponent = RuleObjectComponent;
30709
30861
  exports.SearchSelect = SearchSelect;
30710
- exports.StateFlow = index$3;
30862
+ exports.StateFlow = index$2;
30711
30863
  exports.SulaColumnSettingTable = ColumnSettingSulaTable;
30712
30864
  exports.TableColumnSetting = TableColumnSetting;
30713
30865
  exports.TreeSearchSelect = TreeSearchSelect;