@kmkf-fe-packages/basic-components 2.0.0-rc.2 → 2.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -3,8 +3,8 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty } from 'lodash';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterKmOrders, KM_SYSTEM_ORDER_CONFIG, BS_E3_ORDER_STATUS_MAP, updateWdtGoodsHandle, updateBsE3GoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
@@ -921,11 +921,12 @@ var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap
|
|
|
921
921
|
var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","deleteIcon":"index-module_deleteIcon__20Wzd","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
|
|
922
922
|
styleInject(css_248z$1);
|
|
923
923
|
|
|
924
|
-
var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
|
|
924
|
+
var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
|
|
925
925
|
var fn$1 = function fn() {
|
|
926
926
|
return void 0;
|
|
927
927
|
};
|
|
928
928
|
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
929
|
+
var _document;
|
|
929
930
|
var _ref$maxCount = _ref.maxCount,
|
|
930
931
|
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
931
932
|
_ref$maxSize = _ref.maxSize,
|
|
@@ -946,6 +947,8 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
946
947
|
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
947
948
|
_ref$actionUrl = _ref.actionUrl,
|
|
948
949
|
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
950
|
+
_ref$platform = _ref.platform,
|
|
951
|
+
platform = _ref$platform === void 0 ? '' : _ref$platform,
|
|
949
952
|
resetProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
950
953
|
var inputRef = useRef(null);
|
|
951
954
|
var valueRef = useRef(value);
|
|
@@ -957,6 +960,9 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
957
960
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
958
961
|
pasteDefaultStates = _useState4[0],
|
|
959
962
|
setPasteDefaultStates = _useState4[1];
|
|
963
|
+
var preview = platform === 'ks' ? {
|
|
964
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
|
|
965
|
+
} : true;
|
|
960
966
|
useEffect(function () {
|
|
961
967
|
valueRef.current = value;
|
|
962
968
|
}, [value]);
|
|
@@ -1088,7 +1094,9 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
1088
1094
|
};
|
|
1089
1095
|
};
|
|
1090
1096
|
var renderImages = function renderImages(images) {
|
|
1091
|
-
return /*#__PURE__*/React.createElement(Image.PreviewGroup,
|
|
1097
|
+
return /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
1098
|
+
preview: preview
|
|
1099
|
+
}, images.map(function (image, index) {
|
|
1092
1100
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
|
|
1093
1101
|
var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
|
|
1094
1102
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -10948,12 +10956,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10948
10956
|
changeIndex = _useState2[0],
|
|
10949
10957
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10950
10958
|
var sendOptions = SendDataCenter.getInstance(platformType).getSendData();
|
|
10959
|
+
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
10951
10960
|
useEffect(function () {
|
|
10952
10961
|
//没有值塞个默认值
|
|
10953
10962
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10954
10963
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10955
10964
|
}
|
|
10956
10965
|
}, [value, type]);
|
|
10966
|
+
useEffect(function () {
|
|
10967
|
+
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
10968
|
+
setChangeIndex(0);
|
|
10969
|
+
}
|
|
10970
|
+
}, value);
|
|
10957
10971
|
var content = function content(item, index) {
|
|
10958
10972
|
return /*#__PURE__*/React.createElement("div", {
|
|
10959
10973
|
style: {
|
|
@@ -10964,7 +10978,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10964
10978
|
style: {
|
|
10965
10979
|
textAlign: 'center'
|
|
10966
10980
|
}
|
|
10967
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10981
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10968
10982
|
return /*#__PURE__*/React.createElement("div", {
|
|
10969
10983
|
key: index
|
|
10970
10984
|
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -10978,7 +10992,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10978
10992
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10979
10993
|
changeOrderInfo[type] = val;
|
|
10980
10994
|
changeOrderInfo['sendId'] = option.value;
|
|
10981
|
-
if (
|
|
10995
|
+
if (isSelectName && type === 'sendName') {
|
|
10982
10996
|
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10983
10997
|
}
|
|
10984
10998
|
var newList = _toConsumableArray(value);
|
|
@@ -11061,7 +11075,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11061
11075
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11062
11076
|
},
|
|
11063
11077
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
11064
|
-
}), ['sendName', 'all'].includes(showField) && (
|
|
11078
|
+
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11065
11079
|
style: {
|
|
11066
11080
|
minWidth: '100px',
|
|
11067
11081
|
maxWidth: '180px'
|
|
@@ -12567,6 +12581,104 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
12567
12581
|
});
|
|
12568
12582
|
};
|
|
12569
12583
|
|
|
12584
|
+
var renderGiftType = function renderGiftType(val) {
|
|
12585
|
+
var giftTypeMap = {
|
|
12586
|
+
0: '非赠品',
|
|
12587
|
+
1: '自动赠送',
|
|
12588
|
+
2: '手工赠送',
|
|
12589
|
+
3: '回购自动送赠品',
|
|
12590
|
+
4: '前N有礼送赠品',
|
|
12591
|
+
6: '天猫优仓赠品',
|
|
12592
|
+
7: '淘宝CRM会员送赠'
|
|
12593
|
+
};
|
|
12594
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12595
|
+
};
|
|
12596
|
+
var columns$4 = [{
|
|
12597
|
+
dataIndex: 'goodId',
|
|
12598
|
+
title: "\u5546\u54C1ID",
|
|
12599
|
+
width: 120
|
|
12600
|
+
}, {
|
|
12601
|
+
dataIndex: 'goodNo',
|
|
12602
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
12603
|
+
width: 200
|
|
12604
|
+
}, {
|
|
12605
|
+
dataIndex: 'goodName',
|
|
12606
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12607
|
+
width: 200
|
|
12608
|
+
}, {
|
|
12609
|
+
dataIndex: 'specId',
|
|
12610
|
+
title: "SKUID",
|
|
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
|
+
}];
|
|
12638
|
+
var renderFieldMap$1 = {
|
|
12639
|
+
num: function num(_ref) {
|
|
12640
|
+
var disabled = _ref.disabled,
|
|
12641
|
+
updateHandle = _ref.updateHandle;
|
|
12642
|
+
return function (val, record, index) {
|
|
12643
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
12644
|
+
style: {
|
|
12645
|
+
width: 70
|
|
12646
|
+
},
|
|
12647
|
+
value: val,
|
|
12648
|
+
min: 1,
|
|
12649
|
+
precision: 0,
|
|
12650
|
+
onChange: function onChange(num) {
|
|
12651
|
+
return updateHandle(num, index, 'num');
|
|
12652
|
+
}
|
|
12653
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12654
|
+
};
|
|
12655
|
+
},
|
|
12656
|
+
giftType: function giftType() {
|
|
12657
|
+
return renderGiftType;
|
|
12658
|
+
}
|
|
12659
|
+
};
|
|
12660
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
12661
|
+
var disabled = _ref2.disabled,
|
|
12662
|
+
updateHandle = _ref2.updateHandle,
|
|
12663
|
+
operate = _ref2.operate;
|
|
12664
|
+
return columns$4.map(function (item) {
|
|
12665
|
+
var newItem = _objectSpread2({
|
|
12666
|
+
align: 'center',
|
|
12667
|
+
ellipsis: true
|
|
12668
|
+
}, item);
|
|
12669
|
+
if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
|
|
12670
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12671
|
+
render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
|
|
12672
|
+
disabled: disabled,
|
|
12673
|
+
updateHandle: updateHandle
|
|
12674
|
+
})
|
|
12675
|
+
});
|
|
12676
|
+
}
|
|
12677
|
+
return newItem;
|
|
12678
|
+
});
|
|
12679
|
+
};
|
|
12680
|
+
|
|
12681
|
+
var MAIN_FIELD = 'uuid';
|
|
12570
12682
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12571
12683
|
var columns = _ref.columns,
|
|
12572
12684
|
dataSource = _ref.dataSource,
|
|
@@ -12582,11 +12694,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12582
12694
|
var closeModal = function closeModal() {
|
|
12583
12695
|
return setTradeGoodsVisible(false);
|
|
12584
12696
|
};
|
|
12697
|
+
var currentTradeOriginGoods = intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
12698
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
12699
|
+
}), selectedRowKeys);
|
|
12700
|
+
var unCurrentTradeOriginGoods = difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
12701
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
12702
|
+
}));
|
|
12703
|
+
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
12704
|
+
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
12705
|
+
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
12706
|
+
};
|
|
12585
12707
|
var rowSelection = {
|
|
12586
12708
|
selectedRowKeys: selectedRowKeys,
|
|
12587
|
-
onChange:
|
|
12709
|
+
onChange: handleChangeSelectedKeys
|
|
12588
12710
|
};
|
|
12589
|
-
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12590
12711
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
12591
12712
|
type: "link",
|
|
12592
12713
|
onClick: openModal
|
|
@@ -12596,7 +12717,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12596
12717
|
footer: null,
|
|
12597
12718
|
onCancel: closeModal
|
|
12598
12719
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
12599
|
-
rowKey:
|
|
12720
|
+
rowKey: MAIN_FIELD,
|
|
12600
12721
|
rowSelection: rowSelection,
|
|
12601
12722
|
columns: columns,
|
|
12602
12723
|
dataSource: dataSource,
|
|
@@ -12605,7 +12726,17 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12605
12726
|
x: 500,
|
|
12606
12727
|
y: 500
|
|
12607
12728
|
}
|
|
12608
|
-
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(",
|
|
12729
|
+
}), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12730
|
+
};
|
|
12731
|
+
var getButtonText = function getButtonText() {
|
|
12732
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12733
|
+
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
12734
|
+
return '选择百胜ERP商品';
|
|
12735
|
+
}
|
|
12736
|
+
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12737
|
+
return '选择旺店通商品';
|
|
12738
|
+
}
|
|
12739
|
+
return '选择商品';
|
|
12609
12740
|
};
|
|
12610
12741
|
var GoodItem$1 = function GoodItem(props) {
|
|
12611
12742
|
var _props$value = props.value,
|
|
@@ -12662,7 +12793,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12662
12793
|
// TODO: 商品订单中以选中商品
|
|
12663
12794
|
var selectedGoods = useMemo(function () {
|
|
12664
12795
|
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12665
|
-
return v
|
|
12796
|
+
return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
|
|
12666
12797
|
});
|
|
12667
12798
|
}, [value]);
|
|
12668
12799
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
@@ -12703,6 +12834,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12703
12834
|
var columns = [];
|
|
12704
12835
|
switch (type) {
|
|
12705
12836
|
case 'WDT_REISSUE_GOODS':
|
|
12837
|
+
{
|
|
12838
|
+
columns = getWdtReissueGoodColumns({
|
|
12839
|
+
disabled: disabled,
|
|
12840
|
+
updateHandle: updateHandle,
|
|
12841
|
+
operate: operate
|
|
12842
|
+
});
|
|
12843
|
+
}
|
|
12844
|
+
break;
|
|
12706
12845
|
case 'WDT_GOODS':
|
|
12707
12846
|
columns = [{
|
|
12708
12847
|
dataIndex: 'goodId',
|
|
@@ -13138,13 +13277,39 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13138
13277
|
title: "\u5546\u54C1\u6570\u91CF",
|
|
13139
13278
|
align: 'center',
|
|
13140
13279
|
ellipsis: true,
|
|
13141
|
-
width: 100
|
|
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
|
+
}
|
|
13142
13294
|
}, {
|
|
13143
13295
|
dataIndex: 'goodsPrice',
|
|
13144
13296
|
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13145
13297
|
align: 'center',
|
|
13146
13298
|
ellipsis: true,
|
|
13147
|
-
width: 120
|
|
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
|
+
}
|
|
13148
13313
|
}, {
|
|
13149
13314
|
dataIndex: 'shopPrice',
|
|
13150
13315
|
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
@@ -13168,7 +13333,20 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13168
13333
|
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13169
13334
|
align: 'center',
|
|
13170
13335
|
ellipsis: true,
|
|
13171
|
-
width: 120
|
|
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
|
+
}
|
|
13172
13350
|
}, {
|
|
13173
13351
|
dataIndex: 'tcSku',
|
|
13174
13352
|
title: "\u5957\u9910SKU",
|
|
@@ -13208,6 +13386,116 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13208
13386
|
});
|
|
13209
13387
|
}
|
|
13210
13388
|
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;
|
|
13211
13499
|
default:
|
|
13212
13500
|
columns = [{
|
|
13213
13501
|
dataIndex: 'mark',
|
|
@@ -13361,6 +13649,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13361
13649
|
}].concat(_toConsumableArray(columns));
|
|
13362
13650
|
}, []);
|
|
13363
13651
|
var onSubmit = function onSubmit(list) {
|
|
13652
|
+
console.log('🚀 ~ onSubmit ~ list:', list);
|
|
13364
13653
|
var newList = [];
|
|
13365
13654
|
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
13366
13655
|
newList = list.map(function (item) {
|
|
@@ -13405,6 +13694,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13405
13694
|
isGift: '',
|
|
13406
13695
|
uuid: uuid(),
|
|
13407
13696
|
canDelete: true,
|
|
13697
|
+
canEdit: true,
|
|
13408
13698
|
goodsNumber: 1,
|
|
13409
13699
|
canUpdateNumber: canUpdateNumber
|
|
13410
13700
|
});
|
|
@@ -13476,7 +13766,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13476
13766
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
13477
13767
|
type: "link",
|
|
13478
13768
|
onClick: handleChangeGoods
|
|
13479
|
-
},
|
|
13769
|
+
}, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13480
13770
|
columns: newColumns,
|
|
13481
13771
|
dataSource: value,
|
|
13482
13772
|
rowKey: 'uuid',
|
|
@@ -14201,6 +14491,53 @@ var bsE3Utils = {
|
|
|
14201
14491
|
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
14202
14492
|
};
|
|
14203
14493
|
|
|
14494
|
+
var singletonMap$2 = new Map();
|
|
14495
|
+
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
14496
|
+
if (!singletonMap$2.has(orderNo)) {
|
|
14497
|
+
var p = new Promise(function (resolve, reject) {
|
|
14498
|
+
var doReject = function doReject(err) {
|
|
14499
|
+
// 清空掉错误的请求记录
|
|
14500
|
+
singletonMap$2.delete(orderNo);
|
|
14501
|
+
reject(err);
|
|
14502
|
+
};
|
|
14503
|
+
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
14504
|
+
method: 'post',
|
|
14505
|
+
data: {
|
|
14506
|
+
tid: orderNo
|
|
14507
|
+
}
|
|
14508
|
+
}).then(function (data) {
|
|
14509
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14510
|
+
var _data$data, _data$data$orderDetai;
|
|
14511
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderDetai = _data$data.orderDetailDtoList) === null || _data$data$orderDetai === void 0 ? void 0 : _data$data$orderDetai.length) {
|
|
14512
|
+
var list = filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
14513
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14514
|
+
billNo: item.sid,
|
|
14515
|
+
sysStatus: item.sysStatus,
|
|
14516
|
+
billType: item.type,
|
|
14517
|
+
billTag: item.tags
|
|
14518
|
+
});
|
|
14519
|
+
});
|
|
14520
|
+
resolve(list);
|
|
14521
|
+
} else {
|
|
14522
|
+
resolve([]);
|
|
14523
|
+
}
|
|
14524
|
+
// 延迟10秒清除,保证订单的时效性
|
|
14525
|
+
setTimeout(function () {
|
|
14526
|
+
singletonMap$2.delete(orderNo);
|
|
14527
|
+
}, 1000 * 10);
|
|
14528
|
+
} else {
|
|
14529
|
+
doReject(data);
|
|
14530
|
+
}
|
|
14531
|
+
}).catch(doReject);
|
|
14532
|
+
});
|
|
14533
|
+
singletonMap$2.set(orderNo, p);
|
|
14534
|
+
}
|
|
14535
|
+
return singletonMap$2.get(orderNo);
|
|
14536
|
+
};
|
|
14537
|
+
var kmUtils = {
|
|
14538
|
+
getOrderListSingleton: getOrderListSingleton
|
|
14539
|
+
};
|
|
14540
|
+
|
|
14204
14541
|
var columnsMap = {
|
|
14205
14542
|
BS_SYSTEM_ORDER: [{
|
|
14206
14543
|
title: '单据类型',
|
|
@@ -14230,6 +14567,7 @@ var columnsMap = {
|
|
|
14230
14567
|
// },
|
|
14231
14568
|
],
|
|
14232
14569
|
|
|
14570
|
+
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
14233
14571
|
WLN_SYSTEM_ORDER: [{
|
|
14234
14572
|
title: '订单类型',
|
|
14235
14573
|
dataIndex: 'billType',
|
|
@@ -14326,6 +14664,7 @@ var columnsMap = {
|
|
|
14326
14664
|
};
|
|
14327
14665
|
var rowKeyMap = {
|
|
14328
14666
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14667
|
+
KM_SYSTEM_ORDER: 'billNo',
|
|
14329
14668
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14330
14669
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14331
14670
|
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
@@ -14342,6 +14681,8 @@ var index$1 = (function (props) {
|
|
|
14342
14681
|
onceRef.current = true;
|
|
14343
14682
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
14344
14683
|
getOrderList(value.orderNo);
|
|
14684
|
+
} else if (type === 'KM_SYSTEM_ORDER') {
|
|
14685
|
+
getKmOrderList(value.orderNo);
|
|
14345
14686
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
14346
14687
|
getWlnOrderList(value.orderNo);
|
|
14347
14688
|
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
@@ -14503,6 +14844,37 @@ var index$1 = (function (props) {
|
|
|
14503
14844
|
return _ref5.apply(this, arguments);
|
|
14504
14845
|
};
|
|
14505
14846
|
}();
|
|
14847
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
14848
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
14849
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
14850
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
14851
|
+
case 0:
|
|
14852
|
+
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
14853
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14854
|
+
orders: trades,
|
|
14855
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
14856
|
+
var billNo = _ref7.billNo,
|
|
14857
|
+
billType = _ref7.billType,
|
|
14858
|
+
billTag = _ref7.billTag;
|
|
14859
|
+
return {
|
|
14860
|
+
billNo: billNo,
|
|
14861
|
+
billType: billType,
|
|
14862
|
+
billTag: billTag
|
|
14863
|
+
};
|
|
14864
|
+
})
|
|
14865
|
+
}));
|
|
14866
|
+
});
|
|
14867
|
+
onceRef.current = false;
|
|
14868
|
+
case 2:
|
|
14869
|
+
case "end":
|
|
14870
|
+
return _context5.stop();
|
|
14871
|
+
}
|
|
14872
|
+
}, _callee5);
|
|
14873
|
+
}));
|
|
14874
|
+
return function getKmOrderList(_x5) {
|
|
14875
|
+
return _ref6.apply(this, arguments);
|
|
14876
|
+
};
|
|
14877
|
+
}();
|
|
14506
14878
|
var rowSelection = {
|
|
14507
14879
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14508
14880
|
fixed: true,
|
|
@@ -15073,7 +15445,7 @@ var typeMap$1 = {
|
|
|
15073
15445
|
}
|
|
15074
15446
|
};
|
|
15075
15447
|
var wdtReissue = function wdtReissue(props) {
|
|
15076
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
15448
|
+
var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
15077
15449
|
var value = props.value,
|
|
15078
15450
|
onChange = props.onChange,
|
|
15079
15451
|
_props$reasonList = props.reasonList,
|
|
@@ -15233,11 +15605,26 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15233
15605
|
}
|
|
15234
15606
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15235
15607
|
};
|
|
15608
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
15609
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
15610
|
+
var newValue = _objectSpread2({}, value);
|
|
15611
|
+
// 原订单商品
|
|
15612
|
+
var originTradeGoodList = getGoodDetails({
|
|
15613
|
+
mode: isStrict
|
|
15614
|
+
}) || [];
|
|
15615
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
15616
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)]) || [];
|
|
15617
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
15618
|
+
return skuList.includes(item.uuid);
|
|
15619
|
+
});
|
|
15620
|
+
console.log('商品发生变化', newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]);
|
|
15621
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15622
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)], isStrict]);
|
|
15236
15623
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15237
15624
|
var showChangeBtn = useMemo(function () {
|
|
15238
|
-
var _typeMap$
|
|
15239
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15240
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15625
|
+
var _typeMap$type27;
|
|
15626
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
15627
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
15241
15628
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
15242
15629
|
gutter: 8,
|
|
15243
15630
|
wrap: true
|
|
@@ -15255,12 +15642,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15255
15642
|
},
|
|
15256
15643
|
disabled: disabled,
|
|
15257
15644
|
allowClear: false,
|
|
15258
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15645
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
15259
15646
|
onChange: function onChange(val) {
|
|
15260
15647
|
return changeSystemOrderHandle(val);
|
|
15261
15648
|
},
|
|
15262
15649
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15263
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15650
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$1[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
15264
15651
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
15265
15652
|
key: item.billNo,
|
|
15266
15653
|
value: item.billNo,
|
|
@@ -15281,7 +15668,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15281
15668
|
disabled: disabled,
|
|
15282
15669
|
allowClear: false,
|
|
15283
15670
|
options: reasonList,
|
|
15284
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15671
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type31 = typeMap$1[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
15285
15672
|
onChange: function onChange(val) {
|
|
15286
15673
|
return changeTypeHandle(val);
|
|
15287
15674
|
}
|
|
@@ -15293,13 +15680,19 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15293
15680
|
canUpdateNumber: showChangeBtn,
|
|
15294
15681
|
showChangeBtn: showChangeBtn,
|
|
15295
15682
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15296
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15683
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type32 = typeMap$1[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
15297
15684
|
onChange: function onChange(val) {
|
|
15298
15685
|
return changeGoodHandle(val);
|
|
15299
15686
|
},
|
|
15300
15687
|
onModeChange: handleModeChange,
|
|
15301
15688
|
showModeBtn: showModeBtn,
|
|
15302
|
-
isStrict: isStrict
|
|
15689
|
+
isStrict: isStrict,
|
|
15690
|
+
tradeGoods: {
|
|
15691
|
+
originDataSource: getGoodDetails({
|
|
15692
|
+
mode: isStrict
|
|
15693
|
+
}),
|
|
15694
|
+
selectedGoodsChange: selectedGoodsChange
|
|
15695
|
+
}
|
|
15303
15696
|
})));
|
|
15304
15697
|
};
|
|
15305
15698
|
|
|
@@ -16084,7 +16477,7 @@ var typeMap$2 = {
|
|
|
16084
16477
|
}
|
|
16085
16478
|
};
|
|
16086
16479
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16087
|
-
var _typeMap$type21, _typeMap$
|
|
16480
|
+
var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
|
|
16088
16481
|
var value = props.value,
|
|
16089
16482
|
onChange = props.onChange,
|
|
16090
16483
|
_props$reasonList = props.reasonList,
|
|
@@ -16222,15 +16615,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16222
16615
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
16223
16616
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
16224
16617
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
16225
|
-
var _typeMap$type22,
|
|
16618
|
+
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
16226
16619
|
var newValue = _objectSpread2({}, value);
|
|
16227
|
-
|
|
16620
|
+
// 原订单商品
|
|
16621
|
+
var originTradeGoodList = getGoodDetails({
|
|
16228
16622
|
mode: isStrict
|
|
16229
|
-
})
|
|
16230
|
-
|
|
16623
|
+
}) || [];
|
|
16624
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
16625
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)]) || [];
|
|
16626
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
16627
|
+
return skuList.includes(item.uuid);
|
|
16231
16628
|
});
|
|
16232
16629
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16233
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16630
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)], isStrict]);
|
|
16234
16631
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
16235
16632
|
gutter: 8,
|
|
16236
16633
|
wrap: true,
|
|
@@ -16249,12 +16646,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16249
16646
|
},
|
|
16250
16647
|
disabled: disabled,
|
|
16251
16648
|
allowClear: false,
|
|
16252
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16649
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo)],
|
|
16253
16650
|
onChange: function onChange(val) {
|
|
16254
16651
|
return changeSystemOrderHandle(val);
|
|
16255
16652
|
},
|
|
16256
16653
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16257
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
16654
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
16258
16655
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
16259
16656
|
key: item.billNo,
|
|
16260
16657
|
value: item.billNo,
|
|
@@ -16275,7 +16672,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16275
16672
|
disabled: disabled,
|
|
16276
16673
|
allowClear: false,
|
|
16277
16674
|
options: reasonList,
|
|
16278
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16675
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
16279
16676
|
onChange: function onChange(val) {
|
|
16280
16677
|
return changeTypeHandle(val);
|
|
16281
16678
|
}
|
|
@@ -16287,7 +16684,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16287
16684
|
canUpdateNumber: showChangeBtn,
|
|
16288
16685
|
showChangeBtn: showChangeBtn,
|
|
16289
16686
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16290
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16687
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)],
|
|
16291
16688
|
onChange: function onChange(val) {
|
|
16292
16689
|
return changeGoodHandle(val);
|
|
16293
16690
|
},
|