@kmkf-fe-packages/basic-components 0.23.1-beta.15 → 0.23.1-beta.16

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
@@ -10702,43 +10702,44 @@ var columns$1 = [{
10702
10702
  }, {
10703
10703
  dataIndex: 'goodName',
10704
10704
  title: '商品名称',
10705
- with: 200,
10705
+ width: 200,
10706
10706
  ellipsis: true
10707
10707
  }, {
10708
10708
  dataIndex: 'goodNo',
10709
10709
  title: '商品spu编码',
10710
- with: 200,
10711
- ellipsis: true
10710
+ width: 200
10711
+ // ellipsis: true,
10712
10712
  }, {
10713
10713
  dataIndex: 'goodId',
10714
10714
  title: 'SPUID',
10715
- with: 200,
10716
- ellipsis: true
10715
+ width: 200
10716
+ // ellipsis: true,
10717
10717
  }, {
10718
10718
  dataIndex: 'specCount',
10719
10719
  title: '规格数',
10720
- with: 200,
10721
- ellipsis: true
10720
+ width: 160
10721
+ // ellipsis: true,
10722
10722
  }];
10723
+
10723
10724
  var expandedColumns = [{
10724
10725
  dataIndex: 'specName',
10725
10726
  title: '商品sku名称',
10726
- with: 200,
10727
+ width: 200,
10727
10728
  ellipsis: true
10728
10729
  }, {
10729
10730
  dataIndex: 'specNo',
10730
10731
  title: '商品sku编码',
10731
- with: 200,
10732
- ellipsis: true
10732
+ width: 200
10733
+ // ellipsis: true,
10733
10734
  }, {
10734
10735
  dataIndex: 'specId',
10735
10736
  title: 'SKUID',
10736
- with: 200,
10737
- ellipsis: true
10737
+ width: 200
10738
+ // ellipsis: true,
10738
10739
  }, {
10739
10740
  dataIndex: 'imgUrl',
10740
10741
  title: '商品图片',
10741
- with: 200,
10742
+ width: 100,
10742
10743
  render: function render(picUrl) {
10743
10744
  return /*#__PURE__*/React.createElement("img", {
10744
10745
  style: {
@@ -10751,13 +10752,16 @@ var expandedColumns = [{
10751
10752
  }
10752
10753
  }, {
10753
10754
  dataIndex: 'marketPrice',
10754
- title: '市场价'
10755
+ title: '市场价',
10756
+ width: 140
10755
10757
  }, {
10756
10758
  dataIndex: 'retailPrice',
10757
- title: '零售价'
10759
+ title: '零售价',
10760
+ width: 140
10758
10761
  }, {
10759
10762
  dataIndex: 'memberPrice',
10760
- title: '会员价'
10763
+ title: '会员价',
10764
+ width: 140
10761
10765
  }];
10762
10766
  var dateFormat = 'YYYY-MM-DD HH:mm:ss';
10763
10767
  var GoodsModal$3 = function GoodsModal(props, ref) {
@@ -10774,6 +10778,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10774
10778
  };
10775
10779
  });
10776
10780
 
10781
+ var initStartTime = hooks().subtract(1, 'M').format(dateFormat);
10782
+ var initEndTime = hooks().format(dateFormat);
10777
10783
  var onSubmit = props.onSubmit,
10778
10784
  shopId = props.shopId,
10779
10785
  shopList = props.shopList,
@@ -10810,11 +10816,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10810
10816
  _useState16 = _slicedToArray(_useState15, 2),
10811
10817
  total = _useState16[0],
10812
10818
  setTotal = _useState16[1];
10813
- var _useState17 = useState(hooks().subtract(1, 'M').format(dateFormat)),
10819
+ var _useState17 = useState(initStartTime),
10814
10820
  _useState18 = _slicedToArray(_useState17, 2),
10815
10821
  startTime = _useState18[0],
10816
10822
  setStartTime = _useState18[1];
10817
- var _useState19 = useState(hooks().format(dateFormat)),
10823
+ var _useState19 = useState(initEndTime),
10818
10824
  _useState20 = _slicedToArray(_useState19, 2),
10819
10825
  endTime = _useState20[0],
10820
10826
  setEndTime = _useState20[1];
@@ -10824,13 +10830,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10824
10830
  return item;
10825
10831
  });
10826
10832
  }, [selectList]);
10833
+ useEffect(function () {
10834
+ queryItems();
10835
+ }, [pageNo]);
10827
10836
  var _Form$useForm = Form.useForm(),
10828
10837
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
10829
10838
  form = _Form$useForm2[0];
10830
10839
  //选择页码
10831
10840
  var pageChange = function pageChange(page) {
10832
10841
  setPageNo(page);
10833
- queryItems();
10834
10842
  };
10835
10843
  /**
10836
10844
  * 查询商品
@@ -10840,8 +10848,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10840
10848
  var search,
10841
10849
  params,
10842
10850
  res,
10851
+ _res$data,
10843
10852
  _res$data$productList,
10844
10853
  productList,
10854
+ _res$data$total,
10855
+ _total,
10845
10856
  newProducts,
10846
10857
  _args = arguments;
10847
10858
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -10866,13 +10877,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10866
10877
  case 6:
10867
10878
  res = _context.sent;
10868
10879
  if (res.success) {
10869
- _res$data$productList = res.data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList;
10880
+ _res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total;
10870
10881
  newProducts = productList.map(function (item, index) {
10871
10882
  return _objectSpread2(_objectSpread2({}, item), {}, {
10872
10883
  index: index + 1
10873
10884
  });
10874
10885
  });
10875
- initData(_toConsumableArray(newProducts));
10886
+ setGoodList(_toConsumableArray(newProducts));
10887
+ if (pageNo === 1) {
10888
+ setTotal(_total);
10889
+ }
10876
10890
  }
10877
10891
  case 8:
10878
10892
  _context.prev = 8;
@@ -10888,11 +10902,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10888
10902
  return _ref.apply(this, arguments);
10889
10903
  };
10890
10904
  }();
10891
- var initData = function initData(list) {
10892
- setGoodList(_toConsumableArray(list));
10893
- setTotal(list.length);
10894
- setPageNo(1);
10895
- };
10896
10905
  var _onCancel = function onCancel() {
10897
10906
  onReset();
10898
10907
  setVisible(false);
@@ -10909,7 +10918,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10909
10918
  };
10910
10919
  var onReset = function onReset() {
10911
10920
  form.resetFields();
10912
- initData([]);
10921
+ setPageNo(1);
10922
+ // queryItems()
10913
10923
  };
10914
10924
  // const getShopList = async () => {
10915
10925
  // const { success, data } = await request('/qy/diamond/getConfigInfo', {
@@ -11012,7 +11022,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11012
11022
  columns: expandedColumns,
11013
11023
  dataSource: record.itemDetailList || [],
11014
11024
  pagination: false,
11015
- rowSelection: expandedRowSelection
11025
+ rowSelection: expandedRowSelection,
11026
+ scroll: {
11027
+ x: true
11028
+ }
11016
11029
  });
11017
11030
  };
11018
11031
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Modal, {
@@ -11030,7 +11043,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11030
11043
  layout: "inline",
11031
11044
  form: form,
11032
11045
  onFinish: onFinish,
11033
- onValuesChange: onValuesChange
11046
+ onValuesChange: onValuesChange,
11047
+ initialValues: {
11048
+ dateTimePicker: [hooks(initStartTime, dateFormat), hooks(initEndTime, dateFormat)],
11049
+ code: ''
11050
+ }
11034
11051
  }, /*#__PURE__*/React.createElement(Form.Item, {
11035
11052
  name: "dateTimePicker"
11036
11053
  }, /*#__PURE__*/React.createElement(RangePicker, {
@@ -11050,12 +11067,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11050
11067
  htmlType: "submit"
11051
11068
  }, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
11052
11069
  onClick: onReset
11053
- }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement(Spin, {
11054
- spinning: loading
11070
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React.createElement("div", {
11071
+ style: {
11072
+ marginTop: '16px'
11073
+ }
11055
11074
  }, /*#__PURE__*/React.createElement(Table, {
11056
11075
  rowKey: 'goodNo',
11057
11076
  columns: columns$1,
11058
11077
  dataSource: goodList,
11078
+ loading: loading,
11059
11079
  scroll: {
11060
11080
  x: true,
11061
11081
  y: 250
@@ -11164,18 +11184,18 @@ var GoodItem = function GoodItem(props) {
11164
11184
  align: 'center',
11165
11185
  ellipsis: true,
11166
11186
  width: 100
11167
- }, {
11168
- dataIndex: 'specId',
11169
- title: "".concat(text, "SKUID"),
11170
- align: 'center',
11171
- ellipsis: true,
11172
- width: 100
11173
11187
  }, {
11174
11188
  dataIndex: 'goodName',
11175
11189
  title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
11176
11190
  align: 'center',
11177
11191
  ellipsis: true,
11178
11192
  width: 250
11193
+ }, {
11194
+ dataIndex: 'specId',
11195
+ title: "".concat(text, "SKUID"),
11196
+ align: 'center',
11197
+ ellipsis: true,
11198
+ width: 100
11179
11199
  }, {
11180
11200
  dataIndex: 'specNo',
11181
11201
  title: "".concat(text, "sku\u7F16\u7801"),
@@ -11190,7 +11210,7 @@ var GoodItem = function GoodItem(props) {
11190
11210
  width: 250
11191
11211
  }, {
11192
11212
  dataIndex: 'orderPrice',
11193
- title: "\u5B9E\u4ED8\u91D1\u989D",
11213
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
11194
11214
  align: 'center',
11195
11215
  ellipsis: true,
11196
11216
  width: 100
@@ -11229,7 +11249,7 @@ var GoodItem = function GoodItem(props) {
11229
11249
  width: 70
11230
11250
  }, {
11231
11251
  dataIndex: 'giftType',
11232
- title: "\u8D60\u54C1\u7C7B\u578B",
11252
+ title: "\u8D60\u54C1\u65B9\u5F0F",
11233
11253
  align: 'center',
11234
11254
  ellipsis: true,
11235
11255
  width: 100,
package/dist/index.js CHANGED
@@ -10713,43 +10713,44 @@ var columns$1 = [{
10713
10713
  }, {
10714
10714
  dataIndex: 'goodName',
10715
10715
  title: '商品名称',
10716
- with: 200,
10716
+ width: 200,
10717
10717
  ellipsis: true
10718
10718
  }, {
10719
10719
  dataIndex: 'goodNo',
10720
10720
  title: '商品spu编码',
10721
- with: 200,
10722
- ellipsis: true
10721
+ width: 200
10722
+ // ellipsis: true,
10723
10723
  }, {
10724
10724
  dataIndex: 'goodId',
10725
10725
  title: 'SPUID',
10726
- with: 200,
10727
- ellipsis: true
10726
+ width: 200
10727
+ // ellipsis: true,
10728
10728
  }, {
10729
10729
  dataIndex: 'specCount',
10730
10730
  title: '规格数',
10731
- with: 200,
10732
- ellipsis: true
10731
+ width: 160
10732
+ // ellipsis: true,
10733
10733
  }];
10734
+
10734
10735
  var expandedColumns = [{
10735
10736
  dataIndex: 'specName',
10736
10737
  title: '商品sku名称',
10737
- with: 200,
10738
+ width: 200,
10738
10739
  ellipsis: true
10739
10740
  }, {
10740
10741
  dataIndex: 'specNo',
10741
10742
  title: '商品sku编码',
10742
- with: 200,
10743
- ellipsis: true
10743
+ width: 200
10744
+ // ellipsis: true,
10744
10745
  }, {
10745
10746
  dataIndex: 'specId',
10746
10747
  title: 'SKUID',
10747
- with: 200,
10748
- ellipsis: true
10748
+ width: 200
10749
+ // ellipsis: true,
10749
10750
  }, {
10750
10751
  dataIndex: 'imgUrl',
10751
10752
  title: '商品图片',
10752
- with: 200,
10753
+ width: 100,
10753
10754
  render: function render(picUrl) {
10754
10755
  return /*#__PURE__*/React__default['default'].createElement("img", {
10755
10756
  style: {
@@ -10762,13 +10763,16 @@ var expandedColumns = [{
10762
10763
  }
10763
10764
  }, {
10764
10765
  dataIndex: 'marketPrice',
10765
- title: '市场价'
10766
+ title: '市场价',
10767
+ width: 140
10766
10768
  }, {
10767
10769
  dataIndex: 'retailPrice',
10768
- title: '零售价'
10770
+ title: '零售价',
10771
+ width: 140
10769
10772
  }, {
10770
10773
  dataIndex: 'memberPrice',
10771
- title: '会员价'
10774
+ title: '会员价',
10775
+ width: 140
10772
10776
  }];
10773
10777
  var dateFormat = 'YYYY-MM-DD HH:mm:ss';
10774
10778
  var GoodsModal$3 = function GoodsModal(props, ref) {
@@ -10785,6 +10789,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10785
10789
  };
10786
10790
  });
10787
10791
 
10792
+ var initStartTime = hooks().subtract(1, 'M').format(dateFormat);
10793
+ var initEndTime = hooks().format(dateFormat);
10788
10794
  var onSubmit = props.onSubmit,
10789
10795
  shopId = props.shopId,
10790
10796
  shopList = props.shopList,
@@ -10821,11 +10827,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10821
10827
  _useState16 = _slicedToArray(_useState15, 2),
10822
10828
  total = _useState16[0],
10823
10829
  setTotal = _useState16[1];
10824
- var _useState17 = React.useState(hooks().subtract(1, 'M').format(dateFormat)),
10830
+ var _useState17 = React.useState(initStartTime),
10825
10831
  _useState18 = _slicedToArray(_useState17, 2),
10826
10832
  startTime = _useState18[0],
10827
10833
  setStartTime = _useState18[1];
10828
- var _useState19 = React.useState(hooks().format(dateFormat)),
10834
+ var _useState19 = React.useState(initEndTime),
10829
10835
  _useState20 = _slicedToArray(_useState19, 2),
10830
10836
  endTime = _useState20[0],
10831
10837
  setEndTime = _useState20[1];
@@ -10835,13 +10841,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10835
10841
  return item;
10836
10842
  });
10837
10843
  }, [selectList]);
10844
+ React.useEffect(function () {
10845
+ queryItems();
10846
+ }, [pageNo]);
10838
10847
  var _Form$useForm = antd.Form.useForm(),
10839
10848
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
10840
10849
  form = _Form$useForm2[0];
10841
10850
  //选择页码
10842
10851
  var pageChange = function pageChange(page) {
10843
10852
  setPageNo(page);
10844
- queryItems();
10845
10853
  };
10846
10854
  /**
10847
10855
  * 查询商品
@@ -10851,8 +10859,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10851
10859
  var search,
10852
10860
  params,
10853
10861
  res,
10862
+ _res$data,
10854
10863
  _res$data$productList,
10855
10864
  productList,
10865
+ _res$data$total,
10866
+ _total,
10856
10867
  newProducts,
10857
10868
  _args = arguments;
10858
10869
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -10877,13 +10888,16 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10877
10888
  case 6:
10878
10889
  res = _context.sent;
10879
10890
  if (res.success) {
10880
- _res$data$productList = res.data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList;
10891
+ _res$data = res.data, _res$data$productList = _res$data.productList, productList = _res$data$productList === void 0 ? [] : _res$data$productList, _res$data$total = _res$data.total, _total = _res$data$total === void 0 ? 0 : _res$data$total;
10881
10892
  newProducts = productList.map(function (item, index) {
10882
10893
  return _objectSpread2(_objectSpread2({}, item), {}, {
10883
10894
  index: index + 1
10884
10895
  });
10885
10896
  });
10886
- initData(_toConsumableArray(newProducts));
10897
+ setGoodList(_toConsumableArray(newProducts));
10898
+ if (pageNo === 1) {
10899
+ setTotal(_total);
10900
+ }
10887
10901
  }
10888
10902
  case 8:
10889
10903
  _context.prev = 8;
@@ -10899,11 +10913,6 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10899
10913
  return _ref.apply(this, arguments);
10900
10914
  };
10901
10915
  }();
10902
- var initData = function initData(list) {
10903
- setGoodList(_toConsumableArray(list));
10904
- setTotal(list.length);
10905
- setPageNo(1);
10906
- };
10907
10916
  var _onCancel = function onCancel() {
10908
10917
  onReset();
10909
10918
  setVisible(false);
@@ -10920,7 +10929,8 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
10920
10929
  };
10921
10930
  var onReset = function onReset() {
10922
10931
  form.resetFields();
10923
- initData([]);
10932
+ setPageNo(1);
10933
+ // queryItems()
10924
10934
  };
10925
10935
  // const getShopList = async () => {
10926
10936
  // const { success, data } = await request('/qy/diamond/getConfigInfo', {
@@ -11023,7 +11033,10 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11023
11033
  columns: expandedColumns,
11024
11034
  dataSource: record.itemDetailList || [],
11025
11035
  pagination: false,
11026
- rowSelection: expandedRowSelection
11036
+ rowSelection: expandedRowSelection,
11037
+ scroll: {
11038
+ x: true
11039
+ }
11027
11040
  });
11028
11041
  };
11029
11042
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
@@ -11041,7 +11054,11 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11041
11054
  layout: "inline",
11042
11055
  form: form,
11043
11056
  onFinish: onFinish,
11044
- onValuesChange: onValuesChange
11057
+ onValuesChange: onValuesChange,
11058
+ initialValues: {
11059
+ dateTimePicker: [hooks(initStartTime, dateFormat), hooks(initEndTime, dateFormat)],
11060
+ code: ''
11061
+ }
11045
11062
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
11046
11063
  name: "dateTimePicker"
11047
11064
  }, /*#__PURE__*/React__default['default'].createElement(RangePicker, {
@@ -11061,12 +11078,15 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
11061
11078
  htmlType: "submit"
11062
11079
  }, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
11063
11080
  onClick: onReset
11064
- }, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
11065
- spinning: loading
11081
+ }, "\u91CD\u7F6E"))), /*#__PURE__*/React__default['default'].createElement("div", {
11082
+ style: {
11083
+ marginTop: '16px'
11084
+ }
11066
11085
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
11067
11086
  rowKey: 'goodNo',
11068
11087
  columns: columns$1,
11069
11088
  dataSource: goodList,
11089
+ loading: loading,
11070
11090
  scroll: {
11071
11091
  x: true,
11072
11092
  y: 250
@@ -11175,18 +11195,18 @@ var GoodItem = function GoodItem(props) {
11175
11195
  align: 'center',
11176
11196
  ellipsis: true,
11177
11197
  width: 100
11178
- }, {
11179
- dataIndex: 'specId',
11180
- title: "".concat(text, "SKUID"),
11181
- align: 'center',
11182
- ellipsis: true,
11183
- width: 100
11184
11198
  }, {
11185
11199
  dataIndex: 'goodName',
11186
11200
  title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
11187
11201
  align: 'center',
11188
11202
  ellipsis: true,
11189
11203
  width: 250
11204
+ }, {
11205
+ dataIndex: 'specId',
11206
+ title: "".concat(text, "SKUID"),
11207
+ align: 'center',
11208
+ ellipsis: true,
11209
+ width: 100
11190
11210
  }, {
11191
11211
  dataIndex: 'specNo',
11192
11212
  title: "".concat(text, "sku\u7F16\u7801"),
@@ -11201,7 +11221,7 @@ var GoodItem = function GoodItem(props) {
11201
11221
  width: 250
11202
11222
  }, {
11203
11223
  dataIndex: 'orderPrice',
11204
- title: "\u5B9E\u4ED8\u91D1\u989D",
11224
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
11205
11225
  align: 'center',
11206
11226
  ellipsis: true,
11207
11227
  width: 100
@@ -11240,7 +11260,7 @@ var GoodItem = function GoodItem(props) {
11240
11260
  width: 70
11241
11261
  }, {
11242
11262
  dataIndex: 'giftType',
11243
- title: "\u8D60\u54C1\u7C7B\u578B",
11263
+ title: "\u8D60\u54C1\u65B9\u5F0F",
11244
11264
  align: 'center',
11245
11265
  ellipsis: true,
11246
11266
  width: 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.23.1-beta.15",
3
+ "version": "0.23.1-beta.16",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "3ca079b7e16ea45b440c80b4e49222fa21b1a545"
67
+ "gitHead": "b25d0a7eff9d6692d21f0f554367111c917fd552"
68
68
  }