@kmkf-fe-packages/basic-components 2.0.54-beta.1 → 2.0.54-beta.100

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
@@ -1,10 +1,10 @@
1
1
  import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
2
2
  import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
3
- import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
3
+ import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, servers, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isEqual, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -473,6 +473,57 @@ function _nonIterableSpread() {
473
473
  function _nonIterableRest() {
474
474
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
475
475
  }
476
+ function _createForOfIteratorHelper(o, allowArrayLike) {
477
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
478
+ if (!it) {
479
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
480
+ if (it) o = it;
481
+ var i = 0;
482
+ var F = function () {};
483
+ return {
484
+ s: F,
485
+ n: function () {
486
+ if (i >= o.length) return {
487
+ done: true
488
+ };
489
+ return {
490
+ done: false,
491
+ value: o[i++]
492
+ };
493
+ },
494
+ e: function (e) {
495
+ throw e;
496
+ },
497
+ f: F
498
+ };
499
+ }
500
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
501
+ }
502
+ var normalCompletion = true,
503
+ didErr = false,
504
+ err;
505
+ return {
506
+ s: function () {
507
+ it = it.call(o);
508
+ },
509
+ n: function () {
510
+ var step = it.next();
511
+ normalCompletion = step.done;
512
+ return step;
513
+ },
514
+ e: function (e) {
515
+ didErr = true;
516
+ err = e;
517
+ },
518
+ f: function () {
519
+ try {
520
+ if (!normalCompletion && it.return != null) it.return();
521
+ } finally {
522
+ if (didErr) throw err;
523
+ }
524
+ }
525
+ };
526
+ }
476
527
  function _toPrimitive(input, hint) {
477
528
  if (typeof input !== "object" || input === null) return input;
478
529
  var prim = input[Symbol.toPrimitive];
@@ -7671,7 +7722,8 @@ var Province = function Province(props) {
7671
7722
  workOrder: AddressData.getInstance(),
7672
7723
  bs: BsAddressData.getInstance(),
7673
7724
  wdt: WdtAddressData.getInstance(),
7674
- gy: GyAddressData.getInstance()
7725
+ gy: GyAddressData.getInstance(),
7726
+ km: AddressData.getInstance()
7675
7727
  };
7676
7728
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
7677
7729
  options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
@@ -7685,8 +7737,7 @@ var Province = function Province(props) {
7685
7737
  var TextArea$1 = Input.TextArea;
7686
7738
  var ParseLogistics = function ParseLogistics(props) {
7687
7739
  var onChange = props.onChange,
7688
- _props$selfCalibratio = props.selfCalibration,
7689
- selfCalibration = _props$selfCalibratio === void 0 ? false : _props$selfCalibratio;
7740
+ _props$selfCalibratio = props.selfCalibration;
7690
7741
  var _useState = useState(''),
7691
7742
  _useState2 = _slicedToArray(_useState, 2),
7692
7743
  value = _useState2[0],
@@ -7695,29 +7746,70 @@ var ParseLogistics = function ParseLogistics(props) {
7695
7746
  _useState4 = _slicedToArray(_useState3, 2),
7696
7747
  isCopy = _useState4[0],
7697
7748
  setIsCopy = _useState4[1];
7698
- var handleIdentify = function handleIdentify(val) {
7749
+ var _useState5 = useState(false),
7750
+ _useState6 = _slicedToArray(_useState5, 2),
7751
+ loading = _useState6[0],
7752
+ setLoading = _useState6[1];
7753
+ var _useState7 = useState(false),
7754
+ _useState8 = _slicedToArray(_useState7, 2),
7755
+ aiLoading = _useState8[0],
7756
+ setAiLoading = _useState8[1];
7757
+ var handleIdentify = function handleIdentify() {
7758
+ var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7699
7759
  if (!value && !val) {
7700
7760
  return;
7701
7761
  }
7762
+ setLoading(true);
7702
7763
  var fullAddress = value || val;
7703
- var needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
7764
+ // const needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
7704
7765
  setIsCopy(false);
7705
7766
  request$1({
7706
7767
  url: '/qy/logistics/addressAnalysis',
7707
7768
  method: 'post',
7708
7769
  data: {
7709
- fullAddress: needCalibration ? "".concat(fullAddress, " \u5F20\u4E09 18888888888") : fullAddress
7770
+ fullAddress: fullAddress
7771
+ // fullAddress: needCalibration
7772
+ // ? `${fullAddress} 张三 18888888888`
7773
+ // : fullAddress,
7710
7774
  }
7711
7775
  }).then(function (res) {
7712
7776
  var data = res.data;
7713
7777
  // 如果是通过内部校准添加的姓名和手机号,则去除
7714
- if (needCalibration) {
7715
- data.name = '';
7716
- data.phone = '';
7778
+ // if (needCalibration) {
7779
+ // data.name = '';
7780
+ // data.phone = '';
7781
+ // }
7782
+ onChange === null || onChange === void 0 ? void 0 : onChange(data);
7783
+ }).catch(function (e) {
7784
+ handleAIIdentify(fullAddress);
7785
+ console.log(e);
7786
+ }).finally(function () {
7787
+ setLoading(false);
7788
+ });
7789
+ };
7790
+ var handleAIIdentify = function handleAIIdentify() {
7791
+ var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7792
+ if (!value && !val) {
7793
+ return;
7794
+ }
7795
+ setAiLoading(true);
7796
+ var fullAddress = value || val;
7797
+ setIsCopy(false);
7798
+ request$1({
7799
+ url: '/qy/logistics/addressAnalysis',
7800
+ method: 'post',
7801
+ data: {
7802
+ fullAddress: fullAddress,
7803
+ isAiParse: true
7717
7804
  }
7805
+ }).then(function (res) {
7806
+ var data = res.data;
7718
7807
  onChange === null || onChange === void 0 ? void 0 : onChange(data);
7719
7808
  }).catch(function (e) {
7720
7809
  console.log(e);
7810
+ message.error('识别失败,请输入正确的信息');
7811
+ }).finally(function () {
7812
+ setAiLoading(false);
7721
7813
  });
7722
7814
  };
7723
7815
  var _onKeyDown = function onKeyDown(e) {
@@ -7744,10 +7836,18 @@ var ParseLogistics = function ParseLogistics(props) {
7744
7836
  }), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
7745
7837
  size: "small",
7746
7838
  type: "primary",
7839
+ loading: loading,
7840
+ onClick: function onClick() {
7841
+ return handleIdentify();
7842
+ }
7843
+ }, "\u4E00\u952E\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
7844
+ size: "small",
7845
+ type: "primary",
7846
+ loading: aiLoading,
7747
7847
  onClick: function onClick() {
7748
- return handleIdentify('');
7848
+ return handleAIIdentify();
7749
7849
  }
7750
- }, "\u667A\u80FD\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
7850
+ }, "AI\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
7751
7851
  size: "small",
7752
7852
  onClick: function onClick() {
7753
7853
  return setValue('');
@@ -7777,6 +7877,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
7777
7877
  bs: BsAddressData,
7778
7878
  wdt: WdtAddressData,
7779
7879
  gy: GyAddressData,
7880
+ km: AddressData,
7780
7881
  workOrder: AddressData
7781
7882
  }[type] || AddressData).getInstance();
7782
7883
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
@@ -7950,7 +8051,8 @@ var WidgetMap = {
7950
8051
  var pageSize = 50;
7951
8052
  var SubForm = function SubForm(props) {
7952
8053
  var _selectOptions$;
7953
- var value = props.value,
8054
+ var _props$value = props.value,
8055
+ value = _props$value === void 0 ? [] : _props$value,
7954
8056
  onChange = props.onChange,
7955
8057
  needFilterShopByPermission = props.needFilterShopByPermission,
7956
8058
  _props$subConfig = props.subConfig,
@@ -8079,17 +8181,16 @@ var SubForm = function SubForm(props) {
8079
8181
  return [{
8080
8182
  dataIndex: 'index',
8081
8183
  title: '序号',
8184
+ fixed: 'left',
8185
+ width: 20,
8082
8186
  render: function render(val, record, index) {
8083
- return /*#__PURE__*/React.createElement("div", {
8084
- style: {
8085
- width: 25
8086
- }
8087
- }, index + 1);
8187
+ return index + 1;
8088
8188
  }
8089
8189
  }].concat(_toConsumableArray(newTableHeader.map(function (t) {
8090
8190
  return {
8091
8191
  dataIndex: t.key,
8092
- title: t.name
8192
+ title: t.name,
8193
+ width: 90
8093
8194
  };
8094
8195
  })));
8095
8196
  }, [newTableHeader]);
@@ -8252,7 +8353,7 @@ var SubForm = function SubForm(props) {
8252
8353
  }
8253
8354
  });
8254
8355
  }
8255
- onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8356
+ onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8256
8357
  uuid: uuid()
8257
8358
  })]));
8258
8359
  };
@@ -8277,7 +8378,7 @@ var SubForm = function SubForm(props) {
8277
8378
  onScrollCapture: onScrollCapture,
8278
8379
  style: {
8279
8380
  height: 320,
8280
- maxWidth: platform !== 'pc' ? '325px' : '100%',
8381
+ maxWidth: platform !== 'pc' ? '325px' : '700px',
8281
8382
  overflowY: 'scroll',
8282
8383
  overflowX: 'auto'
8283
8384
  }
@@ -8288,7 +8389,7 @@ var SubForm = function SubForm(props) {
8288
8389
  size: "small",
8289
8390
  pagination: false,
8290
8391
  scroll: {
8291
- x: '100%'
8392
+ x: 'max-content'
8292
8393
  },
8293
8394
  locale: {
8294
8395
  emptyText: '暂无数据'
@@ -8661,7 +8762,9 @@ var GoodsModal = function GoodsModal(props) {
8661
8762
  changeSku = props.changeSku,
8662
8763
  width = props.width,
8663
8764
  _props$numIidType = props.numIidType,
8664
- numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType;
8765
+ numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
8766
+ form = props.form,
8767
+ isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
8665
8768
  var _useState = useState([]),
8666
8769
  _useState2 = _slicedToArray(_useState, 2),
8667
8770
  selectList = _useState2[0],
@@ -8674,10 +8777,14 @@ var GoodsModal = function GoodsModal(props) {
8674
8777
  _useState6 = _slicedToArray(_useState5, 2),
8675
8778
  goodList = _useState6[0],
8676
8779
  setGoodList = _useState6[1];
8677
- var _useState7 = useState(false),
8780
+ var _useState7 = useState([]),
8678
8781
  _useState8 = _slicedToArray(_useState7, 2),
8679
- loading = _useState8[0],
8680
- setLoading = _useState8[1];
8782
+ orderNoItems = _useState8[0],
8783
+ setOrderNoItems = _useState8[1];
8784
+ var _useState9 = useState(false),
8785
+ _useState10 = _slicedToArray(_useState9, 2),
8786
+ loading = _useState10[0],
8787
+ setLoading = _useState10[1];
8681
8788
  var transformIdType = function transformIdType(id) {
8682
8789
  if (!['string', 'number'].includes(_typeof(id))) return id;
8683
8790
  return numIidType === 'string' ? id + '' : +id;
@@ -8697,7 +8804,7 @@ var GoodsModal = function GoodsModal(props) {
8697
8804
  var handleSetGoodList = function handleSetGoodList(list) {
8698
8805
  return setGoodList(list.map(transformType));
8699
8806
  };
8700
- var _useState9 = useState({
8807
+ var _useState11 = useState({
8701
8808
  apiName: 'queryItems',
8702
8809
  desc: true,
8703
8810
  numIids: '',
@@ -8709,30 +8816,30 @@ var GoodsModal = function GoodsModal(props) {
8709
8816
  cids: '',
8710
8817
  title: ''
8711
8818
  }),
8712
- _useState10 = _slicedToArray(_useState9, 2),
8713
- searchParams = _useState10[0],
8714
- setSearch = _useState10[1];
8715
- var _useState11 = useState(0),
8716
8819
  _useState12 = _slicedToArray(_useState11, 2),
8717
- total = _useState12[0],
8718
- setTotal = _useState12[1];
8719
- var _useState13 = useState(''),
8820
+ searchParams = _useState12[0],
8821
+ setSearch = _useState12[1];
8822
+ var _useState13 = useState(0),
8720
8823
  _useState14 = _slicedToArray(_useState13, 2),
8721
- platform = _useState14[0],
8722
- setPlatform = _useState14[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
8723
- var _useState15 = useState({}),
8824
+ total = _useState14[0],
8825
+ setTotal = _useState14[1];
8826
+ var _useState15 = useState(''),
8724
8827
  _useState16 = _slicedToArray(_useState15, 2),
8725
- shopInfo = _useState16[0],
8726
- setShopInfo = _useState16[1]; //店铺信息
8727
- var _useState17 = useState(true),
8828
+ platform = _useState16[0],
8829
+ setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
8830
+ var _useState17 = useState({}),
8728
8831
  _useState18 = _slicedToArray(_useState17, 2),
8729
- canSearch = _useState18[0],
8730
- setCanSearch = _useState18[1];
8731
- var _useState19 = useState([null]),
8832
+ shopInfo = _useState18[0],
8833
+ setShopInfo = _useState18[1]; //店铺信息
8834
+ var _useState19 = useState(true),
8732
8835
  _useState20 = _slicedToArray(_useState19, 2),
8733
- nextKeyList = _useState20[0],
8734
- setNextKeyList = _useState20[1];
8735
- var _useState21 = useState([{
8836
+ canSearch = _useState20[0],
8837
+ setCanSearch = _useState20[1];
8838
+ var _useState21 = useState([null]),
8839
+ _useState22 = _slicedToArray(_useState21, 2),
8840
+ nextKeyList = _useState22[0],
8841
+ setNextKeyList = _useState22[1];
8842
+ var _useState23 = useState([{
8736
8843
  tab: '出售中',
8737
8844
  key: 'onSale'
8738
8845
  }, {
@@ -8742,10 +8849,10 @@ var GoodsModal = function GoodsModal(props) {
8742
8849
  tab: '已选择',
8743
8850
  key: 'select'
8744
8851
  }]),
8745
- _useState22 = _slicedToArray(_useState21, 2),
8746
- tabs = _useState22[0],
8747
- setTabs = _useState22[1];
8748
- var _useState23 = useState([{
8852
+ _useState24 = _slicedToArray(_useState23, 2),
8853
+ tabs = _useState24[0],
8854
+ setTabs = _useState24[1];
8855
+ var _useState25 = useState([{
8749
8856
  name: '上架时间',
8750
8857
  value: 'list_time'
8751
8858
  }, {
@@ -8755,13 +8862,13 @@ var GoodsModal = function GoodsModal(props) {
8755
8862
  name: '按价格',
8756
8863
  value: 'price'
8757
8864
  }]),
8758
- _useState24 = _slicedToArray(_useState23, 1),
8759
- goodSort = _useState24[0];
8865
+ _useState26 = _slicedToArray(_useState25, 1),
8866
+ goodSort = _useState26[0];
8760
8867
  //宝贝分类
8761
- var _useState25 = useState([]),
8762
- _useState26 = _slicedToArray(_useState25, 2),
8763
- shell = _useState26[0],
8764
- setShell = _useState26[1];
8868
+ var _useState27 = useState([]),
8869
+ _useState28 = _slicedToArray(_useState27, 2),
8870
+ shell = _useState28[0],
8871
+ setShell = _useState28[1];
8765
8872
  var clickOrder = function clickOrder(sort) {
8766
8873
  if (sort.value === searchParams.orderBy) {
8767
8874
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
@@ -9034,8 +9141,112 @@ var GoodsModal = function GoodsModal(props) {
9034
9141
  }
9035
9142
  }, [platform]);
9036
9143
  useEffect(function () {
9037
- platform && canSearch && getItem(searchParams, platform);
9144
+ if (platform && canSearch) {
9145
+ if (searchParams.type === 'orderProduct') {
9146
+ getOrderProductItem(searchParams);
9147
+ } else {
9148
+ getItem(searchParams, platform);
9149
+ }
9150
+ }
9038
9151
  }, [searchParams, platform]);
9152
+ useEffect(function () {
9153
+ if (visible && platform !== 'fxg') {
9154
+ var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
9155
+ var orderNo = val['m3ap1EvEyd'];
9156
+ if (orderNo) {
9157
+ setTabs(function (prev) {
9158
+ return uniqBy([{
9159
+ tab: '订单商品',
9160
+ key: 'orderProduct'
9161
+ }].concat(_toConsumableArray(prev)), 'key');
9162
+ });
9163
+ if (isPriorityDisplayOfOrderNo) {
9164
+ setSearch(function (prev) {
9165
+ return _objectSpread2(_objectSpread2({}, prev), {}, {
9166
+ type: 'orderProduct'
9167
+ });
9168
+ });
9169
+ }
9170
+ }
9171
+ }
9172
+ if (!visible) {
9173
+ setOrderNoItems([]);
9174
+ }
9175
+ }, [visible]);
9176
+ var getOrderProductItem = /*#__PURE__*/function () {
9177
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
9178
+ var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
9179
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9180
+ while (1) switch (_context2.prev = _context2.next) {
9181
+ case 0:
9182
+ val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
9183
+ orderNo = val.m3ap1EvEyd, shopId = val.shopId;
9184
+ if (orderNo) {
9185
+ _context2.next = 4;
9186
+ break;
9187
+ }
9188
+ return _context2.abrupt("return", handleSetGoodList([]));
9189
+ case 4:
9190
+ if (orderNoItems.length) {
9191
+ _context2.next = 20;
9192
+ break;
9193
+ }
9194
+ _context2.prev = 5;
9195
+ setLoading(true);
9196
+ _context2.next = 9;
9197
+ return servers.orderDetail({
9198
+ shopId: shopId,
9199
+ orderNo: orderNo
9200
+ });
9201
+ case 9:
9202
+ res = _context2.sent;
9203
+ if (res.success) {
9204
+ _context2.next = 14;
9205
+ break;
9206
+ }
9207
+ handleSetGoodList([]);
9208
+ message.warn(res.message);
9209
+ return _context2.abrupt("return");
9210
+ case 14:
9211
+ if (res.data && res.data.itemList && res.data.itemList.length) {
9212
+ items = res.data.itemList;
9213
+ totalCount = items.length;
9214
+ items.forEach(function (item) {
9215
+ item.platform = platform;
9216
+ });
9217
+ setOrderNoItems(items);
9218
+ pageNo = params.pageNo, pageSize = params.pageSize;
9219
+ handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
9220
+ setTotal(totalCount);
9221
+ }
9222
+ case 15:
9223
+ _context2.prev = 15;
9224
+ setLoading(false);
9225
+ return _context2.finish(15);
9226
+ case 18:
9227
+ _context2.next = 26;
9228
+ break;
9229
+ case 20:
9230
+ _pageNo = params.pageNo, _pageSize = params.pageSize;
9231
+ title = params.title;
9232
+ if (platform !== 'taobao') {
9233
+ title = params.numIids;
9234
+ }
9235
+ _items = title ? orderNoItems.filter(function (item) {
9236
+ return item.title.includes(title.trim());
9237
+ }) : orderNoItems;
9238
+ handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
9239
+ setTotal(_items.length);
9240
+ case 26:
9241
+ case "end":
9242
+ return _context2.stop();
9243
+ }
9244
+ }, _callee2, null, [[5,, 15, 18]]);
9245
+ }));
9246
+ return function getOrderProductItem(_x2) {
9247
+ return _ref4.apply(this, arguments);
9248
+ };
9249
+ }();
9039
9250
  return /*#__PURE__*/React.createElement(Modal, {
9040
9251
  title: '选择宝贝',
9041
9252
  okText: '确认',
@@ -9069,7 +9280,7 @@ var GoodsModal = function GoodsModal(props) {
9069
9280
  style: {
9070
9281
  display: searchParams.type === 'select' ? 'none' : ''
9071
9282
  }
9072
- }, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
9283
+ }, /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Radio.Group, {
9073
9284
  value: searchParams.orderBy,
9074
9285
  onChange: function onChange(e) {
9075
9286
  setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
@@ -9085,7 +9296,7 @@ var GoodsModal = function GoodsModal(props) {
9085
9296
  },
9086
9297
  key: sort.value
9087
9298
  }, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React.createElement("span", null, "\u21BE") : /*#__PURE__*/React.createElement("span", null, "\u21C2") : /*#__PURE__*/React.createElement("span", null, "\u21C5"));
9088
- })), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && /*#__PURE__*/React.createElement(Select, {
9299
+ }))), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Select, {
9089
9300
  className: "classify",
9090
9301
  value: searchParams.cids,
9091
9302
  onChange: function onChange(value) {
@@ -9100,7 +9311,7 @@ var GoodsModal = function GoodsModal(props) {
9100
9311
  key: item.value
9101
9312
  }, item.label);
9102
9313
  })), /*#__PURE__*/React.createElement(Search, {
9103
- placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
9314
+ placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
9104
9315
  // enterButton="搜索"
9105
9316
  className: "search",
9106
9317
  value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
@@ -9723,7 +9934,9 @@ var GoodItem = function GoodItem(props) {
9723
9934
  userNick = props.userNick,
9724
9935
  disabled = props.disabled,
9725
9936
  changeSku = props.changeSku,
9726
- width = props.width;
9937
+ width = props.width,
9938
+ form = props.form,
9939
+ isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
9727
9940
  var shopId = value.shopId,
9728
9941
  imgList = value.imgList;
9729
9942
  var _useState = useState(false),
@@ -9814,7 +10027,7 @@ var GoodItem = function GoodItem(props) {
9814
10027
  var onSubmit = /*#__PURE__*/function () {
9815
10028
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
9816
10029
  var _list$;
9817
- var newList, newImgList;
10030
+ var newList, newImgList, _list$2;
9818
10031
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9819
10032
  while (1) switch (_context2.prev = _context2.next) {
9820
10033
  case 0:
@@ -9836,7 +10049,11 @@ var GoodItem = function GoodItem(props) {
9836
10049
  // if (type === 1) {
9837
10050
  // params.outerId = item.outerId; //编码
9838
10051
  // }
9839
- if (changeSku) {
10052
+ //返填商品属性 && 为订单商品
10053
+ if (changeSku && item.skuInfoDTO) {
10054
+ params.outerSkuId = item.skuInfoDTO.outerSkuId;
10055
+ params.propertiesName = item.skuInfoDTO.propertiesName;
10056
+ } else if (changeSku) {
9840
10057
  params.propertiesName = '';
9841
10058
  }
9842
10059
  // if (type === 4) {
@@ -9855,7 +10072,9 @@ var GoodItem = function GoodItem(props) {
9855
10072
  imgList: newImgList
9856
10073
  });
9857
10074
  setVisible(false);
9858
- checkSkus(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.numIid, newImgList.length - 1);
10075
+ if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
10076
+ checkSkus(list === null || list === void 0 ? void 0 : (_list$2 = list[0]) === null || _list$2 === void 0 ? void 0 : _list$2.numIid, newImgList.length - 1);
10077
+ }
9859
10078
  case 5:
9860
10079
  case "end":
9861
10080
  return _context2.stop();
@@ -10112,6 +10331,8 @@ var GoodItem = function GoodItem(props) {
10112
10331
  shopId: shopId,
10113
10332
  maxLength: maxLength,
10114
10333
  changeSku: changeSku,
10334
+ form: form,
10335
+ isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
10115
10336
  onCancel: function onCancel() {
10116
10337
  setVisible(false);
10117
10338
  }
@@ -10910,7 +11131,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
10910
11131
  }
10911
11132
  })), /*#__PURE__*/React.createElement(Item, {
10912
11133
  label: '发件人手机号',
10913
- required: true,
11134
+ // required={true}
10914
11135
  key: 'interceptSenderMobile',
10915
11136
  hidden: !showSenderMobile
10916
11137
  }, /*#__PURE__*/React.createElement(Input, {
@@ -10939,7 +11160,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
10939
11160
  value: item.uk
10940
11161
  }, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
10941
11162
  }))), /*#__PURE__*/React.createElement(Item, {
10942
- label: '派送地址',
11163
+ label: '修改后派送地址',
10943
11164
  required: true,
10944
11165
  key: 'newAddress',
10945
11166
  hidden: !showNewAddress
@@ -11090,7 +11311,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11090
11311
  _props$value = props.value,
11091
11312
  value = _props$value === void 0 ? {} : _props$value,
11092
11313
  disabled = props.disabled,
11093
- onChange = props.onChange;
11314
+ onChange = props.onChange,
11315
+ _props$isSingle = props.isSingle,
11316
+ isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
11317
+ _props$trajectoryApiS = props.trajectoryApiStatus,
11318
+ trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
11094
11319
  var handleInputChange = function handleInputChange(e, type) {
11095
11320
  var val = e.target.value;
11096
11321
  typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
@@ -11101,13 +11326,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11101
11326
  }));
11102
11327
  handleSearchSnapshot(val);
11103
11328
  };
11329
+ var handleStatusChange = function handleStatusChange(val) {
11330
+ var _value$trajectoryApiS;
11331
+ var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
11332
+ trajectoryApiStatus: {
11333
+ status: val,
11334
+ reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
11335
+ }
11336
+ });
11337
+ onChange(newVal);
11338
+ };
11104
11339
  var handleSearchSnapshot = function handleSearchSnapshot(company) {
11105
11340
  var trajectoryCompany = value.trajectoryCompany,
11106
11341
  trajectoryCode = value.trajectoryCode,
11107
11342
  trajectoryPhone = value.trajectoryPhone;
11108
11343
  var newCompany = company ? company : trajectoryCompany;
11109
11344
  //不展示拦截状态不请求
11110
- if (!(showField && showField.includes('snapshot'))) {
11345
+ if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
11111
11346
  return;
11112
11347
  }
11113
11348
  if (disabled) {
@@ -11132,13 +11367,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11132
11367
  data = res.data,
11133
11368
  msg = res.message;
11134
11369
  if (result === 100 || success) {
11135
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11136
- trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
11370
+ var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
11137
11371
  trajectoryCompany: newCompany
11138
- }));
11372
+ });
11373
+ if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
11374
+ if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
11375
+ onChange(newValue);
11139
11376
  } else {
11140
11377
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11141
11378
  trajectorySnapshot: '',
11379
+ trajectoryApiStatus: {
11380
+ reason: '',
11381
+ status: ''
11382
+ },
11142
11383
  trajectoryCompany: newCompany
11143
11384
  }));
11144
11385
  msg && message.error(msg);
@@ -11147,6 +11388,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11147
11388
  } catch (err) {
11148
11389
  onChange(_objectSpread2(_objectSpread2({}, value), {}, {
11149
11390
  trajectorySnapshot: '',
11391
+ trajectoryApiStatus: {
11392
+ reason: '',
11393
+ status: ''
11394
+ },
11150
11395
  trajectoryCompany: newCompany
11151
11396
  }));
11152
11397
  (err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
@@ -11200,6 +11445,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11200
11445
  }
11201
11446
  });
11202
11447
  };
11448
+ // 接口状态
11449
+ var LogisticsApiStatus = function LogisticsApiStatus() {
11450
+ var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
11451
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
11452
+ value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
11453
+ disabled: true,
11454
+ style: {
11455
+ width: '100%',
11456
+ marginTop: '8px'
11457
+ },
11458
+ placeholder: "\u63A5\u53E3\u72B6\u6001",
11459
+ onChange: handleStatusChange,
11460
+ options: [{
11461
+ label: '成功',
11462
+ value: '成功'
11463
+ }, {
11464
+ label: '失败',
11465
+ value: '失败'
11466
+ }]
11467
+ }), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React.createElement("div", {
11468
+ style: {
11469
+ color: 'red'
11470
+ }
11471
+ }, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
11472
+ };
11203
11473
  //物流快照
11204
11474
  var LogisticsSnapshot = function LogisticsSnapshot() {
11205
11475
  return /*#__PURE__*/React.createElement(Input, {
@@ -11214,7 +11484,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
11214
11484
  value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
11215
11485
  });
11216
11486
  };
11217
- return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
11487
+ return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
11218
11488
  };
11219
11489
 
11220
11490
  var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
@@ -11427,7 +11697,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
11427
11697
  disabled: disabled,
11428
11698
  onChange: function onChange(val) {
11429
11699
  return handleChange(val, changeIndex);
11430
- }
11700
+ },
11701
+ isSingle: false
11431
11702
  }));
11432
11703
  };
11433
11704
 
@@ -11450,7 +11721,7 @@ var typeInitValueMap = {
11450
11721
  }]
11451
11722
  };
11452
11723
  var jstGoods = function jstGoods(props) {
11453
- var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9;
11724
+ var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
11454
11725
  var _props$value = props.value,
11455
11726
  value = _props$value === void 0 ? [] : _props$value,
11456
11727
  onChange = props.onChange,
@@ -11468,8 +11739,8 @@ var jstGoods = function jstGoods(props) {
11468
11739
  setChangeIndex = _useState2[1]; //选中的包裹
11469
11740
  var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
11470
11741
  var isSelectName = ['wdt', 'bsE3', 'km', 'gy', 'jst'].includes(platformType);
11742
+ var expressDateInstance = ExpressData.getInstance(platformType);
11471
11743
  var isSendGoodSavedId = isSelectName && !['jst'].includes(platformType);
11472
- var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
11473
11744
  useEffect(function () {
11474
11745
  //没有值塞个默认值
11475
11746
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
@@ -11552,59 +11823,51 @@ var jstGoods = function jstGoods(props) {
11552
11823
  return setChangeIndex(index);
11553
11824
  }
11554
11825
  }, "\u5305\u88F9".concat(index + 1)));
11555
- }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
11556
- type: logisticsType,
11826
+ }))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
11557
11827
  disabled: disabled,
11558
11828
  placeholder: "\u7269\u6D41\u516C\u53F8",
11559
11829
  onChange: function onChange(val) {
11560
- if (logisticsType === 'input') {
11561
- changeInputHandle(null, 'logisticsCompany');
11562
- changeInputHandle(val, 'logisticsCompanyName');
11563
- } else {
11564
- changeInputHandle(val, 'logisticsCompany');
11565
- }
11830
+ changeInputHandle(val, 'logisticsCompany');
11566
11831
  },
11567
- value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
11568
- }, logisticsType === 'input' ? {} : {
11832
+ value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
11569
11833
  showSearch: true,
11570
11834
  dropdownMatchSelectWidth: false,
11571
11835
  filterOption: function filterOption(input, option) {
11572
11836
  return option.label.includes(input);
11573
- }
11574
- }), {}, {
11837
+ },
11575
11838
  style: {
11576
11839
  minWidth: '100px',
11577
11840
  maxWidth: '180px'
11578
11841
  },
11579
11842
  platformType: platformType
11580
- })) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11843
+ }) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
11581
11844
  disabled: disabled,
11582
11845
  placeholder: "\u7269\u6D41\u5355\u53F7",
11583
11846
  onChange: function onChange(e) {
11584
11847
  return changeInputHandle(e.target.value, 'logisticsCode');
11585
11848
  },
11586
- value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.logisticsCode
11849
+ value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
11587
11850
  }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11588
11851
  disabled: disabled,
11589
11852
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
11590
11853
  onChange: function onChange(e) {
11591
11854
  return changeInputHandle(e.target.value, 'supplyId');
11592
11855
  },
11593
- value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.supplyId
11856
+ value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
11594
11857
  }), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11595
11858
  disabled: disabled,
11596
11859
  placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
11597
11860
  onChange: function onChange(e) {
11598
11861
  return changeInputHandle(e.target.value, 'supplyName');
11599
11862
  },
11600
- value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.supplyName
11863
+ value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
11601
11864
  })) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
11602
11865
  disabled: disabled,
11603
11866
  placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
11604
11867
  onChange: function onChange(e) {
11605
11868
  return changeInputHandle(e.target.value, 'sendId');
11606
11869
  },
11607
- value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
11870
+ value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
11608
11871
  }), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
11609
11872
  style: {
11610
11873
  minWidth: '100px',
@@ -11615,7 +11878,7 @@ var jstGoods = function jstGoods(props) {
11615
11878
  showSearch: true,
11616
11879
  options: sendOptions,
11617
11880
  filterOption: filterOption,
11618
- value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendSnapshotId) || ((_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.sendName) || null,
11881
+ value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
11619
11882
  onChange: function onChange(value, option) {
11620
11883
  return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
11621
11884
  }
@@ -11625,14 +11888,14 @@ var jstGoods = function jstGoods(props) {
11625
11888
  onChange: function onChange(e) {
11626
11889
  return changeInputHandle(e.target.value, 'sendName');
11627
11890
  },
11628
- value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendName
11891
+ value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
11629
11892
  }))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
11630
11893
  disabled: disabled,
11631
11894
  placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
11632
11895
  onChange: function onChange(e) {
11633
11896
  return changeInputHandle(e.target.value, 'deliveryNo');
11634
11897
  },
11635
- value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendName
11898
+ value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
11636
11899
  })) : null) : null);
11637
11900
  };
11638
11901
 
@@ -12199,7 +12462,7 @@ var gyColumns = [{
12199
12462
  }, {
12200
12463
  dataIndex: 'specNo',
12201
12464
  title: 'SKU编码',
12202
- width: 200,
12465
+ width: 150,
12203
12466
  ellipsis: true
12204
12467
  }, {
12205
12468
  dataIndex: 'goodName',
@@ -12210,11 +12473,11 @@ var gyColumns = [{
12210
12473
  dataIndex: 'goodShortName',
12211
12474
  title: "\u5546\u54C1\u7B80\u79F0",
12212
12475
  ellipsis: true,
12213
- width: 250
12476
+ width: 150
12214
12477
  }, {
12215
12478
  dataIndex: 'goodNo',
12216
12479
  title: '商品编码',
12217
- width: 200,
12480
+ width: 150,
12218
12481
  ellipsis: true
12219
12482
  }, {
12220
12483
  dataIndex: 'goodPicUrl',
@@ -12487,12 +12750,144 @@ var bse3Columns = [{
12487
12750
  width: 100
12488
12751
  }];
12489
12752
 
12753
+ var getYesOrNo = function getYesOrNo(val) {
12754
+ if (!isBoolean(val)) return null;
12755
+ return val ? '是' : '否';
12756
+ };
12757
+ var kmColumns = [{
12758
+ dataIndex: 'goodName',
12759
+ title: '商品名称',
12760
+ width: 250,
12761
+ ellipsis: true
12762
+ }, {
12763
+ dataIndex: 'goodNo',
12764
+ title: '商品编码',
12765
+ width: 150,
12766
+ ellipsis: true
12767
+ }, {
12768
+ dataIndex: 'goodId',
12769
+ title: '商品ID',
12770
+ width: 200,
12771
+ ellipsis: true
12772
+ }, {
12773
+ dataIndex: 'goodPicUrl',
12774
+ title: "\u5546\u54C1\u56FE\u7247",
12775
+ width: 150,
12776
+ render: function render(val) {
12777
+ return /*#__PURE__*/React.createElement(Image, {
12778
+ width: 60,
12779
+ src: val
12780
+ });
12781
+ }
12782
+ }, {
12783
+ dataIndex: 'goodShortName',
12784
+ title: '商品简称',
12785
+ width: 200,
12786
+ ellipsis: true
12787
+ }, {
12788
+ dataIndex: 'goodBarcode',
12789
+ title: '商品条码',
12790
+ width: 200,
12791
+ ellipsis: true
12792
+ }, {
12793
+ dataIndex: 'brandName',
12794
+ title: "\u54C1\u724C\u540D\u79F0",
12795
+ ellipsis: true,
12796
+ width: 150
12797
+ }, {
12798
+ dataIndex: 'skuType',
12799
+ title: "\u5546\u54C1\u7C7B\u578B",
12800
+ ellipsis: true,
12801
+ width: 150
12802
+ }, {
12803
+ dataIndex: 'specName',
12804
+ title: "SKU\u540D\u79F0",
12805
+ ellipsis: true,
12806
+ width: 150
12807
+ }, {
12808
+ dataIndex: 'specNo',
12809
+ title: "SKU\u7F16\u7801",
12810
+ ellipsis: true,
12811
+ width: 150
12812
+ }, {
12813
+ dataIndex: 'specId',
12814
+ title: "SKU ID",
12815
+ ellipsis: true,
12816
+ width: 150
12817
+ }, {
12818
+ dataIndex: 'propertiesValue',
12819
+ title: "\u89C4\u683C\u503C",
12820
+ ellipsis: true,
12821
+ width: 150
12822
+ }, {
12823
+ dataIndex: 'skuShortTitle',
12824
+ title: "\u89C4\u683C\u7B80\u79F0",
12825
+ ellipsis: true,
12826
+ width: 150
12827
+ }, {
12828
+ dataIndex: 'specBarcode',
12829
+ title: "\u89C4\u683C\u6761\u7801",
12830
+ ellipsis: true,
12831
+ width: 150
12832
+ }, {
12833
+ dataIndex: 'specImgUrl',
12834
+ title: "SKU \u56FE\u7247",
12835
+ ellipsis: true,
12836
+ width: 150,
12837
+ render: function render(val) {
12838
+ return /*#__PURE__*/React.createElement(Image, {
12839
+ width: 60,
12840
+ src: val
12841
+ });
12842
+ }
12843
+ }, {
12844
+ dataIndex: 'isGift',
12845
+ title: "\u662F\u5426\u8D60\u54C1",
12846
+ ellipsis: true,
12847
+ width: 150,
12848
+ render: function render(val) {
12849
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12850
+ }
12851
+ }, {
12852
+ dataIndex: 'isVirtual',
12853
+ title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
12854
+ ellipsis: true,
12855
+ width: 150,
12856
+ render: function render(val) {
12857
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12858
+ }
12859
+ }, {
12860
+ dataIndex: 'isSkuItem',
12861
+ title: "\u662F\u5426\u542B\u6709SKU",
12862
+ ellipsis: true,
12863
+ width: 150,
12864
+ render: function render(val) {
12865
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
12866
+ }
12867
+ }, {
12868
+ dataIndex: 'marketPrice',
12869
+ title: "\u5E02\u573A\u4EF7",
12870
+ ellipsis: true,
12871
+ width: 150
12872
+ }, {
12873
+ dataIndex: 'retailPrice',
12874
+ title: "\u96F6\u552E\u4EF7",
12875
+ ellipsis: true,
12876
+ width: 150
12877
+ }, {
12878
+ dataIndex: 'costPrice',
12879
+ title: "\u6210\u672C\u4EF7",
12880
+ ellipsis: true,
12881
+ width: 150
12882
+ }];
12883
+
12490
12884
  var getColumnsMap = function getColumnsMap() {
12491
12885
  return cloneDeep({
12492
12886
  gy: gyColumns,
12493
12887
  jst: jstColumns,
12494
12888
  wdt: wdtColumns,
12495
- bse3: bse3Columns
12889
+ bse3: bse3Columns,
12890
+ km: kmColumns
12496
12891
  });
12497
12892
  };
12498
12893
  var getColumnsBaseInfo = function getColumnsBaseInfo() {
@@ -12547,9 +12942,7 @@ var useGetColumns = (function (type) {
12547
12942
  loading = _useState4[0],
12548
12943
  setLoading = _useState4[1];
12549
12944
  var showColumnsDataIndexList = useMemo(function () {
12550
- return columns.filter(function (item) {
12551
- return Object.hasOwn(item, 'dataIndex');
12552
- }).map(function (item) {
12945
+ return columns.map(function (item) {
12553
12946
  return item.dataIndex;
12554
12947
  });
12555
12948
  }, [columns]);
@@ -13444,23 +13837,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
13444
13837
  };
13445
13838
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
13446
13839
 
13840
+ var rowCheckKey = 'id';
13447
13841
  var getTableData$3 = function getTableData(_ref, formData) {
13448
13842
  var current = _ref.current,
13449
13843
  pageSize = _ref.pageSize;
13450
- var data = {
13451
- goodShortName: formData.goodShortName || null,
13452
- skuName: formData.skuName || null,
13453
- skuCode: formData.skuCode || null,
13454
- goodName: formData.goodName || null,
13455
- goodNo: formData.goodNo || null
13456
- };
13457
13844
  return extendRequest('/qy/gdfw/product/product/page', {
13458
13845
  method: 'post',
13459
13846
  data: _objectSpread2({
13460
13847
  pageSize: pageSize,
13461
13848
  pageNo: current,
13462
- platform: 'GY_ERP'
13463
- }, data)
13849
+ platform: 'KM_ERP'
13850
+ }, formData)
13464
13851
  }).then(function (res) {
13465
13852
  var _res$data = res.data,
13466
13853
  _res$data$productSkuL = _res$data.productSkuList,
@@ -13477,6 +13864,254 @@ var getTableData$3 = function getTableData(_ref, formData) {
13477
13864
  });
13478
13865
  };
13479
13866
  var searchFormData$2 = [{
13867
+ label: '商品名称',
13868
+ name: 'goodName'
13869
+ }, {
13870
+ label: '商品编码',
13871
+ name: 'goodNo'
13872
+ }, {
13873
+ label: 'SKU名称',
13874
+ name: 'skuName',
13875
+ dataIndex: 'specName'
13876
+ }, {
13877
+ label: 'SKU编码',
13878
+ name: 'skuCode',
13879
+ dataIndex: 'specNo'
13880
+ }];
13881
+ var GoodList$3 = function GoodList(props, ref) {
13882
+ var _useState = useState([]),
13883
+ _useState2 = _slicedToArray(_useState, 2),
13884
+ selectList = _useState2[0],
13885
+ setSelect = _useState2[1];
13886
+ var _useState3 = useState([]),
13887
+ _useState4 = _slicedToArray(_useState3, 2),
13888
+ selectIds = _useState4[0],
13889
+ setSelectIds = _useState4[1];
13890
+ var _useGetColumns = useGetColumns('km'),
13891
+ _useGetColumns2 = _slicedToArray(_useGetColumns, 3),
13892
+ columns = _useGetColumns2[0],
13893
+ showColumnsDataIndexList = _useGetColumns2[1],
13894
+ loading = _useGetColumns2[2];
13895
+ useImperativeHandle(ref, function () {
13896
+ return {
13897
+ getSelectGoodList: function getSelectGoodList() {
13898
+ return selectList;
13899
+ }
13900
+ };
13901
+ });
13902
+ var _Form$useForm = Form.useForm(),
13903
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13904
+ form = _Form$useForm2[0];
13905
+ var _useAntdTable = useAntdTable(getTableData$3, {
13906
+ defaultPageSize: 10,
13907
+ form: form
13908
+ }),
13909
+ tableProps = _useAntdTable.tableProps,
13910
+ search = _useAntdTable.search,
13911
+ params = _useAntdTable.params;
13912
+ var submit = search.submit,
13913
+ reset = search.reset;
13914
+ var rowSelection = {
13915
+ selectedRowKeys: selectIds,
13916
+ fixed: true,
13917
+ onSelect: function onSelect(record, selected) {
13918
+ if (selected) {
13919
+ setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
13920
+ setSelect([].concat(_toConsumableArray(selectList), [record]));
13921
+ } else {
13922
+ setSelectIds(selectIds.filter(function (t) {
13923
+ return t !== record[rowCheckKey];
13924
+ }));
13925
+ setSelect(selectList.filter(function (t) {
13926
+ return t[rowCheckKey] !== record[rowCheckKey];
13927
+ }));
13928
+ }
13929
+ },
13930
+ onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
13931
+ if (selected) {
13932
+ setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
13933
+ return t[rowCheckKey];
13934
+ }))));
13935
+ setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
13936
+ } else {
13937
+ setSelectIds(difference(selectIds, changeRows.map(function (t) {
13938
+ return t[rowCheckKey];
13939
+ })));
13940
+ var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
13941
+ return arrVal[rowCheckKey] !== othVal[rowCheckKey];
13942
+ });
13943
+ setSelect(list);
13944
+ }
13945
+ },
13946
+ getCheckboxProps: function getCheckboxProps(record) {
13947
+ var options = {
13948
+ disabled: (props.selectedRows || []).map(function (row) {
13949
+ return row[rowCheckKey] || row.skuId;
13950
+ }).includes(record[rowCheckKey] || record.skuId),
13951
+ name: record[rowCheckKey]
13952
+ };
13953
+ return options;
13954
+ }
13955
+ };
13956
+ var showTable = function showTable() {
13957
+ var handleDelete = function handleDelete(record) {
13958
+ setSelectIds(selectIds.filter(function (t) {
13959
+ return t !== record[rowCheckKey];
13960
+ }));
13961
+ setSelect(selectList.filter(function (t) {
13962
+ return t[rowCheckKey] !== record[rowCheckKey];
13963
+ }));
13964
+ };
13965
+ var showColumns = [{
13966
+ dataIndex: '',
13967
+ title: "\u64CD\u4F5C",
13968
+ ellipsis: true,
13969
+ width: 100,
13970
+ render: function render(val, record) {
13971
+ return /*#__PURE__*/React.createElement(Button, {
13972
+ type: "link",
13973
+ onClick: function onClick() {
13974
+ return handleDelete(record);
13975
+ }
13976
+ }, "\u5220\u9664");
13977
+ }
13978
+ }].concat(takeRight(columns, columns.length - 1));
13979
+ return selectList.length ? /*#__PURE__*/React.createElement("div", {
13980
+ style: {
13981
+ width: '100%',
13982
+ maxWidth: '387px'
13983
+ }
13984
+ }, /*#__PURE__*/React.createElement(Table, {
13985
+ columns: showColumns,
13986
+ rowKey: rowCheckKey,
13987
+ dataSource: selectList,
13988
+ scroll: {
13989
+ x: '100%',
13990
+ y: 250
13991
+ },
13992
+ pagination: {
13993
+ size: 'small',
13994
+ total: selectIds.length,
13995
+ pageSize: 10,
13996
+ showSizeChanger: false
13997
+ }
13998
+ })) : null;
13999
+ };
14000
+ return /*#__PURE__*/React.createElement(Skeleton, {
14001
+ active: true,
14002
+ loading: loading
14003
+ }, /*#__PURE__*/React.createElement(SearchForm, {
14004
+ searchFormData: searchFormData$2,
14005
+ form: form,
14006
+ showColumnsDataIndexList: showColumnsDataIndexList,
14007
+ submit: submit,
14008
+ reset: reset
14009
+ }), /*#__PURE__*/React.createElement("div", {
14010
+ style: {
14011
+ marginTop: '4px'
14012
+ }
14013
+ }, /*#__PURE__*/React.createElement(Table, _objectSpread2({
14014
+ rowSelection: rowSelection,
14015
+ rowKey: rowCheckKey,
14016
+ columns: columns,
14017
+ scroll: {
14018
+ x: '100%',
14019
+ y: 250
14020
+ }
14021
+ }, tableProps))), /*#__PURE__*/React.createElement(Popover, {
14022
+ getPopupContainer: function getPopupContainer(triggerNode) {
14023
+ return triggerNode.parentElement;
14024
+ },
14025
+ content: showTable(),
14026
+ title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
14027
+ }, /*#__PURE__*/React.createElement(Button, {
14028
+ danger: true,
14029
+ type: "text"
14030
+ }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
14031
+ };
14032
+ var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
14033
+
14034
+ var ErpGoodsModal = function ErpGoodsModal(props, ref) {
14035
+ useImperativeHandle(ref, function () {
14036
+ return {
14037
+ open: function open(shopCode) {
14038
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14039
+ setVisible(true);
14040
+ setSelectedRows(options.value || []);
14041
+ }
14042
+ };
14043
+ });
14044
+ var onSubmit = props.onSubmit,
14045
+ width = props.width;
14046
+ var _useState = useState(false),
14047
+ _useState2 = _slicedToArray(_useState, 2),
14048
+ visible = _useState2[0],
14049
+ setVisible = _useState2[1];
14050
+ var _useState3 = useState([]),
14051
+ _useState4 = _slicedToArray(_useState3, 2),
14052
+ selectedRows = _useState4[0],
14053
+ setSelectedRows = _useState4[1];
14054
+ var erpGoodsListRef = useRef(null);
14055
+ var _onCancel = function onCancel() {
14056
+ setVisible(false);
14057
+ };
14058
+ var onOk = function onOk() {
14059
+ var _erpGoodsListRef$curr;
14060
+ var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
14061
+ onSubmit(selectedList);
14062
+ _onCancel();
14063
+ };
14064
+ return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
14065
+ title: '选择商品',
14066
+ okText: '确认',
14067
+ cancelText: '取消',
14068
+ visible: visible,
14069
+ width: width || 850,
14070
+ onCancel: function onCancel() {
14071
+ _onCancel();
14072
+ },
14073
+ onOk: onOk,
14074
+ wrapClassName: "goodModal"
14075
+ }, /*#__PURE__*/React.createElement(ErpGoodsList, {
14076
+ ref: erpGoodsListRef,
14077
+ selectedRows: selectedRows
14078
+ })));
14079
+ };
14080
+ var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
14081
+
14082
+ var getTableData$4 = function getTableData(_ref, formData) {
14083
+ var current = _ref.current,
14084
+ pageSize = _ref.pageSize;
14085
+ var data = {
14086
+ goodShortName: formData.goodShortName || null,
14087
+ skuName: formData.skuName || null,
14088
+ skuCode: formData.skuCode || null,
14089
+ goodName: formData.goodName || null,
14090
+ goodNo: formData.goodNo || null
14091
+ };
14092
+ return extendRequest('/qy/gdfw/product/product/page', {
14093
+ method: 'post',
14094
+ data: _objectSpread2({
14095
+ pageSize: pageSize,
14096
+ pageNo: current,
14097
+ platform: 'GY_ERP'
14098
+ }, data)
14099
+ }).then(function (res) {
14100
+ var _res$data = res.data,
14101
+ _res$data$productSkuL = _res$data.productSkuList,
14102
+ productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
14103
+ _res$data$total = _res$data.total,
14104
+ total = _res$data$total === void 0 ? 0 : _res$data$total;
14105
+ var newProducts = productSkuList.map(function (item, index) {
14106
+ return _objectSpread2({}, item);
14107
+ });
14108
+ return {
14109
+ total: total,
14110
+ list: newProducts
14111
+ };
14112
+ });
14113
+ };
14114
+ var searchFormData$3 = [{
13480
14115
  label: '商品简称',
13481
14116
  name: 'goodShortName'
13482
14117
  }, {
@@ -13494,7 +14129,7 @@ var searchFormData$2 = [{
13494
14129
  label: '商品编码',
13495
14130
  name: 'goodNo'
13496
14131
  }];
13497
- var GoodList$3 = function GoodList(props, ref) {
14132
+ var GoodList$4 = function GoodList(props, ref) {
13498
14133
  var _useState = useState([]),
13499
14134
  _useState2 = _slicedToArray(_useState, 2),
13500
14135
  selectList = _useState2[0],
@@ -13518,7 +14153,7 @@ var GoodList$3 = function GoodList(props, ref) {
13518
14153
  var _Form$useForm = Form.useForm(),
13519
14154
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13520
14155
  form = _Form$useForm2[0];
13521
- var _useAntdTable = useAntdTable(getTableData$3, {
14156
+ var _useAntdTable = useAntdTable(getTableData$4, {
13522
14157
  defaultPageSize: 10,
13523
14158
  form: form
13524
14159
  }),
@@ -13608,7 +14243,7 @@ var GoodList$3 = function GoodList(props, ref) {
13608
14243
  active: true,
13609
14244
  loading: loading
13610
14245
  }, /*#__PURE__*/React.createElement(SearchForm, {
13611
- searchFormData: searchFormData$2,
14246
+ searchFormData: searchFormData$3,
13612
14247
  form: form,
13613
14248
  showColumnsDataIndexList: showColumnsDataIndexList,
13614
14249
  submit: submit,
@@ -13636,7 +14271,7 @@ var GoodList$3 = function GoodList(props, ref) {
13636
14271
  type: "text"
13637
14272
  }, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
13638
14273
  };
13639
- var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$3);
14274
+ var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
13640
14275
 
13641
14276
  var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
13642
14277
  useImperativeHandle(ref, function () {
@@ -14385,6 +15020,10 @@ var getColumns$2 = function getColumns(_ref) {
14385
15020
  label: '组合装',
14386
15021
  value: '2'
14387
15022
  }];
15023
+ var typeMap = {
15024
+ '1': '单品',
15025
+ '2': '组合装'
15026
+ };
14388
15027
  return !disabled ? /*#__PURE__*/React.createElement(Select, {
14389
15028
  style: {
14390
15029
  width: 70
@@ -14394,7 +15033,7 @@ var getColumns$2 = function getColumns(_ref) {
14394
15033
  onChange: function onChange(value) {
14395
15034
  return updateHandle(value, index, 'type');
14396
15035
  }
14397
- }) : /*#__PURE__*/React.createElement("span", null, val);
15036
+ }) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
14398
15037
  }
14399
15038
  }],
14400
15039
  //旺店通换出商品信息
@@ -14506,6 +15145,10 @@ var getColumns$2 = function getColumns(_ref) {
14506
15145
  label: '组合装',
14507
15146
  value: '2'
14508
15147
  }];
15148
+ var typeMap = {
15149
+ '1': '单品',
15150
+ '2': '组合装'
15151
+ };
14509
15152
  return !disabled ? /*#__PURE__*/React.createElement(Select, {
14510
15153
  style: {
14511
15154
  width: 70
@@ -14515,13 +15158,13 @@ var getColumns$2 = function getColumns(_ref) {
14515
15158
  onChange: function onChange(value) {
14516
15159
  return updateHandle(value, index, 'type');
14517
15160
  }
14518
- }) : /*#__PURE__*/React.createElement("span", null, val);
15161
+ }) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
14519
15162
  }
14520
15163
  }]
14521
15164
  };
14522
15165
  };
14523
15166
 
14524
- var getYesOrNo = function getYesOrNo(val) {
15167
+ var getYesOrNo$1 = function getYesOrNo(val) {
14525
15168
  if (isNull(val)) return null;
14526
15169
  return val ? '是' : '否';
14527
15170
  };
@@ -14659,7 +15302,7 @@ var getColumns$3 = function getColumns(_ref) {
14659
15302
  label: '否',
14660
15303
  value: false
14661
15304
  }]
14662
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
15305
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
14663
15306
  },
14664
15307
  width: 100
14665
15308
  }]
@@ -14671,7 +15314,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
14671
15314
  if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
14672
15315
  return false;
14673
15316
  };
14674
- var getYesOrNo$1 = function getYesOrNo(val) {
15317
+ var getYesOrNo$2 = function getYesOrNo(val) {
14675
15318
  if (isNull(val)) return null;
14676
15319
  return val ? '是' : '否';
14677
15320
  };
@@ -14781,7 +15424,7 @@ var getColumns$4 = function getColumns(_ref) {
14781
15424
  title: "\u662F\u5426\u53D6\u6D88",
14782
15425
  width: 150,
14783
15426
  render: function render(val) {
14784
- return /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15427
+ return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14785
15428
  }
14786
15429
  }, {
14787
15430
  dataIndex: 'isGift',
@@ -14800,7 +15443,7 @@ var getColumns$4 = function getColumns(_ref) {
14800
15443
  label: '否',
14801
15444
  value: 0
14802
15445
  }]
14803
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15446
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14804
15447
  }
14805
15448
  }, {
14806
15449
  dataIndex: 'skuNote',
@@ -14920,7 +15563,7 @@ var getColumns$4 = function getColumns(_ref) {
14920
15563
  label: '否',
14921
15564
  value: 0
14922
15565
  }]
14923
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15566
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
14924
15567
  }
14925
15568
  }].map(function (item) {
14926
15569
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15044,7 +15687,7 @@ var getColumns$4 = function getColumns(_ref) {
15044
15687
  label: '否',
15045
15688
  value: 0
15046
15689
  }]
15047
- }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
15690
+ }) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
15048
15691
  }
15049
15692
  }].map(function (item) {
15050
15693
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -15166,7 +15809,7 @@ var getColumns$5 = function getColumns() {
15166
15809
  ellipsis: true,
15167
15810
  align: 'center',
15168
15811
  render: function render(val, record, index) {
15169
- return (record.qty || 0) * (+record.salePrice || 0);
15812
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15170
15813
  }
15171
15814
  }, {
15172
15815
  dataIndex: 'batchId',
@@ -15442,7 +16085,7 @@ var getColumns$5 = function getColumns() {
15442
16085
  dataIndex: 'saleAmount',
15443
16086
  title: '总金额',
15444
16087
  render: function render(val, record) {
15445
- return (record.qty || 0) * (+record.salePrice || 0);
16088
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15446
16089
  }
15447
16090
  }, {
15448
16091
  dataIndex: 'batchId',
@@ -15551,7 +16194,7 @@ var getColumns$5 = function getColumns() {
15551
16194
  dataIndex: 'saleAmount',
15552
16195
  title: '总金额',
15553
16196
  render: function render(val, record) {
15554
- return (record.qty || 0) * (+record.salePrice || 0);
16197
+ return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
15555
16198
  }
15556
16199
  }, {
15557
16200
  dataIndex: 'isGift',
@@ -15590,22 +16233,255 @@ var getColumns$5 = function getColumns() {
15590
16233
  };
15591
16234
  };
15592
16235
 
16236
+ function toNum$2(value) {
16237
+ if (typeof value === 'string') {
16238
+ return value ? +value : void 0;
16239
+ }
16240
+ if (typeof value === 'number') {
16241
+ return value;
16242
+ }
16243
+ return void 0;
16244
+ }
15593
16245
  var getColumns$6 = function getColumns(_ref) {
15594
16246
  var _ref$text = _ref.text,
15595
- text = _ref$text === void 0 ? '' : _ref$text,
15596
16247
  disabled = _ref.disabled,
15597
16248
  updateHandle = _ref.updateHandle;
15598
16249
  return {
15599
- //bs商品信息
15600
- default: [{
15601
- dataIndex: 'mark',
15602
- title: "\u5546\u54C1\u6807\u8BB0",
15603
- align: 'center',
15604
- ellipsis: true,
15605
- width: 70,
15606
- render: function render(val, record, index) {
15607
- return /*#__PURE__*/React.createElement(Select, {
15608
- options: [{
16250
+ KM_GOODS: [{
16251
+ dataIndex: 'skuPropertiesName',
16252
+ title: "\u89C4\u683C\u540D\u79F0",
16253
+ width: 250
16254
+ }, {
16255
+ dataIndex: 'sysTitle',
16256
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16257
+ width: 150
16258
+ }, {
16259
+ dataIndex: 'title',
16260
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16261
+ width: 150
16262
+ }, {
16263
+ dataIndex: 'shortTitle',
16264
+ title: "\u5546\u54C1\u7B80\u79F0",
16265
+ width: 150
16266
+ }, {
16267
+ dataIndex: 'sysOuterId',
16268
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16269
+ width: 150
16270
+ }, {
16271
+ dataIndex: 'skuSysId',
16272
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16273
+ width: 150
16274
+ }, {
16275
+ dataIndex: 'skuId',
16276
+ title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
16277
+ width: 170
16278
+ }, {
16279
+ dataIndex: 'itemSysId',
16280
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16281
+ width: 150
16282
+ }, {
16283
+ dataIndex: 'sysPicPath',
16284
+ title: "\u5546\u54C1\u56FE\u7247",
16285
+ width: 100,
16286
+ render: function render(val) {
16287
+ return /*#__PURE__*/React.createElement(Image, {
16288
+ width: 60,
16289
+ src: val
16290
+ });
16291
+ }
16292
+ }, {
16293
+ dataIndex: 'num',
16294
+ title: "\u6570\u91CF",
16295
+ width: 100,
16296
+ render: function render(val, record, index) {
16297
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16298
+ style: {
16299
+ width: 70
16300
+ },
16301
+ value: val,
16302
+ min: 1,
16303
+ precision: 0,
16304
+ onChange: function onChange(num) {
16305
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
16306
+ }
16307
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16308
+ }
16309
+ }, {
16310
+ dataIndex: 'payment',
16311
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16312
+ width: 150,
16313
+ render: function render(val, record, index) {
16314
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16315
+ style: {
16316
+ width: 130
16317
+ },
16318
+ value: val,
16319
+ min: 0,
16320
+ precision: 2,
16321
+ onChange: function onChange(num) {
16322
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
16323
+ }
16324
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16325
+ }
16326
+ }, {
16327
+ dataIndex: 'price',
16328
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16329
+ width: 150,
16330
+ render: function render(val) {
16331
+ return val || val === 0 ? Number(val).toFixed(2) : '';
16332
+ }
16333
+ }, {
16334
+ dataIndex: 'type',
16335
+ title: "\u5546\u54C1\u7C7B\u578B",
16336
+ width: 150
16337
+ }].map(function (item) {
16338
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16339
+ align: 'center',
16340
+ ellipsis: true
16341
+ });
16342
+ }),
16343
+ KM_REISSUE_GOODS: [{
16344
+ dataIndex: 'skuPropertiesName',
16345
+ title: "\u89C4\u683C\u540D\u79F0",
16346
+ width: 250
16347
+ }, {
16348
+ dataIndex: 'sysTitle',
16349
+ title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
16350
+ width: 150
16351
+ }, {
16352
+ dataIndex: 'shortTitle',
16353
+ title: "\u5546\u54C1\u7B80\u79F0",
16354
+ width: 150
16355
+ }, {
16356
+ dataIndex: 'title',
16357
+ title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
16358
+ width: 150
16359
+ }, {
16360
+ dataIndex: 'sysOuterId',
16361
+ title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
16362
+ width: 150
16363
+ }, {
16364
+ dataIndex: 'itemSysId',
16365
+ title: "\u7CFB\u7EDF\u5546\u54C1ID",
16366
+ width: 150
16367
+ }, {
16368
+ dataIndex: 'skuSysId',
16369
+ title: "\u7CFB\u7EDF\u89C4\u683CID",
16370
+ width: 150
16371
+ }, {
16372
+ dataIndex: 'skuId',
16373
+ title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
16374
+ width: 170
16375
+ }, {
16376
+ dataIndex: 'realNum',
16377
+ title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
16378
+ width: 100,
16379
+ validator: function validator(_rule, value) {
16380
+ var title = '';
16381
+ if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
16382
+ var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
16383
+ var res = typeof realNum === 'number' ? realNum < 1 : true;
16384
+ if (res) {
16385
+ title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
16386
+ }
16387
+ return res;
16388
+ })) {
16389
+ return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
16390
+ }
16391
+ },
16392
+ render: function render(val, record, index) {
16393
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16394
+ style: {
16395
+ width: 70
16396
+ },
16397
+ value: val,
16398
+ min: 1,
16399
+ precision: 0,
16400
+ onChange: function onChange(num) {
16401
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
16402
+ }
16403
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16404
+ }
16405
+ }, {
16406
+ dataIndex: 'desiredNum',
16407
+ title: "\u5E94\u8865\u53D1\u6570\u91CF",
16408
+ width: 100,
16409
+ render: function render(val, record, index) {
16410
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16411
+ style: {
16412
+ width: 70
16413
+ },
16414
+ value: val,
16415
+ min: 1,
16416
+ precision: 0,
16417
+ onChange: function onChange(num) {
16418
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
16419
+ }
16420
+ }) : /*#__PURE__*/React.createElement("span", null, val);
16421
+ }
16422
+ }, {
16423
+ dataIndex: 'price',
16424
+ title: "\u5546\u54C1\u9500\u552E\u4EF7",
16425
+ width: 150,
16426
+ render: function render(val) {
16427
+ return val || val === 0 ? Number(val).toFixed(2) : '';
16428
+ }
16429
+ }, {
16430
+ dataIndex: 'payment',
16431
+ title: "\u5B9E\u4ED8\u91D1\u989D",
16432
+ width: 150,
16433
+ render: function render(val, record, index) {
16434
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
16435
+ style: {
16436
+ width: 130
16437
+ },
16438
+ value: val,
16439
+ min: 0,
16440
+ precision: 2,
16441
+ onChange: function onChange(num) {
16442
+ return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
16443
+ }
16444
+ }) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
16445
+ }
16446
+ }, {
16447
+ dataIndex: 'type',
16448
+ title: "\u5546\u54C1\u7C7B\u578B",
16449
+ width: 150
16450
+ }, {
16451
+ dataIndex: 'sysPicPath',
16452
+ title: "\u5546\u54C1\u56FE\u7247",
16453
+ width: 100,
16454
+ render: function render(val) {
16455
+ return /*#__PURE__*/React.createElement(Image, {
16456
+ width: 60,
16457
+ src: val
16458
+ });
16459
+ }
16460
+ }].map(function (item) {
16461
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16462
+ align: 'center',
16463
+ ellipsis: true
16464
+ });
16465
+ })
16466
+ };
16467
+ };
16468
+
16469
+ var getColumns$7 = function getColumns(_ref) {
16470
+ var _ref$text = _ref.text,
16471
+ text = _ref$text === void 0 ? '' : _ref$text,
16472
+ disabled = _ref.disabled,
16473
+ updateHandle = _ref.updateHandle;
16474
+ return {
16475
+ //bs商品信息
16476
+ default: [{
16477
+ dataIndex: 'mark',
16478
+ title: "\u5546\u54C1\u6807\u8BB0",
16479
+ align: 'center',
16480
+ ellipsis: true,
16481
+ width: 70,
16482
+ render: function render(val, record, index) {
16483
+ return /*#__PURE__*/React.createElement(Select, {
16484
+ options: [{
15609
16485
  label: '是',
15610
16486
  value: '是'
15611
16487
  }, {
@@ -15703,7 +16579,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15703
16579
  disabled = _ref.disabled,
15704
16580
  updateHandle = _ref.updateHandle,
15705
16581
  updateDataHandle = _ref.updateDataHandle;
15706
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
16582
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
15707
16583
  text: text,
15708
16584
  disabled: disabled,
15709
16585
  updateHandle: updateHandle
@@ -15728,8 +16604,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15728
16604
  text: text,
15729
16605
  disabled: disabled,
15730
16606
  updateHandle: updateHandle
16607
+ })), getColumns$6({
16608
+ text: text,
16609
+ disabled: disabled,
16610
+ updateHandle: updateHandle
15731
16611
  })), {}, {
15732
- default: getColumns$6({
16612
+ default: getColumns$7({
15733
16613
  text: text,
15734
16614
  disabled: disabled,
15735
16615
  updateHandle: updateHandle
@@ -15737,6 +16617,29 @@ var getColumnsMap$1 = function getColumnsMap(args) {
15737
16617
  });
15738
16618
  };
15739
16619
  var erpColumnsMap = getColumnsMap$1();
16620
+ var erpFormValidator = function erpFormValidator(_rule, value, type) {
16621
+ var validatorFnList = (erpColumnsMap[type] || erpColumnsMap['default']).map(function (column) {
16622
+ return column.validator;
16623
+ }).filter(Boolean);
16624
+ var res = null;
16625
+ var _iterator = _createForOfIteratorHelper(validatorFnList),
16626
+ _step;
16627
+ try {
16628
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
16629
+ var validatorFn = _step.value;
16630
+ var validatorResult = validatorFn(_rule, value, type);
16631
+ if (validatorResult) {
16632
+ res = validatorResult;
16633
+ break;
16634
+ }
16635
+ }
16636
+ } catch (err) {
16637
+ _iterator.e(err);
16638
+ } finally {
16639
+ _iterator.f();
16640
+ }
16641
+ return res;
16642
+ };
15740
16643
  var getColumnsBaseInfo$1 = function getColumnsBaseInfo() {
15741
16644
  var clone_columnsMap = cloneDeep(getColumnsMap$1());
15742
16645
  var newColumns = {};
@@ -15858,6 +16761,231 @@ function HoverTableRowDeleteIcon(_ref) {
15858
16761
  })));
15859
16762
  }
15860
16763
 
16764
+ var isErpType = {
16765
+ isWdt: function isWdt(type) {
16766
+ return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
16767
+ },
16768
+ isBsE3: function isBsE3(type) {
16769
+ return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
16770
+ },
16771
+ isGy: function isGy(type) {
16772
+ return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
16773
+ },
16774
+ isJst: function isJst(type) {
16775
+ return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
16776
+ },
16777
+ isKm: function isKm(type) {
16778
+ return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
16779
+ }
16780
+ };
16781
+ var processGoods = function processGoods(_ref) {
16782
+ var list = _ref.list,
16783
+ type = _ref.type,
16784
+ canUpdateNumber = _ref.canUpdateNumber;
16785
+ var newList = [];
16786
+ // 根据商品类型处理数据
16787
+ if (isErpType.isWdt(type)) {
16788
+ newList = processWdtGoods({
16789
+ list: list,
16790
+ type: type,
16791
+ canUpdateNumber: canUpdateNumber
16792
+ });
16793
+ } else if (isErpType.isBsE3(type)) {
16794
+ newList = processBsE3Goods({
16795
+ list: list,
16796
+ type: type,
16797
+ canUpdateNumber: canUpdateNumber
16798
+ });
16799
+ } else if (isErpType.isGy(type)) {
16800
+ newList = processGyGoods({
16801
+ list: list,
16802
+ type: type,
16803
+ canUpdateNumber: canUpdateNumber
16804
+ });
16805
+ } else if (isErpType.isJst(type)) {
16806
+ newList = processJstGoods({
16807
+ list: list,
16808
+ type: type,
16809
+ canUpdateNumber: canUpdateNumber
16810
+ });
16811
+ } else if (isErpType.isKm(type)) {
16812
+ newList = processKmGoods({
16813
+ list: list,
16814
+ type: type,
16815
+ canUpdateNumber: canUpdateNumber
16816
+ });
16817
+ } else {
16818
+ newList = processDefaultGoods({
16819
+ list: list,
16820
+ type: type,
16821
+ canUpdateNumber: canUpdateNumber
16822
+ });
16823
+ }
16824
+ return newList;
16825
+ };
16826
+ // 处理不同类型的商品数据
16827
+ var processWdtGoods = function processWdtGoods(_ref2) {
16828
+ var list = _ref2.list,
16829
+ type = _ref2.type,
16830
+ canUpdateNumber = _ref2.canUpdateNumber;
16831
+ return list.map(function (item) {
16832
+ var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
16833
+ uuid: uuid(),
16834
+ canDelete: true,
16835
+ num: 1,
16836
+ orderPrice: 0,
16837
+ sharePrice: 0,
16838
+ canUpdateNumber: canUpdateNumber
16839
+ });
16840
+ // 特殊处理换货商品
16841
+ if (type === 'WDT_EXCHANGE_GOODS') {
16842
+ processedItem.price = item.retailPrice;
16843
+ processedItem.type = '1';
16844
+ }
16845
+ return processedItem;
16846
+ });
16847
+ };
16848
+ var processBsE3Goods = function processBsE3Goods(_ref3) {
16849
+ var list = _ref3.list,
16850
+ canUpdateNumber = _ref3.canUpdateNumber;
16851
+ return list.map(function (item) {
16852
+ var specNo = item.specNo,
16853
+ specId = item.specId,
16854
+ goodName = item.goodName,
16855
+ goodShortName = item.goodShortName,
16856
+ goodPicUrl = item.goodPicUrl,
16857
+ goodNo = item.goodNo,
16858
+ goodId = item.goodId,
16859
+ retailPrice = item.retailPrice;
16860
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16861
+ sku: specNo,
16862
+ skuId: specId,
16863
+ goodsName: goodName,
16864
+ goodsShortName: goodShortName,
16865
+ picPath: goodPicUrl,
16866
+ goodsSn: goodNo,
16867
+ goodsId: goodId,
16868
+ goodsPrice: retailPrice,
16869
+ shopPrice: retailPrice,
16870
+ sharePayment: '',
16871
+ sharePrice: '',
16872
+ payment: '',
16873
+ tcSku: '',
16874
+ tcGoodsNumber: '',
16875
+ taoCanSingleSl: '',
16876
+ isGift: '',
16877
+ uuid: uuid(),
16878
+ canDelete: true,
16879
+ canEdit: true,
16880
+ goodsNumber: 1,
16881
+ canUpdateNumber: canUpdateNumber
16882
+ });
16883
+ });
16884
+ };
16885
+ var processGyGoods = function processGyGoods(_ref4) {
16886
+ var list = _ref4.list;
16887
+ return list.map(function (item) {
16888
+ var goodName = item.goodName,
16889
+ goodShortName = item.goodShortName,
16890
+ goodNo = item.goodNo,
16891
+ specName = item.specName,
16892
+ specNo = item.specNo,
16893
+ retailPrice = item.retailPrice;
16894
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16895
+ uuid: uuid(),
16896
+ canDelete: true,
16897
+ canEdit: true,
16898
+ qty: 1,
16899
+ goodName: goodName,
16900
+ goodShortName: goodShortName,
16901
+ goodNo: goodNo,
16902
+ specName: specName,
16903
+ specNo: specNo,
16904
+ originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
16905
+ originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
16906
+ });
16907
+ });
16908
+ };
16909
+ var processJstGoods = function processJstGoods(_ref5) {
16910
+ var list = _ref5.list;
16911
+ return list.map(function (item) {
16912
+ return {
16913
+ name: item.goodName,
16914
+ skuId: item.goodNo,
16915
+ iId: item.styleCode,
16916
+ pic: item.goodPicUrl,
16917
+ propertiesValue: item.propertiesValue,
16918
+ saleBasePrice: item.retailPrice,
16919
+ salePrice: item.retailPrice,
16920
+ remark: '',
16921
+ uuid: uuid(),
16922
+ canDelete: true,
16923
+ canEdit: true,
16924
+ qty: 1
16925
+ };
16926
+ });
16927
+ };
16928
+ var processKmGoods = function processKmGoods(_ref6) {
16929
+ var list = _ref6.list,
16930
+ type = _ref6.type;
16931
+ var initParamsMap = {
16932
+ KM_GOODS: {
16933
+ num: 1
16934
+ },
16935
+ KM_REISSUE_GOODS: {
16936
+ realNum: 1,
16937
+ desiredNum: 1
16938
+ }
16939
+ };
16940
+ return list.map(function (item) {
16941
+ return _objectSpread2(_objectSpread2({}, item), {}, {
16942
+ skuPropertiesName: item.specName,
16943
+ sysTitle: item.goodName,
16944
+ title: null,
16945
+ shortTitle: item.goodShortName,
16946
+ sysOuterId: item.goodNo,
16947
+ outerId: item.goodNo,
16948
+ skuSysId: item.specId,
16949
+ itemSysId: item.goodId,
16950
+ sysPicPath: item.goodPicUrl,
16951
+ payment: null,
16952
+ price: item.retailPrice,
16953
+ type: null,
16954
+ uuid: uuid(),
16955
+ canDelete: true,
16956
+ canEdit: true
16957
+ }, initParamsMap[type] || {});
16958
+ });
16959
+ };
16960
+ var processDefaultGoods = function processDefaultGoods(_ref7) {
16961
+ var list = _ref7.list,
16962
+ canUpdateNumber = _ref7.canUpdateNumber;
16963
+ return list.map(function (item) {
16964
+ var goodsId = item.goodsId,
16965
+ name = item.name,
16966
+ code = item.code,
16967
+ skuCode = item.skuCode,
16968
+ marketPrice = item.marketPrice,
16969
+ skuName = item.skuName;
16970
+ return {
16971
+ id: goodsId,
16972
+ mark: '是',
16973
+ pic: '',
16974
+ skuName: skuName,
16975
+ name: name,
16976
+ code: code,
16977
+ sku: skuCode,
16978
+ money: marketPrice || 0,
16979
+ share: marketPrice || 0,
16980
+ number: 1,
16981
+ type: '',
16982
+ uuid: uuid(),
16983
+ canDelete: true,
16984
+ canUpdateNumber: canUpdateNumber
16985
+ };
16986
+ });
16987
+ };
16988
+
15861
16989
  var GoodsModalMap = {
15862
16990
  WDT_REISSUE_GOODS: WdtGoodsModal,
15863
16991
  WDT_GOODS: WdtGoodsModal,
@@ -15867,10 +16995,13 @@ var GoodsModalMap = {
15867
16995
  BS_E3_EXCHANGE_GOODS: BsE3GoodsModal,
15868
16996
  GY_GOODS: GyGoodsModal$2,
15869
16997
  GY_REISSUE_GOODS: GyGoodsModal$2,
16998
+ GY_RETURN_GOODS: GyGoodsModal$2,
15870
16999
  JST_GOODS: JstGoodsModal,
15871
17000
  JST_REISSUE_GOODS: JstGoodsModal,
15872
17001
  JST_RETURN_GOODS: JstGoodsModal,
15873
17002
  JST_EXCHANGE_GOODS: JstGoodsModal,
17003
+ KM_GOODS: KmGoodsModal,
17004
+ KM_REISSUE_GOODS: KmGoodsModal,
15874
17005
  OTHER_GOODS: GoodsModal$2
15875
17006
  };
15876
17007
  var SelectTradeGoods = function SelectTradeGoods(_ref) {
@@ -15904,7 +17035,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15904
17035
  return item === null || item === void 0 ? void 0 : item[uniqueKey];
15905
17036
  }));
15906
17037
  var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
15907
- console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
17038
+ // console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
15908
17039
  onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
15909
17040
  };
15910
17041
  var rowSelection = {
@@ -15933,13 +17064,16 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
15933
17064
  };
15934
17065
  var getButtonText = function getButtonText() {
15935
17066
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
17067
+ if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
17068
+ return '选择快麦ERP商品';
17069
+ }
15936
17070
  if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
15937
17071
  return '选择百胜ERP商品';
15938
17072
  }
15939
17073
  if (['WDT_REISSUE_GOODS'].includes(type)) {
15940
17074
  return '选择旺店通商品';
15941
17075
  }
15942
- if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
17076
+ if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
15943
17077
  return '选择管易ERP商品';
15944
17078
  }
15945
17079
  if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
@@ -16076,6 +17210,8 @@ var GoodItem$1 = function GoodItem(props) {
16076
17210
  case 'JST_RETURN_GOODS':
16077
17211
  case 'GY_REISSUE_GOODS':
16078
17212
  case 'GY_RETURN_GOODS':
17213
+ case 'KM_GOODS':
17214
+ case 'KM_REISSUE_GOODS':
16079
17215
  {
16080
17216
  columns = getColumnsMap$1({
16081
17217
  text: text,
@@ -16193,120 +17329,11 @@ var GoodItem$1 = function GoodItem(props) {
16193
17329
  }].concat(_toConsumableArray(columns));
16194
17330
  }, []);
16195
17331
  var onSubmit = function onSubmit(list) {
16196
- var newList = [];
16197
- if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
16198
- newList = list.map(function (item) {
16199
- item.uuid = uuid();
16200
- item.canDelete = true;
16201
- item.num = 1;
16202
- item.orderPrice = 0;
16203
- item.sharePrice = 0;
16204
- item.canUpdateNumber = canUpdateNumber;
16205
- if (type === 'WDT_EXCHANGE_GOODS') {
16206
- item.price = item.retailPrice;
16207
- item.type = '1';
16208
- }
16209
- return item;
16210
- });
16211
- } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
16212
- newList = list.map(function (item) {
16213
- var specNo = item.specNo,
16214
- specId = item.specId,
16215
- goodName = item.goodName,
16216
- goodShortName = item.goodShortName,
16217
- goodPicUrl = item.goodPicUrl,
16218
- goodNo = item.goodNo,
16219
- goodId = item.goodId,
16220
- retailPrice = item.retailPrice;
16221
- return _objectSpread2(_objectSpread2({}, item), {}, {
16222
- sku: specNo,
16223
- skuId: specId,
16224
- goodsName: goodName,
16225
- goodsShortName: goodShortName,
16226
- picPath: goodPicUrl,
16227
- goodsSn: goodNo,
16228
- goodsId: goodId,
16229
- goodsPrice: retailPrice,
16230
- shopPrice: retailPrice,
16231
- sharePayment: '',
16232
- sharePrice: '',
16233
- payment: '',
16234
- tcSku: '',
16235
- tcGoodsNumber: '',
16236
- taoCanSingleSl: '',
16237
- isGift: '',
16238
- uuid: uuid(),
16239
- canDelete: true,
16240
- canEdit: true,
16241
- goodsNumber: 1,
16242
- canUpdateNumber: canUpdateNumber
16243
- });
16244
- });
16245
- } else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
16246
- newList = list.map(function (item) {
16247
- var goodName = item.goodName,
16248
- goodShortName = item.goodShortName,
16249
- goodNo = item.goodNo,
16250
- specName = item.specName,
16251
- specNo = item.specNo,
16252
- retailPrice = item.retailPrice;
16253
- return _objectSpread2(_objectSpread2({}, item), {}, {
16254
- uuid: uuid(),
16255
- canDelete: true,
16256
- canEdit: true,
16257
- qty: 1,
16258
- goodName: goodName,
16259
- goodShortName: goodShortName,
16260
- goodNo: goodNo,
16261
- specName: specName,
16262
- specNo: specNo,
16263
- originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
16264
- originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
16265
- });
16266
- });
16267
- } else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
16268
- newList = list.map(function (item) {
16269
- return {
16270
- name: item.goodName,
16271
- skuId: item.goodNo,
16272
- iId: item.styleCode,
16273
- pic: item.goodPicUrl,
16274
- propertiesValue: item.propertiesValue,
16275
- saleBasePrice: item.retailPrice,
16276
- salePrice: item.retailPrice,
16277
- remark: '',
16278
- uuid: uuid(),
16279
- canDelete: true,
16280
- canEdit: true,
16281
- qty: 1
16282
- };
16283
- });
16284
- } else {
16285
- newList = list.map(function (item) {
16286
- var goodsId = item.goodsId,
16287
- name = item.name,
16288
- code = item.code,
16289
- skuCode = item.skuCode,
16290
- marketPrice = item.marketPrice,
16291
- skuName = item.skuName;
16292
- return {
16293
- id: goodsId,
16294
- mark: '是',
16295
- pic: '',
16296
- skuName: skuName,
16297
- name: name,
16298
- code: code,
16299
- sku: skuCode,
16300
- money: marketPrice || 0,
16301
- share: marketPrice || 0,
16302
- number: 1,
16303
- type: '',
16304
- uuid: uuid(),
16305
- canDelete: true,
16306
- canUpdateNumber: canUpdateNumber
16307
- };
16308
- });
16309
- }
17332
+ var newList = processGoods({
17333
+ list: list,
17334
+ canUpdateNumber: canUpdateNumber,
17335
+ type: type
17336
+ });
16310
17337
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
16311
17338
  };
16312
17339
  var onSelectChange = function onSelectChange(newSelectedRowKeys) {
@@ -17020,10 +18047,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
17020
18047
  var _data$data, _data$data$trades;
17021
18048
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
17022
18049
  data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
18050
+ var _tradeStatusMap$data$;
17023
18051
  return _objectSpread2(_objectSpread2({}, item), {}, {
17024
18052
  billNo: item.tradeNo,
17025
18053
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
17026
- billTag: item.tagName
18054
+ billTag: item.tagName,
18055
+ tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
17027
18056
  });
17028
18057
  });
17029
18058
  }
@@ -17066,6 +18095,10 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
17066
18095
  data.data.orderList = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
17067
18096
  }
17068
18097
  resolve(data.data);
18098
+ // 延迟10秒清除,保证订单的时效性
18099
+ setTimeout(function () {
18100
+ singletonMap$1.delete(orderNo);
18101
+ }, 1000 * 10);
17069
18102
  } else {
17070
18103
  doReject(data);
17071
18104
  }
@@ -17106,6 +18139,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
17106
18139
  deliveryState: item.deliveryState,
17107
18140
  vipCode: item.vipCode,
17108
18141
  shopCode: item.shopCode,
18142
+ cancelName: item.cancel ? '是' : '否',
17109
18143
  deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
17110
18144
  });
17111
18145
  });
@@ -17143,7 +18177,11 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
17143
18177
  orderList: (data === null || data === void 0 ? void 0 : data.data) || []
17144
18178
  }, orderNo);
17145
18179
  resolve(data.data);
17146
- } else {
18180
+ // 延迟10秒清除,保证订单的时效性
18181
+ setTimeout(function () {
18182
+ singletonMap$3.delete(orderNo);
18183
+ }, 1000 * 10);
18184
+ } else {
17147
18185
  doReject(data);
17148
18186
  }
17149
18187
  }).catch(doReject);
@@ -17186,6 +18224,74 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
17186
18224
  singletonMap$4.delete(orderNo);
17187
18225
  reject(err);
17188
18226
  };
18227
+ extendRequest('/qy/gdfw/order/wlnOrderList', {
18228
+ method: 'post',
18229
+ data: {
18230
+ billNo: orderNo
18231
+ }
18232
+ }).then(function (data) {
18233
+ if (data === null || data === void 0 ? void 0 : data.success) {
18234
+ resolve(data.data);
18235
+ // 延迟10秒清除,保证订单的时效性
18236
+ setTimeout(function () {
18237
+ singletonMap$4.delete(orderNo);
18238
+ }, 1000 * 10);
18239
+ } else {
18240
+ doReject(data);
18241
+ }
18242
+ }).catch(doReject);
18243
+ });
18244
+ singletonMap$4.set(orderNo, p);
18245
+ }
18246
+ return singletonMap$4.get(orderNo);
18247
+ };
18248
+ var wlnUtils = {
18249
+ getOrderListSingleton: getOrderListSingleton
18250
+ };
18251
+
18252
+ var singletonMap$5 = new Map();
18253
+ var getOrderListSingleton$1 = function getOrderListSingleton(orderNo) {
18254
+ if (!singletonMap$5.has(orderNo)) {
18255
+ var p = new Promise(function (resolve, reject) {
18256
+ var doReject = function doReject(err) {
18257
+ // 清空掉错误的请求记录
18258
+ singletonMap$5.delete(orderNo);
18259
+ reject(err);
18260
+ };
18261
+ extendRequest('/qy/gdfw/order/bsOrderDetail', {
18262
+ method: 'post',
18263
+ data: {
18264
+ billNo: orderNo
18265
+ }
18266
+ }).then(function (data) {
18267
+ if (data === null || data === void 0 ? void 0 : data.success) {
18268
+ resolve(data.data);
18269
+ // 延迟10秒清除,保证订单的时效性
18270
+ setTimeout(function () {
18271
+ singletonMap$5.delete(orderNo);
18272
+ }, 1000 * 10);
18273
+ } else {
18274
+ doReject(data);
18275
+ }
18276
+ }).catch(doReject);
18277
+ });
18278
+ singletonMap$5.set(orderNo, p);
18279
+ }
18280
+ return singletonMap$5.get(orderNo);
18281
+ };
18282
+ var bsUtils = {
18283
+ getOrderListSingleton: getOrderListSingleton$1
18284
+ };
18285
+
18286
+ var singletonMap$6 = new Map();
18287
+ var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
18288
+ if (!singletonMap$6.has(orderNo)) {
18289
+ var p = new Promise(function (resolve, reject) {
18290
+ var doReject = function doReject(err) {
18291
+ // 清空掉错误的请求记录
18292
+ singletonMap$6.delete(orderNo);
18293
+ reject(err);
18294
+ };
17189
18295
  extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
17190
18296
  method: 'post',
17191
18297
  data: {
@@ -17209,22 +18315,22 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
17209
18315
  }
17210
18316
  // 延迟10秒清除,保证订单的时效性
17211
18317
  setTimeout(function () {
17212
- singletonMap$4.delete(orderNo);
18318
+ singletonMap$6.delete(orderNo);
17213
18319
  }, 1000 * 10);
17214
18320
  } else {
17215
18321
  doReject(data);
17216
18322
  }
17217
18323
  }).catch(doReject);
17218
18324
  });
17219
- singletonMap$4.set(orderNo, p);
18325
+ singletonMap$6.set(orderNo, p);
17220
18326
  }
17221
- return singletonMap$4.get(orderNo);
18327
+ return singletonMap$6.get(orderNo);
17222
18328
  };
17223
18329
  var kmUtils = {
17224
- getOrderListSingleton: getOrderListSingleton
18330
+ getOrderListSingleton: getOrderListSingleton$2
17225
18331
  };
17226
18332
 
17227
- var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
18333
+ var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
17228
18334
  var columnsMap = {
17229
18335
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
17230
18336
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
@@ -17266,7 +18372,6 @@ var index$3 = (function (props) {
17266
18372
  } else if (type === 'BS_E3_SYSTEM_ORDER') {
17267
18373
  getBsE3OrderList(value.orderNo);
17268
18374
  } else if (type === 'GY_SYSTEM_ORDER') {
17269
- console.log('触发gy--getGyOrderList--1');
17270
18375
  getGyOrderList(value.orderNo);
17271
18376
  } else if (type === 'JST_SYSTEM_ORDER') {
17272
18377
  getJstOrderList(value.orderNo);
@@ -17278,22 +18383,11 @@ var index$3 = (function (props) {
17278
18383
  }, [type]);
17279
18384
  var getOrderList = /*#__PURE__*/function () {
17280
18385
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
17281
- var _yield$request, success, data, _valueRef$current;
17282
18386
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17283
18387
  while (1) switch (_context.prev = _context.next) {
17284
18388
  case 0:
17285
- _context.next = 2;
17286
- return extendRequest('/qy/gdfw/order/bsOrderDetail', {
17287
- method: 'post',
17288
- data: {
17289
- billNo: orderNo
17290
- }
17291
- });
17292
- case 2:
17293
- _yield$request = _context.sent;
17294
- success = _yield$request.success;
17295
- data = _yield$request.data;
17296
- if (success) {
18389
+ bsUtils.getOrderListSingleton(orderNo).then(function (data) {
18390
+ var _valueRef$current;
17297
18391
  _onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, {
17298
18392
  orders: (data === null || data === void 0 ? void 0 : data.orders) || [],
17299
18393
  showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
@@ -17307,10 +18401,10 @@ var index$3 = (function (props) {
17307
18401
  };
17308
18402
  })
17309
18403
  }));
17310
- }
18404
+ });
17311
18405
 
17312
18406
  onceRef.current = false;
17313
- case 7:
18407
+ case 2:
17314
18408
  case "end":
17315
18409
  return _context.stop();
17316
18410
  }
@@ -17322,22 +18416,11 @@ var index$3 = (function (props) {
17322
18416
  }();
17323
18417
  var getWlnOrderList = /*#__PURE__*/function () {
17324
18418
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
17325
- var _yield$request2, success, data, _valueRef$current2;
17326
18419
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
17327
18420
  while (1) switch (_context2.prev = _context2.next) {
17328
18421
  case 0:
17329
- _context2.next = 2;
17330
- return extendRequest('/qy/gdfw/order/wlnOrderList', {
17331
- method: 'post',
17332
- data: {
17333
- billCode: orderNo
17334
- }
17335
- });
17336
- case 2:
17337
- _yield$request2 = _context2.sent;
17338
- success = _yield$request2.success;
17339
- data = _yield$request2.data;
17340
- if (success) {
18422
+ wlnUtils.getOrderListSingleton(orderNo).then(function (data) {
18423
+ var _valueRef$current2;
17341
18424
  _onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}), {}, {
17342
18425
  orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
17343
18426
  return _objectSpread2(_objectSpread2({}, item), {}, {
@@ -17354,9 +18437,9 @@ var index$3 = (function (props) {
17354
18437
  };
17355
18438
  })
17356
18439
  }));
17357
- }
18440
+ });
17358
18441
  onceRef.current = false;
17359
- case 7:
18442
+ case 2:
17360
18443
  case "end":
17361
18444
  return _context2.stop();
17362
18445
  }
@@ -17380,11 +18463,13 @@ var index$3 = (function (props) {
17380
18463
  showOrderInfo: trades.map(function (_ref4) {
17381
18464
  var billNo = _ref4.billNo,
17382
18465
  billType = _ref4.billType,
17383
- billTag = _ref4.billTag;
18466
+ billTag = _ref4.billTag,
18467
+ tradeStatusValue = _ref4.tradeStatusValue;
17384
18468
  return {
17385
18469
  billNo: billNo,
17386
18470
  billType: billType,
17387
- billTag: billTag
18471
+ billTag: billTag,
18472
+ tradeStatusValue: tradeStatusValue
17388
18473
  };
17389
18474
  })
17390
18475
  }));
@@ -17498,6 +18583,7 @@ var index$3 = (function (props) {
17498
18583
  deliveryState = _ref10.deliveryState,
17499
18584
  vipCode = _ref10.vipCode,
17500
18585
  shopCode = _ref10.shopCode,
18586
+ cancel = _ref10.cancel,
17501
18587
  rest = _objectWithoutProperties(_ref10, _excluded$h);
17502
18588
  return _objectSpread2(_objectSpread2({}, rest), {}, {
17503
18589
  billNo: billNo,
@@ -17505,6 +18591,7 @@ var index$3 = (function (props) {
17505
18591
  billTag: billTag,
17506
18592
  tradeTagName: tradeTagName,
17507
18593
  deliveryState: deliveryState,
18594
+ cancelName: cancel ? '是' : '否',
17508
18595
  deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
17509
18596
  vipCode: vipCode,
17510
18597
  shopCode: shopCode
@@ -17694,6 +18781,31 @@ var componentMap$1 = {
17694
18781
  returnDeleteGood: 'jstReturnDeleteGood',
17695
18782
  exchangeDeleteGood: 'jstExchangeDeleteGood'
17696
18783
  }
18784
+ },
18785
+ KM_GOODS: {
18786
+ type: 'km',
18787
+ key: 'kmGoods',
18788
+ name: '快麦',
18789
+ orderNo: 'tid',
18790
+ goodDetailOrderNo: 'originalDealCode',
18791
+ eventNameMap: {
18792
+ // pubsub 事件
18793
+ type: 'kmType',
18794
+ updateGoodsHandle: updateKmGoodsHandle,
18795
+ selectListReturn: 'kmSelectListReturn',
18796
+ selectList: 'kmSelectList',
18797
+ reissueSelectList: 'kmReissueSelectList',
18798
+ reissueSelectListReturn: 'kmReissueSelectListReturn',
18799
+ reissueDeleteGood: 'kmReissueDeleteGood',
18800
+ changeShopCode: 'kmChangeShopCode',
18801
+ reissueType: 'kmReissueType',
18802
+ returnType: 'kmReturnType',
18803
+ returnSelectListReturn: 'kmReturnSelectListReturn',
18804
+ returnSelectList: 'kmReturnSelectList',
18805
+ deleteGood: 'kmDeleteGood',
18806
+ returnDeleteGood: 'kmReturnDeleteGood',
18807
+ exchangeDeleteGood: 'kmExchangeDeleteGood'
18808
+ }
17697
18809
  }
17698
18810
  };
17699
18811
  var CommonGoods = function CommonGoods(props) {
@@ -17702,7 +18814,7 @@ var CommonGoods = function CommonGoods(props) {
17702
18814
  disabled = props.disabled,
17703
18815
  onChange = props.onChange,
17704
18816
  compType = props.type;
17705
- console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
18817
+ // console.log('value?.orders', value?.orders);
17706
18818
  // 合并单订单会包含","
17707
18819
  var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
17708
18820
  var _order$componentMap$c;
@@ -17855,7 +18967,9 @@ var CommonGoods = function CommonGoods(props) {
17855
18967
  var getGoodDetails = function getGoodDetails(_ref2) {
17856
18968
  var mode = _ref2.mode;
17857
18969
  var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
17858
- var goodDetails = updateHandle(value.orders || []);
18970
+ var goodDetails = updateHandle(value.orders || [], {
18971
+ orderBackGoodsLevel: props.orderBackGoodsLevel
18972
+ });
17859
18973
  var orderNo = value.orderNo;
17860
18974
  return mode ? goodDetails.filter(function (goodItem) {
17861
18975
  var _componentMap$compTyp;
@@ -17909,7 +19023,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
17909
19023
  _props$reasonList = props.reasonList,
17910
19024
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
17911
19025
  disabled = props.disabled,
17912
- compType = props.type;
19026
+ compType = props.type,
19027
+ isSettingConfig = props.isSettingConfig;
17913
19028
  var valueRef = useRef({});
17914
19029
  useEffect(function () {
17915
19030
  var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
@@ -18001,7 +19116,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18001
19116
  var newValue = _objectSpread2({}, value);
18002
19117
  newValue[componentMap$2[compType].returnTypeKey] = val;
18003
19118
  newValue[componentMap$2[compType].valueKey] = [];
18004
- if (['2'].includes(val[0])) {
19119
+ if (isSettingConfig || ['2'].includes(val[0])) {
18005
19120
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18006
19121
  valueRef.current = newValue;
18007
19122
  }
@@ -18023,7 +19138,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
18023
19138
  style: {
18024
19139
  marginBottom: '8px'
18025
19140
  },
18026
- disabled: disabled,
19141
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18027
19142
  allowClear: false,
18028
19143
  options: reasonList,
18029
19144
  value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
@@ -18205,7 +19320,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
18205
19320
  })));
18206
19321
  };
18207
19322
 
18208
- var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
19323
+ var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18209
19324
  var typeMap$1 = {
18210
19325
  WDT_REISSUE_GOODS: {
18211
19326
  key: 'wdtReissueGoods',
@@ -18226,13 +19341,14 @@ var typeMap$1 = {
18226
19341
  }
18227
19342
  };
18228
19343
  var wdtReissue = function wdtReissue(props) {
18229
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type26, _typeMap$type27, _value$typeMap$type$s5, _typeMap$type28, _typeMap$type29, _typeMap$type30;
19344
+ var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
18230
19345
  var value = props.value,
18231
19346
  onChange = props.onChange,
18232
19347
  _props$reasonList = props.reasonList,
18233
19348
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18234
19349
  disabled = props.disabled,
18235
19350
  type = props.type,
19351
+ isSettingConfig = props.isSettingConfig,
18236
19352
  other = _objectWithoutProperties(props, _excluded$i);
18237
19353
  var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
18238
19354
  var _order$srcTid;
@@ -18296,11 +19412,13 @@ var wdtReissue = function wdtReissue(props) {
18296
19412
  var showOrderInfo = orders.map(function (_ref2) {
18297
19413
  var billNo = _ref2.billNo,
18298
19414
  billType = _ref2.billType,
18299
- billTag = _ref2.billTag;
19415
+ billTag = _ref2.billTag,
19416
+ tradeStatusValue = _ref2.tradeStatusValue;
18300
19417
  return {
18301
19418
  billNo: billNo,
18302
19419
  billType: billType,
18303
- billTag: billTag
19420
+ billTag: billTag,
19421
+ tradeStatusValue: tradeStatusValue
18304
19422
  };
18305
19423
  });
18306
19424
  onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
@@ -18383,7 +19501,7 @@ var wdtReissue = function wdtReissue(props) {
18383
19501
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18384
19502
  };
18385
19503
  var selectedGoodsChange = useCallback(function (skuList) {
18386
- var _typeMap$type21, _typeMap$type22, _uniqBy, _typeMap$type23;
19504
+ var _typeMap$type21, _typeMap$type22, _uniqBy;
18387
19505
  var newValue = _objectSpread2({}, value);
18388
19506
  // 原订单商品
18389
19507
  var originTradeGoodList = getGoodDetails({
@@ -18394,14 +19512,14 @@ var wdtReissue = function wdtReissue(props) {
18394
19512
  newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18395
19513
  return skuList.includes(item.uuid);
18396
19514
  });
18397
- console.log('商品发生变化', 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.key)]);
19515
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
18398
19516
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18399
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
19517
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
18400
19518
  //显示选择商品按钮 原单换不显示选择商品
18401
19519
  var showChangeBtn = useMemo(function () {
18402
- var _typeMap$type25;
18403
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]);
18404
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo]]);
19520
+ var _typeMap$type24;
19521
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
19522
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
18405
19523
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18406
19524
  gutter: 8,
18407
19525
  wrap: true
@@ -18415,16 +19533,17 @@ var wdtReissue = function wdtReissue(props) {
18415
19533
  }
18416
19534
  }, /*#__PURE__*/React.createElement(Select, {
18417
19535
  style: {
18418
- marginBottom: '8px'
19536
+ marginBottom: '8px',
19537
+ width: '100%'
18419
19538
  },
18420
19539
  disabled: disabled,
18421
19540
  allowClear: false,
18422
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo)],
19541
+ 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.systemOrderNo)],
18423
19542
  onChange: function onChange(val) {
18424
19543
  return changeSystemOrderHandle(val);
18425
19544
  },
18426
19545
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
18427
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
19546
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
18428
19547
  return /*#__PURE__*/React.createElement(Select.Option, {
18429
19548
  key: item.billNo,
18430
19549
  value: item.billNo,
@@ -18440,12 +19559,13 @@ var wdtReissue = function wdtReissue(props) {
18440
19559
  }
18441
19560
  }, /*#__PURE__*/React.createElement(Cascader, {
18442
19561
  style: {
18443
- marginBottom: '8px'
19562
+ marginBottom: '8px',
19563
+ width: '100%'
18444
19564
  },
18445
- disabled: disabled,
19565
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18446
19566
  allowClear: false,
18447
19567
  options: reasonList,
18448
- 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.typeName)],
19568
+ 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)],
18449
19569
  onChange: function onChange(val) {
18450
19570
  return changeTypeHandle(val);
18451
19571
  }
@@ -18457,7 +19577,7 @@ var wdtReissue = function wdtReissue(props) {
18457
19577
  canUpdateNumber: showChangeBtn,
18458
19578
  showChangeBtn: showChangeBtn,
18459
19579
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18460
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)],
19580
+ 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)],
18461
19581
  onChange: function onChange(val) {
18462
19582
  return changeGoodHandle(val);
18463
19583
  },
@@ -18473,7 +19593,7 @@ var wdtReissue = function wdtReissue(props) {
18473
19593
  })));
18474
19594
  };
18475
19595
 
18476
- var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
19596
+ var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
18477
19597
  var typeMap$2 = {
18478
19598
  JST_REISSUE_GOODS: {
18479
19599
  compType: '补发',
@@ -18488,7 +19608,9 @@ var typeMap$2 = {
18488
19608
  orderTypeKey: 'orderType',
18489
19609
  oIdKey: 'oId',
18490
19610
  outerOiIdKey: '',
18491
- goodDetailsKey: 'items'
19611
+ goodDetailsKey: 'items',
19612
+ mergeIdenticalGoods: jstMergeIdenticalGoods,
19613
+ uniqueKey: 'uuid'
18492
19614
  },
18493
19615
  JST_RETURN_GOODS: {
18494
19616
  compType: '退货',
@@ -18504,6 +19626,8 @@ var typeMap$2 = {
18504
19626
  oIdKey: 'oId',
18505
19627
  outerOiIdKey: '',
18506
19628
  goodDetailsKey: 'items',
19629
+ mergeIdenticalGoods: jstMergeIdenticalGoods,
19630
+ uniqueKey: 'uuid',
18507
19631
  eventNameMap: {
18508
19632
  // pubsub 事件
18509
19633
  exchangeCopyGood: 'jstExchangeCopyGood',
@@ -18511,16 +19635,32 @@ var typeMap$2 = {
18511
19635
  returnGoodsSysorder: 'jstReturnGoodsSysorder',
18512
19636
  returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
18513
19637
  }
19638
+ },
19639
+ KM_REISSUE_GOODS: {
19640
+ compType: '补发',
19641
+ key: 'kmReissueGoods',
19642
+ typeName: 'kmReissueType',
19643
+ systemOrder: 'kmSystemOrder',
19644
+ systemOrderNo: 'kmSystemOrderNo',
19645
+ getOrderList: kmUtils.getOrderListSingleton,
19646
+ updateGoodsHandle: updateKmGoodsHandle,
19647
+ alwaysShowChooseErpGoodsBtn: true,
19648
+ orderTypeKey: 'orderType',
19649
+ oIdKey: 'billNo',
19650
+ outerOiIdKey: '',
19651
+ goodDetailsKey: 'subOrders',
19652
+ uniqueKey: 'id'
18514
19653
  }
18515
19654
  };
18516
19655
  var PublicReissue = function PublicReissue(props) {
18517
- var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
19656
+ var _typeMap$type32, _typeMap$type37, _typeMap$type38, _typeMap$type39, _typeMap$type40, _value$typeMap$type$s6, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48;
18518
19657
  var value = props.value,
18519
19658
  onChange = props.onChange,
18520
19659
  _props$reasonList = props.reasonList,
18521
19660
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
18522
19661
  disabled = props.disabled,
18523
19662
  type = props.type,
19663
+ isSettingConfig = props.isSettingConfig,
18524
19664
  other = _objectWithoutProperties(props, _excluded$j);
18525
19665
  var getOrderFlag = useRef(false);
18526
19666
  var _useState = useState(false),
@@ -18627,7 +19767,7 @@ var PublicReissue = function PublicReissue(props) {
18627
19767
  }))));
18628
19768
  };
18629
19769
  var getGoodDetails = function getGoodDetails(_ref4) {
18630
- var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
19770
+ var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
18631
19771
  var mode = _ref4.mode,
18632
19772
  sysOrderNo = _ref4.sysOrderNo;
18633
19773
  var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
@@ -18635,63 +19775,74 @@ var PublicReissue = function PublicReissue(props) {
18635
19775
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
18636
19776
  return order[typeMap$2[type].oIdKey] === systemOrderNo;
18637
19777
  });
18638
- var goodDetails = jstMergeIdenticalGoods((order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], true) : []);
19778
+ var orderRest = undefined;
19779
+ if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
19780
+ orderRest = true;
19781
+ } else if (type === 'KM_REISSUE_GOODS') {
19782
+ orderRest = {
19783
+ orderBackGoodsLevel: props.orderBackGoodsLevel,
19784
+ canEdit: true
19785
+ };
19786
+ }
19787
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], orderRest)) : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.updateGoodsHandle([order], orderRest) : [];
18639
19788
  var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
18640
- return mode ? goodDetails.filter(function (goodItem) {
19789
+ var list = mode ? goodDetails.filter(function (goodItem) {
18641
19790
  return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
18642
19791
  }) : goodDetails;
19792
+ return list;
18643
19793
  };
18644
19794
  var changeGoodHandle = function changeGoodHandle(val) {
18645
- var _typeMap$type20;
19795
+ var _typeMap$type21;
18646
19796
  var newValue = _objectSpread2({}, value);
18647
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = val || [];
19797
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = val || [];
18648
19798
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18649
19799
  };
18650
19800
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
18651
- var _typeMap$type21, _typeMap$type22, _value$typeMap$type$t2, _typeMap$type27, _value$typeMap$type$t3, _typeMap$type29;
19801
+ var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
18652
19802
  var newValue = _objectSpread2({}, value);
18653
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
18654
- if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderBillType) {
18655
- var _value$typeMap$type$s5, _typeMap$type23, _typeMap$type25, _typeMap$type26;
18656
- var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
19803
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
19804
+ if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderBillType) {
19805
+ var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
19806
+ var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
18657
19807
  var targetOrder = val && orders.find(function (oItem) {
18658
- var _typeMap$type24;
18659
- return oItem[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.oIdKey] === val;
19808
+ var _typeMap$type25;
19809
+ return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
18660
19810
  });
18661
- newValue[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.orderTypeKey];
18662
- }
18663
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
18664
- var _typeMap$type28;
18665
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = [];
18666
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
18667
- var _typeMap$type30;
18668
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.key)] = getGoodDetails({
19811
+ newValue[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.orderTypeKey];
19812
+ }
19813
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
19814
+ var _typeMap$type29;
19815
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)] = [];
19816
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
19817
+ var _typeMap$type31;
19818
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = getGoodDetails({
18669
19819
  mode: isStrict,
18670
19820
  sysOrderNo: val
18671
19821
  });
18672
19822
  }
18673
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19823
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
18674
19824
  };
18675
19825
  //显示选择商品按钮
18676
- var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
19826
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
18677
19827
  var selectedGoodsChange = useCallback(function (skuList) {
18678
- var _typeMap$type32, _typeMap$type33, _uniqBy;
19828
+ var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
18679
19829
  var newValue = _objectSpread2({}, value);
18680
19830
  // 原订单商品
18681
19831
  var originTradeGoodList = getGoodDetails({
18682
19832
  mode: isStrict
18683
19833
  }) || [];
18684
19834
  // 当前选中的所有商品【包含了原订单+商品库】
18685
- var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)]) || [];
18686
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
18687
- return skuList.includes(item.uuid);
19835
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
19836
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19837
+ var _typeMap$type36;
19838
+ return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.uniqueKey]);
18688
19839
  });
18689
19840
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
18690
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)], isStrict]);
19841
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)], isStrict]);
18691
19842
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
18692
19843
  gutter: 8,
18693
19844
  wrap: true,
18694
- id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key) || "".concat(Date.now())
19845
+ id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key) || "".concat(Date.now())
18695
19846
  }, /*#__PURE__*/React.createElement(Col, {
18696
19847
  className: "gutter-row",
18697
19848
  xs: {
@@ -18702,16 +19853,17 @@ var PublicReissue = function PublicReissue(props) {
18702
19853
  }
18703
19854
  }, /*#__PURE__*/React.createElement(Select, {
18704
19855
  style: {
18705
- marginBottom: '8px'
19856
+ marginBottom: '8px',
19857
+ width: '100%'
18706
19858
  },
18707
19859
  disabled: disabled,
18708
19860
  allowClear: false,
18709
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.systemOrderNo)],
19861
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo)],
18710
19862
  onChange: function onChange(val) {
18711
19863
  return changeSystemOrderHandle(val);
18712
19864
  },
18713
- placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.compType) || '', "\u7CFB\u7EDF\u5355")
18714
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
19865
+ placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.compType) || '', "\u7CFB\u7EDF\u5355")
19866
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
18715
19867
  return /*#__PURE__*/React.createElement(Select.Option, {
18716
19868
  key: item[typeMap$2[type].oIdKey],
18717
19869
  value: item[typeMap$2[type].oIdKey],
@@ -18727,16 +19879,17 @@ var PublicReissue = function PublicReissue(props) {
18727
19879
  }
18728
19880
  }, /*#__PURE__*/React.createElement(Cascader, {
18729
19881
  style: {
18730
- marginBottom: '8px'
19882
+ marginBottom: '8px',
19883
+ width: '100%'
18731
19884
  },
18732
- disabled: disabled,
19885
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
18733
19886
  allowClear: false,
18734
19887
  options: reasonList,
18735
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.typeName)],
19888
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.typeName)],
18736
19889
  onChange: function onChange(val) {
18737
19890
  return changeTypeHandle(val);
18738
19891
  }
18739
- })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.systemOrderBillType) && /*#__PURE__*/React.createElement(Col, {
19892
+ })), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React.createElement(Col, {
18740
19893
  className: "gutter-row",
18741
19894
  xs: {
18742
19895
  span: 11
@@ -18745,7 +19898,7 @@ var PublicReissue = function PublicReissue(props) {
18745
19898
  span: 6
18746
19899
  }
18747
19900
  }, /*#__PURE__*/React.createElement(Input, {
18748
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrderBillType)],
19901
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrderBillType)],
18749
19902
  disabled: disabled,
18750
19903
  readOnly: true
18751
19904
  }))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
@@ -18755,10 +19908,10 @@ var PublicReissue = function PublicReissue(props) {
18755
19908
  disabled: disabled,
18756
19909
  canUpdateNumber: showChangeBtn,
18757
19910
  showChangeBtn: showChangeBtn,
18758
- alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
18759
- showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
19911
+ alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.alwaysShowChooseErpGoodsBtn,
19912
+ showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.showErpGoodsBtn,
18760
19913
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
18761
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)],
19914
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.key)],
18762
19915
  onChange: function onChange(val) {
18763
19916
  return changeGoodHandle(val);
18764
19917
  },
@@ -18769,6 +19922,7 @@ var PublicReissue = function PublicReissue(props) {
18769
19922
  originDataSource: getGoodDetails({
18770
19923
  mode: isStrict
18771
19924
  }),
19925
+ uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.uniqueKey) || 'uuid',
18772
19926
  selectedGoodsChange: selectedGoodsChange
18773
19927
  }
18774
19928
  })));
@@ -19307,6 +20461,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
19307
20461
  var _props$value = props.value,
19308
20462
  value = _props$value === void 0 ? [] : _props$value,
19309
20463
  onChange = props.onChange,
20464
+ onBlur = props.onBlur,
19310
20465
  disabled = props.disabled,
19311
20466
  _props$type = props.type,
19312
20467
  type = _props$type === void 0 ? 1 : _props$type;
@@ -19388,6 +20543,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
19388
20543
  onChange: function onChange(e) {
19389
20544
  return changeInputHandle(e.target.value, 'billNo');
19390
20545
  },
20546
+ onBlur: onBlur,
19391
20547
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
19392
20548
  })) : null) : null);
19393
20549
  };
@@ -19529,6 +20685,64 @@ var MsgStatus = function MsgStatus(props) {
19529
20685
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
19530
20686
  };
19531
20687
 
20688
+ var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
20689
+ var AsyncSelect = function AsyncSelect(props) {
20690
+ var mode = props.mode,
20691
+ maxSelectCount = props.maxSelectCount,
20692
+ _props$showOnly = props.showOnly,
20693
+ showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
20694
+ getOptionsAsync = props.getOptionsAsync,
20695
+ _onChange = props.onChange,
20696
+ otherProps = _objectWithoutProperties(props, _excluded$n);
20697
+ var _React$useState = React.useState([]),
20698
+ _React$useState2 = _slicedToArray(_React$useState, 2),
20699
+ data = _React$useState2[0],
20700
+ setData = _React$useState2[1];
20701
+ React.useEffect(function () {
20702
+ getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
20703
+ setData(list);
20704
+ });
20705
+ }, []);
20706
+ var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
20707
+ var getValueString = function getValueString(value) {
20708
+ var list = options;
20709
+ if (mode === 'multiple' && Array.isArray(value)) {
20710
+ var _list$filter$map$join;
20711
+ return (_list$filter$map$join = list.filter(function (item) {
20712
+ return value.includes(item.value);
20713
+ }).map(function (item) {
20714
+ return item.label;
20715
+ }).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
20716
+ } else {
20717
+ var selectedItem = list.find(function (item) {
20718
+ return item.value === value;
20719
+ });
20720
+ return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
20721
+ }
20722
+ };
20723
+ if (showOnly) {
20724
+ return getValueString(props.value);
20725
+ }
20726
+ return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
20727
+ showArrow: true,
20728
+ showSearch: true,
20729
+ filterOption: function filterOption(input, option) {
20730
+ return option.label.includes(input);
20731
+ },
20732
+ notFoundContent: null
20733
+ }, otherProps), {}, {
20734
+ options: options,
20735
+ mode: mode,
20736
+ onChange: function onChange(value, option) {
20737
+ if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
20738
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
20739
+ } else {
20740
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
20741
+ }
20742
+ }
20743
+ }));
20744
+ };
20745
+
19532
20746
  var CalculationInput = function CalculationInput(props) {
19533
20747
  var _props$config = props.config,
19534
20748
  config = _props$config === void 0 ? {} : _props$config;
@@ -19547,7 +20761,7 @@ var CalculationInput = function CalculationInput(props) {
19547
20761
  }, config === null || config === void 0 ? void 0 : config.unit));
19548
20762
  };
19549
20763
 
19550
- var _excluded$n = ["value", "onChange", "reasonList", "disabled", "type"];
20764
+ var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
19551
20765
  var typeMap$3 = {
19552
20766
  BS_E3_REISSUE_GOODS: {
19553
20767
  key: 'bsE3ReissueGoods',
@@ -19565,7 +20779,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19565
20779
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19566
20780
  disabled = props.disabled,
19567
20781
  type = props.type,
19568
- other = _objectWithoutProperties(props, _excluded$n);
20782
+ isSettingConfig = props.isSettingConfig,
20783
+ other = _objectWithoutProperties(props, _excluded$o);
19569
20784
  var getOrderFlag = useRef(false);
19570
20785
  var valueRef = useRef(null);
19571
20786
  var _useState = useState(false),
@@ -19725,7 +20940,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
19725
20940
  }
19726
20941
  }, /*#__PURE__*/React.createElement(Select, {
19727
20942
  style: {
19728
- marginBottom: '8px'
20943
+ marginBottom: '8px',
20944
+ width: '100%'
19729
20945
  },
19730
20946
  disabled: disabled,
19731
20947
  allowClear: false,
@@ -19750,9 +20966,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
19750
20966
  }
19751
20967
  }, /*#__PURE__*/React.createElement(Cascader, {
19752
20968
  style: {
19753
- marginBottom: '8px'
20969
+ marginBottom: '8px',
20970
+ width: '100%'
19754
20971
  },
19755
- disabled: disabled,
20972
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
19756
20973
  allowClear: false,
19757
20974
  options: reasonList,
19758
20975
  value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
@@ -19783,7 +21000,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
19783
21000
  })));
19784
21001
  };
19785
21002
 
19786
- var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"],
21003
+ var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
21004
+ var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
21005
+ styleInject(css_248z$c);
21006
+
21007
+ var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
19787
21008
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
19788
21009
  var typeMap$4 = {
19789
21010
  GY_REISSUE_GOODS: {
@@ -19805,17 +21026,19 @@ var typeMap$4 = {
19805
21026
  }
19806
21027
  };
19807
21028
  var GyReissue = function GyReissue(props) {
19808
- var _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
21029
+ var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
19809
21030
  var value = props.value,
19810
21031
  onChange = props.onChange,
19811
21032
  _props$reasonList = props.reasonList,
19812
21033
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
19813
21034
  disabled = props.disabled,
19814
21035
  type = props.type,
19815
- other = _objectWithoutProperties(props, _excluded$o);
21036
+ isSettingConfig = props.isSettingConfig,
21037
+ other = _objectWithoutProperties(props, _excluded$p);
19816
21038
  // const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
19817
21039
  // order?.platformCode?.includes(';'),
19818
21040
  // );
21041
+ var getVipCodeFlag = useRef(false);
19819
21042
  var getOrderFlag = useRef(false);
19820
21043
  var valueRef = useRef(null);
19821
21044
  var _useState = useState(false),
@@ -19823,23 +21046,27 @@ var GyReissue = function GyReissue(props) {
19823
21046
  isStrict = _useState2[0],
19824
21047
  setIsStrict = _useState2[1];
19825
21048
  useEffect(function () {
19826
- var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
21049
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2, _typeMap$type4, _value$typeMap$type$s5, _typeMap$type5;
19827
21050
  valueRef.current = value;
19828
21051
  if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
19829
21052
  var _value$typeMap$type$s4, _typeMap$type3;
19830
21053
  getOrderFlag.current = true;
19831
21054
  getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
21055
+ } else if (!getVipCodeFlag.current && (value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo]) && !(value === null || value === void 0 ? void 0 : value.vipCode) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo)) {
21056
+ var _value$typeMap$type$s6, _typeMap$type6;
21057
+ getVipCodeFlag.current = true;
21058
+ getVipCode(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orderNo);
19832
21059
  }
19833
21060
  return;
19834
21061
  }, [value]);
19835
21062
  var getOrderList = /*#__PURE__*/function () {
19836
21063
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
19837
- var _typeMap$type4;
21064
+ var _typeMap$type7;
19838
21065
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19839
21066
  while (1) switch (_context.prev = _context.next) {
19840
21067
  case 0:
19841
- (_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
19842
- var _typeMap$type5, _ref3, _typeMap$type6, _typeMap$type7, _ref4, _typeMap$type8;
21068
+ (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
21069
+ var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
19843
21070
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
19844
21071
  var showOrderInfo = orders.map(function (_ref2) {
19845
21072
  var billNo = _ref2.billNo,
@@ -19861,17 +21088,15 @@ var GyReissue = function GyReissue(props) {
19861
21088
  shopCode: shopCode
19862
21089
  });
19863
21090
  });
21091
+ var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]) || {}), {}, {
21092
+ showOrderInfo: showOrderInfo,
21093
+ orders: orders
21094
+ })), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _defineProperty(_objectSpread2$1, "vipCode", (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$2 = orders[0]) === null || _orders$2 === void 0 ? void 0 : _orders$2.vipCode)), _objectSpread2$1));
19864
21095
  pushGyLog('getOrderList', {
19865
21096
  before: valueRef.current,
19866
- after: _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
19867
- showOrderInfo: showOrderInfo,
19868
- orders: orders
19869
- })))
21097
+ after: newValue
19870
21098
  });
19871
- onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref4 = valueRef.current || {}) === null || _ref4 === void 0 ? void 0 : _ref4[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder]) || {}), {}, {
19872
- showOrderInfo: showOrderInfo,
19873
- orders: orders
19874
- }))));
21099
+ onChange(newValue);
19875
21100
  });
19876
21101
  case 1:
19877
21102
  case "end":
@@ -19883,42 +21108,71 @@ var GyReissue = function GyReissue(props) {
19883
21108
  return _ref.apply(this, arguments);
19884
21109
  };
19885
21110
  }();
21111
+ var getVipCode = /*#__PURE__*/function () {
21112
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
21113
+ var _typeMap$type10;
21114
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
21115
+ while (1) switch (_context2.prev = _context2.next) {
21116
+ case 0:
21117
+ return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
21118
+ var _orders$3, _orders$4;
21119
+ var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
21120
+ var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
21121
+ shopCode: (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$3 = orders[0]) === null || _orders$3 === void 0 ? void 0 : _orders$3.shopCode),
21122
+ vipCode: (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$4 = orders[0]) === null || _orders$4 === void 0 ? void 0 : _orders$4.vipCode)
21123
+ });
21124
+ pushGyLog('getVipCode', {
21125
+ before: valueRef.current,
21126
+ after: newValue
21127
+ });
21128
+ onChange(newValue);
21129
+ }));
21130
+ case 1:
21131
+ case "end":
21132
+ return _context2.stop();
21133
+ }
21134
+ }, _callee2);
21135
+ }));
21136
+ return function getVipCode(_x2) {
21137
+ return _ref4.apply(this, arguments);
21138
+ };
21139
+ }();
19886
21140
  var changeTypeHandle = function changeTypeHandle(val) {
19887
- var _ref5, _ref5$typeMap$type$ty, _typeMap$type9, _typeMap$type10;
21141
+ var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
19888
21142
  pushGyLog('beforeChangeType', valueRef.current || {});
19889
21143
  var typeName = val === null || val === void 0 ? void 0 : val[0];
19890
- if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
21144
+ if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
19891
21145
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
19892
21146
  var newValue = _objectSpread2({}, valueRef.current || {});
19893
- newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName] = val;
21147
+ newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
19894
21148
  if (typeName === '1') {
19895
- var _typeMap$type11;
19896
- newValue[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key] = getGoodDetails({
21149
+ var _typeMap$type13;
21150
+ newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
19897
21151
  mode: isStrict
19898
21152
  });
19899
21153
  } else if (typeName === '2') {
19900
- var _typeMap$type12;
21154
+ var _typeMap$type14;
19901
21155
  // 切换到非原单,清空列表
19902
- newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = [];
21156
+ newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
19903
21157
  }
19904
21158
  pushGyLog('afterChangeType', newValue);
19905
21159
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19906
21160
  };
19907
21161
  var handleModeChange = function handleModeChange(mode) {
19908
- var _ref6, _ref6$typeMap$type$ty, _typeMap$type13, _typeMap$type14;
19909
- var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
21162
+ var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
21163
+ var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
19910
21164
  setIsStrict(mode);
19911
21165
  if (!isOriginalOrder) return;
19912
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key, getGoodDetails({
21166
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
19913
21167
  mode: mode
19914
21168
  }))));
19915
21169
  };
19916
21170
  var getGoodDetails = function getGoodDetails(_ref7) {
19917
- var _ref8, _typeMap$type15, _ref9, _typeMap$type16, _order$details;
21171
+ var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
19918
21172
  var mode = _ref7.mode,
19919
21173
  sysOrderNo = _ref7.sysOrderNo;
19920
- var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder];
19921
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrderNo];
21174
+ var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
21175
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
19922
21176
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
19923
21177
  return order.code === systemOrderNo;
19924
21178
  });
@@ -19929,29 +21183,29 @@ var GyReissue = function GyReissue(props) {
19929
21183
  }) : goodDetails;
19930
21184
  };
19931
21185
  var changeGoodHandle = function changeGoodHandle(val) {
19932
- var _typeMap$type17;
21186
+ var _typeMap$type19;
19933
21187
  pushGyLog('beforeChangeGood', valueRef.current || {});
19934
21188
  var newValue = _objectSpread2({}, valueRef.current || {});
19935
- newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = (val || []).map(function (item) {
19936
- var _typeMap$type18, _typeMap$type19;
19937
- item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.money)] = 0;
19938
- item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.share)] = 0;
21189
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
21190
+ var _typeMap$type20, _typeMap$type21;
21191
+ item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
21192
+ item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
19939
21193
  return item;
19940
21194
  });
19941
21195
  pushGyLog('afterChangeGood', newValue);
19942
21196
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19943
21197
  };
19944
21198
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
19945
- var _typeMap$type20, _ref10, _ref10$typeMap$type$t, _typeMap$type21, _ref11, _ref11$typeMap$type$t, _typeMap$type23;
21199
+ var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
19946
21200
  pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
19947
21201
  var newValue = _objectSpread2({}, valueRef.current || {});
19948
- newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo)] = val;
19949
- if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
19950
- var _typeMap$type22;
19951
- newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
19952
- } else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
21202
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
21203
+ if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
19953
21204
  var _typeMap$type24;
19954
- newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = getGoodDetails({
21205
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
21206
+ } else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
21207
+ var _typeMap$type26;
21208
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = getGoodDetails({
19955
21209
  mode: isStrict,
19956
21210
  sysOrderNo: val
19957
21211
  });
@@ -19960,7 +21214,7 @@ var GyReissue = function GyReissue(props) {
19960
21214
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19961
21215
  };
19962
21216
  var selectedGoodsChange = useCallback(function (skuList) {
19963
- var _ref12, _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
21217
+ var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
19964
21218
  pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
19965
21219
  var newValue = _objectSpread2({}, valueRef.current || {});
19966
21220
  // 原订单商品
@@ -19968,68 +21222,66 @@ var GyReissue = function GyReissue(props) {
19968
21222
  mode: isStrict
19969
21223
  }) || [];
19970
21224
  // 当前选中的所有商品【包含了原订单+商品库】
19971
- var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]) || [];
19972
- newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
21225
+ var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]) || [];
21226
+ newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19973
21227
  return skuList.includes(item.uuid);
19974
21228
  });
19975
- console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
21229
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
19976
21230
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19977
21231
  pushGyLog('afterSelectedGoodsChange', newValue);
19978
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
21232
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)], isStrict]);
19979
21233
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
19980
- var showChangeBtn = useMemo(function () {
19981
- var _typeMap$type29;
19982
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
19983
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
19984
- return /*#__PURE__*/React.createElement("div", {
19985
- id: "TEST_GY",
19986
- onClick: function onClick() {
19987
- console.log('TEST_GY', value);
19988
- }
19989
- }, /*#__PURE__*/React.createElement(Row, {
21234
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder];
21235
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
21236
+ var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
21237
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
19990
21238
  gutter: 8,
19991
21239
  wrap: true
19992
21240
  }, /*#__PURE__*/React.createElement(Col, {
19993
21241
  className: "gutter-row",
19994
21242
  xs: {
19995
- span: 11
21243
+ span: 12
19996
21244
  },
19997
21245
  sm: {
19998
- span: 6
21246
+ span: 8
19999
21247
  }
20000
21248
  }, /*#__PURE__*/React.createElement(Select, {
20001
21249
  style: {
20002
- marginBottom: '8px'
21250
+ marginBottom: '8px',
21251
+ width: '100%'
20003
21252
  },
20004
21253
  disabled: disabled,
20005
21254
  allowClear: false,
20006
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
21255
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)],
20007
21256
  onChange: function onChange(val) {
20008
21257
  return changeSystemOrderHandle(val);
20009
21258
  },
20010
21259
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
20011
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
21260
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
20012
21261
  return /*#__PURE__*/React.createElement(Select.Option, {
21262
+ className: styles$5.systemNoDisabled,
20013
21263
  key: item.billNo,
20014
21264
  value: item.billNo,
20015
- label: item.billNo
20016
- }, item.billNo);
21265
+ label: item.billNo,
21266
+ disabled: item.cancel
21267
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
20017
21268
  }))), /*#__PURE__*/React.createElement(Col, {
20018
21269
  className: "gutter-row",
20019
21270
  xs: {
20020
- span: 11
21271
+ span: 12
20021
21272
  },
20022
21273
  sm: {
20023
- span: 6
21274
+ span: 4
20024
21275
  }
20025
21276
  }, /*#__PURE__*/React.createElement(Cascader, {
20026
21277
  style: {
20027
- marginBottom: '8px'
21278
+ marginBottom: '8px',
21279
+ width: '100%'
20028
21280
  },
20029
- disabled: disabled,
21281
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20030
21282
  allowClear: false,
20031
21283
  options: reasonList,
20032
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
21284
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName)],
20033
21285
  onChange: function onChange(val) {
20034
21286
  return changeTypeHandle(val);
20035
21287
  }
@@ -20040,8 +21292,10 @@ var GyReissue = function GyReissue(props) {
20040
21292
  disabled: disabled,
20041
21293
  canUpdateNumber: showChangeBtn,
20042
21294
  showChangeBtn: showChangeBtn,
21295
+ showErpGoodsBtn: showErpGoodsBtn,
21296
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20043
21297
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20044
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
21298
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)],
20045
21299
  onChange: function onChange(val) {
20046
21300
  return changeGoodHandle(val);
20047
21301
  },
@@ -20056,7 +21310,7 @@ var GyReissue = function GyReissue(props) {
20056
21310
  })));
20057
21311
  };
20058
21312
 
20059
- var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type"],
21313
+ var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
20060
21314
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
20061
21315
  var typeMap$5 = {
20062
21316
  GY_RETURN_GOODS: {
@@ -20078,14 +21332,15 @@ var typeMap$5 = {
20078
21332
  }
20079
21333
  };
20080
21334
  var GyReturnGoods = function GyReturnGoods(props) {
20081
- var _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
21335
+ var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
20082
21336
  var value = props.value,
20083
21337
  onChange = props.onChange,
20084
21338
  _props$reasonList = props.reasonList,
20085
21339
  reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
20086
21340
  disabled = props.disabled,
20087
21341
  type = props.type,
20088
- other = _objectWithoutProperties(props, _excluded$p);
21342
+ isSettingConfig = props.isSettingConfig,
21343
+ other = _objectWithoutProperties(props, _excluded$q);
20089
21344
  var valueRef = useRef({});
20090
21345
  var getOrderFlag = useRef(false);
20091
21346
  var _useState = useState(false),
@@ -20148,7 +21403,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20148
21403
  while (1) switch (_context.prev = _context.next) {
20149
21404
  case 0:
20150
21405
  (_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
20151
- var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
21406
+ var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
20152
21407
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
20153
21408
  var showOrderInfo = orders.map(function (_ref2) {
20154
21409
  var billNo = _ref2.billNo,
@@ -20170,10 +21425,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
20170
21425
  shopCode: shopCode
20171
21426
  });
20172
21427
  });
20173
- onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
21428
+ onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
20174
21429
  showOrderInfo: showOrderInfo,
20175
21430
  orders: orders
20176
- }))));
21431
+ })), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _objectSpread2$1)));
20177
21432
  });
20178
21433
  case 1:
20179
21434
  case "end":
@@ -20186,7 +21441,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
20186
21441
  };
20187
21442
  }();
20188
21443
  var selectedGoodsChange = useCallback(function (skuList) {
20189
- var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
21444
+ var _typeMap$type7, _typeMap$type8, _uniqBy;
20190
21445
  var newValue = _objectSpread2({}, value);
20191
21446
  // 原订单商品
20192
21447
  var originTradeGoodList = getGoodDetails({
@@ -20197,49 +21452,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
20197
21452
  newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
20198
21453
  return skuList.includes(item.uuid);
20199
21454
  });
20200
- console.log('商品发生变化', newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)]);
21455
+ // console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
20201
21456
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20202
- }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)], isStrict]);
21457
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
20203
21458
  var changeTypeHandle = function changeTypeHandle(val) {
20204
- var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
21459
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
20205
21460
  var typeName = val === null || val === void 0 ? void 0 : val[0];
20206
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
21461
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
20207
21462
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
20208
21463
  var newValue = _objectSpread2({}, value);
20209
- newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
21464
+ newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
20210
21465
  if (typeName === '1') {
20211
- var _typeMap$type13;
20212
- newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
21466
+ var _typeMap$type12;
21467
+ newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
20213
21468
  mode: isStrict
20214
21469
  });
20215
21470
  } else if (typeName === '2') {
20216
- var _typeMap$type14;
21471
+ var _typeMap$type13;
20217
21472
  // 切换到非原单,清空列表
20218
- newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
21473
+ newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
20219
21474
  }
20220
21475
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20221
21476
  };
20222
21477
  var changeGoodHandle = function changeGoodHandle(val) {
20223
- var _typeMap$type15;
21478
+ var _typeMap$type14;
20224
21479
  var newValue = _objectSpread2({}, value);
20225
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
20226
- var _typeMap$type16, _typeMap$type17;
20227
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
20228
- item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
21480
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
21481
+ var _typeMap$type15, _typeMap$type16;
21482
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
21483
+ item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
20229
21484
  return item;
20230
21485
  });
20231
21486
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20232
21487
  };
20233
21488
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
20234
- var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
21489
+ var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
20235
21490
  var newValue = _objectSpread2({}, value);
20236
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
20237
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
20238
- var _typeMap$type20;
20239
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
20240
- } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
20241
- var _typeMap$type22;
20242
- newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
21491
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
21492
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
21493
+ var _typeMap$type19;
21494
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
21495
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
21496
+ var _typeMap$type21;
21497
+ newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
20243
21498
  mode: isStrict,
20244
21499
  sysOrderNo: val
20245
21500
  });
@@ -20247,11 +21502,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
20247
21502
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
20248
21503
  };
20249
21504
  var getGoodDetails = function getGoodDetails(_ref4) {
20250
- var _typeMap$type23, _typeMap$type24, _order$details;
21505
+ var _typeMap$type22, _typeMap$type23, _order$details;
20251
21506
  var mode = _ref4.mode,
20252
21507
  sysOrderNo = _ref4.sysOrderNo;
20253
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder];
20254
- var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo];
21508
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
21509
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
20255
21510
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
20256
21511
  return order.code === systemOrderNo;
20257
21512
  });
@@ -20262,63 +21517,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
20262
21517
  }) : goodDetails;
20263
21518
  };
20264
21519
  var handleModeChange = function handleModeChange(mode) {
20265
- var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
20266
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
21520
+ var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
21521
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
20267
21522
  setIsStrict(mode);
20268
21523
  if (!isOriginalOrder) return;
20269
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key, getGoodDetails({
21524
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
20270
21525
  mode: mode
20271
21526
  }))));
20272
21527
  };
20273
21528
  //系统单选择后展示选择商品按钮,系统单未选择的时候不展示
20274
- var showChangeBtn = useMemo(function () {
20275
- var _typeMap$type27;
20276
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20277
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
21529
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
21530
+ var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
21531
+ var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
20278
21532
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
20279
21533
  gutter: 8,
20280
21534
  wrap: true
20281
21535
  }, /*#__PURE__*/React.createElement(Col, {
20282
21536
  className: "gutter-row",
20283
21537
  xs: {
20284
- span: 11
21538
+ span: 12
20285
21539
  },
20286
21540
  sm: {
20287
- span: 6
21541
+ span: 8
20288
21542
  }
20289
21543
  }, /*#__PURE__*/React.createElement(Select, {
20290
21544
  style: {
20291
- marginBottom: '8px'
21545
+ marginBottom: '8px',
21546
+ width: '100%'
20292
21547
  },
20293
21548
  disabled: disabled,
20294
21549
  allowClear: false,
20295
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
21550
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
20296
21551
  onChange: function onChange(val) {
20297
21552
  return changeSystemOrderHandle(val);
20298
21553
  },
20299
21554
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
20300
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
21555
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
20301
21556
  return /*#__PURE__*/React.createElement(Select.Option, {
21557
+ className: styles$5.systemNoDisabled,
20302
21558
  key: item.billNo,
20303
21559
  value: item.billNo,
20304
- label: item.billNo
20305
- }, item.billNo);
21560
+ label: item.billNo,
21561
+ disabled: item === null || item === void 0 ? void 0 : item.cancel
21562
+ }, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
20306
21563
  }))), /*#__PURE__*/React.createElement(Col, {
20307
21564
  className: "gutter-row",
20308
21565
  xs: {
20309
- span: 11
21566
+ span: 12
20310
21567
  },
20311
21568
  sm: {
20312
- span: 6
21569
+ span: 4
20313
21570
  }
20314
21571
  }, /*#__PURE__*/React.createElement(Cascader, {
20315
21572
  style: {
20316
- marginBottom: '8px'
21573
+ marginBottom: '8px',
21574
+ width: '100%'
20317
21575
  },
20318
- disabled: disabled,
21576
+ disabled: isSettingConfig ? !isSettingConfig : disabled,
20319
21577
  allowClear: false,
20320
21578
  options: reasonList,
20321
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
21579
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
20322
21580
  onChange: function onChange(val) {
20323
21581
  return changeTypeHandle(val);
20324
21582
  }
@@ -20330,13 +21588,14 @@ var GyReturnGoods = function GyReturnGoods(props) {
20330
21588
  canUpdateNumber: showChangeBtn,
20331
21589
  showChangeBtn: showChangeBtn,
20332
21590
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
20333
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type32 = typeMap$5[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
21591
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
20334
21592
  onChange: function onChange(val) {
20335
21593
  return changeGoodHandle(val);
20336
21594
  },
20337
21595
  onModeChange: handleModeChange,
20338
21596
  isStrict: isStrict,
20339
- showErpGoodsBtn: false,
21597
+ showErpGoodsBtn: showErpGoodsBtn,
21598
+ alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
20340
21599
  tradeGoods: {
20341
21600
  originDataSource: getGoodDetails({
20342
21601
  mode: isStrict
@@ -20346,4 +21605,247 @@ var GyReturnGoods = function GyReturnGoods(props) {
20346
21605
  })));
20347
21606
  };
20348
21607
 
20349
- 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, index$1 as ApaasUploadProAsync, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
21608
+ var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
21609
+ var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
21610
+ styleInject(css_248z$d);
21611
+
21612
+ var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
21613
+ var Dragger$1 = Upload.Dragger;
21614
+ var fn$4 = function fn() {
21615
+ return void 0;
21616
+ };
21617
+ var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
21618
+ var KmVideo = function KmVideo(_ref) {
21619
+ var _ref$maxCount = _ref.maxCount,
21620
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
21621
+ _ref$maxSize = _ref.maxSize,
21622
+ maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
21623
+ _ref$onChange = _ref.onChange,
21624
+ onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
21625
+ _ref$value = _ref.value,
21626
+ value = _ref$value === void 0 ? [] : _ref$value,
21627
+ _ref$disabled = _ref.disabled,
21628
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21629
+ _ref$hostUrl = _ref.hostUrl,
21630
+ hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
21631
+ _ref$canDownload = _ref.canDownload,
21632
+ canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
21633
+ _ref$actionUrl = _ref.actionUrl,
21634
+ actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
21635
+ resetProps = _objectWithoutProperties(_ref, _excluded$r);
21636
+ var _useState = useState(false),
21637
+ _useState2 = _slicedToArray(_useState, 2),
21638
+ visible = _useState2[0],
21639
+ setVisible = _useState2[1];
21640
+ var _useState3 = useState(''),
21641
+ _useState4 = _slicedToArray(_useState3, 2),
21642
+ fileUrl = _useState4[0],
21643
+ setFileUrl = _useState4[1];
21644
+ var _useState5 = useState(''),
21645
+ _useState6 = _slicedToArray(_useState5, 2),
21646
+ fileType = _useState6[0],
21647
+ setFileType = _useState6[1];
21648
+ var _useState7 = useState(''),
21649
+ _useState8 = _slicedToArray(_useState7, 2),
21650
+ fileName = _useState8[0],
21651
+ setFileName = _useState8[1];
21652
+ var valueRef = useRef(value);
21653
+ var uploadCount = useRef(0);
21654
+ var _useState9 = useState(false),
21655
+ _useState10 = _slicedToArray(_useState9, 2),
21656
+ uploading = _useState10[0],
21657
+ setUploading = _useState10[1];
21658
+ var fileList = useMemo(function () {
21659
+ return value.map(function (t, i) {
21660
+ return _objectSpread2(_objectSpread2({}, t), {}, {
21661
+ percent: 100,
21662
+ uid: i + ''
21663
+ });
21664
+ });
21665
+ }, [value]);
21666
+ useEffect(function () {
21667
+ valueRef.current = value;
21668
+ }, [value]);
21669
+ var asyncUpload = /*#__PURE__*/function () {
21670
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
21671
+ var formData, fileName, _yield$request, success, data;
21672
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
21673
+ while (1) switch (_context.prev = _context.next) {
21674
+ case 0:
21675
+ setUploading(true);
21676
+ uploadCount.current++;
21677
+ formData = new FormData();
21678
+ formData.append('file', file);
21679
+ fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
21680
+ formData.append('fileName', fileName);
21681
+ _context.prev = 6;
21682
+ _context.next = 9;
21683
+ return request(actionUrl, {
21684
+ method: 'post',
21685
+ body: formData
21686
+ });
21687
+ case 9:
21688
+ _yield$request = _context.sent;
21689
+ success = _yield$request.success;
21690
+ data = _yield$request.data;
21691
+ if (success) {
21692
+ handleChange([].concat(_toConsumableArray(valueRef.current), [{
21693
+ kmVideoName: file.name,
21694
+ kmVideoUrl: "".concat(hostUrl, "/").concat(data)
21695
+ }]));
21696
+ }
21697
+ _context.next = 18;
21698
+ break;
21699
+ case 15:
21700
+ _context.prev = 15;
21701
+ _context.t0 = _context["catch"](6);
21702
+ message.error('文件上传失败');
21703
+ case 18:
21704
+ _context.prev = 18;
21705
+ uploadCount.current--;
21706
+ if (uploadCount.current < 1) {
21707
+ setUploading(false);
21708
+ }
21709
+ return _context.finish(18);
21710
+ case 22:
21711
+ case "end":
21712
+ return _context.stop();
21713
+ }
21714
+ }, _callee, null, [[6, 15, 18, 22]]);
21715
+ }));
21716
+ return function asyncUpload(_x) {
21717
+ return _ref2.apply(this, arguments);
21718
+ };
21719
+ }();
21720
+ var download = function download(url, name) {
21721
+ if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
21722
+ window.open(url);
21723
+ return;
21724
+ }
21725
+ fetch(url).then(function (res) {
21726
+ return res.blob();
21727
+ }).then(function (blob) {
21728
+ var a = document.createElement('a');
21729
+ document.body.appendChild(a);
21730
+ a.style.display = 'none';
21731
+ var url = window.URL.createObjectURL(blob);
21732
+ a.href = url;
21733
+ a.download = name;
21734
+ a.click();
21735
+ document.body.removeChild(a);
21736
+ window.URL.revokeObjectURL(url);
21737
+ });
21738
+ };
21739
+ var handleChange = function handleChange(list) {
21740
+ valueRef.current = list;
21741
+ onChange(list);
21742
+ };
21743
+ // 手动上传模式, 一直返回false
21744
+ var beforeUpload = function beforeUpload(file, fileList) {
21745
+ // console.log('beforeUpload', file);
21746
+ var size = file.size / 1024 / 1024 < maxSize;
21747
+ // TODO: 批量提交的时候
21748
+ if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
21749
+ message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
21750
+ return Upload.LIST_IGNORE;
21751
+ }
21752
+ if (!size) {
21753
+ message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
21754
+ return Upload.LIST_IGNORE;
21755
+ }
21756
+ asyncUpload(file);
21757
+ return Upload.LIST_IGNORE;
21758
+ };
21759
+ var onRemove = function onRemove(file) {
21760
+ var newValue = value.filter(function (item) {
21761
+ return item.kmVideoUrl !== file.kmVideoUrl;
21762
+ });
21763
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
21764
+ };
21765
+ var onPreview = function onPreview(file) {
21766
+ var _file$url;
21767
+ var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
21768
+ var fileType = fileArr[fileArr.length - 1];
21769
+ if (videoSuffixList.includes(fileType.toLowerCase())) {
21770
+ setFileUrl(file === null || file === void 0 ? void 0 : file.url);
21771
+ setFileName(file === null || file === void 0 ? void 0 : file.name);
21772
+ setFileType('video');
21773
+ setVisible(true);
21774
+ } else {
21775
+ window.open(file === null || file === void 0 ? void 0 : file.url);
21776
+ }
21777
+ };
21778
+ var handleCancel = function handleCancel() {
21779
+ setFileUrl('');
21780
+ setFileName('');
21781
+ setVisible(false);
21782
+ };
21783
+ return /*#__PURE__*/React.createElement(Spin, {
21784
+ spinning: uploading
21785
+ }, /*#__PURE__*/React.createElement("p", {
21786
+ className: styles$6.tips
21787
+ }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
21788
+ className: styles$6.imageBox
21789
+ }, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
21790
+ disabled: disabled,
21791
+ multiple: true,
21792
+ name: "file",
21793
+ maxCount: maxCount,
21794
+ beforeUpload: beforeUpload,
21795
+ onPreview: onPreview,
21796
+ fileList: fileList.map(function (item) {
21797
+ return _objectSpread2(_objectSpread2({}, item), {}, {
21798
+ url: item.kmVideoUrl,
21799
+ name: item.kmVideoName
21800
+ });
21801
+ }),
21802
+ onRemove: onRemove,
21803
+ accept: ".".concat(videoSuffixList.join(',.')),
21804
+ iconRender: function iconRender(file) {
21805
+ return /*#__PURE__*/React.createElement(Space, {
21806
+ align: "center"
21807
+ }, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
21808
+ style: {
21809
+ fontSize: 16
21810
+ }
21811
+ }), file.kmVideoType && "".concat(file.kmVideoType));
21812
+ }
21813
+ }, resetProps), /*#__PURE__*/React.createElement("span", {
21814
+ className: styles$6.addBtn
21815
+ }, "+"), /*#__PURE__*/React.createElement("p", {
21816
+ className: styles$6.addBtn
21817
+ }, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
21818
+ visible: visible,
21819
+ title: fileName,
21820
+ footer: null,
21821
+ onCancel: handleCancel
21822
+ }, canDownload ? /*#__PURE__*/React.createElement(Button, {
21823
+ type: "link",
21824
+ onClick: function onClick() {
21825
+ return download(fileUrl, fileName);
21826
+ }
21827
+ }, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
21828
+ text: fileUrl,
21829
+ onCopy: function onCopy() {
21830
+ message.success('复制成功');
21831
+ }
21832
+ }, /*#__PURE__*/React.createElement(Button, {
21833
+ type: "link"
21834
+ }, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
21835
+ alt: "example",
21836
+ style: {
21837
+ width: '100%'
21838
+ },
21839
+ src: fileUrl
21840
+ }) : /*#__PURE__*/React.createElement("video", {
21841
+ style: {
21842
+ width: '100%',
21843
+ height: '100%'
21844
+ },
21845
+ autoPlay: true,
21846
+ controls: true,
21847
+ src: fileUrl
21848
+ }))));
21849
+ };
21850
+
21851
+ 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, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };