@kmkf-fe-packages/basic-components 2.0.0-rc.2 → 2.0.0-rc.3
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',
|
|
@@ -13476,7 +13615,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13476
13615
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
13477
13616
|
type: "link",
|
|
13478
13617
|
onClick: handleChangeGoods
|
|
13479
|
-
},
|
|
13618
|
+
}, getButtonText(type)), otherOperations), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13480
13619
|
columns: newColumns,
|
|
13481
13620
|
dataSource: value,
|
|
13482
13621
|
rowKey: 'uuid',
|
|
@@ -14201,6 +14340,53 @@ var bsE3Utils = {
|
|
|
14201
14340
|
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
14202
14341
|
};
|
|
14203
14342
|
|
|
14343
|
+
var singletonMap$2 = new Map();
|
|
14344
|
+
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
14345
|
+
if (!singletonMap$2.has(orderNo)) {
|
|
14346
|
+
var p = new Promise(function (resolve, reject) {
|
|
14347
|
+
var doReject = function doReject(err) {
|
|
14348
|
+
// 清空掉错误的请求记录
|
|
14349
|
+
singletonMap$2.delete(orderNo);
|
|
14350
|
+
reject(err);
|
|
14351
|
+
};
|
|
14352
|
+
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
14353
|
+
method: 'post',
|
|
14354
|
+
data: {
|
|
14355
|
+
tid: orderNo
|
|
14356
|
+
}
|
|
14357
|
+
}).then(function (data) {
|
|
14358
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14359
|
+
var _data$data, _data$data$orderDetai;
|
|
14360
|
+
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) {
|
|
14361
|
+
var list = filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
14362
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14363
|
+
billNo: item.sid,
|
|
14364
|
+
sysStatus: item.sysStatus,
|
|
14365
|
+
billType: item.type,
|
|
14366
|
+
billTag: item.tags
|
|
14367
|
+
});
|
|
14368
|
+
});
|
|
14369
|
+
resolve(list);
|
|
14370
|
+
} else {
|
|
14371
|
+
resolve([]);
|
|
14372
|
+
}
|
|
14373
|
+
// 延迟10秒清除,保证订单的时效性
|
|
14374
|
+
setTimeout(function () {
|
|
14375
|
+
singletonMap$2.delete(orderNo);
|
|
14376
|
+
}, 1000 * 10);
|
|
14377
|
+
} else {
|
|
14378
|
+
doReject(data);
|
|
14379
|
+
}
|
|
14380
|
+
}).catch(doReject);
|
|
14381
|
+
});
|
|
14382
|
+
singletonMap$2.set(orderNo, p);
|
|
14383
|
+
}
|
|
14384
|
+
return singletonMap$2.get(orderNo);
|
|
14385
|
+
};
|
|
14386
|
+
var kmUtils = {
|
|
14387
|
+
getOrderListSingleton: getOrderListSingleton
|
|
14388
|
+
};
|
|
14389
|
+
|
|
14204
14390
|
var columnsMap = {
|
|
14205
14391
|
BS_SYSTEM_ORDER: [{
|
|
14206
14392
|
title: '单据类型',
|
|
@@ -14230,6 +14416,7 @@ var columnsMap = {
|
|
|
14230
14416
|
// },
|
|
14231
14417
|
],
|
|
14232
14418
|
|
|
14419
|
+
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
14233
14420
|
WLN_SYSTEM_ORDER: [{
|
|
14234
14421
|
title: '订单类型',
|
|
14235
14422
|
dataIndex: 'billType',
|
|
@@ -14326,6 +14513,7 @@ var columnsMap = {
|
|
|
14326
14513
|
};
|
|
14327
14514
|
var rowKeyMap = {
|
|
14328
14515
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14516
|
+
KM_SYSTEM_ORDER: 'billNo',
|
|
14329
14517
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14330
14518
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14331
14519
|
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
@@ -14342,6 +14530,8 @@ var index$1 = (function (props) {
|
|
|
14342
14530
|
onceRef.current = true;
|
|
14343
14531
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
14344
14532
|
getOrderList(value.orderNo);
|
|
14533
|
+
} else if (type === 'KM_SYSTEM_ORDER') {
|
|
14534
|
+
getKmOrderList(value.orderNo);
|
|
14345
14535
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
14346
14536
|
getWlnOrderList(value.orderNo);
|
|
14347
14537
|
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
@@ -14503,6 +14693,37 @@ var index$1 = (function (props) {
|
|
|
14503
14693
|
return _ref5.apply(this, arguments);
|
|
14504
14694
|
};
|
|
14505
14695
|
}();
|
|
14696
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
14697
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
14698
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
14699
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
14700
|
+
case 0:
|
|
14701
|
+
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
14702
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14703
|
+
orders: trades,
|
|
14704
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
14705
|
+
var billNo = _ref7.billNo,
|
|
14706
|
+
billType = _ref7.billType,
|
|
14707
|
+
billTag = _ref7.billTag;
|
|
14708
|
+
return {
|
|
14709
|
+
billNo: billNo,
|
|
14710
|
+
billType: billType,
|
|
14711
|
+
billTag: billTag
|
|
14712
|
+
};
|
|
14713
|
+
})
|
|
14714
|
+
}));
|
|
14715
|
+
});
|
|
14716
|
+
onceRef.current = false;
|
|
14717
|
+
case 2:
|
|
14718
|
+
case "end":
|
|
14719
|
+
return _context5.stop();
|
|
14720
|
+
}
|
|
14721
|
+
}, _callee5);
|
|
14722
|
+
}));
|
|
14723
|
+
return function getKmOrderList(_x5) {
|
|
14724
|
+
return _ref6.apply(this, arguments);
|
|
14725
|
+
};
|
|
14726
|
+
}();
|
|
14506
14727
|
var rowSelection = {
|
|
14507
14728
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14508
14729
|
fixed: true,
|
|
@@ -15073,7 +15294,7 @@ var typeMap$1 = {
|
|
|
15073
15294
|
}
|
|
15074
15295
|
};
|
|
15075
15296
|
var wdtReissue = function wdtReissue(props) {
|
|
15076
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
15297
|
+
var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
15077
15298
|
var value = props.value,
|
|
15078
15299
|
onChange = props.onChange,
|
|
15079
15300
|
_props$reasonList = props.reasonList,
|
|
@@ -15233,11 +15454,26 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15233
15454
|
}
|
|
15234
15455
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15235
15456
|
};
|
|
15457
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
15458
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
15459
|
+
var newValue = _objectSpread2({}, value);
|
|
15460
|
+
// 原订单商品
|
|
15461
|
+
var originTradeGoodList = getGoodDetails({
|
|
15462
|
+
mode: isStrict
|
|
15463
|
+
}) || [];
|
|
15464
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
15465
|
+
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)]) || [];
|
|
15466
|
+
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) {
|
|
15467
|
+
return skuList.includes(item.uuid);
|
|
15468
|
+
});
|
|
15469
|
+
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)]);
|
|
15470
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15471
|
+
}, [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
15472
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15237
15473
|
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$
|
|
15474
|
+
var _typeMap$type27;
|
|
15475
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
15476
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
15241
15477
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
15242
15478
|
gutter: 8,
|
|
15243
15479
|
wrap: true
|
|
@@ -15255,12 +15491,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15255
15491
|
},
|
|
15256
15492
|
disabled: disabled,
|
|
15257
15493
|
allowClear: false,
|
|
15258
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15494
|
+
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
15495
|
onChange: function onChange(val) {
|
|
15260
15496
|
return changeSystemOrderHandle(val);
|
|
15261
15497
|
},
|
|
15262
15498
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15263
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15499
|
+
}, ((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
15500
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
15265
15501
|
key: item.billNo,
|
|
15266
15502
|
value: item.billNo,
|
|
@@ -15281,7 +15517,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15281
15517
|
disabled: disabled,
|
|
15282
15518
|
allowClear: false,
|
|
15283
15519
|
options: reasonList,
|
|
15284
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15520
|
+
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
15521
|
onChange: function onChange(val) {
|
|
15286
15522
|
return changeTypeHandle(val);
|
|
15287
15523
|
}
|
|
@@ -15293,13 +15529,19 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15293
15529
|
canUpdateNumber: showChangeBtn,
|
|
15294
15530
|
showChangeBtn: showChangeBtn,
|
|
15295
15531
|
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$
|
|
15532
|
+
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
15533
|
onChange: function onChange(val) {
|
|
15298
15534
|
return changeGoodHandle(val);
|
|
15299
15535
|
},
|
|
15300
15536
|
onModeChange: handleModeChange,
|
|
15301
15537
|
showModeBtn: showModeBtn,
|
|
15302
|
-
isStrict: isStrict
|
|
15538
|
+
isStrict: isStrict,
|
|
15539
|
+
tradeGoods: {
|
|
15540
|
+
originDataSource: getGoodDetails({
|
|
15541
|
+
mode: isStrict
|
|
15542
|
+
}),
|
|
15543
|
+
selectedGoodsChange: selectedGoodsChange
|
|
15544
|
+
}
|
|
15303
15545
|
})));
|
|
15304
15546
|
};
|
|
15305
15547
|
|
|
@@ -16084,7 +16326,7 @@ var typeMap$2 = {
|
|
|
16084
16326
|
}
|
|
16085
16327
|
};
|
|
16086
16328
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16087
|
-
var _typeMap$type21, _typeMap$
|
|
16329
|
+
var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
|
|
16088
16330
|
var value = props.value,
|
|
16089
16331
|
onChange = props.onChange,
|
|
16090
16332
|
_props$reasonList = props.reasonList,
|
|
@@ -16222,15 +16464,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16222
16464
|
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
16465
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
16224
16466
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
16225
|
-
var _typeMap$type22,
|
|
16467
|
+
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
16226
16468
|
var newValue = _objectSpread2({}, value);
|
|
16227
|
-
|
|
16469
|
+
// 原订单商品
|
|
16470
|
+
var originTradeGoodList = getGoodDetails({
|
|
16228
16471
|
mode: isStrict
|
|
16229
|
-
})
|
|
16230
|
-
|
|
16472
|
+
}) || [];
|
|
16473
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
16474
|
+
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)]) || [];
|
|
16475
|
+
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) {
|
|
16476
|
+
return skuList.includes(item.uuid);
|
|
16231
16477
|
});
|
|
16232
16478
|
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$
|
|
16479
|
+
}, [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
16480
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
16235
16481
|
gutter: 8,
|
|
16236
16482
|
wrap: true,
|
|
@@ -16249,12 +16495,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16249
16495
|
},
|
|
16250
16496
|
disabled: disabled,
|
|
16251
16497
|
allowClear: false,
|
|
16252
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16498
|
+
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
16499
|
onChange: function onChange(val) {
|
|
16254
16500
|
return changeSystemOrderHandle(val);
|
|
16255
16501
|
},
|
|
16256
16502
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16257
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
16503
|
+
}, ((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
16504
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
16259
16505
|
key: item.billNo,
|
|
16260
16506
|
value: item.billNo,
|
|
@@ -16275,7 +16521,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16275
16521
|
disabled: disabled,
|
|
16276
16522
|
allowClear: false,
|
|
16277
16523
|
options: reasonList,
|
|
16278
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16524
|
+
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
16525
|
onChange: function onChange(val) {
|
|
16280
16526
|
return changeTypeHandle(val);
|
|
16281
16527
|
}
|
|
@@ -16287,7 +16533,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16287
16533
|
canUpdateNumber: showChangeBtn,
|
|
16288
16534
|
showChangeBtn: showChangeBtn,
|
|
16289
16535
|
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$
|
|
16536
|
+
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
16537
|
onChange: function onChange(val) {
|
|
16292
16538
|
return changeGoodHandle(val);
|
|
16293
16539
|
},
|
package/dist/index.js
CHANGED
|
@@ -933,11 +933,12 @@ var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap
|
|
|
933
933
|
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"};
|
|
934
934
|
styleInject(css_248z$1);
|
|
935
935
|
|
|
936
|
-
var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
|
|
936
|
+
var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl", "platform"];
|
|
937
937
|
var fn$1 = function fn() {
|
|
938
938
|
return void 0;
|
|
939
939
|
};
|
|
940
940
|
var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
941
|
+
var _document;
|
|
941
942
|
var _ref$maxCount = _ref.maxCount,
|
|
942
943
|
maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
|
|
943
944
|
_ref$maxSize = _ref.maxSize,
|
|
@@ -958,6 +959,8 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
958
959
|
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
959
960
|
_ref$actionUrl = _ref.actionUrl,
|
|
960
961
|
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
962
|
+
_ref$platform = _ref.platform,
|
|
963
|
+
platform = _ref$platform === void 0 ? '' : _ref$platform,
|
|
961
964
|
resetProps = _objectWithoutProperties(_ref, _excluded$6);
|
|
962
965
|
var inputRef = React.useRef(null);
|
|
963
966
|
var valueRef = React.useRef(value);
|
|
@@ -969,6 +972,9 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
969
972
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
970
973
|
pasteDefaultStates = _useState4[0],
|
|
971
974
|
setPasteDefaultStates = _useState4[1];
|
|
975
|
+
var preview = platform === 'ks' ? {
|
|
976
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
|
|
977
|
+
} : true;
|
|
972
978
|
React.useEffect(function () {
|
|
973
979
|
valueRef.current = value;
|
|
974
980
|
}, [value]);
|
|
@@ -1100,7 +1106,9 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
1100
1106
|
};
|
|
1101
1107
|
};
|
|
1102
1108
|
var renderImages = function renderImages(images) {
|
|
1103
|
-
return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup,
|
|
1109
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, {
|
|
1110
|
+
preview: preview
|
|
1111
|
+
}, images.map(function (image, index) {
|
|
1104
1112
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
|
|
1105
1113
|
var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
|
|
1106
1114
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -10960,12 +10968,18 @@ var jstGoods = function jstGoods(props) {
|
|
|
10960
10968
|
changeIndex = _useState2[0],
|
|
10961
10969
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
10962
10970
|
var sendOptions = kmkfUtils.SendDataCenter.getInstance(platformType).getSendData();
|
|
10971
|
+
var isSelectName = ['wdt', 'bsE3', 'km'].includes(platformType);
|
|
10963
10972
|
React.useEffect(function () {
|
|
10964
10973
|
//没有值塞个默认值
|
|
10965
10974
|
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10966
10975
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10967
10976
|
}
|
|
10968
10977
|
}, [value, type]);
|
|
10978
|
+
React.useEffect(function () {
|
|
10979
|
+
if (changeIndex > (value === null || value === void 0 ? void 0 : value.length) - 1) {
|
|
10980
|
+
setChangeIndex(0);
|
|
10981
|
+
}
|
|
10982
|
+
}, value);
|
|
10969
10983
|
var content = function content(item, index) {
|
|
10970
10984
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10971
10985
|
style: {
|
|
@@ -10976,7 +10990,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10976
10990
|
style: {
|
|
10977
10991
|
textAlign: 'center'
|
|
10978
10992
|
}
|
|
10979
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10993
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React__default['default'].createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
10980
10994
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
10981
10995
|
key: index
|
|
10982
10996
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
@@ -10990,7 +11004,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10990
11004
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10991
11005
|
changeOrderInfo[type] = val;
|
|
10992
11006
|
changeOrderInfo['sendId'] = option.value;
|
|
10993
|
-
if (
|
|
11007
|
+
if (isSelectName && type === 'sendName') {
|
|
10994
11008
|
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10995
11009
|
}
|
|
10996
11010
|
var newList = _toConsumableArray(value);
|
|
@@ -11073,7 +11087,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11073
11087
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11074
11088
|
},
|
|
11075
11089
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.sendId
|
|
11076
|
-
}), ['sendName', 'all'].includes(showField) && (
|
|
11090
|
+
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11077
11091
|
style: {
|
|
11078
11092
|
minWidth: '100px',
|
|
11079
11093
|
maxWidth: '180px'
|
|
@@ -12579,6 +12593,104 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
12579
12593
|
});
|
|
12580
12594
|
};
|
|
12581
12595
|
|
|
12596
|
+
var renderGiftType = function renderGiftType(val) {
|
|
12597
|
+
var giftTypeMap = {
|
|
12598
|
+
0: '非赠品',
|
|
12599
|
+
1: '自动赠送',
|
|
12600
|
+
2: '手工赠送',
|
|
12601
|
+
3: '回购自动送赠品',
|
|
12602
|
+
4: '前N有礼送赠品',
|
|
12603
|
+
6: '天猫优仓赠品',
|
|
12604
|
+
7: '淘宝CRM会员送赠'
|
|
12605
|
+
};
|
|
12606
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12607
|
+
};
|
|
12608
|
+
var columns$4 = [{
|
|
12609
|
+
dataIndex: 'goodId',
|
|
12610
|
+
title: "\u5546\u54C1ID",
|
|
12611
|
+
width: 120
|
|
12612
|
+
}, {
|
|
12613
|
+
dataIndex: 'goodNo',
|
|
12614
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
12615
|
+
width: 200
|
|
12616
|
+
}, {
|
|
12617
|
+
dataIndex: 'goodName',
|
|
12618
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12619
|
+
width: 200
|
|
12620
|
+
}, {
|
|
12621
|
+
dataIndex: 'specId',
|
|
12622
|
+
title: "SKUID",
|
|
12623
|
+
width: 150
|
|
12624
|
+
}, {
|
|
12625
|
+
dataIndex: 'specNo',
|
|
12626
|
+
title: "\u5546\u54C1SKU\u7F16\u7801",
|
|
12627
|
+
width: 200
|
|
12628
|
+
}, {
|
|
12629
|
+
dataIndex: 'specName',
|
|
12630
|
+
title: "\u5546\u54C1SKU\u540D\u79F0",
|
|
12631
|
+
width: 250
|
|
12632
|
+
}, {
|
|
12633
|
+
dataIndex: 'orderPrice',
|
|
12634
|
+
title: "\u5B9E\u4ED8\u603B\u91D1\u989D",
|
|
12635
|
+
width: 200
|
|
12636
|
+
}, {
|
|
12637
|
+
dataIndex: 'num',
|
|
12638
|
+
title: "\u6570\u91CF",
|
|
12639
|
+
width: 100
|
|
12640
|
+
}, {
|
|
12641
|
+
dataIndex: 'sharePrice',
|
|
12642
|
+
title: "\u5206\u644A\u4EF7",
|
|
12643
|
+
width: 150
|
|
12644
|
+
}, {
|
|
12645
|
+
dataIndex: 'giftType',
|
|
12646
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12647
|
+
width: 100,
|
|
12648
|
+
render: renderGiftType
|
|
12649
|
+
}];
|
|
12650
|
+
var renderFieldMap$1 = {
|
|
12651
|
+
num: function num(_ref) {
|
|
12652
|
+
var disabled = _ref.disabled,
|
|
12653
|
+
updateHandle = _ref.updateHandle;
|
|
12654
|
+
return function (val, record, index) {
|
|
12655
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12656
|
+
style: {
|
|
12657
|
+
width: 70
|
|
12658
|
+
},
|
|
12659
|
+
value: val,
|
|
12660
|
+
min: 1,
|
|
12661
|
+
precision: 0,
|
|
12662
|
+
onChange: function onChange(num) {
|
|
12663
|
+
return updateHandle(num, index, 'num');
|
|
12664
|
+
}
|
|
12665
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12666
|
+
};
|
|
12667
|
+
},
|
|
12668
|
+
giftType: function giftType() {
|
|
12669
|
+
return renderGiftType;
|
|
12670
|
+
}
|
|
12671
|
+
};
|
|
12672
|
+
var getWdtReissueGoodColumns = function getWdtReissueGoodColumns(_ref2) {
|
|
12673
|
+
var disabled = _ref2.disabled,
|
|
12674
|
+
updateHandle = _ref2.updateHandle,
|
|
12675
|
+
operate = _ref2.operate;
|
|
12676
|
+
return columns$4.map(function (item) {
|
|
12677
|
+
var newItem = _objectSpread2({
|
|
12678
|
+
align: 'center',
|
|
12679
|
+
ellipsis: true
|
|
12680
|
+
}, item);
|
|
12681
|
+
if (operate && (renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex])) {
|
|
12682
|
+
return _objectSpread2(_objectSpread2({}, newItem), {}, {
|
|
12683
|
+
render: renderFieldMap$1 === null || renderFieldMap$1 === void 0 ? void 0 : renderFieldMap$1[item.dataIndex]({
|
|
12684
|
+
disabled: disabled,
|
|
12685
|
+
updateHandle: updateHandle
|
|
12686
|
+
})
|
|
12687
|
+
});
|
|
12688
|
+
}
|
|
12689
|
+
return newItem;
|
|
12690
|
+
});
|
|
12691
|
+
};
|
|
12692
|
+
|
|
12693
|
+
var MAIN_FIELD = 'uuid';
|
|
12582
12694
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
12583
12695
|
var columns = _ref.columns,
|
|
12584
12696
|
dataSource = _ref.dataSource,
|
|
@@ -12594,11 +12706,20 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12594
12706
|
var closeModal = function closeModal() {
|
|
12595
12707
|
return setTradeGoodsVisible(false);
|
|
12596
12708
|
};
|
|
12709
|
+
var currentTradeOriginGoods = lodash.intersection(dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
12710
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
12711
|
+
}), selectedRowKeys);
|
|
12712
|
+
var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
12713
|
+
return item === null || item === void 0 ? void 0 : item[MAIN_FIELD];
|
|
12714
|
+
}));
|
|
12715
|
+
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
12716
|
+
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
12717
|
+
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
12718
|
+
};
|
|
12597
12719
|
var rowSelection = {
|
|
12598
12720
|
selectedRowKeys: selectedRowKeys,
|
|
12599
|
-
onChange:
|
|
12721
|
+
onChange: handleChangeSelectedKeys
|
|
12600
12722
|
};
|
|
12601
|
-
console.debug('选择订单商品-dataSource', dataSource, selectedRowKeys);
|
|
12602
12723
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12603
12724
|
type: "link",
|
|
12604
12725
|
onClick: openModal
|
|
@@ -12608,7 +12729,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12608
12729
|
footer: null,
|
|
12609
12730
|
onCancel: closeModal
|
|
12610
12731
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12611
|
-
rowKey:
|
|
12732
|
+
rowKey: MAIN_FIELD,
|
|
12612
12733
|
rowSelection: rowSelection,
|
|
12613
12734
|
columns: columns,
|
|
12614
12735
|
dataSource: dataSource,
|
|
@@ -12617,7 +12738,17 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
12617
12738
|
x: 500,
|
|
12618
12739
|
y: 500
|
|
12619
12740
|
}
|
|
12620
|
-
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(",
|
|
12741
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, ")")));
|
|
12742
|
+
};
|
|
12743
|
+
var getButtonText = function getButtonText() {
|
|
12744
|
+
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12745
|
+
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
12746
|
+
return '选择百胜ERP商品';
|
|
12747
|
+
}
|
|
12748
|
+
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
12749
|
+
return '选择旺店通商品';
|
|
12750
|
+
}
|
|
12751
|
+
return '选择商品';
|
|
12621
12752
|
};
|
|
12622
12753
|
var GoodItem$1 = function GoodItem(props) {
|
|
12623
12754
|
var _props$value = props.value,
|
|
@@ -12674,7 +12805,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12674
12805
|
// TODO: 商品订单中以选中商品
|
|
12675
12806
|
var selectedGoods = React.useMemo(function () {
|
|
12676
12807
|
return value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
12677
|
-
return v
|
|
12808
|
+
return v === null || v === void 0 ? void 0 : v[MAIN_FIELD];
|
|
12678
12809
|
});
|
|
12679
12810
|
}, [value]);
|
|
12680
12811
|
var updateHandle = function updateHandle(val, index, columnType) {
|
|
@@ -12715,6 +12846,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12715
12846
|
var columns = [];
|
|
12716
12847
|
switch (type) {
|
|
12717
12848
|
case 'WDT_REISSUE_GOODS':
|
|
12849
|
+
{
|
|
12850
|
+
columns = getWdtReissueGoodColumns({
|
|
12851
|
+
disabled: disabled,
|
|
12852
|
+
updateHandle: updateHandle,
|
|
12853
|
+
operate: operate
|
|
12854
|
+
});
|
|
12855
|
+
}
|
|
12856
|
+
break;
|
|
12718
12857
|
case 'WDT_GOODS':
|
|
12719
12858
|
columns = [{
|
|
12720
12859
|
dataIndex: 'goodId',
|
|
@@ -13488,7 +13627,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
13488
13627
|
}), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13489
13628
|
type: "link",
|
|
13490
13629
|
onClick: handleChangeGoods
|
|
13491
|
-
},
|
|
13630
|
+
}, getButtonText(type)), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
13492
13631
|
columns: newColumns,
|
|
13493
13632
|
dataSource: value,
|
|
13494
13633
|
rowKey: 'uuid',
|
|
@@ -14213,6 +14352,53 @@ var bsE3Utils = {
|
|
|
14213
14352
|
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
14214
14353
|
};
|
|
14215
14354
|
|
|
14355
|
+
var singletonMap$2 = new Map();
|
|
14356
|
+
var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
14357
|
+
if (!singletonMap$2.has(orderNo)) {
|
|
14358
|
+
var p = new Promise(function (resolve, reject) {
|
|
14359
|
+
var doReject = function doReject(err) {
|
|
14360
|
+
// 清空掉错误的请求记录
|
|
14361
|
+
singletonMap$2.delete(orderNo);
|
|
14362
|
+
reject(err);
|
|
14363
|
+
};
|
|
14364
|
+
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
14365
|
+
method: 'post',
|
|
14366
|
+
data: {
|
|
14367
|
+
tid: orderNo
|
|
14368
|
+
}
|
|
14369
|
+
}).then(function (data) {
|
|
14370
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14371
|
+
var _data$data, _data$data$orderDetai;
|
|
14372
|
+
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) {
|
|
14373
|
+
var list = kmkfUtils.filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
14374
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14375
|
+
billNo: item.sid,
|
|
14376
|
+
sysStatus: item.sysStatus,
|
|
14377
|
+
billType: item.type,
|
|
14378
|
+
billTag: item.tags
|
|
14379
|
+
});
|
|
14380
|
+
});
|
|
14381
|
+
resolve(list);
|
|
14382
|
+
} else {
|
|
14383
|
+
resolve([]);
|
|
14384
|
+
}
|
|
14385
|
+
// 延迟10秒清除,保证订单的时效性
|
|
14386
|
+
setTimeout(function () {
|
|
14387
|
+
singletonMap$2.delete(orderNo);
|
|
14388
|
+
}, 1000 * 10);
|
|
14389
|
+
} else {
|
|
14390
|
+
doReject(data);
|
|
14391
|
+
}
|
|
14392
|
+
}).catch(doReject);
|
|
14393
|
+
});
|
|
14394
|
+
singletonMap$2.set(orderNo, p);
|
|
14395
|
+
}
|
|
14396
|
+
return singletonMap$2.get(orderNo);
|
|
14397
|
+
};
|
|
14398
|
+
var kmUtils = {
|
|
14399
|
+
getOrderListSingleton: getOrderListSingleton
|
|
14400
|
+
};
|
|
14401
|
+
|
|
14216
14402
|
var columnsMap = {
|
|
14217
14403
|
BS_SYSTEM_ORDER: [{
|
|
14218
14404
|
title: '单据类型',
|
|
@@ -14242,6 +14428,7 @@ var columnsMap = {
|
|
|
14242
14428
|
// },
|
|
14243
14429
|
],
|
|
14244
14430
|
|
|
14431
|
+
KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
|
|
14245
14432
|
WLN_SYSTEM_ORDER: [{
|
|
14246
14433
|
title: '订单类型',
|
|
14247
14434
|
dataIndex: 'billType',
|
|
@@ -14338,6 +14525,7 @@ var columnsMap = {
|
|
|
14338
14525
|
};
|
|
14339
14526
|
var rowKeyMap = {
|
|
14340
14527
|
BS_SYSTEM_ORDER: 'billNo',
|
|
14528
|
+
KM_SYSTEM_ORDER: 'billNo',
|
|
14341
14529
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
14342
14530
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
14343
14531
|
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
@@ -14354,6 +14542,8 @@ var index$1 = (function (props) {
|
|
|
14354
14542
|
onceRef.current = true;
|
|
14355
14543
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
14356
14544
|
getOrderList(value.orderNo);
|
|
14545
|
+
} else if (type === 'KM_SYSTEM_ORDER') {
|
|
14546
|
+
getKmOrderList(value.orderNo);
|
|
14357
14547
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
14358
14548
|
getWlnOrderList(value.orderNo);
|
|
14359
14549
|
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
@@ -14515,6 +14705,37 @@ var index$1 = (function (props) {
|
|
|
14515
14705
|
return _ref5.apply(this, arguments);
|
|
14516
14706
|
};
|
|
14517
14707
|
}();
|
|
14708
|
+
var getKmOrderList = /*#__PURE__*/function () {
|
|
14709
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(orderNo) {
|
|
14710
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
14711
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
14712
|
+
case 0:
|
|
14713
|
+
kmUtils.getOrderListSingleton(orderNo).then(function (trades) {
|
|
14714
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14715
|
+
orders: trades,
|
|
14716
|
+
showOrderInfo: trades.map(function (_ref7) {
|
|
14717
|
+
var billNo = _ref7.billNo,
|
|
14718
|
+
billType = _ref7.billType,
|
|
14719
|
+
billTag = _ref7.billTag;
|
|
14720
|
+
return {
|
|
14721
|
+
billNo: billNo,
|
|
14722
|
+
billType: billType,
|
|
14723
|
+
billTag: billTag
|
|
14724
|
+
};
|
|
14725
|
+
})
|
|
14726
|
+
}));
|
|
14727
|
+
});
|
|
14728
|
+
onceRef.current = false;
|
|
14729
|
+
case 2:
|
|
14730
|
+
case "end":
|
|
14731
|
+
return _context5.stop();
|
|
14732
|
+
}
|
|
14733
|
+
}, _callee5);
|
|
14734
|
+
}));
|
|
14735
|
+
return function getKmOrderList(_x5) {
|
|
14736
|
+
return _ref6.apply(this, arguments);
|
|
14737
|
+
};
|
|
14738
|
+
}();
|
|
14518
14739
|
var rowSelection = {
|
|
14519
14740
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
14520
14741
|
fixed: true,
|
|
@@ -15085,7 +15306,7 @@ var typeMap$1 = {
|
|
|
15085
15306
|
}
|
|
15086
15307
|
};
|
|
15087
15308
|
var wdtReissue = function wdtReissue(props) {
|
|
15088
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
15309
|
+
var _value$wdtSystemOrder, _typeMap$type26, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
15089
15310
|
var value = props.value,
|
|
15090
15311
|
onChange = props.onChange,
|
|
15091
15312
|
_props$reasonList = props.reasonList,
|
|
@@ -15245,11 +15466,26 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15245
15466
|
}
|
|
15246
15467
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15247
15468
|
};
|
|
15469
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
15470
|
+
var _typeMap$type23, _typeMap$type24, _uniqBy, _typeMap$type25;
|
|
15471
|
+
var newValue = _objectSpread2({}, value);
|
|
15472
|
+
// 原订单商品
|
|
15473
|
+
var originTradeGoodList = getGoodDetails({
|
|
15474
|
+
mode: isStrict
|
|
15475
|
+
}) || [];
|
|
15476
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
15477
|
+
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)]) || [];
|
|
15478
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
15479
|
+
return skuList.includes(item.uuid);
|
|
15480
|
+
});
|
|
15481
|
+
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)]);
|
|
15482
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
15483
|
+
}, [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]);
|
|
15248
15484
|
//显示选择商品按钮 原单换不显示选择商品
|
|
15249
15485
|
var showChangeBtn = React.useMemo(function () {
|
|
15250
|
-
var _typeMap$
|
|
15251
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15252
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15486
|
+
var _typeMap$type27;
|
|
15487
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
15488
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
15253
15489
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
15254
15490
|
gutter: 8,
|
|
15255
15491
|
wrap: true
|
|
@@ -15267,12 +15503,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15267
15503
|
},
|
|
15268
15504
|
disabled: disabled,
|
|
15269
15505
|
allowClear: false,
|
|
15270
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15506
|
+
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)],
|
|
15271
15507
|
onChange: function onChange(val) {
|
|
15272
15508
|
return changeSystemOrderHandle(val);
|
|
15273
15509
|
},
|
|
15274
15510
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
15275
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
15511
|
+
}, ((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) {
|
|
15276
15512
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
15277
15513
|
key: item.billNo,
|
|
15278
15514
|
value: item.billNo,
|
|
@@ -15293,7 +15529,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15293
15529
|
disabled: disabled,
|
|
15294
15530
|
allowClear: false,
|
|
15295
15531
|
options: reasonList,
|
|
15296
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15532
|
+
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)],
|
|
15297
15533
|
onChange: function onChange(val) {
|
|
15298
15534
|
return changeTypeHandle(val);
|
|
15299
15535
|
}
|
|
@@ -15305,13 +15541,19 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
15305
15541
|
canUpdateNumber: showChangeBtn,
|
|
15306
15542
|
showChangeBtn: showChangeBtn,
|
|
15307
15543
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
15308
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15544
|
+
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)],
|
|
15309
15545
|
onChange: function onChange(val) {
|
|
15310
15546
|
return changeGoodHandle(val);
|
|
15311
15547
|
},
|
|
15312
15548
|
onModeChange: handleModeChange,
|
|
15313
15549
|
showModeBtn: showModeBtn,
|
|
15314
|
-
isStrict: isStrict
|
|
15550
|
+
isStrict: isStrict,
|
|
15551
|
+
tradeGoods: {
|
|
15552
|
+
originDataSource: getGoodDetails({
|
|
15553
|
+
mode: isStrict
|
|
15554
|
+
}),
|
|
15555
|
+
selectedGoodsChange: selectedGoodsChange
|
|
15556
|
+
}
|
|
15315
15557
|
})));
|
|
15316
15558
|
};
|
|
15317
15559
|
|
|
@@ -16096,7 +16338,7 @@ var typeMap$2 = {
|
|
|
16096
16338
|
}
|
|
16097
16339
|
};
|
|
16098
16340
|
var bsE3Reissue = function bsE3Reissue(props) {
|
|
16099
|
-
var _typeMap$type21, _typeMap$
|
|
16341
|
+
var _typeMap$type21, _typeMap$type24, _typeMap$type25, _value$typeMap$type$s5, _typeMap$type26, _typeMap$type27, _typeMap$type28;
|
|
16100
16342
|
var value = props.value,
|
|
16101
16343
|
onChange = props.onChange,
|
|
16102
16344
|
_props$reasonList = props.reasonList,
|
|
@@ -16234,15 +16476,19 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16234
16476
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo]);
|
|
16235
16477
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo]]);
|
|
16236
16478
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
16237
|
-
var _typeMap$type22,
|
|
16479
|
+
var _typeMap$type22, _typeMap$type23, _uniqBy;
|
|
16238
16480
|
var newValue = _objectSpread2({}, value);
|
|
16239
|
-
|
|
16481
|
+
// 原订单商品
|
|
16482
|
+
var originTradeGoodList = getGoodDetails({
|
|
16240
16483
|
mode: isStrict
|
|
16241
|
-
})
|
|
16242
|
-
|
|
16484
|
+
}) || [];
|
|
16485
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
16486
|
+
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)]) || [];
|
|
16487
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
16488
|
+
return skuList.includes(item.uuid);
|
|
16243
16489
|
});
|
|
16244
16490
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
16245
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16491
|
+
}, [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]);
|
|
16246
16492
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
16247
16493
|
gutter: 8,
|
|
16248
16494
|
wrap: true,
|
|
@@ -16261,12 +16507,12 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16261
16507
|
},
|
|
16262
16508
|
disabled: disabled,
|
|
16263
16509
|
allowClear: false,
|
|
16264
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16510
|
+
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)],
|
|
16265
16511
|
onChange: function onChange(val) {
|
|
16266
16512
|
return changeSystemOrderHandle(val);
|
|
16267
16513
|
},
|
|
16268
16514
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
16269
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
16515
|
+
}, ((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) {
|
|
16270
16516
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
16271
16517
|
key: item.billNo,
|
|
16272
16518
|
value: item.billNo,
|
|
@@ -16287,7 +16533,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16287
16533
|
disabled: disabled,
|
|
16288
16534
|
allowClear: false,
|
|
16289
16535
|
options: reasonList,
|
|
16290
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16536
|
+
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)],
|
|
16291
16537
|
onChange: function onChange(val) {
|
|
16292
16538
|
return changeTypeHandle(val);
|
|
16293
16539
|
}
|
|
@@ -16299,7 +16545,7 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
16299
16545
|
canUpdateNumber: showChangeBtn,
|
|
16300
16546
|
showChangeBtn: showChangeBtn,
|
|
16301
16547
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
16302
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
16548
|
+
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)],
|
|
16303
16549
|
onChange: function onChange(val) {
|
|
16304
16550
|
return changeGoodHandle(val);
|
|
16305
16551
|
},
|
|
@@ -12,6 +12,7 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
|
|
|
12
12
|
uniqueKey?: string;
|
|
13
13
|
hostUrl?: string;
|
|
14
14
|
actionUrl?: string;
|
|
15
|
+
platform?: string;
|
|
15
16
|
}
|
|
16
17
|
declare const _default: React.ForwardRefExoticComponent<ApaasUploadProps & React.RefAttributes<any>>;
|
|
17
18
|
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type P = {
|
|
3
|
+
disabled: boolean | undefined;
|
|
4
|
+
updateHandle: (v: any, index: number, key: string) => void;
|
|
5
|
+
operate?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const getWdtReissueGoodColumns: ({ disabled, updateHandle, operate }: P) => ({
|
|
8
|
+
dataIndex: string;
|
|
9
|
+
title: string;
|
|
10
|
+
width: number;
|
|
11
|
+
render?: undefined;
|
|
12
|
+
align: string;
|
|
13
|
+
ellipsis: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
render: ((val: number) => React.JSX.Element) | ((val: any, record: any, index: number) => React.JSX.Element);
|
|
16
|
+
dataIndex: string;
|
|
17
|
+
title: string;
|
|
18
|
+
width: number;
|
|
19
|
+
align: string;
|
|
20
|
+
ellipsis: boolean;
|
|
21
|
+
})[];
|
|
22
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.0-rc.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.0-rc.3",
|
|
24
24
|
"ahooks": "^3.7.4",
|
|
25
25
|
"bignumber.js": "^9.1.2",
|
|
26
26
|
"kmkf-monitor": "^0.8.9",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "b94db5dd823b45bf56147451e12c1ab94b1277f7"
|
|
69
69
|
}
|