@kmkf-fe-packages/basic-components 0.7.15-alpha.5 → 0.7.15-alpha.52

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
@@ -6940,7 +6940,7 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6940
6940
  var beforeUpload = function beforeUpload(file) {
6941
6941
  console.log('beforeUpload', file);
6942
6942
  var size = file.size / 1024 / 1024 < maxSize;
6943
- if (value.length > maxCount) {
6943
+ if (value.length >= maxCount) {
6944
6944
  message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
6945
6945
  return Upload.LIST_IGNORE;
6946
6946
  }
@@ -6963,7 +6963,7 @@ var ApaasUploadAsync$1 = function ApaasUploadAsync(_ref) {
6963
6963
  className: styles$2.tips
6964
6964
  }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6"), /*#__PURE__*/React.createElement(Dragger, _objectSpread2({
6965
6965
  disabled: disabled,
6966
- multiple: true,
6966
+ multiple: false,
6967
6967
  accept: accept,
6968
6968
  name: "file",
6969
6969
  maxCount: maxCount,
@@ -7152,7 +7152,8 @@ function ApaasRate(props) {
7152
7152
  var address = AddressData.getInstance();
7153
7153
  var bsAddress = BsAddressData.getInstance();
7154
7154
  var Province = function Province(props) {
7155
- var type = props.type;
7155
+ var _props$type = props.type,
7156
+ type = _props$type === void 0 ? 'workOrder' : _props$type;
7156
7157
  var _useState = useState([]),
7157
7158
  _useState2 = _slicedToArray(_useState, 2),
7158
7159
  option = _useState2[0],
@@ -7163,7 +7164,7 @@ var Province = function Province(props) {
7163
7164
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7164
7165
  while (1) switch (_context.prev = _context.next) {
7165
7166
  case 0:
7166
- setOptions(type === 'workOrder' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7167
+ setOptions(type !== 'bs' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7167
7168
  case 1:
7168
7169
  case "end":
7169
7170
  return _context.stop();
@@ -7182,6 +7183,9 @@ var Province = function Province(props) {
7182
7183
  }, []);
7183
7184
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7184
7185
  options: option,
7186
+ style: {
7187
+ minWidth: '100px'
7188
+ },
7185
7189
  placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A"
7186
7190
  })));
7187
7191
  };
@@ -7211,7 +7215,7 @@ var ParseLogistics = function ParseLogistics(props) {
7211
7215
  });
7212
7216
  };
7213
7217
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextArea, {
7214
- placeholder: "\u590D\u5236\u7269\u6D41\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7218
+ placeholder: "\u590D\u5236\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7215
7219
  rows: 3,
7216
7220
  value: value,
7217
7221
  onChange: function onChange(e) {
@@ -8947,31 +8951,43 @@ var Payment = function Payment(props) {
8947
8951
  name: 'enterprisePaymentTid',
8948
8952
  placeholder: '请输入订单编号',
8949
8953
  required: required,
8950
- show: true
8954
+ show: true,
8955
+ hidden: false
8951
8956
  }, {
8952
8957
  label: '打款金额',
8953
8958
  name: 'enterprisePaymentRefundFee',
8954
8959
  placeholder: '请输入打款金额',
8955
8960
  required: required,
8956
- show: true
8961
+ show: true,
8962
+ hidden: false
8957
8963
  }, {
8958
8964
  label: '买家昵称',
8959
8965
  name: 'enterprisePaymentBuyerNick',
8960
8966
  placeholder: '请输入买家昵称',
8961
8967
  required: false,
8962
- show: true
8968
+ show: true,
8969
+ hidden: false
8963
8970
  }, {
8964
8971
  label: '支付宝名称',
8965
8972
  name: 'enterprisePaymentAlipayNick',
8966
8973
  placeholder: '请输入支付宝名称',
8967
8974
  required: zhiFubaoRequired,
8968
- show: true
8975
+ show: true,
8976
+ hidden: false
8969
8977
  }, {
8970
8978
  label: '支付宝账号',
8971
8979
  name: 'enterprisePaymentAlipayNo',
8972
8980
  placeholder: '请输入支付宝账号',
8973
8981
  required: zhiFubaoRequired,
8974
- show: true
8982
+ show: true,
8983
+ hidden: false
8984
+ }, {
8985
+ label: '打款状态',
8986
+ name: 'enterprisePaymentStatus',
8987
+ placeholder: '',
8988
+ required: false,
8989
+ show: false,
8990
+ hidden: true
8975
8991
  }];
8976
8992
  return /*#__PURE__*/React.createElement(React.Fragment, null, PaymentList.map(function (item) {
8977
8993
  return item.show && /*#__PURE__*/React.createElement(Form.Item, {
@@ -9310,6 +9326,51 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9310
9326
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9311
9327
  trajectoryCompany: val
9312
9328
  }));
9329
+ handleSearchSnapshot(val);
9330
+ };
9331
+ var handleSearchSnapshot = function handleSearchSnapshot(company) {
9332
+ var trajectoryCompany = value.trajectoryCompany,
9333
+ trajectoryCode = value.trajectoryCode,
9334
+ trajectoryPhone = value.trajectoryPhone;
9335
+ var newCompany = company ? company : trajectoryCompany;
9336
+ if (newCompany === 'SF' && !(newCompany && trajectoryCode && trajectoryPhone)) {
9337
+ return;
9338
+ } else if (!(newCompany && trajectoryCode)) {
9339
+ return;
9340
+ }
9341
+ try {
9342
+ extendRequest('/qy/logistics/logisticsTraceSearch', {
9343
+ method: 'post',
9344
+ data: {
9345
+ mailNo: trajectoryCode,
9346
+ cpCode: newCompany,
9347
+ mobile: trajectoryPhone
9348
+ }
9349
+ }).then(function (res) {
9350
+ var result = res.result,
9351
+ success = res.success,
9352
+ data = res.data,
9353
+ msg = res.message;
9354
+ if (result === 100 || success) {
9355
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9356
+ trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
9357
+ trajectoryCompany: newCompany
9358
+ }));
9359
+ } else {
9360
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9361
+ trajectorySnapshot: '',
9362
+ trajectoryCompany: newCompany
9363
+ }));
9364
+ msg && message.error(msg);
9365
+ }
9366
+ });
9367
+ } catch (err) {
9368
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9369
+ trajectorySnapshot: '',
9370
+ trajectoryCompany: newCompany
9371
+ }));
9372
+ (err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
9373
+ }
9313
9374
  };
9314
9375
  //物流公司
9315
9376
  var LogisticsCompany = function LogisticsCompany() {
@@ -9332,20 +9393,40 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9332
9393
  //物流单号
9333
9394
  var LogisticsCode = function LogisticsCode() {
9334
9395
  return /*#__PURE__*/React.createElement(Input, {
9335
- style: {
9336
- marginBottom: '8px'
9337
- },
9338
9396
  disabled: disabled,
9339
9397
  placeholder: "\u7269\u6D41\u5355\u53F7",
9340
9398
  onChange: function onChange(e) {
9341
9399
  return handleInputChange(e, 'trajectoryCode');
9342
9400
  },
9343
- value: value === null || value === void 0 ? void 0 : value.trajectoryCode
9401
+ value: value === null || value === void 0 ? void 0 : value.trajectoryCode,
9402
+ onBlur: function onBlur() {
9403
+ return handleSearchSnapshot();
9404
+ }
9405
+ });
9406
+ };
9407
+ //sf手机号
9408
+ var LogisticsPhone = function LogisticsPhone() {
9409
+ return /*#__PURE__*/React.createElement(Input, {
9410
+ disabled: disabled,
9411
+ style: {
9412
+ marginTop: '8px'
9413
+ },
9414
+ placeholder: "\u624B\u673A\u53F7",
9415
+ onChange: function onChange(e) {
9416
+ return handleInputChange(e, 'trajectoryPhone');
9417
+ },
9418
+ value: value === null || value === void 0 ? void 0 : value.trajectoryPhone,
9419
+ onBlur: function onBlur() {
9420
+ return handleSearchSnapshot();
9421
+ }
9344
9422
  });
9345
9423
  };
9346
9424
  //物流快照
9347
9425
  var LogisticsSnapshot = function LogisticsSnapshot() {
9348
9426
  return /*#__PURE__*/React.createElement(Input, {
9427
+ style: {
9428
+ marginTop: '8px'
9429
+ },
9349
9430
  disabled: true,
9350
9431
  placeholder: "\u7269\u6D41\u5FEB\u7167",
9351
9432
  onChange: function onChange(e) {
@@ -9354,7 +9435,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9354
9435
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
9355
9436
  });
9356
9437
  };
9357
- return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
9438
+ return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
9358
9439
  };
9359
9440
 
9360
9441
  var jstGoods = function jstGoods(props) {
@@ -9368,7 +9449,7 @@ var jstGoods = function jstGoods(props) {
9368
9449
  _props$type = props.type,
9369
9450
  type = _props$type === void 0 ? 1 : _props$type,
9370
9451
  _props$showField = props.showField,
9371
- showField = _props$showField === void 0 ? 'all' : _props$showField;
9452
+ showField = _props$showField === void 0 ? '' : _props$showField;
9372
9453
  var _useState = useState(0),
9373
9454
  _useState2 = _slicedToArray(_useState, 2),
9374
9455
  changeIndex = _useState2[0],
@@ -9418,7 +9499,7 @@ var jstGoods = function jstGoods(props) {
9418
9499
  return setChangeIndex(index);
9419
9500
  }
9420
9501
  }, "\u5305\u88F9".concat(index + 1)));
9421
- }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
9502
+ }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(Select, {
9422
9503
  disabled: disabled,
9423
9504
  placeholder: "\u7269\u6D41\u516C\u53F8",
9424
9505
  onChange: function onChange(val) {
@@ -9433,14 +9514,14 @@ var jstGoods = function jstGoods(props) {
9433
9514
  style: {
9434
9515
  minWidth: '100px'
9435
9516
  }
9436
- }), /*#__PURE__*/React.createElement(Input, {
9517
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
9437
9518
  disabled: disabled,
9438
9519
  placeholder: "\u7269\u6D41\u5355\u53F7",
9439
9520
  onChange: function onChange(e) {
9440
9521
  return changeInputHandle(e.target.value, 'logisticsCode');
9441
9522
  },
9442
9523
  value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
9443
- })) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
9524
+ }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
9444
9525
  disabled: disabled,
9445
9526
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
9446
9527
  onChange: function onChange(e) {
@@ -9545,44 +9626,63 @@ var ItemList = function ItemList(props) {
9545
9626
  }, "\u6682\u4E0D\u652F\u6301\u6DFB\u52A0")) : null);
9546
9627
  };
9547
9628
 
9548
- var TabPane$1 = Tabs.TabPane;
9549
9629
  var columns = [{
9550
- dataIndex: 'picUrl',
9551
- title: '主图',
9552
- render: function render(val) {
9553
- return /*#__PURE__*/React.createElement(Image, {
9554
- width: 60,
9555
- src: val
9556
- });
9630
+ dataIndex: 'index',
9631
+ title: '序号',
9632
+ // with: 70,
9633
+ ellipsis: true,
9634
+ render: function render(val, record, index) {
9635
+ return /*#__PURE__*/React.createElement("span", null, index + 1);
9557
9636
  }
9558
9637
  }, {
9559
- dataIndex: 'outerId',
9560
- title: '款式编码'
9638
+ dataIndex: 'name',
9639
+ title: '商品名称',
9640
+ with: 200,
9641
+ ellipsis: true
9642
+ }, {
9643
+ dataIndex: 'goodsId',
9644
+ title: '商品id',
9645
+ with: 200,
9646
+ ellipsis: true
9561
9647
  }, {
9562
- dataIndex: 'numIid',
9563
- title: '商品编码'
9648
+ dataIndex: 'skuName',
9649
+ title: '商品sku名称',
9650
+ with: 200,
9651
+ ellipsis: true
9564
9652
  }, {
9565
- dataIndex: 'title',
9566
- title: '商品名称'
9653
+ dataIndex: 'code',
9654
+ title: '商品编码',
9655
+ with: 200,
9656
+ ellipsis: true
9567
9657
  }, {
9568
- dataIndex: 'skus',
9569
- title: '颜色及规格'
9658
+ dataIndex: 'skuCode',
9659
+ title: '商品sku编码',
9660
+ with: 200,
9661
+ ellipsis: true
9662
+ }, {
9663
+ dataIndex: 'marketPrice',
9664
+ title: '市场价',
9665
+ with: 200,
9666
+ ellipsis: true
9570
9667
  }];
9571
9668
  var GoodsModal$1 = function GoodsModal(props, ref) {
9572
9669
  useImperativeHandle(ref, function () {
9573
9670
  return {
9574
9671
  open: function open() {
9575
9672
  setVisible(true);
9673
+ setPageNo(1);
9576
9674
  setSelect([]);
9577
9675
  setSelectIds([]);
9578
9676
  queryItems();
9677
+ onReset();
9579
9678
  }
9580
9679
  };
9581
9680
  });
9582
9681
  var onSubmit = props.onSubmit,
9583
9682
  shopId = props.shopId,
9584
9683
  shopList = props.shopList,
9585
- width = props.width;
9684
+ width = props.width,
9685
+ shopCode = props.shopCode;
9586
9686
  var _useState = useState(false),
9587
9687
  _useState2 = _slicedToArray(_useState, 2),
9588
9688
  visible = _useState2[0],
@@ -9597,123 +9697,85 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9597
9697
  setSelectIds = _useState6[1];
9598
9698
  var _useState7 = useState([]),
9599
9699
  _useState8 = _slicedToArray(_useState7, 2),
9600
- goodList = _useState8[0],
9601
- setGoodList = _useState8[1];
9602
- var _useState9 = useState(false),
9700
+ allList = _useState8[0],
9701
+ setAllList = _useState8[1]; //获取到的所有数据
9702
+ var _useState9 = useState([]),
9603
9703
  _useState10 = _slicedToArray(_useState9, 2),
9604
- loading = _useState10[0],
9605
- setLoading = _useState10[1];
9606
- var _useState11 = useState({
9607
- apiName: 'queryItems',
9608
- desc: true,
9609
- numIids: '',
9610
- orderBy: 'list_time',
9611
- pageNo: 1,
9612
- pageSize: 10,
9613
- shopId: shopId,
9614
- type: 'onSale',
9615
- cids: '',
9616
- title: ''
9617
- }),
9704
+ filterList = _useState10[0],
9705
+ setFilterList = _useState10[1]; //获取到的筛选数据
9706
+ var _useState11 = useState(1),
9618
9707
  _useState12 = _slicedToArray(_useState11, 2),
9619
- searchParams = _useState12[0],
9620
- setSearch = _useState12[1];
9621
- var _useState13 = useState(0),
9622
- _useState14 = _slicedToArray(_useState13, 2),
9623
- total = _useState14[0],
9624
- setTotal = _useState14[1];
9625
- var _useState15 = useState(''),
9708
+ pageNo = _useState12[0],
9709
+ setPageNo = _useState12[1];
9710
+ var _useState13 = useState(20),
9711
+ _useState14 = _slicedToArray(_useState13, 1),
9712
+ pageSize = _useState14[0];
9713
+ var _useState15 = useState([]),
9626
9714
  _useState16 = _slicedToArray(_useState15, 2),
9627
- platform = _useState16[0],
9628
- setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9629
- var _useState17 = useState({}),
9715
+ goodList = _useState16[0],
9716
+ setGoodList = _useState16[1];
9717
+ var _useState17 = useState(false),
9630
9718
  _useState18 = _slicedToArray(_useState17, 2),
9631
- shopInfo = _useState18[0],
9632
- setShopInfo = _useState18[1]; //店铺信息
9633
- var _useState19 = useState([{
9634
- tab: '所选商品',
9635
- key: 'onSale'
9636
- }
9637
- // { tab: '已选商品', key: 'select' },
9638
- ]),
9639
- _useState20 = _slicedToArray(_useState19, 1),
9640
- tabs = _useState20[0];
9719
+ loading = _useState18[0],
9720
+ setLoading = _useState18[1];
9721
+ var _useState19 = useState(0),
9722
+ _useState20 = _slicedToArray(_useState19, 2),
9723
+ total = _useState20[0],
9724
+ setTotal = _useState20[1];
9725
+ var _useState21 = useState(''),
9726
+ _useState22 = _slicedToArray(_useState21, 2),
9727
+ platform = _useState22[0],
9728
+ setPlatform = _useState22[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
9729
+ var _useState23 = useState({}),
9730
+ _useState24 = _slicedToArray(_useState23, 2),
9731
+ shopInfo = _useState24[0],
9732
+ setShopInfo = _useState24[1]; //店铺信息
9733
+ var _Form$useForm = Form.useForm(),
9734
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9735
+ form = _Form$useForm2[0];
9641
9736
  //选择页码
9642
- var pageChange = function pageChange(page, pageSize) {
9643
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9644
- pageNo: page,
9645
- pageSize: pageSize
9646
- }));
9647
- };
9648
- /**
9649
- *
9650
- * @returns 获取查询参数
9651
- */
9652
- var queryPd = function queryPd() {
9653
- var params = {
9654
- apiName: 'queryItems',
9655
- desc: searchParams.desc,
9656
- productIds: searchParams.numIids,
9657
- orderBy: searchParams.orderBy,
9658
- pageNo: searchParams.pageNo,
9659
- pageSize: searchParams.pageSize,
9660
- shopId: shopId,
9661
- type: searchParams.type,
9662
- title: searchParams.title,
9663
- cids: searchParams.cids
9664
- };
9665
- return params;
9737
+ var pageChange = function pageChange(page) {
9738
+ setPageNo(page);
9739
+ setGoodList(_toConsumableArray(filterList).splice((page - 1) * pageSize, pageSize));
9666
9740
  };
9667
9741
  /**
9668
9742
  * 查询商品
9669
9743
  */
9670
- var queryItems = /*#__PURE__*/function () {
9671
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9672
- var params, res, _ref2, list, _total, nextKey, newList;
9673
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9674
- while (1) switch (_context.prev = _context.next) {
9675
- case 0:
9676
- _context.prev = 0;
9677
- setLoading(true);
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', {
9685
- method: 'post',
9686
- data: params
9687
- });
9688
- case 9:
9689
- res = _context.sent;
9690
- _ref2 = res.data || {
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;
9699
- item.platform = platform;
9744
+ var queryItems = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9745
+ var params, res, products, newProducts;
9746
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9747
+ while (1) switch (_context.prev = _context.next) {
9748
+ case 0:
9749
+ _context.prev = 0;
9750
+ setLoading(true);
9751
+ params = {
9752
+ shopCode: shopCode
9753
+ };
9754
+ _context.next = 5;
9755
+ return extendRequest('/qy/gdfw/product/bsListProduct', {
9756
+ method: 'post',
9757
+ data: params
9758
+ });
9759
+ case 5:
9760
+ res = _context.sent;
9761
+ products = res.data.products;
9762
+ newProducts = products.map(function (item, index) {
9763
+ return _objectSpread2(_objectSpread2({}, item), {}, {
9764
+ index: index + 1
9700
9765
  });
9701
- setGoodList(newList);
9702
- setTotal(_total);
9703
- case 15:
9704
- _context.prev = 15;
9705
- setLoading(false);
9706
- return _context.finish(15);
9707
- case 18:
9708
- case "end":
9709
- return _context.stop();
9710
- }
9711
- }, _callee, null, [[0,, 15, 18]]);
9712
- }));
9713
- return function queryItems() {
9714
- return _ref.apply(this, arguments);
9715
- };
9716
- }();
9766
+ });
9767
+ setAllList(_toConsumableArray(newProducts));
9768
+ initData(_toConsumableArray(newProducts));
9769
+ case 10:
9770
+ _context.prev = 10;
9771
+ setLoading(false);
9772
+ return _context.finish(10);
9773
+ case 13:
9774
+ case "end":
9775
+ return _context.stop();
9776
+ }
9777
+ }, _callee, null, [[0,, 10, 13]]);
9778
+ })), [shopCode]);
9717
9779
  useEffect(function () {
9718
9780
  var shopInfo = shopList.find(function (item) {
9719
9781
  return shopId === item.shopId || shopId === item.shopName;
@@ -9724,12 +9786,19 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9724
9786
  }, [shopId]);
9725
9787
  var rowSelection = {
9726
9788
  selectedRowKeys: selectIds,
9789
+ fixed: true,
9727
9790
  onChange: function onChange(selectedRowKeys, selectedRows, info) {
9728
9791
  console.log(selectedRowKeys, selectedRows, info);
9729
9792
  setSelectIds(selectedRowKeys);
9730
9793
  setSelect(_toConsumableArray(selectedRows));
9731
9794
  }
9732
9795
  };
9796
+ var initData = function initData(list) {
9797
+ setFilterList(_toConsumableArray(list));
9798
+ setGoodList(_toConsumableArray(list).splice(0, pageSize));
9799
+ setTotal(list.length);
9800
+ setPageNo(1);
9801
+ };
9733
9802
  var _onCancel = function onCancel() {
9734
9803
  setVisible(false);
9735
9804
  };
@@ -9737,8 +9806,23 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9737
9806
  onSubmit(selectList);
9738
9807
  _onCancel();
9739
9808
  };
9809
+ var onFinish = function onFinish(value) {
9810
+ var newFilterList = [];
9811
+ Object.keys(value).forEach(function (key) {
9812
+ if (value[key]) {
9813
+ newFilterList = allList.filter(function (item) {
9814
+ return item[key].indexOf(value[key]) > -1;
9815
+ });
9816
+ }
9817
+ });
9818
+ initData(newFilterList);
9819
+ };
9820
+ var onReset = function onReset() {
9821
+ form.resetFields();
9822
+ initData(_toConsumableArray(allList));
9823
+ };
9740
9824
  return /*#__PURE__*/React.createElement(Modal, {
9741
- title: '选择商品编码',
9825
+ title: '选择商品',
9742
9826
  okText: '确认',
9743
9827
  cancelText: '取消',
9744
9828
  visible: visible,
@@ -9748,52 +9832,53 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9748
9832
  },
9749
9833
  onOk: onOk,
9750
9834
  wrapClassName: "goodModal"
9751
- }, /*#__PURE__*/React.createElement(Tabs, {
9752
- type: "card",
9753
- activeKey: searchParams.type,
9754
- onChange: function onChange(e) {
9755
- var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
9756
- type: e,
9757
- pageNo: 1
9758
- });
9759
- setSearch(params);
9835
+ }, /*#__PURE__*/React.createElement(Form, {
9836
+ layout: "inline",
9837
+ form: form,
9838
+ onFinish: onFinish
9839
+ }, /*#__PURE__*/React.createElement(Form.Item, {
9840
+ name: "name"
9841
+ }, /*#__PURE__*/React.createElement(Input, {
9842
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",
9843
+ style: {
9844
+ width: 150
9760
9845
  }
9761
- }, tabs.map(function (tab) {
9762
- return /*#__PURE__*/React.createElement(TabPane$1, {
9763
- tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
9764
- key: tab.key
9765
- });
9766
- })), /*#__PURE__*/React.createElement("div", {
9767
- className: "searchBox",
9846
+ })), /*#__PURE__*/React.createElement(Form.Item, {
9847
+ name: "code"
9848
+ }, /*#__PURE__*/React.createElement(Input, {
9849
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u7801",
9768
9850
  style: {
9769
- display: searchParams.type === 'select' ? 'none' : ''
9851
+ width: 150
9852
+ }
9853
+ })), /*#__PURE__*/React.createElement(Form.Item, {
9854
+ name: "skuCode"
9855
+ }, /*#__PURE__*/React.createElement(Input, {
9856
+ placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1sku\u7F16\u7801",
9857
+ style: {
9858
+ width: 150
9770
9859
  }
9771
- }, /*#__PURE__*/React.createElement(Form, {
9772
- layout: "inline"
9773
- }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9774
- placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9775
- })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9776
- placeholder: "\u5546\u54C1\u7F16\u7801"
9777
- })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9778
- placeholder: "\u5546\u54C1\u540D\u79F0"
9779
9860
  })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
9780
9861
  type: "primary",
9781
9862
  htmlType: "submit"
9782
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, null, "\u91CD\u7F6E")))), /*#__PURE__*/React.createElement(Spin, {
9863
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
9864
+ onClick: onReset
9865
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
9783
9866
  spinning: loading
9784
9867
  }, /*#__PURE__*/React.createElement(Table, {
9785
9868
  rowSelection: rowSelection,
9786
9869
  columns: columns,
9787
- rowKey: 'numIid',
9788
- dataSource: searchParams.type == 'select' ? selectList : goodList,
9870
+ rowKey: 'skuCode',
9871
+ dataSource: goodList,
9789
9872
  scroll: {
9873
+ x: true,
9790
9874
  y: 300
9791
9875
  },
9792
9876
  pagination: {
9793
9877
  size: 'small',
9794
9878
  total: total,
9795
- current: searchParams.pageNo,
9796
- pageSize: searchParams.pageSize,
9879
+ current: pageNo,
9880
+ pageSize: pageSize,
9881
+ pageSizeOptions: [],
9797
9882
  onChange: pageChange
9798
9883
  }
9799
9884
  })));
@@ -9812,8 +9897,8 @@ var GoodItem = function GoodItem(props) {
9812
9897
  value = _props$value === void 0 ? [] : _props$value,
9813
9898
  onChange = props.onChange,
9814
9899
  disabled = props.disabled,
9815
- _props$showField = props.showField,
9816
- showField = _props$showField === void 0 ? [] : _props$showField,
9900
+ _props$showHeader = props.showHeader,
9901
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9817
9902
  width = props.width,
9818
9903
  _props$shopList = props.shopList,
9819
9904
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -9829,6 +9914,7 @@ var GoodItem = function GoodItem(props) {
9829
9914
  otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
9830
9915
  _props$canUpdateNumbe = props.canUpdateNumber,
9831
9916
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
9917
+ shopCode = props.shopCode,
9832
9918
  onSelect = props.onSelect,
9833
9919
  onDelete = props.onDelete;
9834
9920
  var refModal = useRef();
@@ -9858,6 +9944,18 @@ var GoodItem = function GoodItem(props) {
9858
9944
  var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
9859
9945
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
9860
9946
  return [{
9947
+ dataIndex: 'pic',
9948
+ title: "\u56FE\u7247",
9949
+ align: 'center',
9950
+ ellipsis: true,
9951
+ width: 100,
9952
+ render: function render(val) {
9953
+ return /*#__PURE__*/React.createElement(Image, {
9954
+ width: 60,
9955
+ src: val
9956
+ });
9957
+ }
9958
+ }, {
9861
9959
  dataIndex: 'name',
9862
9960
  title: "".concat(text, "\u540D\u79F0"),
9863
9961
  align: 'center',
@@ -9919,20 +10017,8 @@ var GoodItem = function GoodItem(props) {
9919
10017
  render: function render(val, record, index) {
9920
10018
  return /*#__PURE__*/React.createElement("span", null, index + 1);
9921
10019
  }
9922
- }, {
9923
- dataIndex: 'pic',
9924
- title: "\u56FE\u7247",
9925
- align: 'center',
9926
- ellipsis: true,
9927
- width: 100,
9928
- render: function render(val) {
9929
- return /*#__PURE__*/React.createElement(Image, {
9930
- width: 60,
9931
- src: val
9932
- });
9933
- }
9934
10020
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9935
- return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
10021
+ return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9936
10022
  })));
9937
10023
  if (!disabled) {
9938
10024
  columnList.push({
@@ -9952,20 +10038,21 @@ var GoodItem = function GoodItem(props) {
9952
10038
  });
9953
10039
  }
9954
10040
  return columnList;
9955
- }, [showField, value, disabled]);
10041
+ }, [showHeader, value, disabled]);
9956
10042
  var onSubmit = function onSubmit(list) {
9957
10043
  var newList = list.map(function (item) {
9958
- var picUrl = item.picUrl,
9959
- title = item.title,
9960
- price = item.price,
9961
- numIid = item.numIid;
10044
+ var goodsId = item.goodsId,
10045
+ name = item.name,
10046
+ code = item.code,
10047
+ skuCode = item.skuCode,
10048
+ marketPrice = item.marketPrice;
9962
10049
  return {
9963
- id: numIid,
9964
- pic: picUrl,
9965
- name: title,
9966
- code: '',
9967
- sku: '',
9968
- money: price,
10050
+ id: goodsId,
10051
+ pic: '',
10052
+ name: name,
10053
+ code: code,
10054
+ sku: skuCode,
10055
+ money: marketPrice || 0,
9969
10056
  share: '',
9970
10057
  number: 1,
9971
10058
  type: '',
@@ -9978,7 +10065,7 @@ var GoodItem = function GoodItem(props) {
9978
10065
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
9979
10066
  setSelectedRowKeys(newSelectedRowKeys);
9980
10067
  onSelect === null || onSelect === void 0 ? void 0 : onSelect(value.filter(function (t) {
9981
- return newSelectedRowKeys.includes(t.id);
10068
+ return newSelectedRowKeys.includes(t.sku);
9982
10069
  }));
9983
10070
  };
9984
10071
  var handleChangeGoods = function handleChangeGoods() {
@@ -10006,7 +10093,7 @@ var GoodItem = function GoodItem(props) {
10006
10093
  }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
10007
10094
  columns: newColumns,
10008
10095
  dataSource: value,
10009
- rowKey: 'id',
10096
+ rowKey: 'sku',
10010
10097
  size: "small",
10011
10098
  pagination: false,
10012
10099
  scroll: {
@@ -10021,13 +10108,15 @@ var GoodItem = function GoodItem(props) {
10021
10108
  width: width,
10022
10109
  shopList: shopList,
10023
10110
  shopId: shopId,
10024
- maxLength: maxLength
10111
+ maxLength: maxLength,
10112
+ shopCode: shopCode
10025
10113
  }));
10026
10114
  };
10027
10115
 
10028
10116
  var BsGoods = function BsGoods(props) {
10029
10117
  var value = props.value,
10030
- disabled = props.disabled;
10118
+ disabled = props.disabled,
10119
+ onChange = props.onChange;
10031
10120
  var _useState = useState(false),
10032
10121
  _useState2 = _slicedToArray(_useState, 2),
10033
10122
  tableSelect = _useState2[0],
@@ -10043,17 +10132,19 @@ var BsGoods = function BsGoods(props) {
10043
10132
  var reissueRef = useRef();
10044
10133
  useEffect(function () {
10045
10134
  ref.current = pubsub.subscribeOnce('type', function (type, val) {
10046
- console.log('goods', type, val, value);
10135
+ var _value$bsGoods;
10136
+ console.log(value);
10047
10137
  if (disabled) return;
10048
10138
  setWithInfo({
10049
10139
  type: type,
10050
10140
  val: val
10051
10141
  });
10052
10142
  setTableSelect(['2', '4'].includes(val));
10053
- if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10143
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods = value.bsGoods) === null || _value$bsGoods === void 0 ? void 0 : _value$bsGoods.length)) {
10144
+ var newGoods = cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
10054
10145
  pubsub.publish('selectList', {
10055
10146
  type: val,
10056
- list: _toConsumableArray(value).map(function (item) {
10147
+ list: (newGoods || []).map(function (item) {
10057
10148
  item.canDelete = false;
10058
10149
  return item;
10059
10150
  })
@@ -10062,17 +10153,18 @@ var BsGoods = function BsGoods(props) {
10062
10153
  });
10063
10154
  //补发
10064
10155
  reissueRef.current = pubsub.subscribeOnce('reissueType', function (type, val) {
10156
+ var _value$bsGoods2;
10065
10157
  if (disabled) return;
10066
- console.log('reissueType', type, val, value);
10067
10158
  setWithInfo({
10068
10159
  type: type,
10069
10160
  val: val
10070
10161
  });
10071
10162
  setTableSelect(['2', '4'].includes(val));
10072
- if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : value.length)) {
10163
+ if (['1', '3'].includes(val) && (value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.length)) {
10164
+ var newGoods = cloneDeep(value === null || value === void 0 ? void 0 : value.bsGoods);
10073
10165
  pubsub.publish('reissueSelectList', {
10074
10166
  type: val,
10075
- list: (value || []).map(function (item) {
10167
+ list: (newGoods || []).map(function (item) {
10076
10168
  item.canDelete = false;
10077
10169
  return item;
10078
10170
  })
@@ -10097,20 +10189,30 @@ var BsGoods = function BsGoods(props) {
10097
10189
  });
10098
10190
  }, [withInfo]);
10099
10191
  var _onDelete = function onDelete(item) {
10100
- var deleteId = item === null || item === void 0 ? void 0 : item.id;
10192
+ var deleteId = item === null || item === void 0 ? void 0 : item.sku;
10101
10193
  pubsub.publish('deleteGood', deleteId);
10102
10194
  pubsub.publish('reissueDeleteGood', deleteId);
10103
10195
  };
10196
+ var changeHandle = function changeHandle(list) {
10197
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10198
+ bsGoods: list
10199
+ }));
10200
+ };
10104
10201
  return /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10105
- key: 'bsGoods',
10106
- disabled: disabled
10202
+ key: 'bsGoods'
10107
10203
  }, props), {}, {
10204
+ disabled: disabled,
10205
+ value: value === null || value === void 0 ? void 0 : value.bsGoods,
10206
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10108
10207
  tableSelect: tableSelect,
10109
10208
  onSelect: function onSelect(list) {
10110
10209
  return _onSelect(list);
10111
10210
  },
10112
10211
  onDelete: function onDelete(item) {
10113
10212
  return _onDelete(item);
10213
+ },
10214
+ onChange: function onChange(val) {
10215
+ return changeHandle(val);
10114
10216
  }
10115
10217
  }));
10116
10218
  };
@@ -10125,16 +10227,6 @@ var BsExchange = function BsExchange(props) {
10125
10227
  disabled = props.disabled,
10126
10228
  other = _objectWithoutProperties(props, _excluded$b);
10127
10229
  useEffect(function () {
10128
- pubsub.subscribeOnce('selectList', function (_, data) {
10129
- if (disabled) return;
10130
- if (value) {
10131
- var newData = cloneDeep(data);
10132
- console.log('BsExchange', 'getListHandle', data, value, getListHandle(_toConsumableArray(newData.list), value));
10133
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10134
- bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), value)
10135
- }));
10136
- }
10137
- });
10138
10230
  pubsub.subscribeOnce('deleteGood', function (_, data) {
10139
10231
  if (disabled) return;
10140
10232
  if (value) {
@@ -10143,13 +10235,13 @@ var BsExchange = function BsExchange(props) {
10143
10235
  if (['2', '4'].includes((_value$bsExchangeType = value.bsExchangeType) === null || _value$bsExchangeType === void 0 ? void 0 : _value$bsExchangeType[0])) {
10144
10236
  newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.map(function (item) {
10145
10237
  item.bsExchangeReturnGoods = item.bsExchangeReturnGoods.filter(function (t) {
10146
- return t.id !== data;
10238
+ return t.sku !== data;
10147
10239
  });
10148
10240
  return item;
10149
10241
  });
10150
10242
  } else if (['1', '3'].includes((_value$bsExchangeType2 = value.bsExchangeType) === null || _value$bsExchangeType2 === void 0 ? void 0 : _value$bsExchangeType2[0])) {
10151
10243
  newValue.bsExchangeReturnGoods = newValue.bsExchangeReturnGoods.filter(function (item) {
10152
- return item.id !== data;
10244
+ return item.sku !== data;
10153
10245
  });
10154
10246
  }
10155
10247
  onChange(newValue);
@@ -10157,11 +10249,10 @@ var BsExchange = function BsExchange(props) {
10157
10249
  });
10158
10250
  }, [value]);
10159
10251
  var getListHandle = function getListHandle(list, val) {
10160
- var _val$bsExchangeType;
10252
+ var _val$bsExchangeType, _val$bsExchangeType2;
10161
10253
  //如果是原单换
10162
10254
  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])) {
10163
10255
  return list.reduce(function (prv, next) {
10164
- var _val$bsExchangeType2;
10165
10256
  next.canDelete = false;
10166
10257
  //数量大于1 拆开
10167
10258
  if (next.number > 1) {
@@ -10170,12 +10261,12 @@ var BsExchange = function BsExchange(props) {
10170
10261
  return t;
10171
10262
  });
10172
10263
  prv.push.apply(prv, _toConsumableArray(newList));
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])) {
10264
+ } else {
10174
10265
  prv.push(_objectSpread2({}, next));
10175
10266
  }
10176
10267
  return prv;
10177
10268
  }, []);
10178
- } else {
10269
+ } 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])) {
10179
10270
  //补发换货
10180
10271
  return list.reduce(function (prv, next, index) {
10181
10272
  next.canDelete = true;
@@ -10207,9 +10298,24 @@ var BsExchange = function BsExchange(props) {
10207
10298
  newValue.bsExchangeGiftGoods = [];
10208
10299
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10209
10300
  pubsub.publish('type', val[0]);
10301
+ pubsub.subscribe('selectList', function (_, data) {
10302
+ if (disabled) return;
10303
+ if (newValue) {
10304
+ var newData = cloneDeep(data);
10305
+ onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
10306
+ bsExchangeReturnGoods: getListHandle(_toConsumableArray(newData.list), newValue)
10307
+ }));
10308
+ }
10309
+ });
10210
10310
  };
10211
10311
  var changeHandle = function changeHandle(val, key) {
10212
10312
  var newValue = _objectSpread2({}, value);
10313
+ if (key === 'bsExchangeGiftGoods') {
10314
+ val = cloneDeep(val).map(function (t) {
10315
+ t.money = 0;
10316
+ return t;
10317
+ });
10318
+ }
10213
10319
  newValue[key] = val;
10214
10320
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10215
10321
  if (key === 'bsExchangeType') {
@@ -10267,15 +10373,22 @@ var BsExchange = function BsExchange(props) {
10267
10373
  disabled: disabled,
10268
10374
  showChangeBtn: false,
10269
10375
  value: value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods,
10376
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10270
10377
  onChange: function onChange(val) {
10271
10378
  return changeHandle(val, 'bsExchangeReturnGoods');
10272
10379
  }
10273
10380
  })) : /*#__PURE__*/React.createElement(React.Fragment, null, ((value === null || value === void 0 ? void 0 : value.bsExchangeReturnGoods) || []).map(function (item, index) {
10274
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10381
+ return /*#__PURE__*/React.createElement("div", {
10382
+ style: {
10383
+ border: '1px dashed',
10384
+ marginBottom: '8px'
10385
+ }
10386
+ }, /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1"), /*#__PURE__*/React.createElement(GoodItem, _objectSpread2(_objectSpread2({
10275
10387
  key: 'bsReturnGoods'
10276
10388
  }, other), {}, {
10277
10389
  disabled: disabled,
10278
10390
  showChangeBtn: showChangeBtn,
10391
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10279
10392
  value: item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods,
10280
10393
  onChange: function onChange(val) {
10281
10394
  return changeReturnHandle(val, index, 'bsExchangeReturnGoods');
@@ -10287,6 +10400,7 @@ var BsExchange = function BsExchange(props) {
10287
10400
  showChangeBtn: showChangeBtn,
10288
10401
  otherOperations: copyGoods(index),
10289
10402
  value: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
10403
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10290
10404
  onChange: function onChange(val) {
10291
10405
  return changeReturnHandle(val, index, 'bsExchangeSwapOutGoods');
10292
10406
  }
@@ -10294,7 +10408,8 @@ var BsExchange = function BsExchange(props) {
10294
10408
  })), ['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({
10295
10409
  headerText: "\u8D60\u54C1",
10296
10410
  key: 'bsGiftGoods',
10297
- disabled: disabled
10411
+ disabled: disabled,
10412
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode
10298
10413
  }, other), {}, {
10299
10414
  value: value === null || value === void 0 ? void 0 : value.bsExchangeGiftGoods,
10300
10415
  onChange: function onChange(val) {
@@ -10312,26 +10427,12 @@ var BsReissue = function BsReissue(props) {
10312
10427
  disabled = props.disabled,
10313
10428
  other = _objectWithoutProperties(props, _excluded$c);
10314
10429
  useEffect(function () {
10315
- pubsub.subscribeOnce('reissueSelectList', function (_, data) {
10316
- if (disabled) return;
10317
- console.log(data, value);
10318
- if (value) {
10319
- var newData = cloneDeep(data);
10320
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
10321
- bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
10322
- item.money = 0;
10323
- item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
10324
- return item;
10325
- })
10326
- }));
10327
- }
10328
- });
10329
10430
  pubsub.subscribeOnce('reissueDeleteGood', function (_, data) {
10330
10431
  if (disabled) return;
10331
10432
  if (value) {
10332
10433
  var newValue = _objectSpread2({}, value);
10333
10434
  newValue.bsReissueGoods = newValue.bsReissueGoods.filter(function (item) {
10334
- return item.id !== data;
10435
+ return item.sku !== data;
10335
10436
  });
10336
10437
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10337
10438
  }
@@ -10352,6 +10453,19 @@ var BsReissue = function BsReissue(props) {
10352
10453
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
10353
10454
  if (key === 'bsReissueType') {
10354
10455
  pubsub.publish('reissueType', val[0]);
10456
+ pubsub.subscribe('reissueSelectList', function (_, data) {
10457
+ if (disabled) return;
10458
+ if (value) {
10459
+ var newData = cloneDeep(data);
10460
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, newValue), {}, {
10461
+ bsReissueGoods: ((newData === null || newData === void 0 ? void 0 : newData.list) || []).map(function (item) {
10462
+ item.money = 0;
10463
+ item.canUpdateNumber = ['2', '4'].includes(newData === null || newData === void 0 ? void 0 : newData.type);
10464
+ return item;
10465
+ })
10466
+ }));
10467
+ }
10468
+ });
10355
10469
  }
10356
10470
  };
10357
10471
  //显示选择商品按钮 原单换不显示选择商品
@@ -10376,6 +10490,7 @@ var BsReissue = function BsReissue(props) {
10376
10490
  disabled: disabled,
10377
10491
  canUpdateNumber: showChangeBtn,
10378
10492
  showChangeBtn: showChangeBtn,
10493
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
10379
10494
  value: value === null || value === void 0 ? void 0 : value.bsReissueGoods,
10380
10495
  onChange: function onChange(val) {
10381
10496
  return changeHandle(val, 'bsReissueGoods');
@@ -10386,7 +10501,7 @@ var BsReissue = function BsReissue(props) {
10386
10501
  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";
10387
10502
  styleInject(css_248z$9);
10388
10503
 
10389
- var TabPane$2 = Tabs.TabPane;
10504
+ var TabPane$1 = Tabs.TabPane;
10390
10505
  var Option$2 = Select.Option;
10391
10506
  var Search$1 = Input.Search;
10392
10507
  var GoodsModal$3 = function GoodsModal(props) {
@@ -10702,7 +10817,7 @@ var GoodsModal$3 = function GoodsModal(props) {
10702
10817
  }));
10703
10818
  }
10704
10819
  }, tabs.map(function (tab) {
10705
- return /*#__PURE__*/React.createElement(TabPane$2, {
10820
+ return /*#__PURE__*/React.createElement(TabPane$1, {
10706
10821
  tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
10707
10822
  key: tab.key
10708
10823
  });