@kmkf-fe-packages/basic-components 2.2.39-beta.36 → 2.2.39-beta.37

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.esm.js CHANGED
@@ -23554,19 +23554,24 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
23554
23554
  setTradeGoodsVisible = _useState4[1];
23555
23555
  var getKmSupplier = /*#__PURE__*/function () {
23556
23556
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dataSource) {
23557
+ var _dataSource$filter;
23557
23558
  var systemItemIds, supplierMap;
23558
23559
  return _regeneratorRuntime().wrap(function _callee$(_context) {
23559
23560
  while (1) switch (_context.prev = _context.next) {
23560
23561
  case 0:
23561
- systemItemIds = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
23562
- return item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
23562
+ systemItemIds = dataSource === null || dataSource === void 0 ? void 0 : dataSource.filter(function (item) {
23563
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
23564
+ }).map(function (item) {
23565
+ return (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23563
23566
  });
23564
23567
  _context.next = 3;
23565
23568
  return servers.KM.getSupplierSingleton(systemItemIds);
23566
23569
  case 3:
23567
23570
  supplierMap = _context.sent;
23568
- dataSource === null || dataSource === void 0 ? void 0 : dataSource.forEach(function (item) {
23569
- var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
23571
+ dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$filter = dataSource.filter(function (item) {
23572
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
23573
+ })) === null || _dataSource$filter === void 0 ? void 0 : _dataSource$filter.forEach(function (item) {
23574
+ var key = (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23570
23575
  var supplierInfo = supplierMap.get(key);
23571
23576
  item.supplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
23572
23577
  item.supplierName = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierName;
@@ -26824,8 +26829,10 @@ var CommonGoods = function CommonGoods(props) {
26824
26829
  var sysItemIdMap = useMemo(function () {
26825
26830
  var map = {};
26826
26831
  if (compType.indexOf('KM') > -1) {
26827
- var _value$kmGoods;
26828
- value === null || value === void 0 ? void 0 : (_value$kmGoods = value.kmGoods) === null || _value$kmGoods === void 0 ? void 0 : _value$kmGoods.forEach(function (item) {
26832
+ var _value$kmGoods, _value$kmGoods$filter;
26833
+ value === null || value === void 0 ? void 0 : (_value$kmGoods = value.kmGoods) === null || _value$kmGoods === void 0 ? void 0 : (_value$kmGoods$filter = _value$kmGoods.filter(function (item) {
26834
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
26835
+ })) === null || _value$kmGoods$filter === void 0 ? void 0 : _value$kmGoods$filter.forEach(function (item) {
26829
26836
  var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
26830
26837
  map[key] = item;
26831
26838
  });
@@ -27960,8 +27967,10 @@ var PublicReissue = function PublicReissue(props) {
27960
27967
  var sysItemIdMap = useMemo(function () {
27961
27968
  var map = {};
27962
27969
  if (type === 'KM_REISSUE_GOODS') {
27963
- var _value$kmReissueGoods;
27964
- value === null || value === void 0 ? void 0 : (_value$kmReissueGoods = value.kmReissueGoods) === null || _value$kmReissueGoods === void 0 ? void 0 : _value$kmReissueGoods.forEach(function (item) {
27970
+ var _value$kmReissueGoods, _value$kmReissueGoods2;
27971
+ value === null || value === void 0 ? void 0 : (_value$kmReissueGoods = value.kmReissueGoods) === null || _value$kmReissueGoods === void 0 ? void 0 : (_value$kmReissueGoods2 = _value$kmReissueGoods.filter(function (item) {
27972
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
27973
+ })) === null || _value$kmReissueGoods2 === void 0 ? void 0 : _value$kmReissueGoods2.forEach(function (item) {
27965
27974
  var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
27966
27975
  map[key] = item;
27967
27976
  });
package/dist/index.js CHANGED
@@ -23569,19 +23569,24 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
23569
23569
  setTradeGoodsVisible = _useState4[1];
23570
23570
  var getKmSupplier = /*#__PURE__*/function () {
23571
23571
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dataSource) {
23572
+ var _dataSource$filter;
23572
23573
  var systemItemIds, supplierMap;
23573
23574
  return _regeneratorRuntime().wrap(function _callee$(_context) {
23574
23575
  while (1) switch (_context.prev = _context.next) {
23575
23576
  case 0:
23576
- systemItemIds = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
23577
- return item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
23577
+ systemItemIds = dataSource === null || dataSource === void 0 ? void 0 : dataSource.filter(function (item) {
23578
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
23579
+ }).map(function (item) {
23580
+ return (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23578
23581
  });
23579
23582
  _context.next = 3;
23580
23583
  return kmkfUtils.servers.KM.getSupplierSingleton(systemItemIds);
23581
23584
  case 3:
23582
23585
  supplierMap = _context.sent;
23583
- dataSource === null || dataSource === void 0 ? void 0 : dataSource.forEach(function (item) {
23584
- var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
23586
+ dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$filter = dataSource.filter(function (item) {
23587
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
23588
+ })) === null || _dataSource$filter === void 0 ? void 0 : _dataSource$filter.forEach(function (item) {
23589
+ var key = (item === null || item === void 0 ? void 0 : item.sysSkuId) == '-1' ? item === null || item === void 0 ? void 0 : item.sysItemId : "".concat(item === null || item === void 0 ? void 0 : item.sysItemId, "-").concat(item === null || item === void 0 ? void 0 : item.sysSkuId);
23585
23590
  var supplierInfo = supplierMap.get(key);
23586
23591
  item.supplierCode = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierCode;
23587
23592
  item.supplierName = supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.supplierName;
@@ -26839,8 +26844,10 @@ var CommonGoods = function CommonGoods(props) {
26839
26844
  var sysItemIdMap = React.useMemo(function () {
26840
26845
  var map = {};
26841
26846
  if (compType.indexOf('KM') > -1) {
26842
- var _value$kmGoods;
26843
- value === null || value === void 0 ? void 0 : (_value$kmGoods = value.kmGoods) === null || _value$kmGoods === void 0 ? void 0 : _value$kmGoods.forEach(function (item) {
26847
+ var _value$kmGoods, _value$kmGoods$filter;
26848
+ value === null || value === void 0 ? void 0 : (_value$kmGoods = value.kmGoods) === null || _value$kmGoods === void 0 ? void 0 : (_value$kmGoods$filter = _value$kmGoods.filter(function (item) {
26849
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
26850
+ })) === null || _value$kmGoods$filter === void 0 ? void 0 : _value$kmGoods$filter.forEach(function (item) {
26844
26851
  var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
26845
26852
  map[key] = item;
26846
26853
  });
@@ -27975,8 +27982,10 @@ var PublicReissue = function PublicReissue(props) {
27975
27982
  var sysItemIdMap = React.useMemo(function () {
27976
27983
  var map = {};
27977
27984
  if (type === 'KM_REISSUE_GOODS') {
27978
- var _value$kmReissueGoods;
27979
- value === null || value === void 0 ? void 0 : (_value$kmReissueGoods = value.kmReissueGoods) === null || _value$kmReissueGoods === void 0 ? void 0 : _value$kmReissueGoods.forEach(function (item) {
27985
+ var _value$kmReissueGoods, _value$kmReissueGoods2;
27986
+ value === null || value === void 0 ? void 0 : (_value$kmReissueGoods = value.kmReissueGoods) === null || _value$kmReissueGoods === void 0 ? void 0 : (_value$kmReissueGoods2 = _value$kmReissueGoods.filter(function (item) {
27987
+ return item === null || item === void 0 ? void 0 : item.sysItemId;
27988
+ })) === null || _value$kmReissueGoods2 === void 0 ? void 0 : _value$kmReissueGoods2.forEach(function (item) {
27980
27989
  var key = item.sysSkuId == '-1' ? item.sysItemId : "".concat(item.sysItemId, "-").concat(item.sysSkuId);
27981
27990
  map[key] = item;
27982
27991
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.2.39-beta.36",
3
+ "version": "2.2.39-beta.37",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "2.2.39-beta.35",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.2.39-beta.37",
24
24
  "ahooks": "^3.7.4",
25
25
  "ali-react-table": "2.6.1",
26
26
  "bignumber.js": "^9.1.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "90ef64b2c794eb3c6ad6762c3fa3403608afbfbb"
69
+ "gitHead": "99bdce1877cfe945b3380d91db57fdaa4caaa4b3"
70
70
  }