@kmkf-fe-packages/basic-components 2.10.8 → 2.10.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -8672,7 +8672,8 @@ var processSceneStatus = function processSceneStatus(getValue) {
8672
8672
  WDT_WAREHOUSING_STATUS: 'wdtInStockStatusItemList',
8673
8673
  JKY_WAREHOUSING_STATUS: 'jkyInStockStatusItemList',
8674
8674
  JST_WAREHOUSING_STATUS: 'jstInStockStatusItemList',
8675
- WLN_WAREHOUSING_STATUS: 'wlnInStockStatusItemList'
8675
+ WLN_WAREHOUSING_STATUS: 'wlnInStockStatusItemList',
8676
+ KM_WAREHOUSING_STATUS: 'kmInStockStatusItemList'
8676
8677
  };
8677
8678
  return _defineProperty({}, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(STATUS_LIST_MAP[nex.workOrderComponentType])), []));
8678
8679
  };
@@ -9522,6 +9523,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
9522
9523
  WLN_WAREHOUSING_STATUS: processSceneStatus,
9523
9524
  JKY_WAREHOUSING_STATUS: processSceneStatus,
9524
9525
  JST_WAREHOUSING_STATUS: processSceneStatus,
9526
+ KM_WAREHOUSING_STATUS: processSceneStatus,
9525
9527
  BS_LOGISTICS: processErpLogistics,
9526
9528
  WLN_LOGISTICS: processErpLogistics,
9527
9529
  WDT_LOGISTICS: processErpLogistics,
@@ -11708,7 +11710,7 @@ var GoodsModal = function GoodsModal(props) {
11708
11710
  key: item.value
11709
11711
  }, item.label);
11710
11712
  })), /*#__PURE__*/React.createElement(Search, {
11711
- placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
11713
+ placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝标题' : '商品ID' : '宝贝标题',
11712
11714
  // enterButton="搜索"
11713
11715
  className: "search",
11714
11716
  value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
@@ -16349,30 +16351,33 @@ var GoodList = function GoodList(props, ref) {
16349
16351
  selectedRowKeys: selectIds,
16350
16352
  fixed: true,
16351
16353
  onSelect: function onSelect(record, selected) {
16354
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16352
16355
  if (selected) {
16353
- setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
16356
+ setSelectIds([].concat(_toConsumableArray(selectIds), [uniqueKey]));
16354
16357
  setSelect([].concat(_toConsumableArray(selectList), [record]));
16355
16358
  } else {
16356
16359
  setSelectIds(selectIds.filter(function (t) {
16357
- return t !== record.specNo;
16360
+ return t !== uniqueKey;
16358
16361
  }));
16359
16362
  setSelect(selectList.filter(function (t) {
16360
- return t.specNo !== record.specNo;
16363
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16361
16364
  }));
16362
16365
  }
16363
16366
  },
16364
16367
  onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
16365
16368
  if (selected) {
16366
- setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
16367
- return t.specNo;
16368
- }))));
16369
+ var changeKeys = changeRows.map(function (t) {
16370
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16371
+ });
16372
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeKeys)));
16369
16373
  setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
16370
16374
  } else {
16371
- setSelectIds(difference(selectIds, changeRows.map(function (t) {
16372
- return t.specNo;
16373
- })));
16375
+ var _changeKeys = changeRows.map(function (t) {
16376
+ return "".concat(t.goodNo, "-").concat(t.specNo);
16377
+ });
16378
+ setSelectIds(difference(selectIds, _changeKeys));
16374
16379
  var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
16375
- return arrVal.specNo !== othVal.specNo;
16380
+ return "".concat(arrVal.goodNo, "-").concat(arrVal.specNo) !== "".concat(othVal.goodNo, "-").concat(othVal.specNo);
16376
16381
  });
16377
16382
  setSelect(list);
16378
16383
  }
@@ -16380,11 +16385,12 @@ var GoodList = function GoodList(props, ref) {
16380
16385
  };
16381
16386
  var showTable = function showTable() {
16382
16387
  var handleDelete = function handleDelete(record) {
16388
+ var uniqueKey = "".concat(record.goodNo, "-").concat(record.specNo);
16383
16389
  setSelectIds(selectIds.filter(function (t) {
16384
- return t !== record.specNo;
16390
+ return t !== uniqueKey;
16385
16391
  }));
16386
16392
  setSelect(selectList.filter(function (t) {
16387
- return t.specNo !== record.specNo;
16393
+ return "".concat(t.goodNo, "-").concat(t.specNo) !== uniqueKey;
16388
16394
  }));
16389
16395
  };
16390
16396
  var showColumns = [{
@@ -16408,7 +16414,9 @@ var GoodList = function GoodList(props, ref) {
16408
16414
  }
16409
16415
  }, /*#__PURE__*/React.createElement(Table, {
16410
16416
  columns: showColumns,
16411
- rowKey: 'specNo',
16417
+ rowKey: function rowKey(record) {
16418
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16419
+ },
16412
16420
  dataSource: selectList,
16413
16421
  scroll: {
16414
16422
  x: '100%',
@@ -16438,7 +16446,9 @@ var GoodList = function GoodList(props, ref) {
16438
16446
  }, /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({
16439
16447
  className: "GoodModalColumns",
16440
16448
  rowSelection: rowSelection,
16441
- rowKey: "specNo",
16449
+ rowKey: function rowKey(record) {
16450
+ return "".concat(record.goodNo, "-").concat(record.specNo);
16451
+ },
16442
16452
  columns: columns,
16443
16453
  scroll: {
16444
16454
  x: '100%',
@@ -21008,9 +21018,20 @@ var getColumns$2 = function getColumns(_ref) {
21008
21018
  };
21009
21019
 
21010
21020
  var getYesOrNo$4 = function getYesOrNo(val) {
21011
- if (isNull(val)) return null;
21012
- return val ? '是' : '否';
21021
+ switch (val) {
21022
+ case true:
21023
+ case '1':
21024
+ case 1:
21025
+ return '是';
21026
+ case false:
21027
+ case '0':
21028
+ case 0:
21029
+ return '否';
21030
+ default:
21031
+ return null;
21032
+ }
21013
21033
  };
21034
+
21014
21035
  function toNum$1(value) {
21015
21036
  if (typeof value === 'string') {
21016
21037
  return value ? +value : void 0;
@@ -21206,7 +21227,7 @@ var getColumns$3 = function getColumns(_ref) {
21206
21227
  label: '非赠品',
21207
21228
  value: 0
21208
21229
  }]
21209
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21230
+ }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
21210
21231
  }
21211
21232
  }, {
21212
21233
  dataIndex: 'isPackage',
@@ -21438,7 +21459,7 @@ var getColumns$3 = function getColumns(_ref) {
21438
21459
  label: '非赠品',
21439
21460
  value: 0
21440
21461
  }]
21441
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21462
+ }) : /*#__PURE__*/React.createElement("span", null, isNull(val) ? null : val ? '赠品' : '非赠品');
21442
21463
  }
21443
21464
  }, {
21444
21465
  dataIndex: 'isPackage',
@@ -21498,10 +21519,6 @@ var isNumberOrNumberString$1 = function isNumberOrNumberString(value) {
21498
21519
  if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
21499
21520
  return false;
21500
21521
  };
21501
- var getYesOrNo$5 = function getYesOrNo(val) {
21502
- if (isNull(val)) return null;
21503
- return val ? '是' : '否';
21504
- };
21505
21522
  function toNum$2(value) {
21506
21523
  if (typeof value === 'string') {
21507
21524
  return value ? +value : void 0;
@@ -21613,7 +21630,7 @@ var getColumns$4 = function getColumns(_ref) {
21613
21630
  title: "\u662F\u5426\u53D6\u6D88",
21614
21631
  width: 150,
21615
21632
  render: function render(val) {
21616
- return /*#__PURE__*/React.createElement("span", null, getYesOrNo$5(val));
21633
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21617
21634
  }
21618
21635
  }, {
21619
21636
  dataIndex: 'isGift',
@@ -21632,7 +21649,7 @@ var getColumns$4 = function getColumns(_ref) {
21632
21649
  label: '否',
21633
21650
  value: 0
21634
21651
  }]
21635
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$5(val));
21652
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21636
21653
  }
21637
21654
  }, {
21638
21655
  dataIndex: 'skuNote',
@@ -21758,7 +21775,7 @@ var getColumns$4 = function getColumns(_ref) {
21758
21775
  label: '否',
21759
21776
  value: 0
21760
21777
  }]
21761
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$5(val));
21778
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21762
21779
  }
21763
21780
  }].map(function (item) {
21764
21781
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -21887,7 +21904,7 @@ var getColumns$4 = function getColumns(_ref) {
21887
21904
  label: '否',
21888
21905
  value: 0
21889
21906
  }]
21890
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$5(val));
21907
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$4(val));
21891
21908
  }
21892
21909
  }].map(function (item) {
21893
21910
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -30645,7 +30662,7 @@ var GoodsModal$5 = function GoodsModal(props) {
30645
30662
  key: item.value
30646
30663
  }, item.label);
30647
30664
  })), /*#__PURE__*/React.createElement(Search$1, {
30648
- placeholder: "\u5B9D\u8D1D\u94FE\u63A5\uFF0C\u6807\u9898",
30665
+ placeholder: "\u5B9D\u8D1D\u6807\u9898",
30649
30666
  allowClear: true,
30650
30667
  enterButton: "\u641C\u7D22",
30651
30668
  style: {
@@ -0,0 +1 @@
1
+ export declare const getYesOrNo: (val: boolean | string | number) => "是" | "否" | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "2.10.8",
3
+ "version": "2.10.9-beta.1",
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.10.8",
23
+ "@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.0",
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": "fcdfb6ed797689b6cfcca1b25d410c59999271aa"
69
+ "gitHead": "c2da8778fd3ef4bdd878160b5b4d86a6fb4cbbf6"
70
70
  }