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