@kmkf-fe-packages/basic-components 1.22.1-beta.6 → 1.22.1-beta.61
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/README.md +3 -1
- package/dist/index.esm.js +2334 -898
- package/dist/index.js +2334 -896
- package/dist/src/apaas/ApaasLogistics/index.d.ts +1 -0
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +7 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +9 -0
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -1
- package/dist/src/bs/component/model/GyGoodsList.d.ts +36 -0
- package/dist/src/bs/component/model/GyGoodsModal.d.ts +12 -0
- package/dist/src/common/Goods/RichItem.d.ts +6 -1
- package/dist/src/constants/bs.d.ts +3 -0
- package/dist/src/constants/bs_e3.d.ts +3 -0
- package/dist/src/constants/columnsBaseInfoMap.d.ts +7 -0
- package/dist/src/constants/defaultColumns.d.ts +3 -0
- package/dist/src/constants/gy.d.ts +3 -0
- package/dist/src/constants/wdt.d.ts +3 -0
- package/dist/src/constants/wln.d.ts +3 -0
- package/dist/src/gy/Reissue/index.d.ts +3 -0
- package/dist/src/gy/common/index.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +3 -3
- package/dist/src/bs/component/GoodItem/bsE3ReissueGoodsColumns.d.ts +0 -29
- package/dist/src/bs/component/GoodItem/wdtReissueGoodsColumns.d.ts +0 -21
package/dist/index.js
CHANGED
|
@@ -940,7 +940,7 @@ var fn$1 = function fn() {
|
|
|
940
940
|
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
941
941
|
var _document;
|
|
942
942
|
var _ref$maxCount = _ref.maxCount,
|
|
943
|
-
maxCount = _ref$maxCount === void 0 ?
|
|
943
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
944
944
|
_ref$maxSize = _ref.maxSize,
|
|
945
945
|
maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
|
|
946
946
|
_ref$uploadText = _ref.uploadText,
|
|
@@ -6875,7 +6875,7 @@ var fn$2 = function fn() {
|
|
|
6875
6875
|
};
|
|
6876
6876
|
var ApaasUploadFile = function ApaasUploadFile(_ref) {
|
|
6877
6877
|
var _ref$maxCount = _ref.maxCount,
|
|
6878
|
-
maxCount = _ref$maxCount === void 0 ?
|
|
6878
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
6879
6879
|
_ref$maxSize = _ref.maxSize,
|
|
6880
6880
|
maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
|
|
6881
6881
|
_ref$onChange = _ref.onChange,
|
|
@@ -7373,7 +7373,8 @@ var Province = function Province(props) {
|
|
|
7373
7373
|
var mapping = {
|
|
7374
7374
|
workOrder: kmkfUtils.AddressData.getInstance(),
|
|
7375
7375
|
bs: kmkfUtils.BsAddressData.getInstance(),
|
|
7376
|
-
wdt: kmkfUtils.WdtAddressData.getInstance()
|
|
7376
|
+
wdt: kmkfUtils.WdtAddressData.getInstance(),
|
|
7377
|
+
gy: kmkfUtils.GyAddressData.getInstance()
|
|
7377
7378
|
};
|
|
7378
7379
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7379
7380
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7478,10 +7479,16 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7478
7479
|
var addressData = (type && {
|
|
7479
7480
|
bs: kmkfUtils.BsAddressData,
|
|
7480
7481
|
wdt: kmkfUtils.WdtAddressData,
|
|
7482
|
+
gy: kmkfUtils.GyAddressData,
|
|
7481
7483
|
workOrder: kmkfUtils.AddressData
|
|
7482
7484
|
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7483
7485
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7484
|
-
params.address = [
|
|
7486
|
+
// params.address = [
|
|
7487
|
+
// addressData.getProCodeByName(val?.province),
|
|
7488
|
+
// addressData.getProCodeByName(val?.city),
|
|
7489
|
+
// addressData.getProCodeByName(val?.district),
|
|
7490
|
+
// ];
|
|
7491
|
+
params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
|
|
7485
7492
|
}
|
|
7486
7493
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
7487
7494
|
};
|
|
@@ -7554,11 +7561,13 @@ function ApaasPosting(props) {
|
|
|
7554
7561
|
});
|
|
7555
7562
|
}
|
|
7556
7563
|
|
|
7557
|
-
var _excluded$a = ["value", "onChange", "platformType"];
|
|
7564
|
+
var _excluded$a = ["value", "onChange", "platformType", "type"];
|
|
7558
7565
|
function ApaasLogistics(props) {
|
|
7559
7566
|
var value = props.value,
|
|
7560
7567
|
onChange = props.onChange,
|
|
7561
7568
|
platformType = props.platformType,
|
|
7569
|
+
_props$type = props.type,
|
|
7570
|
+
type = _props$type === void 0 ? 'select' : _props$type,
|
|
7562
7571
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7563
7572
|
var _useState = React.useState([]),
|
|
7564
7573
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7589,10 +7598,18 @@ function ApaasLogistics(props) {
|
|
|
7589
7598
|
isFirst.current = true;
|
|
7590
7599
|
}
|
|
7591
7600
|
}, []);
|
|
7592
|
-
|
|
7601
|
+
var handleInputChange = function handleInputChange(e) {
|
|
7602
|
+
var val = e.target.value;
|
|
7603
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
7604
|
+
};
|
|
7605
|
+
return type === 'input' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7606
|
+
value: value,
|
|
7607
|
+
onChange: handleInputChange
|
|
7608
|
+
})) : /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7593
7609
|
value: value,
|
|
7594
7610
|
onChange: onChange,
|
|
7595
|
-
options: option
|
|
7611
|
+
options: option,
|
|
7612
|
+
virtual: true
|
|
7596
7613
|
}));
|
|
7597
7614
|
}
|
|
7598
7615
|
|
|
@@ -8122,7 +8139,12 @@ function ApaasAddress(props) {
|
|
|
8122
8139
|
};
|
|
8123
8140
|
var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
|
|
8124
8141
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
8125
|
-
params.address = [
|
|
8142
|
+
// params.address = [
|
|
8143
|
+
// addressData.getProCodeByName(val?.province),
|
|
8144
|
+
// addressData.getProCodeByName(val?.city),
|
|
8145
|
+
// addressData.getProCodeByName(val?.district),
|
|
8146
|
+
// ];
|
|
8147
|
+
params.address = addressData.getCodesByNames([val === null || val === void 0 ? void 0 : val.province, val === null || val === void 0 ? void 0 : val.city, val === null || val === void 0 ? void 0 : val.district]);
|
|
8126
8148
|
}
|
|
8127
8149
|
onChange === null || onChange === void 0 ? void 0 : onChange(params);
|
|
8128
8150
|
};
|
|
@@ -9486,7 +9508,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
9486
9508
|
picUrl: item.picUrl,
|
|
9487
9509
|
numIid: item.numIid,
|
|
9488
9510
|
skuId: item.skuId,
|
|
9489
|
-
outerSkuId: item.outerSkuId
|
|
9511
|
+
outerSkuId: item.outerSkuId,
|
|
9512
|
+
num: 1 //手动选择商品默认数量
|
|
9490
9513
|
};
|
|
9491
9514
|
// if (type === 1) {
|
|
9492
9515
|
// params.outerId = item.outerId; //编码
|
|
@@ -9575,16 +9598,34 @@ var GoodItem = function GoodItem(props) {
|
|
|
9575
9598
|
return _ref5.apply(this, arguments);
|
|
9576
9599
|
};
|
|
9577
9600
|
}();
|
|
9578
|
-
var headerList =
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9601
|
+
var headerList = React.useMemo(function () {
|
|
9602
|
+
if (!Array.isArray(showHeader)) return kmkfUtils.columnsGoodsList.map(function (item) {
|
|
9603
|
+
return item.dataIndex;
|
|
9604
|
+
});
|
|
9605
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
9606
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
9607
|
+
var dataIndexList = [];
|
|
9608
|
+
if (isStringArray) {
|
|
9609
|
+
dataIndexList = showHeader;
|
|
9610
|
+
} else if (isObjectArray) {
|
|
9611
|
+
dataIndexList = showHeader.filter(function (item) {
|
|
9612
|
+
return item.show !== false;
|
|
9613
|
+
}).map(function (item) {
|
|
9614
|
+
return item.dataIndex;
|
|
9615
|
+
});
|
|
9616
|
+
}
|
|
9617
|
+
return dataIndexList || {
|
|
9618
|
+
1: kmkfUtils.columnsGoodsList.map(function (item) {
|
|
9619
|
+
return item.dataIndex;
|
|
9620
|
+
})
|
|
9621
|
+
}[type] || [];
|
|
9622
|
+
}, [showHeader]);
|
|
9582
9623
|
//修改参数
|
|
9583
|
-
var handleChangeValue = function handleChangeValue(key, index) {
|
|
9624
|
+
var handleChangeValue = function handleChangeValue(key, index, replaceFn) {
|
|
9584
9625
|
return function (e) {
|
|
9585
|
-
var _e$target;
|
|
9626
|
+
var _e$target, _e$target2;
|
|
9586
9627
|
var newImgList = _toConsumableArray(imgList);
|
|
9587
|
-
newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
|
|
9628
|
+
newImgList[index][key] = replaceFn ? replaceFn(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) : e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value;
|
|
9588
9629
|
var newValue = {
|
|
9589
9630
|
shopId: shopId,
|
|
9590
9631
|
imgList: newImgList
|
|
@@ -9593,35 +9634,67 @@ var GoodItem = function GoodItem(props) {
|
|
|
9593
9634
|
};
|
|
9594
9635
|
};
|
|
9595
9636
|
// TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
|
|
9596
|
-
var goodItemAttrs =
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9637
|
+
var goodItemAttrs = React.useMemo(function () {
|
|
9638
|
+
var initList = [{
|
|
9639
|
+
isShow: headerList.includes('title'),
|
|
9640
|
+
key: 'title',
|
|
9641
|
+
label: '商品名称'
|
|
9642
|
+
}, {
|
|
9643
|
+
isShow: headerList.includes('outerId'),
|
|
9644
|
+
key: 'outerId',
|
|
9645
|
+
label: '商品编码'
|
|
9646
|
+
},
|
|
9647
|
+
// { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
|
|
9648
|
+
{
|
|
9649
|
+
isShow: headerList.includes('numIid'),
|
|
9650
|
+
key: 'numIid',
|
|
9651
|
+
label: '商品id'
|
|
9652
|
+
}, {
|
|
9653
|
+
isShow: headerList.includes('num'),
|
|
9654
|
+
key: 'num',
|
|
9655
|
+
label: '商品数量',
|
|
9656
|
+
replaceFn: function replaceFn(value) {
|
|
9657
|
+
// 使用正则表达式匹配所有数字字符
|
|
9658
|
+
var numbers = String(value || '').match(/\d+/g);
|
|
9659
|
+
// 如果没有匹配到任何数字字符,返回null
|
|
9660
|
+
if (!numbers) {
|
|
9661
|
+
return null;
|
|
9662
|
+
}
|
|
9663
|
+
// 将匹配到的数字字符拼接成一个新的数字
|
|
9664
|
+
return Number(numbers.join('')) ? Number(numbers.join('')) : null;
|
|
9665
|
+
}
|
|
9666
|
+
}, {
|
|
9667
|
+
isShow: changeSku && headerList.includes('skuId'),
|
|
9668
|
+
key: 'skuId',
|
|
9669
|
+
label: 'SKU ID'
|
|
9670
|
+
}, {
|
|
9671
|
+
isShow: changeSku && headerList.includes('outerSkuId'),
|
|
9672
|
+
key: 'outerSkuId',
|
|
9673
|
+
label: 'SKU 编码'
|
|
9674
|
+
}, {
|
|
9675
|
+
isShow: changeSku && headerList.includes('propertiesName'),
|
|
9676
|
+
key: 'propertiesName',
|
|
9677
|
+
label: 'SKU 信息'
|
|
9678
|
+
}];
|
|
9679
|
+
if (!Array.isArray(showHeader)) return initList;
|
|
9680
|
+
var newList = [];
|
|
9681
|
+
headerList.forEach(function (dataIndex) {
|
|
9682
|
+
if (initList.find(function (item) {
|
|
9683
|
+
return item.key === dataIndex;
|
|
9684
|
+
})) {
|
|
9685
|
+
newList.push(initList.find(function (item) {
|
|
9686
|
+
return item.key === dataIndex;
|
|
9687
|
+
}));
|
|
9688
|
+
}
|
|
9689
|
+
});
|
|
9690
|
+
return newList;
|
|
9691
|
+
}, [headerList, showHeader]);
|
|
9692
|
+
var hasPic = React.useMemo(function () {
|
|
9693
|
+
return headerList.includes('picUrl');
|
|
9694
|
+
}, [headerList]);
|
|
9695
|
+
var hasAttr = React.useMemo(function () {
|
|
9696
|
+
return hasPic ? headerList.length > 1 : headerList.length > 0;
|
|
9697
|
+
}, [hasPic, headerList]);
|
|
9625
9698
|
return /*#__PURE__*/React__default['default'].createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React__default['default'].createElement("p", {
|
|
9626
9699
|
className: "goods-title"
|
|
9627
9700
|
}, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React__default['default'].createElement("p", {
|
|
@@ -9679,7 +9752,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9679
9752
|
title: String(img[item.key] || ''),
|
|
9680
9753
|
value: img[item.key],
|
|
9681
9754
|
disabled: item.disabled || disabled,
|
|
9682
|
-
onChange: handleChangeValue(item.key, index)
|
|
9755
|
+
onChange: handleChangeValue(item.key, index, item.replaceFn)
|
|
9683
9756
|
}));
|
|
9684
9757
|
}), !disabled && !hasPic && type !== 4 && changeSku ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
9685
9758
|
style: {
|
|
@@ -10968,13 +11041,19 @@ var jstGoods = function jstGoods(props) {
|
|
|
10968
11041
|
changeIndex = _useState2[0],
|
|
10969
11042
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10970
11043
|
var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
|
|
10971
|
-
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
11044
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11045
|
+
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
10972
11046
|
React.useEffect(function () {
|
|
10973
11047
|
//没有值塞个默认值
|
|
10974
11048
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10975
11049
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10976
11050
|
}
|
|
10977
11051
|
}, [value, type]);
|
|
11052
|
+
React.useEffect(function () {
|
|
11053
|
+
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11054
|
+
setChangeIndex(0);
|
|
11055
|
+
}
|
|
11056
|
+
}, value);
|
|
10978
11057
|
var content = function content(item, index) {
|
|
10979
11058
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10980
11059
|
style: {
|
|
@@ -10985,7 +11064,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10985
11064
|
style: {
|
|
10986
11065
|
textAlign: 'center'
|
|
10987
11066
|
}
|
|
10988
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
11067
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React__default['default'].createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10989
11068
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10990
11069
|
key: index
|
|
10991
11070
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
@@ -11037,24 +11116,32 @@ var jstGoods = function jstGoods(props) {
|
|
|
11037
11116
|
return setChangeIndex(index);
|
|
11038
11117
|
}
|
|
11039
11118
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11040
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
11119
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
|
|
11120
|
+
type: logisticsType,
|
|
11041
11121
|
disabled: disabled,
|
|
11042
11122
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11043
11123
|
onChange: function onChange(val) {
|
|
11044
|
-
|
|
11124
|
+
if (logisticsType === 'input') {
|
|
11125
|
+
changeInputHandle(null, 'logisticsCompany');
|
|
11126
|
+
changeInputHandle(val, 'logisticsCompanyName');
|
|
11127
|
+
} else {
|
|
11128
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11129
|
+
}
|
|
11045
11130
|
},
|
|
11046
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex
|
|
11131
|
+
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
|
|
11132
|
+
}, logisticsType === 'input' ? {} : {
|
|
11047
11133
|
showSearch: true,
|
|
11134
|
+
dropdownMatchSelectWidth: false,
|
|
11048
11135
|
filterOption: function filterOption(input, option) {
|
|
11049
11136
|
return option.label.includes(input);
|
|
11050
|
-
}
|
|
11051
|
-
|
|
11137
|
+
}
|
|
11138
|
+
}), {}, {
|
|
11052
11139
|
style: {
|
|
11053
11140
|
minWidth: '100px',
|
|
11054
11141
|
maxWidth: '180px'
|
|
11055
11142
|
},
|
|
11056
11143
|
platformType: platformType
|
|
11057
|
-
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11144
|
+
})) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11058
11145
|
disabled: disabled,
|
|
11059
11146
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11060
11147
|
onChange: function onChange(e) {
|
|
@@ -12438,199 +12525,1645 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12438
12525
|
};
|
|
12439
12526
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12440
12527
|
|
|
12441
|
-
var
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
}
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
}
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
}
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
}, {
|
|
12470
|
-
dataIndex: 'colorName',
|
|
12471
|
-
title: "\u989C\u8272\u540D\u79F0",
|
|
12472
|
-
width: 150
|
|
12473
|
-
}, {
|
|
12474
|
-
dataIndex: 'colorCode',
|
|
12475
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
12476
|
-
width: 150
|
|
12477
|
-
}, {
|
|
12478
|
-
dataIndex: 'sizeName',
|
|
12479
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12480
|
-
width: 150
|
|
12481
|
-
}, {
|
|
12482
|
-
dataIndex: 'sizeCode',
|
|
12483
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12484
|
-
width: 150
|
|
12485
|
-
}, {
|
|
12486
|
-
dataIndex: 'brandName',
|
|
12487
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
12488
|
-
width: 150
|
|
12489
|
-
}, {
|
|
12490
|
-
dataIndex: 'goodsNumber',
|
|
12491
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12492
|
-
width: 150
|
|
12493
|
-
}, {
|
|
12494
|
-
dataIndex: 'goodsPrice',
|
|
12495
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12496
|
-
width: 150
|
|
12497
|
-
}, {
|
|
12498
|
-
dataIndex: 'shopPrice',
|
|
12499
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12500
|
-
width: 150
|
|
12501
|
-
}, {
|
|
12502
|
-
dataIndex: 'isGift',
|
|
12503
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
12504
|
-
width: 150,
|
|
12505
|
-
render: function render(val) {
|
|
12506
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12507
|
-
}
|
|
12508
|
-
}];
|
|
12509
|
-
var renderFieldMap = {
|
|
12510
|
-
goodsNumber: function goodsNumber(_ref) {
|
|
12511
|
-
var disabled = _ref.disabled,
|
|
12512
|
-
updateHandle = _ref.updateHandle;
|
|
12513
|
-
return function (val, record, index) {
|
|
12514
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12515
|
-
style: {
|
|
12516
|
-
width: 70
|
|
12517
|
-
},
|
|
12518
|
-
value: val,
|
|
12519
|
-
min: 1,
|
|
12520
|
-
precision: 0,
|
|
12521
|
-
onChange: function onChange(num) {
|
|
12522
|
-
return updateHandle(num, index, 'goodsNumber');
|
|
12523
|
-
}
|
|
12524
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12525
|
-
};
|
|
12526
|
-
},
|
|
12527
|
-
goodsPrice: function goodsPrice(_ref2) {
|
|
12528
|
-
var disabled = _ref2.disabled,
|
|
12529
|
-
updateHandle = _ref2.updateHandle;
|
|
12530
|
-
return function (val, record, index) {
|
|
12531
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12532
|
-
style: {
|
|
12533
|
-
width: 70
|
|
12534
|
-
},
|
|
12535
|
-
value: val,
|
|
12536
|
-
min: 0,
|
|
12537
|
-
onChange: function onChange(value) {
|
|
12538
|
-
return updateHandle(value, index, 'goodsPrice');
|
|
12539
|
-
}
|
|
12540
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12541
|
-
};
|
|
12542
|
-
},
|
|
12543
|
-
isGift: function isGift(_ref3) {
|
|
12544
|
-
var disabled = _ref3.disabled,
|
|
12545
|
-
updateHandle = _ref3.updateHandle;
|
|
12546
|
-
return function (val, record, index) {
|
|
12547
|
-
var options = [{
|
|
12548
|
-
label: '是',
|
|
12549
|
-
value: 1
|
|
12550
|
-
}, {
|
|
12551
|
-
label: '否',
|
|
12552
|
-
value: 0
|
|
12553
|
-
}];
|
|
12554
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12555
|
-
style: {
|
|
12556
|
-
width: 70
|
|
12557
|
-
},
|
|
12558
|
-
options: options,
|
|
12559
|
-
value: val,
|
|
12560
|
-
onChange: function onChange(value) {
|
|
12561
|
-
return updateHandle(value, index, 'isGift');
|
|
12562
|
-
},
|
|
12563
|
-
getPopupContainer: function getPopupContainer() {
|
|
12564
|
-
return document.getElementById('bsE3ReissueGoods');
|
|
12565
|
-
}
|
|
12566
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12528
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12529
|
+
var current = _ref.current,
|
|
12530
|
+
pageSize = _ref.pageSize;
|
|
12531
|
+
var data = {
|
|
12532
|
+
skuName: formData.skuName || null,
|
|
12533
|
+
skuCode: formData.skuCode || null,
|
|
12534
|
+
goodName: formData.goodName || null,
|
|
12535
|
+
goodNo: formData.goodNo || null
|
|
12536
|
+
};
|
|
12537
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12538
|
+
method: 'post',
|
|
12539
|
+
data: _objectSpread2({
|
|
12540
|
+
pageSize: pageSize,
|
|
12541
|
+
pageNo: current,
|
|
12542
|
+
platform: 'GY_ERP'
|
|
12543
|
+
}, data)
|
|
12544
|
+
}).then(function (res) {
|
|
12545
|
+
var _res$data = res.data,
|
|
12546
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12547
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12548
|
+
_res$data$total = _res$data.total,
|
|
12549
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12550
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12551
|
+
return _objectSpread2({}, item);
|
|
12552
|
+
});
|
|
12553
|
+
return {
|
|
12554
|
+
total: total,
|
|
12555
|
+
list: newProducts
|
|
12567
12556
|
};
|
|
12568
|
-
}
|
|
12569
|
-
};
|
|
12570
|
-
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
12571
|
-
var disabled = _ref4.disabled,
|
|
12572
|
-
updateHandle = _ref4.updateHandle,
|
|
12573
|
-
operate = _ref4.operate;
|
|
12574
|
-
return columns$3.map(function (item) {
|
|
12575
|
-
var newItem = _objectSpread2({
|
|
12576
|
-
align: 'center',
|
|
12577
|
-
ellipsis: true
|
|
12578
|
-
}, item);
|
|
12579
|
-
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
12580
|
-
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12581
|
-
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
12582
|
-
disabled: disabled,
|
|
12583
|
-
updateHandle: updateHandle
|
|
12584
|
-
})
|
|
12585
|
-
});
|
|
12586
|
-
}
|
|
12587
|
-
return newItem;
|
|
12588
12557
|
});
|
|
12589
12558
|
};
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12559
|
+
var columns$3 = [{
|
|
12560
|
+
dataIndex: 'index',
|
|
12561
|
+
title: 'NO',
|
|
12562
|
+
render: function render(val, record, index) {
|
|
12563
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12564
|
+
style: {
|
|
12565
|
+
width: 25
|
|
12566
|
+
}
|
|
12567
|
+
}, index + 1);
|
|
12568
|
+
},
|
|
12569
|
+
width: 80
|
|
12595
12570
|
}, {
|
|
12596
|
-
dataIndex: '
|
|
12597
|
-
title:
|
|
12598
|
-
width:
|
|
12571
|
+
dataIndex: 'specName',
|
|
12572
|
+
title: 'SKU名称',
|
|
12573
|
+
width: 250,
|
|
12574
|
+
ellipsis: true
|
|
12575
|
+
}, {
|
|
12576
|
+
dataIndex: 'specNo',
|
|
12577
|
+
title: 'SKU编码',
|
|
12578
|
+
width: 200,
|
|
12579
|
+
ellipsis: true
|
|
12599
12580
|
}, {
|
|
12600
12581
|
dataIndex: 'goodName',
|
|
12601
|
-
title:
|
|
12602
|
-
width: 250
|
|
12582
|
+
title: '商品名称',
|
|
12583
|
+
width: 250,
|
|
12584
|
+
ellipsis: true
|
|
12603
12585
|
}, {
|
|
12604
|
-
dataIndex: '
|
|
12605
|
-
title: "
|
|
12606
|
-
|
|
12586
|
+
dataIndex: 'goodShortName',
|
|
12587
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12588
|
+
ellipsis: true,
|
|
12589
|
+
width: 250
|
|
12607
12590
|
}, {
|
|
12608
|
-
dataIndex: '
|
|
12609
|
-
title:
|
|
12610
|
-
width:
|
|
12591
|
+
dataIndex: 'goodNo',
|
|
12592
|
+
title: '商品编码',
|
|
12593
|
+
width: 200,
|
|
12594
|
+
ellipsis: true
|
|
12611
12595
|
}, {
|
|
12612
|
-
dataIndex: '
|
|
12613
|
-
title:
|
|
12614
|
-
width:
|
|
12596
|
+
dataIndex: 'goodPicUrl',
|
|
12597
|
+
title: '商品图片',
|
|
12598
|
+
width: 100,
|
|
12599
|
+
render: function render(picUrl) {
|
|
12600
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
12601
|
+
style: {
|
|
12602
|
+
width: '40px',
|
|
12603
|
+
height: '40px',
|
|
12604
|
+
objectFit: 'contain'
|
|
12605
|
+
},
|
|
12606
|
+
src: picUrl
|
|
12607
|
+
});
|
|
12608
|
+
}
|
|
12615
12609
|
}, {
|
|
12616
|
-
dataIndex: '
|
|
12617
|
-
title:
|
|
12618
|
-
width:
|
|
12610
|
+
dataIndex: 'brandName',
|
|
12611
|
+
title: '品牌名称',
|
|
12612
|
+
width: 200,
|
|
12613
|
+
ellipsis: true
|
|
12619
12614
|
}, {
|
|
12620
|
-
dataIndex: '
|
|
12621
|
-
title: "\
|
|
12615
|
+
dataIndex: 'retailPrice',
|
|
12616
|
+
title: "\u6807\u51C6\u552E\u4EF7",
|
|
12617
|
+
ellipsis: true,
|
|
12622
12618
|
width: 100
|
|
12623
12619
|
}, {
|
|
12624
|
-
dataIndex: '
|
|
12625
|
-
title: "\
|
|
12626
|
-
|
|
12627
|
-
}, {
|
|
12628
|
-
dataIndex: 'giftType',
|
|
12629
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12620
|
+
dataIndex: 'costPrice',
|
|
12621
|
+
title: "\u6210\u672C\u4EF7",
|
|
12622
|
+
ellipsis: true,
|
|
12630
12623
|
width: 100
|
|
12631
12624
|
}];
|
|
12625
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12626
|
+
var _useState = React.useState([]),
|
|
12627
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12628
|
+
selectList = _useState2[0],
|
|
12629
|
+
setSelect = _useState2[1];
|
|
12630
|
+
var _useState3 = React.useState([]),
|
|
12631
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12632
|
+
selectIds = _useState4[0],
|
|
12633
|
+
setSelectIds = _useState4[1];
|
|
12634
|
+
React.useImperativeHandle(ref, function () {
|
|
12635
|
+
return {
|
|
12636
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12637
|
+
return selectList;
|
|
12638
|
+
}
|
|
12639
|
+
};
|
|
12640
|
+
});
|
|
12641
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
12642
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12643
|
+
form = _Form$useForm2[0];
|
|
12644
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$2, {
|
|
12645
|
+
defaultPageSize: 10,
|
|
12646
|
+
form: form
|
|
12647
|
+
}),
|
|
12648
|
+
tableProps = _useAntdTable.tableProps,
|
|
12649
|
+
search = _useAntdTable.search,
|
|
12650
|
+
params = _useAntdTable.params;
|
|
12651
|
+
var submit = search.submit,
|
|
12652
|
+
reset = search.reset;
|
|
12653
|
+
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
12654
|
+
layout: "inline",
|
|
12655
|
+
form: form
|
|
12656
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12657
|
+
name: "skuName",
|
|
12658
|
+
style: {
|
|
12659
|
+
marginBottom: '12px'
|
|
12660
|
+
}
|
|
12661
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12662
|
+
placeholder: "\u5546\u54C1sku\u540D\u79F0",
|
|
12663
|
+
allowClear: true,
|
|
12664
|
+
style: {
|
|
12665
|
+
width: 150
|
|
12666
|
+
}
|
|
12667
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12668
|
+
name: "skuCode",
|
|
12669
|
+
style: {
|
|
12670
|
+
marginBottom: '12px'
|
|
12671
|
+
}
|
|
12672
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12673
|
+
placeholder: "\u5546\u54C1sku\u7F16\u7801",
|
|
12674
|
+
allowClear: true,
|
|
12675
|
+
style: {
|
|
12676
|
+
width: 150
|
|
12677
|
+
}
|
|
12678
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12679
|
+
name: "goodName",
|
|
12680
|
+
style: {
|
|
12681
|
+
marginBottom: '12px'
|
|
12682
|
+
}
|
|
12683
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12684
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12685
|
+
allowClear: true,
|
|
12686
|
+
style: {
|
|
12687
|
+
width: 150
|
|
12688
|
+
}
|
|
12689
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12690
|
+
name: "goodNo",
|
|
12691
|
+
style: {
|
|
12692
|
+
marginBottom: '12px'
|
|
12693
|
+
}
|
|
12694
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12695
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12696
|
+
allowClear: true,
|
|
12697
|
+
style: {
|
|
12698
|
+
width: 150
|
|
12699
|
+
}
|
|
12700
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12701
|
+
style: {
|
|
12702
|
+
marginBottom: '12px'
|
|
12703
|
+
}
|
|
12704
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12705
|
+
type: "primary",
|
|
12706
|
+
style: {
|
|
12707
|
+
marginRight: '8px'
|
|
12708
|
+
},
|
|
12709
|
+
onClick: submit
|
|
12710
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12711
|
+
onClick: reset
|
|
12712
|
+
}, "\u91CD\u7F6E")));
|
|
12713
|
+
var rowSelection = {
|
|
12714
|
+
selectedRowKeys: selectIds,
|
|
12715
|
+
fixed: true,
|
|
12716
|
+
onSelect: function onSelect(record, selected) {
|
|
12717
|
+
if (selected) {
|
|
12718
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12719
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12720
|
+
} else {
|
|
12721
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12722
|
+
return t !== record.specNo;
|
|
12723
|
+
}));
|
|
12724
|
+
setSelect(selectList.filter(function (t) {
|
|
12725
|
+
return t.specNo !== record.specNo;
|
|
12726
|
+
}));
|
|
12727
|
+
}
|
|
12728
|
+
},
|
|
12729
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12730
|
+
if (selected) {
|
|
12731
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12732
|
+
return t.specNo;
|
|
12733
|
+
}))));
|
|
12734
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12735
|
+
} else {
|
|
12736
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
12737
|
+
return t.specNo;
|
|
12738
|
+
})));
|
|
12739
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12740
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12741
|
+
});
|
|
12742
|
+
setSelect(list);
|
|
12743
|
+
}
|
|
12744
|
+
}
|
|
12745
|
+
};
|
|
12746
|
+
var showTable = function showTable() {
|
|
12747
|
+
var handleDelete = function handleDelete(record) {
|
|
12748
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12749
|
+
return t !== record.specNo;
|
|
12750
|
+
}));
|
|
12751
|
+
setSelect(selectList.filter(function (t) {
|
|
12752
|
+
return t.specNo !== record.specNo;
|
|
12753
|
+
}));
|
|
12754
|
+
};
|
|
12755
|
+
var showColumns = [{
|
|
12756
|
+
dataIndex: '',
|
|
12757
|
+
title: "\u64CD\u4F5C",
|
|
12758
|
+
ellipsis: true,
|
|
12759
|
+
width: 100,
|
|
12760
|
+
render: function render(val, record) {
|
|
12761
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12762
|
+
type: "link",
|
|
12763
|
+
onClick: function onClick() {
|
|
12764
|
+
return handleDelete(record);
|
|
12765
|
+
}
|
|
12766
|
+
}, "\u5220\u9664");
|
|
12767
|
+
}
|
|
12768
|
+
}].concat(lodash.takeRight(columns$3, columns$3.length - 1));
|
|
12769
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12770
|
+
style: {
|
|
12771
|
+
width: '100%',
|
|
12772
|
+
maxWidth: '387px'
|
|
12773
|
+
}
|
|
12774
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12775
|
+
columns: showColumns,
|
|
12776
|
+
rowKey: 'specNo',
|
|
12777
|
+
dataSource: selectList,
|
|
12778
|
+
scroll: {
|
|
12779
|
+
x: '100%',
|
|
12780
|
+
y: 250
|
|
12781
|
+
},
|
|
12782
|
+
pagination: {
|
|
12783
|
+
size: 'small',
|
|
12784
|
+
total: selectIds.length,
|
|
12785
|
+
pageSize: 10,
|
|
12786
|
+
showSizeChanger: false
|
|
12787
|
+
}
|
|
12788
|
+
})) : null;
|
|
12789
|
+
};
|
|
12790
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12791
|
+
style: {
|
|
12792
|
+
marginTop: '4px'
|
|
12793
|
+
}
|
|
12794
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12795
|
+
rowSelection: rowSelection,
|
|
12796
|
+
rowKey: "specNo",
|
|
12797
|
+
columns: columns$3,
|
|
12798
|
+
scroll: {
|
|
12799
|
+
x: '100%',
|
|
12800
|
+
y: 250
|
|
12801
|
+
}
|
|
12802
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
12803
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12804
|
+
return triggerNode.parentElement;
|
|
12805
|
+
},
|
|
12806
|
+
content: showTable(),
|
|
12807
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12808
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12809
|
+
danger: true,
|
|
12810
|
+
type: "text"
|
|
12811
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12812
|
+
};
|
|
12813
|
+
var GyGoodsList = /*#__PURE__*/React.forwardRef(GoodList$2);
|
|
12814
|
+
|
|
12815
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12816
|
+
React.useImperativeHandle(ref, function () {
|
|
12817
|
+
return {
|
|
12818
|
+
open: function open() {
|
|
12819
|
+
setVisible(true);
|
|
12820
|
+
}
|
|
12821
|
+
};
|
|
12822
|
+
});
|
|
12823
|
+
var onSubmit = props.onSubmit,
|
|
12824
|
+
width = props.width;
|
|
12825
|
+
var _useState = React.useState(false),
|
|
12826
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12827
|
+
visible = _useState2[0],
|
|
12828
|
+
setVisible = _useState2[1];
|
|
12829
|
+
var gyGoodsListRef = React.useRef(null);
|
|
12830
|
+
var _onCancel = function onCancel() {
|
|
12831
|
+
setVisible(false);
|
|
12832
|
+
};
|
|
12833
|
+
var onOk = function onOk() {
|
|
12834
|
+
var _gyGoodsListRef$curre;
|
|
12835
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12836
|
+
onSubmit(selectedList);
|
|
12837
|
+
_onCancel();
|
|
12838
|
+
};
|
|
12839
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12840
|
+
title: '选择商品',
|
|
12841
|
+
okText: '确认',
|
|
12842
|
+
cancelText: '取消',
|
|
12843
|
+
visible: visible,
|
|
12844
|
+
width: width || 850,
|
|
12845
|
+
onCancel: function onCancel() {
|
|
12846
|
+
_onCancel();
|
|
12847
|
+
},
|
|
12848
|
+
onOk: onOk,
|
|
12849
|
+
wrapClassName: "goodModal"
|
|
12850
|
+
}, /*#__PURE__*/React__default['default'].createElement(GyGoodsList, {
|
|
12851
|
+
ref: gyGoodsListRef
|
|
12852
|
+
})));
|
|
12853
|
+
};
|
|
12854
|
+
var GyGoodsModal$1 = /*#__PURE__*/React.forwardRef(GyGoodsModal);
|
|
12855
|
+
|
|
12856
|
+
var getColumns = function getColumns(_ref) {
|
|
12857
|
+
var _ref$text = _ref.text,
|
|
12858
|
+
disabled = _ref.disabled,
|
|
12859
|
+
updateHandle = _ref.updateHandle;
|
|
12860
|
+
return {
|
|
12861
|
+
//百胜E3补发商品
|
|
12862
|
+
BS_E3_REISSUE_GOODS: [{
|
|
12863
|
+
dataIndex: 'sku',
|
|
12864
|
+
title: "SKU",
|
|
12865
|
+
width: 150
|
|
12866
|
+
}, {
|
|
12867
|
+
dataIndex: 'skuId',
|
|
12868
|
+
title: "SKU ID",
|
|
12869
|
+
width: 150
|
|
12870
|
+
}, {
|
|
12871
|
+
dataIndex: 'goodsName',
|
|
12872
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12873
|
+
width: 150
|
|
12874
|
+
}, {
|
|
12875
|
+
dataIndex: 'goodsShortName',
|
|
12876
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12877
|
+
width: 150
|
|
12878
|
+
}, {
|
|
12879
|
+
dataIndex: 'picPath',
|
|
12880
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12881
|
+
width: 150,
|
|
12882
|
+
render: function render(val) {
|
|
12883
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12884
|
+
width: 60,
|
|
12885
|
+
src: val
|
|
12886
|
+
});
|
|
12887
|
+
}
|
|
12888
|
+
}, {
|
|
12889
|
+
dataIndex: 'goodsSn',
|
|
12890
|
+
title: "\u8D27\u53F7",
|
|
12891
|
+
width: 150
|
|
12892
|
+
}, {
|
|
12893
|
+
dataIndex: 'goodsId',
|
|
12894
|
+
title: "\u8D27\u53F7ID",
|
|
12895
|
+
width: 150
|
|
12896
|
+
}, {
|
|
12897
|
+
dataIndex: 'colorName',
|
|
12898
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12899
|
+
width: 150
|
|
12900
|
+
}, {
|
|
12901
|
+
dataIndex: 'colorCode',
|
|
12902
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12903
|
+
width: 150
|
|
12904
|
+
}, {
|
|
12905
|
+
dataIndex: 'sizeName',
|
|
12906
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12907
|
+
width: 150
|
|
12908
|
+
}, {
|
|
12909
|
+
dataIndex: 'sizeCode',
|
|
12910
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12911
|
+
width: 150
|
|
12912
|
+
}, {
|
|
12913
|
+
dataIndex: 'brandName',
|
|
12914
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12915
|
+
width: 150
|
|
12916
|
+
}, {
|
|
12917
|
+
dataIndex: 'goodsNumber',
|
|
12918
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12919
|
+
width: 150
|
|
12920
|
+
}, {
|
|
12921
|
+
dataIndex: 'goodsPrice',
|
|
12922
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12923
|
+
width: 150
|
|
12924
|
+
}, {
|
|
12925
|
+
dataIndex: 'shopPrice',
|
|
12926
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12927
|
+
width: 150
|
|
12928
|
+
}, {
|
|
12929
|
+
dataIndex: 'isGift',
|
|
12930
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12931
|
+
width: 150,
|
|
12932
|
+
render: function render(val) {
|
|
12933
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12934
|
+
}
|
|
12935
|
+
}],
|
|
12936
|
+
//百胜E3商品信息
|
|
12937
|
+
BS_E3_GOODS: [{
|
|
12938
|
+
dataIndex: 'sku',
|
|
12939
|
+
title: "SKU",
|
|
12940
|
+
align: 'center',
|
|
12941
|
+
ellipsis: true,
|
|
12942
|
+
width: 150
|
|
12943
|
+
}, {
|
|
12944
|
+
dataIndex: 'skuId',
|
|
12945
|
+
title: "SKU ID",
|
|
12946
|
+
align: 'center',
|
|
12947
|
+
ellipsis: true,
|
|
12948
|
+
width: 150
|
|
12949
|
+
}, {
|
|
12950
|
+
dataIndex: 'goodsName',
|
|
12951
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12952
|
+
align: 'center',
|
|
12953
|
+
ellipsis: true,
|
|
12954
|
+
width: 150
|
|
12955
|
+
}, {
|
|
12956
|
+
dataIndex: 'goodsShortName',
|
|
12957
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12958
|
+
align: 'center',
|
|
12959
|
+
ellipsis: true,
|
|
12960
|
+
width: 100
|
|
12961
|
+
}, {
|
|
12962
|
+
dataIndex: 'picPath',
|
|
12963
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12964
|
+
align: 'center',
|
|
12965
|
+
ellipsis: true,
|
|
12966
|
+
width: 100,
|
|
12967
|
+
render: function render(val) {
|
|
12968
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12969
|
+
width: 60,
|
|
12970
|
+
src: val
|
|
12971
|
+
});
|
|
12972
|
+
}
|
|
12973
|
+
}, {
|
|
12974
|
+
dataIndex: 'goodsSn',
|
|
12975
|
+
title: "\u8D27\u53F7",
|
|
12976
|
+
align: 'center',
|
|
12977
|
+
ellipsis: true,
|
|
12978
|
+
width: 150
|
|
12979
|
+
}, {
|
|
12980
|
+
dataIndex: 'goodsId',
|
|
12981
|
+
title: "\u8D27\u53F7ID",
|
|
12982
|
+
align: 'center',
|
|
12983
|
+
ellipsis: true,
|
|
12984
|
+
width: 150
|
|
12985
|
+
}, {
|
|
12986
|
+
dataIndex: 'colorName',
|
|
12987
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12988
|
+
align: 'center',
|
|
12989
|
+
ellipsis: true,
|
|
12990
|
+
width: 100
|
|
12991
|
+
}, {
|
|
12992
|
+
dataIndex: 'colorCode',
|
|
12993
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12994
|
+
align: 'center',
|
|
12995
|
+
ellipsis: true,
|
|
12996
|
+
width: 150
|
|
12997
|
+
}, {
|
|
12998
|
+
dataIndex: 'sizeName',
|
|
12999
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13000
|
+
align: 'center',
|
|
13001
|
+
ellipsis: true,
|
|
13002
|
+
width: 100
|
|
13003
|
+
}, {
|
|
13004
|
+
dataIndex: 'sizeCode',
|
|
13005
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13006
|
+
align: 'center',
|
|
13007
|
+
ellipsis: true,
|
|
13008
|
+
width: 100
|
|
13009
|
+
}, {
|
|
13010
|
+
dataIndex: 'brandName',
|
|
13011
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
13012
|
+
align: 'center',
|
|
13013
|
+
ellipsis: true,
|
|
13014
|
+
width: 150
|
|
13015
|
+
}, {
|
|
13016
|
+
dataIndex: 'goodsNumber',
|
|
13017
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
13018
|
+
align: 'center',
|
|
13019
|
+
ellipsis: true,
|
|
13020
|
+
width: 100,
|
|
13021
|
+
render: function render(val, record, index) {
|
|
13022
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13023
|
+
style: {
|
|
13024
|
+
width: 70
|
|
13025
|
+
},
|
|
13026
|
+
value: val,
|
|
13027
|
+
min: 1,
|
|
13028
|
+
precision: 0,
|
|
13029
|
+
onChange: function onChange(num) {
|
|
13030
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
13031
|
+
}
|
|
13032
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13033
|
+
}
|
|
13034
|
+
}, {
|
|
13035
|
+
dataIndex: 'goodsPrice',
|
|
13036
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13037
|
+
align: 'center',
|
|
13038
|
+
ellipsis: true,
|
|
13039
|
+
width: 120,
|
|
13040
|
+
render: function render(val, record, index) {
|
|
13041
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13042
|
+
style: {
|
|
13043
|
+
width: 70
|
|
13044
|
+
},
|
|
13045
|
+
value: val,
|
|
13046
|
+
min: 0,
|
|
13047
|
+
precision: 2,
|
|
13048
|
+
onChange: function onChange(num) {
|
|
13049
|
+
return updateHandle(num, index, 'goodsPrice');
|
|
13050
|
+
}
|
|
13051
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13052
|
+
}
|
|
13053
|
+
}, {
|
|
13054
|
+
dataIndex: 'shopPrice',
|
|
13055
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13056
|
+
align: 'center',
|
|
13057
|
+
ellipsis: true,
|
|
13058
|
+
width: 120
|
|
13059
|
+
}, {
|
|
13060
|
+
dataIndex: 'sharePrice',
|
|
13061
|
+
title: "\u5206\u644A\u4EF7",
|
|
13062
|
+
align: 'center',
|
|
13063
|
+
ellipsis: true,
|
|
13064
|
+
width: 120
|
|
13065
|
+
}, {
|
|
13066
|
+
dataIndex: 'sharePayment',
|
|
13067
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13068
|
+
align: 'center',
|
|
13069
|
+
ellipsis: true,
|
|
13070
|
+
width: 120
|
|
13071
|
+
}, {
|
|
13072
|
+
dataIndex: 'payment',
|
|
13073
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13074
|
+
align: 'center',
|
|
13075
|
+
ellipsis: true,
|
|
13076
|
+
width: 120,
|
|
13077
|
+
render: function render(val, record, index) {
|
|
13078
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13079
|
+
style: {
|
|
13080
|
+
width: 70
|
|
13081
|
+
},
|
|
13082
|
+
value: val,
|
|
13083
|
+
min: 0,
|
|
13084
|
+
precision: 2,
|
|
13085
|
+
onChange: function onChange(num) {
|
|
13086
|
+
return updateHandle(num, index, 'payment');
|
|
13087
|
+
}
|
|
13088
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13089
|
+
}
|
|
13090
|
+
}, {
|
|
13091
|
+
dataIndex: 'tcSku',
|
|
13092
|
+
title: "\u5957\u9910SKU",
|
|
13093
|
+
align: 'center',
|
|
13094
|
+
ellipsis: true,
|
|
13095
|
+
width: 150
|
|
13096
|
+
}, {
|
|
13097
|
+
dataIndex: 'tcGoodsNumber',
|
|
13098
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
13099
|
+
align: 'center',
|
|
13100
|
+
ellipsis: true,
|
|
13101
|
+
width: 100
|
|
13102
|
+
}, {
|
|
13103
|
+
dataIndex: 'taoCanSingleSl',
|
|
13104
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13105
|
+
align: 'center',
|
|
13106
|
+
ellipsis: true,
|
|
13107
|
+
width: 100
|
|
13108
|
+
}, {
|
|
13109
|
+
dataIndex: 'isGift',
|
|
13110
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13111
|
+
align: 'center',
|
|
13112
|
+
ellipsis: true,
|
|
13113
|
+
width: 100,
|
|
13114
|
+
render: function render(val) {
|
|
13115
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13116
|
+
}
|
|
13117
|
+
}]
|
|
13118
|
+
};
|
|
13119
|
+
};
|
|
13120
|
+
|
|
13121
|
+
var getColumns$1 = function getColumns(_ref) {
|
|
13122
|
+
var _ref$text = _ref.text,
|
|
13123
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13124
|
+
disabled = _ref.disabled,
|
|
13125
|
+
updateHandle = _ref.updateHandle;
|
|
13126
|
+
return {
|
|
13127
|
+
//bs商品信息
|
|
13128
|
+
BS_GOODS: [{
|
|
13129
|
+
dataIndex: 'mark',
|
|
13130
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
13131
|
+
align: 'center',
|
|
13132
|
+
ellipsis: true,
|
|
13133
|
+
width: 70,
|
|
13134
|
+
render: function render(val, record, index) {
|
|
13135
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13136
|
+
options: [{
|
|
13137
|
+
label: '是',
|
|
13138
|
+
value: '是'
|
|
13139
|
+
}, {
|
|
13140
|
+
label: '否',
|
|
13141
|
+
value: '否'
|
|
13142
|
+
}],
|
|
13143
|
+
disabled: disabled,
|
|
13144
|
+
value: val,
|
|
13145
|
+
onChange: function onChange(val) {
|
|
13146
|
+
return updateHandle(val, index, 'mark');
|
|
13147
|
+
}
|
|
13148
|
+
});
|
|
13149
|
+
}
|
|
13150
|
+
}, {
|
|
13151
|
+
dataIndex: 'skuName',
|
|
13152
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13153
|
+
align: 'center',
|
|
13154
|
+
ellipsis: true,
|
|
13155
|
+
width: 250
|
|
13156
|
+
}, {
|
|
13157
|
+
dataIndex: 'sku',
|
|
13158
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13159
|
+
align: 'center',
|
|
13160
|
+
ellipsis: true,
|
|
13161
|
+
width: 100
|
|
13162
|
+
}, {
|
|
13163
|
+
dataIndex: 'name',
|
|
13164
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13165
|
+
align: 'center',
|
|
13166
|
+
ellipsis: true,
|
|
13167
|
+
width: 250
|
|
13168
|
+
}, {
|
|
13169
|
+
dataIndex: 'pic',
|
|
13170
|
+
title: "\u56FE\u7247",
|
|
13171
|
+
align: 'center',
|
|
13172
|
+
ellipsis: true,
|
|
13173
|
+
width: 100,
|
|
13174
|
+
render: function render(val) {
|
|
13175
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
13176
|
+
width: 60,
|
|
13177
|
+
src: val
|
|
13178
|
+
});
|
|
13179
|
+
}
|
|
13180
|
+
}, {
|
|
13181
|
+
dataIndex: 'code',
|
|
13182
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13183
|
+
align: 'center',
|
|
13184
|
+
ellipsis: true,
|
|
13185
|
+
width: 100
|
|
13186
|
+
}, {
|
|
13187
|
+
dataIndex: 'money',
|
|
13188
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13189
|
+
align: 'center',
|
|
13190
|
+
ellipsis: true,
|
|
13191
|
+
width: 100
|
|
13192
|
+
}, {
|
|
13193
|
+
dataIndex: 'number',
|
|
13194
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13195
|
+
align: 'center',
|
|
13196
|
+
ellipsis: true,
|
|
13197
|
+
width: 100,
|
|
13198
|
+
render: function render(val, record, index) {
|
|
13199
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13200
|
+
style: {
|
|
13201
|
+
width: 70
|
|
13202
|
+
},
|
|
13203
|
+
value: val,
|
|
13204
|
+
min: 1,
|
|
13205
|
+
precision: 0,
|
|
13206
|
+
onChange: function onChange(num) {
|
|
13207
|
+
return updateHandle(num, index, 'number');
|
|
13208
|
+
}
|
|
13209
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13210
|
+
}
|
|
13211
|
+
}, {
|
|
13212
|
+
dataIndex: 'share',
|
|
13213
|
+
title: "\u5206\u644A\u4EF7",
|
|
13214
|
+
align: 'center',
|
|
13215
|
+
ellipsis: true,
|
|
13216
|
+
width: 70
|
|
13217
|
+
}, {
|
|
13218
|
+
dataIndex: 'type',
|
|
13219
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13220
|
+
align: 'center',
|
|
13221
|
+
ellipsis: true,
|
|
13222
|
+
width: 100
|
|
13223
|
+
}, {
|
|
13224
|
+
dataIndex: 'batch',
|
|
13225
|
+
title: "\u6279\u6B21\u53F7",
|
|
13226
|
+
align: 'center',
|
|
13227
|
+
ellipsis: true,
|
|
13228
|
+
width: 100
|
|
13229
|
+
}, {
|
|
13230
|
+
dataIndex: 'expireDate',
|
|
13231
|
+
title: "\u6709\u6548\u671F",
|
|
13232
|
+
align: 'center',
|
|
13233
|
+
ellipsis: true,
|
|
13234
|
+
width: 100
|
|
13235
|
+
}]
|
|
13236
|
+
};
|
|
13237
|
+
};
|
|
13238
|
+
|
|
13239
|
+
var renderGiftType = function renderGiftType(val) {
|
|
13240
|
+
var giftTypeMap = {
|
|
13241
|
+
0: '非赠品',
|
|
13242
|
+
1: '自动赠送',
|
|
13243
|
+
2: '手工赠送',
|
|
13244
|
+
3: '回购自动送赠品',
|
|
13245
|
+
4: '前N有礼送赠品',
|
|
13246
|
+
6: '天猫优仓赠品',
|
|
13247
|
+
7: '淘宝CRM会员送赠'
|
|
13248
|
+
};
|
|
13249
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13250
|
+
};
|
|
13251
|
+
var renderFieldMap = {
|
|
13252
|
+
num: function num(_ref) {
|
|
13253
|
+
var disabled = _ref.disabled,
|
|
13254
|
+
updateHandle = _ref.updateHandle;
|
|
13255
|
+
return function (val, record, index) {
|
|
13256
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13257
|
+
style: {
|
|
13258
|
+
width: 70
|
|
13259
|
+
},
|
|
13260
|
+
value: val,
|
|
13261
|
+
min: 1,
|
|
13262
|
+
precision: 0,
|
|
13263
|
+
onChange: function onChange(num) {
|
|
13264
|
+
return updateHandle(num, index, 'num');
|
|
13265
|
+
}
|
|
13266
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13267
|
+
};
|
|
13268
|
+
},
|
|
13269
|
+
giftType: function giftType() {
|
|
13270
|
+
return renderGiftType;
|
|
13271
|
+
}
|
|
13272
|
+
};
|
|
13273
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
13274
|
+
var disabled = _ref2.disabled,
|
|
13275
|
+
updateHandle = _ref2.updateHandle,
|
|
13276
|
+
operate = _ref2.operate;
|
|
13277
|
+
return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
|
|
13278
|
+
var newItem = _objectSpread2({
|
|
13279
|
+
align: 'center',
|
|
13280
|
+
ellipsis: true
|
|
13281
|
+
}, item);
|
|
13282
|
+
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
13283
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
13284
|
+
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
13285
|
+
disabled: disabled,
|
|
13286
|
+
updateHandle: updateHandle
|
|
13287
|
+
})
|
|
13288
|
+
});
|
|
13289
|
+
}
|
|
13290
|
+
return newItem;
|
|
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
|
+
WDT_REISSUE_GOODS: [{
|
|
13302
|
+
dataIndex: 'goodId',
|
|
13303
|
+
title: "\u5546\u54C1ID",
|
|
13304
|
+
width: 120
|
|
13305
|
+
}, {
|
|
13306
|
+
dataIndex: 'goodNo',
|
|
13307
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13308
|
+
width: 200
|
|
13309
|
+
}, {
|
|
13310
|
+
dataIndex: 'goodName',
|
|
13311
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13312
|
+
width: 200
|
|
13313
|
+
}, {
|
|
13314
|
+
dataIndex: 'specId',
|
|
13315
|
+
title: "SKUID",
|
|
13316
|
+
width: 150
|
|
13317
|
+
}, {
|
|
13318
|
+
dataIndex: 'specNo',
|
|
13319
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
13320
|
+
width: 200
|
|
13321
|
+
}, {
|
|
13322
|
+
dataIndex: 'specName',
|
|
13323
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
13324
|
+
width: 250
|
|
13325
|
+
}, {
|
|
13326
|
+
dataIndex: 'orderPrice',
|
|
13327
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13328
|
+
width: 200
|
|
13329
|
+
}, {
|
|
13330
|
+
dataIndex: 'num',
|
|
13331
|
+
title: "\u6570\u91CF",
|
|
13332
|
+
width: 100
|
|
13333
|
+
}, {
|
|
13334
|
+
dataIndex: 'sharePrice',
|
|
13335
|
+
title: "\u5206\u644A\u4EF7",
|
|
13336
|
+
width: 150
|
|
13337
|
+
}, {
|
|
13338
|
+
dataIndex: 'giftType',
|
|
13339
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13340
|
+
width: 100,
|
|
13341
|
+
render: renderGiftType
|
|
13342
|
+
}],
|
|
13343
|
+
//旺店通商品信息
|
|
13344
|
+
WDT_GOODS: [{
|
|
13345
|
+
dataIndex: 'goodId',
|
|
13346
|
+
title: "\u5546\u54C1ID",
|
|
13347
|
+
align: 'center',
|
|
13348
|
+
ellipsis: true,
|
|
13349
|
+
width: 70
|
|
13350
|
+
}, {
|
|
13351
|
+
dataIndex: 'goodNo',
|
|
13352
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13353
|
+
align: 'center',
|
|
13354
|
+
ellipsis: true,
|
|
13355
|
+
width: 180
|
|
13356
|
+
}, {
|
|
13357
|
+
dataIndex: 'goodName',
|
|
13358
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13359
|
+
align: 'center',
|
|
13360
|
+
ellipsis: true,
|
|
13361
|
+
width: 250
|
|
13362
|
+
}, {
|
|
13363
|
+
dataIndex: 'specId',
|
|
13364
|
+
title: "".concat(text, "SKUID"),
|
|
13365
|
+
align: 'center',
|
|
13366
|
+
ellipsis: true,
|
|
13367
|
+
width: 100
|
|
13368
|
+
}, {
|
|
13369
|
+
dataIndex: 'specNo',
|
|
13370
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13371
|
+
align: 'center',
|
|
13372
|
+
ellipsis: true,
|
|
13373
|
+
width: 180
|
|
13374
|
+
}, {
|
|
13375
|
+
dataIndex: 'specName',
|
|
13376
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13377
|
+
align: 'center',
|
|
13378
|
+
ellipsis: true,
|
|
13379
|
+
width: 250
|
|
13380
|
+
}, {
|
|
13381
|
+
dataIndex: 'orderPrice',
|
|
13382
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13383
|
+
align: 'center',
|
|
13384
|
+
ellipsis: true,
|
|
13385
|
+
width: 100
|
|
13386
|
+
}, {
|
|
13387
|
+
dataIndex: 'num',
|
|
13388
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13389
|
+
align: 'center',
|
|
13390
|
+
ellipsis: true,
|
|
13391
|
+
width: 100,
|
|
13392
|
+
render: function render(val, record, index) {
|
|
13393
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13394
|
+
style: {
|
|
13395
|
+
width: 70
|
|
13396
|
+
},
|
|
13397
|
+
value: val,
|
|
13398
|
+
min: 1,
|
|
13399
|
+
precision: 0,
|
|
13400
|
+
onChange: function onChange(num) {
|
|
13401
|
+
return updateHandle(num, index, 'num');
|
|
13402
|
+
}
|
|
13403
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13404
|
+
}
|
|
13405
|
+
}, {
|
|
13406
|
+
dataIndex: 'sharePrice',
|
|
13407
|
+
title: "\u5206\u644A\u4EF7",
|
|
13408
|
+
align: 'center',
|
|
13409
|
+
ellipsis: true,
|
|
13410
|
+
width: 70
|
|
13411
|
+
}, {
|
|
13412
|
+
dataIndex: 'giftType',
|
|
13413
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13414
|
+
align: 'center',
|
|
13415
|
+
ellipsis: true,
|
|
13416
|
+
width: 100,
|
|
13417
|
+
render: function render(val) {
|
|
13418
|
+
var giftTypeMap = {
|
|
13419
|
+
0: '非赠品',
|
|
13420
|
+
1: '自动赠送',
|
|
13421
|
+
2: '手工赠送',
|
|
13422
|
+
3: '回购自动送赠品',
|
|
13423
|
+
4: '前N有礼送赠品',
|
|
13424
|
+
6: '天猫优仓赠品',
|
|
13425
|
+
7: '淘宝CRM会员送赠'
|
|
13426
|
+
};
|
|
13427
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13428
|
+
}
|
|
13429
|
+
}],
|
|
13430
|
+
//旺店通退货商品信息
|
|
13431
|
+
WDT_RETURN_GOODS: [{
|
|
13432
|
+
dataIndex: 'goodId',
|
|
13433
|
+
title: "\u5546\u54C1ID",
|
|
13434
|
+
align: 'center',
|
|
13435
|
+
ellipsis: true,
|
|
13436
|
+
width: 70
|
|
13437
|
+
}, {
|
|
13438
|
+
dataIndex: 'goodNo',
|
|
13439
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13440
|
+
align: 'center',
|
|
13441
|
+
ellipsis: true,
|
|
13442
|
+
width: 180
|
|
13443
|
+
}, {
|
|
13444
|
+
dataIndex: 'goodName',
|
|
13445
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13446
|
+
align: 'center',
|
|
13447
|
+
ellipsis: true,
|
|
13448
|
+
width: 250
|
|
13449
|
+
}, {
|
|
13450
|
+
dataIndex: 'specId',
|
|
13451
|
+
title: "".concat(text, "SKUID"),
|
|
13452
|
+
align: 'center',
|
|
13453
|
+
ellipsis: true,
|
|
13454
|
+
width: 100
|
|
13455
|
+
}, {
|
|
13456
|
+
dataIndex: 'specNo',
|
|
13457
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13458
|
+
align: 'center',
|
|
13459
|
+
ellipsis: true,
|
|
13460
|
+
width: 180
|
|
13461
|
+
}, {
|
|
13462
|
+
dataIndex: 'specName',
|
|
13463
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13464
|
+
align: 'center',
|
|
13465
|
+
ellipsis: true,
|
|
13466
|
+
width: 250
|
|
13467
|
+
}, {
|
|
13468
|
+
dataIndex: 'num',
|
|
13469
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
13470
|
+
align: 'center',
|
|
13471
|
+
ellipsis: true,
|
|
13472
|
+
width: 100,
|
|
13473
|
+
render: function render(val, record, index) {
|
|
13474
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13475
|
+
style: {
|
|
13476
|
+
width: 70
|
|
13477
|
+
},
|
|
13478
|
+
value: val,
|
|
13479
|
+
min: 1,
|
|
13480
|
+
precision: 0,
|
|
13481
|
+
onChange: function onChange(num) {
|
|
13482
|
+
return updateHandle(num, index, 'num');
|
|
13483
|
+
}
|
|
13484
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13485
|
+
}
|
|
13486
|
+
}, {
|
|
13487
|
+
dataIndex: 'sharePrice',
|
|
13488
|
+
title: "\u5206\u644A\u4EF7",
|
|
13489
|
+
align: 'center',
|
|
13490
|
+
ellipsis: true,
|
|
13491
|
+
width: 80,
|
|
13492
|
+
render: function render(val, record, index) {
|
|
13493
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13494
|
+
style: {
|
|
13495
|
+
width: 70
|
|
13496
|
+
},
|
|
13497
|
+
value: val,
|
|
13498
|
+
min: 0,
|
|
13499
|
+
onChange: function onChange(value) {
|
|
13500
|
+
return updateHandle(value, index, 'sharePrice');
|
|
13501
|
+
}
|
|
13502
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13503
|
+
}
|
|
13504
|
+
}, {
|
|
13505
|
+
dataIndex: 'returnPrice',
|
|
13506
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13507
|
+
align: 'center',
|
|
13508
|
+
ellipsis: true,
|
|
13509
|
+
width: 100
|
|
13510
|
+
}, {
|
|
13511
|
+
dataIndex: 'giftType',
|
|
13512
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13513
|
+
align: 'center',
|
|
13514
|
+
ellipsis: true,
|
|
13515
|
+
width: 100,
|
|
13516
|
+
render: function render(val) {
|
|
13517
|
+
var giftTypeMap = {
|
|
13518
|
+
0: '非赠品',
|
|
13519
|
+
1: '自动赠送',
|
|
13520
|
+
2: '手工赠送',
|
|
13521
|
+
3: '回购自动送赠品',
|
|
13522
|
+
4: '前N有礼送赠品',
|
|
13523
|
+
6: '天猫优仓赠品',
|
|
13524
|
+
7: '淘宝CRM会员送赠'
|
|
13525
|
+
};
|
|
13526
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13527
|
+
}
|
|
13528
|
+
}, {
|
|
13529
|
+
dataIndex: 'type',
|
|
13530
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13531
|
+
align: 'center',
|
|
13532
|
+
ellipsis: true,
|
|
13533
|
+
width: 100,
|
|
13534
|
+
render: function render(val, record, index) {
|
|
13535
|
+
var options = [{
|
|
13536
|
+
label: '单品',
|
|
13537
|
+
value: '1'
|
|
13538
|
+
}, {
|
|
13539
|
+
label: '组合装',
|
|
13540
|
+
value: '2'
|
|
13541
|
+
}];
|
|
13542
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13543
|
+
style: {
|
|
13544
|
+
width: 70
|
|
13545
|
+
},
|
|
13546
|
+
options: options,
|
|
13547
|
+
value: val,
|
|
13548
|
+
onChange: function onChange(value) {
|
|
13549
|
+
return updateHandle(value, index, 'type');
|
|
13550
|
+
}
|
|
13551
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13552
|
+
}
|
|
13553
|
+
}],
|
|
13554
|
+
//旺店通换出商品信息
|
|
13555
|
+
WDT_EXCHANGE_GOODS: [{
|
|
13556
|
+
dataIndex: 'goodId',
|
|
13557
|
+
title: "\u5546\u54C1ID",
|
|
13558
|
+
align: 'center',
|
|
13559
|
+
ellipsis: true,
|
|
13560
|
+
width: 70
|
|
13561
|
+
}, {
|
|
13562
|
+
dataIndex: 'goodNo',
|
|
13563
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13564
|
+
align: 'center',
|
|
13565
|
+
ellipsis: true,
|
|
13566
|
+
width: 180
|
|
13567
|
+
}, {
|
|
13568
|
+
dataIndex: 'goodName',
|
|
13569
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13570
|
+
align: 'center',
|
|
13571
|
+
ellipsis: true,
|
|
13572
|
+
width: 250
|
|
13573
|
+
}, {
|
|
13574
|
+
dataIndex: 'specId',
|
|
13575
|
+
title: "".concat(text, "SKUID"),
|
|
13576
|
+
align: 'center',
|
|
13577
|
+
ellipsis: true,
|
|
13578
|
+
width: 100
|
|
13579
|
+
}, {
|
|
13580
|
+
dataIndex: 'specNo',
|
|
13581
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13582
|
+
align: 'center',
|
|
13583
|
+
ellipsis: true,
|
|
13584
|
+
width: 180
|
|
13585
|
+
}, {
|
|
13586
|
+
dataIndex: 'specName',
|
|
13587
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13588
|
+
align: 'center',
|
|
13589
|
+
ellipsis: true,
|
|
13590
|
+
width: 250
|
|
13591
|
+
}, {
|
|
13592
|
+
dataIndex: 'num',
|
|
13593
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13594
|
+
align: 'center',
|
|
13595
|
+
ellipsis: true,
|
|
13596
|
+
width: 100,
|
|
13597
|
+
render: function render(val, record, index) {
|
|
13598
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13599
|
+
style: {
|
|
13600
|
+
width: 70
|
|
13601
|
+
},
|
|
13602
|
+
value: val,
|
|
13603
|
+
min: 1,
|
|
13604
|
+
precision: 0,
|
|
13605
|
+
onChange: function onChange(num) {
|
|
13606
|
+
return updateHandle(num, index, 'num');
|
|
13607
|
+
}
|
|
13608
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13609
|
+
}
|
|
13610
|
+
}, {
|
|
13611
|
+
dataIndex: 'price',
|
|
13612
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13613
|
+
align: 'center',
|
|
13614
|
+
ellipsis: true,
|
|
13615
|
+
width: 100,
|
|
13616
|
+
render: function render(val, record, index) {
|
|
13617
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13618
|
+
style: {
|
|
13619
|
+
width: 70
|
|
13620
|
+
},
|
|
13621
|
+
value: val,
|
|
13622
|
+
min: 0,
|
|
13623
|
+
onChange: function onChange(value) {
|
|
13624
|
+
return updateHandle(value, index, 'price');
|
|
13625
|
+
}
|
|
13626
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13627
|
+
}
|
|
13628
|
+
}, {
|
|
13629
|
+
dataIndex: 'exchangePrice',
|
|
13630
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13631
|
+
align: 'center',
|
|
13632
|
+
ellipsis: true,
|
|
13633
|
+
width: 100
|
|
13634
|
+
}, {
|
|
13635
|
+
dataIndex: 'giftType',
|
|
13636
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13637
|
+
align: 'center',
|
|
13638
|
+
ellipsis: true,
|
|
13639
|
+
width: 100,
|
|
13640
|
+
render: function render(val) {
|
|
13641
|
+
var giftTypeMap = {
|
|
13642
|
+
0: '非赠品',
|
|
13643
|
+
1: '自动赠送',
|
|
13644
|
+
2: '手工赠送',
|
|
13645
|
+
3: '回购自动送赠品',
|
|
13646
|
+
4: '前N有礼送赠品',
|
|
13647
|
+
6: '天猫优仓赠品',
|
|
13648
|
+
7: '淘宝CRM会员送赠'
|
|
13649
|
+
};
|
|
13650
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13651
|
+
}
|
|
13652
|
+
}, {
|
|
13653
|
+
dataIndex: 'type',
|
|
13654
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13655
|
+
align: 'center',
|
|
13656
|
+
ellipsis: true,
|
|
13657
|
+
width: 100,
|
|
13658
|
+
render: function render(val, record, index) {
|
|
13659
|
+
var options = [{
|
|
13660
|
+
label: '单品',
|
|
13661
|
+
value: '1'
|
|
13662
|
+
}, {
|
|
13663
|
+
label: '组合装',
|
|
13664
|
+
value: '2'
|
|
13665
|
+
}];
|
|
13666
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13667
|
+
style: {
|
|
13668
|
+
width: 70
|
|
13669
|
+
},
|
|
13670
|
+
options: options,
|
|
13671
|
+
value: val,
|
|
13672
|
+
onChange: function onChange(value) {
|
|
13673
|
+
return updateHandle(value, index, 'type');
|
|
13674
|
+
}
|
|
13675
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13676
|
+
}
|
|
13677
|
+
}]
|
|
13678
|
+
};
|
|
13679
|
+
};
|
|
13680
|
+
|
|
13681
|
+
var getColumns$3 = function getColumns(_ref) {
|
|
13682
|
+
var _ref$text = _ref.text,
|
|
13683
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13684
|
+
disabled = _ref.disabled,
|
|
13685
|
+
updateHandle = _ref.updateHandle;
|
|
13686
|
+
return {
|
|
13687
|
+
//万里牛商品信息
|
|
13688
|
+
WLN_GOODS: [{
|
|
13689
|
+
dataIndex: 'skuName',
|
|
13690
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13691
|
+
align: 'center',
|
|
13692
|
+
ellipsis: true,
|
|
13693
|
+
width: 250
|
|
13694
|
+
}, {
|
|
13695
|
+
dataIndex: 'sku',
|
|
13696
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13697
|
+
align: 'center',
|
|
13698
|
+
ellipsis: true,
|
|
13699
|
+
width: 100
|
|
13700
|
+
}, {
|
|
13701
|
+
dataIndex: 'name',
|
|
13702
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13703
|
+
align: 'center',
|
|
13704
|
+
ellipsis: true,
|
|
13705
|
+
width: 250
|
|
13706
|
+
}, {
|
|
13707
|
+
dataIndex: 'pic',
|
|
13708
|
+
title: "\u56FE\u7247",
|
|
13709
|
+
align: 'center',
|
|
13710
|
+
ellipsis: true,
|
|
13711
|
+
width: 100,
|
|
13712
|
+
render: function render(val) {
|
|
13713
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
13714
|
+
width: 60,
|
|
13715
|
+
src: val
|
|
13716
|
+
});
|
|
13717
|
+
}
|
|
13718
|
+
}, {
|
|
13719
|
+
dataIndex: 'code',
|
|
13720
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13721
|
+
align: 'center',
|
|
13722
|
+
ellipsis: true,
|
|
13723
|
+
width: 100
|
|
13724
|
+
}, {
|
|
13725
|
+
dataIndex: 'money',
|
|
13726
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13727
|
+
align: 'center',
|
|
13728
|
+
ellipsis: true,
|
|
13729
|
+
width: 100
|
|
13730
|
+
}, {
|
|
13731
|
+
dataIndex: 'number',
|
|
13732
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13733
|
+
align: 'center',
|
|
13734
|
+
ellipsis: true,
|
|
13735
|
+
width: 100,
|
|
13736
|
+
render: function render(val, record, index) {
|
|
13737
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13738
|
+
style: {
|
|
13739
|
+
width: 70
|
|
13740
|
+
},
|
|
13741
|
+
value: val,
|
|
13742
|
+
min: 1,
|
|
13743
|
+
precision: 0,
|
|
13744
|
+
onChange: function onChange(num) {
|
|
13745
|
+
return updateHandle(num, index, 'number');
|
|
13746
|
+
}
|
|
13747
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13748
|
+
}
|
|
13749
|
+
}, {
|
|
13750
|
+
dataIndex: 'share',
|
|
13751
|
+
title: "\u5206\u644A\u4EF7",
|
|
13752
|
+
align: 'center',
|
|
13753
|
+
ellipsis: true,
|
|
13754
|
+
width: 70
|
|
13755
|
+
}, {
|
|
13756
|
+
dataIndex: 'type',
|
|
13757
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13758
|
+
align: 'center',
|
|
13759
|
+
ellipsis: true,
|
|
13760
|
+
width: 100
|
|
13761
|
+
}]
|
|
13762
|
+
};
|
|
13763
|
+
};
|
|
13764
|
+
|
|
13765
|
+
var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
13766
|
+
if (typeof value === 'number') return true;
|
|
13767
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
13768
|
+
return false;
|
|
13769
|
+
};
|
|
13770
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
13771
|
+
if (kmkfUtils.isNull(val)) return null;
|
|
13772
|
+
return val ? '是' : '否';
|
|
13773
|
+
};
|
|
13774
|
+
var getColumns$4 = function getColumns(_ref) {
|
|
13775
|
+
var _ref$text = _ref.text,
|
|
13776
|
+
disabled = _ref.disabled,
|
|
13777
|
+
updateHandle = _ref.updateHandle,
|
|
13778
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
13779
|
+
return {
|
|
13780
|
+
//管易商品信息
|
|
13781
|
+
GY_GOODS: [{
|
|
13782
|
+
dataIndex: 'goodName',
|
|
13783
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13784
|
+
width: 150
|
|
13785
|
+
}, {
|
|
13786
|
+
dataIndex: 'goodShortName',
|
|
13787
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13788
|
+
width: 150
|
|
13789
|
+
}, {
|
|
13790
|
+
dataIndex: 'goodNo',
|
|
13791
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13792
|
+
width: 200
|
|
13793
|
+
}, {
|
|
13794
|
+
dataIndex: 'specName',
|
|
13795
|
+
title: "SKU\u540D\u79F0",
|
|
13796
|
+
align: 'center',
|
|
13797
|
+
ellipsis: true,
|
|
13798
|
+
width: 250
|
|
13799
|
+
}, {
|
|
13800
|
+
dataIndex: 'specNo',
|
|
13801
|
+
title: "SKU\u7F16\u7801",
|
|
13802
|
+
align: 'center',
|
|
13803
|
+
ellipsis: true,
|
|
13804
|
+
width: 150
|
|
13805
|
+
}, {
|
|
13806
|
+
dataIndex: 'qty',
|
|
13807
|
+
title: "\u6570\u91CF",
|
|
13808
|
+
width: 100,
|
|
13809
|
+
render: function render(val, record, index) {
|
|
13810
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13811
|
+
style: {
|
|
13812
|
+
width: 70
|
|
13813
|
+
},
|
|
13814
|
+
value: val,
|
|
13815
|
+
min: 1,
|
|
13816
|
+
precision: 0,
|
|
13817
|
+
onChange: function onChange(num) {
|
|
13818
|
+
updateDataHandle({
|
|
13819
|
+
qty: num,
|
|
13820
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13821
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13822
|
+
}, index);
|
|
13823
|
+
}
|
|
13824
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13825
|
+
}
|
|
13826
|
+
}, {
|
|
13827
|
+
dataIndex: 'price',
|
|
13828
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13829
|
+
width: 150,
|
|
13830
|
+
render: function render(val, record, index) {
|
|
13831
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13832
|
+
style: {
|
|
13833
|
+
width: 130
|
|
13834
|
+
},
|
|
13835
|
+
value: val,
|
|
13836
|
+
min: 0,
|
|
13837
|
+
precision: 2,
|
|
13838
|
+
onChange: function onChange(num) {
|
|
13839
|
+
updateDataHandle({
|
|
13840
|
+
price: num,
|
|
13841
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13842
|
+
}, index);
|
|
13843
|
+
}
|
|
13844
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13845
|
+
}
|
|
13846
|
+
}, {
|
|
13847
|
+
dataIndex: 'amount',
|
|
13848
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13849
|
+
width: 150
|
|
13850
|
+
}, {
|
|
13851
|
+
dataIndex: 'originPrice',
|
|
13852
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13853
|
+
width: 150
|
|
13854
|
+
}, {
|
|
13855
|
+
dataIndex: 'originAmount',
|
|
13856
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13857
|
+
width: 150
|
|
13858
|
+
}, {
|
|
13859
|
+
dataIndex: 'discountFee',
|
|
13860
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
13861
|
+
width: 150
|
|
13862
|
+
}, {
|
|
13863
|
+
dataIndex: 'amountAfter',
|
|
13864
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
13865
|
+
width: 150
|
|
13866
|
+
}, {
|
|
13867
|
+
dataIndex: 'cancel',
|
|
13868
|
+
title: "\u662F\u5426\u53D6\u6D88",
|
|
13869
|
+
width: 150,
|
|
13870
|
+
render: function render(val) {
|
|
13871
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
13872
|
+
}
|
|
13873
|
+
}, {
|
|
13874
|
+
dataIndex: 'isGift',
|
|
13875
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13876
|
+
width: 150,
|
|
13877
|
+
render: function render(val, record, index) {
|
|
13878
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13879
|
+
value: val,
|
|
13880
|
+
onChange: function onChange(value) {
|
|
13881
|
+
updateHandle(value, index, 'isGift');
|
|
13882
|
+
},
|
|
13883
|
+
options: [{
|
|
13884
|
+
label: '是',
|
|
13885
|
+
value: 1
|
|
13886
|
+
}, {
|
|
13887
|
+
label: '否',
|
|
13888
|
+
value: 0
|
|
13889
|
+
}]
|
|
13890
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
13891
|
+
}
|
|
13892
|
+
}, {
|
|
13893
|
+
dataIndex: 'skuNote',
|
|
13894
|
+
title: "\u5546\u54C1\u5907\u6CE8",
|
|
13895
|
+
width: 150
|
|
13896
|
+
}].map(function (item) {
|
|
13897
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13898
|
+
align: 'center',
|
|
13899
|
+
ellipsis: true
|
|
13900
|
+
});
|
|
13901
|
+
}),
|
|
13902
|
+
//管易补发商品信息
|
|
13903
|
+
GY_REISSUE_GOODS: [{
|
|
13904
|
+
dataIndex: 'goodName',
|
|
13905
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13906
|
+
width: 150
|
|
13907
|
+
}, {
|
|
13908
|
+
dataIndex: 'goodShortName',
|
|
13909
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13910
|
+
width: 150
|
|
13911
|
+
}, {
|
|
13912
|
+
dataIndex: 'goodNo',
|
|
13913
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13914
|
+
width: 200
|
|
13915
|
+
}, {
|
|
13916
|
+
dataIndex: 'specName',
|
|
13917
|
+
title: "SKU\u540D\u79F0",
|
|
13918
|
+
align: 'center',
|
|
13919
|
+
ellipsis: true,
|
|
13920
|
+
width: 250
|
|
13921
|
+
}, {
|
|
13922
|
+
dataIndex: 'specNo',
|
|
13923
|
+
title: "SKU\u7F16\u7801",
|
|
13924
|
+
align: 'center',
|
|
13925
|
+
ellipsis: true,
|
|
13926
|
+
width: 150
|
|
13927
|
+
}, {
|
|
13928
|
+
dataIndex: 'qty',
|
|
13929
|
+
title: "\u6570\u91CF",
|
|
13930
|
+
width: 100,
|
|
13931
|
+
render: function render(val, record, index) {
|
|
13932
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13933
|
+
style: {
|
|
13934
|
+
width: 70
|
|
13935
|
+
},
|
|
13936
|
+
value: val,
|
|
13937
|
+
min: 1,
|
|
13938
|
+
precision: 0,
|
|
13939
|
+
onChange: function onChange(num) {
|
|
13940
|
+
updateDataHandle({
|
|
13941
|
+
qty: num,
|
|
13942
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13943
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13944
|
+
}, index);
|
|
13945
|
+
}
|
|
13946
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13947
|
+
}
|
|
13948
|
+
}, {
|
|
13949
|
+
dataIndex: 'price',
|
|
13950
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13951
|
+
width: 150,
|
|
13952
|
+
render: function render(val, record, index) {
|
|
13953
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13954
|
+
style: {
|
|
13955
|
+
width: 130
|
|
13956
|
+
},
|
|
13957
|
+
value: val,
|
|
13958
|
+
min: 0,
|
|
13959
|
+
precision: 2,
|
|
13960
|
+
onChange: function onChange(num) {
|
|
13961
|
+
updateDataHandle({
|
|
13962
|
+
price: num,
|
|
13963
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13964
|
+
}, index);
|
|
13965
|
+
}
|
|
13966
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13967
|
+
}
|
|
13968
|
+
}, {
|
|
13969
|
+
dataIndex: 'amount',
|
|
13970
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13971
|
+
width: 150
|
|
13972
|
+
}, {
|
|
13973
|
+
dataIndex: 'originPrice',
|
|
13974
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13975
|
+
width: 150
|
|
13976
|
+
}, {
|
|
13977
|
+
dataIndex: 'originAmount',
|
|
13978
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13979
|
+
width: 150
|
|
13980
|
+
}, {
|
|
13981
|
+
dataIndex: 'isGift',
|
|
13982
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13983
|
+
width: 150,
|
|
13984
|
+
render: function render(val, record, index) {
|
|
13985
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13986
|
+
value: val,
|
|
13987
|
+
onChange: function onChange(value) {
|
|
13988
|
+
updateHandle(value, index, 'isGift');
|
|
13989
|
+
},
|
|
13990
|
+
options: [{
|
|
13991
|
+
label: '是',
|
|
13992
|
+
value: 1
|
|
13993
|
+
}, {
|
|
13994
|
+
label: '否',
|
|
13995
|
+
value: 0
|
|
13996
|
+
}]
|
|
13997
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
13998
|
+
}
|
|
13999
|
+
}].map(function (item) {
|
|
14000
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14001
|
+
align: 'center',
|
|
14002
|
+
ellipsis: true
|
|
14003
|
+
});
|
|
14004
|
+
})
|
|
14005
|
+
};
|
|
14006
|
+
};
|
|
14007
|
+
|
|
14008
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
14009
|
+
var _ref$text = _ref.text,
|
|
14010
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14011
|
+
disabled = _ref.disabled,
|
|
14012
|
+
updateHandle = _ref.updateHandle;
|
|
14013
|
+
return {
|
|
14014
|
+
//bs商品信息
|
|
14015
|
+
default: [{
|
|
14016
|
+
dataIndex: 'mark',
|
|
14017
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
14018
|
+
align: 'center',
|
|
14019
|
+
ellipsis: true,
|
|
14020
|
+
width: 70,
|
|
14021
|
+
render: function render(val, record, index) {
|
|
14022
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14023
|
+
options: [{
|
|
14024
|
+
label: '是',
|
|
14025
|
+
value: '是'
|
|
14026
|
+
}, {
|
|
14027
|
+
label: '否',
|
|
14028
|
+
value: '否'
|
|
14029
|
+
}],
|
|
14030
|
+
disabled: disabled,
|
|
14031
|
+
value: val,
|
|
14032
|
+
onChange: function onChange(val) {
|
|
14033
|
+
return updateHandle(val, index, 'mark');
|
|
14034
|
+
}
|
|
14035
|
+
});
|
|
14036
|
+
}
|
|
14037
|
+
}, {
|
|
14038
|
+
dataIndex: 'skuName',
|
|
14039
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
14040
|
+
align: 'center',
|
|
14041
|
+
ellipsis: true,
|
|
14042
|
+
width: 250
|
|
14043
|
+
}, {
|
|
14044
|
+
dataIndex: 'sku',
|
|
14045
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
14046
|
+
align: 'center',
|
|
14047
|
+
ellipsis: true,
|
|
14048
|
+
width: 100
|
|
14049
|
+
}, {
|
|
14050
|
+
dataIndex: 'name',
|
|
14051
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
14052
|
+
align: 'center',
|
|
14053
|
+
ellipsis: true,
|
|
14054
|
+
width: 250
|
|
14055
|
+
}, {
|
|
14056
|
+
dataIndex: 'pic',
|
|
14057
|
+
title: "\u56FE\u7247",
|
|
14058
|
+
align: 'center',
|
|
14059
|
+
ellipsis: true,
|
|
14060
|
+
width: 100,
|
|
14061
|
+
render: function render(val) {
|
|
14062
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
14063
|
+
width: 60,
|
|
14064
|
+
src: val
|
|
14065
|
+
});
|
|
14066
|
+
}
|
|
14067
|
+
}, {
|
|
14068
|
+
dataIndex: 'code',
|
|
14069
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
14070
|
+
align: 'center',
|
|
14071
|
+
ellipsis: true,
|
|
14072
|
+
width: 100
|
|
14073
|
+
}, {
|
|
14074
|
+
dataIndex: 'money',
|
|
14075
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
14076
|
+
align: 'center',
|
|
14077
|
+
ellipsis: true,
|
|
14078
|
+
width: 100
|
|
14079
|
+
}, {
|
|
14080
|
+
dataIndex: 'number',
|
|
14081
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
14082
|
+
align: 'center',
|
|
14083
|
+
ellipsis: true,
|
|
14084
|
+
width: 100,
|
|
14085
|
+
render: function render(val, record, index) {
|
|
14086
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14087
|
+
style: {
|
|
14088
|
+
width: 70
|
|
14089
|
+
},
|
|
14090
|
+
value: val,
|
|
14091
|
+
min: 1,
|
|
14092
|
+
precision: 0,
|
|
14093
|
+
onChange: function onChange(num) {
|
|
14094
|
+
return updateHandle(num, index, 'number');
|
|
14095
|
+
}
|
|
14096
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14097
|
+
}
|
|
14098
|
+
}, {
|
|
14099
|
+
dataIndex: 'share',
|
|
14100
|
+
title: "\u5206\u644A\u4EF7",
|
|
14101
|
+
align: 'center',
|
|
14102
|
+
ellipsis: true,
|
|
14103
|
+
width: 70
|
|
14104
|
+
}, {
|
|
14105
|
+
dataIndex: 'type',
|
|
14106
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
14107
|
+
align: 'center',
|
|
14108
|
+
ellipsis: true,
|
|
14109
|
+
width: 100
|
|
14110
|
+
}]
|
|
14111
|
+
};
|
|
14112
|
+
};
|
|
14113
|
+
|
|
14114
|
+
var getColumnsMap = function getColumnsMap(args) {
|
|
14115
|
+
var _ref = args || {},
|
|
14116
|
+
_ref$text = _ref.text,
|
|
14117
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14118
|
+
disabled = _ref.disabled,
|
|
14119
|
+
updateHandle = _ref.updateHandle,
|
|
14120
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
14121
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14122
|
+
text: text,
|
|
14123
|
+
disabled: disabled,
|
|
14124
|
+
updateHandle: updateHandle
|
|
14125
|
+
})), getColumns({
|
|
14126
|
+
text: text,
|
|
14127
|
+
disabled: disabled,
|
|
14128
|
+
updateHandle: updateHandle
|
|
14129
|
+
})), getColumns$2({
|
|
14130
|
+
text: text,
|
|
14131
|
+
disabled: disabled,
|
|
14132
|
+
updateHandle: updateHandle
|
|
14133
|
+
})), getColumns$3({
|
|
14134
|
+
text: text,
|
|
14135
|
+
disabled: disabled,
|
|
14136
|
+
updateHandle: updateHandle
|
|
14137
|
+
})), getColumns$4({
|
|
14138
|
+
text: text,
|
|
14139
|
+
disabled: disabled,
|
|
14140
|
+
updateHandle: updateHandle,
|
|
14141
|
+
updateDataHandle: updateDataHandle
|
|
14142
|
+
})), {}, {
|
|
14143
|
+
default: getColumns$5({
|
|
14144
|
+
text: text,
|
|
14145
|
+
disabled: disabled,
|
|
14146
|
+
updateHandle: updateHandle
|
|
14147
|
+
})['default']
|
|
14148
|
+
});
|
|
14149
|
+
};
|
|
14150
|
+
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
14151
|
+
var clone_columnsMap = lodash.cloneDeep(getColumnsMap());
|
|
14152
|
+
var newColumns = {};
|
|
14153
|
+
Object.keys(clone_columnsMap).forEach(function (key) {
|
|
14154
|
+
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
14155
|
+
return {
|
|
14156
|
+
title: col.title,
|
|
14157
|
+
dataIndex: col.dataIndex
|
|
14158
|
+
};
|
|
14159
|
+
});
|
|
14160
|
+
});
|
|
14161
|
+
return newColumns;
|
|
14162
|
+
};
|
|
14163
|
+
var columnsBaseInfoMap = getColumnsBaseInfo();
|
|
14164
|
+
|
|
12632
14165
|
var renderFieldMap$1 = {
|
|
12633
|
-
|
|
14166
|
+
goodsNumber: function goodsNumber(_ref) {
|
|
12634
14167
|
var disabled = _ref.disabled,
|
|
12635
14168
|
updateHandle = _ref.updateHandle;
|
|
12636
14169
|
return function (val, record, index) {
|
|
@@ -12642,33 +14175,59 @@ var renderFieldMap$1 = {
|
|
|
12642
14175
|
min: 1,
|
|
12643
14176
|
precision: 0,
|
|
12644
14177
|
onChange: function onChange(num) {
|
|
12645
|
-
return updateHandle(num, index, '
|
|
14178
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12646
14179
|
}
|
|
12647
14180
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12648
14181
|
};
|
|
12649
14182
|
},
|
|
12650
|
-
|
|
14183
|
+
goodsPrice: function goodsPrice(_ref2) {
|
|
12651
14184
|
var disabled = _ref2.disabled,
|
|
12652
14185
|
updateHandle = _ref2.updateHandle;
|
|
12653
|
-
return function (val) {
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
14186
|
+
return function (val, record, index) {
|
|
14187
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
14188
|
+
style: {
|
|
14189
|
+
width: 70
|
|
14190
|
+
},
|
|
14191
|
+
value: val,
|
|
14192
|
+
min: 0,
|
|
14193
|
+
onChange: function onChange(value) {
|
|
14194
|
+
return updateHandle(value, index, 'goodsPrice');
|
|
14195
|
+
}
|
|
14196
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
14197
|
+
};
|
|
14198
|
+
},
|
|
14199
|
+
isGift: function isGift(_ref3) {
|
|
14200
|
+
var disabled = _ref3.disabled,
|
|
14201
|
+
updateHandle = _ref3.updateHandle;
|
|
14202
|
+
return function (val, record, index) {
|
|
14203
|
+
var options = [{
|
|
14204
|
+
label: '是',
|
|
14205
|
+
value: 1
|
|
14206
|
+
}, {
|
|
14207
|
+
label: '否',
|
|
14208
|
+
value: 0
|
|
14209
|
+
}];
|
|
14210
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14211
|
+
style: {
|
|
14212
|
+
width: 70
|
|
14213
|
+
},
|
|
14214
|
+
options: options,
|
|
14215
|
+
value: val,
|
|
14216
|
+
onChange: function onChange(value) {
|
|
14217
|
+
return updateHandle(value, index, 'isGift');
|
|
14218
|
+
},
|
|
14219
|
+
getPopupContainer: function getPopupContainer() {
|
|
14220
|
+
return document.getElementById('bsE3ReissueGoods');
|
|
14221
|
+
}
|
|
14222
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, +val ? '是' : '否');
|
|
12664
14223
|
};
|
|
12665
14224
|
}
|
|
12666
14225
|
};
|
|
12667
|
-
var
|
|
12668
|
-
var disabled =
|
|
12669
|
-
updateHandle =
|
|
12670
|
-
operate =
|
|
12671
|
-
return
|
|
14226
|
+
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
14227
|
+
var disabled = _ref4.disabled,
|
|
14228
|
+
updateHandle = _ref4.updateHandle,
|
|
14229
|
+
operate = _ref4.operate;
|
|
14230
|
+
return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
|
|
12672
14231
|
var newItem = _objectSpread2({
|
|
12673
14232
|
align: 'center',
|
|
12674
14233
|
ellipsis: true
|
|
@@ -12685,6 +14244,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
|
|
|
12685
14244
|
});
|
|
12686
14245
|
};
|
|
12687
14246
|
|
|
14247
|
+
var MAIN_FIELD = 'uuid';
|
|
12688
14248
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12689
14249
|
var columns = _ref.columns,
|
|
12690
14250
|
dataSource = _ref.dataSource,
|
|
@@ -12700,11 +14260,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12700
14260
|
var closeModal = function closeModal() {
|
|
12701
14261
|
return setTradeGoodsVisible(false);
|
|
12702
14262
|
};
|
|
14263
|
+
var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
14264
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
14265
|
+
}), selectedRowKeys);
|
|
14266
|
+
var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
14267
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
14268
|
+
}));
|
|
14269
|
+
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
14270
|
+
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
14271
|
+
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
14272
|
+
};
|
|
12703
14273
|
var rowSelection = {
|
|
12704
14274
|
selectedRowKeys: selectedRowKeys,
|
|
12705
|
-
onChange:
|
|
14275
|
+
onChange: handleChangeSelectedKeys
|
|
12706
14276
|
};
|
|
12707
|
-
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12708
14277
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12709
14278
|
type: "link",
|
|
12710
14279
|
onClick: openModal
|
|
@@ -12714,7 +14283,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12714
14283
|
footer: null,
|
|
12715
14284
|
onCancel: closeModal
|
|
12716
14285
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12717
|
-
rowKey:
|
|
14286
|
+
rowKey: MAIN_FIELD,
|
|
12718
14287
|
rowSelection: rowSelection,
|
|
12719
14288
|
columns: columns,
|
|
12720
14289
|
dataSource: dataSource,
|
|
@@ -12723,7 +14292,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12723
14292
|
x: 500,
|
|
12724
14293
|
y: 500
|
|
12725
14294
|
}
|
|
12726
|
-
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(",
|
|
14295
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12727
14296
|
};
|
|
12728
14297
|
var getButtonText = function getButtonText() {
|
|
12729
14298
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -12733,6 +14302,9 @@ var getButtonText = function getButtonText() {
|
|
|
12733
14302
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12734
14303
|
return '选择旺店通商品';
|
|
12735
14304
|
}
|
|
14305
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14306
|
+
return '选择管易ERP商品';
|
|
14307
|
+
}
|
|
12736
14308
|
return '选择商品';
|
|
12737
14309
|
};
|
|
12738
14310
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -12790,7 +14362,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12790
14362
|
// TODO: 商品订单中以选中商品
|
|
12791
14363
|
var selectedGoods = React.useMemo(function () {
|
|
12792
14364
|
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12793
|
-
return v
|
|
14365
|
+
return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
|
|
12794
14366
|
});
|
|
12795
14367
|
}, [value]);
|
|
12796
14368
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
@@ -12824,515 +14396,42 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12824
14396
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
12825
14397
|
}
|
|
12826
14398
|
};
|
|
14399
|
+
var updateDataHandle = function updateDataHandle(data, index) {
|
|
14400
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
14401
|
+
value[index] = _objectSpread2(_objectSpread2({}, value[index]), data);
|
|
14402
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
14403
|
+
}
|
|
14404
|
+
};
|
|
12827
14405
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12828
14406
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12829
14407
|
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12830
14408
|
return function (type) {
|
|
12831
14409
|
var columns = [];
|
|
12832
14410
|
switch (type) {
|
|
12833
|
-
case 'WDT_REISSUE_GOODS':
|
|
12834
|
-
{
|
|
12835
|
-
columns = getWdtReissueGoodColumns({
|
|
12836
|
-
disabled: disabled,
|
|
12837
|
-
updateHandle: updateHandle,
|
|
12838
|
-
operate: operate
|
|
12839
|
-
});
|
|
12840
|
-
}
|
|
12841
|
-
break;
|
|
12842
14411
|
case 'WDT_GOODS':
|
|
12843
|
-
columns = [{
|
|
12844
|
-
dataIndex: 'goodId',
|
|
12845
|
-
title: "\u5546\u54C1ID",
|
|
12846
|
-
align: 'center',
|
|
12847
|
-
ellipsis: true,
|
|
12848
|
-
width: 70
|
|
12849
|
-
}, {
|
|
12850
|
-
dataIndex: 'goodNo',
|
|
12851
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12852
|
-
align: 'center',
|
|
12853
|
-
ellipsis: true,
|
|
12854
|
-
width: 180
|
|
12855
|
-
}, {
|
|
12856
|
-
dataIndex: 'goodName',
|
|
12857
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12858
|
-
align: 'center',
|
|
12859
|
-
ellipsis: true,
|
|
12860
|
-
width: 250
|
|
12861
|
-
}, {
|
|
12862
|
-
dataIndex: 'specId',
|
|
12863
|
-
title: "".concat(text, "SKUID"),
|
|
12864
|
-
align: 'center',
|
|
12865
|
-
ellipsis: true,
|
|
12866
|
-
width: 100
|
|
12867
|
-
}, {
|
|
12868
|
-
dataIndex: 'specNo',
|
|
12869
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12870
|
-
align: 'center',
|
|
12871
|
-
ellipsis: true,
|
|
12872
|
-
width: 180
|
|
12873
|
-
}, {
|
|
12874
|
-
dataIndex: 'specName',
|
|
12875
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12876
|
-
align: 'center',
|
|
12877
|
-
ellipsis: true,
|
|
12878
|
-
width: 250
|
|
12879
|
-
}, {
|
|
12880
|
-
dataIndex: 'orderPrice',
|
|
12881
|
-
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12882
|
-
align: 'center',
|
|
12883
|
-
ellipsis: true,
|
|
12884
|
-
width: 100
|
|
12885
|
-
}, {
|
|
12886
|
-
dataIndex: 'num',
|
|
12887
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
12888
|
-
align: 'center',
|
|
12889
|
-
ellipsis: true,
|
|
12890
|
-
width: 100,
|
|
12891
|
-
render: function render(val, record, index) {
|
|
12892
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12893
|
-
style: {
|
|
12894
|
-
width: 70
|
|
12895
|
-
},
|
|
12896
|
-
value: val,
|
|
12897
|
-
min: 1,
|
|
12898
|
-
precision: 0,
|
|
12899
|
-
onChange: function onChange(num) {
|
|
12900
|
-
return updateHandle(num, index, 'num');
|
|
12901
|
-
}
|
|
12902
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12903
|
-
}
|
|
12904
|
-
},
|
|
12905
|
-
// {
|
|
12906
|
-
// dataIndex: 'actualNum',
|
|
12907
|
-
// title: `${text}实发数量`,
|
|
12908
|
-
// align: 'center',
|
|
12909
|
-
// ellipsis: true,
|
|
12910
|
-
// width: 100,
|
|
12911
|
-
// },
|
|
12912
|
-
{
|
|
12913
|
-
dataIndex: 'sharePrice',
|
|
12914
|
-
title: "\u5206\u644A\u4EF7",
|
|
12915
|
-
align: 'center',
|
|
12916
|
-
ellipsis: true,
|
|
12917
|
-
width: 70
|
|
12918
|
-
}, {
|
|
12919
|
-
dataIndex: 'giftType',
|
|
12920
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12921
|
-
align: 'center',
|
|
12922
|
-
ellipsis: true,
|
|
12923
|
-
width: 100,
|
|
12924
|
-
render: function render(val) {
|
|
12925
|
-
var giftTypeMap = {
|
|
12926
|
-
0: '非赠品',
|
|
12927
|
-
1: '自动赠送',
|
|
12928
|
-
2: '手工赠送',
|
|
12929
|
-
3: '回购自动送赠品',
|
|
12930
|
-
4: '前N有礼送赠品',
|
|
12931
|
-
6: '天猫优仓赠品',
|
|
12932
|
-
7: '淘宝CRM会员送赠'
|
|
12933
|
-
};
|
|
12934
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12935
|
-
}
|
|
12936
|
-
}];
|
|
12937
|
-
break;
|
|
12938
14412
|
case 'WDT_RETURN_GOODS':
|
|
12939
|
-
{
|
|
12940
|
-
columns = [{
|
|
12941
|
-
dataIndex: 'goodId',
|
|
12942
|
-
title: "\u5546\u54C1ID",
|
|
12943
|
-
align: 'center',
|
|
12944
|
-
ellipsis: true,
|
|
12945
|
-
width: 70
|
|
12946
|
-
}, {
|
|
12947
|
-
dataIndex: 'goodNo',
|
|
12948
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12949
|
-
align: 'center',
|
|
12950
|
-
ellipsis: true,
|
|
12951
|
-
width: 180
|
|
12952
|
-
}, {
|
|
12953
|
-
dataIndex: 'goodName',
|
|
12954
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12955
|
-
align: 'center',
|
|
12956
|
-
ellipsis: true,
|
|
12957
|
-
width: 250
|
|
12958
|
-
}, {
|
|
12959
|
-
dataIndex: 'specId',
|
|
12960
|
-
title: "".concat(text, "SKUID"),
|
|
12961
|
-
align: 'center',
|
|
12962
|
-
ellipsis: true,
|
|
12963
|
-
width: 100
|
|
12964
|
-
}, {
|
|
12965
|
-
dataIndex: 'specNo',
|
|
12966
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12967
|
-
align: 'center',
|
|
12968
|
-
ellipsis: true,
|
|
12969
|
-
width: 180
|
|
12970
|
-
}, {
|
|
12971
|
-
dataIndex: 'specName',
|
|
12972
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12973
|
-
align: 'center',
|
|
12974
|
-
ellipsis: true,
|
|
12975
|
-
width: 250
|
|
12976
|
-
}, {
|
|
12977
|
-
dataIndex: 'num',
|
|
12978
|
-
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
12979
|
-
align: 'center',
|
|
12980
|
-
ellipsis: true,
|
|
12981
|
-
width: 100,
|
|
12982
|
-
render: function render(val, record, index) {
|
|
12983
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12984
|
-
style: {
|
|
12985
|
-
width: 70
|
|
12986
|
-
},
|
|
12987
|
-
value: val,
|
|
12988
|
-
min: 1,
|
|
12989
|
-
precision: 0,
|
|
12990
|
-
onChange: function onChange(num) {
|
|
12991
|
-
return updateHandle(num, index, 'num');
|
|
12992
|
-
}
|
|
12993
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12994
|
-
}
|
|
12995
|
-
}, {
|
|
12996
|
-
dataIndex: 'sharePrice',
|
|
12997
|
-
title: "\u5206\u644A\u4EF7",
|
|
12998
|
-
align: 'center',
|
|
12999
|
-
ellipsis: true,
|
|
13000
|
-
width: 80,
|
|
13001
|
-
render: function render(val, record, index) {
|
|
13002
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13003
|
-
style: {
|
|
13004
|
-
width: 70
|
|
13005
|
-
},
|
|
13006
|
-
value: val,
|
|
13007
|
-
min: 0,
|
|
13008
|
-
onChange: function onChange(value) {
|
|
13009
|
-
return updateHandle(value, index, 'sharePrice');
|
|
13010
|
-
}
|
|
13011
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13012
|
-
}
|
|
13013
|
-
}, {
|
|
13014
|
-
dataIndex: 'returnPrice',
|
|
13015
|
-
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13016
|
-
align: 'center',
|
|
13017
|
-
ellipsis: true,
|
|
13018
|
-
width: 100
|
|
13019
|
-
}, {
|
|
13020
|
-
dataIndex: 'giftType',
|
|
13021
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13022
|
-
align: 'center',
|
|
13023
|
-
ellipsis: true,
|
|
13024
|
-
width: 100,
|
|
13025
|
-
render: function render(val) {
|
|
13026
|
-
var giftTypeMap = {
|
|
13027
|
-
0: '非赠品',
|
|
13028
|
-
1: '自动赠送',
|
|
13029
|
-
2: '手工赠送',
|
|
13030
|
-
3: '回购自动送赠品',
|
|
13031
|
-
4: '前N有礼送赠品',
|
|
13032
|
-
6: '天猫优仓赠品',
|
|
13033
|
-
7: '淘宝CRM会员送赠'
|
|
13034
|
-
};
|
|
13035
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13036
|
-
}
|
|
13037
|
-
}, {
|
|
13038
|
-
dataIndex: 'type',
|
|
13039
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13040
|
-
align: 'center',
|
|
13041
|
-
ellipsis: true,
|
|
13042
|
-
width: 100,
|
|
13043
|
-
render: function render(val, record, index) {
|
|
13044
|
-
var options = [{
|
|
13045
|
-
label: '单品',
|
|
13046
|
-
value: '1'
|
|
13047
|
-
}, {
|
|
13048
|
-
label: '组合装',
|
|
13049
|
-
value: '2'
|
|
13050
|
-
}];
|
|
13051
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13052
|
-
style: {
|
|
13053
|
-
width: 70
|
|
13054
|
-
},
|
|
13055
|
-
options: options,
|
|
13056
|
-
value: val,
|
|
13057
|
-
onChange: function onChange(value) {
|
|
13058
|
-
return updateHandle(value, index, 'type');
|
|
13059
|
-
}
|
|
13060
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13061
|
-
}
|
|
13062
|
-
}];
|
|
13063
|
-
}
|
|
13064
|
-
break;
|
|
13065
14413
|
case 'WDT_EXCHANGE_GOODS':
|
|
14414
|
+
case 'BS_E3_GOODS':
|
|
14415
|
+
case 'BS_GOODS':
|
|
14416
|
+
case 'WLN_GOODS':
|
|
14417
|
+
case 'GY_GOODS':
|
|
14418
|
+
case 'GY_REISSUE_GOODS':
|
|
13066
14419
|
{
|
|
13067
|
-
columns =
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
}, {
|
|
13074
|
-
dataIndex: 'goodNo',
|
|
13075
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
13076
|
-
align: 'center',
|
|
13077
|
-
ellipsis: true,
|
|
13078
|
-
width: 180
|
|
13079
|
-
}, {
|
|
13080
|
-
dataIndex: 'goodName',
|
|
13081
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13082
|
-
align: 'center',
|
|
13083
|
-
ellipsis: true,
|
|
13084
|
-
width: 250
|
|
13085
|
-
}, {
|
|
13086
|
-
dataIndex: 'specId',
|
|
13087
|
-
title: "".concat(text, "SKUID"),
|
|
13088
|
-
align: 'center',
|
|
13089
|
-
ellipsis: true,
|
|
13090
|
-
width: 100
|
|
13091
|
-
}, {
|
|
13092
|
-
dataIndex: 'specNo',
|
|
13093
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13094
|
-
align: 'center',
|
|
13095
|
-
ellipsis: true,
|
|
13096
|
-
width: 180
|
|
13097
|
-
}, {
|
|
13098
|
-
dataIndex: 'specName',
|
|
13099
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13100
|
-
align: 'center',
|
|
13101
|
-
ellipsis: true,
|
|
13102
|
-
width: 250
|
|
13103
|
-
}, {
|
|
13104
|
-
dataIndex: 'num',
|
|
13105
|
-
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13106
|
-
align: 'center',
|
|
13107
|
-
ellipsis: true,
|
|
13108
|
-
width: 100,
|
|
13109
|
-
render: function render(val, record, index) {
|
|
13110
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13111
|
-
style: {
|
|
13112
|
-
width: 70
|
|
13113
|
-
},
|
|
13114
|
-
value: val,
|
|
13115
|
-
min: 1,
|
|
13116
|
-
precision: 0,
|
|
13117
|
-
onChange: function onChange(num) {
|
|
13118
|
-
return updateHandle(num, index, 'num');
|
|
13119
|
-
}
|
|
13120
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13121
|
-
}
|
|
13122
|
-
}, {
|
|
13123
|
-
dataIndex: 'price',
|
|
13124
|
-
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13125
|
-
align: 'center',
|
|
13126
|
-
ellipsis: true,
|
|
13127
|
-
width: 100,
|
|
13128
|
-
render: function render(val, record, index) {
|
|
13129
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13130
|
-
style: {
|
|
13131
|
-
width: 70
|
|
13132
|
-
},
|
|
13133
|
-
value: val,
|
|
13134
|
-
min: 0,
|
|
13135
|
-
onChange: function onChange(value) {
|
|
13136
|
-
return updateHandle(value, index, 'price');
|
|
13137
|
-
}
|
|
13138
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13139
|
-
}
|
|
13140
|
-
}, {
|
|
13141
|
-
dataIndex: 'exchangePrice',
|
|
13142
|
-
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13143
|
-
align: 'center',
|
|
13144
|
-
ellipsis: true,
|
|
13145
|
-
width: 100
|
|
13146
|
-
}, {
|
|
13147
|
-
dataIndex: 'giftType',
|
|
13148
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13149
|
-
align: 'center',
|
|
13150
|
-
ellipsis: true,
|
|
13151
|
-
width: 100,
|
|
13152
|
-
render: function render(val) {
|
|
13153
|
-
var giftTypeMap = {
|
|
13154
|
-
0: '非赠品',
|
|
13155
|
-
1: '自动赠送',
|
|
13156
|
-
2: '手工赠送',
|
|
13157
|
-
3: '回购自动送赠品',
|
|
13158
|
-
4: '前N有礼送赠品',
|
|
13159
|
-
6: '天猫优仓赠品',
|
|
13160
|
-
7: '淘宝CRM会员送赠'
|
|
13161
|
-
};
|
|
13162
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
13163
|
-
}
|
|
13164
|
-
}, {
|
|
13165
|
-
dataIndex: 'type',
|
|
13166
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13167
|
-
align: 'center',
|
|
13168
|
-
ellipsis: true,
|
|
13169
|
-
width: 100,
|
|
13170
|
-
render: function render(val, record, index) {
|
|
13171
|
-
var options = [{
|
|
13172
|
-
label: '单品',
|
|
13173
|
-
value: '1'
|
|
13174
|
-
}, {
|
|
13175
|
-
label: '组合装',
|
|
13176
|
-
value: '2'
|
|
13177
|
-
}];
|
|
13178
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13179
|
-
style: {
|
|
13180
|
-
width: 70
|
|
13181
|
-
},
|
|
13182
|
-
options: options,
|
|
13183
|
-
value: val,
|
|
13184
|
-
onChange: function onChange(value) {
|
|
13185
|
-
return updateHandle(value, index, 'type');
|
|
13186
|
-
}
|
|
13187
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13188
|
-
}
|
|
13189
|
-
}];
|
|
14420
|
+
columns = getColumnsMap({
|
|
14421
|
+
text: text,
|
|
14422
|
+
disabled: disabled,
|
|
14423
|
+
updateHandle: updateHandle,
|
|
14424
|
+
updateDataHandle: updateDataHandle
|
|
14425
|
+
})[type];
|
|
13190
14426
|
}
|
|
13191
14427
|
break;
|
|
13192
|
-
case '
|
|
14428
|
+
case 'WDT_REISSUE_GOODS':
|
|
13193
14429
|
{
|
|
13194
|
-
columns =
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
width: 150
|
|
13200
|
-
}, {
|
|
13201
|
-
dataIndex: 'skuId',
|
|
13202
|
-
title: "SKU ID",
|
|
13203
|
-
align: 'center',
|
|
13204
|
-
ellipsis: true,
|
|
13205
|
-
width: 150
|
|
13206
|
-
}, {
|
|
13207
|
-
dataIndex: 'goodsName',
|
|
13208
|
-
title: "\u5546\u54C1\u540D\u79F0",
|
|
13209
|
-
align: 'center',
|
|
13210
|
-
ellipsis: true,
|
|
13211
|
-
width: 150
|
|
13212
|
-
}, {
|
|
13213
|
-
dataIndex: 'goodsShortName',
|
|
13214
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13215
|
-
align: 'center',
|
|
13216
|
-
ellipsis: true,
|
|
13217
|
-
width: 100
|
|
13218
|
-
}, {
|
|
13219
|
-
dataIndex: 'picPath',
|
|
13220
|
-
title: "\u5546\u54C1\u56FE\u7247",
|
|
13221
|
-
align: 'center',
|
|
13222
|
-
ellipsis: true,
|
|
13223
|
-
width: 100,
|
|
13224
|
-
render: function render(val) {
|
|
13225
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
13226
|
-
width: 60,
|
|
13227
|
-
src: val
|
|
13228
|
-
});
|
|
13229
|
-
}
|
|
13230
|
-
}, {
|
|
13231
|
-
dataIndex: 'goodsSn',
|
|
13232
|
-
title: "\u8D27\u53F7",
|
|
13233
|
-
align: 'center',
|
|
13234
|
-
ellipsis: true,
|
|
13235
|
-
width: 150
|
|
13236
|
-
}, {
|
|
13237
|
-
dataIndex: 'goodsId',
|
|
13238
|
-
title: "\u8D27\u53F7ID",
|
|
13239
|
-
align: 'center',
|
|
13240
|
-
ellipsis: true,
|
|
13241
|
-
width: 150
|
|
13242
|
-
}, {
|
|
13243
|
-
dataIndex: 'colorName',
|
|
13244
|
-
title: "\u989C\u8272\u540D\u79F0",
|
|
13245
|
-
align: 'center',
|
|
13246
|
-
ellipsis: true,
|
|
13247
|
-
width: 100
|
|
13248
|
-
}, {
|
|
13249
|
-
dataIndex: 'colorCode',
|
|
13250
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
13251
|
-
align: 'center',
|
|
13252
|
-
ellipsis: true,
|
|
13253
|
-
width: 150
|
|
13254
|
-
}, {
|
|
13255
|
-
dataIndex: 'sizeName',
|
|
13256
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13257
|
-
align: 'center',
|
|
13258
|
-
ellipsis: true,
|
|
13259
|
-
width: 100
|
|
13260
|
-
}, {
|
|
13261
|
-
dataIndex: 'sizeCode',
|
|
13262
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13263
|
-
align: 'center',
|
|
13264
|
-
ellipsis: true,
|
|
13265
|
-
width: 100
|
|
13266
|
-
}, {
|
|
13267
|
-
dataIndex: 'brandName',
|
|
13268
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
13269
|
-
align: 'center',
|
|
13270
|
-
ellipsis: true,
|
|
13271
|
-
width: 150
|
|
13272
|
-
}, {
|
|
13273
|
-
dataIndex: 'goodsNumber',
|
|
13274
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
13275
|
-
align: 'center',
|
|
13276
|
-
ellipsis: true,
|
|
13277
|
-
width: 100
|
|
13278
|
-
}, {
|
|
13279
|
-
dataIndex: 'goodsPrice',
|
|
13280
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13281
|
-
align: 'center',
|
|
13282
|
-
ellipsis: true,
|
|
13283
|
-
width: 120
|
|
13284
|
-
}, {
|
|
13285
|
-
dataIndex: 'shopPrice',
|
|
13286
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13287
|
-
align: 'center',
|
|
13288
|
-
ellipsis: true,
|
|
13289
|
-
width: 120
|
|
13290
|
-
}, {
|
|
13291
|
-
dataIndex: 'sharePrice',
|
|
13292
|
-
title: "\u5206\u644A\u4EF7",
|
|
13293
|
-
align: 'center',
|
|
13294
|
-
ellipsis: true,
|
|
13295
|
-
width: 120
|
|
13296
|
-
}, {
|
|
13297
|
-
dataIndex: 'sharePayment',
|
|
13298
|
-
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13299
|
-
align: 'center',
|
|
13300
|
-
ellipsis: true,
|
|
13301
|
-
width: 120
|
|
13302
|
-
}, {
|
|
13303
|
-
dataIndex: 'payment',
|
|
13304
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13305
|
-
align: 'center',
|
|
13306
|
-
ellipsis: true,
|
|
13307
|
-
width: 120
|
|
13308
|
-
}, {
|
|
13309
|
-
dataIndex: 'tcSku',
|
|
13310
|
-
title: "\u5957\u9910SKU",
|
|
13311
|
-
align: 'center',
|
|
13312
|
-
ellipsis: true,
|
|
13313
|
-
width: 150
|
|
13314
|
-
}, {
|
|
13315
|
-
dataIndex: 'tcGoodsNumber',
|
|
13316
|
-
title: "\u5957\u9910\u5957\u6570",
|
|
13317
|
-
align: 'center',
|
|
13318
|
-
ellipsis: true,
|
|
13319
|
-
width: 100
|
|
13320
|
-
}, {
|
|
13321
|
-
dataIndex: 'taoCanSingleSl',
|
|
13322
|
-
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13323
|
-
align: 'center',
|
|
13324
|
-
ellipsis: true,
|
|
13325
|
-
width: 100
|
|
13326
|
-
}, {
|
|
13327
|
-
dataIndex: 'isGift',
|
|
13328
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
13329
|
-
align: 'center',
|
|
13330
|
-
ellipsis: true,
|
|
13331
|
-
width: 100,
|
|
13332
|
-
render: function render(val) {
|
|
13333
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13334
|
-
}
|
|
13335
|
-
}];
|
|
14430
|
+
columns = getWdtReissueGoodColumns({
|
|
14431
|
+
disabled: disabled,
|
|
14432
|
+
updateHandle: updateHandle,
|
|
14433
|
+
operate: operate
|
|
14434
|
+
});
|
|
13336
14435
|
}
|
|
13337
14436
|
break;
|
|
13338
14437
|
case 'BS_E3_REISSUE_GOODS':
|
|
@@ -13345,102 +14444,12 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13345
14444
|
}
|
|
13346
14445
|
break;
|
|
13347
14446
|
default:
|
|
13348
|
-
columns =
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
render: function render(val, record, index) {
|
|
13355
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
13356
|
-
options: [{
|
|
13357
|
-
label: '是',
|
|
13358
|
-
value: '是'
|
|
13359
|
-
}, {
|
|
13360
|
-
label: '否',
|
|
13361
|
-
value: '否'
|
|
13362
|
-
}],
|
|
13363
|
-
disabled: disabled,
|
|
13364
|
-
value: val,
|
|
13365
|
-
onChange: function onChange(val) {
|
|
13366
|
-
return updateHandle(val, index, 'mark');
|
|
13367
|
-
}
|
|
13368
|
-
});
|
|
13369
|
-
}
|
|
13370
|
-
}, {
|
|
13371
|
-
dataIndex: 'skuName',
|
|
13372
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13373
|
-
align: 'center',
|
|
13374
|
-
ellipsis: true,
|
|
13375
|
-
width: 250
|
|
13376
|
-
}, {
|
|
13377
|
-
dataIndex: 'sku',
|
|
13378
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13379
|
-
align: 'center',
|
|
13380
|
-
ellipsis: true,
|
|
13381
|
-
width: 100
|
|
13382
|
-
}, {
|
|
13383
|
-
dataIndex: 'name',
|
|
13384
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
13385
|
-
align: 'center',
|
|
13386
|
-
ellipsis: true,
|
|
13387
|
-
width: 250
|
|
13388
|
-
}, {
|
|
13389
|
-
dataIndex: 'pic',
|
|
13390
|
-
title: "\u56FE\u7247",
|
|
13391
|
-
align: 'center',
|
|
13392
|
-
ellipsis: true,
|
|
13393
|
-
width: 100,
|
|
13394
|
-
render: function render(val) {
|
|
13395
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
13396
|
-
width: 60,
|
|
13397
|
-
src: val
|
|
13398
|
-
});
|
|
13399
|
-
}
|
|
13400
|
-
}, {
|
|
13401
|
-
dataIndex: 'code',
|
|
13402
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
13403
|
-
align: 'center',
|
|
13404
|
-
ellipsis: true,
|
|
13405
|
-
width: 100
|
|
13406
|
-
}, {
|
|
13407
|
-
dataIndex: 'money',
|
|
13408
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13409
|
-
align: 'center',
|
|
13410
|
-
ellipsis: true,
|
|
13411
|
-
width: 100
|
|
13412
|
-
}, {
|
|
13413
|
-
dataIndex: 'number',
|
|
13414
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
13415
|
-
align: 'center',
|
|
13416
|
-
ellipsis: true,
|
|
13417
|
-
width: 100,
|
|
13418
|
-
render: function render(val, record, index) {
|
|
13419
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
13420
|
-
style: {
|
|
13421
|
-
width: 70
|
|
13422
|
-
},
|
|
13423
|
-
value: val,
|
|
13424
|
-
min: 1,
|
|
13425
|
-
precision: 0,
|
|
13426
|
-
onChange: function onChange(num) {
|
|
13427
|
-
return updateHandle(num, index, 'number');
|
|
13428
|
-
}
|
|
13429
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
13430
|
-
}
|
|
13431
|
-
}, {
|
|
13432
|
-
dataIndex: 'share',
|
|
13433
|
-
title: "\u5206\u644A\u4EF7",
|
|
13434
|
-
align: 'center',
|
|
13435
|
-
ellipsis: true,
|
|
13436
|
-
width: 70
|
|
13437
|
-
}, {
|
|
13438
|
-
dataIndex: 'type',
|
|
13439
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13440
|
-
align: 'center',
|
|
13441
|
-
ellipsis: true,
|
|
13442
|
-
width: 100
|
|
13443
|
-
}];
|
|
14447
|
+
columns = getColumnsMap({
|
|
14448
|
+
text: text,
|
|
14449
|
+
disabled: disabled,
|
|
14450
|
+
updateHandle: updateHandle,
|
|
14451
|
+
updateDataHandle: updateDataHandle
|
|
14452
|
+
})['default'];
|
|
13444
14453
|
}
|
|
13445
14454
|
return columns;
|
|
13446
14455
|
};
|
|
@@ -13452,6 +14461,24 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13452
14461
|
return COLUMNS_INFO(type);
|
|
13453
14462
|
};
|
|
13454
14463
|
var newColumns = React.useMemo(function () {
|
|
14464
|
+
var initBaseInfoColumns = GOODS_INFO_COLUMNS();
|
|
14465
|
+
var baseInfoColumns = [];
|
|
14466
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
14467
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
14468
|
+
if (isStringArray) {
|
|
14469
|
+
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
14470
|
+
return showHeader.includes(col.dataIndex);
|
|
14471
|
+
});
|
|
14472
|
+
} else if (isObjectArray) {
|
|
14473
|
+
baseInfoColumns = showHeader.filter(function (col) {
|
|
14474
|
+
return col.show !== false;
|
|
14475
|
+
}).map(function (col) {
|
|
14476
|
+
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
14477
|
+
return item.dataIndex === col.dataIndex;
|
|
14478
|
+
});
|
|
14479
|
+
return currentCol ? currentCol : undefined;
|
|
14480
|
+
}).filter(Boolean);
|
|
14481
|
+
}
|
|
13455
14482
|
var columnList = [{
|
|
13456
14483
|
dataIndex: '',
|
|
13457
14484
|
title: '序号',
|
|
@@ -13461,9 +14488,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13461
14488
|
render: function render(val, record, index) {
|
|
13462
14489
|
return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
|
|
13463
14490
|
}
|
|
13464
|
-
}].concat(_toConsumableArray(
|
|
13465
|
-
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
13466
|
-
})));
|
|
14491
|
+
}].concat(_toConsumableArray(baseInfoColumns));
|
|
13467
14492
|
if (!disabled) {
|
|
13468
14493
|
columnList.push({
|
|
13469
14494
|
dataIndex: '',
|
|
@@ -13541,8 +14566,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13541
14566
|
isGift: '',
|
|
13542
14567
|
uuid: kmkfUtils.uuid(),
|
|
13543
14568
|
canDelete: true,
|
|
13544
|
-
|
|
13545
|
-
|
|
14569
|
+
canEdit: true,
|
|
14570
|
+
goodsNumber: 1,
|
|
14571
|
+
canUpdateNumber: canUpdateNumber
|
|
14572
|
+
});
|
|
14573
|
+
});
|
|
14574
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14575
|
+
newList = list.map(function (item) {
|
|
14576
|
+
var goodName = item.goodName,
|
|
14577
|
+
goodShortName = item.goodShortName,
|
|
14578
|
+
goodNo = item.goodNo,
|
|
14579
|
+
specName = item.specName,
|
|
14580
|
+
specNo = item.specNo,
|
|
14581
|
+
retailPrice = item.retailPrice;
|
|
14582
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14583
|
+
uuid: kmkfUtils.uuid(),
|
|
14584
|
+
canDelete: true,
|
|
14585
|
+
canEdit: true,
|
|
14586
|
+
qty: 1,
|
|
14587
|
+
goodName: goodName,
|
|
14588
|
+
goodShortName: goodShortName,
|
|
14589
|
+
goodNo: goodNo,
|
|
14590
|
+
specName: specName,
|
|
14591
|
+
specNo: specNo,
|
|
14592
|
+
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
14593
|
+
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
13546
14594
|
});
|
|
13547
14595
|
});
|
|
13548
14596
|
} else {
|
|
@@ -13640,6 +14688,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13640
14688
|
shopId: shopId,
|
|
13641
14689
|
maxLength: maxLength,
|
|
13642
14690
|
companyKey: companyKey
|
|
14691
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(GyGoodsModal$1, {
|
|
14692
|
+
ref: refModal,
|
|
14693
|
+
onSubmit: onSubmit,
|
|
14694
|
+
width: width,
|
|
14695
|
+
shopList: shopList,
|
|
14696
|
+
shopId: shopId,
|
|
14697
|
+
maxLength: maxLength,
|
|
14698
|
+
companyKey: companyKey
|
|
13643
14699
|
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
13644
14700
|
ref: refModal,
|
|
13645
14701
|
onSubmit: onSubmit,
|
|
@@ -14338,7 +15394,7 @@ var bsE3Utils = {
|
|
|
14338
15394
|
};
|
|
14339
15395
|
|
|
14340
15396
|
var singletonMap$2 = new Map();
|
|
14341
|
-
var
|
|
15397
|
+
var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
14342
15398
|
if (!singletonMap$2.has(orderNo)) {
|
|
14343
15399
|
var p = new Promise(function (resolve, reject) {
|
|
14344
15400
|
var doReject = function doReject(err) {
|
|
@@ -14346,6 +15402,52 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14346
15402
|
singletonMap$2.delete(orderNo);
|
|
14347
15403
|
reject(err);
|
|
14348
15404
|
};
|
|
15405
|
+
extendRequest('/qy/gdfw/oms/gyOrderDetail', {
|
|
15406
|
+
method: 'post',
|
|
15407
|
+
data: {
|
|
15408
|
+
tid: orderNo
|
|
15409
|
+
}
|
|
15410
|
+
}).then(function (res) {
|
|
15411
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
15412
|
+
var _res$data;
|
|
15413
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) {
|
|
15414
|
+
res.data.trades = kmkfUtils.filterGyOrders(res === null || res === void 0 ? void 0 : res.data, orderNo).map(function (item) {
|
|
15415
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
15416
|
+
billNo: item.code,
|
|
15417
|
+
billType: item.orderTypeName,
|
|
15418
|
+
billTag: item.tagName,
|
|
15419
|
+
tradeTagName: item.tradeTagName,
|
|
15420
|
+
deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
15421
|
+
});
|
|
15422
|
+
});
|
|
15423
|
+
}
|
|
15424
|
+
resolve(res.data);
|
|
15425
|
+
// 延迟10秒清除,保证订单的时效性
|
|
15426
|
+
setTimeout(function () {
|
|
15427
|
+
singletonMap$2.delete(orderNo);
|
|
15428
|
+
}, 1000 * 10);
|
|
15429
|
+
} else {
|
|
15430
|
+
doReject(res);
|
|
15431
|
+
}
|
|
15432
|
+
}).catch(doReject);
|
|
15433
|
+
});
|
|
15434
|
+
singletonMap$2.set(orderNo, p);
|
|
15435
|
+
}
|
|
15436
|
+
return singletonMap$2.get(orderNo);
|
|
15437
|
+
};
|
|
15438
|
+
var gyUtils = {
|
|
15439
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
15440
|
+
};
|
|
15441
|
+
|
|
15442
|
+
var singletonMap$3 = new Map();
|
|
15443
|
+
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
15444
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
15445
|
+
var p = new Promise(function (resolve, reject) {
|
|
15446
|
+
var doReject = function doReject(err) {
|
|
15447
|
+
// 清空掉错误的请求记录
|
|
15448
|
+
singletonMap$3.delete(orderNo);
|
|
15449
|
+
reject(err);
|
|
15450
|
+
};
|
|
14349
15451
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
14350
15452
|
method: 'post',
|
|
14351
15453
|
data: {
|
|
@@ -14369,16 +15471,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14369
15471
|
}
|
|
14370
15472
|
// 延迟10秒清除,保证订单的时效性
|
|
14371
15473
|
setTimeout(function () {
|
|
14372
|
-
singletonMap$
|
|
15474
|
+
singletonMap$3.delete(orderNo);
|
|
14373
15475
|
}, 1000 * 10);
|
|
14374
15476
|
} else {
|
|
14375
15477
|
doReject(data);
|
|
14376
15478
|
}
|
|
14377
15479
|
}).catch(doReject);
|
|
14378
15480
|
});
|
|
14379
|
-
singletonMap$
|
|
15481
|
+
singletonMap$3.set(orderNo, p);
|
|
14380
15482
|
}
|
|
14381
|
-
return singletonMap$
|
|
15483
|
+
return singletonMap$3.get(orderNo);
|
|
14382
15484
|
};
|
|
14383
15485
|
var kmUtils = {
|
|
14384
15486
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -14506,14 +15608,16 @@ var columnsMap = {
|
|
|
14506
15608
|
dataIndex: 'orderMsg',
|
|
14507
15609
|
width: 150,
|
|
14508
15610
|
ellipsis: true
|
|
14509
|
-
}]
|
|
15611
|
+
}],
|
|
15612
|
+
GY_SYSTEM_ORDER: kmkfUtils.GY_SYSTEM_ORDER_CONFIG.columns
|
|
14510
15613
|
};
|
|
14511
15614
|
var rowKeyMap = {
|
|
14512
15615
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14513
15616
|
KM_SYSTEM_ORDER: 'billNo',
|
|
14514
15617
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14515
15618
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14516
|
-
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
15619
|
+
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15620
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
14517
15621
|
};
|
|
14518
15622
|
var index$1 = (function (props) {
|
|
14519
15623
|
var value = props.value,
|
|
@@ -14535,6 +15639,9 @@ var index$1 = (function (props) {
|
|
|
14535
15639
|
getWdtOrderList(value.orderNo);
|
|
14536
15640
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14537
15641
|
getBsE3OrderList(value.orderNo);
|
|
15642
|
+
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15643
|
+
console.log('触发gy--getGyOrderList--1');
|
|
15644
|
+
getGyOrderList(value.orderNo);
|
|
14538
15645
|
}
|
|
14539
15646
|
}
|
|
14540
15647
|
}, [value, type]);
|
|
@@ -14721,6 +15828,44 @@ var index$1 = (function (props) {
|
|
|
14721
15828
|
return _ref6.apply(this, arguments);
|
|
14722
15829
|
};
|
|
14723
15830
|
}();
|
|
15831
|
+
var getGyOrderList = /*#__PURE__*/function () {
|
|
15832
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15833
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15834
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15835
|
+
case 0:
|
|
15836
|
+
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15837
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
15838
|
+
return (item.platformCode || '').split(',').includes(orderNo);
|
|
15839
|
+
});
|
|
15840
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15841
|
+
orders: trades,
|
|
15842
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15843
|
+
var billNo = _ref9.billNo,
|
|
15844
|
+
billType = _ref9.billType,
|
|
15845
|
+
billTag = _ref9.billTag,
|
|
15846
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15847
|
+
deliveryState = _ref9.deliveryState;
|
|
15848
|
+
return {
|
|
15849
|
+
billNo: billNo,
|
|
15850
|
+
billType: billType,
|
|
15851
|
+
billTag: billTag,
|
|
15852
|
+
tradeTagName: tradeTagName,
|
|
15853
|
+
deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
15854
|
+
};
|
|
15855
|
+
})
|
|
15856
|
+
}));
|
|
15857
|
+
});
|
|
15858
|
+
onceRef.current = false;
|
|
15859
|
+
case 2:
|
|
15860
|
+
case "end":
|
|
15861
|
+
return _context6.stop();
|
|
15862
|
+
}
|
|
15863
|
+
}, _callee6);
|
|
15864
|
+
}));
|
|
15865
|
+
return function getGyOrderList(_x6) {
|
|
15866
|
+
return _ref8.apply(this, arguments);
|
|
15867
|
+
};
|
|
15868
|
+
}();
|
|
14724
15869
|
var rowSelection = {
|
|
14725
15870
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14726
15871
|
fixed: true,
|
|
@@ -14737,7 +15882,24 @@ var index$1 = (function (props) {
|
|
|
14737
15882
|
};
|
|
14738
15883
|
}
|
|
14739
15884
|
};
|
|
14740
|
-
|
|
15885
|
+
// useEffect(() => {
|
|
15886
|
+
// const dom = document.querySelector(
|
|
15887
|
+
// `.${type}_SYSTEM_ORDER_COMPONENT .ant-table-content`,
|
|
15888
|
+
// );
|
|
15889
|
+
// //解决列表出现横向滚动条时选择数据造成行内闪烁问题
|
|
15890
|
+
// if (
|
|
15891
|
+
// (value?.selectIds || []).length > 0 &&
|
|
15892
|
+
// dom &&
|
|
15893
|
+
// dom.scrollWidth > dom.clientWidth &&
|
|
15894
|
+
// dom.scrollLeft === 0
|
|
15895
|
+
// ) {
|
|
15896
|
+
// console.log(dom.scrollWidth > dom.clientWidth, dom.scrollLeft === 0);
|
|
15897
|
+
// dom.scrollLeft = 1;
|
|
15898
|
+
// }
|
|
15899
|
+
// }, [JSON.stringify(value?.selectIds || [])]);
|
|
15900
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15901
|
+
className: "".concat(type, "_SYSTEM_ORDER_COMPONENT")
|
|
15902
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
14741
15903
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
14742
15904
|
columns: columns,
|
|
14743
15905
|
rowSelection: rowSelection,
|
|
@@ -14745,12 +15907,12 @@ var index$1 = (function (props) {
|
|
|
14745
15907
|
size: "small",
|
|
14746
15908
|
pagination: false,
|
|
14747
15909
|
scroll: {
|
|
14748
|
-
x: '
|
|
15910
|
+
x: 'max-content'
|
|
14749
15911
|
},
|
|
14750
15912
|
locale: {
|
|
14751
15913
|
emptyText: '暂无数据'
|
|
14752
15914
|
}
|
|
14753
|
-
});
|
|
15915
|
+
}));
|
|
14754
15916
|
});
|
|
14755
15917
|
|
|
14756
15918
|
var WlnGoods = function WlnGoods(props) {
|
|
@@ -14776,13 +15938,14 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
14776
15938
|
};
|
|
14777
15939
|
|
|
14778
15940
|
var componentMap$1 = {
|
|
14779
|
-
|
|
15941
|
+
WDT_GOODS: {
|
|
14780
15942
|
type: 'wdt',
|
|
14781
15943
|
key: 'wdtGoods',
|
|
14782
15944
|
name: '旺店通',
|
|
14783
15945
|
orderNo: 'srcTid',
|
|
14784
15946
|
goodDetailOrderNo: 'srcTid',
|
|
14785
15947
|
eventNameMap: {
|
|
15948
|
+
// pubsub 事件
|
|
14786
15949
|
type: 'wdtType',
|
|
14787
15950
|
updateGoodsHandle: kmkfUtils.updateWdtGoodsHandle,
|
|
14788
15951
|
selectListReturn: 'wdtSelectListReturn',
|
|
@@ -14800,13 +15963,14 @@ var componentMap$1 = {
|
|
|
14800
15963
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
14801
15964
|
}
|
|
14802
15965
|
},
|
|
14803
|
-
|
|
15966
|
+
BS_E3_GOODS: {
|
|
14804
15967
|
type: 'e3',
|
|
14805
15968
|
key: 'bsE3Goods',
|
|
14806
15969
|
name: '百胜E3',
|
|
14807
15970
|
orderNo: 'dealCode',
|
|
14808
15971
|
goodDetailOrderNo: 'originalDealCode',
|
|
14809
15972
|
eventNameMap: {
|
|
15973
|
+
// pubsub 事件
|
|
14810
15974
|
type: 'bsE3Type',
|
|
14811
15975
|
updateGoodsHandle: kmkfUtils.updateBsE3GoodsHandle,
|
|
14812
15976
|
selectListReturn: 'bsE3SelectListReturn',
|
|
@@ -14823,6 +15987,31 @@ var componentMap$1 = {
|
|
|
14823
15987
|
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
14824
15988
|
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
14825
15989
|
}
|
|
15990
|
+
},
|
|
15991
|
+
GY_GOODS: {
|
|
15992
|
+
type: 'gy',
|
|
15993
|
+
key: 'gyGoods',
|
|
15994
|
+
name: '管易',
|
|
15995
|
+
orderNo: 'dealCode',
|
|
15996
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
15997
|
+
eventNameMap: {
|
|
15998
|
+
// pubsub 事件
|
|
15999
|
+
type: 'gyType',
|
|
16000
|
+
updateGoodsHandle: kmkfUtils.updateGyGoodsHandle,
|
|
16001
|
+
selectListReturn: 'gySelectListReturn',
|
|
16002
|
+
selectList: 'gySelectList',
|
|
16003
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
16004
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
16005
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
16006
|
+
changeShopCode: 'gyChangeShopCode',
|
|
16007
|
+
reissueType: 'gyReissueType',
|
|
16008
|
+
returnType: 'gyReturnType',
|
|
16009
|
+
returnSelectListReturn: 'gyReturnSelectListReturn',
|
|
16010
|
+
returnSelectList: 'gyReturnSelectList',
|
|
16011
|
+
deleteGood: 'gyDeleteGood',
|
|
16012
|
+
returnDeleteGood: 'gyReturnDeleteGood',
|
|
16013
|
+
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
16014
|
+
}
|
|
14826
16015
|
}
|
|
14827
16016
|
};
|
|
14828
16017
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -15291,7 +16480,7 @@ var typeMap$1 = {
|
|
|
15291
16480
|
}
|
|
15292
16481
|
};
|
|
15293
16482
|
var wdtReissue = function wdtReissue(props) {
|
|
15294
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
16483
|
+
var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
15295
16484
|
var value = props.value,
|
|
15296
16485
|
onChange = props.onChange,
|
|
15297
16486
|
_props$reasonList = props.reasonList,
|
|
@@ -15452,20 +16641,25 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15452
16641
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15453
16642
|
};
|
|
15454
16643
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
15455
|
-
var _typeMap$type23,
|
|
16644
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
15456
16645
|
var newValue = _objectSpread2({}, value);
|
|
15457
|
-
|
|
16646
|
+
// 原订单商品
|
|
16647
|
+
var originTradeGoodList = getGoodDetails({
|
|
15458
16648
|
mode: isStrict
|
|
15459
|
-
})
|
|
15460
|
-
|
|
16649
|
+
}) || [];
|
|
16650
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
16651
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
16652
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
16653
|
+
return skuList.includes(item.uuid);
|
|
15461
16654
|
});
|
|
16655
|
+
console.log('商品发生变化', newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
15462
16656
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15463
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16657
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
15464
16658
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15465
16659
|
var showChangeBtn = React.useMemo(function () {
|
|
15466
|
-
var _typeMap$
|
|
15467
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15468
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
16660
|
+
var _typeMap$type27;
|
|
16661
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
16662
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
15469
16663
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
15470
16664
|
gutter: 8,
|
|
15471
16665
|
wrap: true
|
|
@@ -15483,12 +16677,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15483
16677
|
},
|
|
15484
16678
|
disabled: disabled,
|
|
15485
16679
|
allowClear: false,
|
|
15486
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16680
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
15487
16681
|
onChange: function onChange(val) {
|
|
15488
16682
|
return changeSystemOrderHandle(val);
|
|
15489
16683
|
},
|
|
15490
16684
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15491
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
16685
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
15492
16686
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
15493
16687
|
key: item.billNo,
|
|
15494
16688
|
value: item.billNo,
|
|
@@ -15509,7 +16703,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15509
16703
|
disabled: disabled,
|
|
15510
16704
|
allowClear: false,
|
|
15511
16705
|
options: reasonList,
|
|
15512
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16706
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
15513
16707
|
onChange: function onChange(val) {
|
|
15514
16708
|
return changeTypeHandle(val);
|
|
15515
16709
|
}
|
|
@@ -15521,7 +16715,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15521
16715
|
canUpdateNumber: showChangeBtn,
|
|
15522
16716
|
showChangeBtn: showChangeBtn,
|
|
15523
16717
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15524
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16718
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
15525
16719
|
onChange: function onChange(val) {
|
|
15526
16720
|
return changeGoodHandle(val);
|
|
15527
16721
|
},
|
|
@@ -16220,16 +17414,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
16220
17414
|
};
|
|
16221
17415
|
|
|
16222
17416
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
16223
|
-
var msgTypeCh = {
|
|
16224
|
-
pdd: '拼多多',
|
|
16225
|
-
ding: '钉钉',
|
|
16226
|
-
wechat: '微信',
|
|
16227
|
-
qq: 'QQ',
|
|
16228
|
-
qywx: '企业微信',
|
|
16229
|
-
YZDKH: '邮政拦截',
|
|
16230
|
-
YT: '圆通拦截',
|
|
16231
|
-
feishu: '飞书'
|
|
16232
|
-
};
|
|
16233
17417
|
var MsgStatus = function MsgStatus(props) {
|
|
16234
17418
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
16235
17419
|
var _props$value = props.value,
|
|
@@ -16270,7 +17454,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
16270
17454
|
onClick: function onClick() {
|
|
16271
17455
|
return setChangeIndex(index);
|
|
16272
17456
|
}
|
|
16273
|
-
}, msgTypeCh[key] || key, item.ruleName);
|
|
17457
|
+
}, kmkfUtils.msgTypeCh[key] || key, item.ruleName);
|
|
16274
17458
|
}))) : null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
16275
17459
|
showSearch: true,
|
|
16276
17460
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -16319,7 +17503,7 @@ var typeMap$2 = {
|
|
|
16319
17503
|
}
|
|
16320
17504
|
};
|
|
16321
17505
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16322
|
-
var _typeMap$type21, _typeMap$
|
|
17506
|
+
var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
|
|
16323
17507
|
var value = props.value,
|
|
16324
17508
|
onChange = props.onChange,
|
|
16325
17509
|
_props$reasonList = props.reasonList,
|
|
@@ -16457,15 +17641,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16457
17641
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
16458
17642
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
16459
17643
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
16460
|
-
var _typeMap$type22,
|
|
17644
|
+
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
16461
17645
|
var newValue = _objectSpread2({}, value);
|
|
16462
|
-
|
|
17646
|
+
// 原订单商品
|
|
17647
|
+
var originTradeGoodList = getGoodDetails({
|
|
16463
17648
|
mode: isStrict
|
|
16464
|
-
})
|
|
16465
|
-
|
|
17649
|
+
}) || [];
|
|
17650
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17651
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
17652
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17653
|
+
return skuList.includes(item.uuid);
|
|
16466
17654
|
});
|
|
16467
17655
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16468
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17656
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
16469
17657
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
16470
17658
|
gutter: 8,
|
|
16471
17659
|
wrap: true,
|
|
@@ -16484,12 +17672,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16484
17672
|
},
|
|
16485
17673
|
disabled: disabled,
|
|
16486
17674
|
allowClear: false,
|
|
16487
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17675
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
16488
17676
|
onChange: function onChange(val) {
|
|
16489
17677
|
return changeSystemOrderHandle(val);
|
|
16490
17678
|
},
|
|
16491
17679
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16492
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
17680
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
16493
17681
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
16494
17682
|
key: item.billNo,
|
|
16495
17683
|
value: item.billNo,
|
|
@@ -16510,7 +17698,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16510
17698
|
disabled: disabled,
|
|
16511
17699
|
allowClear: false,
|
|
16512
17700
|
options: reasonList,
|
|
16513
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17701
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
16514
17702
|
onChange: function onChange(val) {
|
|
16515
17703
|
return changeTypeHandle(val);
|
|
16516
17704
|
}
|
|
@@ -16522,7 +17710,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16522
17710
|
canUpdateNumber: showChangeBtn,
|
|
16523
17711
|
showChangeBtn: showChangeBtn,
|
|
16524
17712
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16525
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17713
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
16526
17714
|
onChange: function onChange(val) {
|
|
16527
17715
|
return changeGoodHandle(val);
|
|
16528
17716
|
},
|
|
@@ -16538,6 +17726,254 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16538
17726
|
})));
|
|
16539
17727
|
};
|
|
16540
17728
|
|
|
17729
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17730
|
+
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17731
|
+
var typeMap$3 = {
|
|
17732
|
+
GY_REISSUE_GOODS: {
|
|
17733
|
+
key: 'gyReissueGoods',
|
|
17734
|
+
name: '管易',
|
|
17735
|
+
typeName: 'gyReissueType',
|
|
17736
|
+
systemOrder: 'gySystemOrder',
|
|
17737
|
+
systemOrderNo: 'gySystemOrderNo',
|
|
17738
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
17739
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
17740
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
17741
|
+
changeShopCode: 'gyChangeShopCode',
|
|
17742
|
+
reissueType: 'gyReissueType',
|
|
17743
|
+
formatDefaultField: {
|
|
17744
|
+
money: 'orderPrice',
|
|
17745
|
+
share: 'sharePrice'
|
|
17746
|
+
},
|
|
17747
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
17748
|
+
}
|
|
17749
|
+
};
|
|
17750
|
+
var GyReissue = function GyReissue(props) {
|
|
17751
|
+
var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
17752
|
+
var value = props.value,
|
|
17753
|
+
onChange = props.onChange,
|
|
17754
|
+
_props$reasonList = props.reasonList,
|
|
17755
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17756
|
+
disabled = props.disabled,
|
|
17757
|
+
type = props.type,
|
|
17758
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17759
|
+
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
|
|
17760
|
+
var _order$platformCode;
|
|
17761
|
+
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(',');
|
|
17762
|
+
});
|
|
17763
|
+
var getOrderFlag = React.useRef(false);
|
|
17764
|
+
var _useState = React.useState(false),
|
|
17765
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17766
|
+
isStrict = _useState2[0],
|
|
17767
|
+
setIsStrict = _useState2[1];
|
|
17768
|
+
React.useEffect(function () {
|
|
17769
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17770
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$3[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$3[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
17771
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17772
|
+
getOrderFlag.current = true;
|
|
17773
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$3[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
17774
|
+
}
|
|
17775
|
+
return;
|
|
17776
|
+
}, [value]);
|
|
17777
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17778
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17779
|
+
var _typeMap$type4;
|
|
17780
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17781
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17782
|
+
case 0:
|
|
17783
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17784
|
+
var _typeMap$type5, _typeMap$type6;
|
|
17785
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17786
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
17787
|
+
var billNo = _ref2.billNo,
|
|
17788
|
+
billType = _ref2.billType,
|
|
17789
|
+
billTag = _ref2.billTag,
|
|
17790
|
+
tradeTagName = _ref2.tradeTagName,
|
|
17791
|
+
deliveryState = _ref2.deliveryState,
|
|
17792
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
17793
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17794
|
+
billNo: billNo,
|
|
17795
|
+
billType: billType,
|
|
17796
|
+
billTag: billTag,
|
|
17797
|
+
tradeTagName: tradeTagName,
|
|
17798
|
+
deliveryState: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17799
|
+
});
|
|
17800
|
+
});
|
|
17801
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$3[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$3[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
17802
|
+
showOrderInfo: showOrderInfo,
|
|
17803
|
+
orders: orders
|
|
17804
|
+
}))));
|
|
17805
|
+
});
|
|
17806
|
+
case 1:
|
|
17807
|
+
case "end":
|
|
17808
|
+
return _context.stop();
|
|
17809
|
+
}
|
|
17810
|
+
}, _callee);
|
|
17811
|
+
}));
|
|
17812
|
+
return function getOrderList(_x) {
|
|
17813
|
+
return _ref.apply(this, arguments);
|
|
17814
|
+
};
|
|
17815
|
+
}();
|
|
17816
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17817
|
+
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17818
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17819
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type7 = typeMap$3[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
17820
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17821
|
+
var newValue = _objectSpread2({}, value);
|
|
17822
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17823
|
+
if (typeName === '1') {
|
|
17824
|
+
var _typeMap$type9;
|
|
17825
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17826
|
+
mode: isStrict
|
|
17827
|
+
});
|
|
17828
|
+
} else if (typeName === '2') {
|
|
17829
|
+
var _typeMap$type10;
|
|
17830
|
+
// 切换到非原单,清空列表
|
|
17831
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17832
|
+
}
|
|
17833
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17834
|
+
};
|
|
17835
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17836
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17837
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type11 = typeMap$3[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
17838
|
+
setIsStrict(mode);
|
|
17839
|
+
if (!isOriginalOrder) return;
|
|
17840
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type12 = typeMap$3[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key, getGoodDetails({
|
|
17841
|
+
mode: mode
|
|
17842
|
+
}))));
|
|
17843
|
+
};
|
|
17844
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17845
|
+
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17846
|
+
var mode = _ref3.mode,
|
|
17847
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17848
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type13 = typeMap$3[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.systemOrder];
|
|
17849
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type14 = typeMap$3[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.systemOrderNo];
|
|
17850
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17851
|
+
return order.code === systemOrderNo;
|
|
17852
|
+
});
|
|
17853
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length) ? kmkfUtils.updateGyGoodsHandle([order]) : [];
|
|
17854
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17855
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17856
|
+
return !orderNo || goodItem.platformCode === orderNo;
|
|
17857
|
+
}) : goodDetails;
|
|
17858
|
+
};
|
|
17859
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17860
|
+
var _typeMap$type15;
|
|
17861
|
+
var newValue = _objectSpread2({}, value);
|
|
17862
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type15 = typeMap$3[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
17863
|
+
var _typeMap$type16, _typeMap$type17;
|
|
17864
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type16 = typeMap$3[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
17865
|
+
item["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type17 = typeMap$3[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
17866
|
+
return item;
|
|
17867
|
+
});
|
|
17868
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17869
|
+
};
|
|
17870
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17871
|
+
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17872
|
+
var newValue = _objectSpread2({}, value);
|
|
17873
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type18 = typeMap$3[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
17874
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type19 = typeMap$3[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
17875
|
+
var _typeMap$type20;
|
|
17876
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type20 = typeMap$3[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
17877
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$3[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
17878
|
+
var _typeMap$type22;
|
|
17879
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type22 = typeMap$3[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
17880
|
+
mode: isStrict,
|
|
17881
|
+
sysOrderNo: val
|
|
17882
|
+
});
|
|
17883
|
+
}
|
|
17884
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17885
|
+
};
|
|
17886
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
17887
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
17888
|
+
var newValue = _objectSpread2({}, value);
|
|
17889
|
+
// 原订单商品
|
|
17890
|
+
var originTradeGoodList = getGoodDetails({
|
|
17891
|
+
mode: isStrict
|
|
17892
|
+
}) || [];
|
|
17893
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17894
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type23 = typeMap$3[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
17895
|
+
newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type24 = typeMap$3[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17896
|
+
return skuList.includes(item.uuid);
|
|
17897
|
+
});
|
|
17898
|
+
console.log('商品发生变化', newValue["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type25 = typeMap$3[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
17899
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17900
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type26 = typeMap$3[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
17901
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17902
|
+
var showChangeBtn = React.useMemo(function () {
|
|
17903
|
+
var _typeMap$type27;
|
|
17904
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17905
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17906
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17907
|
+
gutter: 8,
|
|
17908
|
+
wrap: true
|
|
17909
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17910
|
+
className: "gutter-row",
|
|
17911
|
+
xs: {
|
|
17912
|
+
span: 11
|
|
17913
|
+
},
|
|
17914
|
+
sm: {
|
|
17915
|
+
span: 6
|
|
17916
|
+
}
|
|
17917
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
17918
|
+
style: {
|
|
17919
|
+
marginBottom: '8px'
|
|
17920
|
+
},
|
|
17921
|
+
disabled: disabled,
|
|
17922
|
+
allowClear: false,
|
|
17923
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type29 = typeMap$3[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
17924
|
+
onChange: function onChange(val) {
|
|
17925
|
+
return changeSystemOrderHandle(val);
|
|
17926
|
+
},
|
|
17927
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17928
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$3[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
17929
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
17930
|
+
key: item.billNo,
|
|
17931
|
+
value: item.billNo,
|
|
17932
|
+
label: item.billNo
|
|
17933
|
+
}, item.billNo);
|
|
17934
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17935
|
+
className: "gutter-row",
|
|
17936
|
+
xs: {
|
|
17937
|
+
span: 11
|
|
17938
|
+
},
|
|
17939
|
+
sm: {
|
|
17940
|
+
span: 6
|
|
17941
|
+
}
|
|
17942
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
17943
|
+
style: {
|
|
17944
|
+
marginBottom: '8px'
|
|
17945
|
+
},
|
|
17946
|
+
disabled: disabled,
|
|
17947
|
+
allowClear: false,
|
|
17948
|
+
options: reasonList,
|
|
17949
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type31 = typeMap$3[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
17950
|
+
onChange: function onChange(val) {
|
|
17951
|
+
return changeTypeHandle(val);
|
|
17952
|
+
}
|
|
17953
|
+
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17954
|
+
key: 'reissueGoods'
|
|
17955
|
+
}, other), {}, {
|
|
17956
|
+
type: type,
|
|
17957
|
+
disabled: disabled,
|
|
17958
|
+
canUpdateNumber: showChangeBtn,
|
|
17959
|
+
showChangeBtn: showChangeBtn,
|
|
17960
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17961
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type32 = typeMap$3[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
17962
|
+
onChange: function onChange(val) {
|
|
17963
|
+
return changeGoodHandle(val);
|
|
17964
|
+
},
|
|
17965
|
+
onModeChange: handleModeChange,
|
|
17966
|
+
showModeBtn: showModeBtn,
|
|
17967
|
+
isStrict: isStrict,
|
|
17968
|
+
tradeGoods: {
|
|
17969
|
+
originDataSource: getGoodDetails({
|
|
17970
|
+
mode: isStrict
|
|
17971
|
+
}),
|
|
17972
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17973
|
+
}
|
|
17974
|
+
})));
|
|
17975
|
+
};
|
|
17976
|
+
|
|
16541
17977
|
exports.Address = ApaasAddress;
|
|
16542
17978
|
exports.AliPay = AliPay;
|
|
16543
17979
|
exports.ApaasAddress = Province;
|
|
@@ -16576,6 +18012,7 @@ exports.CommonSystemOrder = CommonSystemOrder;
|
|
|
16576
18012
|
exports.ExpressLogistics = ExpressLogistics;
|
|
16577
18013
|
exports.Goods = Goods;
|
|
16578
18014
|
exports.GoodsTable = index$2;
|
|
18015
|
+
exports.GyReissue = GyReissue;
|
|
16579
18016
|
exports.IdentifyAddress = IdentifyAddress;
|
|
16580
18017
|
exports.Invoice = Invoice;
|
|
16581
18018
|
exports.JstGoods = jstGoods;
|
|
@@ -16599,3 +18036,4 @@ exports.TradeId = TradeId;
|
|
|
16599
18036
|
exports.WdtGoodList = WdtGoodList;
|
|
16600
18037
|
exports.WdtReissue = wdtReissue;
|
|
16601
18038
|
exports.WlnGoods = WlnGoods;
|
|
18039
|
+
exports.columnsBaseInfoMap = columnsBaseInfoMap;
|