@kmkf-fe-packages/basic-components 2.0.0-rc.1 → 2.0.0-rc.11

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
@@ -933,13 +933,14 @@ var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap
933
933
  var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","deleteIcon":"index-module_deleteIcon__20Wzd","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
934
934
  styleInject(css_248z$1);
935
935
 
936
- var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
936
+ var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
937
937
  var fn$1 = function fn() {
938
938
  return void 0;
939
939
  };
940
940
  var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
941
+ var _document;
941
942
  var _ref$maxCount = _ref.maxCount,
942
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
943
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
943
944
  _ref$maxSize = _ref.maxSize,
944
945
  maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
945
946
  _ref$uploadText = _ref.uploadText,
@@ -958,6 +959,8 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
958
959
  hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
959
960
  _ref$actionUrl = _ref.actionUrl,
960
961
  actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
962
+ _ref$platform = _ref.platform,
963
+ platform = _ref$platform === void 0 ? '' : _ref$platform,
961
964
  resetProps = _objectWithoutProperties(_ref, _excluded$6);
962
965
  var inputRef = React.useRef(null);
963
966
  var valueRef = React.useRef(value);
@@ -965,18 +968,13 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
965
968
  _useState2 = _slicedToArray(_useState, 2),
966
969
  uploading = _useState2[0],
967
970
  setUploading = _useState2[1];
968
- var _useState3 = React.useState(false),
971
+ var _useState3 = React.useState(true),
969
972
  _useState4 = _slicedToArray(_useState3, 2),
970
- visible = _useState4[0],
971
- setVisible = _useState4[1];
972
- var _useState5 = React.useState(''),
973
- _useState6 = _slicedToArray(_useState5, 2),
974
- currentPreviewImg = _useState6[0],
975
- setCurrentPreviewImg = _useState6[1];
976
- var _useState7 = React.useState(true),
977
- _useState8 = _slicedToArray(_useState7, 2),
978
- pasteDefaultStates = _useState8[0],
979
- setPasteDefaultStates = _useState8[1];
973
+ pasteDefaultStates = _useState4[0],
974
+ setPasteDefaultStates = _useState4[1];
975
+ var preview = platform === 'ks' ? {
976
+ getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
977
+ } : true;
980
978
  React.useEffect(function () {
981
979
  valueRef.current = value;
982
980
  }, [value]);
@@ -1108,7 +1106,9 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1108
1106
  };
1109
1107
  };
1110
1108
  var renderImages = function renderImages(images) {
1111
- return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, images.map(function (image, index) {
1109
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, {
1110
+ preview: preview
1111
+ }, images.map(function (image, index) {
1112
1112
  var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
1113
1113
  var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
1114
1114
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -1184,21 +1184,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
1184
1184
  beforeUpload: beforeUpload
1185
1185
  }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("span", {
1186
1186
  className: "addBtn"
1187
- }, "+"), /*#__PURE__*/React__default['default'].createElement("div", null, uploadText))), /*#__PURE__*/React__default['default'].createElement(antd.Image, {
1188
- width: 0,
1189
- style: {
1190
- display: visible ? '' : 'none'
1191
- },
1192
- src: currentPreviewImg,
1193
- preview: {
1194
- visible: visible,
1195
- src: "".concat(currentPreviewImg),
1196
- onVisibleChange: function onVisibleChange(value) {
1197
- setCurrentPreviewImg('');
1198
- setVisible(value);
1199
- }
1200
- }
1201
- })));
1187
+ }, "+"), /*#__PURE__*/React__default['default'].createElement("div", null, uploadText)))));
1202
1188
  };
1203
1189
  var index = /*#__PURE__*/React.forwardRef(ApaasUploadAsync);
1204
1190
 
@@ -6889,7 +6875,7 @@ var fn$2 = function fn() {
6889
6875
  };
6890
6876
  var ApaasUploadFile = function ApaasUploadFile(_ref) {
6891
6877
  var _ref$maxCount = _ref.maxCount,
6892
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
6878
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
6893
6879
  _ref$maxSize = _ref.maxSize,
6894
6880
  maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
6895
6881
  _ref$onChange = _ref.onChange,
@@ -7495,7 +7481,12 @@ var IdentifyAddress = function IdentifyAddress(props) {
7495
7481
  workOrder: kmkfUtils.AddressData
7496
7482
  }[type] || kmkfUtils.AddressData).getInstance();
7497
7483
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7498
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7484
+ // params.address = [
7485
+ // addressData.getProCodeByName(val?.province),
7486
+ // addressData.getProCodeByName(val?.city),
7487
+ // addressData.getProCodeByName(val?.district),
7488
+ // ];
7489
+ params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
7499
7490
  }
7500
7491
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
7501
7492
  };
@@ -8136,7 +8127,12 @@ function ApaasAddress(props) {
8136
8127
  };
8137
8128
  var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
8138
8129
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
8139
- params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
8130
+ // params.address = [
8131
+ // addressData.getProCodeByName(val?.province),
8132
+ // addressData.getProCodeByName(val?.city),
8133
+ // addressData.getProCodeByName(val?.district),
8134
+ // ];
8135
+ params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
8140
8136
  }
8141
8137
  onChange === null || onChange === void 0 ? void 0 : onChange(params);
8142
8138
  };
@@ -9589,10 +9585,29 @@ var GoodItem = function GoodItem(props) {
9589
9585
  return _ref5.apply(this, arguments);
9590
9586
  };
9591
9587
  }();
9592
- var headerList = showHeader || {
9593
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9594
- ]
9595
- }[type] || [];
9588
+ var headerList = React.useMemo(function () {
9589
+ if (!Array.isArray(showHeader)) return ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9590
+ ];
9591
+
9592
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9593
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9594
+ var dataIndexList = [];
9595
+ if (isStringArray) {
9596
+ dataIndexList = showHeader;
9597
+ } else if (isObjectArray) {
9598
+ dataIndexList = showHeader.map(function (item) {
9599
+ return item.dataIndex;
9600
+ });
9601
+ }
9602
+ return isStringArray ? showHeader : isObjectArray ? showHeader.filter(function (item) {
9603
+ return item.show !== false;
9604
+ }).map(function (item) {
9605
+ return item.dataIndex;
9606
+ }) : [] || {
9607
+ 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9608
+ ]
9609
+ }[type] || [];
9610
+ }, [showHeader]);
9596
9611
  //修改参数
9597
9612
  var handleChangeValue = function handleChangeValue(key, index) {
9598
9613
  return function (e) {
@@ -9607,35 +9622,57 @@ var GoodItem = function GoodItem(props) {
9607
9622
  };
9608
9623
  };
9609
9624
  // TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
9610
- var goodItemAttrs = [{
9611
- isShow: headerList.includes('title'),
9612
- key: 'title',
9613
- label: '商品名称'
9614
- }, {
9615
- isShow: headerList.includes('outerId'),
9616
- key: 'outerId',
9617
- label: '商品编码'
9618
- },
9619
- // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9620
- {
9621
- isShow: headerList.includes('numIid'),
9622
- key: 'numIid',
9623
- label: '商品id'
9624
- }, {
9625
- isShow: changeSku && headerList.includes('skuId'),
9626
- key: 'skuId',
9627
- label: 'SKU ID'
9628
- }, {
9629
- isShow: changeSku && headerList.includes('outerSkuId'),
9630
- key: 'outerSkuId',
9631
- label: 'SKU 编码'
9632
- }, {
9633
- isShow: changeSku && headerList.includes('propertiesName'),
9634
- key: 'propertiesName',
9635
- label: 'SKU 信息'
9636
- }];
9637
- var hasPic = headerList.includes('picUrl');
9638
- var hasAttr = hasPic ? headerList.length > 1 : headerList.length > 0;
9625
+ var goodItemAttrs = React.useMemo(function () {
9626
+ var initList = [{
9627
+ isShow: headerList.includes('title'),
9628
+ key: 'title',
9629
+ label: '商品名称'
9630
+ }, {
9631
+ isShow: headerList.includes('outerId'),
9632
+ key: 'outerId',
9633
+ label: '商品编码'
9634
+ },
9635
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9636
+ {
9637
+ isShow: headerList.includes('numIid'),
9638
+ key: 'numIid',
9639
+ label: '商品id'
9640
+ }, {
9641
+ isShow: changeSku && headerList.includes('skuId'),
9642
+ key: 'skuId',
9643
+ label: 'SKU ID'
9644
+ }, {
9645
+ isShow: changeSku && headerList.includes('outerSkuId'),
9646
+ key: 'outerSkuId',
9647
+ label: 'SKU 编码'
9648
+ }, {
9649
+ isShow: changeSku && headerList.includes('propertiesName'),
9650
+ key: 'propertiesName',
9651
+ label: 'SKU 信息'
9652
+ }];
9653
+ if (!Array.isArray(showHeader)) return initList;
9654
+ var newList = [];
9655
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9656
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9657
+ (isStringArray ? showHeader : isObjectArray ? showHeader.map(function (item) {
9658
+ return item.dataIndex;
9659
+ }) : []).forEach(function (dataIndex) {
9660
+ if (initList.find(function (item) {
9661
+ return item.key === dataIndex;
9662
+ })) {
9663
+ newList.push(initList.find(function (item) {
9664
+ return item.key === dataIndex;
9665
+ }));
9666
+ }
9667
+ });
9668
+ return newList;
9669
+ }, [headerList, showHeader]);
9670
+ var hasPic = React.useMemo(function () {
9671
+ return headerList.includes('picUrl');
9672
+ }, [headerList]);
9673
+ var hasAttr = React.useMemo(function () {
9674
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9675
+ }, [hasPic, headerList]);
9639
9676
  return /*#__PURE__*/React__default['default'].createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React__default['default'].createElement("p", {
9640
9677
  className: "goods-title"
9641
9678
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React__default['default'].createElement("p", {
@@ -10981,13 +11018,19 @@ var jstGoods = function jstGoods(props) {
10981
11018
  _useState2 = _slicedToArray(_useState, 2),
10982
11019
  changeIndex = _useState2[0],
10983
11020
  setChangeIndex = _useState2[1]; //选中的包裹
10984
- var wdtSendOptions = kmkfUtils.WdtSendData.getInstance().wdtSendData || [];
11021
+ var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
11022
+ var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
10985
11023
  React.useEffect(function () {
10986
11024
  //没有值塞个默认值
10987
11025
  if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
10988
11026
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10989
11027
  }
10990
11028
  }, [value, type]);
11029
+ React.useEffect(function () {
11030
+ if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11031
+ setChangeIndex(0);
11032
+ }
11033
+ }, value);
10991
11034
  var content = function content(item, index) {
10992
11035
  return /*#__PURE__*/React__default['default'].createElement("div", {
10993
11036
  style: {
@@ -10998,7 +11041,7 @@ var jstGoods = function jstGoods(props) {
10998
11041
  style: {
10999
11042
  textAlign: 'center'
11000
11043
  }
11001
- }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11044
+ }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React__default['default'].createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11002
11045
  return /*#__PURE__*/React__default['default'].createElement("div", {
11003
11046
  key: index
11004
11047
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
@@ -11012,7 +11055,7 @@ var jstGoods = function jstGoods(props) {
11012
11055
  var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
11013
11056
  changeOrderInfo[type] = val;
11014
11057
  changeOrderInfo['sendId'] = option.value;
11015
- if (platformType === 'wdt' && type === 'sendName') {
11058
+ if (isSelectName && type === 'sendName') {
11016
11059
  changeOrderInfo['sendSnapshotName'] = option.label;
11017
11060
  }
11018
11061
  var newList = _toConsumableArray(value);
@@ -11095,7 +11138,7 @@ var jstGoods = function jstGoods(props) {
11095
11138
  return changeInputHandle(e.target.value, 'sendId');
11096
11139
  },
11097
11140
  value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
11098
- }), ['sendName', 'all'].includes(showField) && (platformType === 'wdt' ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
11141
+ }), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
11099
11142
  style: {
11100
11143
  minWidth: '100px',
11101
11144
  maxWidth: '180px'
@@ -11103,7 +11146,7 @@ var jstGoods = function jstGoods(props) {
11103
11146
  disabled: disabled,
11104
11147
  placeholder: "\u53D1\u8D27\u4ED3\u540D\u79F0",
11105
11148
  showSearch: true,
11106
- options: wdtSendOptions,
11149
+ options: sendOptions,
11107
11150
  filterOption: filterOption,
11108
11151
  value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
11109
11152
  onChange: function onChange(value, option) {
@@ -12095,9 +12138,9 @@ var getTableData$1 = function getTableData(_ref, formData) {
12095
12138
  var current = _ref.current,
12096
12139
  pageSize = _ref.pageSize;
12097
12140
  var data = {
12098
- goodsSn: formData.goodsSn || null,
12099
- goodsName: formData.goodsName || null,
12100
- sku: formData.sku || null,
12141
+ goodNo: formData.goodNo || null,
12142
+ goodName: formData.goodName || null,
12143
+ skuCode: formData.skuCode || null,
12101
12144
  skuId: formData.skuId || null
12102
12145
  };
12103
12146
  return extendRequest('/qy/gdfw/product/product/page', {
@@ -12105,7 +12148,7 @@ var getTableData$1 = function getTableData(_ref, formData) {
12105
12148
  data: _objectSpread2({
12106
12149
  pageSize: pageSize,
12107
12150
  pageNo: current,
12108
- platform: 'WDT_ERP'
12151
+ platform: 'BS_E3_ERP'
12109
12152
  }, data)
12110
12153
  }).then(function (res) {
12111
12154
  var _res$data = res.data,
@@ -12134,127 +12177,91 @@ var columns$2 = [{
12134
12177
  }
12135
12178
  }, index + 1);
12136
12179
  },
12137
- width: 100
12180
+ width: 80
12138
12181
  }, {
12139
- dataIndex: 'sku',
12182
+ dataIndex: 'specNo',
12140
12183
  title: "SKU",
12141
12184
  ellipsis: true,
12142
- width: 70
12185
+ width: 200
12143
12186
  }, {
12144
- dataIndex: 'skuId',
12187
+ dataIndex: 'specId',
12145
12188
  title: "SKU ID",
12146
12189
  ellipsis: true,
12147
- width: 70
12190
+ width: 80
12148
12191
  }, {
12149
- dataIndex: 'goodsName',
12192
+ dataIndex: 'goodName',
12150
12193
  title: "\u5546\u54C1\u540D\u79F0",
12151
12194
  ellipsis: true,
12152
- width: 70
12195
+ width: 250
12153
12196
  }, {
12154
- dataIndex: 'goodsShortName',
12197
+ dataIndex: 'goodShortName',
12155
12198
  title: "\u5546\u54C1\u7B80\u79F0",
12156
12199
  ellipsis: true,
12157
- width: 70
12158
- }, {
12159
- dataIndex: 'picPath',
12160
- title: "\u5546\u54C1\u56FE\u7247",
12161
- ellipsis: true,
12162
- width: 100,
12163
- render: function render(picUrl) {
12164
- return /*#__PURE__*/React__default['default'].createElement("img", {
12165
- style: {
12166
- width: '60px',
12167
- height: '60px',
12168
- objectFit: 'contain'
12169
- },
12170
- src: picUrl
12171
- });
12172
- }
12173
- }, {
12174
- dataIndex: 'goodsSn',
12200
+ width: 250
12201
+ },
12202
+ // {
12203
+ // dataIndex: 'goodPicUrl',
12204
+ // title: `商品图片`,
12205
+ // ellipsis: true,
12206
+ // width: 100,
12207
+ // render: (picUrl: string) => {
12208
+ // return (
12209
+ // <img
12210
+ // style={{
12211
+ // width: '40px',
12212
+ // height: '40px',
12213
+ // objectFit: 'contain',
12214
+ // }}
12215
+ // src={picUrl}
12216
+ // ></img>
12217
+ // );
12218
+ // },
12219
+ // },
12220
+ {
12221
+ dataIndex: 'goodNo',
12175
12222
  title: "\u8D27\u53F7",
12176
12223
  ellipsis: true,
12177
- width: 70
12224
+ width: 150
12178
12225
  }, {
12179
- dataIndex: 'goodsId',
12226
+ dataIndex: 'goodId',
12180
12227
  title: "\u8D27\u53F7ID",
12181
12228
  ellipsis: true,
12182
- width: 70
12229
+ width: 100
12183
12230
  }, {
12184
12231
  dataIndex: 'colorName',
12185
12232
  title: "\u989C\u8272\u540D\u79F0",
12186
12233
  ellipsis: true,
12187
- width: 70
12234
+ width: 100
12188
12235
  }, {
12189
12236
  dataIndex: 'colorCode',
12190
12237
  title: "\u989C\u8272\u4EE3\u7801",
12191
12238
  ellipsis: true,
12192
- width: 70
12239
+ width: 100
12193
12240
  }, {
12194
12241
  dataIndex: 'sizeName',
12195
12242
  title: "\u5C3A\u7801\u540D\u79F0",
12196
12243
  ellipsis: true,
12197
- width: 70
12244
+ width: 100
12198
12245
  }, {
12199
12246
  dataIndex: 'sizeCode',
12200
12247
  title: "\u5C3A\u7801\u4EE3\u7801",
12201
12248
  ellipsis: true,
12202
- width: 70
12249
+ width: 100
12203
12250
  }, {
12204
12251
  dataIndex: 'brandName',
12205
12252
  title: "\u54C1\u724C\u540D\u79F0",
12206
12253
  ellipsis: true,
12207
- width: 70
12208
- }, {
12209
- dataIndex: 'goodsNumber',
12210
- title: "\u5546\u54C1\u6570\u91CF",
12211
- ellipsis: true,
12212
- width: 70
12213
- }, {
12214
- dataIndex: 'goodsPrice',
12215
- title: "\u5546\u54C1\u5355\u4EF7",
12216
- ellipsis: true,
12217
- width: 70
12218
- }, {
12219
- dataIndex: 'shopPrice',
12220
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12221
- ellipsis: true,
12222
- width: 70
12223
- }, {
12224
- dataIndex: 'sharePrice',
12225
- title: "\u5206\u644A\u4EF7",
12226
- ellipsis: true,
12227
- width: 70
12228
- }, {
12229
- dataIndex: 'sharePayment',
12230
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12231
- ellipsis: true,
12232
- width: 70
12233
- }, {
12234
- dataIndex: 'payment',
12235
- title: "\u5B9E\u4ED8\u91D1\u989D",
12236
- ellipsis: true,
12237
- width: 70
12238
- }, {
12239
- dataIndex: 'tcSku',
12240
- title: "\u5957\u9910SKU",
12241
- ellipsis: true,
12242
- width: 70
12243
- }, {
12244
- dataIndex: 'tcGoodsNumber',
12245
- title: "\u5957\u9910\u5957\u6570",
12246
- ellipsis: true,
12247
- width: 70
12254
+ width: 100
12248
12255
  }, {
12249
- dataIndex: 'taoCanSingleSl',
12250
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12256
+ dataIndex: 'marketPrice',
12257
+ title: "\u5E02\u573A\u4EF7",
12251
12258
  ellipsis: true,
12252
- width: 70
12259
+ width: 100
12253
12260
  }, {
12254
- dataIndex: 'isGift',
12255
- title: "\u662F\u5426\u8D60\u54C1",
12261
+ dataIndex: 'retailPrice',
12262
+ title: "\u552E\u4EF7",
12256
12263
  ellipsis: true,
12257
- width: 70
12264
+ width: 100
12258
12265
  }];
12259
12266
  var GoodList$1 = function GoodList(props, ref) {
12260
12267
  var _useState = React.useState([]),
@@ -12288,7 +12295,7 @@ var GoodList$1 = function GoodList(props, ref) {
12288
12295
  layout: "inline",
12289
12296
  form: form
12290
12297
  }, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12291
- name: "goodsSn",
12298
+ name: "goodNo",
12292
12299
  style: {
12293
12300
  marginBottom: '12px'
12294
12301
  }
@@ -12299,7 +12306,7 @@ var GoodList$1 = function GoodList(props, ref) {
12299
12306
  width: 150
12300
12307
  }
12301
12308
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12302
- name: "goodsName",
12309
+ name: "goodName",
12303
12310
  style: {
12304
12311
  marginBottom: '12px'
12305
12312
  }
@@ -12310,7 +12317,7 @@ var GoodList$1 = function GoodList(props, ref) {
12310
12317
  width: 150
12311
12318
  }
12312
12319
  })), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
12313
- name: "sku",
12320
+ name: "skuCode",
12314
12321
  style: {
12315
12322
  marginBottom: '12px'
12316
12323
  }
@@ -12427,7 +12434,7 @@ var GoodList$1 = function GoodList(props, ref) {
12427
12434
  }
12428
12435
  }, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
12429
12436
  rowSelection: rowSelection,
12430
- rowKey: "goodsId",
12437
+ rowKey: "specNo",
12431
12438
  columns: columns$2,
12432
12439
  scroll: {
12433
12440
  x: '100%',
@@ -12487,81 +12494,1249 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12487
12494
  };
12488
12495
  var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
12489
12496
 
12490
- // interface GoodsItem {
12491
- // title: string;
12492
- // pic: string;
12493
- // platform: string;
12494
- // skuId: string;
12495
- // styleId: string;
12496
- // }
12497
- var GoodItem$1 = function GoodItem(props) {
12498
- var _ref;
12499
- var _props$value = props.value,
12500
- value = _props$value === void 0 ? [] : _props$value,
12501
- type = props.type,
12502
- onChange = props.onChange,
12503
- disabled = props.disabled,
12504
- _props$showHeader = props.showHeader,
12505
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12506
- width = props.width,
12507
- _props$shopList = props.shopList,
12508
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
12509
- _props$shopId = props.shopId,
12510
- shopId = _props$shopId === void 0 ? '' : _props$shopId,
12511
- _props$maxLength = props.maxLength,
12512
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12513
- _props$showChangeBtn = props.showChangeBtn,
12514
- showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12515
- _props$showModeBtn = props.showModeBtn,
12516
- showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
12517
- _props$isStrict = props.isStrict,
12518
- isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
12519
- _props$tableSelect = props.tableSelect,
12520
- tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12521
- _props$selectType = props.selectType,
12522
- selectType = _props$selectType === void 0 ? '' : _props$selectType,
12523
- _props$otherOperation = props.otherOperations,
12524
- otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12525
- _props$canUpdateNumbe = props.canUpdateNumber,
12526
- canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12527
- shopCode = props.shopCode,
12528
- _props$companyKey = props.companyKey,
12529
- companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12530
- onSelect = props.onSelect,
12531
- onDelete = props.onDelete,
12532
- onModeChange = props.onModeChange;
12533
- var refModal = React.useRef();
12534
- var handleDelete = function handleDelete(record, index) {
12535
- onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
12536
- var newList = _toConsumableArray(value).filter(function (item, i) {
12537
- return index !== i;
12538
- });
12539
- onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
12540
- };
12541
- var _useState = React.useState([]),
12542
- _useState2 = _slicedToArray(_useState, 2),
12543
- selectedRowKeys = _useState2[0],
12544
- setSelectedRowKeys = _useState2[1];
12545
- React.useEffect(function () {
12546
- setSelectedRowKeys([]);
12547
- }, [tableSelect, selectType]);
12548
- var updateHandle = function updateHandle(val, index, columnType) {
12549
- if (value === null || value === void 0 ? void 0 : value.length) {
12550
- value[index][columnType] = val;
12551
- if (type === 'WDT_RETURN_GOODS') {
12552
- if (['sharePrice', 'num'].includes(columnType)) {
12553
- var totalMoney = null;
12554
- if (columnType === 'num') {
12555
- totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
12556
- } else {
12557
- totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
12497
+ var getColumns = function getColumns(_ref) {
12498
+ var _ref$text = _ref.text,
12499
+ text = _ref$text === void 0 ? '' : _ref$text,
12500
+ disabled = _ref.disabled,
12501
+ updateHandle = _ref.updateHandle;
12502
+ return {
12503
+ //百胜E3补发商品
12504
+ BS_E3_REISSUE_GOODS: [{
12505
+ dataIndex: 'sku',
12506
+ title: "SKU",
12507
+ width: 150
12508
+ }, {
12509
+ dataIndex: 'skuId',
12510
+ title: "SKU ID",
12511
+ width: 150
12512
+ }, {
12513
+ dataIndex: 'goodsName',
12514
+ title: "\u5546\u54C1\u540D\u79F0",
12515
+ width: 150
12516
+ }, {
12517
+ dataIndex: 'goodsShortName',
12518
+ title: "\u5546\u54C1\u7B80\u79F0",
12519
+ width: 150
12520
+ }, {
12521
+ dataIndex: 'picPath',
12522
+ title: "\u5546\u54C1\u56FE\u7247",
12523
+ width: 150
12524
+ }, {
12525
+ dataIndex: 'goodsSn',
12526
+ title: "\u8D27\u53F7",
12527
+ width: 150
12528
+ }, {
12529
+ dataIndex: 'goodsId',
12530
+ title: "\u8D27\u53F7ID",
12531
+ width: 150
12532
+ }, {
12533
+ dataIndex: 'colorName',
12534
+ title: "\u989C\u8272\u540D\u79F0",
12535
+ width: 150
12536
+ }, {
12537
+ dataIndex: 'colorCode',
12538
+ title: "\u989C\u8272\u4EE3\u7801",
12539
+ width: 150
12540
+ }, {
12541
+ dataIndex: 'sizeName',
12542
+ title: "\u5C3A\u7801\u540D\u79F0",
12543
+ width: 150
12544
+ }, {
12545
+ dataIndex: 'sizeCode',
12546
+ title: "\u5C3A\u7801\u4EE3\u7801",
12547
+ width: 150
12548
+ }, {
12549
+ dataIndex: 'brandName',
12550
+ title: "\u54C1\u724C\u540D\u79F0",
12551
+ width: 150
12552
+ }, {
12553
+ dataIndex: 'goodsNumber',
12554
+ title: "\u5546\u54C1\u6570\u91CF",
12555
+ width: 150
12556
+ }, {
12557
+ dataIndex: 'goodsPrice',
12558
+ title: "\u5546\u54C1\u5355\u4EF7",
12559
+ width: 150
12560
+ }, {
12561
+ dataIndex: 'shopPrice',
12562
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12563
+ width: 150
12564
+ }, {
12565
+ dataIndex: 'isGift',
12566
+ title: "\u662F\u5426\u8D60\u54C1",
12567
+ width: 150,
12568
+ render: function render(val) {
12569
+ return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12570
+ }
12571
+ }],
12572
+ //百胜E3商品信息
12573
+ BS_E3_GOODS: [{
12574
+ dataIndex: 'sku',
12575
+ title: "SKU",
12576
+ align: 'center',
12577
+ ellipsis: true,
12578
+ width: 150
12579
+ }, {
12580
+ dataIndex: 'skuId',
12581
+ title: "SKU ID",
12582
+ align: 'center',
12583
+ ellipsis: true,
12584
+ width: 150
12585
+ }, {
12586
+ dataIndex: 'goodsName',
12587
+ title: "\u5546\u54C1\u540D\u79F0",
12588
+ align: 'center',
12589
+ ellipsis: true,
12590
+ width: 150
12591
+ }, {
12592
+ dataIndex: 'goodsShortName',
12593
+ title: "\u5546\u54C1\u7B80\u79F0",
12594
+ align: 'center',
12595
+ ellipsis: true,
12596
+ width: 100
12597
+ }, {
12598
+ dataIndex: 'picPath',
12599
+ title: "\u5546\u54C1\u56FE\u7247",
12600
+ align: 'center',
12601
+ ellipsis: true,
12602
+ width: 100,
12603
+ render: function render(val) {
12604
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12605
+ width: 60,
12606
+ src: val
12607
+ });
12608
+ }
12609
+ }, {
12610
+ dataIndex: 'goodsSn',
12611
+ title: "\u8D27\u53F7",
12612
+ align: 'center',
12613
+ ellipsis: true,
12614
+ width: 150
12615
+ }, {
12616
+ dataIndex: 'goodsId',
12617
+ title: "\u8D27\u53F7ID",
12618
+ align: 'center',
12619
+ ellipsis: true,
12620
+ width: 150
12621
+ }, {
12622
+ dataIndex: 'colorName',
12623
+ title: "\u989C\u8272\u540D\u79F0",
12624
+ align: 'center',
12625
+ ellipsis: true,
12626
+ width: 100
12627
+ }, {
12628
+ dataIndex: 'colorCode',
12629
+ title: "\u989C\u8272\u4EE3\u7801",
12630
+ align: 'center',
12631
+ ellipsis: true,
12632
+ width: 150
12633
+ }, {
12634
+ dataIndex: 'sizeName',
12635
+ title: "\u5C3A\u7801\u540D\u79F0",
12636
+ align: 'center',
12637
+ ellipsis: true,
12638
+ width: 100
12639
+ }, {
12640
+ dataIndex: 'sizeCode',
12641
+ title: "\u5C3A\u7801\u4EE3\u7801",
12642
+ align: 'center',
12643
+ ellipsis: true,
12644
+ width: 100
12645
+ }, {
12646
+ dataIndex: 'brandName',
12647
+ title: "\u54C1\u724C\u540D\u79F0",
12648
+ align: 'center',
12649
+ ellipsis: true,
12650
+ width: 150
12651
+ }, {
12652
+ dataIndex: 'goodsNumber',
12653
+ title: "\u5546\u54C1\u6570\u91CF",
12654
+ align: 'center',
12655
+ ellipsis: true,
12656
+ width: 100,
12657
+ render: function render(val, record, index) {
12658
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12659
+ style: {
12660
+ width: 70
12661
+ },
12662
+ value: val,
12663
+ min: 1,
12664
+ precision: 0,
12665
+ onChange: function onChange(num) {
12666
+ return updateHandle(num, index, 'goodsNumber');
12558
12667
  }
12559
- if (totalMoney !== null) {
12560
- value[index]['returnPrice'] = totalMoney.toString();
12668
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12669
+ }
12670
+ }, {
12671
+ dataIndex: 'goodsPrice',
12672
+ title: "\u5546\u54C1\u5355\u4EF7",
12673
+ align: 'center',
12674
+ ellipsis: true,
12675
+ width: 120,
12676
+ render: function render(val, record, index) {
12677
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12678
+ style: {
12679
+ width: 70
12680
+ },
12681
+ value: val,
12682
+ min: 0,
12683
+ precision: 2,
12684
+ onChange: function onChange(num) {
12685
+ return updateHandle(num, index, 'goodsPrice');
12561
12686
  }
12562
- }
12563
- } else if (type === 'WDT_EXCHANGE_GOODS') {
12564
- if (['price', 'num'].includes(columnType)) {
12687
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12688
+ }
12689
+ }, {
12690
+ dataIndex: 'shopPrice',
12691
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12692
+ align: 'center',
12693
+ ellipsis: true,
12694
+ width: 120
12695
+ }, {
12696
+ dataIndex: 'sharePrice',
12697
+ title: "\u5206\u644A\u4EF7",
12698
+ align: 'center',
12699
+ ellipsis: true,
12700
+ width: 120
12701
+ }, {
12702
+ dataIndex: 'sharePayment',
12703
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12704
+ align: 'center',
12705
+ ellipsis: true,
12706
+ width: 120
12707
+ }, {
12708
+ dataIndex: 'payment',
12709
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12710
+ align: 'center',
12711
+ ellipsis: true,
12712
+ width: 120,
12713
+ render: function render(val, record, index) {
12714
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12715
+ style: {
12716
+ width: 70
12717
+ },
12718
+ value: val,
12719
+ min: 0,
12720
+ precision: 2,
12721
+ onChange: function onChange(num) {
12722
+ return updateHandle(num, index, 'payment');
12723
+ }
12724
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12725
+ }
12726
+ }, {
12727
+ dataIndex: 'tcSku',
12728
+ title: "\u5957\u9910SKU",
12729
+ align: 'center',
12730
+ ellipsis: true,
12731
+ width: 150
12732
+ }, {
12733
+ dataIndex: 'tcGoodsNumber',
12734
+ title: "\u5957\u9910\u5957\u6570",
12735
+ align: 'center',
12736
+ ellipsis: true,
12737
+ width: 100
12738
+ }, {
12739
+ dataIndex: 'taoCanSingleSl',
12740
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12741
+ align: 'center',
12742
+ ellipsis: true,
12743
+ width: 100
12744
+ }, {
12745
+ dataIndex: 'isGift',
12746
+ title: "\u662F\u5426\u8D60\u54C1",
12747
+ align: 'center',
12748
+ ellipsis: true,
12749
+ width: 100,
12750
+ render: function render(val) {
12751
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12752
+ }
12753
+ }],
12754
+ BS_GOODS: [{
12755
+ dataIndex: 'mark',
12756
+ title: "\u5546\u54C1\u6807\u8BB0",
12757
+ align: 'center',
12758
+ ellipsis: true,
12759
+ width: 70,
12760
+ render: function render(val, record, index) {
12761
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12762
+ options: [{
12763
+ label: '是',
12764
+ value: '是'
12765
+ }, {
12766
+ label: '否',
12767
+ value: '否'
12768
+ }],
12769
+ disabled: disabled,
12770
+ value: val,
12771
+ onChange: function onChange(val) {
12772
+ return updateHandle(val, index, 'mark');
12773
+ }
12774
+ });
12775
+ }
12776
+ }, {
12777
+ dataIndex: 'skuName',
12778
+ title: "".concat(text, "sku\u540D\u79F0"),
12779
+ align: 'center',
12780
+ ellipsis: true,
12781
+ width: 250
12782
+ }, {
12783
+ dataIndex: 'sku',
12784
+ title: "".concat(text, "sku\u7F16\u7801"),
12785
+ align: 'center',
12786
+ ellipsis: true,
12787
+ width: 100
12788
+ }, {
12789
+ dataIndex: 'name',
12790
+ title: "".concat(text, "\u540D\u79F0"),
12791
+ align: 'center',
12792
+ ellipsis: true,
12793
+ width: 250
12794
+ }, {
12795
+ dataIndex: 'pic',
12796
+ title: "\u56FE\u7247",
12797
+ align: 'center',
12798
+ ellipsis: true,
12799
+ width: 100,
12800
+ render: function render(val) {
12801
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12802
+ width: 60,
12803
+ src: val
12804
+ });
12805
+ }
12806
+ }, {
12807
+ dataIndex: 'code',
12808
+ title: "".concat(text, "\u7F16\u7801"),
12809
+ align: 'center',
12810
+ ellipsis: true,
12811
+ width: 100
12812
+ }, {
12813
+ dataIndex: 'money',
12814
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12815
+ align: 'center',
12816
+ ellipsis: true,
12817
+ width: 100
12818
+ }, {
12819
+ dataIndex: 'number',
12820
+ title: "".concat(text, "\u6570\u91CF"),
12821
+ align: 'center',
12822
+ ellipsis: true,
12823
+ width: 100,
12824
+ render: function render(val, record, index) {
12825
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12826
+ style: {
12827
+ width: 70
12828
+ },
12829
+ value: val,
12830
+ min: 1,
12831
+ precision: 0,
12832
+ onChange: function onChange(num) {
12833
+ return updateHandle(num, index, 'number');
12834
+ }
12835
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12836
+ }
12837
+ }, {
12838
+ dataIndex: 'share',
12839
+ title: "\u5206\u644A\u4EF7",
12840
+ align: 'center',
12841
+ ellipsis: true,
12842
+ width: 70
12843
+ }, {
12844
+ dataIndex: 'type',
12845
+ title: "\u8D60\u54C1\u7C7B\u578B",
12846
+ align: 'center',
12847
+ ellipsis: true,
12848
+ width: 100
12849
+ }, {
12850
+ dataIndex: 'batch',
12851
+ title: "\u6279\u6B21\u53F7",
12852
+ align: 'center',
12853
+ ellipsis: true,
12854
+ width: 100
12855
+ }, {
12856
+ dataIndex: 'expireDate',
12857
+ title: "\u6709\u6548\u671F",
12858
+ align: 'center',
12859
+ ellipsis: true,
12860
+ width: 100
12861
+ }]
12862
+ };
12863
+ };
12864
+
12865
+ var renderGiftType = function renderGiftType(val) {
12866
+ var giftTypeMap = {
12867
+ 0: '非赠品',
12868
+ 1: '自动赠送',
12869
+ 2: '手工赠送',
12870
+ 3: '回购自动送赠品',
12871
+ 4: '前N有礼送赠品',
12872
+ 6: '天猫优仓赠品',
12873
+ 7: '淘宝CRM会员送赠'
12874
+ };
12875
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12876
+ };
12877
+ var renderFieldMap = {
12878
+ num: function num(_ref) {
12879
+ var disabled = _ref.disabled,
12880
+ updateHandle = _ref.updateHandle;
12881
+ return function (val, record, index) {
12882
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12883
+ style: {
12884
+ width: 70
12885
+ },
12886
+ value: val,
12887
+ min: 1,
12888
+ precision: 0,
12889
+ onChange: function onChange(num) {
12890
+ return updateHandle(num, index, 'num');
12891
+ }
12892
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12893
+ };
12894
+ },
12895
+ giftType: function giftType() {
12896
+ return renderGiftType;
12897
+ }
12898
+ };
12899
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12900
+ var disabled = _ref2.disabled,
12901
+ updateHandle = _ref2.updateHandle,
12902
+ operate = _ref2.operate;
12903
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12904
+ var newItem = _objectSpread2({
12905
+ align: 'center',
12906
+ ellipsis: true
12907
+ }, item);
12908
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12909
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12910
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12911
+ disabled: disabled,
12912
+ updateHandle: updateHandle
12913
+ })
12914
+ });
12915
+ }
12916
+ return newItem;
12917
+ });
12918
+ };
12919
+
12920
+ var getColumns$1 = function getColumns(_ref) {
12921
+ var _ref$text = _ref.text,
12922
+ text = _ref$text === void 0 ? '' : _ref$text,
12923
+ disabled = _ref.disabled,
12924
+ updateHandle = _ref.updateHandle;
12925
+ return {
12926
+ //旺店通补发商品信息
12927
+ WDT_REISSUE_GOODS: [{
12928
+ dataIndex: 'goodId',
12929
+ title: "\u5546\u54C1ID",
12930
+ width: 120
12931
+ }, {
12932
+ dataIndex: 'goodNo',
12933
+ title: "\u5546\u54C1\u7F16\u7801",
12934
+ width: 200
12935
+ }, {
12936
+ dataIndex: 'goodName',
12937
+ title: "\u5546\u54C1\u540D\u79F0",
12938
+ width: 200
12939
+ }, {
12940
+ dataIndex: 'specId',
12941
+ title: "SKUID",
12942
+ width: 150
12943
+ }, {
12944
+ dataIndex: 'specNo',
12945
+ title: "\u5546\u54C1SKU\u7F16\u7801",
12946
+ width: 200
12947
+ }, {
12948
+ dataIndex: 'specName',
12949
+ title: "\u5546\u54C1SKU\u540D\u79F0",
12950
+ width: 250
12951
+ }, {
12952
+ dataIndex: 'orderPrice',
12953
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12954
+ width: 200
12955
+ }, {
12956
+ dataIndex: 'num',
12957
+ title: "\u6570\u91CF",
12958
+ width: 100
12959
+ }, {
12960
+ dataIndex: 'sharePrice',
12961
+ title: "\u5206\u644A\u4EF7",
12962
+ width: 150
12963
+ }, {
12964
+ dataIndex: 'giftType',
12965
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12966
+ width: 100,
12967
+ render: renderGiftType
12968
+ }],
12969
+ //旺店通商品信息
12970
+ WDT_GOODS: [{
12971
+ dataIndex: 'goodId',
12972
+ title: "\u5546\u54C1ID",
12973
+ align: 'center',
12974
+ ellipsis: true,
12975
+ width: 70
12976
+ }, {
12977
+ dataIndex: 'goodNo',
12978
+ title: "\u5546\u54C1\u7F16\u7801",
12979
+ align: 'center',
12980
+ ellipsis: true,
12981
+ width: 180
12982
+ }, {
12983
+ dataIndex: 'goodName',
12984
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12985
+ align: 'center',
12986
+ ellipsis: true,
12987
+ width: 250
12988
+ }, {
12989
+ dataIndex: 'specId',
12990
+ title: "".concat(text, "SKUID"),
12991
+ align: 'center',
12992
+ ellipsis: true,
12993
+ width: 100
12994
+ }, {
12995
+ dataIndex: 'specNo',
12996
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12997
+ align: 'center',
12998
+ ellipsis: true,
12999
+ width: 180
13000
+ }, {
13001
+ dataIndex: 'specName',
13002
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13003
+ align: 'center',
13004
+ ellipsis: true,
13005
+ width: 250
13006
+ }, {
13007
+ dataIndex: 'orderPrice',
13008
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
13009
+ align: 'center',
13010
+ ellipsis: true,
13011
+ width: 100
13012
+ }, {
13013
+ dataIndex: 'num',
13014
+ title: "".concat(text, "\u6570\u91CF"),
13015
+ align: 'center',
13016
+ ellipsis: true,
13017
+ width: 100,
13018
+ render: function render(val, record, index) {
13019
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13020
+ style: {
13021
+ width: 70
13022
+ },
13023
+ value: val,
13024
+ min: 1,
13025
+ precision: 0,
13026
+ onChange: function onChange(num) {
13027
+ return updateHandle(num, index, 'num');
13028
+ }
13029
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13030
+ }
13031
+ }, {
13032
+ dataIndex: 'sharePrice',
13033
+ title: "\u5206\u644A\u4EF7",
13034
+ align: 'center',
13035
+ ellipsis: true,
13036
+ width: 70
13037
+ }, {
13038
+ dataIndex: 'giftType',
13039
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13040
+ align: 'center',
13041
+ ellipsis: true,
13042
+ width: 100,
13043
+ render: function render(val) {
13044
+ var giftTypeMap = {
13045
+ 0: '非赠品',
13046
+ 1: '自动赠送',
13047
+ 2: '手工赠送',
13048
+ 3: '回购自动送赠品',
13049
+ 4: '前N有礼送赠品',
13050
+ 6: '天猫优仓赠品',
13051
+ 7: '淘宝CRM会员送赠'
13052
+ };
13053
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13054
+ }
13055
+ }],
13056
+ //旺店通退货商品信息
13057
+ WDT_RETURN_GOODS: [{
13058
+ dataIndex: 'goodId',
13059
+ title: "\u5546\u54C1ID",
13060
+ align: 'center',
13061
+ ellipsis: true,
13062
+ width: 70
13063
+ }, {
13064
+ dataIndex: 'goodNo',
13065
+ title: "\u5546\u54C1\u7F16\u7801",
13066
+ align: 'center',
13067
+ ellipsis: true,
13068
+ width: 180
13069
+ }, {
13070
+ dataIndex: 'goodName',
13071
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13072
+ align: 'center',
13073
+ ellipsis: true,
13074
+ width: 250
13075
+ }, {
13076
+ dataIndex: 'specId',
13077
+ title: "".concat(text, "SKUID"),
13078
+ align: 'center',
13079
+ ellipsis: true,
13080
+ width: 100
13081
+ }, {
13082
+ dataIndex: 'specNo',
13083
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13084
+ align: 'center',
13085
+ ellipsis: true,
13086
+ width: 180
13087
+ }, {
13088
+ dataIndex: 'specName',
13089
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13090
+ align: 'center',
13091
+ ellipsis: true,
13092
+ width: 250
13093
+ }, {
13094
+ dataIndex: 'num',
13095
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13096
+ align: 'center',
13097
+ ellipsis: true,
13098
+ width: 100,
13099
+ render: function render(val, record, index) {
13100
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13101
+ style: {
13102
+ width: 70
13103
+ },
13104
+ value: val,
13105
+ min: 1,
13106
+ precision: 0,
13107
+ onChange: function onChange(num) {
13108
+ return updateHandle(num, index, 'num');
13109
+ }
13110
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13111
+ }
13112
+ }, {
13113
+ dataIndex: 'sharePrice',
13114
+ title: "\u5206\u644A\u4EF7",
13115
+ align: 'center',
13116
+ ellipsis: true,
13117
+ width: 80,
13118
+ render: function render(val, record, index) {
13119
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13120
+ style: {
13121
+ width: 70
13122
+ },
13123
+ value: val,
13124
+ min: 0,
13125
+ onChange: function onChange(value) {
13126
+ return updateHandle(value, index, 'sharePrice');
13127
+ }
13128
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13129
+ }
13130
+ }, {
13131
+ dataIndex: 'returnPrice',
13132
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13133
+ align: 'center',
13134
+ ellipsis: true,
13135
+ width: 100
13136
+ }, {
13137
+ dataIndex: 'giftType',
13138
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13139
+ align: 'center',
13140
+ ellipsis: true,
13141
+ width: 100,
13142
+ render: function render(val) {
13143
+ var giftTypeMap = {
13144
+ 0: '非赠品',
13145
+ 1: '自动赠送',
13146
+ 2: '手工赠送',
13147
+ 3: '回购自动送赠品',
13148
+ 4: '前N有礼送赠品',
13149
+ 6: '天猫优仓赠品',
13150
+ 7: '淘宝CRM会员送赠'
13151
+ };
13152
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13153
+ }
13154
+ }, {
13155
+ dataIndex: 'type',
13156
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13157
+ align: 'center',
13158
+ ellipsis: true,
13159
+ width: 100,
13160
+ render: function render(val, record, index) {
13161
+ var options = [{
13162
+ label: '单品',
13163
+ value: '1'
13164
+ }, {
13165
+ label: '组合装',
13166
+ value: '2'
13167
+ }];
13168
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13169
+ style: {
13170
+ width: 70
13171
+ },
13172
+ options: options,
13173
+ value: val,
13174
+ onChange: function onChange(value) {
13175
+ return updateHandle(value, index, 'type');
13176
+ }
13177
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13178
+ }
13179
+ }],
13180
+ //旺店通换出商品信息
13181
+ WDT_EXCHANGE_GOODS: [{
13182
+ dataIndex: 'goodId',
13183
+ title: "\u5546\u54C1ID",
13184
+ align: 'center',
13185
+ ellipsis: true,
13186
+ width: 70
13187
+ }, {
13188
+ dataIndex: 'goodNo',
13189
+ title: "\u5546\u54C1\u7F16\u7801",
13190
+ align: 'center',
13191
+ ellipsis: true,
13192
+ width: 180
13193
+ }, {
13194
+ dataIndex: 'goodName',
13195
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13196
+ align: 'center',
13197
+ ellipsis: true,
13198
+ width: 250
13199
+ }, {
13200
+ dataIndex: 'specId',
13201
+ title: "".concat(text, "SKUID"),
13202
+ align: 'center',
13203
+ ellipsis: true,
13204
+ width: 100
13205
+ }, {
13206
+ dataIndex: 'specNo',
13207
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13208
+ align: 'center',
13209
+ ellipsis: true,
13210
+ width: 180
13211
+ }, {
13212
+ dataIndex: 'specName',
13213
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13214
+ align: 'center',
13215
+ ellipsis: true,
13216
+ width: 250
13217
+ }, {
13218
+ dataIndex: 'num',
13219
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13220
+ align: 'center',
13221
+ ellipsis: true,
13222
+ width: 100,
13223
+ render: function render(val, record, index) {
13224
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13225
+ style: {
13226
+ width: 70
13227
+ },
13228
+ value: val,
13229
+ min: 1,
13230
+ precision: 0,
13231
+ onChange: function onChange(num) {
13232
+ return updateHandle(num, index, 'num');
13233
+ }
13234
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13235
+ }
13236
+ }, {
13237
+ dataIndex: 'price',
13238
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13239
+ align: 'center',
13240
+ ellipsis: true,
13241
+ width: 100,
13242
+ render: function render(val, record, index) {
13243
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13244
+ style: {
13245
+ width: 70
13246
+ },
13247
+ value: val,
13248
+ min: 0,
13249
+ onChange: function onChange(value) {
13250
+ return updateHandle(value, index, 'price');
13251
+ }
13252
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13253
+ }
13254
+ }, {
13255
+ dataIndex: 'exchangePrice',
13256
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13257
+ align: 'center',
13258
+ ellipsis: true,
13259
+ width: 100
13260
+ }, {
13261
+ dataIndex: 'giftType',
13262
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13263
+ align: 'center',
13264
+ ellipsis: true,
13265
+ width: 100,
13266
+ render: function render(val) {
13267
+ var giftTypeMap = {
13268
+ 0: '非赠品',
13269
+ 1: '自动赠送',
13270
+ 2: '手工赠送',
13271
+ 3: '回购自动送赠品',
13272
+ 4: '前N有礼送赠品',
13273
+ 6: '天猫优仓赠品',
13274
+ 7: '淘宝CRM会员送赠'
13275
+ };
13276
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13277
+ }
13278
+ }, {
13279
+ dataIndex: 'type',
13280
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13281
+ align: 'center',
13282
+ ellipsis: true,
13283
+ width: 100,
13284
+ render: function render(val, record, index) {
13285
+ var options = [{
13286
+ label: '单品',
13287
+ value: '1'
13288
+ }, {
13289
+ label: '组合装',
13290
+ value: '2'
13291
+ }];
13292
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13293
+ style: {
13294
+ width: 70
13295
+ },
13296
+ options: options,
13297
+ value: val,
13298
+ onChange: function onChange(value) {
13299
+ return updateHandle(value, index, 'type');
13300
+ }
13301
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13302
+ }
13303
+ }]
13304
+ };
13305
+ };
13306
+
13307
+ var getColumns$2 = function getColumns(_ref) {
13308
+ var _ref$text = _ref.text,
13309
+ text = _ref$text === void 0 ? '' : _ref$text,
13310
+ disabled = _ref.disabled,
13311
+ updateHandle = _ref.updateHandle;
13312
+ return {
13313
+ //万里牛商品信息
13314
+ WLN_GOODS: [{
13315
+ dataIndex: 'skuName',
13316
+ title: "".concat(text, "sku\u540D\u79F0"),
13317
+ align: 'center',
13318
+ ellipsis: true,
13319
+ width: 250
13320
+ }, {
13321
+ dataIndex: 'sku',
13322
+ title: "".concat(text, "sku\u7F16\u7801"),
13323
+ align: 'center',
13324
+ ellipsis: true,
13325
+ width: 100
13326
+ }, {
13327
+ dataIndex: 'name',
13328
+ title: "".concat(text, "\u540D\u79F0"),
13329
+ align: 'center',
13330
+ ellipsis: true,
13331
+ width: 250
13332
+ }, {
13333
+ dataIndex: 'pic',
13334
+ title: "\u56FE\u7247",
13335
+ align: 'center',
13336
+ ellipsis: true,
13337
+ width: 100,
13338
+ render: function render(val) {
13339
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13340
+ width: 60,
13341
+ src: val
13342
+ });
13343
+ }
13344
+ }, {
13345
+ dataIndex: 'code',
13346
+ title: "".concat(text, "\u7F16\u7801"),
13347
+ align: 'center',
13348
+ ellipsis: true,
13349
+ width: 100
13350
+ }, {
13351
+ dataIndex: 'money',
13352
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13353
+ align: 'center',
13354
+ ellipsis: true,
13355
+ width: 100
13356
+ }, {
13357
+ dataIndex: 'number',
13358
+ title: "".concat(text, "\u6570\u91CF"),
13359
+ align: 'center',
13360
+ ellipsis: true,
13361
+ width: 100,
13362
+ render: function render(val, record, index) {
13363
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13364
+ style: {
13365
+ width: 70
13366
+ },
13367
+ value: val,
13368
+ min: 1,
13369
+ precision: 0,
13370
+ onChange: function onChange(num) {
13371
+ return updateHandle(num, index, 'number');
13372
+ }
13373
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13374
+ }
13375
+ }, {
13376
+ dataIndex: 'share',
13377
+ title: "\u5206\u644A\u4EF7",
13378
+ align: 'center',
13379
+ ellipsis: true,
13380
+ width: 70
13381
+ }, {
13382
+ dataIndex: 'type',
13383
+ title: "\u8D60\u54C1\u7C7B\u578B",
13384
+ align: 'center',
13385
+ ellipsis: true,
13386
+ width: 100
13387
+ }]
13388
+ };
13389
+ };
13390
+
13391
+ var getColumnsMap = function getColumnsMap(args) {
13392
+ var _ref = args || {},
13393
+ _ref$text = _ref.text,
13394
+ text = _ref$text === void 0 ? '' : _ref$text,
13395
+ disabled = _ref.disabled,
13396
+ updateHandle = _ref.updateHandle;
13397
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13398
+ text: text,
13399
+ disabled: disabled,
13400
+ updateHandle: updateHandle
13401
+ })), getColumns$1({
13402
+ text: text,
13403
+ disabled: disabled,
13404
+ updateHandle: updateHandle
13405
+ })), getColumns$2({
13406
+ text: text,
13407
+ disabled: disabled,
13408
+ updateHandle: updateHandle
13409
+ })), {}, {
13410
+ default: [{
13411
+ dataIndex: 'mark',
13412
+ title: "\u5546\u54C1\u6807\u8BB0",
13413
+ align: 'center',
13414
+ ellipsis: true,
13415
+ width: 70,
13416
+ render: function render(val, record, index) {
13417
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13418
+ options: [{
13419
+ label: '是',
13420
+ value: '是'
13421
+ }, {
13422
+ label: '否',
13423
+ value: '否'
13424
+ }],
13425
+ disabled: disabled,
13426
+ value: val,
13427
+ onChange: function onChange(val) {
13428
+ return updateHandle(val, index, 'mark');
13429
+ }
13430
+ });
13431
+ }
13432
+ }, {
13433
+ dataIndex: 'skuName',
13434
+ title: "".concat(text, "sku\u540D\u79F0"),
13435
+ align: 'center',
13436
+ ellipsis: true,
13437
+ width: 250
13438
+ }, {
13439
+ dataIndex: 'sku',
13440
+ title: "".concat(text, "sku\u7F16\u7801"),
13441
+ align: 'center',
13442
+ ellipsis: true,
13443
+ width: 100
13444
+ }, {
13445
+ dataIndex: 'name',
13446
+ title: "".concat(text, "\u540D\u79F0"),
13447
+ align: 'center',
13448
+ ellipsis: true,
13449
+ width: 250
13450
+ }, {
13451
+ dataIndex: 'pic',
13452
+ title: "\u56FE\u7247",
13453
+ align: 'center',
13454
+ ellipsis: true,
13455
+ width: 100,
13456
+ render: function render(val) {
13457
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13458
+ width: 60,
13459
+ src: val
13460
+ });
13461
+ }
13462
+ }, {
13463
+ dataIndex: 'code',
13464
+ title: "".concat(text, "\u7F16\u7801"),
13465
+ align: 'center',
13466
+ ellipsis: true,
13467
+ width: 100
13468
+ }, {
13469
+ dataIndex: 'money',
13470
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13471
+ align: 'center',
13472
+ ellipsis: true,
13473
+ width: 100
13474
+ }, {
13475
+ dataIndex: 'number',
13476
+ title: "".concat(text, "\u6570\u91CF"),
13477
+ align: 'center',
13478
+ ellipsis: true,
13479
+ width: 100,
13480
+ render: function render(val, record, index) {
13481
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13482
+ style: {
13483
+ width: 70
13484
+ },
13485
+ value: val,
13486
+ min: 1,
13487
+ precision: 0,
13488
+ onChange: function onChange(num) {
13489
+ return updateHandle(num, index, 'number');
13490
+ }
13491
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13492
+ }
13493
+ }, {
13494
+ dataIndex: 'share',
13495
+ title: "\u5206\u644A\u4EF7",
13496
+ align: 'center',
13497
+ ellipsis: true,
13498
+ width: 70
13499
+ }, {
13500
+ dataIndex: 'type',
13501
+ title: "\u8D60\u54C1\u7C7B\u578B",
13502
+ align: 'center',
13503
+ ellipsis: true,
13504
+ width: 100
13505
+ }]
13506
+ });
13507
+ };
13508
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13509
+ var clone_columnsMap = lodash.cloneDeep(getColumnsMap());
13510
+ var newColumns = {};
13511
+ Object.keys(clone_columnsMap).forEach(function (key) {
13512
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
13513
+ return {
13514
+ title: col.title,
13515
+ dataIndex: col.dataIndex
13516
+ };
13517
+ });
13518
+ });
13519
+ return newColumns;
13520
+ };
13521
+ var columnsBaseInfoMap = getColumnsBaseInfo();
13522
+
13523
+ var renderFieldMap$1 = {
13524
+ goodsNumber: function goodsNumber(_ref) {
13525
+ var disabled = _ref.disabled,
13526
+ updateHandle = _ref.updateHandle;
13527
+ return function (val, record, index) {
13528
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13529
+ style: {
13530
+ width: 70
13531
+ },
13532
+ value: val,
13533
+ min: 1,
13534
+ precision: 0,
13535
+ onChange: function onChange(num) {
13536
+ return updateHandle(num, index, 'goodsNumber');
13537
+ }
13538
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13539
+ };
13540
+ },
13541
+ goodsPrice: function goodsPrice(_ref2) {
13542
+ var disabled = _ref2.disabled,
13543
+ updateHandle = _ref2.updateHandle;
13544
+ return function (val, record, index) {
13545
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13546
+ style: {
13547
+ width: 70
13548
+ },
13549
+ value: val,
13550
+ min: 0,
13551
+ onChange: function onChange(value) {
13552
+ return updateHandle(value, index, 'goodsPrice');
13553
+ }
13554
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13555
+ };
13556
+ },
13557
+ isGift: function isGift(_ref3) {
13558
+ var disabled = _ref3.disabled,
13559
+ updateHandle = _ref3.updateHandle;
13560
+ return function (val, record, index) {
13561
+ var options = [{
13562
+ label: '是',
13563
+ value: 1
13564
+ }, {
13565
+ label: '否',
13566
+ value: 0
13567
+ }];
13568
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13569
+ style: {
13570
+ width: 70
13571
+ },
13572
+ options: options,
13573
+ value: val,
13574
+ onChange: function onChange(value) {
13575
+ return updateHandle(value, index, 'isGift');
13576
+ },
13577
+ getPopupContainer: function getPopupContainer() {
13578
+ return document.getElementById('bsE3ReissueGoods');
13579
+ }
13580
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
13581
+ };
13582
+ }
13583
+ };
13584
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13585
+ var disabled = _ref4.disabled,
13586
+ updateHandle = _ref4.updateHandle,
13587
+ operate = _ref4.operate;
13588
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
13589
+ var newItem = _objectSpread2({
13590
+ align: 'center',
13591
+ ellipsis: true
13592
+ }, item);
13593
+ if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
13594
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13595
+ render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
13596
+ disabled: disabled,
13597
+ updateHandle: updateHandle
13598
+ })
13599
+ });
13600
+ }
13601
+ return newItem;
13602
+ });
13603
+ };
13604
+
13605
+ var MAIN_FIELD = 'uuid';
13606
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
13607
+ var columns = _ref.columns,
13608
+ dataSource = _ref.dataSource,
13609
+ selectedRowKeys = _ref.selectedRowKeys,
13610
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
13611
+ var _useState = React.useState(false),
13612
+ _useState2 = _slicedToArray(_useState, 2),
13613
+ tradeGoodsVisible = _useState2[0],
13614
+ setTradeGoodsVisible = _useState2[1];
13615
+ var openModal = function openModal() {
13616
+ return setTradeGoodsVisible(true);
13617
+ };
13618
+ var closeModal = function closeModal() {
13619
+ return setTradeGoodsVisible(false);
13620
+ };
13621
+ var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13622
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13623
+ }), selectedRowKeys);
13624
+ var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13625
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13626
+ }));
13627
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
13628
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
13629
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
13630
+ };
13631
+ var rowSelection = {
13632
+ selectedRowKeys: selectedRowKeys,
13633
+ onChange: handleChangeSelectedKeys
13634
+ };
13635
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13636
+ type: "link",
13637
+ onClick: openModal
13638
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
13639
+ title: "\u8BA2\u5355\u5546\u54C1",
13640
+ visible: tradeGoodsVisible,
13641
+ footer: null,
13642
+ onCancel: closeModal
13643
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13644
+ rowKey: MAIN_FIELD,
13645
+ rowSelection: rowSelection,
13646
+ columns: columns,
13647
+ dataSource: dataSource,
13648
+ pagination: false,
13649
+ scroll: {
13650
+ x: 500,
13651
+ y: 500
13652
+ }
13653
+ }), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
13654
+ };
13655
+ var getButtonText = function getButtonText() {
13656
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13657
+ if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13658
+ return '选择百胜ERP商品';
13659
+ }
13660
+ if (['WDT_REISSUE_GOODS'].includes(type)) {
13661
+ return '选择旺店通商品';
13662
+ }
13663
+ return '选择商品';
13664
+ };
13665
+ var GoodItem$1 = function GoodItem(props) {
13666
+ var _props$value = props.value,
13667
+ value = _props$value === void 0 ? [] : _props$value,
13668
+ type = props.type,
13669
+ onChange = props.onChange,
13670
+ disabled = props.disabled,
13671
+ _props$showHeader = props.showHeader,
13672
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
13673
+ width = props.width,
13674
+ _props$shopList = props.shopList,
13675
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
13676
+ _props$shopId = props.shopId,
13677
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
13678
+ _props$maxLength = props.maxLength,
13679
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
13680
+ _props$showChangeBtn = props.showChangeBtn,
13681
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
13682
+ _props$showModeBtn = props.showModeBtn,
13683
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
13684
+ _props$isStrict = props.isStrict,
13685
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
13686
+ _props$tableSelect = props.tableSelect,
13687
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
13688
+ _props$selectType = props.selectType,
13689
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
13690
+ _props$otherOperation = props.otherOperations,
13691
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
13692
+ _props$canUpdateNumbe = props.canUpdateNumber,
13693
+ canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
13694
+ shopCode = props.shopCode,
13695
+ _props$companyKey = props.companyKey,
13696
+ companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
13697
+ onSelect = props.onSelect,
13698
+ onDelete = props.onDelete,
13699
+ onModeChange = props.onModeChange,
13700
+ tradeGoods = props.tradeGoods;
13701
+ var refModal = React.useRef();
13702
+ console.debug('表格数据', value);
13703
+ var handleDelete = function handleDelete(record, index) {
13704
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
13705
+ var newList = _toConsumableArray(value).filter(function (item, i) {
13706
+ return index !== i;
13707
+ });
13708
+ onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
13709
+ };
13710
+ var _useState3 = React.useState([]),
13711
+ _useState4 = _slicedToArray(_useState3, 2),
13712
+ selectedRowKeys = _useState4[0],
13713
+ setSelectedRowKeys = _useState4[1];
13714
+ React.useEffect(function () {
13715
+ setSelectedRowKeys([]);
13716
+ }, [tableSelect, selectType]);
13717
+ // TODO: 商品订单中以选中商品
13718
+ var selectedGoods = React.useMemo(function () {
13719
+ return value === null || value === void 0 ? void 0 : value.map(function (v) {
13720
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
13721
+ });
13722
+ }, [value]);
13723
+ var updateHandle = function updateHandle(val, index, columnType) {
13724
+ if (value === null || value === void 0 ? void 0 : value.length) {
13725
+ value[index][columnType] = val;
13726
+ if (type === 'WDT_RETURN_GOODS') {
13727
+ if (['sharePrice', 'num'].includes(columnType)) {
13728
+ var totalMoney = null;
13729
+ if (columnType === 'num') {
13730
+ totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
13731
+ } else {
13732
+ totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
13733
+ }
13734
+ if (totalMoney !== null) {
13735
+ value[index]['returnPrice'] = totalMoney.toString();
13736
+ }
13737
+ }
13738
+ } else if (type === 'WDT_EXCHANGE_GOODS') {
13739
+ if (['price', 'num'].includes(columnType)) {
12565
13740
  var _totalMoney = null;
12566
13741
  if (columnType === 'num') {
12567
13742
  _totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].price));
@@ -12578,600 +13753,48 @@ var GoodItem$1 = function GoodItem(props) {
12578
13753
  };
12579
13754
  var COLUMNS_MAP = function COLUMNS_MAP() {
12580
13755
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13756
+ var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12581
13757
  return function (type) {
12582
13758
  var columns = [];
12583
13759
  switch (type) {
12584
- case 'WDT_REISSUE_GOODS':
12585
13760
  case 'WDT_GOODS':
12586
- columns = [{
12587
- dataIndex: 'goodId',
12588
- title: "\u5546\u54C1ID",
12589
- align: 'center',
12590
- ellipsis: true,
12591
- width: 70
12592
- }, {
12593
- dataIndex: 'goodNo',
12594
- title: "\u5546\u54C1\u7F16\u7801",
12595
- align: 'center',
12596
- ellipsis: true,
12597
- width: 180
12598
- }, {
12599
- dataIndex: 'goodName',
12600
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12601
- align: 'center',
12602
- ellipsis: true,
12603
- width: 250
12604
- }, {
12605
- dataIndex: 'specId',
12606
- title: "".concat(text, "SKUID"),
12607
- align: 'center',
12608
- ellipsis: true,
12609
- width: 100
12610
- }, {
12611
- dataIndex: 'specNo',
12612
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12613
- align: 'center',
12614
- ellipsis: true,
12615
- width: 180
12616
- }, {
12617
- dataIndex: 'specName',
12618
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12619
- align: 'center',
12620
- ellipsis: true,
12621
- width: 250
12622
- }, {
12623
- dataIndex: 'orderPrice',
12624
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12625
- align: 'center',
12626
- ellipsis: true,
12627
- width: 100
12628
- }, {
12629
- dataIndex: 'num',
12630
- title: "".concat(text, "\u6570\u91CF"),
12631
- align: 'center',
12632
- ellipsis: true,
12633
- width: 100,
12634
- render: function render(val, record, index) {
12635
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12636
- style: {
12637
- width: 70
12638
- },
12639
- value: val,
12640
- min: 1,
12641
- precision: 0,
12642
- onChange: function onChange(num) {
12643
- return updateHandle(num, index, 'num');
12644
- }
12645
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12646
- }
12647
- },
12648
- // {
12649
- // dataIndex: 'actualNum',
12650
- // title: `${text}实发数量`,
12651
- // align: 'center',
12652
- // ellipsis: true,
12653
- // width: 100,
12654
- // },
12655
- {
12656
- dataIndex: 'sharePrice',
12657
- title: "\u5206\u644A\u4EF7",
12658
- align: 'center',
12659
- ellipsis: true,
12660
- width: 70
12661
- }, {
12662
- dataIndex: 'giftType',
12663
- title: "\u8D60\u54C1\u65B9\u5F0F",
12664
- align: 'center',
12665
- ellipsis: true,
12666
- width: 100,
12667
- render: function render(val) {
12668
- var giftTypeMap = {
12669
- 0: '非赠品',
12670
- 1: '自动赠送',
12671
- 2: '手工赠送',
12672
- 3: '回购自动送赠品',
12673
- 4: '前N有礼送赠品',
12674
- 6: '天猫优仓赠品',
12675
- 7: '淘宝CRM会员送赠'
12676
- };
12677
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12678
- }
12679
- }];
12680
- break;
12681
13761
  case 'WDT_RETURN_GOODS':
13762
+ case 'WDT_EXCHANGE_GOODS':
13763
+ case 'BS_E3_GOODS':
13764
+ case 'BS_GOODS':
13765
+ case 'WLN_GOODS':
12682
13766
  {
12683
- columns = [{
12684
- dataIndex: 'goodId',
12685
- title: "\u5546\u54C1ID",
12686
- align: 'center',
12687
- ellipsis: true,
12688
- width: 70
12689
- }, {
12690
- dataIndex: 'goodNo',
12691
- title: "\u5546\u54C1\u7F16\u7801",
12692
- align: 'center',
12693
- ellipsis: true,
12694
- width: 180
12695
- }, {
12696
- dataIndex: 'goodName',
12697
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12698
- align: 'center',
12699
- ellipsis: true,
12700
- width: 250
12701
- }, {
12702
- dataIndex: 'specId',
12703
- title: "".concat(text, "SKUID"),
12704
- align: 'center',
12705
- ellipsis: true,
12706
- width: 100
12707
- }, {
12708
- dataIndex: 'specNo',
12709
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12710
- align: 'center',
12711
- ellipsis: true,
12712
- width: 180
12713
- }, {
12714
- dataIndex: 'specName',
12715
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12716
- align: 'center',
12717
- ellipsis: true,
12718
- width: 250
12719
- }, {
12720
- dataIndex: 'num',
12721
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12722
- align: 'center',
12723
- ellipsis: true,
12724
- width: 100,
12725
- render: function render(val, record, index) {
12726
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12727
- style: {
12728
- width: 70
12729
- },
12730
- value: val,
12731
- min: 1,
12732
- precision: 0,
12733
- onChange: function onChange(num) {
12734
- return updateHandle(num, index, 'num');
12735
- }
12736
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12737
- }
12738
- }, {
12739
- dataIndex: 'sharePrice',
12740
- title: "\u5206\u644A\u4EF7",
12741
- align: 'center',
12742
- ellipsis: true,
12743
- width: 80,
12744
- render: function render(val, record, index) {
12745
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12746
- style: {
12747
- width: 70
12748
- },
12749
- value: val,
12750
- min: 0,
12751
- onChange: function onChange(value) {
12752
- return updateHandle(value, index, 'sharePrice');
12753
- }
12754
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12755
- }
12756
- }, {
12757
- dataIndex: 'returnPrice',
12758
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
12759
- align: 'center',
12760
- ellipsis: true,
12761
- width: 100
12762
- }, {
12763
- dataIndex: 'giftType',
12764
- title: "\u8D60\u54C1\u65B9\u5F0F",
12765
- align: 'center',
12766
- ellipsis: true,
12767
- width: 100,
12768
- render: function render(val) {
12769
- var giftTypeMap = {
12770
- 0: '非赠品',
12771
- 1: '自动赠送',
12772
- 2: '手工赠送',
12773
- 3: '回购自动送赠品',
12774
- 4: '前N有礼送赠品',
12775
- 6: '天猫优仓赠品',
12776
- 7: '淘宝CRM会员送赠'
12777
- };
12778
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12779
- }
12780
- }, {
12781
- dataIndex: 'type',
12782
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12783
- align: 'center',
12784
- ellipsis: true,
12785
- width: 100,
12786
- render: function render(val, record, index) {
12787
- var options = [{
12788
- label: '单品',
12789
- value: '1'
12790
- }, {
12791
- label: '组合装',
12792
- value: '2'
12793
- }];
12794
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12795
- style: {
12796
- width: 70
12797
- },
12798
- options: options,
12799
- value: val,
12800
- onChange: function onChange(value) {
12801
- return updateHandle(value, index, 'type');
12802
- }
12803
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12804
- }
12805
- }];
13767
+ columns = getColumnsMap({
13768
+ text: text,
13769
+ disabled: disabled,
13770
+ updateHandle: updateHandle
13771
+ })[type];
12806
13772
  }
12807
13773
  break;
12808
- case 'WDT_EXCHANGE_GOODS':
13774
+ case 'WDT_REISSUE_GOODS':
12809
13775
  {
12810
- columns = [{
12811
- dataIndex: 'goodId',
12812
- title: "\u5546\u54C1ID",
12813
- align: 'center',
12814
- ellipsis: true,
12815
- width: 70
12816
- }, {
12817
- dataIndex: 'goodNo',
12818
- title: "\u5546\u54C1\u7F16\u7801",
12819
- align: 'center',
12820
- ellipsis: true,
12821
- width: 180
12822
- }, {
12823
- dataIndex: 'goodName',
12824
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12825
- align: 'center',
12826
- ellipsis: true,
12827
- width: 250
12828
- }, {
12829
- dataIndex: 'specId',
12830
- title: "".concat(text, "SKUID"),
12831
- align: 'center',
12832
- ellipsis: true,
12833
- width: 100
12834
- }, {
12835
- dataIndex: 'specNo',
12836
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12837
- align: 'center',
12838
- ellipsis: true,
12839
- width: 180
12840
- }, {
12841
- dataIndex: 'specName',
12842
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12843
- align: 'center',
12844
- ellipsis: true,
12845
- width: 250
12846
- }, {
12847
- dataIndex: 'num',
12848
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
12849
- align: 'center',
12850
- ellipsis: true,
12851
- width: 100,
12852
- render: function render(val, record, index) {
12853
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12854
- style: {
12855
- width: 70
12856
- },
12857
- value: val,
12858
- min: 1,
12859
- precision: 0,
12860
- onChange: function onChange(num) {
12861
- return updateHandle(num, index, 'num');
12862
- }
12863
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12864
- }
12865
- }, {
12866
- dataIndex: 'price',
12867
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
12868
- align: 'center',
12869
- ellipsis: true,
12870
- width: 100,
12871
- render: function render(val, record, index) {
12872
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12873
- style: {
12874
- width: 70
12875
- },
12876
- value: val,
12877
- min: 0,
12878
- onChange: function onChange(value) {
12879
- return updateHandle(value, index, 'price');
12880
- }
12881
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12882
- }
12883
- }, {
12884
- dataIndex: 'exchangePrice',
12885
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
12886
- align: 'center',
12887
- ellipsis: true,
12888
- width: 100
12889
- }, {
12890
- dataIndex: 'giftType',
12891
- title: "\u8D60\u54C1\u65B9\u5F0F",
12892
- align: 'center',
12893
- ellipsis: true,
12894
- width: 100,
12895
- render: function render(val) {
12896
- var giftTypeMap = {
12897
- 0: '非赠品',
12898
- 1: '自动赠送',
12899
- 2: '手工赠送',
12900
- 3: '回购自动送赠品',
12901
- 4: '前N有礼送赠品',
12902
- 6: '天猫优仓赠品',
12903
- 7: '淘宝CRM会员送赠'
12904
- };
12905
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12906
- }
12907
- }, {
12908
- dataIndex: 'type',
12909
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12910
- align: 'center',
12911
- ellipsis: true,
12912
- width: 100,
12913
- render: function render(val, record, index) {
12914
- var options = [{
12915
- label: '单品',
12916
- value: '1'
12917
- }, {
12918
- label: '组合装',
12919
- value: '2'
12920
- }];
12921
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12922
- style: {
12923
- width: 70
12924
- },
12925
- options: options,
12926
- value: val,
12927
- onChange: function onChange(value) {
12928
- return updateHandle(value, index, 'type');
12929
- }
12930
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12931
- }
12932
- }];
13776
+ columns = getWdtReissueGoodColumns({
13777
+ disabled: disabled,
13778
+ updateHandle: updateHandle,
13779
+ operate: operate
13780
+ });
12933
13781
  }
12934
13782
  break;
12935
- case 'BS_E3_GOODS':
13783
+ case 'BS_E3_REISSUE_GOODS':
12936
13784
  {
12937
- columns = [{
12938
- dataIndex: 'sku',
12939
- title: "SKU",
12940
- align: 'center',
12941
- ellipsis: true,
12942
- width: 150
12943
- }, {
12944
- dataIndex: 'skuId',
12945
- title: "SKU ID",
12946
- align: 'center',
12947
- ellipsis: true,
12948
- width: 150
12949
- }, {
12950
- dataIndex: 'goodsName',
12951
- title: "\u5546\u54C1\u540D\u79F0",
12952
- align: 'center',
12953
- ellipsis: true,
12954
- width: 150
12955
- }, {
12956
- dataIndex: 'goodsShortName',
12957
- title: "\u5546\u54C1\u7B80\u79F0",
12958
- align: 'center',
12959
- ellipsis: true,
12960
- width: 100
12961
- }, {
12962
- dataIndex: 'picPath',
12963
- title: "\u5546\u54C1\u56FE\u7247",
12964
- align: 'center',
12965
- ellipsis: true,
12966
- width: 100,
12967
- render: function render(val) {
12968
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12969
- width: 60,
12970
- src: val
12971
- });
12972
- }
12973
- }, {
12974
- dataIndex: 'goodsSn',
12975
- title: "\u8D27\u53F7",
12976
- align: 'center',
12977
- ellipsis: true,
12978
- width: 150
12979
- }, {
12980
- dataIndex: 'goodsId',
12981
- title: "\u8D27\u53F7ID",
12982
- align: 'center',
12983
- ellipsis: true,
12984
- width: 150
12985
- }, {
12986
- dataIndex: 'colorName',
12987
- title: "\u989C\u8272\u540D\u79F0",
12988
- align: 'center',
12989
- ellipsis: true,
12990
- width: 100
12991
- }, {
12992
- dataIndex: 'colorCode',
12993
- title: "\u989C\u8272\u4EE3\u7801",
12994
- align: 'center',
12995
- ellipsis: true,
12996
- width: 150
12997
- }, {
12998
- dataIndex: 'sizeName',
12999
- title: "\u5C3A\u7801\u540D\u79F0",
13000
- align: 'center',
13001
- ellipsis: true,
13002
- width: 100
13003
- }, {
13004
- dataIndex: 'sizeCode',
13005
- title: "\u5C3A\u7801\u4EE3\u7801",
13006
- align: 'center',
13007
- ellipsis: true,
13008
- width: 100
13009
- }, {
13010
- dataIndex: 'brandName',
13011
- title: "\u54C1\u724C\u540D\u79F0",
13012
- align: 'center',
13013
- ellipsis: true,
13014
- width: 150
13015
- }, {
13016
- dataIndex: 'goodsNumber',
13017
- title: "\u5546\u54C1\u6570\u91CF",
13018
- align: 'center',
13019
- ellipsis: true,
13020
- width: 100
13021
- }, {
13022
- dataIndex: 'goodsPrice',
13023
- title: "\u5546\u54C1\u5355\u4EF7",
13024
- align: 'center',
13025
- ellipsis: true,
13026
- width: 120
13027
- }, {
13028
- dataIndex: 'shopPrice',
13029
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13030
- align: 'center',
13031
- ellipsis: true,
13032
- width: 120
13033
- }, {
13034
- dataIndex: 'sharePrice',
13035
- title: "\u5206\u644A\u4EF7",
13036
- align: 'center',
13037
- ellipsis: true,
13038
- width: 120
13039
- }, {
13040
- dataIndex: 'sharePayment',
13041
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13042
- align: 'center',
13043
- ellipsis: true,
13044
- width: 120
13045
- }, {
13046
- dataIndex: 'payment',
13047
- title: "\u5B9E\u4ED8\u91D1\u989D",
13048
- align: 'center',
13049
- ellipsis: true,
13050
- width: 120
13051
- }, {
13052
- dataIndex: 'tcSku',
13053
- title: "\u5957\u9910SKU",
13054
- align: 'center',
13055
- ellipsis: true,
13056
- width: 150
13057
- }, {
13058
- dataIndex: 'tcGoodsNumber',
13059
- title: "\u5957\u9910\u5957\u6570",
13060
- align: 'center',
13061
- ellipsis: true,
13062
- width: 100
13063
- }, {
13064
- dataIndex: 'taoCanSingleSl',
13065
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13066
- align: 'center',
13067
- ellipsis: true,
13068
- width: 100
13069
- }, {
13070
- dataIndex: 'isGift',
13071
- title: "\u662F\u5426\u8D60\u54C1",
13072
- align: 'center',
13073
- ellipsis: true,
13074
- width: 100
13075
- }];
13785
+ columns = getBsE3ReissueGoodColumns({
13786
+ disabled: disabled,
13787
+ updateHandle: updateHandle,
13788
+ operate: operate
13789
+ });
13076
13790
  }
13077
13791
  break;
13078
13792
  default:
13079
- columns = [{
13080
- dataIndex: 'mark',
13081
- title: "\u5546\u54C1\u6807\u8BB0",
13082
- align: 'center',
13083
- ellipsis: true,
13084
- width: 70,
13085
- render: function render(val, record, index) {
13086
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13087
- options: [{
13088
- label: '是',
13089
- value: '是'
13090
- }, {
13091
- label: '否',
13092
- value: '否'
13093
- }],
13094
- disabled: disabled,
13095
- value: val,
13096
- onChange: function onChange(val) {
13097
- return updateHandle(val, index, 'mark');
13098
- }
13099
- });
13100
- }
13101
- }, {
13102
- dataIndex: 'skuName',
13103
- title: "".concat(text, "sku\u540D\u79F0"),
13104
- align: 'center',
13105
- ellipsis: true,
13106
- width: 250
13107
- }, {
13108
- dataIndex: 'sku',
13109
- title: "".concat(text, "sku\u7F16\u7801"),
13110
- align: 'center',
13111
- ellipsis: true,
13112
- width: 100
13113
- }, {
13114
- dataIndex: 'name',
13115
- title: "".concat(text, "\u540D\u79F0"),
13116
- align: 'center',
13117
- ellipsis: true,
13118
- width: 250
13119
- }, {
13120
- dataIndex: 'pic',
13121
- title: "\u56FE\u7247",
13122
- align: 'center',
13123
- ellipsis: true,
13124
- width: 100,
13125
- render: function render(val) {
13126
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13127
- width: 60,
13128
- src: val
13129
- });
13130
- }
13131
- }, {
13132
- dataIndex: 'code',
13133
- title: "".concat(text, "\u7F16\u7801"),
13134
- align: 'center',
13135
- ellipsis: true,
13136
- width: 100
13137
- }, {
13138
- dataIndex: 'money',
13139
- title: "\u5B9E\u4ED8\u91D1\u989D",
13140
- align: 'center',
13141
- ellipsis: true,
13142
- width: 100
13143
- }, {
13144
- dataIndex: 'number',
13145
- title: "".concat(text, "\u6570\u91CF"),
13146
- align: 'center',
13147
- ellipsis: true,
13148
- width: 100,
13149
- render: function render(val, record, index) {
13150
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13151
- style: {
13152
- width: 70
13153
- },
13154
- value: val,
13155
- min: 1,
13156
- precision: 0,
13157
- onChange: function onChange(num) {
13158
- return updateHandle(num, index, 'number');
13159
- }
13160
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13161
- }
13162
- }, {
13163
- dataIndex: 'share',
13164
- title: "\u5206\u644A\u4EF7",
13165
- align: 'center',
13166
- ellipsis: true,
13167
- width: 70
13168
- }, {
13169
- dataIndex: 'type',
13170
- title: "\u8D60\u54C1\u7C7B\u578B",
13171
- align: 'center',
13172
- ellipsis: true,
13173
- width: 100
13174
- }];
13793
+ columns = getColumnsMap({
13794
+ text: text,
13795
+ disabled: disabled,
13796
+ updateHandle: updateHandle
13797
+ })['default'];
13175
13798
  }
13176
13799
  return columns;
13177
13800
  };
@@ -13183,6 +13806,24 @@ var GoodItem$1 = function GoodItem(props) {
13183
13806
  return COLUMNS_INFO(type);
13184
13807
  };
13185
13808
  var newColumns = React.useMemo(function () {
13809
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
13810
+ var baseInfoColumns = [];
13811
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
13812
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
13813
+ if (isStringArray) {
13814
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
13815
+ return showHeader.includes(col.dataIndex);
13816
+ });
13817
+ } else if (isObjectArray) {
13818
+ baseInfoColumns = showHeader.filter(function (col) {
13819
+ return col.show !== false;
13820
+ }).map(function (col) {
13821
+ var currentCol = initBaseInfoColumns.find(function (item) {
13822
+ return item.dataIndex === col.dataIndex;
13823
+ });
13824
+ return currentCol ? currentCol : undefined;
13825
+ }).filter(Boolean);
13826
+ }
13186
13827
  var columnList = [{
13187
13828
  dataIndex: '',
13188
13829
  title: '序号',
@@ -13192,9 +13833,7 @@ var GoodItem$1 = function GoodItem(props) {
13192
13833
  render: function render(val, record, index) {
13193
13834
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
13194
13835
  }
13195
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13196
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13197
- })));
13836
+ }].concat(_toConsumableArray(baseInfoColumns));
13198
13837
  if (!disabled) {
13199
13838
  columnList.push({
13200
13839
  dataIndex: '',
@@ -13214,6 +13853,19 @@ var GoodItem$1 = function GoodItem(props) {
13214
13853
  }
13215
13854
  return columnList;
13216
13855
  }, [showHeader, value, disabled]);
13856
+ var orderColumns = React.useMemo(function () {
13857
+ var columns = COLUMNS_MAP('', false)(type);
13858
+ return [{
13859
+ dataIndex: '',
13860
+ title: '序号',
13861
+ align: 'center',
13862
+ ellipsis: true,
13863
+ width: 50,
13864
+ render: function render(val, record, index) {
13865
+ return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
13866
+ }
13867
+ }].concat(_toConsumableArray(columns));
13868
+ }, []);
13217
13869
  var onSubmit = function onSubmit(list) {
13218
13870
  var newList = [];
13219
13871
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
@@ -13232,12 +13884,37 @@ var GoodItem$1 = function GoodItem(props) {
13232
13884
  });
13233
13885
  } else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13234
13886
  newList = list.map(function (item) {
13235
- item.uuid = kmkfUtils.uuid();
13236
- item.canDelete = true;
13237
- item.goodsNumber = 1;
13238
- item.goodsPrice = 0;
13239
- item.canUpdateNumber = canUpdateNumber;
13240
- return item;
13887
+ var specNo = item.specNo,
13888
+ specId = item.specId,
13889
+ goodName = item.goodName,
13890
+ goodShortName = item.goodShortName,
13891
+ goodPicUrl = item.goodPicUrl,
13892
+ goodNo = item.goodNo,
13893
+ goodId = item.goodId,
13894
+ retailPrice = item.retailPrice;
13895
+ return _objectSpread2(_objectSpread2({}, item), {}, {
13896
+ sku: specNo,
13897
+ skuId: specId,
13898
+ goodsName: goodName,
13899
+ goodsShortName: goodShortName,
13900
+ picPath: goodPicUrl,
13901
+ goodsSn: goodNo,
13902
+ goodsId: goodId,
13903
+ goodsPrice: retailPrice,
13904
+ shopPrice: retailPrice,
13905
+ sharePayment: '',
13906
+ sharePrice: '',
13907
+ payment: '',
13908
+ tcSku: '',
13909
+ tcGoodsNumber: '',
13910
+ taoCanSingleSl: '',
13911
+ isGift: '',
13912
+ uuid: kmkfUtils.uuid(),
13913
+ canDelete: true,
13914
+ canEdit: true,
13915
+ goodsNumber: 1,
13916
+ canUpdateNumber: canUpdateNumber
13917
+ });
13241
13918
  });
13242
13919
  } else {
13243
13920
  newList = list.map(function (item) {
@@ -13298,10 +13975,15 @@ var GoodItem$1 = function GoodItem(props) {
13298
13975
  }, showModeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
13299
13976
  checked: isStrict,
13300
13977
  onChange: handleCheckboxChange
13301
- }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !((_ref = ['BS_E3_GOODS']) === null || _ref === void 0 ? void 0 : _ref.includes(type)) && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13978
+ }, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
13979
+ columns: orderColumns,
13980
+ dataSource: tradeGoods.originDataSource,
13981
+ selectedRowKeys: selectedGoods,
13982
+ onChangeSelectedKeys: tradeGoods.selectedGoodsChange
13983
+ }), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13302
13984
  type: "link",
13303
13985
  onClick: handleChangeGoods
13304
- }, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13986
+ }, getButtonText(type)), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13305
13987
  columns: newColumns,
13306
13988
  dataSource: value,
13307
13989
  rowKey: 'uuid',
@@ -14010,25 +14692,7 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
14010
14692
  if (data === null || data === void 0 ? void 0 : data.success) {
14011
14693
  var _data$data, _data$data$orderList;
14012
14694
  if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
14013
- var _filterBsE3Orders;
14014
- data.data.orderList = (_filterBsE3Orders = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
14015
- var isSplit = item.isSplit,
14016
- isSplitNew = item.isSplitNew,
14017
- isCopy = item.isCopy,
14018
- isExchangeOrder = item.isExchangeOrder,
14019
- isCombineNew = item.isCombineNew,
14020
- isCombine = item.isCombine,
14021
- orderStatus = item.orderStatus;
14022
- return _objectSpread2(_objectSpread2({}, item), {}, {
14023
- orderStatus: kmkfUtils.BS_E3_ORDER_STATUS_MAP[orderStatus],
14024
- isSplit: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplit],
14025
- isSplitNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
14026
- isExchangeOrder: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
14027
- isCopy: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCopy],
14028
- isCombineNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
14029
- isCombine: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombine]
14030
- });
14031
- });
14695
+ data.data.orderList = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
14032
14696
  }
14033
14697
  resolve(data.data);
14034
14698
  } else {
@@ -14044,6 +14708,53 @@ var bsE3Utils = {
14044
14708
  getBsE3OrderListSingleton: getBsE3OrderListSingleton
14045
14709
  };
14046
14710
 
14711
+ var singletonMap$2 = new Map();
14712
+ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
14713
+ if (!singletonMap$2.has(orderNo)) {
14714
+ var p = new Promise(function (resolve, reject) {
14715
+ var doReject = function doReject(err) {
14716
+ // 清空掉错误的请求记录
14717
+ singletonMap$2.delete(orderNo);
14718
+ reject(err);
14719
+ };
14720
+ extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
14721
+ method: 'post',
14722
+ data: {
14723
+ tid: orderNo
14724
+ }
14725
+ }).then(function (data) {
14726
+ if (data === null || data === void 0 ? void 0 : data.success) {
14727
+ var _data$data, _data$data$orderDetai;
14728
+ if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderDetai = _data$data.orderDetailDtoList) === null || _data$data$orderDetai === void 0 ? void 0 : _data$data$orderDetai.length) {
14729
+ var list = kmkfUtils.filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
14730
+ return _objectSpread2(_objectSpread2({}, item), {}, {
14731
+ billNo: item.sid,
14732
+ sysStatus: item.sysStatus,
14733
+ billType: item.type,
14734
+ billTag: item.tags
14735
+ });
14736
+ });
14737
+ resolve(list);
14738
+ } else {
14739
+ resolve([]);
14740
+ }
14741
+ // 延迟10秒清除,保证订单的时效性
14742
+ setTimeout(function () {
14743
+ singletonMap$2.delete(orderNo);
14744
+ }, 1000 * 10);
14745
+ } else {
14746
+ doReject(data);
14747
+ }
14748
+ }).catch(doReject);
14749
+ });
14750
+ singletonMap$2.set(orderNo, p);
14751
+ }
14752
+ return singletonMap$2.get(orderNo);
14753
+ };
14754
+ var kmUtils = {
14755
+ getOrderListSingleton: getOrderListSingleton
14756
+ };
14757
+
14047
14758
  var columnsMap = {
14048
14759
  BS_SYSTEM_ORDER: [{
14049
14760
  title: '单据类型',
@@ -14057,7 +14768,23 @@ var columnsMap = {
14057
14768
  title: '标签',
14058
14769
  dataIndex: 'billTag',
14059
14770
  width: 150
14060
- }],
14771
+ }, {
14772
+ title: '主播名称',
14773
+ dataIndex: 'authorName',
14774
+ width: 150
14775
+ }, {
14776
+ title: '主播ID',
14777
+ dataIndex: 'authorId',
14778
+ width: 150
14779
+ }
14780
+ // {
14781
+ // title: '直播活动',
14782
+ // dataIndex: 'liveActivites',
14783
+ // width: 150,
14784
+ // },
14785
+ ],
14786
+
14787
+ KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
14061
14788
  WLN_SYSTEM_ORDER: [{
14062
14789
  title: '订单类型',
14063
14790
  dataIndex: 'billType',
@@ -14093,37 +14820,58 @@ var columnsMap = {
14093
14820
  title: '订单状态',
14094
14821
  dataIndex: 'orderStatus',
14095
14822
  width: 100,
14096
- ellipsis: true
14823
+ ellipsis: true,
14824
+ render: function render(val) {
14825
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_ORDER_STATUS_MAP[val] || val);
14826
+ }
14097
14827
  }, {
14098
14828
  title: '是否被拆分',
14099
14829
  dataIndex: 'isSplit',
14100
- width: 70,
14101
- ellipsis: true
14830
+ width: 100,
14831
+ ellipsis: true,
14832
+ render: function render(val) {
14833
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14834
+ }
14102
14835
  }, {
14103
14836
  title: '是否拆分子单',
14104
14837
  dataIndex: 'isSplitNew',
14105
- width: 70,
14106
- ellipsis: true
14838
+ width: 100,
14839
+ ellipsis: true,
14840
+ render: function render(val) {
14841
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14842
+ }
14107
14843
  }, {
14108
14844
  title: '是否被合并',
14109
14845
  dataIndex: 'isCombine',
14110
- width: 70,
14111
- ellipsis: true
14846
+ width: 100,
14847
+ ellipsis: true,
14848
+ render: function render(val) {
14849
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14850
+ }
14112
14851
  }, {
14113
14852
  title: '是否合并新单',
14114
14853
  dataIndex: 'isCombineNew',
14115
- width: 70,
14116
- ellipsis: true
14854
+ width: 100,
14855
+ ellipsis: true,
14856
+ render: function render(val) {
14857
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14858
+ }
14117
14859
  }, {
14118
14860
  title: '是否复制单',
14119
14861
  dataIndex: 'isCopy',
14120
- width: 70,
14121
- ellipsis: true
14862
+ width: 100,
14863
+ ellipsis: true,
14864
+ render: function render(val) {
14865
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14866
+ }
14122
14867
  }, {
14123
14868
  title: '是否换货单',
14124
14869
  dataIndex: 'isExchangeOrder',
14125
- width: 70,
14126
- ellipsis: true
14870
+ width: 100,
14871
+ ellipsis: true,
14872
+ render: function render(val) {
14873
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
14874
+ }
14127
14875
  }, {
14128
14876
  title: '订单备注',
14129
14877
  dataIndex: 'orderMsg',
@@ -14133,6 +14881,7 @@ var columnsMap = {
14133
14881
  };
14134
14882
  var rowKeyMap = {
14135
14883
  BS_SYSTEM_ORDER: 'billNo',
14884
+ KM_SYSTEM_ORDER: 'billNo',
14136
14885
  WLN_SYSTEM_ORDER: 'billNo',
14137
14886
  WDT_SYSTEM_ORDER: 'billNo',
14138
14887
  BS_E3_SYSTEM_ORDER: 'orderSn'
@@ -14149,6 +14898,8 @@ var index$1 = (function (props) {
14149
14898
  onceRef.current = true;
14150
14899
  if (type === 'BS_SYSTEM_ORDER') {
14151
14900
  getOrderList(value.orderNo);
14901
+ } else if (type === 'KM_SYSTEM_ORDER') {
14902
+ getKmOrderList(value.orderNo);
14152
14903
  } else if (type === 'WLN_SYSTEM_ORDER') {
14153
14904
  getWlnOrderList(value.orderNo);
14154
14905
  } else if (type === 'WDT_SYSTEM_ORDER') {
@@ -14185,11 +14936,15 @@ var index$1 = (function (props) {
14185
14936
  return {
14186
14937
  billNo: item.billNo,
14187
14938
  billType: item.billType,
14188
- billTag: item.billTag
14939
+ billTag: item.billTag,
14940
+ authorName: item.authorName,
14941
+ authorId: item.authorId
14942
+ // liveActivites: item.liveActivites,
14189
14943
  };
14190
14944
  })
14191
14945
  }));
14192
14946
  }
14947
+
14193
14948
  onceRef.current = false;
14194
14949
  case 7:
14195
14950
  case "end":
@@ -14306,6 +15061,37 @@ var index$1 = (function (props) {
14306
15061
  return _ref5.apply(this, arguments);
14307
15062
  };
14308
15063
  }();
15064
+ var getKmOrderList = /*#__PURE__*/function () {
15065
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
15066
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15067
+ while (1) switch (_context5.prev = _context5.next) {
15068
+ case 0:
15069
+ kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
15070
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
15071
+ orders: trades,
15072
+ showOrderInfo: trades.map(function (_ref7) {
15073
+ var billNo = _ref7.billNo,
15074
+ billType = _ref7.billType,
15075
+ billTag = _ref7.billTag;
15076
+ return {
15077
+ billNo: billNo,
15078
+ billType: billType,
15079
+ billTag: billTag
15080
+ };
15081
+ })
15082
+ }));
15083
+ });
15084
+ onceRef.current = false;
15085
+ case 2:
15086
+ case "end":
15087
+ return _context5.stop();
15088
+ }
15089
+ }, _callee5);
15090
+ }));
15091
+ return function getKmOrderList(_x5) {
15092
+ return _ref6.apply(this, arguments);
15093
+ };
15094
+ }();
14309
15095
  var rowSelection = {
14310
15096
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
14311
15097
  fixed: true,
@@ -14434,7 +15220,7 @@ var CommonGoods = function CommonGoods(props) {
14434
15220
  valueRef.current = value;
14435
15221
  if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo)) {
14436
15222
  getOrderFlag.current = true;
14437
- getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
15223
+ compType.indexOf('WDT') > -1 && getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
14438
15224
  }
14439
15225
  }, [value]);
14440
15226
  var getWdtOrderList = /*#__PURE__*/function () {
@@ -14871,11 +15657,12 @@ var typeMap$1 = {
14871
15657
  formatDefaultField: {
14872
15658
  money: 'orderPrice',
14873
15659
  share: 'sharePrice'
14874
- }
15660
+ },
15661
+ getOrderList: wdtUtils.getWdtOrderListSingleton
14875
15662
  }
14876
15663
  };
14877
15664
  var wdtReissue = function wdtReissue(props) {
14878
- var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
15665
+ var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
14879
15666
  var value = props.value,
14880
15667
  onChange = props.onChange,
14881
15668
  _props$reasonList = props.reasonList,
@@ -14897,31 +15684,48 @@ var wdtReissue = function wdtReissue(props) {
14897
15684
  if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$1[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
14898
15685
  var _value$typeMap$type$s4, _typeMap$type3;
14899
15686
  getOrderFlag.current = true;
14900
- getWdtOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
15687
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
14901
15688
  }
14902
15689
  return;
14903
15690
  }, [value]);
14904
- React.useEffect(function () {
14905
- var _typeMap$type4;
14906
- var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
14907
- if (systemOrderNo) {
14908
- var _value$typeMap$type$t, _typeMap$type5;
14909
- if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
14910
- var _typeMap$type6;
14911
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
14912
- mode: isStrict
14913
- }))));
14914
- }
14915
- }
14916
- return;
14917
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
14918
- var getWdtOrderList = /*#__PURE__*/function () {
15691
+ // useEffect(() => {
15692
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
15693
+ // if (systemOrderNo) {
15694
+ // if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
15695
+ // onChange?.({
15696
+ // ...value,
15697
+ // [typeMap[type]?.key]: getGoodDetails({
15698
+ // mode: isStrict
15699
+ // })
15700
+ // })
15701
+ // }
15702
+ // }
15703
+ // return;
15704
+ // }, [value?.[typeMap[type]?.systemOrderNo]]);
15705
+ // const getWdtOrderList = async (orderNo: string) => {
15706
+ // wdtUtils.getWdtOrderListSingleton(orderNo).then(data => {
15707
+ // const orders = data?.trades || [];
15708
+ // const showOrderInfo = orders.map(({ billNo, billType, billTag }: any) => {
15709
+ // return { billNo, billType, billTag }
15710
+ // });
15711
+ // onChange({
15712
+ // ...value,
15713
+ // [typeMap[type]?.systemOrder]: {
15714
+ // ...value[typeMap[type]?.systemOrder],
15715
+ // showOrderInfo,
15716
+ // orders,
15717
+ // },
15718
+ // });
15719
+ // })
15720
+ // };
15721
+ var getOrderList = /*#__PURE__*/function () {
14919
15722
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
15723
+ var _typeMap$type4;
14920
15724
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14921
15725
  while (1) switch (_context.prev = _context.next) {
14922
15726
  case 0:
14923
- wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
14924
- var _typeMap$type8, _typeMap$type9;
15727
+ (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
15728
+ var _typeMap$type5, _typeMap$type6;
14925
15729
  var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
14926
15730
  var showOrderInfo = orders.map(function (_ref2) {
14927
15731
  var billNo = _ref2.billNo,
@@ -14933,7 +15737,7 @@ var wdtReissue = function wdtReissue(props) {
14933
15737
  billTag: billTag
14934
15738
  };
14935
15739
  });
14936
- onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]), {}, {
15740
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
14937
15741
  showOrderInfo: showOrderInfo,
14938
15742
  orders: orders
14939
15743
  }))));
@@ -14944,43 +15748,44 @@ var wdtReissue = function wdtReissue(props) {
14944
15748
  }
14945
15749
  }, _callee);
14946
15750
  }));
14947
- return function getWdtOrderList(_x) {
15751
+ return function getOrderList(_x) {
14948
15752
  return _ref.apply(this, arguments);
14949
15753
  };
14950
15754
  }();
14951
15755
  var changeTypeHandle = function changeTypeHandle(val) {
14952
- var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
15756
+ var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
14953
15757
  var typeName = val === null || val === void 0 ? void 0 : val[0];
14954
- if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) return;
15758
+ if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
14955
15759
  // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
14956
15760
  var newValue = _objectSpread2({}, value);
14957
- newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
15761
+ newValue[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
14958
15762
  if (typeName === '1') {
14959
- var _typeMap$type12;
14960
- newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
15763
+ var _typeMap$type9;
15764
+ newValue[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
14961
15765
  mode: isStrict
14962
15766
  });
14963
15767
  } else if (typeName === '2') {
14964
- var _typeMap$type13;
15768
+ var _typeMap$type10;
14965
15769
  // 切换到非原单,清空列表
14966
- newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
15770
+ newValue[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
14967
15771
  }
14968
15772
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
14969
15773
  };
14970
15774
  var handleModeChange = function handleModeChange(mode) {
14971
- var _value$typeMap$type$t3, _typeMap$type14, _typeMap$type15;
14972
- var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
15775
+ var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
15776
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
14973
15777
  setIsStrict(mode);
14974
15778
  if (!isOriginalOrder) return;
14975
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
15779
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
14976
15780
  mode: mode
14977
15781
  }))));
14978
15782
  };
14979
15783
  var getGoodDetails = function getGoodDetails(_ref3) {
14980
- var _typeMap$type16, _typeMap$type17, _order$goodDetails;
14981
- var mode = _ref3.mode;
14982
- var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
14983
- var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
15784
+ var _typeMap$type13, _typeMap$type14, _order$goodDetails;
15785
+ var mode = _ref3.mode,
15786
+ sysOrderNo = _ref3.sysOrderNo;
15787
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
15788
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
14984
15789
  var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
14985
15790
  return order.tradeNo === systemOrderNo;
14986
15791
  });
@@ -14991,31 +15796,52 @@ var wdtReissue = function wdtReissue(props) {
14991
15796
  }) : goodDetails;
14992
15797
  };
14993
15798
  var changeGoodHandle = function changeGoodHandle(val) {
14994
- var _typeMap$type18;
15799
+ var _typeMap$type15;
14995
15800
  var newValue = _objectSpread2({}, value);
14996
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = (val || []).map(function (item) {
14997
- var _typeMap$type19, _typeMap$type20;
14998
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.money)] = 0;
14999
- item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.share)] = 0;
15801
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
15802
+ var _typeMap$type16, _typeMap$type17;
15803
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
15804
+ item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
15000
15805
  return item;
15001
15806
  });
15002
15807
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15003
15808
  };
15004
15809
  var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
15005
- var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
15810
+ var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
15006
15811
  var newValue = _objectSpread2({}, value);
15007
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
15008
- if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
15009
- var _typeMap$type23;
15010
- newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = [];
15812
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
15813
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
15814
+ var _typeMap$type20;
15815
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
15816
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
15817
+ var _typeMap$type22;
15818
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
15819
+ mode: isStrict,
15820
+ sysOrderNo: val
15821
+ });
15011
15822
  }
15012
15823
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15013
15824
  };
15825
+ var selectedGoodsChange = React.useCallback(function (skuList) {
15826
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
15827
+ var newValue = _objectSpread2({}, value);
15828
+ // 原订单商品
15829
+ var originTradeGoodList = getGoodDetails({
15830
+ mode: isStrict
15831
+ }) || [];
15832
+ // 当前选中的所有商品【包含了原订单+商品库】
15833
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
15834
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
15835
+ return skuList.includes(item.uuid);
15836
+ });
15837
+ console.log('商品发生变化', newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
15838
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15839
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
15014
15840
  //显示选择商品按钮 原单换不显示选择商品
15015
15841
  var showChangeBtn = React.useMemo(function () {
15016
- var _typeMap$type24;
15017
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
15018
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
15842
+ var _typeMap$type27;
15843
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
15844
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
15019
15845
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
15020
15846
  gutter: 8,
15021
15847
  wrap: true
@@ -15033,12 +15859,12 @@ var wdtReissue = function wdtReissue(props) {
15033
15859
  },
15034
15860
  disabled: disabled,
15035
15861
  allowClear: false,
15036
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
15862
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
15037
15863
  onChange: function onChange(val) {
15038
15864
  return changeSystemOrderHandle(val);
15039
15865
  },
15040
15866
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15041
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15867
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
15042
15868
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
15043
15869
  key: item.billNo,
15044
15870
  value: item.billNo,
@@ -15059,7 +15885,7 @@ var wdtReissue = function wdtReissue(props) {
15059
15885
  disabled: disabled,
15060
15886
  allowClear: false,
15061
15887
  options: reasonList,
15062
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
15888
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
15063
15889
  onChange: function onChange(val) {
15064
15890
  return changeTypeHandle(val);
15065
15891
  }
@@ -15071,13 +15897,19 @@ var wdtReissue = function wdtReissue(props) {
15071
15897
  canUpdateNumber: showChangeBtn,
15072
15898
  showChangeBtn: showChangeBtn,
15073
15899
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15074
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
15900
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
15075
15901
  onChange: function onChange(val) {
15076
15902
  return changeGoodHandle(val);
15077
15903
  },
15078
15904
  onModeChange: handleModeChange,
15079
15905
  showModeBtn: showModeBtn,
15080
- isStrict: isStrict
15906
+ isStrict: isStrict,
15907
+ tradeGoods: {
15908
+ originDataSource: getGoodDetails({
15909
+ mode: isStrict
15910
+ }),
15911
+ selectedGoodsChange: selectedGoodsChange
15912
+ }
15081
15913
  })));
15082
15914
  };
15083
15915
 
@@ -15851,6 +16683,240 @@ var CalculationInput = function CalculationInput(props) {
15851
16683
  }, config === null || config === void 0 ? void 0 : config.unit));
15852
16684
  };
15853
16685
 
16686
+ var _excluded$k = ["value", "onChange", "reasonList", "disabled", "type"];
16687
+ var typeMap$2 = {
16688
+ BS_E3_REISSUE_GOODS: {
16689
+ key: 'bsE3ReissueGoods',
16690
+ typeName: 'bsE3ReissueType',
16691
+ systemOrder: 'bsE3SystemOrder',
16692
+ systemOrderNo: 'bsE3SystemOrderNo',
16693
+ getOrderList: bsE3Utils.getBsE3OrderListSingleton
16694
+ }
16695
+ };
16696
+ var bsE3Reissue = function bsE3Reissue(props) {
16697
+ var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
16698
+ var value = props.value,
16699
+ onChange = props.onChange,
16700
+ _props$reasonList = props.reasonList,
16701
+ reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
16702
+ disabled = props.disabled,
16703
+ type = props.type,
16704
+ other = _objectWithoutProperties(props, _excluded$k);
16705
+ var getOrderFlag = React.useRef(false);
16706
+ var _useState = React.useState(false),
16707
+ _useState2 = _slicedToArray(_useState, 2),
16708
+ isStrict = _useState2[0],
16709
+ setIsStrict = _useState2[1];
16710
+ // TODO: 在修改场景下手动获取一次订单详情中数据
16711
+ React.useEffect(function () {
16712
+ var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
16713
+ if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$2[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$2[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
16714
+ var _value$typeMap$type$s4, _typeMap$type3;
16715
+ getOrderFlag.current = true;
16716
+ getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$2[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
16717
+ }
16718
+ return;
16719
+ }, [value]);
16720
+ // useEffect(() => {
16721
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
16722
+ // if (systemOrderNo) {
16723
+ // if (['1'].includes(value?.[typeMap[type]?.typeName]?.[0])) {
16724
+ // onChange?.({
16725
+ // ...value,
16726
+ // [typeMap[type]?.key]: getGoodDetails({
16727
+ // mode: isStrict
16728
+ // })
16729
+ // })
16730
+ // }
16731
+ // }
16732
+ // return;
16733
+ // }, [value?.[typeMap[type]?.systemOrderNo]]);
16734
+ var getOrderList = /*#__PURE__*/function () {
16735
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
16736
+ var _typeMap$type4;
16737
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
16738
+ while (1) switch (_context.prev = _context.next) {
16739
+ case 0:
16740
+ (_typeMap$type4 = typeMap$2[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
16741
+ var _typeMap$type5, _typeMap$type6;
16742
+ var orders = (data === null || data === void 0 ? void 0 : data.orderList) || [];
16743
+ var showOrderInfo = orders.map(function (_ref2) {
16744
+ var orderSn = _ref2.orderSn;
16745
+ return {
16746
+ billNo: orderSn
16747
+ };
16748
+ });
16749
+ onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$2[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$2[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
16750
+ showOrderInfo: showOrderInfo,
16751
+ orders: orders
16752
+ }))));
16753
+ });
16754
+ case 1:
16755
+ case "end":
16756
+ return _context.stop();
16757
+ }
16758
+ }, _callee);
16759
+ }));
16760
+ return function getOrderList(_x) {
16761
+ return _ref.apply(this, arguments);
16762
+ };
16763
+ }();
16764
+ var changeTypeHandle = function changeTypeHandle(val) {
16765
+ var _typeMap$type7;
16766
+ var typeName = val === null || val === void 0 ? void 0 : val[0];
16767
+ // if (typeName === value?.[typeMap[type]?.typeName]?.[0]) return
16768
+ // const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
16769
+ var newValue = _objectSpread2({}, value);
16770
+ newValue[(_typeMap$type7 = typeMap$2[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName] = val;
16771
+ if (typeName === '1') {
16772
+ var _typeMap$type8;
16773
+ newValue[(_typeMap$type8 = typeMap$2[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key] = getGoodDetails({
16774
+ mode: isStrict
16775
+ });
16776
+ } else if (typeName === '2') {
16777
+ var _typeMap$type9;
16778
+ // 切换到非原单,清空列表
16779
+ newValue[(_typeMap$type9 = typeMap$2[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = [];
16780
+ }
16781
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16782
+ };
16783
+ var handleModeChange = function handleModeChange(mode) {
16784
+ var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
16785
+ var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$2[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0]) === '1';
16786
+ setIsStrict(mode);
16787
+ if (!isOriginalOrder) return;
16788
+ onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type11 = typeMap$2[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key, getGoodDetails({
16789
+ mode: mode
16790
+ }))));
16791
+ };
16792
+ var getGoodDetails = function getGoodDetails(_ref3) {
16793
+ var _typeMap$type12, _typeMap$type13, _order$orderDetailGet;
16794
+ var mode = _ref3.mode,
16795
+ sysOrderNo = _ref3.sysOrderNo;
16796
+ var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type12 = typeMap$2[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.systemOrder];
16797
+ var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$2[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrderNo];
16798
+ var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
16799
+ return order.orderSn === systemOrderNo;
16800
+ });
16801
+ var goodDetails = (order === null || order === void 0 ? void 0 : (_order$orderDetailGet = order.orderDetailGets) === null || _order$orderDetailGet === void 0 ? void 0 : _order$orderDetailGet.length) ? kmkfUtils.updateBsE3GoodsHandle([order]) : [];
16802
+ var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
16803
+ return mode ? goodDetails.filter(function (goodItem) {
16804
+ return !orderNo || goodItem.originalOrderSn === orderNo;
16805
+ }) : goodDetails;
16806
+ };
16807
+ var changeGoodHandle = function changeGoodHandle(val) {
16808
+ var _typeMap$type14;
16809
+ var newValue = _objectSpread2({}, value);
16810
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type14 = typeMap$2[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = val || [];
16811
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16812
+ };
16813
+ var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
16814
+ var _typeMap$type15, _value$typeMap$type$t2, _typeMap$type16, _value$typeMap$type$t3, _typeMap$type18;
16815
+ var newValue = _objectSpread2({}, value);
16816
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type15 = typeMap$2[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrderNo)] = val;
16817
+ if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type16 = typeMap$2[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
16818
+ var _typeMap$type17;
16819
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = [];
16820
+ } else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type18 = typeMap$2[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
16821
+ var _typeMap$type19;
16822
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = getGoodDetails({
16823
+ mode: isStrict,
16824
+ sysOrderNo: val
16825
+ });
16826
+ }
16827
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16828
+ };
16829
+ //显示选择商品按钮 原单换不显示选择商品
16830
+ var showChangeBtn = React.useMemo(function () {
16831
+ var _typeMap$type20;
16832
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
16833
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16834
+ var selectedGoodsChange = React.useCallback(function (skuList) {
16835
+ var _typeMap$type22, _typeMap$type23, _uniqBy;
16836
+ var newValue = _objectSpread2({}, value);
16837
+ // 原订单商品
16838
+ var originTradeGoodList = getGoodDetails({
16839
+ mode: isStrict
16840
+ }) || [];
16841
+ // 当前选中的所有商品【包含了原订单+商品库】
16842
+ var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
16843
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
16844
+ return skuList.includes(item.uuid);
16845
+ });
16846
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16847
+ }, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
16848
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
16849
+ gutter: 8,
16850
+ wrap: true,
16851
+ id: "bsE3ReissueGoods"
16852
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
16853
+ className: "gutter-row",
16854
+ xs: {
16855
+ span: 11
16856
+ },
16857
+ sm: {
16858
+ span: 6
16859
+ }
16860
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
16861
+ style: {
16862
+ marginBottom: '8px'
16863
+ },
16864
+ disabled: disabled,
16865
+ allowClear: false,
16866
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
16867
+ onChange: function onChange(val) {
16868
+ return changeSystemOrderHandle(val);
16869
+ },
16870
+ placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16871
+ }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16872
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
16873
+ key: item.billNo,
16874
+ value: item.billNo,
16875
+ label: item.billNo
16876
+ }, item.billNo);
16877
+ }))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
16878
+ className: "gutter-row",
16879
+ xs: {
16880
+ span: 11
16881
+ },
16882
+ sm: {
16883
+ span: 6
16884
+ }
16885
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
16886
+ style: {
16887
+ marginBottom: '8px'
16888
+ },
16889
+ disabled: disabled,
16890
+ allowClear: false,
16891
+ options: reasonList,
16892
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
16893
+ onChange: function onChange(val) {
16894
+ return changeTypeHandle(val);
16895
+ }
16896
+ }))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
16897
+ key: 'reissueGoods'
16898
+ }, other), {}, {
16899
+ type: type,
16900
+ disabled: disabled,
16901
+ canUpdateNumber: showChangeBtn,
16902
+ showChangeBtn: showChangeBtn,
16903
+ shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16904
+ value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
16905
+ onChange: function onChange(val) {
16906
+ return changeGoodHandle(val);
16907
+ },
16908
+ onModeChange: handleModeChange,
16909
+ showModeBtn: false,
16910
+ isStrict: isStrict,
16911
+ tradeGoods: {
16912
+ originDataSource: getGoodDetails({
16913
+ mode: isStrict
16914
+ }),
16915
+ selectedGoodsChange: selectedGoodsChange
16916
+ }
16917
+ })));
16918
+ };
16919
+
15854
16920
  exports.Address = ApaasAddress;
15855
16921
  exports.AliPay = AliPay;
15856
16922
  exports.ApaasAddress = Province;
@@ -15871,6 +16937,7 @@ exports.ApaasTextArea = ApaasTextArea;
15871
16937
  exports.ApaasUpload = ApaasUpload;
15872
16938
  exports.ApaasUploadAsync = index;
15873
16939
  exports.ApaasUploadFile = ApaasUploadFile;
16940
+ exports.BsE3Reissue = bsE3Reissue;
15874
16941
  exports.BsExchange = BsExchange;
15875
16942
  exports.BsGoods = BsGoods;
15876
16943
  exports.BsReissue = BsReissue;
@@ -15911,3 +16978,4 @@ exports.TradeId = TradeId;
15911
16978
  exports.WdtGoodList = WdtGoodList;
15912
16979
  exports.WdtReissue = wdtReissue;
15913
16980
  exports.WlnGoods = WlnGoods;
16981
+ exports.columnsBaseInfoMap = columnsBaseInfoMap;