@kmkf-fe-packages/basic-components 0.29.2-rc.0 → 1.0.0

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
@@ -9698,9 +9698,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
9698
9698
  _props$disabled = props.disabled,
9699
9699
  disabled = _props$disabled === void 0 ? false : _props$disabled,
9700
9700
  _props$isEditing = props.isEditing,
9701
- isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
9702
- _props$showState = props.showState,
9703
- showState = _props$showState === void 0 ? false : _props$showState;
9701
+ isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
9704
9702
  var _useState = useState(''),
9705
9703
  _useState2 = _slicedToArray(_useState, 2),
9706
9704
  initCompany = _useState2[0],
@@ -9835,8 +9833,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
9835
9833
  interceptReceiverMobile: undefined,
9836
9834
  interceptLogisticsStatus: undefined,
9837
9835
  interceptLogisticsStatusOther: undefined,
9838
- interceptLogisticsSnapshot: undefined,
9839
- qySelfInterceptLogisticsStatus: undefined
9836
+ interceptLogisticsSnapshot: undefined
9840
9837
  });
9841
9838
  }
9842
9839
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -9981,24 +9978,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
9981
9978
  onChange: function onChange(e) {
9982
9979
  return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
9983
9980
  }
9984
- })), /*#__PURE__*/React.createElement(Item, {
9985
- label: '拦截状态',
9986
- key: 'qySelfInterceptLogisticsStatus',
9987
- hidden: showState
9988
- }, /*#__PURE__*/React.createElement(Select, {
9989
- value: value === null || value === void 0 ? void 0 : value.qySelfInterceptLogisticsStatus,
9990
- disabled: disabled || isEdit,
9991
- placeholder: "\u62E6\u622A\u72B6\u6001",
9992
- onChange: function onChange(val) {
9993
- return changeHandle(val, 'qySelfInterceptLogisticsStatus');
9994
- },
9995
- options: [{
9996
- label: '拦截成功',
9997
- value: '拦截成功'
9998
- }, {
9999
- label: '拦截失败',
10000
- value: '拦截失败'
10001
- }]
10002
9981
  })));
10003
9982
  };
10004
9983
 
@@ -10423,7 +10402,7 @@ var typeInitValueMap = {
10423
10402
  }]
10424
10403
  };
10425
10404
  var jstGoods = function jstGoods(props) {
10426
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
10405
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
10427
10406
  var _props$value = props.value,
10428
10407
  value = _props$value === void 0 ? [] : _props$value,
10429
10408
  onChange = props.onChange,
@@ -10431,25 +10410,17 @@ var jstGoods = function jstGoods(props) {
10431
10410
  _props$type = props.type,
10432
10411
  type = _props$type === void 0 ? 1 : _props$type,
10433
10412
  _props$showField = props.showField,
10434
- showField = _props$showField === void 0 ? '' : _props$showField,
10435
- _props$componentType = props.componentType,
10436
- componentType = _props$componentType === void 0 ? '' : _props$componentType;
10413
+ showField = _props$showField === void 0 ? '' : _props$showField;
10437
10414
  var _useState = useState(0),
10438
10415
  _useState2 = _slicedToArray(_useState, 2),
10439
10416
  changeIndex = _useState2[0],
10440
10417
  setChangeIndex = _useState2[1]; //选中的包裹
10441
- var _useState3 = useState([]),
10442
- _useState4 = _slicedToArray(_useState3, 2),
10443
- wdtSendOptions = _useState4[0],
10444
- setSendOptions = _useState4[1];
10445
10418
  useEffect(function () {
10446
10419
  //没有值塞个默认值
10447
10420
  if (!(value === null || value === void 0 ? void 0 : value.length)) {
10448
10421
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10449
10422
  }
10450
10423
  }, [value, type]);
10451
- useEffect(function () {
10452
- }, []);
10453
10424
  var content = function content(item, index) {
10454
10425
  return /*#__PURE__*/React.createElement("div", {
10455
10426
  style: {
@@ -10470,18 +10441,6 @@ var jstGoods = function jstGoods(props) {
10470
10441
  }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
10471
10442
  }));
10472
10443
  };
10473
- var handleSelected = function handleSelected(val, type, option) {
10474
- var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10475
- changeOrderInfo[type] = val;
10476
- changeOrderInfo['sendId'] = option.warehouseNo;
10477
- var newList = _toConsumableArray(value);
10478
- newList[changeIndex] = changeOrderInfo;
10479
- onChange === null || onChange === void 0 ? void 0 : onChange(newList);
10480
- };
10481
- var filterOption = function filterOption(input, option) {
10482
- var _option$label;
10483
- return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
10484
- };
10485
10444
  var changeInputHandle = function changeInputHandle(val, type) {
10486
10445
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10487
10446
  changeOrderInfo[type] = val;
@@ -10552,34 +10511,20 @@ var jstGoods = function jstGoods(props) {
10552
10511
  return changeInputHandle(e.target.value, 'sendId');
10553
10512
  },
10554
10513
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
10555
- }), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React.createElement(Select, {
10556
- style: {
10557
- minWidth: '100px',
10558
- maxWidth: '180px'
10559
- },
10560
- disabled: disabled,
10561
- placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
10562
- showSearch: true,
10563
- options: wdtSendOptions,
10564
- filterOption: filterOption,
10565
- value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
10566
- onChange: function onChange(value, option) {
10567
- return handleSelected(value, 'sendName', option);
10568
- }
10569
- }) : /*#__PURE__*/React.createElement(Input, {
10514
+ }), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
10570
10515
  disabled: disabled,
10571
10516
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
10572
10517
  onChange: function onChange(e) {
10573
10518
  return changeInputHandle(e.target.value, 'sendName');
10574
10519
  },
10575
- value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10576
- }))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
10520
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
10521
+ })) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
10577
10522
  disabled: disabled,
10578
10523
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
10579
10524
  onChange: function onChange(e) {
10580
10525
  return changeInputHandle(e.target.value, 'deliveryNo');
10581
10526
  },
10582
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
10527
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10583
10528
  })) : null) : null);
10584
10529
  };
10585
10530
 
@@ -12386,6 +12331,20 @@ var typeMap = {
12386
12331
  money: 'money',
12387
12332
  share: 'share'
12388
12333
  }
12334
+ },
12335
+ WDT_REISSUE_GOODS: {
12336
+ key: 'wdtReissueGoods',
12337
+ name: '旺店通',
12338
+ typeName: 'wdtReissueType',
12339
+ reissueSelectList: 'wdtReissueSelectList',
12340
+ reissueSelectListReturn: 'wdtReissueSelectListReturn',
12341
+ reissueDeleteGood: 'wdtReissueDeleteGood',
12342
+ changeShopCode: 'wdtChangeShopCode',
12343
+ reissueType: 'wdtReissueType',
12344
+ formatDefaultField: {
12345
+ money: 'orderPrice',
12346
+ share: 'sharePrice'
12347
+ }
12389
12348
  }
12390
12349
  };
12391
12350
  var BsReissue = function BsReissue(props) {
@@ -12988,245 +12947,6 @@ var CommonGoods = function CommonGoods(props) {
12988
12947
  }));
12989
12948
  };
12990
12949
 
12991
- var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
12992
- var typeMap$1 = {
12993
- WDT_REISSUE_GOODS: {
12994
- key: 'wdtReissueGoods',
12995
- name: '旺店通',
12996
- typeName: 'wdtReissueType',
12997
- wdtSystemOrder: 'wdtSystemOrder',
12998
- wdtSystemOrderNo: 'wdtSystemOrderNo',
12999
- reissueSelectList: 'wdtReissueSelectList',
13000
- reissueSelectListReturn: 'wdtReissueSelectListReturn',
13001
- reissueDeleteGood: 'wdtReissueDeleteGood',
13002
- changeShopCode: 'wdtChangeShopCode',
13003
- reissueType: 'wdtReissueType',
13004
- formatDefaultField: {
13005
- money: 'orderPrice',
13006
- share: 'sharePrice'
13007
- }
13008
- }
13009
- };
13010
- var wdtReissue = function wdtReissue(props) {
13011
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
13012
- var value = props.value,
13013
- onChange = props.onChange,
13014
- _props$reasonList = props.reasonList,
13015
- reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
13016
- disabled = props.disabled,
13017
- type = props.type,
13018
- other = _objectWithoutProperties(props, _excluded$g);
13019
- var valueRef = useRef({});
13020
- useEffect(function () {
13021
- var _typeMap$type, _typeMap$type4;
13022
- valueRef.current = value;
13023
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
13024
- if (disabled) return;
13025
- if (value) {
13026
- var _typeMap$type2, _typeMap$type3;
13027
- var newValue = _objectSpread2({}, value);
13028
- newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
13029
- return item.sku !== data;
13030
- });
13031
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13032
- }
13033
- });
13034
- pubsub.subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
13035
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13036
- shopCode: data.shopCode
13037
- }));
13038
- });
13039
- }, [value, disabled]);
13040
- useEffect(function () {
13041
- var _value$orders, _value$showOrderInfo;
13042
- if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
13043
- if (type === 'WDT_SYSTEM_ORDER') {
13044
- getWdtOrderList(value.orderNo);
13045
- }
13046
- }
13047
- return;
13048
- }, [value]);
13049
- useEffect(function () {
13050
- var _typeMap$type5;
13051
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
13052
- if (wdtSystemOrderNo) {
13053
- var _value$typeMap$type$t, _typeMap$type6;
13054
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
13055
- getGoodItems(wdtSystemOrderNo);
13056
- }
13057
- }
13058
- return;
13059
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
13060
- useEffect(function () {
13061
- var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
13062
- var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
13063
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
13064
- if (['1'].includes(typeName)) {
13065
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
13066
- } else if (['2'].includes(typeName)) {
13067
- var _typeMap$type10;
13068
- var newValue = _objectSpread2({}, value);
13069
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
13070
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13071
- }
13072
- return;
13073
- }, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
13074
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
13075
- var _value$typeMap$type$w, _typeMap$type12, _ref;
13076
- var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
13077
- var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
13078
- return orderItem.billNo === wdtSystemOrderNo;
13079
- });
13080
- if (order) {
13081
- var _typeMap$type13, _order$goodDetails;
13082
- var newValue = _objectSpread2({}, value);
13083
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
13084
- var _typeMap$type14, _typeMap$type15;
13085
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
13086
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
13087
- item.canUpdateNumber = true;
13088
- return item;
13089
- });
13090
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13091
- }
13092
- };
13093
- var getWdtOrderList = /*#__PURE__*/function () {
13094
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
13095
- var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
13096
- return _regeneratorRuntime().wrap(function _callee$(_context) {
13097
- while (1) switch (_context.prev = _context.next) {
13098
- case 0:
13099
- _context.next = 2;
13100
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13101
- method: 'post',
13102
- data: {
13103
- billNo: orderNo
13104
- }
13105
- });
13106
- case 2:
13107
- _yield$request = _context.sent;
13108
- success = _yield$request.success;
13109
- data = _yield$request.data;
13110
- if (success) {
13111
- orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
13112
- return _objectSpread2(_objectSpread2({}, item), {}, {
13113
- billNo: item.tradeNo,
13114
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13115
- billTag: item.tagName
13116
- });
13117
- });
13118
- showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
13119
- return {
13120
- billNo: item.tradeNo,
13121
- billType: WDT_ORDER_TYPE_MAP[item.tradeType],
13122
- billTag: item.tagName
13123
- };
13124
- });
13125
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
13126
- showOrderInfo: showOrderInfo,
13127
- orders: orders
13128
- }))));
13129
- }
13130
- case 6:
13131
- case "end":
13132
- return _context.stop();
13133
- }
13134
- }, _callee);
13135
- }));
13136
- return function getWdtOrderList(_x) {
13137
- return _ref2.apply(this, arguments);
13138
- };
13139
- }();
13140
- var changeTypeHandle = function changeTypeHandle(val) {
13141
- var _typeMap$type18, _typeMap$type19;
13142
- var newValue = _objectSpread2({}, value);
13143
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
13144
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
13145
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13146
- valueRef.current = newValue;
13147
- // if (['2'].includes(val[0])) {
13148
- // onChange?.(newValue);
13149
- // valueRef.current = newValue;
13150
- // }
13151
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
13152
- // val: val[0],
13153
- // goodValue: newValue,
13154
- // });
13155
- };
13156
-
13157
- var changeGoodHandle = function changeGoodHandle(val) {
13158
- var _typeMap$type20;
13159
- var newValue = _objectSpread2({}, value);
13160
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
13161
- var _typeMap$type21, _typeMap$type22;
13162
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
13163
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
13164
- return item;
13165
- });
13166
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13167
- };
13168
- var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
13169
- var _typeMap$type23;
13170
- var newValue = _objectSpread2({}, value);
13171
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
13172
- console.log('changeSystemOrderHandle', val, newValue);
13173
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13174
- };
13175
- //显示选择商品按钮 原单换不显示选择商品
13176
- var showChangeBtn = useMemo(function () {
13177
- var _typeMap$type24;
13178
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
13179
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
13180
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
13181
- gutter: 8
13182
- }, /*#__PURE__*/React.createElement(Col, {
13183
- className: "gutter-row",
13184
- span: 6
13185
- }, /*#__PURE__*/React.createElement(Select, {
13186
- style: {
13187
- marginBottom: '8px'
13188
- },
13189
- disabled: disabled,
13190
- allowClear: false,
13191
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
13192
- onChange: function onChange(val) {
13193
- return changeSystemOrderHandle(val);
13194
- }
13195
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
13196
- return /*#__PURE__*/React.createElement(Select.Option, {
13197
- key: item.billNo,
13198
- value: item.billNo,
13199
- label: item.billNo
13200
- }, item.billNo);
13201
- }))), /*#__PURE__*/React.createElement(Col, {
13202
- className: "gutter-row",
13203
- span: 6
13204
- }, /*#__PURE__*/React.createElement(Cascader, {
13205
- style: {
13206
- marginBottom: '8px'
13207
- },
13208
- disabled: disabled,
13209
- allowClear: false,
13210
- options: reasonList,
13211
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
13212
- onChange: function onChange(val) {
13213
- return changeTypeHandle(val);
13214
- }
13215
- }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
13216
- key: 'reissueGoods'
13217
- }, other), {}, {
13218
- type: type,
13219
- disabled: disabled,
13220
- canUpdateNumber: showChangeBtn,
13221
- showChangeBtn: showChangeBtn,
13222
- shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
13223
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
13224
- onChange: function onChange(val) {
13225
- return changeGoodHandle(val);
13226
- }
13227
- })));
13228
- };
13229
-
13230
12950
  var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
13231
12951
  styleInject(css_248z$a);
13232
12952
 
@@ -13703,12 +13423,12 @@ var Goods$1 = function Goods(props, ref) {
13703
13423
  };
13704
13424
  var index$2 = /*#__PURE__*/forwardRef(Goods$1);
13705
13425
 
13706
- var _excluded$h = ["onChange", "value", "failValue"];
13426
+ var _excluded$g = ["onChange", "value", "failValue"];
13707
13427
  function CommonStatus(props) {
13708
13428
  var onChange = props.onChange,
13709
13429
  value = props.value,
13710
13430
  failValue = props.failValue,
13711
- other = _objectWithoutProperties(props, _excluded$h);
13431
+ other = _objectWithoutProperties(props, _excluded$g);
13712
13432
  var changeHandle = function changeHandle(val) {
13713
13433
  onChange === null || onChange === void 0 ? void 0 : onChange({
13714
13434
  status: val,
@@ -13827,7 +13547,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
13827
13547
  })) : null) : null);
13828
13548
  };
13829
13549
 
13830
- var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13550
+ var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
13831
13551
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13832
13552
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
13833
13553
  var _props$value = props.value,
@@ -13837,7 +13557,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13837
13557
  failValue = props.failValue,
13838
13558
  _props$type = props.type,
13839
13559
  type = _props$type === void 0 ? 1 : _props$type,
13840
- other = _objectWithoutProperties(props, _excluded$i);
13560
+ other = _objectWithoutProperties(props, _excluded$h);
13841
13561
  var _useState = useState(0),
13842
13562
  _useState2 = _slicedToArray(_useState, 2),
13843
13563
  changeIndex = _useState2[0],
@@ -13903,7 +13623,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13903
13623
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
13904
13624
  };
13905
13625
 
13906
- var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
13626
+ var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13907
13627
  var msgTypeCh = {
13908
13628
  ding: '钉钉',
13909
13629
  wechat: '微信',
@@ -13919,7 +13639,7 @@ var MsgStatus = function MsgStatus(props) {
13919
13639
  failValue = props.failValue,
13920
13640
  _props$type = props.type,
13921
13641
  type = _props$type === void 0 ? 1 : _props$type,
13922
- other = _objectWithoutProperties(props, _excluded$j);
13642
+ other = _objectWithoutProperties(props, _excluded$i);
13923
13643
  var _useState = useState(0),
13924
13644
  _useState2 = _slicedToArray(_useState, 2),
13925
13645
  changeIndex = _useState2[0],
@@ -13988,4 +13708,4 @@ var CalculationInput = function CalculationInput(props) {
13988
13708
  }, config === null || config === void 0 ? void 0 : config.unit));
13989
13709
  };
13990
13710
 
13991
- 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, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, wdtReissue as WdtReissue, WlnGoods };
13711
+ 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, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
package/dist/index.js CHANGED
@@ -9709,9 +9709,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
9709
9709
  _props$disabled = props.disabled,
9710
9710
  disabled = _props$disabled === void 0 ? false : _props$disabled,
9711
9711
  _props$isEditing = props.isEditing,
9712
- isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
9713
- _props$showState = props.showState,
9714
- showState = _props$showState === void 0 ? false : _props$showState;
9712
+ isEditing = _props$isEditing === void 0 ? false : _props$isEditing;
9715
9713
  var _useState = React.useState(''),
9716
9714
  _useState2 = _slicedToArray(_useState, 2),
9717
9715
  initCompany = _useState2[0],
@@ -9846,8 +9844,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
9846
9844
  interceptReceiverMobile: undefined,
9847
9845
  interceptLogisticsStatus: undefined,
9848
9846
  interceptLogisticsStatusOther: undefined,
9849
- interceptLogisticsSnapshot: undefined,
9850
- qySelfInterceptLogisticsStatus: undefined
9847
+ interceptLogisticsSnapshot: undefined
9851
9848
  });
9852
9849
  }
9853
9850
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
@@ -9992,24 +9989,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
9992
9989
  onChange: function onChange(e) {
9993
9990
  return changeHandle(e.target.value, 'interceptLogisticsStatusOther');
9994
9991
  }
9995
- })), /*#__PURE__*/React__default['default'].createElement(Item, {
9996
- label: '拦截状态',
9997
- key: 'qySelfInterceptLogisticsStatus',
9998
- hidden: showState
9999
- }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
10000
- value: value === null || value === void 0 ? void 0 : value.qySelfInterceptLogisticsStatus,
10001
- disabled: disabled || isEdit,
10002
- placeholder: "\u62E6\u622A\u72B6\u6001",
10003
- onChange: function onChange(val) {
10004
- return changeHandle(val, 'qySelfInterceptLogisticsStatus');
10005
- },
10006
- options: [{
10007
- label: '拦截成功',
10008
- value: '拦截成功'
10009
- }, {
10010
- label: '拦截失败',
10011
- value: '拦截失败'
10012
- }]
10013
9992
  })));
10014
9993
  };
10015
9994
 
@@ -10434,7 +10413,7 @@ var typeInitValueMap = {
10434
10413
  }]
10435
10414
  };
10436
10415
  var jstGoods = function jstGoods(props) {
10437
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8;
10416
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7;
10438
10417
  var _props$value = props.value,
10439
10418
  value = _props$value === void 0 ? [] : _props$value,
10440
10419
  onChange = props.onChange,
@@ -10442,25 +10421,17 @@ var jstGoods = function jstGoods(props) {
10442
10421
  _props$type = props.type,
10443
10422
  type = _props$type === void 0 ? 1 : _props$type,
10444
10423
  _props$showField = props.showField,
10445
- showField = _props$showField === void 0 ? '' : _props$showField,
10446
- _props$componentType = props.componentType,
10447
- componentType = _props$componentType === void 0 ? '' : _props$componentType;
10424
+ showField = _props$showField === void 0 ? '' : _props$showField;
10448
10425
  var _useState = React.useState(0),
10449
10426
  _useState2 = _slicedToArray(_useState, 2),
10450
10427
  changeIndex = _useState2[0],
10451
10428
  setChangeIndex = _useState2[1]; //选中的包裹
10452
- var _useState3 = React.useState([]),
10453
- _useState4 = _slicedToArray(_useState3, 2),
10454
- wdtSendOptions = _useState4[0],
10455
- setSendOptions = _useState4[1];
10456
10429
  React.useEffect(function () {
10457
10430
  //没有值塞个默认值
10458
10431
  if (!(value === null || value === void 0 ? void 0 : value.length)) {
10459
10432
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10460
10433
  }
10461
10434
  }, [value, type]);
10462
- React.useEffect(function () {
10463
- }, []);
10464
10435
  var content = function content(item, index) {
10465
10436
  return /*#__PURE__*/React__default['default'].createElement("div", {
10466
10437
  style: {
@@ -10481,18 +10452,6 @@ var jstGoods = function jstGoods(props) {
10481
10452
  }), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", null, t.title), /*#__PURE__*/React__default['default'].createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
10482
10453
  }));
10483
10454
  };
10484
- var handleSelected = function handleSelected(val, type, option) {
10485
- var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10486
- changeOrderInfo[type] = val;
10487
- changeOrderInfo['sendId'] = option.warehouseNo;
10488
- var newList = _toConsumableArray(value);
10489
- newList[changeIndex] = changeOrderInfo;
10490
- onChange === null || onChange === void 0 ? void 0 : onChange(newList);
10491
- };
10492
- var filterOption = function filterOption(input, option) {
10493
- var _option$label;
10494
- return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').includes(input);
10495
- };
10496
10455
  var changeInputHandle = function changeInputHandle(val, type) {
10497
10456
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
10498
10457
  changeOrderInfo[type] = val;
@@ -10563,34 +10522,20 @@ var jstGoods = function jstGoods(props) {
10563
10522
  return changeInputHandle(e.target.value, 'sendId');
10564
10523
  },
10565
10524
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
10566
- }), ['sendName', 'all'].includes(showField) && (componentType === 'WDT_SEND_GOOD' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
10567
- style: {
10568
- minWidth: '100px',
10569
- maxWidth: '180px'
10570
- },
10571
- disabled: disabled,
10572
- placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
10573
- showSearch: true,
10574
- options: wdtSendOptions,
10575
- filterOption: filterOption,
10576
- value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName,
10577
- onChange: function onChange(value, option) {
10578
- return handleSelected(value, 'sendName', option);
10579
- }
10580
- }) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
10525
+ }), ['sendName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
10581
10526
  disabled: disabled,
10582
10527
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u540D\u79F0",
10583
10528
  onChange: function onChange(e) {
10584
10529
  return changeInputHandle(e.target.value, 'sendName');
10585
10530
  },
10586
- value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10587
- }))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
10531
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName
10532
+ })) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
10588
10533
  disabled: disabled,
10589
10534
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
10590
10535
  onChange: function onChange(e) {
10591
10536
  return changeInputHandle(e.target.value, 'deliveryNo');
10592
10537
  },
10593
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
10538
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName
10594
10539
  })) : null) : null);
10595
10540
  };
10596
10541
 
@@ -12397,6 +12342,20 @@ var typeMap = {
12397
12342
  money: 'money',
12398
12343
  share: 'share'
12399
12344
  }
12345
+ },
12346
+ WDT_REISSUE_GOODS: {
12347
+ key: 'wdtReissueGoods',
12348
+ name: '旺店通',
12349
+ typeName: 'wdtReissueType',
12350
+ reissueSelectList: 'wdtReissueSelectList',
12351
+ reissueSelectListReturn: 'wdtReissueSelectListReturn',
12352
+ reissueDeleteGood: 'wdtReissueDeleteGood',
12353
+ changeShopCode: 'wdtChangeShopCode',
12354
+ reissueType: 'wdtReissueType',
12355
+ formatDefaultField: {
12356
+ money: 'orderPrice',
12357
+ share: 'sharePrice'
12358
+ }
12400
12359
  }
12401
12360
  };
12402
12361
  var BsReissue = function BsReissue(props) {
@@ -12999,245 +12958,6 @@ var CommonGoods = function CommonGoods(props) {
12999
12958
  }));
13000
12959
  };
13001
12960
 
13002
- var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
13003
- var typeMap$1 = {
13004
- WDT_REISSUE_GOODS: {
13005
- key: 'wdtReissueGoods',
13006
- name: '旺店通',
13007
- typeName: 'wdtReissueType',
13008
- wdtSystemOrder: 'wdtSystemOrder',
13009
- wdtSystemOrderNo: 'wdtSystemOrderNo',
13010
- reissueSelectList: 'wdtReissueSelectList',
13011
- reissueSelectListReturn: 'wdtReissueSelectListReturn',
13012
- reissueDeleteGood: 'wdtReissueDeleteGood',
13013
- changeShopCode: 'wdtChangeShopCode',
13014
- reissueType: 'wdtReissueType',
13015
- formatDefaultField: {
13016
- money: 'orderPrice',
13017
- share: 'sharePrice'
13018
- }
13019
- }
13020
- };
13021
- var wdtReissue = function wdtReissue(props) {
13022
- var _typeMap$type7, _value$typeMap$type$t3, _typeMap$type11, _typeMap$type25, _typeMap$type26, _value$typeMap$type$w2, _typeMap$type27, _typeMap$type28, _typeMap$type29;
13023
- var value = props.value,
13024
- onChange = props.onChange,
13025
- _props$reasonList = props.reasonList,
13026
- reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
13027
- disabled = props.disabled,
13028
- type = props.type,
13029
- other = _objectWithoutProperties(props, _excluded$g);
13030
- var valueRef = React.useRef({});
13031
- React.useEffect(function () {
13032
- var _typeMap$type, _typeMap$type4;
13033
- valueRef.current = value;
13034
- pubsub__default['default'].subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.reissueDeleteGood), function (_, data) {
13035
- if (disabled) return;
13036
- if (value) {
13037
- var _typeMap$type2, _typeMap$type3;
13038
- var newValue = _objectSpread2({}, value);
13039
- newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
13040
- return item.sku !== data;
13041
- });
13042
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13043
- }
13044
- });
13045
- pubsub__default['default'].subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
13046
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
13047
- shopCode: data.shopCode
13048
- }));
13049
- });
13050
- }, [value, disabled]);
13051
- React.useEffect(function () {
13052
- var _value$orders, _value$showOrderInfo;
13053
- if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
13054
- if (type === 'WDT_SYSTEM_ORDER') {
13055
- getWdtOrderList(value.orderNo);
13056
- }
13057
- }
13058
- return;
13059
- }, [value]);
13060
- React.useEffect(function () {
13061
- var _typeMap$type5;
13062
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.wdtSystemOrderNo];
13063
- if (wdtSystemOrderNo) {
13064
- var _value$typeMap$type$t, _typeMap$type6;
13065
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
13066
- getGoodItems(wdtSystemOrderNo);
13067
- }
13068
- }
13069
- return;
13070
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.wdtSystemOrderNo]]);
13071
- React.useEffect(function () {
13072
- var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
13073
- var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
13074
- var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
13075
- if (['1'].includes(typeName)) {
13076
- wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
13077
- } else if (['2'].includes(typeName)) {
13078
- var _typeMap$type10;
13079
- var newValue = _objectSpread2({}, value);
13080
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)] = [];
13081
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13082
- }
13083
- return;
13084
- }, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
13085
- var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
13086
- var _value$typeMap$type$w, _typeMap$type12, _ref;
13087
- var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
13088
- var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
13089
- return orderItem.billNo === wdtSystemOrderNo;
13090
- });
13091
- if (order) {
13092
- var _typeMap$type13, _order$goodDetails;
13093
- var newValue = _objectSpread2({}, value);
13094
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
13095
- var _typeMap$type14, _typeMap$type15;
13096
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.money)] = 0;
13097
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.share)] = 0;
13098
- item.canUpdateNumber = true;
13099
- return item;
13100
- });
13101
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13102
- }
13103
- };
13104
- var getWdtOrderList = /*#__PURE__*/function () {
13105
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
13106
- var _yield$request, success, data, _typeMap$type16, _typeMap$type17, orders, showOrderInfo;
13107
- return _regeneratorRuntime().wrap(function _callee$(_context) {
13108
- while (1) switch (_context.prev = _context.next) {
13109
- case 0:
13110
- _context.next = 2;
13111
- return extendRequest('/qy/gdfw/order/wdtOrderDetail', {
13112
- method: 'post',
13113
- data: {
13114
- billNo: orderNo
13115
- }
13116
- });
13117
- case 2:
13118
- _yield$request = _context.sent;
13119
- success = _yield$request.success;
13120
- data = _yield$request.data;
13121
- if (success) {
13122
- orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
13123
- return _objectSpread2(_objectSpread2({}, item), {}, {
13124
- billNo: item.tradeNo,
13125
- billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
13126
- billTag: item.tagName
13127
- });
13128
- });
13129
- showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
13130
- return {
13131
- billNo: item.tradeNo,
13132
- billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
13133
- billTag: item.tagName
13134
- };
13135
- });
13136
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.wdtSystemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.wdtSystemOrder]), {}, {
13137
- showOrderInfo: showOrderInfo,
13138
- orders: orders
13139
- }))));
13140
- }
13141
- case 6:
13142
- case "end":
13143
- return _context.stop();
13144
- }
13145
- }, _callee);
13146
- }));
13147
- return function getWdtOrderList(_x) {
13148
- return _ref2.apply(this, arguments);
13149
- };
13150
- }();
13151
- var changeTypeHandle = function changeTypeHandle(val) {
13152
- var _typeMap$type18, _typeMap$type19;
13153
- var newValue = _objectSpread2({}, value);
13154
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName)] = val;
13155
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
13156
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13157
- valueRef.current = newValue;
13158
- // if (['2'].includes(val[0])) {
13159
- // onChange?.(newValue);
13160
- // valueRef.current = newValue;
13161
- // }
13162
- // pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
13163
- // val: val[0],
13164
- // goodValue: newValue,
13165
- // });
13166
- };
13167
-
13168
- var changeGoodHandle = function changeGoodHandle(val) {
13169
- var _typeMap$type20;
13170
- var newValue = _objectSpread2({}, value);
13171
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = (val || []).map(function (item) {
13172
- var _typeMap$type21, _typeMap$type22;
13173
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.money)] = 0;
13174
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.formatDefaultField.share)] = 0;
13175
- return item;
13176
- });
13177
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13178
- };
13179
- var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
13180
- var _typeMap$type23;
13181
- var newValue = _objectSpread2({}, value);
13182
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.wdtSystemOrderNo)] = val;
13183
- console.log('changeSystemOrderHandle', val, newValue);
13184
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
13185
- };
13186
- //显示选择商品按钮 原单换不显示选择商品
13187
- var showChangeBtn = React.useMemo(function () {
13188
- var _typeMap$type24;
13189
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.wdtSystemOrderNo]);
13190
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]]);
13191
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
13192
- gutter: 8
13193
- }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
13194
- className: "gutter-row",
13195
- span: 6
13196
- }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13197
- style: {
13198
- marginBottom: '8px'
13199
- },
13200
- disabled: disabled,
13201
- allowClear: false,
13202
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo)],
13203
- onChange: function onChange(val) {
13204
- return changeSystemOrderHandle(val);
13205
- }
13206
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$w2 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.wdtSystemOrder]) === null || _value$typeMap$type$w2 === void 0 ? void 0 : _value$typeMap$type$w2.showOrderInfo) || []).map(function (item) {
13207
- return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
13208
- key: item.billNo,
13209
- value: item.billNo,
13210
- label: item.billNo
13211
- }, item.billNo);
13212
- }))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
13213
- className: "gutter-row",
13214
- span: 6
13215
- }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
13216
- style: {
13217
- marginBottom: '8px'
13218
- },
13219
- disabled: disabled,
13220
- allowClear: false,
13221
- options: reasonList,
13222
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
13223
- onChange: function onChange(val) {
13224
- return changeTypeHandle(val);
13225
- }
13226
- }))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
13227
- key: 'reissueGoods'
13228
- }, other), {}, {
13229
- type: type,
13230
- disabled: disabled,
13231
- canUpdateNumber: showChangeBtn,
13232
- showChangeBtn: showChangeBtn,
13233
- shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
13234
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
13235
- onChange: function onChange(val) {
13236
- return changeGoodHandle(val);
13237
- }
13238
- })));
13239
- };
13240
-
13241
12961
  var css_248z$a = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
13242
12962
  styleInject(css_248z$a);
13243
12963
 
@@ -13714,12 +13434,12 @@ var Goods$1 = function Goods(props, ref) {
13714
13434
  };
13715
13435
  var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
13716
13436
 
13717
- var _excluded$h = ["onChange", "value", "failValue"];
13437
+ var _excluded$g = ["onChange", "value", "failValue"];
13718
13438
  function CommonStatus(props) {
13719
13439
  var onChange = props.onChange,
13720
13440
  value = props.value,
13721
13441
  failValue = props.failValue,
13722
- other = _objectWithoutProperties(props, _excluded$h);
13442
+ other = _objectWithoutProperties(props, _excluded$g);
13723
13443
  var changeHandle = function changeHandle(val) {
13724
13444
  onChange === null || onChange === void 0 ? void 0 : onChange({
13725
13445
  status: val,
@@ -13838,7 +13558,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
13838
13558
  })) : null) : null);
13839
13559
  };
13840
13560
 
13841
- var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13561
+ var _excluded$h = ["value", "onChange", "disabled", "failValue", "type"];
13842
13562
  var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13843
13563
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
13844
13564
  var _props$value = props.value,
@@ -13848,7 +13568,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13848
13568
  failValue = props.failValue,
13849
13569
  _props$type = props.type,
13850
13570
  type = _props$type === void 0 ? 1 : _props$type,
13851
- other = _objectWithoutProperties(props, _excluded$i);
13571
+ other = _objectWithoutProperties(props, _excluded$h);
13852
13572
  var _useState = React.useState(0),
13853
13573
  _useState2 = _slicedToArray(_useState, 2),
13854
13574
  changeIndex = _useState2[0],
@@ -13914,7 +13634,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
13914
13634
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
13915
13635
  };
13916
13636
 
13917
- var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
13637
+ var _excluded$i = ["value", "onChange", "disabled", "failValue", "type"];
13918
13638
  var msgTypeCh = {
13919
13639
  ding: '钉钉',
13920
13640
  wechat: '微信',
@@ -13930,7 +13650,7 @@ var MsgStatus = function MsgStatus(props) {
13930
13650
  failValue = props.failValue,
13931
13651
  _props$type = props.type,
13932
13652
  type = _props$type === void 0 ? 1 : _props$type,
13933
- other = _objectWithoutProperties(props, _excluded$j);
13653
+ other = _objectWithoutProperties(props, _excluded$i);
13934
13654
  var _useState = React.useState(0),
13935
13655
  _useState2 = _slicedToArray(_useState, 2),
13936
13656
  changeIndex = _useState2[0],
@@ -14053,5 +13773,4 @@ exports.Supplier = Supplier;
14053
13773
  exports.TBGoodId = TBGoodId;
14054
13774
  exports.TBGoodSerial = TBGoodSerial;
14055
13775
  exports.TradeId = TradeId;
14056
- exports.WdtReissue = wdtReissue;
14057
13776
  exports.WlnGoods = WlnGoods;
@@ -11,14 +11,12 @@ interface LogisticsInterceptionValueType {
11
11
  interceptLogisticsStatus: string | number;
12
12
  interceptLogisticsStatusOther: string;
13
13
  interceptLogisticsSnapshot: string;
14
- qySelfInterceptLogisticsStatus: string;
15
14
  }
16
15
  interface LogisticsInterceptionProps {
17
16
  value: Partial<LogisticsInterceptionValueType>;
18
17
  expressInterceptData: any[];
19
18
  required: boolean;
20
19
  disabled: boolean;
21
- showState?: boolean;
22
20
  isEditing: boolean;
23
21
  onChange: (value: Partial<LogisticsInterceptionValueType>) => void;
24
22
  }
@@ -45,7 +45,6 @@ export { default as BsReturn } from './bs/Return';
45
45
  export { default as BsSystemOrder } from './bs/SystemOrder';
46
46
  export { default as WlnGoods } from './wln/Goods';
47
47
  export { default as CommonGoods } from './common/CommonGoods';
48
- export { default as WdtReissue } from './wdt/Reissue';
49
48
  export { default as GoodsTable } from './common/GoodsTable';
50
49
  export { default as CommonStatus } from './common/CommonStatus';
51
50
  export { default as CommonSystemOrder } from './common/CommonSystemOrder';
@@ -6,7 +6,6 @@ interface JstGoodsProps {
6
6
  disabled: boolean;
7
7
  onChange: (val: any[]) => void;
8
8
  showField: string;
9
- componentType?: string;
10
9
  }
11
10
  declare const jstGoods: (props: Partial<JstGoodsProps>) => React.JSX.Element;
12
11
  export default jstGoods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.29.2-rc.0",
3
+ "version": "1.0.0",
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.29.2-rc.0",
23
+ "@kmkf-fe-packages/kmkf-utils": "^1.0.0",
24
24
  "ahooks": "^3.7.4",
25
25
  "kmkf-monitor": "^0.8.8",
26
26
  "lodash": "^4.17.21",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "eed63a70fe1fb8dd114b3fb525a415f68427ea49"
67
+ "gitHead": "d76814d115371d8783809ec0c449aba8ab8557ca"
68
68
  }
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const wdtReissue: (props: any) => React.JSX.Element;
3
- export default wdtReissue;