@kmkf-fe-packages/basic-components 1.22.1-beta.6 → 1.22.1-beta.60
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 +2316 -900
- package/dist/index.js +2316 -898
- 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.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -928,7 +928,7 @@ var fn$1 = function fn() {
|
|
|
928
928
|
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
929
929
|
var _document;
|
|
930
930
|
var _ref$maxCount = _ref.maxCount,
|
|
931
|
-
maxCount = _ref$maxCount === void 0 ?
|
|
931
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
932
932
|
_ref$maxSize = _ref.maxSize,
|
|
933
933
|
maxSize = _ref$maxSize === void 0 ? 10 : _ref$maxSize,
|
|
934
934
|
_ref$uploadText = _ref.uploadText,
|
|
@@ -6863,7 +6863,7 @@ var fn$2 = function fn() {
|
|
|
6863
6863
|
};
|
|
6864
6864
|
var ApaasUploadFile = function ApaasUploadFile(_ref) {
|
|
6865
6865
|
var _ref$maxCount = _ref.maxCount,
|
|
6866
|
-
maxCount = _ref$maxCount === void 0 ?
|
|
6866
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
6867
6867
|
_ref$maxSize = _ref.maxSize,
|
|
6868
6868
|
maxSize = _ref$maxSize === void 0 ? 100 : _ref$maxSize,
|
|
6869
6869
|
_ref$onChange = _ref.onChange,
|
|
@@ -7469,7 +7469,12 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7469
7469
|
workOrder: AddressData
|
|
7470
7470
|
}[type] || AddressData).getInstance();
|
|
7471
7471
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7472
|
-
params.address = [
|
|
7472
|
+
// params.address = [
|
|
7473
|
+
// addressData.getProCodeByName(val?.province),
|
|
7474
|
+
// addressData.getProCodeByName(val?.city),
|
|
7475
|
+
// addressData.getProCodeByName(val?.district),
|
|
7476
|
+
// ];
|
|
7477
|
+
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]);
|
|
7473
7478
|
}
|
|
7474
7479
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
7475
7480
|
};
|
|
@@ -7580,7 +7585,8 @@ function ApaasLogistics(props) {
|
|
|
7580
7585
|
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7581
7586
|
value: value,
|
|
7582
7587
|
onChange: onChange,
|
|
7583
|
-
options: option
|
|
7588
|
+
options: option,
|
|
7589
|
+
virtual: true
|
|
7584
7590
|
}));
|
|
7585
7591
|
}
|
|
7586
7592
|
|
|
@@ -8110,7 +8116,12 @@ function ApaasAddress(props) {
|
|
|
8110
8116
|
};
|
|
8111
8117
|
var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
8112
8118
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
8113
|
-
params.address = [
|
|
8119
|
+
// params.address = [
|
|
8120
|
+
// addressData.getProCodeByName(val?.province),
|
|
8121
|
+
// addressData.getProCodeByName(val?.city),
|
|
8122
|
+
// addressData.getProCodeByName(val?.district),
|
|
8123
|
+
// ];
|
|
8124
|
+
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]);
|
|
8114
8125
|
}
|
|
8115
8126
|
onChange === null || onChange === void 0 ? void 0 : onChange(params);
|
|
8116
8127
|
};
|
|
@@ -9474,7 +9485,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
9474
9485
|
picUrl: item.picUrl,
|
|
9475
9486
|
numIid: item.numIid,
|
|
9476
9487
|
skuId: item.skuId,
|
|
9477
|
-
outerSkuId: item.outerSkuId
|
|
9488
|
+
outerSkuId: item.outerSkuId,
|
|
9489
|
+
num: 1 //手动选择商品默认数量
|
|
9478
9490
|
};
|
|
9479
9491
|
// if (type === 1) {
|
|
9480
9492
|
// params.outerId = item.outerId; //编码
|
|
@@ -9563,16 +9575,34 @@ var GoodItem = function GoodItem(props) {
|
|
|
9563
9575
|
return _ref5.apply(this, arguments);
|
|
9564
9576
|
};
|
|
9565
9577
|
}();
|
|
9566
|
-
var headerList =
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9578
|
+
var headerList = useMemo(function () {
|
|
9579
|
+
if (!Array.isArray(showHeader)) return columnsGoodsList.map(function (item) {
|
|
9580
|
+
return item.dataIndex;
|
|
9581
|
+
});
|
|
9582
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
9583
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
9584
|
+
var dataIndexList = [];
|
|
9585
|
+
if (isStringArray) {
|
|
9586
|
+
dataIndexList = showHeader;
|
|
9587
|
+
} else if (isObjectArray) {
|
|
9588
|
+
dataIndexList = showHeader.filter(function (item) {
|
|
9589
|
+
return item.show !== false;
|
|
9590
|
+
}).map(function (item) {
|
|
9591
|
+
return item.dataIndex;
|
|
9592
|
+
});
|
|
9593
|
+
}
|
|
9594
|
+
return dataIndexList || {
|
|
9595
|
+
1: columnsGoodsList.map(function (item) {
|
|
9596
|
+
return item.dataIndex;
|
|
9597
|
+
})
|
|
9598
|
+
}[type] || [];
|
|
9599
|
+
}, [showHeader]);
|
|
9570
9600
|
//修改参数
|
|
9571
|
-
var handleChangeValue = function handleChangeValue(key, index) {
|
|
9601
|
+
var handleChangeValue = function handleChangeValue(key, index, replaceFn) {
|
|
9572
9602
|
return function (e) {
|
|
9573
|
-
var _e$target;
|
|
9603
|
+
var _e$target, _e$target2;
|
|
9574
9604
|
var newImgList = _toConsumableArray(imgList);
|
|
9575
|
-
newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
|
|
9605
|
+
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;
|
|
9576
9606
|
var newValue = {
|
|
9577
9607
|
shopId: shopId,
|
|
9578
9608
|
imgList: newImgList
|
|
@@ -9581,35 +9611,67 @@ var GoodItem = function GoodItem(props) {
|
|
|
9581
9611
|
};
|
|
9582
9612
|
};
|
|
9583
9613
|
// TODO: 目前只做了type 1的处理,其他的还是走老的文件 ./index.tsx
|
|
9584
|
-
var goodItemAttrs =
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9614
|
+
var goodItemAttrs = useMemo(function () {
|
|
9615
|
+
var initList = [{
|
|
9616
|
+
isShow: headerList.includes('title'),
|
|
9617
|
+
key: 'title',
|
|
9618
|
+
label: '商品名称'
|
|
9619
|
+
}, {
|
|
9620
|
+
isShow: headerList.includes('outerId'),
|
|
9621
|
+
key: 'outerId',
|
|
9622
|
+
label: '商品编码'
|
|
9623
|
+
},
|
|
9624
|
+
// { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
|
|
9625
|
+
{
|
|
9626
|
+
isShow: headerList.includes('numIid'),
|
|
9627
|
+
key: 'numIid',
|
|
9628
|
+
label: '商品id'
|
|
9629
|
+
}, {
|
|
9630
|
+
isShow: headerList.includes('num'),
|
|
9631
|
+
key: 'num',
|
|
9632
|
+
label: '商品数量',
|
|
9633
|
+
replaceFn: function replaceFn(value) {
|
|
9634
|
+
// 使用正则表达式匹配所有数字字符
|
|
9635
|
+
var numbers = String(value || '').match(/\d+/g);
|
|
9636
|
+
// 如果没有匹配到任何数字字符,返回null
|
|
9637
|
+
if (!numbers) {
|
|
9638
|
+
return null;
|
|
9639
|
+
}
|
|
9640
|
+
// 将匹配到的数字字符拼接成一个新的数字
|
|
9641
|
+
return Number(numbers.join('')) ? Number(numbers.join('')) : null;
|
|
9642
|
+
}
|
|
9643
|
+
}, {
|
|
9644
|
+
isShow: changeSku && headerList.includes('skuId'),
|
|
9645
|
+
key: 'skuId',
|
|
9646
|
+
label: 'SKU ID'
|
|
9647
|
+
}, {
|
|
9648
|
+
isShow: changeSku && headerList.includes('outerSkuId'),
|
|
9649
|
+
key: 'outerSkuId',
|
|
9650
|
+
label: 'SKU 编码'
|
|
9651
|
+
}, {
|
|
9652
|
+
isShow: changeSku && headerList.includes('propertiesName'),
|
|
9653
|
+
key: 'propertiesName',
|
|
9654
|
+
label: 'SKU 信息'
|
|
9655
|
+
}];
|
|
9656
|
+
if (!Array.isArray(showHeader)) return initList;
|
|
9657
|
+
var newList = [];
|
|
9658
|
+
headerList.forEach(function (dataIndex) {
|
|
9659
|
+
if (initList.find(function (item) {
|
|
9660
|
+
return item.key === dataIndex;
|
|
9661
|
+
})) {
|
|
9662
|
+
newList.push(initList.find(function (item) {
|
|
9663
|
+
return item.key === dataIndex;
|
|
9664
|
+
}));
|
|
9665
|
+
}
|
|
9666
|
+
});
|
|
9667
|
+
return newList;
|
|
9668
|
+
}, [headerList, showHeader]);
|
|
9669
|
+
var hasPic = useMemo(function () {
|
|
9670
|
+
return headerList.includes('picUrl');
|
|
9671
|
+
}, [headerList]);
|
|
9672
|
+
var hasAttr = useMemo(function () {
|
|
9673
|
+
return hasPic ? headerList.length > 1 : headerList.length > 0;
|
|
9674
|
+
}, [hasPic, headerList]);
|
|
9613
9675
|
return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
|
|
9614
9676
|
className: "goods-title"
|
|
9615
9677
|
}, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
|
|
@@ -9667,7 +9729,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9667
9729
|
title: String(img[item.key] || ''),
|
|
9668
9730
|
value: img[item.key],
|
|
9669
9731
|
disabled: item.disabled || disabled,
|
|
9670
|
-
onChange: handleChangeValue(item.key, index)
|
|
9732
|
+
onChange: handleChangeValue(item.key, index, item.replaceFn)
|
|
9671
9733
|
}));
|
|
9672
9734
|
}), !disabled && !hasPic && type !== 4 && changeSku ? /*#__PURE__*/React.createElement(Button, {
|
|
9673
9735
|
style: {
|
|
@@ -10956,13 +11018,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10956
11018
|
changeIndex = _useState2[0],
|
|
10957
11019
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10958
11020
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
10959
|
-
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
11021
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
10960
11022
|
useEffect(function () {
|
|
10961
11023
|
//没有值塞个默认值
|
|
10962
11024
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10963
11025
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10964
11026
|
}
|
|
10965
11027
|
}, [value, type]);
|
|
11028
|
+
useEffect(function () {
|
|
11029
|
+
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
11030
|
+
setChangeIndex(0);
|
|
11031
|
+
}
|
|
11032
|
+
}, value);
|
|
10966
11033
|
var content = function content(item, index) {
|
|
10967
11034
|
return /*#__PURE__*/React.createElement("div", {
|
|
10968
11035
|
style: {
|
|
@@ -10973,7 +11040,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10973
11040
|
style: {
|
|
10974
11041
|
textAlign: 'center'
|
|
10975
11042
|
}
|
|
10976
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
11043
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10977
11044
|
return /*#__PURE__*/React.createElement("div", {
|
|
10978
11045
|
key: index
|
|
10979
11046
|
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -12426,237 +12493,1709 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12426
12493
|
};
|
|
12427
12494
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12428
12495
|
|
|
12429
|
-
var
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
}
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
}
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
}
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
}, {
|
|
12458
|
-
dataIndex: 'colorName',
|
|
12459
|
-
title: "\u989C\u8272\u540D\u79F0",
|
|
12460
|
-
width: 150
|
|
12461
|
-
}, {
|
|
12462
|
-
dataIndex: 'colorCode',
|
|
12463
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
12464
|
-
width: 150
|
|
12465
|
-
}, {
|
|
12466
|
-
dataIndex: 'sizeName',
|
|
12467
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12468
|
-
width: 150
|
|
12469
|
-
}, {
|
|
12470
|
-
dataIndex: 'sizeCode',
|
|
12471
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12472
|
-
width: 150
|
|
12473
|
-
}, {
|
|
12474
|
-
dataIndex: 'brandName',
|
|
12475
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
12476
|
-
width: 150
|
|
12477
|
-
}, {
|
|
12478
|
-
dataIndex: 'goodsNumber',
|
|
12479
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12480
|
-
width: 150
|
|
12481
|
-
}, {
|
|
12482
|
-
dataIndex: 'goodsPrice',
|
|
12483
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12484
|
-
width: 150
|
|
12485
|
-
}, {
|
|
12486
|
-
dataIndex: 'shopPrice',
|
|
12487
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12488
|
-
width: 150
|
|
12489
|
-
}, {
|
|
12490
|
-
dataIndex: 'isGift',
|
|
12491
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
12492
|
-
width: 150,
|
|
12493
|
-
render: function render(val) {
|
|
12494
|
-
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12495
|
-
}
|
|
12496
|
-
}];
|
|
12497
|
-
var renderFieldMap = {
|
|
12498
|
-
goodsNumber: function goodsNumber(_ref) {
|
|
12499
|
-
var disabled = _ref.disabled,
|
|
12500
|
-
updateHandle = _ref.updateHandle;
|
|
12501
|
-
return function (val, record, index) {
|
|
12502
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12503
|
-
style: {
|
|
12504
|
-
width: 70
|
|
12505
|
-
},
|
|
12506
|
-
value: val,
|
|
12507
|
-
min: 1,
|
|
12508
|
-
precision: 0,
|
|
12509
|
-
onChange: function onChange(num) {
|
|
12510
|
-
return updateHandle(num, index, 'goodsNumber');
|
|
12511
|
-
}
|
|
12512
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12513
|
-
};
|
|
12514
|
-
},
|
|
12515
|
-
goodsPrice: function goodsPrice(_ref2) {
|
|
12516
|
-
var disabled = _ref2.disabled,
|
|
12517
|
-
updateHandle = _ref2.updateHandle;
|
|
12518
|
-
return function (val, record, index) {
|
|
12519
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12520
|
-
style: {
|
|
12521
|
-
width: 70
|
|
12522
|
-
},
|
|
12523
|
-
value: val,
|
|
12524
|
-
min: 0,
|
|
12525
|
-
onChange: function onChange(value) {
|
|
12526
|
-
return updateHandle(value, index, 'goodsPrice');
|
|
12527
|
-
}
|
|
12528
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12529
|
-
};
|
|
12530
|
-
},
|
|
12531
|
-
isGift: function isGift(_ref3) {
|
|
12532
|
-
var disabled = _ref3.disabled,
|
|
12533
|
-
updateHandle = _ref3.updateHandle;
|
|
12534
|
-
return function (val, record, index) {
|
|
12535
|
-
var options = [{
|
|
12536
|
-
label: '是',
|
|
12537
|
-
value: 1
|
|
12538
|
-
}, {
|
|
12539
|
-
label: '否',
|
|
12540
|
-
value: 0
|
|
12541
|
-
}];
|
|
12542
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
12543
|
-
style: {
|
|
12544
|
-
width: 70
|
|
12545
|
-
},
|
|
12546
|
-
options: options,
|
|
12547
|
-
value: val,
|
|
12548
|
-
onChange: function onChange(value) {
|
|
12549
|
-
return updateHandle(value, index, 'isGift');
|
|
12550
|
-
},
|
|
12551
|
-
getPopupContainer: function getPopupContainer() {
|
|
12552
|
-
return document.getElementById('bsE3ReissueGoods');
|
|
12553
|
-
}
|
|
12554
|
-
}) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12496
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12497
|
+
var current = _ref.current,
|
|
12498
|
+
pageSize = _ref.pageSize;
|
|
12499
|
+
var data = {
|
|
12500
|
+
skuName: formData.skuName || null,
|
|
12501
|
+
skuCode: formData.skuCode || null,
|
|
12502
|
+
goodName: formData.goodName || null,
|
|
12503
|
+
goodNo: formData.goodNo || null
|
|
12504
|
+
};
|
|
12505
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12506
|
+
method: 'post',
|
|
12507
|
+
data: _objectSpread2({
|
|
12508
|
+
pageSize: pageSize,
|
|
12509
|
+
pageNo: current,
|
|
12510
|
+
platform: 'GY_ERP'
|
|
12511
|
+
}, data)
|
|
12512
|
+
}).then(function (res) {
|
|
12513
|
+
var _res$data = res.data,
|
|
12514
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12515
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12516
|
+
_res$data$total = _res$data.total,
|
|
12517
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12518
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12519
|
+
return _objectSpread2({}, item);
|
|
12520
|
+
});
|
|
12521
|
+
return {
|
|
12522
|
+
total: total,
|
|
12523
|
+
list: newProducts
|
|
12555
12524
|
};
|
|
12556
|
-
}
|
|
12557
|
-
};
|
|
12558
|
-
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
12559
|
-
var disabled = _ref4.disabled,
|
|
12560
|
-
updateHandle = _ref4.updateHandle,
|
|
12561
|
-
operate = _ref4.operate;
|
|
12562
|
-
return columns$3.map(function (item) {
|
|
12563
|
-
var newItem = _objectSpread2({
|
|
12564
|
-
align: 'center',
|
|
12565
|
-
ellipsis: true
|
|
12566
|
-
}, item);
|
|
12567
|
-
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
12568
|
-
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12569
|
-
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
12570
|
-
disabled: disabled,
|
|
12571
|
-
updateHandle: updateHandle
|
|
12572
|
-
})
|
|
12573
|
-
});
|
|
12574
|
-
}
|
|
12575
|
-
return newItem;
|
|
12576
12525
|
});
|
|
12577
12526
|
};
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12527
|
+
var columns$3 = [{
|
|
12528
|
+
dataIndex: 'index',
|
|
12529
|
+
title: 'NO',
|
|
12530
|
+
render: function render(val, record, index) {
|
|
12531
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12532
|
+
style: {
|
|
12533
|
+
width: 25
|
|
12534
|
+
}
|
|
12535
|
+
}, index + 1);
|
|
12536
|
+
},
|
|
12537
|
+
width: 80
|
|
12583
12538
|
}, {
|
|
12584
|
-
dataIndex: '
|
|
12585
|
-
title:
|
|
12586
|
-
width:
|
|
12539
|
+
dataIndex: 'specName',
|
|
12540
|
+
title: 'SKU名称',
|
|
12541
|
+
width: 250,
|
|
12542
|
+
ellipsis: true
|
|
12543
|
+
}, {
|
|
12544
|
+
dataIndex: 'specNo',
|
|
12545
|
+
title: 'SKU编码',
|
|
12546
|
+
width: 200,
|
|
12547
|
+
ellipsis: true
|
|
12587
12548
|
}, {
|
|
12588
12549
|
dataIndex: 'goodName',
|
|
12589
|
-
title:
|
|
12590
|
-
width: 250
|
|
12550
|
+
title: '商品名称',
|
|
12551
|
+
width: 250,
|
|
12552
|
+
ellipsis: true
|
|
12591
12553
|
}, {
|
|
12592
|
-
dataIndex: '
|
|
12593
|
-
title: "
|
|
12594
|
-
|
|
12554
|
+
dataIndex: 'goodShortName',
|
|
12555
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12556
|
+
ellipsis: true,
|
|
12557
|
+
width: 250
|
|
12595
12558
|
}, {
|
|
12596
|
-
dataIndex: '
|
|
12597
|
-
title:
|
|
12598
|
-
width:
|
|
12559
|
+
dataIndex: 'goodNo',
|
|
12560
|
+
title: '商品编码',
|
|
12561
|
+
width: 200,
|
|
12562
|
+
ellipsis: true
|
|
12599
12563
|
}, {
|
|
12600
|
-
dataIndex: '
|
|
12601
|
-
title:
|
|
12602
|
-
width:
|
|
12564
|
+
dataIndex: 'goodPicUrl',
|
|
12565
|
+
title: '商品图片',
|
|
12566
|
+
width: 100,
|
|
12567
|
+
render: function render(picUrl) {
|
|
12568
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
12569
|
+
style: {
|
|
12570
|
+
width: '40px',
|
|
12571
|
+
height: '40px',
|
|
12572
|
+
objectFit: 'contain'
|
|
12573
|
+
},
|
|
12574
|
+
src: picUrl
|
|
12575
|
+
});
|
|
12576
|
+
}
|
|
12603
12577
|
}, {
|
|
12604
|
-
dataIndex: '
|
|
12605
|
-
title:
|
|
12606
|
-
width:
|
|
12578
|
+
dataIndex: 'brandName',
|
|
12579
|
+
title: '品牌名称',
|
|
12580
|
+
width: 200,
|
|
12581
|
+
ellipsis: true
|
|
12607
12582
|
}, {
|
|
12608
|
-
dataIndex: '
|
|
12609
|
-
title: "\
|
|
12583
|
+
dataIndex: 'retailPrice',
|
|
12584
|
+
title: "\u6807\u51C6\u552E\u4EF7",
|
|
12585
|
+
ellipsis: true,
|
|
12610
12586
|
width: 100
|
|
12611
12587
|
}, {
|
|
12612
|
-
dataIndex: '
|
|
12613
|
-
title: "\
|
|
12614
|
-
|
|
12615
|
-
}, {
|
|
12616
|
-
dataIndex: 'giftType',
|
|
12617
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12588
|
+
dataIndex: 'costPrice',
|
|
12589
|
+
title: "\u6210\u672C\u4EF7",
|
|
12590
|
+
ellipsis: true,
|
|
12618
12591
|
width: 100
|
|
12619
12592
|
}];
|
|
12620
|
-
var
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12593
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12594
|
+
var _useState = useState([]),
|
|
12595
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12596
|
+
selectList = _useState2[0],
|
|
12597
|
+
setSelect = _useState2[1];
|
|
12598
|
+
var _useState3 = useState([]),
|
|
12599
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12600
|
+
selectIds = _useState4[0],
|
|
12601
|
+
setSelectIds = _useState4[1];
|
|
12602
|
+
useImperativeHandle(ref, function () {
|
|
12603
|
+
return {
|
|
12604
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12605
|
+
return selectList;
|
|
12606
|
+
}
|
|
12607
|
+
};
|
|
12608
|
+
});
|
|
12609
|
+
var _Form$useForm = Form.useForm(),
|
|
12610
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12611
|
+
form = _Form$useForm2[0];
|
|
12612
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
12613
|
+
defaultPageSize: 10,
|
|
12614
|
+
form: form
|
|
12615
|
+
}),
|
|
12616
|
+
tableProps = _useAntdTable.tableProps,
|
|
12617
|
+
search = _useAntdTable.search,
|
|
12618
|
+
params = _useAntdTable.params;
|
|
12619
|
+
var submit = search.submit,
|
|
12620
|
+
reset = search.reset;
|
|
12621
|
+
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12622
|
+
layout: "inline",
|
|
12623
|
+
form: form
|
|
12624
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12625
|
+
name: "skuName",
|
|
12626
|
+
style: {
|
|
12627
|
+
marginBottom: '12px'
|
|
12628
|
+
}
|
|
12629
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12630
|
+
placeholder: "\u5546\u54C1sku\u540D\u79F0",
|
|
12631
|
+
allowClear: true,
|
|
12632
|
+
style: {
|
|
12633
|
+
width: 150
|
|
12634
|
+
}
|
|
12635
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12636
|
+
name: "skuCode",
|
|
12637
|
+
style: {
|
|
12638
|
+
marginBottom: '12px'
|
|
12639
|
+
}
|
|
12640
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12641
|
+
placeholder: "\u5546\u54C1sku\u7F16\u7801",
|
|
12642
|
+
allowClear: true,
|
|
12643
|
+
style: {
|
|
12644
|
+
width: 150
|
|
12645
|
+
}
|
|
12646
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12647
|
+
name: "goodName",
|
|
12648
|
+
style: {
|
|
12649
|
+
marginBottom: '12px'
|
|
12650
|
+
}
|
|
12651
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12652
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12653
|
+
allowClear: true,
|
|
12654
|
+
style: {
|
|
12655
|
+
width: 150
|
|
12656
|
+
}
|
|
12657
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12658
|
+
name: "goodNo",
|
|
12659
|
+
style: {
|
|
12660
|
+
marginBottom: '12px'
|
|
12661
|
+
}
|
|
12662
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12663
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12664
|
+
allowClear: true,
|
|
12665
|
+
style: {
|
|
12666
|
+
width: 150
|
|
12667
|
+
}
|
|
12668
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12669
|
+
style: {
|
|
12670
|
+
marginBottom: '12px'
|
|
12671
|
+
}
|
|
12672
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12673
|
+
type: "primary",
|
|
12674
|
+
style: {
|
|
12675
|
+
marginRight: '8px'
|
|
12676
|
+
},
|
|
12677
|
+
onClick: submit
|
|
12678
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12679
|
+
onClick: reset
|
|
12680
|
+
}, "\u91CD\u7F6E")));
|
|
12681
|
+
var rowSelection = {
|
|
12682
|
+
selectedRowKeys: selectIds,
|
|
12683
|
+
fixed: true,
|
|
12684
|
+
onSelect: function onSelect(record, selected) {
|
|
12685
|
+
if (selected) {
|
|
12686
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12687
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12688
|
+
} else {
|
|
12689
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12690
|
+
return t !== record.specNo;
|
|
12691
|
+
}));
|
|
12692
|
+
setSelect(selectList.filter(function (t) {
|
|
12693
|
+
return t.specNo !== record.specNo;
|
|
12694
|
+
}));
|
|
12695
|
+
}
|
|
12696
|
+
},
|
|
12697
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12698
|
+
if (selected) {
|
|
12699
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12700
|
+
return t.specNo;
|
|
12701
|
+
}))));
|
|
12702
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12703
|
+
} else {
|
|
12704
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12705
|
+
return t.specNo;
|
|
12706
|
+
})));
|
|
12707
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12708
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12709
|
+
});
|
|
12710
|
+
setSelect(list);
|
|
12711
|
+
}
|
|
12712
|
+
}
|
|
12713
|
+
};
|
|
12714
|
+
var showTable = function showTable() {
|
|
12715
|
+
var handleDelete = function handleDelete(record) {
|
|
12716
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12717
|
+
return t !== record.specNo;
|
|
12718
|
+
}));
|
|
12719
|
+
setSelect(selectList.filter(function (t) {
|
|
12720
|
+
return t.specNo !== record.specNo;
|
|
12721
|
+
}));
|
|
12722
|
+
};
|
|
12723
|
+
var showColumns = [{
|
|
12724
|
+
dataIndex: '',
|
|
12725
|
+
title: "\u64CD\u4F5C",
|
|
12726
|
+
ellipsis: true,
|
|
12727
|
+
width: 100,
|
|
12728
|
+
render: function render(val, record) {
|
|
12729
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
12730
|
+
type: "link",
|
|
12731
|
+
onClick: function onClick() {
|
|
12732
|
+
return handleDelete(record);
|
|
12733
|
+
}
|
|
12734
|
+
}, "\u5220\u9664");
|
|
12735
|
+
}
|
|
12736
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
12737
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12738
|
+
style: {
|
|
12739
|
+
width: '100%',
|
|
12740
|
+
maxWidth: '387px'
|
|
12741
|
+
}
|
|
12742
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
12743
|
+
columns: showColumns,
|
|
12744
|
+
rowKey: 'specNo',
|
|
12745
|
+
dataSource: selectList,
|
|
12746
|
+
scroll: {
|
|
12747
|
+
x: '100%',
|
|
12748
|
+
y: 250
|
|
12749
|
+
},
|
|
12750
|
+
pagination: {
|
|
12751
|
+
size: 'small',
|
|
12752
|
+
total: selectIds.length,
|
|
12753
|
+
pageSize: 10,
|
|
12754
|
+
showSizeChanger: false
|
|
12755
|
+
}
|
|
12756
|
+
})) : null;
|
|
12757
|
+
};
|
|
12758
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12759
|
+
style: {
|
|
12760
|
+
marginTop: '4px'
|
|
12761
|
+
}
|
|
12762
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12763
|
+
rowSelection: rowSelection,
|
|
12764
|
+
rowKey: "specNo",
|
|
12765
|
+
columns: columns$3,
|
|
12766
|
+
scroll: {
|
|
12767
|
+
x: '100%',
|
|
12768
|
+
y: 250
|
|
12769
|
+
}
|
|
12770
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12771
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12772
|
+
return triggerNode.parentElement;
|
|
12773
|
+
},
|
|
12774
|
+
content: showTable(),
|
|
12775
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12776
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12777
|
+
danger: true,
|
|
12778
|
+
type: "text"
|
|
12779
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12780
|
+
};
|
|
12781
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
12782
|
+
|
|
12783
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12784
|
+
useImperativeHandle(ref, function () {
|
|
12785
|
+
return {
|
|
12786
|
+
open: function open() {
|
|
12787
|
+
setVisible(true);
|
|
12788
|
+
}
|
|
12789
|
+
};
|
|
12790
|
+
});
|
|
12791
|
+
var onSubmit = props.onSubmit,
|
|
12792
|
+
width = props.width;
|
|
12793
|
+
var _useState = useState(false),
|
|
12794
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12795
|
+
visible = _useState2[0],
|
|
12796
|
+
setVisible = _useState2[1];
|
|
12797
|
+
var gyGoodsListRef = useRef(null);
|
|
12798
|
+
var _onCancel = function onCancel() {
|
|
12799
|
+
setVisible(false);
|
|
12800
|
+
};
|
|
12801
|
+
var onOk = function onOk() {
|
|
12802
|
+
var _gyGoodsListRef$curre;
|
|
12803
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12804
|
+
onSubmit(selectedList);
|
|
12805
|
+
_onCancel();
|
|
12806
|
+
};
|
|
12807
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12808
|
+
title: '选择商品',
|
|
12809
|
+
okText: '确认',
|
|
12810
|
+
cancelText: '取消',
|
|
12811
|
+
visible: visible,
|
|
12812
|
+
width: width || 850,
|
|
12813
|
+
onCancel: function onCancel() {
|
|
12814
|
+
_onCancel();
|
|
12815
|
+
},
|
|
12816
|
+
onOk: onOk,
|
|
12817
|
+
wrapClassName: "goodModal"
|
|
12818
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
12819
|
+
ref: gyGoodsListRef
|
|
12820
|
+
})));
|
|
12821
|
+
};
|
|
12822
|
+
var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
12823
|
+
|
|
12824
|
+
var getColumns = function getColumns(_ref) {
|
|
12825
|
+
var _ref$text = _ref.text,
|
|
12826
|
+
disabled = _ref.disabled,
|
|
12827
|
+
updateHandle = _ref.updateHandle;
|
|
12828
|
+
return {
|
|
12829
|
+
//百胜E3补发商品
|
|
12830
|
+
BS_E3_REISSUE_GOODS: [{
|
|
12831
|
+
dataIndex: 'sku',
|
|
12832
|
+
title: "SKU",
|
|
12833
|
+
width: 150
|
|
12834
|
+
}, {
|
|
12835
|
+
dataIndex: 'skuId',
|
|
12836
|
+
title: "SKU ID",
|
|
12837
|
+
width: 150
|
|
12838
|
+
}, {
|
|
12839
|
+
dataIndex: 'goodsName',
|
|
12840
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12841
|
+
width: 150
|
|
12842
|
+
}, {
|
|
12843
|
+
dataIndex: 'goodsShortName',
|
|
12844
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12845
|
+
width: 150
|
|
12846
|
+
}, {
|
|
12847
|
+
dataIndex: 'picPath',
|
|
12848
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12849
|
+
width: 150,
|
|
12850
|
+
render: function render(val) {
|
|
12851
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12852
|
+
width: 60,
|
|
12853
|
+
src: val
|
|
12854
|
+
});
|
|
12855
|
+
}
|
|
12856
|
+
}, {
|
|
12857
|
+
dataIndex: 'goodsSn',
|
|
12858
|
+
title: "\u8D27\u53F7",
|
|
12859
|
+
width: 150
|
|
12860
|
+
}, {
|
|
12861
|
+
dataIndex: 'goodsId',
|
|
12862
|
+
title: "\u8D27\u53F7ID",
|
|
12863
|
+
width: 150
|
|
12864
|
+
}, {
|
|
12865
|
+
dataIndex: 'colorName',
|
|
12866
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12867
|
+
width: 150
|
|
12868
|
+
}, {
|
|
12869
|
+
dataIndex: 'colorCode',
|
|
12870
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12871
|
+
width: 150
|
|
12872
|
+
}, {
|
|
12873
|
+
dataIndex: 'sizeName',
|
|
12874
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12875
|
+
width: 150
|
|
12876
|
+
}, {
|
|
12877
|
+
dataIndex: 'sizeCode',
|
|
12878
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12879
|
+
width: 150
|
|
12880
|
+
}, {
|
|
12881
|
+
dataIndex: 'brandName',
|
|
12882
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12883
|
+
width: 150
|
|
12884
|
+
}, {
|
|
12885
|
+
dataIndex: 'goodsNumber',
|
|
12886
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12887
|
+
width: 150
|
|
12888
|
+
}, {
|
|
12889
|
+
dataIndex: 'goodsPrice',
|
|
12890
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12891
|
+
width: 150
|
|
12892
|
+
}, {
|
|
12893
|
+
dataIndex: 'shopPrice',
|
|
12894
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12895
|
+
width: 150
|
|
12896
|
+
}, {
|
|
12897
|
+
dataIndex: 'isGift',
|
|
12898
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12899
|
+
width: 150,
|
|
12900
|
+
render: function render(val) {
|
|
12901
|
+
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12902
|
+
}
|
|
12903
|
+
}],
|
|
12904
|
+
//百胜E3商品信息
|
|
12905
|
+
BS_E3_GOODS: [{
|
|
12906
|
+
dataIndex: 'sku',
|
|
12907
|
+
title: "SKU",
|
|
12908
|
+
align: 'center',
|
|
12909
|
+
ellipsis: true,
|
|
12910
|
+
width: 150
|
|
12911
|
+
}, {
|
|
12912
|
+
dataIndex: 'skuId',
|
|
12913
|
+
title: "SKU ID",
|
|
12914
|
+
align: 'center',
|
|
12915
|
+
ellipsis: true,
|
|
12916
|
+
width: 150
|
|
12917
|
+
}, {
|
|
12918
|
+
dataIndex: 'goodsName',
|
|
12919
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12920
|
+
align: 'center',
|
|
12921
|
+
ellipsis: true,
|
|
12922
|
+
width: 150
|
|
12923
|
+
}, {
|
|
12924
|
+
dataIndex: 'goodsShortName',
|
|
12925
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12926
|
+
align: 'center',
|
|
12927
|
+
ellipsis: true,
|
|
12928
|
+
width: 100
|
|
12929
|
+
}, {
|
|
12930
|
+
dataIndex: 'picPath',
|
|
12931
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12932
|
+
align: 'center',
|
|
12933
|
+
ellipsis: true,
|
|
12934
|
+
width: 100,
|
|
12935
|
+
render: function render(val) {
|
|
12936
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12937
|
+
width: 60,
|
|
12938
|
+
src: val
|
|
12939
|
+
});
|
|
12940
|
+
}
|
|
12941
|
+
}, {
|
|
12942
|
+
dataIndex: 'goodsSn',
|
|
12943
|
+
title: "\u8D27\u53F7",
|
|
12944
|
+
align: 'center',
|
|
12945
|
+
ellipsis: true,
|
|
12946
|
+
width: 150
|
|
12947
|
+
}, {
|
|
12948
|
+
dataIndex: 'goodsId',
|
|
12949
|
+
title: "\u8D27\u53F7ID",
|
|
12950
|
+
align: 'center',
|
|
12951
|
+
ellipsis: true,
|
|
12952
|
+
width: 150
|
|
12953
|
+
}, {
|
|
12954
|
+
dataIndex: 'colorName',
|
|
12955
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12956
|
+
align: 'center',
|
|
12957
|
+
ellipsis: true,
|
|
12958
|
+
width: 100
|
|
12959
|
+
}, {
|
|
12960
|
+
dataIndex: 'colorCode',
|
|
12961
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12962
|
+
align: 'center',
|
|
12963
|
+
ellipsis: true,
|
|
12964
|
+
width: 150
|
|
12965
|
+
}, {
|
|
12966
|
+
dataIndex: 'sizeName',
|
|
12967
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12968
|
+
align: 'center',
|
|
12969
|
+
ellipsis: true,
|
|
12970
|
+
width: 100
|
|
12971
|
+
}, {
|
|
12972
|
+
dataIndex: 'sizeCode',
|
|
12973
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12974
|
+
align: 'center',
|
|
12975
|
+
ellipsis: true,
|
|
12976
|
+
width: 100
|
|
12977
|
+
}, {
|
|
12978
|
+
dataIndex: 'brandName',
|
|
12979
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12980
|
+
align: 'center',
|
|
12981
|
+
ellipsis: true,
|
|
12982
|
+
width: 150
|
|
12983
|
+
}, {
|
|
12984
|
+
dataIndex: 'goodsNumber',
|
|
12985
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12986
|
+
align: 'center',
|
|
12987
|
+
ellipsis: true,
|
|
12988
|
+
width: 100,
|
|
12989
|
+
render: function render(val, record, index) {
|
|
12990
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12991
|
+
style: {
|
|
12992
|
+
width: 70
|
|
12993
|
+
},
|
|
12994
|
+
value: val,
|
|
12995
|
+
min: 1,
|
|
12996
|
+
precision: 0,
|
|
12997
|
+
onChange: function onChange(num) {
|
|
12998
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12999
|
+
}
|
|
13000
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13001
|
+
}
|
|
13002
|
+
}, {
|
|
13003
|
+
dataIndex: 'goodsPrice',
|
|
13004
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13005
|
+
align: 'center',
|
|
13006
|
+
ellipsis: true,
|
|
13007
|
+
width: 120,
|
|
13008
|
+
render: function render(val, record, index) {
|
|
13009
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13010
|
+
style: {
|
|
13011
|
+
width: 70
|
|
13012
|
+
},
|
|
13013
|
+
value: val,
|
|
13014
|
+
min: 0,
|
|
13015
|
+
precision: 2,
|
|
13016
|
+
onChange: function onChange(num) {
|
|
13017
|
+
return updateHandle(num, index, 'goodsPrice');
|
|
13018
|
+
}
|
|
13019
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13020
|
+
}
|
|
13021
|
+
}, {
|
|
13022
|
+
dataIndex: 'shopPrice',
|
|
13023
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13024
|
+
align: 'center',
|
|
13025
|
+
ellipsis: true,
|
|
13026
|
+
width: 120
|
|
13027
|
+
}, {
|
|
13028
|
+
dataIndex: 'sharePrice',
|
|
13029
|
+
title: "\u5206\u644A\u4EF7",
|
|
13030
|
+
align: 'center',
|
|
13031
|
+
ellipsis: true,
|
|
13032
|
+
width: 120
|
|
13033
|
+
}, {
|
|
13034
|
+
dataIndex: 'sharePayment',
|
|
13035
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13036
|
+
align: 'center',
|
|
13037
|
+
ellipsis: true,
|
|
13038
|
+
width: 120
|
|
13039
|
+
}, {
|
|
13040
|
+
dataIndex: 'payment',
|
|
13041
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13042
|
+
align: 'center',
|
|
13043
|
+
ellipsis: true,
|
|
13044
|
+
width: 120,
|
|
13045
|
+
render: function render(val, record, index) {
|
|
13046
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13047
|
+
style: {
|
|
13048
|
+
width: 70
|
|
13049
|
+
},
|
|
13050
|
+
value: val,
|
|
13051
|
+
min: 0,
|
|
13052
|
+
precision: 2,
|
|
13053
|
+
onChange: function onChange(num) {
|
|
13054
|
+
return updateHandle(num, index, 'payment');
|
|
13055
|
+
}
|
|
13056
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13057
|
+
}
|
|
13058
|
+
}, {
|
|
13059
|
+
dataIndex: 'tcSku',
|
|
13060
|
+
title: "\u5957\u9910SKU",
|
|
13061
|
+
align: 'center',
|
|
13062
|
+
ellipsis: true,
|
|
13063
|
+
width: 150
|
|
13064
|
+
}, {
|
|
13065
|
+
dataIndex: 'tcGoodsNumber',
|
|
13066
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
13067
|
+
align: 'center',
|
|
13068
|
+
ellipsis: true,
|
|
13069
|
+
width: 100
|
|
13070
|
+
}, {
|
|
13071
|
+
dataIndex: 'taoCanSingleSl',
|
|
13072
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13073
|
+
align: 'center',
|
|
13074
|
+
ellipsis: true,
|
|
13075
|
+
width: 100
|
|
13076
|
+
}, {
|
|
13077
|
+
dataIndex: 'isGift',
|
|
13078
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13079
|
+
align: 'center',
|
|
13080
|
+
ellipsis: true,
|
|
13081
|
+
width: 100,
|
|
13082
|
+
render: function render(val) {
|
|
13083
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13084
|
+
}
|
|
13085
|
+
}]
|
|
13086
|
+
};
|
|
13087
|
+
};
|
|
13088
|
+
|
|
13089
|
+
var getColumns$1 = function getColumns(_ref) {
|
|
13090
|
+
var _ref$text = _ref.text,
|
|
13091
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13092
|
+
disabled = _ref.disabled,
|
|
13093
|
+
updateHandle = _ref.updateHandle;
|
|
13094
|
+
return {
|
|
13095
|
+
//bs商品信息
|
|
13096
|
+
BS_GOODS: [{
|
|
13097
|
+
dataIndex: 'mark',
|
|
13098
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
13099
|
+
align: 'center',
|
|
13100
|
+
ellipsis: true,
|
|
13101
|
+
width: 70,
|
|
13102
|
+
render: function render(val, record, index) {
|
|
13103
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
13104
|
+
options: [{
|
|
13105
|
+
label: '是',
|
|
13106
|
+
value: '是'
|
|
13107
|
+
}, {
|
|
13108
|
+
label: '否',
|
|
13109
|
+
value: '否'
|
|
13110
|
+
}],
|
|
13111
|
+
disabled: disabled,
|
|
13112
|
+
value: val,
|
|
13113
|
+
onChange: function onChange(val) {
|
|
13114
|
+
return updateHandle(val, index, 'mark');
|
|
13115
|
+
}
|
|
13116
|
+
});
|
|
13117
|
+
}
|
|
13118
|
+
}, {
|
|
13119
|
+
dataIndex: 'skuName',
|
|
13120
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13121
|
+
align: 'center',
|
|
13122
|
+
ellipsis: true,
|
|
13123
|
+
width: 250
|
|
13124
|
+
}, {
|
|
13125
|
+
dataIndex: 'sku',
|
|
13126
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13127
|
+
align: 'center',
|
|
13128
|
+
ellipsis: true,
|
|
13129
|
+
width: 100
|
|
13130
|
+
}, {
|
|
13131
|
+
dataIndex: 'name',
|
|
13132
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13133
|
+
align: 'center',
|
|
13134
|
+
ellipsis: true,
|
|
13135
|
+
width: 250
|
|
13136
|
+
}, {
|
|
13137
|
+
dataIndex: 'pic',
|
|
13138
|
+
title: "\u56FE\u7247",
|
|
13139
|
+
align: 'center',
|
|
13140
|
+
ellipsis: true,
|
|
13141
|
+
width: 100,
|
|
13142
|
+
render: function render(val) {
|
|
13143
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
13144
|
+
width: 60,
|
|
13145
|
+
src: val
|
|
13146
|
+
});
|
|
13147
|
+
}
|
|
13148
|
+
}, {
|
|
13149
|
+
dataIndex: 'code',
|
|
13150
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13151
|
+
align: 'center',
|
|
13152
|
+
ellipsis: true,
|
|
13153
|
+
width: 100
|
|
13154
|
+
}, {
|
|
13155
|
+
dataIndex: 'money',
|
|
13156
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13157
|
+
align: 'center',
|
|
13158
|
+
ellipsis: true,
|
|
13159
|
+
width: 100
|
|
13160
|
+
}, {
|
|
13161
|
+
dataIndex: 'number',
|
|
13162
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13163
|
+
align: 'center',
|
|
13164
|
+
ellipsis: true,
|
|
13165
|
+
width: 100,
|
|
13166
|
+
render: function render(val, record, index) {
|
|
13167
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13168
|
+
style: {
|
|
13169
|
+
width: 70
|
|
13170
|
+
},
|
|
13171
|
+
value: val,
|
|
13172
|
+
min: 1,
|
|
13173
|
+
precision: 0,
|
|
13174
|
+
onChange: function onChange(num) {
|
|
13175
|
+
return updateHandle(num, index, 'number');
|
|
13176
|
+
}
|
|
13177
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13178
|
+
}
|
|
13179
|
+
}, {
|
|
13180
|
+
dataIndex: 'share',
|
|
13181
|
+
title: "\u5206\u644A\u4EF7",
|
|
13182
|
+
align: 'center',
|
|
13183
|
+
ellipsis: true,
|
|
13184
|
+
width: 70
|
|
13185
|
+
}, {
|
|
13186
|
+
dataIndex: 'type',
|
|
13187
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13188
|
+
align: 'center',
|
|
13189
|
+
ellipsis: true,
|
|
13190
|
+
width: 100
|
|
13191
|
+
}, {
|
|
13192
|
+
dataIndex: 'batch',
|
|
13193
|
+
title: "\u6279\u6B21\u53F7",
|
|
13194
|
+
align: 'center',
|
|
13195
|
+
ellipsis: true,
|
|
13196
|
+
width: 100
|
|
13197
|
+
}, {
|
|
13198
|
+
dataIndex: 'expireDate',
|
|
13199
|
+
title: "\u6709\u6548\u671F",
|
|
13200
|
+
align: 'center',
|
|
13201
|
+
ellipsis: true,
|
|
13202
|
+
width: 100
|
|
13203
|
+
}]
|
|
13204
|
+
};
|
|
13205
|
+
};
|
|
13206
|
+
|
|
13207
|
+
var renderGiftType = function renderGiftType(val) {
|
|
13208
|
+
var giftTypeMap = {
|
|
13209
|
+
0: '非赠品',
|
|
13210
|
+
1: '自动赠送',
|
|
13211
|
+
2: '手工赠送',
|
|
13212
|
+
3: '回购自动送赠品',
|
|
13213
|
+
4: '前N有礼送赠品',
|
|
13214
|
+
6: '天猫优仓赠品',
|
|
13215
|
+
7: '淘宝CRM会员送赠'
|
|
13216
|
+
};
|
|
13217
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13218
|
+
};
|
|
13219
|
+
var renderFieldMap = {
|
|
13220
|
+
num: function num(_ref) {
|
|
13221
|
+
var disabled = _ref.disabled,
|
|
13222
|
+
updateHandle = _ref.updateHandle;
|
|
13223
|
+
return function (val, record, index) {
|
|
13224
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13225
|
+
style: {
|
|
13226
|
+
width: 70
|
|
13227
|
+
},
|
|
13228
|
+
value: val,
|
|
13229
|
+
min: 1,
|
|
13230
|
+
precision: 0,
|
|
13231
|
+
onChange: function onChange(num) {
|
|
13232
|
+
return updateHandle(num, index, 'num');
|
|
13233
|
+
}
|
|
13234
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13235
|
+
};
|
|
13236
|
+
},
|
|
13237
|
+
giftType: function giftType() {
|
|
13238
|
+
return renderGiftType;
|
|
13239
|
+
}
|
|
13240
|
+
};
|
|
13241
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
13242
|
+
var disabled = _ref2.disabled,
|
|
13243
|
+
updateHandle = _ref2.updateHandle,
|
|
13244
|
+
operate = _ref2.operate;
|
|
13245
|
+
return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
|
|
13246
|
+
var newItem = _objectSpread2({
|
|
13247
|
+
align: 'center',
|
|
13248
|
+
ellipsis: true
|
|
13249
|
+
}, item);
|
|
13250
|
+
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
13251
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
13252
|
+
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
13253
|
+
disabled: disabled,
|
|
13254
|
+
updateHandle: updateHandle
|
|
13255
|
+
})
|
|
13256
|
+
});
|
|
13257
|
+
}
|
|
13258
|
+
return newItem;
|
|
13259
|
+
});
|
|
13260
|
+
};
|
|
13261
|
+
|
|
13262
|
+
var getColumns$2 = function getColumns(_ref) {
|
|
13263
|
+
var _ref$text = _ref.text,
|
|
13264
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13265
|
+
disabled = _ref.disabled,
|
|
13266
|
+
updateHandle = _ref.updateHandle;
|
|
13267
|
+
return {
|
|
13268
|
+
//旺店通补发商品信息
|
|
13269
|
+
WDT_REISSUE_GOODS: [{
|
|
13270
|
+
dataIndex: 'goodId',
|
|
13271
|
+
title: "\u5546\u54C1ID",
|
|
13272
|
+
width: 120
|
|
13273
|
+
}, {
|
|
13274
|
+
dataIndex: 'goodNo',
|
|
13275
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13276
|
+
width: 200
|
|
13277
|
+
}, {
|
|
13278
|
+
dataIndex: 'goodName',
|
|
13279
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13280
|
+
width: 200
|
|
13281
|
+
}, {
|
|
13282
|
+
dataIndex: 'specId',
|
|
13283
|
+
title: "SKUID",
|
|
13284
|
+
width: 150
|
|
13285
|
+
}, {
|
|
13286
|
+
dataIndex: 'specNo',
|
|
13287
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
13288
|
+
width: 200
|
|
13289
|
+
}, {
|
|
13290
|
+
dataIndex: 'specName',
|
|
13291
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
13292
|
+
width: 250
|
|
13293
|
+
}, {
|
|
13294
|
+
dataIndex: 'orderPrice',
|
|
13295
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13296
|
+
width: 200
|
|
13297
|
+
}, {
|
|
13298
|
+
dataIndex: 'num',
|
|
13299
|
+
title: "\u6570\u91CF",
|
|
13300
|
+
width: 100
|
|
13301
|
+
}, {
|
|
13302
|
+
dataIndex: 'sharePrice',
|
|
13303
|
+
title: "\u5206\u644A\u4EF7",
|
|
13304
|
+
width: 150
|
|
13305
|
+
}, {
|
|
13306
|
+
dataIndex: 'giftType',
|
|
13307
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13308
|
+
width: 100,
|
|
13309
|
+
render: renderGiftType
|
|
13310
|
+
}],
|
|
13311
|
+
//旺店通商品信息
|
|
13312
|
+
WDT_GOODS: [{
|
|
13313
|
+
dataIndex: 'goodId',
|
|
13314
|
+
title: "\u5546\u54C1ID",
|
|
13315
|
+
align: 'center',
|
|
13316
|
+
ellipsis: true,
|
|
13317
|
+
width: 70
|
|
13318
|
+
}, {
|
|
13319
|
+
dataIndex: 'goodNo',
|
|
13320
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13321
|
+
align: 'center',
|
|
13322
|
+
ellipsis: true,
|
|
13323
|
+
width: 180
|
|
13324
|
+
}, {
|
|
13325
|
+
dataIndex: 'goodName',
|
|
13326
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13327
|
+
align: 'center',
|
|
13328
|
+
ellipsis: true,
|
|
13329
|
+
width: 250
|
|
13330
|
+
}, {
|
|
13331
|
+
dataIndex: 'specId',
|
|
13332
|
+
title: "".concat(text, "SKUID"),
|
|
13333
|
+
align: 'center',
|
|
13334
|
+
ellipsis: true,
|
|
13335
|
+
width: 100
|
|
13336
|
+
}, {
|
|
13337
|
+
dataIndex: 'specNo',
|
|
13338
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13339
|
+
align: 'center',
|
|
13340
|
+
ellipsis: true,
|
|
13341
|
+
width: 180
|
|
13342
|
+
}, {
|
|
13343
|
+
dataIndex: 'specName',
|
|
13344
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13345
|
+
align: 'center',
|
|
13346
|
+
ellipsis: true,
|
|
13347
|
+
width: 250
|
|
13348
|
+
}, {
|
|
13349
|
+
dataIndex: 'orderPrice',
|
|
13350
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13351
|
+
align: 'center',
|
|
13352
|
+
ellipsis: true,
|
|
13353
|
+
width: 100
|
|
13354
|
+
}, {
|
|
13355
|
+
dataIndex: 'num',
|
|
13356
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13357
|
+
align: 'center',
|
|
13358
|
+
ellipsis: true,
|
|
13359
|
+
width: 100,
|
|
13360
|
+
render: function render(val, record, index) {
|
|
13361
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13362
|
+
style: {
|
|
13363
|
+
width: 70
|
|
13364
|
+
},
|
|
13365
|
+
value: val,
|
|
13366
|
+
min: 1,
|
|
13367
|
+
precision: 0,
|
|
13368
|
+
onChange: function onChange(num) {
|
|
13369
|
+
return updateHandle(num, index, 'num');
|
|
13370
|
+
}
|
|
13371
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13372
|
+
}
|
|
13373
|
+
}, {
|
|
13374
|
+
dataIndex: 'sharePrice',
|
|
13375
|
+
title: "\u5206\u644A\u4EF7",
|
|
13376
|
+
align: 'center',
|
|
13377
|
+
ellipsis: true,
|
|
13378
|
+
width: 70
|
|
13379
|
+
}, {
|
|
13380
|
+
dataIndex: 'giftType',
|
|
13381
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13382
|
+
align: 'center',
|
|
13383
|
+
ellipsis: true,
|
|
13384
|
+
width: 100,
|
|
13385
|
+
render: function render(val) {
|
|
13386
|
+
var giftTypeMap = {
|
|
13387
|
+
0: '非赠品',
|
|
13388
|
+
1: '自动赠送',
|
|
13389
|
+
2: '手工赠送',
|
|
13390
|
+
3: '回购自动送赠品',
|
|
13391
|
+
4: '前N有礼送赠品',
|
|
13392
|
+
6: '天猫优仓赠品',
|
|
13393
|
+
7: '淘宝CRM会员送赠'
|
|
13394
|
+
};
|
|
13395
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13396
|
+
}
|
|
13397
|
+
}],
|
|
13398
|
+
//旺店通退货商品信息
|
|
13399
|
+
WDT_RETURN_GOODS: [{
|
|
13400
|
+
dataIndex: 'goodId',
|
|
13401
|
+
title: "\u5546\u54C1ID",
|
|
13402
|
+
align: 'center',
|
|
13403
|
+
ellipsis: true,
|
|
13404
|
+
width: 70
|
|
13405
|
+
}, {
|
|
13406
|
+
dataIndex: 'goodNo',
|
|
13407
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13408
|
+
align: 'center',
|
|
13409
|
+
ellipsis: true,
|
|
13410
|
+
width: 180
|
|
13411
|
+
}, {
|
|
13412
|
+
dataIndex: 'goodName',
|
|
13413
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13414
|
+
align: 'center',
|
|
13415
|
+
ellipsis: true,
|
|
13416
|
+
width: 250
|
|
13417
|
+
}, {
|
|
13418
|
+
dataIndex: 'specId',
|
|
13419
|
+
title: "".concat(text, "SKUID"),
|
|
13420
|
+
align: 'center',
|
|
13421
|
+
ellipsis: true,
|
|
13422
|
+
width: 100
|
|
13423
|
+
}, {
|
|
13424
|
+
dataIndex: 'specNo',
|
|
13425
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13426
|
+
align: 'center',
|
|
13427
|
+
ellipsis: true,
|
|
13428
|
+
width: 180
|
|
13429
|
+
}, {
|
|
13430
|
+
dataIndex: 'specName',
|
|
13431
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13432
|
+
align: 'center',
|
|
13433
|
+
ellipsis: true,
|
|
13434
|
+
width: 250
|
|
13435
|
+
}, {
|
|
13436
|
+
dataIndex: 'num',
|
|
13437
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
13438
|
+
align: 'center',
|
|
13439
|
+
ellipsis: true,
|
|
13440
|
+
width: 100,
|
|
13441
|
+
render: function render(val, record, index) {
|
|
13442
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13443
|
+
style: {
|
|
13444
|
+
width: 70
|
|
13445
|
+
},
|
|
13446
|
+
value: val,
|
|
13447
|
+
min: 1,
|
|
13448
|
+
precision: 0,
|
|
13449
|
+
onChange: function onChange(num) {
|
|
13450
|
+
return updateHandle(num, index, 'num');
|
|
13451
|
+
}
|
|
13452
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13453
|
+
}
|
|
13454
|
+
}, {
|
|
13455
|
+
dataIndex: 'sharePrice',
|
|
13456
|
+
title: "\u5206\u644A\u4EF7",
|
|
13457
|
+
align: 'center',
|
|
13458
|
+
ellipsis: true,
|
|
13459
|
+
width: 80,
|
|
13460
|
+
render: function render(val, record, index) {
|
|
13461
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13462
|
+
style: {
|
|
13463
|
+
width: 70
|
|
13464
|
+
},
|
|
13465
|
+
value: val,
|
|
13466
|
+
min: 0,
|
|
13467
|
+
onChange: function onChange(value) {
|
|
13468
|
+
return updateHandle(value, index, 'sharePrice');
|
|
13469
|
+
}
|
|
13470
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13471
|
+
}
|
|
13472
|
+
}, {
|
|
13473
|
+
dataIndex: 'returnPrice',
|
|
13474
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13475
|
+
align: 'center',
|
|
13476
|
+
ellipsis: true,
|
|
13477
|
+
width: 100
|
|
13478
|
+
}, {
|
|
13479
|
+
dataIndex: 'giftType',
|
|
13480
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13481
|
+
align: 'center',
|
|
13482
|
+
ellipsis: true,
|
|
13483
|
+
width: 100,
|
|
13484
|
+
render: function render(val) {
|
|
13485
|
+
var giftTypeMap = {
|
|
13486
|
+
0: '非赠品',
|
|
13487
|
+
1: '自动赠送',
|
|
13488
|
+
2: '手工赠送',
|
|
13489
|
+
3: '回购自动送赠品',
|
|
13490
|
+
4: '前N有礼送赠品',
|
|
13491
|
+
6: '天猫优仓赠品',
|
|
13492
|
+
7: '淘宝CRM会员送赠'
|
|
13493
|
+
};
|
|
13494
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13495
|
+
}
|
|
13496
|
+
}, {
|
|
13497
|
+
dataIndex: 'type',
|
|
13498
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13499
|
+
align: 'center',
|
|
13500
|
+
ellipsis: true,
|
|
13501
|
+
width: 100,
|
|
13502
|
+
render: function render(val, record, index) {
|
|
13503
|
+
var options = [{
|
|
13504
|
+
label: '单品',
|
|
13505
|
+
value: '1'
|
|
13506
|
+
}, {
|
|
13507
|
+
label: '组合装',
|
|
13508
|
+
value: '2'
|
|
13509
|
+
}];
|
|
13510
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13511
|
+
style: {
|
|
13512
|
+
width: 70
|
|
13513
|
+
},
|
|
13514
|
+
options: options,
|
|
13515
|
+
value: val,
|
|
13516
|
+
onChange: function onChange(value) {
|
|
13517
|
+
return updateHandle(value, index, 'type');
|
|
13518
|
+
}
|
|
13519
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13520
|
+
}
|
|
13521
|
+
}],
|
|
13522
|
+
//旺店通换出商品信息
|
|
13523
|
+
WDT_EXCHANGE_GOODS: [{
|
|
13524
|
+
dataIndex: 'goodId',
|
|
13525
|
+
title: "\u5546\u54C1ID",
|
|
13526
|
+
align: 'center',
|
|
13527
|
+
ellipsis: true,
|
|
13528
|
+
width: 70
|
|
13529
|
+
}, {
|
|
13530
|
+
dataIndex: 'goodNo',
|
|
13531
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13532
|
+
align: 'center',
|
|
13533
|
+
ellipsis: true,
|
|
13534
|
+
width: 180
|
|
13535
|
+
}, {
|
|
13536
|
+
dataIndex: 'goodName',
|
|
13537
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13538
|
+
align: 'center',
|
|
13539
|
+
ellipsis: true,
|
|
13540
|
+
width: 250
|
|
13541
|
+
}, {
|
|
13542
|
+
dataIndex: 'specId',
|
|
13543
|
+
title: "".concat(text, "SKUID"),
|
|
13544
|
+
align: 'center',
|
|
13545
|
+
ellipsis: true,
|
|
13546
|
+
width: 100
|
|
13547
|
+
}, {
|
|
13548
|
+
dataIndex: 'specNo',
|
|
13549
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13550
|
+
align: 'center',
|
|
13551
|
+
ellipsis: true,
|
|
13552
|
+
width: 180
|
|
13553
|
+
}, {
|
|
13554
|
+
dataIndex: 'specName',
|
|
13555
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13556
|
+
align: 'center',
|
|
13557
|
+
ellipsis: true,
|
|
13558
|
+
width: 250
|
|
13559
|
+
}, {
|
|
13560
|
+
dataIndex: 'num',
|
|
13561
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13562
|
+
align: 'center',
|
|
13563
|
+
ellipsis: true,
|
|
13564
|
+
width: 100,
|
|
13565
|
+
render: function render(val, record, index) {
|
|
13566
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13567
|
+
style: {
|
|
13568
|
+
width: 70
|
|
13569
|
+
},
|
|
13570
|
+
value: val,
|
|
13571
|
+
min: 1,
|
|
13572
|
+
precision: 0,
|
|
13573
|
+
onChange: function onChange(num) {
|
|
13574
|
+
return updateHandle(num, index, 'num');
|
|
13575
|
+
}
|
|
13576
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13577
|
+
}
|
|
13578
|
+
}, {
|
|
13579
|
+
dataIndex: 'price',
|
|
13580
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13581
|
+
align: 'center',
|
|
13582
|
+
ellipsis: true,
|
|
13583
|
+
width: 100,
|
|
13584
|
+
render: function render(val, record, index) {
|
|
13585
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13586
|
+
style: {
|
|
13587
|
+
width: 70
|
|
13588
|
+
},
|
|
13589
|
+
value: val,
|
|
13590
|
+
min: 0,
|
|
13591
|
+
onChange: function onChange(value) {
|
|
13592
|
+
return updateHandle(value, index, 'price');
|
|
13593
|
+
}
|
|
13594
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13595
|
+
}
|
|
13596
|
+
}, {
|
|
13597
|
+
dataIndex: 'exchangePrice',
|
|
13598
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13599
|
+
align: 'center',
|
|
13600
|
+
ellipsis: true,
|
|
13601
|
+
width: 100
|
|
13602
|
+
}, {
|
|
13603
|
+
dataIndex: 'giftType',
|
|
13604
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13605
|
+
align: 'center',
|
|
13606
|
+
ellipsis: true,
|
|
13607
|
+
width: 100,
|
|
13608
|
+
render: function render(val) {
|
|
13609
|
+
var giftTypeMap = {
|
|
13610
|
+
0: '非赠品',
|
|
13611
|
+
1: '自动赠送',
|
|
13612
|
+
2: '手工赠送',
|
|
13613
|
+
3: '回购自动送赠品',
|
|
13614
|
+
4: '前N有礼送赠品',
|
|
13615
|
+
6: '天猫优仓赠品',
|
|
13616
|
+
7: '淘宝CRM会员送赠'
|
|
13617
|
+
};
|
|
13618
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13619
|
+
}
|
|
13620
|
+
}, {
|
|
13621
|
+
dataIndex: 'type',
|
|
13622
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13623
|
+
align: 'center',
|
|
13624
|
+
ellipsis: true,
|
|
13625
|
+
width: 100,
|
|
13626
|
+
render: function render(val, record, index) {
|
|
13627
|
+
var options = [{
|
|
13628
|
+
label: '单品',
|
|
13629
|
+
value: '1'
|
|
13630
|
+
}, {
|
|
13631
|
+
label: '组合装',
|
|
13632
|
+
value: '2'
|
|
13633
|
+
}];
|
|
13634
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13635
|
+
style: {
|
|
13636
|
+
width: 70
|
|
13637
|
+
},
|
|
13638
|
+
options: options,
|
|
13639
|
+
value: val,
|
|
13640
|
+
onChange: function onChange(value) {
|
|
13641
|
+
return updateHandle(value, index, 'type');
|
|
13642
|
+
}
|
|
13643
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13644
|
+
}
|
|
13645
|
+
}]
|
|
13646
|
+
};
|
|
13647
|
+
};
|
|
13648
|
+
|
|
13649
|
+
var getColumns$3 = function getColumns(_ref) {
|
|
13650
|
+
var _ref$text = _ref.text,
|
|
13651
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13652
|
+
disabled = _ref.disabled,
|
|
13653
|
+
updateHandle = _ref.updateHandle;
|
|
13654
|
+
return {
|
|
13655
|
+
//万里牛商品信息
|
|
13656
|
+
WLN_GOODS: [{
|
|
13657
|
+
dataIndex: 'skuName',
|
|
13658
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13659
|
+
align: 'center',
|
|
13660
|
+
ellipsis: true,
|
|
13661
|
+
width: 250
|
|
13662
|
+
}, {
|
|
13663
|
+
dataIndex: 'sku',
|
|
13664
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13665
|
+
align: 'center',
|
|
13666
|
+
ellipsis: true,
|
|
13667
|
+
width: 100
|
|
13668
|
+
}, {
|
|
13669
|
+
dataIndex: 'name',
|
|
13670
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13671
|
+
align: 'center',
|
|
13672
|
+
ellipsis: true,
|
|
13673
|
+
width: 250
|
|
13674
|
+
}, {
|
|
13675
|
+
dataIndex: 'pic',
|
|
13676
|
+
title: "\u56FE\u7247",
|
|
13677
|
+
align: 'center',
|
|
13678
|
+
ellipsis: true,
|
|
13679
|
+
width: 100,
|
|
13680
|
+
render: function render(val) {
|
|
13681
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
13682
|
+
width: 60,
|
|
13683
|
+
src: val
|
|
13684
|
+
});
|
|
13685
|
+
}
|
|
13686
|
+
}, {
|
|
13687
|
+
dataIndex: 'code',
|
|
13688
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13689
|
+
align: 'center',
|
|
13690
|
+
ellipsis: true,
|
|
13691
|
+
width: 100
|
|
13692
|
+
}, {
|
|
13693
|
+
dataIndex: 'money',
|
|
13694
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13695
|
+
align: 'center',
|
|
13696
|
+
ellipsis: true,
|
|
13697
|
+
width: 100
|
|
13698
|
+
}, {
|
|
13699
|
+
dataIndex: 'number',
|
|
13700
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13701
|
+
align: 'center',
|
|
13702
|
+
ellipsis: true,
|
|
13703
|
+
width: 100,
|
|
13704
|
+
render: function render(val, record, index) {
|
|
13705
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13706
|
+
style: {
|
|
13707
|
+
width: 70
|
|
13708
|
+
},
|
|
13709
|
+
value: val,
|
|
13710
|
+
min: 1,
|
|
13711
|
+
precision: 0,
|
|
13712
|
+
onChange: function onChange(num) {
|
|
13713
|
+
return updateHandle(num, index, 'number');
|
|
13714
|
+
}
|
|
13715
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13716
|
+
}
|
|
13717
|
+
}, {
|
|
13718
|
+
dataIndex: 'share',
|
|
13719
|
+
title: "\u5206\u644A\u4EF7",
|
|
13720
|
+
align: 'center',
|
|
13721
|
+
ellipsis: true,
|
|
13722
|
+
width: 70
|
|
13723
|
+
}, {
|
|
13724
|
+
dataIndex: 'type',
|
|
13725
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13726
|
+
align: 'center',
|
|
13727
|
+
ellipsis: true,
|
|
13728
|
+
width: 100
|
|
13729
|
+
}]
|
|
13730
|
+
};
|
|
13731
|
+
};
|
|
13732
|
+
|
|
13733
|
+
var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
13734
|
+
if (typeof value === 'number') return true;
|
|
13735
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
13736
|
+
return false;
|
|
13737
|
+
};
|
|
13738
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
13739
|
+
if (isNull(val)) return null;
|
|
13740
|
+
return val ? '是' : '否';
|
|
13741
|
+
};
|
|
13742
|
+
var getColumns$4 = function getColumns(_ref) {
|
|
13743
|
+
var _ref$text = _ref.text,
|
|
13744
|
+
disabled = _ref.disabled,
|
|
13745
|
+
updateHandle = _ref.updateHandle,
|
|
13746
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
13747
|
+
return {
|
|
13748
|
+
//管易商品信息
|
|
13749
|
+
GY_GOODS: [{
|
|
13750
|
+
dataIndex: 'goodName',
|
|
13751
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13752
|
+
width: 150
|
|
13753
|
+
}, {
|
|
13754
|
+
dataIndex: 'goodShortName',
|
|
13755
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13756
|
+
width: 150
|
|
13757
|
+
}, {
|
|
13758
|
+
dataIndex: 'goodNo',
|
|
13759
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13760
|
+
width: 200
|
|
13761
|
+
}, {
|
|
13762
|
+
dataIndex: 'specName',
|
|
13763
|
+
title: "SKU\u540D\u79F0",
|
|
13764
|
+
align: 'center',
|
|
13765
|
+
ellipsis: true,
|
|
13766
|
+
width: 250
|
|
13767
|
+
}, {
|
|
13768
|
+
dataIndex: 'specNo',
|
|
13769
|
+
title: "SKU\u7F16\u7801",
|
|
13770
|
+
align: 'center',
|
|
13771
|
+
ellipsis: true,
|
|
13772
|
+
width: 150
|
|
13773
|
+
}, {
|
|
13774
|
+
dataIndex: 'qty',
|
|
13775
|
+
title: "\u6570\u91CF",
|
|
13776
|
+
width: 100,
|
|
13777
|
+
render: function render(val, record, index) {
|
|
13778
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13779
|
+
style: {
|
|
13780
|
+
width: 70
|
|
13781
|
+
},
|
|
13782
|
+
value: val,
|
|
13783
|
+
min: 1,
|
|
13784
|
+
precision: 0,
|
|
13785
|
+
onChange: function onChange(num) {
|
|
13786
|
+
updateDataHandle({
|
|
13787
|
+
qty: num,
|
|
13788
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13789
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13790
|
+
}, index);
|
|
13791
|
+
}
|
|
13792
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13793
|
+
}
|
|
13794
|
+
}, {
|
|
13795
|
+
dataIndex: 'price',
|
|
13796
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13797
|
+
width: 150,
|
|
13798
|
+
render: function render(val, record, index) {
|
|
13799
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13800
|
+
style: {
|
|
13801
|
+
width: 130
|
|
13802
|
+
},
|
|
13803
|
+
value: val,
|
|
13804
|
+
min: 0,
|
|
13805
|
+
precision: 2,
|
|
13806
|
+
onChange: function onChange(num) {
|
|
13807
|
+
updateDataHandle({
|
|
13808
|
+
price: num,
|
|
13809
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13810
|
+
}, index);
|
|
13811
|
+
}
|
|
13812
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13813
|
+
}
|
|
13814
|
+
}, {
|
|
13815
|
+
dataIndex: 'amount',
|
|
13816
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13817
|
+
width: 150
|
|
13818
|
+
}, {
|
|
13819
|
+
dataIndex: 'originPrice',
|
|
13820
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13821
|
+
width: 150
|
|
13822
|
+
}, {
|
|
13823
|
+
dataIndex: 'originAmount',
|
|
13824
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13825
|
+
width: 150
|
|
13826
|
+
}, {
|
|
13827
|
+
dataIndex: 'discountFee',
|
|
13828
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
13829
|
+
width: 150
|
|
13830
|
+
}, {
|
|
13831
|
+
dataIndex: 'amountAfter',
|
|
13832
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
13833
|
+
width: 150
|
|
13834
|
+
}, {
|
|
13835
|
+
dataIndex: 'cancel',
|
|
13836
|
+
title: "\u662F\u5426\u53D6\u6D88",
|
|
13837
|
+
width: 150,
|
|
13838
|
+
render: function render(val) {
|
|
13839
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13840
|
+
}
|
|
13841
|
+
}, {
|
|
13842
|
+
dataIndex: 'isGift',
|
|
13843
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13844
|
+
width: 150,
|
|
13845
|
+
render: function render(val, record, index) {
|
|
13846
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13847
|
+
value: val,
|
|
13848
|
+
onChange: function onChange(value) {
|
|
13849
|
+
updateHandle(value, index, 'isGift');
|
|
13850
|
+
},
|
|
13851
|
+
options: [{
|
|
13852
|
+
label: '是',
|
|
13853
|
+
value: 1
|
|
13854
|
+
}, {
|
|
13855
|
+
label: '否',
|
|
13856
|
+
value: 0
|
|
13857
|
+
}]
|
|
13858
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13859
|
+
}
|
|
13860
|
+
}, {
|
|
13861
|
+
dataIndex: 'skuNote',
|
|
13862
|
+
title: "\u5546\u54C1\u5907\u6CE8",
|
|
13863
|
+
width: 150
|
|
13864
|
+
}].map(function (item) {
|
|
13865
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13866
|
+
align: 'center',
|
|
13867
|
+
ellipsis: true
|
|
13868
|
+
});
|
|
13869
|
+
}),
|
|
13870
|
+
//管易补发商品信息
|
|
13871
|
+
GY_REISSUE_GOODS: [{
|
|
13872
|
+
dataIndex: 'goodName',
|
|
13873
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13874
|
+
width: 150
|
|
13875
|
+
}, {
|
|
13876
|
+
dataIndex: 'goodShortName',
|
|
13877
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13878
|
+
width: 150
|
|
13879
|
+
}, {
|
|
13880
|
+
dataIndex: 'goodNo',
|
|
13881
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13882
|
+
width: 200
|
|
13883
|
+
}, {
|
|
13884
|
+
dataIndex: 'specName',
|
|
13885
|
+
title: "SKU\u540D\u79F0",
|
|
13886
|
+
align: 'center',
|
|
13887
|
+
ellipsis: true,
|
|
13888
|
+
width: 250
|
|
13889
|
+
}, {
|
|
13890
|
+
dataIndex: 'specNo',
|
|
13891
|
+
title: "SKU\u7F16\u7801",
|
|
13892
|
+
align: 'center',
|
|
13893
|
+
ellipsis: true,
|
|
13894
|
+
width: 150
|
|
13895
|
+
}, {
|
|
13896
|
+
dataIndex: 'qty',
|
|
13897
|
+
title: "\u6570\u91CF",
|
|
13898
|
+
width: 100,
|
|
13899
|
+
render: function render(val, record, index) {
|
|
13900
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13901
|
+
style: {
|
|
13902
|
+
width: 70
|
|
13903
|
+
},
|
|
13904
|
+
value: val,
|
|
13905
|
+
min: 1,
|
|
13906
|
+
precision: 0,
|
|
13907
|
+
onChange: function onChange(num) {
|
|
13908
|
+
updateDataHandle({
|
|
13909
|
+
qty: num,
|
|
13910
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13911
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13912
|
+
}, index);
|
|
13913
|
+
}
|
|
13914
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13915
|
+
}
|
|
13916
|
+
}, {
|
|
13917
|
+
dataIndex: 'price',
|
|
13918
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13919
|
+
width: 150,
|
|
13920
|
+
render: function render(val, record, index) {
|
|
13921
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13922
|
+
style: {
|
|
13923
|
+
width: 130
|
|
13924
|
+
},
|
|
13925
|
+
value: val,
|
|
13926
|
+
min: 0,
|
|
13927
|
+
precision: 2,
|
|
13928
|
+
onChange: function onChange(num) {
|
|
13929
|
+
updateDataHandle({
|
|
13930
|
+
price: num,
|
|
13931
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13932
|
+
}, index);
|
|
13933
|
+
}
|
|
13934
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13935
|
+
}
|
|
13936
|
+
}, {
|
|
13937
|
+
dataIndex: 'amount',
|
|
13938
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13939
|
+
width: 150
|
|
13940
|
+
}, {
|
|
13941
|
+
dataIndex: 'originPrice',
|
|
13942
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13943
|
+
width: 150
|
|
13944
|
+
}, {
|
|
13945
|
+
dataIndex: 'originAmount',
|
|
13946
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13947
|
+
width: 150
|
|
13948
|
+
}, {
|
|
13949
|
+
dataIndex: 'isGift',
|
|
13950
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13951
|
+
width: 150,
|
|
13952
|
+
render: function render(val, record, index) {
|
|
13953
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13954
|
+
value: val,
|
|
13955
|
+
onChange: function onChange(value) {
|
|
13956
|
+
updateHandle(value, index, 'isGift');
|
|
13957
|
+
},
|
|
13958
|
+
options: [{
|
|
13959
|
+
label: '是',
|
|
13960
|
+
value: 1
|
|
13961
|
+
}, {
|
|
13962
|
+
label: '否',
|
|
13963
|
+
value: 0
|
|
13964
|
+
}]
|
|
13965
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13966
|
+
}
|
|
13967
|
+
}].map(function (item) {
|
|
13968
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13969
|
+
align: 'center',
|
|
13970
|
+
ellipsis: true
|
|
13971
|
+
});
|
|
13972
|
+
})
|
|
13973
|
+
};
|
|
13974
|
+
};
|
|
13975
|
+
|
|
13976
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
13977
|
+
var _ref$text = _ref.text,
|
|
13978
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13979
|
+
disabled = _ref.disabled,
|
|
13980
|
+
updateHandle = _ref.updateHandle;
|
|
13981
|
+
return {
|
|
13982
|
+
//bs商品信息
|
|
13983
|
+
default: [{
|
|
13984
|
+
dataIndex: 'mark',
|
|
13985
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
13986
|
+
align: 'center',
|
|
13987
|
+
ellipsis: true,
|
|
13988
|
+
width: 70,
|
|
13989
|
+
render: function render(val, record, index) {
|
|
13990
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
13991
|
+
options: [{
|
|
13992
|
+
label: '是',
|
|
13993
|
+
value: '是'
|
|
13994
|
+
}, {
|
|
13995
|
+
label: '否',
|
|
13996
|
+
value: '否'
|
|
13997
|
+
}],
|
|
13998
|
+
disabled: disabled,
|
|
13999
|
+
value: val,
|
|
14000
|
+
onChange: function onChange(val) {
|
|
14001
|
+
return updateHandle(val, index, 'mark');
|
|
14002
|
+
}
|
|
14003
|
+
});
|
|
14004
|
+
}
|
|
14005
|
+
}, {
|
|
14006
|
+
dataIndex: 'skuName',
|
|
14007
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
14008
|
+
align: 'center',
|
|
14009
|
+
ellipsis: true,
|
|
14010
|
+
width: 250
|
|
14011
|
+
}, {
|
|
14012
|
+
dataIndex: 'sku',
|
|
14013
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
14014
|
+
align: 'center',
|
|
14015
|
+
ellipsis: true,
|
|
14016
|
+
width: 100
|
|
14017
|
+
}, {
|
|
14018
|
+
dataIndex: 'name',
|
|
14019
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
14020
|
+
align: 'center',
|
|
14021
|
+
ellipsis: true,
|
|
14022
|
+
width: 250
|
|
14023
|
+
}, {
|
|
14024
|
+
dataIndex: 'pic',
|
|
14025
|
+
title: "\u56FE\u7247",
|
|
14026
|
+
align: 'center',
|
|
14027
|
+
ellipsis: true,
|
|
14028
|
+
width: 100,
|
|
14029
|
+
render: function render(val) {
|
|
14030
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
14031
|
+
width: 60,
|
|
14032
|
+
src: val
|
|
14033
|
+
});
|
|
14034
|
+
}
|
|
14035
|
+
}, {
|
|
14036
|
+
dataIndex: 'code',
|
|
14037
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
14038
|
+
align: 'center',
|
|
14039
|
+
ellipsis: true,
|
|
14040
|
+
width: 100
|
|
14041
|
+
}, {
|
|
14042
|
+
dataIndex: 'money',
|
|
14043
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
14044
|
+
align: 'center',
|
|
14045
|
+
ellipsis: true,
|
|
14046
|
+
width: 100
|
|
14047
|
+
}, {
|
|
14048
|
+
dataIndex: 'number',
|
|
14049
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
14050
|
+
align: 'center',
|
|
14051
|
+
ellipsis: true,
|
|
14052
|
+
width: 100,
|
|
14053
|
+
render: function render(val, record, index) {
|
|
14054
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14055
|
+
style: {
|
|
14056
|
+
width: 70
|
|
14057
|
+
},
|
|
14058
|
+
value: val,
|
|
14059
|
+
min: 1,
|
|
14060
|
+
precision: 0,
|
|
14061
|
+
onChange: function onChange(num) {
|
|
14062
|
+
return updateHandle(num, index, 'number');
|
|
14063
|
+
}
|
|
14064
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14065
|
+
}
|
|
14066
|
+
}, {
|
|
14067
|
+
dataIndex: 'share',
|
|
14068
|
+
title: "\u5206\u644A\u4EF7",
|
|
14069
|
+
align: 'center',
|
|
14070
|
+
ellipsis: true,
|
|
14071
|
+
width: 70
|
|
14072
|
+
}, {
|
|
14073
|
+
dataIndex: 'type',
|
|
14074
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
14075
|
+
align: 'center',
|
|
14076
|
+
ellipsis: true,
|
|
14077
|
+
width: 100
|
|
14078
|
+
}]
|
|
14079
|
+
};
|
|
14080
|
+
};
|
|
14081
|
+
|
|
14082
|
+
var getColumnsMap = function getColumnsMap(args) {
|
|
14083
|
+
var _ref = args || {},
|
|
14084
|
+
_ref$text = _ref.text,
|
|
14085
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14086
|
+
disabled = _ref.disabled,
|
|
14087
|
+
updateHandle = _ref.updateHandle,
|
|
14088
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
14089
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14090
|
+
text: text,
|
|
14091
|
+
disabled: disabled,
|
|
14092
|
+
updateHandle: updateHandle
|
|
14093
|
+
})), getColumns({
|
|
14094
|
+
text: text,
|
|
14095
|
+
disabled: disabled,
|
|
14096
|
+
updateHandle: updateHandle
|
|
14097
|
+
})), getColumns$2({
|
|
14098
|
+
text: text,
|
|
14099
|
+
disabled: disabled,
|
|
14100
|
+
updateHandle: updateHandle
|
|
14101
|
+
})), getColumns$3({
|
|
14102
|
+
text: text,
|
|
14103
|
+
disabled: disabled,
|
|
14104
|
+
updateHandle: updateHandle
|
|
14105
|
+
})), getColumns$4({
|
|
14106
|
+
text: text,
|
|
14107
|
+
disabled: disabled,
|
|
14108
|
+
updateHandle: updateHandle,
|
|
14109
|
+
updateDataHandle: updateDataHandle
|
|
14110
|
+
})), {}, {
|
|
14111
|
+
default: getColumns$5({
|
|
14112
|
+
text: text,
|
|
14113
|
+
disabled: disabled,
|
|
14114
|
+
updateHandle: updateHandle
|
|
14115
|
+
})['default']
|
|
14116
|
+
});
|
|
14117
|
+
};
|
|
14118
|
+
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
14119
|
+
var clone_columnsMap = cloneDeep(getColumnsMap());
|
|
14120
|
+
var newColumns = {};
|
|
14121
|
+
Object.keys(clone_columnsMap).forEach(function (key) {
|
|
14122
|
+
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
14123
|
+
return {
|
|
14124
|
+
title: col.title,
|
|
14125
|
+
dataIndex: col.dataIndex
|
|
14126
|
+
};
|
|
14127
|
+
});
|
|
14128
|
+
});
|
|
14129
|
+
return newColumns;
|
|
14130
|
+
};
|
|
14131
|
+
var columnsBaseInfoMap = getColumnsBaseInfo();
|
|
14132
|
+
|
|
14133
|
+
var renderFieldMap$1 = {
|
|
14134
|
+
goodsNumber: function goodsNumber(_ref) {
|
|
14135
|
+
var disabled = _ref.disabled,
|
|
14136
|
+
updateHandle = _ref.updateHandle;
|
|
14137
|
+
return function (val, record, index) {
|
|
14138
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14139
|
+
style: {
|
|
14140
|
+
width: 70
|
|
14141
|
+
},
|
|
14142
|
+
value: val,
|
|
14143
|
+
min: 1,
|
|
14144
|
+
precision: 0,
|
|
12632
14145
|
onChange: function onChange(num) {
|
|
12633
|
-
return updateHandle(num, index, '
|
|
14146
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12634
14147
|
}
|
|
12635
14148
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12636
14149
|
};
|
|
12637
14150
|
},
|
|
12638
|
-
|
|
14151
|
+
goodsPrice: function goodsPrice(_ref2) {
|
|
12639
14152
|
var disabled = _ref2.disabled,
|
|
12640
14153
|
updateHandle = _ref2.updateHandle;
|
|
12641
|
-
return function (val) {
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
14154
|
+
return function (val, record, index) {
|
|
14155
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14156
|
+
style: {
|
|
14157
|
+
width: 70
|
|
14158
|
+
},
|
|
14159
|
+
value: val,
|
|
14160
|
+
min: 0,
|
|
14161
|
+
onChange: function onChange(value) {
|
|
14162
|
+
return updateHandle(value, index, 'goodsPrice');
|
|
14163
|
+
}
|
|
14164
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14165
|
+
};
|
|
14166
|
+
},
|
|
14167
|
+
isGift: function isGift(_ref3) {
|
|
14168
|
+
var disabled = _ref3.disabled,
|
|
14169
|
+
updateHandle = _ref3.updateHandle;
|
|
14170
|
+
return function (val, record, index) {
|
|
14171
|
+
var options = [{
|
|
14172
|
+
label: '是',
|
|
14173
|
+
value: 1
|
|
14174
|
+
}, {
|
|
14175
|
+
label: '否',
|
|
14176
|
+
value: 0
|
|
14177
|
+
}];
|
|
14178
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14179
|
+
style: {
|
|
14180
|
+
width: 70
|
|
14181
|
+
},
|
|
14182
|
+
options: options,
|
|
14183
|
+
value: val,
|
|
14184
|
+
onChange: function onChange(value) {
|
|
14185
|
+
return updateHandle(value, index, 'isGift');
|
|
14186
|
+
},
|
|
14187
|
+
getPopupContainer: function getPopupContainer() {
|
|
14188
|
+
return document.getElementById('bsE3ReissueGoods');
|
|
14189
|
+
}
|
|
14190
|
+
}) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12652
14191
|
};
|
|
12653
14192
|
}
|
|
12654
14193
|
};
|
|
12655
|
-
var
|
|
12656
|
-
var disabled =
|
|
12657
|
-
updateHandle =
|
|
12658
|
-
operate =
|
|
12659
|
-
return
|
|
14194
|
+
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
14195
|
+
var disabled = _ref4.disabled,
|
|
14196
|
+
updateHandle = _ref4.updateHandle,
|
|
14197
|
+
operate = _ref4.operate;
|
|
14198
|
+
return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
|
|
12660
14199
|
var newItem = _objectSpread2({
|
|
12661
14200
|
align: 'center',
|
|
12662
14201
|
ellipsis: true
|
|
@@ -12673,6 +14212,7 @@ var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref3) {
|
|
|
12673
14212
|
});
|
|
12674
14213
|
};
|
|
12675
14214
|
|
|
14215
|
+
var MAIN_FIELD = 'uuid';
|
|
12676
14216
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12677
14217
|
var columns = _ref.columns,
|
|
12678
14218
|
dataSource = _ref.dataSource,
|
|
@@ -12688,11 +14228,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12688
14228
|
var closeModal = function closeModal() {
|
|
12689
14229
|
return setTradeGoodsVisible(false);
|
|
12690
14230
|
};
|
|
14231
|
+
var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
14232
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
14233
|
+
}), selectedRowKeys);
|
|
14234
|
+
var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
14235
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
14236
|
+
}));
|
|
14237
|
+
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
14238
|
+
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
14239
|
+
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
14240
|
+
};
|
|
12691
14241
|
var rowSelection = {
|
|
12692
14242
|
selectedRowKeys: selectedRowKeys,
|
|
12693
|
-
onChange:
|
|
14243
|
+
onChange: handleChangeSelectedKeys
|
|
12694
14244
|
};
|
|
12695
|
-
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12696
14245
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
12697
14246
|
type: "link",
|
|
12698
14247
|
onClick: openModal
|
|
@@ -12702,7 +14251,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12702
14251
|
footer: null,
|
|
12703
14252
|
onCancel: closeModal
|
|
12704
14253
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
12705
|
-
rowKey:
|
|
14254
|
+
rowKey: MAIN_FIELD,
|
|
12706
14255
|
rowSelection: rowSelection,
|
|
12707
14256
|
columns: columns,
|
|
12708
14257
|
dataSource: dataSource,
|
|
@@ -12711,7 +14260,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12711
14260
|
x: 500,
|
|
12712
14261
|
y: 500
|
|
12713
14262
|
}
|
|
12714
|
-
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(",
|
|
14263
|
+
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12715
14264
|
};
|
|
12716
14265
|
var getButtonText = function getButtonText() {
|
|
12717
14266
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -12721,6 +14270,9 @@ var getButtonText = function getButtonText() {
|
|
|
12721
14270
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12722
14271
|
return '选择旺店通商品';
|
|
12723
14272
|
}
|
|
14273
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14274
|
+
return '选择管易ERP商品';
|
|
14275
|
+
}
|
|
12724
14276
|
return '选择商品';
|
|
12725
14277
|
};
|
|
12726
14278
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -12778,7 +14330,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12778
14330
|
// TODO: 商品订单中以选中商品
|
|
12779
14331
|
var selectedGoods = useMemo(function () {
|
|
12780
14332
|
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12781
|
-
return v
|
|
14333
|
+
return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
|
|
12782
14334
|
});
|
|
12783
14335
|
}, [value]);
|
|
12784
14336
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
@@ -12812,515 +14364,42 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12812
14364
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
12813
14365
|
}
|
|
12814
14366
|
};
|
|
14367
|
+
var updateDataHandle = function updateDataHandle(data, index) {
|
|
14368
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
14369
|
+
value[index] = _objectSpread2(_objectSpread2({}, value[index]), data);
|
|
14370
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
14371
|
+
}
|
|
14372
|
+
};
|
|
12815
14373
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12816
14374
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12817
14375
|
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12818
14376
|
return function (type) {
|
|
12819
14377
|
var columns = [];
|
|
12820
14378
|
switch (type) {
|
|
12821
|
-
case 'WDT_REISSUE_GOODS':
|
|
12822
|
-
{
|
|
12823
|
-
columns = getWdtReissueGoodColumns({
|
|
12824
|
-
disabled: disabled,
|
|
12825
|
-
updateHandle: updateHandle,
|
|
12826
|
-
operate: operate
|
|
12827
|
-
});
|
|
12828
|
-
}
|
|
12829
|
-
break;
|
|
12830
14379
|
case 'WDT_GOODS':
|
|
12831
|
-
columns = [{
|
|
12832
|
-
dataIndex: 'goodId',
|
|
12833
|
-
title: "\u5546\u54C1ID",
|
|
12834
|
-
align: 'center',
|
|
12835
|
-
ellipsis: true,
|
|
12836
|
-
width: 70
|
|
12837
|
-
}, {
|
|
12838
|
-
dataIndex: 'goodNo',
|
|
12839
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12840
|
-
align: 'center',
|
|
12841
|
-
ellipsis: true,
|
|
12842
|
-
width: 180
|
|
12843
|
-
}, {
|
|
12844
|
-
dataIndex: 'goodName',
|
|
12845
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12846
|
-
align: 'center',
|
|
12847
|
-
ellipsis: true,
|
|
12848
|
-
width: 250
|
|
12849
|
-
}, {
|
|
12850
|
-
dataIndex: 'specId',
|
|
12851
|
-
title: "".concat(text, "SKUID"),
|
|
12852
|
-
align: 'center',
|
|
12853
|
-
ellipsis: true,
|
|
12854
|
-
width: 100
|
|
12855
|
-
}, {
|
|
12856
|
-
dataIndex: 'specNo',
|
|
12857
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12858
|
-
align: 'center',
|
|
12859
|
-
ellipsis: true,
|
|
12860
|
-
width: 180
|
|
12861
|
-
}, {
|
|
12862
|
-
dataIndex: 'specName',
|
|
12863
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12864
|
-
align: 'center',
|
|
12865
|
-
ellipsis: true,
|
|
12866
|
-
width: 250
|
|
12867
|
-
}, {
|
|
12868
|
-
dataIndex: 'orderPrice',
|
|
12869
|
-
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12870
|
-
align: 'center',
|
|
12871
|
-
ellipsis: true,
|
|
12872
|
-
width: 100
|
|
12873
|
-
}, {
|
|
12874
|
-
dataIndex: 'num',
|
|
12875
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
12876
|
-
align: 'center',
|
|
12877
|
-
ellipsis: true,
|
|
12878
|
-
width: 100,
|
|
12879
|
-
render: function render(val, record, index) {
|
|
12880
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12881
|
-
style: {
|
|
12882
|
-
width: 70
|
|
12883
|
-
},
|
|
12884
|
-
value: val,
|
|
12885
|
-
min: 1,
|
|
12886
|
-
precision: 0,
|
|
12887
|
-
onChange: function onChange(num) {
|
|
12888
|
-
return updateHandle(num, index, 'num');
|
|
12889
|
-
}
|
|
12890
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12891
|
-
}
|
|
12892
|
-
},
|
|
12893
|
-
// {
|
|
12894
|
-
// dataIndex: 'actualNum',
|
|
12895
|
-
// title: `${text}实发数量`,
|
|
12896
|
-
// align: 'center',
|
|
12897
|
-
// ellipsis: true,
|
|
12898
|
-
// width: 100,
|
|
12899
|
-
// },
|
|
12900
|
-
{
|
|
12901
|
-
dataIndex: 'sharePrice',
|
|
12902
|
-
title: "\u5206\u644A\u4EF7",
|
|
12903
|
-
align: 'center',
|
|
12904
|
-
ellipsis: true,
|
|
12905
|
-
width: 70
|
|
12906
|
-
}, {
|
|
12907
|
-
dataIndex: 'giftType',
|
|
12908
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12909
|
-
align: 'center',
|
|
12910
|
-
ellipsis: true,
|
|
12911
|
-
width: 100,
|
|
12912
|
-
render: function render(val) {
|
|
12913
|
-
var giftTypeMap = {
|
|
12914
|
-
0: '非赠品',
|
|
12915
|
-
1: '自动赠送',
|
|
12916
|
-
2: '手工赠送',
|
|
12917
|
-
3: '回购自动送赠品',
|
|
12918
|
-
4: '前N有礼送赠品',
|
|
12919
|
-
6: '天猫优仓赠品',
|
|
12920
|
-
7: '淘宝CRM会员送赠'
|
|
12921
|
-
};
|
|
12922
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12923
|
-
}
|
|
12924
|
-
}];
|
|
12925
|
-
break;
|
|
12926
14380
|
case 'WDT_RETURN_GOODS':
|
|
12927
|
-
{
|
|
12928
|
-
columns = [{
|
|
12929
|
-
dataIndex: 'goodId',
|
|
12930
|
-
title: "\u5546\u54C1ID",
|
|
12931
|
-
align: 'center',
|
|
12932
|
-
ellipsis: true,
|
|
12933
|
-
width: 70
|
|
12934
|
-
}, {
|
|
12935
|
-
dataIndex: 'goodNo',
|
|
12936
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12937
|
-
align: 'center',
|
|
12938
|
-
ellipsis: true,
|
|
12939
|
-
width: 180
|
|
12940
|
-
}, {
|
|
12941
|
-
dataIndex: 'goodName',
|
|
12942
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12943
|
-
align: 'center',
|
|
12944
|
-
ellipsis: true,
|
|
12945
|
-
width: 250
|
|
12946
|
-
}, {
|
|
12947
|
-
dataIndex: 'specId',
|
|
12948
|
-
title: "".concat(text, "SKUID"),
|
|
12949
|
-
align: 'center',
|
|
12950
|
-
ellipsis: true,
|
|
12951
|
-
width: 100
|
|
12952
|
-
}, {
|
|
12953
|
-
dataIndex: 'specNo',
|
|
12954
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12955
|
-
align: 'center',
|
|
12956
|
-
ellipsis: true,
|
|
12957
|
-
width: 180
|
|
12958
|
-
}, {
|
|
12959
|
-
dataIndex: 'specName',
|
|
12960
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12961
|
-
align: 'center',
|
|
12962
|
-
ellipsis: true,
|
|
12963
|
-
width: 250
|
|
12964
|
-
}, {
|
|
12965
|
-
dataIndex: 'num',
|
|
12966
|
-
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
12967
|
-
align: 'center',
|
|
12968
|
-
ellipsis: true,
|
|
12969
|
-
width: 100,
|
|
12970
|
-
render: function render(val, record, index) {
|
|
12971
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12972
|
-
style: {
|
|
12973
|
-
width: 70
|
|
12974
|
-
},
|
|
12975
|
-
value: val,
|
|
12976
|
-
min: 1,
|
|
12977
|
-
precision: 0,
|
|
12978
|
-
onChange: function onChange(num) {
|
|
12979
|
-
return updateHandle(num, index, 'num');
|
|
12980
|
-
}
|
|
12981
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12982
|
-
}
|
|
12983
|
-
}, {
|
|
12984
|
-
dataIndex: 'sharePrice',
|
|
12985
|
-
title: "\u5206\u644A\u4EF7",
|
|
12986
|
-
align: 'center',
|
|
12987
|
-
ellipsis: true,
|
|
12988
|
-
width: 80,
|
|
12989
|
-
render: function render(val, record, index) {
|
|
12990
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12991
|
-
style: {
|
|
12992
|
-
width: 70
|
|
12993
|
-
},
|
|
12994
|
-
value: val,
|
|
12995
|
-
min: 0,
|
|
12996
|
-
onChange: function onChange(value) {
|
|
12997
|
-
return updateHandle(value, index, 'sharePrice');
|
|
12998
|
-
}
|
|
12999
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13000
|
-
}
|
|
13001
|
-
}, {
|
|
13002
|
-
dataIndex: 'returnPrice',
|
|
13003
|
-
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13004
|
-
align: 'center',
|
|
13005
|
-
ellipsis: true,
|
|
13006
|
-
width: 100
|
|
13007
|
-
}, {
|
|
13008
|
-
dataIndex: 'giftType',
|
|
13009
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13010
|
-
align: 'center',
|
|
13011
|
-
ellipsis: true,
|
|
13012
|
-
width: 100,
|
|
13013
|
-
render: function render(val) {
|
|
13014
|
-
var giftTypeMap = {
|
|
13015
|
-
0: '非赠品',
|
|
13016
|
-
1: '自动赠送',
|
|
13017
|
-
2: '手工赠送',
|
|
13018
|
-
3: '回购自动送赠品',
|
|
13019
|
-
4: '前N有礼送赠品',
|
|
13020
|
-
6: '天猫优仓赠品',
|
|
13021
|
-
7: '淘宝CRM会员送赠'
|
|
13022
|
-
};
|
|
13023
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13024
|
-
}
|
|
13025
|
-
}, {
|
|
13026
|
-
dataIndex: 'type',
|
|
13027
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13028
|
-
align: 'center',
|
|
13029
|
-
ellipsis: true,
|
|
13030
|
-
width: 100,
|
|
13031
|
-
render: function render(val, record, index) {
|
|
13032
|
-
var options = [{
|
|
13033
|
-
label: '单品',
|
|
13034
|
-
value: '1'
|
|
13035
|
-
}, {
|
|
13036
|
-
label: '组合装',
|
|
13037
|
-
value: '2'
|
|
13038
|
-
}];
|
|
13039
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13040
|
-
style: {
|
|
13041
|
-
width: 70
|
|
13042
|
-
},
|
|
13043
|
-
options: options,
|
|
13044
|
-
value: val,
|
|
13045
|
-
onChange: function onChange(value) {
|
|
13046
|
-
return updateHandle(value, index, 'type');
|
|
13047
|
-
}
|
|
13048
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13049
|
-
}
|
|
13050
|
-
}];
|
|
13051
|
-
}
|
|
13052
|
-
break;
|
|
13053
14381
|
case 'WDT_EXCHANGE_GOODS':
|
|
14382
|
+
case 'BS_E3_GOODS':
|
|
14383
|
+
case 'BS_GOODS':
|
|
14384
|
+
case 'WLN_GOODS':
|
|
14385
|
+
case 'GY_GOODS':
|
|
14386
|
+
case 'GY_REISSUE_GOODS':
|
|
13054
14387
|
{
|
|
13055
|
-
columns =
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13060
|
-
|
|
13061
|
-
}, {
|
|
13062
|
-
dataIndex: 'goodNo',
|
|
13063
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
13064
|
-
align: 'center',
|
|
13065
|
-
ellipsis: true,
|
|
13066
|
-
width: 180
|
|
13067
|
-
}, {
|
|
13068
|
-
dataIndex: 'goodName',
|
|
13069
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13070
|
-
align: 'center',
|
|
13071
|
-
ellipsis: true,
|
|
13072
|
-
width: 250
|
|
13073
|
-
}, {
|
|
13074
|
-
dataIndex: 'specId',
|
|
13075
|
-
title: "".concat(text, "SKUID"),
|
|
13076
|
-
align: 'center',
|
|
13077
|
-
ellipsis: true,
|
|
13078
|
-
width: 100
|
|
13079
|
-
}, {
|
|
13080
|
-
dataIndex: 'specNo',
|
|
13081
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13082
|
-
align: 'center',
|
|
13083
|
-
ellipsis: true,
|
|
13084
|
-
width: 180
|
|
13085
|
-
}, {
|
|
13086
|
-
dataIndex: 'specName',
|
|
13087
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13088
|
-
align: 'center',
|
|
13089
|
-
ellipsis: true,
|
|
13090
|
-
width: 250
|
|
13091
|
-
}, {
|
|
13092
|
-
dataIndex: 'num',
|
|
13093
|
-
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13094
|
-
align: 'center',
|
|
13095
|
-
ellipsis: true,
|
|
13096
|
-
width: 100,
|
|
13097
|
-
render: function render(val, record, index) {
|
|
13098
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13099
|
-
style: {
|
|
13100
|
-
width: 70
|
|
13101
|
-
},
|
|
13102
|
-
value: val,
|
|
13103
|
-
min: 1,
|
|
13104
|
-
precision: 0,
|
|
13105
|
-
onChange: function onChange(num) {
|
|
13106
|
-
return updateHandle(num, index, 'num');
|
|
13107
|
-
}
|
|
13108
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13109
|
-
}
|
|
13110
|
-
}, {
|
|
13111
|
-
dataIndex: 'price',
|
|
13112
|
-
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13113
|
-
align: 'center',
|
|
13114
|
-
ellipsis: true,
|
|
13115
|
-
width: 100,
|
|
13116
|
-
render: function render(val, record, index) {
|
|
13117
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13118
|
-
style: {
|
|
13119
|
-
width: 70
|
|
13120
|
-
},
|
|
13121
|
-
value: val,
|
|
13122
|
-
min: 0,
|
|
13123
|
-
onChange: function onChange(value) {
|
|
13124
|
-
return updateHandle(value, index, 'price');
|
|
13125
|
-
}
|
|
13126
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13127
|
-
}
|
|
13128
|
-
}, {
|
|
13129
|
-
dataIndex: 'exchangePrice',
|
|
13130
|
-
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13131
|
-
align: 'center',
|
|
13132
|
-
ellipsis: true,
|
|
13133
|
-
width: 100
|
|
13134
|
-
}, {
|
|
13135
|
-
dataIndex: 'giftType',
|
|
13136
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13137
|
-
align: 'center',
|
|
13138
|
-
ellipsis: true,
|
|
13139
|
-
width: 100,
|
|
13140
|
-
render: function render(val) {
|
|
13141
|
-
var giftTypeMap = {
|
|
13142
|
-
0: '非赠品',
|
|
13143
|
-
1: '自动赠送',
|
|
13144
|
-
2: '手工赠送',
|
|
13145
|
-
3: '回购自动送赠品',
|
|
13146
|
-
4: '前N有礼送赠品',
|
|
13147
|
-
6: '天猫优仓赠品',
|
|
13148
|
-
7: '淘宝CRM会员送赠'
|
|
13149
|
-
};
|
|
13150
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13151
|
-
}
|
|
13152
|
-
}, {
|
|
13153
|
-
dataIndex: 'type',
|
|
13154
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13155
|
-
align: 'center',
|
|
13156
|
-
ellipsis: true,
|
|
13157
|
-
width: 100,
|
|
13158
|
-
render: function render(val, record, index) {
|
|
13159
|
-
var options = [{
|
|
13160
|
-
label: '单品',
|
|
13161
|
-
value: '1'
|
|
13162
|
-
}, {
|
|
13163
|
-
label: '组合装',
|
|
13164
|
-
value: '2'
|
|
13165
|
-
}];
|
|
13166
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13167
|
-
style: {
|
|
13168
|
-
width: 70
|
|
13169
|
-
},
|
|
13170
|
-
options: options,
|
|
13171
|
-
value: val,
|
|
13172
|
-
onChange: function onChange(value) {
|
|
13173
|
-
return updateHandle(value, index, 'type');
|
|
13174
|
-
}
|
|
13175
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13176
|
-
}
|
|
13177
|
-
}];
|
|
14388
|
+
columns = getColumnsMap({
|
|
14389
|
+
text: text,
|
|
14390
|
+
disabled: disabled,
|
|
14391
|
+
updateHandle: updateHandle,
|
|
14392
|
+
updateDataHandle: updateDataHandle
|
|
14393
|
+
})[type];
|
|
13178
14394
|
}
|
|
13179
14395
|
break;
|
|
13180
|
-
case '
|
|
14396
|
+
case 'WDT_REISSUE_GOODS':
|
|
13181
14397
|
{
|
|
13182
|
-
columns =
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
width: 150
|
|
13188
|
-
}, {
|
|
13189
|
-
dataIndex: 'skuId',
|
|
13190
|
-
title: "SKU ID",
|
|
13191
|
-
align: 'center',
|
|
13192
|
-
ellipsis: true,
|
|
13193
|
-
width: 150
|
|
13194
|
-
}, {
|
|
13195
|
-
dataIndex: 'goodsName',
|
|
13196
|
-
title: "\u5546\u54C1\u540D\u79F0",
|
|
13197
|
-
align: 'center',
|
|
13198
|
-
ellipsis: true,
|
|
13199
|
-
width: 150
|
|
13200
|
-
}, {
|
|
13201
|
-
dataIndex: 'goodsShortName',
|
|
13202
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13203
|
-
align: 'center',
|
|
13204
|
-
ellipsis: true,
|
|
13205
|
-
width: 100
|
|
13206
|
-
}, {
|
|
13207
|
-
dataIndex: 'picPath',
|
|
13208
|
-
title: "\u5546\u54C1\u56FE\u7247",
|
|
13209
|
-
align: 'center',
|
|
13210
|
-
ellipsis: true,
|
|
13211
|
-
width: 100,
|
|
13212
|
-
render: function render(val) {
|
|
13213
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13214
|
-
width: 60,
|
|
13215
|
-
src: val
|
|
13216
|
-
});
|
|
13217
|
-
}
|
|
13218
|
-
}, {
|
|
13219
|
-
dataIndex: 'goodsSn',
|
|
13220
|
-
title: "\u8D27\u53F7",
|
|
13221
|
-
align: 'center',
|
|
13222
|
-
ellipsis: true,
|
|
13223
|
-
width: 150
|
|
13224
|
-
}, {
|
|
13225
|
-
dataIndex: 'goodsId',
|
|
13226
|
-
title: "\u8D27\u53F7ID",
|
|
13227
|
-
align: 'center',
|
|
13228
|
-
ellipsis: true,
|
|
13229
|
-
width: 150
|
|
13230
|
-
}, {
|
|
13231
|
-
dataIndex: 'colorName',
|
|
13232
|
-
title: "\u989C\u8272\u540D\u79F0",
|
|
13233
|
-
align: 'center',
|
|
13234
|
-
ellipsis: true,
|
|
13235
|
-
width: 100
|
|
13236
|
-
}, {
|
|
13237
|
-
dataIndex: 'colorCode',
|
|
13238
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
13239
|
-
align: 'center',
|
|
13240
|
-
ellipsis: true,
|
|
13241
|
-
width: 150
|
|
13242
|
-
}, {
|
|
13243
|
-
dataIndex: 'sizeName',
|
|
13244
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13245
|
-
align: 'center',
|
|
13246
|
-
ellipsis: true,
|
|
13247
|
-
width: 100
|
|
13248
|
-
}, {
|
|
13249
|
-
dataIndex: 'sizeCode',
|
|
13250
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13251
|
-
align: 'center',
|
|
13252
|
-
ellipsis: true,
|
|
13253
|
-
width: 100
|
|
13254
|
-
}, {
|
|
13255
|
-
dataIndex: 'brandName',
|
|
13256
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
13257
|
-
align: 'center',
|
|
13258
|
-
ellipsis: true,
|
|
13259
|
-
width: 150
|
|
13260
|
-
}, {
|
|
13261
|
-
dataIndex: 'goodsNumber',
|
|
13262
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
13263
|
-
align: 'center',
|
|
13264
|
-
ellipsis: true,
|
|
13265
|
-
width: 100
|
|
13266
|
-
}, {
|
|
13267
|
-
dataIndex: 'goodsPrice',
|
|
13268
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13269
|
-
align: 'center',
|
|
13270
|
-
ellipsis: true,
|
|
13271
|
-
width: 120
|
|
13272
|
-
}, {
|
|
13273
|
-
dataIndex: 'shopPrice',
|
|
13274
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13275
|
-
align: 'center',
|
|
13276
|
-
ellipsis: true,
|
|
13277
|
-
width: 120
|
|
13278
|
-
}, {
|
|
13279
|
-
dataIndex: 'sharePrice',
|
|
13280
|
-
title: "\u5206\u644A\u4EF7",
|
|
13281
|
-
align: 'center',
|
|
13282
|
-
ellipsis: true,
|
|
13283
|
-
width: 120
|
|
13284
|
-
}, {
|
|
13285
|
-
dataIndex: 'sharePayment',
|
|
13286
|
-
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13287
|
-
align: 'center',
|
|
13288
|
-
ellipsis: true,
|
|
13289
|
-
width: 120
|
|
13290
|
-
}, {
|
|
13291
|
-
dataIndex: 'payment',
|
|
13292
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13293
|
-
align: 'center',
|
|
13294
|
-
ellipsis: true,
|
|
13295
|
-
width: 120
|
|
13296
|
-
}, {
|
|
13297
|
-
dataIndex: 'tcSku',
|
|
13298
|
-
title: "\u5957\u9910SKU",
|
|
13299
|
-
align: 'center',
|
|
13300
|
-
ellipsis: true,
|
|
13301
|
-
width: 150
|
|
13302
|
-
}, {
|
|
13303
|
-
dataIndex: 'tcGoodsNumber',
|
|
13304
|
-
title: "\u5957\u9910\u5957\u6570",
|
|
13305
|
-
align: 'center',
|
|
13306
|
-
ellipsis: true,
|
|
13307
|
-
width: 100
|
|
13308
|
-
}, {
|
|
13309
|
-
dataIndex: 'taoCanSingleSl',
|
|
13310
|
-
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13311
|
-
align: 'center',
|
|
13312
|
-
ellipsis: true,
|
|
13313
|
-
width: 100
|
|
13314
|
-
}, {
|
|
13315
|
-
dataIndex: 'isGift',
|
|
13316
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
13317
|
-
align: 'center',
|
|
13318
|
-
ellipsis: true,
|
|
13319
|
-
width: 100,
|
|
13320
|
-
render: function render(val) {
|
|
13321
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13322
|
-
}
|
|
13323
|
-
}];
|
|
14398
|
+
columns = getWdtReissueGoodColumns({
|
|
14399
|
+
disabled: disabled,
|
|
14400
|
+
updateHandle: updateHandle,
|
|
14401
|
+
operate: operate
|
|
14402
|
+
});
|
|
13324
14403
|
}
|
|
13325
14404
|
break;
|
|
13326
14405
|
case 'BS_E3_REISSUE_GOODS':
|
|
@@ -13333,102 +14412,12 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13333
14412
|
}
|
|
13334
14413
|
break;
|
|
13335
14414
|
default:
|
|
13336
|
-
columns =
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
render: function render(val, record, index) {
|
|
13343
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
13344
|
-
options: [{
|
|
13345
|
-
label: '是',
|
|
13346
|
-
value: '是'
|
|
13347
|
-
}, {
|
|
13348
|
-
label: '否',
|
|
13349
|
-
value: '否'
|
|
13350
|
-
}],
|
|
13351
|
-
disabled: disabled,
|
|
13352
|
-
value: val,
|
|
13353
|
-
onChange: function onChange(val) {
|
|
13354
|
-
return updateHandle(val, index, 'mark');
|
|
13355
|
-
}
|
|
13356
|
-
});
|
|
13357
|
-
}
|
|
13358
|
-
}, {
|
|
13359
|
-
dataIndex: 'skuName',
|
|
13360
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13361
|
-
align: 'center',
|
|
13362
|
-
ellipsis: true,
|
|
13363
|
-
width: 250
|
|
13364
|
-
}, {
|
|
13365
|
-
dataIndex: 'sku',
|
|
13366
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13367
|
-
align: 'center',
|
|
13368
|
-
ellipsis: true,
|
|
13369
|
-
width: 100
|
|
13370
|
-
}, {
|
|
13371
|
-
dataIndex: 'name',
|
|
13372
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
13373
|
-
align: 'center',
|
|
13374
|
-
ellipsis: true,
|
|
13375
|
-
width: 250
|
|
13376
|
-
}, {
|
|
13377
|
-
dataIndex: 'pic',
|
|
13378
|
-
title: "\u56FE\u7247",
|
|
13379
|
-
align: 'center',
|
|
13380
|
-
ellipsis: true,
|
|
13381
|
-
width: 100,
|
|
13382
|
-
render: function render(val) {
|
|
13383
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13384
|
-
width: 60,
|
|
13385
|
-
src: val
|
|
13386
|
-
});
|
|
13387
|
-
}
|
|
13388
|
-
}, {
|
|
13389
|
-
dataIndex: 'code',
|
|
13390
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
13391
|
-
align: 'center',
|
|
13392
|
-
ellipsis: true,
|
|
13393
|
-
width: 100
|
|
13394
|
-
}, {
|
|
13395
|
-
dataIndex: 'money',
|
|
13396
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13397
|
-
align: 'center',
|
|
13398
|
-
ellipsis: true,
|
|
13399
|
-
width: 100
|
|
13400
|
-
}, {
|
|
13401
|
-
dataIndex: 'number',
|
|
13402
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
13403
|
-
align: 'center',
|
|
13404
|
-
ellipsis: true,
|
|
13405
|
-
width: 100,
|
|
13406
|
-
render: function render(val, record, index) {
|
|
13407
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13408
|
-
style: {
|
|
13409
|
-
width: 70
|
|
13410
|
-
},
|
|
13411
|
-
value: val,
|
|
13412
|
-
min: 1,
|
|
13413
|
-
precision: 0,
|
|
13414
|
-
onChange: function onChange(num) {
|
|
13415
|
-
return updateHandle(num, index, 'number');
|
|
13416
|
-
}
|
|
13417
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13418
|
-
}
|
|
13419
|
-
}, {
|
|
13420
|
-
dataIndex: 'share',
|
|
13421
|
-
title: "\u5206\u644A\u4EF7",
|
|
13422
|
-
align: 'center',
|
|
13423
|
-
ellipsis: true,
|
|
13424
|
-
width: 70
|
|
13425
|
-
}, {
|
|
13426
|
-
dataIndex: 'type',
|
|
13427
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13428
|
-
align: 'center',
|
|
13429
|
-
ellipsis: true,
|
|
13430
|
-
width: 100
|
|
13431
|
-
}];
|
|
14415
|
+
columns = getColumnsMap({
|
|
14416
|
+
text: text,
|
|
14417
|
+
disabled: disabled,
|
|
14418
|
+
updateHandle: updateHandle,
|
|
14419
|
+
updateDataHandle: updateDataHandle
|
|
14420
|
+
})['default'];
|
|
13432
14421
|
}
|
|
13433
14422
|
return columns;
|
|
13434
14423
|
};
|
|
@@ -13440,6 +14429,24 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13440
14429
|
return COLUMNS_INFO(type);
|
|
13441
14430
|
};
|
|
13442
14431
|
var newColumns = useMemo(function () {
|
|
14432
|
+
var initBaseInfoColumns = GOODS_INFO_COLUMNS();
|
|
14433
|
+
var baseInfoColumns = [];
|
|
14434
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
14435
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
14436
|
+
if (isStringArray) {
|
|
14437
|
+
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
14438
|
+
return showHeader.includes(col.dataIndex);
|
|
14439
|
+
});
|
|
14440
|
+
} else if (isObjectArray) {
|
|
14441
|
+
baseInfoColumns = showHeader.filter(function (col) {
|
|
14442
|
+
return col.show !== false;
|
|
14443
|
+
}).map(function (col) {
|
|
14444
|
+
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
14445
|
+
return item.dataIndex === col.dataIndex;
|
|
14446
|
+
});
|
|
14447
|
+
return currentCol ? currentCol : undefined;
|
|
14448
|
+
}).filter(Boolean);
|
|
14449
|
+
}
|
|
13443
14450
|
var columnList = [{
|
|
13444
14451
|
dataIndex: '',
|
|
13445
14452
|
title: '序号',
|
|
@@ -13449,9 +14456,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13449
14456
|
render: function render(val, record, index) {
|
|
13450
14457
|
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
13451
14458
|
}
|
|
13452
|
-
}].concat(_toConsumableArray(
|
|
13453
|
-
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
13454
|
-
})));
|
|
14459
|
+
}].concat(_toConsumableArray(baseInfoColumns));
|
|
13455
14460
|
if (!disabled) {
|
|
13456
14461
|
columnList.push({
|
|
13457
14462
|
dataIndex: '',
|
|
@@ -13529,8 +14534,31 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13529
14534
|
isGift: '',
|
|
13530
14535
|
uuid: uuid(),
|
|
13531
14536
|
canDelete: true,
|
|
13532
|
-
|
|
13533
|
-
|
|
14537
|
+
canEdit: true,
|
|
14538
|
+
goodsNumber: 1,
|
|
14539
|
+
canUpdateNumber: canUpdateNumber
|
|
14540
|
+
});
|
|
14541
|
+
});
|
|
14542
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14543
|
+
newList = list.map(function (item) {
|
|
14544
|
+
var goodName = item.goodName,
|
|
14545
|
+
goodShortName = item.goodShortName,
|
|
14546
|
+
goodNo = item.goodNo,
|
|
14547
|
+
specName = item.specName,
|
|
14548
|
+
specNo = item.specNo,
|
|
14549
|
+
retailPrice = item.retailPrice;
|
|
14550
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14551
|
+
uuid: uuid(),
|
|
14552
|
+
canDelete: true,
|
|
14553
|
+
canEdit: true,
|
|
14554
|
+
qty: 1,
|
|
14555
|
+
goodName: goodName,
|
|
14556
|
+
goodShortName: goodShortName,
|
|
14557
|
+
goodNo: goodNo,
|
|
14558
|
+
specName: specName,
|
|
14559
|
+
specNo: specNo,
|
|
14560
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
14561
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
13534
14562
|
});
|
|
13535
14563
|
});
|
|
13536
14564
|
} else {
|
|
@@ -13628,6 +14656,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13628
14656
|
shopId: shopId,
|
|
13629
14657
|
maxLength: maxLength,
|
|
13630
14658
|
companyKey: companyKey
|
|
14659
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
|
|
14660
|
+
ref: refModal,
|
|
14661
|
+
onSubmit: onSubmit,
|
|
14662
|
+
width: width,
|
|
14663
|
+
shopList: shopList,
|
|
14664
|
+
shopId: shopId,
|
|
14665
|
+
maxLength: maxLength,
|
|
14666
|
+
companyKey: companyKey
|
|
13631
14667
|
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
13632
14668
|
ref: refModal,
|
|
13633
14669
|
onSubmit: onSubmit,
|
|
@@ -14326,7 +15362,7 @@ var bsE3Utils = {
|
|
|
14326
15362
|
};
|
|
14327
15363
|
|
|
14328
15364
|
var singletonMap$2 = new Map();
|
|
14329
|
-
var
|
|
15365
|
+
var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
14330
15366
|
if (!singletonMap$2.has(orderNo)) {
|
|
14331
15367
|
var p = new Promise(function (resolve, reject) {
|
|
14332
15368
|
var doReject = function doReject(err) {
|
|
@@ -14334,6 +15370,52 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14334
15370
|
singletonMap$2.delete(orderNo);
|
|
14335
15371
|
reject(err);
|
|
14336
15372
|
};
|
|
15373
|
+
extendRequest('/qy/gdfw/oms/gyOrderDetail', {
|
|
15374
|
+
method: 'post',
|
|
15375
|
+
data: {
|
|
15376
|
+
tid: orderNo
|
|
15377
|
+
}
|
|
15378
|
+
}).then(function (res) {
|
|
15379
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
15380
|
+
var _res$data;
|
|
15381
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) {
|
|
15382
|
+
res.data.trades = filterGyOrders(res === null || res === void 0 ? void 0 : res.data, orderNo).map(function (item) {
|
|
15383
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
15384
|
+
billNo: item.code,
|
|
15385
|
+
billType: item.orderTypeName,
|
|
15386
|
+
billTag: item.tagName,
|
|
15387
|
+
tradeTagName: item.tradeTagName,
|
|
15388
|
+
deliveryState: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
15389
|
+
});
|
|
15390
|
+
});
|
|
15391
|
+
}
|
|
15392
|
+
resolve(res.data);
|
|
15393
|
+
// 延迟10秒清除,保证订单的时效性
|
|
15394
|
+
setTimeout(function () {
|
|
15395
|
+
singletonMap$2.delete(orderNo);
|
|
15396
|
+
}, 1000 * 10);
|
|
15397
|
+
} else {
|
|
15398
|
+
doReject(res);
|
|
15399
|
+
}
|
|
15400
|
+
}).catch(doReject);
|
|
15401
|
+
});
|
|
15402
|
+
singletonMap$2.set(orderNo, p);
|
|
15403
|
+
}
|
|
15404
|
+
return singletonMap$2.get(orderNo);
|
|
15405
|
+
};
|
|
15406
|
+
var gyUtils = {
|
|
15407
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
15408
|
+
};
|
|
15409
|
+
|
|
15410
|
+
var singletonMap$3 = new Map();
|
|
15411
|
+
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
15412
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
15413
|
+
var p = new Promise(function (resolve, reject) {
|
|
15414
|
+
var doReject = function doReject(err) {
|
|
15415
|
+
// 清空掉错误的请求记录
|
|
15416
|
+
singletonMap$3.delete(orderNo);
|
|
15417
|
+
reject(err);
|
|
15418
|
+
};
|
|
14337
15419
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
14338
15420
|
method: 'post',
|
|
14339
15421
|
data: {
|
|
@@ -14357,16 +15439,16 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14357
15439
|
}
|
|
14358
15440
|
// 延迟10秒清除,保证订单的时效性
|
|
14359
15441
|
setTimeout(function () {
|
|
14360
|
-
singletonMap$
|
|
15442
|
+
singletonMap$3.delete(orderNo);
|
|
14361
15443
|
}, 1000 * 10);
|
|
14362
15444
|
} else {
|
|
14363
15445
|
doReject(data);
|
|
14364
15446
|
}
|
|
14365
15447
|
}).catch(doReject);
|
|
14366
15448
|
});
|
|
14367
|
-
singletonMap$
|
|
15449
|
+
singletonMap$3.set(orderNo, p);
|
|
14368
15450
|
}
|
|
14369
|
-
return singletonMap$
|
|
15451
|
+
return singletonMap$3.get(orderNo);
|
|
14370
15452
|
};
|
|
14371
15453
|
var kmUtils = {
|
|
14372
15454
|
getOrderListSingleton: getOrderListSingleton
|
|
@@ -14494,14 +15576,16 @@ var columnsMap = {
|
|
|
14494
15576
|
dataIndex: 'orderMsg',
|
|
14495
15577
|
width: 150,
|
|
14496
15578
|
ellipsis: true
|
|
14497
|
-
}]
|
|
15579
|
+
}],
|
|
15580
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
14498
15581
|
};
|
|
14499
15582
|
var rowKeyMap = {
|
|
14500
15583
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14501
15584
|
KM_SYSTEM_ORDER: 'billNo',
|
|
14502
15585
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14503
15586
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14504
|
-
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
15587
|
+
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15588
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
14505
15589
|
};
|
|
14506
15590
|
var index$1 = (function (props) {
|
|
14507
15591
|
var value = props.value,
|
|
@@ -14523,6 +15607,9 @@ var index$1 = (function (props) {
|
|
|
14523
15607
|
getWdtOrderList(value.orderNo);
|
|
14524
15608
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14525
15609
|
getBsE3OrderList(value.orderNo);
|
|
15610
|
+
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15611
|
+
console.log('触发gy--getGyOrderList--1');
|
|
15612
|
+
getGyOrderList(value.orderNo);
|
|
14526
15613
|
}
|
|
14527
15614
|
}
|
|
14528
15615
|
}, [value, type]);
|
|
@@ -14709,6 +15796,44 @@ var index$1 = (function (props) {
|
|
|
14709
15796
|
return _ref6.apply(this, arguments);
|
|
14710
15797
|
};
|
|
14711
15798
|
}();
|
|
15799
|
+
var getGyOrderList = /*#__PURE__*/function () {
|
|
15800
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15801
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15802
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15803
|
+
case 0:
|
|
15804
|
+
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15805
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
15806
|
+
return (item.platformCode || '').split(',').includes(orderNo);
|
|
15807
|
+
});
|
|
15808
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15809
|
+
orders: trades,
|
|
15810
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15811
|
+
var billNo = _ref9.billNo,
|
|
15812
|
+
billType = _ref9.billType,
|
|
15813
|
+
billTag = _ref9.billTag,
|
|
15814
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15815
|
+
deliveryState = _ref9.deliveryState;
|
|
15816
|
+
return {
|
|
15817
|
+
billNo: billNo,
|
|
15818
|
+
billType: billType,
|
|
15819
|
+
billTag: billTag,
|
|
15820
|
+
tradeTagName: tradeTagName,
|
|
15821
|
+
deliveryState: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
15822
|
+
};
|
|
15823
|
+
})
|
|
15824
|
+
}));
|
|
15825
|
+
});
|
|
15826
|
+
onceRef.current = false;
|
|
15827
|
+
case 2:
|
|
15828
|
+
case "end":
|
|
15829
|
+
return _context6.stop();
|
|
15830
|
+
}
|
|
15831
|
+
}, _callee6);
|
|
15832
|
+
}));
|
|
15833
|
+
return function getGyOrderList(_x6) {
|
|
15834
|
+
return _ref8.apply(this, arguments);
|
|
15835
|
+
};
|
|
15836
|
+
}();
|
|
14712
15837
|
var rowSelection = {
|
|
14713
15838
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14714
15839
|
fixed: true,
|
|
@@ -14725,7 +15850,24 @@ var index$1 = (function (props) {
|
|
|
14725
15850
|
};
|
|
14726
15851
|
}
|
|
14727
15852
|
};
|
|
14728
|
-
|
|
15853
|
+
// useEffect(() => {
|
|
15854
|
+
// const dom = document.querySelector(
|
|
15855
|
+
// `.${type}_SYSTEM_ORDER_COMPONENT .ant-table-content`,
|
|
15856
|
+
// );
|
|
15857
|
+
// //解决列表出现横向滚动条时选择数据造成行内闪烁问题
|
|
15858
|
+
// if (
|
|
15859
|
+
// (value?.selectIds || []).length > 0 &&
|
|
15860
|
+
// dom &&
|
|
15861
|
+
// dom.scrollWidth > dom.clientWidth &&
|
|
15862
|
+
// dom.scrollLeft === 0
|
|
15863
|
+
// ) {
|
|
15864
|
+
// console.log(dom.scrollWidth > dom.clientWidth, dom.scrollLeft === 0);
|
|
15865
|
+
// dom.scrollLeft = 1;
|
|
15866
|
+
// }
|
|
15867
|
+
// }, [JSON.stringify(value?.selectIds || [])]);
|
|
15868
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15869
|
+
className: "".concat(type, "_SYSTEM_ORDER_COMPONENT")
|
|
15870
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
14729
15871
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
14730
15872
|
columns: columns,
|
|
14731
15873
|
rowSelection: rowSelection,
|
|
@@ -14733,12 +15875,12 @@ var index$1 = (function (props) {
|
|
|
14733
15875
|
size: "small",
|
|
14734
15876
|
pagination: false,
|
|
14735
15877
|
scroll: {
|
|
14736
|
-
x: '
|
|
15878
|
+
x: 'max-content'
|
|
14737
15879
|
},
|
|
14738
15880
|
locale: {
|
|
14739
15881
|
emptyText: '暂无数据'
|
|
14740
15882
|
}
|
|
14741
|
-
});
|
|
15883
|
+
}));
|
|
14742
15884
|
});
|
|
14743
15885
|
|
|
14744
15886
|
var WlnGoods = function WlnGoods(props) {
|
|
@@ -14764,13 +15906,14 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
14764
15906
|
};
|
|
14765
15907
|
|
|
14766
15908
|
var componentMap$1 = {
|
|
14767
|
-
|
|
15909
|
+
WDT_GOODS: {
|
|
14768
15910
|
type: 'wdt',
|
|
14769
15911
|
key: 'wdtGoods',
|
|
14770
15912
|
name: '旺店通',
|
|
14771
15913
|
orderNo: 'srcTid',
|
|
14772
15914
|
goodDetailOrderNo: 'srcTid',
|
|
14773
15915
|
eventNameMap: {
|
|
15916
|
+
// pubsub 事件
|
|
14774
15917
|
type: 'wdtType',
|
|
14775
15918
|
updateGoodsHandle: updateWdtGoodsHandle,
|
|
14776
15919
|
selectListReturn: 'wdtSelectListReturn',
|
|
@@ -14788,13 +15931,14 @@ var componentMap$1 = {
|
|
|
14788
15931
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
14789
15932
|
}
|
|
14790
15933
|
},
|
|
14791
|
-
|
|
15934
|
+
BS_E3_GOODS: {
|
|
14792
15935
|
type: 'e3',
|
|
14793
15936
|
key: 'bsE3Goods',
|
|
14794
15937
|
name: '百胜E3',
|
|
14795
15938
|
orderNo: 'dealCode',
|
|
14796
15939
|
goodDetailOrderNo: 'originalDealCode',
|
|
14797
15940
|
eventNameMap: {
|
|
15941
|
+
// pubsub 事件
|
|
14798
15942
|
type: 'bsE3Type',
|
|
14799
15943
|
updateGoodsHandle: updateBsE3GoodsHandle,
|
|
14800
15944
|
selectListReturn: 'bsE3SelectListReturn',
|
|
@@ -14811,6 +15955,31 @@ var componentMap$1 = {
|
|
|
14811
15955
|
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
14812
15956
|
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
14813
15957
|
}
|
|
15958
|
+
},
|
|
15959
|
+
GY_GOODS: {
|
|
15960
|
+
type: 'gy',
|
|
15961
|
+
key: 'gyGoods',
|
|
15962
|
+
name: '管易',
|
|
15963
|
+
orderNo: 'dealCode',
|
|
15964
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
15965
|
+
eventNameMap: {
|
|
15966
|
+
// pubsub 事件
|
|
15967
|
+
type: 'gyType',
|
|
15968
|
+
updateGoodsHandle: updateGyGoodsHandle,
|
|
15969
|
+
selectListReturn: 'gySelectListReturn',
|
|
15970
|
+
selectList: 'gySelectList',
|
|
15971
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
15972
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
15973
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
15974
|
+
changeShopCode: 'gyChangeShopCode',
|
|
15975
|
+
reissueType: 'gyReissueType',
|
|
15976
|
+
returnType: 'gyReturnType',
|
|
15977
|
+
returnSelectListReturn: 'gyReturnSelectListReturn',
|
|
15978
|
+
returnSelectList: 'gyReturnSelectList',
|
|
15979
|
+
deleteGood: 'gyDeleteGood',
|
|
15980
|
+
returnDeleteGood: 'gyReturnDeleteGood',
|
|
15981
|
+
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
15982
|
+
}
|
|
14814
15983
|
}
|
|
14815
15984
|
};
|
|
14816
15985
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -15279,7 +16448,7 @@ var typeMap$1 = {
|
|
|
15279
16448
|
}
|
|
15280
16449
|
};
|
|
15281
16450
|
var wdtReissue = function wdtReissue(props) {
|
|
15282
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
16451
|
+
var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
15283
16452
|
var value = props.value,
|
|
15284
16453
|
onChange = props.onChange,
|
|
15285
16454
|
_props$reasonList = props.reasonList,
|
|
@@ -15440,20 +16609,25 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15440
16609
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15441
16610
|
};
|
|
15442
16611
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
15443
|
-
var _typeMap$type23,
|
|
16612
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
15444
16613
|
var newValue = _objectSpread2({}, value);
|
|
15445
|
-
|
|
16614
|
+
// 原订单商品
|
|
16615
|
+
var originTradeGoodList = getGoodDetails({
|
|
15446
16616
|
mode: isStrict
|
|
15447
|
-
})
|
|
15448
|
-
|
|
16617
|
+
}) || [];
|
|
16618
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
16619
|
+
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)]) || [];
|
|
16620
|
+
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
16621
|
+
return skuList.includes(item.uuid);
|
|
15449
16622
|
});
|
|
16623
|
+
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)]);
|
|
15450
16624
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15451
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16625
|
+
}, [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]);
|
|
15452
16626
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15453
16627
|
var showChangeBtn = useMemo(function () {
|
|
15454
|
-
var _typeMap$
|
|
15455
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15456
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
16628
|
+
var _typeMap$type27;
|
|
16629
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
16630
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
15457
16631
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
15458
16632
|
gutter: 8,
|
|
15459
16633
|
wrap: true
|
|
@@ -15471,12 +16645,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15471
16645
|
},
|
|
15472
16646
|
disabled: disabled,
|
|
15473
16647
|
allowClear: false,
|
|
15474
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16648
|
+
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)],
|
|
15475
16649
|
onChange: function onChange(val) {
|
|
15476
16650
|
return changeSystemOrderHandle(val);
|
|
15477
16651
|
},
|
|
15478
16652
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15479
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
16653
|
+
}, ((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) {
|
|
15480
16654
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
15481
16655
|
key: item.billNo,
|
|
15482
16656
|
value: item.billNo,
|
|
@@ -15497,7 +16671,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15497
16671
|
disabled: disabled,
|
|
15498
16672
|
allowClear: false,
|
|
15499
16673
|
options: reasonList,
|
|
15500
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16674
|
+
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)],
|
|
15501
16675
|
onChange: function onChange(val) {
|
|
15502
16676
|
return changeTypeHandle(val);
|
|
15503
16677
|
}
|
|
@@ -15509,7 +16683,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15509
16683
|
canUpdateNumber: showChangeBtn,
|
|
15510
16684
|
showChangeBtn: showChangeBtn,
|
|
15511
16685
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15512
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
16686
|
+
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)],
|
|
15513
16687
|
onChange: function onChange(val) {
|
|
15514
16688
|
return changeGoodHandle(val);
|
|
15515
16689
|
},
|
|
@@ -16208,16 +17382,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
16208
17382
|
};
|
|
16209
17383
|
|
|
16210
17384
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
16211
|
-
var msgTypeCh = {
|
|
16212
|
-
pdd: '拼多多',
|
|
16213
|
-
ding: '钉钉',
|
|
16214
|
-
wechat: '微信',
|
|
16215
|
-
qq: 'QQ',
|
|
16216
|
-
qywx: '企业微信',
|
|
16217
|
-
YZDKH: '邮政拦截',
|
|
16218
|
-
YT: '圆通拦截',
|
|
16219
|
-
feishu: '飞书'
|
|
16220
|
-
};
|
|
16221
17385
|
var MsgStatus = function MsgStatus(props) {
|
|
16222
17386
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
16223
17387
|
var _props$value = props.value,
|
|
@@ -16307,7 +17471,7 @@ var typeMap$2 = {
|
|
|
16307
17471
|
}
|
|
16308
17472
|
};
|
|
16309
17473
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16310
|
-
var _typeMap$type21, _typeMap$
|
|
17474
|
+
var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
|
|
16311
17475
|
var value = props.value,
|
|
16312
17476
|
onChange = props.onChange,
|
|
16313
17477
|
_props$reasonList = props.reasonList,
|
|
@@ -16445,15 +17609,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16445
17609
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
16446
17610
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
16447
17611
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
16448
|
-
var _typeMap$type22,
|
|
17612
|
+
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
16449
17613
|
var newValue = _objectSpread2({}, value);
|
|
16450
|
-
|
|
17614
|
+
// 原订单商品
|
|
17615
|
+
var originTradeGoodList = getGoodDetails({
|
|
16451
17616
|
mode: isStrict
|
|
16452
|
-
})
|
|
16453
|
-
|
|
17617
|
+
}) || [];
|
|
17618
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17619
|
+
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)]) || [];
|
|
17620
|
+
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17621
|
+
return skuList.includes(item.uuid);
|
|
16454
17622
|
});
|
|
16455
17623
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16456
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17624
|
+
}, [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]);
|
|
16457
17625
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
16458
17626
|
gutter: 8,
|
|
16459
17627
|
wrap: true,
|
|
@@ -16472,12 +17640,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16472
17640
|
},
|
|
16473
17641
|
disabled: disabled,
|
|
16474
17642
|
allowClear: false,
|
|
16475
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17643
|
+
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)],
|
|
16476
17644
|
onChange: function onChange(val) {
|
|
16477
17645
|
return changeSystemOrderHandle(val);
|
|
16478
17646
|
},
|
|
16479
17647
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16480
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
17648
|
+
}, ((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) {
|
|
16481
17649
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
16482
17650
|
key: item.billNo,
|
|
16483
17651
|
value: item.billNo,
|
|
@@ -16498,7 +17666,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16498
17666
|
disabled: disabled,
|
|
16499
17667
|
allowClear: false,
|
|
16500
17668
|
options: reasonList,
|
|
16501
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17669
|
+
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)],
|
|
16502
17670
|
onChange: function onChange(val) {
|
|
16503
17671
|
return changeTypeHandle(val);
|
|
16504
17672
|
}
|
|
@@ -16510,7 +17678,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16510
17678
|
canUpdateNumber: showChangeBtn,
|
|
16511
17679
|
showChangeBtn: showChangeBtn,
|
|
16512
17680
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16513
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
17681
|
+
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)],
|
|
16514
17682
|
onChange: function onChange(val) {
|
|
16515
17683
|
return changeGoodHandle(val);
|
|
16516
17684
|
},
|
|
@@ -16526,4 +17694,252 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16526
17694
|
})));
|
|
16527
17695
|
};
|
|
16528
17696
|
|
|
16529
|
-
|
|
17697
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17698
|
+
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17699
|
+
var typeMap$3 = {
|
|
17700
|
+
GY_REISSUE_GOODS: {
|
|
17701
|
+
key: 'gyReissueGoods',
|
|
17702
|
+
name: '管易',
|
|
17703
|
+
typeName: 'gyReissueType',
|
|
17704
|
+
systemOrder: 'gySystemOrder',
|
|
17705
|
+
systemOrderNo: 'gySystemOrderNo',
|
|
17706
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
17707
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
17708
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
17709
|
+
changeShopCode: 'gyChangeShopCode',
|
|
17710
|
+
reissueType: 'gyReissueType',
|
|
17711
|
+
formatDefaultField: {
|
|
17712
|
+
money: 'orderPrice',
|
|
17713
|
+
share: 'sharePrice'
|
|
17714
|
+
},
|
|
17715
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
17716
|
+
}
|
|
17717
|
+
};
|
|
17718
|
+
var GyReissue = function GyReissue(props) {
|
|
17719
|
+
var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
17720
|
+
var value = props.value,
|
|
17721
|
+
onChange = props.onChange,
|
|
17722
|
+
_props$reasonList = props.reasonList,
|
|
17723
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17724
|
+
disabled = props.disabled,
|
|
17725
|
+
type = props.type,
|
|
17726
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17727
|
+
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) {
|
|
17728
|
+
var _order$platformCode;
|
|
17729
|
+
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(',');
|
|
17730
|
+
});
|
|
17731
|
+
var getOrderFlag = useRef(false);
|
|
17732
|
+
var _useState = useState(false),
|
|
17733
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17734
|
+
isStrict = _useState2[0],
|
|
17735
|
+
setIsStrict = _useState2[1];
|
|
17736
|
+
useEffect(function () {
|
|
17737
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17738
|
+
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)) {
|
|
17739
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17740
|
+
getOrderFlag.current = true;
|
|
17741
|
+
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);
|
|
17742
|
+
}
|
|
17743
|
+
return;
|
|
17744
|
+
}, [value]);
|
|
17745
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17746
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17747
|
+
var _typeMap$type4;
|
|
17748
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17749
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17750
|
+
case 0:
|
|
17751
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17752
|
+
var _typeMap$type5, _typeMap$type6;
|
|
17753
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17754
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
17755
|
+
var billNo = _ref2.billNo,
|
|
17756
|
+
billType = _ref2.billType,
|
|
17757
|
+
billTag = _ref2.billTag,
|
|
17758
|
+
tradeTagName = _ref2.tradeTagName,
|
|
17759
|
+
deliveryState = _ref2.deliveryState,
|
|
17760
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
17761
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17762
|
+
billNo: billNo,
|
|
17763
|
+
billType: billType,
|
|
17764
|
+
billTag: billTag,
|
|
17765
|
+
tradeTagName: tradeTagName,
|
|
17766
|
+
deliveryState: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17767
|
+
});
|
|
17768
|
+
});
|
|
17769
|
+
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]), {}, {
|
|
17770
|
+
showOrderInfo: showOrderInfo,
|
|
17771
|
+
orders: orders
|
|
17772
|
+
}))));
|
|
17773
|
+
});
|
|
17774
|
+
case 1:
|
|
17775
|
+
case "end":
|
|
17776
|
+
return _context.stop();
|
|
17777
|
+
}
|
|
17778
|
+
}, _callee);
|
|
17779
|
+
}));
|
|
17780
|
+
return function getOrderList(_x) {
|
|
17781
|
+
return _ref.apply(this, arguments);
|
|
17782
|
+
};
|
|
17783
|
+
}();
|
|
17784
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17785
|
+
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17786
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17787
|
+
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;
|
|
17788
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17789
|
+
var newValue = _objectSpread2({}, value);
|
|
17790
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17791
|
+
if (typeName === '1') {
|
|
17792
|
+
var _typeMap$type9;
|
|
17793
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17794
|
+
mode: isStrict
|
|
17795
|
+
});
|
|
17796
|
+
} else if (typeName === '2') {
|
|
17797
|
+
var _typeMap$type10;
|
|
17798
|
+
// 切换到非原单,清空列表
|
|
17799
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17800
|
+
}
|
|
17801
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17802
|
+
};
|
|
17803
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17804
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17805
|
+
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';
|
|
17806
|
+
setIsStrict(mode);
|
|
17807
|
+
if (!isOriginalOrder) return;
|
|
17808
|
+
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({
|
|
17809
|
+
mode: mode
|
|
17810
|
+
}))));
|
|
17811
|
+
};
|
|
17812
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17813
|
+
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17814
|
+
var mode = _ref3.mode,
|
|
17815
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17816
|
+
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];
|
|
17817
|
+
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];
|
|
17818
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17819
|
+
return order.code === systemOrderNo;
|
|
17820
|
+
});
|
|
17821
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length) ? updateGyGoodsHandle([order]) : [];
|
|
17822
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17823
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17824
|
+
return !orderNo || goodItem.platformCode === orderNo;
|
|
17825
|
+
}) : goodDetails;
|
|
17826
|
+
};
|
|
17827
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17828
|
+
var _typeMap$type15;
|
|
17829
|
+
var newValue = _objectSpread2({}, value);
|
|
17830
|
+
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) {
|
|
17831
|
+
var _typeMap$type16, _typeMap$type17;
|
|
17832
|
+
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;
|
|
17833
|
+
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;
|
|
17834
|
+
return item;
|
|
17835
|
+
});
|
|
17836
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17837
|
+
};
|
|
17838
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17839
|
+
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17840
|
+
var newValue = _objectSpread2({}, value);
|
|
17841
|
+
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;
|
|
17842
|
+
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])) {
|
|
17843
|
+
var _typeMap$type20;
|
|
17844
|
+
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)] = [];
|
|
17845
|
+
} 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])) {
|
|
17846
|
+
var _typeMap$type22;
|
|
17847
|
+
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({
|
|
17848
|
+
mode: isStrict,
|
|
17849
|
+
sysOrderNo: val
|
|
17850
|
+
});
|
|
17851
|
+
}
|
|
17852
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17853
|
+
};
|
|
17854
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17855
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
17856
|
+
var newValue = _objectSpread2({}, value);
|
|
17857
|
+
// 原订单商品
|
|
17858
|
+
var originTradeGoodList = getGoodDetails({
|
|
17859
|
+
mode: isStrict
|
|
17860
|
+
}) || [];
|
|
17861
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17862
|
+
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)]) || [];
|
|
17863
|
+
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
17864
|
+
return skuList.includes(item.uuid);
|
|
17865
|
+
});
|
|
17866
|
+
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)]);
|
|
17867
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17868
|
+
}, [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]);
|
|
17869
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17870
|
+
var showChangeBtn = useMemo(function () {
|
|
17871
|
+
var _typeMap$type27;
|
|
17872
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17873
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17874
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17875
|
+
gutter: 8,
|
|
17876
|
+
wrap: true
|
|
17877
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
17878
|
+
className: "gutter-row",
|
|
17879
|
+
xs: {
|
|
17880
|
+
span: 11
|
|
17881
|
+
},
|
|
17882
|
+
sm: {
|
|
17883
|
+
span: 6
|
|
17884
|
+
}
|
|
17885
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
17886
|
+
style: {
|
|
17887
|
+
marginBottom: '8px'
|
|
17888
|
+
},
|
|
17889
|
+
disabled: disabled,
|
|
17890
|
+
allowClear: false,
|
|
17891
|
+
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)],
|
|
17892
|
+
onChange: function onChange(val) {
|
|
17893
|
+
return changeSystemOrderHandle(val);
|
|
17894
|
+
},
|
|
17895
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17896
|
+
}, ((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) {
|
|
17897
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17898
|
+
key: item.billNo,
|
|
17899
|
+
value: item.billNo,
|
|
17900
|
+
label: item.billNo
|
|
17901
|
+
}, item.billNo);
|
|
17902
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17903
|
+
className: "gutter-row",
|
|
17904
|
+
xs: {
|
|
17905
|
+
span: 11
|
|
17906
|
+
},
|
|
17907
|
+
sm: {
|
|
17908
|
+
span: 6
|
|
17909
|
+
}
|
|
17910
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17911
|
+
style: {
|
|
17912
|
+
marginBottom: '8px'
|
|
17913
|
+
},
|
|
17914
|
+
disabled: disabled,
|
|
17915
|
+
allowClear: false,
|
|
17916
|
+
options: reasonList,
|
|
17917
|
+
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)],
|
|
17918
|
+
onChange: function onChange(val) {
|
|
17919
|
+
return changeTypeHandle(val);
|
|
17920
|
+
}
|
|
17921
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17922
|
+
key: 'reissueGoods'
|
|
17923
|
+
}, other), {}, {
|
|
17924
|
+
type: type,
|
|
17925
|
+
disabled: disabled,
|
|
17926
|
+
canUpdateNumber: showChangeBtn,
|
|
17927
|
+
showChangeBtn: showChangeBtn,
|
|
17928
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17929
|
+
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)],
|
|
17930
|
+
onChange: function onChange(val) {
|
|
17931
|
+
return changeGoodHandle(val);
|
|
17932
|
+
},
|
|
17933
|
+
onModeChange: handleModeChange,
|
|
17934
|
+
showModeBtn: showModeBtn,
|
|
17935
|
+
isStrict: isStrict,
|
|
17936
|
+
tradeGoods: {
|
|
17937
|
+
originDataSource: getGoodDetails({
|
|
17938
|
+
mode: isStrict
|
|
17939
|
+
}),
|
|
17940
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17941
|
+
}
|
|
17942
|
+
})));
|
|
17943
|
+
};
|
|
17944
|
+
|
|
17945
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap };
|