@kmkf-fe-packages/basic-components 2.4.0-rc.0 → 2.7.0-rc.0

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