@kmkf-fe-packages/basic-components 0.7.15-alpha.7 → 0.7.15-alpha.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -516,7 +516,8 @@ function ApaasInput(props) {
516
516
  var isNumber = props.isNumber,
517
517
  replaceWarn = props.replaceWarn,
518
518
  other = _objectWithoutProperties(props, _excluded$1);
519
- return /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2({}, other));
519
+ // @ts-ignore
520
+ return isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2({}, other));
520
521
  }
521
522
 
522
523
  function ApaasInputNumber(props) {
@@ -830,21 +831,23 @@ function ApaasRadio(props) {
830
831
  var triggerChange = function triggerChange(changedValue) {
831
832
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), changedValue));
832
833
  };
833
- var onRadioChange = function onRadioChange(e) {
834
- var radioValue = e.target.value;
835
- triggerChange({
836
- value: radioValue
837
- });
838
- };
839
834
  var onOtherChange = function onOtherChange(e) {
840
835
  var other = e.target.value;
841
836
  triggerChange({
842
837
  other: other
843
838
  });
844
839
  };
840
+ var onRadioClick = function onRadioClick(e) {
841
+ var selectValue = e.target.value;
842
+ if (selectValue === radioValue) {
843
+ selectValue = '';
844
+ }
845
+ triggerChange({
846
+ value: selectValue
847
+ });
848
+ };
845
849
  return /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, _objectSpread2({
846
- value: radioValue,
847
- onChange: onRadioChange
850
+ value: radioValue
848
851
  }, otherProps), /*#__PURE__*/React__default['default'].createElement(antd.Space, {
849
852
  direction: horizontal ? 'horizontal' : 'vertical',
850
853
  wrap: true
@@ -852,11 +855,13 @@ function ApaasRadio(props) {
852
855
  return /*#__PURE__*/React__default['default'].createElement(antd.Radio, {
853
856
  value: item.value,
854
857
  key: item.label,
855
- disabled: disabled
858
+ disabled: disabled,
859
+ onClick: onRadioClick
856
860
  }, item.label);
857
861
  }), showOther && /*#__PURE__*/React__default['default'].createElement(antd.Radio, {
858
862
  value: "\u5176\u4ED6",
859
- disabled: disabled
863
+ disabled: disabled,
864
+ onClick: onRadioClick
860
865
  }, "\u5176\u4ED6", /*#__PURE__*/React__default['default'].createElement(antd.Input, {
861
866
  disabled: disabled,
862
867
  value: other,
@@ -6951,7 +6956,7 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6951
6956
  var beforeUpload = function beforeUpload(file) {
6952
6957
  console.log('beforeUpload', file);
6953
6958
  var size = file.size / 1024 / 1024 < maxSize;
6954
- if (value.length > maxCount) {
6959
+ if (value.length >= maxCount) {
6955
6960
  antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
6956
6961
  return antd.Upload.LIST_IGNORE;
6957
6962
  }
@@ -6974,7 +6979,7 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6974
6979
  className: styles$2.tips
6975
6980
  }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement(Dragger, _objectSpread2({
6976
6981
  disabled: disabled,
6977
- multiple: true,
6982
+ multiple: false,
6978
6983
  accept: accept,
6979
6984
  name: "file",
6980
6985
  maxCount: maxCount,
@@ -7163,7 +7168,8 @@ function ApaasRate(props) {
7163
7168
  var address = kmkfUtils.AddressData.getInstance();
7164
7169
  var bsAddress = kmkfUtils.BsAddressData.getInstance();
7165
7170
  var Province = function Province(props) {
7166
- var type = props.type;
7171
+ var _props$type = props.type,
7172
+ type = _props$type === void 0 ? 'workOrder' : _props$type;
7167
7173
  var _useState = React.useState([]),
7168
7174
  _useState2 = _slicedToArray(_useState, 2),
7169
7175
  option = _useState2[0],
@@ -7174,7 +7180,7 @@ var Province = function Province(props) {
7174
7180
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7175
7181
  while (1) switch (_context.prev = _context.next) {
7176
7182
  case 0:
7177
- setOptions(type === 'workOrder' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7183
+ setOptions(type !== 'bs' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7178
7184
  case 1:
7179
7185
  case "end":
7180
7186
  return _context.stop();
@@ -7193,6 +7199,9 @@ var Province = function Province(props) {
7193
7199
  }, []);
7194
7200
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7195
7201
  options: option,
7202
+ style: {
7203
+ minWidth: '100px'
7204
+ },
7196
7205
  placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A"
7197
7206
  })));
7198
7207
  };
@@ -7222,7 +7231,7 @@ var ParseLogistics = function ParseLogistics(props) {
7222
7231
  });
7223
7232
  };
7224
7233
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(TextArea, {
7225
- placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7234
+ placeholder: "\u590D\u5236\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7226
7235
  rows: 3,
7227
7236
  value: value,
7228
7237
  onChange: function onChange(e) {
@@ -7269,12 +7278,14 @@ var IdentifyAddress = function IdentifyAddress(props) {
7269
7278
  value: value.receiverName,
7270
7279
  disabled: disabled,
7271
7280
  placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
7281
+ allowClear: true,
7272
7282
  onChange: function onChange(e) {
7273
7283
  return changeHandle(e.target.value, 'receiverName');
7274
7284
  }
7275
7285
  }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
7276
7286
  value: value.receiverMobile,
7277
7287
  disabled: disabled,
7288
+ allowClear: true,
7278
7289
  placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
7279
7290
  onChange: function onChange(e) {
7280
7291
  return changeHandle(e.target.value, 'receiverMobile');
@@ -7291,6 +7302,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7291
7302
  value: value.detail,
7292
7303
  disabled: disabled,
7293
7304
  placeholder: "\u8BE6\u7EC6\u5730\u5740",
7305
+ allowClear: true,
7294
7306
  onChange: function onChange(e) {
7295
7307
  return changeHandle(e.target.value, 'detail');
7296
7308
  }
@@ -8958,31 +8970,43 @@ var Payment = function Payment(props) {
8958
8970
  name: 'enterprisePaymentTid',
8959
8971
  placeholder: '请输入订单编号',
8960
8972
  required: required,
8961
- show: true
8973
+ show: true,
8974
+ hidden: false
8962
8975
  }, {
8963
8976
  label: '打款金额',
8964
8977
  name: 'enterprisePaymentRefundFee',
8965
8978
  placeholder: '请输入打款金额',
8966
8979
  required: required,
8967
- show: true
8980
+ show: true,
8981
+ hidden: false
8968
8982
  }, {
8969
8983
  label: '买家昵称',
8970
8984
  name: 'enterprisePaymentBuyerNick',
8971
8985
  placeholder: '请输入买家昵称',
8972
8986
  required: false,
8973
- show: true
8987
+ show: true,
8988
+ hidden: false
8974
8989
  }, {
8975
8990
  label: '支付宝名称',
8976
8991
  name: 'enterprisePaymentAlipayNick',
8977
8992
  placeholder: '请输入支付宝名称',
8978
8993
  required: zhiFubaoRequired,
8979
- show: true
8994
+ show: true,
8995
+ hidden: false
8980
8996
  }, {
8981
8997
  label: '支付宝账号',
8982
8998
  name: 'enterprisePaymentAlipayNo',
8983
8999
  placeholder: '请输入支付宝账号',
8984
9000
  required: zhiFubaoRequired,
8985
- show: true
9001
+ show: true,
9002
+ hidden: false
9003
+ }, {
9004
+ label: '打款状态',
9005
+ name: 'enterprisePaymentStatus',
9006
+ placeholder: '',
9007
+ required: false,
9008
+ show: false,
9009
+ hidden: true
8986
9010
  }];
8987
9011
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, PaymentList.map(function (item) {
8988
9012
  return item.show && /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
@@ -9321,6 +9345,58 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9321
9345
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9322
9346
  trajectoryCompany: val
9323
9347
  }));
9348
+ handleSearchSnapshot(val);
9349
+ };
9350
+ var handleSearchSnapshot = function handleSearchSnapshot(company) {
9351
+ var trajectoryCompany = value.trajectoryCompany,
9352
+ trajectoryCode = value.trajectoryCode,
9353
+ trajectoryPhone = value.trajectoryPhone;
9354
+ var newCompany = company ? company : trajectoryCompany;
9355
+ //不展示拦截状态不请求
9356
+ if (!(showField && showField.includes('snapshot'))) {
9357
+ return;
9358
+ }
9359
+ if (disabled) {
9360
+ return;
9361
+ }
9362
+ if (newCompany === 'SF' && !(newCompany && trajectoryCode && trajectoryPhone)) {
9363
+ return;
9364
+ } else if (!(newCompany && trajectoryCode)) {
9365
+ return;
9366
+ }
9367
+ try {
9368
+ extendRequest('/qy/logistics/logisticsTraceSearch', {
9369
+ method: 'post',
9370
+ data: {
9371
+ mailNo: trajectoryCode,
9372
+ cpCode: newCompany,
9373
+ mobile: trajectoryPhone
9374
+ }
9375
+ }).then(function (res) {
9376
+ var result = res.result,
9377
+ success = res.success,
9378
+ data = res.data,
9379
+ msg = res.message;
9380
+ if (result === 100 || success) {
9381
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9382
+ trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
9383
+ trajectoryCompany: newCompany
9384
+ }));
9385
+ } else {
9386
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9387
+ trajectorySnapshot: '',
9388
+ trajectoryCompany: newCompany
9389
+ }));
9390
+ msg && antd.message.error(msg);
9391
+ }
9392
+ });
9393
+ } catch (err) {
9394
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9395
+ trajectorySnapshot: '',
9396
+ trajectoryCompany: newCompany
9397
+ }));
9398
+ (err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
9399
+ }
9324
9400
  };
9325
9401
  //物流公司
9326
9402
  var LogisticsCompany = function LogisticsCompany() {
@@ -9343,20 +9419,40 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9343
9419
  //物流单号
9344
9420
  var LogisticsCode = function LogisticsCode() {
9345
9421
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9346
- style: {
9347
- marginBottom: '8px'
9348
- },
9349
9422
  disabled: disabled,
9350
9423
  placeholder: "\u7269\u6D41\u5355\u53F7",
9351
9424
  onChange: function onChange(e) {
9352
9425
  return handleInputChange(e, 'trajectoryCode');
9353
9426
  },
9354
- value: value === null || value === void 0 ? void 0 : value.trajectoryCode
9427
+ value: value === null || value === void 0 ? void 0 : value.trajectoryCode,
9428
+ onBlur: function onBlur() {
9429
+ return handleSearchSnapshot();
9430
+ }
9431
+ });
9432
+ };
9433
+ //sf手机号
9434
+ var LogisticsPhone = function LogisticsPhone() {
9435
+ return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9436
+ disabled: disabled,
9437
+ style: {
9438
+ marginTop: '8px'
9439
+ },
9440
+ placeholder: "\u624B\u673A\u53F7",
9441
+ onChange: function onChange(e) {
9442
+ return handleInputChange(e, 'trajectoryPhone');
9443
+ },
9444
+ value: value === null || value === void 0 ? void 0 : value.trajectoryPhone,
9445
+ onBlur: function onBlur() {
9446
+ return handleSearchSnapshot();
9447
+ }
9355
9448
  });
9356
9449
  };
9357
9450
  //物流快照
9358
9451
  var LogisticsSnapshot = function LogisticsSnapshot() {
9359
9452
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9453
+ style: {
9454
+ marginTop: '8px'
9455
+ },
9360
9456
  disabled: true,
9361
9457
  placeholder: "\u7269\u6D41\u5FEB\u7167",
9362
9458
  onChange: function onChange(e) {
@@ -9365,7 +9461,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9365
9461
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
9366
9462
  });
9367
9463
  };
9368
- return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
9464
+ return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
9369
9465
  };
9370
9466
 
9371
9467
  var jstGoods = function jstGoods(props) {
@@ -9379,7 +9475,7 @@ var jstGoods = function jstGoods(props) {
9379
9475
  _props$type = props.type,
9380
9476
  type = _props$type === void 0 ? 1 : _props$type,
9381
9477
  _props$showField = props.showField,
9382
- showField = _props$showField === void 0 ? 'all' : _props$showField;
9478
+ showField = _props$showField === void 0 ? '' : _props$showField;
9383
9479
  var _useState = React.useState(0),
9384
9480
  _useState2 = _slicedToArray(_useState, 2),
9385
9481
  changeIndex = _useState2[0],
@@ -9388,7 +9484,12 @@ var jstGoods = function jstGoods(props) {
9388
9484
  setChangeIndex(0);
9389
9485
  }, []);
9390
9486
  var content = function content(item, index) {
9391
- return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
9487
+ return /*#__PURE__*/React__default['default'].createElement("div", {
9488
+ style: {
9489
+ maxHeight: '300px',
9490
+ overflowY: 'auto'
9491
+ }
9492
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
9392
9493
  style: {
9393
9494
  textAlign: 'center'
9394
9495
  }
@@ -9429,7 +9530,7 @@ var jstGoods = function jstGoods(props) {
9429
9530
  return setChangeIndex(index);
9430
9531
  }
9431
9532
  }, "\u5305\u88F9".concat(index + 1)));
9432
- }))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
9533
+ }))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
9433
9534
  disabled: disabled,
9434
9535
  placeholder: "\u7269\u6D41\u516C\u53F8",
9435
9536
  onChange: function onChange(val) {
@@ -9444,14 +9545,14 @@ var jstGoods = function jstGoods(props) {
9444
9545
  style: {
9445
9546
  minWidth: '100px'
9446
9547
  }
9447
- }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9548
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9448
9549
  disabled: disabled,
9449
9550
  placeholder: "\u7269\u6D41\u5355\u53F7",
9450
9551
  onChange: function onChange(e) {
9451
9552
  return changeInputHandle(e.target.value, 'logisticsCode');
9452
9553
  },
9453
9554
  value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
9454
- })) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9555
+ }) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9455
9556
  disabled: disabled,
9456
9557
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
9457
9558
  onChange: function onChange(e) {
@@ -9556,44 +9657,79 @@ var ItemList = function ItemList(props) {
9556
9657
  }, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
9557
9658
  };
9558
9659
 
9559
- var TabPane$1 = antd.Tabs.TabPane;
9560
9660
  var columns = [{
9561
- dataIndex: 'picUrl',
9562
- title: '主图',
9563
- render: function render(val) {
9564
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
9565
- width: 60,
9566
- src: val
9567
- });
9661
+ dataIndex: 'index',
9662
+ title: '序号',
9663
+ render: function render(val, record, index) {
9664
+ return /*#__PURE__*/React__default['default'].createElement("div", {
9665
+ style: {
9666
+ width: '50px'
9667
+ }
9668
+ }, index + 1);
9568
9669
  }
9569
9670
  }, {
9570
- dataIndex: 'outerId',
9571
- title: '款式编码'
9671
+ dataIndex: 'name',
9672
+ title: '商品名称',
9673
+ with: 200,
9674
+ ellipsis: true
9572
9675
  }, {
9573
- dataIndex: 'numIid',
9574
- title: '商品编码'
9676
+ dataIndex: 'goodsId',
9677
+ title: '商品id',
9678
+ with: 200,
9679
+ ellipsis: true
9575
9680
  }, {
9576
- dataIndex: 'title',
9577
- title: '商品名称'
9681
+ dataIndex: 'skuName',
9682
+ title: '商品sku名称',
9683
+ with: 200,
9684
+ ellipsis: true
9578
9685
  }, {
9579
- dataIndex: 'skus',
9580
- title: '颜色及规格'
9686
+ dataIndex: 'code',
9687
+ title: '商品编码',
9688
+ with: 200,
9689
+ // ellipsis: true,
9690
+ render: function render(val) {
9691
+ return /*#__PURE__*/React__default['default'].createElement("div", {
9692
+ style: {
9693
+ width: '100px'
9694
+ }
9695
+ }, val);
9696
+ }
9697
+ }, {
9698
+ dataIndex: 'skuCode',
9699
+ title: '商品sku编码',
9700
+ with: 200,
9701
+ ellipsis: true
9702
+ }, {
9703
+ dataIndex: 'marketPrice',
9704
+ title: '市场价',
9705
+ // with: 200,
9706
+ // ellipsis: true,
9707
+ render: function render(val) {
9708
+ return /*#__PURE__*/React__default['default'].createElement("div", {
9709
+ style: {
9710
+ width: '70px'
9711
+ }
9712
+ }, val);
9713
+ }
9581
9714
  }];
9582
9715
  var GoodsModal$1 = function GoodsModal(props, ref) {
9583
9716
  React.useImperativeHandle(ref, function () {
9584
9717
  return {
9585
9718
  open: function open() {
9586
9719
  setVisible(true);
9720
+ setPageNo(1);
9587
9721
  setSelect([]);
9588
9722
  setSelectIds([]);
9589
9723
  queryItems();
9724
+ onReset();
9590
9725
  }
9591
9726
  };
9592
9727
  });
9593
9728
  var onSubmit = props.onSubmit,
9594
9729
  shopId = props.shopId,
9595
9730
  shopList = props.shopList,
9596
- width = props.width;
9731
+ width = props.width,
9732
+ shopCode = props.shopCode;
9597
9733
  var _useState = React.useState(false),
9598
9734
  _useState2 = _slicedToArray(_useState, 2),
9599
9735
  visible = _useState2[0],
@@ -9608,123 +9744,85 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9608
9744
  setSelectIds = _useState6[1];
9609
9745
  var _useState7 = React.useState([]),
9610
9746
  _useState8 = _slicedToArray(_useState7, 2),
9611
- goodList = _useState8[0],
9612
- setGoodList = _useState8[1];
9613
- var _useState9 = React.useState(false),
9747
+ allList = _useState8[0],
9748
+ setAllList = _useState8[1]; //获取到的所有数据
9749
+ var _useState9 = React.useState([]),
9614
9750
  _useState10 = _slicedToArray(_useState9, 2),
9615
- loading = _useState10[0],
9616
- setLoading = _useState10[1];
9617
- var _useState11 = React.useState({
9618
- apiName: 'queryItems',
9619
- desc: true,
9620
- numIids: '',
9621
- orderBy: 'list_time',
9622
- pageNo: 1,
9623
- pageSize: 10,
9624
- shopId: shopId,
9625
- type: 'onSale',
9626
- cids: '',
9627
- title: ''
9628
- }),
9751
+ filterList = _useState10[0],
9752
+ setFilterList = _useState10[1]; //获取到的筛选数据
9753
+ var _useState11 = React.useState(1),
9629
9754
  _useState12 = _slicedToArray(_useState11, 2),
9630
- searchParams = _useState12[0],
9631
- setSearch = _useState12[1];
9632
- var _useState13 = React.useState(0),
9633
- _useState14 = _slicedToArray(_useState13, 2),
9634
- total = _useState14[0],
9635
- setTotal = _useState14[1];
9636
- var _useState15 = React.useState(''),
9755
+ pageNo = _useState12[0],
9756
+ setPageNo = _useState12[1];
9757
+ var _useState13 = React.useState(20),
9758
+ _useState14 = _slicedToArray(_useState13, 1),
9759
+ pageSize = _useState14[0];
9760
+ var _useState15 = React.useState([]),
9637
9761
  _useState16 = _slicedToArray(_useState15, 2),
9638
- platform = _useState16[0],
9639
- setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9640
- var _useState17 = React.useState({}),
9762
+ goodList = _useState16[0],
9763
+ setGoodList = _useState16[1];
9764
+ var _useState17 = React.useState(false),
9641
9765
  _useState18 = _slicedToArray(_useState17, 2),
9642
- shopInfo = _useState18[0],
9643
- setShopInfo = _useState18[1]; //店铺信息
9644
- var _useState19 = React.useState([{
9645
- tab: '所选商品',
9646
- key: 'onSale'
9647
- }
9648
- // { tab: '已选商品', key: 'select' },
9649
- ]),
9650
- _useState20 = _slicedToArray(_useState19, 1),
9651
- tabs = _useState20[0];
9766
+ loading = _useState18[0],
9767
+ setLoading = _useState18[1];
9768
+ var _useState19 = React.useState(0),
9769
+ _useState20 = _slicedToArray(_useState19, 2),
9770
+ total = _useState20[0],
9771
+ setTotal = _useState20[1];
9772
+ var _useState21 = React.useState(''),
9773
+ _useState22 = _slicedToArray(_useState21, 2),
9774
+ platform = _useState22[0],
9775
+ setPlatform = _useState22[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9776
+ var _useState23 = React.useState({}),
9777
+ _useState24 = _slicedToArray(_useState23, 2),
9778
+ shopInfo = _useState24[0],
9779
+ setShopInfo = _useState24[1]; //店铺信息
9780
+ var _Form$useForm = antd.Form.useForm(),
9781
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9782
+ form = _Form$useForm2[0];
9652
9783
  //选择页码
9653
- var pageChange = function pageChange(page, pageSize) {
9654
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9655
- pageNo: page,
9656
- pageSize: pageSize
9657
- }));
9658
- };
9659
- /**
9660
- *
9661
- * @returns 获取查询参数
9662
- */
9663
- var queryPd = function queryPd() {
9664
- var params = {
9665
- apiName: 'queryItems',
9666
- desc: searchParams.desc,
9667
- productIds: searchParams.numIids,
9668
- orderBy: searchParams.orderBy,
9669
- pageNo: searchParams.pageNo,
9670
- pageSize: searchParams.pageSize,
9671
- shopId: shopId,
9672
- type: searchParams.type,
9673
- title: searchParams.title,
9674
- cids: searchParams.cids
9675
- };
9676
- return params;
9784
+ var pageChange = function pageChange(page) {
9785
+ setPageNo(page);
9786
+ setGoodList(_toConsumableArray(filterList).splice((page - 1) * pageSize, pageSize));
9677
9787
  };
9678
9788
  /**
9679
9789
  * 查询商品
9680
9790
  */
9681
- var queryItems = /*#__PURE__*/function () {
9682
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9683
- var params, res, _ref2, list, _total, nextKey, newList;
9684
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9685
- while (1) switch (_context.prev = _context.next) {
9686
- case 0:
9687
- _context.prev = 0;
9688
- setLoading(true);
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', {
9696
- method: 'post',
9697
- data: params
9698
- });
9699
- case 9:
9700
- res = _context.sent;
9701
- _ref2 = res.data || {
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;
9710
- item.platform = platform;
9791
+ var queryItems = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9792
+ var params, res, products, newProducts;
9793
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9794
+ while (1) switch (_context.prev = _context.next) {
9795
+ case 0:
9796
+ _context.prev = 0;
9797
+ setLoading(true);
9798
+ params = {
9799
+ shopCode: shopCode
9800
+ };
9801
+ _context.next = 5;
9802
+ return extendRequest('/qy/gdfw/product/bsListProduct', {
9803
+ method: 'post',
9804
+ data: params
9805
+ });
9806
+ case 5:
9807
+ res = _context.sent;
9808
+ products = res.data.products;
9809
+ newProducts = products.map(function (item, index) {
9810
+ return _objectSpread2(_objectSpread2({}, item), {}, {
9811
+ index: index + 1
9711
9812
  });
9712
- setGoodList(newList);
9713
- setTotal(_total);
9714
- case 15:
9715
- _context.prev = 15;
9716
- setLoading(false);
9717
- return _context.finish(15);
9718
- case 18:
9719
- case "end":
9720
- return _context.stop();
9721
- }
9722
- }, _callee, null, [[0,, 15, 18]]);
9723
- }));
9724
- return function queryItems() {
9725
- return _ref.apply(this, arguments);
9726
- };
9727
- }();
9813
+ });
9814
+ setAllList(_toConsumableArray(newProducts));
9815
+ initData(_toConsumableArray(newProducts));
9816
+ case 10:
9817
+ _context.prev = 10;
9818
+ setLoading(false);
9819
+ return _context.finish(10);
9820
+ case 13:
9821
+ case "end":
9822
+ return _context.stop();
9823
+ }
9824
+ }, _callee, null, [[0,, 10, 13]]);
9825
+ })), [shopCode]);
9728
9826
  React.useEffect(function () {
9729
9827
  var shopInfo = shopList.find(function (item) {
9730
9828
  return shopId === item.shopId || shopId === item.shopName;
@@ -9735,12 +9833,19 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9735
9833
  }, [shopId]);
9736
9834
  var rowSelection = {
9737
9835
  selectedRowKeys: selectIds,
9836
+ fixed: true,
9738
9837
  onChange: function onChange(selectedRowKeys, selectedRows, info) {
9739
9838
  console.log(selectedRowKeys, selectedRows, info);
9740
9839
  setSelectIds(selectedRowKeys);
9741
9840
  setSelect(_toConsumableArray(selectedRows));
9742
9841
  }
9743
9842
  };
9843
+ var initData = function initData(list) {
9844
+ setFilterList(_toConsumableArray(list));
9845
+ setGoodList(_toConsumableArray(list).splice(0, pageSize));
9846
+ setTotal(list.length);
9847
+ setPageNo(1);
9848
+ };
9744
9849
  var _onCancel = function onCancel() {
9745
9850
  setVisible(false);
9746
9851
  };
@@ -9748,8 +9853,23 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9748
9853
  onSubmit(selectList);
9749
9854
  _onCancel();
9750
9855
  };
9856
+ var onFinish = function onFinish(value) {
9857
+ var newFilterList = [];
9858
+ Object.keys(value).forEach(function (key) {
9859
+ if (value[key]) {
9860
+ newFilterList = allList.filter(function (item) {
9861
+ return item[key].indexOf(value[key]) > -1;
9862
+ });
9863
+ }
9864
+ });
9865
+ initData(newFilterList);
9866
+ };
9867
+ var onReset = function onReset() {
9868
+ form.resetFields();
9869
+ initData(_toConsumableArray(allList));
9870
+ };
9751
9871
  return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
9752
- title: '选择商品编码',
9872
+ title: '选择商品',
9753
9873
  okText: '确认',
9754
9874
  cancelText: '取消',
9755
9875
  visible: visible,
@@ -9759,52 +9879,53 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9759
9879
  },
9760
9880
  onOk: onOk,
9761
9881
  wrapClassName: "goodModal"
9762
- }, /*#__PURE__*/React__default['default'].createElement(antd.Tabs, {
9763
- type: "card",
9764
- activeKey: searchParams.type,
9765
- onChange: function onChange(e) {
9766
- var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
9767
- type: e,
9768
- pageNo: 1
9769
- });
9770
- setSearch(params);
9882
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
9883
+ layout: "inline",
9884
+ form: form,
9885
+ onFinish: onFinish
9886
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9887
+ name: "name"
9888
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9889
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",
9890
+ style: {
9891
+ width: 150
9771
9892
  }
9772
- }, tabs.map(function (tab) {
9773
- return /*#__PURE__*/React__default['default'].createElement(TabPane$1, {
9774
- tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
9775
- key: tab.key
9776
- });
9777
- })), /*#__PURE__*/React__default['default'].createElement("div", {
9778
- className: "searchBox",
9893
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9894
+ name: "code"
9895
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9896
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u7801",
9779
9897
  style: {
9780
- display: searchParams.type === 'select' ? 'none' : ''
9898
+ width: 150
9899
+ }
9900
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9901
+ name: "skuCode"
9902
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9903
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1sku\u7F16\u7801",
9904
+ style: {
9905
+ width: 150
9781
9906
  }
9782
- }, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
9783
- layout: "inline"
9784
- }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9785
- placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9786
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9787
- placeholder: "\u5546\u54C1\u7F16\u7801"
9788
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9789
- placeholder: "\u5546\u54C1\u540D\u79F0"
9790
9907
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9791
9908
  type: "primary",
9792
9909
  htmlType: "submit"
9793
- }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u91CD\u7F6E")))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9910
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9911
+ onClick: onReset
9912
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9794
9913
  spinning: loading
9795
9914
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
9796
9915
  rowSelection: rowSelection,
9797
9916
  columns: columns,
9798
- rowKey: 'numIid',
9799
- dataSource: searchParams.type == 'select' ? selectList : goodList,
9917
+ rowKey: 'skuCode',
9918
+ dataSource: goodList,
9800
9919
  scroll: {
9920
+ x: true,
9801
9921
  y: 300
9802
9922
  },
9803
9923
  pagination: {
9804
9924
  size: 'small',
9805
9925
  total: total,
9806
- current: searchParams.pageNo,
9807
- pageSize: searchParams.pageSize,
9926
+ current: pageNo,
9927
+ pageSize: pageSize,
9928
+ pageSizeOptions: [],
9808
9929
  onChange: pageChange
9809
9930
  }
9810
9931
  })));
@@ -9823,8 +9944,8 @@ var GoodItem = function GoodItem(props) {
9823
9944
  value = _props$value === void 0 ? [] : _props$value,
9824
9945
  onChange = props.onChange,
9825
9946
  disabled = props.disabled,
9826
- _props$showField = props.showField,
9827
- showField = _props$showField === void 0 ? [] : _props$showField,
9947
+ _props$showHeader = props.showHeader,
9948
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9828
9949
  width = props.width,
9829
9950
  _props$shopList = props.shopList,
9830
9951
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -9836,16 +9957,19 @@ var GoodItem = function GoodItem(props) {
9836
9957
  showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
9837
9958
  _props$tableSelect = props.tableSelect,
9838
9959
  tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
9960
+ _props$selectType = props.selectType,
9961
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
9839
9962
  _props$otherOperation = props.otherOperations,
9840
9963
  otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
9841
9964
  _props$canUpdateNumbe = props.canUpdateNumber,
9842
9965
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
9966
+ shopCode = props.shopCode,
9843
9967
  onSelect = props.onSelect,
9844
9968
  onDelete = props.onDelete;
9845
9969
  var refModal = React.useRef();
9846
- var handleDelete = function handleDelete(index) {
9970
+ var handleDelete = function handleDelete(record, index) {
9847
9971
  onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
9848
- var newList = value.filter(function (item, i) {
9972
+ var newList = _toConsumableArray(value).filter(function (item, i) {
9849
9973
  return index !== i;
9850
9974
  });
9851
9975
  onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
@@ -9855,10 +9979,8 @@ var GoodItem = function GoodItem(props) {
9855
9979
  selectedRowKeys = _useState2[0],
9856
9980
  setSelectedRowKeys = _useState2[1];
9857
9981
  React.useEffect(function () {
9858
- if (!tableSelect) {
9859
- setSelectedRowKeys([]);
9860
- }
9861
- }, [tableSelect]);
9982
+ setSelectedRowKeys([]);
9983
+ }, [tableSelect, selectType]);
9862
9984
  var updateHandle = function updateHandle(val, index, type) {
9863
9985
  if (value === null || value === void 0 ? void 0 : value.length) {
9864
9986
  value[index][type] = val;
@@ -9869,6 +9991,18 @@ var GoodItem = function GoodItem(props) {
9869
9991
  var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
9870
9992
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9871
9993
  return [{
9994
+ dataIndex: 'pic',
9995
+ title: "\u56FE\u7247",
9996
+ align: 'center',
9997
+ ellipsis: true,
9998
+ width: 100,
9999
+ render: function render(val) {
10000
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
10001
+ width: 60,
10002
+ src: val
10003
+ });
10004
+ }
10005
+ }, {
9872
10006
  dataIndex: 'name',
9873
10007
  title: "".concat(text, "\u540D\u79F0"),
9874
10008
  align: 'center',
@@ -9901,6 +10035,8 @@ var GoodItem = function GoodItem(props) {
9901
10035
  render: function render(val, record, index) {
9902
10036
  return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
9903
10037
  value: val,
10038
+ min: 0,
10039
+ precision: 0,
9904
10040
  onChange: function onChange(num) {
9905
10041
  return updateHandle(num, index, 'number');
9906
10042
  }
@@ -9930,20 +10066,8 @@ var GoodItem = function GoodItem(props) {
9930
10066
  render: function render(val, record, index) {
9931
10067
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
9932
10068
  }
9933
- }, {
9934
- dataIndex: 'pic',
9935
- title: "\u56FE\u7247",
9936
- align: 'center',
9937
- ellipsis: true,
9938
- width: 100,
9939
- render: function render(val) {
9940
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
9941
- width: 60,
9942
- src: val
9943
- });
9944
- }
9945
10069
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9946
- return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
10070
+ return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9947
10071
  })));
9948
10072
  if (!disabled) {
9949
10073
  columnList.push({
@@ -9956,30 +10080,32 @@ var GoodItem = function GoodItem(props) {
9956
10080
  return record.canDelete ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9957
10081
  type: "link",
9958
10082
  onClick: function onClick() {
9959
- return handleDelete(index);
10083
+ return handleDelete(record, index);
9960
10084
  }
9961
10085
  }, "\u5220\u9664") : null;
9962
10086
  }
9963
10087
  });
9964
10088
  }
9965
10089
  return columnList;
9966
- }, [showField, value, disabled]);
10090
+ }, [showHeader, value, disabled]);
9967
10091
  var onSubmit = function onSubmit(list) {
9968
10092
  var newList = list.map(function (item) {
9969
- var picUrl = item.picUrl,
9970
- title = item.title,
9971
- price = item.price,
9972
- numIid = item.numIid;
10093
+ var goodsId = item.goodsId,
10094
+ name = item.name,
10095
+ code = item.code,
10096
+ skuCode = item.skuCode,
10097
+ marketPrice = item.marketPrice;
9973
10098
  return {
9974
- id: numIid,
9975
- pic: picUrl,
9976
- name: title,
9977
- code: '',
9978
- sku: '',
9979
- money: price,
9980
- share: '',
10099
+ id: goodsId,
10100
+ pic: '',
10101
+ name: name,
10102
+ code: code,
10103
+ sku: skuCode,
10104
+ money: marketPrice || 0,
10105
+ share: marketPrice || 0,
9981
10106
  number: 1,
9982
10107
  type: '',
10108
+ uuid: kmkfUtils.uuid(),
9983
10109
  canDelete: true,
9984
10110
  canUpdateNumber: canUpdateNumber
9985
10111
  };
@@ -9989,7 +10115,7 @@ var GoodItem = function GoodItem(props) {
9989
10115
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
9990
10116
  setSelectedRowKeys(newSelectedRowKeys);
9991
10117
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
9992
- return newSelectedRowKeys.includes(t.id);
10118
+ return newSelectedRowKeys.includes(t.uuid);
9993
10119
  }));
9994
10120
  };
9995
10121
  var handleChangeGoods = function handleChangeGoods() {
@@ -10017,7 +10143,7 @@ var GoodItem = function GoodItem(props) {
10017
10143
  }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
10018
10144
  columns: newColumns,
10019
10145
  dataSource: value,
10020
- rowKey: 'id',
10146
+ rowKey: 'uuid',
10021
10147
  size: "small",
10022
10148
  pagination: false,
10023
10149
  scroll: {
@@ -10032,96 +10158,102 @@ var GoodItem = function GoodItem(props) {
10032
10158
  width: width,
10033
10159
  shopList: shopList,
10034
10160
  shopId: shopId,
10035
- maxLength: maxLength
10161
+ maxLength: maxLength,
10162
+ shopCode: shopCode
10036
10163
  }));
10037
10164
  };
10038
10165
 
10039
10166
  var BsGoods = function BsGoods(props) {
10167
+ var _withInfo$current3, _withInfo$current4;
10040
10168
  var value = props.value,
10041
- disabled = props.disabled;
10169
+ disabled = props.disabled,
10170
+ onChange = props.onChange;
10042
10171
  var _useState = React.useState(false),
10043
10172
  _useState2 = _slicedToArray(_useState, 2),
10044
10173
  tableSelect = _useState2[0],
10045
10174
  setTableSelect = _useState2[1];
10046
- var _useState3 = React.useState({
10047
- type: '',
10048
- val: ''
10049
- }),
10050
- _useState4 = _slicedToArray(_useState3, 2),
10051
- withInfo = _useState4[0],
10052
- setWithInfo = _useState4[1];
10053
- var ref = React.useRef();
10054
- var reissueRef = React.useRef();
10175
+ var withInfo = React.useRef(null);
10176
+ var valueRef = React.useRef(null);
10055
10177
  React.useEffect(function () {
10056
- ref.current = pubsub__default['default'].subscribeOnce('type', function (type, val) {
10057
- console.log('goods', type, val, value);
10178
+ valueRef.current = value;
10179
+ pubsub__default['default'].subscribe('type', function (type, data) {
10180
+ console.log(type, data);
10058
10181
  if (disabled) return;
10059
- setWithInfo({
10182
+ withInfo.current = {
10060
10183
  type: type,
10061
- val: val
10062
- });
10063
- setTableSelect(['2', '4'].includes(val));
10064
- if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10065
- pubsub__default['default'].publish('selectList', {
10066
- type: val,
10067
- list: _toConsumableArray(value).map(function (item) {
10068
- item.canDelete = false;
10069
- return item;
10070
- })
10184
+ val: data.val
10185
+ };
10186
+ setTableSelect(['2', '4'].includes(data.val));
10187
+ if (['1', '3'].includes(data.val)) {
10188
+ var _valueRef$current;
10189
+ pubsub__default['default'].publish('selectListReturn', {
10190
+ list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.bsGoods) || []),
10191
+ newValue: data === null || data === void 0 ? void 0 : data.newValue
10071
10192
  });
10072
10193
  }
10073
10194
  });
10074
10195
  //补发
10075
- reissueRef.current = pubsub__default['default'].subscribeOnce('reissueType', function (type, val) {
10196
+ pubsub__default['default'].subscribe('reissueType', function (type, data) {
10076
10197
  if (disabled) return;
10077
- console.log('reissueType', type, val, value);
10078
- setWithInfo({
10198
+ withInfo.current = {
10079
10199
  type: type,
10080
- val: val
10081
- });
10082
- setTableSelect(['2', '4'].includes(val));
10083
- if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10084
- pubsub__default['default'].publish('reissueSelectList', {
10085
- type: val,
10086
- list: (value || []).map(function (item) {
10087
- item.canDelete = false;
10088
- return item;
10089
- })
10200
+ val: data.val
10201
+ };
10202
+ setTableSelect(['2', '4'].includes(data.val));
10203
+ if (['1', '3'].includes(data.val)) {
10204
+ var _valueRef$current2;
10205
+ pubsub__default['default'].publish('reissueSelectListReturn', {
10206
+ list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || [])
10090
10207
  });
10091
10208
  }
10092
10209
  });
10093
- return function () {
10094
- pubsub__default['default'].unsubscribe(ref.current);
10095
- pubsub__default['default'].unsubscribe(reissueRef.current);
10096
- };
10097
- }, [value, withInfo, disabled]);
10098
- var _onSelect = React.useCallback(function (list) {
10210
+ }, [disabled, value]);
10211
+ // useEffect(() => {
10212
+ // if (!disabled) {
10213
+ // pubsub.publish('goodList', {
10214
+ // list: cloneDeep(value?.bsGoods || []),
10215
+ // });
10216
+ // }
10217
+ // }, [value, disabled]);
10218
+ var _onSelect = function onSelect(list) {
10219
+ var _withInfo$current, _withInfo$current2;
10099
10220
  if (disabled) return;
10100
- console.log('withInfo', withInfo, list);
10101
10221
  var newList = lodash.cloneDeep(list);
10102
- pubsub__default['default'].publish(withInfo.type === 'reissueType' ? 'reissueSelectList' : 'selectList', {
10103
- type: withInfo.val,
10222
+ var type = ((_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type) === 'reissueType' ? 'reissueSelectList' : 'selectList';
10223
+ pubsub__default['default'].publish(type, {
10224
+ type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
10104
10225
  list: newList.map(function (item) {
10105
10226
  item.canDelete = true;
10106
10227
  return item;
10107
10228
  })
10108
10229
  });
10109
- }, [withInfo]);
10230
+ };
10110
10231
  var _onDelete = function onDelete(item) {
10111
- var deleteId = item === null || item === void 0 ? void 0 : item.id;
10232
+ var deleteId = item === null || item === void 0 ? void 0 : item.sku;
10112
10233
  pubsub__default['default'].publish('deleteGood', deleteId);
10113
10234
  pubsub__default['default'].publish('reissueDeleteGood', deleteId);
10114
10235
  };
10236
+ var changeHandle = function changeHandle(list) {
10237
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10238
+ bsGoods: list
10239
+ }));
10240
+ };
10115
10241
  return /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10116
- key: 'bsGoods',
10117
- disabled: disabled
10242
+ key: 'bsGoods'
10118
10243
  }, props), {}, {
10119
- tableSelect: tableSelect,
10244
+ disabled: disabled,
10245
+ value: value === null || value === void 0 ? void 0 : value.bsGoods,
10246
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10247
+ tableSelect: ['2', '4'].includes(withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current3 = withInfo.current) === null || _withInfo$current3 === void 0 ? void 0 : _withInfo$current3.val),
10248
+ selectType: withInfo === null || withInfo === void 0 ? void 0 : (_withInfo$current4 = withInfo.current) === null || _withInfo$current4 === void 0 ? void 0 : _withInfo$current4.type,
10120
10249
  onSelect: function onSelect(list) {
10121
10250
  return _onSelect(list);
10122
10251
  },
10123
10252
  onDelete: function onDelete(item) {
10124
10253
  return _onDelete(item);
10254
+ },
10255
+ onChange: function onChange(val) {
10256
+ return changeHandle(val);
10125
10257
  }
10126
10258
  }));
10127
10259
  };
@@ -10135,17 +10267,18 @@ var BsExchange = function BsExchange(props) {
10135
10267
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
10136
10268
  disabled = props.disabled,
10137
10269
  other = _objectWithoutProperties(props, _excluded$b);
10270
+ var _useState = React.useState([]),
10271
+ _useState2 = _slicedToArray(_useState, 2),
10272
+ bsGoods = _useState2[0],
10273
+ setBsGoods = _useState2[1];
10274
+ var valueRef = React.useRef({});
10275
+ // useEffect(() => {
10276
+ // pubsub.subscribe('goodList', (_: any, data: any) => {
10277
+ // setBsGoods(data.list);
10278
+ // });
10279
+ // }, []);
10138
10280
  React.useEffect(function () {
10139
- pubsub__default['default'].subscribeOnce('selectList', function (_, data) {
10140
- if (disabled) return;
10141
- if (value) {
10142
- var newData = lodash.cloneDeep(data);
10143
- console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
10144
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10145
- bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
10146
- }));
10147
- }
10148
- });
10281
+ valueRef.current = value;
10149
10282
  pubsub__default['default'].subscribeOnce('deleteGood', function (_, data) {
10150
10283
  if (disabled) return;
10151
10284
  if (value) {
@@ -10154,48 +10287,84 @@ var BsExchange = function BsExchange(props) {
10154
10287
  if (['2', '4'].includes((_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
10155
10288
  newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.map(function (item) {
10156
10289
  item.bsExchangeReturnGoods = item.bsExchangeReturnGoods.filter(function (t) {
10157
- return t.id !== data;
10290
+ return t.sku !== data;
10158
10291
  });
10159
10292
  return item;
10160
10293
  });
10161
10294
  } else if (['1', '3'].includes((_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2[0])) {
10162
10295
  newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.filter(function (item) {
10163
- return item.id !== data;
10296
+ return item.sku !== data;
10164
10297
  });
10165
10298
  }
10166
10299
  onChange(newValue);
10167
10300
  }
10168
10301
  });
10302
+ // pubsub.subscribeOnce('selectList', (_: any, data: any) => {
10303
+ // if (disabled) return;
10304
+ // if (value) {
10305
+ // const newData = cloneDeep(data);
10306
+ // onChange({
10307
+ // ...value,
10308
+ // bsExchangeReturnGoods: getListHandle([...newData.list], value),
10309
+ // });
10310
+ // }
10311
+ // });
10169
10312
  }, [value]);
10313
+ React.useEffect(function () {
10314
+ pubsub__default['default'].subscribe('selectList', function (_, data) {
10315
+ if (disabled) return;
10316
+ console.log('selectList', valueRef.current, data);
10317
+ if (valueRef.current) {
10318
+ var newDataList = lodash.cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10319
+ onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
10320
+ bsExchangeReturnGoods: getListHandle(newDataList, valueRef.current)
10321
+ }));
10322
+ }
10323
+ });
10324
+ }, []);
10325
+ React.useEffect(function () {
10326
+ pubsub__default['default'].subscribe('selectListReturn', function (_, data) {
10327
+ if (disabled) return;
10328
+ var newDataList = lodash.cloneDeep((data === null || data === void 0 ? void 0 : data.list) || []);
10329
+ onChange(_objectSpread2(_objectSpread2({}, data.newValue), {}, {
10330
+ bsExchangeReturnGoods: getListHandle(newDataList, valueRef.current)
10331
+ }));
10332
+ });
10333
+ }, []);
10170
10334
  var getListHandle = function getListHandle(list, val) {
10171
- var _val$bsExchangeType;
10335
+ var _val$bsExchangeType, _val$bsExchangeType2;
10172
10336
  //如果是原单换
10173
10337
  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])) {
10174
10338
  return list.reduce(function (prv, next) {
10175
- var _val$bsExchangeType2;
10176
10339
  next.canDelete = false;
10177
10340
  //数量大于1 拆开
10178
10341
  if (next.number > 1) {
10179
- var newList = Array(next.number).fill(_objectSpread2({}, next)).map(function (t) {
10180
- t.number = 1;
10181
- return t;
10342
+ var newList = Array(next.number).fill({}).map(function () {
10343
+ var newNext = _objectSpread2({}, next);
10344
+ newNext.money = newNext.share;
10345
+ newNext.number = 1;
10346
+ newNext.uuid = kmkfUtils.uuid();
10347
+ return newNext;
10182
10348
  });
10183
10349
  prv.push.apply(prv, _toConsumableArray(newList));
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])) {
10350
+ } else {
10185
10351
  prv.push(_objectSpread2({}, next));
10186
10352
  }
10187
10353
  return prv;
10188
10354
  }, []);
10189
- } else {
10355
+ } 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])) {
10190
10356
  //补发换货
10191
10357
  return list.reduce(function (prv, next, index) {
10192
10358
  next.canDelete = true;
10193
10359
  next.index = index;
10194
10360
  //数量大于1 拆开
10195
10361
  if (next.number > 1) {
10196
- var newList = Array(next.number).fill(_objectSpread2({}, next)).map(function (t) {
10197
- t.number = 1;
10198
- return t;
10362
+ var newList = Array(next.number).fill({}).map(function () {
10363
+ var newNext = _objectSpread2({}, next);
10364
+ newNext.money = newNext.share;
10365
+ newNext.number = 1;
10366
+ newNext.uuid = kmkfUtils.uuid();
10367
+ return newNext;
10199
10368
  });
10200
10369
  prv.push({
10201
10370
  bsExchangeReturnGoods: _toConsumableArray(newList),
@@ -10216,11 +10385,25 @@ var BsExchange = function BsExchange(props) {
10216
10385
  newValue.bsExchangeType = val;
10217
10386
  newValue.bsExchangeReturnGoods = [];
10218
10387
  newValue.bsExchangeGiftGoods = [];
10219
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10220
- pubsub__default['default'].publish('type', val[0]);
10388
+ // if (['1', '3'].includes(val[0])) {
10389
+ // newValue.bsExchangeReturnGoods = getListHandle(bsGoods, newValue);
10390
+ // }
10391
+ if (['2', '4'].includes(val[0])) {
10392
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10393
+ }
10394
+ pubsub__default['default'].publish('type', {
10395
+ val: val[0],
10396
+ newValue: newValue
10397
+ });
10221
10398
  };
10222
10399
  var changeHandle = function changeHandle(val, key) {
10223
10400
  var newValue = _objectSpread2({}, value);
10401
+ if (key === 'bsExchangeGiftGoods') {
10402
+ val = lodash.cloneDeep(val).map(function (t) {
10403
+ t.money = 0;
10404
+ return t;
10405
+ });
10406
+ }
10224
10407
  newValue[key] = val;
10225
10408
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10226
10409
  if (key === 'bsExchangeType') {
@@ -10229,7 +10412,7 @@ var BsExchange = function BsExchange(props) {
10229
10412
  }
10230
10413
  };
10231
10414
  var changeReturnHandle = function changeReturnHandle(val, index, key) {
10232
- // console.log('changeReturnHandle', val, index, key);
10415
+ console.log('changeReturnHandle', val, index, key);
10233
10416
  var newValue = _objectSpread2({}, value);
10234
10417
  newValue.bsExchangeReturnGoods[index][key] = (val || []).map(function (t) {
10235
10418
  t.index = index;
@@ -10278,15 +10461,22 @@ var BsExchange = function BsExchange(props) {
10278
10461
  disabled: disabled,
10279
10462
  showChangeBtn: false,
10280
10463
  value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
10464
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10281
10465
  onChange: function onChange(val) {
10282
10466
  return changeHandle(val, 'bsExchangeReturnGoods');
10283
10467
  }
10284
10468
  })) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
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({
10469
+ return /*#__PURE__*/React__default['default'].createElement("div", {
10470
+ style: {
10471
+ border: '1px dashed',
10472
+ marginBottom: '8px'
10473
+ }
10474
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10286
10475
  key: 'bsReturnGoods'
10287
10476
  }, other), {}, {
10288
10477
  disabled: disabled,
10289
10478
  showChangeBtn: showChangeBtn,
10479
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10290
10480
  value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
10291
10481
  onChange: function onChange(val) {
10292
10482
  return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
@@ -10298,6 +10488,7 @@ var BsExchange = function BsExchange(props) {
10298
10488
  showChangeBtn: showChangeBtn,
10299
10489
  otherOperations: copyGoods(index),
10300
10490
  value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
10491
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10301
10492
  onChange: function onChange(val) {
10302
10493
  return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
10303
10494
  }
@@ -10305,7 +10496,8 @@ var BsExchange = function BsExchange(props) {
10305
10496
  })), ['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({
10306
10497
  headerText: "\u8D60\u54C1",
10307
10498
  key: 'bsGiftGoods',
10308
- disabled: disabled
10499
+ disabled: disabled,
10500
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode
10309
10501
  }, other), {}, {
10310
10502
  value: value === null || value === void 0 ? void 0 : value.bsExchangeGiftGoods,
10311
10503
  onChange: function onChange(val) {
@@ -10322,37 +10514,76 @@ var BsReissue = function BsReissue(props) {
10322
10514
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
10323
10515
  disabled = props.disabled,
10324
10516
  other = _objectWithoutProperties(props, _excluded$c);
10517
+ var _useState = React.useState([]),
10518
+ _useState2 = _slicedToArray(_useState, 2),
10519
+ bsGoods = _useState2[0],
10520
+ setBsGoods = _useState2[1];
10521
+ var valueRef = React.useRef({});
10522
+ // useEffect(() => {
10523
+ // pubsub.subscribe('goodList', (_: any, data: any) => {
10524
+ // setBsGoods(data.list);
10525
+ // });
10526
+ // }, []);
10325
10527
  React.useEffect(function () {
10326
- pubsub__default['default'].subscribeOnce('reissueSelectList', function (_, data) {
10528
+ pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
10327
10529
  if (disabled) return;
10328
- console.log(data, value);
10329
- if (value) {
10330
- var newData = lodash.cloneDeep(data);
10331
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10332
- bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
10333
- item.money = 0;
10334
- item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
10335
- return item;
10336
- })
10337
- }));
10530
+ if (valueRef.current) {
10531
+ var newValue = _objectSpread2({}, valueRef.current);
10532
+ newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
10533
+ item.money = 0;
10534
+ item.share = 0;
10535
+ item.canUpdateNumber = true;
10536
+ return item;
10537
+ });
10538
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10338
10539
  }
10339
10540
  });
10541
+ }, []);
10542
+ React.useEffect(function () {
10543
+ pubsub__default['default'].subscribe('reissueSelectListReturn', function (_, data) {
10544
+ if (disabled) return;
10545
+ var newValue = _objectSpread2({}, data.newValue);
10546
+ newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
10547
+ item.money = 0;
10548
+ item.share = 0;
10549
+ item.canUpdateNumber = true;
10550
+ return item;
10551
+ });
10552
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10553
+ });
10554
+ }, []);
10555
+ React.useEffect(function () {
10556
+ valueRef.current = value;
10340
10557
  pubsub__default['default'].subscribeOnce('reissueDeleteGood', function (_, data) {
10341
10558
  if (disabled) return;
10342
10559
  if (value) {
10343
10560
  var newValue = _objectSpread2({}, value);
10344
10561
  newValue.bsReissueGoods = newValue.bsReissueGoods.filter(function (item) {
10345
- return item.id !== data;
10562
+ return item.sku !== data;
10346
10563
  });
10347
10564
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10348
10565
  }
10349
10566
  });
10567
+ // pubsub.subscribeOnce('reissueSelectList', (_: any, data: any) => {
10568
+ // if (disabled) return;
10569
+ // if (value) {
10570
+ // const newValue = { ...value };
10571
+ // newValue.bsReissueGoods = data?.list.map((item: any) => {
10572
+ // item.money = 0;
10573
+ // item.share = 0;
10574
+ // item.canUpdateNumber = true;
10575
+ // return item;
10576
+ // });
10577
+ // onChange?.(newValue);
10578
+ // }
10579
+ // });
10350
10580
  }, [value, disabled]);
10351
10581
  var changeHandle = function changeHandle(val, key) {
10352
10582
  var newValue = _objectSpread2({}, value);
10353
10583
  if (key === 'bsReissueGoods') {
10354
10584
  val = (val || []).map(function (item) {
10355
10585
  item.money = 0;
10586
+ item.share = 0;
10356
10587
  return item;
10357
10588
  });
10358
10589
  }
@@ -10360,10 +10591,13 @@ var BsReissue = function BsReissue(props) {
10360
10591
  if (key === 'bsReissueType') {
10361
10592
  newValue.bsReissueGoods = [];
10362
10593
  }
10363
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
10364
- if (key === 'bsReissueType') {
10365
- pubsub__default['default'].publish('reissueType', val[0]);
10594
+ if (['2', '4'].includes(val[0])) {
10595
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10366
10596
  }
10597
+ pubsub__default['default'].publish('reissueType', {
10598
+ val: val[0],
10599
+ newValue: newValue
10600
+ });
10367
10601
  };
10368
10602
  //显示选择商品按钮 原单换不显示选择商品
10369
10603
  var showChangeBtn = React.useMemo(function () {
@@ -10381,12 +10615,13 @@ var BsReissue = function BsReissue(props) {
10381
10615
  onChange: function onChange(val) {
10382
10616
  return changeHandle(val, 'bsReissueType');
10383
10617
  }
10384
- }), /*#__PURE__*/React__default['default'].createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10618
+ }), /*#__PURE__*/React__default['default'].createElement(GoodItem, _objectSpread2(_objectSpread2({
10385
10619
  key: 'reissueGoods'
10386
10620
  }, other), {}, {
10387
10621
  disabled: disabled,
10388
10622
  canUpdateNumber: showChangeBtn,
10389
10623
  showChangeBtn: showChangeBtn,
10624
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10390
10625
  value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
10391
10626
  onChange: function onChange(val) {
10392
10627
  return changeHandle(val, 'bsReissueGoods');
@@ -10397,7 +10632,7 @@ var BsReissue = function BsReissue(props) {
10397
10632
  var css_248z$9 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
10398
10633
  styleInject(css_248z$9);
10399
10634
 
10400
- var TabPane$2 = antd.Tabs.TabPane;
10635
+ var TabPane$1 = antd.Tabs.TabPane;
10401
10636
  var Option$2 = antd.Select.Option;
10402
10637
  var Search$1 = antd.Input.Search;
10403
10638
  var GoodsModal$3 = function GoodsModal(props) {
@@ -10713,7 +10948,7 @@ var GoodsModal$3 = function GoodsModal(props) {
10713
10948
  }));
10714
10949
  }
10715
10950
  }, tabs.map(function (tab) {
10716
- return /*#__PURE__*/React__default['default'].createElement(TabPane$2, {
10951
+ return /*#__PURE__*/React__default['default'].createElement(TabPane$1, {
10717
10952
  tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
10718
10953
  key: tab.key
10719
10954
  });