@kmkf-fe-packages/basic-components 0.7.15-alpha.28 → 0.7.15-alpha.31

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
@@ -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();
@@ -8947,51 +8948,44 @@ var Payment = function Payment(props) {
8947
8948
  name: 'enterprisePaymentTid',
8948
8949
  placeholder: '请输入订单编号',
8949
8950
  required: required,
8950
- show: true,
8951
- hidden: true
8951
+ show: true
8952
8952
  }, {
8953
8953
  label: '打款金额',
8954
8954
  name: 'enterprisePaymentRefundFee',
8955
8955
  placeholder: '请输入打款金额',
8956
8956
  required: required,
8957
- show: true,
8958
- hidden: true
8957
+ show: true
8959
8958
  }, {
8960
8959
  label: '买家昵称',
8961
8960
  name: 'enterprisePaymentBuyerNick',
8962
8961
  placeholder: '请输入买家昵称',
8963
8962
  required: false,
8964
- show: true,
8965
- hidden: true
8963
+ show: true
8966
8964
  }, {
8967
8965
  label: '支付宝名称',
8968
8966
  name: 'enterprisePaymentAlipayNick',
8969
8967
  placeholder: '请输入支付宝名称',
8970
8968
  required: zhiFubaoRequired,
8971
- show: true,
8972
- hidden: true
8969
+ show: true
8973
8970
  }, {
8974
8971
  label: '支付宝账号',
8975
8972
  name: 'enterprisePaymentAlipayNo',
8976
8973
  placeholder: '请输入支付宝账号',
8977
8974
  required: zhiFubaoRequired,
8978
- show: true,
8979
- hidden: true
8975
+ show: true
8980
8976
  }, {
8981
8977
  label: '打款状态',
8982
8978
  name: 'enterprisePaymentStatus',
8983
8979
  placeholder: '',
8984
8980
  required: false,
8985
- show: true,
8986
- hidden: true
8981
+ show: true
8987
8982
  }];
8988
8983
  return /*#__PURE__*/React.createElement(React.Fragment, null, PaymentList.map(function (item) {
8989
8984
  return item.show && /*#__PURE__*/React.createElement(Form.Item, {
8990
8985
  label: item.label,
8991
8986
  name: [id, item.name],
8992
8987
  key: item.name,
8993
- required: item.required,
8994
- hidden: item.hidden
8988
+ required: item.required
8995
8989
  }, /*#__PURE__*/React.createElement(Input, {
8996
8990
  disabled: disabled,
8997
8991
  placeholder: item.placeholder,
@@ -9358,6 +9352,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9358
9352
  }
9359
9353
  });
9360
9354
  } catch (err) {
9355
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9356
+ trajectorySnapshot: '',
9357
+ trajectoryCompany: newCompany
9358
+ }));
9361
9359
  (err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
9362
9360
  }
9363
9361
  };
@@ -9396,6 +9394,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9396
9394
  //sf手机号
9397
9395
  var LogisticsPhone = function LogisticsPhone() {
9398
9396
  return /*#__PURE__*/React.createElement(Input, {
9397
+ disabled: disabled,
9399
9398
  style: {
9400
9399
  marginTop: '8px'
9401
9400
  },
@@ -9487,7 +9486,7 @@ var jstGoods = function jstGoods(props) {
9487
9486
  return setChangeIndex(index);
9488
9487
  }
9489
9488
  }, "\u5305\u88F9".concat(index + 1)));
9490
- }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
9489
+ }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(Select, {
9491
9490
  disabled: disabled,
9492
9491
  placeholder: "\u7269\u6D41\u516C\u53F8",
9493
9492
  onChange: function onChange(val) {
@@ -9502,14 +9501,14 @@ var jstGoods = function jstGoods(props) {
9502
9501
  style: {
9503
9502
  minWidth: '100px'
9504
9503
  }
9505
- }), /*#__PURE__*/React.createElement(Input, {
9504
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
9506
9505
  disabled: disabled,
9507
9506
  placeholder: "\u7269\u6D41\u5355\u53F7",
9508
9507
  onChange: function onChange(e) {
9509
9508
  return changeInputHandle(e.target.value, 'logisticsCode');
9510
9509
  },
9511
9510
  value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
9512
- })) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
9511
+ }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
9513
9512
  disabled: disabled,
9514
9513
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
9515
9514
  onChange: function onChange(e) {
@@ -9699,21 +9698,15 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9699
9698
  _useState18 = _slicedToArray(_useState17, 2),
9700
9699
  shopInfo = _useState18[0],
9701
9700
  setShopInfo = _useState18[1]; //店铺信息
9702
- var _useState19 = useState([{
9703
- tab: '所选商品',
9704
- key: 'onSale'
9705
- }
9706
- // { tab: '已选商品', key: 'select' },
9707
- ]),
9708
- _useState20 = _slicedToArray(_useState19, 1),
9709
- tabs = _useState20[0];
9701
+ var _Form$useForm = Form.useForm(),
9702
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9703
+ form = _Form$useForm2[0];
9710
9704
  //选择页码
9711
9705
  var pageChange = function pageChange(page, pageSize) {
9712
9706
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9713
9707
  pageNo: page,
9714
9708
  pageSize: pageSize
9715
9709
  }));
9716
- queryItems();
9717
9710
  };
9718
9711
  /**
9719
9712
  *
@@ -9737,53 +9730,48 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9737
9730
  /**
9738
9731
  * 查询商品
9739
9732
  */
9740
- var queryItems = /*#__PURE__*/function () {
9741
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9742
- var params, res, _ref2, list, _total, nextKey, newList;
9743
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9744
- while (1) switch (_context.prev = _context.next) {
9745
- case 0:
9746
- _context.prev = 0;
9747
- setLoading(true);
9748
- params = _objectSpread2({}, queryPd());
9749
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9750
- params.platform = platform;
9751
- params.status = params.type === 'onSale' ? 1 : 0;
9752
- delete params.type;
9753
- _context.next = 9;
9754
- return extendRequest('/qy/gdfw/product/listProduct', {
9755
- method: 'post',
9756
- data: params
9757
- });
9758
- case 9:
9759
- res = _context.sent;
9760
- _ref2 = res.data || {
9761
- result: [],
9762
- total: 0
9763
- }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9764
- newList = list || [];
9765
- newList.forEach(function (item) {
9766
- item.numIid = item.productId;
9767
- item.outerId = item.outId;
9768
- item.title = item.productName;
9769
- item.platform = platform;
9770
- });
9771
- setGoodList(newList);
9772
- setTotal(_total);
9773
- case 15:
9774
- _context.prev = 15;
9775
- setLoading(false);
9776
- return _context.finish(15);
9777
- case 18:
9778
- case "end":
9779
- return _context.stop();
9780
- }
9781
- }, _callee, null, [[0,, 15, 18]]);
9782
- }));
9783
- return function queryItems() {
9784
- return _ref.apply(this, arguments);
9785
- };
9786
- }();
9733
+ var queryItems = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9734
+ var params, res, _ref2, list, _total, nextKey, newList;
9735
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9736
+ while (1) switch (_context.prev = _context.next) {
9737
+ case 0:
9738
+ _context.prev = 0;
9739
+ setLoading(true);
9740
+ params = _objectSpread2({}, queryPd());
9741
+ params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9742
+ params.platform = platform;
9743
+ params.status = params.type === 'onSale' ? 1 : 0;
9744
+ delete params.type;
9745
+ _context.next = 9;
9746
+ return extendRequest('/qy/gdfw/product/listProduct', {
9747
+ method: 'post',
9748
+ data: params
9749
+ });
9750
+ case 9:
9751
+ res = _context.sent;
9752
+ _ref2 = res.data || {
9753
+ result: [],
9754
+ total: 0
9755
+ }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9756
+ newList = list || [];
9757
+ newList.forEach(function (item) {
9758
+ item.numIid = item.productId;
9759
+ item.outerId = item.outId;
9760
+ item.title = item.productName;
9761
+ item.platform = platform;
9762
+ });
9763
+ setGoodList(newList);
9764
+ setTotal(_total);
9765
+ case 15:
9766
+ _context.prev = 15;
9767
+ setLoading(false);
9768
+ return _context.finish(15);
9769
+ case 18:
9770
+ case "end":
9771
+ return _context.stop();
9772
+ }
9773
+ }, _callee, null, [[0,, 15, 18]]);
9774
+ })), [searchParams]);
9787
9775
  useEffect(function () {
9788
9776
  var shopInfo = shopList.find(function (item) {
9789
9777
  return shopId === item.shopId || shopId === item.shopName;
@@ -9807,6 +9795,13 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9807
9795
  onSubmit(selectList);
9808
9796
  _onCancel();
9809
9797
  };
9798
+ var onFinish = function onFinish(value) {
9799
+ setSearch(_objectSpread2({}, searchParams));
9800
+ };
9801
+ var onReset = function onReset() {
9802
+ setSearch(_objectSpread2({}, searchParams));
9803
+ form.resetFields();
9804
+ };
9810
9805
  return /*#__PURE__*/React.createElement(Modal, {
9811
9806
  title: '选择商品',
9812
9807
  okText: '确认',
@@ -9819,17 +9814,27 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9819
9814
  onOk: onOk,
9820
9815
  wrapClassName: "goodModal"
9821
9816
  }, /*#__PURE__*/React.createElement(Form, {
9822
- layout: "inline"
9823
- }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9817
+ layout: "inline",
9818
+ form: form,
9819
+ onFinish: onFinish
9820
+ }, /*#__PURE__*/React.createElement(Form.Item, {
9821
+ name: "code"
9822
+ }, /*#__PURE__*/React.createElement(Input, {
9824
9823
  placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9825
- })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9824
+ })), /*#__PURE__*/React.createElement(Form.Item, {
9825
+ name: "sku"
9826
+ }, /*#__PURE__*/React.createElement(Input, {
9826
9827
  placeholder: "\u5546\u54C1\u7F16\u7801"
9827
- })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9828
+ })), /*#__PURE__*/React.createElement(Form.Item, {
9829
+ name: "name"
9830
+ }, /*#__PURE__*/React.createElement(Input, {
9828
9831
  placeholder: "\u5546\u54C1\u540D\u79F0"
9829
9832
  })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
9830
9833
  type: "primary",
9831
9834
  htmlType: "submit"
9832
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, null, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
9835
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
9836
+ onClick: onReset
9837
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
9833
9838
  spinning: loading
9834
9839
  }, /*#__PURE__*/React.createElement(Table, {
9835
9840
  rowSelection: rowSelection,
@@ -9862,8 +9867,8 @@ var GoodItem = function GoodItem(props) {
9862
9867
  value = _props$value === void 0 ? [] : _props$value,
9863
9868
  onChange = props.onChange,
9864
9869
  disabled = props.disabled,
9865
- _props$showField = props.showField,
9866
- showField = _props$showField === void 0 ? [] : _props$showField,
9870
+ _props$showHeader = props.showHeader,
9871
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9867
9872
  width = props.width,
9868
9873
  _props$shopList = props.shopList,
9869
9874
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -9982,7 +9987,7 @@ var GoodItem = function GoodItem(props) {
9982
9987
  return /*#__PURE__*/React.createElement("span", null, index + 1);
9983
9988
  }
9984
9989
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9985
- return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9990
+ return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9986
9991
  })));
9987
9992
  if (!disabled) {
9988
9993
  columnList.push({
@@ -10002,7 +10007,7 @@ var GoodItem = function GoodItem(props) {
10002
10007
  });
10003
10008
  }
10004
10009
  return columnList;
10005
- }, [showField, value, disabled]);
10010
+ }, [showHeader, value, disabled]);
10006
10011
  var onSubmit = function onSubmit(list) {
10007
10012
  var newList = list.map(function (item) {
10008
10013
  var picUrl = item.picUrl,
package/dist/index.js CHANGED
@@ -7163,7 +7163,8 @@ function ApaasRate(props) {
7163
7163
  var address = kmkfUtils.AddressData.getInstance();
7164
7164
  var bsAddress = kmkfUtils.BsAddressData.getInstance();
7165
7165
  var Province = function Province(props) {
7166
- var type = props.type;
7166
+ var _props$type = props.type,
7167
+ type = _props$type === void 0 ? 'workOrder' : _props$type;
7167
7168
  var _useState = React.useState([]),
7168
7169
  _useState2 = _slicedToArray(_useState, 2),
7169
7170
  option = _useState2[0],
@@ -7174,7 +7175,7 @@ var Province = function Province(props) {
7174
7175
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7175
7176
  while (1) switch (_context.prev = _context.next) {
7176
7177
  case 0:
7177
- setOptions(type === 'workOrder' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7178
+ setOptions(type !== 'bs' ? address.addressOptions || [] : bsAddress.addressOptions || []);
7178
7179
  case 1:
7179
7180
  case "end":
7180
7181
  return _context.stop();
@@ -8958,51 +8959,44 @@ var Payment = function Payment(props) {
8958
8959
  name: 'enterprisePaymentTid',
8959
8960
  placeholder: '请输入订单编号',
8960
8961
  required: required,
8961
- show: true,
8962
- hidden: true
8962
+ show: true
8963
8963
  }, {
8964
8964
  label: '打款金额',
8965
8965
  name: 'enterprisePaymentRefundFee',
8966
8966
  placeholder: '请输入打款金额',
8967
8967
  required: required,
8968
- show: true,
8969
- hidden: true
8968
+ show: true
8970
8969
  }, {
8971
8970
  label: '买家昵称',
8972
8971
  name: 'enterprisePaymentBuyerNick',
8973
8972
  placeholder: '请输入买家昵称',
8974
8973
  required: false,
8975
- show: true,
8976
- hidden: true
8974
+ show: true
8977
8975
  }, {
8978
8976
  label: '支付宝名称',
8979
8977
  name: 'enterprisePaymentAlipayNick',
8980
8978
  placeholder: '请输入支付宝名称',
8981
8979
  required: zhiFubaoRequired,
8982
- show: true,
8983
- hidden: true
8980
+ show: true
8984
8981
  }, {
8985
8982
  label: '支付宝账号',
8986
8983
  name: 'enterprisePaymentAlipayNo',
8987
8984
  placeholder: '请输入支付宝账号',
8988
8985
  required: zhiFubaoRequired,
8989
- show: true,
8990
- hidden: true
8986
+ show: true
8991
8987
  }, {
8992
8988
  label: '打款状态',
8993
8989
  name: 'enterprisePaymentStatus',
8994
8990
  placeholder: '',
8995
8991
  required: false,
8996
- show: true,
8997
- hidden: true
8992
+ show: true
8998
8993
  }];
8999
8994
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, PaymentList.map(function (item) {
9000
8995
  return item.show && /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9001
8996
  label: item.label,
9002
8997
  name: [id, item.name],
9003
8998
  key: item.name,
9004
- required: item.required,
9005
- hidden: item.hidden
8999
+ required: item.required
9006
9000
  }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9007
9001
  disabled: disabled,
9008
9002
  placeholder: item.placeholder,
@@ -9369,6 +9363,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9369
9363
  }
9370
9364
  });
9371
9365
  } catch (err) {
9366
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
9367
+ trajectorySnapshot: '',
9368
+ trajectoryCompany: newCompany
9369
+ }));
9372
9370
  (err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
9373
9371
  }
9374
9372
  };
@@ -9407,6 +9405,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9407
9405
  //sf手机号
9408
9406
  var LogisticsPhone = function LogisticsPhone() {
9409
9407
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9408
+ disabled: disabled,
9410
9409
  style: {
9411
9410
  marginTop: '8px'
9412
9411
  },
@@ -9498,7 +9497,7 @@ var jstGoods = function jstGoods(props) {
9498
9497
  return setChangeIndex(index);
9499
9498
  }
9500
9499
  }, "\u5305\u88F9".concat(index + 1)));
9501
- }))) : 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, {
9500
+ }))) : 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, {
9502
9501
  disabled: disabled,
9503
9502
  placeholder: "\u7269\u6D41\u516C\u53F8",
9504
9503
  onChange: function onChange(val) {
@@ -9513,14 +9512,14 @@ var jstGoods = function jstGoods(props) {
9513
9512
  style: {
9514
9513
  minWidth: '100px'
9515
9514
  }
9516
- }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9515
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9517
9516
  disabled: disabled,
9518
9517
  placeholder: "\u7269\u6D41\u5355\u53F7",
9519
9518
  onChange: function onChange(e) {
9520
9519
  return changeInputHandle(e.target.value, 'logisticsCode');
9521
9520
  },
9522
9521
  value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
9523
- })) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9522
+ }) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9524
9523
  disabled: disabled,
9525
9524
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
9526
9525
  onChange: function onChange(e) {
@@ -9710,21 +9709,15 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9710
9709
  _useState18 = _slicedToArray(_useState17, 2),
9711
9710
  shopInfo = _useState18[0],
9712
9711
  setShopInfo = _useState18[1]; //店铺信息
9713
- var _useState19 = React.useState([{
9714
- tab: '所选商品',
9715
- key: 'onSale'
9716
- }
9717
- // { tab: '已选商品', key: 'select' },
9718
- ]),
9719
- _useState20 = _slicedToArray(_useState19, 1),
9720
- tabs = _useState20[0];
9712
+ var _Form$useForm = antd.Form.useForm(),
9713
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9714
+ form = _Form$useForm2[0];
9721
9715
  //选择页码
9722
9716
  var pageChange = function pageChange(page, pageSize) {
9723
9717
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9724
9718
  pageNo: page,
9725
9719
  pageSize: pageSize
9726
9720
  }));
9727
- queryItems();
9728
9721
  };
9729
9722
  /**
9730
9723
  *
@@ -9748,53 +9741,48 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9748
9741
  /**
9749
9742
  * 查询商品
9750
9743
  */
9751
- var queryItems = /*#__PURE__*/function () {
9752
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9753
- var params, res, _ref2, list, _total, nextKey, newList;
9754
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9755
- while (1) switch (_context.prev = _context.next) {
9756
- case 0:
9757
- _context.prev = 0;
9758
- setLoading(true);
9759
- params = _objectSpread2({}, queryPd());
9760
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9761
- params.platform = platform;
9762
- params.status = params.type === 'onSale' ? 1 : 0;
9763
- delete params.type;
9764
- _context.next = 9;
9765
- return extendRequest('/qy/gdfw/product/listProduct', {
9766
- method: 'post',
9767
- data: params
9768
- });
9769
- case 9:
9770
- res = _context.sent;
9771
- _ref2 = res.data || {
9772
- result: [],
9773
- total: 0
9774
- }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9775
- newList = list || [];
9776
- newList.forEach(function (item) {
9777
- item.numIid = item.productId;
9778
- item.outerId = item.outId;
9779
- item.title = item.productName;
9780
- item.platform = platform;
9781
- });
9782
- setGoodList(newList);
9783
- setTotal(_total);
9784
- case 15:
9785
- _context.prev = 15;
9786
- setLoading(false);
9787
- return _context.finish(15);
9788
- case 18:
9789
- case "end":
9790
- return _context.stop();
9791
- }
9792
- }, _callee, null, [[0,, 15, 18]]);
9793
- }));
9794
- return function queryItems() {
9795
- return _ref.apply(this, arguments);
9796
- };
9797
- }();
9744
+ var queryItems = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9745
+ var params, res, _ref2, list, _total, nextKey, newList;
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 = _objectSpread2({}, queryPd());
9752
+ params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9753
+ params.platform = platform;
9754
+ params.status = params.type === 'onSale' ? 1 : 0;
9755
+ delete params.type;
9756
+ _context.next = 9;
9757
+ return extendRequest('/qy/gdfw/product/listProduct', {
9758
+ method: 'post',
9759
+ data: params
9760
+ });
9761
+ case 9:
9762
+ res = _context.sent;
9763
+ _ref2 = res.data || {
9764
+ result: [],
9765
+ total: 0
9766
+ }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9767
+ newList = list || [];
9768
+ newList.forEach(function (item) {
9769
+ item.numIid = item.productId;
9770
+ item.outerId = item.outId;
9771
+ item.title = item.productName;
9772
+ item.platform = platform;
9773
+ });
9774
+ setGoodList(newList);
9775
+ setTotal(_total);
9776
+ case 15:
9777
+ _context.prev = 15;
9778
+ setLoading(false);
9779
+ return _context.finish(15);
9780
+ case 18:
9781
+ case "end":
9782
+ return _context.stop();
9783
+ }
9784
+ }, _callee, null, [[0,, 15, 18]]);
9785
+ })), [searchParams]);
9798
9786
  React.useEffect(function () {
9799
9787
  var shopInfo = shopList.find(function (item) {
9800
9788
  return shopId === item.shopId || shopId === item.shopName;
@@ -9818,6 +9806,13 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9818
9806
  onSubmit(selectList);
9819
9807
  _onCancel();
9820
9808
  };
9809
+ var onFinish = function onFinish(value) {
9810
+ setSearch(_objectSpread2({}, searchParams));
9811
+ };
9812
+ var onReset = function onReset() {
9813
+ setSearch(_objectSpread2({}, searchParams));
9814
+ form.resetFields();
9815
+ };
9821
9816
  return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
9822
9817
  title: '选择商品',
9823
9818
  okText: '确认',
@@ -9830,17 +9825,27 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9830
9825
  onOk: onOk,
9831
9826
  wrapClassName: "goodModal"
9832
9827
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
9833
- layout: "inline"
9834
- }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9828
+ layout: "inline",
9829
+ form: form,
9830
+ onFinish: onFinish
9831
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9832
+ name: "code"
9833
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9835
9834
  placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9836
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9835
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9836
+ name: "sku"
9837
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9837
9838
  placeholder: "\u5546\u54C1\u7F16\u7801"
9838
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9839
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9840
+ name: "name"
9841
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9839
9842
  placeholder: "\u5546\u54C1\u540D\u79F0"
9840
9843
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9841
9844
  type: "primary",
9842
9845
  htmlType: "submit"
9843
- }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9846
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9847
+ onClick: onReset
9848
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9844
9849
  spinning: loading
9845
9850
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
9846
9851
  rowSelection: rowSelection,
@@ -9873,8 +9878,8 @@ var GoodItem = function GoodItem(props) {
9873
9878
  value = _props$value === void 0 ? [] : _props$value,
9874
9879
  onChange = props.onChange,
9875
9880
  disabled = props.disabled,
9876
- _props$showField = props.showField,
9877
- showField = _props$showField === void 0 ? [] : _props$showField,
9881
+ _props$showHeader = props.showHeader,
9882
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9878
9883
  width = props.width,
9879
9884
  _props$shopList = props.shopList,
9880
9885
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -9993,7 +9998,7 @@ var GoodItem = function GoodItem(props) {
9993
9998
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
9994
9999
  }
9995
10000
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9996
- return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
10001
+ return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9997
10002
  })));
9998
10003
  if (!disabled) {
9999
10004
  columnList.push({
@@ -10013,7 +10018,7 @@ var GoodItem = function GoodItem(props) {
10013
10018
  });
10014
10019
  }
10015
10020
  return columnList;
10016
- }, [showField, value, disabled]);
10021
+ }, [showHeader, value, disabled]);
10017
10022
  var onSubmit = function onSubmit(list) {
10018
10023
  var newList = list.map(function (item) {
10019
10024
  var picUrl = item.picUrl,
@@ -4,7 +4,7 @@ interface BsGoodsProps {
4
4
  type: number;
5
5
  options: any[];
6
6
  disabled: boolean;
7
- showField: string[];
7
+ showHeader: string[];
8
8
  width: number;
9
9
  shopList: any[];
10
10
  shopId: string | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.7.15-alpha.28",
3
+ "version": "0.7.15-alpha.31",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.27",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.31",
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "umi-request": "^1.4.0"
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "22184ba541f26bbefc6cfa405b5dcd6983a3fd0c"
61
+ "gitHead": "30b72a10645bafc21728ce18aa10a438b1c1d808"
62
62
  }