@kmkf-fe-packages/basic-components 1.22.1-beta.6 → 1.22.1-beta.9

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
@@ -4,7 +4,7 @@ import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } fro
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -12673,6 +12673,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
12673
12673
  });
12674
12674
  };
12675
12675
 
12676
+ var MAIN_FIELD = 'id';
12676
12677
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
12677
12678
  var columns = _ref.columns,
12678
12679
  dataSource = _ref.dataSource,
@@ -12688,11 +12689,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12688
12689
  var closeModal = function closeModal() {
12689
12690
  return setTradeGoodsVisible(false);
12690
12691
  };
12692
+ var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
12693
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
12694
+ }), selectedRowKeys);
12695
+ var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
12696
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
12697
+ }));
12698
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
12699
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
12700
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
12701
+ };
12691
12702
  var rowSelection = {
12692
12703
  selectedRowKeys: selectedRowKeys,
12693
- onChange: onChangeSelectedKeys
12704
+ onChange: handleChangeSelectedKeys
12694
12705
  };
12695
- console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12696
12706
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
12697
12707
  type: "link",
12698
12708
  onClick: openModal
@@ -12702,7 +12712,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12702
12712
  footer: null,
12703
12713
  onCancel: closeModal
12704
12714
  }, /*#__PURE__*/React.createElement(Table, {
12705
- rowKey: "id",
12715
+ rowKey: MAIN_FIELD,
12706
12716
  rowSelection: rowSelection,
12707
12717
  columns: columns,
12708
12718
  dataSource: dataSource,
@@ -12711,7 +12721,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12711
12721
  x: 500,
12712
12722
  y: 500
12713
12723
  }
12714
- }), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12724
+ }), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12715
12725
  };
12716
12726
  var getButtonText = function getButtonText() {
12717
12727
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
@@ -12778,7 +12788,7 @@ var GoodItem$1 = function GoodItem(props) {
12778
12788
  // TODO: 商品订单中以选中商品
12779
12789
  var selectedGoods = useMemo(function () {
12780
12790
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
12781
- return v.id;
12791
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
12782
12792
  });
12783
12793
  }, [value]);
12784
12794
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -13332,6 +13342,116 @@ var GoodItem$1 = function GoodItem(props) {
13332
13342
  });
13333
13343
  }
13334
13344
  break;
13345
+ case 'BS_GOODS':
13346
+ columns = [{
13347
+ dataIndex: 'mark',
13348
+ title: "\u5546\u54C1\u6807\u8BB0",
13349
+ align: 'center',
13350
+ ellipsis: true,
13351
+ width: 70,
13352
+ render: function render(val, record, index) {
13353
+ return /*#__PURE__*/React.createElement(Select, {
13354
+ options: [{
13355
+ label: '是',
13356
+ value: '是'
13357
+ }, {
13358
+ label: '否',
13359
+ value: '否'
13360
+ }],
13361
+ disabled: disabled,
13362
+ value: val,
13363
+ onChange: function onChange(val) {
13364
+ return updateHandle(val, index, 'mark');
13365
+ }
13366
+ });
13367
+ }
13368
+ }, {
13369
+ dataIndex: 'skuName',
13370
+ title: "".concat(text, "sku\u540D\u79F0"),
13371
+ align: 'center',
13372
+ ellipsis: true,
13373
+ width: 250
13374
+ }, {
13375
+ dataIndex: 'sku',
13376
+ title: "".concat(text, "sku\u7F16\u7801"),
13377
+ align: 'center',
13378
+ ellipsis: true,
13379
+ width: 100
13380
+ }, {
13381
+ dataIndex: 'name',
13382
+ title: "".concat(text, "\u540D\u79F0"),
13383
+ align: 'center',
13384
+ ellipsis: true,
13385
+ width: 250
13386
+ }, {
13387
+ dataIndex: 'pic',
13388
+ title: "\u56FE\u7247",
13389
+ align: 'center',
13390
+ ellipsis: true,
13391
+ width: 100,
13392
+ render: function render(val) {
13393
+ return /*#__PURE__*/React.createElement(Image, {
13394
+ width: 60,
13395
+ src: val
13396
+ });
13397
+ }
13398
+ }, {
13399
+ dataIndex: 'code',
13400
+ title: "".concat(text, "\u7F16\u7801"),
13401
+ align: 'center',
13402
+ ellipsis: true,
13403
+ width: 100
13404
+ }, {
13405
+ dataIndex: 'money',
13406
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13407
+ align: 'center',
13408
+ ellipsis: true,
13409
+ width: 100
13410
+ }, {
13411
+ dataIndex: 'number',
13412
+ title: "".concat(text, "\u6570\u91CF"),
13413
+ align: 'center',
13414
+ ellipsis: true,
13415
+ width: 100,
13416
+ render: function render(val, record, index) {
13417
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13418
+ style: {
13419
+ width: 70
13420
+ },
13421
+ value: val,
13422
+ min: 1,
13423
+ precision: 0,
13424
+ onChange: function onChange(num) {
13425
+ return updateHandle(num, index, 'number');
13426
+ }
13427
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13428
+ }
13429
+ }, {
13430
+ dataIndex: 'share',
13431
+ title: "\u5206\u644A\u4EF7",
13432
+ align: 'center',
13433
+ ellipsis: true,
13434
+ width: 70
13435
+ }, {
13436
+ dataIndex: 'type',
13437
+ title: "\u8D60\u54C1\u7C7B\u578B",
13438
+ align: 'center',
13439
+ ellipsis: true,
13440
+ width: 100
13441
+ }, {
13442
+ dataIndex: 'batch',
13443
+ title: "\u6279\u6B21\u53F7",
13444
+ align: 'center',
13445
+ ellipsis: true,
13446
+ width: 100
13447
+ }, {
13448
+ dataIndex: 'expireDate',
13449
+ title: "\u6709\u6548\u671F",
13450
+ align: 'center',
13451
+ ellipsis: true,
13452
+ width: 100
13453
+ }];
13454
+ break;
13335
13455
  default:
13336
13456
  columns = [{
13337
13457
  dataIndex: 'mark',
@@ -15279,7 +15399,7 @@ var typeMap$1 = {
15279
15399
  }
15280
15400
  };
15281
15401
  var wdtReissue = function wdtReissue(props) {
15282
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
15402
+ var _value$wdtSystemOrder, _typeMap$type25, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
15283
15403
  var value = props.value,
15284
15404
  onChange = props.onChange,
15285
15405
  _props$reasonList = props.reasonList,
@@ -15440,20 +15560,19 @@ var wdtReissue = function wdtReissue(props) {
15440
15560
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15441
15561
  };
15442
15562
  var selectedGoodsChange = useCallback(function (skuList) {
15443
- var _typeMap$type23, _getGoodDetails;
15563
+ var _typeMap$type23, _value, _typeMap$type24;
15444
15564
  var newValue = _objectSpread2({}, value);
15445
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_getGoodDetails = getGoodDetails({
15446
- mode: isStrict
15447
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
15565
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)]) === null || _value === void 0 ? void 0 : _value.filter(function (item) {
15448
15566
  return skuList.includes(item.id);
15449
15567
  });
15568
+ console.log('newValue', newValue);
15450
15569
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15451
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
15570
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]]);
15452
15571
  //显示选择商品按钮 原单换不显示选择商品
15453
15572
  var showChangeBtn = useMemo(function () {
15454
- var _typeMap$type25;
15455
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
15456
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
15573
+ var _typeMap$type26;
15574
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]);
15575
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]]);
15457
15576
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15458
15577
  gutter: 8,
15459
15578
  wrap: true
@@ -15471,12 +15590,12 @@ var wdtReissue = function wdtReissue(props) {
15471
15590
  },
15472
15591
  disabled: disabled,
15473
15592
  allowClear: false,
15474
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
15593
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
15475
15594
  onChange: function onChange(val) {
15476
15595
  return changeSystemOrderHandle(val);
15477
15596
  },
15478
15597
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15479
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15598
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15480
15599
  return /*#__PURE__*/React.createElement(Select.Option, {
15481
15600
  key: item.billNo,
15482
15601
  value: item.billNo,
@@ -15497,7 +15616,7 @@ var wdtReissue = function wdtReissue(props) {
15497
15616
  disabled: disabled,
15498
15617
  allowClear: false,
15499
15618
  options: reasonList,
15500
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
15619
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
15501
15620
  onChange: function onChange(val) {
15502
15621
  return changeTypeHandle(val);
15503
15622
  }
@@ -15509,7 +15628,7 @@ var wdtReissue = function wdtReissue(props) {
15509
15628
  canUpdateNumber: showChangeBtn,
15510
15629
  showChangeBtn: showChangeBtn,
15511
15630
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15512
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
15631
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
15513
15632
  onChange: function onChange(val) {
15514
15633
  return changeGoodHandle(val);
15515
15634
  },
package/dist/index.js CHANGED
@@ -12685,6 +12685,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
12685
12685
  });
12686
12686
  };
12687
12687
 
12688
+ var MAIN_FIELD = 'id';
12688
12689
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
12689
12690
  var columns = _ref.columns,
12690
12691
  dataSource = _ref.dataSource,
@@ -12700,11 +12701,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12700
12701
  var closeModal = function closeModal() {
12701
12702
  return setTradeGoodsVisible(false);
12702
12703
  };
12704
+ var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
12705
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
12706
+ }), selectedRowKeys);
12707
+ var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
12708
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
12709
+ }));
12710
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
12711
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
12712
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
12713
+ };
12703
12714
  var rowSelection = {
12704
12715
  selectedRowKeys: selectedRowKeys,
12705
- onChange: onChangeSelectedKeys
12716
+ onChange: handleChangeSelectedKeys
12706
12717
  };
12707
- console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12708
12718
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
12709
12719
  type: "link",
12710
12720
  onClick: openModal
@@ -12714,7 +12724,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12714
12724
  footer: null,
12715
12725
  onCancel: closeModal
12716
12726
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
12717
- rowKey: "id",
12727
+ rowKey: MAIN_FIELD,
12718
12728
  rowSelection: rowSelection,
12719
12729
  columns: columns,
12720
12730
  dataSource: dataSource,
@@ -12723,7 +12733,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
12723
12733
  x: 500,
12724
12734
  y: 500
12725
12735
  }
12726
- }), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12736
+ }), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12727
12737
  };
12728
12738
  var getButtonText = function getButtonText() {
12729
12739
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
@@ -12790,7 +12800,7 @@ var GoodItem$1 = function GoodItem(props) {
12790
12800
  // TODO: 商品订单中以选中商品
12791
12801
  var selectedGoods = React.useMemo(function () {
12792
12802
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
12793
- return v.id;
12803
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
12794
12804
  });
12795
12805
  }, [value]);
12796
12806
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -13344,6 +13354,116 @@ var GoodItem$1 = function GoodItem(props) {
13344
13354
  });
13345
13355
  }
13346
13356
  break;
13357
+ case 'BS_GOODS':
13358
+ columns = [{
13359
+ dataIndex: 'mark',
13360
+ title: "\u5546\u54C1\u6807\u8BB0",
13361
+ align: 'center',
13362
+ ellipsis: true,
13363
+ width: 70,
13364
+ render: function render(val, record, index) {
13365
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13366
+ options: [{
13367
+ label: '是',
13368
+ value: '是'
13369
+ }, {
13370
+ label: '否',
13371
+ value: '否'
13372
+ }],
13373
+ disabled: disabled,
13374
+ value: val,
13375
+ onChange: function onChange(val) {
13376
+ return updateHandle(val, index, 'mark');
13377
+ }
13378
+ });
13379
+ }
13380
+ }, {
13381
+ dataIndex: 'skuName',
13382
+ title: "".concat(text, "sku\u540D\u79F0"),
13383
+ align: 'center',
13384
+ ellipsis: true,
13385
+ width: 250
13386
+ }, {
13387
+ dataIndex: 'sku',
13388
+ title: "".concat(text, "sku\u7F16\u7801"),
13389
+ align: 'center',
13390
+ ellipsis: true,
13391
+ width: 100
13392
+ }, {
13393
+ dataIndex: 'name',
13394
+ title: "".concat(text, "\u540D\u79F0"),
13395
+ align: 'center',
13396
+ ellipsis: true,
13397
+ width: 250
13398
+ }, {
13399
+ dataIndex: 'pic',
13400
+ title: "\u56FE\u7247",
13401
+ align: 'center',
13402
+ ellipsis: true,
13403
+ width: 100,
13404
+ render: function render(val) {
13405
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13406
+ width: 60,
13407
+ src: val
13408
+ });
13409
+ }
13410
+ }, {
13411
+ dataIndex: 'code',
13412
+ title: "".concat(text, "\u7F16\u7801"),
13413
+ align: 'center',
13414
+ ellipsis: true,
13415
+ width: 100
13416
+ }, {
13417
+ dataIndex: 'money',
13418
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13419
+ align: 'center',
13420
+ ellipsis: true,
13421
+ width: 100
13422
+ }, {
13423
+ dataIndex: 'number',
13424
+ title: "".concat(text, "\u6570\u91CF"),
13425
+ align: 'center',
13426
+ ellipsis: true,
13427
+ width: 100,
13428
+ render: function render(val, record, index) {
13429
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13430
+ style: {
13431
+ width: 70
13432
+ },
13433
+ value: val,
13434
+ min: 1,
13435
+ precision: 0,
13436
+ onChange: function onChange(num) {
13437
+ return updateHandle(num, index, 'number');
13438
+ }
13439
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13440
+ }
13441
+ }, {
13442
+ dataIndex: 'share',
13443
+ title: "\u5206\u644A\u4EF7",
13444
+ align: 'center',
13445
+ ellipsis: true,
13446
+ width: 70
13447
+ }, {
13448
+ dataIndex: 'type',
13449
+ title: "\u8D60\u54C1\u7C7B\u578B",
13450
+ align: 'center',
13451
+ ellipsis: true,
13452
+ width: 100
13453
+ }, {
13454
+ dataIndex: 'batch',
13455
+ title: "\u6279\u6B21\u53F7",
13456
+ align: 'center',
13457
+ ellipsis: true,
13458
+ width: 100
13459
+ }, {
13460
+ dataIndex: 'expireDate',
13461
+ title: "\u6709\u6548\u671F",
13462
+ align: 'center',
13463
+ ellipsis: true,
13464
+ width: 100
13465
+ }];
13466
+ break;
13347
13467
  default:
13348
13468
  columns = [{
13349
13469
  dataIndex: 'mark',
@@ -15291,7 +15411,7 @@ var typeMap$1 = {
15291
15411
  }
15292
15412
  };
15293
15413
  var wdtReissue = function wdtReissue(props) {
15294
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
15414
+ var _value$wdtSystemOrder, _typeMap$type25, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
15295
15415
  var value = props.value,
15296
15416
  onChange = props.onChange,
15297
15417
  _props$reasonList = props.reasonList,
@@ -15452,20 +15572,19 @@ var wdtReissue = function wdtReissue(props) {
15452
15572
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15453
15573
  };
15454
15574
  var selectedGoodsChange = React.useCallback(function (skuList) {
15455
- var _typeMap$type23, _getGoodDetails;
15575
+ var _typeMap$type23, _value, _typeMap$type24;
15456
15576
  var newValue = _objectSpread2({}, value);
15457
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_getGoodDetails = getGoodDetails({
15458
- mode: isStrict
15459
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
15577
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = value === null || value === void 0 ? void 0 : (_value = value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)]) === null || _value === void 0 ? void 0 : _value.filter(function (item) {
15460
15578
  return skuList.includes(item.id);
15461
15579
  });
15580
+ console.log('newValue', newValue);
15462
15581
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15463
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
15582
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]]);
15464
15583
  //显示选择商品按钮 原单换不显示选择商品
15465
15584
  var showChangeBtn = React.useMemo(function () {
15466
- var _typeMap$type25;
15467
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
15468
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
15585
+ var _typeMap$type26;
15586
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]);
15587
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]]);
15469
15588
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
15470
15589
  gutter: 8,
15471
15590
  wrap: true
@@ -15483,12 +15602,12 @@ var wdtReissue = function wdtReissue(props) {
15483
15602
  },
15484
15603
  disabled: disabled,
15485
15604
  allowClear: false,
15486
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
15605
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
15487
15606
  onChange: function onChange(val) {
15488
15607
  return changeSystemOrderHandle(val);
15489
15608
  },
15490
15609
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15491
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15610
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15492
15611
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
15493
15612
  key: item.billNo,
15494
15613
  value: item.billNo,
@@ -15509,7 +15628,7 @@ var wdtReissue = function wdtReissue(props) {
15509
15628
  disabled: disabled,
15510
15629
  allowClear: false,
15511
15630
  options: reasonList,
15512
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName)],
15631
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
15513
15632
  onChange: function onChange(val) {
15514
15633
  return changeTypeHandle(val);
15515
15634
  }
@@ -15521,7 +15640,7 @@ var wdtReissue = function wdtReissue(props) {
15521
15640
  canUpdateNumber: showChangeBtn,
15522
15641
  showChangeBtn: showChangeBtn,
15523
15642
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15524
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
15643
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
15525
15644
  onChange: function onChange(val) {
15526
15645
  return changeGoodHandle(val);
15527
15646
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "1.22.1-beta.6",
3
+ "version": "1.22.1-beta.9",
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": "1.22.1-beta.6",
23
+ "@kmkf-fe-packages/kmkf-utils": "1.22.1-beta.9",
24
24
  "ahooks": "^3.7.4",
25
25
  "bignumber.js": "^9.1.2",
26
26
  "kmkf-monitor": "^0.8.9",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "519ad11f0f7853f93b865b1a52c72ece481fa56f"
68
+ "gitHead": "13dd10e5c480bf8bc57087360c4606d7fdf7fde8"
69
69
  }