@kmkf-fe-packages/basic-components 2.0.79-beta.81 → 2.0.79-beta.83

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 as Rate$1, Form, Tooltip, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Empty, Tag } from 'antd';
3
- import { EyeOutlined, DeleteOutlined, CloseOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, VideoCameraTwoTone } from '@ant-design/icons';
3
+ import { EyeOutlined, DeleteOutlined, CloseOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, UpOutlined, DownOutlined, PlusOutlined, 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
6
  import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, hasAddNullComponent, SUBMIT_TIME_ID, UPGRADE_TIME_ID, FINAL_TIME_ID, CUSTOM_TIME_ID, useStatus, finalFormData, transformList, dataSourceTrans, DATA_SPLIT_COMPONENT_FIELDS_MAP, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterJyOrders, 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, JY_SYSTEM_ORDER_CONFIG, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, updateJyGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, updateSkxGoodsHandle } 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 as reject$1, isEmpty, intersection } from 'lodash';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject as reject$1, intersection, isEmpty } 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';
@@ -1227,7 +1227,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1227
1227
  className: "addBtn"
1228
1228
  }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText)))));
1229
1229
  };
1230
- var index = /*#__PURE__*/forwardRef(ApaasUploadAsync);
1230
+ var ApaasUploadAsync$1 = /*#__PURE__*/forwardRef(ApaasUploadAsync);
1231
1231
 
1232
1232
  var css_248z$2 = ".index-module_imageProBox__1u84Y {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageProBox__1u84Y .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageProBox__1u84Y .index-module_inputImage__nm5jb {\n width: 105px;\n height: 105px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageProBox__1u84Y .index-module_imageShow__1cG2j {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo {\n display: flex;\n width: 280px;\n height: 105px;\n border-radius: 5px;\n background-color: rgba(240, 241, 242, 0.72);\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo textarea {\n max-width: 174px;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo:hover .index-module_mask__L3q8p:before {\n opacity: 1;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo .index-module_imageProInfo__iHM0C {\n width: 80px;\n height: 80px;\n border-radius: 5px;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo .index-module_imageProRight__3rPiY {\n position: relative;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProWrap__sx8lo .index-module_imageProOperate__1hFcg {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.index-module_imageProBox__1u84Y .index-module_mask__L3q8p {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageProBox__1u84Y .index-module_mask__L3q8p::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageProBox__1u84Y .index-module_mask__L3q8p:hover .index-module_actions__3Wwry {\n opacity: 1;\n}\n.index-module_imageProBox__1u84Y .index-module_mask__L3q8p .index-module_actions__3Wwry {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageProBox__1u84Y .index-module_mask__L3q8p .index-module_actions__3Wwry .index-module_icon__3oJ-1 {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProPaste__22O8e {\n display: inline-block;\n margin-right: 8px !important;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProPaste__22O8e .index-module_fakeBox__3EXNG {\n width: 105px;\n height: 105px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n}\n.index-module_imageProBox__1u84Y .index-module_imageProPaste__22O8e .index-module_fakeBox__3EXNG .index-module_addBtn__1Dv95 {\n color: #86909C;\n}\n.index-module_imageProBox__1u84Y .index-module_uploadPro__3rAkl .ant-upload {\n height: 105px !important;\n width: 105px !important;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageProBox__1u84Y .index-module_uploadPro__3rAkl .ant-upload .index-module_addBtn__1Dv95 {\n color: #86909C;\n}\n.index-module_tips__z9Yjd {\n color: #4E5969;\n font-size: 12px;\n}\n";
1233
1233
  var styles$2 = {"imageProBox":"index-module_imageProBox__1u84Y","inputImage":"index-module_inputImage__nm5jb","imageShow":"index-module_imageShow__1cG2j","imageProWrap":"index-module_imageProWrap__sx8lo","-webkit-mask":"index-module_mask__L3q8p","mask":"index-module_mask__L3q8p","imageProInfo":"index-module_imageProInfo__iHM0C","imageProRight":"index-module_imageProRight__3rPiY","imageProOperate":"index-module_imageProOperate__1hFcg","actions":"index-module_actions__3Wwry","icon":"index-module_icon__3oJ-1","imageProPaste":"index-module_imageProPaste__22O8e","fakeBox":"index-module_fakeBox__3EXNG","addBtn":"index-module_addBtn__1Dv95","uploadPro":"index-module_uploadPro__3rAkl","tips":"index-module_tips__z9Yjd"};
@@ -1536,7 +1536,7 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1536
1536
  className: "addBtn"
1537
1537
  }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText))), renderImages(value)));
1538
1538
  };
1539
- var index$1 = /*#__PURE__*/forwardRef(ApaasUploadProAsync);
1539
+ var index = /*#__PURE__*/forwardRef(ApaasUploadProAsync);
1540
1540
 
1541
1541
  var css_248z$3 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .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__1rpoB .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
1542
1542
  var styles$3 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","tips":"index-module_tips__168Vy"};
@@ -13122,7 +13122,7 @@ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13122
13122
  });
13123
13123
  return newColumns;
13124
13124
  };
13125
- var index$2 = getColumnsBaseInfo();
13125
+ var index$1 = getColumnsBaseInfo();
13126
13126
 
13127
13127
  var initNo = {
13128
13128
  dataIndex: 'index',
@@ -20885,7 +20885,7 @@ var rowKeyMap = {
20885
20885
  JST_SYSTEM_ORDER: 'oId',
20886
20886
  JY_SYSTEM_ORDER: 'tradeNo'
20887
20887
  };
20888
- var index$3 = (function (props) {
20888
+ var index$2 = (function (props) {
20889
20889
  var value = props.value,
20890
20890
  _onChange = props.onChange,
20891
20891
  disabled = props.disabled,
@@ -21228,6 +21228,770 @@ var index$3 = (function (props) {
21228
21228
  }));
21229
21229
  });
21230
21230
 
21231
+ var css_248z$d = ".customizeUpload-module_customizeUpload__2tG-4 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n width: 100%;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:hover:not(:disabled) {\n color: #40a9ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_addButton__2w8Jj:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 {\n position: relative;\n width: 24px;\n height: 24px;\n overflow: hidden;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_image__3hOnT {\n width: 100%;\n height: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: white;\n font-size: 10px;\n background-color: rgba(0, 0, 0, 0.6);\n border-radius: 50%;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.2s;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1 .customizeUpload-module_deleteBtn__85Jsl:hover {\n background-color: rgba(255, 0, 0, 0.8);\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_imageItem__yn6H1:hover .customizeUpload-module_deleteBtn__85Jsl {\n opacity: 1;\n}\n.customizeUpload-module_customizeUpload__2tG-4 .customizeUpload-module_uploadContainer__rUcw7 {\n margin-top: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq {\n width: 280px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverTitle__3Qw2t {\n margin-bottom: 4px;\n color: #262626;\n font-weight: 500;\n font-size: 16px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_popoverSubtitle__1NA3m {\n margin-bottom: 16px;\n color: #8c8c8c;\n font-size: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G {\n display: flex;\n gap: 12px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J {\n display: flex;\n flex: 1;\n gap: 6px;\n align-items: center;\n justify-content: center;\n height: 40px;\n background-color: #fafafa;\n border: 1px solid #d9d9d9;\n border-radius: 6px;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:hover:not(:disabled) {\n color: #40a9ff;\n background-color: #f0f8ff;\n border-color: #40a9ff;\n}\n.customizeUpload-module_popoverContent__FrAiq .customizeUpload-module_actionButtons__2la0G .customizeUpload-module_actionButton__1Wr1J:disabled {\n color: #bfbfbf;\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n cursor: not-allowed;\n}\n";
21232
+ var styles$5 = {"customizeUpload":"customizeUpload-module_customizeUpload__2tG-4","addButton":"customizeUpload-module_addButton__2w8Jj","imageItem":"customizeUpload-module_imageItem__yn6H1","image":"customizeUpload-module_image__3hOnT","deleteBtn":"customizeUpload-module_deleteBtn__85Jsl","uploadContainer":"customizeUpload-module_uploadContainer__rUcw7","popoverContent":"customizeUpload-module_popoverContent__FrAiq","popoverTitle":"customizeUpload-module_popoverTitle__3Qw2t","popoverSubtitle":"customizeUpload-module_popoverSubtitle__1NA3m","actionButtons":"customizeUpload-module_actionButtons__2la0G","actionButton":"customizeUpload-module_actionButton__1Wr1J"};
21233
+ styleInject(css_248z$d);
21234
+
21235
+ var CustomizeUpload = function CustomizeUpload(_ref) {
21236
+ var _ref$value = _ref.value,
21237
+ value = _ref$value === void 0 ? '' : _ref$value,
21238
+ onChange = _ref.onChange,
21239
+ _ref$disabled = _ref.disabled,
21240
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21241
+ _ref$maxCount = _ref.maxCount,
21242
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
21243
+ _ref$maxSize = _ref.maxSize,
21244
+ maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize;
21245
+ var _useState = useState(false),
21246
+ _useState2 = _slicedToArray(_useState, 2),
21247
+ popoverVisible = _useState2[0],
21248
+ setPopoverVisible = _useState2[1];
21249
+ var newValue = useMemo(function () {
21250
+ return value ? value === null || value === void 0 ? void 0 : value.split(',') : [];
21251
+ }, [value]);
21252
+ // 渲染图片显示
21253
+ var renderImages = function renderImages() {
21254
+ if (newValue.length === 0) return null;
21255
+ return /*#__PURE__*/React.createElement(React.Fragment, null, newValue.map(function (image, index) {
21256
+ return /*#__PURE__*/React.createElement("div", {
21257
+ key: index,
21258
+ className: styles$5.imageItem
21259
+ }, /*#__PURE__*/React.createElement(Image, {
21260
+ src: image,
21261
+ alt: "\u56FE\u7247".concat(index + 1),
21262
+ className: styles$5.image,
21263
+ preview: {
21264
+ mask: '点击预览'
21265
+ }
21266
+ }));
21267
+ }));
21268
+ };
21269
+ var handleUploadChange = function handleUploadChange(val) {
21270
+ var newValue = val.join(',');
21271
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
21272
+ };
21273
+ // Popover 内容
21274
+ var popoverContent = /*#__PURE__*/React.createElement("div", {
21275
+ className: styles$5.popoverContent
21276
+ }, /*#__PURE__*/React.createElement("div", {
21277
+ className: styles$5.popoverTitle
21278
+ }, "\u6DFB\u52A0\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
21279
+ className: styles$5.uploadContainer
21280
+ }, /*#__PURE__*/React.createElement(ApaasUploadAsync$1, {
21281
+ canPreview: true,
21282
+ maxSize: maxSize,
21283
+ maxCount: maxCount,
21284
+ uniqueKey: "remark",
21285
+ hostUrl: "https://kefu.kuaimai.com",
21286
+ value: newValue || [],
21287
+ onChange: handleUploadChange,
21288
+ disabled: disabled
21289
+ })));
21290
+ return /*#__PURE__*/React.createElement("div", {
21291
+ className: styles$5.customizeUpload
21292
+ }, /*#__PURE__*/React.createElement("div", {
21293
+ className: styles$5.inputContainer
21294
+ }, /*#__PURE__*/React.createElement(Popover, {
21295
+ content: popoverContent,
21296
+ title: null,
21297
+ trigger: "click",
21298
+ open: popoverVisible,
21299
+ onOpenChange: setPopoverVisible,
21300
+ placement: "bottomLeft"
21301
+ }, /*#__PURE__*/React.createElement(Button, {
21302
+ className: styles$5.addButton,
21303
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
21304
+ disabled: disabled,
21305
+ type: "text"
21306
+ }))), renderImages());
21307
+ };
21308
+
21309
+ var refundTypeMap = {
21310
+ 0: '其他',
21311
+ 1: '已发货仅退款',
21312
+ 2: '退货',
21313
+ 3: '补发',
21314
+ 4: '换货',
21315
+ 5: '未发货仅退款',
21316
+ 9: '维修',
21317
+ 10: '价保',
21318
+ 11: '大家电安装',
21319
+ 12: '大家电移机',
21320
+ 13: '大家电增值服务',
21321
+ 14: '优鲜赔',
21322
+ 15: '试用收回'
21323
+ };
21324
+ var refundTypeOptions = Object.entries(refundTypeMap).map(function (_ref) {
21325
+ var _ref2 = _slicedToArray(_ref, 2),
21326
+ key = _ref2[0],
21327
+ value = _ref2[1];
21328
+ return {
21329
+ label: value,
21330
+ value: key
21331
+ };
21332
+ });
21333
+ var onlineStatusMap = {
21334
+ 1: '空',
21335
+ 2: '待卖家同意',
21336
+ 3: '待买家退货',
21337
+ 4: '待卖家确认收货',
21338
+ 5: '卖家拒绝退款',
21339
+ 6: '退款关闭',
21340
+ 7: '退款成功',
21341
+ 8: '待发出换货商品',
21342
+ 9: '待买家收货',
21343
+ 10: '换货关闭',
21344
+ 11: '换货成功'
21345
+ };
21346
+ var onlineStatusOptions = Object.entries(onlineStatusMap).map(function (_ref3) {
21347
+ var _ref4 = _slicedToArray(_ref3, 2),
21348
+ key = _ref4[0],
21349
+ value = _ref4[1];
21350
+ return {
21351
+ label: value,
21352
+ value: key
21353
+ };
21354
+ });
21355
+ var consignTypeMap = {
21356
+ 1: '是',
21357
+ 0: '否'
21358
+ };
21359
+ var consignTypeOptions = Object.entries(consignTypeMap).map(function (_ref5) {
21360
+ var _ref6 = _slicedToArray(_ref5, 2),
21361
+ key = _ref6[0],
21362
+ value = _ref6[1];
21363
+ return {
21364
+ label: value,
21365
+ value: key
21366
+ };
21367
+ });
21368
+ var getOrderSubformColumns = function getOrderSubformColumns(parmas) {
21369
+ var _ref7 = parmas || {},
21370
+ _ref7$expressData = _ref7.expressData,
21371
+ expressData = _ref7$expressData === void 0 ? [] : _ref7$expressData;
21372
+ return [{
21373
+ dataIndex: 'title',
21374
+ title: '商品名称',
21375
+ widget: 'input',
21376
+ widgetProps: {},
21377
+ width: 150
21378
+ }, {
21379
+ dataIndex: 'productCode',
21380
+ title: '商品编码',
21381
+ widget: 'input',
21382
+ width: 150,
21383
+ widgetProps: {}
21384
+ }, {
21385
+ dataIndex: 'picUrl',
21386
+ title: '图片',
21387
+ widget: 'upload',
21388
+ widgetProps: {},
21389
+ width: 100,
21390
+ customizeComponent: function customizeComponent(config) {
21391
+ return /*#__PURE__*/React.createElement(CustomizeUpload, {
21392
+ value: config.value,
21393
+ onChange: config.onChange,
21394
+ maxCount: config.maxCount,
21395
+ maxSize: config.maxSize
21396
+ });
21397
+ }
21398
+ }, {
21399
+ dataIndex: 'numIid',
21400
+ title: '商品id',
21401
+ widget: 'input',
21402
+ widgetProps: {},
21403
+ width: 150
21404
+ }, {
21405
+ dataIndex: 'quantity',
21406
+ title: '商品数量',
21407
+ widget: 'inputNumber',
21408
+ width: 100,
21409
+ widgetProps: {
21410
+ precision: 0,
21411
+ min: 0
21412
+ }
21413
+ }, {
21414
+ dataIndex: 'skuId',
21415
+ title: 'SKU ID',
21416
+ widget: 'input',
21417
+ width: 150,
21418
+ widgetProps: {}
21419
+ }, {
21420
+ dataIndex: 'outerSkuId',
21421
+ title: 'SKU 编码',
21422
+ widget: 'input',
21423
+ width: 150,
21424
+ widgetProps: {}
21425
+ }, {
21426
+ dataIndex: 'propertiesName',
21427
+ title: 'SKU 信息',
21428
+ widget: 'input',
21429
+ width: 200,
21430
+ widgetProps: {}
21431
+ }, {
21432
+ dataIndex: 'oid',
21433
+ title: '子订单号',
21434
+ widget: 'input',
21435
+ width: 150,
21436
+ widgetProps: {}
21437
+ }, {
21438
+ dataIndex: 'price',
21439
+ title: '商品单价',
21440
+ widget: 'inputNumber',
21441
+ width: 100,
21442
+ widgetProps: {
21443
+ precision: 2,
21444
+ min: 0
21445
+ }
21446
+ }, {
21447
+ dataIndex: 'actualPayment',
21448
+ title: '[子]实付金额',
21449
+ widget: 'inputNumber',
21450
+ width: 100,
21451
+ widgetProps: {
21452
+ precision: 2,
21453
+ min: 0
21454
+ }
21455
+ }, {
21456
+ dataIndex: 'expressLogisticsCode',
21457
+ title: '[子]运单号',
21458
+ widget: 'input',
21459
+ width: 150,
21460
+ widgetProps: {}
21461
+ }, {
21462
+ dataIndex: 'expressLogisticsCompany',
21463
+ title: '[子]发货快递',
21464
+ widget: 'select',
21465
+ width: 150,
21466
+ widgetProps: {
21467
+ options: expressData,
21468
+ showSearch: true,
21469
+ allowClear: true
21470
+ }
21471
+ }, {
21472
+ dataIndex: 'refundId',
21473
+ title: '退款单ID',
21474
+ widget: 'input',
21475
+ width: 150,
21476
+ widgetProps: {}
21477
+ }, {
21478
+ dataIndex: 'returnExpressLogisticsCode',
21479
+ title: '退货物流单号',
21480
+ widget: 'input',
21481
+ width: 150,
21482
+ widgetProps: {}
21483
+ }, {
21484
+ dataIndex: 'returnExpressLogisticsCompany',
21485
+ title: '退货物流公司',
21486
+ widget: 'select',
21487
+ width: 150,
21488
+ widgetProps: {
21489
+ options: expressData,
21490
+ showSearch: true,
21491
+ allowClear: true
21492
+ }
21493
+ }, {
21494
+ dataIndex: 'reason',
21495
+ title: '退款原因',
21496
+ widget: 'input',
21497
+ width: 200,
21498
+ widgetProps: {}
21499
+ }, {
21500
+ dataIndex: 'refundAmount',
21501
+ title: '退款金额',
21502
+ widget: 'inputNumber',
21503
+ width: 100,
21504
+ widgetProps: {
21505
+ precision: 2,
21506
+ min: 0
21507
+ }
21508
+ }, {
21509
+ dataIndex: 'afterSaleType',
21510
+ title: '退款类型',
21511
+ widget: 'select',
21512
+ width: 150,
21513
+ widgetProps: {
21514
+ options: refundTypeOptions,
21515
+ showSearch: true,
21516
+ allowClear: true
21517
+ }
21518
+ }, {
21519
+ dataIndex: 'platformStatusText',
21520
+ title: '退款状态(平台)',
21521
+ widget: 'input',
21522
+ width: 150,
21523
+ widgetProps: {}
21524
+ }, {
21525
+ dataIndex: 'onlineStatus',
21526
+ title: '退款状态(快麦)',
21527
+ widget: 'select',
21528
+ width: 150,
21529
+ widgetProps: {
21530
+ options: onlineStatusOptions,
21531
+ showSearch: true,
21532
+ allowClear: true
21533
+ }
21534
+ }, {
21535
+ dataIndex: 'applyTime',
21536
+ title: '退款申请时间',
21537
+ widget: 'datePicker',
21538
+ width: 150,
21539
+ widgetProps: {
21540
+ showTime: true,
21541
+ format: 'YYYY-MM-DD HH:mm:ss'
21542
+ }
21543
+ }, {
21544
+ dataIndex: 'returnFreeShipping',
21545
+ title: '退货免运费',
21546
+ widget: 'input',
21547
+ width: 150,
21548
+ widgetProps: {}
21549
+ }, {
21550
+ dataIndex: 'isCNShipment',
21551
+ title: '是否菜鸟仓发货',
21552
+ widget: 'select',
21553
+ width: 100,
21554
+ widgetProps: {
21555
+ options: consignTypeOptions,
21556
+ showSearch: true,
21557
+ allowClear: true
21558
+ }
21559
+ }];
21560
+ };
21561
+ var getSelectWidgetMap = function getSelectWidgetMap(expressDateInstance) {
21562
+ return {
21563
+ expressLogisticsCompany: function expressLogisticsCompany(code) {
21564
+ return expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode(code);
21565
+ },
21566
+ returnExpressLogisticsCompany: function returnExpressLogisticsCompany(code) {
21567
+ return expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode(code);
21568
+ },
21569
+ afterSaleType: refundTypeMap,
21570
+ isCNShipment: consignTypeMap,
21571
+ onlineStatus: onlineStatusMap
21572
+ };
21573
+ };
21574
+ var orderSubFormConstants = {
21575
+ getSelectWidgetMap: getSelectWidgetMap,
21576
+ getOrderSubformColumns: getOrderSubformColumns
21577
+ };
21578
+
21579
+ var getSelectWidgetMap$1 = orderSubFormConstants.getSelectWidgetMap;
21580
+ var singletonMap$8 = new Map();
21581
+ var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
21582
+ var orderNo = parmas.orderNo,
21583
+ shopId = parmas.shopId;
21584
+ var key = "".concat(orderNo, "-").concat(shopId);
21585
+ if (!singletonMap$8.has(key)) {
21586
+ var p = new Promise(function (resolve, reject) {
21587
+ var doReject = function doReject(err) {
21588
+ // 清空掉错误的请求记录
21589
+ singletonMap$8.delete(key);
21590
+ reject(err);
21591
+ };
21592
+ extendRequest('/qy/gdfw/order/subOrderItemsDetail', {
21593
+ method: 'post',
21594
+ data: _objectSpread2({}, parmas)
21595
+ }).then(function (data) {
21596
+ if (data === null || data === void 0 ? void 0 : data.success) {
21597
+ var _data$data;
21598
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.length) {
21599
+ resolve(data === null || data === void 0 ? void 0 : data.data);
21600
+ } else {
21601
+ resolve([]);
21602
+ }
21603
+ // 延迟10秒清除,保证订单的时效性
21604
+ setTimeout(function () {
21605
+ singletonMap$8.delete(key);
21606
+ }, 1000 * 10);
21607
+ } else {
21608
+ doReject(data);
21609
+ }
21610
+ }).catch(doReject);
21611
+ });
21612
+ singletonMap$8.set(key, p);
21613
+ }
21614
+ return singletonMap$8.get(key);
21615
+ };
21616
+ var renderEditItem = function renderEditItem(_ref) {
21617
+ var item = _ref.item,
21618
+ val = _ref.val,
21619
+ disabled = _ref.disabled,
21620
+ index = _ref.index,
21621
+ type = _ref.type,
21622
+ updateHandle = _ref.updateHandle;
21623
+ var Component = /*#__PURE__*/React.createElement(React.Fragment, null, "\u4E0D\u652F\u6301\u7684\u7C7B\u578B\u7EC4\u4EF6\uFF1A", JSON.stringify(item.widget));
21624
+ if (typeof item.customizeComponent === 'function') {
21625
+ Component = item.customizeComponent(_objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
21626
+ disabled: disabled,
21627
+ value: val,
21628
+ onChange: function onChange(e) {
21629
+ return updateHandle(e, index, type);
21630
+ }
21631
+ }));
21632
+ } else if (item.widget === 'input') {
21633
+ Component = /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
21634
+ disabled: disabled,
21635
+ value: val,
21636
+ onChange: function onChange(e) {
21637
+ var _e$target;
21638
+ return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, type);
21639
+ }
21640
+ }));
21641
+ } else if (item.widget === 'select') {
21642
+ Component = /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
21643
+ value: val,
21644
+ disabled: disabled,
21645
+ onChange: function onChange(e) {
21646
+ return updateHandle(e, index, type);
21647
+ }
21648
+ }));
21649
+ } else if (item.widget === 'datePicker') {
21650
+ Component = /*#__PURE__*/React.createElement(DatePicker, _objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
21651
+ value: val ? hooks(val) : null,
21652
+ disabled: disabled,
21653
+ onChange: function onChange(e) {
21654
+ return updateHandle(hooks(e).format('YYYY-MM-DD HH:mm:ss'), index, type);
21655
+ }
21656
+ }));
21657
+ } else if (item.widget === 'inputNumber') {
21658
+ Component = /*#__PURE__*/React.createElement(InputNumber, _objectSpread2(_objectSpread2({
21659
+ style: {
21660
+ width: '100%'
21661
+ }
21662
+ }, item.widgetProps), {}, {
21663
+ value: val,
21664
+ disabled: disabled,
21665
+ onChange: function onChange(e) {
21666
+ return updateHandle(e, index, type);
21667
+ }
21668
+ }));
21669
+ } else if (item.widget === 'cascader') {
21670
+ Component = /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
21671
+ value: val,
21672
+ disabled: disabled,
21673
+ onChange: function onChange(e) {
21674
+ return updateHandle(e, index, type);
21675
+ }
21676
+ }));
21677
+ }
21678
+ return Component;
21679
+ };
21680
+ var renderDate = function renderDate(value) {
21681
+ return value ? hooks(value).format('YYYY-MM-DD HH:mm:ss') : '';
21682
+ };
21683
+ var renderImages = function renderImages(value) {
21684
+ var list = value ? value.split(',') : [];
21685
+ return list.map(function (url) {
21686
+ var finalSrc = (url === null || url === void 0 ? void 0 : url.startsWith('http')) ? url : "https://kefu.kuaimai.com/".concat(url);
21687
+ return /*#__PURE__*/React.createElement(Image, {
21688
+ src: finalSrc,
21689
+ width: 24,
21690
+ height: 24
21691
+ });
21692
+ });
21693
+ };
21694
+ var renderDetailItem = function renderDetailItem(_ref2) {
21695
+ var item = _ref2.item,
21696
+ val = _ref2.val;
21697
+ var expressDateInstance = ExpressData.getInstance();
21698
+ var Component = /*#__PURE__*/React.createElement(React.Fragment, null, "\u4E0D\u652F\u6301\u7684\u7C7B\u578B\u7EC4\u4EF6\uFF1A", JSON.stringify(item.widget));
21699
+ if (['input', 'inputNumber'].includes(item.widget)) {
21700
+ Component = val;
21701
+ } else if (item.widget === 'select') {
21702
+ var _getSelectWidgetMap;
21703
+ var mapValue = (_getSelectWidgetMap = getSelectWidgetMap$1(expressDateInstance)) === null || _getSelectWidgetMap === void 0 ? void 0 : _getSelectWidgetMap[item.dataIndex];
21704
+ var selectValue;
21705
+ if (mapValue && typeof mapValue === 'function') {
21706
+ selectValue = mapValue === null || mapValue === void 0 ? void 0 : mapValue(val);
21707
+ } else {
21708
+ selectValue = mapValue === null || mapValue === void 0 ? void 0 : mapValue[val];
21709
+ }
21710
+ Component = /*#__PURE__*/React.createElement(React.Fragment, null, selectValue);
21711
+ } else if (item.widget === 'datePicker') {
21712
+ Component = /*#__PURE__*/React.createElement(React.Fragment, null, renderDate(val));
21713
+ } else if (item.widget === 'upload') {
21714
+ Component = /*#__PURE__*/React.createElement(React.Fragment, null, renderImages(val));
21715
+ }
21716
+ return Component;
21717
+ };
21718
+ var utils = {
21719
+ getOrderListSingleton: getOrderListSingleton$3,
21720
+ renderEditItem: renderEditItem,
21721
+ renderDetailItem: renderDetailItem
21722
+ };
21723
+
21724
+ var getOrderSubformColumns$1 = orderSubFormConstants.getOrderSubformColumns;
21725
+ var renderEditItem$1 = utils.renderEditItem,
21726
+ renderDetailItem$1 = utils.renderDetailItem,
21727
+ getOrderListSingleton$4 = utils.getOrderListSingleton;
21728
+ var OrderSubForm = function OrderSubForm(props) {
21729
+ var _props$value = props.value,
21730
+ value = _props$value === void 0 ? {} : _props$value,
21731
+ onChange = props.onChange,
21732
+ _props$tableHeader = props.tableHeader,
21733
+ tableHeader = _props$tableHeader === void 0 ? [] : _props$tableHeader,
21734
+ disabled = props.disabled,
21735
+ maxCount = props.maxCount,
21736
+ manual = props.manual,
21737
+ correlationList = props.subConfig.correlationList,
21738
+ effects = props.effects;
21739
+ var valueRef = useRef(value);
21740
+ useEffect(function () {
21741
+ valueRef.current = value;
21742
+ return;
21743
+ }, [value]);
21744
+ var _useState = useState(null),
21745
+ _useState2 = _slicedToArray(_useState, 2),
21746
+ hoveredRowIndex = _useState2[0],
21747
+ setHoveredRowIndex = _useState2[1];
21748
+ var updateHandle = useCallback(function (val, index, type) {
21749
+ var _valueRef$current, _valueRef$current$sub;
21750
+ if ((_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : (_valueRef$current$sub = _valueRef$current.subOrderList) === null || _valueRef$current$sub === void 0 ? void 0 : _valueRef$current$sub.length) {
21751
+ var _valueRef$current2;
21752
+ var subOrderList = JSON.parse(JSON.stringify((_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.subOrderList));
21753
+ subOrderList[index][type] = val;
21754
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
21755
+ subOrderList: subOrderList
21756
+ }));
21757
+ }
21758
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
21759
+ var orderSubformColumns = useMemo(function () {
21760
+ return getOrderSubformColumns$1({
21761
+ expressData: ExpressData.getInstance().getExpressData()
21762
+ });
21763
+ }, [ExpressData]);
21764
+ var orderSubformColumnMap = useMemo(function () {
21765
+ return orderSubformColumns.reduce(function (prv, next) {
21766
+ prv[next.dataIndex] = next;
21767
+ return prv;
21768
+ }, {});
21769
+ }, [orderSubformColumns]);
21770
+ var initColumns = useMemo(function () {
21771
+ return correlationList && (correlationList === null || correlationList === void 0 ? void 0 : correlationList.length) ? correlationList.map(function (t) {
21772
+ return orderSubformColumnMap === null || orderSubformColumnMap === void 0 ? void 0 : orderSubformColumnMap[t === null || t === void 0 ? void 0 : t.dataIndex];
21773
+ }) : orderSubformColumns;
21774
+ }, [correlationList, orderSubformColumns]);
21775
+ var newTableHeader = useMemo(function () {
21776
+ return initColumns.reduce(function (prv, next) {
21777
+ var t = tableHeader.find(function (t) {
21778
+ return t.key === (next === null || next === void 0 ? void 0 : next.dataIndex);
21779
+ }) || {
21780
+ isShow: true,
21781
+ isEdit: false,
21782
+ isRequired: false,
21783
+ width: 150
21784
+ };
21785
+ if (t && t.isShow) {
21786
+ prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, next), t), {}, {
21787
+ widgetProps: (next === null || next === void 0 ? void 0 : next.widgetProps) || {}
21788
+ }));
21789
+ }
21790
+ return prv;
21791
+ }, []);
21792
+ }, [orderSubformColumns, tableHeader]);
21793
+ var column = useMemo(function () {
21794
+ return [{
21795
+ dataIndex: 'index',
21796
+ title: '序号',
21797
+ width: 80,
21798
+ render: function render(val, record, index) {
21799
+ return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
21800
+ index: index,
21801
+ hoveredRowIndex: hoveredRowIndex,
21802
+ handleClick: function handleClick() {
21803
+ return deleteHandle(record.uuid);
21804
+ }
21805
+ });
21806
+ // return <div style={{ width: 25 }}>{index + 1}</div>;
21807
+ }
21808
+ }].concat(_toConsumableArray(newTableHeader.map(function (t) {
21809
+ return _objectSpread2(_objectSpread2({}, t), {}, {
21810
+ dataIndex: t === null || t === void 0 ? void 0 : t.dataIndex,
21811
+ title: /*#__PURE__*/React.createElement("span", null, t.isRequired ? /*#__PURE__*/React.createElement("span", {
21812
+ style: {
21813
+ color: 'red'
21814
+ }
21815
+ }, "*") : null, (t === null || t === void 0 ? void 0 : t.settingName) || t.title),
21816
+ ellipsis: true,
21817
+ width: Number(t.width),
21818
+ render: function render(val, record, index) {
21819
+ // const column = orderSubformColumnMap[t.dataIndex];
21820
+ var isDisabled = t.isEdit || disabled;
21821
+ return renderEditItem$1({
21822
+ item: t || {},
21823
+ val: val,
21824
+ disabled: isDisabled,
21825
+ index: index,
21826
+ type: t === null || t === void 0 ? void 0 : t.dataIndex,
21827
+ updateHandle: updateHandle
21828
+ });
21829
+ }
21830
+ });
21831
+ })), [disabled ? {} : {
21832
+ dataIndex: 'operation',
21833
+ title: '操作',
21834
+ width: 70,
21835
+ fixed: 'right',
21836
+ render: function render(val, record, index) {
21837
+ return /*#__PURE__*/React.createElement(Space, null, manual && /*#__PURE__*/React.createElement(Tooltip, {
21838
+ title: "\u6DFB\u52A0"
21839
+ }, /*#__PURE__*/React.createElement(PlusCircleFilled, {
21840
+ style: {
21841
+ fontSize: 18,
21842
+ color: '#1890ff'
21843
+ },
21844
+ onClick: function onClick() {
21845
+ return addHandle(index + 1);
21846
+ }
21847
+ })), /*#__PURE__*/React.createElement(Tooltip, {
21848
+ title: "\u5220\u9664"
21849
+ }, /*#__PURE__*/React.createElement(MinusCircleFilled, {
21850
+ style: {
21851
+ fontSize: 18
21852
+ },
21853
+ onClick: function onClick() {
21854
+ return deleteHandle(record.uuid);
21855
+ }
21856
+ })));
21857
+ }
21858
+ }]);
21859
+ }, [newTableHeader, disabled, updateHandle]);
21860
+ var orderModalColumns = useMemo(function () {
21861
+ return [{
21862
+ dataIndex: '',
21863
+ title: '序号',
21864
+ align: 'center',
21865
+ ellipsis: true,
21866
+ width: 80,
21867
+ render: function render(val, record, index) {
21868
+ return /*#__PURE__*/React.createElement("span", null, index + 1);
21869
+ }
21870
+ }].concat(_toConsumableArray(column.filter(function (item) {
21871
+ return !['operation', 'index'].includes((item === null || item === void 0 ? void 0 : item.dataIndex) || '');
21872
+ }).map(function (item) {
21873
+ return _objectSpread2(_objectSpread2({}, item), {}, {
21874
+ render: function render(val, record, index) {
21875
+ return renderDetailItem$1({
21876
+ item: item,
21877
+ val: val
21878
+ });
21879
+ }
21880
+ });
21881
+ })));
21882
+ }, [column]);
21883
+ var defaultValueMap = useMemo(function () {
21884
+ return newTableHeader.reduce(function (prv, next) {
21885
+ prv["".concat(next.dataIndex)] = '';
21886
+ return prv;
21887
+ }, {});
21888
+ }, [newTableHeader]);
21889
+ var deleteHandle = function deleteHandle(uuid) {
21890
+ var _valueRef$current3, _valueRef$current3$su;
21891
+ var newList = (_valueRef$current3 = valueRef.current) === null || _valueRef$current3 === void 0 ? void 0 : (_valueRef$current3$su = _valueRef$current3.subOrderList) === null || _valueRef$current3$su === void 0 ? void 0 : _valueRef$current3$su.filter(function (item) {
21892
+ return item.uuid !== uuid;
21893
+ });
21894
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
21895
+ subOrderList: newList
21896
+ }));
21897
+ };
21898
+ var addHandle = function addHandle(index) {
21899
+ var _valueRef$current4, _valueRef$current4$su, _valueRef$current5;
21900
+ if (maxCount && ((_valueRef$current4 = valueRef.current) === null || _valueRef$current4 === void 0 ? void 0 : (_valueRef$current4$su = _valueRef$current4.subOrderList) === null || _valueRef$current4$su === void 0 ? void 0 : _valueRef$current4$su.length) >= maxCount) {
21901
+ message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
21902
+ return;
21903
+ }
21904
+ var subOrderList = _toConsumableArray(((_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5.subOrderList) || []);
21905
+ subOrderList.splice(index, 0, _objectSpread2(_objectSpread2({}, defaultValueMap), {}, {
21906
+ uuid: uuid()
21907
+ }));
21908
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
21909
+ subOrderList: subOrderList
21910
+ }));
21911
+ };
21912
+ var getDataSourceAsync = function getDataSourceAsync() {
21913
+ var _effects$form, _valueRef$current6, _valueRef$current7;
21914
+ var _ref = (effects === null || effects === void 0 ? void 0 : (_effects$form = effects.form) === null || _effects$form === void 0 ? void 0 : _effects$form.getFieldsValue()) || {},
21915
+ _ref$shopId = _ref.shopId,
21916
+ shopId = _ref$shopId === void 0 ? '' : _ref$shopId;
21917
+ return ((_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.orderNo) && shopId ? getOrderListSingleton$4({
21918
+ orderNo: (_valueRef$current7 = valueRef.current) === null || _valueRef$current7 === void 0 ? void 0 : _valueRef$current7.orderNo,
21919
+ shopId: shopId
21920
+ }).then(function (data) {
21921
+ // const list = processAllOrders({
21922
+ // data,
21923
+ // orderNo: value?.orderNo,
21924
+ // type: compType,
21925
+ // });
21926
+ // onChange({ ...valueRef.current, allOrders: list || [] });
21927
+ }) : Promise.resolve();
21928
+ };
21929
+ var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
21930
+ var _valueRef$current8;
21931
+ var goodDetails = ((_valueRef$current8 = valueRef.current) === null || _valueRef$current8 === void 0 ? void 0 : _valueRef$current8.allOrders) || [];
21932
+ return goodDetails;
21933
+ };
21934
+ var selectedGoodsChange = useCallback(function (skuList) {
21935
+ var _valueRef$current9, _uniqBy;
21936
+ var newValue = _objectSpread2({}, valueRef.current);
21937
+ // 原订单商品
21938
+ var originTradeGoodList = getAllTradeGoodsDetails() || [];
21939
+ // 当前选中的所有商品【包含了原订单+商品库】
21940
+ var currentSelectGoodList = ((_valueRef$current9 = valueRef.current) === null || _valueRef$current9 === void 0 ? void 0 : _valueRef$current9.subOrderList) || [];
21941
+ newValue['subOrderList'] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
21942
+ return skuList.includes(item.uuid);
21943
+ });
21944
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
21945
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
21946
+ // TODO: 商品订单中以选中商品
21947
+ var selectedGoods = useMemo(function () {
21948
+ var _valueRef$current10, _valueRef$current10$s;
21949
+ return (_valueRef$current10 = valueRef.current) === null || _valueRef$current10 === void 0 ? void 0 : (_valueRef$current10$s = _valueRef$current10.subOrderList) === null || _valueRef$current10$s === void 0 ? void 0 : _valueRef$current10$s.map(function (v) {
21950
+ return v === null || v === void 0 ? void 0 : v.uuid;
21951
+ });
21952
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
21953
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && /*#__PURE__*/React.createElement("div", {
21954
+ style: {
21955
+ float: 'right'
21956
+ }
21957
+ }, /*#__PURE__*/React.createElement(SelectTradeGoods, {
21958
+ uniqueKey: 'uuid',
21959
+ columns: orderModalColumns,
21960
+ dataSource: getAllTradeGoodsDetails(),
21961
+ getDataSourceAsync: getDataSourceAsync,
21962
+ selectedRowKeys: selectedGoods,
21963
+ onChangeSelectedKeys: selectedGoodsChange,
21964
+ width: 850
21965
+ })), /*#__PURE__*/React.createElement(Table, {
21966
+ columns: column,
21967
+ dataSource: (value === null || value === void 0 ? void 0 : value.subOrderList) || [],
21968
+ rowKey: 'uuid',
21969
+ size: "small",
21970
+ pagination: false,
21971
+ scroll: {
21972
+ x: '100%'
21973
+ },
21974
+ locale: {
21975
+ emptyText: !disabled && manual ? /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E,", /*#__PURE__*/React.createElement(Button, {
21976
+ type: "link",
21977
+ onClick: function onClick() {
21978
+ return addHandle(0);
21979
+ }
21980
+ }, "\u70B9\u51FB\u6DFB\u52A0")) : '暂无数据'
21981
+ },
21982
+ onRow: function onRow(_, index) {
21983
+ return {
21984
+ onMouseEnter: function onMouseEnter() {
21985
+ return setHoveredRowIndex(index !== null && index !== void 0 ? index : null);
21986
+ },
21987
+ onMouseLeave: function onMouseLeave() {
21988
+ return setHoveredRowIndex(null);
21989
+ }
21990
+ };
21991
+ }
21992
+ }));
21993
+ };
21994
+
21231
21995
  var isErpType$1 = {
21232
21996
  isWdt: function isWdt(type) {
21233
21997
  return ['WDT_GOODS'].includes(type);
@@ -22705,8 +23469,8 @@ var PublicReissue = function PublicReissue(props) {
22705
23469
  })));
22706
23470
  };
22707
23471
 
22708
- var css_248z$d = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
22709
- styleInject(css_248z$d);
23472
+ var css_248z$e = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
23473
+ styleInject(css_248z$e);
22710
23474
 
22711
23475
  var TabPane$1 = Tabs.TabPane;
22712
23476
  var Option$2 = Select.Option;
@@ -23179,7 +23943,7 @@ var Goods$1 = function Goods(props, ref) {
23179
23943
  userNick: userNick
23180
23944
  }));
23181
23945
  };
23182
- var index$4 = /*#__PURE__*/forwardRef(Goods$1);
23946
+ var index$3 = /*#__PURE__*/forwardRef(Goods$1);
23183
23947
 
23184
23948
  var _excluded$n = ["onChange", "value", "failValue"];
23185
23949
  function CommonStatus(props) {
@@ -23722,9 +24486,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
23722
24486
  })));
23723
24487
  };
23724
24488
 
23725
- var css_248z$e = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
23726
- var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
23727
- styleInject(css_248z$e);
24489
+ var css_248z$f = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
24490
+ var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
24491
+ styleInject(css_248z$f);
23728
24492
 
23729
24493
  var _excluded$r = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
23730
24494
  _excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
@@ -23986,7 +24750,7 @@ var GyReissue = function GyReissue(props) {
23986
24750
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
23987
24751
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s9 = value[(_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.systemOrder]) === null || _value$typeMap$type$s9 === void 0 ? void 0 : _value$typeMap$type$s9.showOrderInfo) || []).map(function (item) {
23988
24752
  return /*#__PURE__*/React.createElement(Select.Option, {
23989
- className: styles$5.systemNoDisabled,
24753
+ className: styles$6.systemNoDisabled,
23990
24754
  key: item.billNo,
23991
24755
  value: item.billNo,
23992
24756
  label: item.billNo,
@@ -24284,7 +25048,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
24284
25048
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
24285
25049
  }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
24286
25050
  return /*#__PURE__*/React.createElement(Select.Option, {
24287
- className: styles$5.systemNoDisabled,
25051
+ className: styles$6.systemNoDisabled,
24288
25052
  key: item.billNo,
24289
25053
  value: item.billNo,
24290
25054
  label: item.billNo,
@@ -24335,9 +25099,9 @@ var GyReturnGoods = function GyReturnGoods(props) {
24335
25099
  })));
24336
25100
  };
24337
25101
 
24338
- var css_248z$f = ".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";
24339
- var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
24340
- styleInject(css_248z$f);
25102
+ var css_248z$g = ".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";
25103
+ var styles$7 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
25104
+ styleInject(css_248z$g);
24341
25105
 
24342
25106
  var _excluded$t = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
24343
25107
  var Dragger$1 = Upload.Dragger;
@@ -24513,9 +25277,9 @@ var KmVideo = function KmVideo(_ref) {
24513
25277
  return /*#__PURE__*/React.createElement(Spin, {
24514
25278
  spinning: uploading
24515
25279
  }, /*#__PURE__*/React.createElement("p", {
24516
- className: styles$6.tips
25280
+ className: styles$7.tips
24517
25281
  }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
24518
- className: styles$6.imageBox
25282
+ className: styles$7.imageBox
24519
25283
  }, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
24520
25284
  disabled: disabled,
24521
25285
  multiple: true,
@@ -24541,9 +25305,9 @@ var KmVideo = function KmVideo(_ref) {
24541
25305
  }), file.kmVideoType && "".concat(file.kmVideoType));
24542
25306
  }
24543
25307
  }, resetProps), /*#__PURE__*/React.createElement("span", {
24544
- className: styles$6.addBtn
25308
+ className: styles$7.addBtn
24545
25309
  }, "+"), /*#__PURE__*/React.createElement("p", {
24546
- className: styles$6.addBtn
25310
+ className: styles$7.addBtn
24547
25311
  }, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
24548
25312
  visible: visible,
24549
25313
  title: fileName,
@@ -24578,15 +25342,15 @@ var KmVideo = function KmVideo(_ref) {
24578
25342
  }))));
24579
25343
  };
24580
25344
 
24581
- var singletonMap$8 = new Map();
25345
+ var singletonMap$9 = new Map();
24582
25346
  var getAllGoods = function getAllGoods(params, setLoading) {
24583
25347
  var id = params.tid || params.onBillNo || '';
24584
- if (!singletonMap$8.has(id)) {
25348
+ if (!singletonMap$9.has(id)) {
24585
25349
  setLoading && setLoading(true);
24586
25350
  var p = new Promise(function (resolve, reject) {
24587
25351
  var doReject = function doReject(err) {
24588
25352
  // 清空掉错误的请求记录
24589
- singletonMap$8.delete(id);
25353
+ singletonMap$9.delete(id);
24590
25354
  reject(err);
24591
25355
  };
24592
25356
  extendRequest('/qy/gdfw/order/skxOrderDetail', {
@@ -24608,7 +25372,7 @@ var getAllGoods = function getAllGoods(params, setLoading) {
24608
25372
  resolve(res.data);
24609
25373
  // 延迟10秒清除,保证订单的时效性
24610
25374
  setTimeout(function () {
24611
- singletonMap$8.delete(id);
25375
+ singletonMap$9.delete(id);
24612
25376
  }, 1000 * 10);
24613
25377
  } else {
24614
25378
  doReject(res);
@@ -24617,9 +25381,9 @@ var getAllGoods = function getAllGoods(params, setLoading) {
24617
25381
  setLoading && setLoading(false);
24618
25382
  });
24619
25383
  });
24620
- singletonMap$8.set(id, p);
25384
+ singletonMap$9.set(id, p);
24621
25385
  }
24622
- return singletonMap$8.get(id);
25386
+ return singletonMap$9.get(id);
24623
25387
  };
24624
25388
  var skxUtils = {
24625
25389
  getAllGoods: getAllGoods
@@ -24930,4 +25694,4 @@ var SkxGoods = function SkxGoods(props) {
24930
25694
  }));
24931
25695
  };
24932
25696
 
24933
- 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, SkxGoods, IdInputSelect as SkxIdInputSelect, 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$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, skxUtils };
25697
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync$1 as ApaasUploadAsync, ApaasUploadFile, index as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$2 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$3 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, OrderSubForm, utils as OrderSubFormUtils, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, SkxGoods, IdInputSelect as SkxIdInputSelect, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$1 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$7 as getJyColumns, getColumns$6 as getKmColumns, getColumns$8 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, orderSubFormConstants, skxUtils };