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

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
@@ -9575,10 +9575,29 @@ var GoodItem = function GoodItem(props) {
9575
9575
  return _ref5.apply(this, arguments);
9576
9576
  };
9577
9577
  }();
9578
- var headerList = showHeader || {
9579
- 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9580
- ]
9581
- }[type] || [];
9578
+ var headerList = React.useMemo(function () {
9579
+ if (!Array.isArray(showHeader)) return ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9580
+ ];
9581
+
9582
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9583
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9584
+ var dataIndexList = [];
9585
+ if (isStringArray) {
9586
+ dataIndexList = showHeader;
9587
+ } else if (isObjectArray) {
9588
+ dataIndexList = showHeader.map(function (item) {
9589
+ return item.dataIndex;
9590
+ });
9591
+ }
9592
+ return isStringArray ? showHeader : isObjectArray ? showHeader.filter(function (item) {
9593
+ return item.show !== false;
9594
+ }).map(function (item) {
9595
+ return item.dataIndex;
9596
+ }) : [] || {
9597
+ 1: ['title', 'outerId', 'picUrl', 'numIid', 'skuId', 'outerSkuId', 'propertiesName' // sku 信息
9598
+ ]
9599
+ }[type] || [];
9600
+ }, [showHeader]);
9582
9601
  //修改参数
9583
9602
  var handleChangeValue = function handleChangeValue(key, index) {
9584
9603
  return function (e) {
@@ -9593,35 +9612,57 @@ var GoodItem = function GoodItem(props) {
9593
9612
  };
9594
9613
  };
9595
9614
  // 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;
9615
+ var goodItemAttrs = React.useMemo(function () {
9616
+ var initList = [{
9617
+ isShow: headerList.includes('title'),
9618
+ key: 'title',
9619
+ label: '商品名称'
9620
+ }, {
9621
+ isShow: headerList.includes('outerId'),
9622
+ key: 'outerId',
9623
+ label: '商品编码'
9624
+ },
9625
+ // { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
9626
+ {
9627
+ isShow: headerList.includes('numIid'),
9628
+ key: 'numIid',
9629
+ label: '商品id'
9630
+ }, {
9631
+ isShow: changeSku && headerList.includes('skuId'),
9632
+ key: 'skuId',
9633
+ label: 'SKU ID'
9634
+ }, {
9635
+ isShow: changeSku && headerList.includes('outerSkuId'),
9636
+ key: 'outerSkuId',
9637
+ label: 'SKU 编码'
9638
+ }, {
9639
+ isShow: changeSku && headerList.includes('propertiesName'),
9640
+ key: 'propertiesName',
9641
+ label: 'SKU 信息'
9642
+ }];
9643
+ if (!Array.isArray(showHeader)) return initList;
9644
+ var newList = [];
9645
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
9646
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
9647
+ (isStringArray ? showHeader : isObjectArray ? showHeader.map(function (item) {
9648
+ return item.dataIndex;
9649
+ }) : []).forEach(function (dataIndex) {
9650
+ if (initList.find(function (item) {
9651
+ return item.key === dataIndex;
9652
+ })) {
9653
+ newList.push(initList.find(function (item) {
9654
+ return item.key === dataIndex;
9655
+ }));
9656
+ }
9657
+ });
9658
+ return newList;
9659
+ }, [headerList, showHeader]);
9660
+ var hasPic = React.useMemo(function () {
9661
+ return headerList.includes('picUrl');
9662
+ }, [headerList]);
9663
+ var hasAttr = React.useMemo(function () {
9664
+ return hasPic ? headerList.length > 1 : headerList.length > 0;
9665
+ }, [hasPic, headerList]);
9625
9666
  return /*#__PURE__*/React__default['default'].createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React__default['default'].createElement("p", {
9626
9667
  className: "goods-title"
9627
9668
  }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React__default['default'].createElement("p", {
@@ -12443,244 +12484,1105 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
12443
12484
  };
12444
12485
  var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
12445
12486
 
12446
- var columns$3 = [{
12447
- dataIndex: 'sku',
12448
- title: "SKU",
12449
- width: 150
12450
- }, {
12451
- dataIndex: 'skuId',
12452
- title: "SKU ID",
12453
- width: 150
12454
- }, {
12455
- dataIndex: 'goodsName',
12456
- title: "\u5546\u54C1\u540D\u79F0",
12457
- width: 150
12458
- }, {
12459
- dataIndex: 'goodsShortName',
12460
- title: "\u5546\u54C1\u7B80\u79F0",
12461
- width: 150
12462
- }, {
12463
- dataIndex: 'picPath',
12464
- title: "\u5546\u54C1\u56FE\u7247",
12465
- width: 150
12466
- }, {
12467
- dataIndex: 'goodsSn',
12468
- title: "\u8D27\u53F7",
12469
- width: 150
12470
- }, {
12471
- dataIndex: 'goodsId',
12472
- title: "\u8D27\u53F7ID",
12473
- width: 150
12474
- }, {
12475
- dataIndex: 'colorName',
12476
- title: "\u989C\u8272\u540D\u79F0",
12477
- width: 150
12478
- }, {
12479
- dataIndex: 'colorCode',
12480
- title: "\u989C\u8272\u4EE3\u7801",
12481
- width: 150
12482
- }, {
12483
- dataIndex: 'sizeName',
12484
- title: "\u5C3A\u7801\u540D\u79F0",
12485
- width: 150
12486
- }, {
12487
- dataIndex: 'sizeCode',
12488
- title: "\u5C3A\u7801\u4EE3\u7801",
12489
- width: 150
12490
- }, {
12491
- dataIndex: 'brandName',
12492
- title: "\u54C1\u724C\u540D\u79F0",
12493
- width: 150
12494
- }, {
12495
- dataIndex: 'goodsNumber',
12496
- title: "\u5546\u54C1\u6570\u91CF",
12497
- width: 150
12498
- }, {
12499
- dataIndex: 'goodsPrice',
12500
- title: "\u5546\u54C1\u5355\u4EF7",
12501
- width: 150
12502
- }, {
12503
- dataIndex: 'shopPrice',
12504
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12505
- width: 150
12506
- }, {
12507
- dataIndex: 'isGift',
12508
- title: "\u662F\u5426\u8D60\u54C1",
12509
- width: 150,
12510
- render: function render(val) {
12511
- return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12512
- }
12513
- }];
12514
- var renderFieldMap = {
12515
- goodsNumber: function goodsNumber(_ref) {
12516
- var disabled = _ref.disabled,
12517
- updateHandle = _ref.updateHandle;
12518
- return function (val, record, index) {
12519
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12520
- style: {
12521
- width: 70
12522
- },
12523
- value: val,
12524
- min: 1,
12525
- precision: 0,
12526
- onChange: function onChange(num) {
12527
- return updateHandle(num, index, 'goodsNumber');
12528
- }
12529
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12530
- };
12531
- },
12532
- goodsPrice: function goodsPrice(_ref2) {
12533
- var disabled = _ref2.disabled,
12534
- updateHandle = _ref2.updateHandle;
12535
- return function (val, record, index) {
12536
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12537
- style: {
12538
- width: 70
12539
- },
12540
- value: val,
12541
- min: 0,
12542
- onChange: function onChange(value) {
12543
- return updateHandle(value, index, 'goodsPrice');
12544
- }
12545
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12546
- };
12547
- },
12548
- isGift: function isGift(_ref3) {
12549
- var disabled = _ref3.disabled,
12550
- updateHandle = _ref3.updateHandle;
12551
- return function (val, record, index) {
12552
- var options = [{
12553
- label: '是',
12554
- value: 1
12555
- }, {
12556
- label: '否',
12557
- value: 0
12558
- }];
12559
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12560
- style: {
12561
- width: 70
12562
- },
12563
- options: options,
12564
- value: val,
12565
- onChange: function onChange(value) {
12566
- return updateHandle(value, index, 'isGift');
12567
- },
12568
- getPopupContainer: function getPopupContainer() {
12569
- return document.getElementById('bsE3ReissueGoods');
12570
- }
12571
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12572
- };
12573
- }
12574
- };
12575
- var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
12576
- var disabled = _ref4.disabled,
12577
- updateHandle = _ref4.updateHandle,
12578
- operate = _ref4.operate;
12579
- return columns$3.map(function (item) {
12580
- var newItem = _objectSpread2({
12487
+ var getColumns = function getColumns(_ref) {
12488
+ var _ref$text = _ref.text,
12489
+ text = _ref$text === void 0 ? '' : _ref$text,
12490
+ disabled = _ref.disabled,
12491
+ updateHandle = _ref.updateHandle;
12492
+ return {
12493
+ //百胜E3补发商品
12494
+ BS_E3_REISSUE_GOODS: [{
12495
+ dataIndex: 'sku',
12496
+ title: "SKU",
12497
+ width: 150
12498
+ }, {
12499
+ dataIndex: 'skuId',
12500
+ title: "SKU ID",
12501
+ width: 150
12502
+ }, {
12503
+ dataIndex: 'goodsName',
12504
+ title: "\u5546\u54C1\u540D\u79F0",
12505
+ width: 150
12506
+ }, {
12507
+ dataIndex: 'goodsShortName',
12508
+ title: "\u5546\u54C1\u7B80\u79F0",
12509
+ width: 150
12510
+ }, {
12511
+ dataIndex: 'picPath',
12512
+ title: "\u5546\u54C1\u56FE\u7247",
12513
+ width: 150
12514
+ }, {
12515
+ dataIndex: 'goodsSn',
12516
+ title: "\u8D27\u53F7",
12517
+ width: 150
12518
+ }, {
12519
+ dataIndex: 'goodsId',
12520
+ title: "\u8D27\u53F7ID",
12521
+ width: 150
12522
+ }, {
12523
+ dataIndex: 'colorName',
12524
+ title: "\u989C\u8272\u540D\u79F0",
12525
+ width: 150
12526
+ }, {
12527
+ dataIndex: 'colorCode',
12528
+ title: "\u989C\u8272\u4EE3\u7801",
12529
+ width: 150
12530
+ }, {
12531
+ dataIndex: 'sizeName',
12532
+ title: "\u5C3A\u7801\u540D\u79F0",
12533
+ width: 150
12534
+ }, {
12535
+ dataIndex: 'sizeCode',
12536
+ title: "\u5C3A\u7801\u4EE3\u7801",
12537
+ width: 150
12538
+ }, {
12539
+ dataIndex: 'brandName',
12540
+ title: "\u54C1\u724C\u540D\u79F0",
12541
+ width: 150
12542
+ }, {
12543
+ dataIndex: 'goodsNumber',
12544
+ title: "\u5546\u54C1\u6570\u91CF",
12545
+ width: 150
12546
+ }, {
12547
+ dataIndex: 'goodsPrice',
12548
+ title: "\u5546\u54C1\u5355\u4EF7",
12549
+ width: 150
12550
+ }, {
12551
+ dataIndex: 'shopPrice',
12552
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12553
+ width: 150
12554
+ }, {
12555
+ dataIndex: 'isGift',
12556
+ title: "\u662F\u5426\u8D60\u54C1",
12557
+ width: 150,
12558
+ render: function render(val) {
12559
+ return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
12560
+ }
12561
+ }],
12562
+ //百胜E3商品信息
12563
+ BS_E3_GOODS: [{
12564
+ dataIndex: 'sku',
12565
+ title: "SKU",
12581
12566
  align: 'center',
12582
- ellipsis: true
12583
- }, item);
12584
- if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12585
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12586
- render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12587
- disabled: disabled,
12588
- updateHandle: updateHandle
12589
- })
12590
- });
12591
- }
12592
- return newItem;
12593
- });
12594
- };
12595
-
12596
- var renderGiftType = function renderGiftType(val) {
12597
- var giftTypeMap = {
12598
- 0: '非赠品',
12599
- 1: '自动赠送',
12600
- 2: '手工赠送',
12601
- 3: '回购自动送赠品',
12602
- 4: '前N有礼送赠品',
12603
- 6: '天猫优仓赠品',
12604
- 7: '淘宝CRM会员送赠'
12605
- };
12606
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12607
- };
12608
- var columns$4 = [{
12609
- dataIndex: 'goodId',
12610
- title: "\u5546\u54C1ID",
12611
- width: 120
12612
- }, {
12613
- dataIndex: 'goodNo',
12614
- title: "\u5546\u54C1\u7F16\u7801",
12615
- width: 200
12616
- }, {
12617
- dataIndex: 'goodName',
12618
- title: "\u5546\u54C1\u540D\u79F0",
12619
- width: 200
12620
- }, {
12621
- dataIndex: 'specId',
12622
- title: "SKUID",
12623
- width: 150
12624
- }, {
12625
- dataIndex: 'specNo',
12626
- title: "\u5546\u54C1SKU\u7F16\u7801",
12627
- width: 200
12628
- }, {
12629
- dataIndex: 'specName',
12630
- title: "\u5546\u54C1SKU\u540D\u79F0",
12631
- width: 250
12632
- }, {
12633
- dataIndex: 'orderPrice',
12634
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12635
- width: 200
12636
- }, {
12637
- dataIndex: 'num',
12638
- title: "\u6570\u91CF",
12639
- width: 100
12640
- }, {
12641
- dataIndex: 'sharePrice',
12642
- title: "\u5206\u644A\u4EF7",
12643
- width: 150
12644
- }, {
12645
- dataIndex: 'giftType',
12646
- title: "\u8D60\u54C1\u65B9\u5F0F",
12647
- width: 100,
12648
- render: renderGiftType
12649
- }];
12650
- var renderFieldMap$1 = {
12651
- num: function num(_ref) {
12652
- var disabled = _ref.disabled,
12653
- updateHandle = _ref.updateHandle;
12654
- return function (val, record, index) {
12655
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12656
- style: {
12657
- width: 70
12658
- },
12659
- value: val,
12660
- min: 1,
12661
- precision: 0,
12662
- onChange: function onChange(num) {
12663
- return updateHandle(num, index, 'num');
12664
- }
12665
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12666
- };
12667
- },
12668
- giftType: function giftType() {
12669
- return renderGiftType;
12670
- }
12671
- };
12672
- var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12673
- var disabled = _ref2.disabled,
12674
- updateHandle = _ref2.updateHandle,
12675
- operate = _ref2.operate;
12676
- return columns$4.map(function (item) {
12677
- var newItem = _objectSpread2({
12567
+ ellipsis: true,
12568
+ width: 150
12569
+ }, {
12570
+ dataIndex: 'skuId',
12571
+ title: "SKU ID",
12678
12572
  align: 'center',
12679
- ellipsis: true
12680
- }, item);
12681
- if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
12682
- return _objectSpread2(_objectSpread2({}, newItem), {}, {
12683
- render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
12573
+ ellipsis: true,
12574
+ width: 150
12575
+ }, {
12576
+ dataIndex: 'goodsName',
12577
+ title: "\u5546\u54C1\u540D\u79F0",
12578
+ align: 'center',
12579
+ ellipsis: true,
12580
+ width: 150
12581
+ }, {
12582
+ dataIndex: 'goodsShortName',
12583
+ title: "\u5546\u54C1\u7B80\u79F0",
12584
+ align: 'center',
12585
+ ellipsis: true,
12586
+ width: 100
12587
+ }, {
12588
+ dataIndex: 'picPath',
12589
+ title: "\u5546\u54C1\u56FE\u7247",
12590
+ align: 'center',
12591
+ ellipsis: true,
12592
+ width: 100,
12593
+ render: function render(val) {
12594
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12595
+ width: 60,
12596
+ src: val
12597
+ });
12598
+ }
12599
+ }, {
12600
+ dataIndex: 'goodsSn',
12601
+ title: "\u8D27\u53F7",
12602
+ align: 'center',
12603
+ ellipsis: true,
12604
+ width: 150
12605
+ }, {
12606
+ dataIndex: 'goodsId',
12607
+ title: "\u8D27\u53F7ID",
12608
+ align: 'center',
12609
+ ellipsis: true,
12610
+ width: 150
12611
+ }, {
12612
+ dataIndex: 'colorName',
12613
+ title: "\u989C\u8272\u540D\u79F0",
12614
+ align: 'center',
12615
+ ellipsis: true,
12616
+ width: 100
12617
+ }, {
12618
+ dataIndex: 'colorCode',
12619
+ title: "\u989C\u8272\u4EE3\u7801",
12620
+ align: 'center',
12621
+ ellipsis: true,
12622
+ width: 150
12623
+ }, {
12624
+ dataIndex: 'sizeName',
12625
+ title: "\u5C3A\u7801\u540D\u79F0",
12626
+ align: 'center',
12627
+ ellipsis: true,
12628
+ width: 100
12629
+ }, {
12630
+ dataIndex: 'sizeCode',
12631
+ title: "\u5C3A\u7801\u4EE3\u7801",
12632
+ align: 'center',
12633
+ ellipsis: true,
12634
+ width: 100
12635
+ }, {
12636
+ dataIndex: 'brandName',
12637
+ title: "\u54C1\u724C\u540D\u79F0",
12638
+ align: 'center',
12639
+ ellipsis: true,
12640
+ width: 150
12641
+ }, {
12642
+ dataIndex: 'goodsNumber',
12643
+ title: "\u5546\u54C1\u6570\u91CF",
12644
+ align: 'center',
12645
+ ellipsis: true,
12646
+ width: 100,
12647
+ render: function render(val, record, index) {
12648
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12649
+ style: {
12650
+ width: 70
12651
+ },
12652
+ value: val,
12653
+ min: 1,
12654
+ precision: 0,
12655
+ onChange: function onChange(num) {
12656
+ return updateHandle(num, index, 'goodsNumber');
12657
+ }
12658
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12659
+ }
12660
+ }, {
12661
+ dataIndex: 'goodsPrice',
12662
+ title: "\u5546\u54C1\u5355\u4EF7",
12663
+ align: 'center',
12664
+ ellipsis: true,
12665
+ width: 120,
12666
+ render: function render(val, record, index) {
12667
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12668
+ style: {
12669
+ width: 70
12670
+ },
12671
+ value: val,
12672
+ min: 0,
12673
+ precision: 2,
12674
+ onChange: function onChange(num) {
12675
+ return updateHandle(num, index, 'goodsPrice');
12676
+ }
12677
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12678
+ }
12679
+ }, {
12680
+ dataIndex: 'shopPrice',
12681
+ title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
12682
+ align: 'center',
12683
+ ellipsis: true,
12684
+ width: 120
12685
+ }, {
12686
+ dataIndex: 'sharePrice',
12687
+ title: "\u5206\u644A\u4EF7",
12688
+ align: 'center',
12689
+ ellipsis: true,
12690
+ width: 120
12691
+ }, {
12692
+ dataIndex: 'sharePayment',
12693
+ title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
12694
+ align: 'center',
12695
+ ellipsis: true,
12696
+ width: 120
12697
+ }, {
12698
+ dataIndex: 'payment',
12699
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12700
+ align: 'center',
12701
+ ellipsis: true,
12702
+ width: 120,
12703
+ render: function render(val, record, index) {
12704
+ return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12705
+ style: {
12706
+ width: 70
12707
+ },
12708
+ value: val,
12709
+ min: 0,
12710
+ precision: 2,
12711
+ onChange: function onChange(num) {
12712
+ return updateHandle(num, index, 'payment');
12713
+ }
12714
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12715
+ }
12716
+ }, {
12717
+ dataIndex: 'tcSku',
12718
+ title: "\u5957\u9910SKU",
12719
+ align: 'center',
12720
+ ellipsis: true,
12721
+ width: 150
12722
+ }, {
12723
+ dataIndex: 'tcGoodsNumber',
12724
+ title: "\u5957\u9910\u5957\u6570",
12725
+ align: 'center',
12726
+ ellipsis: true,
12727
+ width: 100
12728
+ }, {
12729
+ dataIndex: 'taoCanSingleSl',
12730
+ title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
12731
+ align: 'center',
12732
+ ellipsis: true,
12733
+ width: 100
12734
+ }, {
12735
+ dataIndex: 'isGift',
12736
+ title: "\u662F\u5426\u8D60\u54C1",
12737
+ align: 'center',
12738
+ ellipsis: true,
12739
+ width: 100,
12740
+ render: function render(val) {
12741
+ return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
12742
+ }
12743
+ }],
12744
+ BS_GOODS: [{
12745
+ dataIndex: 'mark',
12746
+ title: "\u5546\u54C1\u6807\u8BB0",
12747
+ align: 'center',
12748
+ ellipsis: true,
12749
+ width: 70,
12750
+ render: function render(val, record, index) {
12751
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
12752
+ options: [{
12753
+ label: '是',
12754
+ value: '是'
12755
+ }, {
12756
+ label: '否',
12757
+ value: '否'
12758
+ }],
12759
+ disabled: disabled,
12760
+ value: val,
12761
+ onChange: function onChange(val) {
12762
+ return updateHandle(val, index, 'mark');
12763
+ }
12764
+ });
12765
+ }
12766
+ }, {
12767
+ dataIndex: 'skuName',
12768
+ title: "".concat(text, "sku\u540D\u79F0"),
12769
+ align: 'center',
12770
+ ellipsis: true,
12771
+ width: 250
12772
+ }, {
12773
+ dataIndex: 'sku',
12774
+ title: "".concat(text, "sku\u7F16\u7801"),
12775
+ align: 'center',
12776
+ ellipsis: true,
12777
+ width: 100
12778
+ }, {
12779
+ dataIndex: 'name',
12780
+ title: "".concat(text, "\u540D\u79F0"),
12781
+ align: 'center',
12782
+ ellipsis: true,
12783
+ width: 250
12784
+ }, {
12785
+ dataIndex: 'pic',
12786
+ title: "\u56FE\u7247",
12787
+ align: 'center',
12788
+ ellipsis: true,
12789
+ width: 100,
12790
+ render: function render(val) {
12791
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
12792
+ width: 60,
12793
+ src: val
12794
+ });
12795
+ }
12796
+ }, {
12797
+ dataIndex: 'code',
12798
+ title: "".concat(text, "\u7F16\u7801"),
12799
+ align: 'center',
12800
+ ellipsis: true,
12801
+ width: 100
12802
+ }, {
12803
+ dataIndex: 'money',
12804
+ title: "\u5B9E\u4ED8\u91D1\u989D",
12805
+ align: 'center',
12806
+ ellipsis: true,
12807
+ width: 100
12808
+ }, {
12809
+ dataIndex: 'number',
12810
+ title: "".concat(text, "\u6570\u91CF"),
12811
+ align: 'center',
12812
+ ellipsis: true,
12813
+ width: 100,
12814
+ render: function render(val, record, index) {
12815
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12816
+ style: {
12817
+ width: 70
12818
+ },
12819
+ value: val,
12820
+ min: 1,
12821
+ precision: 0,
12822
+ onChange: function onChange(num) {
12823
+ return updateHandle(num, index, 'number');
12824
+ }
12825
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12826
+ }
12827
+ }, {
12828
+ dataIndex: 'share',
12829
+ title: "\u5206\u644A\u4EF7",
12830
+ align: 'center',
12831
+ ellipsis: true,
12832
+ width: 70
12833
+ }, {
12834
+ dataIndex: 'type',
12835
+ title: "\u8D60\u54C1\u7C7B\u578B",
12836
+ align: 'center',
12837
+ ellipsis: true,
12838
+ width: 100
12839
+ }, {
12840
+ dataIndex: 'batch',
12841
+ title: "\u6279\u6B21\u53F7",
12842
+ align: 'center',
12843
+ ellipsis: true,
12844
+ width: 100
12845
+ }, {
12846
+ dataIndex: 'expireDate',
12847
+ title: "\u6709\u6548\u671F",
12848
+ align: 'center',
12849
+ ellipsis: true,
12850
+ width: 100
12851
+ }]
12852
+ };
12853
+ };
12854
+
12855
+ var renderGiftType = function renderGiftType(val) {
12856
+ var giftTypeMap = {
12857
+ 0: '非赠品',
12858
+ 1: '自动赠送',
12859
+ 2: '手工赠送',
12860
+ 3: '回购自动送赠品',
12861
+ 4: '前N有礼送赠品',
12862
+ 6: '天猫优仓赠品',
12863
+ 7: '淘宝CRM会员送赠'
12864
+ };
12865
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12866
+ };
12867
+ var renderFieldMap = {
12868
+ num: function num(_ref) {
12869
+ var disabled = _ref.disabled,
12870
+ updateHandle = _ref.updateHandle;
12871
+ return function (val, record, index) {
12872
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12873
+ style: {
12874
+ width: 70
12875
+ },
12876
+ value: val,
12877
+ min: 1,
12878
+ precision: 0,
12879
+ onChange: function onChange(num) {
12880
+ return updateHandle(num, index, 'num');
12881
+ }
12882
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12883
+ };
12884
+ },
12885
+ giftType: function giftType() {
12886
+ return renderGiftType;
12887
+ }
12888
+ };
12889
+ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
12890
+ var disabled = _ref2.disabled,
12891
+ updateHandle = _ref2.updateHandle,
12892
+ operate = _ref2.operate;
12893
+ return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
12894
+ var newItem = _objectSpread2({
12895
+ align: 'center',
12896
+ ellipsis: true
12897
+ }, item);
12898
+ if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
12899
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
12900
+ render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
12901
+ disabled: disabled,
12902
+ updateHandle: updateHandle
12903
+ })
12904
+ });
12905
+ }
12906
+ return newItem;
12907
+ });
12908
+ };
12909
+
12910
+ var getColumns$1 = function getColumns(_ref) {
12911
+ var _ref$text = _ref.text,
12912
+ text = _ref$text === void 0 ? '' : _ref$text,
12913
+ disabled = _ref.disabled,
12914
+ updateHandle = _ref.updateHandle;
12915
+ return {
12916
+ //旺店通补发商品信息
12917
+ WDT_REISSUE_GOODS: [{
12918
+ dataIndex: 'goodId',
12919
+ title: "\u5546\u54C1ID",
12920
+ width: 120
12921
+ }, {
12922
+ dataIndex: 'goodNo',
12923
+ title: "\u5546\u54C1\u7F16\u7801",
12924
+ width: 200
12925
+ }, {
12926
+ dataIndex: 'goodName',
12927
+ title: "\u5546\u54C1\u540D\u79F0",
12928
+ width: 200
12929
+ }, {
12930
+ dataIndex: 'specId',
12931
+ title: "SKUID",
12932
+ width: 150
12933
+ }, {
12934
+ dataIndex: 'specNo',
12935
+ title: "\u5546\u54C1SKU\u7F16\u7801",
12936
+ width: 200
12937
+ }, {
12938
+ dataIndex: 'specName',
12939
+ title: "\u5546\u54C1SKU\u540D\u79F0",
12940
+ width: 250
12941
+ }, {
12942
+ dataIndex: 'orderPrice',
12943
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12944
+ width: 200
12945
+ }, {
12946
+ dataIndex: 'num',
12947
+ title: "\u6570\u91CF",
12948
+ width: 100
12949
+ }, {
12950
+ dataIndex: 'sharePrice',
12951
+ title: "\u5206\u644A\u4EF7",
12952
+ width: 150
12953
+ }, {
12954
+ dataIndex: 'giftType',
12955
+ title: "\u8D60\u54C1\u65B9\u5F0F",
12956
+ width: 100,
12957
+ render: renderGiftType
12958
+ }],
12959
+ //旺店通商品信息
12960
+ WDT_GOODS: [{
12961
+ dataIndex: 'goodId',
12962
+ title: "\u5546\u54C1ID",
12963
+ align: 'center',
12964
+ ellipsis: true,
12965
+ width: 70
12966
+ }, {
12967
+ dataIndex: 'goodNo',
12968
+ title: "\u5546\u54C1\u7F16\u7801",
12969
+ align: 'center',
12970
+ ellipsis: true,
12971
+ width: 180
12972
+ }, {
12973
+ dataIndex: 'goodName',
12974
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12975
+ align: 'center',
12976
+ ellipsis: true,
12977
+ width: 250
12978
+ }, {
12979
+ dataIndex: 'specId',
12980
+ title: "".concat(text, "SKUID"),
12981
+ align: 'center',
12982
+ ellipsis: true,
12983
+ width: 100
12984
+ }, {
12985
+ dataIndex: 'specNo',
12986
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12987
+ align: 'center',
12988
+ ellipsis: true,
12989
+ width: 180
12990
+ }, {
12991
+ dataIndex: 'specName',
12992
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12993
+ align: 'center',
12994
+ ellipsis: true,
12995
+ width: 250
12996
+ }, {
12997
+ dataIndex: 'orderPrice',
12998
+ title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12999
+ align: 'center',
13000
+ ellipsis: true,
13001
+ width: 100
13002
+ }, {
13003
+ dataIndex: 'num',
13004
+ title: "".concat(text, "\u6570\u91CF"),
13005
+ align: 'center',
13006
+ ellipsis: true,
13007
+ width: 100,
13008
+ render: function render(val, record, index) {
13009
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13010
+ style: {
13011
+ width: 70
13012
+ },
13013
+ value: val,
13014
+ min: 1,
13015
+ precision: 0,
13016
+ onChange: function onChange(num) {
13017
+ return updateHandle(num, index, 'num');
13018
+ }
13019
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13020
+ }
13021
+ }, {
13022
+ dataIndex: 'sharePrice',
13023
+ title: "\u5206\u644A\u4EF7",
13024
+ align: 'center',
13025
+ ellipsis: true,
13026
+ width: 70
13027
+ }, {
13028
+ dataIndex: 'giftType',
13029
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13030
+ align: 'center',
13031
+ ellipsis: true,
13032
+ width: 100,
13033
+ render: function render(val) {
13034
+ var giftTypeMap = {
13035
+ 0: '非赠品',
13036
+ 1: '自动赠送',
13037
+ 2: '手工赠送',
13038
+ 3: '回购自动送赠品',
13039
+ 4: '前N有礼送赠品',
13040
+ 6: '天猫优仓赠品',
13041
+ 7: '淘宝CRM会员送赠'
13042
+ };
13043
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13044
+ }
13045
+ }],
13046
+ //旺店通退货商品信息
13047
+ WDT_RETURN_GOODS: [{
13048
+ dataIndex: 'goodId',
13049
+ title: "\u5546\u54C1ID",
13050
+ align: 'center',
13051
+ ellipsis: true,
13052
+ width: 70
13053
+ }, {
13054
+ dataIndex: 'goodNo',
13055
+ title: "\u5546\u54C1\u7F16\u7801",
13056
+ align: 'center',
13057
+ ellipsis: true,
13058
+ width: 180
13059
+ }, {
13060
+ dataIndex: 'goodName',
13061
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13062
+ align: 'center',
13063
+ ellipsis: true,
13064
+ width: 250
13065
+ }, {
13066
+ dataIndex: 'specId',
13067
+ title: "".concat(text, "SKUID"),
13068
+ align: 'center',
13069
+ ellipsis: true,
13070
+ width: 100
13071
+ }, {
13072
+ dataIndex: 'specNo',
13073
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13074
+ align: 'center',
13075
+ ellipsis: true,
13076
+ width: 180
13077
+ }, {
13078
+ dataIndex: 'specName',
13079
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13080
+ align: 'center',
13081
+ ellipsis: true,
13082
+ width: 250
13083
+ }, {
13084
+ dataIndex: 'num',
13085
+ title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
13086
+ align: 'center',
13087
+ ellipsis: true,
13088
+ width: 100,
13089
+ render: function render(val, record, index) {
13090
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13091
+ style: {
13092
+ width: 70
13093
+ },
13094
+ value: val,
13095
+ min: 1,
13096
+ precision: 0,
13097
+ onChange: function onChange(num) {
13098
+ return updateHandle(num, index, 'num');
13099
+ }
13100
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13101
+ }
13102
+ }, {
13103
+ dataIndex: 'sharePrice',
13104
+ title: "\u5206\u644A\u4EF7",
13105
+ align: 'center',
13106
+ ellipsis: true,
13107
+ width: 80,
13108
+ render: function render(val, record, index) {
13109
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13110
+ style: {
13111
+ width: 70
13112
+ },
13113
+ value: val,
13114
+ min: 0,
13115
+ onChange: function onChange(value) {
13116
+ return updateHandle(value, index, 'sharePrice');
13117
+ }
13118
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13119
+ }
13120
+ }, {
13121
+ dataIndex: 'returnPrice',
13122
+ title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13123
+ align: 'center',
13124
+ ellipsis: true,
13125
+ width: 100
13126
+ }, {
13127
+ dataIndex: 'giftType',
13128
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13129
+ align: 'center',
13130
+ ellipsis: true,
13131
+ width: 100,
13132
+ render: function render(val) {
13133
+ var giftTypeMap = {
13134
+ 0: '非赠品',
13135
+ 1: '自动赠送',
13136
+ 2: '手工赠送',
13137
+ 3: '回购自动送赠品',
13138
+ 4: '前N有礼送赠品',
13139
+ 6: '天猫优仓赠品',
13140
+ 7: '淘宝CRM会员送赠'
13141
+ };
13142
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13143
+ }
13144
+ }, {
13145
+ dataIndex: 'type',
13146
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13147
+ align: 'center',
13148
+ ellipsis: true,
13149
+ width: 100,
13150
+ render: function render(val, record, index) {
13151
+ var options = [{
13152
+ label: '单品',
13153
+ value: '1'
13154
+ }, {
13155
+ label: '组合装',
13156
+ value: '2'
13157
+ }];
13158
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13159
+ style: {
13160
+ width: 70
13161
+ },
13162
+ options: options,
13163
+ value: val,
13164
+ onChange: function onChange(value) {
13165
+ return updateHandle(value, index, 'type');
13166
+ }
13167
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13168
+ }
13169
+ }],
13170
+ //旺店通换出商品信息
13171
+ WDT_EXCHANGE_GOODS: [{
13172
+ dataIndex: 'goodId',
13173
+ title: "\u5546\u54C1ID",
13174
+ align: 'center',
13175
+ ellipsis: true,
13176
+ width: 70
13177
+ }, {
13178
+ dataIndex: 'goodNo',
13179
+ title: "\u5546\u54C1\u7F16\u7801",
13180
+ align: 'center',
13181
+ ellipsis: true,
13182
+ width: 180
13183
+ }, {
13184
+ dataIndex: 'goodName',
13185
+ title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13186
+ align: 'center',
13187
+ ellipsis: true,
13188
+ width: 250
13189
+ }, {
13190
+ dataIndex: 'specId',
13191
+ title: "".concat(text, "SKUID"),
13192
+ align: 'center',
13193
+ ellipsis: true,
13194
+ width: 100
13195
+ }, {
13196
+ dataIndex: 'specNo',
13197
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13198
+ align: 'center',
13199
+ ellipsis: true,
13200
+ width: 180
13201
+ }, {
13202
+ dataIndex: 'specName',
13203
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13204
+ align: 'center',
13205
+ ellipsis: true,
13206
+ width: 250
13207
+ }, {
13208
+ dataIndex: 'num',
13209
+ title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13210
+ align: 'center',
13211
+ ellipsis: true,
13212
+ width: 100,
13213
+ render: function render(val, record, index) {
13214
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13215
+ style: {
13216
+ width: 70
13217
+ },
13218
+ value: val,
13219
+ min: 1,
13220
+ precision: 0,
13221
+ onChange: function onChange(num) {
13222
+ return updateHandle(num, index, 'num');
13223
+ }
13224
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13225
+ }
13226
+ }, {
13227
+ dataIndex: 'price',
13228
+ title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13229
+ align: 'center',
13230
+ ellipsis: true,
13231
+ width: 100,
13232
+ render: function render(val, record, index) {
13233
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13234
+ style: {
13235
+ width: 70
13236
+ },
13237
+ value: val,
13238
+ min: 0,
13239
+ onChange: function onChange(value) {
13240
+ return updateHandle(value, index, 'price');
13241
+ }
13242
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13243
+ }
13244
+ }, {
13245
+ dataIndex: 'exchangePrice',
13246
+ title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13247
+ align: 'center',
13248
+ ellipsis: true,
13249
+ width: 100
13250
+ }, {
13251
+ dataIndex: 'giftType',
13252
+ title: "\u8D60\u54C1\u65B9\u5F0F",
13253
+ align: 'center',
13254
+ ellipsis: true,
13255
+ width: 100,
13256
+ render: function render(val) {
13257
+ var giftTypeMap = {
13258
+ 0: '非赠品',
13259
+ 1: '自动赠送',
13260
+ 2: '手工赠送',
13261
+ 3: '回购自动送赠品',
13262
+ 4: '前N有礼送赠品',
13263
+ 6: '天猫优仓赠品',
13264
+ 7: '淘宝CRM会员送赠'
13265
+ };
13266
+ return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13267
+ }
13268
+ }, {
13269
+ dataIndex: 'type',
13270
+ title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13271
+ align: 'center',
13272
+ ellipsis: true,
13273
+ width: 100,
13274
+ render: function render(val, record, index) {
13275
+ var options = [{
13276
+ label: '单品',
13277
+ value: '1'
13278
+ }, {
13279
+ label: '组合装',
13280
+ value: '2'
13281
+ }];
13282
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13283
+ style: {
13284
+ width: 70
13285
+ },
13286
+ options: options,
13287
+ value: val,
13288
+ onChange: function onChange(value) {
13289
+ return updateHandle(value, index, 'type');
13290
+ }
13291
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13292
+ }
13293
+ }]
13294
+ };
13295
+ };
13296
+
13297
+ var getColumns$2 = function getColumns(_ref) {
13298
+ var _ref$text = _ref.text,
13299
+ text = _ref$text === void 0 ? '' : _ref$text,
13300
+ disabled = _ref.disabled,
13301
+ updateHandle = _ref.updateHandle;
13302
+ return {
13303
+ //万里牛商品信息
13304
+ WLN_GOODS: [{
13305
+ dataIndex: 'skuName',
13306
+ title: "".concat(text, "sku\u540D\u79F0"),
13307
+ align: 'center',
13308
+ ellipsis: true,
13309
+ width: 250
13310
+ }, {
13311
+ dataIndex: 'sku',
13312
+ title: "".concat(text, "sku\u7F16\u7801"),
13313
+ align: 'center',
13314
+ ellipsis: true,
13315
+ width: 100
13316
+ }, {
13317
+ dataIndex: 'name',
13318
+ title: "".concat(text, "\u540D\u79F0"),
13319
+ align: 'center',
13320
+ ellipsis: true,
13321
+ width: 250
13322
+ }, {
13323
+ dataIndex: 'pic',
13324
+ title: "\u56FE\u7247",
13325
+ align: 'center',
13326
+ ellipsis: true,
13327
+ width: 100,
13328
+ render: function render(val) {
13329
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13330
+ width: 60,
13331
+ src: val
13332
+ });
13333
+ }
13334
+ }, {
13335
+ dataIndex: 'code',
13336
+ title: "".concat(text, "\u7F16\u7801"),
13337
+ align: 'center',
13338
+ ellipsis: true,
13339
+ width: 100
13340
+ }, {
13341
+ dataIndex: 'money',
13342
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13343
+ align: 'center',
13344
+ ellipsis: true,
13345
+ width: 100
13346
+ }, {
13347
+ dataIndex: 'number',
13348
+ title: "".concat(text, "\u6570\u91CF"),
13349
+ align: 'center',
13350
+ ellipsis: true,
13351
+ width: 100,
13352
+ render: function render(val, record, index) {
13353
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13354
+ style: {
13355
+ width: 70
13356
+ },
13357
+ value: val,
13358
+ min: 1,
13359
+ precision: 0,
13360
+ onChange: function onChange(num) {
13361
+ return updateHandle(num, index, 'number');
13362
+ }
13363
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13364
+ }
13365
+ }, {
13366
+ dataIndex: 'share',
13367
+ title: "\u5206\u644A\u4EF7",
13368
+ align: 'center',
13369
+ ellipsis: true,
13370
+ width: 70
13371
+ }, {
13372
+ dataIndex: 'type',
13373
+ title: "\u8D60\u54C1\u7C7B\u578B",
13374
+ align: 'center',
13375
+ ellipsis: true,
13376
+ width: 100
13377
+ }]
13378
+ };
13379
+ };
13380
+
13381
+ var getColumnsMap = function getColumnsMap(args) {
13382
+ var _ref = args || {},
13383
+ _ref$text = _ref.text,
13384
+ text = _ref$text === void 0 ? '' : _ref$text,
13385
+ disabled = _ref.disabled,
13386
+ updateHandle = _ref.updateHandle;
13387
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns({
13388
+ text: text,
13389
+ disabled: disabled,
13390
+ updateHandle: updateHandle
13391
+ })), getColumns$1({
13392
+ text: text,
13393
+ disabled: disabled,
13394
+ updateHandle: updateHandle
13395
+ })), getColumns$2({
13396
+ text: text,
13397
+ disabled: disabled,
13398
+ updateHandle: updateHandle
13399
+ })), {}, {
13400
+ default: [{
13401
+ dataIndex: 'mark',
13402
+ title: "\u5546\u54C1\u6807\u8BB0",
13403
+ align: 'center',
13404
+ ellipsis: true,
13405
+ width: 70,
13406
+ render: function render(val, record, index) {
13407
+ return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13408
+ options: [{
13409
+ label: '是',
13410
+ value: '是'
13411
+ }, {
13412
+ label: '否',
13413
+ value: '否'
13414
+ }],
13415
+ disabled: disabled,
13416
+ value: val,
13417
+ onChange: function onChange(val) {
13418
+ return updateHandle(val, index, 'mark');
13419
+ }
13420
+ });
13421
+ }
13422
+ }, {
13423
+ dataIndex: 'skuName',
13424
+ title: "".concat(text, "sku\u540D\u79F0"),
13425
+ align: 'center',
13426
+ ellipsis: true,
13427
+ width: 250
13428
+ }, {
13429
+ dataIndex: 'sku',
13430
+ title: "".concat(text, "sku\u7F16\u7801"),
13431
+ align: 'center',
13432
+ ellipsis: true,
13433
+ width: 100
13434
+ }, {
13435
+ dataIndex: 'name',
13436
+ title: "".concat(text, "\u540D\u79F0"),
13437
+ align: 'center',
13438
+ ellipsis: true,
13439
+ width: 250
13440
+ }, {
13441
+ dataIndex: 'pic',
13442
+ title: "\u56FE\u7247",
13443
+ align: 'center',
13444
+ ellipsis: true,
13445
+ width: 100,
13446
+ render: function render(val) {
13447
+ return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13448
+ width: 60,
13449
+ src: val
13450
+ });
13451
+ }
13452
+ }, {
13453
+ dataIndex: 'code',
13454
+ title: "".concat(text, "\u7F16\u7801"),
13455
+ align: 'center',
13456
+ ellipsis: true,
13457
+ width: 100
13458
+ }, {
13459
+ dataIndex: 'money',
13460
+ title: "\u5B9E\u4ED8\u91D1\u989D",
13461
+ align: 'center',
13462
+ ellipsis: true,
13463
+ width: 100
13464
+ }, {
13465
+ dataIndex: 'number',
13466
+ title: "".concat(text, "\u6570\u91CF"),
13467
+ align: 'center',
13468
+ ellipsis: true,
13469
+ width: 100,
13470
+ render: function render(val, record, index) {
13471
+ return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13472
+ style: {
13473
+ width: 70
13474
+ },
13475
+ value: val,
13476
+ min: 1,
13477
+ precision: 0,
13478
+ onChange: function onChange(num) {
13479
+ return updateHandle(num, index, 'number');
13480
+ }
13481
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13482
+ }
13483
+ }, {
13484
+ dataIndex: 'share',
13485
+ title: "\u5206\u644A\u4EF7",
13486
+ align: 'center',
13487
+ ellipsis: true,
13488
+ width: 70
13489
+ }, {
13490
+ dataIndex: 'type',
13491
+ title: "\u8D60\u54C1\u7C7B\u578B",
13492
+ align: 'center',
13493
+ ellipsis: true,
13494
+ width: 100
13495
+ }]
13496
+ });
13497
+ };
13498
+ var getColumnsBaseInfo = function getColumnsBaseInfo() {
13499
+ var clone_columnsMap = lodash.cloneDeep(getColumnsMap());
13500
+ var newColumns = {};
13501
+ Object.keys(clone_columnsMap).forEach(function (key) {
13502
+ newColumns[key] = clone_columnsMap[key].map(function (col) {
13503
+ return {
13504
+ title: col.title,
13505
+ dataIndex: col.dataIndex
13506
+ };
13507
+ });
13508
+ });
13509
+ return newColumns;
13510
+ };
13511
+ var columnsBaseInfoMap = getColumnsBaseInfo();
13512
+
13513
+ var renderFieldMap$1 = {
13514
+ goodsNumber: function goodsNumber(_ref) {
13515
+ var disabled = _ref.disabled,
13516
+ updateHandle = _ref.updateHandle;
13517
+ return function (val, record, index) {
13518
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13519
+ style: {
13520
+ width: 70
13521
+ },
13522
+ value: val,
13523
+ min: 1,
13524
+ precision: 0,
13525
+ onChange: function onChange(num) {
13526
+ return updateHandle(num, index, 'goodsNumber');
13527
+ }
13528
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13529
+ };
13530
+ },
13531
+ goodsPrice: function goodsPrice(_ref2) {
13532
+ var disabled = _ref2.disabled,
13533
+ updateHandle = _ref2.updateHandle;
13534
+ return function (val, record, index) {
13535
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13536
+ style: {
13537
+ width: 70
13538
+ },
13539
+ value: val,
13540
+ min: 0,
13541
+ onChange: function onChange(value) {
13542
+ return updateHandle(value, index, 'goodsPrice');
13543
+ }
13544
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13545
+ };
13546
+ },
13547
+ isGift: function isGift(_ref3) {
13548
+ var disabled = _ref3.disabled,
13549
+ updateHandle = _ref3.updateHandle;
13550
+ return function (val, record, index) {
13551
+ var options = [{
13552
+ label: '是',
13553
+ value: 1
13554
+ }, {
13555
+ label: '否',
13556
+ value: 0
13557
+ }];
13558
+ return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13559
+ style: {
13560
+ width: 70
13561
+ },
13562
+ options: options,
13563
+ value: val,
13564
+ onChange: function onChange(value) {
13565
+ return updateHandle(value, index, 'isGift');
13566
+ },
13567
+ getPopupContainer: function getPopupContainer() {
13568
+ return document.getElementById('bsE3ReissueGoods');
13569
+ }
13570
+ }) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
13571
+ };
13572
+ }
13573
+ };
13574
+ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
13575
+ var disabled = _ref4.disabled,
13576
+ updateHandle = _ref4.updateHandle,
13577
+ operate = _ref4.operate;
13578
+ return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
13579
+ var newItem = _objectSpread2({
13580
+ align: 'center',
13581
+ ellipsis: true
13582
+ }, item);
13583
+ if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
13584
+ return _objectSpread2(_objectSpread2({}, newItem), {}, {
13585
+ render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
12684
13586
  disabled: disabled,
12685
13587
  updateHandle: updateHandle
12686
13588
  })
@@ -12845,548 +13747,27 @@ var GoodItem$1 = function GoodItem(props) {
12845
13747
  return function (type) {
12846
13748
  var columns = [];
12847
13749
  switch (type) {
12848
- case 'WDT_REISSUE_GOODS':
12849
- {
12850
- columns = getWdtReissueGoodColumns({
12851
- disabled: disabled,
12852
- updateHandle: updateHandle,
12853
- operate: operate
12854
- });
12855
- }
12856
- break;
12857
13750
  case 'WDT_GOODS':
12858
- columns = [{
12859
- dataIndex: 'goodId',
12860
- title: "\u5546\u54C1ID",
12861
- align: 'center',
12862
- ellipsis: true,
12863
- width: 70
12864
- }, {
12865
- dataIndex: 'goodNo',
12866
- title: "\u5546\u54C1\u7F16\u7801",
12867
- align: 'center',
12868
- ellipsis: true,
12869
- width: 180
12870
- }, {
12871
- dataIndex: 'goodName',
12872
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12873
- align: 'center',
12874
- ellipsis: true,
12875
- width: 250
12876
- }, {
12877
- dataIndex: 'specId',
12878
- title: "".concat(text, "SKUID"),
12879
- align: 'center',
12880
- ellipsis: true,
12881
- width: 100
12882
- }, {
12883
- dataIndex: 'specNo',
12884
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12885
- align: 'center',
12886
- ellipsis: true,
12887
- width: 180
12888
- }, {
12889
- dataIndex: 'specName',
12890
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12891
- align: 'center',
12892
- ellipsis: true,
12893
- width: 250
12894
- }, {
12895
- dataIndex: 'orderPrice',
12896
- title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
12897
- align: 'center',
12898
- ellipsis: true,
12899
- width: 100
12900
- }, {
12901
- dataIndex: 'num',
12902
- title: "".concat(text, "\u6570\u91CF"),
12903
- align: 'center',
12904
- ellipsis: true,
12905
- width: 100,
12906
- render: function render(val, record, index) {
12907
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12908
- style: {
12909
- width: 70
12910
- },
12911
- value: val,
12912
- min: 1,
12913
- precision: 0,
12914
- onChange: function onChange(num) {
12915
- return updateHandle(num, index, 'num');
12916
- }
12917
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
12918
- }
12919
- },
12920
- // {
12921
- // dataIndex: 'actualNum',
12922
- // title: `${text}实发数量`,
12923
- // align: 'center',
12924
- // ellipsis: true,
12925
- // width: 100,
12926
- // },
12927
- {
12928
- dataIndex: 'sharePrice',
12929
- title: "\u5206\u644A\u4EF7",
12930
- align: 'center',
12931
- ellipsis: true,
12932
- width: 70
12933
- }, {
12934
- dataIndex: 'giftType',
12935
- title: "\u8D60\u54C1\u65B9\u5F0F",
12936
- align: 'center',
12937
- ellipsis: true,
12938
- width: 100,
12939
- render: function render(val) {
12940
- var giftTypeMap = {
12941
- 0: '非赠品',
12942
- 1: '自动赠送',
12943
- 2: '手工赠送',
12944
- 3: '回购自动送赠品',
12945
- 4: '前N有礼送赠品',
12946
- 6: '天猫优仓赠品',
12947
- 7: '淘宝CRM会员送赠'
12948
- };
12949
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
12950
- }
12951
- }];
12952
- break;
12953
13751
  case 'WDT_RETURN_GOODS':
12954
- {
12955
- columns = [{
12956
- dataIndex: 'goodId',
12957
- title: "\u5546\u54C1ID",
12958
- align: 'center',
12959
- ellipsis: true,
12960
- width: 70
12961
- }, {
12962
- dataIndex: 'goodNo',
12963
- title: "\u5546\u54C1\u7F16\u7801",
12964
- align: 'center',
12965
- ellipsis: true,
12966
- width: 180
12967
- }, {
12968
- dataIndex: 'goodName',
12969
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
12970
- align: 'center',
12971
- ellipsis: true,
12972
- width: 250
12973
- }, {
12974
- dataIndex: 'specId',
12975
- title: "".concat(text, "SKUID"),
12976
- align: 'center',
12977
- ellipsis: true,
12978
- width: 100
12979
- }, {
12980
- dataIndex: 'specNo',
12981
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
12982
- align: 'center',
12983
- ellipsis: true,
12984
- width: 180
12985
- }, {
12986
- dataIndex: 'specName',
12987
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
12988
- align: 'center',
12989
- ellipsis: true,
12990
- width: 250
12991
- }, {
12992
- dataIndex: 'num',
12993
- title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
12994
- align: 'center',
12995
- ellipsis: true,
12996
- width: 100,
12997
- render: function render(val, record, index) {
12998
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
12999
- style: {
13000
- width: 70
13001
- },
13002
- value: val,
13003
- min: 1,
13004
- precision: 0,
13005
- onChange: function onChange(num) {
13006
- return updateHandle(num, index, 'num');
13007
- }
13008
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13009
- }
13010
- }, {
13011
- dataIndex: 'sharePrice',
13012
- title: "\u5206\u644A\u4EF7",
13013
- align: 'center',
13014
- ellipsis: true,
13015
- width: 80,
13016
- render: function render(val, record, index) {
13017
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13018
- style: {
13019
- width: 70
13020
- },
13021
- value: val,
13022
- min: 0,
13023
- onChange: function onChange(value) {
13024
- return updateHandle(value, index, 'sharePrice');
13025
- }
13026
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13027
- }
13028
- }, {
13029
- dataIndex: 'returnPrice',
13030
- title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
13031
- align: 'center',
13032
- ellipsis: true,
13033
- width: 100
13034
- }, {
13035
- dataIndex: 'giftType',
13036
- title: "\u8D60\u54C1\u65B9\u5F0F",
13037
- align: 'center',
13038
- ellipsis: true,
13039
- width: 100,
13040
- render: function render(val) {
13041
- var giftTypeMap = {
13042
- 0: '非赠品',
13043
- 1: '自动赠送',
13044
- 2: '手工赠送',
13045
- 3: '回购自动送赠品',
13046
- 4: '前N有礼送赠品',
13047
- 6: '天猫优仓赠品',
13048
- 7: '淘宝CRM会员送赠'
13049
- };
13050
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13051
- }
13052
- }, {
13053
- dataIndex: 'type',
13054
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13055
- align: 'center',
13056
- ellipsis: true,
13057
- width: 100,
13058
- render: function render(val, record, index) {
13059
- var options = [{
13060
- label: '单品',
13061
- value: '1'
13062
- }, {
13063
- label: '组合装',
13064
- value: '2'
13065
- }];
13066
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13067
- style: {
13068
- width: 70
13069
- },
13070
- options: options,
13071
- value: val,
13072
- onChange: function onChange(value) {
13073
- return updateHandle(value, index, 'type');
13074
- }
13075
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13076
- }
13077
- }];
13078
- }
13079
- break;
13080
13752
  case 'WDT_EXCHANGE_GOODS':
13753
+ case 'BS_E3_GOODS':
13754
+ case 'BS_GOODS':
13755
+ case 'WLN_GOODS':
13081
13756
  {
13082
- columns = [{
13083
- dataIndex: 'goodId',
13084
- title: "\u5546\u54C1ID",
13085
- align: 'center',
13086
- ellipsis: true,
13087
- width: 70
13088
- }, {
13089
- dataIndex: 'goodNo',
13090
- title: "\u5546\u54C1\u7F16\u7801",
13091
- align: 'center',
13092
- ellipsis: true,
13093
- width: 180
13094
- }, {
13095
- dataIndex: 'goodName',
13096
- title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
13097
- align: 'center',
13098
- ellipsis: true,
13099
- width: 250
13100
- }, {
13101
- dataIndex: 'specId',
13102
- title: "".concat(text, "SKUID"),
13103
- align: 'center',
13104
- ellipsis: true,
13105
- width: 100
13106
- }, {
13107
- dataIndex: 'specNo',
13108
- title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
13109
- align: 'center',
13110
- ellipsis: true,
13111
- width: 180
13112
- }, {
13113
- dataIndex: 'specName',
13114
- title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
13115
- align: 'center',
13116
- ellipsis: true,
13117
- width: 250
13118
- }, {
13119
- dataIndex: 'num',
13120
- title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
13121
- align: 'center',
13122
- ellipsis: true,
13123
- width: 100,
13124
- render: function render(val, record, index) {
13125
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13126
- style: {
13127
- width: 70
13128
- },
13129
- value: val,
13130
- min: 1,
13131
- precision: 0,
13132
- onChange: function onChange(num) {
13133
- return updateHandle(num, index, 'num');
13134
- }
13135
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13136
- }
13137
- }, {
13138
- dataIndex: 'price',
13139
- title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
13140
- align: 'center',
13141
- ellipsis: true,
13142
- width: 100,
13143
- render: function render(val, record, index) {
13144
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13145
- style: {
13146
- width: 70
13147
- },
13148
- value: val,
13149
- min: 0,
13150
- onChange: function onChange(value) {
13151
- return updateHandle(value, index, 'price');
13152
- }
13153
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13154
- }
13155
- }, {
13156
- dataIndex: 'exchangePrice',
13157
- title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
13158
- align: 'center',
13159
- ellipsis: true,
13160
- width: 100
13161
- }, {
13162
- dataIndex: 'giftType',
13163
- title: "\u8D60\u54C1\u65B9\u5F0F",
13164
- align: 'center',
13165
- ellipsis: true,
13166
- width: 100,
13167
- render: function render(val) {
13168
- var giftTypeMap = {
13169
- 0: '非赠品',
13170
- 1: '自动赠送',
13171
- 2: '手工赠送',
13172
- 3: '回购自动送赠品',
13173
- 4: '前N有礼送赠品',
13174
- 6: '天猫优仓赠品',
13175
- 7: '淘宝CRM会员送赠'
13176
- };
13177
- return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
13178
- }
13179
- }, {
13180
- dataIndex: 'type',
13181
- title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
13182
- align: 'center',
13183
- ellipsis: true,
13184
- width: 100,
13185
- render: function render(val, record, index) {
13186
- var options = [{
13187
- label: '单品',
13188
- value: '1'
13189
- }, {
13190
- label: '组合装',
13191
- value: '2'
13192
- }];
13193
- return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13194
- style: {
13195
- width: 70
13196
- },
13197
- options: options,
13198
- value: val,
13199
- onChange: function onChange(value) {
13200
- return updateHandle(value, index, 'type');
13201
- }
13202
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13203
- }
13204
- }];
13757
+ columns = getColumnsMap({
13758
+ text: text,
13759
+ disabled: disabled,
13760
+ updateHandle: updateHandle
13761
+ })[type];
13205
13762
  }
13206
13763
  break;
13207
- case 'BS_E3_GOODS':
13764
+ case 'WDT_REISSUE_GOODS':
13208
13765
  {
13209
- columns = [{
13210
- dataIndex: 'sku',
13211
- title: "SKU",
13212
- align: 'center',
13213
- ellipsis: true,
13214
- width: 150
13215
- }, {
13216
- dataIndex: 'skuId',
13217
- title: "SKU ID",
13218
- align: 'center',
13219
- ellipsis: true,
13220
- width: 150
13221
- }, {
13222
- dataIndex: 'goodsName',
13223
- title: "\u5546\u54C1\u540D\u79F0",
13224
- align: 'center',
13225
- ellipsis: true,
13226
- width: 150
13227
- }, {
13228
- dataIndex: 'goodsShortName',
13229
- title: "\u5546\u54C1\u7B80\u79F0",
13230
- align: 'center',
13231
- ellipsis: true,
13232
- width: 100
13233
- }, {
13234
- dataIndex: 'picPath',
13235
- title: "\u5546\u54C1\u56FE\u7247",
13236
- align: 'center',
13237
- ellipsis: true,
13238
- width: 100,
13239
- render: function render(val) {
13240
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13241
- width: 60,
13242
- src: val
13243
- });
13244
- }
13245
- }, {
13246
- dataIndex: 'goodsSn',
13247
- title: "\u8D27\u53F7",
13248
- align: 'center',
13249
- ellipsis: true,
13250
- width: 150
13251
- }, {
13252
- dataIndex: 'goodsId',
13253
- title: "\u8D27\u53F7ID",
13254
- align: 'center',
13255
- ellipsis: true,
13256
- width: 150
13257
- }, {
13258
- dataIndex: 'colorName',
13259
- title: "\u989C\u8272\u540D\u79F0",
13260
- align: 'center',
13261
- ellipsis: true,
13262
- width: 100
13263
- }, {
13264
- dataIndex: 'colorCode',
13265
- title: "\u989C\u8272\u4EE3\u7801",
13266
- align: 'center',
13267
- ellipsis: true,
13268
- width: 150
13269
- }, {
13270
- dataIndex: 'sizeName',
13271
- title: "\u5C3A\u7801\u540D\u79F0",
13272
- align: 'center',
13273
- ellipsis: true,
13274
- width: 100
13275
- }, {
13276
- dataIndex: 'sizeCode',
13277
- title: "\u5C3A\u7801\u4EE3\u7801",
13278
- align: 'center',
13279
- ellipsis: true,
13280
- width: 100
13281
- }, {
13282
- dataIndex: 'brandName',
13283
- title: "\u54C1\u724C\u540D\u79F0",
13284
- align: 'center',
13285
- ellipsis: true,
13286
- width: 150
13287
- }, {
13288
- dataIndex: 'goodsNumber',
13289
- title: "\u5546\u54C1\u6570\u91CF",
13290
- align: 'center',
13291
- ellipsis: true,
13292
- width: 100,
13293
- render: function render(val, record, index) {
13294
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13295
- style: {
13296
- width: 70
13297
- },
13298
- value: val,
13299
- min: 1,
13300
- precision: 0,
13301
- onChange: function onChange(num) {
13302
- return updateHandle(num, index, 'goodsNumber');
13303
- }
13304
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13305
- }
13306
- }, {
13307
- dataIndex: 'goodsPrice',
13308
- title: "\u5546\u54C1\u5355\u4EF7",
13309
- align: 'center',
13310
- ellipsis: true,
13311
- width: 120,
13312
- render: function render(val, record, index) {
13313
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13314
- style: {
13315
- width: 70
13316
- },
13317
- value: val,
13318
- min: 0,
13319
- precision: 2,
13320
- onChange: function onChange(num) {
13321
- return updateHandle(num, index, 'goodsPrice');
13322
- }
13323
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13324
- }
13325
- }, {
13326
- dataIndex: 'shopPrice',
13327
- title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
13328
- align: 'center',
13329
- ellipsis: true,
13330
- width: 120
13331
- }, {
13332
- dataIndex: 'sharePrice',
13333
- title: "\u5206\u644A\u4EF7",
13334
- align: 'center',
13335
- ellipsis: true,
13336
- width: 120
13337
- }, {
13338
- dataIndex: 'sharePayment',
13339
- title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
13340
- align: 'center',
13341
- ellipsis: true,
13342
- width: 120
13343
- }, {
13344
- dataIndex: 'payment',
13345
- title: "\u5B9E\u4ED8\u91D1\u989D",
13346
- align: 'center',
13347
- ellipsis: true,
13348
- width: 120,
13349
- render: function render(val, record, index) {
13350
- return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13351
- style: {
13352
- width: 70
13353
- },
13354
- value: val,
13355
- min: 0,
13356
- precision: 2,
13357
- onChange: function onChange(num) {
13358
- return updateHandle(num, index, 'payment');
13359
- }
13360
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13361
- }
13362
- }, {
13363
- dataIndex: 'tcSku',
13364
- title: "\u5957\u9910SKU",
13365
- align: 'center',
13366
- ellipsis: true,
13367
- width: 150
13368
- }, {
13369
- dataIndex: 'tcGoodsNumber',
13370
- title: "\u5957\u9910\u5957\u6570",
13371
- align: 'center',
13372
- ellipsis: true,
13373
- width: 100
13374
- }, {
13375
- dataIndex: 'taoCanSingleSl',
13376
- title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
13377
- align: 'center',
13378
- ellipsis: true,
13379
- width: 100
13380
- }, {
13381
- dataIndex: 'isGift',
13382
- title: "\u662F\u5426\u8D60\u54C1",
13383
- align: 'center',
13384
- ellipsis: true,
13385
- width: 100,
13386
- render: function render(val) {
13387
- return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
13388
- }
13389
- }];
13766
+ columns = getWdtReissueGoodColumns({
13767
+ disabled: disabled,
13768
+ updateHandle: updateHandle,
13769
+ operate: operate
13770
+ });
13390
13771
  }
13391
13772
  break;
13392
13773
  case 'BS_E3_REISSUE_GOODS':
@@ -13398,213 +13779,12 @@ var GoodItem$1 = function GoodItem(props) {
13398
13779
  });
13399
13780
  }
13400
13781
  break;
13401
- case 'BS_GOODS':
13402
- columns = [{
13403
- dataIndex: 'mark',
13404
- title: "\u5546\u54C1\u6807\u8BB0",
13405
- align: 'center',
13406
- ellipsis: true,
13407
- width: 70,
13408
- render: function render(val, record, index) {
13409
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13410
- options: [{
13411
- label: '是',
13412
- value: '是'
13413
- }, {
13414
- label: '否',
13415
- value: '否'
13416
- }],
13417
- disabled: disabled,
13418
- value: val,
13419
- onChange: function onChange(val) {
13420
- return updateHandle(val, index, 'mark');
13421
- }
13422
- });
13423
- }
13424
- }, {
13425
- dataIndex: 'skuName',
13426
- title: "".concat(text, "sku\u540D\u79F0"),
13427
- align: 'center',
13428
- ellipsis: true,
13429
- width: 250
13430
- }, {
13431
- dataIndex: 'sku',
13432
- title: "".concat(text, "sku\u7F16\u7801"),
13433
- align: 'center',
13434
- ellipsis: true,
13435
- width: 100
13436
- }, {
13437
- dataIndex: 'name',
13438
- title: "".concat(text, "\u540D\u79F0"),
13439
- align: 'center',
13440
- ellipsis: true,
13441
- width: 250
13442
- }, {
13443
- dataIndex: 'pic',
13444
- title: "\u56FE\u7247",
13445
- align: 'center',
13446
- ellipsis: true,
13447
- width: 100,
13448
- render: function render(val) {
13449
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13450
- width: 60,
13451
- src: val
13452
- });
13453
- }
13454
- }, {
13455
- dataIndex: 'code',
13456
- title: "".concat(text, "\u7F16\u7801"),
13457
- align: 'center',
13458
- ellipsis: true,
13459
- width: 100
13460
- }, {
13461
- dataIndex: 'money',
13462
- title: "\u5B9E\u4ED8\u91D1\u989D",
13463
- align: 'center',
13464
- ellipsis: true,
13465
- width: 100
13466
- }, {
13467
- dataIndex: 'number',
13468
- title: "".concat(text, "\u6570\u91CF"),
13469
- align: 'center',
13470
- ellipsis: true,
13471
- width: 100,
13472
- render: function render(val, record, index) {
13473
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13474
- style: {
13475
- width: 70
13476
- },
13477
- value: val,
13478
- min: 1,
13479
- precision: 0,
13480
- onChange: function onChange(num) {
13481
- return updateHandle(num, index, 'number');
13482
- }
13483
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13484
- }
13485
- }, {
13486
- dataIndex: 'share',
13487
- title: "\u5206\u644A\u4EF7",
13488
- align: 'center',
13489
- ellipsis: true,
13490
- width: 70
13491
- }, {
13492
- dataIndex: 'type',
13493
- title: "\u8D60\u54C1\u7C7B\u578B",
13494
- align: 'center',
13495
- ellipsis: true,
13496
- width: 100
13497
- }, {
13498
- dataIndex: 'batch',
13499
- title: "\u6279\u6B21\u53F7",
13500
- align: 'center',
13501
- ellipsis: true,
13502
- width: 100
13503
- }, {
13504
- dataIndex: 'expireDate',
13505
- title: "\u6709\u6548\u671F",
13506
- align: 'center',
13507
- ellipsis: true,
13508
- width: 100
13509
- }];
13510
- break;
13511
13782
  default:
13512
- columns = [{
13513
- dataIndex: 'mark',
13514
- title: "\u5546\u54C1\u6807\u8BB0",
13515
- align: 'center',
13516
- ellipsis: true,
13517
- width: 70,
13518
- render: function render(val, record, index) {
13519
- return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
13520
- options: [{
13521
- label: '是',
13522
- value: '是'
13523
- }, {
13524
- label: '否',
13525
- value: '否'
13526
- }],
13527
- disabled: disabled,
13528
- value: val,
13529
- onChange: function onChange(val) {
13530
- return updateHandle(val, index, 'mark');
13531
- }
13532
- });
13533
- }
13534
- }, {
13535
- dataIndex: 'skuName',
13536
- title: "".concat(text, "sku\u540D\u79F0"),
13537
- align: 'center',
13538
- ellipsis: true,
13539
- width: 250
13540
- }, {
13541
- dataIndex: 'sku',
13542
- title: "".concat(text, "sku\u7F16\u7801"),
13543
- align: 'center',
13544
- ellipsis: true,
13545
- width: 100
13546
- }, {
13547
- dataIndex: 'name',
13548
- title: "".concat(text, "\u540D\u79F0"),
13549
- align: 'center',
13550
- ellipsis: true,
13551
- width: 250
13552
- }, {
13553
- dataIndex: 'pic',
13554
- title: "\u56FE\u7247",
13555
- align: 'center',
13556
- ellipsis: true,
13557
- width: 100,
13558
- render: function render(val) {
13559
- return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
13560
- width: 60,
13561
- src: val
13562
- });
13563
- }
13564
- }, {
13565
- dataIndex: 'code',
13566
- title: "".concat(text, "\u7F16\u7801"),
13567
- align: 'center',
13568
- ellipsis: true,
13569
- width: 100
13570
- }, {
13571
- dataIndex: 'money',
13572
- title: "\u5B9E\u4ED8\u91D1\u989D",
13573
- align: 'center',
13574
- ellipsis: true,
13575
- width: 100
13576
- }, {
13577
- dataIndex: 'number',
13578
- title: "".concat(text, "\u6570\u91CF"),
13579
- align: 'center',
13580
- ellipsis: true,
13581
- width: 100,
13582
- render: function render(val, record, index) {
13583
- return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
13584
- style: {
13585
- width: 70
13586
- },
13587
- value: val,
13588
- min: 1,
13589
- precision: 0,
13590
- onChange: function onChange(num) {
13591
- return updateHandle(num, index, 'number');
13592
- }
13593
- }) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
13594
- }
13595
- }, {
13596
- dataIndex: 'share',
13597
- title: "\u5206\u644A\u4EF7",
13598
- align: 'center',
13599
- ellipsis: true,
13600
- width: 70
13601
- }, {
13602
- dataIndex: 'type',
13603
- title: "\u8D60\u54C1\u7C7B\u578B",
13604
- align: 'center',
13605
- ellipsis: true,
13606
- width: 100
13607
- }];
13783
+ columns = getColumnsMap({
13784
+ text: text,
13785
+ disabled: disabled,
13786
+ updateHandle: updateHandle
13787
+ })['default'];
13608
13788
  }
13609
13789
  return columns;
13610
13790
  };
@@ -13616,6 +13796,24 @@ var GoodItem$1 = function GoodItem(props) {
13616
13796
  return COLUMNS_INFO(type);
13617
13797
  };
13618
13798
  var newColumns = React.useMemo(function () {
13799
+ var initBaseInfoColumns = GOODS_INFO_COLUMNS();
13800
+ var baseInfoColumns = [];
13801
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
13802
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
13803
+ if (isStringArray) {
13804
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
13805
+ return showHeader.includes(col.dataIndex);
13806
+ });
13807
+ } else if (isObjectArray) {
13808
+ baseInfoColumns = showHeader.filter(function (col) {
13809
+ return col.show !== false;
13810
+ }).map(function (col) {
13811
+ var currentCol = initBaseInfoColumns.find(function (item) {
13812
+ return item.dataIndex === col.dataIndex;
13813
+ });
13814
+ return currentCol ? currentCol : undefined;
13815
+ }).filter(Boolean);
13816
+ }
13619
13817
  var columnList = [{
13620
13818
  dataIndex: '',
13621
13819
  title: '序号',
@@ -13625,9 +13823,7 @@ var GoodItem$1 = function GoodItem(props) {
13625
13823
  render: function render(val, record, index) {
13626
13824
  return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
13627
13825
  }
13628
- }].concat(_toConsumableArray(GOODS_INFO_COLUMNS().filter(function (t) {
13629
- return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
13630
- })));
13826
+ }].concat(_toConsumableArray(baseInfoColumns));
13631
13827
  if (!disabled) {
13632
13828
  columnList.push({
13633
13829
  dataIndex: '',
@@ -13661,7 +13857,6 @@ var GoodItem$1 = function GoodItem(props) {
13661
13857
  }].concat(_toConsumableArray(columns));
13662
13858
  }, []);
13663
13859
  var onSubmit = function onSubmit(list) {
13664
- console.log('🚀 ~ onSubmit ~ list:', list);
13665
13860
  var newList = [];
13666
13861
  if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
13667
13862
  newList = list.map(function (item) {
@@ -16773,3 +16968,4 @@ exports.TradeId = TradeId;
16773
16968
  exports.WdtGoodList = WdtGoodList;
16774
16969
  exports.WdtReissue = wdtReissue;
16775
16970
  exports.WlnGoods = WlnGoods;
16971
+ exports.columnsBaseInfoMap = columnsBaseInfoMap;