@kmkf-fe-packages/basic-components 2.0.0-rc.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.esm.js +2290 -1144
- package/dist/index.js +2291 -1143
- package/dist/src/apaas/ApaasLogistics/index.d.ts +1 -0
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +7 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +9 -0
- package/dist/src/bs/component/GoodItem/index.d.ts +5 -1
- package/dist/src/bs/component/model/GyGoodsList.d.ts +36 -0
- package/dist/src/bs/component/model/GyGoodsModal.d.ts +12 -0
- package/dist/src/common/Goods/RichItem.d.ts +6 -1
- package/dist/src/constants/bs.d.ts +3 -0
- package/dist/src/constants/bs_e3.d.ts +3 -0
- package/dist/src/constants/columnsBaseInfoMap.d.ts +7 -0
- package/dist/src/constants/defaultColumns.d.ts +3 -0
- package/dist/src/constants/gy.d.ts +3 -0
- package/dist/src/constants/wdt.d.ts +3 -0
- package/dist/src/constants/wln.d.ts +3 -0
- package/dist/src/gy/Reissue/index.d.ts +3 -0
- package/dist/src/gy/common/index.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/jst/Goods/index.d.ts +1 -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 -22
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ 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,
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, 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, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
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';
|
|
@@ -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,
|
|
@@ -7361,7 +7361,8 @@ var Province = function Province(props) {
|
|
|
7361
7361
|
var mapping = {
|
|
7362
7362
|
workOrder: AddressData.getInstance(),
|
|
7363
7363
|
bs: BsAddressData.getInstance(),
|
|
7364
|
-
wdt: WdtAddressData.getInstance()
|
|
7364
|
+
wdt: WdtAddressData.getInstance(),
|
|
7365
|
+
gy: GyAddressData.getInstance()
|
|
7365
7366
|
};
|
|
7366
7367
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7367
7368
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7466,10 +7467,16 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7466
7467
|
var addressData = (type && {
|
|
7467
7468
|
bs: BsAddressData,
|
|
7468
7469
|
wdt: WdtAddressData,
|
|
7470
|
+
gy: GyAddressData,
|
|
7469
7471
|
workOrder: AddressData
|
|
7470
7472
|
}[type] || AddressData).getInstance();
|
|
7471
7473
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
7472
|
-
params.address = [
|
|
7474
|
+
// params.address = [
|
|
7475
|
+
// addressData.getProCodeByName(val?.province),
|
|
7476
|
+
// addressData.getProCodeByName(val?.city),
|
|
7477
|
+
// addressData.getProCodeByName(val?.district),
|
|
7478
|
+
// ];
|
|
7479
|
+
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
7480
|
}
|
|
7474
7481
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, params));
|
|
7475
7482
|
};
|
|
@@ -7542,11 +7549,13 @@ function ApaasPosting(props) {
|
|
|
7542
7549
|
});
|
|
7543
7550
|
}
|
|
7544
7551
|
|
|
7545
|
-
var _excluded$a = ["value", "onChange", "platformType"];
|
|
7552
|
+
var _excluded$a = ["value", "onChange", "platformType", "type"];
|
|
7546
7553
|
function ApaasLogistics(props) {
|
|
7547
7554
|
var value = props.value,
|
|
7548
7555
|
onChange = props.onChange,
|
|
7549
7556
|
platformType = props.platformType,
|
|
7557
|
+
_props$type = props.type,
|
|
7558
|
+
type = _props$type === void 0 ? 'select' : _props$type,
|
|
7550
7559
|
other = _objectWithoutProperties(props, _excluded$a);
|
|
7551
7560
|
var _useState = useState([]),
|
|
7552
7561
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7577,10 +7586,18 @@ function ApaasLogistics(props) {
|
|
|
7577
7586
|
isFirst.current = true;
|
|
7578
7587
|
}
|
|
7579
7588
|
}, []);
|
|
7580
|
-
|
|
7589
|
+
var handleInputChange = function handleInputChange(e) {
|
|
7590
|
+
var val = e.target.value;
|
|
7591
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
7592
|
+
};
|
|
7593
|
+
return type === 'input' ? /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7594
|
+
value: value,
|
|
7595
|
+
onChange: handleInputChange
|
|
7596
|
+
})) : /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
7581
7597
|
value: value,
|
|
7582
7598
|
onChange: onChange,
|
|
7583
|
-
options: option
|
|
7599
|
+
options: option,
|
|
7600
|
+
virtual: true
|
|
7584
7601
|
}));
|
|
7585
7602
|
}
|
|
7586
7603
|
|
|
@@ -8110,7 +8127,7 @@ function ApaasAddress(props) {
|
|
|
8110
8127
|
};
|
|
8111
8128
|
var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
8112
8129
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
8113
|
-
params.address =
|
|
8130
|
+
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
8131
|
}
|
|
8115
8132
|
onChange === null || onChange === void 0 ? void 0 : onChange(params);
|
|
8116
8133
|
};
|
|
@@ -9474,7 +9491,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
9474
9491
|
picUrl: item.picUrl,
|
|
9475
9492
|
numIid: item.numIid,
|
|
9476
9493
|
skuId: item.skuId,
|
|
9477
|
-
outerSkuId: item.outerSkuId
|
|
9494
|
+
outerSkuId: item.outerSkuId,
|
|
9495
|
+
num: 1 //手动选择商品默认数量
|
|
9478
9496
|
};
|
|
9479
9497
|
// if (type === 1) {
|
|
9480
9498
|
// params.outerId = item.outerId; //编码
|
|
@@ -9563,16 +9581,34 @@ var GoodItem = function GoodItem(props) {
|
|
|
9563
9581
|
return _ref5.apply(this, arguments);
|
|
9564
9582
|
};
|
|
9565
9583
|
}();
|
|
9566
|
-
var headerList =
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9584
|
+
var headerList = useMemo(function () {
|
|
9585
|
+
if (!Array.isArray(showHeader)) return columnsGoodsList.map(function (item) {
|
|
9586
|
+
return item.dataIndex;
|
|
9587
|
+
});
|
|
9588
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
9589
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
9590
|
+
var dataIndexList = [];
|
|
9591
|
+
if (isStringArray) {
|
|
9592
|
+
dataIndexList = showHeader;
|
|
9593
|
+
} else if (isObjectArray) {
|
|
9594
|
+
dataIndexList = showHeader.filter(function (item) {
|
|
9595
|
+
return item.show !== false;
|
|
9596
|
+
}).map(function (item) {
|
|
9597
|
+
return item.dataIndex;
|
|
9598
|
+
});
|
|
9599
|
+
}
|
|
9600
|
+
return dataIndexList || {
|
|
9601
|
+
1: columnsGoodsList.map(function (item) {
|
|
9602
|
+
return item.dataIndex;
|
|
9603
|
+
})
|
|
9604
|
+
}[type] || [];
|
|
9605
|
+
}, [showHeader]);
|
|
9570
9606
|
//修改参数
|
|
9571
|
-
var handleChangeValue = function handleChangeValue(key, index) {
|
|
9607
|
+
var handleChangeValue = function handleChangeValue(key, index, replaceFn) {
|
|
9572
9608
|
return function (e) {
|
|
9573
|
-
var _e$target;
|
|
9609
|
+
var _e$target, _e$target2;
|
|
9574
9610
|
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;
|
|
9611
|
+
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
9612
|
var newValue = {
|
|
9577
9613
|
shopId: shopId,
|
|
9578
9614
|
imgList: newImgList
|
|
@@ -9581,35 +9617,67 @@ var GoodItem = function GoodItem(props) {
|
|
|
9581
9617
|
};
|
|
9582
9618
|
};
|
|
9583
9619
|
// 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
|
-
|
|
9620
|
+
var goodItemAttrs = useMemo(function () {
|
|
9621
|
+
var initList = [{
|
|
9622
|
+
isShow: headerList.includes('title'),
|
|
9623
|
+
key: 'title',
|
|
9624
|
+
label: '商品名称'
|
|
9625
|
+
}, {
|
|
9626
|
+
isShow: headerList.includes('outerId'),
|
|
9627
|
+
key: 'outerId',
|
|
9628
|
+
label: '商品编码'
|
|
9629
|
+
},
|
|
9630
|
+
// { isShow: headerList.includes('picUrl'), key: 'picUrl', label: '图片' },
|
|
9631
|
+
{
|
|
9632
|
+
isShow: headerList.includes('numIid'),
|
|
9633
|
+
key: 'numIid',
|
|
9634
|
+
label: '商品id'
|
|
9635
|
+
}, {
|
|
9636
|
+
isShow: headerList.includes('num'),
|
|
9637
|
+
key: 'num',
|
|
9638
|
+
label: '商品数量',
|
|
9639
|
+
replaceFn: function replaceFn(value) {
|
|
9640
|
+
// 使用正则表达式匹配所有数字字符
|
|
9641
|
+
var numbers = String(value || '').match(/\d+/g);
|
|
9642
|
+
// 如果没有匹配到任何数字字符,返回null
|
|
9643
|
+
if (!numbers) {
|
|
9644
|
+
return null;
|
|
9645
|
+
}
|
|
9646
|
+
// 将匹配到的数字字符拼接成一个新的数字
|
|
9647
|
+
return Number(numbers.join('')) ? Number(numbers.join('')) : null;
|
|
9648
|
+
}
|
|
9649
|
+
}, {
|
|
9650
|
+
isShow: changeSku && headerList.includes('skuId'),
|
|
9651
|
+
key: 'skuId',
|
|
9652
|
+
label: 'SKU ID'
|
|
9653
|
+
}, {
|
|
9654
|
+
isShow: changeSku && headerList.includes('outerSkuId'),
|
|
9655
|
+
key: 'outerSkuId',
|
|
9656
|
+
label: 'SKU 编码'
|
|
9657
|
+
}, {
|
|
9658
|
+
isShow: changeSku && headerList.includes('propertiesName'),
|
|
9659
|
+
key: 'propertiesName',
|
|
9660
|
+
label: 'SKU 信息'
|
|
9661
|
+
}];
|
|
9662
|
+
if (!Array.isArray(showHeader)) return initList;
|
|
9663
|
+
var newList = [];
|
|
9664
|
+
headerList.forEach(function (dataIndex) {
|
|
9665
|
+
if (initList.find(function (item) {
|
|
9666
|
+
return item.key === dataIndex;
|
|
9667
|
+
})) {
|
|
9668
|
+
newList.push(initList.find(function (item) {
|
|
9669
|
+
return item.key === dataIndex;
|
|
9670
|
+
}));
|
|
9671
|
+
}
|
|
9672
|
+
});
|
|
9673
|
+
return newList;
|
|
9674
|
+
}, [headerList, showHeader]);
|
|
9675
|
+
var hasPic = useMemo(function () {
|
|
9676
|
+
return headerList.includes('picUrl');
|
|
9677
|
+
}, [headerList]);
|
|
9678
|
+
var hasAttr = useMemo(function () {
|
|
9679
|
+
return hasPic ? headerList.length > 1 : headerList.length > 0;
|
|
9680
|
+
}, [hasPic, headerList]);
|
|
9613
9681
|
return /*#__PURE__*/React.createElement("div", null, imgList.length === 0 ? /*#__PURE__*/React.createElement("p", {
|
|
9614
9682
|
className: "goods-title"
|
|
9615
9683
|
}, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
|
|
@@ -9667,7 +9735,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9667
9735
|
title: String(img[item.key] || ''),
|
|
9668
9736
|
value: img[item.key],
|
|
9669
9737
|
disabled: item.disabled || disabled,
|
|
9670
|
-
onChange: handleChangeValue(item.key, index)
|
|
9738
|
+
onChange: handleChangeValue(item.key, index, item.replaceFn)
|
|
9671
9739
|
}));
|
|
9672
9740
|
}), !disabled && !hasPic && type !== 4 && changeSku ? /*#__PURE__*/React.createElement(Button, {
|
|
9673
9741
|
style: {
|
|
@@ -10950,13 +11018,15 @@ var jstGoods = function jstGoods(props) {
|
|
|
10950
11018
|
_props$showField = props.showField,
|
|
10951
11019
|
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
10952
11020
|
_props$platformType = props.platformType,
|
|
10953
|
-
platformType = _props$platformType === void 0 ? 'default' : _props$platformType
|
|
11021
|
+
platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
|
|
11022
|
+
onlyShowFieldSelect = props.onlyShowFieldSelect;
|
|
10954
11023
|
var _useState = useState(0),
|
|
10955
11024
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10956
11025
|
changeIndex = _useState2[0],
|
|
10957
11026
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10958
11027
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
10959
|
-
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
11028
|
+
var isSelectName = ['wdt', 'bsE3', 'km', 'gy'].includes(platformType);
|
|
11029
|
+
var logisticsType = type === 1 && platformType === 'gy' ? 'input' : 'select';
|
|
10960
11030
|
useEffect(function () {
|
|
10961
11031
|
//没有值塞个默认值
|
|
10962
11032
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
@@ -10988,10 +11058,12 @@ var jstGoods = function jstGoods(props) {
|
|
|
10988
11058
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
10989
11059
|
}));
|
|
10990
11060
|
};
|
|
10991
|
-
var handleSelected = function handleSelected(val, type, option) {
|
|
11061
|
+
var handleSelected = function handleSelected(val, type, option, onlyShowFieldSelect) {
|
|
10992
11062
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10993
11063
|
changeOrderInfo[type] = val;
|
|
10994
|
-
|
|
11064
|
+
if (!onlyShowFieldSelect) {
|
|
11065
|
+
changeOrderInfo['sendId'] = option.value;
|
|
11066
|
+
}
|
|
10995
11067
|
if (isSelectName && type === 'sendName') {
|
|
10996
11068
|
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10997
11069
|
}
|
|
@@ -11030,24 +11102,32 @@ var jstGoods = function jstGoods(props) {
|
|
|
11030
11102
|
return setChangeIndex(index);
|
|
11031
11103
|
}
|
|
11032
11104
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11033
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
11105
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, _objectSpread2(_objectSpread2({
|
|
11106
|
+
type: logisticsType,
|
|
11034
11107
|
disabled: disabled,
|
|
11035
11108
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11036
11109
|
onChange: function onChange(val) {
|
|
11037
|
-
|
|
11110
|
+
if (logisticsType === 'input') {
|
|
11111
|
+
changeInputHandle(null, 'logisticsCompany');
|
|
11112
|
+
changeInputHandle(val, 'logisticsCompanyName');
|
|
11113
|
+
} else {
|
|
11114
|
+
changeInputHandle(val, 'logisticsCompany');
|
|
11115
|
+
}
|
|
11038
11116
|
},
|
|
11039
|
-
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex
|
|
11117
|
+
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex[logisticsType === 'input' ? 'logisticsCompanyName' : 'logisticsCompany']
|
|
11118
|
+
}, logisticsType === 'input' ? {} : {
|
|
11040
11119
|
showSearch: true,
|
|
11120
|
+
dropdownMatchSelectWidth: false,
|
|
11041
11121
|
filterOption: function filterOption(input, option) {
|
|
11042
11122
|
return option.label.includes(input);
|
|
11043
|
-
}
|
|
11044
|
-
|
|
11123
|
+
}
|
|
11124
|
+
}), {}, {
|
|
11045
11125
|
style: {
|
|
11046
11126
|
minWidth: '100px',
|
|
11047
11127
|
maxWidth: '180px'
|
|
11048
11128
|
},
|
|
11049
11129
|
platformType: platformType
|
|
11050
|
-
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11130
|
+
})) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11051
11131
|
disabled: disabled,
|
|
11052
11132
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11053
11133
|
onChange: function onChange(e) {
|
|
@@ -11087,7 +11167,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11087
11167
|
filterOption: filterOption,
|
|
11088
11168
|
value: ((_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.sendName) || null,
|
|
11089
11169
|
onChange: function onChange(value, option) {
|
|
11090
|
-
return handleSelected(value, 'sendName', option);
|
|
11170
|
+
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11091
11171
|
}
|
|
11092
11172
|
}) : /*#__PURE__*/React.createElement(Input, {
|
|
11093
11173
|
disabled: disabled,
|
|
@@ -12431,212 +12511,1645 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
12431
12511
|
};
|
|
12432
12512
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
12433
12513
|
|
|
12514
|
+
var getTableData$2 = function getTableData(_ref, formData) {
|
|
12515
|
+
var current = _ref.current,
|
|
12516
|
+
pageSize = _ref.pageSize;
|
|
12517
|
+
var data = {
|
|
12518
|
+
skuName: formData.skuName || null,
|
|
12519
|
+
skuCode: formData.skuCode || null,
|
|
12520
|
+
goodName: formData.goodName || null,
|
|
12521
|
+
goodNo: formData.goodNo || null
|
|
12522
|
+
};
|
|
12523
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12524
|
+
method: 'post',
|
|
12525
|
+
data: _objectSpread2({
|
|
12526
|
+
pageSize: pageSize,
|
|
12527
|
+
pageNo: current,
|
|
12528
|
+
platform: 'GY_ERP'
|
|
12529
|
+
}, data)
|
|
12530
|
+
}).then(function (res) {
|
|
12531
|
+
var _res$data = res.data,
|
|
12532
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12533
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12534
|
+
_res$data$total = _res$data.total,
|
|
12535
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12536
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12537
|
+
return _objectSpread2({}, item);
|
|
12538
|
+
});
|
|
12539
|
+
return {
|
|
12540
|
+
total: total,
|
|
12541
|
+
list: newProducts
|
|
12542
|
+
};
|
|
12543
|
+
});
|
|
12544
|
+
};
|
|
12434
12545
|
var columns$3 = [{
|
|
12435
|
-
dataIndex: '
|
|
12436
|
-
title:
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
},
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
width: 150
|
|
12446
|
-
}, {
|
|
12447
|
-
dataIndex: 'goodsShortName',
|
|
12448
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12449
|
-
width: 150
|
|
12450
|
-
}, {
|
|
12451
|
-
dataIndex: 'picPath',
|
|
12452
|
-
title: "\u5546\u54C1\u56FE\u7247",
|
|
12453
|
-
width: 150
|
|
12546
|
+
dataIndex: 'index',
|
|
12547
|
+
title: 'NO',
|
|
12548
|
+
render: function render(val, record, index) {
|
|
12549
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12550
|
+
style: {
|
|
12551
|
+
width: 25
|
|
12552
|
+
}
|
|
12553
|
+
}, index + 1);
|
|
12554
|
+
},
|
|
12555
|
+
width: 80
|
|
12454
12556
|
}, {
|
|
12455
|
-
dataIndex: '
|
|
12456
|
-
title:
|
|
12457
|
-
width:
|
|
12557
|
+
dataIndex: 'specName',
|
|
12558
|
+
title: 'SKU名称',
|
|
12559
|
+
width: 250,
|
|
12560
|
+
ellipsis: true
|
|
12458
12561
|
}, {
|
|
12459
|
-
dataIndex: '
|
|
12460
|
-
title:
|
|
12461
|
-
width:
|
|
12562
|
+
dataIndex: 'specNo',
|
|
12563
|
+
title: 'SKU编码',
|
|
12564
|
+
width: 200,
|
|
12565
|
+
ellipsis: true
|
|
12462
12566
|
}, {
|
|
12463
|
-
dataIndex: '
|
|
12464
|
-
title:
|
|
12465
|
-
width:
|
|
12567
|
+
dataIndex: 'goodName',
|
|
12568
|
+
title: '商品名称',
|
|
12569
|
+
width: 250,
|
|
12570
|
+
ellipsis: true
|
|
12466
12571
|
}, {
|
|
12467
|
-
dataIndex: '
|
|
12468
|
-
title: "\
|
|
12469
|
-
|
|
12572
|
+
dataIndex: 'goodShortName',
|
|
12573
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12574
|
+
ellipsis: true,
|
|
12575
|
+
width: 250
|
|
12470
12576
|
}, {
|
|
12471
|
-
dataIndex: '
|
|
12472
|
-
title:
|
|
12473
|
-
width:
|
|
12577
|
+
dataIndex: 'goodNo',
|
|
12578
|
+
title: '商品编码',
|
|
12579
|
+
width: 200,
|
|
12580
|
+
ellipsis: true
|
|
12474
12581
|
}, {
|
|
12475
|
-
dataIndex: '
|
|
12476
|
-
title:
|
|
12477
|
-
width:
|
|
12582
|
+
dataIndex: 'goodPicUrl',
|
|
12583
|
+
title: '商品图片',
|
|
12584
|
+
width: 100,
|
|
12585
|
+
render: function render(picUrl) {
|
|
12586
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
12587
|
+
style: {
|
|
12588
|
+
width: '40px',
|
|
12589
|
+
height: '40px',
|
|
12590
|
+
objectFit: 'contain'
|
|
12591
|
+
},
|
|
12592
|
+
src: picUrl
|
|
12593
|
+
});
|
|
12594
|
+
}
|
|
12478
12595
|
}, {
|
|
12479
12596
|
dataIndex: 'brandName',
|
|
12480
|
-
title:
|
|
12481
|
-
width:
|
|
12482
|
-
|
|
12483
|
-
dataIndex: 'goodsNumber',
|
|
12484
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
12485
|
-
width: 150
|
|
12486
|
-
}, {
|
|
12487
|
-
dataIndex: 'goodsPrice',
|
|
12488
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12489
|
-
width: 150
|
|
12597
|
+
title: '品牌名称',
|
|
12598
|
+
width: 200,
|
|
12599
|
+
ellipsis: true
|
|
12490
12600
|
}, {
|
|
12491
|
-
dataIndex: '
|
|
12492
|
-
title: "\
|
|
12493
|
-
|
|
12601
|
+
dataIndex: 'retailPrice',
|
|
12602
|
+
title: "\u6807\u51C6\u552E\u4EF7",
|
|
12603
|
+
ellipsis: true,
|
|
12604
|
+
width: 100
|
|
12494
12605
|
}, {
|
|
12495
|
-
dataIndex: '
|
|
12496
|
-
title: "\
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12500
|
-
}
|
|
12606
|
+
dataIndex: 'costPrice',
|
|
12607
|
+
title: "\u6210\u672C\u4EF7",
|
|
12608
|
+
ellipsis: true,
|
|
12609
|
+
width: 100
|
|
12501
12610
|
}];
|
|
12502
|
-
var
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
}
|
|
12517
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12518
|
-
};
|
|
12519
|
-
},
|
|
12520
|
-
goodsPrice: function goodsPrice(_ref2) {
|
|
12521
|
-
var disabled = _ref2.disabled,
|
|
12522
|
-
updateHandle = _ref2.updateHandle;
|
|
12523
|
-
return function (val, record, index) {
|
|
12524
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12525
|
-
style: {
|
|
12526
|
-
width: 70
|
|
12527
|
-
},
|
|
12528
|
-
value: val,
|
|
12529
|
-
min: 0,
|
|
12530
|
-
onChange: function onChange(value) {
|
|
12531
|
-
return updateHandle(value, index, 'goodsPrice');
|
|
12532
|
-
}
|
|
12533
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12534
|
-
};
|
|
12535
|
-
},
|
|
12536
|
-
isGift: function isGift(_ref3) {
|
|
12537
|
-
var disabled = _ref3.disabled,
|
|
12538
|
-
updateHandle = _ref3.updateHandle;
|
|
12539
|
-
return function (val, record, index) {
|
|
12540
|
-
var options = [{
|
|
12541
|
-
label: '是',
|
|
12542
|
-
value: 1
|
|
12543
|
-
}, {
|
|
12544
|
-
label: '否',
|
|
12545
|
-
value: 0
|
|
12546
|
-
}];
|
|
12547
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
12548
|
-
style: {
|
|
12549
|
-
width: 70
|
|
12550
|
-
},
|
|
12551
|
-
options: options,
|
|
12552
|
-
value: val,
|
|
12553
|
-
onChange: function onChange(value) {
|
|
12554
|
-
return updateHandle(value, index, 'isGift');
|
|
12555
|
-
},
|
|
12556
|
-
getPopupContainer: function getPopupContainer() {
|
|
12557
|
-
return document.getElementById('bsE3ReissueGoods');
|
|
12558
|
-
}
|
|
12559
|
-
}) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12611
|
+
var GoodList$2 = function GoodList(props, ref) {
|
|
12612
|
+
var _useState = useState([]),
|
|
12613
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12614
|
+
selectList = _useState2[0],
|
|
12615
|
+
setSelect = _useState2[1];
|
|
12616
|
+
var _useState3 = useState([]),
|
|
12617
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12618
|
+
selectIds = _useState4[0],
|
|
12619
|
+
setSelectIds = _useState4[1];
|
|
12620
|
+
useImperativeHandle(ref, function () {
|
|
12621
|
+
return {
|
|
12622
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12623
|
+
return selectList;
|
|
12624
|
+
}
|
|
12560
12625
|
};
|
|
12561
|
-
}
|
|
12562
|
-
};
|
|
12563
|
-
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
12564
|
-
var disabled = _ref4.disabled,
|
|
12565
|
-
updateHandle = _ref4.updateHandle,
|
|
12566
|
-
operate = _ref4.operate;
|
|
12567
|
-
return columns$3.map(function (item) {
|
|
12568
|
-
var newItem = _objectSpread2({
|
|
12569
|
-
align: 'center',
|
|
12570
|
-
ellipsis: true
|
|
12571
|
-
}, item);
|
|
12572
|
-
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
12573
|
-
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12574
|
-
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
12575
|
-
disabled: disabled,
|
|
12576
|
-
updateHandle: updateHandle
|
|
12577
|
-
})
|
|
12578
|
-
});
|
|
12579
|
-
}
|
|
12580
|
-
return newItem;
|
|
12581
12626
|
});
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
var
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12627
|
+
var _Form$useForm = Form.useForm(),
|
|
12628
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12629
|
+
form = _Form$useForm2[0];
|
|
12630
|
+
var _useAntdTable = useAntdTable(getTableData$2, {
|
|
12631
|
+
defaultPageSize: 10,
|
|
12632
|
+
form: form
|
|
12633
|
+
}),
|
|
12634
|
+
tableProps = _useAntdTable.tableProps,
|
|
12635
|
+
search = _useAntdTable.search,
|
|
12636
|
+
params = _useAntdTable.params;
|
|
12637
|
+
var submit = search.submit,
|
|
12638
|
+
reset = search.reset;
|
|
12639
|
+
var advanceSearchForm = /*#__PURE__*/React.createElement(Form, {
|
|
12640
|
+
layout: "inline",
|
|
12641
|
+
form: form
|
|
12642
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12643
|
+
name: "skuName",
|
|
12644
|
+
style: {
|
|
12645
|
+
marginBottom: '12px'
|
|
12646
|
+
}
|
|
12647
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12648
|
+
placeholder: "\u5546\u54C1sku\u540D\u79F0",
|
|
12649
|
+
allowClear: true,
|
|
12650
|
+
style: {
|
|
12651
|
+
width: 150
|
|
12652
|
+
}
|
|
12653
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12654
|
+
name: "skuCode",
|
|
12655
|
+
style: {
|
|
12656
|
+
marginBottom: '12px'
|
|
12657
|
+
}
|
|
12658
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12659
|
+
placeholder: "\u5546\u54C1sku\u7F16\u7801",
|
|
12660
|
+
allowClear: true,
|
|
12661
|
+
style: {
|
|
12662
|
+
width: 150
|
|
12663
|
+
}
|
|
12664
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12665
|
+
name: "goodName",
|
|
12666
|
+
style: {
|
|
12667
|
+
marginBottom: '12px'
|
|
12668
|
+
}
|
|
12669
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12670
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12671
|
+
allowClear: true,
|
|
12672
|
+
style: {
|
|
12673
|
+
width: 150
|
|
12674
|
+
}
|
|
12675
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12676
|
+
name: "goodNo",
|
|
12677
|
+
style: {
|
|
12678
|
+
marginBottom: '12px'
|
|
12679
|
+
}
|
|
12680
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12681
|
+
placeholder: "\u5546\u54C1\u7F16\u7801",
|
|
12682
|
+
allowClear: true,
|
|
12683
|
+
style: {
|
|
12684
|
+
width: 150
|
|
12685
|
+
}
|
|
12686
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12687
|
+
style: {
|
|
12688
|
+
marginBottom: '12px'
|
|
12689
|
+
}
|
|
12690
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12691
|
+
type: "primary",
|
|
12692
|
+
style: {
|
|
12693
|
+
marginRight: '8px'
|
|
12694
|
+
},
|
|
12695
|
+
onClick: submit
|
|
12696
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React.createElement(Button, {
|
|
12697
|
+
onClick: reset
|
|
12698
|
+
}, "\u91CD\u7F6E")));
|
|
12699
|
+
var rowSelection = {
|
|
12700
|
+
selectedRowKeys: selectIds,
|
|
12701
|
+
fixed: true,
|
|
12702
|
+
onSelect: function onSelect(record, selected) {
|
|
12703
|
+
if (selected) {
|
|
12704
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12705
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12706
|
+
} else {
|
|
12707
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12708
|
+
return t !== record.specNo;
|
|
12709
|
+
}));
|
|
12710
|
+
setSelect(selectList.filter(function (t) {
|
|
12711
|
+
return t.specNo !== record.specNo;
|
|
12712
|
+
}));
|
|
12713
|
+
}
|
|
12714
|
+
},
|
|
12715
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12716
|
+
if (selected) {
|
|
12717
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12718
|
+
return t.specNo;
|
|
12719
|
+
}))));
|
|
12720
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12721
|
+
} else {
|
|
12722
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
12723
|
+
return t.specNo;
|
|
12724
|
+
})));
|
|
12725
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12726
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12727
|
+
});
|
|
12728
|
+
setSelect(list);
|
|
12729
|
+
}
|
|
12730
|
+
}
|
|
12731
|
+
};
|
|
12732
|
+
var showTable = function showTable() {
|
|
12733
|
+
var handleDelete = function handleDelete(record) {
|
|
12734
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12735
|
+
return t !== record.specNo;
|
|
12736
|
+
}));
|
|
12737
|
+
setSelect(selectList.filter(function (t) {
|
|
12738
|
+
return t.specNo !== record.specNo;
|
|
12739
|
+
}));
|
|
12740
|
+
};
|
|
12741
|
+
var showColumns = [{
|
|
12742
|
+
dataIndex: '',
|
|
12743
|
+
title: "\u64CD\u4F5C",
|
|
12744
|
+
ellipsis: true,
|
|
12745
|
+
width: 100,
|
|
12746
|
+
render: function render(val, record) {
|
|
12747
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
12748
|
+
type: "link",
|
|
12749
|
+
onClick: function onClick() {
|
|
12750
|
+
return handleDelete(record);
|
|
12751
|
+
}
|
|
12752
|
+
}, "\u5220\u9664");
|
|
12753
|
+
}
|
|
12754
|
+
}].concat(takeRight(columns$3, columns$3.length - 1));
|
|
12755
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
12756
|
+
style: {
|
|
12757
|
+
width: '100%',
|
|
12758
|
+
maxWidth: '387px'
|
|
12759
|
+
}
|
|
12760
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
12761
|
+
columns: showColumns,
|
|
12762
|
+
rowKey: 'specNo',
|
|
12763
|
+
dataSource: selectList,
|
|
12764
|
+
scroll: {
|
|
12765
|
+
x: '100%',
|
|
12766
|
+
y: 250
|
|
12767
|
+
},
|
|
12768
|
+
pagination: {
|
|
12769
|
+
size: 'small',
|
|
12770
|
+
total: selectIds.length,
|
|
12771
|
+
pageSize: 10,
|
|
12772
|
+
showSizeChanger: false
|
|
12773
|
+
}
|
|
12774
|
+
})) : null;
|
|
12775
|
+
};
|
|
12776
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, advanceSearchForm, /*#__PURE__*/React.createElement("div", {
|
|
12777
|
+
style: {
|
|
12778
|
+
marginTop: '4px'
|
|
12779
|
+
}
|
|
12780
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
12781
|
+
rowSelection: rowSelection,
|
|
12782
|
+
rowKey: "specNo",
|
|
12783
|
+
columns: columns$3,
|
|
12784
|
+
scroll: {
|
|
12785
|
+
x: '100%',
|
|
12786
|
+
y: 250
|
|
12787
|
+
}
|
|
12788
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
12789
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12790
|
+
return triggerNode.parentElement;
|
|
12791
|
+
},
|
|
12792
|
+
content: showTable(),
|
|
12793
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12794
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
12795
|
+
danger: true,
|
|
12796
|
+
type: "text"
|
|
12797
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
12798
|
+
};
|
|
12799
|
+
var GyGoodsList = /*#__PURE__*/forwardRef(GoodList$2);
|
|
12800
|
+
|
|
12801
|
+
var GyGoodsModal = function GyGoodsModal(props, ref) {
|
|
12802
|
+
useImperativeHandle(ref, function () {
|
|
12803
|
+
return {
|
|
12804
|
+
open: function open() {
|
|
12805
|
+
setVisible(true);
|
|
12806
|
+
}
|
|
12807
|
+
};
|
|
12808
|
+
});
|
|
12809
|
+
var onSubmit = props.onSubmit,
|
|
12810
|
+
width = props.width;
|
|
12811
|
+
var _useState = useState(false),
|
|
12812
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12813
|
+
visible = _useState2[0],
|
|
12814
|
+
setVisible = _useState2[1];
|
|
12815
|
+
var gyGoodsListRef = useRef(null);
|
|
12816
|
+
var _onCancel = function onCancel() {
|
|
12817
|
+
setVisible(false);
|
|
12818
|
+
};
|
|
12819
|
+
var onOk = function onOk() {
|
|
12820
|
+
var _gyGoodsListRef$curre;
|
|
12821
|
+
var selectedList = ((_gyGoodsListRef$curre = gyGoodsListRef.current) === null || _gyGoodsListRef$curre === void 0 ? void 0 : _gyGoodsListRef$curre.getSelectGoodList()) || [];
|
|
12822
|
+
onSubmit(selectedList);
|
|
12823
|
+
_onCancel();
|
|
12824
|
+
};
|
|
12825
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
12826
|
+
title: '选择商品',
|
|
12827
|
+
okText: '确认',
|
|
12828
|
+
cancelText: '取消',
|
|
12829
|
+
visible: visible,
|
|
12830
|
+
width: width || 850,
|
|
12831
|
+
onCancel: function onCancel() {
|
|
12832
|
+
_onCancel();
|
|
12833
|
+
},
|
|
12834
|
+
onOk: onOk,
|
|
12835
|
+
wrapClassName: "goodModal"
|
|
12836
|
+
}, /*#__PURE__*/React.createElement(GyGoodsList, {
|
|
12837
|
+
ref: gyGoodsListRef
|
|
12838
|
+
})));
|
|
12839
|
+
};
|
|
12840
|
+
var GyGoodsModal$1 = /*#__PURE__*/forwardRef(GyGoodsModal);
|
|
12841
|
+
|
|
12842
|
+
var getColumns = function getColumns(_ref) {
|
|
12843
|
+
var _ref$text = _ref.text,
|
|
12844
|
+
disabled = _ref.disabled,
|
|
12845
|
+
updateHandle = _ref.updateHandle;
|
|
12846
|
+
return {
|
|
12847
|
+
//百胜E3补发商品
|
|
12848
|
+
BS_E3_REISSUE_GOODS: [{
|
|
12849
|
+
dataIndex: 'sku',
|
|
12850
|
+
title: "SKU",
|
|
12851
|
+
width: 150
|
|
12852
|
+
}, {
|
|
12853
|
+
dataIndex: 'skuId',
|
|
12854
|
+
title: "SKU ID",
|
|
12855
|
+
width: 150
|
|
12856
|
+
}, {
|
|
12857
|
+
dataIndex: 'goodsName',
|
|
12858
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12859
|
+
width: 150
|
|
12860
|
+
}, {
|
|
12861
|
+
dataIndex: 'goodsShortName',
|
|
12862
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12863
|
+
width: 150
|
|
12864
|
+
}, {
|
|
12865
|
+
dataIndex: 'picPath',
|
|
12866
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12867
|
+
width: 150,
|
|
12868
|
+
render: function render(val) {
|
|
12869
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12870
|
+
width: 60,
|
|
12871
|
+
src: val
|
|
12872
|
+
});
|
|
12873
|
+
}
|
|
12874
|
+
}, {
|
|
12875
|
+
dataIndex: 'goodsSn',
|
|
12876
|
+
title: "\u8D27\u53F7",
|
|
12877
|
+
width: 150
|
|
12878
|
+
}, {
|
|
12879
|
+
dataIndex: 'goodsId',
|
|
12880
|
+
title: "\u8D27\u53F7ID",
|
|
12881
|
+
width: 150
|
|
12882
|
+
}, {
|
|
12883
|
+
dataIndex: 'colorName',
|
|
12884
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12885
|
+
width: 150
|
|
12886
|
+
}, {
|
|
12887
|
+
dataIndex: 'colorCode',
|
|
12888
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12889
|
+
width: 150
|
|
12890
|
+
}, {
|
|
12891
|
+
dataIndex: 'sizeName',
|
|
12892
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12893
|
+
width: 150
|
|
12894
|
+
}, {
|
|
12895
|
+
dataIndex: 'sizeCode',
|
|
12896
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12897
|
+
width: 150
|
|
12898
|
+
}, {
|
|
12899
|
+
dataIndex: 'brandName',
|
|
12900
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12901
|
+
width: 150
|
|
12902
|
+
}, {
|
|
12903
|
+
dataIndex: 'goodsNumber',
|
|
12904
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12905
|
+
width: 150
|
|
12906
|
+
}, {
|
|
12907
|
+
dataIndex: 'goodsPrice',
|
|
12908
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12909
|
+
width: 150
|
|
12910
|
+
}, {
|
|
12911
|
+
dataIndex: 'shopPrice',
|
|
12912
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12913
|
+
width: 150
|
|
12914
|
+
}, {
|
|
12915
|
+
dataIndex: 'isGift',
|
|
12916
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12917
|
+
width: 150,
|
|
12918
|
+
render: function render(val) {
|
|
12919
|
+
return /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
12920
|
+
}
|
|
12921
|
+
}],
|
|
12922
|
+
//百胜E3商品信息
|
|
12923
|
+
BS_E3_GOODS: [{
|
|
12924
|
+
dataIndex: 'sku',
|
|
12925
|
+
title: "SKU",
|
|
12926
|
+
align: 'center',
|
|
12927
|
+
ellipsis: true,
|
|
12928
|
+
width: 150
|
|
12929
|
+
}, {
|
|
12930
|
+
dataIndex: 'skuId',
|
|
12931
|
+
title: "SKU ID",
|
|
12932
|
+
align: 'center',
|
|
12933
|
+
ellipsis: true,
|
|
12934
|
+
width: 150
|
|
12935
|
+
}, {
|
|
12936
|
+
dataIndex: 'goodsName',
|
|
12937
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12938
|
+
align: 'center',
|
|
12939
|
+
ellipsis: true,
|
|
12940
|
+
width: 150
|
|
12941
|
+
}, {
|
|
12942
|
+
dataIndex: 'goodsShortName',
|
|
12943
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12944
|
+
align: 'center',
|
|
12945
|
+
ellipsis: true,
|
|
12946
|
+
width: 100
|
|
12947
|
+
}, {
|
|
12948
|
+
dataIndex: 'picPath',
|
|
12949
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12950
|
+
align: 'center',
|
|
12951
|
+
ellipsis: true,
|
|
12952
|
+
width: 100,
|
|
12953
|
+
render: function render(val) {
|
|
12954
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12955
|
+
width: 60,
|
|
12956
|
+
src: val
|
|
12957
|
+
});
|
|
12958
|
+
}
|
|
12959
|
+
}, {
|
|
12960
|
+
dataIndex: 'goodsSn',
|
|
12961
|
+
title: "\u8D27\u53F7",
|
|
12962
|
+
align: 'center',
|
|
12963
|
+
ellipsis: true,
|
|
12964
|
+
width: 150
|
|
12965
|
+
}, {
|
|
12966
|
+
dataIndex: 'goodsId',
|
|
12967
|
+
title: "\u8D27\u53F7ID",
|
|
12968
|
+
align: 'center',
|
|
12969
|
+
ellipsis: true,
|
|
12970
|
+
width: 150
|
|
12971
|
+
}, {
|
|
12972
|
+
dataIndex: 'colorName',
|
|
12973
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12974
|
+
align: 'center',
|
|
12975
|
+
ellipsis: true,
|
|
12976
|
+
width: 100
|
|
12977
|
+
}, {
|
|
12978
|
+
dataIndex: 'colorCode',
|
|
12979
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12980
|
+
align: 'center',
|
|
12981
|
+
ellipsis: true,
|
|
12982
|
+
width: 150
|
|
12983
|
+
}, {
|
|
12984
|
+
dataIndex: 'sizeName',
|
|
12985
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12986
|
+
align: 'center',
|
|
12987
|
+
ellipsis: true,
|
|
12988
|
+
width: 100
|
|
12989
|
+
}, {
|
|
12990
|
+
dataIndex: 'sizeCode',
|
|
12991
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12992
|
+
align: 'center',
|
|
12993
|
+
ellipsis: true,
|
|
12994
|
+
width: 100
|
|
12995
|
+
}, {
|
|
12996
|
+
dataIndex: 'brandName',
|
|
12997
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12998
|
+
align: 'center',
|
|
12999
|
+
ellipsis: true,
|
|
13000
|
+
width: 150
|
|
13001
|
+
}, {
|
|
13002
|
+
dataIndex: 'goodsNumber',
|
|
13003
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
13004
|
+
align: 'center',
|
|
13005
|
+
ellipsis: true,
|
|
13006
|
+
width: 100,
|
|
13007
|
+
render: function render(val, record, index) {
|
|
13008
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13009
|
+
style: {
|
|
13010
|
+
width: 70
|
|
13011
|
+
},
|
|
13012
|
+
value: val,
|
|
13013
|
+
min: 1,
|
|
13014
|
+
precision: 0,
|
|
13015
|
+
onChange: function onChange(num) {
|
|
13016
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
13017
|
+
}
|
|
13018
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13019
|
+
}
|
|
13020
|
+
}, {
|
|
13021
|
+
dataIndex: 'goodsPrice',
|
|
13022
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13023
|
+
align: 'center',
|
|
13024
|
+
ellipsis: true,
|
|
13025
|
+
width: 120,
|
|
13026
|
+
render: function render(val, record, index) {
|
|
13027
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13028
|
+
style: {
|
|
13029
|
+
width: 70
|
|
13030
|
+
},
|
|
13031
|
+
value: val,
|
|
13032
|
+
min: 0,
|
|
13033
|
+
precision: 2,
|
|
13034
|
+
onChange: function onChange(num) {
|
|
13035
|
+
return updateHandle(num, index, 'goodsPrice');
|
|
13036
|
+
}
|
|
13037
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13038
|
+
}
|
|
13039
|
+
}, {
|
|
13040
|
+
dataIndex: 'shopPrice',
|
|
13041
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13042
|
+
align: 'center',
|
|
13043
|
+
ellipsis: true,
|
|
13044
|
+
width: 120
|
|
13045
|
+
}, {
|
|
13046
|
+
dataIndex: 'sharePrice',
|
|
13047
|
+
title: "\u5206\u644A\u4EF7",
|
|
13048
|
+
align: 'center',
|
|
13049
|
+
ellipsis: true,
|
|
13050
|
+
width: 120
|
|
13051
|
+
}, {
|
|
13052
|
+
dataIndex: 'sharePayment',
|
|
13053
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13054
|
+
align: 'center',
|
|
13055
|
+
ellipsis: true,
|
|
13056
|
+
width: 120
|
|
13057
|
+
}, {
|
|
13058
|
+
dataIndex: 'payment',
|
|
13059
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13060
|
+
align: 'center',
|
|
13061
|
+
ellipsis: true,
|
|
13062
|
+
width: 120,
|
|
13063
|
+
render: function render(val, record, index) {
|
|
13064
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13065
|
+
style: {
|
|
13066
|
+
width: 70
|
|
13067
|
+
},
|
|
13068
|
+
value: val,
|
|
13069
|
+
min: 0,
|
|
13070
|
+
precision: 2,
|
|
13071
|
+
onChange: function onChange(num) {
|
|
13072
|
+
return updateHandle(num, index, 'payment');
|
|
13073
|
+
}
|
|
13074
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13075
|
+
}
|
|
13076
|
+
}, {
|
|
13077
|
+
dataIndex: 'tcSku',
|
|
13078
|
+
title: "\u5957\u9910SKU",
|
|
13079
|
+
align: 'center',
|
|
13080
|
+
ellipsis: true,
|
|
13081
|
+
width: 150
|
|
13082
|
+
}, {
|
|
13083
|
+
dataIndex: 'tcGoodsNumber',
|
|
13084
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
13085
|
+
align: 'center',
|
|
13086
|
+
ellipsis: true,
|
|
13087
|
+
width: 100
|
|
13088
|
+
}, {
|
|
13089
|
+
dataIndex: 'taoCanSingleSl',
|
|
13090
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13091
|
+
align: 'center',
|
|
13092
|
+
ellipsis: true,
|
|
13093
|
+
width: 100
|
|
13094
|
+
}, {
|
|
13095
|
+
dataIndex: 'isGift',
|
|
13096
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13097
|
+
align: 'center',
|
|
13098
|
+
ellipsis: true,
|
|
13099
|
+
width: 100,
|
|
13100
|
+
render: function render(val) {
|
|
13101
|
+
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13102
|
+
}
|
|
13103
|
+
}]
|
|
13104
|
+
};
|
|
13105
|
+
};
|
|
13106
|
+
|
|
13107
|
+
var getColumns$1 = function getColumns(_ref) {
|
|
13108
|
+
var _ref$text = _ref.text,
|
|
13109
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13110
|
+
disabled = _ref.disabled,
|
|
13111
|
+
updateHandle = _ref.updateHandle;
|
|
13112
|
+
return {
|
|
13113
|
+
//bs商品信息
|
|
13114
|
+
BS_GOODS: [{
|
|
13115
|
+
dataIndex: 'mark',
|
|
13116
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
13117
|
+
align: 'center',
|
|
13118
|
+
ellipsis: true,
|
|
13119
|
+
width: 70,
|
|
13120
|
+
render: function render(val, record, index) {
|
|
13121
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
13122
|
+
options: [{
|
|
13123
|
+
label: '是',
|
|
13124
|
+
value: '是'
|
|
13125
|
+
}, {
|
|
13126
|
+
label: '否',
|
|
13127
|
+
value: '否'
|
|
13128
|
+
}],
|
|
13129
|
+
disabled: disabled,
|
|
13130
|
+
value: val,
|
|
13131
|
+
onChange: function onChange(val) {
|
|
13132
|
+
return updateHandle(val, index, 'mark');
|
|
13133
|
+
}
|
|
13134
|
+
});
|
|
13135
|
+
}
|
|
13136
|
+
}, {
|
|
13137
|
+
dataIndex: 'skuName',
|
|
13138
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13139
|
+
align: 'center',
|
|
13140
|
+
ellipsis: true,
|
|
13141
|
+
width: 250
|
|
13142
|
+
}, {
|
|
13143
|
+
dataIndex: 'sku',
|
|
13144
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13145
|
+
align: 'center',
|
|
13146
|
+
ellipsis: true,
|
|
13147
|
+
width: 100
|
|
13148
|
+
}, {
|
|
13149
|
+
dataIndex: 'name',
|
|
13150
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13151
|
+
align: 'center',
|
|
13152
|
+
ellipsis: true,
|
|
13153
|
+
width: 250
|
|
13154
|
+
}, {
|
|
13155
|
+
dataIndex: 'pic',
|
|
13156
|
+
title: "\u56FE\u7247",
|
|
13157
|
+
align: 'center',
|
|
13158
|
+
ellipsis: true,
|
|
13159
|
+
width: 100,
|
|
13160
|
+
render: function render(val) {
|
|
13161
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
13162
|
+
width: 60,
|
|
13163
|
+
src: val
|
|
13164
|
+
});
|
|
13165
|
+
}
|
|
13166
|
+
}, {
|
|
13167
|
+
dataIndex: 'code',
|
|
13168
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13169
|
+
align: 'center',
|
|
13170
|
+
ellipsis: true,
|
|
13171
|
+
width: 100
|
|
13172
|
+
}, {
|
|
13173
|
+
dataIndex: 'money',
|
|
13174
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13175
|
+
align: 'center',
|
|
13176
|
+
ellipsis: true,
|
|
13177
|
+
width: 100
|
|
13178
|
+
}, {
|
|
13179
|
+
dataIndex: 'number',
|
|
13180
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13181
|
+
align: 'center',
|
|
13182
|
+
ellipsis: true,
|
|
13183
|
+
width: 100,
|
|
13184
|
+
render: function render(val, record, index) {
|
|
13185
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13186
|
+
style: {
|
|
13187
|
+
width: 70
|
|
13188
|
+
},
|
|
13189
|
+
value: val,
|
|
13190
|
+
min: 1,
|
|
13191
|
+
precision: 0,
|
|
13192
|
+
onChange: function onChange(num) {
|
|
13193
|
+
return updateHandle(num, index, 'number');
|
|
13194
|
+
}
|
|
13195
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13196
|
+
}
|
|
13197
|
+
}, {
|
|
13198
|
+
dataIndex: 'share',
|
|
13199
|
+
title: "\u5206\u644A\u4EF7",
|
|
13200
|
+
align: 'center',
|
|
13201
|
+
ellipsis: true,
|
|
13202
|
+
width: 70
|
|
13203
|
+
}, {
|
|
13204
|
+
dataIndex: 'type',
|
|
13205
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13206
|
+
align: 'center',
|
|
13207
|
+
ellipsis: true,
|
|
13208
|
+
width: 100
|
|
13209
|
+
}, {
|
|
13210
|
+
dataIndex: 'batch',
|
|
13211
|
+
title: "\u6279\u6B21\u53F7",
|
|
13212
|
+
align: 'center',
|
|
13213
|
+
ellipsis: true,
|
|
13214
|
+
width: 100
|
|
13215
|
+
}, {
|
|
13216
|
+
dataIndex: 'expireDate',
|
|
13217
|
+
title: "\u6709\u6548\u671F",
|
|
13218
|
+
align: 'center',
|
|
13219
|
+
ellipsis: true,
|
|
13220
|
+
width: 100
|
|
13221
|
+
}]
|
|
13222
|
+
};
|
|
13223
|
+
};
|
|
13224
|
+
|
|
13225
|
+
var renderGiftType = function renderGiftType(val) {
|
|
13226
|
+
var giftTypeMap = {
|
|
13227
|
+
0: '非赠品',
|
|
13228
|
+
1: '自动赠送',
|
|
13229
|
+
2: '手工赠送',
|
|
13230
|
+
3: '回购自动送赠品',
|
|
13231
|
+
4: '前N有礼送赠品',
|
|
12591
13232
|
6: '天猫优仓赠品',
|
|
12592
13233
|
7: '淘宝CRM会员送赠'
|
|
12593
13234
|
};
|
|
12594
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13235
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13236
|
+
};
|
|
13237
|
+
var renderFieldMap = {
|
|
13238
|
+
num: function num(_ref) {
|
|
13239
|
+
var disabled = _ref.disabled,
|
|
13240
|
+
updateHandle = _ref.updateHandle;
|
|
13241
|
+
return function (val, record, index) {
|
|
13242
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13243
|
+
style: {
|
|
13244
|
+
width: 70
|
|
13245
|
+
},
|
|
13246
|
+
value: val,
|
|
13247
|
+
min: 1,
|
|
13248
|
+
precision: 0,
|
|
13249
|
+
onChange: function onChange(num) {
|
|
13250
|
+
return updateHandle(num, index, 'num');
|
|
13251
|
+
}
|
|
13252
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13253
|
+
};
|
|
13254
|
+
},
|
|
13255
|
+
giftType: function giftType() {
|
|
13256
|
+
return renderGiftType;
|
|
13257
|
+
}
|
|
13258
|
+
};
|
|
13259
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
13260
|
+
var disabled = _ref2.disabled,
|
|
13261
|
+
updateHandle = _ref2.updateHandle,
|
|
13262
|
+
operate = _ref2.operate;
|
|
13263
|
+
return getColumnsMap()['WDT_REISSUE_GOODS'].map(function (item) {
|
|
13264
|
+
var newItem = _objectSpread2({
|
|
13265
|
+
align: 'center',
|
|
13266
|
+
ellipsis: true
|
|
13267
|
+
}, item);
|
|
13268
|
+
if (operate && (renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex])) {
|
|
13269
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
13270
|
+
render: renderFieldMap === null || renderFieldMap === void 0 ? void 0 : renderFieldMap[item.dataIndex]({
|
|
13271
|
+
disabled: disabled,
|
|
13272
|
+
updateHandle: updateHandle
|
|
13273
|
+
})
|
|
13274
|
+
});
|
|
13275
|
+
}
|
|
13276
|
+
return newItem;
|
|
13277
|
+
});
|
|
13278
|
+
};
|
|
13279
|
+
|
|
13280
|
+
var getColumns$2 = function getColumns(_ref) {
|
|
13281
|
+
var _ref$text = _ref.text,
|
|
13282
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13283
|
+
disabled = _ref.disabled,
|
|
13284
|
+
updateHandle = _ref.updateHandle;
|
|
13285
|
+
return {
|
|
13286
|
+
//旺店通补发商品信息
|
|
13287
|
+
WDT_REISSUE_GOODS: [{
|
|
13288
|
+
dataIndex: 'goodId',
|
|
13289
|
+
title: "\u5546\u54C1ID",
|
|
13290
|
+
width: 120
|
|
13291
|
+
}, {
|
|
13292
|
+
dataIndex: 'goodNo',
|
|
13293
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13294
|
+
width: 200
|
|
13295
|
+
}, {
|
|
13296
|
+
dataIndex: 'goodName',
|
|
13297
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13298
|
+
width: 200
|
|
13299
|
+
}, {
|
|
13300
|
+
dataIndex: 'specId',
|
|
13301
|
+
title: "SKUID",
|
|
13302
|
+
width: 150
|
|
13303
|
+
}, {
|
|
13304
|
+
dataIndex: 'specNo',
|
|
13305
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
13306
|
+
width: 200
|
|
13307
|
+
}, {
|
|
13308
|
+
dataIndex: 'specName',
|
|
13309
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
13310
|
+
width: 250
|
|
13311
|
+
}, {
|
|
13312
|
+
dataIndex: 'orderPrice',
|
|
13313
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13314
|
+
width: 200
|
|
13315
|
+
}, {
|
|
13316
|
+
dataIndex: 'num',
|
|
13317
|
+
title: "\u6570\u91CF",
|
|
13318
|
+
width: 100
|
|
13319
|
+
}, {
|
|
13320
|
+
dataIndex: 'sharePrice',
|
|
13321
|
+
title: "\u5206\u644A\u4EF7",
|
|
13322
|
+
width: 150
|
|
13323
|
+
}, {
|
|
13324
|
+
dataIndex: 'giftType',
|
|
13325
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13326
|
+
width: 100,
|
|
13327
|
+
render: renderGiftType
|
|
13328
|
+
}],
|
|
13329
|
+
//旺店通商品信息
|
|
13330
|
+
WDT_GOODS: [{
|
|
13331
|
+
dataIndex: 'goodId',
|
|
13332
|
+
title: "\u5546\u54C1ID",
|
|
13333
|
+
align: 'center',
|
|
13334
|
+
ellipsis: true,
|
|
13335
|
+
width: 70
|
|
13336
|
+
}, {
|
|
13337
|
+
dataIndex: 'goodNo',
|
|
13338
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13339
|
+
align: 'center',
|
|
13340
|
+
ellipsis: true,
|
|
13341
|
+
width: 180
|
|
13342
|
+
}, {
|
|
13343
|
+
dataIndex: 'goodName',
|
|
13344
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13345
|
+
align: 'center',
|
|
13346
|
+
ellipsis: true,
|
|
13347
|
+
width: 250
|
|
13348
|
+
}, {
|
|
13349
|
+
dataIndex: 'specId',
|
|
13350
|
+
title: "".concat(text, "SKUID"),
|
|
13351
|
+
align: 'center',
|
|
13352
|
+
ellipsis: true,
|
|
13353
|
+
width: 100
|
|
13354
|
+
}, {
|
|
13355
|
+
dataIndex: 'specNo',
|
|
13356
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13357
|
+
align: 'center',
|
|
13358
|
+
ellipsis: true,
|
|
13359
|
+
width: 180
|
|
13360
|
+
}, {
|
|
13361
|
+
dataIndex: 'specName',
|
|
13362
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13363
|
+
align: 'center',
|
|
13364
|
+
ellipsis: true,
|
|
13365
|
+
width: 250
|
|
13366
|
+
}, {
|
|
13367
|
+
dataIndex: 'orderPrice',
|
|
13368
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
13369
|
+
align: 'center',
|
|
13370
|
+
ellipsis: true,
|
|
13371
|
+
width: 100
|
|
13372
|
+
}, {
|
|
13373
|
+
dataIndex: 'num',
|
|
13374
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13375
|
+
align: 'center',
|
|
13376
|
+
ellipsis: true,
|
|
13377
|
+
width: 100,
|
|
13378
|
+
render: function render(val, record, index) {
|
|
13379
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13380
|
+
style: {
|
|
13381
|
+
width: 70
|
|
13382
|
+
},
|
|
13383
|
+
value: val,
|
|
13384
|
+
min: 1,
|
|
13385
|
+
precision: 0,
|
|
13386
|
+
onChange: function onChange(num) {
|
|
13387
|
+
return updateHandle(num, index, 'num');
|
|
13388
|
+
}
|
|
13389
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13390
|
+
}
|
|
13391
|
+
}, {
|
|
13392
|
+
dataIndex: 'sharePrice',
|
|
13393
|
+
title: "\u5206\u644A\u4EF7",
|
|
13394
|
+
align: 'center',
|
|
13395
|
+
ellipsis: true,
|
|
13396
|
+
width: 70
|
|
13397
|
+
}, {
|
|
13398
|
+
dataIndex: 'giftType',
|
|
13399
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13400
|
+
align: 'center',
|
|
13401
|
+
ellipsis: true,
|
|
13402
|
+
width: 100,
|
|
13403
|
+
render: function render(val) {
|
|
13404
|
+
var giftTypeMap = {
|
|
13405
|
+
0: '非赠品',
|
|
13406
|
+
1: '自动赠送',
|
|
13407
|
+
2: '手工赠送',
|
|
13408
|
+
3: '回购自动送赠品',
|
|
13409
|
+
4: '前N有礼送赠品',
|
|
13410
|
+
6: '天猫优仓赠品',
|
|
13411
|
+
7: '淘宝CRM会员送赠'
|
|
13412
|
+
};
|
|
13413
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13414
|
+
}
|
|
13415
|
+
}],
|
|
13416
|
+
//旺店通退货商品信息
|
|
13417
|
+
WDT_RETURN_GOODS: [{
|
|
13418
|
+
dataIndex: 'goodId',
|
|
13419
|
+
title: "\u5546\u54C1ID",
|
|
13420
|
+
align: 'center',
|
|
13421
|
+
ellipsis: true,
|
|
13422
|
+
width: 70
|
|
13423
|
+
}, {
|
|
13424
|
+
dataIndex: 'goodNo',
|
|
13425
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13426
|
+
align: 'center',
|
|
13427
|
+
ellipsis: true,
|
|
13428
|
+
width: 180
|
|
13429
|
+
}, {
|
|
13430
|
+
dataIndex: 'goodName',
|
|
13431
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13432
|
+
align: 'center',
|
|
13433
|
+
ellipsis: true,
|
|
13434
|
+
width: 250
|
|
13435
|
+
}, {
|
|
13436
|
+
dataIndex: 'specId',
|
|
13437
|
+
title: "".concat(text, "SKUID"),
|
|
13438
|
+
align: 'center',
|
|
13439
|
+
ellipsis: true,
|
|
13440
|
+
width: 100
|
|
13441
|
+
}, {
|
|
13442
|
+
dataIndex: 'specNo',
|
|
13443
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13444
|
+
align: 'center',
|
|
13445
|
+
ellipsis: true,
|
|
13446
|
+
width: 180
|
|
13447
|
+
}, {
|
|
13448
|
+
dataIndex: 'specName',
|
|
13449
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13450
|
+
align: 'center',
|
|
13451
|
+
ellipsis: true,
|
|
13452
|
+
width: 250
|
|
13453
|
+
}, {
|
|
13454
|
+
dataIndex: 'num',
|
|
13455
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
13456
|
+
align: 'center',
|
|
13457
|
+
ellipsis: true,
|
|
13458
|
+
width: 100,
|
|
13459
|
+
render: function render(val, record, index) {
|
|
13460
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13461
|
+
style: {
|
|
13462
|
+
width: 70
|
|
13463
|
+
},
|
|
13464
|
+
value: val,
|
|
13465
|
+
min: 1,
|
|
13466
|
+
precision: 0,
|
|
13467
|
+
onChange: function onChange(num) {
|
|
13468
|
+
return updateHandle(num, index, 'num');
|
|
13469
|
+
}
|
|
13470
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13471
|
+
}
|
|
13472
|
+
}, {
|
|
13473
|
+
dataIndex: 'sharePrice',
|
|
13474
|
+
title: "\u5206\u644A\u4EF7",
|
|
13475
|
+
align: 'center',
|
|
13476
|
+
ellipsis: true,
|
|
13477
|
+
width: 80,
|
|
13478
|
+
render: function render(val, record, index) {
|
|
13479
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13480
|
+
style: {
|
|
13481
|
+
width: 70
|
|
13482
|
+
},
|
|
13483
|
+
value: val,
|
|
13484
|
+
min: 0,
|
|
13485
|
+
onChange: function onChange(value) {
|
|
13486
|
+
return updateHandle(value, index, 'sharePrice');
|
|
13487
|
+
}
|
|
13488
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13489
|
+
}
|
|
13490
|
+
}, {
|
|
13491
|
+
dataIndex: 'returnPrice',
|
|
13492
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13493
|
+
align: 'center',
|
|
13494
|
+
ellipsis: true,
|
|
13495
|
+
width: 100
|
|
13496
|
+
}, {
|
|
13497
|
+
dataIndex: 'giftType',
|
|
13498
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13499
|
+
align: 'center',
|
|
13500
|
+
ellipsis: true,
|
|
13501
|
+
width: 100,
|
|
13502
|
+
render: function render(val) {
|
|
13503
|
+
var giftTypeMap = {
|
|
13504
|
+
0: '非赠品',
|
|
13505
|
+
1: '自动赠送',
|
|
13506
|
+
2: '手工赠送',
|
|
13507
|
+
3: '回购自动送赠品',
|
|
13508
|
+
4: '前N有礼送赠品',
|
|
13509
|
+
6: '天猫优仓赠品',
|
|
13510
|
+
7: '淘宝CRM会员送赠'
|
|
13511
|
+
};
|
|
13512
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13513
|
+
}
|
|
13514
|
+
}, {
|
|
13515
|
+
dataIndex: 'type',
|
|
13516
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13517
|
+
align: 'center',
|
|
13518
|
+
ellipsis: true,
|
|
13519
|
+
width: 100,
|
|
13520
|
+
render: function render(val, record, index) {
|
|
13521
|
+
var options = [{
|
|
13522
|
+
label: '单品',
|
|
13523
|
+
value: '1'
|
|
13524
|
+
}, {
|
|
13525
|
+
label: '组合装',
|
|
13526
|
+
value: '2'
|
|
13527
|
+
}];
|
|
13528
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13529
|
+
style: {
|
|
13530
|
+
width: 70
|
|
13531
|
+
},
|
|
13532
|
+
options: options,
|
|
13533
|
+
value: val,
|
|
13534
|
+
onChange: function onChange(value) {
|
|
13535
|
+
return updateHandle(value, index, 'type');
|
|
13536
|
+
}
|
|
13537
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13538
|
+
}
|
|
13539
|
+
}],
|
|
13540
|
+
//旺店通换出商品信息
|
|
13541
|
+
WDT_EXCHANGE_GOODS: [{
|
|
13542
|
+
dataIndex: 'goodId',
|
|
13543
|
+
title: "\u5546\u54C1ID",
|
|
13544
|
+
align: 'center',
|
|
13545
|
+
ellipsis: true,
|
|
13546
|
+
width: 70
|
|
13547
|
+
}, {
|
|
13548
|
+
dataIndex: 'goodNo',
|
|
13549
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13550
|
+
align: 'center',
|
|
13551
|
+
ellipsis: true,
|
|
13552
|
+
width: 180
|
|
13553
|
+
}, {
|
|
13554
|
+
dataIndex: 'goodName',
|
|
13555
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13556
|
+
align: 'center',
|
|
13557
|
+
ellipsis: true,
|
|
13558
|
+
width: 250
|
|
13559
|
+
}, {
|
|
13560
|
+
dataIndex: 'specId',
|
|
13561
|
+
title: "".concat(text, "SKUID"),
|
|
13562
|
+
align: 'center',
|
|
13563
|
+
ellipsis: true,
|
|
13564
|
+
width: 100
|
|
13565
|
+
}, {
|
|
13566
|
+
dataIndex: 'specNo',
|
|
13567
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13568
|
+
align: 'center',
|
|
13569
|
+
ellipsis: true,
|
|
13570
|
+
width: 180
|
|
13571
|
+
}, {
|
|
13572
|
+
dataIndex: 'specName',
|
|
13573
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13574
|
+
align: 'center',
|
|
13575
|
+
ellipsis: true,
|
|
13576
|
+
width: 250
|
|
13577
|
+
}, {
|
|
13578
|
+
dataIndex: 'num',
|
|
13579
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13580
|
+
align: 'center',
|
|
13581
|
+
ellipsis: true,
|
|
13582
|
+
width: 100,
|
|
13583
|
+
render: function render(val, record, index) {
|
|
13584
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13585
|
+
style: {
|
|
13586
|
+
width: 70
|
|
13587
|
+
},
|
|
13588
|
+
value: val,
|
|
13589
|
+
min: 1,
|
|
13590
|
+
precision: 0,
|
|
13591
|
+
onChange: function onChange(num) {
|
|
13592
|
+
return updateHandle(num, index, 'num');
|
|
13593
|
+
}
|
|
13594
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13595
|
+
}
|
|
13596
|
+
}, {
|
|
13597
|
+
dataIndex: 'price',
|
|
13598
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13599
|
+
align: 'center',
|
|
13600
|
+
ellipsis: true,
|
|
13601
|
+
width: 100,
|
|
13602
|
+
render: function render(val, record, index) {
|
|
13603
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13604
|
+
style: {
|
|
13605
|
+
width: 70
|
|
13606
|
+
},
|
|
13607
|
+
value: val,
|
|
13608
|
+
min: 0,
|
|
13609
|
+
onChange: function onChange(value) {
|
|
13610
|
+
return updateHandle(value, index, 'price');
|
|
13611
|
+
}
|
|
13612
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13613
|
+
}
|
|
13614
|
+
}, {
|
|
13615
|
+
dataIndex: 'exchangePrice',
|
|
13616
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13617
|
+
align: 'center',
|
|
13618
|
+
ellipsis: true,
|
|
13619
|
+
width: 100
|
|
13620
|
+
}, {
|
|
13621
|
+
dataIndex: 'giftType',
|
|
13622
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13623
|
+
align: 'center',
|
|
13624
|
+
ellipsis: true,
|
|
13625
|
+
width: 100,
|
|
13626
|
+
render: function render(val) {
|
|
13627
|
+
var giftTypeMap = {
|
|
13628
|
+
0: '非赠品',
|
|
13629
|
+
1: '自动赠送',
|
|
13630
|
+
2: '手工赠送',
|
|
13631
|
+
3: '回购自动送赠品',
|
|
13632
|
+
4: '前N有礼送赠品',
|
|
13633
|
+
6: '天猫优仓赠品',
|
|
13634
|
+
7: '淘宝CRM会员送赠'
|
|
13635
|
+
};
|
|
13636
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13637
|
+
}
|
|
13638
|
+
}, {
|
|
13639
|
+
dataIndex: 'type',
|
|
13640
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13641
|
+
align: 'center',
|
|
13642
|
+
ellipsis: true,
|
|
13643
|
+
width: 100,
|
|
13644
|
+
render: function render(val, record, index) {
|
|
13645
|
+
var options = [{
|
|
13646
|
+
label: '单品',
|
|
13647
|
+
value: '1'
|
|
13648
|
+
}, {
|
|
13649
|
+
label: '组合装',
|
|
13650
|
+
value: '2'
|
|
13651
|
+
}];
|
|
13652
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13653
|
+
style: {
|
|
13654
|
+
width: 70
|
|
13655
|
+
},
|
|
13656
|
+
options: options,
|
|
13657
|
+
value: val,
|
|
13658
|
+
onChange: function onChange(value) {
|
|
13659
|
+
return updateHandle(value, index, 'type');
|
|
13660
|
+
}
|
|
13661
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13662
|
+
}
|
|
13663
|
+
}]
|
|
13664
|
+
};
|
|
13665
|
+
};
|
|
13666
|
+
|
|
13667
|
+
var getColumns$3 = function getColumns(_ref) {
|
|
13668
|
+
var _ref$text = _ref.text,
|
|
13669
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13670
|
+
disabled = _ref.disabled,
|
|
13671
|
+
updateHandle = _ref.updateHandle;
|
|
13672
|
+
return {
|
|
13673
|
+
//万里牛商品信息
|
|
13674
|
+
WLN_GOODS: [{
|
|
13675
|
+
dataIndex: 'skuName',
|
|
13676
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13677
|
+
align: 'center',
|
|
13678
|
+
ellipsis: true,
|
|
13679
|
+
width: 250
|
|
13680
|
+
}, {
|
|
13681
|
+
dataIndex: 'sku',
|
|
13682
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13683
|
+
align: 'center',
|
|
13684
|
+
ellipsis: true,
|
|
13685
|
+
width: 100
|
|
13686
|
+
}, {
|
|
13687
|
+
dataIndex: 'name',
|
|
13688
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
13689
|
+
align: 'center',
|
|
13690
|
+
ellipsis: true,
|
|
13691
|
+
width: 250
|
|
13692
|
+
}, {
|
|
13693
|
+
dataIndex: 'pic',
|
|
13694
|
+
title: "\u56FE\u7247",
|
|
13695
|
+
align: 'center',
|
|
13696
|
+
ellipsis: true,
|
|
13697
|
+
width: 100,
|
|
13698
|
+
render: function render(val) {
|
|
13699
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
13700
|
+
width: 60,
|
|
13701
|
+
src: val
|
|
13702
|
+
});
|
|
13703
|
+
}
|
|
13704
|
+
}, {
|
|
13705
|
+
dataIndex: 'code',
|
|
13706
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
13707
|
+
align: 'center',
|
|
13708
|
+
ellipsis: true,
|
|
13709
|
+
width: 100
|
|
13710
|
+
}, {
|
|
13711
|
+
dataIndex: 'money',
|
|
13712
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13713
|
+
align: 'center',
|
|
13714
|
+
ellipsis: true,
|
|
13715
|
+
width: 100
|
|
13716
|
+
}, {
|
|
13717
|
+
dataIndex: 'number',
|
|
13718
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
13719
|
+
align: 'center',
|
|
13720
|
+
ellipsis: true,
|
|
13721
|
+
width: 100,
|
|
13722
|
+
render: function render(val, record, index) {
|
|
13723
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13724
|
+
style: {
|
|
13725
|
+
width: 70
|
|
13726
|
+
},
|
|
13727
|
+
value: val,
|
|
13728
|
+
min: 1,
|
|
13729
|
+
precision: 0,
|
|
13730
|
+
onChange: function onChange(num) {
|
|
13731
|
+
return updateHandle(num, index, 'number');
|
|
13732
|
+
}
|
|
13733
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13734
|
+
}
|
|
13735
|
+
}, {
|
|
13736
|
+
dataIndex: 'share',
|
|
13737
|
+
title: "\u5206\u644A\u4EF7",
|
|
13738
|
+
align: 'center',
|
|
13739
|
+
ellipsis: true,
|
|
13740
|
+
width: 70
|
|
13741
|
+
}, {
|
|
13742
|
+
dataIndex: 'type',
|
|
13743
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13744
|
+
align: 'center',
|
|
13745
|
+
ellipsis: true,
|
|
13746
|
+
width: 100
|
|
13747
|
+
}]
|
|
13748
|
+
};
|
|
13749
|
+
};
|
|
13750
|
+
|
|
13751
|
+
var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
13752
|
+
if (typeof value === 'number') return true;
|
|
13753
|
+
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
13754
|
+
return false;
|
|
13755
|
+
};
|
|
13756
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
13757
|
+
if (isNull(val)) return null;
|
|
13758
|
+
return val ? '是' : '否';
|
|
13759
|
+
};
|
|
13760
|
+
var getColumns$4 = function getColumns(_ref) {
|
|
13761
|
+
var _ref$text = _ref.text,
|
|
13762
|
+
disabled = _ref.disabled,
|
|
13763
|
+
updateHandle = _ref.updateHandle,
|
|
13764
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
13765
|
+
return {
|
|
13766
|
+
//管易商品信息
|
|
13767
|
+
GY_GOODS: [{
|
|
13768
|
+
dataIndex: 'goodName',
|
|
13769
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13770
|
+
width: 150
|
|
13771
|
+
}, {
|
|
13772
|
+
dataIndex: 'goodShortName',
|
|
13773
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13774
|
+
width: 150
|
|
13775
|
+
}, {
|
|
13776
|
+
dataIndex: 'goodNo',
|
|
13777
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13778
|
+
width: 200
|
|
13779
|
+
}, {
|
|
13780
|
+
dataIndex: 'specName',
|
|
13781
|
+
title: "SKU\u540D\u79F0",
|
|
13782
|
+
align: 'center',
|
|
13783
|
+
ellipsis: true,
|
|
13784
|
+
width: 250
|
|
13785
|
+
}, {
|
|
13786
|
+
dataIndex: 'specNo',
|
|
13787
|
+
title: "SKU\u7F16\u7801",
|
|
13788
|
+
align: 'center',
|
|
13789
|
+
ellipsis: true,
|
|
13790
|
+
width: 150
|
|
13791
|
+
}, {
|
|
13792
|
+
dataIndex: 'qty',
|
|
13793
|
+
title: "\u6570\u91CF",
|
|
13794
|
+
width: 100,
|
|
13795
|
+
render: function render(val, record, index) {
|
|
13796
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13797
|
+
style: {
|
|
13798
|
+
width: 70
|
|
13799
|
+
},
|
|
13800
|
+
value: val,
|
|
13801
|
+
min: 1,
|
|
13802
|
+
precision: 0,
|
|
13803
|
+
onChange: function onChange(num) {
|
|
13804
|
+
updateDataHandle({
|
|
13805
|
+
qty: num,
|
|
13806
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13807
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13808
|
+
}, index);
|
|
13809
|
+
}
|
|
13810
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13811
|
+
}
|
|
13812
|
+
}, {
|
|
13813
|
+
dataIndex: 'price',
|
|
13814
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13815
|
+
width: 150,
|
|
13816
|
+
render: function render(val, record, index) {
|
|
13817
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13818
|
+
style: {
|
|
13819
|
+
width: 130
|
|
13820
|
+
},
|
|
13821
|
+
value: val,
|
|
13822
|
+
min: 0,
|
|
13823
|
+
precision: 2,
|
|
13824
|
+
onChange: function onChange(num) {
|
|
13825
|
+
updateDataHandle({
|
|
13826
|
+
price: num,
|
|
13827
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13828
|
+
}, index);
|
|
13829
|
+
}
|
|
13830
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13831
|
+
}
|
|
13832
|
+
}, {
|
|
13833
|
+
dataIndex: 'amount',
|
|
13834
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13835
|
+
width: 150
|
|
13836
|
+
}, {
|
|
13837
|
+
dataIndex: 'originPrice',
|
|
13838
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13839
|
+
width: 150
|
|
13840
|
+
}, {
|
|
13841
|
+
dataIndex: 'originAmount',
|
|
13842
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13843
|
+
width: 150
|
|
13844
|
+
}, {
|
|
13845
|
+
dataIndex: 'discountFee',
|
|
13846
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
13847
|
+
width: 150
|
|
13848
|
+
}, {
|
|
13849
|
+
dataIndex: 'amountAfter',
|
|
13850
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
13851
|
+
width: 150
|
|
13852
|
+
}, {
|
|
13853
|
+
dataIndex: 'cancel',
|
|
13854
|
+
title: "\u662F\u5426\u53D6\u6D88",
|
|
13855
|
+
width: 150,
|
|
13856
|
+
render: function render(val) {
|
|
13857
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13858
|
+
}
|
|
13859
|
+
}, {
|
|
13860
|
+
dataIndex: 'isGift',
|
|
13861
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13862
|
+
width: 150,
|
|
13863
|
+
render: function render(val, record, index) {
|
|
13864
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13865
|
+
value: val,
|
|
13866
|
+
onChange: function onChange(value) {
|
|
13867
|
+
updateHandle(value, index, 'isGift');
|
|
13868
|
+
},
|
|
13869
|
+
options: [{
|
|
13870
|
+
label: '是',
|
|
13871
|
+
value: 1
|
|
13872
|
+
}, {
|
|
13873
|
+
label: '否',
|
|
13874
|
+
value: 0
|
|
13875
|
+
}]
|
|
13876
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13877
|
+
}
|
|
13878
|
+
}, {
|
|
13879
|
+
dataIndex: 'skuNote',
|
|
13880
|
+
title: "\u5546\u54C1\u5907\u6CE8",
|
|
13881
|
+
width: 150
|
|
13882
|
+
}].map(function (item) {
|
|
13883
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13884
|
+
align: 'center',
|
|
13885
|
+
ellipsis: true
|
|
13886
|
+
});
|
|
13887
|
+
}),
|
|
13888
|
+
//管易补发商品信息
|
|
13889
|
+
GY_REISSUE_GOODS: [{
|
|
13890
|
+
dataIndex: 'goodName',
|
|
13891
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
13892
|
+
width: 150
|
|
13893
|
+
}, {
|
|
13894
|
+
dataIndex: 'goodShortName',
|
|
13895
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13896
|
+
width: 150
|
|
13897
|
+
}, {
|
|
13898
|
+
dataIndex: 'goodNo',
|
|
13899
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
13900
|
+
width: 200
|
|
13901
|
+
}, {
|
|
13902
|
+
dataIndex: 'specName',
|
|
13903
|
+
title: "SKU\u540D\u79F0",
|
|
13904
|
+
align: 'center',
|
|
13905
|
+
ellipsis: true,
|
|
13906
|
+
width: 250
|
|
13907
|
+
}, {
|
|
13908
|
+
dataIndex: 'specNo',
|
|
13909
|
+
title: "SKU\u7F16\u7801",
|
|
13910
|
+
align: 'center',
|
|
13911
|
+
ellipsis: true,
|
|
13912
|
+
width: 150
|
|
13913
|
+
}, {
|
|
13914
|
+
dataIndex: 'qty',
|
|
13915
|
+
title: "\u6570\u91CF",
|
|
13916
|
+
width: 100,
|
|
13917
|
+
render: function render(val, record, index) {
|
|
13918
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13919
|
+
style: {
|
|
13920
|
+
width: 70
|
|
13921
|
+
},
|
|
13922
|
+
value: val,
|
|
13923
|
+
min: 1,
|
|
13924
|
+
precision: 0,
|
|
13925
|
+
onChange: function onChange(num) {
|
|
13926
|
+
updateDataHandle({
|
|
13927
|
+
qty: num,
|
|
13928
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
13929
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
13930
|
+
}, index);
|
|
13931
|
+
}
|
|
13932
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13933
|
+
}
|
|
13934
|
+
}, {
|
|
13935
|
+
dataIndex: 'price',
|
|
13936
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
13937
|
+
width: 150,
|
|
13938
|
+
render: function render(val, record, index) {
|
|
13939
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13940
|
+
style: {
|
|
13941
|
+
width: 130
|
|
13942
|
+
},
|
|
13943
|
+
value: val,
|
|
13944
|
+
min: 0,
|
|
13945
|
+
precision: 2,
|
|
13946
|
+
onChange: function onChange(num) {
|
|
13947
|
+
updateDataHandle({
|
|
13948
|
+
price: num,
|
|
13949
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
13950
|
+
}, index);
|
|
13951
|
+
}
|
|
13952
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13953
|
+
}
|
|
13954
|
+
}, {
|
|
13955
|
+
dataIndex: 'amount',
|
|
13956
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
13957
|
+
width: 150
|
|
13958
|
+
}, {
|
|
13959
|
+
dataIndex: 'originPrice',
|
|
13960
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
13961
|
+
width: 150
|
|
13962
|
+
}, {
|
|
13963
|
+
dataIndex: 'originAmount',
|
|
13964
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
13965
|
+
width: 150
|
|
13966
|
+
}, {
|
|
13967
|
+
dataIndex: 'isGift',
|
|
13968
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
13969
|
+
width: 150,
|
|
13970
|
+
render: function render(val, record, index) {
|
|
13971
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13972
|
+
value: val,
|
|
13973
|
+
onChange: function onChange(value) {
|
|
13974
|
+
updateHandle(value, index, 'isGift');
|
|
13975
|
+
},
|
|
13976
|
+
options: [{
|
|
13977
|
+
label: '是',
|
|
13978
|
+
value: 1
|
|
13979
|
+
}, {
|
|
13980
|
+
label: '否',
|
|
13981
|
+
value: 0
|
|
13982
|
+
}]
|
|
13983
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
13984
|
+
}
|
|
13985
|
+
}].map(function (item) {
|
|
13986
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13987
|
+
align: 'center',
|
|
13988
|
+
ellipsis: true
|
|
13989
|
+
});
|
|
13990
|
+
})
|
|
13991
|
+
};
|
|
13992
|
+
};
|
|
13993
|
+
|
|
13994
|
+
var getColumns$5 = function getColumns(_ref) {
|
|
13995
|
+
var _ref$text = _ref.text,
|
|
13996
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
13997
|
+
disabled = _ref.disabled,
|
|
13998
|
+
updateHandle = _ref.updateHandle;
|
|
13999
|
+
return {
|
|
14000
|
+
//bs商品信息
|
|
14001
|
+
default: [{
|
|
14002
|
+
dataIndex: 'mark',
|
|
14003
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
14004
|
+
align: 'center',
|
|
14005
|
+
ellipsis: true,
|
|
14006
|
+
width: 70,
|
|
14007
|
+
render: function render(val, record, index) {
|
|
14008
|
+
return /*#__PURE__*/React.createElement(Select, {
|
|
14009
|
+
options: [{
|
|
14010
|
+
label: '是',
|
|
14011
|
+
value: '是'
|
|
14012
|
+
}, {
|
|
14013
|
+
label: '否',
|
|
14014
|
+
value: '否'
|
|
14015
|
+
}],
|
|
14016
|
+
disabled: disabled,
|
|
14017
|
+
value: val,
|
|
14018
|
+
onChange: function onChange(val) {
|
|
14019
|
+
return updateHandle(val, index, 'mark');
|
|
14020
|
+
}
|
|
14021
|
+
});
|
|
14022
|
+
}
|
|
14023
|
+
}, {
|
|
14024
|
+
dataIndex: 'skuName',
|
|
14025
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
14026
|
+
align: 'center',
|
|
14027
|
+
ellipsis: true,
|
|
14028
|
+
width: 250
|
|
14029
|
+
}, {
|
|
14030
|
+
dataIndex: 'sku',
|
|
14031
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
14032
|
+
align: 'center',
|
|
14033
|
+
ellipsis: true,
|
|
14034
|
+
width: 100
|
|
14035
|
+
}, {
|
|
14036
|
+
dataIndex: 'name',
|
|
14037
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
14038
|
+
align: 'center',
|
|
14039
|
+
ellipsis: true,
|
|
14040
|
+
width: 250
|
|
14041
|
+
}, {
|
|
14042
|
+
dataIndex: 'pic',
|
|
14043
|
+
title: "\u56FE\u7247",
|
|
14044
|
+
align: 'center',
|
|
14045
|
+
ellipsis: true,
|
|
14046
|
+
width: 100,
|
|
14047
|
+
render: function render(val) {
|
|
14048
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
14049
|
+
width: 60,
|
|
14050
|
+
src: val
|
|
14051
|
+
});
|
|
14052
|
+
}
|
|
14053
|
+
}, {
|
|
14054
|
+
dataIndex: 'code',
|
|
14055
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
14056
|
+
align: 'center',
|
|
14057
|
+
ellipsis: true,
|
|
14058
|
+
width: 100
|
|
14059
|
+
}, {
|
|
14060
|
+
dataIndex: 'money',
|
|
14061
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
14062
|
+
align: 'center',
|
|
14063
|
+
ellipsis: true,
|
|
14064
|
+
width: 100
|
|
14065
|
+
}, {
|
|
14066
|
+
dataIndex: 'number',
|
|
14067
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
14068
|
+
align: 'center',
|
|
14069
|
+
ellipsis: true,
|
|
14070
|
+
width: 100,
|
|
14071
|
+
render: function render(val, record, index) {
|
|
14072
|
+
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14073
|
+
style: {
|
|
14074
|
+
width: 70
|
|
14075
|
+
},
|
|
14076
|
+
value: val,
|
|
14077
|
+
min: 1,
|
|
14078
|
+
precision: 0,
|
|
14079
|
+
onChange: function onChange(num) {
|
|
14080
|
+
return updateHandle(num, index, 'number');
|
|
14081
|
+
}
|
|
14082
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14083
|
+
}
|
|
14084
|
+
}, {
|
|
14085
|
+
dataIndex: 'share',
|
|
14086
|
+
title: "\u5206\u644A\u4EF7",
|
|
14087
|
+
align: 'center',
|
|
14088
|
+
ellipsis: true,
|
|
14089
|
+
width: 70
|
|
14090
|
+
}, {
|
|
14091
|
+
dataIndex: 'type',
|
|
14092
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
14093
|
+
align: 'center',
|
|
14094
|
+
ellipsis: true,
|
|
14095
|
+
width: 100
|
|
14096
|
+
}]
|
|
14097
|
+
};
|
|
14098
|
+
};
|
|
14099
|
+
|
|
14100
|
+
var getColumnsMap = function getColumnsMap(args) {
|
|
14101
|
+
var _ref = args || {},
|
|
14102
|
+
_ref$text = _ref.text,
|
|
14103
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
14104
|
+
disabled = _ref.disabled,
|
|
14105
|
+
updateHandle = _ref.updateHandle,
|
|
14106
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
14107
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
14108
|
+
text: text,
|
|
14109
|
+
disabled: disabled,
|
|
14110
|
+
updateHandle: updateHandle
|
|
14111
|
+
})), getColumns({
|
|
14112
|
+
text: text,
|
|
14113
|
+
disabled: disabled,
|
|
14114
|
+
updateHandle: updateHandle
|
|
14115
|
+
})), getColumns$2({
|
|
14116
|
+
text: text,
|
|
14117
|
+
disabled: disabled,
|
|
14118
|
+
updateHandle: updateHandle
|
|
14119
|
+
})), getColumns$3({
|
|
14120
|
+
text: text,
|
|
14121
|
+
disabled: disabled,
|
|
14122
|
+
updateHandle: updateHandle
|
|
14123
|
+
})), getColumns$4({
|
|
14124
|
+
text: text,
|
|
14125
|
+
disabled: disabled,
|
|
14126
|
+
updateHandle: updateHandle,
|
|
14127
|
+
updateDataHandle: updateDataHandle
|
|
14128
|
+
})), {}, {
|
|
14129
|
+
default: getColumns$5({
|
|
14130
|
+
text: text,
|
|
14131
|
+
disabled: disabled,
|
|
14132
|
+
updateHandle: updateHandle
|
|
14133
|
+
})['default']
|
|
14134
|
+
});
|
|
12595
14135
|
};
|
|
12596
|
-
var
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
}
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
}
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
width: 150
|
|
12612
|
-
}, {
|
|
12613
|
-
dataIndex: 'specNo',
|
|
12614
|
-
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
12615
|
-
width: 200
|
|
12616
|
-
}, {
|
|
12617
|
-
dataIndex: 'specName',
|
|
12618
|
-
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
12619
|
-
width: 250
|
|
12620
|
-
}, {
|
|
12621
|
-
dataIndex: 'orderPrice',
|
|
12622
|
-
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12623
|
-
width: 200
|
|
12624
|
-
}, {
|
|
12625
|
-
dataIndex: 'num',
|
|
12626
|
-
title: "\u6570\u91CF",
|
|
12627
|
-
width: 100
|
|
12628
|
-
}, {
|
|
12629
|
-
dataIndex: 'sharePrice',
|
|
12630
|
-
title: "\u5206\u644A\u4EF7",
|
|
12631
|
-
width: 150
|
|
12632
|
-
}, {
|
|
12633
|
-
dataIndex: 'giftType',
|
|
12634
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12635
|
-
width: 100,
|
|
12636
|
-
render: renderGiftType
|
|
12637
|
-
}];
|
|
14136
|
+
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
14137
|
+
var clone_columnsMap = cloneDeep(getColumnsMap());
|
|
14138
|
+
var newColumns = {};
|
|
14139
|
+
Object.keys(clone_columnsMap).forEach(function (key) {
|
|
14140
|
+
newColumns[key] = clone_columnsMap[key].map(function (col) {
|
|
14141
|
+
return {
|
|
14142
|
+
title: col.title,
|
|
14143
|
+
dataIndex: col.dataIndex
|
|
14144
|
+
};
|
|
14145
|
+
});
|
|
14146
|
+
});
|
|
14147
|
+
return newColumns;
|
|
14148
|
+
};
|
|
14149
|
+
var columnsBaseInfoMap = getColumnsBaseInfo();
|
|
14150
|
+
|
|
12638
14151
|
var renderFieldMap$1 = {
|
|
12639
|
-
|
|
14152
|
+
goodsNumber: function goodsNumber(_ref) {
|
|
12640
14153
|
var disabled = _ref.disabled,
|
|
12641
14154
|
updateHandle = _ref.updateHandle;
|
|
12642
14155
|
return function (val, record, index) {
|
|
@@ -12648,20 +14161,59 @@ var renderFieldMap$1 = {
|
|
|
12648
14161
|
min: 1,
|
|
12649
14162
|
precision: 0,
|
|
12650
14163
|
onChange: function onChange(num) {
|
|
12651
|
-
return updateHandle(num, index, '
|
|
14164
|
+
return updateHandle(num, index, 'goodsNumber');
|
|
12652
14165
|
}
|
|
12653
14166
|
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12654
14167
|
};
|
|
12655
14168
|
},
|
|
12656
|
-
|
|
12657
|
-
|
|
14169
|
+
goodsPrice: function goodsPrice(_ref2) {
|
|
14170
|
+
var disabled = _ref2.disabled,
|
|
14171
|
+
updateHandle = _ref2.updateHandle;
|
|
14172
|
+
return function (val, record, index) {
|
|
14173
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14174
|
+
style: {
|
|
14175
|
+
width: 70
|
|
14176
|
+
},
|
|
14177
|
+
value: val,
|
|
14178
|
+
min: 0,
|
|
14179
|
+
onChange: function onChange(value) {
|
|
14180
|
+
return updateHandle(value, index, 'goodsPrice');
|
|
14181
|
+
}
|
|
14182
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14183
|
+
};
|
|
14184
|
+
},
|
|
14185
|
+
isGift: function isGift(_ref3) {
|
|
14186
|
+
var disabled = _ref3.disabled,
|
|
14187
|
+
updateHandle = _ref3.updateHandle;
|
|
14188
|
+
return function (val, record, index) {
|
|
14189
|
+
var options = [{
|
|
14190
|
+
label: '是',
|
|
14191
|
+
value: 1
|
|
14192
|
+
}, {
|
|
14193
|
+
label: '否',
|
|
14194
|
+
value: 0
|
|
14195
|
+
}];
|
|
14196
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14197
|
+
style: {
|
|
14198
|
+
width: 70
|
|
14199
|
+
},
|
|
14200
|
+
options: options,
|
|
14201
|
+
value: val,
|
|
14202
|
+
onChange: function onChange(value) {
|
|
14203
|
+
return updateHandle(value, index, 'isGift');
|
|
14204
|
+
},
|
|
14205
|
+
getPopupContainer: function getPopupContainer() {
|
|
14206
|
+
return document.getElementById('bsE3ReissueGoods');
|
|
14207
|
+
}
|
|
14208
|
+
}) : /*#__PURE__*/React.createElement("span", null, +val ? '是' : '否');
|
|
14209
|
+
};
|
|
12658
14210
|
}
|
|
12659
14211
|
};
|
|
12660
|
-
var
|
|
12661
|
-
var disabled =
|
|
12662
|
-
updateHandle =
|
|
12663
|
-
operate =
|
|
12664
|
-
return
|
|
14212
|
+
var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
14213
|
+
var disabled = _ref4.disabled,
|
|
14214
|
+
updateHandle = _ref4.updateHandle,
|
|
14215
|
+
operate = _ref4.operate;
|
|
14216
|
+
return getColumnsMap()['BS_E3_REISSUE_GOODS'].map(function (item) {
|
|
12665
14217
|
var newItem = _objectSpread2({
|
|
12666
14218
|
align: 'center',
|
|
12667
14219
|
ellipsis: true
|
|
@@ -12736,6 +14288,9 @@ var getButtonText = function getButtonText() {
|
|
|
12736
14288
|
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12737
14289
|
return '选择旺店通商品';
|
|
12738
14290
|
}
|
|
14291
|
+
if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14292
|
+
return '选择管易ERP商品';
|
|
14293
|
+
}
|
|
12739
14294
|
return '选择商品';
|
|
12740
14295
|
};
|
|
12741
14296
|
var GoodItem$1 = function GoodItem(props) {
|
|
@@ -12827,554 +14382,42 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12827
14382
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
12828
14383
|
}
|
|
12829
14384
|
};
|
|
14385
|
+
var updateDataHandle = function updateDataHandle(data, index) {
|
|
14386
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
14387
|
+
value[index] = _objectSpread2(_objectSpread2({}, value[index]), data);
|
|
14388
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
14389
|
+
}
|
|
14390
|
+
};
|
|
12830
14391
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12831
14392
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12832
14393
|
var operate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12833
14394
|
return function (type) {
|
|
12834
14395
|
var columns = [];
|
|
12835
14396
|
switch (type) {
|
|
12836
|
-
case 'WDT_REISSUE_GOODS':
|
|
12837
|
-
{
|
|
12838
|
-
columns = getWdtReissueGoodColumns({
|
|
12839
|
-
disabled: disabled,
|
|
12840
|
-
updateHandle: updateHandle,
|
|
12841
|
-
operate: operate
|
|
12842
|
-
});
|
|
12843
|
-
}
|
|
12844
|
-
break;
|
|
12845
14397
|
case 'WDT_GOODS':
|
|
12846
|
-
columns = [{
|
|
12847
|
-
dataIndex: 'goodId',
|
|
12848
|
-
title: "\u5546\u54C1ID",
|
|
12849
|
-
align: 'center',
|
|
12850
|
-
ellipsis: true,
|
|
12851
|
-
width: 70
|
|
12852
|
-
}, {
|
|
12853
|
-
dataIndex: 'goodNo',
|
|
12854
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12855
|
-
align: 'center',
|
|
12856
|
-
ellipsis: true,
|
|
12857
|
-
width: 180
|
|
12858
|
-
}, {
|
|
12859
|
-
dataIndex: 'goodName',
|
|
12860
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12861
|
-
align: 'center',
|
|
12862
|
-
ellipsis: true,
|
|
12863
|
-
width: 250
|
|
12864
|
-
}, {
|
|
12865
|
-
dataIndex: 'specId',
|
|
12866
|
-
title: "".concat(text, "SKUID"),
|
|
12867
|
-
align: 'center',
|
|
12868
|
-
ellipsis: true,
|
|
12869
|
-
width: 100
|
|
12870
|
-
}, {
|
|
12871
|
-
dataIndex: 'specNo',
|
|
12872
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12873
|
-
align: 'center',
|
|
12874
|
-
ellipsis: true,
|
|
12875
|
-
width: 180
|
|
12876
|
-
}, {
|
|
12877
|
-
dataIndex: 'specName',
|
|
12878
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12879
|
-
align: 'center',
|
|
12880
|
-
ellipsis: true,
|
|
12881
|
-
width: 250
|
|
12882
|
-
}, {
|
|
12883
|
-
dataIndex: 'orderPrice',
|
|
12884
|
-
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12885
|
-
align: 'center',
|
|
12886
|
-
ellipsis: true,
|
|
12887
|
-
width: 100
|
|
12888
|
-
}, {
|
|
12889
|
-
dataIndex: 'num',
|
|
12890
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
12891
|
-
align: 'center',
|
|
12892
|
-
ellipsis: true,
|
|
12893
|
-
width: 100,
|
|
12894
|
-
render: function render(val, record, index) {
|
|
12895
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12896
|
-
style: {
|
|
12897
|
-
width: 70
|
|
12898
|
-
},
|
|
12899
|
-
value: val,
|
|
12900
|
-
min: 1,
|
|
12901
|
-
precision: 0,
|
|
12902
|
-
onChange: function onChange(num) {
|
|
12903
|
-
return updateHandle(num, index, 'num');
|
|
12904
|
-
}
|
|
12905
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12906
|
-
}
|
|
12907
|
-
},
|
|
12908
|
-
// {
|
|
12909
|
-
// dataIndex: 'actualNum',
|
|
12910
|
-
// title: `${text}实发数量`,
|
|
12911
|
-
// align: 'center',
|
|
12912
|
-
// ellipsis: true,
|
|
12913
|
-
// width: 100,
|
|
12914
|
-
// },
|
|
12915
|
-
{
|
|
12916
|
-
dataIndex: 'sharePrice',
|
|
12917
|
-
title: "\u5206\u644A\u4EF7",
|
|
12918
|
-
align: 'center',
|
|
12919
|
-
ellipsis: true,
|
|
12920
|
-
width: 70
|
|
12921
|
-
}, {
|
|
12922
|
-
dataIndex: 'giftType',
|
|
12923
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12924
|
-
align: 'center',
|
|
12925
|
-
ellipsis: true,
|
|
12926
|
-
width: 100,
|
|
12927
|
-
render: function render(val) {
|
|
12928
|
-
var giftTypeMap = {
|
|
12929
|
-
0: '非赠品',
|
|
12930
|
-
1: '自动赠送',
|
|
12931
|
-
2: '手工赠送',
|
|
12932
|
-
3: '回购自动送赠品',
|
|
12933
|
-
4: '前N有礼送赠品',
|
|
12934
|
-
6: '天猫优仓赠品',
|
|
12935
|
-
7: '淘宝CRM会员送赠'
|
|
12936
|
-
};
|
|
12937
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12938
|
-
}
|
|
12939
|
-
}];
|
|
12940
|
-
break;
|
|
12941
14398
|
case 'WDT_RETURN_GOODS':
|
|
12942
|
-
{
|
|
12943
|
-
columns = [{
|
|
12944
|
-
dataIndex: 'goodId',
|
|
12945
|
-
title: "\u5546\u54C1ID",
|
|
12946
|
-
align: 'center',
|
|
12947
|
-
ellipsis: true,
|
|
12948
|
-
width: 70
|
|
12949
|
-
}, {
|
|
12950
|
-
dataIndex: 'goodNo',
|
|
12951
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
12952
|
-
align: 'center',
|
|
12953
|
-
ellipsis: true,
|
|
12954
|
-
width: 180
|
|
12955
|
-
}, {
|
|
12956
|
-
dataIndex: 'goodName',
|
|
12957
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
12958
|
-
align: 'center',
|
|
12959
|
-
ellipsis: true,
|
|
12960
|
-
width: 250
|
|
12961
|
-
}, {
|
|
12962
|
-
dataIndex: 'specId',
|
|
12963
|
-
title: "".concat(text, "SKUID"),
|
|
12964
|
-
align: 'center',
|
|
12965
|
-
ellipsis: true,
|
|
12966
|
-
width: 100
|
|
12967
|
-
}, {
|
|
12968
|
-
dataIndex: 'specNo',
|
|
12969
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
12970
|
-
align: 'center',
|
|
12971
|
-
ellipsis: true,
|
|
12972
|
-
width: 180
|
|
12973
|
-
}, {
|
|
12974
|
-
dataIndex: 'specName',
|
|
12975
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
12976
|
-
align: 'center',
|
|
12977
|
-
ellipsis: true,
|
|
12978
|
-
width: 250
|
|
12979
|
-
}, {
|
|
12980
|
-
dataIndex: 'num',
|
|
12981
|
-
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
12982
|
-
align: 'center',
|
|
12983
|
-
ellipsis: true,
|
|
12984
|
-
width: 100,
|
|
12985
|
-
render: function render(val, record, index) {
|
|
12986
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12987
|
-
style: {
|
|
12988
|
-
width: 70
|
|
12989
|
-
},
|
|
12990
|
-
value: val,
|
|
12991
|
-
min: 1,
|
|
12992
|
-
precision: 0,
|
|
12993
|
-
onChange: function onChange(num) {
|
|
12994
|
-
return updateHandle(num, index, 'num');
|
|
12995
|
-
}
|
|
12996
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12997
|
-
}
|
|
12998
|
-
}, {
|
|
12999
|
-
dataIndex: 'sharePrice',
|
|
13000
|
-
title: "\u5206\u644A\u4EF7",
|
|
13001
|
-
align: 'center',
|
|
13002
|
-
ellipsis: true,
|
|
13003
|
-
width: 80,
|
|
13004
|
-
render: function render(val, record, index) {
|
|
13005
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13006
|
-
style: {
|
|
13007
|
-
width: 70
|
|
13008
|
-
},
|
|
13009
|
-
value: val,
|
|
13010
|
-
min: 0,
|
|
13011
|
-
onChange: function onChange(value) {
|
|
13012
|
-
return updateHandle(value, index, 'sharePrice');
|
|
13013
|
-
}
|
|
13014
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13015
|
-
}
|
|
13016
|
-
}, {
|
|
13017
|
-
dataIndex: 'returnPrice',
|
|
13018
|
-
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
13019
|
-
align: 'center',
|
|
13020
|
-
ellipsis: true,
|
|
13021
|
-
width: 100
|
|
13022
|
-
}, {
|
|
13023
|
-
dataIndex: 'giftType',
|
|
13024
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13025
|
-
align: 'center',
|
|
13026
|
-
ellipsis: true,
|
|
13027
|
-
width: 100,
|
|
13028
|
-
render: function render(val) {
|
|
13029
|
-
var giftTypeMap = {
|
|
13030
|
-
0: '非赠品',
|
|
13031
|
-
1: '自动赠送',
|
|
13032
|
-
2: '手工赠送',
|
|
13033
|
-
3: '回购自动送赠品',
|
|
13034
|
-
4: '前N有礼送赠品',
|
|
13035
|
-
6: '天猫优仓赠品',
|
|
13036
|
-
7: '淘宝CRM会员送赠'
|
|
13037
|
-
};
|
|
13038
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13039
|
-
}
|
|
13040
|
-
}, {
|
|
13041
|
-
dataIndex: 'type',
|
|
13042
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13043
|
-
align: 'center',
|
|
13044
|
-
ellipsis: true,
|
|
13045
|
-
width: 100,
|
|
13046
|
-
render: function render(val, record, index) {
|
|
13047
|
-
var options = [{
|
|
13048
|
-
label: '单品',
|
|
13049
|
-
value: '1'
|
|
13050
|
-
}, {
|
|
13051
|
-
label: '组合装',
|
|
13052
|
-
value: '2'
|
|
13053
|
-
}];
|
|
13054
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13055
|
-
style: {
|
|
13056
|
-
width: 70
|
|
13057
|
-
},
|
|
13058
|
-
options: options,
|
|
13059
|
-
value: val,
|
|
13060
|
-
onChange: function onChange(value) {
|
|
13061
|
-
return updateHandle(value, index, 'type');
|
|
13062
|
-
}
|
|
13063
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13064
|
-
}
|
|
13065
|
-
}];
|
|
13066
|
-
}
|
|
13067
|
-
break;
|
|
13068
14399
|
case 'WDT_EXCHANGE_GOODS':
|
|
14400
|
+
case 'BS_E3_GOODS':
|
|
14401
|
+
case 'BS_GOODS':
|
|
14402
|
+
case 'WLN_GOODS':
|
|
14403
|
+
case 'GY_GOODS':
|
|
14404
|
+
case 'GY_REISSUE_GOODS':
|
|
13069
14405
|
{
|
|
13070
|
-
columns =
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
}, {
|
|
13077
|
-
dataIndex: 'goodNo',
|
|
13078
|
-
title: "\u5546\u54C1\u7F16\u7801",
|
|
13079
|
-
align: 'center',
|
|
13080
|
-
ellipsis: true,
|
|
13081
|
-
width: 180
|
|
13082
|
-
}, {
|
|
13083
|
-
dataIndex: 'goodName',
|
|
13084
|
-
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
13085
|
-
align: 'center',
|
|
13086
|
-
ellipsis: true,
|
|
13087
|
-
width: 250
|
|
13088
|
-
}, {
|
|
13089
|
-
dataIndex: 'specId',
|
|
13090
|
-
title: "".concat(text, "SKUID"),
|
|
13091
|
-
align: 'center',
|
|
13092
|
-
ellipsis: true,
|
|
13093
|
-
width: 100
|
|
13094
|
-
}, {
|
|
13095
|
-
dataIndex: 'specNo',
|
|
13096
|
-
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
13097
|
-
align: 'center',
|
|
13098
|
-
ellipsis: true,
|
|
13099
|
-
width: 180
|
|
13100
|
-
}, {
|
|
13101
|
-
dataIndex: 'specName',
|
|
13102
|
-
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
13103
|
-
align: 'center',
|
|
13104
|
-
ellipsis: true,
|
|
13105
|
-
width: 250
|
|
13106
|
-
}, {
|
|
13107
|
-
dataIndex: 'num',
|
|
13108
|
-
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
13109
|
-
align: 'center',
|
|
13110
|
-
ellipsis: true,
|
|
13111
|
-
width: 100,
|
|
13112
|
-
render: function render(val, record, index) {
|
|
13113
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13114
|
-
style: {
|
|
13115
|
-
width: 70
|
|
13116
|
-
},
|
|
13117
|
-
value: val,
|
|
13118
|
-
min: 1,
|
|
13119
|
-
precision: 0,
|
|
13120
|
-
onChange: function onChange(num) {
|
|
13121
|
-
return updateHandle(num, index, 'num');
|
|
13122
|
-
}
|
|
13123
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13124
|
-
}
|
|
13125
|
-
}, {
|
|
13126
|
-
dataIndex: 'price',
|
|
13127
|
-
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
13128
|
-
align: 'center',
|
|
13129
|
-
ellipsis: true,
|
|
13130
|
-
width: 100,
|
|
13131
|
-
render: function render(val, record, index) {
|
|
13132
|
-
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13133
|
-
style: {
|
|
13134
|
-
width: 70
|
|
13135
|
-
},
|
|
13136
|
-
value: val,
|
|
13137
|
-
min: 0,
|
|
13138
|
-
onChange: function onChange(value) {
|
|
13139
|
-
return updateHandle(value, index, 'price');
|
|
13140
|
-
}
|
|
13141
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13142
|
-
}
|
|
13143
|
-
}, {
|
|
13144
|
-
dataIndex: 'exchangePrice',
|
|
13145
|
-
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
13146
|
-
align: 'center',
|
|
13147
|
-
ellipsis: true,
|
|
13148
|
-
width: 100
|
|
13149
|
-
}, {
|
|
13150
|
-
dataIndex: 'giftType',
|
|
13151
|
-
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
13152
|
-
align: 'center',
|
|
13153
|
-
ellipsis: true,
|
|
13154
|
-
width: 100,
|
|
13155
|
-
render: function render(val) {
|
|
13156
|
-
var giftTypeMap = {
|
|
13157
|
-
0: '非赠品',
|
|
13158
|
-
1: '自动赠送',
|
|
13159
|
-
2: '手工赠送',
|
|
13160
|
-
3: '回购自动送赠品',
|
|
13161
|
-
4: '前N有礼送赠品',
|
|
13162
|
-
6: '天猫优仓赠品',
|
|
13163
|
-
7: '淘宝CRM会员送赠'
|
|
13164
|
-
};
|
|
13165
|
-
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
13166
|
-
}
|
|
13167
|
-
}, {
|
|
13168
|
-
dataIndex: 'type',
|
|
13169
|
-
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
13170
|
-
align: 'center',
|
|
13171
|
-
ellipsis: true,
|
|
13172
|
-
width: 100,
|
|
13173
|
-
render: function render(val, record, index) {
|
|
13174
|
-
var options = [{
|
|
13175
|
-
label: '单品',
|
|
13176
|
-
value: '1'
|
|
13177
|
-
}, {
|
|
13178
|
-
label: '组合装',
|
|
13179
|
-
value: '2'
|
|
13180
|
-
}];
|
|
13181
|
-
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
13182
|
-
style: {
|
|
13183
|
-
width: 70
|
|
13184
|
-
},
|
|
13185
|
-
options: options,
|
|
13186
|
-
value: val,
|
|
13187
|
-
onChange: function onChange(value) {
|
|
13188
|
-
return updateHandle(value, index, 'type');
|
|
13189
|
-
}
|
|
13190
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13191
|
-
}
|
|
13192
|
-
}];
|
|
14406
|
+
columns = getColumnsMap({
|
|
14407
|
+
text: text,
|
|
14408
|
+
disabled: disabled,
|
|
14409
|
+
updateHandle: updateHandle,
|
|
14410
|
+
updateDataHandle: updateDataHandle
|
|
14411
|
+
})[type];
|
|
13193
14412
|
}
|
|
13194
14413
|
break;
|
|
13195
|
-
case '
|
|
14414
|
+
case 'WDT_REISSUE_GOODS':
|
|
13196
14415
|
{
|
|
13197
|
-
columns =
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
width: 150
|
|
13203
|
-
}, {
|
|
13204
|
-
dataIndex: 'skuId',
|
|
13205
|
-
title: "SKU ID",
|
|
13206
|
-
align: 'center',
|
|
13207
|
-
ellipsis: true,
|
|
13208
|
-
width: 150
|
|
13209
|
-
}, {
|
|
13210
|
-
dataIndex: 'goodsName',
|
|
13211
|
-
title: "\u5546\u54C1\u540D\u79F0",
|
|
13212
|
-
align: 'center',
|
|
13213
|
-
ellipsis: true,
|
|
13214
|
-
width: 150
|
|
13215
|
-
}, {
|
|
13216
|
-
dataIndex: 'goodsShortName',
|
|
13217
|
-
title: "\u5546\u54C1\u7B80\u79F0",
|
|
13218
|
-
align: 'center',
|
|
13219
|
-
ellipsis: true,
|
|
13220
|
-
width: 100
|
|
13221
|
-
}, {
|
|
13222
|
-
dataIndex: 'picPath',
|
|
13223
|
-
title: "\u5546\u54C1\u56FE\u7247",
|
|
13224
|
-
align: 'center',
|
|
13225
|
-
ellipsis: true,
|
|
13226
|
-
width: 100,
|
|
13227
|
-
render: function render(val) {
|
|
13228
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13229
|
-
width: 60,
|
|
13230
|
-
src: val
|
|
13231
|
-
});
|
|
13232
|
-
}
|
|
13233
|
-
}, {
|
|
13234
|
-
dataIndex: 'goodsSn',
|
|
13235
|
-
title: "\u8D27\u53F7",
|
|
13236
|
-
align: 'center',
|
|
13237
|
-
ellipsis: true,
|
|
13238
|
-
width: 150
|
|
13239
|
-
}, {
|
|
13240
|
-
dataIndex: 'goodsId',
|
|
13241
|
-
title: "\u8D27\u53F7ID",
|
|
13242
|
-
align: 'center',
|
|
13243
|
-
ellipsis: true,
|
|
13244
|
-
width: 150
|
|
13245
|
-
}, {
|
|
13246
|
-
dataIndex: 'colorName',
|
|
13247
|
-
title: "\u989C\u8272\u540D\u79F0",
|
|
13248
|
-
align: 'center',
|
|
13249
|
-
ellipsis: true,
|
|
13250
|
-
width: 100
|
|
13251
|
-
}, {
|
|
13252
|
-
dataIndex: 'colorCode',
|
|
13253
|
-
title: "\u989C\u8272\u4EE3\u7801",
|
|
13254
|
-
align: 'center',
|
|
13255
|
-
ellipsis: true,
|
|
13256
|
-
width: 150
|
|
13257
|
-
}, {
|
|
13258
|
-
dataIndex: 'sizeName',
|
|
13259
|
-
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13260
|
-
align: 'center',
|
|
13261
|
-
ellipsis: true,
|
|
13262
|
-
width: 100
|
|
13263
|
-
}, {
|
|
13264
|
-
dataIndex: 'sizeCode',
|
|
13265
|
-
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13266
|
-
align: 'center',
|
|
13267
|
-
ellipsis: true,
|
|
13268
|
-
width: 100
|
|
13269
|
-
}, {
|
|
13270
|
-
dataIndex: 'brandName',
|
|
13271
|
-
title: "\u54C1\u724C\u540D\u79F0",
|
|
13272
|
-
align: 'center',
|
|
13273
|
-
ellipsis: true,
|
|
13274
|
-
width: 150
|
|
13275
|
-
}, {
|
|
13276
|
-
dataIndex: 'goodsNumber',
|
|
13277
|
-
title: "\u5546\u54C1\u6570\u91CF",
|
|
13278
|
-
align: 'center',
|
|
13279
|
-
ellipsis: true,
|
|
13280
|
-
width: 100,
|
|
13281
|
-
render: function render(val, record, index) {
|
|
13282
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13283
|
-
style: {
|
|
13284
|
-
width: 70
|
|
13285
|
-
},
|
|
13286
|
-
value: val,
|
|
13287
|
-
min: 1,
|
|
13288
|
-
precision: 0,
|
|
13289
|
-
onChange: function onChange(num) {
|
|
13290
|
-
return updateHandle(num, index, 'goodsNumber');
|
|
13291
|
-
}
|
|
13292
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13293
|
-
}
|
|
13294
|
-
}, {
|
|
13295
|
-
dataIndex: 'goodsPrice',
|
|
13296
|
-
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13297
|
-
align: 'center',
|
|
13298
|
-
ellipsis: true,
|
|
13299
|
-
width: 120,
|
|
13300
|
-
render: function render(val, record, index) {
|
|
13301
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13302
|
-
style: {
|
|
13303
|
-
width: 70
|
|
13304
|
-
},
|
|
13305
|
-
value: val,
|
|
13306
|
-
min: 0,
|
|
13307
|
-
precision: 2,
|
|
13308
|
-
onChange: function onChange(num) {
|
|
13309
|
-
return updateHandle(num, index, 'goodsPrice');
|
|
13310
|
-
}
|
|
13311
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13312
|
-
}
|
|
13313
|
-
}, {
|
|
13314
|
-
dataIndex: 'shopPrice',
|
|
13315
|
-
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13316
|
-
align: 'center',
|
|
13317
|
-
ellipsis: true,
|
|
13318
|
-
width: 120
|
|
13319
|
-
}, {
|
|
13320
|
-
dataIndex: 'sharePrice',
|
|
13321
|
-
title: "\u5206\u644A\u4EF7",
|
|
13322
|
-
align: 'center',
|
|
13323
|
-
ellipsis: true,
|
|
13324
|
-
width: 120
|
|
13325
|
-
}, {
|
|
13326
|
-
dataIndex: 'sharePayment',
|
|
13327
|
-
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13328
|
-
align: 'center',
|
|
13329
|
-
ellipsis: true,
|
|
13330
|
-
width: 120
|
|
13331
|
-
}, {
|
|
13332
|
-
dataIndex: 'payment',
|
|
13333
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13334
|
-
align: 'center',
|
|
13335
|
-
ellipsis: true,
|
|
13336
|
-
width: 120,
|
|
13337
|
-
render: function render(val, record, index) {
|
|
13338
|
-
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13339
|
-
style: {
|
|
13340
|
-
width: 70
|
|
13341
|
-
},
|
|
13342
|
-
value: val,
|
|
13343
|
-
min: 0,
|
|
13344
|
-
precision: 2,
|
|
13345
|
-
onChange: function onChange(num) {
|
|
13346
|
-
return updateHandle(num, index, 'payment');
|
|
13347
|
-
}
|
|
13348
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13349
|
-
}
|
|
13350
|
-
}, {
|
|
13351
|
-
dataIndex: 'tcSku',
|
|
13352
|
-
title: "\u5957\u9910SKU",
|
|
13353
|
-
align: 'center',
|
|
13354
|
-
ellipsis: true,
|
|
13355
|
-
width: 150
|
|
13356
|
-
}, {
|
|
13357
|
-
dataIndex: 'tcGoodsNumber',
|
|
13358
|
-
title: "\u5957\u9910\u5957\u6570",
|
|
13359
|
-
align: 'center',
|
|
13360
|
-
ellipsis: true,
|
|
13361
|
-
width: 100
|
|
13362
|
-
}, {
|
|
13363
|
-
dataIndex: 'taoCanSingleSl',
|
|
13364
|
-
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
13365
|
-
align: 'center',
|
|
13366
|
-
ellipsis: true,
|
|
13367
|
-
width: 100
|
|
13368
|
-
}, {
|
|
13369
|
-
dataIndex: 'isGift',
|
|
13370
|
-
title: "\u662F\u5426\u8D60\u54C1",
|
|
13371
|
-
align: 'center',
|
|
13372
|
-
ellipsis: true,
|
|
13373
|
-
width: 100,
|
|
13374
|
-
render: function render(val) {
|
|
13375
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
13376
|
-
}
|
|
13377
|
-
}];
|
|
14416
|
+
columns = getWdtReissueGoodColumns({
|
|
14417
|
+
disabled: disabled,
|
|
14418
|
+
updateHandle: updateHandle,
|
|
14419
|
+
operate: operate
|
|
14420
|
+
});
|
|
13378
14421
|
}
|
|
13379
14422
|
break;
|
|
13380
14423
|
case 'BS_E3_REISSUE_GOODS':
|
|
@@ -13386,213 +14429,13 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13386
14429
|
});
|
|
13387
14430
|
}
|
|
13388
14431
|
break;
|
|
13389
|
-
case 'BS_GOODS':
|
|
13390
|
-
columns = [{
|
|
13391
|
-
dataIndex: 'mark',
|
|
13392
|
-
title: "\u5546\u54C1\u6807\u8BB0",
|
|
13393
|
-
align: 'center',
|
|
13394
|
-
ellipsis: true,
|
|
13395
|
-
width: 70,
|
|
13396
|
-
render: function render(val, record, index) {
|
|
13397
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
13398
|
-
options: [{
|
|
13399
|
-
label: '是',
|
|
13400
|
-
value: '是'
|
|
13401
|
-
}, {
|
|
13402
|
-
label: '否',
|
|
13403
|
-
value: '否'
|
|
13404
|
-
}],
|
|
13405
|
-
disabled: disabled,
|
|
13406
|
-
value: val,
|
|
13407
|
-
onChange: function onChange(val) {
|
|
13408
|
-
return updateHandle(val, index, 'mark');
|
|
13409
|
-
}
|
|
13410
|
-
});
|
|
13411
|
-
}
|
|
13412
|
-
}, {
|
|
13413
|
-
dataIndex: 'skuName',
|
|
13414
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13415
|
-
align: 'center',
|
|
13416
|
-
ellipsis: true,
|
|
13417
|
-
width: 250
|
|
13418
|
-
}, {
|
|
13419
|
-
dataIndex: 'sku',
|
|
13420
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13421
|
-
align: 'center',
|
|
13422
|
-
ellipsis: true,
|
|
13423
|
-
width: 100
|
|
13424
|
-
}, {
|
|
13425
|
-
dataIndex: 'name',
|
|
13426
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
13427
|
-
align: 'center',
|
|
13428
|
-
ellipsis: true,
|
|
13429
|
-
width: 250
|
|
13430
|
-
}, {
|
|
13431
|
-
dataIndex: 'pic',
|
|
13432
|
-
title: "\u56FE\u7247",
|
|
13433
|
-
align: 'center',
|
|
13434
|
-
ellipsis: true,
|
|
13435
|
-
width: 100,
|
|
13436
|
-
render: function render(val) {
|
|
13437
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13438
|
-
width: 60,
|
|
13439
|
-
src: val
|
|
13440
|
-
});
|
|
13441
|
-
}
|
|
13442
|
-
}, {
|
|
13443
|
-
dataIndex: 'code',
|
|
13444
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
13445
|
-
align: 'center',
|
|
13446
|
-
ellipsis: true,
|
|
13447
|
-
width: 100
|
|
13448
|
-
}, {
|
|
13449
|
-
dataIndex: 'money',
|
|
13450
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13451
|
-
align: 'center',
|
|
13452
|
-
ellipsis: true,
|
|
13453
|
-
width: 100
|
|
13454
|
-
}, {
|
|
13455
|
-
dataIndex: 'number',
|
|
13456
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
13457
|
-
align: 'center',
|
|
13458
|
-
ellipsis: true,
|
|
13459
|
-
width: 100,
|
|
13460
|
-
render: function render(val, record, index) {
|
|
13461
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13462
|
-
style: {
|
|
13463
|
-
width: 70
|
|
13464
|
-
},
|
|
13465
|
-
value: val,
|
|
13466
|
-
min: 1,
|
|
13467
|
-
precision: 0,
|
|
13468
|
-
onChange: function onChange(num) {
|
|
13469
|
-
return updateHandle(num, index, 'number');
|
|
13470
|
-
}
|
|
13471
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13472
|
-
}
|
|
13473
|
-
}, {
|
|
13474
|
-
dataIndex: 'share',
|
|
13475
|
-
title: "\u5206\u644A\u4EF7",
|
|
13476
|
-
align: 'center',
|
|
13477
|
-
ellipsis: true,
|
|
13478
|
-
width: 70
|
|
13479
|
-
}, {
|
|
13480
|
-
dataIndex: 'type',
|
|
13481
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13482
|
-
align: 'center',
|
|
13483
|
-
ellipsis: true,
|
|
13484
|
-
width: 100
|
|
13485
|
-
}, {
|
|
13486
|
-
dataIndex: 'batch',
|
|
13487
|
-
title: "\u6279\u6B21\u53F7",
|
|
13488
|
-
align: 'center',
|
|
13489
|
-
ellipsis: true,
|
|
13490
|
-
width: 100
|
|
13491
|
-
}, {
|
|
13492
|
-
dataIndex: 'expireDate',
|
|
13493
|
-
title: "\u6709\u6548\u671F",
|
|
13494
|
-
align: 'center',
|
|
13495
|
-
ellipsis: true,
|
|
13496
|
-
width: 100
|
|
13497
|
-
}];
|
|
13498
|
-
break;
|
|
13499
14432
|
default:
|
|
13500
|
-
columns =
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
render: function render(val, record, index) {
|
|
13507
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
13508
|
-
options: [{
|
|
13509
|
-
label: '是',
|
|
13510
|
-
value: '是'
|
|
13511
|
-
}, {
|
|
13512
|
-
label: '否',
|
|
13513
|
-
value: '否'
|
|
13514
|
-
}],
|
|
13515
|
-
disabled: disabled,
|
|
13516
|
-
value: val,
|
|
13517
|
-
onChange: function onChange(val) {
|
|
13518
|
-
return updateHandle(val, index, 'mark');
|
|
13519
|
-
}
|
|
13520
|
-
});
|
|
13521
|
-
}
|
|
13522
|
-
}, {
|
|
13523
|
-
dataIndex: 'skuName',
|
|
13524
|
-
title: "".concat(text, "sku\u540D\u79F0"),
|
|
13525
|
-
align: 'center',
|
|
13526
|
-
ellipsis: true,
|
|
13527
|
-
width: 250
|
|
13528
|
-
}, {
|
|
13529
|
-
dataIndex: 'sku',
|
|
13530
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
13531
|
-
align: 'center',
|
|
13532
|
-
ellipsis: true,
|
|
13533
|
-
width: 100
|
|
13534
|
-
}, {
|
|
13535
|
-
dataIndex: 'name',
|
|
13536
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
13537
|
-
align: 'center',
|
|
13538
|
-
ellipsis: true,
|
|
13539
|
-
width: 250
|
|
13540
|
-
}, {
|
|
13541
|
-
dataIndex: 'pic',
|
|
13542
|
-
title: "\u56FE\u7247",
|
|
13543
|
-
align: 'center',
|
|
13544
|
-
ellipsis: true,
|
|
13545
|
-
width: 100,
|
|
13546
|
-
render: function render(val) {
|
|
13547
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
13548
|
-
width: 60,
|
|
13549
|
-
src: val
|
|
13550
|
-
});
|
|
13551
|
-
}
|
|
13552
|
-
}, {
|
|
13553
|
-
dataIndex: 'code',
|
|
13554
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
13555
|
-
align: 'center',
|
|
13556
|
-
ellipsis: true,
|
|
13557
|
-
width: 100
|
|
13558
|
-
}, {
|
|
13559
|
-
dataIndex: 'money',
|
|
13560
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13561
|
-
align: 'center',
|
|
13562
|
-
ellipsis: true,
|
|
13563
|
-
width: 100
|
|
13564
|
-
}, {
|
|
13565
|
-
dataIndex: 'number',
|
|
13566
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
13567
|
-
align: 'center',
|
|
13568
|
-
ellipsis: true,
|
|
13569
|
-
width: 100,
|
|
13570
|
-
render: function render(val, record, index) {
|
|
13571
|
-
return record.canUpdateNumber && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
13572
|
-
style: {
|
|
13573
|
-
width: 70
|
|
13574
|
-
},
|
|
13575
|
-
value: val,
|
|
13576
|
-
min: 1,
|
|
13577
|
-
precision: 0,
|
|
13578
|
-
onChange: function onChange(num) {
|
|
13579
|
-
return updateHandle(num, index, 'number');
|
|
13580
|
-
}
|
|
13581
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
13582
|
-
}
|
|
13583
|
-
}, {
|
|
13584
|
-
dataIndex: 'share',
|
|
13585
|
-
title: "\u5206\u644A\u4EF7",
|
|
13586
|
-
align: 'center',
|
|
13587
|
-
ellipsis: true,
|
|
13588
|
-
width: 70
|
|
13589
|
-
}, {
|
|
13590
|
-
dataIndex: 'type',
|
|
13591
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
13592
|
-
align: 'center',
|
|
13593
|
-
ellipsis: true,
|
|
13594
|
-
width: 100
|
|
13595
|
-
}];
|
|
14433
|
+
columns = getColumnsMap({
|
|
14434
|
+
text: text,
|
|
14435
|
+
disabled: disabled,
|
|
14436
|
+
updateHandle: updateHandle,
|
|
14437
|
+
updateDataHandle: updateDataHandle
|
|
14438
|
+
})['default'];
|
|
13596
14439
|
}
|
|
13597
14440
|
return columns;
|
|
13598
14441
|
};
|
|
@@ -13604,6 +14447,24 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13604
14447
|
return COLUMNS_INFO(type);
|
|
13605
14448
|
};
|
|
13606
14449
|
var newColumns = useMemo(function () {
|
|
14450
|
+
var initBaseInfoColumns = GOODS_INFO_COLUMNS();
|
|
14451
|
+
var baseInfoColumns = [];
|
|
14452
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === 'string';
|
|
14453
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === '[object Object]';
|
|
14454
|
+
if (isStringArray) {
|
|
14455
|
+
baseInfoColumns = initBaseInfoColumns.filter(function (col) {
|
|
14456
|
+
return showHeader.includes(col.dataIndex);
|
|
14457
|
+
});
|
|
14458
|
+
} else if (isObjectArray) {
|
|
14459
|
+
baseInfoColumns = showHeader.filter(function (col) {
|
|
14460
|
+
return col.show !== false;
|
|
14461
|
+
}).map(function (col) {
|
|
14462
|
+
var currentCol = initBaseInfoColumns.find(function (item) {
|
|
14463
|
+
return item.dataIndex === col.dataIndex;
|
|
14464
|
+
});
|
|
14465
|
+
return currentCol ? currentCol : undefined;
|
|
14466
|
+
}).filter(Boolean);
|
|
14467
|
+
}
|
|
13607
14468
|
var columnList = [{
|
|
13608
14469
|
dataIndex: '',
|
|
13609
14470
|
title: '序号',
|
|
@@ -13613,9 +14474,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13613
14474
|
render: function render(val, record, index) {
|
|
13614
14475
|
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
13615
14476
|
}
|
|
13616
|
-
}].concat(_toConsumableArray(
|
|
13617
|
-
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
13618
|
-
})));
|
|
14477
|
+
}].concat(_toConsumableArray(baseInfoColumns));
|
|
13619
14478
|
if (!disabled) {
|
|
13620
14479
|
columnList.push({
|
|
13621
14480
|
dataIndex: '',
|
|
@@ -13649,7 +14508,6 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13649
14508
|
}].concat(_toConsumableArray(columns));
|
|
13650
14509
|
}, []);
|
|
13651
14510
|
var onSubmit = function onSubmit(list) {
|
|
13652
|
-
console.log('🚀 ~ onSubmit ~ list:', list);
|
|
13653
14511
|
var newList = [];
|
|
13654
14512
|
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
13655
14513
|
newList = list.map(function (item) {
|
|
@@ -13699,6 +14557,28 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13699
14557
|
canUpdateNumber: canUpdateNumber
|
|
13700
14558
|
});
|
|
13701
14559
|
});
|
|
14560
|
+
} else if (['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type)) {
|
|
14561
|
+
newList = list.map(function (item) {
|
|
14562
|
+
var goodName = item.goodName,
|
|
14563
|
+
goodShortName = item.goodShortName,
|
|
14564
|
+
goodNo = item.goodNo,
|
|
14565
|
+
specName = item.specName,
|
|
14566
|
+
specNo = item.specNo,
|
|
14567
|
+
retailPrice = item.retailPrice;
|
|
14568
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14569
|
+
uuid: uuid(),
|
|
14570
|
+
canDelete: true,
|
|
14571
|
+
canEdit: true,
|
|
14572
|
+
qty: 1,
|
|
14573
|
+
goodName: goodName,
|
|
14574
|
+
goodShortName: goodShortName,
|
|
14575
|
+
goodNo: goodNo,
|
|
14576
|
+
specName: specName,
|
|
14577
|
+
specNo: specNo,
|
|
14578
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
14579
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
14580
|
+
});
|
|
14581
|
+
});
|
|
13702
14582
|
} else {
|
|
13703
14583
|
newList = list.map(function (item) {
|
|
13704
14584
|
var goodsId = item.goodsId,
|
|
@@ -13794,6 +14674,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13794
14674
|
shopId: shopId,
|
|
13795
14675
|
maxLength: maxLength,
|
|
13796
14676
|
companyKey: companyKey
|
|
14677
|
+
}) : ['GY_GOODS', 'GY_REISSUE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(GyGoodsModal$1, {
|
|
14678
|
+
ref: refModal,
|
|
14679
|
+
onSubmit: onSubmit,
|
|
14680
|
+
width: width,
|
|
14681
|
+
shopList: shopList,
|
|
14682
|
+
shopId: shopId,
|
|
14683
|
+
maxLength: maxLength,
|
|
14684
|
+
companyKey: companyKey
|
|
13797
14685
|
}) : /*#__PURE__*/React.createElement(GoodsModal$2, {
|
|
13798
14686
|
ref: refModal,
|
|
13799
14687
|
onSubmit: onSubmit,
|
|
@@ -14485,19 +15373,66 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
14485
15373
|
});
|
|
14486
15374
|
singletonMap$1.set(orderNo, p);
|
|
14487
15375
|
}
|
|
14488
|
-
return singletonMap$1.get(orderNo);
|
|
15376
|
+
return singletonMap$1.get(orderNo);
|
|
15377
|
+
};
|
|
15378
|
+
var bsE3Utils = {
|
|
15379
|
+
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
15380
|
+
};
|
|
15381
|
+
|
|
15382
|
+
var singletonMap$2 = new Map();
|
|
15383
|
+
var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
15384
|
+
if (!singletonMap$2.has(orderNo)) {
|
|
15385
|
+
var p = new Promise(function (resolve, reject) {
|
|
15386
|
+
var doReject = function doReject(err) {
|
|
15387
|
+
// 清空掉错误的请求记录
|
|
15388
|
+
singletonMap$2.delete(orderNo);
|
|
15389
|
+
reject(err);
|
|
15390
|
+
};
|
|
15391
|
+
extendRequest('/qy/gdfw/oms/gyOrderDetail', {
|
|
15392
|
+
method: 'post',
|
|
15393
|
+
data: {
|
|
15394
|
+
tid: orderNo
|
|
15395
|
+
}
|
|
15396
|
+
}).then(function (res) {
|
|
15397
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
15398
|
+
var _res$data;
|
|
15399
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) {
|
|
15400
|
+
res.data.trades = filterGyOrders(res === null || res === void 0 ? void 0 : res.data, orderNo).map(function (item) {
|
|
15401
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
15402
|
+
billNo: item.code,
|
|
15403
|
+
billType: item.orderTypeName,
|
|
15404
|
+
billTag: item.tagName,
|
|
15405
|
+
tradeTagName: item.tradeTagName,
|
|
15406
|
+
deliveryState: item.deliveryState,
|
|
15407
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
15408
|
+
});
|
|
15409
|
+
});
|
|
15410
|
+
}
|
|
15411
|
+
resolve(res.data);
|
|
15412
|
+
// 延迟10秒清除,保证订单的时效性
|
|
15413
|
+
setTimeout(function () {
|
|
15414
|
+
singletonMap$2.delete(orderNo);
|
|
15415
|
+
}, 1000 * 10);
|
|
15416
|
+
} else {
|
|
15417
|
+
doReject(res);
|
|
15418
|
+
}
|
|
15419
|
+
}).catch(doReject);
|
|
15420
|
+
});
|
|
15421
|
+
singletonMap$2.set(orderNo, p);
|
|
15422
|
+
}
|
|
15423
|
+
return singletonMap$2.get(orderNo);
|
|
14489
15424
|
};
|
|
14490
|
-
var
|
|
14491
|
-
|
|
15425
|
+
var gyUtils = {
|
|
15426
|
+
getGyOrderListSingleton: getGyOrderListSingleton
|
|
14492
15427
|
};
|
|
14493
15428
|
|
|
14494
|
-
var singletonMap$
|
|
15429
|
+
var singletonMap$3 = new Map();
|
|
14495
15430
|
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
14496
|
-
if (!singletonMap$
|
|
15431
|
+
if (!singletonMap$3.has(orderNo)) {
|
|
14497
15432
|
var p = new Promise(function (resolve, reject) {
|
|
14498
15433
|
var doReject = function doReject(err) {
|
|
14499
15434
|
// 清空掉错误的请求记录
|
|
14500
|
-
singletonMap$
|
|
15435
|
+
singletonMap$3.delete(orderNo);
|
|
14501
15436
|
reject(err);
|
|
14502
15437
|
};
|
|
14503
15438
|
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
@@ -14523,151 +15458,36 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
14523
15458
|
}
|
|
14524
15459
|
// 延迟10秒清除,保证订单的时效性
|
|
14525
15460
|
setTimeout(function () {
|
|
14526
|
-
singletonMap$
|
|
15461
|
+
singletonMap$3.delete(orderNo);
|
|
14527
15462
|
}, 1000 * 10);
|
|
14528
15463
|
} else {
|
|
14529
15464
|
doReject(data);
|
|
14530
15465
|
}
|
|
14531
15466
|
}).catch(doReject);
|
|
14532
15467
|
});
|
|
14533
|
-
singletonMap$
|
|
15468
|
+
singletonMap$3.set(orderNo, p);
|
|
14534
15469
|
}
|
|
14535
|
-
return singletonMap$
|
|
15470
|
+
return singletonMap$3.get(orderNo);
|
|
14536
15471
|
};
|
|
14537
15472
|
var kmUtils = {
|
|
14538
15473
|
getOrderListSingleton: getOrderListSingleton
|
|
14539
15474
|
};
|
|
14540
15475
|
|
|
14541
15476
|
var columnsMap = {
|
|
14542
|
-
BS_SYSTEM_ORDER:
|
|
14543
|
-
title: '单据类型',
|
|
14544
|
-
dataIndex: 'billType',
|
|
14545
|
-
width: 150
|
|
14546
|
-
}, {
|
|
14547
|
-
title: '系统订单号',
|
|
14548
|
-
dataIndex: 'billNo',
|
|
14549
|
-
width: 150
|
|
14550
|
-
}, {
|
|
14551
|
-
title: '标签',
|
|
14552
|
-
dataIndex: 'billTag',
|
|
14553
|
-
width: 150
|
|
14554
|
-
}, {
|
|
14555
|
-
title: '主播名称',
|
|
14556
|
-
dataIndex: 'authorName',
|
|
14557
|
-
width: 150
|
|
14558
|
-
}, {
|
|
14559
|
-
title: '主播ID',
|
|
14560
|
-
dataIndex: 'authorId',
|
|
14561
|
-
width: 150
|
|
14562
|
-
}
|
|
14563
|
-
// {
|
|
14564
|
-
// title: '直播活动',
|
|
14565
|
-
// dataIndex: 'liveActivites',
|
|
14566
|
-
// width: 150,
|
|
14567
|
-
// },
|
|
14568
|
-
],
|
|
14569
|
-
|
|
15477
|
+
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
14570
15478
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
14571
|
-
WLN_SYSTEM_ORDER:
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
}, {
|
|
14576
|
-
title: '系统订单号',
|
|
14577
|
-
dataIndex: 'billNo',
|
|
14578
|
-
width: 150
|
|
14579
|
-
}, {
|
|
14580
|
-
title: '标记',
|
|
14581
|
-
dataIndex: 'billTag',
|
|
14582
|
-
width: 150
|
|
14583
|
-
}],
|
|
14584
|
-
WDT_SYSTEM_ORDER: [{
|
|
14585
|
-
title: '订单类型',
|
|
14586
|
-
dataIndex: 'billType',
|
|
14587
|
-
width: 150
|
|
14588
|
-
}, {
|
|
14589
|
-
title: '系统订单号',
|
|
14590
|
-
dataIndex: 'billNo',
|
|
14591
|
-
width: 150
|
|
14592
|
-
}, {
|
|
14593
|
-
title: '订单标签',
|
|
14594
|
-
dataIndex: 'billTag',
|
|
14595
|
-
width: 150
|
|
14596
|
-
}],
|
|
14597
|
-
BS_E3_SYSTEM_ORDER: [{
|
|
14598
|
-
title: '系统订单号',
|
|
14599
|
-
dataIndex: 'orderSn',
|
|
14600
|
-
width: 150,
|
|
14601
|
-
ellipsis: true
|
|
14602
|
-
}, {
|
|
14603
|
-
title: '订单状态',
|
|
14604
|
-
dataIndex: 'orderStatus',
|
|
14605
|
-
width: 100,
|
|
14606
|
-
ellipsis: true,
|
|
14607
|
-
render: function render(val) {
|
|
14608
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
|
|
14609
|
-
}
|
|
14610
|
-
}, {
|
|
14611
|
-
title: '是否被拆分',
|
|
14612
|
-
dataIndex: 'isSplit',
|
|
14613
|
-
width: 100,
|
|
14614
|
-
ellipsis: true,
|
|
14615
|
-
render: function render(val) {
|
|
14616
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14617
|
-
}
|
|
14618
|
-
}, {
|
|
14619
|
-
title: '是否拆分子单',
|
|
14620
|
-
dataIndex: 'isSplitNew',
|
|
14621
|
-
width: 100,
|
|
14622
|
-
ellipsis: true,
|
|
14623
|
-
render: function render(val) {
|
|
14624
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14625
|
-
}
|
|
14626
|
-
}, {
|
|
14627
|
-
title: '是否被合并',
|
|
14628
|
-
dataIndex: 'isCombine',
|
|
14629
|
-
width: 100,
|
|
14630
|
-
ellipsis: true,
|
|
14631
|
-
render: function render(val) {
|
|
14632
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14633
|
-
}
|
|
14634
|
-
}, {
|
|
14635
|
-
title: '是否合并新单',
|
|
14636
|
-
dataIndex: 'isCombineNew',
|
|
14637
|
-
width: 100,
|
|
14638
|
-
ellipsis: true,
|
|
14639
|
-
render: function render(val) {
|
|
14640
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14641
|
-
}
|
|
14642
|
-
}, {
|
|
14643
|
-
title: '是否复制单',
|
|
14644
|
-
dataIndex: 'isCopy',
|
|
14645
|
-
width: 100,
|
|
14646
|
-
ellipsis: true,
|
|
14647
|
-
render: function render(val) {
|
|
14648
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14649
|
-
}
|
|
14650
|
-
}, {
|
|
14651
|
-
title: '是否换货单',
|
|
14652
|
-
dataIndex: 'isExchangeOrder',
|
|
14653
|
-
width: 100,
|
|
14654
|
-
ellipsis: true,
|
|
14655
|
-
render: function render(val) {
|
|
14656
|
-
return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
|
|
14657
|
-
}
|
|
14658
|
-
}, {
|
|
14659
|
-
title: '订单备注',
|
|
14660
|
-
dataIndex: 'orderMsg',
|
|
14661
|
-
width: 150,
|
|
14662
|
-
ellipsis: true
|
|
14663
|
-
}]
|
|
15479
|
+
WLN_SYSTEM_ORDER: WLN_SYSTEM_ORDER_CONFIG.columns,
|
|
15480
|
+
WDT_SYSTEM_ORDER: WDT_SYSTEM_ORDER_CONFIG.columns,
|
|
15481
|
+
BS_E3_SYSTEM_ORDER: BS_E3_SYSTEM_ORDER_CONFIG.columns,
|
|
15482
|
+
GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG.columns
|
|
14664
15483
|
};
|
|
14665
15484
|
var rowKeyMap = {
|
|
14666
15485
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14667
15486
|
KM_SYSTEM_ORDER: 'billNo',
|
|
14668
15487
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14669
15488
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14670
|
-
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
15489
|
+
BS_E3_SYSTEM_ORDER: 'orderSn',
|
|
15490
|
+
GY_SYSTEM_ORDER: 'billNo'
|
|
14671
15491
|
};
|
|
14672
15492
|
var index$1 = (function (props) {
|
|
14673
15493
|
var value = props.value,
|
|
@@ -14689,6 +15509,9 @@ var index$1 = (function (props) {
|
|
|
14689
15509
|
getWdtOrderList(value.orderNo);
|
|
14690
15510
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14691
15511
|
getBsE3OrderList(value.orderNo);
|
|
15512
|
+
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
15513
|
+
console.log('触发gy--getGyOrderList--1');
|
|
15514
|
+
getGyOrderList(value.orderNo);
|
|
14692
15515
|
}
|
|
14693
15516
|
}
|
|
14694
15517
|
}, [value, type]);
|
|
@@ -14875,6 +15698,45 @@ var index$1 = (function (props) {
|
|
|
14875
15698
|
return _ref6.apply(this, arguments);
|
|
14876
15699
|
};
|
|
14877
15700
|
}();
|
|
15701
|
+
var getGyOrderList = /*#__PURE__*/function () {
|
|
15702
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(orderNo) {
|
|
15703
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
15704
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
15705
|
+
case 0:
|
|
15706
|
+
gyUtils.getGyOrderListSingleton(orderNo).then(function (data) {
|
|
15707
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
15708
|
+
return getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
|
|
15709
|
+
});
|
|
15710
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
15711
|
+
orders: trades,
|
|
15712
|
+
showOrderInfo: trades.map(function (_ref9) {
|
|
15713
|
+
var billNo = _ref9.billNo,
|
|
15714
|
+
billType = _ref9.billType,
|
|
15715
|
+
billTag = _ref9.billTag,
|
|
15716
|
+
tradeTagName = _ref9.tradeTagName,
|
|
15717
|
+
deliveryState = _ref9.deliveryState;
|
|
15718
|
+
return {
|
|
15719
|
+
billNo: billNo,
|
|
15720
|
+
billType: billType,
|
|
15721
|
+
billTag: billTag,
|
|
15722
|
+
tradeTagName: tradeTagName,
|
|
15723
|
+
deliveryState: deliveryState,
|
|
15724
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
15725
|
+
};
|
|
15726
|
+
})
|
|
15727
|
+
}));
|
|
15728
|
+
});
|
|
15729
|
+
onceRef.current = false;
|
|
15730
|
+
case 2:
|
|
15731
|
+
case "end":
|
|
15732
|
+
return _context6.stop();
|
|
15733
|
+
}
|
|
15734
|
+
}, _callee6);
|
|
15735
|
+
}));
|
|
15736
|
+
return function getGyOrderList(_x6) {
|
|
15737
|
+
return _ref8.apply(this, arguments);
|
|
15738
|
+
};
|
|
15739
|
+
}();
|
|
14878
15740
|
var rowSelection = {
|
|
14879
15741
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14880
15742
|
fixed: true,
|
|
@@ -14891,7 +15753,24 @@ var index$1 = (function (props) {
|
|
|
14891
15753
|
};
|
|
14892
15754
|
}
|
|
14893
15755
|
};
|
|
14894
|
-
|
|
15756
|
+
// useEffect(() => {
|
|
15757
|
+
// const dom = document.querySelector(
|
|
15758
|
+
// `.${type}_SYSTEM_ORDER_COMPONENT .ant-table-content`,
|
|
15759
|
+
// );
|
|
15760
|
+
// //解决列表出现横向滚动条时选择数据造成行内闪烁问题
|
|
15761
|
+
// if (
|
|
15762
|
+
// (value?.selectIds || []).length > 0 &&
|
|
15763
|
+
// dom &&
|
|
15764
|
+
// dom.scrollWidth > dom.clientWidth &&
|
|
15765
|
+
// dom.scrollLeft === 0
|
|
15766
|
+
// ) {
|
|
15767
|
+
// console.log(dom.scrollWidth > dom.clientWidth, dom.scrollLeft === 0);
|
|
15768
|
+
// dom.scrollLeft = 1;
|
|
15769
|
+
// }
|
|
15770
|
+
// }, [JSON.stringify(value?.selectIds || [])]);
|
|
15771
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15772
|
+
className: "".concat(type, "_SYSTEM_ORDER_COMPONENT")
|
|
15773
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
14895
15774
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
14896
15775
|
columns: columns,
|
|
14897
15776
|
rowSelection: rowSelection,
|
|
@@ -14899,12 +15778,12 @@ var index$1 = (function (props) {
|
|
|
14899
15778
|
size: "small",
|
|
14900
15779
|
pagination: false,
|
|
14901
15780
|
scroll: {
|
|
14902
|
-
x: '
|
|
15781
|
+
x: 'max-content'
|
|
14903
15782
|
},
|
|
14904
15783
|
locale: {
|
|
14905
15784
|
emptyText: '暂无数据'
|
|
14906
15785
|
}
|
|
14907
|
-
});
|
|
15786
|
+
}));
|
|
14908
15787
|
});
|
|
14909
15788
|
|
|
14910
15789
|
var WlnGoods = function WlnGoods(props) {
|
|
@@ -14930,13 +15809,14 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
14930
15809
|
};
|
|
14931
15810
|
|
|
14932
15811
|
var componentMap$1 = {
|
|
14933
|
-
|
|
15812
|
+
WDT_GOODS: {
|
|
14934
15813
|
type: 'wdt',
|
|
14935
15814
|
key: 'wdtGoods',
|
|
14936
15815
|
name: '旺店通',
|
|
14937
15816
|
orderNo: 'srcTid',
|
|
14938
15817
|
goodDetailOrderNo: 'srcTid',
|
|
14939
15818
|
eventNameMap: {
|
|
15819
|
+
// pubsub 事件
|
|
14940
15820
|
type: 'wdtType',
|
|
14941
15821
|
updateGoodsHandle: updateWdtGoodsHandle,
|
|
14942
15822
|
selectListReturn: 'wdtSelectListReturn',
|
|
@@ -14954,13 +15834,14 @@ var componentMap$1 = {
|
|
|
14954
15834
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
14955
15835
|
}
|
|
14956
15836
|
},
|
|
14957
|
-
|
|
15837
|
+
BS_E3_GOODS: {
|
|
14958
15838
|
type: 'e3',
|
|
14959
15839
|
key: 'bsE3Goods',
|
|
14960
15840
|
name: '百胜E3',
|
|
14961
15841
|
orderNo: 'dealCode',
|
|
14962
15842
|
goodDetailOrderNo: 'originalDealCode',
|
|
14963
15843
|
eventNameMap: {
|
|
15844
|
+
// pubsub 事件
|
|
14964
15845
|
type: 'bsE3Type',
|
|
14965
15846
|
updateGoodsHandle: updateBsE3GoodsHandle,
|
|
14966
15847
|
selectListReturn: 'bsE3SelectListReturn',
|
|
@@ -14977,6 +15858,31 @@ var componentMap$1 = {
|
|
|
14977
15858
|
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
14978
15859
|
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
14979
15860
|
}
|
|
15861
|
+
},
|
|
15862
|
+
GY_GOODS: {
|
|
15863
|
+
type: 'gy',
|
|
15864
|
+
key: 'gyGoods',
|
|
15865
|
+
name: '管易',
|
|
15866
|
+
orderNo: 'dealCode',
|
|
15867
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
15868
|
+
eventNameMap: {
|
|
15869
|
+
// pubsub 事件
|
|
15870
|
+
type: 'gyType',
|
|
15871
|
+
updateGoodsHandle: updateGyGoodsHandle,
|
|
15872
|
+
selectListReturn: 'gySelectListReturn',
|
|
15873
|
+
selectList: 'gySelectList',
|
|
15874
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
15875
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
15876
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
15877
|
+
changeShopCode: 'gyChangeShopCode',
|
|
15878
|
+
reissueType: 'gyReissueType',
|
|
15879
|
+
returnType: 'gyReturnType',
|
|
15880
|
+
returnSelectListReturn: 'gyReturnSelectListReturn',
|
|
15881
|
+
returnSelectList: 'gyReturnSelectList',
|
|
15882
|
+
deleteGood: 'gyDeleteGood',
|
|
15883
|
+
returnDeleteGood: 'gyReturnDeleteGood',
|
|
15884
|
+
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
15885
|
+
}
|
|
14980
15886
|
}
|
|
14981
15887
|
};
|
|
14982
15888
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -16379,15 +17285,6 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
16379
17285
|
};
|
|
16380
17286
|
|
|
16381
17287
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
16382
|
-
var msgTypeCh = {
|
|
16383
|
-
ding: '钉钉',
|
|
16384
|
-
wechat: '微信',
|
|
16385
|
-
qq: 'QQ',
|
|
16386
|
-
qywx: '企业微信',
|
|
16387
|
-
YZDKH: '邮政拦截',
|
|
16388
|
-
YT: '圆通拦截',
|
|
16389
|
-
feishu: '飞书'
|
|
16390
|
-
};
|
|
16391
17288
|
var MsgStatus = function MsgStatus(props) {
|
|
16392
17289
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|
|
16393
17290
|
var _props$value = props.value,
|
|
@@ -16700,4 +17597,253 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16700
17597
|
})));
|
|
16701
17598
|
};
|
|
16702
17599
|
|
|
16703
|
-
|
|
17600
|
+
var _excluded$l = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
17601
|
+
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState"];
|
|
17602
|
+
var typeMap$3 = {
|
|
17603
|
+
GY_REISSUE_GOODS: {
|
|
17604
|
+
key: 'gyReissueGoods',
|
|
17605
|
+
name: '管易',
|
|
17606
|
+
typeName: 'gyReissueType',
|
|
17607
|
+
systemOrder: 'gySystemOrder',
|
|
17608
|
+
systemOrderNo: 'gySystemOrderNo',
|
|
17609
|
+
reissueSelectList: 'gyReissueSelectList',
|
|
17610
|
+
reissueSelectListReturn: 'gyReissueSelectListReturn',
|
|
17611
|
+
reissueDeleteGood: 'gyReissueDeleteGood',
|
|
17612
|
+
changeShopCode: 'gyChangeShopCode',
|
|
17613
|
+
reissueType: 'gyReissueType',
|
|
17614
|
+
formatDefaultField: {
|
|
17615
|
+
money: 'orderPrice',
|
|
17616
|
+
share: 'sharePrice'
|
|
17617
|
+
},
|
|
17618
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
17619
|
+
}
|
|
17620
|
+
};
|
|
17621
|
+
var GyReissue = function GyReissue(props) {
|
|
17622
|
+
var _value$gySystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
17623
|
+
var value = props.value,
|
|
17624
|
+
onChange = props.onChange,
|
|
17625
|
+
_props$reasonList = props.reasonList,
|
|
17626
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17627
|
+
disabled = props.disabled,
|
|
17628
|
+
type = props.type,
|
|
17629
|
+
other = _objectWithoutProperties(props, _excluded$l);
|
|
17630
|
+
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) {
|
|
17631
|
+
var _order$platformCode;
|
|
17632
|
+
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
17633
|
+
});
|
|
17634
|
+
var getOrderFlag = useRef(false);
|
|
17635
|
+
var _useState = useState(false),
|
|
17636
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17637
|
+
isStrict = _useState2[0],
|
|
17638
|
+
setIsStrict = _useState2[1];
|
|
17639
|
+
useEffect(function () {
|
|
17640
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
17641
|
+
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)) {
|
|
17642
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
17643
|
+
getOrderFlag.current = true;
|
|
17644
|
+
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);
|
|
17645
|
+
}
|
|
17646
|
+
return;
|
|
17647
|
+
}, [value]);
|
|
17648
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
17649
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17650
|
+
var _typeMap$type4;
|
|
17651
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17652
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17653
|
+
case 0:
|
|
17654
|
+
(_typeMap$type4 = typeMap$3[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
17655
|
+
var _typeMap$type5, _typeMap$type6;
|
|
17656
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
17657
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
17658
|
+
var billNo = _ref2.billNo,
|
|
17659
|
+
billType = _ref2.billType,
|
|
17660
|
+
billTag = _ref2.billTag,
|
|
17661
|
+
tradeTagName = _ref2.tradeTagName,
|
|
17662
|
+
deliveryState = _ref2.deliveryState,
|
|
17663
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
17664
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17665
|
+
billNo: billNo,
|
|
17666
|
+
billType: billType,
|
|
17667
|
+
billTag: billTag,
|
|
17668
|
+
tradeTagName: tradeTagName,
|
|
17669
|
+
deliveryState: deliveryState,
|
|
17670
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState]
|
|
17671
|
+
});
|
|
17672
|
+
});
|
|
17673
|
+
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]), {}, {
|
|
17674
|
+
showOrderInfo: showOrderInfo,
|
|
17675
|
+
orders: orders
|
|
17676
|
+
}))));
|
|
17677
|
+
});
|
|
17678
|
+
case 1:
|
|
17679
|
+
case "end":
|
|
17680
|
+
return _context.stop();
|
|
17681
|
+
}
|
|
17682
|
+
}, _callee);
|
|
17683
|
+
}));
|
|
17684
|
+
return function getOrderList(_x) {
|
|
17685
|
+
return _ref.apply(this, arguments);
|
|
17686
|
+
};
|
|
17687
|
+
}();
|
|
17688
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
17689
|
+
var _value$typeMap$type$t, _typeMap$type7, _typeMap$type8;
|
|
17690
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
17691
|
+
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;
|
|
17692
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
17693
|
+
var newValue = _objectSpread2({}, value);
|
|
17694
|
+
newValue[(_typeMap$type8 = typeMap$3[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName] = val;
|
|
17695
|
+
if (typeName === '1') {
|
|
17696
|
+
var _typeMap$type9;
|
|
17697
|
+
newValue[(_typeMap$type9 = typeMap$3[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key] = getGoodDetails({
|
|
17698
|
+
mode: isStrict
|
|
17699
|
+
});
|
|
17700
|
+
} else if (typeName === '2') {
|
|
17701
|
+
var _typeMap$type10;
|
|
17702
|
+
// 切换到非原单,清空列表
|
|
17703
|
+
newValue[(_typeMap$type10 = typeMap$3[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key] = [];
|
|
17704
|
+
}
|
|
17705
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17706
|
+
};
|
|
17707
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
17708
|
+
var _value$typeMap$type$t2, _typeMap$type11, _typeMap$type12;
|
|
17709
|
+
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';
|
|
17710
|
+
setIsStrict(mode);
|
|
17711
|
+
if (!isOriginalOrder) return;
|
|
17712
|
+
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({
|
|
17713
|
+
mode: mode
|
|
17714
|
+
}))));
|
|
17715
|
+
};
|
|
17716
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
17717
|
+
var _typeMap$type13, _typeMap$type14, _order$details;
|
|
17718
|
+
var mode = _ref3.mode,
|
|
17719
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
17720
|
+
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];
|
|
17721
|
+
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];
|
|
17722
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
17723
|
+
return order.code === systemOrderNo;
|
|
17724
|
+
});
|
|
17725
|
+
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]) : [];
|
|
17726
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
17727
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
17728
|
+
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
17729
|
+
}) : goodDetails;
|
|
17730
|
+
};
|
|
17731
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
17732
|
+
var _typeMap$type15;
|
|
17733
|
+
var newValue = _objectSpread2({}, value);
|
|
17734
|
+
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) {
|
|
17735
|
+
var _typeMap$type16, _typeMap$type17;
|
|
17736
|
+
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;
|
|
17737
|
+
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;
|
|
17738
|
+
return item;
|
|
17739
|
+
});
|
|
17740
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17741
|
+
};
|
|
17742
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
17743
|
+
var _typeMap$type18, _value$typeMap$type$t3, _typeMap$type19, _value$typeMap$type$t4, _typeMap$type21;
|
|
17744
|
+
var newValue = _objectSpread2({}, value);
|
|
17745
|
+
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;
|
|
17746
|
+
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])) {
|
|
17747
|
+
var _typeMap$type20;
|
|
17748
|
+
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)] = [];
|
|
17749
|
+
} 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])) {
|
|
17750
|
+
var _typeMap$type22;
|
|
17751
|
+
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({
|
|
17752
|
+
mode: isStrict,
|
|
17753
|
+
sysOrderNo: val
|
|
17754
|
+
});
|
|
17755
|
+
}
|
|
17756
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17757
|
+
};
|
|
17758
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
17759
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
17760
|
+
var newValue = _objectSpread2({}, value);
|
|
17761
|
+
// 原订单商品
|
|
17762
|
+
var originTradeGoodList = getGoodDetails({
|
|
17763
|
+
mode: isStrict
|
|
17764
|
+
}) || [];
|
|
17765
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
17766
|
+
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)]) || [];
|
|
17767
|
+
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) {
|
|
17768
|
+
return skuList.includes(item.uuid);
|
|
17769
|
+
});
|
|
17770
|
+
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)]);
|
|
17771
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
17772
|
+
}, [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]);
|
|
17773
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
17774
|
+
var showChangeBtn = useMemo(function () {
|
|
17775
|
+
var _typeMap$type27;
|
|
17776
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
17777
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$3[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
17778
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
17779
|
+
gutter: 8,
|
|
17780
|
+
wrap: true
|
|
17781
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
17782
|
+
className: "gutter-row",
|
|
17783
|
+
xs: {
|
|
17784
|
+
span: 11
|
|
17785
|
+
},
|
|
17786
|
+
sm: {
|
|
17787
|
+
span: 6
|
|
17788
|
+
}
|
|
17789
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
17790
|
+
style: {
|
|
17791
|
+
marginBottom: '8px'
|
|
17792
|
+
},
|
|
17793
|
+
disabled: disabled,
|
|
17794
|
+
allowClear: false,
|
|
17795
|
+
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)],
|
|
17796
|
+
onChange: function onChange(val) {
|
|
17797
|
+
return changeSystemOrderHandle(val);
|
|
17798
|
+
},
|
|
17799
|
+
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
17800
|
+
}, ((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) {
|
|
17801
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
17802
|
+
key: item.billNo,
|
|
17803
|
+
value: item.billNo,
|
|
17804
|
+
label: item.billNo
|
|
17805
|
+
}, item.billNo);
|
|
17806
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
17807
|
+
className: "gutter-row",
|
|
17808
|
+
xs: {
|
|
17809
|
+
span: 11
|
|
17810
|
+
},
|
|
17811
|
+
sm: {
|
|
17812
|
+
span: 6
|
|
17813
|
+
}
|
|
17814
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
17815
|
+
style: {
|
|
17816
|
+
marginBottom: '8px'
|
|
17817
|
+
},
|
|
17818
|
+
disabled: disabled,
|
|
17819
|
+
allowClear: false,
|
|
17820
|
+
options: reasonList,
|
|
17821
|
+
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)],
|
|
17822
|
+
onChange: function onChange(val) {
|
|
17823
|
+
return changeTypeHandle(val);
|
|
17824
|
+
}
|
|
17825
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
17826
|
+
key: 'reissueGoods'
|
|
17827
|
+
}, other), {}, {
|
|
17828
|
+
type: type,
|
|
17829
|
+
disabled: disabled,
|
|
17830
|
+
canUpdateNumber: showChangeBtn,
|
|
17831
|
+
showChangeBtn: showChangeBtn,
|
|
17832
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17833
|
+
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)],
|
|
17834
|
+
onChange: function onChange(val) {
|
|
17835
|
+
return changeGoodHandle(val);
|
|
17836
|
+
},
|
|
17837
|
+
onModeChange: handleModeChange,
|
|
17838
|
+
showModeBtn: showModeBtn,
|
|
17839
|
+
isStrict: isStrict,
|
|
17840
|
+
tradeGoods: {
|
|
17841
|
+
originDataSource: getGoodDetails({
|
|
17842
|
+
mode: isStrict
|
|
17843
|
+
}),
|
|
17844
|
+
selectedGoodsChange: selectedGoodsChange
|
|
17845
|
+
}
|
|
17846
|
+
})));
|
|
17847
|
+
};
|
|
17848
|
+
|
|
17849
|
+
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 };
|