@kmkf-fe-packages/basic-components 1.22.1-beta.4 → 1.22.1-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
3
3
  import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
- import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
- import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
6
+ import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
7
+ import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
8
8
  import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
9
9
  import zhCN from 'antd/lib/locale/zh_CN';
10
10
  import pubsub from 'pubsub-js';
@@ -928,7 +928,7 @@ var fn$1 = function fn() {
928
928
  var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
929
929
  var _document;
930
930
  var _ref$maxCount = _ref.maxCount,
931
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
931
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
932
932
  _ref$maxSize = _ref.maxSize,
933
933
  maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
934
934
  _ref$uploadText = _ref.uploadText,
@@ -6863,7 +6863,7 @@ var fn$2 = function fn() {
6863
6863
  };
6864
6864
  var ApaasUploadFile = function ApaasUploadFile(_ref) {
6865
6865
  var _ref$maxCount = _ref.maxCount,
6866
- maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
6866
+ maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
6867
6867
  _ref$maxSize = _ref.maxSize,
6868
6868
  maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
6869
6869
  _ref$onChange = _ref.onChange,
@@ -7469,7 +7469,12 @@ var IdentifyAddress = function IdentifyAddress(props) {
7469
7469
  workOrder: AddressData
7470
7470
  }[type] || AddressData).getInstance();
7471
7471
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7472
- 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)];
7472
+ // params.address = [
7473
+ // addressData.getProCodeByName(val?.province),
7474
+ // addressData.getProCodeByName(val?.city),
7475
+ // addressData.getProCodeByName(val?.district),
7476
+ // ];
7477
+ 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]);
7473
7478
  }
7474
7479
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
7475
7480
  };
@@ -7580,7 +7585,8 @@ function ApaasLogistics(props) {
7580
7585
  return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
7581
7586
  value: value,
7582
7587
  onChange: onChange,
7583
- options: option
7588
+ options: option,
7589
+ virtual: true
7584
7590
  }));
7585
7591
  }
7586
7592
 
@@ -8110,7 +8116,12 @@ function ApaasAddress(props) {
8110
8116
  };
8111
8117
  var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
8112
8118
  if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
8113
- 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)];
8119
+ // params.address = [
8120
+ // addressData.getProCodeByName(val?.province),
8121
+ // addressData.getProCodeByName(val?.city),
8122
+ // addressData.getProCodeByName(val?.district),
8123
+ // ];
8124
+ 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]);
8114
8125
  }
8115
8126
  onChange === null || onChange === void 0 ? void 0 : onChange(params);
8116
8127
  };
@@ -9474,7 +9485,8 @@ var GoodItem = function GoodItem(props) {
9474
9485
  picUrl: item.picUrl,
9475
9486
  numIid: item.numIid,
9476
9487
  skuId: item.skuId,
9477
- outerSkuId: item.outerSkuId
9488
+ outerSkuId: item.outerSkuId,
9489
+ num: 1 //手动选择商品默认数量
9478
9490
  };
9479
9491
  // if (type === 1) {
9480
9492
  // params.outerId = item.outerId; //编码
@@ -9563,16 +9575,36 @@ var GoodItem = function GoodItem(props) {
9563
9575
  return _ref5.apply(this, arguments);
9564
9576
  };
9565
9577
  }();
9566
- var headerList = showHeader || {
9567
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9568
- ]
9569
- }[type] || [];
9578
+ var headerList = useMemo(function () {
9579
+ if (!Array.isArray(showHeader)) return columnsGoodsList.map(function (item) {
9580
+ return item.dataIndex;
9581
+ });
9582
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9583
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9584
+ var dataIndexList = [];
9585
+ if (isStringArray) {
9586
+ dataIndexList = showHeader;
9587
+ } else if (isObjectArray) {
9588
+ dataIndexList = showHeader.map(function (item) {
9589
+ return item.dataIndex;
9590
+ });
9591
+ }
9592
+ return isStringArray ? showHeader : isObjectArray ? showHeader.filter(function (item) {
9593
+ return item.show !== false;
9594
+ }).map(function (item) {
9595
+ return item.dataIndex;
9596
+ }) : [] || {
9597
+ 1: columnsGoodsList.map(function (item) {
9598
+ return item.dataIndex;
9599
+ })
9600
+ }[type] || [];
9601
+ }, [showHeader]);
9570
9602
  //修改参数
9571
- var handleChangeValue = function handleChangeValue(key, index) {
9603
+ var handleChangeValue = function handleChangeValue(key, index, replaceFn) {
9572
9604
  return function (e) {
9573
- var _e$target;
9605
+ var _e$target, _e$target2;
9574
9606
  var newImgList = _toConsumableArray(imgList);
9575
- newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
9607
+ newImgList[index][key] = replaceFn ? replaceFn(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) : e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value;
9576
9608
  var newValue = {
9577
9609
  shopId: shopId,
9578
9610
  imgList: newImgList
@@ -9581,35 +9613,67 @@ var GoodItem = function GoodItem(props) {
9581
9613
  };
9582
9614
  };
9583
9615
  // TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
9584
- var goodItemAttrs = [{
9585
- isShow: headerList.includes('title'),
9586
- key: 'title',
9587
- label: '商品名称'
9588
- }, {
9589
- isShow: headerList.includes('outerId'),
9590
- key: 'outerId',
9591
- label: '商品编码'
9592
- },
9593
- // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9594
- {
9595
- isShow: headerList.includes('numIid'),
9596
- key: 'numIid',
9597
- label: '商品id'
9598
- }, {
9599
- isShow: changeSku && headerList.includes('skuId'),
9600
- key: 'skuId',
9601
- label: 'SKU ID'
9602
- }, {
9603
- isShow: changeSku && headerList.includes('outerSkuId'),
9604
- key: 'outerSkuId',
9605
- label: 'SKU 编码'
9606
- }, {
9607
- isShow: changeSku && headerList.includes('propertiesName'),
9608
- key: 'propertiesName',
9609
- label: 'SKU 信息'
9610
- }];
9611
- var hasPic = headerList.includes('picUrl');
9612
- var hasAttr = hasPic ? headerList.length > 1 : headerList.length > 0;
9616
+ var goodItemAttrs = useMemo(function () {
9617
+ var initList = [{
9618
+ isShow: headerList.includes('title'),
9619
+ key: 'title',
9620
+ label: '商品名称'
9621
+ }, {
9622
+ isShow: headerList.includes('outerId'),
9623
+ key: 'outerId',
9624
+ label: '商品编码'
9625
+ },
9626
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9627
+ {
9628
+ isShow: headerList.includes('numIid'),
9629
+ key: 'numIid',
9630
+ label: '商品id'
9631
+ }, {
9632
+ isShow: headerList.includes('num'),
9633
+ key: 'num',
9634
+ label: '商品数量',
9635
+ replaceFn: function replaceFn(value) {
9636
+ // 使用正则表达式匹配所有数字字符
9637
+ var numbers = String(value || '').match(/\d+/g);
9638
+ // 如果没有匹配到任何数字字符,返回null
9639
+ if (!numbers) {
9640
+ return null;
9641
+ }
9642
+ // 将匹配到的数字字符拼接成一个新的数字
9643
+ return Number(numbers.join('')) ? Number(numbers.join('')) : null;
9644
+ }
9645
+ }, {
9646
+ isShow: changeSku && headerList.includes('skuId'),
9647
+ key: 'skuId',
9648
+ label: 'SKU ID'
9649
+ }, {
9650
+ isShow: changeSku && headerList.includes('outerSkuId'),
9651
+ key: 'outerSkuId',
9652
+ label: 'SKU 编码'
9653
+ }, {
9654
+ isShow: changeSku && headerList.includes('propertiesName'),
9655
+ key: 'propertiesName',
9656
+ label: 'SKU 信息'
9657
+ }];
9658
+ if (!Array.isArray(showHeader)) return initList;
9659
+ var newList = [];
9660
+ headerList.forEach(function (dataIndex) {
9661
+ if (initList.find(function (item) {
9662
+ return item.key === dataIndex;
9663
+ })) {
9664
+ newList.push(initList.find(function (item) {
9665
+ return item.key === dataIndex;
9666
+ }));
9667
+ }
9668
+ });
9669
+ return newList;
9670
+ }, [headerList, showHeader]);
9671
+ var hasPic = useMemo(function () {
9672
+ return headerList.includes('picUrl');
9673
+ }, [headerList]);
9674
+ var hasAttr = useMemo(function () {
9675
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9676
+ }, [hasPic, headerList]);
9613
9677
  return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
9614
9678
  className: "goods-title"
9615
9679
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
@@ -9667,7 +9731,7 @@ var GoodItem = function GoodItem(props) {
9667
9731
  title: String(img[item.key] || ''),
9668
9732
  value: img[item.key],
9669
9733
  disabled: item.disabled || disabled,
9670
- onChange: handleChangeValue(item.key, index)
9734
+ onChange: handleChangeValue(item.key, index, item.replaceFn)
9671
9735
  }));
9672
9736
  }), !disabled && !hasPic && type !== 4 && changeSku ? /*#__PURE__*/React.createElement(Button, {
9673
9737
  style: {
@@ -10963,6 +11027,11 @@ var jstGoods = function jstGoods(props) {
10963
11027
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10964
11028
  }
10965
11029
  }, [value, type]);
11030
+ useEffect(function () {
11031
+ if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11032
+ setChangeIndex(0);
11033
+ }
11034
+ }, value);
10966
11035
  var content = function content(item, index) {
10967
11036
  return /*#__PURE__*/React.createElement("div", {
10968
11037
  style: {
@@ -10973,7 +11042,7 @@ var jstGoods = function jstGoods(props) {
10973
11042
  style: {
10974
11043
  textAlign: 'center'
10975
11044
  }
10976
- }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11045
+ }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
10977
11046
  return /*#__PURE__*/React.createElement("div", {
10978
11047
  key: index
10979
11048
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
@@ -12426,224 +12495,1202 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12426
12495
  };
12427
12496
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12428
12497
 
12429
- var columns$3 = [{
12430
- dataIndex: 'sku',
12431
- title: "SKU",
12432
- width: 150
12433
- }, {
12434
- dataIndex: 'skuId',
12435
- title: "SKU ID",
12436
- width: 150
12437
- }, {
12438
- dataIndex: 'goodsName',
12439
- title: "\u5546\u54C1\u540D\u79F0",
12440
- width: 150
12441
- }, {
12442
- dataIndex: 'goodsShortName',
12443
- title: "\u5546\u54C1\u7B80\u79F0",
12444
- width: 150
12445
- }, {
12446
- dataIndex: 'picPath',
12447
- title: "\u5546\u54C1\u56FE\u7247",
12448
- width: 150
12449
- }, {
12450
- dataIndex: 'goodsSn',
12451
- title: "\u8D27\u53F7",
12452
- width: 150
12453
- }, {
12454
- dataIndex: 'goodsId',
12455
- title: "\u8D27\u53F7ID",
12456
- width: 150
12457
- }, {
12458
- dataIndex: 'colorName',
12459
- title: "\u989C\u8272\u540D\u79F0",
12460
- width: 150
12461
- }, {
12462
- dataIndex: 'colorCode',
12463
- title: "\u989C\u8272\u4EE3\u7801",
12464
- width: 150
12465
- }, {
12466
- dataIndex: 'sizeName',
12467
- title: "\u5C3A\u7801\u540D\u79F0",
12468
- width: 150
12469
- }, {
12470
- dataIndex: 'sizeCode',
12471
- title: "\u5C3A\u7801\u4EE3\u7801",
12472
- width: 150
12473
- }, {
12474
- dataIndex: 'brandName',
12475
- title: "\u54C1\u724C\u540D\u79F0",
12476
- width: 150
12477
- }, {
12478
- dataIndex: 'goodsNumber',
12479
- title: "\u5546\u54C1\u6570\u91CF",
12480
- width: 150
12481
- }, {
12482
- dataIndex: 'goodsPrice',
12483
- title: "\u5546\u54C1\u5355\u4EF7",
12484
- width: 150
12485
- }, {
12486
- dataIndex: 'shopPrice',
12487
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12488
- width: 150
12489
- }, {
12490
- dataIndex: 'isGift',
12491
- title: "\u662F\u5426\u8D60\u54C1",
12492
- width: 150,
12493
- render: function render(val) {
12494
- return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12495
- }
12496
- }];
12497
- var renderFieldMap = {
12498
- goodsNumber: function goodsNumber(_ref) {
12499
- var disabled = _ref.disabled,
12500
- updateHandle = _ref.updateHandle;
12501
- return function (val, record, index) {
12502
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12503
- style: {
12504
- width: 70
12505
- },
12506
- value: val,
12507
- min: 1,
12508
- precision: 0,
12509
- onChange: function onChange(num) {
12510
- return updateHandle(num, index, 'goodsNumber');
12511
- }
12512
- }) : /*#__PURE__*/React.createElement("span", null, val);
12513
- };
12514
- },
12515
- goodsPrice: function goodsPrice(_ref2) {
12516
- var disabled = _ref2.disabled,
12517
- updateHandle = _ref2.updateHandle;
12518
- return function (val, record, index) {
12519
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12520
- style: {
12521
- width: 70
12522
- },
12523
- value: val,
12524
- min: 0,
12525
- onChange: function onChange(value) {
12526
- return updateHandle(value, index, 'goodsPrice');
12527
- }
12528
- }) : /*#__PURE__*/React.createElement("span", null, val);
12529
- };
12530
- },
12531
- isGift: function isGift(_ref3) {
12532
- var disabled = _ref3.disabled,
12533
- updateHandle = _ref3.updateHandle;
12534
- return function (val, record, index) {
12535
- var options = [{
12536
- label: '是',
12537
- value: 1
12538
- }, {
12539
- label: '否',
12540
- value: 0
12541
- }];
12542
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12543
- style: {
12544
- width: 70
12545
- },
12546
- options: options,
12547
- value: val,
12548
- onChange: function onChange(value) {
12549
- return updateHandle(value, index, 'isGift');
12550
- },
12551
- getPopupContainer: function getPopupContainer() {
12552
- return document.getElementById('bsE3ReissueGoods');
12553
- }
12554
- }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12555
- };
12556
- }
12557
- };
12558
- var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12559
- var disabled = _ref4.disabled,
12560
- updateHandle = _ref4.updateHandle,
12561
- operate = _ref4.operate;
12562
- return columns$3.map(function (item) {
12563
- var newItem = _objectSpread2({
12498
+ var getColumns = function getColumns(_ref) {
12499
+ var _ref$text = _ref.text,
12500
+ text = _ref$text === void 0 ? '' : _ref$text,
12501
+ disabled = _ref.disabled,
12502
+ updateHandle = _ref.updateHandle;
12503
+ return {
12504
+ //百胜E3补发商品
12505
+ BS_E3_REISSUE_GOODS: [{
12506
+ dataIndex: 'sku',
12507
+ title: "SKU",
12508
+ width: 150
12509
+ }, {
12510
+ dataIndex: 'skuId',
12511
+ title: "SKU ID",
12512
+ width: 150
12513
+ }, {
12514
+ dataIndex: 'goodsName',
12515
+ title: "\u5546\u54C1\u540D\u79F0",
12516
+ width: 150
12517
+ }, {
12518
+ dataIndex: 'goodsShortName',
12519
+ title: "\u5546\u54C1\u7B80\u79F0",
12520
+ width: 150
12521
+ }, {
12522
+ dataIndex: 'picPath',
12523
+ title: "\u5546\u54C1\u56FE\u7247",
12524
+ width: 150
12525
+ }, {
12526
+ dataIndex: 'goodsSn',
12527
+ title: "\u8D27\u53F7",
12528
+ width: 150
12529
+ }, {
12530
+ dataIndex: 'goodsId',
12531
+ title: "\u8D27\u53F7ID",
12532
+ width: 150
12533
+ }, {
12534
+ dataIndex: 'colorName',
12535
+ title: "\u989C\u8272\u540D\u79F0",
12536
+ width: 150
12537
+ }, {
12538
+ dataIndex: 'colorCode',
12539
+ title: "\u989C\u8272\u4EE3\u7801",
12540
+ width: 150
12541
+ }, {
12542
+ dataIndex: 'sizeName',
12543
+ title: "\u5C3A\u7801\u540D\u79F0",
12544
+ width: 150
12545
+ }, {
12546
+ dataIndex: 'sizeCode',
12547
+ title: "\u5C3A\u7801\u4EE3\u7801",
12548
+ width: 150
12549
+ }, {
12550
+ dataIndex: 'brandName',
12551
+ title: "\u54C1\u724C\u540D\u79F0",
12552
+ width: 150
12553
+ }, {
12554
+ dataIndex: 'goodsNumber',
12555
+ title: "\u5546\u54C1\u6570\u91CF",
12556
+ width: 150
12557
+ }, {
12558
+ dataIndex: 'goodsPrice',
12559
+ title: "\u5546\u54C1\u5355\u4EF7",
12560
+ width: 150
12561
+ }, {
12562
+ dataIndex: 'shopPrice',
12563
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12564
+ width: 150
12565
+ }, {
12566
+ dataIndex: 'isGift',
12567
+ title: "\u662F\u5426\u8D60\u54C1",
12568
+ width: 150,
12569
+ render: function render(val) {
12570
+ return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12571
+ }
12572
+ }],
12573
+ //百胜E3商品信息
12574
+ BS_E3_GOODS: [{
12575
+ dataIndex: 'sku',
12576
+ title: "SKU",
12564
12577
  align: 'center',
12565
- ellipsis: true
12566
- }, item);
12567
- if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12568
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12569
- render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12570
- disabled: disabled,
12571
- updateHandle: updateHandle
12572
- })
12573
- });
12574
- }
12575
- return newItem;
12576
- });
12577
- };
12578
-
12579
- var SelectTradeGoods = function SelectTradeGoods(_ref) {
12580
- var columns = _ref.columns,
12581
- dataSource = _ref.dataSource,
12582
- selectedRowKeys = _ref.selectedRowKeys,
12583
- onChangeSelectedKeys = _ref.onChangeSelectedKeys;
12584
- var _useState = useState(false),
12585
- _useState2 = _slicedToArray(_useState, 2),
12586
- tradeGoodsVisible = _useState2[0],
12587
- setTradeGoodsVisible = _useState2[1];
12588
- var openModal = function openModal() {
12589
- return setTradeGoodsVisible(true);
12590
- };
12591
- var closeModal = function closeModal() {
12592
- return setTradeGoodsVisible(false);
12593
- };
12594
- var rowSelection = {
12595
- selectedRowKeys: selectedRowKeys,
12596
- onChange: onChangeSelectedKeys
12597
- };
12598
- console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12599
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
12600
- type: "link",
12601
- onClick: openModal
12602
- }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
12603
- title: "\u8BA2\u5355\u5546\u54C1",
12604
- visible: tradeGoodsVisible,
12605
- footer: null,
12606
- onCancel: closeModal
12607
- }, /*#__PURE__*/React.createElement(Table, {
12608
- rowKey: "id",
12609
- rowSelection: rowSelection,
12610
- columns: columns,
12611
- dataSource: dataSource,
12612
- pagination: false,
12613
- scroll: {
12614
- x: 500,
12615
- y: 500
12616
- }
12617
- }), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12618
- };
12619
- var GoodItem$1 = function GoodItem(props) {
12620
- var _props$value = props.value,
12621
- value = _props$value === void 0 ? [] : _props$value,
12622
- type = props.type,
12623
- onChange = props.onChange,
12624
- disabled = props.disabled,
12625
- _props$showHeader = props.showHeader,
12626
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12627
- width = props.width,
12628
- _props$shopList = props.shopList,
12629
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
12630
- _props$shopId = props.shopId,
12631
- shopId = _props$shopId === void 0 ? '' : _props$shopId,
12632
- _props$maxLength = props.maxLength,
12633
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12634
- _props$showChangeBtn = props.showChangeBtn,
12635
- showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12636
- _props$showModeBtn = props.showModeBtn,
12637
- showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
12638
- _props$isStrict = props.isStrict,
12639
- isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
12640
- _props$tableSelect = props.tableSelect,
12641
- tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12642
- _props$selectType = props.selectType,
12643
- selectType = _props$selectType === void 0 ? '' : _props$selectType,
12644
- _props$otherOperation = props.otherOperations,
12645
- otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12646
- _props$canUpdateNumbe = props.canUpdateNumber,
12578
+ ellipsis: true,
12579
+ width: 150
12580
+ }, {
12581
+ dataIndex: 'skuId',
12582
+ title: "SKU ID",
12583
+ align: 'center',
12584
+ ellipsis: true,
12585
+ width: 150
12586
+ }, {
12587
+ dataIndex: 'goodsName',
12588
+ title: "\u5546\u54C1\u540D\u79F0",
12589
+ align: 'center',
12590
+ ellipsis: true,
12591
+ width: 150
12592
+ }, {
12593
+ dataIndex: 'goodsShortName',
12594
+ title: "\u5546\u54C1\u7B80\u79F0",
12595
+ align: 'center',
12596
+ ellipsis: true,
12597
+ width: 100
12598
+ }, {
12599
+ dataIndex: 'picPath',
12600
+ title: "\u5546\u54C1\u56FE\u7247",
12601
+ align: 'center',
12602
+ ellipsis: true,
12603
+ width: 100,
12604
+ render: function render(val) {
12605
+ return /*#__PURE__*/React.createElement(Image, {
12606
+ width: 60,
12607
+ src: val
12608
+ });
12609
+ }
12610
+ }, {
12611
+ dataIndex: 'goodsSn',
12612
+ title: "\u8D27\u53F7",
12613
+ align: 'center',
12614
+ ellipsis: true,
12615
+ width: 150
12616
+ }, {
12617
+ dataIndex: 'goodsId',
12618
+ title: "\u8D27\u53F7ID",
12619
+ align: 'center',
12620
+ ellipsis: true,
12621
+ width: 150
12622
+ }, {
12623
+ dataIndex: 'colorName',
12624
+ title: "\u989C\u8272\u540D\u79F0",
12625
+ align: 'center',
12626
+ ellipsis: true,
12627
+ width: 100
12628
+ }, {
12629
+ dataIndex: 'colorCode',
12630
+ title: "\u989C\u8272\u4EE3\u7801",
12631
+ align: 'center',
12632
+ ellipsis: true,
12633
+ width: 150
12634
+ }, {
12635
+ dataIndex: 'sizeName',
12636
+ title: "\u5C3A\u7801\u540D\u79F0",
12637
+ align: 'center',
12638
+ ellipsis: true,
12639
+ width: 100
12640
+ }, {
12641
+ dataIndex: 'sizeCode',
12642
+ title: "\u5C3A\u7801\u4EE3\u7801",
12643
+ align: 'center',
12644
+ ellipsis: true,
12645
+ width: 100
12646
+ }, {
12647
+ dataIndex: 'brandName',
12648
+ title: "\u54C1\u724C\u540D\u79F0",
12649
+ align: 'center',
12650
+ ellipsis: true,
12651
+ width: 150
12652
+ }, {
12653
+ dataIndex: 'goodsNumber',
12654
+ title: "\u5546\u54C1\u6570\u91CF",
12655
+ align: 'center',
12656
+ ellipsis: true,
12657
+ width: 100,
12658
+ render: function render(val, record, index) {
12659
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12660
+ style: {
12661
+ width: 70
12662
+ },
12663
+ value: val,
12664
+ min: 1,
12665
+ precision: 0,
12666
+ onChange: function onChange(num) {
12667
+ return updateHandle(num, index, 'goodsNumber');
12668
+ }
12669
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12670
+ }
12671
+ }, {
12672
+ dataIndex: 'goodsPrice',
12673
+ title: "\u5546\u54C1\u5355\u4EF7",
12674
+ align: 'center',
12675
+ ellipsis: true,
12676
+ width: 120,
12677
+ render: function render(val, record, index) {
12678
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12679
+ style: {
12680
+ width: 70
12681
+ },
12682
+ value: val,
12683
+ min: 0,
12684
+ precision: 2,
12685
+ onChange: function onChange(num) {
12686
+ return updateHandle(num, index, 'goodsPrice');
12687
+ }
12688
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12689
+ }
12690
+ }, {
12691
+ dataIndex: 'shopPrice',
12692
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12693
+ align: 'center',
12694
+ ellipsis: true,
12695
+ width: 120
12696
+ }, {
12697
+ dataIndex: 'sharePrice',
12698
+ title: "\u5206\u644A\u4EF7",
12699
+ align: 'center',
12700
+ ellipsis: true,
12701
+ width: 120
12702
+ }, {
12703
+ dataIndex: 'sharePayment',
12704
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12705
+ align: 'center',
12706
+ ellipsis: true,
12707
+ width: 120
12708
+ }, {
12709
+ dataIndex: 'payment',
12710
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12711
+ align: 'center',
12712
+ ellipsis: true,
12713
+ width: 120,
12714
+ render: function render(val, record, index) {
12715
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12716
+ style: {
12717
+ width: 70
12718
+ },
12719
+ value: val,
12720
+ min: 0,
12721
+ precision: 2,
12722
+ onChange: function onChange(num) {
12723
+ return updateHandle(num, index, 'payment');
12724
+ }
12725
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12726
+ }
12727
+ }, {
12728
+ dataIndex: 'tcSku',
12729
+ title: "\u5957\u9910SKU",
12730
+ align: 'center',
12731
+ ellipsis: true,
12732
+ width: 150
12733
+ }, {
12734
+ dataIndex: 'tcGoodsNumber',
12735
+ title: "\u5957\u9910\u5957\u6570",
12736
+ align: 'center',
12737
+ ellipsis: true,
12738
+ width: 100
12739
+ }, {
12740
+ dataIndex: 'taoCanSingleSl',
12741
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12742
+ align: 'center',
12743
+ ellipsis: true,
12744
+ width: 100
12745
+ }, {
12746
+ dataIndex: 'isGift',
12747
+ title: "\u662F\u5426\u8D60\u54C1",
12748
+ align: 'center',
12749
+ ellipsis: true,
12750
+ width: 100,
12751
+ render: function render(val) {
12752
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12753
+ }
12754
+ }],
12755
+ BS_GOODS: [{
12756
+ dataIndex: 'mark',
12757
+ title: "\u5546\u54C1\u6807\u8BB0",
12758
+ align: 'center',
12759
+ ellipsis: true,
12760
+ width: 70,
12761
+ render: function render(val, record, index) {
12762
+ return /*#__PURE__*/React.createElement(Select, {
12763
+ options: [{
12764
+ label: '是',
12765
+ value: '是'
12766
+ }, {
12767
+ label: '否',
12768
+ value: '否'
12769
+ }],
12770
+ disabled: disabled,
12771
+ value: val,
12772
+ onChange: function onChange(val) {
12773
+ return updateHandle(val, index, 'mark');
12774
+ }
12775
+ });
12776
+ }
12777
+ }, {
12778
+ dataIndex: 'skuName',
12779
+ title: "".concat(text, "sku\u540D\u79F0"),
12780
+ align: 'center',
12781
+ ellipsis: true,
12782
+ width: 250
12783
+ }, {
12784
+ dataIndex: 'sku',
12785
+ title: "".concat(text, "sku\u7F16\u7801"),
12786
+ align: 'center',
12787
+ ellipsis: true,
12788
+ width: 100
12789
+ }, {
12790
+ dataIndex: 'name',
12791
+ title: "".concat(text, "\u540D\u79F0"),
12792
+ align: 'center',
12793
+ ellipsis: true,
12794
+ width: 250
12795
+ }, {
12796
+ dataIndex: 'pic',
12797
+ title: "\u56FE\u7247",
12798
+ align: 'center',
12799
+ ellipsis: true,
12800
+ width: 100,
12801
+ render: function render(val) {
12802
+ return /*#__PURE__*/React.createElement(Image, {
12803
+ width: 60,
12804
+ src: val
12805
+ });
12806
+ }
12807
+ }, {
12808
+ dataIndex: 'code',
12809
+ title: "".concat(text, "\u7F16\u7801"),
12810
+ align: 'center',
12811
+ ellipsis: true,
12812
+ width: 100
12813
+ }, {
12814
+ dataIndex: 'money',
12815
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12816
+ align: 'center',
12817
+ ellipsis: true,
12818
+ width: 100
12819
+ }, {
12820
+ dataIndex: 'number',
12821
+ title: "".concat(text, "\u6570\u91CF"),
12822
+ align: 'center',
12823
+ ellipsis: true,
12824
+ width: 100,
12825
+ render: function render(val, record, index) {
12826
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12827
+ style: {
12828
+ width: 70
12829
+ },
12830
+ value: val,
12831
+ min: 1,
12832
+ precision: 0,
12833
+ onChange: function onChange(num) {
12834
+ return updateHandle(num, index, 'number');
12835
+ }
12836
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12837
+ }
12838
+ }, {
12839
+ dataIndex: 'share',
12840
+ title: "\u5206\u644A\u4EF7",
12841
+ align: 'center',
12842
+ ellipsis: true,
12843
+ width: 70
12844
+ }, {
12845
+ dataIndex: 'type',
12846
+ title: "\u8D60\u54C1\u7C7B\u578B",
12847
+ align: 'center',
12848
+ ellipsis: true,
12849
+ width: 100
12850
+ }, {
12851
+ dataIndex: 'batch',
12852
+ title: "\u6279\u6B21\u53F7",
12853
+ align: 'center',
12854
+ ellipsis: true,
12855
+ width: 100
12856
+ }, {
12857
+ dataIndex: 'expireDate',
12858
+ title: "\u6709\u6548\u671F",
12859
+ align: 'center',
12860
+ ellipsis: true,
12861
+ width: 100
12862
+ }]
12863
+ };
12864
+ };
12865
+
12866
+ var renderGiftType = function renderGiftType(val) {
12867
+ var giftTypeMap = {
12868
+ 0: '非赠品',
12869
+ 1: '自动赠送',
12870
+ 2: '手工赠送',
12871
+ 3: '回购自动送赠品',
12872
+ 4: '前N有礼送赠品',
12873
+ 6: '天猫优仓赠品',
12874
+ 7: '淘宝CRM会员送赠'
12875
+ };
12876
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12877
+ };
12878
+ var renderFieldMap = {
12879
+ num: function num(_ref) {
12880
+ var disabled = _ref.disabled,
12881
+ updateHandle = _ref.updateHandle;
12882
+ return function (val, record, index) {
12883
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12884
+ style: {
12885
+ width: 70
12886
+ },
12887
+ value: val,
12888
+ min: 1,
12889
+ precision: 0,
12890
+ onChange: function onChange(num) {
12891
+ return updateHandle(num, index, 'num');
12892
+ }
12893
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12894
+ };
12895
+ },
12896
+ giftType: function giftType() {
12897
+ return renderGiftType;
12898
+ }
12899
+ };
12900
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12901
+ var disabled = _ref2.disabled,
12902
+ updateHandle = _ref2.updateHandle,
12903
+ operate = _ref2.operate;
12904
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12905
+ var newItem = _objectSpread2({
12906
+ align: 'center',
12907
+ ellipsis: true
12908
+ }, item);
12909
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12910
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12911
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12912
+ disabled: disabled,
12913
+ updateHandle: updateHandle
12914
+ })
12915
+ });
12916
+ }
12917
+ return newItem;
12918
+ });
12919
+ };
12920
+
12921
+ var getColumns$1 = function getColumns(_ref) {
12922
+ var _ref$text = _ref.text,
12923
+ text = _ref$text === void 0 ? '' : _ref$text,
12924
+ disabled = _ref.disabled,
12925
+ updateHandle = _ref.updateHandle;
12926
+ return {
12927
+ //旺店通补发商品信息
12928
+ WDT_REISSUE_GOODS: [{
12929
+ dataIndex: 'goodId',
12930
+ title: "\u5546\u54C1ID",
12931
+ width: 120
12932
+ }, {
12933
+ dataIndex: 'goodNo',
12934
+ title: "\u5546\u54C1\u7F16\u7801",
12935
+ width: 200
12936
+ }, {
12937
+ dataIndex: 'goodName',
12938
+ title: "\u5546\u54C1\u540D\u79F0",
12939
+ width: 200
12940
+ }, {
12941
+ dataIndex: 'specId',
12942
+ title: "SKUID",
12943
+ width: 150
12944
+ }, {
12945
+ dataIndex: 'specNo',
12946
+ title: "\u5546\u54C1SKU\u7F16\u7801",
12947
+ width: 200
12948
+ }, {
12949
+ dataIndex: 'specName',
12950
+ title: "\u5546\u54C1SKU\u540D\u79F0",
12951
+ width: 250
12952
+ }, {
12953
+ dataIndex: 'orderPrice',
12954
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12955
+ width: 200
12956
+ }, {
12957
+ dataIndex: 'num',
12958
+ title: "\u6570\u91CF",
12959
+ width: 100
12960
+ }, {
12961
+ dataIndex: 'sharePrice',
12962
+ title: "\u5206\u644A\u4EF7",
12963
+ width: 150
12964
+ }, {
12965
+ dataIndex: 'giftType',
12966
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12967
+ width: 100,
12968
+ render: renderGiftType
12969
+ }],
12970
+ //旺店通商品信息
12971
+ WDT_GOODS: [{
12972
+ dataIndex: 'goodId',
12973
+ title: "\u5546\u54C1ID",
12974
+ align: 'center',
12975
+ ellipsis: true,
12976
+ width: 70
12977
+ }, {
12978
+ dataIndex: 'goodNo',
12979
+ title: "\u5546\u54C1\u7F16\u7801",
12980
+ align: 'center',
12981
+ ellipsis: true,
12982
+ width: 180
12983
+ }, {
12984
+ dataIndex: 'goodName',
12985
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12986
+ align: 'center',
12987
+ ellipsis: true,
12988
+ width: 250
12989
+ }, {
12990
+ dataIndex: 'specId',
12991
+ title: "".concat(text, "SKUID"),
12992
+ align: 'center',
12993
+ ellipsis: true,
12994
+ width: 100
12995
+ }, {
12996
+ dataIndex: 'specNo',
12997
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12998
+ align: 'center',
12999
+ ellipsis: true,
13000
+ width: 180
13001
+ }, {
13002
+ dataIndex: 'specName',
13003
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13004
+ align: 'center',
13005
+ ellipsis: true,
13006
+ width: 250
13007
+ }, {
13008
+ dataIndex: 'orderPrice',
13009
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
13010
+ align: 'center',
13011
+ ellipsis: true,
13012
+ width: 100
13013
+ }, {
13014
+ dataIndex: 'num',
13015
+ title: "".concat(text, "\u6570\u91CF"),
13016
+ align: 'center',
13017
+ ellipsis: true,
13018
+ width: 100,
13019
+ render: function render(val, record, index) {
13020
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13021
+ style: {
13022
+ width: 70
13023
+ },
13024
+ value: val,
13025
+ min: 1,
13026
+ precision: 0,
13027
+ onChange: function onChange(num) {
13028
+ return updateHandle(num, index, 'num');
13029
+ }
13030
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13031
+ }
13032
+ }, {
13033
+ dataIndex: 'sharePrice',
13034
+ title: "\u5206\u644A\u4EF7",
13035
+ align: 'center',
13036
+ ellipsis: true,
13037
+ width: 70
13038
+ }, {
13039
+ dataIndex: 'giftType',
13040
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13041
+ align: 'center',
13042
+ ellipsis: true,
13043
+ width: 100,
13044
+ render: function render(val) {
13045
+ var giftTypeMap = {
13046
+ 0: '非赠品',
13047
+ 1: '自动赠送',
13048
+ 2: '手工赠送',
13049
+ 3: '回购自动送赠品',
13050
+ 4: '前N有礼送赠品',
13051
+ 6: '天猫优仓赠品',
13052
+ 7: '淘宝CRM会员送赠'
13053
+ };
13054
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13055
+ }
13056
+ }],
13057
+ //旺店通退货商品信息
13058
+ WDT_RETURN_GOODS: [{
13059
+ dataIndex: 'goodId',
13060
+ title: "\u5546\u54C1ID",
13061
+ align: 'center',
13062
+ ellipsis: true,
13063
+ width: 70
13064
+ }, {
13065
+ dataIndex: 'goodNo',
13066
+ title: "\u5546\u54C1\u7F16\u7801",
13067
+ align: 'center',
13068
+ ellipsis: true,
13069
+ width: 180
13070
+ }, {
13071
+ dataIndex: 'goodName',
13072
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13073
+ align: 'center',
13074
+ ellipsis: true,
13075
+ width: 250
13076
+ }, {
13077
+ dataIndex: 'specId',
13078
+ title: "".concat(text, "SKUID"),
13079
+ align: 'center',
13080
+ ellipsis: true,
13081
+ width: 100
13082
+ }, {
13083
+ dataIndex: 'specNo',
13084
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13085
+ align: 'center',
13086
+ ellipsis: true,
13087
+ width: 180
13088
+ }, {
13089
+ dataIndex: 'specName',
13090
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13091
+ align: 'center',
13092
+ ellipsis: true,
13093
+ width: 250
13094
+ }, {
13095
+ dataIndex: 'num',
13096
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13097
+ align: 'center',
13098
+ ellipsis: true,
13099
+ width: 100,
13100
+ render: function render(val, record, index) {
13101
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13102
+ style: {
13103
+ width: 70
13104
+ },
13105
+ value: val,
13106
+ min: 1,
13107
+ precision: 0,
13108
+ onChange: function onChange(num) {
13109
+ return updateHandle(num, index, 'num');
13110
+ }
13111
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13112
+ }
13113
+ }, {
13114
+ dataIndex: 'sharePrice',
13115
+ title: "\u5206\u644A\u4EF7",
13116
+ align: 'center',
13117
+ ellipsis: true,
13118
+ width: 80,
13119
+ render: function render(val, record, index) {
13120
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13121
+ style: {
13122
+ width: 70
13123
+ },
13124
+ value: val,
13125
+ min: 0,
13126
+ onChange: function onChange(value) {
13127
+ return updateHandle(value, index, 'sharePrice');
13128
+ }
13129
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13130
+ }
13131
+ }, {
13132
+ dataIndex: 'returnPrice',
13133
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13134
+ align: 'center',
13135
+ ellipsis: true,
13136
+ width: 100
13137
+ }, {
13138
+ dataIndex: 'giftType',
13139
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13140
+ align: 'center',
13141
+ ellipsis: true,
13142
+ width: 100,
13143
+ render: function render(val) {
13144
+ var giftTypeMap = {
13145
+ 0: '非赠品',
13146
+ 1: '自动赠送',
13147
+ 2: '手工赠送',
13148
+ 3: '回购自动送赠品',
13149
+ 4: '前N有礼送赠品',
13150
+ 6: '天猫优仓赠品',
13151
+ 7: '淘宝CRM会员送赠'
13152
+ };
13153
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13154
+ }
13155
+ }, {
13156
+ dataIndex: 'type',
13157
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13158
+ align: 'center',
13159
+ ellipsis: true,
13160
+ width: 100,
13161
+ render: function render(val, record, index) {
13162
+ var options = [{
13163
+ label: '单品',
13164
+ value: '1'
13165
+ }, {
13166
+ label: '组合装',
13167
+ value: '2'
13168
+ }];
13169
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13170
+ style: {
13171
+ width: 70
13172
+ },
13173
+ options: options,
13174
+ value: val,
13175
+ onChange: function onChange(value) {
13176
+ return updateHandle(value, index, 'type');
13177
+ }
13178
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13179
+ }
13180
+ }],
13181
+ //旺店通换出商品信息
13182
+ WDT_EXCHANGE_GOODS: [{
13183
+ dataIndex: 'goodId',
13184
+ title: "\u5546\u54C1ID",
13185
+ align: 'center',
13186
+ ellipsis: true,
13187
+ width: 70
13188
+ }, {
13189
+ dataIndex: 'goodNo',
13190
+ title: "\u5546\u54C1\u7F16\u7801",
13191
+ align: 'center',
13192
+ ellipsis: true,
13193
+ width: 180
13194
+ }, {
13195
+ dataIndex: 'goodName',
13196
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13197
+ align: 'center',
13198
+ ellipsis: true,
13199
+ width: 250
13200
+ }, {
13201
+ dataIndex: 'specId',
13202
+ title: "".concat(text, "SKUID"),
13203
+ align: 'center',
13204
+ ellipsis: true,
13205
+ width: 100
13206
+ }, {
13207
+ dataIndex: 'specNo',
13208
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13209
+ align: 'center',
13210
+ ellipsis: true,
13211
+ width: 180
13212
+ }, {
13213
+ dataIndex: 'specName',
13214
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13215
+ align: 'center',
13216
+ ellipsis: true,
13217
+ width: 250
13218
+ }, {
13219
+ dataIndex: 'num',
13220
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13221
+ align: 'center',
13222
+ ellipsis: true,
13223
+ width: 100,
13224
+ render: function render(val, record, index) {
13225
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13226
+ style: {
13227
+ width: 70
13228
+ },
13229
+ value: val,
13230
+ min: 1,
13231
+ precision: 0,
13232
+ onChange: function onChange(num) {
13233
+ return updateHandle(num, index, 'num');
13234
+ }
13235
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13236
+ }
13237
+ }, {
13238
+ dataIndex: 'price',
13239
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13240
+ align: 'center',
13241
+ ellipsis: true,
13242
+ width: 100,
13243
+ render: function render(val, record, index) {
13244
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13245
+ style: {
13246
+ width: 70
13247
+ },
13248
+ value: val,
13249
+ min: 0,
13250
+ onChange: function onChange(value) {
13251
+ return updateHandle(value, index, 'price');
13252
+ }
13253
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13254
+ }
13255
+ }, {
13256
+ dataIndex: 'exchangePrice',
13257
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13258
+ align: 'center',
13259
+ ellipsis: true,
13260
+ width: 100
13261
+ }, {
13262
+ dataIndex: 'giftType',
13263
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13264
+ align: 'center',
13265
+ ellipsis: true,
13266
+ width: 100,
13267
+ render: function render(val) {
13268
+ var giftTypeMap = {
13269
+ 0: '非赠品',
13270
+ 1: '自动赠送',
13271
+ 2: '手工赠送',
13272
+ 3: '回购自动送赠品',
13273
+ 4: '前N有礼送赠品',
13274
+ 6: '天猫优仓赠品',
13275
+ 7: '淘宝CRM会员送赠'
13276
+ };
13277
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13278
+ }
13279
+ }, {
13280
+ dataIndex: 'type',
13281
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13282
+ align: 'center',
13283
+ ellipsis: true,
13284
+ width: 100,
13285
+ render: function render(val, record, index) {
13286
+ var options = [{
13287
+ label: '单品',
13288
+ value: '1'
13289
+ }, {
13290
+ label: '组合装',
13291
+ value: '2'
13292
+ }];
13293
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13294
+ style: {
13295
+ width: 70
13296
+ },
13297
+ options: options,
13298
+ value: val,
13299
+ onChange: function onChange(value) {
13300
+ return updateHandle(value, index, 'type');
13301
+ }
13302
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13303
+ }
13304
+ }]
13305
+ };
13306
+ };
13307
+
13308
+ var getColumns$2 = function getColumns(_ref) {
13309
+ var _ref$text = _ref.text,
13310
+ text = _ref$text === void 0 ? '' : _ref$text,
13311
+ disabled = _ref.disabled,
13312
+ updateHandle = _ref.updateHandle;
13313
+ return {
13314
+ //万里牛商品信息
13315
+ WLN_GOODS: [{
13316
+ dataIndex: 'skuName',
13317
+ title: "".concat(text, "sku\u540D\u79F0"),
13318
+ align: 'center',
13319
+ ellipsis: true,
13320
+ width: 250
13321
+ }, {
13322
+ dataIndex: 'sku',
13323
+ title: "".concat(text, "sku\u7F16\u7801"),
13324
+ align: 'center',
13325
+ ellipsis: true,
13326
+ width: 100
13327
+ }, {
13328
+ dataIndex: 'name',
13329
+ title: "".concat(text, "\u540D\u79F0"),
13330
+ align: 'center',
13331
+ ellipsis: true,
13332
+ width: 250
13333
+ }, {
13334
+ dataIndex: 'pic',
13335
+ title: "\u56FE\u7247",
13336
+ align: 'center',
13337
+ ellipsis: true,
13338
+ width: 100,
13339
+ render: function render(val) {
13340
+ return /*#__PURE__*/React.createElement(Image, {
13341
+ width: 60,
13342
+ src: val
13343
+ });
13344
+ }
13345
+ }, {
13346
+ dataIndex: 'code',
13347
+ title: "".concat(text, "\u7F16\u7801"),
13348
+ align: 'center',
13349
+ ellipsis: true,
13350
+ width: 100
13351
+ }, {
13352
+ dataIndex: 'money',
13353
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13354
+ align: 'center',
13355
+ ellipsis: true,
13356
+ width: 100
13357
+ }, {
13358
+ dataIndex: 'number',
13359
+ title: "".concat(text, "\u6570\u91CF"),
13360
+ align: 'center',
13361
+ ellipsis: true,
13362
+ width: 100,
13363
+ render: function render(val, record, index) {
13364
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13365
+ style: {
13366
+ width: 70
13367
+ },
13368
+ value: val,
13369
+ min: 1,
13370
+ precision: 0,
13371
+ onChange: function onChange(num) {
13372
+ return updateHandle(num, index, 'number');
13373
+ }
13374
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13375
+ }
13376
+ }, {
13377
+ dataIndex: 'share',
13378
+ title: "\u5206\u644A\u4EF7",
13379
+ align: 'center',
13380
+ ellipsis: true,
13381
+ width: 70
13382
+ }, {
13383
+ dataIndex: 'type',
13384
+ title: "\u8D60\u54C1\u7C7B\u578B",
13385
+ align: 'center',
13386
+ ellipsis: true,
13387
+ width: 100
13388
+ }]
13389
+ };
13390
+ };
13391
+
13392
+ var getColumnsMap = function getColumnsMap(args) {
13393
+ var _ref = args || {},
13394
+ _ref$text = _ref.text,
13395
+ text = _ref$text === void 0 ? '' : _ref$text,
13396
+ disabled = _ref.disabled,
13397
+ updateHandle = _ref.updateHandle;
13398
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13399
+ text: text,
13400
+ disabled: disabled,
13401
+ updateHandle: updateHandle
13402
+ })), getColumns$1({
13403
+ text: text,
13404
+ disabled: disabled,
13405
+ updateHandle: updateHandle
13406
+ })), getColumns$2({
13407
+ text: text,
13408
+ disabled: disabled,
13409
+ updateHandle: updateHandle
13410
+ })), {}, {
13411
+ default: [{
13412
+ dataIndex: 'mark',
13413
+ title: "\u5546\u54C1\u6807\u8BB0",
13414
+ align: 'center',
13415
+ ellipsis: true,
13416
+ width: 70,
13417
+ render: function render(val, record, index) {
13418
+ return /*#__PURE__*/React.createElement(Select, {
13419
+ options: [{
13420
+ label: '是',
13421
+ value: '是'
13422
+ }, {
13423
+ label: '否',
13424
+ value: '否'
13425
+ }],
13426
+ disabled: disabled,
13427
+ value: val,
13428
+ onChange: function onChange(val) {
13429
+ return updateHandle(val, index, 'mark');
13430
+ }
13431
+ });
13432
+ }
13433
+ }, {
13434
+ dataIndex: 'skuName',
13435
+ title: "".concat(text, "sku\u540D\u79F0"),
13436
+ align: 'center',
13437
+ ellipsis: true,
13438
+ width: 250
13439
+ }, {
13440
+ dataIndex: 'sku',
13441
+ title: "".concat(text, "sku\u7F16\u7801"),
13442
+ align: 'center',
13443
+ ellipsis: true,
13444
+ width: 100
13445
+ }, {
13446
+ dataIndex: 'name',
13447
+ title: "".concat(text, "\u540D\u79F0"),
13448
+ align: 'center',
13449
+ ellipsis: true,
13450
+ width: 250
13451
+ }, {
13452
+ dataIndex: 'pic',
13453
+ title: "\u56FE\u7247",
13454
+ align: 'center',
13455
+ ellipsis: true,
13456
+ width: 100,
13457
+ render: function render(val) {
13458
+ return /*#__PURE__*/React.createElement(Image, {
13459
+ width: 60,
13460
+ src: val
13461
+ });
13462
+ }
13463
+ }, {
13464
+ dataIndex: 'code',
13465
+ title: "".concat(text, "\u7F16\u7801"),
13466
+ align: 'center',
13467
+ ellipsis: true,
13468
+ width: 100
13469
+ }, {
13470
+ dataIndex: 'money',
13471
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13472
+ align: 'center',
13473
+ ellipsis: true,
13474
+ width: 100
13475
+ }, {
13476
+ dataIndex: 'number',
13477
+ title: "".concat(text, "\u6570\u91CF"),
13478
+ align: 'center',
13479
+ ellipsis: true,
13480
+ width: 100,
13481
+ render: function render(val, record, index) {
13482
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13483
+ style: {
13484
+ width: 70
13485
+ },
13486
+ value: val,
13487
+ min: 1,
13488
+ precision: 0,
13489
+ onChange: function onChange(num) {
13490
+ return updateHandle(num, index, 'number');
13491
+ }
13492
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13493
+ }
13494
+ }, {
13495
+ dataIndex: 'share',
13496
+ title: "\u5206\u644A\u4EF7",
13497
+ align: 'center',
13498
+ ellipsis: true,
13499
+ width: 70
13500
+ }, {
13501
+ dataIndex: 'type',
13502
+ title: "\u8D60\u54C1\u7C7B\u578B",
13503
+ align: 'center',
13504
+ ellipsis: true,
13505
+ width: 100
13506
+ }]
13507
+ });
13508
+ };
13509
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13510
+ var clone_columnsMap = cloneDeep(getColumnsMap());
13511
+ var newColumns = {};
13512
+ Object.keys(clone_columnsMap).forEach(function (key) {
13513
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
13514
+ return {
13515
+ title: col.title,
13516
+ dataIndex: col.dataIndex
13517
+ };
13518
+ });
13519
+ });
13520
+ return newColumns;
13521
+ };
13522
+ var columnsBaseInfoMap = getColumnsBaseInfo();
13523
+
13524
+ var renderFieldMap$1 = {
13525
+ goodsNumber: function goodsNumber(_ref) {
13526
+ var disabled = _ref.disabled,
13527
+ updateHandle = _ref.updateHandle;
13528
+ return function (val, record, index) {
13529
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13530
+ style: {
13531
+ width: 70
13532
+ },
13533
+ value: val,
13534
+ min: 1,
13535
+ precision: 0,
13536
+ onChange: function onChange(num) {
13537
+ return updateHandle(num, index, 'goodsNumber');
13538
+ }
13539
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13540
+ };
13541
+ },
13542
+ goodsPrice: function goodsPrice(_ref2) {
13543
+ var disabled = _ref2.disabled,
13544
+ updateHandle = _ref2.updateHandle;
13545
+ return function (val, record, index) {
13546
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13547
+ style: {
13548
+ width: 70
13549
+ },
13550
+ value: val,
13551
+ min: 0,
13552
+ onChange: function onChange(value) {
13553
+ return updateHandle(value, index, 'goodsPrice');
13554
+ }
13555
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13556
+ };
13557
+ },
13558
+ isGift: function isGift(_ref3) {
13559
+ var disabled = _ref3.disabled,
13560
+ updateHandle = _ref3.updateHandle;
13561
+ return function (val, record, index) {
13562
+ var options = [{
13563
+ label: '是',
13564
+ value: 1
13565
+ }, {
13566
+ label: '否',
13567
+ value: 0
13568
+ }];
13569
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13570
+ style: {
13571
+ width: 70
13572
+ },
13573
+ options: options,
13574
+ value: val,
13575
+ onChange: function onChange(value) {
13576
+ return updateHandle(value, index, 'isGift');
13577
+ },
13578
+ getPopupContainer: function getPopupContainer() {
13579
+ return document.getElementById('bsE3ReissueGoods');
13580
+ }
13581
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
13582
+ };
13583
+ }
13584
+ };
13585
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13586
+ var disabled = _ref4.disabled,
13587
+ updateHandle = _ref4.updateHandle,
13588
+ operate = _ref4.operate;
13589
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
13590
+ var newItem = _objectSpread2({
13591
+ align: 'center',
13592
+ ellipsis: true
13593
+ }, item);
13594
+ if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
13595
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13596
+ render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
13597
+ disabled: disabled,
13598
+ updateHandle: updateHandle
13599
+ })
13600
+ });
13601
+ }
13602
+ return newItem;
13603
+ });
13604
+ };
13605
+
13606
+ var MAIN_FIELD = 'uuid';
13607
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
13608
+ var columns = _ref.columns,
13609
+ dataSource = _ref.dataSource,
13610
+ selectedRowKeys = _ref.selectedRowKeys,
13611
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
13612
+ var _useState = useState(false),
13613
+ _useState2 = _slicedToArray(_useState, 2),
13614
+ tradeGoodsVisible = _useState2[0],
13615
+ setTradeGoodsVisible = _useState2[1];
13616
+ var openModal = function openModal() {
13617
+ return setTradeGoodsVisible(true);
13618
+ };
13619
+ var closeModal = function closeModal() {
13620
+ return setTradeGoodsVisible(false);
13621
+ };
13622
+ var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13623
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13624
+ }), selectedRowKeys);
13625
+ var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13626
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13627
+ }));
13628
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
13629
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
13630
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
13631
+ };
13632
+ var rowSelection = {
13633
+ selectedRowKeys: selectedRowKeys,
13634
+ onChange: handleChangeSelectedKeys
13635
+ };
13636
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
13637
+ type: "link",
13638
+ onClick: openModal
13639
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
13640
+ title: "\u8BA2\u5355\u5546\u54C1",
13641
+ visible: tradeGoodsVisible,
13642
+ footer: null,
13643
+ onCancel: closeModal
13644
+ }, /*#__PURE__*/React.createElement(Table, {
13645
+ rowKey: MAIN_FIELD,
13646
+ rowSelection: rowSelection,
13647
+ columns: columns,
13648
+ dataSource: dataSource,
13649
+ pagination: false,
13650
+ scroll: {
13651
+ x: 500,
13652
+ y: 500
13653
+ }
13654
+ }), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
13655
+ };
13656
+ var getButtonText = function getButtonText() {
13657
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13658
+ if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13659
+ return '选择百胜ERP商品';
13660
+ }
13661
+ if (['WDT_REISSUE_GOODS'].includes(type)) {
13662
+ return '选择旺店通商品';
13663
+ }
13664
+ return '选择商品';
13665
+ };
13666
+ var GoodItem$1 = function GoodItem(props) {
13667
+ var _props$value = props.value,
13668
+ value = _props$value === void 0 ? [] : _props$value,
13669
+ type = props.type,
13670
+ onChange = props.onChange,
13671
+ disabled = props.disabled,
13672
+ _props$showHeader = props.showHeader,
13673
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
13674
+ width = props.width,
13675
+ _props$shopList = props.shopList,
13676
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
13677
+ _props$shopId = props.shopId,
13678
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
13679
+ _props$maxLength = props.maxLength,
13680
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
13681
+ _props$showChangeBtn = props.showChangeBtn,
13682
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
13683
+ _props$showModeBtn = props.showModeBtn,
13684
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
13685
+ _props$isStrict = props.isStrict,
13686
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
13687
+ _props$tableSelect = props.tableSelect,
13688
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
13689
+ _props$selectType = props.selectType,
13690
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
13691
+ _props$otherOperation = props.otherOperations,
13692
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
13693
+ _props$canUpdateNumbe = props.canUpdateNumber,
12647
13694
  canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12648
13695
  shopCode = props.shopCode,
12649
13696
  _props$companyKey = props.companyKey,
@@ -12671,7 +13718,7 @@ var GoodItem$1 = function GoodItem(props) {
12671
13718
  // TODO: 商品订单中以选中商品
12672
13719
  var selectedGoods = useMemo(function () {
12673
13720
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
12674
- return v.id;
13721
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
12675
13722
  });
12676
13723
  }, [value]);
12677
13724
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -12711,501 +13758,27 @@ var GoodItem$1 = function GoodItem(props) {
12711
13758
  return function (type) {
12712
13759
  var columns = [];
12713
13760
  switch (type) {
12714
- case 'WDT_REISSUE_GOODS':
12715
13761
  case 'WDT_GOODS':
12716
- columns = [{
12717
- dataIndex: 'goodId',
12718
- title: "\u5546\u54C1ID",
12719
- align: 'center',
12720
- ellipsis: true,
12721
- width: 70
12722
- }, {
12723
- dataIndex: 'goodNo',
12724
- title: "\u5546\u54C1\u7F16\u7801",
12725
- align: 'center',
12726
- ellipsis: true,
12727
- width: 180
12728
- }, {
12729
- dataIndex: 'goodName',
12730
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12731
- align: 'center',
12732
- ellipsis: true,
12733
- width: 250
12734
- }, {
12735
- dataIndex: 'specId',
12736
- title: "".concat(text, "SKUID"),
12737
- align: 'center',
12738
- ellipsis: true,
12739
- width: 100
12740
- }, {
12741
- dataIndex: 'specNo',
12742
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12743
- align: 'center',
12744
- ellipsis: true,
12745
- width: 180
12746
- }, {
12747
- dataIndex: 'specName',
12748
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12749
- align: 'center',
12750
- ellipsis: true,
12751
- width: 250
12752
- }, {
12753
- dataIndex: 'orderPrice',
12754
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12755
- align: 'center',
12756
- ellipsis: true,
12757
- width: 100
12758
- }, {
12759
- dataIndex: 'num',
12760
- title: "".concat(text, "\u6570\u91CF"),
12761
- align: 'center',
12762
- ellipsis: true,
12763
- width: 100,
12764
- render: function render(val, record, index) {
12765
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12766
- style: {
12767
- width: 70
12768
- },
12769
- value: val,
12770
- min: 1,
12771
- precision: 0,
12772
- onChange: function onChange(num) {
12773
- return updateHandle(num, index, 'num');
12774
- }
12775
- }) : /*#__PURE__*/React.createElement("span", null, val);
12776
- }
12777
- },
12778
- // {
12779
- // dataIndex: 'actualNum',
12780
- // title: `${text}实发数量`,
12781
- // align: 'center',
12782
- // ellipsis: true,
12783
- // width: 100,
12784
- // },
12785
- {
12786
- dataIndex: 'sharePrice',
12787
- title: "\u5206\u644A\u4EF7",
12788
- align: 'center',
12789
- ellipsis: true,
12790
- width: 70
12791
- }, {
12792
- dataIndex: 'giftType',
12793
- title: "\u8D60\u54C1\u65B9\u5F0F",
12794
- align: 'center',
12795
- ellipsis: true,
12796
- width: 100,
12797
- render: function render(val) {
12798
- var giftTypeMap = {
12799
- 0: '非赠品',
12800
- 1: '自动赠送',
12801
- 2: '手工赠送',
12802
- 3: '回购自动送赠品',
12803
- 4: '前N有礼送赠品',
12804
- 6: '天猫优仓赠品',
12805
- 7: '淘宝CRM会员送赠'
12806
- };
12807
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12808
- }
12809
- }];
12810
- break;
12811
13762
  case 'WDT_RETURN_GOODS':
12812
- {
12813
- columns = [{
12814
- dataIndex: 'goodId',
12815
- title: "\u5546\u54C1ID",
12816
- align: 'center',
12817
- ellipsis: true,
12818
- width: 70
12819
- }, {
12820
- dataIndex: 'goodNo',
12821
- title: "\u5546\u54C1\u7F16\u7801",
12822
- align: 'center',
12823
- ellipsis: true,
12824
- width: 180
12825
- }, {
12826
- dataIndex: 'goodName',
12827
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12828
- align: 'center',
12829
- ellipsis: true,
12830
- width: 250
12831
- }, {
12832
- dataIndex: 'specId',
12833
- title: "".concat(text, "SKUID"),
12834
- align: 'center',
12835
- ellipsis: true,
12836
- width: 100
12837
- }, {
12838
- dataIndex: 'specNo',
12839
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12840
- align: 'center',
12841
- ellipsis: true,
12842
- width: 180
12843
- }, {
12844
- dataIndex: 'specName',
12845
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12846
- align: 'center',
12847
- ellipsis: true,
12848
- width: 250
12849
- }, {
12850
- dataIndex: 'num',
12851
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12852
- align: 'center',
12853
- ellipsis: true,
12854
- width: 100,
12855
- render: function render(val, record, index) {
12856
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12857
- style: {
12858
- width: 70
12859
- },
12860
- value: val,
12861
- min: 1,
12862
- precision: 0,
12863
- onChange: function onChange(num) {
12864
- return updateHandle(num, index, 'num');
12865
- }
12866
- }) : /*#__PURE__*/React.createElement("span", null, val);
12867
- }
12868
- }, {
12869
- dataIndex: 'sharePrice',
12870
- title: "\u5206\u644A\u4EF7",
12871
- align: 'center',
12872
- ellipsis: true,
12873
- width: 80,
12874
- render: function render(val, record, index) {
12875
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12876
- style: {
12877
- width: 70
12878
- },
12879
- value: val,
12880
- min: 0,
12881
- onChange: function onChange(value) {
12882
- return updateHandle(value, index, 'sharePrice');
12883
- }
12884
- }) : /*#__PURE__*/React.createElement("span", null, val);
12885
- }
12886
- }, {
12887
- dataIndex: 'returnPrice',
12888
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
12889
- align: 'center',
12890
- ellipsis: true,
12891
- width: 100
12892
- }, {
12893
- dataIndex: 'giftType',
12894
- title: "\u8D60\u54C1\u65B9\u5F0F",
12895
- align: 'center',
12896
- ellipsis: true,
12897
- width: 100,
12898
- render: function render(val) {
12899
- var giftTypeMap = {
12900
- 0: '非赠品',
12901
- 1: '自动赠送',
12902
- 2: '手工赠送',
12903
- 3: '回购自动送赠品',
12904
- 4: '前N有礼送赠品',
12905
- 6: '天猫优仓赠品',
12906
- 7: '淘宝CRM会员送赠'
12907
- };
12908
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12909
- }
12910
- }, {
12911
- dataIndex: 'type',
12912
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12913
- align: 'center',
12914
- ellipsis: true,
12915
- width: 100,
12916
- render: function render(val, record, index) {
12917
- var options = [{
12918
- label: '单品',
12919
- value: '1'
12920
- }, {
12921
- label: '组合装',
12922
- value: '2'
12923
- }];
12924
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12925
- style: {
12926
- width: 70
12927
- },
12928
- options: options,
12929
- value: val,
12930
- onChange: function onChange(value) {
12931
- return updateHandle(value, index, 'type');
12932
- }
12933
- }) : /*#__PURE__*/React.createElement("span", null, val);
12934
- }
12935
- }];
12936
- }
12937
- break;
12938
13763
  case 'WDT_EXCHANGE_GOODS':
13764
+ case 'BS_E3_GOODS':
13765
+ case 'BS_GOODS':
13766
+ case 'WLN_GOODS':
12939
13767
  {
12940
- columns = [{
12941
- dataIndex: 'goodId',
12942
- title: "\u5546\u54C1ID",
12943
- align: 'center',
12944
- ellipsis: true,
12945
- width: 70
12946
- }, {
12947
- dataIndex: 'goodNo',
12948
- title: "\u5546\u54C1\u7F16\u7801",
12949
- align: 'center',
12950
- ellipsis: true,
12951
- width: 180
12952
- }, {
12953
- dataIndex: 'goodName',
12954
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12955
- align: 'center',
12956
- ellipsis: true,
12957
- width: 250
12958
- }, {
12959
- dataIndex: 'specId',
12960
- title: "".concat(text, "SKUID"),
12961
- align: 'center',
12962
- ellipsis: true,
12963
- width: 100
12964
- }, {
12965
- dataIndex: 'specNo',
12966
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12967
- align: 'center',
12968
- ellipsis: true,
12969
- width: 180
12970
- }, {
12971
- dataIndex: 'specName',
12972
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12973
- align: 'center',
12974
- ellipsis: true,
12975
- width: 250
12976
- }, {
12977
- dataIndex: 'num',
12978
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
12979
- align: 'center',
12980
- ellipsis: true,
12981
- width: 100,
12982
- render: function render(val, record, index) {
12983
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12984
- style: {
12985
- width: 70
12986
- },
12987
- value: val,
12988
- min: 1,
12989
- precision: 0,
12990
- onChange: function onChange(num) {
12991
- return updateHandle(num, index, 'num');
12992
- }
12993
- }) : /*#__PURE__*/React.createElement("span", null, val);
12994
- }
12995
- }, {
12996
- dataIndex: 'price',
12997
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
12998
- align: 'center',
12999
- ellipsis: true,
13000
- width: 100,
13001
- render: function render(val, record, index) {
13002
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13003
- style: {
13004
- width: 70
13005
- },
13006
- value: val,
13007
- min: 0,
13008
- onChange: function onChange(value) {
13009
- return updateHandle(value, index, 'price');
13010
- }
13011
- }) : /*#__PURE__*/React.createElement("span", null, val);
13012
- }
13013
- }, {
13014
- dataIndex: 'exchangePrice',
13015
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13016
- align: 'center',
13017
- ellipsis: true,
13018
- width: 100
13019
- }, {
13020
- dataIndex: 'giftType',
13021
- title: "\u8D60\u54C1\u65B9\u5F0F",
13022
- align: 'center',
13023
- ellipsis: true,
13024
- width: 100,
13025
- render: function render(val) {
13026
- var giftTypeMap = {
13027
- 0: '非赠品',
13028
- 1: '自动赠送',
13029
- 2: '手工赠送',
13030
- 3: '回购自动送赠品',
13031
- 4: '前N有礼送赠品',
13032
- 6: '天猫优仓赠品',
13033
- 7: '淘宝CRM会员送赠'
13034
- };
13035
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13036
- }
13037
- }, {
13038
- dataIndex: 'type',
13039
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13040
- align: 'center',
13041
- ellipsis: true,
13042
- width: 100,
13043
- render: function render(val, record, index) {
13044
- var options = [{
13045
- label: '单品',
13046
- value: '1'
13047
- }, {
13048
- label: '组合装',
13049
- value: '2'
13050
- }];
13051
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
13052
- style: {
13053
- width: 70
13054
- },
13055
- options: options,
13056
- value: val,
13057
- onChange: function onChange(value) {
13058
- return updateHandle(value, index, 'type');
13059
- }
13060
- }) : /*#__PURE__*/React.createElement("span", null, val);
13061
- }
13062
- }];
13768
+ columns = getColumnsMap({
13769
+ text: text,
13770
+ disabled: disabled,
13771
+ updateHandle: updateHandle
13772
+ })[type];
13063
13773
  }
13064
13774
  break;
13065
- case 'BS_E3_GOODS':
13775
+ case 'WDT_REISSUE_GOODS':
13066
13776
  {
13067
- columns = [{
13068
- dataIndex: 'sku',
13069
- title: "SKU",
13070
- align: 'center',
13071
- ellipsis: true,
13072
- width: 150
13073
- }, {
13074
- dataIndex: 'skuId',
13075
- title: "SKU ID",
13076
- align: 'center',
13077
- ellipsis: true,
13078
- width: 150
13079
- }, {
13080
- dataIndex: 'goodsName',
13081
- title: "\u5546\u54C1\u540D\u79F0",
13082
- align: 'center',
13083
- ellipsis: true,
13084
- width: 150
13085
- }, {
13086
- dataIndex: 'goodsShortName',
13087
- title: "\u5546\u54C1\u7B80\u79F0",
13088
- align: 'center',
13089
- ellipsis: true,
13090
- width: 100
13091
- }, {
13092
- dataIndex: 'picPath',
13093
- title: "\u5546\u54C1\u56FE\u7247",
13094
- align: 'center',
13095
- ellipsis: true,
13096
- width: 100,
13097
- render: function render(val) {
13098
- return /*#__PURE__*/React.createElement(Image, {
13099
- width: 60,
13100
- src: val
13101
- });
13102
- }
13103
- }, {
13104
- dataIndex: 'goodsSn',
13105
- title: "\u8D27\u53F7",
13106
- align: 'center',
13107
- ellipsis: true,
13108
- width: 150
13109
- }, {
13110
- dataIndex: 'goodsId',
13111
- title: "\u8D27\u53F7ID",
13112
- align: 'center',
13113
- ellipsis: true,
13114
- width: 150
13115
- }, {
13116
- dataIndex: 'colorName',
13117
- title: "\u989C\u8272\u540D\u79F0",
13118
- align: 'center',
13119
- ellipsis: true,
13120
- width: 100
13121
- }, {
13122
- dataIndex: 'colorCode',
13123
- title: "\u989C\u8272\u4EE3\u7801",
13124
- align: 'center',
13125
- ellipsis: true,
13126
- width: 150
13127
- }, {
13128
- dataIndex: 'sizeName',
13129
- title: "\u5C3A\u7801\u540D\u79F0",
13130
- align: 'center',
13131
- ellipsis: true,
13132
- width: 100
13133
- }, {
13134
- dataIndex: 'sizeCode',
13135
- title: "\u5C3A\u7801\u4EE3\u7801",
13136
- align: 'center',
13137
- ellipsis: true,
13138
- width: 100
13139
- }, {
13140
- dataIndex: 'brandName',
13141
- title: "\u54C1\u724C\u540D\u79F0",
13142
- align: 'center',
13143
- ellipsis: true,
13144
- width: 150
13145
- }, {
13146
- dataIndex: 'goodsNumber',
13147
- title: "\u5546\u54C1\u6570\u91CF",
13148
- align: 'center',
13149
- ellipsis: true,
13150
- width: 100
13151
- }, {
13152
- dataIndex: 'goodsPrice',
13153
- title: "\u5546\u54C1\u5355\u4EF7",
13154
- align: 'center',
13155
- ellipsis: true,
13156
- width: 120
13157
- }, {
13158
- dataIndex: 'shopPrice',
13159
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13160
- align: 'center',
13161
- ellipsis: true,
13162
- width: 120
13163
- }, {
13164
- dataIndex: 'sharePrice',
13165
- title: "\u5206\u644A\u4EF7",
13166
- align: 'center',
13167
- ellipsis: true,
13168
- width: 120
13169
- }, {
13170
- dataIndex: 'sharePayment',
13171
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13172
- align: 'center',
13173
- ellipsis: true,
13174
- width: 120
13175
- }, {
13176
- dataIndex: 'payment',
13177
- title: "\u5B9E\u4ED8\u91D1\u989D",
13178
- align: 'center',
13179
- ellipsis: true,
13180
- width: 120
13181
- }, {
13182
- dataIndex: 'tcSku',
13183
- title: "\u5957\u9910SKU",
13184
- align: 'center',
13185
- ellipsis: true,
13186
- width: 150
13187
- }, {
13188
- dataIndex: 'tcGoodsNumber',
13189
- title: "\u5957\u9910\u5957\u6570",
13190
- align: 'center',
13191
- ellipsis: true,
13192
- width: 100
13193
- }, {
13194
- dataIndex: 'taoCanSingleSl',
13195
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13196
- align: 'center',
13197
- ellipsis: true,
13198
- width: 100
13199
- }, {
13200
- dataIndex: 'isGift',
13201
- title: "\u662F\u5426\u8D60\u54C1",
13202
- align: 'center',
13203
- ellipsis: true,
13204
- width: 100,
13205
- render: function render(val) {
13206
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13207
- }
13208
- }];
13777
+ columns = getWdtReissueGoodColumns({
13778
+ disabled: disabled,
13779
+ updateHandle: updateHandle,
13780
+ operate: operate
13781
+ });
13209
13782
  }
13210
13783
  break;
13211
13784
  case 'BS_E3_REISSUE_GOODS':
@@ -13218,102 +13791,11 @@ var GoodItem$1 = function GoodItem(props) {
13218
13791
  }
13219
13792
  break;
13220
13793
  default:
13221
- columns = [{
13222
- dataIndex: 'mark',
13223
- title: "\u5546\u54C1\u6807\u8BB0",
13224
- align: 'center',
13225
- ellipsis: true,
13226
- width: 70,
13227
- render: function render(val, record, index) {
13228
- return /*#__PURE__*/React.createElement(Select, {
13229
- options: [{
13230
- label: '是',
13231
- value: '是'
13232
- }, {
13233
- label: '否',
13234
- value: '否'
13235
- }],
13236
- disabled: disabled,
13237
- value: val,
13238
- onChange: function onChange(val) {
13239
- return updateHandle(val, index, 'mark');
13240
- }
13241
- });
13242
- }
13243
- }, {
13244
- dataIndex: 'skuName',
13245
- title: "".concat(text, "sku\u540D\u79F0"),
13246
- align: 'center',
13247
- ellipsis: true,
13248
- width: 250
13249
- }, {
13250
- dataIndex: 'sku',
13251
- title: "".concat(text, "sku\u7F16\u7801"),
13252
- align: 'center',
13253
- ellipsis: true,
13254
- width: 100
13255
- }, {
13256
- dataIndex: 'name',
13257
- title: "".concat(text, "\u540D\u79F0"),
13258
- align: 'center',
13259
- ellipsis: true,
13260
- width: 250
13261
- }, {
13262
- dataIndex: 'pic',
13263
- title: "\u56FE\u7247",
13264
- align: 'center',
13265
- ellipsis: true,
13266
- width: 100,
13267
- render: function render(val) {
13268
- return /*#__PURE__*/React.createElement(Image, {
13269
- width: 60,
13270
- src: val
13271
- });
13272
- }
13273
- }, {
13274
- dataIndex: 'code',
13275
- title: "".concat(text, "\u7F16\u7801"),
13276
- align: 'center',
13277
- ellipsis: true,
13278
- width: 100
13279
- }, {
13280
- dataIndex: 'money',
13281
- title: "\u5B9E\u4ED8\u91D1\u989D",
13282
- align: 'center',
13283
- ellipsis: true,
13284
- width: 100
13285
- }, {
13286
- dataIndex: 'number',
13287
- title: "".concat(text, "\u6570\u91CF"),
13288
- align: 'center',
13289
- ellipsis: true,
13290
- width: 100,
13291
- render: function render(val, record, index) {
13292
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13293
- style: {
13294
- width: 70
13295
- },
13296
- value: val,
13297
- min: 1,
13298
- precision: 0,
13299
- onChange: function onChange(num) {
13300
- return updateHandle(num, index, 'number');
13301
- }
13302
- }) : /*#__PURE__*/React.createElement("span", null, val);
13303
- }
13304
- }, {
13305
- dataIndex: 'share',
13306
- title: "\u5206\u644A\u4EF7",
13307
- align: 'center',
13308
- ellipsis: true,
13309
- width: 70
13310
- }, {
13311
- dataIndex: 'type',
13312
- title: "\u8D60\u54C1\u7C7B\u578B",
13313
- align: 'center',
13314
- ellipsis: true,
13315
- width: 100
13316
- }];
13794
+ columns = getColumnsMap({
13795
+ text: text,
13796
+ disabled: disabled,
13797
+ updateHandle: updateHandle
13798
+ })['default'];
13317
13799
  }
13318
13800
  return columns;
13319
13801
  };
@@ -13325,6 +13807,24 @@ var GoodItem$1 = function GoodItem(props) {
13325
13807
  return COLUMNS_INFO(type);
13326
13808
  };
13327
13809
  var newColumns = useMemo(function () {
13810
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
13811
+ var baseInfoColumns = [];
13812
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
13813
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
13814
+ if (isStringArray) {
13815
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
13816
+ return showHeader.includes(col.dataIndex);
13817
+ });
13818
+ } else if (isObjectArray) {
13819
+ baseInfoColumns = showHeader.filter(function (col) {
13820
+ return col.show !== false;
13821
+ }).map(function (col) {
13822
+ var currentCol = initBaseInfoColumns.find(function (item) {
13823
+ return item.dataIndex === col.dataIndex;
13824
+ });
13825
+ return currentCol ? currentCol : undefined;
13826
+ }).filter(Boolean);
13827
+ }
13328
13828
  var columnList = [{
13329
13829
  dataIndex: '',
13330
13830
  title: '序号',
@@ -13334,9 +13834,7 @@ var GoodItem$1 = function GoodItem(props) {
13334
13834
  render: function render(val, record, index) {
13335
13835
  return /*#__PURE__*/React.createElement("span", null, index + 1);
13336
13836
  }
13337
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13338
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13339
- })));
13837
+ }].concat(_toConsumableArray(baseInfoColumns));
13340
13838
  if (!disabled) {
13341
13839
  columnList.push({
13342
13840
  dataIndex: '',
@@ -13414,6 +13912,7 @@ var GoodItem$1 = function GoodItem(props) {
13414
13912
  isGift: '',
13415
13913
  uuid: uuid(),
13416
13914
  canDelete: true,
13915
+ canEdit: true,
13417
13916
  goodsNumber: 1,
13418
13917
  canUpdateNumber: canUpdateNumber
13419
13918
  });
@@ -13485,7 +13984,7 @@ var GoodItem$1 = function GoodItem(props) {
13485
13984
  }), /*#__PURE__*/React.createElement(Button, {
13486
13985
  type: "link",
13487
13986
  onClick: handleChangeGoods
13488
- }, ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? '选择百胜ERP商品' : '选择商品'), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13987
+ }, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13489
13988
  columns: newColumns,
13490
13989
  dataSource: value,
13491
13990
  rowKey: 'uuid',
@@ -15164,7 +15663,7 @@ var typeMap$1 = {
15164
15663
  }
15165
15664
  };
15166
15665
  var wdtReissue = function wdtReissue(props) {
15167
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
15666
+ var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
15168
15667
  var value = props.value,
15169
15668
  onChange = props.onChange,
15170
15669
  _props$reasonList = props.reasonList,
@@ -15324,11 +15823,26 @@ var wdtReissue = function wdtReissue(props) {
15324
15823
  }
15325
15824
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15326
15825
  };
15826
+ var selectedGoodsChange = useCallback(function (skuList) {
15827
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
15828
+ var newValue = _objectSpread2({}, value);
15829
+ // 原订单商品
15830
+ var originTradeGoodList = getGoodDetails({
15831
+ mode: isStrict
15832
+ }) || [];
15833
+ // 当前选中的所有商品【包含了原订单+商品库】
15834
+ 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)]) || [];
15835
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
15836
+ return skuList.includes(item.uuid);
15837
+ });
15838
+ 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)]);
15839
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15840
+ }, [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]);
15327
15841
  //显示选择商品按钮 原单换不显示选择商品
15328
15842
  var showChangeBtn = useMemo(function () {
15329
- var _typeMap$type23;
15330
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]);
15331
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]]);
15843
+ var _typeMap$type27;
15844
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
15845
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
15332
15846
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15333
15847
  gutter: 8,
15334
15848
  wrap: true
@@ -15346,12 +15860,12 @@ var wdtReissue = function wdtReissue(props) {
15346
15860
  },
15347
15861
  disabled: disabled,
15348
15862
  allowClear: false,
15349
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
15863
+ 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)],
15350
15864
  onChange: function onChange(val) {
15351
15865
  return changeSystemOrderHandle(val);
15352
15866
  },
15353
15867
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15354
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$1[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) {
15868
+ }, ((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) {
15355
15869
  return /*#__PURE__*/React.createElement(Select.Option, {
15356
15870
  key: item.billNo,
15357
15871
  value: item.billNo,
@@ -15372,7 +15886,7 @@ var wdtReissue = function wdtReissue(props) {
15372
15886
  disabled: disabled,
15373
15887
  allowClear: false,
15374
15888
  options: reasonList,
15375
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
15889
+ 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)],
15376
15890
  onChange: function onChange(val) {
15377
15891
  return changeTypeHandle(val);
15378
15892
  }
@@ -15384,13 +15898,19 @@ var wdtReissue = function wdtReissue(props) {
15384
15898
  canUpdateNumber: showChangeBtn,
15385
15899
  showChangeBtn: showChangeBtn,
15386
15900
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15387
- 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.key)],
15901
+ 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)],
15388
15902
  onChange: function onChange(val) {
15389
15903
  return changeGoodHandle(val);
15390
15904
  },
15391
15905
  onModeChange: handleModeChange,
15392
15906
  showModeBtn: showModeBtn,
15393
- isStrict: isStrict
15907
+ isStrict: isStrict,
15908
+ tradeGoods: {
15909
+ originDataSource: getGoodDetails({
15910
+ mode: isStrict
15911
+ }),
15912
+ selectedGoodsChange: selectedGoodsChange
15913
+ }
15394
15914
  })));
15395
15915
  };
15396
15916
 
@@ -16176,7 +16696,7 @@ var typeMap$2 = {
16176
16696
  }
16177
16697
  };
16178
16698
  var bsE3Reissue = function bsE3Reissue(props) {
16179
- var _typeMap$type21, _typeMap$type23, _typeMap$type24, _value$typeMap$type$s5, _typeMap$type25, _typeMap$type26, _typeMap$type27;
16699
+ var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
16180
16700
  var value = props.value,
16181
16701
  onChange = props.onChange,
16182
16702
  _props$reasonList = props.reasonList,
@@ -16314,15 +16834,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
16314
16834
  return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
16315
16835
  }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16316
16836
  var selectedGoodsChange = useCallback(function (skuList) {
16317
- var _typeMap$type22, _getGoodDetails;
16837
+ var _typeMap$type22, _typeMap$type23, _uniqBy;
16318
16838
  var newValue = _objectSpread2({}, value);
16319
- newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_getGoodDetails = getGoodDetails({
16839
+ // 原订单商品
16840
+ var originTradeGoodList = getGoodDetails({
16320
16841
  mode: isStrict
16321
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16322
- return skuList.includes(item.id);
16842
+ }) || [];
16843
+ // 当前选中的所有商品【包含了原订单+商品库】
16844
+ 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)]) || [];
16845
+ 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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
16846
+ return skuList.includes(item.uuid);
16323
16847
  });
16324
16848
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16325
- }, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
16849
+ }, [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]);
16326
16850
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
16327
16851
  gutter: 8,
16328
16852
  wrap: true,
@@ -16341,12 +16865,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
16341
16865
  },
16342
16866
  disabled: disabled,
16343
16867
  allowClear: false,
16344
- value: 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.systemOrderNo)],
16868
+ 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)],
16345
16869
  onChange: function onChange(val) {
16346
16870
  return changeSystemOrderHandle(val);
16347
16871
  },
16348
16872
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16349
- }, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
16873
+ }, ((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) {
16350
16874
  return /*#__PURE__*/React.createElement(Select.Option, {
16351
16875
  key: item.billNo,
16352
16876
  value: item.billNo,
@@ -16367,7 +16891,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16367
16891
  disabled: disabled,
16368
16892
  allowClear: false,
16369
16893
  options: reasonList,
16370
- value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.typeName)],
16894
+ 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)],
16371
16895
  onChange: function onChange(val) {
16372
16896
  return changeTypeHandle(val);
16373
16897
  }
@@ -16379,7 +16903,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16379
16903
  canUpdateNumber: showChangeBtn,
16380
16904
  showChangeBtn: showChangeBtn,
16381
16905
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16382
- 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.key)],
16906
+ 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)],
16383
16907
  onChange: function onChange(val) {
16384
16908
  return changeGoodHandle(val);
16385
16909
  },
@@ -16395,4 +16919,4 @@ var bsE3Reissue = function bsE3Reissue(props) {
16395
16919
  })));
16396
16920
  };
16397
16921
 
16398
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
16922
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };