@kmkf-fe-packages/basic-components 0.7.15-alpha.3 → 0.7.15-alpha.4

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
@@ -5,6 +5,7 @@ import request, { extend as extend$1 } from 'umi-request';
5
5
  import { AddressData, BsAddressData, request as request$1, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
6
6
  import zhCN from 'antd/lib/locale/zh_CN';
7
7
  import pubsub from 'pubsub-js';
8
+ import { cloneDeep } from 'lodash';
8
9
 
9
10
  function _iterableToArrayLimit(arr, i) {
10
11
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
@@ -7370,9 +7371,6 @@ var BuyerNick = function BuyerNick(props) {
7370
7371
  },
7371
7372
  onBlur: function onBlur(e) {
7372
7373
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'buyerNick');
7373
- },
7374
- style: {
7375
- marginRight: '8px'
7376
7374
  }
7377
7375
  });
7378
7376
  };
@@ -7577,9 +7575,6 @@ var AliPay = function AliPay(props) {
7577
7575
  value: value === null || value === void 0 ? void 0 : value.name,
7578
7576
  onChange: function onChange(e) {
7579
7577
  changeValue(e, 'name');
7580
- },
7581
- style: {
7582
- marginRight: '8px'
7583
7578
  }
7584
7579
  })) : null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
7585
7580
  placeholder: "\u8BF7\u8F93\u5165\u652F\u4ED8\u5B9D\u8D26\u53F7",
@@ -7590,10 +7585,7 @@ var AliPay = function AliPay(props) {
7590
7585
  onBlur: function onBlur(e) {
7591
7586
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'alipayAccount');
7592
7587
  },
7593
- disabled: disabled,
7594
- style: {
7595
- marginRight: '8px'
7596
- }
7588
+ disabled: disabled
7597
7589
  })));
7598
7590
  };
7599
7591
 
@@ -9329,7 +9321,8 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9329
9321
  options: options,
9330
9322
  showSearch: true,
9331
9323
  style: {
9332
- width: '100%'
9324
+ width: '100%',
9325
+ marginBottom: '8px'
9333
9326
  },
9334
9327
  filterOption: function filterOption(input, option) {
9335
9328
  return option.label.includes(input);
@@ -9339,6 +9332,9 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9339
9332
  //物流单号
9340
9333
  var LogisticsCode = function LogisticsCode() {
9341
9334
  return /*#__PURE__*/React.createElement(Input, {
9335
+ style: {
9336
+ marginBottom: '8px'
9337
+ },
9342
9338
  disabled: disabled,
9343
9339
  placeholder: "\u7269\u6D41\u5355\u53F7",
9344
9340
  onChange: function onChange(e) {
@@ -9630,15 +9626,18 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9630
9626
  _useState16 = _slicedToArray(_useState15, 2),
9631
9627
  platform = _useState16[0],
9632
9628
  setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9633
- // const [shopInfo, setShopInfo] = useState<any>({}); //店铺信息
9634
- var _useState17 = useState([{
9629
+ var _useState17 = useState({}),
9630
+ _useState18 = _slicedToArray(_useState17, 2),
9631
+ shopInfo = _useState18[0],
9632
+ setShopInfo = _useState18[1]; //店铺信息
9633
+ var _useState19 = useState([{
9635
9634
  tab: '所选商品',
9636
9635
  key: 'onSale'
9637
9636
  }
9638
9637
  // { tab: '已选商品', key: 'select' },
9639
9638
  ]),
9640
- _useState18 = _slicedToArray(_useState17, 1),
9641
- tabs = _useState18[0];
9639
+ _useState20 = _slicedToArray(_useState19, 1),
9640
+ tabs = _useState20[0];
9642
9641
  //选择页码
9643
9642
  var pageChange = function pageChange(page, pageSize) {
9644
9643
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
@@ -9670,38 +9669,46 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9670
9669
  */
9671
9670
  var queryItems = /*#__PURE__*/function () {
9672
9671
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9673
- var res, _ref2, items, totalCount;
9672
+ var params, res, _ref2, list, _total, nextKey, newList;
9674
9673
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9675
9674
  while (1) switch (_context.prev = _context.next) {
9676
9675
  case 0:
9677
9676
  _context.prev = 0;
9678
9677
  setLoading(true);
9679
- _context.next = 4;
9680
- return extendRequest('/qy/gdfw/workOrder/queryItems', {
9678
+ params = _objectSpread2({}, queryPd());
9679
+ params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9680
+ params.platform = platform;
9681
+ params.status = params.type === 'onSale' ? 1 : 0;
9682
+ delete params.type;
9683
+ _context.next = 9;
9684
+ return extendRequest('/qy/gdfw/product/listProduct', {
9681
9685
  method: 'post',
9682
- data: queryPd()
9686
+ data: params
9683
9687
  });
9684
- case 4:
9688
+ case 9:
9685
9689
  res = _context.sent;
9686
9690
  _ref2 = res.data || {
9687
- items: [],
9688
- totalCount: 0
9689
- }, items = _ref2.items, totalCount = _ref2.totalCount;
9690
- items.forEach(function (item) {
9691
+ result: [],
9692
+ total: 0
9693
+ }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9694
+ newList = list || [];
9695
+ newList.forEach(function (item) {
9696
+ item.numIid = item.productId;
9697
+ item.outerId = item.outId;
9698
+ item.title = item.productName;
9691
9699
  item.platform = platform;
9692
- item.key = item.numIid;
9693
9700
  });
9694
- setGoodList(_toConsumableArray(items));
9695
- setTotal(totalCount);
9696
- case 9:
9697
- _context.prev = 9;
9701
+ setGoodList(newList);
9702
+ setTotal(_total);
9703
+ case 15:
9704
+ _context.prev = 15;
9698
9705
  setLoading(false);
9699
- return _context.finish(9);
9700
- case 12:
9706
+ return _context.finish(15);
9707
+ case 18:
9701
9708
  case "end":
9702
9709
  return _context.stop();
9703
9710
  }
9704
- }, _callee, null, [[0,, 9, 12]]);
9711
+ }, _callee, null, [[0,, 15, 18]]);
9705
9712
  }));
9706
9713
  return function queryItems() {
9707
9714
  return _ref.apply(this, arguments);
@@ -9711,10 +9718,10 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9711
9718
  var shopInfo = shopList.find(function (item) {
9712
9719
  return shopId === item.shopId || shopId === item.shopName;
9713
9720
  });
9714
- // setShopInfo(shopInfo);
9721
+ setShopInfo(shopInfo);
9715
9722
  var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
9716
9723
  setPlatform(platform);
9717
- }, []);
9724
+ }, [shopId]);
9718
9725
  var rowSelection = {
9719
9726
  selectedRowKeys: selectIds,
9720
9727
  onChange: function onChange(selectedRowKeys, selectedRows, info) {
@@ -9777,6 +9784,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9777
9784
  }, /*#__PURE__*/React.createElement(Table, {
9778
9785
  rowSelection: rowSelection,
9779
9786
  columns: columns,
9787
+ rowKey: 'numIid',
9780
9788
  dataSource: searchParams.type == 'select' ? selectList : goodList,
9781
9789
  scroll: {
9782
9790
  y: 300
@@ -9821,11 +9829,11 @@ var GoodItem = function GoodItem(props) {
9821
9829
  otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
9822
9830
  _props$canUpdateNumbe = props.canUpdateNumber,
9823
9831
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
9824
- _props$headerText = props.headerText,
9825
- headerText = _props$headerText === void 0 ? '' : _props$headerText,
9826
- onSelect = props.onSelect;
9832
+ onSelect = props.onSelect,
9833
+ onDelete = props.onDelete;
9827
9834
  var refModal = useRef();
9828
9835
  var handleDelete = function handleDelete(index) {
9836
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
9829
9837
  var newList = value.filter(function (item, i) {
9830
9838
  return index !== i;
9831
9839
  });
@@ -9835,6 +9843,11 @@ var GoodItem = function GoodItem(props) {
9835
9843
  _useState2 = _slicedToArray(_useState, 2),
9836
9844
  selectedRowKeys = _useState2[0],
9837
9845
  setSelectedRowKeys = _useState2[1];
9846
+ useEffect(function () {
9847
+ if (!tableSelect) {
9848
+ setSelectedRowKeys([]);
9849
+ }
9850
+ }, [tableSelect]);
9838
9851
  var updateHandle = function updateHandle(val, index, type) {
9839
9852
  if (value === null || value === void 0 ? void 0 : value.length) {
9840
9853
  value[index][type] = val;
@@ -9846,36 +9859,36 @@ var GoodItem = function GoodItem(props) {
9846
9859
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9847
9860
  return [{
9848
9861
  dataIndex: 'name',
9849
- title: "bs".concat(text, "\u540D\u79F0"),
9862
+ title: "".concat(text, "\u540D\u79F0"),
9850
9863
  align: 'center',
9851
9864
  ellipsis: true,
9852
- width: 200
9865
+ width: 100
9853
9866
  }, {
9854
9867
  dataIndex: 'code',
9855
- title: "bs".concat(text, "\u7F16\u7801"),
9868
+ title: "".concat(text, "\u7F16\u7801"),
9856
9869
  align: 'center',
9857
9870
  ellipsis: true,
9858
- width: 200
9871
+ width: 100
9859
9872
  }, {
9860
9873
  dataIndex: 'sku',
9861
- title: "bs".concat(text, "sku\u7F16\u7801"),
9874
+ title: "".concat(text, "sku\u7F16\u7801"),
9862
9875
  align: 'center',
9863
9876
  ellipsis: true,
9864
- width: 200
9877
+ width: 100
9865
9878
  }, {
9866
9879
  dataIndex: 'money',
9867
- title: "bs\u5B9E\u4ED8\u91D1\u989D",
9880
+ title: "\u5B9E\u4ED8\u91D1\u989D",
9868
9881
  align: 'center',
9869
9882
  ellipsis: true,
9870
9883
  width: 100
9871
9884
  }, {
9872
9885
  dataIndex: 'number',
9873
- title: "bs".concat(text, "\u6570\u91CF"),
9886
+ title: "".concat(text, "\u6570\u91CF"),
9874
9887
  align: 'center',
9875
9888
  ellipsis: true,
9876
9889
  width: 100,
9877
9890
  render: function render(val, record, index) {
9878
- return canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
9891
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
9879
9892
  value: val,
9880
9893
  onChange: function onChange(num) {
9881
9894
  return updateHandle(num, index, 'number');
@@ -9884,13 +9897,13 @@ var GoodItem = function GoodItem(props) {
9884
9897
  }
9885
9898
  }, {
9886
9899
  dataIndex: 'share',
9887
- title: "bs\u5206\u644A\u4EF7",
9900
+ title: "\u5206\u644A\u4EF7",
9888
9901
  align: 'center',
9889
9902
  ellipsis: true,
9890
- width: 100
9903
+ width: 70
9891
9904
  }, {
9892
9905
  dataIndex: 'type',
9893
- title: "bs\u8D60\u54C1\u7C7B\u578B",
9906
+ title: "\u8D60\u54C1\u7C7B\u578B",
9894
9907
  align: 'center',
9895
9908
  ellipsis: true,
9896
9909
  width: 100
@@ -9908,17 +9921,17 @@ var GoodItem = function GoodItem(props) {
9908
9921
  }
9909
9922
  }, {
9910
9923
  dataIndex: 'pic',
9911
- title: "bs\u56FE\u7247",
9924
+ title: "\u56FE\u7247",
9912
9925
  align: 'center',
9913
9926
  ellipsis: true,
9914
- width: 200,
9927
+ width: 100,
9915
9928
  render: function render(val) {
9916
9929
  return /*#__PURE__*/React.createElement(Image, {
9917
9930
  width: 60,
9918
9931
  src: val
9919
9932
  });
9920
9933
  }
9921
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS(headerText).filter(function (t) {
9934
+ }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9922
9935
  return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9923
9936
  })));
9924
9937
  if (!disabled) {
@@ -9927,6 +9940,7 @@ var GoodItem = function GoodItem(props) {
9927
9940
  title: "\u64CD\u4F5C",
9928
9941
  align: 'center',
9929
9942
  ellipsis: true,
9943
+ width: 100,
9930
9944
  render: function render(val, record, index) {
9931
9945
  return record.canDelete ? /*#__PURE__*/React.createElement(Button, {
9932
9946
  type: "link",
@@ -9953,9 +9967,10 @@ var GoodItem = function GoodItem(props) {
9953
9967
  sku: '',
9954
9968
  money: price,
9955
9969
  share: '',
9956
- number: 3,
9970
+ number: 1,
9957
9971
  type: '',
9958
- canDelete: true
9972
+ canDelete: true,
9973
+ canUpdateNumber: canUpdateNumber
9959
9974
  };
9960
9975
  });
9961
9976
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
@@ -9980,9 +9995,11 @@ var GoodItem = function GoodItem(props) {
9980
9995
  params.rowSelection = rowSelection;
9981
9996
  }
9982
9997
  return params;
9983
- }, [tableSelect]);
9984
- return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement(Space, {
9985
- align: "end"
9998
+ }, [tableSelect, selectedRowKeys]);
9999
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React.createElement("div", {
10000
+ style: {
10001
+ float: 'right'
10002
+ }
9986
10003
  }, /*#__PURE__*/React.createElement(Button, {
9987
10004
  type: "link",
9988
10005
  onClick: handleChangeGoods
@@ -10025,7 +10042,7 @@ var BsGoods = function BsGoods(props) {
10025
10042
  var ref = useRef();
10026
10043
  var reissueRef = useRef();
10027
10044
  useEffect(function () {
10028
- ref.current = pubsub.subscribe('type', function (type, val) {
10045
+ ref.current = pubsub.subscribeOnce('type', function (type, val) {
10029
10046
  console.log('goods', type, val, value);
10030
10047
  if (disabled) return;
10031
10048
  setWithInfo({
@@ -10033,7 +10050,7 @@ var BsGoods = function BsGoods(props) {
10033
10050
  val: val
10034
10051
  });
10035
10052
  setTableSelect(['2', '4'].includes(val));
10036
- if (['1', '3'].includes(val)) {
10053
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10037
10054
  pubsub.publish('selectList', {
10038
10055
  type: val,
10039
10056
  list: _toConsumableArray(value).map(function (item) {
@@ -10042,10 +10059,9 @@ var BsGoods = function BsGoods(props) {
10042
10059
  })
10043
10060
  });
10044
10061
  }
10045
- // pubsub.unsubscribe('type');
10046
10062
  });
10047
10063
  //补发
10048
- reissueRef.current = pubsub.subscribe('reissueType', function (type, val) {
10064
+ reissueRef.current = pubsub.subscribeOnce('reissueType', function (type, val) {
10049
10065
  if (disabled) return;
10050
10066
  console.log('reissueType', type, val, value);
10051
10067
  setWithInfo({
@@ -10053,7 +10069,7 @@ var BsGoods = function BsGoods(props) {
10053
10069
  val: val
10054
10070
  });
10055
10071
  setTableSelect(['2', '4'].includes(val));
10056
- if (['1', '3'].includes(val)) {
10072
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10057
10073
  pubsub.publish('reissueSelectList', {
10058
10074
  type: val,
10059
10075
  list: (value || []).map(function (item) {
@@ -10062,9 +10078,7 @@ var BsGoods = function BsGoods(props) {
10062
10078
  })
10063
10079
  });
10064
10080
  }
10065
- // pubsub.unsubscribe('reissueType');
10066
10081
  });
10067
-
10068
10082
  return function () {
10069
10083
  pubsub.unsubscribe(ref.current);
10070
10084
  pubsub.unsubscribe(reissueRef.current);
@@ -10072,30 +10086,38 @@ var BsGoods = function BsGoods(props) {
10072
10086
  }, [value, withInfo, disabled]);
10073
10087
  var _onSelect = useCallback(function (list) {
10074
10088
  if (disabled) return;
10075
- // console.log('withInfo', withInfo, list);
10089
+ console.log('withInfo', withInfo, list);
10090
+ var newList = cloneDeep(list);
10076
10091
  pubsub.publish(withInfo.type === 'reissueType' ? 'reissueSelectList' : 'selectList', {
10077
10092
  type: withInfo.val,
10078
- list: list.map(function (item) {
10093
+ list: newList.map(function (item) {
10079
10094
  item.canDelete = true;
10080
10095
  return item;
10081
10096
  })
10082
10097
  });
10083
10098
  }, [withInfo]);
10099
+ var _onDelete = function onDelete(item) {
10100
+ var deleteId = item === null || item === void 0 ? void 0 : item.id;
10101
+ pubsub.publish('deleteGood', deleteId);
10102
+ pubsub.publish('reissueDeleteGood', deleteId);
10103
+ };
10084
10104
  return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10085
10105
  key: 'bsGoods',
10086
- headerText: "\u5546\u54C1",
10087
10106
  disabled: disabled
10088
10107
  }, props), {}, {
10089
10108
  tableSelect: tableSelect,
10090
10109
  onSelect: function onSelect(list) {
10091
10110
  return _onSelect(list);
10111
+ },
10112
+ onDelete: function onDelete(item) {
10113
+ return _onDelete(item);
10092
10114
  }
10093
10115
  }));
10094
10116
  };
10095
10117
 
10096
10118
  var _excluded$b = ["value", "onChange", "reasonList", "disabled"];
10097
10119
  var BsExchange = function BsExchange(props) {
10098
- var _value$bsExchangeType2, _value$bsExchangeType3, _value$bsExchangeType4;
10120
+ var _value$bsExchangeType4, _value$bsExchangeType5, _value$bsExchangeType6;
10099
10121
  var value = props.value,
10100
10122
  onChange = props.onChange,
10101
10123
  _props$reasonList = props.reasonList,
@@ -10103,21 +10125,35 @@ var BsExchange = function BsExchange(props) {
10103
10125
  disabled = props.disabled,
10104
10126
  other = _objectWithoutProperties(props, _excluded$b);
10105
10127
  useEffect(function () {
10106
- pubsub.subscribe('selectList', function (_, data) {
10128
+ pubsub.subscribeOnce('selectList', function (_, data) {
10107
10129
  if (disabled) return;
10108
10130
  if (value) {
10109
- // console.log(
10110
- // 'BsExchange',
10111
- // 'getListHandle',
10112
- // data,
10113
- // value,
10114
- // getListHandle([...data.list], value),
10115
- // );
10131
+ var newData = cloneDeep(data);
10132
+ console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
10116
10133
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10117
- bsExchangeReturnGoods: getListHandle(_toConsumableArray(data.list), value)
10134
+ bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
10118
10135
  }));
10119
10136
  }
10120
- pubsub.unsubscribe('selectList');
10137
+ });
10138
+ pubsub.subscribeOnce('deleteGood', function (_, data) {
10139
+ if (disabled) return;
10140
+ if (value) {
10141
+ var _value$bsExchangeType, _value$bsExchangeType2;
10142
+ var newValue = _objectSpread2({}, value);
10143
+ if (['2', '4'].includes((_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
10144
+ newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.map(function (item) {
10145
+ item.bsExchangeReturnGoods = item.bsExchangeReturnGoods.filter(function (t) {
10146
+ return t.id !== data;
10147
+ });
10148
+ return item;
10149
+ });
10150
+ } else if (['1', '3'].includes((_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2[0])) {
10151
+ newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.filter(function (item) {
10152
+ return item.id !== data;
10153
+ });
10154
+ }
10155
+ onChange(newValue);
10156
+ }
10121
10157
  });
10122
10158
  }, [value]);
10123
10159
  var getListHandle = function getListHandle(list, val) {
@@ -10125,6 +10161,7 @@ var BsExchange = function BsExchange(props) {
10125
10161
  //如果是原单换
10126
10162
  if (['1', '3'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType = val.bsExchangeType) === null || _val$bsExchangeType === void 0 ? void 0 : _val$bsExchangeType[0])) {
10127
10163
  return list.reduce(function (prv, next) {
10164
+ var _val$bsExchangeType2;
10128
10165
  next.canDelete = false;
10129
10166
  //数量大于1 拆开
10130
10167
  if (next.number > 1) {
@@ -10133,7 +10170,7 @@ var BsExchange = function BsExchange(props) {
10133
10170
  return t;
10134
10171
  });
10135
10172
  prv.push.apply(prv, _toConsumableArray(newList));
10136
- } else {
10173
+ } else if (['2', '4'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType2 = val.bsExchangeType) === null || _val$bsExchangeType2 === void 0 ? void 0 : _val$bsExchangeType2[0])) {
10137
10174
  prv.push(_objectSpread2({}, next));
10138
10175
  }
10139
10176
  return prv;
@@ -10163,6 +10200,14 @@ var BsExchange = function BsExchange(props) {
10163
10200
  }, []);
10164
10201
  }
10165
10202
  };
10203
+ var changeTypeHandle = function changeTypeHandle(val) {
10204
+ var newValue = _objectSpread2({}, value);
10205
+ newValue.bsExchangeType = val;
10206
+ newValue.bsExchangeReturnGoods = [];
10207
+ newValue.bsExchangeGiftGoods = [];
10208
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10209
+ pubsub.publish('type', val[0]);
10210
+ };
10166
10211
  var changeHandle = function changeHandle(val, key) {
10167
10212
  var newValue = _objectSpread2({}, value);
10168
10213
  newValue[key] = val;
@@ -10177,19 +10222,22 @@ var BsExchange = function BsExchange(props) {
10177
10222
  var newValue = _objectSpread2({}, value);
10178
10223
  newValue.bsExchangeReturnGoods[index][key] = (val || []).map(function (t) {
10179
10224
  t.index = index;
10225
+ if (key === 'bsExchangeGiftGoods') {
10226
+ t.money = 0;
10227
+ }
10180
10228
  return t;
10181
10229
  });
10182
10230
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10183
10231
  };
10184
10232
  //显示选择商品按钮 原单换不显示选择商品
10185
10233
  var showChangeBtn = useMemo(function () {
10186
- var _value$bsExchangeType;
10187
- return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0]) || disabled;
10234
+ var _value$bsExchangeType3;
10235
+ return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType3 = value.bsExchangeType) === null || _value$bsExchangeType3 === void 0 ? void 0 : _value$bsExchangeType3[0]) || !!disabled;
10188
10236
  }, [value === null || value === void 0 ? void 0 : value.bsExchangeType]);
10189
10237
  var copyGoods = function copyGoods(index) {
10190
10238
  var copyHandle = function copyHandle() {
10191
10239
  var newValue = _objectSpread2({}, value);
10192
- newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods'] = _objectSpread2(_objectSpread2({}, newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods']), newValue.bsExchangeReturnGoods[index]['bsExchangeReturnGoods']);
10240
+ newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods'] = [].concat(_toConsumableArray(newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods']), _toConsumableArray(newValue.bsExchangeReturnGoods[index]['bsExchangeReturnGoods']));
10193
10241
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
10194
10242
  };
10195
10243
  return /*#__PURE__*/React.createElement(Button, {
@@ -10198,32 +10246,32 @@ var BsExchange = function BsExchange(props) {
10198
10246
  }, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
10199
10247
  };
10200
10248
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
10249
+ style: {
10250
+ marginBottom: '8px'
10251
+ },
10201
10252
  disabled: disabled,
10202
10253
  allowClear: false,
10203
10254
  options: reasonList,
10204
10255
  value: value === null || value === void 0 ? void 0 : value.bsExchangeType,
10205
10256
  onChange: function onChange(val) {
10206
- return changeHandle(val, 'bsExchangeType');
10257
+ return changeTypeHandle(val);
10207
10258
  }
10208
- }), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2.length) ? /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10259
+ }), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4.length) ? /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10209
10260
  key: 'bsExchangeGoods'
10210
10261
  }, other), {}, {
10211
- headerText: "\u5546\u54C1",
10212
10262
  disabled: disabled,
10213
10263
  showChangeBtn: false
10214
- })) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType3 = value.bsExchangeType) === null || _value$bsExchangeType3 === void 0 ? void 0 : _value$bsExchangeType3[0]) ? /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10264
+ })) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType5 = value.bsExchangeType) === null || _value$bsExchangeType5 === void 0 ? void 0 : _value$bsExchangeType5[0]) ? /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10215
10265
  key: 'bsExchangeGoods'
10216
10266
  }, other), {}, {
10217
- headerText: "\u5546\u54C1",
10218
10267
  disabled: disabled,
10219
- showChangeBtn: showChangeBtn,
10268
+ showChangeBtn: false,
10220
10269
  value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
10221
10270
  onChange: function onChange(val) {
10222
10271
  return changeHandle(val, 'bsExchangeReturnGoods');
10223
10272
  }
10224
10273
  })) : /*#__PURE__*/React.createElement(React.Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
10225
10274
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10226
- headerText: "\u9000\u56DE",
10227
10275
  key: 'bsReturnGoods'
10228
10276
  }, other), {}, {
10229
10277
  disabled: disabled,
@@ -10233,20 +10281,17 @@ var BsExchange = function BsExchange(props) {
10233
10281
  return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
10234
10282
  }
10235
10283
  })), /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10236
- headerText: "\u6362\u51FA",
10237
10284
  key: 'bsOutGoods'
10238
10285
  }, other), {}, {
10239
10286
  disabled: disabled,
10240
10287
  showChangeBtn: showChangeBtn,
10241
- otherOperations: function otherOperations() {
10242
- return copyGoods(index);
10243
- },
10288
+ otherOperations: copyGoods(index),
10244
10289
  value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
10245
10290
  onChange: function onChange(val) {
10246
10291
  return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
10247
10292
  }
10248
10293
  })));
10249
- })), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4[0]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10294
+ })), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType6 = value.bsExchangeType) === null || _value$bsExchangeType6 === void 0 ? void 0 : _value$bsExchangeType6[0]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10250
10295
  headerText: "\u8D60\u54C1",
10251
10296
  key: 'bsGiftGoods',
10252
10297
  disabled: disabled
@@ -10267,22 +10312,32 @@ var BsReissue = function BsReissue(props) {
10267
10312
  disabled = props.disabled,
10268
10313
  other = _objectWithoutProperties(props, _excluded$c);
10269
10314
  useEffect(function () {
10270
- pubsub.subscribe('reissueSelectList', function (_, data) {
10315
+ pubsub.subscribeOnce('reissueSelectList', function (_, data) {
10271
10316
  if (disabled) return;
10272
- // console.log(data, value);
10317
+ console.log(data, value);
10273
10318
  if (value) {
10319
+ var newData = cloneDeep(data);
10274
10320
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10275
- bsReissueGoods: ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
10321
+ bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
10276
10322
  item.money = 0;
10323
+ item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
10277
10324
  return item;
10278
10325
  })
10279
10326
  }));
10280
10327
  }
10281
- pubsub.unsubscribe('reissueSelectList');
10328
+ });
10329
+ pubsub.subscribeOnce('reissueDeleteGood', function (_, data) {
10330
+ if (disabled) return;
10331
+ if (value) {
10332
+ var newValue = _objectSpread2({}, value);
10333
+ newValue.bsReissueGoods = newValue.bsReissueGoods.filter(function (item) {
10334
+ return item.id !== data;
10335
+ });
10336
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10337
+ }
10282
10338
  });
10283
10339
  }, [value, disabled]);
10284
10340
  var changeHandle = function changeHandle(val, key) {
10285
- console.log('changeHandle', val, key, value);
10286
10341
  var newValue = _objectSpread2({}, value);
10287
10342
  if (key === 'bsReissueGoods') {
10288
10343
  val = (val || []).map(function (item) {
@@ -10305,6 +10360,9 @@ var BsReissue = function BsReissue(props) {
10305
10360
  return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsReissueType = value.bsReissueType) === null || _value$bsReissueType === void 0 ? void 0 : _value$bsReissueType[0]);
10306
10361
  }, [value === null || value === void 0 ? void 0 : value.bsReissueType]);
10307
10362
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
10363
+ style: {
10364
+ marginBottom: '8px'
10365
+ },
10308
10366
  disabled: disabled,
10309
10367
  allowClear: false,
10310
10368
  options: reasonList,
@@ -10313,11 +10371,10 @@ var BsReissue = function BsReissue(props) {
10313
10371
  return changeHandle(val, 'bsReissueType');
10314
10372
  }
10315
10373
  }), /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10316
- headerText: "\u8865\u53D1",
10317
10374
  key: 'reissueGoods'
10318
10375
  }, other), {}, {
10319
10376
  disabled: disabled,
10320
- canUpdateNumber: true,
10377
+ canUpdateNumber: showChangeBtn,
10321
10378
  showChangeBtn: showChangeBtn,
10322
10379
  value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
10323
10380
  onChange: function onChange(val) {
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ var request = require('umi-request');
9
9
  var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
10
10
  var zhCN = require('antd/lib/locale/zh_CN');
11
11
  var pubsub = require('pubsub-js');
12
+ var lodash = require('lodash');
12
13
 
13
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
15
 
@@ -7381,9 +7382,6 @@ var BuyerNick = function BuyerNick(props) {
7381
7382
  },
7382
7383
  onBlur: function onBlur(e) {
7383
7384
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'buyerNick');
7384
- },
7385
- style: {
7386
- marginRight: '8px'
7387
7385
  }
7388
7386
  });
7389
7387
  };
@@ -7588,9 +7586,6 @@ var AliPay = function AliPay(props) {
7588
7586
  value: value === null || value === void 0 ? void 0 : value.name,
7589
7587
  onChange: function onChange(e) {
7590
7588
  changeValue(e, 'name');
7591
- },
7592
- style: {
7593
- marginRight: '8px'
7594
7589
  }
7595
7590
  })) : null, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
7596
7591
  placeholder: "\u8BF7\u8F93\u5165\u652F\u4ED8\u5B9D\u8D26\u53F7",
@@ -7601,10 +7596,7 @@ var AliPay = function AliPay(props) {
7601
7596
  onBlur: function onBlur(e) {
7602
7597
  _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'alipayAccount');
7603
7598
  },
7604
- disabled: disabled,
7605
- style: {
7606
- marginRight: '8px'
7607
- }
7599
+ disabled: disabled
7608
7600
  })));
7609
7601
  };
7610
7602
 
@@ -9340,7 +9332,8 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9340
9332
  options: options,
9341
9333
  showSearch: true,
9342
9334
  style: {
9343
- width: '100%'
9335
+ width: '100%',
9336
+ marginBottom: '8px'
9344
9337
  },
9345
9338
  filterOption: function filterOption(input, option) {
9346
9339
  return option.label.includes(input);
@@ -9350,6 +9343,9 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9350
9343
  //物流单号
9351
9344
  var LogisticsCode = function LogisticsCode() {
9352
9345
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9346
+ style: {
9347
+ marginBottom: '8px'
9348
+ },
9353
9349
  disabled: disabled,
9354
9350
  placeholder: "\u7269\u6D41\u5355\u53F7",
9355
9351
  onChange: function onChange(e) {
@@ -9641,15 +9637,18 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9641
9637
  _useState16 = _slicedToArray(_useState15, 2),
9642
9638
  platform = _useState16[0],
9643
9639
  setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9644
- // const [shopInfo, setShopInfo] = useState<any>({}); //店铺信息
9645
- var _useState17 = React.useState([{
9640
+ var _useState17 = React.useState({}),
9641
+ _useState18 = _slicedToArray(_useState17, 2),
9642
+ shopInfo = _useState18[0],
9643
+ setShopInfo = _useState18[1]; //店铺信息
9644
+ var _useState19 = React.useState([{
9646
9645
  tab: '所选商品',
9647
9646
  key: 'onSale'
9648
9647
  }
9649
9648
  // { tab: '已选商品', key: 'select' },
9650
9649
  ]),
9651
- _useState18 = _slicedToArray(_useState17, 1),
9652
- tabs = _useState18[0];
9650
+ _useState20 = _slicedToArray(_useState19, 1),
9651
+ tabs = _useState20[0];
9653
9652
  //选择页码
9654
9653
  var pageChange = function pageChange(page, pageSize) {
9655
9654
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
@@ -9681,38 +9680,46 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9681
9680
  */
9682
9681
  var queryItems = /*#__PURE__*/function () {
9683
9682
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9684
- var res, _ref2, items, totalCount;
9683
+ var params, res, _ref2, list, _total, nextKey, newList;
9685
9684
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9686
9685
  while (1) switch (_context.prev = _context.next) {
9687
9686
  case 0:
9688
9687
  _context.prev = 0;
9689
9688
  setLoading(true);
9690
- _context.next = 4;
9691
- return extendRequest('/qy/gdfw/workOrder/queryItems', {
9689
+ params = _objectSpread2({}, queryPd());
9690
+ params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9691
+ params.platform = platform;
9692
+ params.status = params.type === 'onSale' ? 1 : 0;
9693
+ delete params.type;
9694
+ _context.next = 9;
9695
+ return extendRequest('/qy/gdfw/product/listProduct', {
9692
9696
  method: 'post',
9693
- data: queryPd()
9697
+ data: params
9694
9698
  });
9695
- case 4:
9699
+ case 9:
9696
9700
  res = _context.sent;
9697
9701
  _ref2 = res.data || {
9698
- items: [],
9699
- totalCount: 0
9700
- }, items = _ref2.items, totalCount = _ref2.totalCount;
9701
- items.forEach(function (item) {
9702
+ result: [],
9703
+ total: 0
9704
+ }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9705
+ newList = list || [];
9706
+ newList.forEach(function (item) {
9707
+ item.numIid = item.productId;
9708
+ item.outerId = item.outId;
9709
+ item.title = item.productName;
9702
9710
  item.platform = platform;
9703
- item.key = item.numIid;
9704
9711
  });
9705
- setGoodList(_toConsumableArray(items));
9706
- setTotal(totalCount);
9707
- case 9:
9708
- _context.prev = 9;
9712
+ setGoodList(newList);
9713
+ setTotal(_total);
9714
+ case 15:
9715
+ _context.prev = 15;
9709
9716
  setLoading(false);
9710
- return _context.finish(9);
9711
- case 12:
9717
+ return _context.finish(15);
9718
+ case 18:
9712
9719
  case "end":
9713
9720
  return _context.stop();
9714
9721
  }
9715
- }, _callee, null, [[0,, 9, 12]]);
9722
+ }, _callee, null, [[0,, 15, 18]]);
9716
9723
  }));
9717
9724
  return function queryItems() {
9718
9725
  return _ref.apply(this, arguments);
@@ -9722,10 +9729,10 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9722
9729
  var shopInfo = shopList.find(function (item) {
9723
9730
  return shopId === item.shopId || shopId === item.shopName;
9724
9731
  });
9725
- // setShopInfo(shopInfo);
9732
+ setShopInfo(shopInfo);
9726
9733
  var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
9727
9734
  setPlatform(platform);
9728
- }, []);
9735
+ }, [shopId]);
9729
9736
  var rowSelection = {
9730
9737
  selectedRowKeys: selectIds,
9731
9738
  onChange: function onChange(selectedRowKeys, selectedRows, info) {
@@ -9788,6 +9795,7 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9788
9795
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
9789
9796
  rowSelection: rowSelection,
9790
9797
  columns: columns,
9798
+ rowKey: 'numIid',
9791
9799
  dataSource: searchParams.type == 'select' ? selectList : goodList,
9792
9800
  scroll: {
9793
9801
  y: 300
@@ -9832,11 +9840,11 @@ var GoodItem = function GoodItem(props) {
9832
9840
  otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
9833
9841
  _props$canUpdateNumbe = props.canUpdateNumber,
9834
9842
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
9835
- _props$headerText = props.headerText,
9836
- headerText = _props$headerText === void 0 ? '' : _props$headerText,
9837
- onSelect = props.onSelect;
9843
+ onSelect = props.onSelect,
9844
+ onDelete = props.onDelete;
9838
9845
  var refModal = React.useRef();
9839
9846
  var handleDelete = function handleDelete(index) {
9847
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
9840
9848
  var newList = value.filter(function (item, i) {
9841
9849
  return index !== i;
9842
9850
  });
@@ -9846,6 +9854,11 @@ var GoodItem = function GoodItem(props) {
9846
9854
  _useState2 = _slicedToArray(_useState, 2),
9847
9855
  selectedRowKeys = _useState2[0],
9848
9856
  setSelectedRowKeys = _useState2[1];
9857
+ React.useEffect(function () {
9858
+ if (!tableSelect) {
9859
+ setSelectedRowKeys([]);
9860
+ }
9861
+ }, [tableSelect]);
9849
9862
  var updateHandle = function updateHandle(val, index, type) {
9850
9863
  if (value === null || value === void 0 ? void 0 : value.length) {
9851
9864
  value[index][type] = val;
@@ -9857,36 +9870,36 @@ var GoodItem = function GoodItem(props) {
9857
9870
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9858
9871
  return [{
9859
9872
  dataIndex: 'name',
9860
- title: "bs".concat(text, "\u540D\u79F0"),
9873
+ title: "".concat(text, "\u540D\u79F0"),
9861
9874
  align: 'center',
9862
9875
  ellipsis: true,
9863
- width: 200
9876
+ width: 100
9864
9877
  }, {
9865
9878
  dataIndex: 'code',
9866
- title: "bs".concat(text, "\u7F16\u7801"),
9879
+ title: "".concat(text, "\u7F16\u7801"),
9867
9880
  align: 'center',
9868
9881
  ellipsis: true,
9869
- width: 200
9882
+ width: 100
9870
9883
  }, {
9871
9884
  dataIndex: 'sku',
9872
- title: "bs".concat(text, "sku\u7F16\u7801"),
9885
+ title: "".concat(text, "sku\u7F16\u7801"),
9873
9886
  align: 'center',
9874
9887
  ellipsis: true,
9875
- width: 200
9888
+ width: 100
9876
9889
  }, {
9877
9890
  dataIndex: 'money',
9878
- title: "bs\u5B9E\u4ED8\u91D1\u989D",
9891
+ title: "\u5B9E\u4ED8\u91D1\u989D",
9879
9892
  align: 'center',
9880
9893
  ellipsis: true,
9881
9894
  width: 100
9882
9895
  }, {
9883
9896
  dataIndex: 'number',
9884
- title: "bs".concat(text, "\u6570\u91CF"),
9897
+ title: "".concat(text, "\u6570\u91CF"),
9885
9898
  align: 'center',
9886
9899
  ellipsis: true,
9887
9900
  width: 100,
9888
9901
  render: function render(val, record, index) {
9889
- return canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
9902
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
9890
9903
  value: val,
9891
9904
  onChange: function onChange(num) {
9892
9905
  return updateHandle(num, index, 'number');
@@ -9895,13 +9908,13 @@ var GoodItem = function GoodItem(props) {
9895
9908
  }
9896
9909
  }, {
9897
9910
  dataIndex: 'share',
9898
- title: "bs\u5206\u644A\u4EF7",
9911
+ title: "\u5206\u644A\u4EF7",
9899
9912
  align: 'center',
9900
9913
  ellipsis: true,
9901
- width: 100
9914
+ width: 70
9902
9915
  }, {
9903
9916
  dataIndex: 'type',
9904
- title: "bs\u8D60\u54C1\u7C7B\u578B",
9917
+ title: "\u8D60\u54C1\u7C7B\u578B",
9905
9918
  align: 'center',
9906
9919
  ellipsis: true,
9907
9920
  width: 100
@@ -9919,17 +9932,17 @@ var GoodItem = function GoodItem(props) {
9919
9932
  }
9920
9933
  }, {
9921
9934
  dataIndex: 'pic',
9922
- title: "bs\u56FE\u7247",
9935
+ title: "\u56FE\u7247",
9923
9936
  align: 'center',
9924
9937
  ellipsis: true,
9925
- width: 200,
9938
+ width: 100,
9926
9939
  render: function render(val) {
9927
9940
  return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
9928
9941
  width: 60,
9929
9942
  src: val
9930
9943
  });
9931
9944
  }
9932
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS(headerText).filter(function (t) {
9945
+ }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9933
9946
  return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9934
9947
  })));
9935
9948
  if (!disabled) {
@@ -9938,6 +9951,7 @@ var GoodItem = function GoodItem(props) {
9938
9951
  title: "\u64CD\u4F5C",
9939
9952
  align: 'center',
9940
9953
  ellipsis: true,
9954
+ width: 100,
9941
9955
  render: function render(val, record, index) {
9942
9956
  return record.canDelete ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9943
9957
  type: "link",
@@ -9964,9 +9978,10 @@ var GoodItem = function GoodItem(props) {
9964
9978
  sku: '',
9965
9979
  money: price,
9966
9980
  share: '',
9967
- number: 3,
9981
+ number: 1,
9968
9982
  type: '',
9969
- canDelete: true
9983
+ canDelete: true,
9984
+ canUpdateNumber: canUpdateNumber
9970
9985
  };
9971
9986
  });
9972
9987
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
@@ -9991,9 +10006,11 @@ var GoodItem = function GoodItem(props) {
9991
10006
  params.rowSelection = rowSelection;
9992
10007
  }
9993
10008
  return params;
9994
- }, [tableSelect]);
9995
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Space, {
9996
- align: "end"
10009
+ }, [tableSelect, selectedRowKeys]);
10010
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn && /*#__PURE__*/React__default['default'].createElement("div", {
10011
+ style: {
10012
+ float: 'right'
10013
+ }
9997
10014
  }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9998
10015
  type: "link",
9999
10016
  onClick: handleChangeGoods
@@ -10036,7 +10053,7 @@ var BsGoods = function BsGoods(props) {
10036
10053
  var ref = React.useRef();
10037
10054
  var reissueRef = React.useRef();
10038
10055
  React.useEffect(function () {
10039
- ref.current = pubsub__default['default'].subscribe('type', function (type, val) {
10056
+ ref.current = pubsub__default['default'].subscribeOnce('type', function (type, val) {
10040
10057
  console.log('goods', type, val, value);
10041
10058
  if (disabled) return;
10042
10059
  setWithInfo({
@@ -10044,7 +10061,7 @@ var BsGoods = function BsGoods(props) {
10044
10061
  val: val
10045
10062
  });
10046
10063
  setTableSelect(['2', '4'].includes(val));
10047
- if (['1', '3'].includes(val)) {
10064
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10048
10065
  pubsub__default['default'].publish('selectList', {
10049
10066
  type: val,
10050
10067
  list: _toConsumableArray(value).map(function (item) {
@@ -10053,10 +10070,9 @@ var BsGoods = function BsGoods(props) {
10053
10070
  })
10054
10071
  });
10055
10072
  }
10056
- // pubsub.unsubscribe('type');
10057
10073
  });
10058
10074
  //补发
10059
- reissueRef.current = pubsub__default['default'].subscribe('reissueType', function (type, val) {
10075
+ reissueRef.current = pubsub__default['default'].subscribeOnce('reissueType', function (type, val) {
10060
10076
  if (disabled) return;
10061
10077
  console.log('reissueType', type, val, value);
10062
10078
  setWithInfo({
@@ -10064,7 +10080,7 @@ var BsGoods = function BsGoods(props) {
10064
10080
  val: val
10065
10081
  });
10066
10082
  setTableSelect(['2', '4'].includes(val));
10067
- if (['1', '3'].includes(val)) {
10083
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10068
10084
  pubsub__default['default'].publish('reissueSelectList', {
10069
10085
  type: val,
10070
10086
  list: (value || []).map(function (item) {
@@ -10073,9 +10089,7 @@ var BsGoods = function BsGoods(props) {
10073
10089
  })
10074
10090
  });
10075
10091
  }
10076
- // pubsub.unsubscribe('reissueType');
10077
10092
  });
10078
-
10079
10093
  return function () {
10080
10094
  pubsub__default['default'].unsubscribe(ref.current);
10081
10095
  pubsub__default['default'].unsubscribe(reissueRef.current);
@@ -10083,30 +10097,38 @@ var BsGoods = function BsGoods(props) {
10083
10097
  }, [value, withInfo, disabled]);
10084
10098
  var _onSelect = React.useCallback(function (list) {
10085
10099
  if (disabled) return;
10086
- // console.log('withInfo', withInfo, list);
10100
+ console.log('withInfo', withInfo, list);
10101
+ var newList = lodash.cloneDeep(list);
10087
10102
  pubsub__default['default'].publish(withInfo.type === 'reissueType' ? 'reissueSelectList' : 'selectList', {
10088
10103
  type: withInfo.val,
10089
- list: list.map(function (item) {
10104
+ list: newList.map(function (item) {
10090
10105
  item.canDelete = true;
10091
10106
  return item;
10092
10107
  })
10093
10108
  });
10094
10109
  }, [withInfo]);
10110
+ var _onDelete = function onDelete(item) {
10111
+ var deleteId = item === null || item === void 0 ? void 0 : item.id;
10112
+ pubsub__default['default'].publish('deleteGood', deleteId);
10113
+ pubsub__default['default'].publish('reissueDeleteGood', deleteId);
10114
+ };
10095
10115
  return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10096
10116
  key: 'bsGoods',
10097
- headerText: "\u5546\u54C1",
10098
10117
  disabled: disabled
10099
10118
  }, props), {}, {
10100
10119
  tableSelect: tableSelect,
10101
10120
  onSelect: function onSelect(list) {
10102
10121
  return _onSelect(list);
10122
+ },
10123
+ onDelete: function onDelete(item) {
10124
+ return _onDelete(item);
10103
10125
  }
10104
10126
  }));
10105
10127
  };
10106
10128
 
10107
10129
  var _excluded$b = ["value", "onChange", "reasonList", "disabled"];
10108
10130
  var BsExchange = function BsExchange(props) {
10109
- var _value$bsExchangeType2, _value$bsExchangeType3, _value$bsExchangeType4;
10131
+ var _value$bsExchangeType4, _value$bsExchangeType5, _value$bsExchangeType6;
10110
10132
  var value = props.value,
10111
10133
  onChange = props.onChange,
10112
10134
  _props$reasonList = props.reasonList,
@@ -10114,21 +10136,35 @@ var BsExchange = function BsExchange(props) {
10114
10136
  disabled = props.disabled,
10115
10137
  other = _objectWithoutProperties(props, _excluded$b);
10116
10138
  React.useEffect(function () {
10117
- pubsub__default['default'].subscribe('selectList', function (_, data) {
10139
+ pubsub__default['default'].subscribeOnce('selectList', function (_, data) {
10118
10140
  if (disabled) return;
10119
10141
  if (value) {
10120
- // console.log(
10121
- // 'BsExchange',
10122
- // 'getListHandle',
10123
- // data,
10124
- // value,
10125
- // getListHandle([...data.list], value),
10126
- // );
10142
+ var newData = lodash.cloneDeep(data);
10143
+ console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
10127
10144
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10128
- bsExchangeReturnGoods: getListHandle(_toConsumableArray(data.list), value)
10145
+ bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
10129
10146
  }));
10130
10147
  }
10131
- pubsub__default['default'].unsubscribe('selectList');
10148
+ });
10149
+ pubsub__default['default'].subscribeOnce('deleteGood', function (_, data) {
10150
+ if (disabled) return;
10151
+ if (value) {
10152
+ var _value$bsExchangeType, _value$bsExchangeType2;
10153
+ var newValue = _objectSpread2({}, value);
10154
+ if (['2', '4'].includes((_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
10155
+ newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.map(function (item) {
10156
+ item.bsExchangeReturnGoods = item.bsExchangeReturnGoods.filter(function (t) {
10157
+ return t.id !== data;
10158
+ });
10159
+ return item;
10160
+ });
10161
+ } else if (['1', '3'].includes((_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2[0])) {
10162
+ newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.filter(function (item) {
10163
+ return item.id !== data;
10164
+ });
10165
+ }
10166
+ onChange(newValue);
10167
+ }
10132
10168
  });
10133
10169
  }, [value]);
10134
10170
  var getListHandle = function getListHandle(list, val) {
@@ -10136,6 +10172,7 @@ var BsExchange = function BsExchange(props) {
10136
10172
  //如果是原单换
10137
10173
  if (['1', '3'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType = val.bsExchangeType) === null || _val$bsExchangeType === void 0 ? void 0 : _val$bsExchangeType[0])) {
10138
10174
  return list.reduce(function (prv, next) {
10175
+ var _val$bsExchangeType2;
10139
10176
  next.canDelete = false;
10140
10177
  //数量大于1 拆开
10141
10178
  if (next.number > 1) {
@@ -10144,7 +10181,7 @@ var BsExchange = function BsExchange(props) {
10144
10181
  return t;
10145
10182
  });
10146
10183
  prv.push.apply(prv, _toConsumableArray(newList));
10147
- } else {
10184
+ } else if (['2', '4'].includes(val === null || val === void 0 ? void 0 : (_val$bsExchangeType2 = val.bsExchangeType) === null || _val$bsExchangeType2 === void 0 ? void 0 : _val$bsExchangeType2[0])) {
10148
10185
  prv.push(_objectSpread2({}, next));
10149
10186
  }
10150
10187
  return prv;
@@ -10174,6 +10211,14 @@ var BsExchange = function BsExchange(props) {
10174
10211
  }, []);
10175
10212
  }
10176
10213
  };
10214
+ var changeTypeHandle = function changeTypeHandle(val) {
10215
+ var newValue = _objectSpread2({}, value);
10216
+ newValue.bsExchangeType = val;
10217
+ newValue.bsExchangeReturnGoods = [];
10218
+ newValue.bsExchangeGiftGoods = [];
10219
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10220
+ pubsub__default['default'].publish('type', val[0]);
10221
+ };
10177
10222
  var changeHandle = function changeHandle(val, key) {
10178
10223
  var newValue = _objectSpread2({}, value);
10179
10224
  newValue[key] = val;
@@ -10188,19 +10233,22 @@ var BsExchange = function BsExchange(props) {
10188
10233
  var newValue = _objectSpread2({}, value);
10189
10234
  newValue.bsExchangeReturnGoods[index][key] = (val || []).map(function (t) {
10190
10235
  t.index = index;
10236
+ if (key === 'bsExchangeGiftGoods') {
10237
+ t.money = 0;
10238
+ }
10191
10239
  return t;
10192
10240
  });
10193
10241
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10194
10242
  };
10195
10243
  //显示选择商品按钮 原单换不显示选择商品
10196
10244
  var showChangeBtn = React.useMemo(function () {
10197
- var _value$bsExchangeType;
10198
- return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0]) || disabled;
10245
+ var _value$bsExchangeType3;
10246
+ return ['2', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType3 = value.bsExchangeType) === null || _value$bsExchangeType3 === void 0 ? void 0 : _value$bsExchangeType3[0]) || !!disabled;
10199
10247
  }, [value === null || value === void 0 ? void 0 : value.bsExchangeType]);
10200
10248
  var copyGoods = function copyGoods(index) {
10201
10249
  var copyHandle = function copyHandle() {
10202
10250
  var newValue = _objectSpread2({}, value);
10203
- newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods'] = _objectSpread2(_objectSpread2({}, newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods']), newValue.bsExchangeReturnGoods[index]['bsExchangeReturnGoods']);
10251
+ newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods'] = [].concat(_toConsumableArray(newValue.bsExchangeReturnGoods[index]['bsExchangeSwapOutGoods']), _toConsumableArray(newValue.bsExchangeReturnGoods[index]['bsExchangeReturnGoods']));
10204
10252
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
10205
10253
  };
10206
10254
  return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
@@ -10209,32 +10257,32 @@ var BsExchange = function BsExchange(props) {
10209
10257
  }, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
10210
10258
  };
10211
10259
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
10260
+ style: {
10261
+ marginBottom: '8px'
10262
+ },
10212
10263
  disabled: disabled,
10213
10264
  allowClear: false,
10214
10265
  options: reasonList,
10215
10266
  value: value === null || value === void 0 ? void 0 : value.bsExchangeType,
10216
10267
  onChange: function onChange(val) {
10217
- return changeHandle(val, 'bsExchangeType');
10268
+ return changeTypeHandle(val);
10218
10269
  }
10219
- }), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2.length) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10270
+ }), !(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4.length) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10220
10271
  key: 'bsExchangeGoods'
10221
10272
  }, other), {}, {
10222
- headerText: "\u5546\u54C1",
10223
10273
  disabled: disabled,
10224
10274
  showChangeBtn: false
10225
- })) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType3 = value.bsExchangeType) === null || _value$bsExchangeType3 === void 0 ? void 0 : _value$bsExchangeType3[0]) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10275
+ })) : null, ['1', '3'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType5 = value.bsExchangeType) === null || _value$bsExchangeType5 === void 0 ? void 0 : _value$bsExchangeType5[0]) ? /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10226
10276
  key: 'bsExchangeGoods'
10227
10277
  }, other), {}, {
10228
- headerText: "\u5546\u54C1",
10229
10278
  disabled: disabled,
10230
- showChangeBtn: showChangeBtn,
10279
+ showChangeBtn: false,
10231
10280
  value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
10232
10281
  onChange: function onChange(val) {
10233
10282
  return changeHandle(val, 'bsExchangeReturnGoods');
10234
10283
  }
10235
10284
  })) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
10236
10285
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10237
- headerText: "\u9000\u56DE",
10238
10286
  key: 'bsReturnGoods'
10239
10287
  }, other), {}, {
10240
10288
  disabled: disabled,
@@ -10244,20 +10292,17 @@ var BsExchange = function BsExchange(props) {
10244
10292
  return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
10245
10293
  }
10246
10294
  })), /*#__PURE__*/React__default['default'].createElement("div", null, "\u6362\u51FA\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10247
- headerText: "\u6362\u51FA",
10248
10295
  key: 'bsOutGoods'
10249
10296
  }, other), {}, {
10250
10297
  disabled: disabled,
10251
10298
  showChangeBtn: showChangeBtn,
10252
- otherOperations: function otherOperations() {
10253
- return copyGoods(index);
10254
- },
10299
+ otherOperations: copyGoods(index),
10255
10300
  value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
10256
10301
  onChange: function onChange(val) {
10257
10302
  return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
10258
10303
  }
10259
10304
  })));
10260
- })), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType4 = value.bsExchangeType) === null || _value$bsExchangeType4 === void 0 ? void 0 : _value$bsExchangeType4[0]) ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10305
+ })), ['3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsExchangeType6 = value.bsExchangeType) === null || _value$bsExchangeType6 === void 0 ? void 0 : _value$bsExchangeType6[0]) ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", null, "\u8D60\u54C1\u4FE1\u606F"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10261
10306
  headerText: "\u8D60\u54C1",
10262
10307
  key: 'bsGiftGoods',
10263
10308
  disabled: disabled
@@ -10278,22 +10323,32 @@ var BsReissue = function BsReissue(props) {
10278
10323
  disabled = props.disabled,
10279
10324
  other = _objectWithoutProperties(props, _excluded$c);
10280
10325
  React.useEffect(function () {
10281
- pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
10326
+ pubsub__default['default'].subscribeOnce('reissueSelectList', function (_, data) {
10282
10327
  if (disabled) return;
10283
- // console.log(data, value);
10328
+ console.log(data, value);
10284
10329
  if (value) {
10330
+ var newData = lodash.cloneDeep(data);
10285
10331
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10286
- bsReissueGoods: ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
10332
+ bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
10287
10333
  item.money = 0;
10334
+ item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
10288
10335
  return item;
10289
10336
  })
10290
10337
  }));
10291
10338
  }
10292
- pubsub__default['default'].unsubscribe('reissueSelectList');
10339
+ });
10340
+ pubsub__default['default'].subscribeOnce('reissueDeleteGood', function (_, data) {
10341
+ if (disabled) return;
10342
+ if (value) {
10343
+ var newValue = _objectSpread2({}, value);
10344
+ newValue.bsReissueGoods = newValue.bsReissueGoods.filter(function (item) {
10345
+ return item.id !== data;
10346
+ });
10347
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10348
+ }
10293
10349
  });
10294
10350
  }, [value, disabled]);
10295
10351
  var changeHandle = function changeHandle(val, key) {
10296
- console.log('changeHandle', val, key, value);
10297
10352
  var newValue = _objectSpread2({}, value);
10298
10353
  if (key === 'bsReissueGoods') {
10299
10354
  val = (val || []).map(function (item) {
@@ -10316,6 +10371,9 @@ var BsReissue = function BsReissue(props) {
10316
10371
  return ['2', '3', '4'].includes(value === null || value === void 0 ? void 0 : (_value$bsReissueType = value.bsReissueType) === null || _value$bsReissueType === void 0 ? void 0 : _value$bsReissueType[0]);
10317
10372
  }, [value === null || value === void 0 ? void 0 : value.bsReissueType]);
10318
10373
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
10374
+ style: {
10375
+ marginBottom: '8px'
10376
+ },
10319
10377
  disabled: disabled,
10320
10378
  allowClear: false,
10321
10379
  options: reasonList,
@@ -10324,11 +10382,10 @@ var BsReissue = function BsReissue(props) {
10324
10382
  return changeHandle(val, 'bsReissueType');
10325
10383
  }
10326
10384
  }), /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10327
- headerText: "\u8865\u53D1",
10328
10385
  key: 'reissueGoods'
10329
10386
  }, other), {}, {
10330
10387
  disabled: disabled,
10331
- canUpdateNumber: true,
10388
+ canUpdateNumber: showChangeBtn,
10332
10389
  showChangeBtn: showChangeBtn,
10333
10390
  value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
10334
10391
  onChange: function onChange(val) {
@@ -13,9 +13,9 @@ interface BsGoodsProps {
13
13
  tableSelect: boolean;
14
14
  otherOperations: any;
15
15
  canUpdateNumber: boolean;
16
- headerText?: string;
17
16
  onChange: (val: any[]) => void;
18
17
  onSelect: (val: any[]) => void;
18
+ onDelete: (val: any[]) => void;
19
19
  }
20
20
  declare const GoodItem: (props: Partial<BsGoodsProps>) => React.JSX.Element;
21
21
  export default GoodItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.7.15-alpha.3",
3
+ "version": "0.7.15-alpha.4",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -21,6 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.3",
24
+ "lodash": "^4.17.21",
24
25
  "pubsub-js": "^1.9.4",
25
26
  "umi-request": "^1.4.0"
26
27
  },
@@ -56,5 +57,5 @@
56
57
  "publishConfig": {
57
58
  "access": "public"
58
59
  },
59
- "gitHead": "ed7ac8d0c87afbda8f080748adc790cd6755c9e0"
60
+ "gitHead": "52277258146a461cd2fdcb41f672d825a88ef295"
60
61
  }