@kmkf-fe-packages/basic-components 1.22.6 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -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", {
@@ -12431,244 +12469,1105 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12431
12469
  };
12432
12470
  var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
12433
12471
 
12434
- var columns$3 = [{
12435
- dataIndex: 'sku',
12436
- title: "SKU",
12437
- width: 150
12438
- }, {
12439
- dataIndex: 'skuId',
12440
- title: "SKU ID",
12441
- width: 150
12442
- }, {
12443
- dataIndex: 'goodsName',
12444
- title: "\u5546\u54C1\u540D\u79F0",
12445
- width: 150
12446
- }, {
12447
- dataIndex: 'goodsShortName',
12448
- title: "\u5546\u54C1\u7B80\u79F0",
12449
- width: 150
12450
- }, {
12451
- dataIndex: 'picPath',
12452
- title: "\u5546\u54C1\u56FE\u7247",
12453
- width: 150
12454
- }, {
12455
- dataIndex: 'goodsSn',
12456
- title: "\u8D27\u53F7",
12457
- width: 150
12458
- }, {
12459
- dataIndex: 'goodsId',
12460
- title: "\u8D27\u53F7ID",
12461
- width: 150
12462
- }, {
12463
- dataIndex: 'colorName',
12464
- title: "\u989C\u8272\u540D\u79F0",
12465
- width: 150
12466
- }, {
12467
- dataIndex: 'colorCode',
12468
- title: "\u989C\u8272\u4EE3\u7801",
12469
- width: 150
12470
- }, {
12471
- dataIndex: 'sizeName',
12472
- title: "\u5C3A\u7801\u540D\u79F0",
12473
- width: 150
12474
- }, {
12475
- dataIndex: 'sizeCode',
12476
- title: "\u5C3A\u7801\u4EE3\u7801",
12477
- width: 150
12478
- }, {
12479
- dataIndex: 'brandName',
12480
- title: "\u54C1\u724C\u540D\u79F0",
12481
- width: 150
12482
- }, {
12483
- dataIndex: 'goodsNumber',
12484
- title: "\u5546\u54C1\u6570\u91CF",
12485
- width: 150
12486
- }, {
12487
- dataIndex: 'goodsPrice',
12488
- title: "\u5546\u54C1\u5355\u4EF7",
12489
- width: 150
12490
- }, {
12491
- dataIndex: 'shopPrice',
12492
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12493
- width: 150
12494
- }, {
12495
- dataIndex: 'isGift',
12496
- title: "\u662F\u5426\u8D60\u54C1",
12497
- width: 150,
12498
- render: function render(val) {
12499
- return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12500
- }
12501
- }];
12502
- var renderFieldMap = {
12503
- goodsNumber: function goodsNumber(_ref) {
12504
- var disabled = _ref.disabled,
12505
- updateHandle = _ref.updateHandle;
12506
- return function (val, record, index) {
12507
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12508
- style: {
12509
- width: 70
12510
- },
12511
- value: val,
12512
- min: 1,
12513
- precision: 0,
12514
- onChange: function onChange(num) {
12515
- return updateHandle(num, index, 'goodsNumber');
12516
- }
12517
- }) : /*#__PURE__*/React.createElement("span", null, val);
12518
- };
12519
- },
12520
- goodsPrice: function goodsPrice(_ref2) {
12521
- var disabled = _ref2.disabled,
12522
- updateHandle = _ref2.updateHandle;
12523
- return function (val, record, index) {
12524
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12525
- style: {
12526
- width: 70
12527
- },
12528
- value: val,
12529
- min: 0,
12530
- onChange: function onChange(value) {
12531
- return updateHandle(value, index, 'goodsPrice');
12532
- }
12533
- }) : /*#__PURE__*/React.createElement("span", null, val);
12534
- };
12535
- },
12536
- isGift: function isGift(_ref3) {
12537
- var disabled = _ref3.disabled,
12538
- updateHandle = _ref3.updateHandle;
12539
- return function (val, record, index) {
12540
- var options = [{
12541
- label: '是',
12542
- value: 1
12543
- }, {
12544
- label: '否',
12545
- value: 0
12546
- }];
12547
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
12548
- style: {
12549
- width: 70
12550
- },
12551
- options: options,
12552
- value: val,
12553
- onChange: function onChange(value) {
12554
- return updateHandle(value, index, 'isGift');
12555
- },
12556
- getPopupContainer: function getPopupContainer() {
12557
- return document.getElementById('bsE3ReissueGoods');
12558
- }
12559
- }) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
12560
- };
12561
- }
12562
- };
12563
- var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12564
- var disabled = _ref4.disabled,
12565
- updateHandle = _ref4.updateHandle,
12566
- operate = _ref4.operate;
12567
- return columns$3.map(function (item) {
12568
- 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",
12569
12551
  align: 'center',
12570
- ellipsis: true
12571
- }, item);
12572
- if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12573
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12574
- render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12575
- disabled: disabled,
12576
- updateHandle: updateHandle
12577
- })
12578
- });
12579
- }
12580
- return newItem;
12581
- });
12582
- };
12583
-
12584
- var renderGiftType = function renderGiftType(val) {
12585
- var giftTypeMap = {
12586
- 0: '非赠品',
12587
- 1: '自动赠送',
12588
- 2: '手工赠送',
12589
- 3: '回购自动送赠品',
12590
- 4: '前N有礼送赠品',
12591
- 6: '天猫优仓赠品',
12592
- 7: '淘宝CRM会员送赠'
12593
- };
12594
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12595
- };
12596
- var columns$4 = [{
12597
- dataIndex: 'goodId',
12598
- title: "\u5546\u54C1ID",
12599
- width: 120
12600
- }, {
12601
- dataIndex: 'goodNo',
12602
- title: "\u5546\u54C1\u7F16\u7801",
12603
- width: 200
12604
- }, {
12605
- dataIndex: 'goodName',
12606
- title: "\u5546\u54C1\u540D\u79F0",
12607
- width: 200
12608
- }, {
12609
- dataIndex: 'specId',
12610
- title: "SKUID",
12611
- width: 150
12612
- }, {
12613
- dataIndex: 'specNo',
12614
- title: "\u5546\u54C1SKU\u7F16\u7801",
12615
- width: 200
12616
- }, {
12617
- dataIndex: 'specName',
12618
- title: "\u5546\u54C1SKU\u540D\u79F0",
12619
- width: 250
12620
- }, {
12621
- dataIndex: 'orderPrice',
12622
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12623
- width: 200
12624
- }, {
12625
- dataIndex: 'num',
12626
- title: "\u6570\u91CF",
12627
- width: 100
12628
- }, {
12629
- dataIndex: 'sharePrice',
12630
- title: "\u5206\u644A\u4EF7",
12631
- width: 150
12632
- }, {
12633
- dataIndex: 'giftType',
12634
- title: "\u8D60\u54C1\u65B9\u5F0F",
12635
- width: 100,
12636
- render: renderGiftType
12637
- }];
12638
- var renderFieldMap$1 = {
12639
- num: function num(_ref) {
12640
- var disabled = _ref.disabled,
12641
- updateHandle = _ref.updateHandle;
12642
- return function (val, record, index) {
12643
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12644
- style: {
12645
- width: 70
12646
- },
12647
- value: val,
12648
- min: 1,
12649
- precision: 0,
12650
- onChange: function onChange(num) {
12651
- return updateHandle(num, index, 'num');
12652
- }
12653
- }) : /*#__PURE__*/React.createElement("span", null, val);
12654
- };
12655
- },
12656
- giftType: function giftType() {
12657
- return renderGiftType;
12658
- }
12659
- };
12660
- var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12661
- var disabled = _ref2.disabled,
12662
- updateHandle = _ref2.updateHandle,
12663
- operate = _ref2.operate;
12664
- return columns$4.map(function (item) {
12665
- var newItem = _objectSpread2({
12552
+ ellipsis: true,
12553
+ width: 150
12554
+ }, {
12555
+ dataIndex: 'skuId',
12556
+ title: "SKU ID",
12666
12557
  align: 'center',
12667
- ellipsis: true
12668
- }, item);
12669
- if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
12670
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12671
- render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
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]({
12672
13571
  disabled: disabled,
12673
13572
  updateHandle: updateHandle
12674
13573
  })
@@ -12833,548 +13732,27 @@ var GoodItem$1 = function GoodItem(props) {
12833
13732
  return function (type) {
12834
13733
  var columns = [];
12835
13734
  switch (type) {
12836
- case 'WDT_REISSUE_GOODS':
12837
- {
12838
- columns = getWdtReissueGoodColumns({
12839
- disabled: disabled,
12840
- updateHandle: updateHandle,
12841
- operate: operate
12842
- });
12843
- }
12844
- break;
12845
13735
  case 'WDT_GOODS':
12846
- columns = [{
12847
- dataIndex: 'goodId',
12848
- title: "\u5546\u54C1ID",
12849
- align: 'center',
12850
- ellipsis: true,
12851
- width: 70
12852
- }, {
12853
- dataIndex: 'goodNo',
12854
- title: "\u5546\u54C1\u7F16\u7801",
12855
- align: 'center',
12856
- ellipsis: true,
12857
- width: 180
12858
- }, {
12859
- dataIndex: 'goodName',
12860
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12861
- align: 'center',
12862
- ellipsis: true,
12863
- width: 250
12864
- }, {
12865
- dataIndex: 'specId',
12866
- title: "".concat(text, "SKUID"),
12867
- align: 'center',
12868
- ellipsis: true,
12869
- width: 100
12870
- }, {
12871
- dataIndex: 'specNo',
12872
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12873
- align: 'center',
12874
- ellipsis: true,
12875
- width: 180
12876
- }, {
12877
- dataIndex: 'specName',
12878
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12879
- align: 'center',
12880
- ellipsis: true,
12881
- width: 250
12882
- }, {
12883
- dataIndex: 'orderPrice',
12884
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12885
- align: 'center',
12886
- ellipsis: true,
12887
- width: 100
12888
- }, {
12889
- dataIndex: 'num',
12890
- title: "".concat(text, "\u6570\u91CF"),
12891
- align: 'center',
12892
- ellipsis: true,
12893
- width: 100,
12894
- render: function render(val, record, index) {
12895
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12896
- style: {
12897
- width: 70
12898
- },
12899
- value: val,
12900
- min: 1,
12901
- precision: 0,
12902
- onChange: function onChange(num) {
12903
- return updateHandle(num, index, 'num');
12904
- }
12905
- }) : /*#__PURE__*/React.createElement("span", null, val);
12906
- }
12907
- },
12908
- // {
12909
- // dataIndex: 'actualNum',
12910
- // title: `${text}实发数量`,
12911
- // align: 'center',
12912
- // ellipsis: true,
12913
- // width: 100,
12914
- // },
12915
- {
12916
- dataIndex: 'sharePrice',
12917
- title: "\u5206\u644A\u4EF7",
12918
- align: 'center',
12919
- ellipsis: true,
12920
- width: 70
12921
- }, {
12922
- dataIndex: 'giftType',
12923
- title: "\u8D60\u54C1\u65B9\u5F0F",
12924
- align: 'center',
12925
- ellipsis: true,
12926
- width: 100,
12927
- render: function render(val) {
12928
- var giftTypeMap = {
12929
- 0: '非赠品',
12930
- 1: '自动赠送',
12931
- 2: '手工赠送',
12932
- 3: '回购自动送赠品',
12933
- 4: '前N有礼送赠品',
12934
- 6: '天猫优仓赠品',
12935
- 7: '淘宝CRM会员送赠'
12936
- };
12937
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
12938
- }
12939
- }];
12940
- break;
12941
13736
  case 'WDT_RETURN_GOODS':
12942
- {
12943
- columns = [{
12944
- dataIndex: 'goodId',
12945
- title: "\u5546\u54C1ID",
12946
- align: 'center',
12947
- ellipsis: true,
12948
- width: 70
12949
- }, {
12950
- dataIndex: 'goodNo',
12951
- title: "\u5546\u54C1\u7F16\u7801",
12952
- align: 'center',
12953
- ellipsis: true,
12954
- width: 180
12955
- }, {
12956
- dataIndex: 'goodName',
12957
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12958
- align: 'center',
12959
- ellipsis: true,
12960
- width: 250
12961
- }, {
12962
- dataIndex: 'specId',
12963
- title: "".concat(text, "SKUID"),
12964
- align: 'center',
12965
- ellipsis: true,
12966
- width: 100
12967
- }, {
12968
- dataIndex: 'specNo',
12969
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12970
- align: 'center',
12971
- ellipsis: true,
12972
- width: 180
12973
- }, {
12974
- dataIndex: 'specName',
12975
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12976
- align: 'center',
12977
- ellipsis: true,
12978
- width: 250
12979
- }, {
12980
- dataIndex: 'num',
12981
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12982
- align: 'center',
12983
- ellipsis: true,
12984
- width: 100,
12985
- render: function render(val, record, index) {
12986
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
12987
- style: {
12988
- width: 70
12989
- },
12990
- value: val,
12991
- min: 1,
12992
- precision: 0,
12993
- onChange: function onChange(num) {
12994
- return updateHandle(num, index, 'num');
12995
- }
12996
- }) : /*#__PURE__*/React.createElement("span", null, val);
12997
- }
12998
- }, {
12999
- dataIndex: 'sharePrice',
13000
- title: "\u5206\u644A\u4EF7",
13001
- align: 'center',
13002
- ellipsis: true,
13003
- width: 80,
13004
- render: function render(val, record, index) {
13005
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13006
- style: {
13007
- width: 70
13008
- },
13009
- value: val,
13010
- min: 0,
13011
- onChange: function onChange(value) {
13012
- return updateHandle(value, index, 'sharePrice');
13013
- }
13014
- }) : /*#__PURE__*/React.createElement("span", null, val);
13015
- }
13016
- }, {
13017
- dataIndex: 'returnPrice',
13018
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13019
- align: 'center',
13020
- ellipsis: true,
13021
- width: 100
13022
- }, {
13023
- dataIndex: 'giftType',
13024
- title: "\u8D60\u54C1\u65B9\u5F0F",
13025
- align: 'center',
13026
- ellipsis: true,
13027
- width: 100,
13028
- render: function render(val) {
13029
- var giftTypeMap = {
13030
- 0: '非赠品',
13031
- 1: '自动赠送',
13032
- 2: '手工赠送',
13033
- 3: '回购自动送赠品',
13034
- 4: '前N有礼送赠品',
13035
- 6: '天猫优仓赠品',
13036
- 7: '淘宝CRM会员送赠'
13037
- };
13038
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13039
- }
13040
- }, {
13041
- dataIndex: 'type',
13042
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13043
- align: 'center',
13044
- ellipsis: true,
13045
- width: 100,
13046
- render: function render(val, record, index) {
13047
- var options = [{
13048
- label: '单品',
13049
- value: '1'
13050
- }, {
13051
- label: '组合装',
13052
- value: '2'
13053
- }];
13054
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
13055
- style: {
13056
- width: 70
13057
- },
13058
- options: options,
13059
- value: val,
13060
- onChange: function onChange(value) {
13061
- return updateHandle(value, index, 'type');
13062
- }
13063
- }) : /*#__PURE__*/React.createElement("span", null, val);
13064
- }
13065
- }];
13066
- }
13067
- break;
13068
13737
  case 'WDT_EXCHANGE_GOODS':
13738
+ case 'BS_E3_GOODS':
13739
+ case 'BS_GOODS':
13740
+ case 'WLN_GOODS':
13069
13741
  {
13070
- columns = [{
13071
- dataIndex: 'goodId',
13072
- title: "\u5546\u54C1ID",
13073
- align: 'center',
13074
- ellipsis: true,
13075
- width: 70
13076
- }, {
13077
- dataIndex: 'goodNo',
13078
- title: "\u5546\u54C1\u7F16\u7801",
13079
- align: 'center',
13080
- ellipsis: true,
13081
- width: 180
13082
- }, {
13083
- dataIndex: 'goodName',
13084
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13085
- align: 'center',
13086
- ellipsis: true,
13087
- width: 250
13088
- }, {
13089
- dataIndex: 'specId',
13090
- title: "".concat(text, "SKUID"),
13091
- align: 'center',
13092
- ellipsis: true,
13093
- width: 100
13094
- }, {
13095
- dataIndex: 'specNo',
13096
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13097
- align: 'center',
13098
- ellipsis: true,
13099
- width: 180
13100
- }, {
13101
- dataIndex: 'specName',
13102
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13103
- align: 'center',
13104
- ellipsis: true,
13105
- width: 250
13106
- }, {
13107
- dataIndex: 'num',
13108
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13109
- align: 'center',
13110
- ellipsis: true,
13111
- width: 100,
13112
- render: function render(val, record, index) {
13113
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13114
- style: {
13115
- width: 70
13116
- },
13117
- value: val,
13118
- min: 1,
13119
- precision: 0,
13120
- onChange: function onChange(num) {
13121
- return updateHandle(num, index, 'num');
13122
- }
13123
- }) : /*#__PURE__*/React.createElement("span", null, val);
13124
- }
13125
- }, {
13126
- dataIndex: 'price',
13127
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13128
- align: 'center',
13129
- ellipsis: true,
13130
- width: 100,
13131
- render: function render(val, record, index) {
13132
- return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13133
- style: {
13134
- width: 70
13135
- },
13136
- value: val,
13137
- min: 0,
13138
- onChange: function onChange(value) {
13139
- return updateHandle(value, index, 'price');
13140
- }
13141
- }) : /*#__PURE__*/React.createElement("span", null, val);
13142
- }
13143
- }, {
13144
- dataIndex: 'exchangePrice',
13145
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13146
- align: 'center',
13147
- ellipsis: true,
13148
- width: 100
13149
- }, {
13150
- dataIndex: 'giftType',
13151
- title: "\u8D60\u54C1\u65B9\u5F0F",
13152
- align: 'center',
13153
- ellipsis: true,
13154
- width: 100,
13155
- render: function render(val) {
13156
- var giftTypeMap = {
13157
- 0: '非赠品',
13158
- 1: '自动赠送',
13159
- 2: '手工赠送',
13160
- 3: '回购自动送赠品',
13161
- 4: '前N有礼送赠品',
13162
- 6: '天猫优仓赠品',
13163
- 7: '淘宝CRM会员送赠'
13164
- };
13165
- return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
13166
- }
13167
- }, {
13168
- dataIndex: 'type',
13169
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13170
- align: 'center',
13171
- ellipsis: true,
13172
- width: 100,
13173
- render: function render(val, record, index) {
13174
- var options = [{
13175
- label: '单品',
13176
- value: '1'
13177
- }, {
13178
- label: '组合装',
13179
- value: '2'
13180
- }];
13181
- return !disabled ? /*#__PURE__*/React.createElement(Select, {
13182
- style: {
13183
- width: 70
13184
- },
13185
- options: options,
13186
- value: val,
13187
- onChange: function onChange(value) {
13188
- return updateHandle(value, index, 'type');
13189
- }
13190
- }) : /*#__PURE__*/React.createElement("span", null, val);
13191
- }
13192
- }];
13742
+ columns = getColumnsMap({
13743
+ text: text,
13744
+ disabled: disabled,
13745
+ updateHandle: updateHandle
13746
+ })[type];
13193
13747
  }
13194
13748
  break;
13195
- case 'BS_E3_GOODS':
13749
+ case 'WDT_REISSUE_GOODS':
13196
13750
  {
13197
- columns = [{
13198
- dataIndex: 'sku',
13199
- title: "SKU",
13200
- align: 'center',
13201
- ellipsis: true,
13202
- width: 150
13203
- }, {
13204
- dataIndex: 'skuId',
13205
- title: "SKU ID",
13206
- align: 'center',
13207
- ellipsis: true,
13208
- width: 150
13209
- }, {
13210
- dataIndex: 'goodsName',
13211
- title: "\u5546\u54C1\u540D\u79F0",
13212
- align: 'center',
13213
- ellipsis: true,
13214
- width: 150
13215
- }, {
13216
- dataIndex: 'goodsShortName',
13217
- title: "\u5546\u54C1\u7B80\u79F0",
13218
- align: 'center',
13219
- ellipsis: true,
13220
- width: 100
13221
- }, {
13222
- dataIndex: 'picPath',
13223
- title: "\u5546\u54C1\u56FE\u7247",
13224
- align: 'center',
13225
- ellipsis: true,
13226
- width: 100,
13227
- render: function render(val) {
13228
- return /*#__PURE__*/React.createElement(Image, {
13229
- width: 60,
13230
- src: val
13231
- });
13232
- }
13233
- }, {
13234
- dataIndex: 'goodsSn',
13235
- title: "\u8D27\u53F7",
13236
- align: 'center',
13237
- ellipsis: true,
13238
- width: 150
13239
- }, {
13240
- dataIndex: 'goodsId',
13241
- title: "\u8D27\u53F7ID",
13242
- align: 'center',
13243
- ellipsis: true,
13244
- width: 150
13245
- }, {
13246
- dataIndex: 'colorName',
13247
- title: "\u989C\u8272\u540D\u79F0",
13248
- align: 'center',
13249
- ellipsis: true,
13250
- width: 100
13251
- }, {
13252
- dataIndex: 'colorCode',
13253
- title: "\u989C\u8272\u4EE3\u7801",
13254
- align: 'center',
13255
- ellipsis: true,
13256
- width: 150
13257
- }, {
13258
- dataIndex: 'sizeName',
13259
- title: "\u5C3A\u7801\u540D\u79F0",
13260
- align: 'center',
13261
- ellipsis: true,
13262
- width: 100
13263
- }, {
13264
- dataIndex: 'sizeCode',
13265
- title: "\u5C3A\u7801\u4EE3\u7801",
13266
- align: 'center',
13267
- ellipsis: true,
13268
- width: 100
13269
- }, {
13270
- dataIndex: 'brandName',
13271
- title: "\u54C1\u724C\u540D\u79F0",
13272
- align: 'center',
13273
- ellipsis: true,
13274
- width: 150
13275
- }, {
13276
- dataIndex: 'goodsNumber',
13277
- title: "\u5546\u54C1\u6570\u91CF",
13278
- align: 'center',
13279
- ellipsis: true,
13280
- width: 100,
13281
- render: function render(val, record, index) {
13282
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13283
- style: {
13284
- width: 70
13285
- },
13286
- value: val,
13287
- min: 1,
13288
- precision: 0,
13289
- onChange: function onChange(num) {
13290
- return updateHandle(num, index, 'goodsNumber');
13291
- }
13292
- }) : /*#__PURE__*/React.createElement("span", null, val);
13293
- }
13294
- }, {
13295
- dataIndex: 'goodsPrice',
13296
- title: "\u5546\u54C1\u5355\u4EF7",
13297
- align: 'center',
13298
- ellipsis: true,
13299
- width: 120,
13300
- render: function render(val, record, index) {
13301
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13302
- style: {
13303
- width: 70
13304
- },
13305
- value: val,
13306
- min: 0,
13307
- precision: 2,
13308
- onChange: function onChange(num) {
13309
- return updateHandle(num, index, 'goodsPrice');
13310
- }
13311
- }) : /*#__PURE__*/React.createElement("span", null, val);
13312
- }
13313
- }, {
13314
- dataIndex: 'shopPrice',
13315
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13316
- align: 'center',
13317
- ellipsis: true,
13318
- width: 120
13319
- }, {
13320
- dataIndex: 'sharePrice',
13321
- title: "\u5206\u644A\u4EF7",
13322
- align: 'center',
13323
- ellipsis: true,
13324
- width: 120
13325
- }, {
13326
- dataIndex: 'sharePayment',
13327
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13328
- align: 'center',
13329
- ellipsis: true,
13330
- width: 120
13331
- }, {
13332
- dataIndex: 'payment',
13333
- title: "\u5B9E\u4ED8\u91D1\u989D",
13334
- align: 'center',
13335
- ellipsis: true,
13336
- width: 120,
13337
- render: function render(val, record, index) {
13338
- return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13339
- style: {
13340
- width: 70
13341
- },
13342
- value: val,
13343
- min: 0,
13344
- precision: 2,
13345
- onChange: function onChange(num) {
13346
- return updateHandle(num, index, 'payment');
13347
- }
13348
- }) : /*#__PURE__*/React.createElement("span", null, val);
13349
- }
13350
- }, {
13351
- dataIndex: 'tcSku',
13352
- title: "\u5957\u9910SKU",
13353
- align: 'center',
13354
- ellipsis: true,
13355
- width: 150
13356
- }, {
13357
- dataIndex: 'tcGoodsNumber',
13358
- title: "\u5957\u9910\u5957\u6570",
13359
- align: 'center',
13360
- ellipsis: true,
13361
- width: 100
13362
- }, {
13363
- dataIndex: 'taoCanSingleSl',
13364
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13365
- align: 'center',
13366
- ellipsis: true,
13367
- width: 100
13368
- }, {
13369
- dataIndex: 'isGift',
13370
- title: "\u662F\u5426\u8D60\u54C1",
13371
- align: 'center',
13372
- ellipsis: true,
13373
- width: 100,
13374
- render: function render(val) {
13375
- return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13376
- }
13377
- }];
13751
+ columns = getWdtReissueGoodColumns({
13752
+ disabled: disabled,
13753
+ updateHandle: updateHandle,
13754
+ operate: operate
13755
+ });
13378
13756
  }
13379
13757
  break;
13380
13758
  case 'BS_E3_REISSUE_GOODS':
@@ -13386,213 +13764,12 @@ var GoodItem$1 = function GoodItem(props) {
13386
13764
  });
13387
13765
  }
13388
13766
  break;
13389
- case 'BS_GOODS':
13390
- columns = [{
13391
- dataIndex: 'mark',
13392
- title: "\u5546\u54C1\u6807\u8BB0",
13393
- align: 'center',
13394
- ellipsis: true,
13395
- width: 70,
13396
- render: function render(val, record, index) {
13397
- return /*#__PURE__*/React.createElement(Select, {
13398
- options: [{
13399
- label: '是',
13400
- value: '是'
13401
- }, {
13402
- label: '否',
13403
- value: '否'
13404
- }],
13405
- disabled: disabled,
13406
- value: val,
13407
- onChange: function onChange(val) {
13408
- return updateHandle(val, index, 'mark');
13409
- }
13410
- });
13411
- }
13412
- }, {
13413
- dataIndex: 'skuName',
13414
- title: "".concat(text, "sku\u540D\u79F0"),
13415
- align: 'center',
13416
- ellipsis: true,
13417
- width: 250
13418
- }, {
13419
- dataIndex: 'sku',
13420
- title: "".concat(text, "sku\u7F16\u7801"),
13421
- align: 'center',
13422
- ellipsis: true,
13423
- width: 100
13424
- }, {
13425
- dataIndex: 'name',
13426
- title: "".concat(text, "\u540D\u79F0"),
13427
- align: 'center',
13428
- ellipsis: true,
13429
- width: 250
13430
- }, {
13431
- dataIndex: 'pic',
13432
- title: "\u56FE\u7247",
13433
- align: 'center',
13434
- ellipsis: true,
13435
- width: 100,
13436
- render: function render(val) {
13437
- return /*#__PURE__*/React.createElement(Image, {
13438
- width: 60,
13439
- src: val
13440
- });
13441
- }
13442
- }, {
13443
- dataIndex: 'code',
13444
- title: "".concat(text, "\u7F16\u7801"),
13445
- align: 'center',
13446
- ellipsis: true,
13447
- width: 100
13448
- }, {
13449
- dataIndex: 'money',
13450
- title: "\u5B9E\u4ED8\u91D1\u989D",
13451
- align: 'center',
13452
- ellipsis: true,
13453
- width: 100
13454
- }, {
13455
- dataIndex: 'number',
13456
- title: "".concat(text, "\u6570\u91CF"),
13457
- align: 'center',
13458
- ellipsis: true,
13459
- width: 100,
13460
- render: function render(val, record, index) {
13461
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13462
- style: {
13463
- width: 70
13464
- },
13465
- value: val,
13466
- min: 1,
13467
- precision: 0,
13468
- onChange: function onChange(num) {
13469
- return updateHandle(num, index, 'number');
13470
- }
13471
- }) : /*#__PURE__*/React.createElement("span", null, val);
13472
- }
13473
- }, {
13474
- dataIndex: 'share',
13475
- title: "\u5206\u644A\u4EF7",
13476
- align: 'center',
13477
- ellipsis: true,
13478
- width: 70
13479
- }, {
13480
- dataIndex: 'type',
13481
- title: "\u8D60\u54C1\u7C7B\u578B",
13482
- align: 'center',
13483
- ellipsis: true,
13484
- width: 100
13485
- }, {
13486
- dataIndex: 'batch',
13487
- title: "\u6279\u6B21\u53F7",
13488
- align: 'center',
13489
- ellipsis: true,
13490
- width: 100
13491
- }, {
13492
- dataIndex: 'expireDate',
13493
- title: "\u6709\u6548\u671F",
13494
- align: 'center',
13495
- ellipsis: true,
13496
- width: 100
13497
- }];
13498
- break;
13499
13767
  default:
13500
- columns = [{
13501
- dataIndex: 'mark',
13502
- title: "\u5546\u54C1\u6807\u8BB0",
13503
- align: 'center',
13504
- ellipsis: true,
13505
- width: 70,
13506
- render: function render(val, record, index) {
13507
- return /*#__PURE__*/React.createElement(Select, {
13508
- options: [{
13509
- label: '是',
13510
- value: '是'
13511
- }, {
13512
- label: '否',
13513
- value: '否'
13514
- }],
13515
- disabled: disabled,
13516
- value: val,
13517
- onChange: function onChange(val) {
13518
- return updateHandle(val, index, 'mark');
13519
- }
13520
- });
13521
- }
13522
- }, {
13523
- dataIndex: 'skuName',
13524
- title: "".concat(text, "sku\u540D\u79F0"),
13525
- align: 'center',
13526
- ellipsis: true,
13527
- width: 250
13528
- }, {
13529
- dataIndex: 'sku',
13530
- title: "".concat(text, "sku\u7F16\u7801"),
13531
- align: 'center',
13532
- ellipsis: true,
13533
- width: 100
13534
- }, {
13535
- dataIndex: 'name',
13536
- title: "".concat(text, "\u540D\u79F0"),
13537
- align: 'center',
13538
- ellipsis: true,
13539
- width: 250
13540
- }, {
13541
- dataIndex: 'pic',
13542
- title: "\u56FE\u7247",
13543
- align: 'center',
13544
- ellipsis: true,
13545
- width: 100,
13546
- render: function render(val) {
13547
- return /*#__PURE__*/React.createElement(Image, {
13548
- width: 60,
13549
- src: val
13550
- });
13551
- }
13552
- }, {
13553
- dataIndex: 'code',
13554
- title: "".concat(text, "\u7F16\u7801"),
13555
- align: 'center',
13556
- ellipsis: true,
13557
- width: 100
13558
- }, {
13559
- dataIndex: 'money',
13560
- title: "\u5B9E\u4ED8\u91D1\u989D",
13561
- align: 'center',
13562
- ellipsis: true,
13563
- width: 100
13564
- }, {
13565
- dataIndex: 'number',
13566
- title: "".concat(text, "\u6570\u91CF"),
13567
- align: 'center',
13568
- ellipsis: true,
13569
- width: 100,
13570
- render: function render(val, record, index) {
13571
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
13572
- style: {
13573
- width: 70
13574
- },
13575
- value: val,
13576
- min: 1,
13577
- precision: 0,
13578
- onChange: function onChange(num) {
13579
- return updateHandle(num, index, 'number');
13580
- }
13581
- }) : /*#__PURE__*/React.createElement("span", null, val);
13582
- }
13583
- }, {
13584
- dataIndex: 'share',
13585
- title: "\u5206\u644A\u4EF7",
13586
- align: 'center',
13587
- ellipsis: true,
13588
- width: 70
13589
- }, {
13590
- dataIndex: 'type',
13591
- title: "\u8D60\u54C1\u7C7B\u578B",
13592
- align: 'center',
13593
- ellipsis: true,
13594
- width: 100
13595
- }];
13768
+ columns = getColumnsMap({
13769
+ text: text,
13770
+ disabled: disabled,
13771
+ updateHandle: updateHandle
13772
+ })['default'];
13596
13773
  }
13597
13774
  return columns;
13598
13775
  };
@@ -13604,6 +13781,24 @@ var GoodItem$1 = function GoodItem(props) {
13604
13781
  return COLUMNS_INFO(type);
13605
13782
  };
13606
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
+ }
13607
13802
  var columnList = [{
13608
13803
  dataIndex: '',
13609
13804
  title: '序号',
@@ -13613,9 +13808,7 @@ var GoodItem$1 = function GoodItem(props) {
13613
13808
  render: function render(val, record, index) {
13614
13809
  return /*#__PURE__*/React.createElement("span", null, index + 1);
13615
13810
  }
13616
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13617
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13618
- })));
13811
+ }].concat(_toConsumableArray(baseInfoColumns));
13619
13812
  if (!disabled) {
13620
13813
  columnList.push({
13621
13814
  dataIndex: '',
@@ -13649,7 +13842,6 @@ var GoodItem$1 = function GoodItem(props) {
13649
13842
  }].concat(_toConsumableArray(columns));
13650
13843
  }, []);
13651
13844
  var onSubmit = function onSubmit(list) {
13652
- console.log('🚀 ~ onSubmit ~ list:', list);
13653
13845
  var newList = [];
13654
13846
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
13655
13847
  newList = list.map(function (item) {
@@ -16700,4 +16892,4 @@ var bsE3Reissue = function bsE3Reissue(props) {
16700
16892
  })));
16701
16893
  };
16702
16894
 
16703
- 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 };
16895
+ 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 };