@kmkf-fe-packages/basic-components 1.22.1-beta.3 → 1.22.1-beta.30

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
@@ -4,7 +4,7 @@ import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } fro
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, WdtAddressData, 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';
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';
@@ -9358,7 +9358,8 @@ var GoodItem = function GoodItem(props) {
9358
9358
  type = _props$type === void 0 ? 2 : _props$type,
9359
9359
  _props$shopList = props.shopList,
9360
9360
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
9361
- showHeader = props.showHeader,
9361
+ _props$showHeader = props.showHeader,
9362
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9362
9363
  _props$showChangeBtn = props.showChangeBtn,
9363
9364
  otherOperations = props.otherOperations,
9364
9365
  canUpdateNumber = props.canUpdateNumber,
@@ -9563,10 +9564,26 @@ var GoodItem = function GoodItem(props) {
9563
9564
  return _ref5.apply(this, arguments);
9564
9565
  };
9565
9566
  }();
9566
- var headerList = showHeader || {
9567
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9568
- ]
9569
- }[type] || [];
9567
+ var headerList = useMemo(function () {
9568
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9569
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9570
+ var dataIndexList = [];
9571
+ if (isStringArray) {
9572
+ dataIndexList = showHeader;
9573
+ } else if (isObjectArray) {
9574
+ dataIndexList = showHeader.map(function (item) {
9575
+ return item.dataIndex;
9576
+ });
9577
+ }
9578
+ return isStringArray ? showHeader : isObjectArray ? showHeader.filter(function (item) {
9579
+ return item.show !== false;
9580
+ }).map(function (item) {
9581
+ return item.dataIndex;
9582
+ }) : [] || {
9583
+ 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9584
+ ]
9585
+ }[type] || [];
9586
+ }, [showHeader]);
9570
9587
  //修改参数
9571
9588
  var handleChangeValue = function handleChangeValue(key, index) {
9572
9589
  return function (e) {
@@ -9581,35 +9598,56 @@ var GoodItem = function GoodItem(props) {
9581
9598
  };
9582
9599
  };
9583
9600
  // 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;
9601
+ var goodItemAttrs = useMemo(function () {
9602
+ var initList = [{
9603
+ isShow: headerList.includes('title'),
9604
+ key: 'title',
9605
+ label: '商品名称'
9606
+ }, {
9607
+ isShow: headerList.includes('outerId'),
9608
+ key: 'outerId',
9609
+ label: '商品编码'
9610
+ },
9611
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9612
+ {
9613
+ isShow: headerList.includes('numIid'),
9614
+ key: 'numIid',
9615
+ label: '商品id'
9616
+ }, {
9617
+ isShow: changeSku && headerList.includes('skuId'),
9618
+ key: 'skuId',
9619
+ label: 'SKU ID'
9620
+ }, {
9621
+ isShow: changeSku && headerList.includes('outerSkuId'),
9622
+ key: 'outerSkuId',
9623
+ label: 'SKU 编码'
9624
+ }, {
9625
+ isShow: changeSku && headerList.includes('propertiesName'),
9626
+ key: 'propertiesName',
9627
+ label: 'SKU 信息'
9628
+ }];
9629
+ var newList = [];
9630
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9631
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9632
+ (isStringArray ? showHeader : isObjectArray ? showHeader.map(function (item) {
9633
+ return item.dataIndex;
9634
+ }) : []).forEach(function (dataIndex) {
9635
+ if (initList.find(function (item) {
9636
+ return item.key === dataIndex;
9637
+ })) {
9638
+ newList.push(initList.find(function (item) {
9639
+ return item.key === dataIndex;
9640
+ }));
9641
+ }
9642
+ });
9643
+ return newList;
9644
+ }, [headerList, showHeader]);
9645
+ var hasPic = useMemo(function () {
9646
+ return headerList.includes('picUrl');
9647
+ }, [headerList]);
9648
+ var hasAttr = useMemo(function () {
9649
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9650
+ }, [hasPic, headerList]);
9613
9651
  return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
9614
9652
  className: "goods-title"
9615
9653
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
@@ -10963,6 +11001,11 @@ var jstGoods = function jstGoods(props) {
10963
11001
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10964
11002
  }
10965
11003
  }, [value, type]);
11004
+ useEffect(function () {
11005
+ if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11006
+ setChangeIndex(0);
11007
+ }
11008
+ }, value);
10966
11009
  var content = function content(item, index) {
10967
11010
  return /*#__PURE__*/React.createElement("div", {
10968
11011
  style: {
@@ -10973,7 +11016,7 @@ var jstGoods = function jstGoods(props) {
10973
11016
  style: {
10974
11017
  textAlign: 'center'
10975
11018
  }
10976
- }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11019
+ }, "\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
11020
  return /*#__PURE__*/React.createElement("div", {
10978
11021
  key: index
10979
11022
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
@@ -12426,231 +12469,1209 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12426
12469
  };
12427
12470
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12428
12471
 
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({
12472
+ var getColumns = function getColumns(_ref) {
12473
+ var _ref$text = _ref.text,
12474
+ text = _ref$text === void 0 ? '' : _ref$text,
12475
+ disabled = _ref.disabled,
12476
+ updateHandle = _ref.updateHandle;
12477
+ return {
12478
+ //百胜E3补发商品
12479
+ BS_E3_REISSUE_GOODS: [{
12480
+ dataIndex: 'sku',
12481
+ title: "SKU",
12482
+ width: 150
12483
+ }, {
12484
+ dataIndex: 'skuId',
12485
+ title: "SKU ID",
12486
+ width: 150
12487
+ }, {
12488
+ dataIndex: 'goodsName',
12489
+ title: "\u5546\u54C1\u540D\u79F0",
12490
+ width: 150
12491
+ }, {
12492
+ dataIndex: 'goodsShortName',
12493
+ title: "\u5546\u54C1\u7B80\u79F0",
12494
+ width: 150
12495
+ }, {
12496
+ dataIndex: 'picPath',
12497
+ title: "\u5546\u54C1\u56FE\u7247",
12498
+ width: 150
12499
+ }, {
12500
+ dataIndex: 'goodsSn',
12501
+ title: "\u8D27\u53F7",
12502
+ width: 150
12503
+ }, {
12504
+ dataIndex: 'goodsId',
12505
+ title: "\u8D27\u53F7ID",
12506
+ width: 150
12507
+ }, {
12508
+ dataIndex: 'colorName',
12509
+ title: "\u989C\u8272\u540D\u79F0",
12510
+ width: 150
12511
+ }, {
12512
+ dataIndex: 'colorCode',
12513
+ title: "\u989C\u8272\u4EE3\u7801",
12514
+ width: 150
12515
+ }, {
12516
+ dataIndex: 'sizeName',
12517
+ title: "\u5C3A\u7801\u540D\u79F0",
12518
+ width: 150
12519
+ }, {
12520
+ dataIndex: 'sizeCode',
12521
+ title: "\u5C3A\u7801\u4EE3\u7801",
12522
+ width: 150
12523
+ }, {
12524
+ dataIndex: 'brandName',
12525
+ title: "\u54C1\u724C\u540D\u79F0",
12526
+ width: 150
12527
+ }, {
12528
+ dataIndex: 'goodsNumber',
12529
+ title: "\u5546\u54C1\u6570\u91CF",
12530
+ width: 150
12531
+ }, {
12532
+ dataIndex: 'goodsPrice',
12533
+ title: "\u5546\u54C1\u5355\u4EF7",
12534
+ width: 150
12535
+ }, {
12536
+ dataIndex: 'shopPrice',
12537
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12538
+ width: 150
12539
+ }, {
12540
+ dataIndex: 'isGift',
12541
+ title: "\u662F\u5426\u8D60\u54C1",
12542
+ width: 150,
12543
+ render: function render(val) {
12544
+ return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12545
+ }
12546
+ }],
12547
+ //百胜E3商品信息
12548
+ BS_E3_GOODS: [{
12549
+ dataIndex: 'sku',
12550
+ title: "SKU",
12564
12551
  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,
12647
- canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12648
- shopCode = props.shopCode,
12649
- _props$companyKey = props.companyKey,
12650
- companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12651
- onSelect = props.onSelect,
12652
- onDelete = props.onDelete,
12653
- onModeChange = props.onModeChange,
12552
+ ellipsis: true,
12553
+ width: 150
12554
+ }, {
12555
+ dataIndex: 'skuId',
12556
+ title: "SKU ID",
12557
+ align: 'center',
12558
+ ellipsis: true,
12559
+ width: 150
12560
+ }, {
12561
+ dataIndex: 'goodsName',
12562
+ title: "\u5546\u54C1\u540D\u79F0",
12563
+ align: 'center',
12564
+ ellipsis: true,
12565
+ width: 150
12566
+ }, {
12567
+ dataIndex: 'goodsShortName',
12568
+ title: "\u5546\u54C1\u7B80\u79F0",
12569
+ align: 'center',
12570
+ ellipsis: true,
12571
+ width: 100
12572
+ }, {
12573
+ dataIndex: 'picPath',
12574
+ title: "\u5546\u54C1\u56FE\u7247",
12575
+ align: 'center',
12576
+ ellipsis: true,
12577
+ width: 100,
12578
+ render: function render(val) {
12579
+ return /*#__PURE__*/React.createElement(Image, {
12580
+ width: 60,
12581
+ src: val
12582
+ });
12583
+ }
12584
+ }, {
12585
+ dataIndex: 'goodsSn',
12586
+ title: "\u8D27\u53F7",
12587
+ align: 'center',
12588
+ ellipsis: true,
12589
+ width: 150
12590
+ }, {
12591
+ dataIndex: 'goodsId',
12592
+ title: "\u8D27\u53F7ID",
12593
+ align: 'center',
12594
+ ellipsis: true,
12595
+ width: 150
12596
+ }, {
12597
+ dataIndex: 'colorName',
12598
+ title: "\u989C\u8272\u540D\u79F0",
12599
+ align: 'center',
12600
+ ellipsis: true,
12601
+ width: 100
12602
+ }, {
12603
+ dataIndex: 'colorCode',
12604
+ title: "\u989C\u8272\u4EE3\u7801",
12605
+ align: 'center',
12606
+ ellipsis: true,
12607
+ width: 150
12608
+ }, {
12609
+ dataIndex: 'sizeName',
12610
+ title: "\u5C3A\u7801\u540D\u79F0",
12611
+ align: 'center',
12612
+ ellipsis: true,
12613
+ width: 100
12614
+ }, {
12615
+ dataIndex: 'sizeCode',
12616
+ title: "\u5C3A\u7801\u4EE3\u7801",
12617
+ align: 'center',
12618
+ ellipsis: true,
12619
+ width: 100
12620
+ }, {
12621
+ dataIndex: 'brandName',
12622
+ title: "\u54C1\u724C\u540D\u79F0",
12623
+ align: 'center',
12624
+ ellipsis: true,
12625
+ width: 150
12626
+ }, {
12627
+ dataIndex: 'goodsNumber',
12628
+ title: "\u5546\u54C1\u6570\u91CF",
12629
+ align: 'center',
12630
+ ellipsis: true,
12631
+ width: 100,
12632
+ render: function render(val, record, index) {
12633
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12634
+ style: {
12635
+ width: 70
12636
+ },
12637
+ value: val,
12638
+ min: 1,
12639
+ precision: 0,
12640
+ onChange: function onChange(num) {
12641
+ return updateHandle(num, index, 'goodsNumber');
12642
+ }
12643
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12644
+ }
12645
+ }, {
12646
+ dataIndex: 'goodsPrice',
12647
+ title: "\u5546\u54C1\u5355\u4EF7",
12648
+ align: 'center',
12649
+ ellipsis: true,
12650
+ width: 120,
12651
+ render: function render(val, record, index) {
12652
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12653
+ style: {
12654
+ width: 70
12655
+ },
12656
+ value: val,
12657
+ min: 0,
12658
+ precision: 2,
12659
+ onChange: function onChange(num) {
12660
+ return updateHandle(num, index, 'goodsPrice');
12661
+ }
12662
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12663
+ }
12664
+ }, {
12665
+ dataIndex: 'shopPrice',
12666
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12667
+ align: 'center',
12668
+ ellipsis: true,
12669
+ width: 120
12670
+ }, {
12671
+ dataIndex: 'sharePrice',
12672
+ title: "\u5206\u644A\u4EF7",
12673
+ align: 'center',
12674
+ ellipsis: true,
12675
+ width: 120
12676
+ }, {
12677
+ dataIndex: 'sharePayment',
12678
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12679
+ align: 'center',
12680
+ ellipsis: true,
12681
+ width: 120
12682
+ }, {
12683
+ dataIndex: 'payment',
12684
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12685
+ align: 'center',
12686
+ ellipsis: true,
12687
+ width: 120,
12688
+ render: function render(val, record, index) {
12689
+ return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12690
+ style: {
12691
+ width: 70
12692
+ },
12693
+ value: val,
12694
+ min: 0,
12695
+ precision: 2,
12696
+ onChange: function onChange(num) {
12697
+ return updateHandle(num, index, 'payment');
12698
+ }
12699
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12700
+ }
12701
+ }, {
12702
+ dataIndex: 'tcSku',
12703
+ title: "\u5957\u9910SKU",
12704
+ align: 'center',
12705
+ ellipsis: true,
12706
+ width: 150
12707
+ }, {
12708
+ dataIndex: 'tcGoodsNumber',
12709
+ title: "\u5957\u9910\u5957\u6570",
12710
+ align: 'center',
12711
+ ellipsis: true,
12712
+ width: 100
12713
+ }, {
12714
+ dataIndex: 'taoCanSingleSl',
12715
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12716
+ align: 'center',
12717
+ ellipsis: true,
12718
+ width: 100
12719
+ }, {
12720
+ dataIndex: 'isGift',
12721
+ title: "\u662F\u5426\u8D60\u54C1",
12722
+ align: 'center',
12723
+ ellipsis: true,
12724
+ width: 100,
12725
+ render: function render(val) {
12726
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12727
+ }
12728
+ }],
12729
+ BS_GOODS: [{
12730
+ dataIndex: 'mark',
12731
+ title: "\u5546\u54C1\u6807\u8BB0",
12732
+ align: 'center',
12733
+ ellipsis: true,
12734
+ width: 70,
12735
+ render: function render(val, record, index) {
12736
+ return /*#__PURE__*/React.createElement(Select, {
12737
+ options: [{
12738
+ label: '是',
12739
+ value: '是'
12740
+ }, {
12741
+ label: '否',
12742
+ value: '否'
12743
+ }],
12744
+ disabled: disabled,
12745
+ value: val,
12746
+ onChange: function onChange(val) {
12747
+ return updateHandle(val, index, 'mark');
12748
+ }
12749
+ });
12750
+ }
12751
+ }, {
12752
+ dataIndex: 'skuName',
12753
+ title: "".concat(text, "sku\u540D\u79F0"),
12754
+ align: 'center',
12755
+ ellipsis: true,
12756
+ width: 250
12757
+ }, {
12758
+ dataIndex: 'sku',
12759
+ title: "".concat(text, "sku\u7F16\u7801"),
12760
+ align: 'center',
12761
+ ellipsis: true,
12762
+ width: 100
12763
+ }, {
12764
+ dataIndex: 'name',
12765
+ title: "".concat(text, "\u540D\u79F0"),
12766
+ align: 'center',
12767
+ ellipsis: true,
12768
+ width: 250
12769
+ }, {
12770
+ dataIndex: 'pic',
12771
+ title: "\u56FE\u7247",
12772
+ align: 'center',
12773
+ ellipsis: true,
12774
+ width: 100,
12775
+ render: function render(val) {
12776
+ return /*#__PURE__*/React.createElement(Image, {
12777
+ width: 60,
12778
+ src: val
12779
+ });
12780
+ }
12781
+ }, {
12782
+ dataIndex: 'code',
12783
+ title: "".concat(text, "\u7F16\u7801"),
12784
+ align: 'center',
12785
+ ellipsis: true,
12786
+ width: 100
12787
+ }, {
12788
+ dataIndex: 'money',
12789
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12790
+ align: 'center',
12791
+ ellipsis: true,
12792
+ width: 100
12793
+ }, {
12794
+ dataIndex: 'number',
12795
+ title: "".concat(text, "\u6570\u91CF"),
12796
+ align: 'center',
12797
+ ellipsis: true,
12798
+ width: 100,
12799
+ render: function render(val, record, index) {
12800
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12801
+ style: {
12802
+ width: 70
12803
+ },
12804
+ value: val,
12805
+ min: 1,
12806
+ precision: 0,
12807
+ onChange: function onChange(num) {
12808
+ return updateHandle(num, index, 'number');
12809
+ }
12810
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12811
+ }
12812
+ }, {
12813
+ dataIndex: 'share',
12814
+ title: "\u5206\u644A\u4EF7",
12815
+ align: 'center',
12816
+ ellipsis: true,
12817
+ width: 70
12818
+ }, {
12819
+ dataIndex: 'type',
12820
+ title: "\u8D60\u54C1\u7C7B\u578B",
12821
+ align: 'center',
12822
+ ellipsis: true,
12823
+ width: 100
12824
+ }, {
12825
+ dataIndex: 'batch',
12826
+ title: "\u6279\u6B21\u53F7",
12827
+ align: 'center',
12828
+ ellipsis: true,
12829
+ width: 100
12830
+ }, {
12831
+ dataIndex: 'expireDate',
12832
+ title: "\u6709\u6548\u671F",
12833
+ align: 'center',
12834
+ ellipsis: true,
12835
+ width: 100
12836
+ }]
12837
+ };
12838
+ };
12839
+
12840
+ var renderGiftType = function renderGiftType(val) {
12841
+ var giftTypeMap = {
12842
+ 0: '非赠品',
12843
+ 1: '自动赠送',
12844
+ 2: '手工赠送',
12845
+ 3: '回购自动送赠品',
12846
+ 4: '前N有礼送赠品',
12847
+ 6: '天猫优仓赠品',
12848
+ 7: '淘宝CRM会员送赠'
12849
+ };
12850
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12851
+ };
12852
+ var renderFieldMap = {
12853
+ num: function num(_ref) {
12854
+ var disabled = _ref.disabled,
12855
+ updateHandle = _ref.updateHandle;
12856
+ return function (val, record, index) {
12857
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12858
+ style: {
12859
+ width: 70
12860
+ },
12861
+ value: val,
12862
+ min: 1,
12863
+ precision: 0,
12864
+ onChange: function onChange(num) {
12865
+ return updateHandle(num, index, 'num');
12866
+ }
12867
+ }) : /*#__PURE__*/React.createElement("span", null, val);
12868
+ };
12869
+ },
12870
+ giftType: function giftType() {
12871
+ return renderGiftType;
12872
+ }
12873
+ };
12874
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12875
+ var disabled = _ref2.disabled,
12876
+ updateHandle = _ref2.updateHandle,
12877
+ operate = _ref2.operate;
12878
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12879
+ var newItem = _objectSpread2({
12880
+ align: 'center',
12881
+ ellipsis: true
12882
+ }, item);
12883
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12884
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12885
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12886
+ disabled: disabled,
12887
+ updateHandle: updateHandle
12888
+ })
12889
+ });
12890
+ }
12891
+ return newItem;
12892
+ });
12893
+ };
12894
+
12895
+ var getColumns$1 = function getColumns(_ref) {
12896
+ var _ref$text = _ref.text,
12897
+ text = _ref$text === void 0 ? '' : _ref$text,
12898
+ disabled = _ref.disabled,
12899
+ updateHandle = _ref.updateHandle;
12900
+ return {
12901
+ //旺店通补发商品信息
12902
+ WDT_REISSUE_GOODS: [{
12903
+ dataIndex: 'goodId',
12904
+ title: "\u5546\u54C1ID",
12905
+ width: 120
12906
+ }, {
12907
+ dataIndex: 'goodNo',
12908
+ title: "\u5546\u54C1\u7F16\u7801",
12909
+ width: 200
12910
+ }, {
12911
+ dataIndex: 'goodName',
12912
+ title: "\u5546\u54C1\u540D\u79F0",
12913
+ width: 200
12914
+ }, {
12915
+ dataIndex: 'specId',
12916
+ title: "SKUID",
12917
+ width: 150
12918
+ }, {
12919
+ dataIndex: 'specNo',
12920
+ title: "\u5546\u54C1SKU\u7F16\u7801",
12921
+ width: 200
12922
+ }, {
12923
+ dataIndex: 'specName',
12924
+ title: "\u5546\u54C1SKU\u540D\u79F0",
12925
+ width: 250
12926
+ }, {
12927
+ dataIndex: 'orderPrice',
12928
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12929
+ width: 200
12930
+ }, {
12931
+ dataIndex: 'num',
12932
+ title: "\u6570\u91CF",
12933
+ width: 100
12934
+ }, {
12935
+ dataIndex: 'sharePrice',
12936
+ title: "\u5206\u644A\u4EF7",
12937
+ width: 150
12938
+ }, {
12939
+ dataIndex: 'giftType',
12940
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12941
+ width: 100,
12942
+ render: renderGiftType
12943
+ }],
12944
+ //旺店通商品信息
12945
+ WDT_GOODS: [{
12946
+ dataIndex: 'goodId',
12947
+ title: "\u5546\u54C1ID",
12948
+ align: 'center',
12949
+ ellipsis: true,
12950
+ width: 70
12951
+ }, {
12952
+ dataIndex: 'goodNo',
12953
+ title: "\u5546\u54C1\u7F16\u7801",
12954
+ align: 'center',
12955
+ ellipsis: true,
12956
+ width: 180
12957
+ }, {
12958
+ dataIndex: 'goodName',
12959
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12960
+ align: 'center',
12961
+ ellipsis: true,
12962
+ width: 250
12963
+ }, {
12964
+ dataIndex: 'specId',
12965
+ title: "".concat(text, "SKUID"),
12966
+ align: 'center',
12967
+ ellipsis: true,
12968
+ width: 100
12969
+ }, {
12970
+ dataIndex: 'specNo',
12971
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12972
+ align: 'center',
12973
+ ellipsis: true,
12974
+ width: 180
12975
+ }, {
12976
+ dataIndex: 'specName',
12977
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12978
+ align: 'center',
12979
+ ellipsis: true,
12980
+ width: 250
12981
+ }, {
12982
+ dataIndex: 'orderPrice',
12983
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12984
+ align: 'center',
12985
+ ellipsis: true,
12986
+ width: 100
12987
+ }, {
12988
+ dataIndex: 'num',
12989
+ title: "".concat(text, "\u6570\u91CF"),
12990
+ align: 'center',
12991
+ ellipsis: true,
12992
+ width: 100,
12993
+ render: function render(val, record, index) {
12994
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12995
+ style: {
12996
+ width: 70
12997
+ },
12998
+ value: val,
12999
+ min: 1,
13000
+ precision: 0,
13001
+ onChange: function onChange(num) {
13002
+ return updateHandle(num, index, 'num');
13003
+ }
13004
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13005
+ }
13006
+ }, {
13007
+ dataIndex: 'sharePrice',
13008
+ title: "\u5206\u644A\u4EF7",
13009
+ align: 'center',
13010
+ ellipsis: true,
13011
+ width: 70
13012
+ }, {
13013
+ dataIndex: 'giftType',
13014
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13015
+ align: 'center',
13016
+ ellipsis: true,
13017
+ width: 100,
13018
+ render: function render(val) {
13019
+ var giftTypeMap = {
13020
+ 0: '非赠品',
13021
+ 1: '自动赠送',
13022
+ 2: '手工赠送',
13023
+ 3: '回购自动送赠品',
13024
+ 4: '前N有礼送赠品',
13025
+ 6: '天猫优仓赠品',
13026
+ 7: '淘宝CRM会员送赠'
13027
+ };
13028
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13029
+ }
13030
+ }],
13031
+ //旺店通退货商品信息
13032
+ WDT_RETURN_GOODS: [{
13033
+ dataIndex: 'goodId',
13034
+ title: "\u5546\u54C1ID",
13035
+ align: 'center',
13036
+ ellipsis: true,
13037
+ width: 70
13038
+ }, {
13039
+ dataIndex: 'goodNo',
13040
+ title: "\u5546\u54C1\u7F16\u7801",
13041
+ align: 'center',
13042
+ ellipsis: true,
13043
+ width: 180
13044
+ }, {
13045
+ dataIndex: 'goodName',
13046
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13047
+ align: 'center',
13048
+ ellipsis: true,
13049
+ width: 250
13050
+ }, {
13051
+ dataIndex: 'specId',
13052
+ title: "".concat(text, "SKUID"),
13053
+ align: 'center',
13054
+ ellipsis: true,
13055
+ width: 100
13056
+ }, {
13057
+ dataIndex: 'specNo',
13058
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13059
+ align: 'center',
13060
+ ellipsis: true,
13061
+ width: 180
13062
+ }, {
13063
+ dataIndex: 'specName',
13064
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13065
+ align: 'center',
13066
+ ellipsis: true,
13067
+ width: 250
13068
+ }, {
13069
+ dataIndex: 'num',
13070
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13071
+ align: 'center',
13072
+ ellipsis: true,
13073
+ width: 100,
13074
+ render: function render(val, record, index) {
13075
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13076
+ style: {
13077
+ width: 70
13078
+ },
13079
+ value: val,
13080
+ min: 1,
13081
+ precision: 0,
13082
+ onChange: function onChange(num) {
13083
+ return updateHandle(num, index, 'num');
13084
+ }
13085
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13086
+ }
13087
+ }, {
13088
+ dataIndex: 'sharePrice',
13089
+ title: "\u5206\u644A\u4EF7",
13090
+ align: 'center',
13091
+ ellipsis: true,
13092
+ width: 80,
13093
+ render: function render(val, record, index) {
13094
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13095
+ style: {
13096
+ width: 70
13097
+ },
13098
+ value: val,
13099
+ min: 0,
13100
+ onChange: function onChange(value) {
13101
+ return updateHandle(value, index, 'sharePrice');
13102
+ }
13103
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13104
+ }
13105
+ }, {
13106
+ dataIndex: 'returnPrice',
13107
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13108
+ align: 'center',
13109
+ ellipsis: true,
13110
+ width: 100
13111
+ }, {
13112
+ dataIndex: 'giftType',
13113
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13114
+ align: 'center',
13115
+ ellipsis: true,
13116
+ width: 100,
13117
+ render: function render(val) {
13118
+ var giftTypeMap = {
13119
+ 0: '非赠品',
13120
+ 1: '自动赠送',
13121
+ 2: '手工赠送',
13122
+ 3: '回购自动送赠品',
13123
+ 4: '前N有礼送赠品',
13124
+ 6: '天猫优仓赠品',
13125
+ 7: '淘宝CRM会员送赠'
13126
+ };
13127
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13128
+ }
13129
+ }, {
13130
+ dataIndex: 'type',
13131
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13132
+ align: 'center',
13133
+ ellipsis: true,
13134
+ width: 100,
13135
+ render: function render(val, record, index) {
13136
+ var options = [{
13137
+ label: '单品',
13138
+ value: '1'
13139
+ }, {
13140
+ label: '组合装',
13141
+ value: '2'
13142
+ }];
13143
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13144
+ style: {
13145
+ width: 70
13146
+ },
13147
+ options: options,
13148
+ value: val,
13149
+ onChange: function onChange(value) {
13150
+ return updateHandle(value, index, 'type');
13151
+ }
13152
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13153
+ }
13154
+ }],
13155
+ //旺店通换出商品信息
13156
+ WDT_EXCHANGE_GOODS: [{
13157
+ dataIndex: 'goodId',
13158
+ title: "\u5546\u54C1ID",
13159
+ align: 'center',
13160
+ ellipsis: true,
13161
+ width: 70
13162
+ }, {
13163
+ dataIndex: 'goodNo',
13164
+ title: "\u5546\u54C1\u7F16\u7801",
13165
+ align: 'center',
13166
+ ellipsis: true,
13167
+ width: 180
13168
+ }, {
13169
+ dataIndex: 'goodName',
13170
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13171
+ align: 'center',
13172
+ ellipsis: true,
13173
+ width: 250
13174
+ }, {
13175
+ dataIndex: 'specId',
13176
+ title: "".concat(text, "SKUID"),
13177
+ align: 'center',
13178
+ ellipsis: true,
13179
+ width: 100
13180
+ }, {
13181
+ dataIndex: 'specNo',
13182
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13183
+ align: 'center',
13184
+ ellipsis: true,
13185
+ width: 180
13186
+ }, {
13187
+ dataIndex: 'specName',
13188
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13189
+ align: 'center',
13190
+ ellipsis: true,
13191
+ width: 250
13192
+ }, {
13193
+ dataIndex: 'num',
13194
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13195
+ align: 'center',
13196
+ ellipsis: true,
13197
+ width: 100,
13198
+ render: function render(val, record, index) {
13199
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13200
+ style: {
13201
+ width: 70
13202
+ },
13203
+ value: val,
13204
+ min: 1,
13205
+ precision: 0,
13206
+ onChange: function onChange(num) {
13207
+ return updateHandle(num, index, 'num');
13208
+ }
13209
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13210
+ }
13211
+ }, {
13212
+ dataIndex: 'price',
13213
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13214
+ align: 'center',
13215
+ ellipsis: true,
13216
+ width: 100,
13217
+ render: function render(val, record, index) {
13218
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13219
+ style: {
13220
+ width: 70
13221
+ },
13222
+ value: val,
13223
+ min: 0,
13224
+ onChange: function onChange(value) {
13225
+ return updateHandle(value, index, 'price');
13226
+ }
13227
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13228
+ }
13229
+ }, {
13230
+ dataIndex: 'exchangePrice',
13231
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13232
+ align: 'center',
13233
+ ellipsis: true,
13234
+ width: 100
13235
+ }, {
13236
+ dataIndex: 'giftType',
13237
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13238
+ align: 'center',
13239
+ ellipsis: true,
13240
+ width: 100,
13241
+ render: function render(val) {
13242
+ var giftTypeMap = {
13243
+ 0: '非赠品',
13244
+ 1: '自动赠送',
13245
+ 2: '手工赠送',
13246
+ 3: '回购自动送赠品',
13247
+ 4: '前N有礼送赠品',
13248
+ 6: '天猫优仓赠品',
13249
+ 7: '淘宝CRM会员送赠'
13250
+ };
13251
+ return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13252
+ }
13253
+ }, {
13254
+ dataIndex: 'type',
13255
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13256
+ align: 'center',
13257
+ ellipsis: true,
13258
+ width: 100,
13259
+ render: function render(val, record, index) {
13260
+ var options = [{
13261
+ label: '单品',
13262
+ value: '1'
13263
+ }, {
13264
+ label: '组合装',
13265
+ value: '2'
13266
+ }];
13267
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13268
+ style: {
13269
+ width: 70
13270
+ },
13271
+ options: options,
13272
+ value: val,
13273
+ onChange: function onChange(value) {
13274
+ return updateHandle(value, index, 'type');
13275
+ }
13276
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13277
+ }
13278
+ }]
13279
+ };
13280
+ };
13281
+
13282
+ var getColumns$2 = function getColumns(_ref) {
13283
+ var _ref$text = _ref.text,
13284
+ text = _ref$text === void 0 ? '' : _ref$text,
13285
+ disabled = _ref.disabled,
13286
+ updateHandle = _ref.updateHandle;
13287
+ return {
13288
+ //万里牛商品信息
13289
+ WLN_GOODS: [{
13290
+ dataIndex: 'skuName',
13291
+ title: "".concat(text, "sku\u540D\u79F0"),
13292
+ align: 'center',
13293
+ ellipsis: true,
13294
+ width: 250
13295
+ }, {
13296
+ dataIndex: 'sku',
13297
+ title: "".concat(text, "sku\u7F16\u7801"),
13298
+ align: 'center',
13299
+ ellipsis: true,
13300
+ width: 100
13301
+ }, {
13302
+ dataIndex: 'name',
13303
+ title: "".concat(text, "\u540D\u79F0"),
13304
+ align: 'center',
13305
+ ellipsis: true,
13306
+ width: 250
13307
+ }, {
13308
+ dataIndex: 'pic',
13309
+ title: "\u56FE\u7247",
13310
+ align: 'center',
13311
+ ellipsis: true,
13312
+ width: 100,
13313
+ render: function render(val) {
13314
+ return /*#__PURE__*/React.createElement(Image, {
13315
+ width: 60,
13316
+ src: val
13317
+ });
13318
+ }
13319
+ }, {
13320
+ dataIndex: 'code',
13321
+ title: "".concat(text, "\u7F16\u7801"),
13322
+ align: 'center',
13323
+ ellipsis: true,
13324
+ width: 100
13325
+ }, {
13326
+ dataIndex: 'money',
13327
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13328
+ align: 'center',
13329
+ ellipsis: true,
13330
+ width: 100
13331
+ }, {
13332
+ dataIndex: 'number',
13333
+ title: "".concat(text, "\u6570\u91CF"),
13334
+ align: 'center',
13335
+ ellipsis: true,
13336
+ width: 100,
13337
+ render: function render(val, record, index) {
13338
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13339
+ style: {
13340
+ width: 70
13341
+ },
13342
+ value: val,
13343
+ min: 1,
13344
+ precision: 0,
13345
+ onChange: function onChange(num) {
13346
+ return updateHandle(num, index, 'number');
13347
+ }
13348
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13349
+ }
13350
+ }, {
13351
+ dataIndex: 'share',
13352
+ title: "\u5206\u644A\u4EF7",
13353
+ align: 'center',
13354
+ ellipsis: true,
13355
+ width: 70
13356
+ }, {
13357
+ dataIndex: 'type',
13358
+ title: "\u8D60\u54C1\u7C7B\u578B",
13359
+ align: 'center',
13360
+ ellipsis: true,
13361
+ width: 100
13362
+ }]
13363
+ };
13364
+ };
13365
+
13366
+ var getColumnsMap = function getColumnsMap(args) {
13367
+ var _ref = args || {},
13368
+ _ref$text = _ref.text,
13369
+ text = _ref$text === void 0 ? '' : _ref$text,
13370
+ disabled = _ref.disabled,
13371
+ updateHandle = _ref.updateHandle;
13372
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13373
+ text: text,
13374
+ disabled: disabled,
13375
+ updateHandle: updateHandle
13376
+ })), getColumns$1({
13377
+ text: text,
13378
+ disabled: disabled,
13379
+ updateHandle: updateHandle
13380
+ })), getColumns$2({
13381
+ text: text,
13382
+ disabled: disabled,
13383
+ updateHandle: updateHandle
13384
+ })), {}, {
13385
+ default: [{
13386
+ dataIndex: 'mark',
13387
+ title: "\u5546\u54C1\u6807\u8BB0",
13388
+ align: 'center',
13389
+ ellipsis: true,
13390
+ width: 70,
13391
+ render: function render(val, record, index) {
13392
+ return /*#__PURE__*/React.createElement(Select, {
13393
+ options: [{
13394
+ label: '是',
13395
+ value: '是'
13396
+ }, {
13397
+ label: '否',
13398
+ value: '否'
13399
+ }],
13400
+ disabled: disabled,
13401
+ value: val,
13402
+ onChange: function onChange(val) {
13403
+ return updateHandle(val, index, 'mark');
13404
+ }
13405
+ });
13406
+ }
13407
+ }, {
13408
+ dataIndex: 'skuName',
13409
+ title: "".concat(text, "sku\u540D\u79F0"),
13410
+ align: 'center',
13411
+ ellipsis: true,
13412
+ width: 250
13413
+ }, {
13414
+ dataIndex: 'sku',
13415
+ title: "".concat(text, "sku\u7F16\u7801"),
13416
+ align: 'center',
13417
+ ellipsis: true,
13418
+ width: 100
13419
+ }, {
13420
+ dataIndex: 'name',
13421
+ title: "".concat(text, "\u540D\u79F0"),
13422
+ align: 'center',
13423
+ ellipsis: true,
13424
+ width: 250
13425
+ }, {
13426
+ dataIndex: 'pic',
13427
+ title: "\u56FE\u7247",
13428
+ align: 'center',
13429
+ ellipsis: true,
13430
+ width: 100,
13431
+ render: function render(val) {
13432
+ return /*#__PURE__*/React.createElement(Image, {
13433
+ width: 60,
13434
+ src: val
13435
+ });
13436
+ }
13437
+ }, {
13438
+ dataIndex: 'code',
13439
+ title: "".concat(text, "\u7F16\u7801"),
13440
+ align: 'center',
13441
+ ellipsis: true,
13442
+ width: 100
13443
+ }, {
13444
+ dataIndex: 'money',
13445
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13446
+ align: 'center',
13447
+ ellipsis: true,
13448
+ width: 100
13449
+ }, {
13450
+ dataIndex: 'number',
13451
+ title: "".concat(text, "\u6570\u91CF"),
13452
+ align: 'center',
13453
+ ellipsis: true,
13454
+ width: 100,
13455
+ render: function render(val, record, index) {
13456
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13457
+ style: {
13458
+ width: 70
13459
+ },
13460
+ value: val,
13461
+ min: 1,
13462
+ precision: 0,
13463
+ onChange: function onChange(num) {
13464
+ return updateHandle(num, index, 'number');
13465
+ }
13466
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13467
+ }
13468
+ }, {
13469
+ dataIndex: 'share',
13470
+ title: "\u5206\u644A\u4EF7",
13471
+ align: 'center',
13472
+ ellipsis: true,
13473
+ width: 70
13474
+ }, {
13475
+ dataIndex: 'type',
13476
+ title: "\u8D60\u54C1\u7C7B\u578B",
13477
+ align: 'center',
13478
+ ellipsis: true,
13479
+ width: 100
13480
+ }]
13481
+ });
13482
+ };
13483
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13484
+ var clone_columnsMap = cloneDeep(getColumnsMap());
13485
+ var newColumns = {};
13486
+ Object.keys(clone_columnsMap).forEach(function (key) {
13487
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
13488
+ return {
13489
+ title: col.title,
13490
+ dataIndex: col.dataIndex
13491
+ };
13492
+ });
13493
+ });
13494
+ return newColumns;
13495
+ };
13496
+ var columnsBaseInfoMap = getColumnsBaseInfo();
13497
+
13498
+ var renderFieldMap$1 = {
13499
+ goodsNumber: function goodsNumber(_ref) {
13500
+ var disabled = _ref.disabled,
13501
+ updateHandle = _ref.updateHandle;
13502
+ return function (val, record, index) {
13503
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13504
+ style: {
13505
+ width: 70
13506
+ },
13507
+ value: val,
13508
+ min: 1,
13509
+ precision: 0,
13510
+ onChange: function onChange(num) {
13511
+ return updateHandle(num, index, 'goodsNumber');
13512
+ }
13513
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13514
+ };
13515
+ },
13516
+ goodsPrice: function goodsPrice(_ref2) {
13517
+ var disabled = _ref2.disabled,
13518
+ updateHandle = _ref2.updateHandle;
13519
+ return function (val, record, index) {
13520
+ return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13521
+ style: {
13522
+ width: 70
13523
+ },
13524
+ value: val,
13525
+ min: 0,
13526
+ onChange: function onChange(value) {
13527
+ return updateHandle(value, index, 'goodsPrice');
13528
+ }
13529
+ }) : /*#__PURE__*/React.createElement("span", null, val);
13530
+ };
13531
+ },
13532
+ isGift: function isGift(_ref3) {
13533
+ var disabled = _ref3.disabled,
13534
+ updateHandle = _ref3.updateHandle;
13535
+ return function (val, record, index) {
13536
+ var options = [{
13537
+ label: '是',
13538
+ value: 1
13539
+ }, {
13540
+ label: '否',
13541
+ value: 0
13542
+ }];
13543
+ return !disabled ? /*#__PURE__*/React.createElement(Select, {
13544
+ style: {
13545
+ width: 70
13546
+ },
13547
+ options: options,
13548
+ value: val,
13549
+ onChange: function onChange(value) {
13550
+ return updateHandle(value, index, 'isGift');
13551
+ },
13552
+ getPopupContainer: function getPopupContainer() {
13553
+ return document.getElementById('bsE3ReissueGoods');
13554
+ }
13555
+ }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
13556
+ };
13557
+ }
13558
+ };
13559
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13560
+ var disabled = _ref4.disabled,
13561
+ updateHandle = _ref4.updateHandle,
13562
+ operate = _ref4.operate;
13563
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
13564
+ var newItem = _objectSpread2({
13565
+ align: 'center',
13566
+ ellipsis: true
13567
+ }, item);
13568
+ if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
13569
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13570
+ render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
13571
+ disabled: disabled,
13572
+ updateHandle: updateHandle
13573
+ })
13574
+ });
13575
+ }
13576
+ return newItem;
13577
+ });
13578
+ };
13579
+
13580
+ var MAIN_FIELD = 'uuid';
13581
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
13582
+ var columns = _ref.columns,
13583
+ dataSource = _ref.dataSource,
13584
+ selectedRowKeys = _ref.selectedRowKeys,
13585
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
13586
+ var _useState = useState(false),
13587
+ _useState2 = _slicedToArray(_useState, 2),
13588
+ tradeGoodsVisible = _useState2[0],
13589
+ setTradeGoodsVisible = _useState2[1];
13590
+ var openModal = function openModal() {
13591
+ return setTradeGoodsVisible(true);
13592
+ };
13593
+ var closeModal = function closeModal() {
13594
+ return setTradeGoodsVisible(false);
13595
+ };
13596
+ var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13597
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13598
+ }), selectedRowKeys);
13599
+ var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13600
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13601
+ }));
13602
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
13603
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
13604
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
13605
+ };
13606
+ var rowSelection = {
13607
+ selectedRowKeys: selectedRowKeys,
13608
+ onChange: handleChangeSelectedKeys
13609
+ };
13610
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
13611
+ type: "link",
13612
+ onClick: openModal
13613
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React.createElement(Modal, {
13614
+ title: "\u8BA2\u5355\u5546\u54C1",
13615
+ visible: tradeGoodsVisible,
13616
+ footer: null,
13617
+ onCancel: closeModal
13618
+ }, /*#__PURE__*/React.createElement(Table, {
13619
+ rowKey: MAIN_FIELD,
13620
+ rowSelection: rowSelection,
13621
+ columns: columns,
13622
+ dataSource: dataSource,
13623
+ pagination: false,
13624
+ scroll: {
13625
+ x: 500,
13626
+ y: 500
13627
+ }
13628
+ }), /*#__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, ")")));
13629
+ };
13630
+ var getButtonText = function getButtonText() {
13631
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13632
+ if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13633
+ return '选择百胜ERP商品';
13634
+ }
13635
+ if (['WDT_REISSUE_GOODS'].includes(type)) {
13636
+ return '选择旺店通商品';
13637
+ }
13638
+ return '选择商品';
13639
+ };
13640
+ var GoodItem$1 = function GoodItem(props) {
13641
+ var _props$value = props.value,
13642
+ value = _props$value === void 0 ? [] : _props$value,
13643
+ type = props.type,
13644
+ onChange = props.onChange,
13645
+ disabled = props.disabled,
13646
+ _props$showHeader = props.showHeader,
13647
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
13648
+ width = props.width,
13649
+ _props$shopList = props.shopList,
13650
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
13651
+ _props$shopId = props.shopId,
13652
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
13653
+ _props$maxLength = props.maxLength,
13654
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
13655
+ _props$showChangeBtn = props.showChangeBtn,
13656
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
13657
+ _props$showModeBtn = props.showModeBtn,
13658
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
13659
+ _props$isStrict = props.isStrict,
13660
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
13661
+ _props$tableSelect = props.tableSelect,
13662
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
13663
+ _props$selectType = props.selectType,
13664
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
13665
+ _props$otherOperation = props.otherOperations,
13666
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
13667
+ _props$canUpdateNumbe = props.canUpdateNumber,
13668
+ canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
13669
+ shopCode = props.shopCode,
13670
+ _props$companyKey = props.companyKey,
13671
+ companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
13672
+ onSelect = props.onSelect,
13673
+ onDelete = props.onDelete,
13674
+ onModeChange = props.onModeChange,
12654
13675
  tradeGoods = props.tradeGoods;
12655
13676
  var refModal = useRef();
12656
13677
  console.debug('表格数据', value);
@@ -12671,7 +13692,7 @@ var GoodItem$1 = function GoodItem(props) {
12671
13692
  // TODO: 商品订单中以选中商品
12672
13693
  var selectedGoods = useMemo(function () {
12673
13694
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
12674
- return v.id;
13695
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
12675
13696
  });
12676
13697
  }, [value]);
12677
13698
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -12711,501 +13732,27 @@ var GoodItem$1 = function GoodItem(props) {
12711
13732
  return function (type) {
12712
13733
  var columns = [];
12713
13734
  switch (type) {
12714
- case 'WDT_REISSUE_GOODS':
12715
13735
  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
13736
  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
13737
  case 'WDT_EXCHANGE_GOODS':
13738
+ case 'BS_E3_GOODS':
13739
+ case 'BS_GOODS':
13740
+ case 'WLN_GOODS':
12939
13741
  {
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
- }];
13742
+ columns = getColumnsMap({
13743
+ text: text,
13744
+ disabled: disabled,
13745
+ updateHandle: updateHandle
13746
+ })[type];
13063
13747
  }
13064
13748
  break;
13065
- case 'BS_E3_GOODS':
13749
+ case 'WDT_REISSUE_GOODS':
13066
13750
  {
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
- }];
13751
+ columns = getWdtReissueGoodColumns({
13752
+ disabled: disabled,
13753
+ updateHandle: updateHandle,
13754
+ operate: operate
13755
+ });
13209
13756
  }
13210
13757
  break;
13211
13758
  case 'BS_E3_REISSUE_GOODS':
@@ -13218,102 +13765,11 @@ var GoodItem$1 = function GoodItem(props) {
13218
13765
  }
13219
13766
  break;
13220
13767
  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
- }];
13768
+ columns = getColumnsMap({
13769
+ text: text,
13770
+ disabled: disabled,
13771
+ updateHandle: updateHandle
13772
+ })['default'];
13317
13773
  }
13318
13774
  return columns;
13319
13775
  };
@@ -13325,6 +13781,24 @@ var GoodItem$1 = function GoodItem(props) {
13325
13781
  return COLUMNS_INFO(type);
13326
13782
  };
13327
13783
  var newColumns = useMemo(function () {
13784
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
13785
+ var baseInfoColumns = [];
13786
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
13787
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
13788
+ if (isStringArray) {
13789
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
13790
+ return showHeader.includes(col.dataIndex);
13791
+ });
13792
+ } else if (isObjectArray) {
13793
+ baseInfoColumns = showHeader.filter(function (col) {
13794
+ return col.show !== false;
13795
+ }).map(function (col) {
13796
+ var currentCol = initBaseInfoColumns.find(function (item) {
13797
+ return item.dataIndex === col.dataIndex;
13798
+ });
13799
+ return currentCol ? currentCol : undefined;
13800
+ }).filter(Boolean);
13801
+ }
13328
13802
  var columnList = [{
13329
13803
  dataIndex: '',
13330
13804
  title: '序号',
@@ -13334,9 +13808,7 @@ var GoodItem$1 = function GoodItem(props) {
13334
13808
  render: function render(val, record, index) {
13335
13809
  return /*#__PURE__*/React.createElement("span", null, index + 1);
13336
13810
  }
13337
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13338
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13339
- })));
13811
+ }].concat(_toConsumableArray(baseInfoColumns));
13340
13812
  if (!disabled) {
13341
13813
  columnList.push({
13342
13814
  dataIndex: '',
@@ -13414,6 +13886,7 @@ var GoodItem$1 = function GoodItem(props) {
13414
13886
  isGift: '',
13415
13887
  uuid: uuid(),
13416
13888
  canDelete: true,
13889
+ canEdit: true,
13417
13890
  goodsNumber: 1,
13418
13891
  canUpdateNumber: canUpdateNumber
13419
13892
  });
@@ -13485,7 +13958,7 @@ var GoodItem$1 = function GoodItem(props) {
13485
13958
  }), /*#__PURE__*/React.createElement(Button, {
13486
13959
  type: "link",
13487
13960
  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), {}, {
13961
+ }, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13489
13962
  columns: newColumns,
13490
13963
  dataSource: value,
13491
13964
  rowKey: 'uuid',
@@ -15164,7 +15637,7 @@ var typeMap$1 = {
15164
15637
  }
15165
15638
  };
15166
15639
  var wdtReissue = function wdtReissue(props) {
15167
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
15640
+ var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
15168
15641
  var value = props.value,
15169
15642
  onChange = props.onChange,
15170
15643
  _props$reasonList = props.reasonList,
@@ -15324,11 +15797,26 @@ var wdtReissue = function wdtReissue(props) {
15324
15797
  }
15325
15798
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15326
15799
  };
15800
+ var selectedGoodsChange = useCallback(function (skuList) {
15801
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
15802
+ var newValue = _objectSpread2({}, value);
15803
+ // 原订单商品
15804
+ var originTradeGoodList = getGoodDetails({
15805
+ mode: isStrict
15806
+ }) || [];
15807
+ // 当前选中的所有商品【包含了原订单+商品库】
15808
+ 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)]) || [];
15809
+ 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) {
15810
+ return skuList.includes(item.uuid);
15811
+ });
15812
+ 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)]);
15813
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15814
+ }, [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
15815
  //显示选择商品按钮 原单换不显示选择商品
15328
15816
  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]]);
15817
+ var _typeMap$type27;
15818
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
15819
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
15332
15820
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
15333
15821
  gutter: 8,
15334
15822
  wrap: true
@@ -15346,12 +15834,12 @@ var wdtReissue = function wdtReissue(props) {
15346
15834
  },
15347
15835
  disabled: disabled,
15348
15836
  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)],
15837
+ 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
15838
  onChange: function onChange(val) {
15351
15839
  return changeSystemOrderHandle(val);
15352
15840
  },
15353
15841
  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) {
15842
+ }, ((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
15843
  return /*#__PURE__*/React.createElement(Select.Option, {
15356
15844
  key: item.billNo,
15357
15845
  value: item.billNo,
@@ -15372,7 +15860,7 @@ var wdtReissue = function wdtReissue(props) {
15372
15860
  disabled: disabled,
15373
15861
  allowClear: false,
15374
15862
  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)],
15863
+ 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
15864
  onChange: function onChange(val) {
15377
15865
  return changeTypeHandle(val);
15378
15866
  }
@@ -15384,13 +15872,19 @@ var wdtReissue = function wdtReissue(props) {
15384
15872
  canUpdateNumber: showChangeBtn,
15385
15873
  showChangeBtn: showChangeBtn,
15386
15874
  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)],
15875
+ 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
15876
  onChange: function onChange(val) {
15389
15877
  return changeGoodHandle(val);
15390
15878
  },
15391
15879
  onModeChange: handleModeChange,
15392
15880
  showModeBtn: showModeBtn,
15393
- isStrict: isStrict
15881
+ isStrict: isStrict,
15882
+ tradeGoods: {
15883
+ originDataSource: getGoodDetails({
15884
+ mode: isStrict
15885
+ }),
15886
+ selectedGoodsChange: selectedGoodsChange
15887
+ }
15394
15888
  })));
15395
15889
  };
15396
15890
 
@@ -16176,7 +16670,7 @@ var typeMap$2 = {
16176
16670
  }
16177
16671
  };
16178
16672
  var bsE3Reissue = function bsE3Reissue(props) {
16179
- var _typeMap$type21, _typeMap$type23, _typeMap$type24, _value$typeMap$type$s5, _typeMap$type25, _typeMap$type26, _typeMap$type27;
16673
+ var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
16180
16674
  var value = props.value,
16181
16675
  onChange = props.onChange,
16182
16676
  _props$reasonList = props.reasonList,
@@ -16314,15 +16808,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
16314
16808
  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
16809
  }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16316
16810
  var selectedGoodsChange = useCallback(function (skuList) {
16317
- var _typeMap$type22, _getGoodDetails;
16811
+ var _typeMap$type22, _typeMap$type23, _uniqBy;
16318
16812
  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({
16813
+ // 原订单商品
16814
+ var originTradeGoodList = getGoodDetails({
16320
16815
  mode: isStrict
16321
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16322
- return skuList.includes(item.id);
16816
+ }) || [];
16817
+ // 当前选中的所有商品【包含了原订单+商品库】
16818
+ 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)]) || [];
16819
+ 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) {
16820
+ return skuList.includes(item.uuid);
16323
16821
  });
16324
16822
  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]);
16823
+ }, [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
16824
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
16327
16825
  gutter: 8,
16328
16826
  wrap: true,
@@ -16341,12 +16839,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
16341
16839
  },
16342
16840
  disabled: disabled,
16343
16841
  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)],
16842
+ 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
16843
  onChange: function onChange(val) {
16346
16844
  return changeSystemOrderHandle(val);
16347
16845
  },
16348
16846
  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) {
16847
+ }, ((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
16848
  return /*#__PURE__*/React.createElement(Select.Option, {
16351
16849
  key: item.billNo,
16352
16850
  value: item.billNo,
@@ -16367,7 +16865,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16367
16865
  disabled: disabled,
16368
16866
  allowClear: false,
16369
16867
  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)],
16868
+ 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
16869
  onChange: function onChange(val) {
16372
16870
  return changeTypeHandle(val);
16373
16871
  }
@@ -16379,7 +16877,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16379
16877
  canUpdateNumber: showChangeBtn,
16380
16878
  showChangeBtn: showChangeBtn,
16381
16879
  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)],
16880
+ 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
16881
  onChange: function onChange(val) {
16384
16882
  return changeGoodHandle(val);
16385
16883
  },
@@ -16395,4 +16893,4 @@ var bsE3Reissue = function bsE3Reissue(props) {
16395
16893
  })));
16396
16894
  };
16397
16895
 
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 };
16896
+ 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 };