@kmkf-fe-packages/basic-components 2.2.5 → 2.2.6

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.js CHANGED
@@ -1237,7 +1237,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1237
1237
  className: "addBtn"
1238
1238
  }, "+"), /*#__PURE__*/React__default['default'].createElement("div", null, uploadText)))));
1239
1239
  };
1240
- var index = /*#__PURE__*/React.forwardRef(ApaasUploadAsync);
1240
+ var ApaasUploadAsync$1 = /*#__PURE__*/React.forwardRef(ApaasUploadAsync);
1241
1241
 
1242
1242
  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";
1243
1243
  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"};
@@ -1546,7 +1546,7 @@ var ApaasUploadProAsync = function ApaasUploadProAsync(_ref, ref) {
1546
1546
  className: "addBtn"
1547
1547
  }, "+"), /*#__PURE__*/React__default['default'].createElement("div", null, uploadText))), renderImages(value)));
1548
1548
  };
1549
- var index$1 = /*#__PURE__*/React.forwardRef(ApaasUploadProAsync);
1549
+ var index = /*#__PURE__*/React.forwardRef(ApaasUploadProAsync);
1550
1550
 
1551
1551
  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";
1552
1552
  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"};
@@ -8429,10 +8429,6 @@ var SubForm = function SubForm(props) {
8429
8429
  }
8430
8430
  });
8431
8431
  }
8432
- if (maxCount && (value === null || value === void 0 ? void 0 : value.length) >= maxCount) {
8433
- antd.message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
8434
- return;
8435
- }
8436
8432
  onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value || []), [_objectSpread2(_objectSpread2({}, newValue), {}, {
8437
8433
  uuid: kmkfUtils.uuid()
8438
8434
  })]));
@@ -13006,7 +13002,7 @@ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13006
13002
  });
13007
13003
  return newColumns;
13008
13004
  };
13009
- var index$2 = getColumnsBaseInfo();
13005
+ var index$1 = getColumnsBaseInfo();
13010
13006
 
13011
13007
  var initNo = {
13012
13008
  dataIndex: 'index',
@@ -18640,7 +18636,7 @@ var rowKeyMap = {
18640
18636
  GY_SYSTEM_ORDER: 'billNo',
18641
18637
  JST_SYSTEM_ORDER: 'oId'
18642
18638
  };
18643
- var index$3 = (function (props) {
18639
+ var index$2 = (function (props) {
18644
18640
  var value = props.value,
18645
18641
  _onChange = props.onChange,
18646
18642
  disabled = props.disabled,
@@ -18950,6 +18946,819 @@ var index$3 = (function (props) {
18950
18946
  }));
18951
18947
  });
18952
18948
 
18949
+ var css_248z$b = ".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 !important;\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";
18950
+ 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"};
18951
+ styleInject(css_248z$b);
18952
+
18953
+ var CustomizeUpload = function CustomizeUpload(_ref) {
18954
+ var _ref$value = _ref.value,
18955
+ value = _ref$value === void 0 ? '' : _ref$value,
18956
+ onChange = _ref.onChange,
18957
+ _ref$disabled = _ref.disabled,
18958
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
18959
+ _ref$maxCount = _ref.maxCount,
18960
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
18961
+ _ref$maxSize = _ref.maxSize,
18962
+ maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize;
18963
+ var _useState = React.useState(false),
18964
+ _useState2 = _slicedToArray(_useState, 2),
18965
+ popoverVisible = _useState2[0],
18966
+ setPopoverVisible = _useState2[1];
18967
+ var newValue = React.useMemo(function () {
18968
+ return value ? value === null || value === void 0 ? void 0 : value.split(',') : [];
18969
+ }, [value]);
18970
+ // 渲染图片显示
18971
+ var renderImages = function renderImages() {
18972
+ if (newValue.length === 0) return null;
18973
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, newValue.map(function (image, index) {
18974
+ var finalSrc = (image === null || image === void 0 ? void 0 : image.startsWith('http')) ? image : "https://kefu.kuaimai.com/".concat(image);
18975
+ return /*#__PURE__*/React__default['default'].createElement("div", {
18976
+ key: index,
18977
+ className: styles$5.imageItem
18978
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
18979
+ src: finalSrc,
18980
+ alt: "\u56FE\u7247".concat(index + 1),
18981
+ className: styles$5.image,
18982
+ preview: {
18983
+ mask: '点击预览'
18984
+ }
18985
+ }));
18986
+ }));
18987
+ };
18988
+ var handleUploadChange = function handleUploadChange(val) {
18989
+ var newValue = val.map(function (t) {
18990
+ return (t === null || t === void 0 ? void 0 : t.startsWith('http')) ? t : "https://kefu.kuaimai.com/".concat(t);
18991
+ });
18992
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue.join(','));
18993
+ };
18994
+ // Popover 内容
18995
+ var popoverContent = /*#__PURE__*/React__default['default'].createElement("div", {
18996
+ className: styles$5.popoverContent
18997
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
18998
+ className: styles$5.popoverTitle
18999
+ }, "\u6DFB\u52A0\u56FE\u7247"), /*#__PURE__*/React__default['default'].createElement("div", {
19000
+ className: styles$5.uploadContainer
19001
+ }, /*#__PURE__*/React__default['default'].createElement(ApaasUploadAsync$1, {
19002
+ canPreview: true,
19003
+ maxSize: maxSize,
19004
+ maxCount: maxCount,
19005
+ uniqueKey: "remark",
19006
+ hostUrl: "https://kefu.kuaimai.com",
19007
+ value: newValue || [],
19008
+ onChange: handleUploadChange,
19009
+ disabled: disabled
19010
+ })));
19011
+ return /*#__PURE__*/React__default['default'].createElement("div", {
19012
+ className: styles$5.customizeUpload
19013
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
19014
+ className: styles$5.inputContainer
19015
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
19016
+ getPopupContainer: function getPopupContainer() {
19017
+ return document.body;
19018
+ },
19019
+ content: popoverContent,
19020
+ title: null,
19021
+ trigger: "click",
19022
+ open: popoverVisible,
19023
+ onOpenChange: setPopoverVisible,
19024
+ placement: "bottomLeft",
19025
+ overlayStyle: {
19026
+ zIndex: 2000
19027
+ }
19028
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
19029
+ className: styles$5.addButton,
19030
+ icon: /*#__PURE__*/React__default['default'].createElement(icons.PlusOutlined, null),
19031
+ disabled: disabled,
19032
+ type: "text"
19033
+ }))), renderImages());
19034
+ };
19035
+
19036
+ var refundTypeMap = {
19037
+ 0: '其他',
19038
+ 1: '已发货仅退款',
19039
+ 2: '退货',
19040
+ 3: '补发',
19041
+ 4: '换货',
19042
+ 5: '未发货仅退款',
19043
+ 9: '维修',
19044
+ 10: '价保',
19045
+ 11: '大家电安装',
19046
+ 12: '大家电移机',
19047
+ 13: '大家电增值服务',
19048
+ 14: '优鲜赔',
19049
+ 15: '试用收回'
19050
+ };
19051
+ var refundTypeOptions = Object.entries(refundTypeMap).map(function (_ref) {
19052
+ var _ref2 = _slicedToArray(_ref, 2),
19053
+ key = _ref2[0],
19054
+ value = _ref2[1];
19055
+ return {
19056
+ label: value,
19057
+ value: Number(key)
19058
+ };
19059
+ });
19060
+ var onlineStatusMap = {
19061
+ 1: '空',
19062
+ 2: '待卖家同意',
19063
+ 3: '待买家退货',
19064
+ 4: '待卖家确认收货',
19065
+ 5: '卖家拒绝退款',
19066
+ 6: '退款关闭',
19067
+ 7: '退款成功',
19068
+ 8: '待发出换货商品',
19069
+ 9: '待买家收货',
19070
+ 10: '换货关闭',
19071
+ 11: '换货成功'
19072
+ };
19073
+ var onlineStatusOptions = Object.entries(onlineStatusMap).map(function (_ref3) {
19074
+ var _ref4 = _slicedToArray(_ref3, 2),
19075
+ key = _ref4[0],
19076
+ value = _ref4[1];
19077
+ return {
19078
+ label: value,
19079
+ value: Number(key)
19080
+ };
19081
+ });
19082
+ var consignTypeMap = {
19083
+ 1: '是',
19084
+ 0: '否'
19085
+ };
19086
+ var consignTypeOptions = Object.entries(consignTypeMap).map(function (_ref5) {
19087
+ var _ref6 = _slicedToArray(_ref5, 2),
19088
+ key = _ref6[0],
19089
+ value = _ref6[1];
19090
+ return {
19091
+ label: value,
19092
+ value: Number(key)
19093
+ };
19094
+ });
19095
+ var getOrderSubformColumns = function getOrderSubformColumns(parmas) {
19096
+ var _ref7 = parmas || {},
19097
+ _ref7$expressData = _ref7.expressData,
19098
+ expressData = _ref7$expressData === void 0 ? [] : _ref7$expressData;
19099
+ return [{
19100
+ dataIndex: 'title',
19101
+ title: '商品名称',
19102
+ widget: 'input',
19103
+ widgetProps: {},
19104
+ width: 150
19105
+ }, {
19106
+ dataIndex: 'productCode',
19107
+ title: '商品编码',
19108
+ widget: 'input',
19109
+ width: 150,
19110
+ widgetProps: {}
19111
+ }, {
19112
+ dataIndex: 'picUrl',
19113
+ title: '图片',
19114
+ widget: 'upload',
19115
+ widgetProps: {},
19116
+ width: 100,
19117
+ customizeComponent: function customizeComponent(config) {
19118
+ return /*#__PURE__*/React__default['default'].createElement(CustomizeUpload, {
19119
+ disabled: config.disabled,
19120
+ value: config.value,
19121
+ onChange: config.onChange,
19122
+ maxCount: config.maxCount,
19123
+ maxSize: config.maxSize
19124
+ });
19125
+ }
19126
+ }, {
19127
+ dataIndex: 'numIid',
19128
+ title: '商品id',
19129
+ widget: 'input',
19130
+ widgetProps: {},
19131
+ width: 150
19132
+ }, {
19133
+ dataIndex: 'quantity',
19134
+ title: '商品数量',
19135
+ widget: 'inputNumber',
19136
+ width: 100,
19137
+ widgetProps: {
19138
+ precision: 0,
19139
+ min: 0
19140
+ }
19141
+ }, {
19142
+ dataIndex: 'skuId',
19143
+ title: 'SKU ID',
19144
+ widget: 'input',
19145
+ width: 150,
19146
+ widgetProps: {}
19147
+ }, {
19148
+ dataIndex: 'outerSkuId',
19149
+ title: 'SKU 编码',
19150
+ widget: 'input',
19151
+ width: 150,
19152
+ widgetProps: {}
19153
+ }, {
19154
+ dataIndex: 'propertiesName',
19155
+ title: 'SKU 信息',
19156
+ widget: 'input',
19157
+ width: 200,
19158
+ widgetProps: {}
19159
+ }, {
19160
+ dataIndex: 'oid',
19161
+ title: '子订单号',
19162
+ widget: 'input',
19163
+ width: 150,
19164
+ widgetProps: {}
19165
+ }, {
19166
+ dataIndex: 'price',
19167
+ title: '商品单价',
19168
+ widget: 'inputNumber',
19169
+ width: 100,
19170
+ widgetProps: {
19171
+ precision: 2,
19172
+ min: 0
19173
+ }
19174
+ }, {
19175
+ dataIndex: 'actualPayment',
19176
+ title: '[子]实付金额',
19177
+ widget: 'inputNumber',
19178
+ width: 100,
19179
+ widgetProps: {
19180
+ precision: 2,
19181
+ min: 0
19182
+ }
19183
+ }, {
19184
+ dataIndex: 'expressLogisticsCode',
19185
+ title: '[子]运单号',
19186
+ widget: 'input',
19187
+ width: 150,
19188
+ widgetProps: {}
19189
+ }, {
19190
+ dataIndex: 'expressLogisticsCompany',
19191
+ title: '[子]发货快递',
19192
+ widget: 'select',
19193
+ width: 150,
19194
+ widgetProps: {
19195
+ filterOption: function filterOption(input, option) {
19196
+ return option.label.includes(input);
19197
+ },
19198
+ options: expressData,
19199
+ showSearch: true,
19200
+ allowClear: true
19201
+ }
19202
+ }, {
19203
+ dataIndex: 'refundId',
19204
+ title: '退款单ID',
19205
+ widget: 'input',
19206
+ width: 150,
19207
+ widgetProps: {}
19208
+ }, {
19209
+ dataIndex: 'returnExpressLogisticsCode',
19210
+ title: '退货物流单号',
19211
+ widget: 'input',
19212
+ width: 150,
19213
+ widgetProps: {}
19214
+ }, {
19215
+ dataIndex: 'returnExpressLogisticsCompany',
19216
+ title: '退货物流公司',
19217
+ widget: 'select',
19218
+ width: 150,
19219
+ widgetProps: {
19220
+ filterOption: function filterOption(input, option) {
19221
+ return option.label.includes(input);
19222
+ },
19223
+ options: expressData,
19224
+ showSearch: true,
19225
+ allowClear: true
19226
+ }
19227
+ }, {
19228
+ dataIndex: 'reason',
19229
+ title: '退款原因',
19230
+ widget: 'input',
19231
+ width: 200,
19232
+ widgetProps: {}
19233
+ }, {
19234
+ dataIndex: 'refundAmount',
19235
+ title: '退款金额',
19236
+ widget: 'inputNumber',
19237
+ width: 100,
19238
+ widgetProps: {
19239
+ precision: 2,
19240
+ min: 0
19241
+ }
19242
+ }, {
19243
+ dataIndex: 'afterSaleType',
19244
+ title: '退款类型',
19245
+ widget: 'select',
19246
+ width: 150,
19247
+ widgetProps: {
19248
+ filterOption: function filterOption(input, option) {
19249
+ return option.label.includes(input);
19250
+ },
19251
+ options: refundTypeOptions,
19252
+ showSearch: true,
19253
+ allowClear: true
19254
+ }
19255
+ }, {
19256
+ dataIndex: 'platformStatusText',
19257
+ title: '退款状态(平台)',
19258
+ widget: 'input',
19259
+ width: 150,
19260
+ widgetProps: {}
19261
+ }, {
19262
+ dataIndex: 'onlineStatus',
19263
+ title: '退款状态(快麦)',
19264
+ widget: 'select',
19265
+ width: 150,
19266
+ widgetProps: {
19267
+ filterOption: function filterOption(input, option) {
19268
+ return option.label.includes(input);
19269
+ },
19270
+ options: onlineStatusOptions,
19271
+ showSearch: true,
19272
+ allowClear: true
19273
+ }
19274
+ }, {
19275
+ dataIndex: 'applyTime',
19276
+ title: '退款申请时间',
19277
+ widget: 'datePicker',
19278
+ width: 200,
19279
+ widgetProps: {
19280
+ showTime: true,
19281
+ format: 'YYYY-MM-DD HH:mm:ss'
19282
+ }
19283
+ }, {
19284
+ dataIndex: 'returnFreeShipping',
19285
+ title: '退货免运费',
19286
+ widget: 'input',
19287
+ width: 150,
19288
+ widgetProps: {}
19289
+ }, {
19290
+ dataIndex: 'isCNShipment',
19291
+ title: '是否菜鸟仓发货',
19292
+ widget: 'select',
19293
+ width: 100,
19294
+ widgetProps: {
19295
+ filterOption: function filterOption(input, option) {
19296
+ return option.label.includes(input);
19297
+ },
19298
+ options: consignTypeOptions,
19299
+ showSearch: true,
19300
+ allowClear: true
19301
+ }
19302
+ }];
19303
+ };
19304
+ var getSelectWidgetMap = function getSelectWidgetMap(expressDateInstance) {
19305
+ return {
19306
+ expressLogisticsCompany: function expressLogisticsCompany(code) {
19307
+ return expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode(code);
19308
+ },
19309
+ returnExpressLogisticsCompany: function returnExpressLogisticsCompany(code) {
19310
+ return expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode(code);
19311
+ },
19312
+ afterSaleType: refundTypeMap,
19313
+ isCNShipment: consignTypeMap,
19314
+ onlineStatus: onlineStatusMap
19315
+ };
19316
+ };
19317
+ var orderSubFormConstants = {
19318
+ getSelectWidgetMap: getSelectWidgetMap,
19319
+ getOrderSubformColumns: getOrderSubformColumns
19320
+ };
19321
+
19322
+ var getSelectWidgetMap$1 = orderSubFormConstants.getSelectWidgetMap;
19323
+ var singletonMap$7 = new Map();
19324
+ var getOrderListSingleton$3 = function getOrderListSingleton(parmas) {
19325
+ var orderNo = parmas.orderNo,
19326
+ shopId = parmas.shopId;
19327
+ var key = "".concat(orderNo, "-").concat(shopId);
19328
+ if (!singletonMap$7.has(key)) {
19329
+ var p = new Promise(function (resolve, reject) {
19330
+ var doReject = function doReject(err) {
19331
+ // 清空掉错误的请求记录
19332
+ singletonMap$7.delete(key);
19333
+ reject(err);
19334
+ };
19335
+ extendRequest('/qy/gdfw/order/subOrderItemsDetail', {
19336
+ method: 'post',
19337
+ data: _objectSpread2({}, parmas)
19338
+ }).then(function (data) {
19339
+ if (data === null || data === void 0 ? void 0 : data.success) {
19340
+ var _data$data;
19341
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.length) {
19342
+ resolve(data === null || data === void 0 ? void 0 : data.data);
19343
+ } else {
19344
+ resolve([]);
19345
+ }
19346
+ // 延迟10秒清除,保证订单的时效性
19347
+ setTimeout(function () {
19348
+ singletonMap$7.delete(key);
19349
+ }, 1000 * 10);
19350
+ } else {
19351
+ doReject(data);
19352
+ }
19353
+ }).catch(doReject);
19354
+ });
19355
+ singletonMap$7.set(key, p);
19356
+ }
19357
+ return singletonMap$7.get(key);
19358
+ };
19359
+ var renderEditItem = function renderEditItem(_ref) {
19360
+ var item = _ref.item,
19361
+ val = _ref.val,
19362
+ disabled = _ref.disabled,
19363
+ index = _ref.index,
19364
+ type = _ref.type,
19365
+ updateHandle = _ref.updateHandle;
19366
+ var Component = /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u4E0D\u652F\u6301\u7684\u7C7B\u578B\u7EC4\u4EF6\uFF1A", JSON.stringify(item.widget));
19367
+ if (typeof item.customizeComponent === 'function') {
19368
+ Component = item.customizeComponent(_objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
19369
+ disabled: disabled,
19370
+ value: val,
19371
+ onChange: function onChange(e) {
19372
+ return updateHandle(e, index, type);
19373
+ }
19374
+ }));
19375
+ } else if (item.widget === 'input') {
19376
+ Component = /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, item.widgetProps), {}, {
19377
+ disabled: disabled,
19378
+ value: val,
19379
+ onChange: function onChange(e) {
19380
+ var _e$target;
19381
+ 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);
19382
+ }
19383
+ }));
19384
+ } else if (item.widget === 'select') {
19385
+ Component = /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
19386
+ dropdownStyle: {
19387
+ zIndex: 2000
19388
+ },
19389
+ getPopupContainer: function getPopupContainer() {
19390
+ return document.body;
19391
+ }
19392
+ }, item.widgetProps), {}, {
19393
+ value: val,
19394
+ disabled: disabled,
19395
+ onChange: function onChange(e) {
19396
+ return updateHandle(e, index, type);
19397
+ }
19398
+ }));
19399
+ } else if (item.widget === 'datePicker') {
19400
+ Component = /*#__PURE__*/React__default['default'].createElement(antd.DatePicker, _objectSpread2(_objectSpread2({
19401
+ popupStyle: {
19402
+ zIndex: 2000
19403
+ },
19404
+ getPopupContainer: function getPopupContainer() {
19405
+ return document.body;
19406
+ }
19407
+ }, item.widgetProps), {}, {
19408
+ value: val ? hooks(val) : null,
19409
+ disabled: disabled,
19410
+ onChange: function onChange(e) {
19411
+ return updateHandle(hooks(e).format('YYYY-MM-DD HH:mm:ss'), index, type);
19412
+ }
19413
+ }));
19414
+ } else if (item.widget === 'inputNumber') {
19415
+ Component = /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({
19416
+ style: {
19417
+ width: '100%'
19418
+ }
19419
+ }, item.widgetProps), {}, {
19420
+ value: val,
19421
+ disabled: disabled,
19422
+ onChange: function onChange(e) {
19423
+ return updateHandle(e, index, type);
19424
+ }
19425
+ }));
19426
+ } else if (item.widget === 'cascader') {
19427
+ Component = /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({
19428
+ getPopupContainer: function getPopupContainer() {
19429
+ return document.body;
19430
+ }
19431
+ }, item.widgetProps), {}, {
19432
+ value: val,
19433
+ disabled: disabled,
19434
+ onChange: function onChange(e) {
19435
+ return updateHandle(e, index, type);
19436
+ }
19437
+ }));
19438
+ }
19439
+ return Component;
19440
+ };
19441
+ var renderDate = function renderDate(value) {
19442
+ return value ? hooks(value).format('YYYY-MM-DD HH:mm:ss') : '';
19443
+ };
19444
+ var renderImages = function renderImages(value) {
19445
+ var list = value ? value.split(',') : [];
19446
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, /*#__PURE__*/React__default['default'].createElement("div", {
19447
+ style: {
19448
+ display: 'flex',
19449
+ flexWrap: 'wrap'
19450
+ }
19451
+ }, list.map(function (url) {
19452
+ var finalSrc = (url === null || url === void 0 ? void 0 : url.startsWith('http')) ? url : "https://kefu.kuaimai.com/".concat(url);
19453
+ return /*#__PURE__*/React__default['default'].createElement("div", {
19454
+ style: {
19455
+ padding: '2px'
19456
+ }
19457
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
19458
+ src: finalSrc,
19459
+ width: 24,
19460
+ height: 24
19461
+ }));
19462
+ })));
19463
+ };
19464
+ var renderDetailItem = function renderDetailItem(_ref2) {
19465
+ var item = _ref2.item,
19466
+ val = _ref2.val;
19467
+ var expressDateInstance = kmkfUtils.ExpressData.getInstance();
19468
+ var Component = /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u4E0D\u652F\u6301\u7684\u7C7B\u578B\u7EC4\u4EF6\uFF1A", JSON.stringify(item.widget));
19469
+ if (['input', 'inputNumber'].includes(item.widget)) {
19470
+ Component = val;
19471
+ } else if (item.widget === 'select') {
19472
+ var _getSelectWidgetMap;
19473
+ var mapValue = (_getSelectWidgetMap = getSelectWidgetMap$1(expressDateInstance)) === null || _getSelectWidgetMap === void 0 ? void 0 : _getSelectWidgetMap[item.dataIndex];
19474
+ var selectValue;
19475
+ if (mapValue && typeof mapValue === 'function') {
19476
+ selectValue = mapValue === null || mapValue === void 0 ? void 0 : mapValue(val);
19477
+ } else {
19478
+ selectValue = mapValue === null || mapValue === void 0 ? void 0 : mapValue[val];
19479
+ }
19480
+ Component = /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, selectValue);
19481
+ } else if (item.widget === 'datePicker') {
19482
+ Component = /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, renderDate(val));
19483
+ } else if (item.widget === 'upload') {
19484
+ Component = /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, renderImages(val));
19485
+ }
19486
+ return Component;
19487
+ };
19488
+ var utils = {
19489
+ getOrderListSingleton: getOrderListSingleton$3,
19490
+ renderEditItem: renderEditItem,
19491
+ renderDetailItem: renderDetailItem
19492
+ };
19493
+
19494
+ var getOrderSubformColumns$1 = orderSubFormConstants.getOrderSubformColumns;
19495
+ var renderEditItem$1 = utils.renderEditItem,
19496
+ renderDetailItem$1 = utils.renderDetailItem,
19497
+ getOrderListSingleton$4 = utils.getOrderListSingleton;
19498
+ var OrderSubForm = function OrderSubForm(props) {
19499
+ var _props$value = props.value,
19500
+ value = _props$value === void 0 ? {} : _props$value,
19501
+ onChange = props.onChange,
19502
+ _props$tableHeader = props.tableHeader,
19503
+ tableHeader = _props$tableHeader === void 0 ? [] : _props$tableHeader,
19504
+ disabled = props.disabled,
19505
+ maxCount = props.maxCount,
19506
+ manual = props.manual,
19507
+ correlationList = props.subConfig.correlationList,
19508
+ effects = props.effects;
19509
+ var valueRef = React.useRef(value);
19510
+ React.useEffect(function () {
19511
+ valueRef.current = value;
19512
+ return;
19513
+ }, [value]);
19514
+ var _useState = React.useState(null),
19515
+ _useState2 = _slicedToArray(_useState, 2),
19516
+ hoveredRowIndex = _useState2[0],
19517
+ setHoveredRowIndex = _useState2[1];
19518
+ var updateHandle = React.useCallback(function (val, index, type) {
19519
+ var _valueRef$current, _valueRef$current$sub;
19520
+ 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) {
19521
+ var _valueRef$current2;
19522
+ var subOrderList = JSON.parse(JSON.stringify((_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.subOrderList));
19523
+ subOrderList[index][type] = val;
19524
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
19525
+ subOrderList: subOrderList
19526
+ }));
19527
+ }
19528
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
19529
+ var orderSubformColumns = React.useMemo(function () {
19530
+ return getOrderSubformColumns$1({
19531
+ expressData: kmkfUtils.ExpressData.getInstance().getExpressData()
19532
+ });
19533
+ }, [kmkfUtils.ExpressData]);
19534
+ var orderSubformColumnMap = React.useMemo(function () {
19535
+ return orderSubformColumns.reduce(function (prv, next) {
19536
+ prv[next.dataIndex] = next;
19537
+ return prv;
19538
+ }, {});
19539
+ }, [orderSubformColumns]);
19540
+ var initColumns = React.useMemo(function () {
19541
+ return correlationList && (correlationList === null || correlationList === void 0 ? void 0 : correlationList.length) ? correlationList.map(function (t) {
19542
+ return orderSubformColumnMap === null || orderSubformColumnMap === void 0 ? void 0 : orderSubformColumnMap[t === null || t === void 0 ? void 0 : t.dataIndex];
19543
+ }) : orderSubformColumns;
19544
+ }, [correlationList, orderSubformColumns]);
19545
+ var newTableHeader = React.useMemo(function () {
19546
+ return initColumns.reduce(function (prv, next) {
19547
+ var t = tableHeader.find(function (t) {
19548
+ return t.key === (next === null || next === void 0 ? void 0 : next.dataIndex);
19549
+ }) || {
19550
+ isShow: true,
19551
+ isEdit: false,
19552
+ isRequired: false,
19553
+ width: Number(next === null || next === void 0 ? void 0 : next.width) || 150
19554
+ };
19555
+ if (t && t.isShow) {
19556
+ prv.push(_objectSpread2(_objectSpread2(_objectSpread2({}, next), t), {}, {
19557
+ widgetProps: (next === null || next === void 0 ? void 0 : next.widgetProps) || {}
19558
+ }));
19559
+ }
19560
+ return prv;
19561
+ }, []);
19562
+ }, [orderSubformColumns, tableHeader]);
19563
+ var column = React.useMemo(function () {
19564
+ return [{
19565
+ dataIndex: 'index',
19566
+ title: '序号',
19567
+ width: 80,
19568
+ render: function render(val, record, index) {
19569
+ return /*#__PURE__*/React__default['default'].createElement(HoverTableRowDeleteIcon, {
19570
+ index: index,
19571
+ hoveredRowIndex: hoveredRowIndex,
19572
+ handleClick: function handleClick() {
19573
+ return deleteHandle(record.uuid);
19574
+ }
19575
+ });
19576
+ // return <div style={{ width: 25 }}>{index + 1}</div>;
19577
+ }
19578
+ }].concat(_toConsumableArray(newTableHeader.map(function (t) {
19579
+ return _objectSpread2(_objectSpread2({}, t), {}, {
19580
+ dataIndex: t === null || t === void 0 ? void 0 : t.dataIndex,
19581
+ title: /*#__PURE__*/React__default['default'].createElement("span", null, t.isRequired ? /*#__PURE__*/React__default['default'].createElement("span", {
19582
+ style: {
19583
+ color: 'red'
19584
+ }
19585
+ }, "*") : null, (t === null || t === void 0 ? void 0 : t.settingName) || t.title),
19586
+ width: Number(t.width),
19587
+ render: function render(val, record, index) {
19588
+ // const column = orderSubformColumnMap[t.dataIndex];
19589
+ var isDisabled = t.isEdit || disabled;
19590
+ return renderEditItem$1({
19591
+ item: t || {},
19592
+ val: val,
19593
+ disabled: isDisabled,
19594
+ index: index,
19595
+ type: t === null || t === void 0 ? void 0 : t.dataIndex,
19596
+ updateHandle: updateHandle
19597
+ });
19598
+ }
19599
+ });
19600
+ })), [disabled ? {} : {
19601
+ dataIndex: 'operation',
19602
+ title: '操作',
19603
+ width: 70,
19604
+ fixed: 'right',
19605
+ render: function render(val, record, index) {
19606
+ return /*#__PURE__*/React__default['default'].createElement(antd.Space, null, manual && /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19607
+ title: "\u6DFB\u52A0"
19608
+ }, /*#__PURE__*/React__default['default'].createElement(icons.PlusCircleFilled, {
19609
+ style: {
19610
+ fontSize: 18,
19611
+ color: '#1890ff'
19612
+ },
19613
+ onClick: function onClick() {
19614
+ return addHandle(index + 1);
19615
+ }
19616
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
19617
+ title: "\u5220\u9664"
19618
+ }, /*#__PURE__*/React__default['default'].createElement(icons.MinusCircleFilled, {
19619
+ style: {
19620
+ fontSize: 18
19621
+ },
19622
+ onClick: function onClick() {
19623
+ return deleteHandle(record.uuid);
19624
+ }
19625
+ })));
19626
+ }
19627
+ }]);
19628
+ }, [newTableHeader, disabled, updateHandle]);
19629
+ var orderModalColumns = React.useMemo(function () {
19630
+ return [{
19631
+ dataIndex: '',
19632
+ title: '序号',
19633
+ align: 'center',
19634
+ ellipsis: true,
19635
+ width: 80,
19636
+ render: function render(val, record, index) {
19637
+ return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
19638
+ }
19639
+ }].concat(_toConsumableArray(column.filter(function (item) {
19640
+ return !['operation', 'index'].includes((item === null || item === void 0 ? void 0 : item.dataIndex) || '');
19641
+ }).map(function (item) {
19642
+ return _objectSpread2(_objectSpread2({}, item), {}, {
19643
+ ellipsis: true,
19644
+ render: function render(val, record, index) {
19645
+ return renderDetailItem$1({
19646
+ item: item,
19647
+ val: val
19648
+ });
19649
+ }
19650
+ });
19651
+ })));
19652
+ }, [column]);
19653
+ var defaultValueMap = React.useMemo(function () {
19654
+ return newTableHeader.reduce(function (prv, next) {
19655
+ prv["".concat(next.dataIndex)] = '';
19656
+ return prv;
19657
+ }, {});
19658
+ }, [newTableHeader]);
19659
+ var deleteHandle = function deleteHandle(uuid) {
19660
+ var _value$subOrderList;
19661
+ var newList = value === null || value === void 0 ? void 0 : (_value$subOrderList = value.subOrderList) === null || _value$subOrderList === void 0 ? void 0 : _value$subOrderList.filter(function (item) {
19662
+ return item.uuid !== uuid;
19663
+ });
19664
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
19665
+ subOrderList: newList
19666
+ }));
19667
+ };
19668
+ var addHandle = function addHandle(index) {
19669
+ var _value$subOrderList2;
19670
+ if (maxCount && (value === null || value === void 0 ? void 0 : (_value$subOrderList2 = value.subOrderList) === null || _value$subOrderList2 === void 0 ? void 0 : _value$subOrderList2.length) >= maxCount) {
19671
+ antd.message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
19672
+ return;
19673
+ }
19674
+ var subOrderList = _toConsumableArray((value === null || value === void 0 ? void 0 : value.subOrderList) || []);
19675
+ subOrderList.splice(index, 0, _objectSpread2(_objectSpread2({}, defaultValueMap), {}, {
19676
+ uuid: kmkfUtils.uuid()
19677
+ }));
19678
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
19679
+ subOrderList: subOrderList
19680
+ }));
19681
+ };
19682
+ var getDataSourceAsync = function getDataSourceAsync() {
19683
+ var _effects$form;
19684
+ var _ref = (effects === null || effects === void 0 ? void 0 : (_effects$form = effects.form) === null || _effects$form === void 0 ? void 0 : _effects$form.getFieldsValue()) || {},
19685
+ _ref$shopId = _ref.shopId,
19686
+ shopId = _ref$shopId === void 0 ? '' : _ref$shopId;
19687
+ return (value === null || value === void 0 ? void 0 : value.orderNo) && shopId ? getOrderListSingleton$4({
19688
+ orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
19689
+ shopId: shopId
19690
+ }).then(function (data) {
19691
+ var allOrders = kmkfUtils.updateOrderSubFormGoodsHandle(data || []);
19692
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, {
19693
+ allOrders: allOrders
19694
+ }));
19695
+ }) : Promise.resolve();
19696
+ };
19697
+ var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
19698
+ var goodDetails = (value === null || value === void 0 ? void 0 : value.allOrders) || [];
19699
+ return goodDetails;
19700
+ };
19701
+ var selectedGoodsChange = React.useCallback(function (skuList) {
19702
+ var _uniqBy;
19703
+ var newValue = _objectSpread2({}, value);
19704
+ // 原订单商品
19705
+ var originTradeGoodList = getAllTradeGoodsDetails() || [];
19706
+ // 当前选中的所有商品【包含了原订单+商品库】
19707
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value.subOrderList) || [];
19708
+ newValue['subOrderList'] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
19709
+ return skuList.includes(item.uuid);
19710
+ });
19711
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
19712
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
19713
+ // TODO: 商品订单中以选中商品
19714
+ var selectedGoods = React.useMemo(function () {
19715
+ var _value$subOrderList3;
19716
+ return value === null || value === void 0 ? void 0 : (_value$subOrderList3 = value.subOrderList) === null || _value$subOrderList3 === void 0 ? void 0 : _value$subOrderList3.map(function (v) {
19717
+ return v === null || v === void 0 ? void 0 : v.uuid;
19718
+ });
19719
+ }, [value === null || value === void 0 ? void 0 : value.subOrderList]);
19720
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && /*#__PURE__*/React__default['default'].createElement("div", {
19721
+ style: {
19722
+ float: 'right'
19723
+ }
19724
+ }, /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
19725
+ uniqueKey: 'uuid',
19726
+ columns: orderModalColumns,
19727
+ dataSource: getAllTradeGoodsDetails(),
19728
+ getDataSourceAsync: getDataSourceAsync,
19729
+ selectedRowKeys: selectedGoods,
19730
+ onChangeSelectedKeys: selectedGoodsChange,
19731
+ width: 850
19732
+ })), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
19733
+ columns: column,
19734
+ dataSource: (value === null || value === void 0 ? void 0 : value.subOrderList) || [],
19735
+ rowKey: 'uuid',
19736
+ size: "small",
19737
+ pagination: false,
19738
+ scroll: {
19739
+ x: '100%'
19740
+ },
19741
+ locale: {
19742
+ emptyText: !disabled && manual ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u6682\u65E0\u6570\u636E,", /*#__PURE__*/React__default['default'].createElement(antd.Button, {
19743
+ type: "link",
19744
+ onClick: function onClick() {
19745
+ return addHandle(0);
19746
+ }
19747
+ }, "\u70B9\u51FB\u6DFB\u52A0")) : '暂无数据'
19748
+ },
19749
+ onRow: function onRow(_, index) {
19750
+ return {
19751
+ onMouseEnter: function onMouseEnter() {
19752
+ return setHoveredRowIndex(index !== null && index !== void 0 ? index : null);
19753
+ },
19754
+ onMouseLeave: function onMouseLeave() {
19755
+ return setHoveredRowIndex(null);
19756
+ }
19757
+ };
19758
+ }
19759
+ }));
19760
+ };
19761
+
18953
19762
  var isErpType$1 = {
18954
19763
  isWdt: function isWdt(type) {
18955
19764
  return ['WDT_GOODS'].includes(type);
@@ -20398,8 +21207,8 @@ var PublicReissue = function PublicReissue(props) {
20398
21207
  })));
20399
21208
  };
20400
21209
 
20401
- var css_248z$b = ".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";
20402
- styleInject(css_248z$b);
21210
+ var css_248z$c = ".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";
21211
+ styleInject(css_248z$c);
20403
21212
 
20404
21213
  var TabPane$1 = antd.Tabs.TabPane;
20405
21214
  var Option$2 = antd.Select.Option;
@@ -20872,7 +21681,7 @@ var Goods$1 = function Goods(props, ref) {
20872
21681
  userNick: userNick
20873
21682
  }));
20874
21683
  };
20875
- var index$4 = /*#__PURE__*/React.forwardRef(Goods$1);
21684
+ var index$3 = /*#__PURE__*/React.forwardRef(Goods$1);
20876
21685
 
20877
21686
  var _excluded$k = ["onChange", "value", "failValue"];
20878
21687
  function CommonStatus(props) {
@@ -21473,9 +22282,9 @@ var bsE3Reissue = function bsE3Reissue(props) {
21473
22282
  })));
21474
22283
  };
21475
22284
 
21476
- var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
21477
- var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
21478
- styleInject(css_248z$c);
22285
+ var css_248z$d = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
22286
+ var styles$6 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
22287
+ styleInject(css_248z$d);
21479
22288
 
21480
22289
  var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
21481
22290
  _excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
@@ -21737,7 +22546,7 @@ var GyReissue = function GyReissue(props) {
21737
22546
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
21738
22547
  }, ((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) {
21739
22548
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
21740
- className: styles$5.systemNoDisabled,
22549
+ className: styles$6.systemNoDisabled,
21741
22550
  key: item.billNo,
21742
22551
  value: item.billNo,
21743
22552
  label: item.billNo,
@@ -22035,7 +22844,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
22035
22844
  placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
22036
22845
  }, ((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) {
22037
22846
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
22038
- className: styles$5.systemNoDisabled,
22847
+ className: styles$6.systemNoDisabled,
22039
22848
  key: item.billNo,
22040
22849
  value: item.billNo,
22041
22850
  label: item.billNo,
@@ -22086,9 +22895,9 @@ var GyReturnGoods = function GyReturnGoods(props) {
22086
22895
  })));
22087
22896
  };
22088
22897
 
22089
- 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";
22090
- var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
22091
- styleInject(css_248z$d);
22898
+ var css_248z$e = ".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";
22899
+ var styles$7 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
22900
+ styleInject(css_248z$e);
22092
22901
 
22093
22902
  var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
22094
22903
  var Dragger$1 = antd.Upload.Dragger;
@@ -22264,9 +23073,9 @@ var KmVideo = function KmVideo(_ref) {
22264
23073
  return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
22265
23074
  spinning: uploading
22266
23075
  }, /*#__PURE__*/React__default['default'].createElement("p", {
22267
- className: styles$6.tips
23076
+ className: styles$7.tips
22268
23077
  }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
22269
- className: styles$6.imageBox
23078
+ className: styles$7.imageBox
22270
23079
  }, /*#__PURE__*/React__default['default'].createElement(Dragger$1, _objectSpread2({
22271
23080
  disabled: disabled,
22272
23081
  multiple: true,
@@ -22292,9 +23101,9 @@ var KmVideo = function KmVideo(_ref) {
22292
23101
  }), file.kmVideoType && "".concat(file.kmVideoType));
22293
23102
  }
22294
23103
  }, resetProps), /*#__PURE__*/React__default['default'].createElement("span", {
22295
- className: styles$6.addBtn
23104
+ className: styles$7.addBtn
22296
23105
  }, "+"), /*#__PURE__*/React__default['default'].createElement("p", {
22297
- className: styles$6.addBtn
23106
+ className: styles$7.addBtn
22298
23107
  }, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
22299
23108
  visible: visible,
22300
23109
  title: fileName,
@@ -22329,15 +23138,15 @@ var KmVideo = function KmVideo(_ref) {
22329
23138
  }))));
22330
23139
  };
22331
23140
 
22332
- var singletonMap$7 = new Map();
23141
+ var singletonMap$8 = new Map();
22333
23142
  var getAllGoods = function getAllGoods(params, setLoading) {
22334
23143
  var id = params.tid || params.onBillNo || '';
22335
- if (!singletonMap$7.has(id)) {
23144
+ if (!singletonMap$8.has(id)) {
22336
23145
  setLoading && setLoading(true);
22337
23146
  var p = new Promise(function (resolve, reject) {
22338
23147
  var doReject = function doReject(err) {
22339
23148
  // 清空掉错误的请求记录
22340
- singletonMap$7.delete(id);
23149
+ singletonMap$8.delete(id);
22341
23150
  reject(err);
22342
23151
  };
22343
23152
  extendRequest('/qy/gdfw/order/skxOrderDetail', {
@@ -22359,7 +23168,7 @@ var getAllGoods = function getAllGoods(params, setLoading) {
22359
23168
  resolve(res.data);
22360
23169
  // 延迟10秒清除,保证订单的时效性
22361
23170
  setTimeout(function () {
22362
- singletonMap$7.delete(id);
23171
+ singletonMap$8.delete(id);
22363
23172
  }, 1000 * 10);
22364
23173
  } else {
22365
23174
  doReject(res);
@@ -22368,9 +23177,9 @@ var getAllGoods = function getAllGoods(params, setLoading) {
22368
23177
  setLoading && setLoading(false);
22369
23178
  });
22370
23179
  });
22371
- singletonMap$7.set(id, p);
23180
+ singletonMap$8.set(id, p);
22372
23181
  }
22373
- return singletonMap$7.get(id);
23182
+ return singletonMap$8.get(id);
22374
23183
  };
22375
23184
  var skxUtils = {
22376
23185
  getAllGoods: getAllGoods
@@ -22704,16 +23513,16 @@ exports.ApaasSelect = ApaasSelect;
22704
23513
  exports.ApaasSlider = ApaasSlider;
22705
23514
  exports.ApaasTextArea = ApaasTextArea;
22706
23515
  exports.ApaasUpload = ApaasUpload;
22707
- exports.ApaasUploadAsync = index;
23516
+ exports.ApaasUploadAsync = ApaasUploadAsync$1;
22708
23517
  exports.ApaasUploadFile = ApaasUploadFile;
22709
- exports.ApaasUploadProAsync = index$1;
23518
+ exports.ApaasUploadProAsync = index;
22710
23519
  exports.AsyncSelect = AsyncSelect;
22711
23520
  exports.BsE3Reissue = bsE3Reissue;
22712
23521
  exports.BsExchange = BsExchange;
22713
23522
  exports.BsGoods = BsGoods;
22714
23523
  exports.BsReissue = BsReissue;
22715
23524
  exports.BsReturn = BsReturnGoods;
22716
- exports.BsSystemOrder = index$3;
23525
+ exports.BsSystemOrder = index$2;
22717
23526
  exports.BuyerNick = BuyerNick;
22718
23527
  exports.CalculationInput = CalculationInput;
22719
23528
  exports.ChooseBaby = ChooseBaby;
@@ -22726,7 +23535,7 @@ exports.CommonSystemOrder = CommonSystemOrder;
22726
23535
  exports.CopyTextIcon = CopyTextIcon;
22727
23536
  exports.ExpressLogistics = ExpressLogistics;
22728
23537
  exports.Goods = Goods;
22729
- exports.GoodsTable = index$4;
23538
+ exports.GoodsTable = index$3;
22730
23539
  exports.GyReissue = GyReissue;
22731
23540
  exports.GyReturn = GyReturnGoods;
22732
23541
  exports.IdentifyAddress = IdentifyAddress;
@@ -22739,6 +23548,8 @@ exports.LogisticsMoreInterception = LogisticsMoreInterception;
22739
23548
  exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
22740
23549
  exports.LogisticsTrajectory = LogisticsTrajectory;
22741
23550
  exports.MsgStatus = MsgStatus;
23551
+ exports.OrderSubForm = OrderSubForm;
23552
+ exports.OrderSubFormUtils = utils;
22742
23553
  exports.ParseLogistics = ParseLogistics;
22743
23554
  exports.Payment = Payment;
22744
23555
  exports.PublicReissue = PublicReissue;
@@ -22759,11 +23570,12 @@ exports.WlnGoods = WlnGoods;
22759
23570
  exports.columnsBaseInfoMap = columnsBaseInfoMap;
22760
23571
  exports.erpColumnsMap = erpColumnsMap;
22761
23572
  exports.erpFormValidator = erpFormValidator;
22762
- exports.erpModalColumnsMap = index$2;
23573
+ exports.erpModalColumnsMap = index$1;
22763
23574
  exports.getGyColumns = getColumns$4;
22764
23575
  exports.getJstColumns = getColumns$5;
22765
23576
  exports.getKmColumns = getColumns$6;
22766
23577
  exports.getSkxColumns = getColumns$7;
22767
23578
  exports.getWdtColumns = getColumns$2;
22768
23579
  exports.getWlnColumns = getColumns$3;
23580
+ exports.orderSubFormConstants = orderSubFormConstants;
22769
23581
  exports.skxUtils = skxUtils;