@kmkf-fe-packages/basic-components 2.0.26 → 2.0.27
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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
2
|
-
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination } from 'antd';
|
|
2
|
+
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography } from 'antd';
|
|
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, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
7
|
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, takeRight, reject, isEmpty, intersection, uniqBy } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
@@ -10235,6 +10235,7 @@ var Item = Form.Item;
|
|
|
10235
10235
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
10236
10236
|
var _value$interceptLogis2, _value$interceptLogis3, _value$interceptLogis4;
|
|
10237
10237
|
var LogisticsAddress = LogisticsAddressData.getInstance();
|
|
10238
|
+
var LogisticsAddressOptions = (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
|
|
10238
10239
|
var address = AddressData.getInstance();
|
|
10239
10240
|
var _props$value = props.value,
|
|
10240
10241
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -10246,7 +10247,10 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10246
10247
|
_props$disabled = props.disabled,
|
|
10247
10248
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
10248
10249
|
_props$isEditing = props.isEditing,
|
|
10249
|
-
isEditing = _props$isEditing === void 0 ? false : _props$isEditing
|
|
10250
|
+
isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
|
|
10251
|
+
_props$platform = props.platform,
|
|
10252
|
+
platform = _props$platform === void 0 ? '' : _props$platform,
|
|
10253
|
+
onJumpPage = props.onJumpPage;
|
|
10250
10254
|
var _useState = useState(''),
|
|
10251
10255
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10252
10256
|
initCompany = _useState2[0],
|
|
@@ -10334,6 +10338,14 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10334
10338
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
|
|
10335
10339
|
})) === null || _find3 === void 0 ? void 0 : (_find3$config = _find3.config) === null || _find3$config === void 0 ? void 0 : _find3$config.showSenderMobile;
|
|
10336
10340
|
}, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10341
|
+
var showKcode = useMemo(function () {
|
|
10342
|
+
var isShow = false;
|
|
10343
|
+
if (value === null || value === void 0 ? void 0 : value.interceptCompany) {
|
|
10344
|
+
var _value$interceptCompa;
|
|
10345
|
+
isShow = (value === null || value === void 0 ? void 0 : (_value$interceptCompa = value.interceptCompany) === null || _value$interceptCompa === void 0 ? void 0 : _value$interceptCompa.indexOf('YTO')) > -1;
|
|
10346
|
+
}
|
|
10347
|
+
return isShow;
|
|
10348
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10337
10349
|
//判断是否能修改物流信息
|
|
10338
10350
|
var isEdit = useMemo(function () {
|
|
10339
10351
|
var company = expressInterceptData.find(function (item) {
|
|
@@ -10343,10 +10355,21 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10343
10355
|
}, [isEditing, initCompany]);
|
|
10344
10356
|
//退回地址列表
|
|
10345
10357
|
var logisticsAddressOptions = useMemo(function () {
|
|
10346
|
-
return
|
|
10358
|
+
return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10347
10359
|
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
10348
10360
|
});
|
|
10349
10361
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10362
|
+
// K码列表
|
|
10363
|
+
var kCodeList = useMemo(function () {
|
|
10364
|
+
return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10365
|
+
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
|
|
10366
|
+
}).map(function (item) {
|
|
10367
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
10368
|
+
value: item === null || item === void 0 ? void 0 : item.userKCode,
|
|
10369
|
+
label: item === null || item === void 0 ? void 0 : item.userKCode
|
|
10370
|
+
});
|
|
10371
|
+
});
|
|
10372
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10350
10373
|
var returnValue = useMemo(function () {
|
|
10351
10374
|
var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
|
|
10352
10375
|
var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
|
|
@@ -10371,6 +10394,27 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10371
10394
|
var _item$config4;
|
|
10372
10395
|
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
10373
10396
|
});
|
|
10397
|
+
// const demoList = [
|
|
10398
|
+
// {
|
|
10399
|
+
// city: 330100,
|
|
10400
|
+
// cpCode: 'YTO',
|
|
10401
|
+
// detail: '光云大厦',
|
|
10402
|
+
// district: 330108,
|
|
10403
|
+
// mobile: '18858820420',
|
|
10404
|
+
// province: 330000,
|
|
10405
|
+
// sendGoodName: '测试编码仓',
|
|
10406
|
+
// senderMobile: '',
|
|
10407
|
+
// senderMobilePhoneList: [],
|
|
10408
|
+
// uk: '8Y2FjwQHdw',
|
|
10409
|
+
// update: 1735887721299,
|
|
10410
|
+
// userName: '南月 光云大厦',
|
|
10411
|
+
// userKCode: 'K12345678',
|
|
10412
|
+
// userSecretKey: '12345678',
|
|
10413
|
+
// },
|
|
10414
|
+
// ];
|
|
10415
|
+
var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10416
|
+
return item.cpCode === val && item.userKCode;
|
|
10417
|
+
});
|
|
10374
10418
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
10375
10419
|
interceptCompany: val,
|
|
10376
10420
|
interceptType: _returnValue === null || _returnValue === void 0 ? void 0 : _returnValue.value,
|
|
@@ -10386,7 +10430,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10386
10430
|
interceptLogisticsApiStatus: {
|
|
10387
10431
|
status: '',
|
|
10388
10432
|
reason: ''
|
|
10389
|
-
}
|
|
10433
|
+
},
|
|
10434
|
+
interceptLogisticsUserKCode: undefined,
|
|
10435
|
+
interceptLogisticsUserSecretKey: undefined
|
|
10390
10436
|
});
|
|
10391
10437
|
}
|
|
10392
10438
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -10398,6 +10444,17 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10398
10444
|
}
|
|
10399
10445
|
});
|
|
10400
10446
|
}
|
|
10447
|
+
if (type === 'interceptLogisticsUserKCode') {
|
|
10448
|
+
var kCodeItem = kCodeList === null || kCodeList === void 0 ? void 0 : kCodeList.find(function (item) {
|
|
10449
|
+
return item.value === val;
|
|
10450
|
+
});
|
|
10451
|
+
if (kCodeItem) {
|
|
10452
|
+
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
10453
|
+
interceptLogisticsUserSecretKey: kCodeItem === null || kCodeItem === void 0 ? void 0 : kCodeItem.userSecretKey
|
|
10454
|
+
});
|
|
10455
|
+
}
|
|
10456
|
+
}
|
|
10457
|
+
console.log('newValue', newValue);
|
|
10401
10458
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10402
10459
|
};
|
|
10403
10460
|
//智能识别回调
|
|
@@ -10450,6 +10507,46 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10450
10507
|
return changeHandle(e.target.value, 'interceptCode');
|
|
10451
10508
|
},
|
|
10452
10509
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
10510
|
+
}))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
|
|
10511
|
+
label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
|
|
10512
|
+
style: {
|
|
10513
|
+
cursor: 'pointer'
|
|
10514
|
+
},
|
|
10515
|
+
onClick: function onClick() {
|
|
10516
|
+
return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
|
|
10517
|
+
type: 'interceptConfig'
|
|
10518
|
+
}));
|
|
10519
|
+
}
|
|
10520
|
+
}, 'k码配置>>') : null),
|
|
10521
|
+
key: 'interceptLogisticsUserKCode',
|
|
10522
|
+
hidden: !showKcode
|
|
10523
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
10524
|
+
disabled: disabled || isEdit,
|
|
10525
|
+
placeholder: "\u9009\u62E9K\u7801",
|
|
10526
|
+
showSearch: true,
|
|
10527
|
+
style: {
|
|
10528
|
+
width: '200px'
|
|
10529
|
+
},
|
|
10530
|
+
onChange: function onChange(val) {
|
|
10531
|
+
return changeHandle(val, 'interceptLogisticsUserKCode');
|
|
10532
|
+
},
|
|
10533
|
+
options: kCodeList,
|
|
10534
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserKCode,
|
|
10535
|
+
filterOption: function filterOption(input, option) {
|
|
10536
|
+
return option.label.includes(input);
|
|
10537
|
+
}
|
|
10538
|
+
})), /*#__PURE__*/React.createElement(Item, {
|
|
10539
|
+
key: 'interceptLogisticsUserSecretKey',
|
|
10540
|
+
hidden: !showKcode,
|
|
10541
|
+
noStyle: true
|
|
10542
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
10543
|
+
style: {
|
|
10544
|
+
width: platform === 'pc' ? 200 : 150,
|
|
10545
|
+
marginTop: '6px'
|
|
10546
|
+
},
|
|
10547
|
+
placeholder: "\u5BA2\u6237\u5BC6\u94A5",
|
|
10548
|
+
disabled: true,
|
|
10549
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
|
|
10453
10550
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
10454
10551
|
label: '拦截类型',
|
|
10455
10552
|
required: required,
|
|
@@ -10594,7 +10691,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10594
10691
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10595
10692
|
disabled = props.disabled,
|
|
10596
10693
|
onChange = props.onChange,
|
|
10597
|
-
isEditing = props.isEditing
|
|
10694
|
+
isEditing = props.isEditing,
|
|
10695
|
+
effects = props.effects;
|
|
10598
10696
|
var _useState = useState(0),
|
|
10599
10697
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10600
10698
|
changeIndex = _useState2[0],
|
|
@@ -10636,6 +10734,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10636
10734
|
value: item,
|
|
10637
10735
|
disabled: disabled,
|
|
10638
10736
|
isEditing: false,
|
|
10737
|
+
platform: effects === null || effects === void 0 ? void 0 : effects.env,
|
|
10738
|
+
onJumpPage: effects === null || effects === void 0 ? void 0 : effects.onJumpPage,
|
|
10639
10739
|
onChange: function onChange(val) {
|
|
10640
10740
|
return handleChange(val, index);
|
|
10641
10741
|
}
|
|
@@ -15191,6 +15291,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15191
15291
|
showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
|
|
15192
15292
|
_props$showModeBtn = props.showModeBtn,
|
|
15193
15293
|
showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
|
|
15294
|
+
_props$alwaysShowChoo = props.alwaysShowChooseErpGoodsBtn,
|
|
15295
|
+
alwaysShowChooseErpGoodsBtn = _props$alwaysShowChoo === void 0 ? false : _props$alwaysShowChoo,
|
|
15194
15296
|
_props$isStrict = props.isStrict,
|
|
15195
15297
|
isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
|
|
15196
15298
|
_props$tableSelect = props.tableSelect,
|
|
@@ -15274,7 +15376,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15274
15376
|
};
|
|
15275
15377
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15276
15378
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15277
|
-
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
15379
|
+
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
15380
|
+
operate: true
|
|
15381
|
+
};
|
|
15278
15382
|
return function (type) {
|
|
15279
15383
|
var columns = [];
|
|
15280
15384
|
switch (type) {
|
|
@@ -15542,7 +15646,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15542
15646
|
return params;
|
|
15543
15647
|
}, [tableSelect, selectedRowKeys]);
|
|
15544
15648
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15545
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showChangeBtn
|
|
15649
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React.createElement("div", {
|
|
15546
15650
|
style: {
|
|
15547
15651
|
float: 'right'
|
|
15548
15652
|
}
|
|
@@ -15559,7 +15663,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15559
15663
|
}), showErpGoodsBtn && /*#__PURE__*/React.createElement(Button, {
|
|
15560
15664
|
type: "link",
|
|
15561
15665
|
onClick: handleChangeGoods
|
|
15562
|
-
}, getButtonText(type)), otherOperations)
|
|
15666
|
+
}, getButtonText(type)), otherOperations) : showErpGoodsBtn && alwaysShowChooseErpGoodsBtn && /*#__PURE__*/React.createElement("div", {
|
|
15667
|
+
style: {
|
|
15668
|
+
float: 'right'
|
|
15669
|
+
}
|
|
15670
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
15671
|
+
type: "link",
|
|
15672
|
+
onClick: handleChangeGoods
|
|
15673
|
+
}, getButtonText(type)))), /*#__PURE__*/React.createElement(Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
15563
15674
|
columns: newColumns,
|
|
15564
15675
|
dataSource: value,
|
|
15565
15676
|
rowKey: uniqueKey,
|
|
@@ -17657,6 +17768,7 @@ var typeMap$2 = {
|
|
|
17657
17768
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17658
17769
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17659
17770
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
17771
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17660
17772
|
orderTypeKey: 'orderType',
|
|
17661
17773
|
oIdKey: 'oId',
|
|
17662
17774
|
outerOiIdKey: '',
|
|
@@ -17671,11 +17783,11 @@ var typeMap$2 = {
|
|
|
17671
17783
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17672
17784
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17673
17785
|
updateGoodsHandle: updateJstGoodsHandle,
|
|
17786
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17674
17787
|
orderTypeKey: 'orderType',
|
|
17675
17788
|
oIdKey: 'oId',
|
|
17676
17789
|
outerOiIdKey: '',
|
|
17677
17790
|
goodDetailsKey: 'items',
|
|
17678
|
-
showErpGoodsBtn: false,
|
|
17679
17791
|
eventNameMap: {
|
|
17680
17792
|
// pubsub 事件
|
|
17681
17793
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -17686,7 +17798,7 @@ var typeMap$2 = {
|
|
|
17686
17798
|
}
|
|
17687
17799
|
};
|
|
17688
17800
|
var PublicReissue = function PublicReissue(props) {
|
|
17689
|
-
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43;
|
|
17801
|
+
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
|
|
17690
17802
|
var value = props.value,
|
|
17691
17803
|
onChange = props.onChange,
|
|
17692
17804
|
_props$reasonList = props.reasonList,
|
|
@@ -17927,9 +18039,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
17927
18039
|
disabled: disabled,
|
|
17928
18040
|
canUpdateNumber: showChangeBtn,
|
|
17929
18041
|
showChangeBtn: showChangeBtn,
|
|
17930
|
-
|
|
18042
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
|
|
18043
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
|
|
17931
18044
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17932
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18045
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)],
|
|
17933
18046
|
onChange: function onChange(val) {
|
|
17934
18047
|
return changeGoodHandle(val);
|
|
17935
18048
|
},
|
|
@@ -18974,7 +19087,7 @@ var typeMap$4 = {
|
|
|
18974
19087
|
}
|
|
18975
19088
|
};
|
|
18976
19089
|
var GyReissue = function GyReissue(props) {
|
|
18977
|
-
var _value$gySystemOrder, _typeMap$
|
|
19090
|
+
var _value$gySystemOrder, _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
18978
19091
|
var value = props.value,
|
|
18979
19092
|
onChange = props.onChange,
|
|
18980
19093
|
_props$reasonList = props.reasonList,
|
|
@@ -19007,7 +19120,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19007
19120
|
while (1) switch (_context.prev = _context.next) {
|
|
19008
19121
|
case 0:
|
|
19009
19122
|
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
19010
|
-
var _typeMap$type5, _typeMap$type6;
|
|
19123
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type7, _typeMap$type8;
|
|
19011
19124
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19012
19125
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19013
19126
|
var billNo = _ref2.billNo,
|
|
@@ -19029,7 +19142,14 @@ var GyReissue = function GyReissue(props) {
|
|
|
19029
19142
|
shopCode: shopCode
|
|
19030
19143
|
});
|
|
19031
19144
|
});
|
|
19032
|
-
|
|
19145
|
+
pushGyLog('getOrderList', {
|
|
19146
|
+
before: value,
|
|
19147
|
+
after: _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
19148
|
+
showOrderInfo: showOrderInfo,
|
|
19149
|
+
orders: orders
|
|
19150
|
+
})))
|
|
19151
|
+
});
|
|
19152
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder]), {}, {
|
|
19033
19153
|
showOrderInfo: showOrderInfo,
|
|
19034
19154
|
orders: orders
|
|
19035
19155
|
}))));
|
|
@@ -19045,39 +19165,41 @@ var GyReissue = function GyReissue(props) {
|
|
|
19045
19165
|
};
|
|
19046
19166
|
}();
|
|
19047
19167
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19048
|
-
var _value$typeMap$type$t, _typeMap$
|
|
19168
|
+
var _value$typeMap$type$t, _typeMap$type9, _typeMap$type10;
|
|
19169
|
+
pushGyLog('beforeChangeType', value);
|
|
19049
19170
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19050
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
19171
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
19051
19172
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19052
19173
|
var newValue = _objectSpread2({}, value);
|
|
19053
|
-
newValue[(_typeMap$
|
|
19174
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName] = val;
|
|
19054
19175
|
if (typeName === '1') {
|
|
19055
|
-
var _typeMap$
|
|
19056
|
-
newValue[(_typeMap$
|
|
19176
|
+
var _typeMap$type11;
|
|
19177
|
+
newValue[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key] = getGoodDetails({
|
|
19057
19178
|
mode: isStrict
|
|
19058
19179
|
});
|
|
19059
19180
|
} else if (typeName === '2') {
|
|
19060
|
-
var _typeMap$
|
|
19181
|
+
var _typeMap$type12;
|
|
19061
19182
|
// 切换到非原单,清空列表
|
|
19062
|
-
newValue[(_typeMap$
|
|
19183
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = [];
|
|
19063
19184
|
}
|
|
19185
|
+
pushGyLog('afterChangeType', newValue);
|
|
19064
19186
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19065
19187
|
};
|
|
19066
19188
|
var handleModeChange = function handleModeChange(mode) {
|
|
19067
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
19068
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
19189
|
+
var _value$typeMap$type$t2, _typeMap$type13, _typeMap$type14;
|
|
19190
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
19069
19191
|
setIsStrict(mode);
|
|
19070
19192
|
if (!isOriginalOrder) return;
|
|
19071
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
19193
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key, getGoodDetails({
|
|
19072
19194
|
mode: mode
|
|
19073
19195
|
}))));
|
|
19074
19196
|
};
|
|
19075
19197
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
19076
|
-
var _typeMap$
|
|
19198
|
+
var _typeMap$type15, _typeMap$type16, _order$details;
|
|
19077
19199
|
var mode = _ref3.mode,
|
|
19078
19200
|
sysOrderNo = _ref3.sysOrderNo;
|
|
19079
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19080
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19201
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder];
|
|
19202
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrderNo];
|
|
19081
19203
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19082
19204
|
return order.code === systemOrderNo;
|
|
19083
19205
|
});
|
|
@@ -19088,52 +19210,58 @@ var GyReissue = function GyReissue(props) {
|
|
|
19088
19210
|
}) : goodDetails;
|
|
19089
19211
|
};
|
|
19090
19212
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19091
|
-
var _typeMap$
|
|
19213
|
+
var _typeMap$type17;
|
|
19214
|
+
pushGyLog('beforeChangeGood', value);
|
|
19092
19215
|
var newValue = _objectSpread2({}, value);
|
|
19093
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19094
|
-
var _typeMap$
|
|
19095
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19096
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19216
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = (val || []).map(function (item) {
|
|
19217
|
+
var _typeMap$type18, _typeMap$type19;
|
|
19218
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.money)] = 0;
|
|
19219
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.share)] = 0;
|
|
19097
19220
|
return item;
|
|
19098
19221
|
});
|
|
19222
|
+
pushGyLog('afterChangeGood', newValue);
|
|
19099
19223
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19100
19224
|
};
|
|
19101
19225
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19102
|
-
var _typeMap$
|
|
19226
|
+
var _typeMap$type20, _value$typeMap$type$t3, _typeMap$type21, _value$typeMap$type$t4, _typeMap$type23;
|
|
19227
|
+
pushGyLog('beforeChangeSystemOrder', value);
|
|
19103
19228
|
var newValue = _objectSpread2({}, value);
|
|
19104
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19105
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
19106
|
-
var _typeMap$type20;
|
|
19107
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
19108
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19229
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo)] = val;
|
|
19230
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19109
19231
|
var _typeMap$type22;
|
|
19110
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] =
|
|
19232
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
19233
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19234
|
+
var _typeMap$type24;
|
|
19235
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = getGoodDetails({
|
|
19111
19236
|
mode: isStrict,
|
|
19112
19237
|
sysOrderNo: val
|
|
19113
19238
|
});
|
|
19114
19239
|
}
|
|
19240
|
+
pushGyLog('afterChangeSystemOrder', newValue);
|
|
19115
19241
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19116
19242
|
};
|
|
19117
19243
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
19118
|
-
var _typeMap$
|
|
19244
|
+
var _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
|
|
19245
|
+
pushGyLog('beforeSelectedGoodsChange', value);
|
|
19119
19246
|
var newValue = _objectSpread2({}, value);
|
|
19120
19247
|
// 原订单商品
|
|
19121
19248
|
var originTradeGoodList = getGoodDetails({
|
|
19122
19249
|
mode: isStrict
|
|
19123
19250
|
}) || [];
|
|
19124
19251
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19125
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19126
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19252
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]) || [];
|
|
19253
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19127
19254
|
return skuList.includes(item.uuid);
|
|
19128
19255
|
});
|
|
19129
|
-
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19256
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
|
|
19130
19257
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19131
|
-
|
|
19258
|
+
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19259
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
|
|
19132
19260
|
//显示选择商品按钮 原单换不显示选择商品
|
|
19133
19261
|
var showChangeBtn = useMemo(function () {
|
|
19134
|
-
var _typeMap$
|
|
19135
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19136
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19262
|
+
var _typeMap$type29;
|
|
19263
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
19264
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
|
|
19137
19265
|
return /*#__PURE__*/React.createElement("div", {
|
|
19138
19266
|
id: "TEST_GY",
|
|
19139
19267
|
onClick: function onClick() {
|
|
@@ -19156,12 +19284,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19156
19284
|
},
|
|
19157
19285
|
disabled: disabled,
|
|
19158
19286
|
allowClear: false,
|
|
19159
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19287
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
|
|
19160
19288
|
onChange: function onChange(val) {
|
|
19161
19289
|
return changeSystemOrderHandle(val);
|
|
19162
19290
|
},
|
|
19163
19291
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19164
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19292
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
19165
19293
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
19166
19294
|
key: item.billNo,
|
|
19167
19295
|
value: item.billNo,
|
|
@@ -19182,7 +19310,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19182
19310
|
disabled: disabled,
|
|
19183
19311
|
allowClear: false,
|
|
19184
19312
|
options: reasonList,
|
|
19185
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19313
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
|
|
19186
19314
|
onChange: function onChange(val) {
|
|
19187
19315
|
return changeTypeHandle(val);
|
|
19188
19316
|
}
|
|
@@ -19194,7 +19322,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19194
19322
|
canUpdateNumber: showChangeBtn,
|
|
19195
19323
|
showChangeBtn: showChangeBtn,
|
|
19196
19324
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19197
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19325
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
|
|
19198
19326
|
onChange: function onChange(val) {
|
|
19199
19327
|
return changeGoodHandle(val);
|
|
19200
19328
|
},
|
package/dist/index.js
CHANGED
|
@@ -10247,6 +10247,7 @@ var Item = antd.Form.Item;
|
|
|
10247
10247
|
var LogisticsInterception = function LogisticsInterception(props) {
|
|
10248
10248
|
var _value$interceptLogis2, _value$interceptLogis3, _value$interceptLogis4;
|
|
10249
10249
|
var LogisticsAddress = kmkfUtils.LogisticsAddressData.getInstance();
|
|
10250
|
+
var LogisticsAddressOptions = (LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getAddressData()) || [];
|
|
10250
10251
|
var address = kmkfUtils.AddressData.getInstance();
|
|
10251
10252
|
var _props$value = props.value,
|
|
10252
10253
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -10258,7 +10259,10 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10258
10259
|
_props$disabled = props.disabled,
|
|
10259
10260
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
10260
10261
|
_props$isEditing = props.isEditing,
|
|
10261
|
-
isEditing = _props$isEditing === void 0 ? false : _props$isEditing
|
|
10262
|
+
isEditing = _props$isEditing === void 0 ? false : _props$isEditing,
|
|
10263
|
+
_props$platform = props.platform,
|
|
10264
|
+
platform = _props$platform === void 0 ? '' : _props$platform,
|
|
10265
|
+
onJumpPage = props.onJumpPage;
|
|
10262
10266
|
var _useState = React.useState(''),
|
|
10263
10267
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10264
10268
|
initCompany = _useState2[0],
|
|
@@ -10346,6 +10350,14 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10346
10350
|
return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
|
|
10347
10351
|
})) === null || _find3 === void 0 ? void 0 : (_find3$config = _find3.config) === null || _find3$config === void 0 ? void 0 : _find3$config.showSenderMobile;
|
|
10348
10352
|
}, [value === null || value === void 0 ? void 0 : value.interceptType, typeOptions, value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10353
|
+
var showKcode = React.useMemo(function () {
|
|
10354
|
+
var isShow = false;
|
|
10355
|
+
if (value === null || value === void 0 ? void 0 : value.interceptCompany) {
|
|
10356
|
+
var _value$interceptCompa;
|
|
10357
|
+
isShow = (value === null || value === void 0 ? void 0 : (_value$interceptCompa = value.interceptCompany) === null || _value$interceptCompa === void 0 ? void 0 : _value$interceptCompa.indexOf('YTO')) > -1;
|
|
10358
|
+
}
|
|
10359
|
+
return isShow;
|
|
10360
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10349
10361
|
//判断是否能修改物流信息
|
|
10350
10362
|
var isEdit = React.useMemo(function () {
|
|
10351
10363
|
var company = expressInterceptData.find(function (item) {
|
|
@@ -10355,10 +10367,21 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10355
10367
|
}, [isEditing, initCompany]);
|
|
10356
10368
|
//退回地址列表
|
|
10357
10369
|
var logisticsAddressOptions = React.useMemo(function () {
|
|
10358
|
-
return
|
|
10370
|
+
return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10359
10371
|
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
|
|
10360
10372
|
});
|
|
10361
10373
|
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10374
|
+
// K码列表
|
|
10375
|
+
var kCodeList = React.useMemo(function () {
|
|
10376
|
+
return LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10377
|
+
return item.cpCode === (value === null || value === void 0 ? void 0 : value.interceptCompany) && item.userKCode;
|
|
10378
|
+
}).map(function (item) {
|
|
10379
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
10380
|
+
value: item === null || item === void 0 ? void 0 : item.userKCode,
|
|
10381
|
+
label: item === null || item === void 0 ? void 0 : item.userKCode
|
|
10382
|
+
});
|
|
10383
|
+
});
|
|
10384
|
+
}, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
|
|
10362
10385
|
var returnValue = React.useMemo(function () {
|
|
10363
10386
|
var _value$interceptAddre, _value$interceptAddre2, _value$interceptAddre3;
|
|
10364
10387
|
var uk = LogisticsAddress === null || LogisticsAddress === void 0 ? void 0 : LogisticsAddress.getUkByInfo({
|
|
@@ -10383,6 +10406,27 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10383
10406
|
var _item$config4;
|
|
10384
10407
|
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
10385
10408
|
});
|
|
10409
|
+
// const demoList = [
|
|
10410
|
+
// {
|
|
10411
|
+
// city: 330100,
|
|
10412
|
+
// cpCode: 'YTO',
|
|
10413
|
+
// detail: '光云大厦',
|
|
10414
|
+
// district: 330108,
|
|
10415
|
+
// mobile: '18858820420',
|
|
10416
|
+
// province: 330000,
|
|
10417
|
+
// sendGoodName: '测试编码仓',
|
|
10418
|
+
// senderMobile: '',
|
|
10419
|
+
// senderMobilePhoneList: [],
|
|
10420
|
+
// uk: '8Y2FjwQHdw',
|
|
10421
|
+
// update: 1735887721299,
|
|
10422
|
+
// userName: '南月 光云大厦',
|
|
10423
|
+
// userKCode: 'K12345678',
|
|
10424
|
+
// userSecretKey: '12345678',
|
|
10425
|
+
// },
|
|
10426
|
+
// ];
|
|
10427
|
+
var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10428
|
+
return item.cpCode === val && item.userKCode;
|
|
10429
|
+
});
|
|
10386
10430
|
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
10387
10431
|
interceptCompany: val,
|
|
10388
10432
|
interceptType: _returnValue === null || _returnValue === void 0 ? void 0 : _returnValue.value,
|
|
@@ -10398,7 +10442,9 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10398
10442
|
interceptLogisticsApiStatus: {
|
|
10399
10443
|
status: '',
|
|
10400
10444
|
reason: ''
|
|
10401
|
-
}
|
|
10445
|
+
},
|
|
10446
|
+
interceptLogisticsUserKCode: undefined,
|
|
10447
|
+
interceptLogisticsUserSecretKey: undefined
|
|
10402
10448
|
});
|
|
10403
10449
|
}
|
|
10404
10450
|
if (type === 'interceptLogisticsApiStatus') {
|
|
@@ -10410,6 +10456,17 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10410
10456
|
}
|
|
10411
10457
|
});
|
|
10412
10458
|
}
|
|
10459
|
+
if (type === 'interceptLogisticsUserKCode') {
|
|
10460
|
+
var kCodeItem = kCodeList === null || kCodeList === void 0 ? void 0 : kCodeList.find(function (item) {
|
|
10461
|
+
return item.value === val;
|
|
10462
|
+
});
|
|
10463
|
+
if (kCodeItem) {
|
|
10464
|
+
newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
10465
|
+
interceptLogisticsUserSecretKey: kCodeItem === null || kCodeItem === void 0 ? void 0 : kCodeItem.userSecretKey
|
|
10466
|
+
});
|
|
10467
|
+
}
|
|
10468
|
+
}
|
|
10469
|
+
console.log('newValue', newValue);
|
|
10413
10470
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10414
10471
|
};
|
|
10415
10472
|
//智能识别回调
|
|
@@ -10462,6 +10519,46 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10462
10519
|
return changeHandle(e.target.value, 'interceptCode');
|
|
10463
10520
|
},
|
|
10464
10521
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
10522
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10523
|
+
label: /*#__PURE__*/React__default['default'].createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React__default['default'].createElement(antd.Typography.Link, {
|
|
10524
|
+
style: {
|
|
10525
|
+
cursor: 'pointer'
|
|
10526
|
+
},
|
|
10527
|
+
onClick: function onClick() {
|
|
10528
|
+
return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
|
|
10529
|
+
type: 'interceptConfig'
|
|
10530
|
+
}));
|
|
10531
|
+
}
|
|
10532
|
+
}, 'k码配置>>') : null),
|
|
10533
|
+
key: 'interceptLogisticsUserKCode',
|
|
10534
|
+
hidden: !showKcode
|
|
10535
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
10536
|
+
disabled: disabled || isEdit,
|
|
10537
|
+
placeholder: "\u9009\u62E9K\u7801",
|
|
10538
|
+
showSearch: true,
|
|
10539
|
+
style: {
|
|
10540
|
+
width: '200px'
|
|
10541
|
+
},
|
|
10542
|
+
onChange: function onChange(val) {
|
|
10543
|
+
return changeHandle(val, 'interceptLogisticsUserKCode');
|
|
10544
|
+
},
|
|
10545
|
+
options: kCodeList,
|
|
10546
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserKCode,
|
|
10547
|
+
filterOption: function filterOption(input, option) {
|
|
10548
|
+
return option.label.includes(input);
|
|
10549
|
+
}
|
|
10550
|
+
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10551
|
+
key: 'interceptLogisticsUserSecretKey',
|
|
10552
|
+
hidden: !showKcode,
|
|
10553
|
+
noStyle: true
|
|
10554
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
10555
|
+
style: {
|
|
10556
|
+
width: platform === 'pc' ? 200 : 150,
|
|
10557
|
+
marginTop: '6px'
|
|
10558
|
+
},
|
|
10559
|
+
placeholder: "\u5BA2\u6237\u5BC6\u94A5",
|
|
10560
|
+
disabled: true,
|
|
10561
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
|
|
10465
10562
|
}))), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10466
10563
|
label: '拦截类型',
|
|
10467
10564
|
required: required,
|
|
@@ -10606,7 +10703,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10606
10703
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10607
10704
|
disabled = props.disabled,
|
|
10608
10705
|
onChange = props.onChange,
|
|
10609
|
-
isEditing = props.isEditing
|
|
10706
|
+
isEditing = props.isEditing,
|
|
10707
|
+
effects = props.effects;
|
|
10610
10708
|
var _useState = React.useState(0),
|
|
10611
10709
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10612
10710
|
changeIndex = _useState2[0],
|
|
@@ -10648,6 +10746,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10648
10746
|
value: item,
|
|
10649
10747
|
disabled: disabled,
|
|
10650
10748
|
isEditing: false,
|
|
10749
|
+
platform: effects === null || effects === void 0 ? void 0 : effects.env,
|
|
10750
|
+
onJumpPage: effects === null || effects === void 0 ? void 0 : effects.onJumpPage,
|
|
10651
10751
|
onChange: function onChange(val) {
|
|
10652
10752
|
return handleChange(val, index);
|
|
10653
10753
|
}
|
|
@@ -15203,6 +15303,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15203
15303
|
showErpGoodsBtn = _props$showErpGoodsBt === void 0 ? true : _props$showErpGoodsBt,
|
|
15204
15304
|
_props$showModeBtn = props.showModeBtn,
|
|
15205
15305
|
showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
|
|
15306
|
+
_props$alwaysShowChoo = props.alwaysShowChooseErpGoodsBtn,
|
|
15307
|
+
alwaysShowChooseErpGoodsBtn = _props$alwaysShowChoo === void 0 ? false : _props$alwaysShowChoo,
|
|
15206
15308
|
_props$isStrict = props.isStrict,
|
|
15207
15309
|
isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
|
|
15208
15310
|
_props$tableSelect = props.tableSelect,
|
|
@@ -15286,7 +15388,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15286
15388
|
};
|
|
15287
15389
|
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
15288
15390
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15289
|
-
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
15391
|
+
var columnsOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
15392
|
+
operate: true
|
|
15393
|
+
};
|
|
15290
15394
|
return function (type) {
|
|
15291
15395
|
var columns = [];
|
|
15292
15396
|
switch (type) {
|
|
@@ -15554,7 +15658,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15554
15658
|
return params;
|
|
15555
15659
|
}, [tableSelect, selectedRowKeys]);
|
|
15556
15660
|
var TheGoodsModal = GoodsModalMap[type || 'OTHER_GOODS'] || GoodsModalMap['OTHER_GOODS'];
|
|
15557
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showChangeBtn
|
|
15661
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && (showChangeBtn ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15558
15662
|
style: {
|
|
15559
15663
|
float: 'right'
|
|
15560
15664
|
}
|
|
@@ -15571,7 +15675,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15571
15675
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
15572
15676
|
type: "link",
|
|
15573
15677
|
onClick: handleChangeGoods
|
|
15574
|
-
}, getButtonText(type)), otherOperations)
|
|
15678
|
+
}, getButtonText(type)), otherOperations) : showErpGoodsBtn && alwaysShowChooseErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
15679
|
+
style: {
|
|
15680
|
+
float: 'right'
|
|
15681
|
+
}
|
|
15682
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
15683
|
+
type: "link",
|
|
15684
|
+
onClick: handleChangeGoods
|
|
15685
|
+
}, getButtonText(type)))), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
15575
15686
|
columns: newColumns,
|
|
15576
15687
|
dataSource: value,
|
|
15577
15688
|
rowKey: uniqueKey,
|
|
@@ -17669,6 +17780,7 @@ var typeMap$2 = {
|
|
|
17669
17780
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17670
17781
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17671
17782
|
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17783
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17672
17784
|
orderTypeKey: 'orderType',
|
|
17673
17785
|
oIdKey: 'oId',
|
|
17674
17786
|
outerOiIdKey: '',
|
|
@@ -17683,11 +17795,11 @@ var typeMap$2 = {
|
|
|
17683
17795
|
systemOrderBillType: 'jstSystemOrderBillType',
|
|
17684
17796
|
getOrderList: jstUtils.getJstOrderListSingleton,
|
|
17685
17797
|
updateGoodsHandle: kmkfUtils.updateJstGoodsHandle,
|
|
17798
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
17686
17799
|
orderTypeKey: 'orderType',
|
|
17687
17800
|
oIdKey: 'oId',
|
|
17688
17801
|
outerOiIdKey: '',
|
|
17689
17802
|
goodDetailsKey: 'items',
|
|
17690
|
-
showErpGoodsBtn: false,
|
|
17691
17803
|
eventNameMap: {
|
|
17692
17804
|
// pubsub 事件
|
|
17693
17805
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -17698,7 +17810,7 @@ var typeMap$2 = {
|
|
|
17698
17810
|
}
|
|
17699
17811
|
};
|
|
17700
17812
|
var PublicReissue = function PublicReissue(props) {
|
|
17701
|
-
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43;
|
|
17813
|
+
var _typeMap$type31, _typeMap$type34, _typeMap$type35, _typeMap$type36, _typeMap$type37, _value$typeMap$type$s6, _typeMap$type38, _typeMap$type39, _typeMap$type40, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44;
|
|
17702
17814
|
var value = props.value,
|
|
17703
17815
|
onChange = props.onChange,
|
|
17704
17816
|
_props$reasonList = props.reasonList,
|
|
@@ -17939,9 +18051,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
17939
18051
|
disabled: disabled,
|
|
17940
18052
|
canUpdateNumber: showChangeBtn,
|
|
17941
18053
|
showChangeBtn: showChangeBtn,
|
|
17942
|
-
|
|
18054
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.alwaysShowChooseErpGoodsBtn,
|
|
18055
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.showErpGoodsBtn,
|
|
17943
18056
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
17944
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18057
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.key)],
|
|
17945
18058
|
onChange: function onChange(val) {
|
|
17946
18059
|
return changeGoodHandle(val);
|
|
17947
18060
|
},
|
|
@@ -18986,7 +19099,7 @@ var typeMap$4 = {
|
|
|
18986
19099
|
}
|
|
18987
19100
|
};
|
|
18988
19101
|
var GyReissue = function GyReissue(props) {
|
|
18989
|
-
var _value$gySystemOrder, _typeMap$
|
|
19102
|
+
var _value$gySystemOrder, _typeMap$type28, _typeMap$type30, _typeMap$type31, _value$typeMap$type$s5, _typeMap$type32, _typeMap$type33, _typeMap$type34;
|
|
18990
19103
|
var value = props.value,
|
|
18991
19104
|
onChange = props.onChange,
|
|
18992
19105
|
_props$reasonList = props.reasonList,
|
|
@@ -19019,7 +19132,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19019
19132
|
while (1) switch (_context.prev = _context.next) {
|
|
19020
19133
|
case 0:
|
|
19021
19134
|
(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
19022
|
-
var _typeMap$type5, _typeMap$type6;
|
|
19135
|
+
var _typeMap$type5, _typeMap$type6, _typeMap$type7, _typeMap$type8;
|
|
19023
19136
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19024
19137
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19025
19138
|
var billNo = _ref2.billNo,
|
|
@@ -19041,7 +19154,14 @@ var GyReissue = function GyReissue(props) {
|
|
|
19041
19154
|
shopCode: shopCode
|
|
19042
19155
|
});
|
|
19043
19156
|
});
|
|
19044
|
-
|
|
19157
|
+
kmkfUtils.pushGyLog('getOrderList', {
|
|
19158
|
+
before: value,
|
|
19159
|
+
after: _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
19160
|
+
showOrderInfo: showOrderInfo,
|
|
19161
|
+
orders: orders
|
|
19162
|
+
})))
|
|
19163
|
+
});
|
|
19164
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder]), {}, {
|
|
19045
19165
|
showOrderInfo: showOrderInfo,
|
|
19046
19166
|
orders: orders
|
|
19047
19167
|
}))));
|
|
@@ -19057,39 +19177,41 @@ var GyReissue = function GyReissue(props) {
|
|
|
19057
19177
|
};
|
|
19058
19178
|
}();
|
|
19059
19179
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19060
|
-
var _value$typeMap$type$t, _typeMap$
|
|
19180
|
+
var _value$typeMap$type$t, _typeMap$type9, _typeMap$type10;
|
|
19181
|
+
kmkfUtils.pushGyLog('beforeChangeType', value);
|
|
19061
19182
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19062
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
19183
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
19063
19184
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19064
19185
|
var newValue = _objectSpread2({}, value);
|
|
19065
|
-
newValue[(_typeMap$
|
|
19186
|
+
newValue[(_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName] = val;
|
|
19066
19187
|
if (typeName === '1') {
|
|
19067
|
-
var _typeMap$
|
|
19068
|
-
newValue[(_typeMap$
|
|
19188
|
+
var _typeMap$type11;
|
|
19189
|
+
newValue[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.key] = getGoodDetails({
|
|
19069
19190
|
mode: isStrict
|
|
19070
19191
|
});
|
|
19071
19192
|
} else if (typeName === '2') {
|
|
19072
|
-
var _typeMap$
|
|
19193
|
+
var _typeMap$type12;
|
|
19073
19194
|
// 切换到非原单,清空列表
|
|
19074
|
-
newValue[(_typeMap$
|
|
19195
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = [];
|
|
19075
19196
|
}
|
|
19197
|
+
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
19076
19198
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19077
19199
|
};
|
|
19078
19200
|
var handleModeChange = function handleModeChange(mode) {
|
|
19079
|
-
var _value$typeMap$type$t2, _typeMap$
|
|
19080
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
19201
|
+
var _value$typeMap$type$t2, _typeMap$type13, _typeMap$type14;
|
|
19202
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0]) === '1';
|
|
19081
19203
|
setIsStrict(mode);
|
|
19082
19204
|
if (!isOriginalOrder) return;
|
|
19083
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
19205
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key, getGoodDetails({
|
|
19084
19206
|
mode: mode
|
|
19085
19207
|
}))));
|
|
19086
19208
|
};
|
|
19087
19209
|
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
19088
|
-
var _typeMap$
|
|
19210
|
+
var _typeMap$type15, _typeMap$type16, _order$details;
|
|
19089
19211
|
var mode = _ref3.mode,
|
|
19090
19212
|
sysOrderNo = _ref3.sysOrderNo;
|
|
19091
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19092
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19213
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.systemOrder];
|
|
19214
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrderNo];
|
|
19093
19215
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19094
19216
|
return order.code === systemOrderNo;
|
|
19095
19217
|
});
|
|
@@ -19100,52 +19222,58 @@ var GyReissue = function GyReissue(props) {
|
|
|
19100
19222
|
}) : goodDetails;
|
|
19101
19223
|
};
|
|
19102
19224
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19103
|
-
var _typeMap$
|
|
19225
|
+
var _typeMap$type17;
|
|
19226
|
+
kmkfUtils.pushGyLog('beforeChangeGood', value);
|
|
19104
19227
|
var newValue = _objectSpread2({}, value);
|
|
19105
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19106
|
-
var _typeMap$
|
|
19107
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19108
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19228
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.key)] = (val || []).map(function (item) {
|
|
19229
|
+
var _typeMap$type18, _typeMap$type19;
|
|
19230
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.formatDefaultField.money)] = 0;
|
|
19231
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.share)] = 0;
|
|
19109
19232
|
return item;
|
|
19110
19233
|
});
|
|
19234
|
+
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
19111
19235
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19112
19236
|
};
|
|
19113
19237
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19114
|
-
var _typeMap$
|
|
19238
|
+
var _typeMap$type20, _value$typeMap$type$t3, _typeMap$type21, _value$typeMap$type$t4, _typeMap$type23;
|
|
19239
|
+
kmkfUtils.pushGyLog('beforeChangeSystemOrder', value);
|
|
19115
19240
|
var newValue = _objectSpread2({}, value);
|
|
19116
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19117
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
19118
|
-
var _typeMap$type20;
|
|
19119
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
19120
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19241
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.systemOrderNo)] = val;
|
|
19242
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19121
19243
|
var _typeMap$type22;
|
|
19122
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] =
|
|
19244
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
19245
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
19246
|
+
var _typeMap$type24;
|
|
19247
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = getGoodDetails({
|
|
19123
19248
|
mode: isStrict,
|
|
19124
19249
|
sysOrderNo: val
|
|
19125
19250
|
});
|
|
19126
19251
|
}
|
|
19252
|
+
kmkfUtils.pushGyLog('afterChangeSystemOrder', newValue);
|
|
19127
19253
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19128
19254
|
};
|
|
19129
19255
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19130
|
-
var _typeMap$
|
|
19256
|
+
var _typeMap$type25, _typeMap$type26, _uniqBy, _typeMap$type27;
|
|
19257
|
+
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', value);
|
|
19131
19258
|
var newValue = _objectSpread2({}, value);
|
|
19132
19259
|
// 原订单商品
|
|
19133
19260
|
var originTradeGoodList = getGoodDetails({
|
|
19134
19261
|
mode: isStrict
|
|
19135
19262
|
}) || [];
|
|
19136
19263
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19137
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19138
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19264
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key)]) || [];
|
|
19265
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19139
19266
|
return skuList.includes(item.uuid);
|
|
19140
19267
|
});
|
|
19141
|
-
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19268
|
+
console.log('商品发生变化', newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]);
|
|
19142
19269
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19143
|
-
|
|
19270
|
+
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
19271
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)], isStrict]);
|
|
19144
19272
|
//显示选择商品按钮 原单换不显示选择商品
|
|
19145
19273
|
var showChangeBtn = React.useMemo(function () {
|
|
19146
|
-
var _typeMap$
|
|
19147
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19148
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19274
|
+
var _typeMap$type29;
|
|
19275
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo]);
|
|
19276
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrderNo]]);
|
|
19149
19277
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
19150
19278
|
id: "TEST_GY",
|
|
19151
19279
|
onClick: function onClick() {
|
|
@@ -19168,12 +19296,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
19168
19296
|
},
|
|
19169
19297
|
disabled: disabled,
|
|
19170
19298
|
allowClear: false,
|
|
19171
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19299
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo)],
|
|
19172
19300
|
onChange: function onChange(val) {
|
|
19173
19301
|
return changeSystemOrderHandle(val);
|
|
19174
19302
|
},
|
|
19175
19303
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
19176
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19304
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
19177
19305
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
19178
19306
|
key: item.billNo,
|
|
19179
19307
|
value: item.billNo,
|
|
@@ -19194,7 +19322,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19194
19322
|
disabled: disabled,
|
|
19195
19323
|
allowClear: false,
|
|
19196
19324
|
options: reasonList,
|
|
19197
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19325
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.typeName)],
|
|
19198
19326
|
onChange: function onChange(val) {
|
|
19199
19327
|
return changeTypeHandle(val);
|
|
19200
19328
|
}
|
|
@@ -19206,7 +19334,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
19206
19334
|
canUpdateNumber: showChangeBtn,
|
|
19207
19335
|
showChangeBtn: showChangeBtn,
|
|
19208
19336
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19209
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
19337
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)],
|
|
19210
19338
|
onChange: function onChange(val) {
|
|
19211
19339
|
return changeGoodHandle(val);
|
|
19212
19340
|
},
|
|
@@ -16,6 +16,8 @@ interface LogisticsInterceptionValueType {
|
|
|
16
16
|
status: string;
|
|
17
17
|
reason: string;
|
|
18
18
|
};
|
|
19
|
+
interceptLogisticsUserKCode: string;
|
|
20
|
+
interceptLogisticsUserSecretKey: string;
|
|
19
21
|
}
|
|
20
22
|
interface LogisticsInterceptionProps {
|
|
21
23
|
value: Partial<LogisticsInterceptionValueType>;
|
|
@@ -24,6 +26,8 @@ interface LogisticsInterceptionProps {
|
|
|
24
26
|
disabled: boolean;
|
|
25
27
|
isEditing: boolean;
|
|
26
28
|
onChange: (value: Partial<LogisticsInterceptionValueType>) => void;
|
|
29
|
+
platform: string;
|
|
30
|
+
onJumpPage?: (val: any) => void;
|
|
27
31
|
}
|
|
28
32
|
declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => React.JSX.Element;
|
|
29
33
|
export default LogisticsInterception;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.27",
|
|
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.
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.27",
|
|
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": "946aeb45a02607607db54fb372884251b7ae8213"
|
|
69
69
|
}
|