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

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
@@ -9396,7 +9396,6 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9396
9396
  //sf手机号
9397
9397
  var LogisticsPhone = function LogisticsPhone() {
9398
9398
  return /*#__PURE__*/React.createElement(Input, {
9399
- disabled: disabled,
9400
9399
  style: {
9401
9400
  marginTop: '8px'
9402
9401
  },
@@ -9700,15 +9699,21 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9700
9699
  _useState18 = _slicedToArray(_useState17, 2),
9701
9700
  shopInfo = _useState18[0],
9702
9701
  setShopInfo = _useState18[1]; //店铺信息
9703
- var _Form$useForm = Form.useForm(),
9704
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9705
- form = _Form$useForm2[0];
9702
+ var _useState19 = useState([{
9703
+ tab: '所选商品',
9704
+ key: 'onSale'
9705
+ }
9706
+ // { tab: '已选商品', key: 'select' },
9707
+ ]),
9708
+ _useState20 = _slicedToArray(_useState19, 1),
9709
+ tabs = _useState20[0];
9706
9710
  //选择页码
9707
9711
  var pageChange = function pageChange(page, pageSize) {
9708
9712
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9709
9713
  pageNo: page,
9710
9714
  pageSize: pageSize
9711
9715
  }));
9716
+ queryItems();
9712
9717
  };
9713
9718
  /**
9714
9719
  *
@@ -9732,48 +9737,53 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9732
9737
  /**
9733
9738
  * 查询商品
9734
9739
  */
9735
- var queryItems = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9736
- var params, res, _ref2, list, _total, nextKey, newList;
9737
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9738
- while (1) switch (_context.prev = _context.next) {
9739
- case 0:
9740
- _context.prev = 0;
9741
- setLoading(true);
9742
- params = _objectSpread2({}, queryPd());
9743
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9744
- params.platform = platform;
9745
- params.status = params.type === 'onSale' ? 1 : 0;
9746
- delete params.type;
9747
- _context.next = 9;
9748
- return extendRequest('/qy/gdfw/product/listProduct', {
9749
- method: 'post',
9750
- data: params
9751
- });
9752
- case 9:
9753
- res = _context.sent;
9754
- _ref2 = res.data || {
9755
- result: [],
9756
- total: 0
9757
- }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9758
- newList = list || [];
9759
- newList.forEach(function (item) {
9760
- item.numIid = item.productId;
9761
- item.outerId = item.outId;
9762
- item.title = item.productName;
9763
- item.platform = platform;
9764
- });
9765
- setGoodList(newList);
9766
- setTotal(_total);
9767
- case 15:
9768
- _context.prev = 15;
9769
- setLoading(false);
9770
- return _context.finish(15);
9771
- case 18:
9772
- case "end":
9773
- return _context.stop();
9774
- }
9775
- }, _callee, null, [[0,, 15, 18]]);
9776
- })), [searchParams]);
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
+ }();
9777
9787
  useEffect(function () {
9778
9788
  var shopInfo = shopList.find(function (item) {
9779
9789
  return shopId === item.shopId || shopId === item.shopName;
@@ -9797,14 +9807,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9797
9807
  onSubmit(selectList);
9798
9808
  _onCancel();
9799
9809
  };
9800
- var onFinish = function onFinish(value) {
9801
- console.log(value);
9802
- setSearch(_objectSpread2({}, searchParams));
9803
- };
9804
- var onReset = function onReset() {
9805
- setSearch(_objectSpread2({}, searchParams));
9806
- form.resetFields();
9807
- };
9808
9810
  return /*#__PURE__*/React.createElement(Modal, {
9809
9811
  title: '选择商品',
9810
9812
  okText: '确认',
@@ -9817,27 +9819,17 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9817
9819
  onOk: onOk,
9818
9820
  wrapClassName: "goodModal"
9819
9821
  }, /*#__PURE__*/React.createElement(Form, {
9820
- layout: "inline",
9821
- form: form,
9822
- onFinish: onFinish
9823
- }, /*#__PURE__*/React.createElement(Form.Item, {
9824
- name: "code"
9825
- }, /*#__PURE__*/React.createElement(Input, {
9822
+ layout: "inline"
9823
+ }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9826
9824
  placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9827
- })), /*#__PURE__*/React.createElement(Form.Item, {
9828
- name: "sku"
9829
- }, /*#__PURE__*/React.createElement(Input, {
9825
+ })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9830
9826
  placeholder: "\u5546\u54C1\u7F16\u7801"
9831
- })), /*#__PURE__*/React.createElement(Form.Item, {
9832
- name: "name"
9833
- }, /*#__PURE__*/React.createElement(Input, {
9827
+ })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
9834
9828
  placeholder: "\u5546\u54C1\u540D\u79F0"
9835
9829
  })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
9836
9830
  type: "primary",
9837
9831
  htmlType: "submit"
9838
- }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
9839
- onClick: onReset
9840
- }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
9832
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, null, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
9841
9833
  spinning: loading
9842
9834
  }, /*#__PURE__*/React.createElement(Table, {
9843
9835
  rowSelection: rowSelection,
@@ -9870,8 +9862,8 @@ var GoodItem = function GoodItem(props) {
9870
9862
  value = _props$value === void 0 ? [] : _props$value,
9871
9863
  onChange = props.onChange,
9872
9864
  disabled = props.disabled,
9873
- _props$showHeader = props.showHeader,
9874
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9865
+ _props$showField = props.showField,
9866
+ showField = _props$showField === void 0 ? [] : _props$showField,
9875
9867
  width = props.width,
9876
9868
  _props$shopList = props.shopList,
9877
9869
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -9990,7 +9982,7 @@ var GoodItem = function GoodItem(props) {
9990
9982
  return /*#__PURE__*/React.createElement("span", null, index + 1);
9991
9983
  }
9992
9984
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
9993
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9985
+ return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9994
9986
  })));
9995
9987
  if (!disabled) {
9996
9988
  columnList.push({
@@ -10010,7 +10002,7 @@ var GoodItem = function GoodItem(props) {
10010
10002
  });
10011
10003
  }
10012
10004
  return columnList;
10013
- }, [showHeader, value, disabled]);
10005
+ }, [showField, value, disabled]);
10014
10006
  var onSubmit = function onSubmit(list) {
10015
10007
  var newList = list.map(function (item) {
10016
10008
  var picUrl = item.picUrl,
package/dist/index.js CHANGED
@@ -9407,7 +9407,6 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9407
9407
  //sf手机号
9408
9408
  var LogisticsPhone = function LogisticsPhone() {
9409
9409
  return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9410
- disabled: disabled,
9411
9410
  style: {
9412
9411
  marginTop: '8px'
9413
9412
  },
@@ -9711,15 +9710,21 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9711
9710
  _useState18 = _slicedToArray(_useState17, 2),
9712
9711
  shopInfo = _useState18[0],
9713
9712
  setShopInfo = _useState18[1]; //店铺信息
9714
- var _Form$useForm = antd.Form.useForm(),
9715
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
9716
- form = _Form$useForm2[0];
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];
9717
9721
  //选择页码
9718
9722
  var pageChange = function pageChange(page, pageSize) {
9719
9723
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
9720
9724
  pageNo: page,
9721
9725
  pageSize: pageSize
9722
9726
  }));
9727
+ queryItems();
9723
9728
  };
9724
9729
  /**
9725
9730
  *
@@ -9743,48 +9748,53 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9743
9748
  /**
9744
9749
  * 查询商品
9745
9750
  */
9746
- var queryItems = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9747
- var params, res, _ref2, list, _total, nextKey, newList;
9748
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9749
- while (1) switch (_context.prev = _context.next) {
9750
- case 0:
9751
- _context.prev = 0;
9752
- setLoading(true);
9753
- params = _objectSpread2({}, queryPd());
9754
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
9755
- params.platform = platform;
9756
- params.status = params.type === 'onSale' ? 1 : 0;
9757
- delete params.type;
9758
- _context.next = 9;
9759
- return extendRequest('/qy/gdfw/product/listProduct', {
9760
- method: 'post',
9761
- data: params
9762
- });
9763
- case 9:
9764
- res = _context.sent;
9765
- _ref2 = res.data || {
9766
- result: [],
9767
- total: 0
9768
- }, list = _ref2.result, _total = _ref2.total, nextKey = _ref2.nextKey;
9769
- newList = list || [];
9770
- newList.forEach(function (item) {
9771
- item.numIid = item.productId;
9772
- item.outerId = item.outId;
9773
- item.title = item.productName;
9774
- item.platform = platform;
9775
- });
9776
- setGoodList(newList);
9777
- setTotal(_total);
9778
- case 15:
9779
- _context.prev = 15;
9780
- setLoading(false);
9781
- return _context.finish(15);
9782
- case 18:
9783
- case "end":
9784
- return _context.stop();
9785
- }
9786
- }, _callee, null, [[0,, 15, 18]]);
9787
- })), [searchParams]);
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
+ }();
9788
9798
  React.useEffect(function () {
9789
9799
  var shopInfo = shopList.find(function (item) {
9790
9800
  return shopId === item.shopId || shopId === item.shopName;
@@ -9808,14 +9818,6 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9808
9818
  onSubmit(selectList);
9809
9819
  _onCancel();
9810
9820
  };
9811
- var onFinish = function onFinish(value) {
9812
- console.log(value);
9813
- setSearch(_objectSpread2({}, searchParams));
9814
- };
9815
- var onReset = function onReset() {
9816
- setSearch(_objectSpread2({}, searchParams));
9817
- form.resetFields();
9818
- };
9819
9821
  return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
9820
9822
  title: '选择商品',
9821
9823
  okText: '确认',
@@ -9828,27 +9830,17 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
9828
9830
  onOk: onOk,
9829
9831
  wrapClassName: "goodModal"
9830
9832
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form, {
9831
- layout: "inline",
9832
- form: form,
9833
- onFinish: onFinish
9834
- }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9835
- name: "code"
9836
- }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9833
+ layout: "inline"
9834
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9837
9835
  placeholder: "\u6B3E\u5F0F\u7F16\u7801"
9838
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9839
- name: "sku"
9840
- }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9836
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9841
9837
  placeholder: "\u5546\u54C1\u7F16\u7801"
9842
- })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
9843
- name: "name"
9844
- }, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9838
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9845
9839
  placeholder: "\u5546\u54C1\u540D\u79F0"
9846
9840
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9847
9841
  type: "primary",
9848
9842
  htmlType: "submit"
9849
- }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
9850
- onClick: onReset
9851
- }, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9843
+ }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, null, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
9852
9844
  spinning: loading
9853
9845
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
9854
9846
  rowSelection: rowSelection,
@@ -9881,8 +9873,8 @@ var GoodItem = function GoodItem(props) {
9881
9873
  value = _props$value === void 0 ? [] : _props$value,
9882
9874
  onChange = props.onChange,
9883
9875
  disabled = props.disabled,
9884
- _props$showHeader = props.showHeader,
9885
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9876
+ _props$showField = props.showField,
9877
+ showField = _props$showField === void 0 ? [] : _props$showField,
9886
9878
  width = props.width,
9887
9879
  _props$shopList = props.shopList,
9888
9880
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -10001,7 +9993,7 @@ var GoodItem = function GoodItem(props) {
10001
9993
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
10002
9994
  }
10003
9995
  }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
10004
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
9996
+ return showField.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
10005
9997
  })));
10006
9998
  if (!disabled) {
10007
9999
  columnList.push({
@@ -10021,7 +10013,7 @@ var GoodItem = function GoodItem(props) {
10021
10013
  });
10022
10014
  }
10023
10015
  return columnList;
10024
- }, [showHeader, value, disabled]);
10016
+ }, [showField, value, disabled]);
10025
10017
  var onSubmit = function onSubmit(list) {
10026
10018
  var newList = list.map(function (item) {
10027
10019
  var picUrl = item.picUrl,
@@ -4,7 +4,7 @@ interface BsGoodsProps {
4
4
  type: number;
5
5
  options: any[];
6
6
  disabled: boolean;
7
- showHeader: string[];
7
+ showField: 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.27",
3
+ "version": "0.7.15-alpha.28",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "60218b9dc2250d8cbe366629af669ba395ca2551"
61
+ "gitHead": "22184ba541f26bbefc6cfa405b5dcd6983a3fd0c"
62
62
  }