@kmkf-fe-packages/basic-components 0.8.17-alpha.3 → 0.8.17-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/README.md CHANGED
@@ -18,5 +18,3 @@ yarn start
18
18
  - common 公共组件
19
19
  - config 公共方法
20
20
  - assets 静态资源
21
-
22
- #### 111
package/dist/index.esm.js CHANGED
@@ -7274,15 +7274,20 @@ var ParseLogistics = function ParseLogistics(props) {
7274
7274
  _useState2 = _slicedToArray(_useState, 2),
7275
7275
  value = _useState2[0],
7276
7276
  setValue = _useState2[1];
7277
- var handleIdentify = function handleIdentify() {
7278
- if (!value) {
7277
+ var _useState3 = useState(false),
7278
+ _useState4 = _slicedToArray(_useState3, 2),
7279
+ isCopy = _useState4[0],
7280
+ setIsCopy = _useState4[1];
7281
+ var handleIdentify = function handleIdentify(val) {
7282
+ if (!value && !val) {
7279
7283
  return;
7280
7284
  }
7285
+ setIsCopy(false);
7281
7286
  request$1({
7282
7287
  url: '/qy/logistics/addressAnalysis',
7283
7288
  method: 'post',
7284
7289
  data: {
7285
- fullAddress: value
7290
+ fullAddress: value || val
7286
7291
  }
7287
7292
  }).then(function (res) {
7288
7293
  var data = res.data;
@@ -7291,17 +7296,33 @@ var ParseLogistics = function ParseLogistics(props) {
7291
7296
  console.log(e);
7292
7297
  });
7293
7298
  };
7299
+ var _onKeyDown = function onKeyDown(e) {
7300
+ if (e.keyCode === 86) {
7301
+ setIsCopy(true);
7302
+ }
7303
+ };
7304
+ var onChangeValue = function onChangeValue(val) {
7305
+ setValue(val);
7306
+ if (isCopy) {
7307
+ handleIdentify(val);
7308
+ }
7309
+ };
7294
7310
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextArea, {
7295
7311
  placeholder: "\u590D\u5236\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7296
7312
  rows: 3,
7297
7313
  value: value,
7298
7314
  onChange: function onChange(e) {
7299
- return setValue(e.target.value);
7315
+ return onChangeValue(e.target.value);
7316
+ },
7317
+ onKeyDown: function onKeyDown(e) {
7318
+ return _onKeyDown(e);
7300
7319
  }
7301
7320
  }), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
7302
7321
  size: "small",
7303
7322
  type: "primary",
7304
- onClick: handleIdentify
7323
+ onClick: function onClick() {
7324
+ return handleIdentify('');
7325
+ }
7305
7326
  }, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
7306
7327
  size: "small",
7307
7328
  onClick: function onClick() {
@@ -9580,7 +9601,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9580
9601
  };
9581
9602
 
9582
9603
  var jstGoods = function jstGoods(props) {
9583
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
9604
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
9584
9605
  var _props$value = props.value,
9585
9606
  value = _props$value === void 0 ? [] : _props$value,
9586
9607
  _props$options = props.options,
@@ -9693,6 +9714,13 @@ var jstGoods = function jstGoods(props) {
9693
9714
  return changeInputHandle(e.target.value, 'sendName');
9694
9715
  },
9695
9716
  value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
9717
+ })) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
9718
+ disabled: disabled,
9719
+ placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
9720
+ onChange: function onChange(e) {
9721
+ return changeInputHandle(e.target.value, 'deliveryNo');
9722
+ },
9723
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
9696
9724
  })) : null) : null);
9697
9725
  };
9698
9726
 
@@ -10212,6 +10240,18 @@ var GoodItem = function GoodItem(props) {
10212
10240
  }
10213
10241
  });
10214
10242
  }
10243
+ }, {
10244
+ dataIndex: 'skuName',
10245
+ title: "".concat(text, "sku\u540D\u79F0"),
10246
+ align: 'center',
10247
+ ellipsis: true,
10248
+ width: 250
10249
+ }, {
10250
+ dataIndex: 'sku',
10251
+ title: "".concat(text, "sku\u7F16\u7801"),
10252
+ align: 'center',
10253
+ ellipsis: true,
10254
+ width: 100
10215
10255
  }, {
10216
10256
  dataIndex: 'name',
10217
10257
  title: "".concat(text, "\u540D\u79F0"),
@@ -10236,12 +10276,6 @@ var GoodItem = function GoodItem(props) {
10236
10276
  align: 'center',
10237
10277
  ellipsis: true,
10238
10278
  width: 100
10239
- }, {
10240
- dataIndex: 'sku',
10241
- title: "".concat(text, "sku\u7F16\u7801"),
10242
- align: 'center',
10243
- ellipsis: true,
10244
- width: 100
10245
10279
  }, {
10246
10280
  dataIndex: 'money',
10247
10281
  title: "\u5B9E\u4ED8\u91D1\u989D",
@@ -10319,11 +10353,13 @@ var GoodItem = function GoodItem(props) {
10319
10353
  name = item.name,
10320
10354
  code = item.code,
10321
10355
  skuCode = item.skuCode,
10322
- marketPrice = item.marketPrice;
10356
+ marketPrice = item.marketPrice,
10357
+ skuName = item.skuName;
10323
10358
  return {
10324
10359
  id: goodsId,
10325
10360
  mark: '是',
10326
10361
  pic: '',
10362
+ skuName: skuName,
10327
10363
  name: name,
10328
10364
  code: code,
10329
10365
  sku: skuCode,
@@ -10731,7 +10767,7 @@ var BsReissue = function BsReissue(props) {
10731
10767
  var valueRef = useRef({});
10732
10768
  useEffect(function () {
10733
10769
  pubsub.subscribe('reissueSelectList', function (_, data) {
10734
- console.log('reissueSelectList', data);
10770
+ // console.log('reissueSelectList', data);
10735
10771
  if (disabled) return;
10736
10772
  var newValue = _objectSpread2({}, data.goodValue);
10737
10773
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
@@ -10745,7 +10781,7 @@ var BsReissue = function BsReissue(props) {
10745
10781
  }, []);
10746
10782
  useEffect(function () {
10747
10783
  pubsub.subscribe('reissueSelectListReturn', function (_, data) {
10748
- console.log('reissueSelectListReturn', data);
10784
+ // console.log('reissueSelectListReturn', data);
10749
10785
  if (disabled) return;
10750
10786
  var newValue = _objectSpread2({}, data.goodValue);
10751
10787
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
@@ -11395,7 +11431,7 @@ var Goods$1 = function Goods(props, ref) {
11395
11431
  var index$1 = /*#__PURE__*/forwardRef(Goods$1);
11396
11432
 
11397
11433
  var _excluded$f = ["onChange", "value", "failValue"];
11398
- function MultiStatus(props) {
11434
+ function CommonStatus(props) {
11399
11435
  var onChange = props.onChange,
11400
11436
  value = props.value,
11401
11437
  failValue = props.failValue,
@@ -11408,6 +11444,7 @@ function MultiStatus(props) {
11408
11444
  };
11409
11445
  return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
11410
11446
  showSearch: true,
11447
+ value: value === null || value === void 0 ? void 0 : value.status,
11411
11448
  filterOption: function filterOption(input, option) {
11412
11449
  return option.label.includes(input);
11413
11450
  }
@@ -11416,4 +11453,161 @@ function MultiStatus(props) {
11416
11453
  }));
11417
11454
  }
11418
11455
 
11419
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, index as BsSystemOrder, BuyerNick, ChooseBaby, MultiStatus as CommonStatus, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
11456
+ var CommonSystemOrder = function CommonSystemOrder(props) {
11457
+ var _value$changeIndex, _value$changeIndex2;
11458
+ var _props$value = props.value,
11459
+ value = _props$value === void 0 ? [] : _props$value,
11460
+ onChange = props.onChange,
11461
+ disabled = props.disabled,
11462
+ _props$type = props.type,
11463
+ type = _props$type === void 0 ? 1 : _props$type;
11464
+ var _useState = useState(0),
11465
+ _useState2 = _slicedToArray(_useState, 2),
11466
+ changeIndex = _useState2[0],
11467
+ setChangeIndex = _useState2[1]; //选中的包裹
11468
+ useEffect(function () {
11469
+ setChangeIndex(0);
11470
+ }, []);
11471
+ var content = function content(item, index) {
11472
+ return /*#__PURE__*/React.createElement("div", {
11473
+ style: {
11474
+ maxHeight: '300px',
11475
+ overflowY: 'auto'
11476
+ }
11477
+ }, type === 1 ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11478
+ };
11479
+ var changeInputHandle = function changeInputHandle(val, type) {
11480
+ var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11481
+ changeOrderInfo[type] = val;
11482
+ var newList = _toConsumableArray(value);
11483
+ newList[changeIndex] = changeOrderInfo;
11484
+ onChange === null || onChange === void 0 ? void 0 : onChange(newList);
11485
+ };
11486
+ //判断是否是单个且没有商品数据
11487
+ var isSingle = useMemo(function () {
11488
+ return value && value.length === 1;
11489
+ }, [value]);
11490
+ return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, {
11491
+ wrap: true
11492
+ }, (value || []).map(function (item, index) {
11493
+ return /*#__PURE__*/React.createElement(Popover, {
11494
+ content: content(item, index),
11495
+ key: index
11496
+ }, /*#__PURE__*/React.createElement("span", {
11497
+ style: {
11498
+ color: changeIndex === index ? '#4569d4' : 'black',
11499
+ cursor: 'pointer'
11500
+ },
11501
+ onClick: function onClick() {
11502
+ return setChangeIndex(index);
11503
+ }
11504
+ }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
11505
+ }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11506
+ disabled: disabled,
11507
+ placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11508
+ onChange: function onChange(e) {
11509
+ return changeInputHandle(e.target.value, 'deliveryNo');
11510
+ },
11511
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.deliveryNo
11512
+ })) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11513
+ disabled: disabled,
11514
+ placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u5355id",
11515
+ onChange: function onChange(e) {
11516
+ return changeInputHandle(e.target.value, 'returnGoodsTradeId');
11517
+ },
11518
+ value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
11519
+ })) : null) : null);
11520
+ };
11521
+
11522
+ var _excluded$g = ["value", "onChange", "disabled", "failValue", "type"];
11523
+ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11524
+ var _value$changeIndex;
11525
+ var _props$value = props.value,
11526
+ value = _props$value === void 0 ? [] : _props$value,
11527
+ onChange = props.onChange,
11528
+ disabled = props.disabled,
11529
+ failValue = props.failValue,
11530
+ _props$type = props.type,
11531
+ type = _props$type === void 0 ? 1 : _props$type,
11532
+ other = _objectWithoutProperties(props, _excluded$g);
11533
+ var _useState = useState(0),
11534
+ _useState2 = _slicedToArray(_useState, 2),
11535
+ changeIndex = _useState2[0],
11536
+ setChangeIndex = _useState2[1]; //选中的包裹
11537
+ useEffect(function () {
11538
+ setChangeIndex(0);
11539
+ }, []);
11540
+ var content = function content(item, index) {
11541
+ return /*#__PURE__*/React.createElement("div", {
11542
+ style: {
11543
+ maxHeight: '300px',
11544
+ overflowY: 'auto'
11545
+ }
11546
+ }, type === 1 ? /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11547
+ };
11548
+ var changeHandle = function changeHandle(val, valType) {
11549
+ console.log(val, valType);
11550
+ var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11551
+ changeOrderInfo[valType] = val;
11552
+ if (val === failValue) {
11553
+ changeOrderInfo.reason = '';
11554
+ }
11555
+ var newList = _toConsumableArray(value);
11556
+ newList[changeIndex] = changeOrderInfo;
11557
+ onChange === null || onChange === void 0 ? void 0 : onChange(newList);
11558
+ };
11559
+ //判断是否是单个且没有商品数据
11560
+ var isSingle = useMemo(function () {
11561
+ return value && value.length === 1;
11562
+ }, [value]);
11563
+ return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, {
11564
+ wrap: true
11565
+ }, (value || []).map(function (item, index) {
11566
+ return /*#__PURE__*/React.createElement(Popover, {
11567
+ content: content(item, index),
11568
+ key: index
11569
+ }, /*#__PURE__*/React.createElement("span", {
11570
+ style: {
11571
+ color: changeIndex === index ? '#4569d4' : 'black',
11572
+ cursor: 'pointer'
11573
+ },
11574
+ onClick: function onClick() {
11575
+ return setChangeIndex(index);
11576
+ }
11577
+ }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
11578
+ }))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
11579
+ showSearch: true,
11580
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
11581
+ filterOption: function filterOption(input, option) {
11582
+ return option.label.includes(input);
11583
+ },
11584
+ style: {
11585
+ width: 200
11586
+ },
11587
+ placeholder: "\u8BF7\u9009\u62E9",
11588
+ disabled: disabled,
11589
+ onChange: function onChange(val) {
11590
+ return changeHandle(val, 'status');
11591
+ }
11592
+ }))) : null) : null);
11593
+ };
11594
+
11595
+ var CalculationInput = function CalculationInput(props) {
11596
+ var _props$config = props.config,
11597
+ config = _props$config === void 0 ? {} : _props$config;
11598
+ return /*#__PURE__*/React.createElement("span", {
11599
+ style: {
11600
+ display: 'flex',
11601
+ alignItems: 'center'
11602
+ }
11603
+ }, /*#__PURE__*/React.createElement(ApaasInput, _objectSpread2(_objectSpread2({}, props), {}, {
11604
+ placeholder: "\u6839\u636E\u89C4\u5219\u914D\u7F6E\uFF0C\u81EA\u52A8\u8BA1\u7B97\u6570\u503C"
11605
+ })), /*#__PURE__*/React.createElement("span", {
11606
+ style: {
11607
+ marginLeft: '4px',
11608
+ width: '88px'
11609
+ }
11610
+ }, config === null || config === void 0 ? void 0 : config.unit));
11611
+ };
11612
+
11613
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, ApaasUploadAsync$1 as ApaasUploadFile, BsExchange, BsGoods, BsReissue, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
package/dist/index.js CHANGED
@@ -7285,15 +7285,20 @@ var ParseLogistics = function ParseLogistics(props) {
7285
7285
  _useState2 = _slicedToArray(_useState, 2),
7286
7286
  value = _useState2[0],
7287
7287
  setValue = _useState2[1];
7288
- var handleIdentify = function handleIdentify() {
7289
- if (!value) {
7288
+ var _useState3 = React.useState(false),
7289
+ _useState4 = _slicedToArray(_useState3, 2),
7290
+ isCopy = _useState4[0],
7291
+ setIsCopy = _useState4[1];
7292
+ var handleIdentify = function handleIdentify(val) {
7293
+ if (!value && !val) {
7290
7294
  return;
7291
7295
  }
7296
+ setIsCopy(false);
7292
7297
  kmkfUtils.request({
7293
7298
  url: '/qy/logistics/addressAnalysis',
7294
7299
  method: 'post',
7295
7300
  data: {
7296
- fullAddress: value
7301
+ fullAddress: value || val
7297
7302
  }
7298
7303
  }).then(function (res) {
7299
7304
  var data = res.data;
@@ -7302,17 +7307,33 @@ var ParseLogistics = function ParseLogistics(props) {
7302
7307
  console.log(e);
7303
7308
  });
7304
7309
  };
7310
+ var _onKeyDown = function onKeyDown(e) {
7311
+ if (e.keyCode === 86) {
7312
+ setIsCopy(true);
7313
+ }
7314
+ };
7315
+ var onChangeValue = function onChangeValue(val) {
7316
+ setValue(val);
7317
+ if (isCopy) {
7318
+ handleIdentify(val);
7319
+ }
7320
+ };
7305
7321
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(TextArea, {
7306
7322
  placeholder: "\u590D\u5236\u4FE1\u606F\uFF0C\u70B9\u51FB\u667A\u80FD\u8BC6\u522B",
7307
7323
  rows: 3,
7308
7324
  value: value,
7309
7325
  onChange: function onChange(e) {
7310
- return setValue(e.target.value);
7326
+ return onChangeValue(e.target.value);
7327
+ },
7328
+ onKeyDown: function onKeyDown(e) {
7329
+ return _onKeyDown(e);
7311
7330
  }
7312
7331
  }), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
7313
7332
  size: "small",
7314
7333
  type: "primary",
7315
- onClick: handleIdentify
7334
+ onClick: function onClick() {
7335
+ return handleIdentify('');
7336
+ }
7316
7337
  }, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
7317
7338
  size: "small",
7318
7339
  onClick: function onClick() {
@@ -9591,7 +9612,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
9591
9612
  };
9592
9613
 
9593
9614
  var jstGoods = function jstGoods(props) {
9594
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
9615
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
9595
9616
  var _props$value = props.value,
9596
9617
  value = _props$value === void 0 ? [] : _props$value,
9597
9618
  _props$options = props.options,
@@ -9704,6 +9725,13 @@ var jstGoods = function jstGoods(props) {
9704
9725
  return changeInputHandle(e.target.value, 'sendName');
9705
9726
  },
9706
9727
  value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
9728
+ })) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
9729
+ disabled: disabled,
9730
+ placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
9731
+ onChange: function onChange(e) {
9732
+ return changeInputHandle(e.target.value, 'deliveryNo');
9733
+ },
9734
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
9707
9735
  })) : null) : null);
9708
9736
  };
9709
9737
 
@@ -10223,6 +10251,18 @@ var GoodItem = function GoodItem(props) {
10223
10251
  }
10224
10252
  });
10225
10253
  }
10254
+ }, {
10255
+ dataIndex: 'skuName',
10256
+ title: "".concat(text, "sku\u540D\u79F0"),
10257
+ align: 'center',
10258
+ ellipsis: true,
10259
+ width: 250
10260
+ }, {
10261
+ dataIndex: 'sku',
10262
+ title: "".concat(text, "sku\u7F16\u7801"),
10263
+ align: 'center',
10264
+ ellipsis: true,
10265
+ width: 100
10226
10266
  }, {
10227
10267
  dataIndex: 'name',
10228
10268
  title: "".concat(text, "\u540D\u79F0"),
@@ -10247,12 +10287,6 @@ var GoodItem = function GoodItem(props) {
10247
10287
  align: 'center',
10248
10288
  ellipsis: true,
10249
10289
  width: 100
10250
- }, {
10251
- dataIndex: 'sku',
10252
- title: "".concat(text, "sku\u7F16\u7801"),
10253
- align: 'center',
10254
- ellipsis: true,
10255
- width: 100
10256
10290
  }, {
10257
10291
  dataIndex: 'money',
10258
10292
  title: "\u5B9E\u4ED8\u91D1\u989D",
@@ -10330,11 +10364,13 @@ var GoodItem = function GoodItem(props) {
10330
10364
  name = item.name,
10331
10365
  code = item.code,
10332
10366
  skuCode = item.skuCode,
10333
- marketPrice = item.marketPrice;
10367
+ marketPrice = item.marketPrice,
10368
+ skuName = item.skuName;
10334
10369
  return {
10335
10370
  id: goodsId,
10336
10371
  mark: '是',
10337
10372
  pic: '',
10373
+ skuName: skuName,
10338
10374
  name: name,
10339
10375
  code: code,
10340
10376
  sku: skuCode,
@@ -10742,7 +10778,7 @@ var BsReissue = function BsReissue(props) {
10742
10778
  var valueRef = React.useRef({});
10743
10779
  React.useEffect(function () {
10744
10780
  pubsub__default['default'].subscribe('reissueSelectList', function (_, data) {
10745
- console.log('reissueSelectList', data);
10781
+ // console.log('reissueSelectList', data);
10746
10782
  if (disabled) return;
10747
10783
  var newValue = _objectSpread2({}, data.goodValue);
10748
10784
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
@@ -10756,7 +10792,7 @@ var BsReissue = function BsReissue(props) {
10756
10792
  }, []);
10757
10793
  React.useEffect(function () {
10758
10794
  pubsub__default['default'].subscribe('reissueSelectListReturn', function (_, data) {
10759
- console.log('reissueSelectListReturn', data);
10795
+ // console.log('reissueSelectListReturn', data);
10760
10796
  if (disabled) return;
10761
10797
  var newValue = _objectSpread2({}, data.goodValue);
10762
10798
  newValue.bsReissueGoods = data === null || data === void 0 ? void 0 : data.list.map(function (item) {
@@ -11406,7 +11442,7 @@ var Goods$1 = function Goods(props, ref) {
11406
11442
  var index$1 = /*#__PURE__*/React.forwardRef(Goods$1);
11407
11443
 
11408
11444
  var _excluded$f = ["onChange", "value", "failValue"];
11409
- function MultiStatus(props) {
11445
+ function CommonStatus(props) {
11410
11446
  var onChange = props.onChange,
11411
11447
  value = props.value,
11412
11448
  failValue = props.failValue,
@@ -11419,6 +11455,7 @@ function MultiStatus(props) {
11419
11455
  };
11420
11456
  return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
11421
11457
  showSearch: true,
11458
+ value: value === null || value === void 0 ? void 0 : value.status,
11422
11459
  filterOption: function filterOption(input, option) {
11423
11460
  return option.label.includes(input);
11424
11461
  }
@@ -11427,6 +11464,163 @@ function MultiStatus(props) {
11427
11464
  }));
11428
11465
  }
11429
11466
 
11467
+ var CommonSystemOrder = function CommonSystemOrder(props) {
11468
+ var _value$changeIndex, _value$changeIndex2;
11469
+ var _props$value = props.value,
11470
+ value = _props$value === void 0 ? [] : _props$value,
11471
+ onChange = props.onChange,
11472
+ disabled = props.disabled,
11473
+ _props$type = props.type,
11474
+ type = _props$type === void 0 ? 1 : _props$type;
11475
+ var _useState = React.useState(0),
11476
+ _useState2 = _slicedToArray(_useState, 2),
11477
+ changeIndex = _useState2[0],
11478
+ setChangeIndex = _useState2[1]; //选中的包裹
11479
+ React.useEffect(function () {
11480
+ setChangeIndex(0);
11481
+ }, []);
11482
+ var content = function content(item, index) {
11483
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11484
+ style: {
11485
+ maxHeight: '300px',
11486
+ overflowY: 'auto'
11487
+ }
11488
+ }, type === 1 ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11489
+ };
11490
+ var changeInputHandle = function changeInputHandle(val, type) {
11491
+ var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11492
+ changeOrderInfo[type] = val;
11493
+ var newList = _toConsumableArray(value);
11494
+ newList[changeIndex] = changeOrderInfo;
11495
+ onChange === null || onChange === void 0 ? void 0 : onChange(newList);
11496
+ };
11497
+ //判断是否是单个且没有商品数据
11498
+ var isSingle = React.useMemo(function () {
11499
+ return value && value.length === 1;
11500
+ }, [value]);
11501
+ return /*#__PURE__*/React__default['default'].createElement("div", null, !isSingle ? /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
11502
+ wrap: true
11503
+ }, (value || []).map(function (item, index) {
11504
+ return /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
11505
+ content: content(item, index),
11506
+ key: index
11507
+ }, /*#__PURE__*/React__default['default'].createElement("span", {
11508
+ style: {
11509
+ color: changeIndex === index ? '#4569d4' : 'black',
11510
+ cursor: 'pointer'
11511
+ },
11512
+ onClick: function onClick() {
11513
+ return setChangeIndex(index);
11514
+ }
11515
+ }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
11516
+ }))) : 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.Input, {
11517
+ disabled: disabled,
11518
+ placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11519
+ onChange: function onChange(e) {
11520
+ return changeInputHandle(e.target.value, 'deliveryNo');
11521
+ },
11522
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.deliveryNo
11523
+ })) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
11524
+ disabled: disabled,
11525
+ placeholder: "\u8BF7\u8F93\u5165\u9000\u8D27\u5355id",
11526
+ onChange: function onChange(e) {
11527
+ return changeInputHandle(e.target.value, 'returnGoodsTradeId');
11528
+ },
11529
+ value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
11530
+ })) : null) : null);
11531
+ };
11532
+
11533
+ var _excluded$g = ["value", "onChange", "disabled", "failValue", "type"];
11534
+ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
11535
+ var _value$changeIndex;
11536
+ var _props$value = props.value,
11537
+ value = _props$value === void 0 ? [] : _props$value,
11538
+ onChange = props.onChange,
11539
+ disabled = props.disabled,
11540
+ failValue = props.failValue,
11541
+ _props$type = props.type,
11542
+ type = _props$type === void 0 ? 1 : _props$type,
11543
+ other = _objectWithoutProperties(props, _excluded$g);
11544
+ var _useState = React.useState(0),
11545
+ _useState2 = _slicedToArray(_useState, 2),
11546
+ changeIndex = _useState2[0],
11547
+ setChangeIndex = _useState2[1]; //选中的包裹
11548
+ React.useEffect(function () {
11549
+ setChangeIndex(0);
11550
+ }, []);
11551
+ var content = function content(item, index) {
11552
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11553
+ style: {
11554
+ maxHeight: '300px',
11555
+ overflowY: 'auto'
11556
+ }
11557
+ }, type === 1 ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId) : null);
11558
+ };
11559
+ var changeHandle = function changeHandle(val, valType) {
11560
+ console.log(val, valType);
11561
+ var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11562
+ changeOrderInfo[valType] = val;
11563
+ if (val === failValue) {
11564
+ changeOrderInfo.reason = '';
11565
+ }
11566
+ var newList = _toConsumableArray(value);
11567
+ newList[changeIndex] = changeOrderInfo;
11568
+ onChange === null || onChange === void 0 ? void 0 : onChange(newList);
11569
+ };
11570
+ //判断是否是单个且没有商品数据
11571
+ var isSingle = React.useMemo(function () {
11572
+ return value && value.length === 1;
11573
+ }, [value]);
11574
+ return /*#__PURE__*/React__default['default'].createElement("div", null, !isSingle ? /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
11575
+ wrap: true
11576
+ }, (value || []).map(function (item, index) {
11577
+ return /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
11578
+ content: content(item, index),
11579
+ key: index
11580
+ }, /*#__PURE__*/React__default['default'].createElement("span", {
11581
+ style: {
11582
+ color: changeIndex === index ? '#4569d4' : 'black',
11583
+ cursor: 'pointer'
11584
+ },
11585
+ onClick: function onClick() {
11586
+ return setChangeIndex(index);
11587
+ }
11588
+ }, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
11589
+ }))) : 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, _objectSpread2(_objectSpread2({}, other), {}, {
11590
+ showSearch: true,
11591
+ value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
11592
+ filterOption: function filterOption(input, option) {
11593
+ return option.label.includes(input);
11594
+ },
11595
+ style: {
11596
+ width: 200
11597
+ },
11598
+ placeholder: "\u8BF7\u9009\u62E9",
11599
+ disabled: disabled,
11600
+ onChange: function onChange(val) {
11601
+ return changeHandle(val, 'status');
11602
+ }
11603
+ }))) : null) : null);
11604
+ };
11605
+
11606
+ var CalculationInput = function CalculationInput(props) {
11607
+ var _props$config = props.config,
11608
+ config = _props$config === void 0 ? {} : _props$config;
11609
+ return /*#__PURE__*/React__default['default'].createElement("span", {
11610
+ style: {
11611
+ display: 'flex',
11612
+ alignItems: 'center'
11613
+ }
11614
+ }, /*#__PURE__*/React__default['default'].createElement(ApaasInput, _objectSpread2(_objectSpread2({}, props), {}, {
11615
+ placeholder: "\u6839\u636E\u89C4\u5219\u914D\u7F6E\uFF0C\u81EA\u52A8\u8BA1\u7B97\u6570\u503C"
11616
+ })), /*#__PURE__*/React__default['default'].createElement("span", {
11617
+ style: {
11618
+ marginLeft: '4px',
11619
+ width: '88px'
11620
+ }
11621
+ }, config === null || config === void 0 ? void 0 : config.unit));
11622
+ };
11623
+
11430
11624
  exports.Address = ApaasAddress;
11431
11625
  exports.AliPay = AliPay;
11432
11626
  exports.ApaasAddress = Province;
@@ -11452,8 +11646,11 @@ exports.BsGoods = BsGoods;
11452
11646
  exports.BsReissue = BsReissue;
11453
11647
  exports.BsSystemOrder = index;
11454
11648
  exports.BuyerNick = BuyerNick;
11649
+ exports.CalculationInput = CalculationInput;
11455
11650
  exports.ChooseBaby = ChooseBaby;
11456
- exports.CommonStatus = MultiStatus;
11651
+ exports.CommonMultiStatus = CommonSystemOrder$1;
11652
+ exports.CommonStatus = CommonStatus;
11653
+ exports.CommonSystemOrder = CommonSystemOrder;
11457
11654
  exports.ExpressLogistics = ExpressLogistics;
11458
11655
  exports.Goods = Goods;
11459
11656
  exports.GoodsTable = index$1;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CalculationInput: (props: any) => React.JSX.Element;
3
+ export default CalculationInput;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface CommonSystemOrderProps {
3
+ value: {
4
+ status: string;
5
+ reason?: string;
6
+ systemOrderId?: string;
7
+ }[];
8
+ failValue: string;
9
+ options: any[];
10
+ onChange: (val: any) => void;
11
+ disabled: boolean;
12
+ type: number;
13
+ }
14
+ declare const CommonSystemOrder: (props: Partial<CommonSystemOrderProps>) => React.JSX.Element;
15
+ export default CommonSystemOrder;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface MultiStatusProps {
2
+ interface CommonStatusProps {
3
3
  value: {
4
4
  status: string;
5
5
  reason: string;
@@ -8,5 +8,5 @@ interface MultiStatusProps {
8
8
  options: any[];
9
9
  onChange: (val: any) => void;
10
10
  }
11
- declare function MultiStatus(props: Partial<MultiStatusProps>): React.JSX.Element;
12
- export default MultiStatus;
11
+ declare function CommonStatus(props: Partial<CommonStatusProps>): React.JSX.Element;
12
+ export default CommonStatus;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface CommonSystemOrderProps {
3
+ value: any[];
4
+ type: number;
5
+ options: any[];
6
+ disabled: boolean;
7
+ onChange: (val: any[]) => void;
8
+ }
9
+ declare const CommonSystemOrder: (props: Partial<CommonSystemOrderProps>) => React.JSX.Element;
10
+ export default CommonSystemOrder;
@@ -42,5 +42,8 @@ export { default as BsReissue } from './bs/Reissue';
42
42
  export { default as BsSystemOrder } from './bs/SystemOrder';
43
43
  export { default as GoodsTable } from './common/GoodsTable';
44
44
  export { default as CommonStatus } from './common/CommonStatus';
45
+ export { default as CommonSystemOrder } from './common/CommonSystemOrder';
46
+ export { default as CommonMultiStatus } from './common/CommonMultiStatus';
45
47
  export { default as ParseLogistics } from './common/ParseLogistics';
46
48
  export { default as IdentifyAddress } from './common/IdentifyAddress';
49
+ export { default as CalculationInput } from './apaas/CalculationInput';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.8.17-alpha.3",
3
+ "version": "0.8.17-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.8.17-alpha.3",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.17-alpha.29",
24
24
  "lodash": "^4.17.21",
25
25
  "pubsub-js": "^1.9.4",
26
26
  "react-copy-to-clipboard": "^5.1.0",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "786f70288b3d7e56d59f1ebca743de08cc5b38b2"
63
+ "gitHead": "f11e9806c4e5eb7941734a8331ba324e692e191c"
64
64
  }