@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.js CHANGED
@@ -9370,7 +9370,8 @@ var GoodItem = function GoodItem(props) {
9370
9370
  type = _props$type === void 0 ? 2 : _props$type,
9371
9371
  _props$shopList = props.shopList,
9372
9372
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
9373
- showHeader = props.showHeader,
9373
+ _props$showHeader = props.showHeader,
9374
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
9374
9375
  _props$showChangeBtn = props.showChangeBtn,
9375
9376
  otherOperations = props.otherOperations,
9376
9377
  canUpdateNumber = props.canUpdateNumber,
@@ -9575,10 +9576,26 @@ var GoodItem = function GoodItem(props) {
9575
9576
  return _ref5.apply(this, arguments);
9576
9577
  };
9577
9578
  }();
9578
- var headerList = showHeader || {
9579
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9580
- ]
9581
- }[type] || [];
9579
+ var headerList = React.useMemo(function () {
9580
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9581
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9582
+ var dataIndexList = [];
9583
+ if (isStringArray) {
9584
+ dataIndexList = showHeader;
9585
+ } else if (isObjectArray) {
9586
+ dataIndexList = showHeader.map(function (item) {
9587
+ return item.dataIndex;
9588
+ });
9589
+ }
9590
+ return isStringArray ? showHeader : isObjectArray ? showHeader.filter(function (item) {
9591
+ return item.show !== false;
9592
+ }).map(function (item) {
9593
+ return item.dataIndex;
9594
+ }) : [] || {
9595
+ 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9596
+ ]
9597
+ }[type] || [];
9598
+ }, [showHeader]);
9582
9599
  //修改参数
9583
9600
  var handleChangeValue = function handleChangeValue(key, index) {
9584
9601
  return function (e) {
@@ -9593,35 +9610,56 @@ var GoodItem = function GoodItem(props) {
9593
9610
  };
9594
9611
  };
9595
9612
  // TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
9596
- var goodItemAttrs = [{
9597
- isShow: headerList.includes('title'),
9598
- key: 'title',
9599
- label: '商品名称'
9600
- }, {
9601
- isShow: headerList.includes('outerId'),
9602
- key: 'outerId',
9603
- label: '商品编码'
9604
- },
9605
- // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9606
- {
9607
- isShow: headerList.includes('numIid'),
9608
- key: 'numIid',
9609
- label: '商品id'
9610
- }, {
9611
- isShow: changeSku && headerList.includes('skuId'),
9612
- key: 'skuId',
9613
- label: 'SKU ID'
9614
- }, {
9615
- isShow: changeSku && headerList.includes('outerSkuId'),
9616
- key: 'outerSkuId',
9617
- label: 'SKU 编码'
9618
- }, {
9619
- isShow: changeSku && headerList.includes('propertiesName'),
9620
- key: 'propertiesName',
9621
- label: 'SKU 信息'
9622
- }];
9623
- var hasPic = headerList.includes('picUrl');
9624
- var hasAttr = hasPic ? headerList.length > 1 : headerList.length > 0;
9613
+ var goodItemAttrs = React.useMemo(function () {
9614
+ var initList = [{
9615
+ isShow: headerList.includes('title'),
9616
+ key: 'title',
9617
+ label: '商品名称'
9618
+ }, {
9619
+ isShow: headerList.includes('outerId'),
9620
+ key: 'outerId',
9621
+ label: '商品编码'
9622
+ },
9623
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9624
+ {
9625
+ isShow: headerList.includes('numIid'),
9626
+ key: 'numIid',
9627
+ label: '商品id'
9628
+ }, {
9629
+ isShow: changeSku && headerList.includes('skuId'),
9630
+ key: 'skuId',
9631
+ label: 'SKU ID'
9632
+ }, {
9633
+ isShow: changeSku && headerList.includes('outerSkuId'),
9634
+ key: 'outerSkuId',
9635
+ label: 'SKU 编码'
9636
+ }, {
9637
+ isShow: changeSku && headerList.includes('propertiesName'),
9638
+ key: 'propertiesName',
9639
+ label: 'SKU 信息'
9640
+ }];
9641
+ var newList = [];
9642
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9643
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9644
+ (isStringArray ? showHeader : isObjectArray ? showHeader.map(function (item) {
9645
+ return item.dataIndex;
9646
+ }) : []).forEach(function (dataIndex) {
9647
+ if (initList.find(function (item) {
9648
+ return item.key === dataIndex;
9649
+ })) {
9650
+ newList.push(initList.find(function (item) {
9651
+ return item.key === dataIndex;
9652
+ }));
9653
+ }
9654
+ });
9655
+ return newList;
9656
+ }, [headerList, showHeader]);
9657
+ var hasPic = React.useMemo(function () {
9658
+ return headerList.includes('picUrl');
9659
+ }, [headerList]);
9660
+ var hasAttr = React.useMemo(function () {
9661
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9662
+ }, [hasPic, headerList]);
9625
9663
  return /*#__PURE__*/React__default['default'].createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React__default['default'].createElement("p", {
9626
9664
  className: "goods-title"
9627
9665
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React__default['default'].createElement("p", {
@@ -10975,6 +11013,11 @@ var jstGoods = function jstGoods(props) {
10975
11013
  onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
10976
11014
  }
10977
11015
  }, [value, type]);
11016
+ React.useEffect(function () {
11017
+ if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
11018
+ setChangeIndex(0);
11019
+ }
11020
+ }, value);
10978
11021
  var content = function content(item, index) {
10979
11022
  return /*#__PURE__*/React__default['default'].createElement("div", {
10980
11023
  style: {
@@ -10985,7 +11028,7 @@ var jstGoods = function jstGoods(props) {
10985
11028
  style: {
10986
11029
  textAlign: 'center'
10987
11030
  }
10988
- }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
11031
+ }, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React__default['default'].createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
10989
11032
  return /*#__PURE__*/React__default['default'].createElement("div", {
10990
11033
  key: index
10991
11034
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
@@ -12438,231 +12481,1209 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12438
12481
  };
12439
12482
  var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
12440
12483
 
12441
- var columns$3 = [{
12442
- dataIndex: 'sku',
12443
- title: "SKU",
12444
- width: 150
12445
- }, {
12446
- dataIndex: 'skuId',
12447
- title: "SKU ID",
12448
- width: 150
12449
- }, {
12450
- dataIndex: 'goodsName',
12451
- title: "\u5546\u54C1\u540D\u79F0",
12452
- width: 150
12453
- }, {
12454
- dataIndex: 'goodsShortName',
12455
- title: "\u5546\u54C1\u7B80\u79F0",
12456
- width: 150
12457
- }, {
12458
- dataIndex: 'picPath',
12459
- title: "\u5546\u54C1\u56FE\u7247",
12460
- width: 150
12461
- }, {
12462
- dataIndex: 'goodsSn',
12463
- title: "\u8D27\u53F7",
12464
- width: 150
12465
- }, {
12466
- dataIndex: 'goodsId',
12467
- title: "\u8D27\u53F7ID",
12468
- width: 150
12469
- }, {
12470
- dataIndex: 'colorName',
12471
- title: "\u989C\u8272\u540D\u79F0",
12472
- width: 150
12473
- }, {
12474
- dataIndex: 'colorCode',
12475
- title: "\u989C\u8272\u4EE3\u7801",
12476
- width: 150
12477
- }, {
12478
- dataIndex: 'sizeName',
12479
- title: "\u5C3A\u7801\u540D\u79F0",
12480
- width: 150
12481
- }, {
12482
- dataIndex: 'sizeCode',
12483
- title: "\u5C3A\u7801\u4EE3\u7801",
12484
- width: 150
12485
- }, {
12486
- dataIndex: 'brandName',
12487
- title: "\u54C1\u724C\u540D\u79F0",
12488
- width: 150
12489
- }, {
12490
- dataIndex: 'goodsNumber',
12491
- title: "\u5546\u54C1\u6570\u91CF",
12492
- width: 150
12493
- }, {
12494
- dataIndex: 'goodsPrice',
12495
- title: "\u5546\u54C1\u5355\u4EF7",
12496
- width: 150
12497
- }, {
12498
- dataIndex: 'shopPrice',
12499
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12500
- width: 150
12501
- }, {
12502
- dataIndex: 'isGift',
12503
- title: "\u662F\u5426\u8D60\u54C1",
12504
- width: 150,
12505
- render: function render(val) {
12506
- return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12507
- }
12508
- }];
12509
- var renderFieldMap = {
12510
- goodsNumber: function goodsNumber(_ref) {
12511
- var disabled = _ref.disabled,
12512
- updateHandle = _ref.updateHandle;
12513
- return function (val, record, index) {
12514
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12515
- style: {
12516
- width: 70
12517
- },
12518
- value: val,
12519
- min: 1,
12520
- precision: 0,
12521
- onChange: function onChange(num) {
12522
- return updateHandle(num, index, 'goodsNumber');
12523
- }
12524
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12525
- };
12526
- },
12527
- goodsPrice: function goodsPrice(_ref2) {
12528
- var disabled = _ref2.disabled,
12529
- updateHandle = _ref2.updateHandle;
12530
- return function (val, record, index) {
12531
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12532
- style: {
12533
- width: 70
12534
- },
12535
- value: val,
12536
- min: 0,
12537
- onChange: function onChange(value) {
12538
- return updateHandle(value, index, 'goodsPrice');
12539
- }
12540
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12541
- };
12542
- },
12543
- isGift: function isGift(_ref3) {
12544
- var disabled = _ref3.disabled,
12545
- updateHandle = _ref3.updateHandle;
12546
- return function (val, record, index) {
12547
- var options = [{
12548
- label: '是',
12549
- value: 1
12550
- }, {
12551
- label: '否',
12552
- value: 0
12553
- }];
12554
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12555
- style: {
12556
- width: 70
12557
- },
12558
- options: options,
12559
- value: val,
12560
- onChange: function onChange(value) {
12561
- return updateHandle(value, index, 'isGift');
12562
- },
12563
- getPopupContainer: function getPopupContainer() {
12564
- return document.getElementById('bsE3ReissueGoods');
12565
- }
12566
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12567
- };
12568
- }
12569
- };
12570
- var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12571
- var disabled = _ref4.disabled,
12572
- updateHandle = _ref4.updateHandle,
12573
- operate = _ref4.operate;
12574
- return columns$3.map(function (item) {
12575
- var newItem = _objectSpread2({
12484
+ var getColumns = function getColumns(_ref) {
12485
+ var _ref$text = _ref.text,
12486
+ text = _ref$text === void 0 ? '' : _ref$text,
12487
+ disabled = _ref.disabled,
12488
+ updateHandle = _ref.updateHandle;
12489
+ return {
12490
+ //百胜E3补发商品
12491
+ BS_E3_REISSUE_GOODS: [{
12492
+ dataIndex: 'sku',
12493
+ title: "SKU",
12494
+ width: 150
12495
+ }, {
12496
+ dataIndex: 'skuId',
12497
+ title: "SKU ID",
12498
+ width: 150
12499
+ }, {
12500
+ dataIndex: 'goodsName',
12501
+ title: "\u5546\u54C1\u540D\u79F0",
12502
+ width: 150
12503
+ }, {
12504
+ dataIndex: 'goodsShortName',
12505
+ title: "\u5546\u54C1\u7B80\u79F0",
12506
+ width: 150
12507
+ }, {
12508
+ dataIndex: 'picPath',
12509
+ title: "\u5546\u54C1\u56FE\u7247",
12510
+ width: 150
12511
+ }, {
12512
+ dataIndex: 'goodsSn',
12513
+ title: "\u8D27\u53F7",
12514
+ width: 150
12515
+ }, {
12516
+ dataIndex: 'goodsId',
12517
+ title: "\u8D27\u53F7ID",
12518
+ width: 150
12519
+ }, {
12520
+ dataIndex: 'colorName',
12521
+ title: "\u989C\u8272\u540D\u79F0",
12522
+ width: 150
12523
+ }, {
12524
+ dataIndex: 'colorCode',
12525
+ title: "\u989C\u8272\u4EE3\u7801",
12526
+ width: 150
12527
+ }, {
12528
+ dataIndex: 'sizeName',
12529
+ title: "\u5C3A\u7801\u540D\u79F0",
12530
+ width: 150
12531
+ }, {
12532
+ dataIndex: 'sizeCode',
12533
+ title: "\u5C3A\u7801\u4EE3\u7801",
12534
+ width: 150
12535
+ }, {
12536
+ dataIndex: 'brandName',
12537
+ title: "\u54C1\u724C\u540D\u79F0",
12538
+ width: 150
12539
+ }, {
12540
+ dataIndex: 'goodsNumber',
12541
+ title: "\u5546\u54C1\u6570\u91CF",
12542
+ width: 150
12543
+ }, {
12544
+ dataIndex: 'goodsPrice',
12545
+ title: "\u5546\u54C1\u5355\u4EF7",
12546
+ width: 150
12547
+ }, {
12548
+ dataIndex: 'shopPrice',
12549
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12550
+ width: 150
12551
+ }, {
12552
+ dataIndex: 'isGift',
12553
+ title: "\u662F\u5426\u8D60\u54C1",
12554
+ width: 150,
12555
+ render: function render(val) {
12556
+ return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12557
+ }
12558
+ }],
12559
+ //百胜E3商品信息
12560
+ BS_E3_GOODS: [{
12561
+ dataIndex: 'sku',
12562
+ title: "SKU",
12576
12563
  align: 'center',
12577
- ellipsis: true
12578
- }, item);
12579
- if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12580
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12581
- render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12582
- disabled: disabled,
12583
- updateHandle: updateHandle
12584
- })
12585
- });
12586
- }
12587
- return newItem;
12588
- });
12589
- };
12590
-
12591
- var SelectTradeGoods = function SelectTradeGoods(_ref) {
12592
- var columns = _ref.columns,
12593
- dataSource = _ref.dataSource,
12594
- selectedRowKeys = _ref.selectedRowKeys,
12595
- onChangeSelectedKeys = _ref.onChangeSelectedKeys;
12596
- var _useState = React.useState(false),
12597
- _useState2 = _slicedToArray(_useState, 2),
12598
- tradeGoodsVisible = _useState2[0],
12599
- setTradeGoodsVisible = _useState2[1];
12600
- var openModal = function openModal() {
12601
- return setTradeGoodsVisible(true);
12602
- };
12603
- var closeModal = function closeModal() {
12604
- return setTradeGoodsVisible(false);
12605
- };
12606
- var rowSelection = {
12607
- selectedRowKeys: selectedRowKeys,
12608
- onChange: onChangeSelectedKeys
12609
- };
12610
- console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
12611
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
12612
- type: "link",
12613
- onClick: openModal
12614
- }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
12615
- title: "\u8BA2\u5355\u5546\u54C1",
12616
- visible: tradeGoodsVisible,
12617
- footer: null,
12618
- onCancel: closeModal
12619
- }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
12620
- rowKey: "id",
12621
- rowSelection: rowSelection,
12622
- columns: columns,
12623
- dataSource: dataSource,
12624
- pagination: false,
12625
- scroll: {
12626
- x: 500,
12627
- y: 500
12628
- }
12629
- }), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
12630
- };
12631
- var GoodItem$1 = function GoodItem(props) {
12632
- var _props$value = props.value,
12633
- value = _props$value === void 0 ? [] : _props$value,
12634
- type = props.type,
12635
- onChange = props.onChange,
12636
- disabled = props.disabled,
12637
- _props$showHeader = props.showHeader,
12638
- showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
12639
- width = props.width,
12640
- _props$shopList = props.shopList,
12641
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
12642
- _props$shopId = props.shopId,
12643
- shopId = _props$shopId === void 0 ? '' : _props$shopId,
12644
- _props$maxLength = props.maxLength,
12645
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
12646
- _props$showChangeBtn = props.showChangeBtn,
12647
- showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
12648
- _props$showModeBtn = props.showModeBtn,
12649
- showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
12650
- _props$isStrict = props.isStrict,
12651
- isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
12652
- _props$tableSelect = props.tableSelect,
12653
- tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
12654
- _props$selectType = props.selectType,
12655
- selectType = _props$selectType === void 0 ? '' : _props$selectType,
12656
- _props$otherOperation = props.otherOperations,
12657
- otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
12658
- _props$canUpdateNumbe = props.canUpdateNumber,
12659
- canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
12660
- shopCode = props.shopCode,
12661
- _props$companyKey = props.companyKey,
12662
- companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
12663
- onSelect = props.onSelect,
12664
- onDelete = props.onDelete,
12665
- onModeChange = props.onModeChange,
12564
+ ellipsis: true,
12565
+ width: 150
12566
+ }, {
12567
+ dataIndex: 'skuId',
12568
+ title: "SKU ID",
12569
+ align: 'center',
12570
+ ellipsis: true,
12571
+ width: 150
12572
+ }, {
12573
+ dataIndex: 'goodsName',
12574
+ title: "\u5546\u54C1\u540D\u79F0",
12575
+ align: 'center',
12576
+ ellipsis: true,
12577
+ width: 150
12578
+ }, {
12579
+ dataIndex: 'goodsShortName',
12580
+ title: "\u5546\u54C1\u7B80\u79F0",
12581
+ align: 'center',
12582
+ ellipsis: true,
12583
+ width: 100
12584
+ }, {
12585
+ dataIndex: 'picPath',
12586
+ title: "\u5546\u54C1\u56FE\u7247",
12587
+ align: 'center',
12588
+ ellipsis: true,
12589
+ width: 100,
12590
+ render: function render(val) {
12591
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12592
+ width: 60,
12593
+ src: val
12594
+ });
12595
+ }
12596
+ }, {
12597
+ dataIndex: 'goodsSn',
12598
+ title: "\u8D27\u53F7",
12599
+ align: 'center',
12600
+ ellipsis: true,
12601
+ width: 150
12602
+ }, {
12603
+ dataIndex: 'goodsId',
12604
+ title: "\u8D27\u53F7ID",
12605
+ align: 'center',
12606
+ ellipsis: true,
12607
+ width: 150
12608
+ }, {
12609
+ dataIndex: 'colorName',
12610
+ title: "\u989C\u8272\u540D\u79F0",
12611
+ align: 'center',
12612
+ ellipsis: true,
12613
+ width: 100
12614
+ }, {
12615
+ dataIndex: 'colorCode',
12616
+ title: "\u989C\u8272\u4EE3\u7801",
12617
+ align: 'center',
12618
+ ellipsis: true,
12619
+ width: 150
12620
+ }, {
12621
+ dataIndex: 'sizeName',
12622
+ title: "\u5C3A\u7801\u540D\u79F0",
12623
+ align: 'center',
12624
+ ellipsis: true,
12625
+ width: 100
12626
+ }, {
12627
+ dataIndex: 'sizeCode',
12628
+ title: "\u5C3A\u7801\u4EE3\u7801",
12629
+ align: 'center',
12630
+ ellipsis: true,
12631
+ width: 100
12632
+ }, {
12633
+ dataIndex: 'brandName',
12634
+ title: "\u54C1\u724C\u540D\u79F0",
12635
+ align: 'center',
12636
+ ellipsis: true,
12637
+ width: 150
12638
+ }, {
12639
+ dataIndex: 'goodsNumber',
12640
+ title: "\u5546\u54C1\u6570\u91CF",
12641
+ align: 'center',
12642
+ ellipsis: true,
12643
+ width: 100,
12644
+ render: function render(val, record, index) {
12645
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12646
+ style: {
12647
+ width: 70
12648
+ },
12649
+ value: val,
12650
+ min: 1,
12651
+ precision: 0,
12652
+ onChange: function onChange(num) {
12653
+ return updateHandle(num, index, 'goodsNumber');
12654
+ }
12655
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12656
+ }
12657
+ }, {
12658
+ dataIndex: 'goodsPrice',
12659
+ title: "\u5546\u54C1\u5355\u4EF7",
12660
+ align: 'center',
12661
+ ellipsis: true,
12662
+ width: 120,
12663
+ render: function render(val, record, index) {
12664
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12665
+ style: {
12666
+ width: 70
12667
+ },
12668
+ value: val,
12669
+ min: 0,
12670
+ precision: 2,
12671
+ onChange: function onChange(num) {
12672
+ return updateHandle(num, index, 'goodsPrice');
12673
+ }
12674
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12675
+ }
12676
+ }, {
12677
+ dataIndex: 'shopPrice',
12678
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12679
+ align: 'center',
12680
+ ellipsis: true,
12681
+ width: 120
12682
+ }, {
12683
+ dataIndex: 'sharePrice',
12684
+ title: "\u5206\u644A\u4EF7",
12685
+ align: 'center',
12686
+ ellipsis: true,
12687
+ width: 120
12688
+ }, {
12689
+ dataIndex: 'sharePayment',
12690
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12691
+ align: 'center',
12692
+ ellipsis: true,
12693
+ width: 120
12694
+ }, {
12695
+ dataIndex: 'payment',
12696
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12697
+ align: 'center',
12698
+ ellipsis: true,
12699
+ width: 120,
12700
+ render: function render(val, record, index) {
12701
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12702
+ style: {
12703
+ width: 70
12704
+ },
12705
+ value: val,
12706
+ min: 0,
12707
+ precision: 2,
12708
+ onChange: function onChange(num) {
12709
+ return updateHandle(num, index, 'payment');
12710
+ }
12711
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12712
+ }
12713
+ }, {
12714
+ dataIndex: 'tcSku',
12715
+ title: "\u5957\u9910SKU",
12716
+ align: 'center',
12717
+ ellipsis: true,
12718
+ width: 150
12719
+ }, {
12720
+ dataIndex: 'tcGoodsNumber',
12721
+ title: "\u5957\u9910\u5957\u6570",
12722
+ align: 'center',
12723
+ ellipsis: true,
12724
+ width: 100
12725
+ }, {
12726
+ dataIndex: 'taoCanSingleSl',
12727
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12728
+ align: 'center',
12729
+ ellipsis: true,
12730
+ width: 100
12731
+ }, {
12732
+ dataIndex: 'isGift',
12733
+ title: "\u662F\u5426\u8D60\u54C1",
12734
+ align: 'center',
12735
+ ellipsis: true,
12736
+ width: 100,
12737
+ render: function render(val) {
12738
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12739
+ }
12740
+ }],
12741
+ BS_GOODS: [{
12742
+ dataIndex: 'mark',
12743
+ title: "\u5546\u54C1\u6807\u8BB0",
12744
+ align: 'center',
12745
+ ellipsis: true,
12746
+ width: 70,
12747
+ render: function render(val, record, index) {
12748
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12749
+ options: [{
12750
+ label: '是',
12751
+ value: '是'
12752
+ }, {
12753
+ label: '否',
12754
+ value: '否'
12755
+ }],
12756
+ disabled: disabled,
12757
+ value: val,
12758
+ onChange: function onChange(val) {
12759
+ return updateHandle(val, index, 'mark');
12760
+ }
12761
+ });
12762
+ }
12763
+ }, {
12764
+ dataIndex: 'skuName',
12765
+ title: "".concat(text, "sku\u540D\u79F0"),
12766
+ align: 'center',
12767
+ ellipsis: true,
12768
+ width: 250
12769
+ }, {
12770
+ dataIndex: 'sku',
12771
+ title: "".concat(text, "sku\u7F16\u7801"),
12772
+ align: 'center',
12773
+ ellipsis: true,
12774
+ width: 100
12775
+ }, {
12776
+ dataIndex: 'name',
12777
+ title: "".concat(text, "\u540D\u79F0"),
12778
+ align: 'center',
12779
+ ellipsis: true,
12780
+ width: 250
12781
+ }, {
12782
+ dataIndex: 'pic',
12783
+ title: "\u56FE\u7247",
12784
+ align: 'center',
12785
+ ellipsis: true,
12786
+ width: 100,
12787
+ render: function render(val) {
12788
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12789
+ width: 60,
12790
+ src: val
12791
+ });
12792
+ }
12793
+ }, {
12794
+ dataIndex: 'code',
12795
+ title: "".concat(text, "\u7F16\u7801"),
12796
+ align: 'center',
12797
+ ellipsis: true,
12798
+ width: 100
12799
+ }, {
12800
+ dataIndex: 'money',
12801
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12802
+ align: 'center',
12803
+ ellipsis: true,
12804
+ width: 100
12805
+ }, {
12806
+ dataIndex: 'number',
12807
+ title: "".concat(text, "\u6570\u91CF"),
12808
+ align: 'center',
12809
+ ellipsis: true,
12810
+ width: 100,
12811
+ render: function render(val, record, index) {
12812
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12813
+ style: {
12814
+ width: 70
12815
+ },
12816
+ value: val,
12817
+ min: 1,
12818
+ precision: 0,
12819
+ onChange: function onChange(num) {
12820
+ return updateHandle(num, index, 'number');
12821
+ }
12822
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12823
+ }
12824
+ }, {
12825
+ dataIndex: 'share',
12826
+ title: "\u5206\u644A\u4EF7",
12827
+ align: 'center',
12828
+ ellipsis: true,
12829
+ width: 70
12830
+ }, {
12831
+ dataIndex: 'type',
12832
+ title: "\u8D60\u54C1\u7C7B\u578B",
12833
+ align: 'center',
12834
+ ellipsis: true,
12835
+ width: 100
12836
+ }, {
12837
+ dataIndex: 'batch',
12838
+ title: "\u6279\u6B21\u53F7",
12839
+ align: 'center',
12840
+ ellipsis: true,
12841
+ width: 100
12842
+ }, {
12843
+ dataIndex: 'expireDate',
12844
+ title: "\u6709\u6548\u671F",
12845
+ align: 'center',
12846
+ ellipsis: true,
12847
+ width: 100
12848
+ }]
12849
+ };
12850
+ };
12851
+
12852
+ var renderGiftType = function renderGiftType(val) {
12853
+ var giftTypeMap = {
12854
+ 0: '非赠品',
12855
+ 1: '自动赠送',
12856
+ 2: '手工赠送',
12857
+ 3: '回购自动送赠品',
12858
+ 4: '前N有礼送赠品',
12859
+ 6: '天猫优仓赠品',
12860
+ 7: '淘宝CRM会员送赠'
12861
+ };
12862
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12863
+ };
12864
+ var renderFieldMap = {
12865
+ num: function num(_ref) {
12866
+ var disabled = _ref.disabled,
12867
+ updateHandle = _ref.updateHandle;
12868
+ return function (val, record, index) {
12869
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12870
+ style: {
12871
+ width: 70
12872
+ },
12873
+ value: val,
12874
+ min: 1,
12875
+ precision: 0,
12876
+ onChange: function onChange(num) {
12877
+ return updateHandle(num, index, 'num');
12878
+ }
12879
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12880
+ };
12881
+ },
12882
+ giftType: function giftType() {
12883
+ return renderGiftType;
12884
+ }
12885
+ };
12886
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12887
+ var disabled = _ref2.disabled,
12888
+ updateHandle = _ref2.updateHandle,
12889
+ operate = _ref2.operate;
12890
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12891
+ var newItem = _objectSpread2({
12892
+ align: 'center',
12893
+ ellipsis: true
12894
+ }, item);
12895
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12896
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12897
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12898
+ disabled: disabled,
12899
+ updateHandle: updateHandle
12900
+ })
12901
+ });
12902
+ }
12903
+ return newItem;
12904
+ });
12905
+ };
12906
+
12907
+ var getColumns$1 = function getColumns(_ref) {
12908
+ var _ref$text = _ref.text,
12909
+ text = _ref$text === void 0 ? '' : _ref$text,
12910
+ disabled = _ref.disabled,
12911
+ updateHandle = _ref.updateHandle;
12912
+ return {
12913
+ //旺店通补发商品信息
12914
+ WDT_REISSUE_GOODS: [{
12915
+ dataIndex: 'goodId',
12916
+ title: "\u5546\u54C1ID",
12917
+ width: 120
12918
+ }, {
12919
+ dataIndex: 'goodNo',
12920
+ title: "\u5546\u54C1\u7F16\u7801",
12921
+ width: 200
12922
+ }, {
12923
+ dataIndex: 'goodName',
12924
+ title: "\u5546\u54C1\u540D\u79F0",
12925
+ width: 200
12926
+ }, {
12927
+ dataIndex: 'specId',
12928
+ title: "SKUID",
12929
+ width: 150
12930
+ }, {
12931
+ dataIndex: 'specNo',
12932
+ title: "\u5546\u54C1SKU\u7F16\u7801",
12933
+ width: 200
12934
+ }, {
12935
+ dataIndex: 'specName',
12936
+ title: "\u5546\u54C1SKU\u540D\u79F0",
12937
+ width: 250
12938
+ }, {
12939
+ dataIndex: 'orderPrice',
12940
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12941
+ width: 200
12942
+ }, {
12943
+ dataIndex: 'num',
12944
+ title: "\u6570\u91CF",
12945
+ width: 100
12946
+ }, {
12947
+ dataIndex: 'sharePrice',
12948
+ title: "\u5206\u644A\u4EF7",
12949
+ width: 150
12950
+ }, {
12951
+ dataIndex: 'giftType',
12952
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12953
+ width: 100,
12954
+ render: renderGiftType
12955
+ }],
12956
+ //旺店通商品信息
12957
+ WDT_GOODS: [{
12958
+ dataIndex: 'goodId',
12959
+ title: "\u5546\u54C1ID",
12960
+ align: 'center',
12961
+ ellipsis: true,
12962
+ width: 70
12963
+ }, {
12964
+ dataIndex: 'goodNo',
12965
+ title: "\u5546\u54C1\u7F16\u7801",
12966
+ align: 'center',
12967
+ ellipsis: true,
12968
+ width: 180
12969
+ }, {
12970
+ dataIndex: 'goodName',
12971
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12972
+ align: 'center',
12973
+ ellipsis: true,
12974
+ width: 250
12975
+ }, {
12976
+ dataIndex: 'specId',
12977
+ title: "".concat(text, "SKUID"),
12978
+ align: 'center',
12979
+ ellipsis: true,
12980
+ width: 100
12981
+ }, {
12982
+ dataIndex: 'specNo',
12983
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12984
+ align: 'center',
12985
+ ellipsis: true,
12986
+ width: 180
12987
+ }, {
12988
+ dataIndex: 'specName',
12989
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12990
+ align: 'center',
12991
+ ellipsis: true,
12992
+ width: 250
12993
+ }, {
12994
+ dataIndex: 'orderPrice',
12995
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12996
+ align: 'center',
12997
+ ellipsis: true,
12998
+ width: 100
12999
+ }, {
13000
+ dataIndex: 'num',
13001
+ title: "".concat(text, "\u6570\u91CF"),
13002
+ align: 'center',
13003
+ ellipsis: true,
13004
+ width: 100,
13005
+ render: function render(val, record, index) {
13006
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13007
+ style: {
13008
+ width: 70
13009
+ },
13010
+ value: val,
13011
+ min: 1,
13012
+ precision: 0,
13013
+ onChange: function onChange(num) {
13014
+ return updateHandle(num, index, 'num');
13015
+ }
13016
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13017
+ }
13018
+ }, {
13019
+ dataIndex: 'sharePrice',
13020
+ title: "\u5206\u644A\u4EF7",
13021
+ align: 'center',
13022
+ ellipsis: true,
13023
+ width: 70
13024
+ }, {
13025
+ dataIndex: 'giftType',
13026
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13027
+ align: 'center',
13028
+ ellipsis: true,
13029
+ width: 100,
13030
+ render: function render(val) {
13031
+ var giftTypeMap = {
13032
+ 0: '非赠品',
13033
+ 1: '自动赠送',
13034
+ 2: '手工赠送',
13035
+ 3: '回购自动送赠品',
13036
+ 4: '前N有礼送赠品',
13037
+ 6: '天猫优仓赠品',
13038
+ 7: '淘宝CRM会员送赠'
13039
+ };
13040
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13041
+ }
13042
+ }],
13043
+ //旺店通退货商品信息
13044
+ WDT_RETURN_GOODS: [{
13045
+ dataIndex: 'goodId',
13046
+ title: "\u5546\u54C1ID",
13047
+ align: 'center',
13048
+ ellipsis: true,
13049
+ width: 70
13050
+ }, {
13051
+ dataIndex: 'goodNo',
13052
+ title: "\u5546\u54C1\u7F16\u7801",
13053
+ align: 'center',
13054
+ ellipsis: true,
13055
+ width: 180
13056
+ }, {
13057
+ dataIndex: 'goodName',
13058
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13059
+ align: 'center',
13060
+ ellipsis: true,
13061
+ width: 250
13062
+ }, {
13063
+ dataIndex: 'specId',
13064
+ title: "".concat(text, "SKUID"),
13065
+ align: 'center',
13066
+ ellipsis: true,
13067
+ width: 100
13068
+ }, {
13069
+ dataIndex: 'specNo',
13070
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13071
+ align: 'center',
13072
+ ellipsis: true,
13073
+ width: 180
13074
+ }, {
13075
+ dataIndex: 'specName',
13076
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13077
+ align: 'center',
13078
+ ellipsis: true,
13079
+ width: 250
13080
+ }, {
13081
+ dataIndex: 'num',
13082
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13083
+ align: 'center',
13084
+ ellipsis: true,
13085
+ width: 100,
13086
+ render: function render(val, record, index) {
13087
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13088
+ style: {
13089
+ width: 70
13090
+ },
13091
+ value: val,
13092
+ min: 1,
13093
+ precision: 0,
13094
+ onChange: function onChange(num) {
13095
+ return updateHandle(num, index, 'num');
13096
+ }
13097
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13098
+ }
13099
+ }, {
13100
+ dataIndex: 'sharePrice',
13101
+ title: "\u5206\u644A\u4EF7",
13102
+ align: 'center',
13103
+ ellipsis: true,
13104
+ width: 80,
13105
+ render: function render(val, record, index) {
13106
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13107
+ style: {
13108
+ width: 70
13109
+ },
13110
+ value: val,
13111
+ min: 0,
13112
+ onChange: function onChange(value) {
13113
+ return updateHandle(value, index, 'sharePrice');
13114
+ }
13115
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13116
+ }
13117
+ }, {
13118
+ dataIndex: 'returnPrice',
13119
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13120
+ align: 'center',
13121
+ ellipsis: true,
13122
+ width: 100
13123
+ }, {
13124
+ dataIndex: 'giftType',
13125
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13126
+ align: 'center',
13127
+ ellipsis: true,
13128
+ width: 100,
13129
+ render: function render(val) {
13130
+ var giftTypeMap = {
13131
+ 0: '非赠品',
13132
+ 1: '自动赠送',
13133
+ 2: '手工赠送',
13134
+ 3: '回购自动送赠品',
13135
+ 4: '前N有礼送赠品',
13136
+ 6: '天猫优仓赠品',
13137
+ 7: '淘宝CRM会员送赠'
13138
+ };
13139
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13140
+ }
13141
+ }, {
13142
+ dataIndex: 'type',
13143
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13144
+ align: 'center',
13145
+ ellipsis: true,
13146
+ width: 100,
13147
+ render: function render(val, record, index) {
13148
+ var options = [{
13149
+ label: '单品',
13150
+ value: '1'
13151
+ }, {
13152
+ label: '组合装',
13153
+ value: '2'
13154
+ }];
13155
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13156
+ style: {
13157
+ width: 70
13158
+ },
13159
+ options: options,
13160
+ value: val,
13161
+ onChange: function onChange(value) {
13162
+ return updateHandle(value, index, 'type');
13163
+ }
13164
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13165
+ }
13166
+ }],
13167
+ //旺店通换出商品信息
13168
+ WDT_EXCHANGE_GOODS: [{
13169
+ dataIndex: 'goodId',
13170
+ title: "\u5546\u54C1ID",
13171
+ align: 'center',
13172
+ ellipsis: true,
13173
+ width: 70
13174
+ }, {
13175
+ dataIndex: 'goodNo',
13176
+ title: "\u5546\u54C1\u7F16\u7801",
13177
+ align: 'center',
13178
+ ellipsis: true,
13179
+ width: 180
13180
+ }, {
13181
+ dataIndex: 'goodName',
13182
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13183
+ align: 'center',
13184
+ ellipsis: true,
13185
+ width: 250
13186
+ }, {
13187
+ dataIndex: 'specId',
13188
+ title: "".concat(text, "SKUID"),
13189
+ align: 'center',
13190
+ ellipsis: true,
13191
+ width: 100
13192
+ }, {
13193
+ dataIndex: 'specNo',
13194
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13195
+ align: 'center',
13196
+ ellipsis: true,
13197
+ width: 180
13198
+ }, {
13199
+ dataIndex: 'specName',
13200
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13201
+ align: 'center',
13202
+ ellipsis: true,
13203
+ width: 250
13204
+ }, {
13205
+ dataIndex: 'num',
13206
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13207
+ align: 'center',
13208
+ ellipsis: true,
13209
+ width: 100,
13210
+ render: function render(val, record, index) {
13211
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13212
+ style: {
13213
+ width: 70
13214
+ },
13215
+ value: val,
13216
+ min: 1,
13217
+ precision: 0,
13218
+ onChange: function onChange(num) {
13219
+ return updateHandle(num, index, 'num');
13220
+ }
13221
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13222
+ }
13223
+ }, {
13224
+ dataIndex: 'price',
13225
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13226
+ align: 'center',
13227
+ ellipsis: true,
13228
+ width: 100,
13229
+ render: function render(val, record, index) {
13230
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13231
+ style: {
13232
+ width: 70
13233
+ },
13234
+ value: val,
13235
+ min: 0,
13236
+ onChange: function onChange(value) {
13237
+ return updateHandle(value, index, 'price');
13238
+ }
13239
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13240
+ }
13241
+ }, {
13242
+ dataIndex: 'exchangePrice',
13243
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13244
+ align: 'center',
13245
+ ellipsis: true,
13246
+ width: 100
13247
+ }, {
13248
+ dataIndex: 'giftType',
13249
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13250
+ align: 'center',
13251
+ ellipsis: true,
13252
+ width: 100,
13253
+ render: function render(val) {
13254
+ var giftTypeMap = {
13255
+ 0: '非赠品',
13256
+ 1: '自动赠送',
13257
+ 2: '手工赠送',
13258
+ 3: '回购自动送赠品',
13259
+ 4: '前N有礼送赠品',
13260
+ 6: '天猫优仓赠品',
13261
+ 7: '淘宝CRM会员送赠'
13262
+ };
13263
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13264
+ }
13265
+ }, {
13266
+ dataIndex: 'type',
13267
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13268
+ align: 'center',
13269
+ ellipsis: true,
13270
+ width: 100,
13271
+ render: function render(val, record, index) {
13272
+ var options = [{
13273
+ label: '单品',
13274
+ value: '1'
13275
+ }, {
13276
+ label: '组合装',
13277
+ value: '2'
13278
+ }];
13279
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13280
+ style: {
13281
+ width: 70
13282
+ },
13283
+ options: options,
13284
+ value: val,
13285
+ onChange: function onChange(value) {
13286
+ return updateHandle(value, index, 'type');
13287
+ }
13288
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13289
+ }
13290
+ }]
13291
+ };
13292
+ };
13293
+
13294
+ var getColumns$2 = function getColumns(_ref) {
13295
+ var _ref$text = _ref.text,
13296
+ text = _ref$text === void 0 ? '' : _ref$text,
13297
+ disabled = _ref.disabled,
13298
+ updateHandle = _ref.updateHandle;
13299
+ return {
13300
+ //万里牛商品信息
13301
+ WLN_GOODS: [{
13302
+ dataIndex: 'skuName',
13303
+ title: "".concat(text, "sku\u540D\u79F0"),
13304
+ align: 'center',
13305
+ ellipsis: true,
13306
+ width: 250
13307
+ }, {
13308
+ dataIndex: 'sku',
13309
+ title: "".concat(text, "sku\u7F16\u7801"),
13310
+ align: 'center',
13311
+ ellipsis: true,
13312
+ width: 100
13313
+ }, {
13314
+ dataIndex: 'name',
13315
+ title: "".concat(text, "\u540D\u79F0"),
13316
+ align: 'center',
13317
+ ellipsis: true,
13318
+ width: 250
13319
+ }, {
13320
+ dataIndex: 'pic',
13321
+ title: "\u56FE\u7247",
13322
+ align: 'center',
13323
+ ellipsis: true,
13324
+ width: 100,
13325
+ render: function render(val) {
13326
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13327
+ width: 60,
13328
+ src: val
13329
+ });
13330
+ }
13331
+ }, {
13332
+ dataIndex: 'code',
13333
+ title: "".concat(text, "\u7F16\u7801"),
13334
+ align: 'center',
13335
+ ellipsis: true,
13336
+ width: 100
13337
+ }, {
13338
+ dataIndex: 'money',
13339
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13340
+ align: 'center',
13341
+ ellipsis: true,
13342
+ width: 100
13343
+ }, {
13344
+ dataIndex: 'number',
13345
+ title: "".concat(text, "\u6570\u91CF"),
13346
+ align: 'center',
13347
+ ellipsis: true,
13348
+ width: 100,
13349
+ render: function render(val, record, index) {
13350
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13351
+ style: {
13352
+ width: 70
13353
+ },
13354
+ value: val,
13355
+ min: 1,
13356
+ precision: 0,
13357
+ onChange: function onChange(num) {
13358
+ return updateHandle(num, index, 'number');
13359
+ }
13360
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13361
+ }
13362
+ }, {
13363
+ dataIndex: 'share',
13364
+ title: "\u5206\u644A\u4EF7",
13365
+ align: 'center',
13366
+ ellipsis: true,
13367
+ width: 70
13368
+ }, {
13369
+ dataIndex: 'type',
13370
+ title: "\u8D60\u54C1\u7C7B\u578B",
13371
+ align: 'center',
13372
+ ellipsis: true,
13373
+ width: 100
13374
+ }]
13375
+ };
13376
+ };
13377
+
13378
+ var getColumnsMap = function getColumnsMap(args) {
13379
+ var _ref = args || {},
13380
+ _ref$text = _ref.text,
13381
+ text = _ref$text === void 0 ? '' : _ref$text,
13382
+ disabled = _ref.disabled,
13383
+ updateHandle = _ref.updateHandle;
13384
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13385
+ text: text,
13386
+ disabled: disabled,
13387
+ updateHandle: updateHandle
13388
+ })), getColumns$1({
13389
+ text: text,
13390
+ disabled: disabled,
13391
+ updateHandle: updateHandle
13392
+ })), getColumns$2({
13393
+ text: text,
13394
+ disabled: disabled,
13395
+ updateHandle: updateHandle
13396
+ })), {}, {
13397
+ default: [{
13398
+ dataIndex: 'mark',
13399
+ title: "\u5546\u54C1\u6807\u8BB0",
13400
+ align: 'center',
13401
+ ellipsis: true,
13402
+ width: 70,
13403
+ render: function render(val, record, index) {
13404
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13405
+ options: [{
13406
+ label: '是',
13407
+ value: '是'
13408
+ }, {
13409
+ label: '否',
13410
+ value: '否'
13411
+ }],
13412
+ disabled: disabled,
13413
+ value: val,
13414
+ onChange: function onChange(val) {
13415
+ return updateHandle(val, index, 'mark');
13416
+ }
13417
+ });
13418
+ }
13419
+ }, {
13420
+ dataIndex: 'skuName',
13421
+ title: "".concat(text, "sku\u540D\u79F0"),
13422
+ align: 'center',
13423
+ ellipsis: true,
13424
+ width: 250
13425
+ }, {
13426
+ dataIndex: 'sku',
13427
+ title: "".concat(text, "sku\u7F16\u7801"),
13428
+ align: 'center',
13429
+ ellipsis: true,
13430
+ width: 100
13431
+ }, {
13432
+ dataIndex: 'name',
13433
+ title: "".concat(text, "\u540D\u79F0"),
13434
+ align: 'center',
13435
+ ellipsis: true,
13436
+ width: 250
13437
+ }, {
13438
+ dataIndex: 'pic',
13439
+ title: "\u56FE\u7247",
13440
+ align: 'center',
13441
+ ellipsis: true,
13442
+ width: 100,
13443
+ render: function render(val) {
13444
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13445
+ width: 60,
13446
+ src: val
13447
+ });
13448
+ }
13449
+ }, {
13450
+ dataIndex: 'code',
13451
+ title: "".concat(text, "\u7F16\u7801"),
13452
+ align: 'center',
13453
+ ellipsis: true,
13454
+ width: 100
13455
+ }, {
13456
+ dataIndex: 'money',
13457
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13458
+ align: 'center',
13459
+ ellipsis: true,
13460
+ width: 100
13461
+ }, {
13462
+ dataIndex: 'number',
13463
+ title: "".concat(text, "\u6570\u91CF"),
13464
+ align: 'center',
13465
+ ellipsis: true,
13466
+ width: 100,
13467
+ render: function render(val, record, index) {
13468
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13469
+ style: {
13470
+ width: 70
13471
+ },
13472
+ value: val,
13473
+ min: 1,
13474
+ precision: 0,
13475
+ onChange: function onChange(num) {
13476
+ return updateHandle(num, index, 'number');
13477
+ }
13478
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13479
+ }
13480
+ }, {
13481
+ dataIndex: 'share',
13482
+ title: "\u5206\u644A\u4EF7",
13483
+ align: 'center',
13484
+ ellipsis: true,
13485
+ width: 70
13486
+ }, {
13487
+ dataIndex: 'type',
13488
+ title: "\u8D60\u54C1\u7C7B\u578B",
13489
+ align: 'center',
13490
+ ellipsis: true,
13491
+ width: 100
13492
+ }]
13493
+ });
13494
+ };
13495
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13496
+ var clone_columnsMap = lodash.cloneDeep(getColumnsMap());
13497
+ var newColumns = {};
13498
+ Object.keys(clone_columnsMap).forEach(function (key) {
13499
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
13500
+ return {
13501
+ title: col.title,
13502
+ dataIndex: col.dataIndex
13503
+ };
13504
+ });
13505
+ });
13506
+ return newColumns;
13507
+ };
13508
+ var columnsBaseInfoMap = getColumnsBaseInfo();
13509
+
13510
+ var renderFieldMap$1 = {
13511
+ goodsNumber: function goodsNumber(_ref) {
13512
+ var disabled = _ref.disabled,
13513
+ updateHandle = _ref.updateHandle;
13514
+ return function (val, record, index) {
13515
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13516
+ style: {
13517
+ width: 70
13518
+ },
13519
+ value: val,
13520
+ min: 1,
13521
+ precision: 0,
13522
+ onChange: function onChange(num) {
13523
+ return updateHandle(num, index, 'goodsNumber');
13524
+ }
13525
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13526
+ };
13527
+ },
13528
+ goodsPrice: function goodsPrice(_ref2) {
13529
+ var disabled = _ref2.disabled,
13530
+ updateHandle = _ref2.updateHandle;
13531
+ return function (val, record, index) {
13532
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13533
+ style: {
13534
+ width: 70
13535
+ },
13536
+ value: val,
13537
+ min: 0,
13538
+ onChange: function onChange(value) {
13539
+ return updateHandle(value, index, 'goodsPrice');
13540
+ }
13541
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13542
+ };
13543
+ },
13544
+ isGift: function isGift(_ref3) {
13545
+ var disabled = _ref3.disabled,
13546
+ updateHandle = _ref3.updateHandle;
13547
+ return function (val, record, index) {
13548
+ var options = [{
13549
+ label: '是',
13550
+ value: 1
13551
+ }, {
13552
+ label: '否',
13553
+ value: 0
13554
+ }];
13555
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13556
+ style: {
13557
+ width: 70
13558
+ },
13559
+ options: options,
13560
+ value: val,
13561
+ onChange: function onChange(value) {
13562
+ return updateHandle(value, index, 'isGift');
13563
+ },
13564
+ getPopupContainer: function getPopupContainer() {
13565
+ return document.getElementById('bsE3ReissueGoods');
13566
+ }
13567
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
13568
+ };
13569
+ }
13570
+ };
13571
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13572
+ var disabled = _ref4.disabled,
13573
+ updateHandle = _ref4.updateHandle,
13574
+ operate = _ref4.operate;
13575
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
13576
+ var newItem = _objectSpread2({
13577
+ align: 'center',
13578
+ ellipsis: true
13579
+ }, item);
13580
+ if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
13581
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13582
+ render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
13583
+ disabled: disabled,
13584
+ updateHandle: updateHandle
13585
+ })
13586
+ });
13587
+ }
13588
+ return newItem;
13589
+ });
13590
+ };
13591
+
13592
+ var MAIN_FIELD = 'uuid';
13593
+ var SelectTradeGoods = function SelectTradeGoods(_ref) {
13594
+ var columns = _ref.columns,
13595
+ dataSource = _ref.dataSource,
13596
+ selectedRowKeys = _ref.selectedRowKeys,
13597
+ onChangeSelectedKeys = _ref.onChangeSelectedKeys;
13598
+ var _useState = React.useState(false),
13599
+ _useState2 = _slicedToArray(_useState, 2),
13600
+ tradeGoodsVisible = _useState2[0],
13601
+ setTradeGoodsVisible = _useState2[1];
13602
+ var openModal = function openModal() {
13603
+ return setTradeGoodsVisible(true);
13604
+ };
13605
+ var closeModal = function closeModal() {
13606
+ return setTradeGoodsVisible(false);
13607
+ };
13608
+ var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13609
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13610
+ }), selectedRowKeys);
13611
+ var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
13612
+ return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
13613
+ }));
13614
+ var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
13615
+ console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
13616
+ onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
13617
+ };
13618
+ var rowSelection = {
13619
+ selectedRowKeys: selectedRowKeys,
13620
+ onChange: handleChangeSelectedKeys
13621
+ };
13622
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13623
+ type: "link",
13624
+ onClick: openModal
13625
+ }, "\u9009\u62E9\u8BA2\u5355\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
13626
+ title: "\u8BA2\u5355\u5546\u54C1",
13627
+ visible: tradeGoodsVisible,
13628
+ footer: null,
13629
+ onCancel: closeModal
13630
+ }, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
13631
+ rowKey: MAIN_FIELD,
13632
+ rowSelection: rowSelection,
13633
+ columns: columns,
13634
+ dataSource: dataSource,
13635
+ pagination: false,
13636
+ scroll: {
13637
+ x: 500,
13638
+ y: 500
13639
+ }
13640
+ }), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
13641
+ };
13642
+ var getButtonText = function getButtonText() {
13643
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
13644
+ if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
13645
+ return '选择百胜ERP商品';
13646
+ }
13647
+ if (['WDT_REISSUE_GOODS'].includes(type)) {
13648
+ return '选择旺店通商品';
13649
+ }
13650
+ return '选择商品';
13651
+ };
13652
+ var GoodItem$1 = function GoodItem(props) {
13653
+ var _props$value = props.value,
13654
+ value = _props$value === void 0 ? [] : _props$value,
13655
+ type = props.type,
13656
+ onChange = props.onChange,
13657
+ disabled = props.disabled,
13658
+ _props$showHeader = props.showHeader,
13659
+ showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
13660
+ width = props.width,
13661
+ _props$shopList = props.shopList,
13662
+ shopList = _props$shopList === void 0 ? [] : _props$shopList,
13663
+ _props$shopId = props.shopId,
13664
+ shopId = _props$shopId === void 0 ? '' : _props$shopId,
13665
+ _props$maxLength = props.maxLength,
13666
+ maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
13667
+ _props$showChangeBtn = props.showChangeBtn,
13668
+ showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
13669
+ _props$showModeBtn = props.showModeBtn,
13670
+ showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
13671
+ _props$isStrict = props.isStrict,
13672
+ isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
13673
+ _props$tableSelect = props.tableSelect,
13674
+ tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
13675
+ _props$selectType = props.selectType,
13676
+ selectType = _props$selectType === void 0 ? '' : _props$selectType,
13677
+ _props$otherOperation = props.otherOperations,
13678
+ otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
13679
+ _props$canUpdateNumbe = props.canUpdateNumber,
13680
+ canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
13681
+ shopCode = props.shopCode,
13682
+ _props$companyKey = props.companyKey,
13683
+ companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
13684
+ onSelect = props.onSelect,
13685
+ onDelete = props.onDelete,
13686
+ onModeChange = props.onModeChange,
12666
13687
  tradeGoods = props.tradeGoods;
12667
13688
  var refModal = React.useRef();
12668
13689
  console.debug('表格数据', value);
@@ -12683,7 +13704,7 @@ var GoodItem$1 = function GoodItem(props) {
12683
13704
  // TODO: 商品订单中以选中商品
12684
13705
  var selectedGoods = React.useMemo(function () {
12685
13706
  return value === null || value === void 0 ? void 0 : value.map(function (v) {
12686
- return v.id;
13707
+ return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
12687
13708
  });
12688
13709
  }, [value]);
12689
13710
  var updateHandle = function updateHandle(val, index, columnType) {
@@ -12723,501 +13744,27 @@ var GoodItem$1 = function GoodItem(props) {
12723
13744
  return function (type) {
12724
13745
  var columns = [];
12725
13746
  switch (type) {
12726
- case 'WDT_REISSUE_GOODS':
12727
13747
  case 'WDT_GOODS':
12728
- columns = [{
12729
- dataIndex: 'goodId',
12730
- title: "\u5546\u54C1ID",
12731
- align: 'center',
12732
- ellipsis: true,
12733
- width: 70
12734
- }, {
12735
- dataIndex: 'goodNo',
12736
- title: "\u5546\u54C1\u7F16\u7801",
12737
- align: 'center',
12738
- ellipsis: true,
12739
- width: 180
12740
- }, {
12741
- dataIndex: 'goodName',
12742
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12743
- align: 'center',
12744
- ellipsis: true,
12745
- width: 250
12746
- }, {
12747
- dataIndex: 'specId',
12748
- title: "".concat(text, "SKUID"),
12749
- align: 'center',
12750
- ellipsis: true,
12751
- width: 100
12752
- }, {
12753
- dataIndex: 'specNo',
12754
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12755
- align: 'center',
12756
- ellipsis: true,
12757
- width: 180
12758
- }, {
12759
- dataIndex: 'specName',
12760
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12761
- align: 'center',
12762
- ellipsis: true,
12763
- width: 250
12764
- }, {
12765
- dataIndex: 'orderPrice',
12766
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12767
- align: 'center',
12768
- ellipsis: true,
12769
- width: 100
12770
- }, {
12771
- dataIndex: 'num',
12772
- title: "".concat(text, "\u6570\u91CF"),
12773
- align: 'center',
12774
- ellipsis: true,
12775
- width: 100,
12776
- render: function render(val, record, index) {
12777
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12778
- style: {
12779
- width: 70
12780
- },
12781
- value: val,
12782
- min: 1,
12783
- precision: 0,
12784
- onChange: function onChange(num) {
12785
- return updateHandle(num, index, 'num');
12786
- }
12787
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12788
- }
12789
- },
12790
- // {
12791
- // dataIndex: 'actualNum',
12792
- // title: `${text}实发数量`,
12793
- // align: 'center',
12794
- // ellipsis: true,
12795
- // width: 100,
12796
- // },
12797
- {
12798
- dataIndex: 'sharePrice',
12799
- title: "\u5206\u644A\u4EF7",
12800
- align: 'center',
12801
- ellipsis: true,
12802
- width: 70
12803
- }, {
12804
- dataIndex: 'giftType',
12805
- title: "\u8D60\u54C1\u65B9\u5F0F",
12806
- align: 'center',
12807
- ellipsis: true,
12808
- width: 100,
12809
- render: function render(val) {
12810
- var giftTypeMap = {
12811
- 0: '非赠品',
12812
- 1: '自动赠送',
12813
- 2: '手工赠送',
12814
- 3: '回购自动送赠品',
12815
- 4: '前N有礼送赠品',
12816
- 6: '天猫优仓赠品',
12817
- 7: '淘宝CRM会员送赠'
12818
- };
12819
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12820
- }
12821
- }];
12822
- break;
12823
13748
  case 'WDT_RETURN_GOODS':
12824
- {
12825
- columns = [{
12826
- dataIndex: 'goodId',
12827
- title: "\u5546\u54C1ID",
12828
- align: 'center',
12829
- ellipsis: true,
12830
- width: 70
12831
- }, {
12832
- dataIndex: 'goodNo',
12833
- title: "\u5546\u54C1\u7F16\u7801",
12834
- align: 'center',
12835
- ellipsis: true,
12836
- width: 180
12837
- }, {
12838
- dataIndex: 'goodName',
12839
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12840
- align: 'center',
12841
- ellipsis: true,
12842
- width: 250
12843
- }, {
12844
- dataIndex: 'specId',
12845
- title: "".concat(text, "SKUID"),
12846
- align: 'center',
12847
- ellipsis: true,
12848
- width: 100
12849
- }, {
12850
- dataIndex: 'specNo',
12851
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12852
- align: 'center',
12853
- ellipsis: true,
12854
- width: 180
12855
- }, {
12856
- dataIndex: 'specName',
12857
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12858
- align: 'center',
12859
- ellipsis: true,
12860
- width: 250
12861
- }, {
12862
- dataIndex: 'num',
12863
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12864
- align: 'center',
12865
- ellipsis: true,
12866
- width: 100,
12867
- render: function render(val, record, index) {
12868
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12869
- style: {
12870
- width: 70
12871
- },
12872
- value: val,
12873
- min: 1,
12874
- precision: 0,
12875
- onChange: function onChange(num) {
12876
- return updateHandle(num, index, 'num');
12877
- }
12878
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12879
- }
12880
- }, {
12881
- dataIndex: 'sharePrice',
12882
- title: "\u5206\u644A\u4EF7",
12883
- align: 'center',
12884
- ellipsis: true,
12885
- width: 80,
12886
- render: function render(val, record, index) {
12887
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12888
- style: {
12889
- width: 70
12890
- },
12891
- value: val,
12892
- min: 0,
12893
- onChange: function onChange(value) {
12894
- return updateHandle(value, index, 'sharePrice');
12895
- }
12896
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12897
- }
12898
- }, {
12899
- dataIndex: 'returnPrice',
12900
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
12901
- align: 'center',
12902
- ellipsis: true,
12903
- width: 100
12904
- }, {
12905
- dataIndex: 'giftType',
12906
- title: "\u8D60\u54C1\u65B9\u5F0F",
12907
- align: 'center',
12908
- ellipsis: true,
12909
- width: 100,
12910
- render: function render(val) {
12911
- var giftTypeMap = {
12912
- 0: '非赠品',
12913
- 1: '自动赠送',
12914
- 2: '手工赠送',
12915
- 3: '回购自动送赠品',
12916
- 4: '前N有礼送赠品',
12917
- 6: '天猫优仓赠品',
12918
- 7: '淘宝CRM会员送赠'
12919
- };
12920
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12921
- }
12922
- }, {
12923
- dataIndex: 'type',
12924
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
12925
- align: 'center',
12926
- ellipsis: true,
12927
- width: 100,
12928
- render: function render(val, record, index) {
12929
- var options = [{
12930
- label: '单品',
12931
- value: '1'
12932
- }, {
12933
- label: '组合装',
12934
- value: '2'
12935
- }];
12936
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12937
- style: {
12938
- width: 70
12939
- },
12940
- options: options,
12941
- value: val,
12942
- onChange: function onChange(value) {
12943
- return updateHandle(value, index, 'type');
12944
- }
12945
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12946
- }
12947
- }];
12948
- }
12949
- break;
12950
13749
  case 'WDT_EXCHANGE_GOODS':
13750
+ case 'BS_E3_GOODS':
13751
+ case 'BS_GOODS':
13752
+ case 'WLN_GOODS':
12951
13753
  {
12952
- columns = [{
12953
- dataIndex: 'goodId',
12954
- title: "\u5546\u54C1ID",
12955
- align: 'center',
12956
- ellipsis: true,
12957
- width: 70
12958
- }, {
12959
- dataIndex: 'goodNo',
12960
- title: "\u5546\u54C1\u7F16\u7801",
12961
- align: 'center',
12962
- ellipsis: true,
12963
- width: 180
12964
- }, {
12965
- dataIndex: 'goodName',
12966
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12967
- align: 'center',
12968
- ellipsis: true,
12969
- width: 250
12970
- }, {
12971
- dataIndex: 'specId',
12972
- title: "".concat(text, "SKUID"),
12973
- align: 'center',
12974
- ellipsis: true,
12975
- width: 100
12976
- }, {
12977
- dataIndex: 'specNo',
12978
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12979
- align: 'center',
12980
- ellipsis: true,
12981
- width: 180
12982
- }, {
12983
- dataIndex: 'specName',
12984
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12985
- align: 'center',
12986
- ellipsis: true,
12987
- width: 250
12988
- }, {
12989
- dataIndex: 'num',
12990
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
12991
- align: 'center',
12992
- ellipsis: true,
12993
- width: 100,
12994
- render: function render(val, record, index) {
12995
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12996
- style: {
12997
- width: 70
12998
- },
12999
- value: val,
13000
- min: 1,
13001
- precision: 0,
13002
- onChange: function onChange(num) {
13003
- return updateHandle(num, index, 'num');
13004
- }
13005
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13006
- }
13007
- }, {
13008
- dataIndex: 'price',
13009
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13010
- align: 'center',
13011
- ellipsis: true,
13012
- width: 100,
13013
- render: function render(val, record, index) {
13014
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13015
- style: {
13016
- width: 70
13017
- },
13018
- value: val,
13019
- min: 0,
13020
- onChange: function onChange(value) {
13021
- return updateHandle(value, index, 'price');
13022
- }
13023
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13024
- }
13025
- }, {
13026
- dataIndex: 'exchangePrice',
13027
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13028
- align: 'center',
13029
- ellipsis: true,
13030
- width: 100
13031
- }, {
13032
- dataIndex: 'giftType',
13033
- title: "\u8D60\u54C1\u65B9\u5F0F",
13034
- align: 'center',
13035
- ellipsis: true,
13036
- width: 100,
13037
- render: function render(val) {
13038
- var giftTypeMap = {
13039
- 0: '非赠品',
13040
- 1: '自动赠送',
13041
- 2: '手工赠送',
13042
- 3: '回购自动送赠品',
13043
- 4: '前N有礼送赠品',
13044
- 6: '天猫优仓赠品',
13045
- 7: '淘宝CRM会员送赠'
13046
- };
13047
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13048
- }
13049
- }, {
13050
- dataIndex: 'type',
13051
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13052
- align: 'center',
13053
- ellipsis: true,
13054
- width: 100,
13055
- render: function render(val, record, index) {
13056
- var options = [{
13057
- label: '单品',
13058
- value: '1'
13059
- }, {
13060
- label: '组合装',
13061
- value: '2'
13062
- }];
13063
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13064
- style: {
13065
- width: 70
13066
- },
13067
- options: options,
13068
- value: val,
13069
- onChange: function onChange(value) {
13070
- return updateHandle(value, index, 'type');
13071
- }
13072
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13073
- }
13074
- }];
13754
+ columns = getColumnsMap({
13755
+ text: text,
13756
+ disabled: disabled,
13757
+ updateHandle: updateHandle
13758
+ })[type];
13075
13759
  }
13076
13760
  break;
13077
- case 'BS_E3_GOODS':
13761
+ case 'WDT_REISSUE_GOODS':
13078
13762
  {
13079
- columns = [{
13080
- dataIndex: 'sku',
13081
- title: "SKU",
13082
- align: 'center',
13083
- ellipsis: true,
13084
- width: 150
13085
- }, {
13086
- dataIndex: 'skuId',
13087
- title: "SKU ID",
13088
- align: 'center',
13089
- ellipsis: true,
13090
- width: 150
13091
- }, {
13092
- dataIndex: 'goodsName',
13093
- title: "\u5546\u54C1\u540D\u79F0",
13094
- align: 'center',
13095
- ellipsis: true,
13096
- width: 150
13097
- }, {
13098
- dataIndex: 'goodsShortName',
13099
- title: "\u5546\u54C1\u7B80\u79F0",
13100
- align: 'center',
13101
- ellipsis: true,
13102
- width: 100
13103
- }, {
13104
- dataIndex: 'picPath',
13105
- title: "\u5546\u54C1\u56FE\u7247",
13106
- align: 'center',
13107
- ellipsis: true,
13108
- width: 100,
13109
- render: function render(val) {
13110
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13111
- width: 60,
13112
- src: val
13113
- });
13114
- }
13115
- }, {
13116
- dataIndex: 'goodsSn',
13117
- title: "\u8D27\u53F7",
13118
- align: 'center',
13119
- ellipsis: true,
13120
- width: 150
13121
- }, {
13122
- dataIndex: 'goodsId',
13123
- title: "\u8D27\u53F7ID",
13124
- align: 'center',
13125
- ellipsis: true,
13126
- width: 150
13127
- }, {
13128
- dataIndex: 'colorName',
13129
- title: "\u989C\u8272\u540D\u79F0",
13130
- align: 'center',
13131
- ellipsis: true,
13132
- width: 100
13133
- }, {
13134
- dataIndex: 'colorCode',
13135
- title: "\u989C\u8272\u4EE3\u7801",
13136
- align: 'center',
13137
- ellipsis: true,
13138
- width: 150
13139
- }, {
13140
- dataIndex: 'sizeName',
13141
- title: "\u5C3A\u7801\u540D\u79F0",
13142
- align: 'center',
13143
- ellipsis: true,
13144
- width: 100
13145
- }, {
13146
- dataIndex: 'sizeCode',
13147
- title: "\u5C3A\u7801\u4EE3\u7801",
13148
- align: 'center',
13149
- ellipsis: true,
13150
- width: 100
13151
- }, {
13152
- dataIndex: 'brandName',
13153
- title: "\u54C1\u724C\u540D\u79F0",
13154
- align: 'center',
13155
- ellipsis: true,
13156
- width: 150
13157
- }, {
13158
- dataIndex: 'goodsNumber',
13159
- title: "\u5546\u54C1\u6570\u91CF",
13160
- align: 'center',
13161
- ellipsis: true,
13162
- width: 100
13163
- }, {
13164
- dataIndex: 'goodsPrice',
13165
- title: "\u5546\u54C1\u5355\u4EF7",
13166
- align: 'center',
13167
- ellipsis: true,
13168
- width: 120
13169
- }, {
13170
- dataIndex: 'shopPrice',
13171
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13172
- align: 'center',
13173
- ellipsis: true,
13174
- width: 120
13175
- }, {
13176
- dataIndex: 'sharePrice',
13177
- title: "\u5206\u644A\u4EF7",
13178
- align: 'center',
13179
- ellipsis: true,
13180
- width: 120
13181
- }, {
13182
- dataIndex: 'sharePayment',
13183
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13184
- align: 'center',
13185
- ellipsis: true,
13186
- width: 120
13187
- }, {
13188
- dataIndex: 'payment',
13189
- title: "\u5B9E\u4ED8\u91D1\u989D",
13190
- align: 'center',
13191
- ellipsis: true,
13192
- width: 120
13193
- }, {
13194
- dataIndex: 'tcSku',
13195
- title: "\u5957\u9910SKU",
13196
- align: 'center',
13197
- ellipsis: true,
13198
- width: 150
13199
- }, {
13200
- dataIndex: 'tcGoodsNumber',
13201
- title: "\u5957\u9910\u5957\u6570",
13202
- align: 'center',
13203
- ellipsis: true,
13204
- width: 100
13205
- }, {
13206
- dataIndex: 'taoCanSingleSl',
13207
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13208
- align: 'center',
13209
- ellipsis: true,
13210
- width: 100
13211
- }, {
13212
- dataIndex: 'isGift',
13213
- title: "\u662F\u5426\u8D60\u54C1",
13214
- align: 'center',
13215
- ellipsis: true,
13216
- width: 100,
13217
- render: function render(val) {
13218
- return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13219
- }
13220
- }];
13763
+ columns = getWdtReissueGoodColumns({
13764
+ disabled: disabled,
13765
+ updateHandle: updateHandle,
13766
+ operate: operate
13767
+ });
13221
13768
  }
13222
13769
  break;
13223
13770
  case 'BS_E3_REISSUE_GOODS':
@@ -13230,102 +13777,11 @@ var GoodItem$1 = function GoodItem(props) {
13230
13777
  }
13231
13778
  break;
13232
13779
  default:
13233
- columns = [{
13234
- dataIndex: 'mark',
13235
- title: "\u5546\u54C1\u6807\u8BB0",
13236
- align: 'center',
13237
- ellipsis: true,
13238
- width: 70,
13239
- render: function render(val, record, index) {
13240
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13241
- options: [{
13242
- label: '是',
13243
- value: '是'
13244
- }, {
13245
- label: '否',
13246
- value: '否'
13247
- }],
13248
- disabled: disabled,
13249
- value: val,
13250
- onChange: function onChange(val) {
13251
- return updateHandle(val, index, 'mark');
13252
- }
13253
- });
13254
- }
13255
- }, {
13256
- dataIndex: 'skuName',
13257
- title: "".concat(text, "sku\u540D\u79F0"),
13258
- align: 'center',
13259
- ellipsis: true,
13260
- width: 250
13261
- }, {
13262
- dataIndex: 'sku',
13263
- title: "".concat(text, "sku\u7F16\u7801"),
13264
- align: 'center',
13265
- ellipsis: true,
13266
- width: 100
13267
- }, {
13268
- dataIndex: 'name',
13269
- title: "".concat(text, "\u540D\u79F0"),
13270
- align: 'center',
13271
- ellipsis: true,
13272
- width: 250
13273
- }, {
13274
- dataIndex: 'pic',
13275
- title: "\u56FE\u7247",
13276
- align: 'center',
13277
- ellipsis: true,
13278
- width: 100,
13279
- render: function render(val) {
13280
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13281
- width: 60,
13282
- src: val
13283
- });
13284
- }
13285
- }, {
13286
- dataIndex: 'code',
13287
- title: "".concat(text, "\u7F16\u7801"),
13288
- align: 'center',
13289
- ellipsis: true,
13290
- width: 100
13291
- }, {
13292
- dataIndex: 'money',
13293
- title: "\u5B9E\u4ED8\u91D1\u989D",
13294
- align: 'center',
13295
- ellipsis: true,
13296
- width: 100
13297
- }, {
13298
- dataIndex: 'number',
13299
- title: "".concat(text, "\u6570\u91CF"),
13300
- align: 'center',
13301
- ellipsis: true,
13302
- width: 100,
13303
- render: function render(val, record, index) {
13304
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13305
- style: {
13306
- width: 70
13307
- },
13308
- value: val,
13309
- min: 1,
13310
- precision: 0,
13311
- onChange: function onChange(num) {
13312
- return updateHandle(num, index, 'number');
13313
- }
13314
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13315
- }
13316
- }, {
13317
- dataIndex: 'share',
13318
- title: "\u5206\u644A\u4EF7",
13319
- align: 'center',
13320
- ellipsis: true,
13321
- width: 70
13322
- }, {
13323
- dataIndex: 'type',
13324
- title: "\u8D60\u54C1\u7C7B\u578B",
13325
- align: 'center',
13326
- ellipsis: true,
13327
- width: 100
13328
- }];
13780
+ columns = getColumnsMap({
13781
+ text: text,
13782
+ disabled: disabled,
13783
+ updateHandle: updateHandle
13784
+ })['default'];
13329
13785
  }
13330
13786
  return columns;
13331
13787
  };
@@ -13337,6 +13793,24 @@ var GoodItem$1 = function GoodItem(props) {
13337
13793
  return COLUMNS_INFO(type);
13338
13794
  };
13339
13795
  var newColumns = React.useMemo(function () {
13796
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
13797
+ var baseInfoColumns = [];
13798
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
13799
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
13800
+ if (isStringArray) {
13801
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
13802
+ return showHeader.includes(col.dataIndex);
13803
+ });
13804
+ } else if (isObjectArray) {
13805
+ baseInfoColumns = showHeader.filter(function (col) {
13806
+ return col.show !== false;
13807
+ }).map(function (col) {
13808
+ var currentCol = initBaseInfoColumns.find(function (item) {
13809
+ return item.dataIndex === col.dataIndex;
13810
+ });
13811
+ return currentCol ? currentCol : undefined;
13812
+ }).filter(Boolean);
13813
+ }
13340
13814
  var columnList = [{
13341
13815
  dataIndex: '',
13342
13816
  title: '序号',
@@ -13346,9 +13820,7 @@ var GoodItem$1 = function GoodItem(props) {
13346
13820
  render: function render(val, record, index) {
13347
13821
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
13348
13822
  }
13349
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13350
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13351
- })));
13823
+ }].concat(_toConsumableArray(baseInfoColumns));
13352
13824
  if (!disabled) {
13353
13825
  columnList.push({
13354
13826
  dataIndex: '',
@@ -13426,6 +13898,7 @@ var GoodItem$1 = function GoodItem(props) {
13426
13898
  isGift: '',
13427
13899
  uuid: kmkfUtils.uuid(),
13428
13900
  canDelete: true,
13901
+ canEdit: true,
13429
13902
  goodsNumber: 1,
13430
13903
  canUpdateNumber: canUpdateNumber
13431
13904
  });
@@ -13497,7 +13970,7 @@ var GoodItem$1 = function GoodItem(props) {
13497
13970
  }), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
13498
13971
  type: "link",
13499
13972
  onClick: handleChangeGoods
13500
- }, ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? '选择百胜ERP商品' : '选择商品'), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13973
+ }, getButtonText(type)), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
13501
13974
  columns: newColumns,
13502
13975
  dataSource: value,
13503
13976
  rowKey: 'uuid',
@@ -15176,7 +15649,7 @@ var typeMap$1 = {
15176
15649
  }
15177
15650
  };
15178
15651
  var wdtReissue = function wdtReissue(props) {
15179
- var _value$wdtSystemOrder, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
15652
+ var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
15180
15653
  var value = props.value,
15181
15654
  onChange = props.onChange,
15182
15655
  _props$reasonList = props.reasonList,
@@ -15336,11 +15809,26 @@ var wdtReissue = function wdtReissue(props) {
15336
15809
  }
15337
15810
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15338
15811
  };
15812
+ var selectedGoodsChange = React.useCallback(function (skuList) {
15813
+ var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
15814
+ var newValue = _objectSpread2({}, value);
15815
+ // 原订单商品
15816
+ var originTradeGoodList = getGoodDetails({
15817
+ mode: isStrict
15818
+ }) || [];
15819
+ // 当前选中的所有商品【包含了原订单+商品库】
15820
+ 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)]) || [];
15821
+ newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
15822
+ return skuList.includes(item.uuid);
15823
+ });
15824
+ 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)]);
15825
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
15826
+ }, [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]);
15339
15827
  //显示选择商品按钮 原单换不显示选择商品
15340
15828
  var showChangeBtn = React.useMemo(function () {
15341
- var _typeMap$type23;
15342
- return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo]);
15343
- }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]]);
15829
+ var _typeMap$type27;
15830
+ return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
15831
+ }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
15344
15832
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
15345
15833
  gutter: 8,
15346
15834
  wrap: true
@@ -15358,12 +15846,12 @@ var wdtReissue = function wdtReissue(props) {
15358
15846
  },
15359
15847
  disabled: disabled,
15360
15848
  allowClear: false,
15361
- 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)],
15849
+ 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)],
15362
15850
  onChange: function onChange(val) {
15363
15851
  return changeSystemOrderHandle(val);
15364
15852
  },
15365
15853
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
15366
- }, ((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) {
15854
+ }, ((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) {
15367
15855
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
15368
15856
  key: item.billNo,
15369
15857
  value: item.billNo,
@@ -15384,7 +15872,7 @@ var wdtReissue = function wdtReissue(props) {
15384
15872
  disabled: disabled,
15385
15873
  allowClear: false,
15386
15874
  options: reasonList,
15387
- 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)],
15875
+ 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)],
15388
15876
  onChange: function onChange(val) {
15389
15877
  return changeTypeHandle(val);
15390
15878
  }
@@ -15396,13 +15884,19 @@ var wdtReissue = function wdtReissue(props) {
15396
15884
  canUpdateNumber: showChangeBtn,
15397
15885
  showChangeBtn: showChangeBtn,
15398
15886
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
15399
- 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)],
15887
+ 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)],
15400
15888
  onChange: function onChange(val) {
15401
15889
  return changeGoodHandle(val);
15402
15890
  },
15403
15891
  onModeChange: handleModeChange,
15404
15892
  showModeBtn: showModeBtn,
15405
- isStrict: isStrict
15893
+ isStrict: isStrict,
15894
+ tradeGoods: {
15895
+ originDataSource: getGoodDetails({
15896
+ mode: isStrict
15897
+ }),
15898
+ selectedGoodsChange: selectedGoodsChange
15899
+ }
15406
15900
  })));
15407
15901
  };
15408
15902
 
@@ -16188,7 +16682,7 @@ var typeMap$2 = {
16188
16682
  }
16189
16683
  };
16190
16684
  var bsE3Reissue = function bsE3Reissue(props) {
16191
- var _typeMap$type21, _typeMap$type23, _typeMap$type24, _value$typeMap$type$s5, _typeMap$type25, _typeMap$type26, _typeMap$type27;
16685
+ var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
16192
16686
  var value = props.value,
16193
16687
  onChange = props.onChange,
16194
16688
  _props$reasonList = props.reasonList,
@@ -16326,15 +16820,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
16326
16820
  return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
16327
16821
  }, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
16328
16822
  var selectedGoodsChange = React.useCallback(function (skuList) {
16329
- var _typeMap$type22, _getGoodDetails;
16823
+ var _typeMap$type22, _typeMap$type23, _uniqBy;
16330
16824
  var newValue = _objectSpread2({}, value);
16331
- 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({
16825
+ // 原订单商品
16826
+ var originTradeGoodList = getGoodDetails({
16332
16827
  mode: isStrict
16333
- })) === null || _getGoodDetails === void 0 ? void 0 : _getGoodDetails.filter(function (item) {
16334
- return skuList.includes(item.id);
16828
+ }) || [];
16829
+ // 当前选中的所有商品【包含了原订单+商品库】
16830
+ 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)]) || [];
16831
+ newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
16832
+ return skuList.includes(item.uuid);
16335
16833
  });
16336
16834
  onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
16337
- }, [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]);
16835
+ }, [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]);
16338
16836
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
16339
16837
  gutter: 8,
16340
16838
  wrap: true,
@@ -16353,12 +16851,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
16353
16851
  },
16354
16852
  disabled: disabled,
16355
16853
  allowClear: false,
16356
- 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)],
16854
+ 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)],
16357
16855
  onChange: function onChange(val) {
16358
16856
  return changeSystemOrderHandle(val);
16359
16857
  },
16360
16858
  placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
16361
- }, ((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) {
16859
+ }, ((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) {
16362
16860
  return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
16363
16861
  key: item.billNo,
16364
16862
  value: item.billNo,
@@ -16379,7 +16877,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16379
16877
  disabled: disabled,
16380
16878
  allowClear: false,
16381
16879
  options: reasonList,
16382
- 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)],
16880
+ 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)],
16383
16881
  onChange: function onChange(val) {
16384
16882
  return changeTypeHandle(val);
16385
16883
  }
@@ -16391,7 +16889,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
16391
16889
  canUpdateNumber: showChangeBtn,
16392
16890
  showChangeBtn: showChangeBtn,
16393
16891
  shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
16394
- 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)],
16892
+ 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)],
16395
16893
  onChange: function onChange(val) {
16396
16894
  return changeGoodHandle(val);
16397
16895
  },
@@ -16468,3 +16966,4 @@ exports.TradeId = TradeId;
16468
16966
  exports.WdtGoodList = WdtGoodList;
16469
16967
  exports.WdtReissue = wdtReissue;
16470
16968
  exports.WlnGoods = WlnGoods;
16969
+ exports.columnsBaseInfoMap = columnsBaseInfoMap;