@kmkf-fe-packages/basic-components 2.0.18 → 2.0.19-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +535 -12
- package/dist/index.js +534 -10
- package/dist/src/business/LogisticsInterception/index.d.ts +4 -0
- package/dist/src/gy/Return/index.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
|
@@ -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, _value$interceptCompa2;
|
|
10345
|
+
isShow = (value === null || value === void 0 ? void 0 : (_value$interceptCompa = value.interceptCompany) === null || _value$interceptCompa === void 0 ? void 0 : _value$interceptCompa.indexOf('YT')) > -1 || (value === null || value === void 0 ? void 0 : (_value$interceptCompa2 = value.interceptCompany) === null || _value$interceptCompa2 === void 0 ? void 0 : _value$interceptCompa2.indexOf('CP468398')) > -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({
|
|
@@ -10364,6 +10387,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10364
10387
|
var changeHandle = function changeHandle(val, type) {
|
|
10365
10388
|
var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
|
|
10366
10389
|
if (type === 'interceptCompany') {
|
|
10390
|
+
var _matchKCodeList$;
|
|
10367
10391
|
var interceptCompany = expressInterceptData.find(function (item) {
|
|
10368
10392
|
return item.value === val;
|
|
10369
10393
|
});
|
|
@@ -10371,7 +10395,28 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10371
10395
|
var _item$config4;
|
|
10372
10396
|
return item === null || item === void 0 ? void 0 : (_item$config4 = item.config) === null || _item$config4 === void 0 ? void 0 : _item$config4.isDefault;
|
|
10373
10397
|
});
|
|
10374
|
-
|
|
10398
|
+
// const demoList = [
|
|
10399
|
+
// {
|
|
10400
|
+
// city: 330100,
|
|
10401
|
+
// cpCode: 'YTO',
|
|
10402
|
+
// detail: '光云大厦',
|
|
10403
|
+
// district: 330108,
|
|
10404
|
+
// mobile: '18858820420',
|
|
10405
|
+
// province: 330000,
|
|
10406
|
+
// sendGoodName: '测试编码仓',
|
|
10407
|
+
// senderMobile: '',
|
|
10408
|
+
// senderMobilePhoneList: [],
|
|
10409
|
+
// uk: '8Y2FjwQHdw',
|
|
10410
|
+
// update: 1735887721299,
|
|
10411
|
+
// userName: '南月 光云大厦',
|
|
10412
|
+
// userKCode: 'K12345678',
|
|
10413
|
+
// userSecretKey: '12345678',
|
|
10414
|
+
// },
|
|
10415
|
+
// ];
|
|
10416
|
+
var matchKCodeList = LogisticsAddressOptions === null || LogisticsAddressOptions === void 0 ? void 0 : LogisticsAddressOptions.filter(function (item) {
|
|
10417
|
+
return item.cpCode === val && item.userKCode;
|
|
10418
|
+
});
|
|
10419
|
+
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10375
10420
|
interceptCompany: val,
|
|
10376
10421
|
interceptType: _returnValue === null || _returnValue === void 0 ? void 0 : _returnValue.value,
|
|
10377
10422
|
interceptSenderMobile: undefined,
|
|
@@ -10386,18 +10431,31 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10386
10431
|
interceptLogisticsApiStatus: {
|
|
10387
10432
|
status: '',
|
|
10388
10433
|
reason: ''
|
|
10389
|
-
}
|
|
10434
|
+
},
|
|
10435
|
+
interceptLogisticsUserKCode: (matchKCodeList === null || matchKCodeList === void 0 ? void 0 : matchKCodeList.length) === 1 ? matchKCodeList[0].userKCode : undefined,
|
|
10436
|
+
interceptLogisticsUserSecretKey: (matchKCodeList === null || matchKCodeList === void 0 ? void 0 : matchKCodeList.length) === 1 ? (_matchKCodeList$ = matchKCodeList[0]) === null || _matchKCodeList$ === void 0 ? void 0 : _matchKCodeList$.userSecretKey : undefined
|
|
10390
10437
|
});
|
|
10391
10438
|
}
|
|
10392
10439
|
if (type === 'interceptLogisticsApiStatus') {
|
|
10393
10440
|
var _value$interceptLogis;
|
|
10394
|
-
newValue = _objectSpread2(_objectSpread2({},
|
|
10441
|
+
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10395
10442
|
interceptLogisticsApiStatus: {
|
|
10396
10443
|
status: val,
|
|
10397
10444
|
reason: (value === null || value === void 0 ? void 0 : (_value$interceptLogis = value.interceptLogisticsApiStatus) === null || _value$interceptLogis === void 0 ? void 0 : _value$interceptLogis.reason) || ''
|
|
10398
10445
|
}
|
|
10399
10446
|
});
|
|
10400
10447
|
}
|
|
10448
|
+
if (type === 'interceptLogisticsUserKCode') {
|
|
10449
|
+
var kCodeItem = kCodeList === null || kCodeList === void 0 ? void 0 : kCodeList.find(function (item) {
|
|
10450
|
+
return item.value === val;
|
|
10451
|
+
});
|
|
10452
|
+
if (kCodeItem) {
|
|
10453
|
+
newValue = _objectSpread2(_objectSpread2({}, newValue), {}, {
|
|
10454
|
+
interceptLogisticsUserSecretKey: kCodeItem === null || kCodeItem === void 0 ? void 0 : kCodeItem.userSecretKey
|
|
10455
|
+
});
|
|
10456
|
+
}
|
|
10457
|
+
}
|
|
10458
|
+
console.log('newValue', newValue);
|
|
10401
10459
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10402
10460
|
};
|
|
10403
10461
|
//智能识别回调
|
|
@@ -10450,6 +10508,47 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10450
10508
|
return changeHandle(e.target.value, 'interceptCode');
|
|
10451
10509
|
},
|
|
10452
10510
|
value: value === null || value === void 0 ? void 0 : value.interceptCode
|
|
10511
|
+
}))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Item, {
|
|
10512
|
+
label: /*#__PURE__*/React.createElement("span", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", platform === 'pc' ? /*#__PURE__*/React.createElement(Typography.Link, {
|
|
10513
|
+
style: {
|
|
10514
|
+
cursor: 'pointer'
|
|
10515
|
+
},
|
|
10516
|
+
onClick: function onClick() {
|
|
10517
|
+
return onJumpPage && (onJumpPage === null || onJumpPage === void 0 ? void 0 : onJumpPage({
|
|
10518
|
+
type: 'interceptConfig'
|
|
10519
|
+
}));
|
|
10520
|
+
}
|
|
10521
|
+
}, 'k码配置>>') : null),
|
|
10522
|
+
required: true,
|
|
10523
|
+
key: 'interceptLogisticsUserKCode',
|
|
10524
|
+
hidden: !showKcode
|
|
10525
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
10526
|
+
disabled: disabled || isEdit,
|
|
10527
|
+
placeholder: "\u9009\u62E9K\u7801",
|
|
10528
|
+
showSearch: true,
|
|
10529
|
+
style: {
|
|
10530
|
+
width: '200px'
|
|
10531
|
+
},
|
|
10532
|
+
onChange: function onChange(val) {
|
|
10533
|
+
return changeHandle(val, 'interceptLogisticsUserKCode');
|
|
10534
|
+
},
|
|
10535
|
+
options: kCodeList,
|
|
10536
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserKCode,
|
|
10537
|
+
filterOption: function filterOption(input, option) {
|
|
10538
|
+
return option.label.includes(input);
|
|
10539
|
+
}
|
|
10540
|
+
})), /*#__PURE__*/React.createElement(Item, {
|
|
10541
|
+
key: 'interceptLogisticsUserSecretKey',
|
|
10542
|
+
hidden: !showKcode,
|
|
10543
|
+
noStyle: true
|
|
10544
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
10545
|
+
style: {
|
|
10546
|
+
width: '200px',
|
|
10547
|
+
marginTop: '6px'
|
|
10548
|
+
},
|
|
10549
|
+
placeholder: "\u5BA2\u6237\u5BC6\u94A5",
|
|
10550
|
+
disabled: true,
|
|
10551
|
+
value: value === null || value === void 0 ? void 0 : value.interceptLogisticsUserSecretKey
|
|
10453
10552
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
10454
10553
|
label: '拦截类型',
|
|
10455
10554
|
required: required,
|
|
@@ -10594,7 +10693,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10594
10693
|
value = _props$value === void 0 ? [] : _props$value,
|
|
10595
10694
|
disabled = props.disabled,
|
|
10596
10695
|
onChange = props.onChange,
|
|
10597
|
-
isEditing = props.isEditing
|
|
10696
|
+
isEditing = props.isEditing,
|
|
10697
|
+
effects = props.effects;
|
|
10598
10698
|
var _useState = useState(0),
|
|
10599
10699
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10600
10700
|
changeIndex = _useState2[0],
|
|
@@ -10636,6 +10736,8 @@ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
|
10636
10736
|
value: item,
|
|
10637
10737
|
disabled: disabled,
|
|
10638
10738
|
isEditing: false,
|
|
10739
|
+
platform: effects === null || effects === void 0 ? void 0 : effects.env,
|
|
10740
|
+
onJumpPage: effects === null || effects === void 0 ? void 0 : effects.onJumpPage,
|
|
10639
10741
|
onChange: function onChange(val) {
|
|
10640
10742
|
return handleChange(val, index);
|
|
10641
10743
|
}
|
|
@@ -12516,6 +12618,7 @@ var getTableData$2 = function getTableData(_ref, formData) {
|
|
|
12516
12618
|
var current = _ref.current,
|
|
12517
12619
|
pageSize = _ref.pageSize;
|
|
12518
12620
|
var data = {
|
|
12621
|
+
goodShortName: formData.goodShortName || null,
|
|
12519
12622
|
goodNo: formData.goodNo || null,
|
|
12520
12623
|
goodName: formData.goodName || null,
|
|
12521
12624
|
skuCode: formData.skuCode || null,
|
|
@@ -12673,6 +12776,17 @@ var GoodList$2 = function GoodList(props, ref) {
|
|
|
12673
12776
|
layout: "inline",
|
|
12674
12777
|
form: form
|
|
12675
12778
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
12779
|
+
name: "goodShortName",
|
|
12780
|
+
style: {
|
|
12781
|
+
marginBottom: '12px'
|
|
12782
|
+
}
|
|
12783
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
12784
|
+
placeholder: "\u5546\u54C1\u7B80\u79F0",
|
|
12785
|
+
allowClear: true,
|
|
12786
|
+
style: {
|
|
12787
|
+
width: 150
|
|
12788
|
+
}
|
|
12789
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
12676
12790
|
name: "goodNo",
|
|
12677
12791
|
style: {
|
|
12678
12792
|
marginBottom: '12px'
|
|
@@ -14360,6 +14474,117 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14360
14474
|
align: 'center',
|
|
14361
14475
|
ellipsis: true
|
|
14362
14476
|
});
|
|
14477
|
+
}),
|
|
14478
|
+
//管易退货商品信息
|
|
14479
|
+
GY_RETURN_GOODS: [{
|
|
14480
|
+
dataIndex: 'goodName',
|
|
14481
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
14482
|
+
width: 150
|
|
14483
|
+
}, {
|
|
14484
|
+
dataIndex: 'goodShortName',
|
|
14485
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
14486
|
+
width: 150
|
|
14487
|
+
}, {
|
|
14488
|
+
dataIndex: 'goodNo',
|
|
14489
|
+
title: "\u5546\u54C1\u7F16\u7801",
|
|
14490
|
+
width: 200
|
|
14491
|
+
}, {
|
|
14492
|
+
dataIndex: 'specName',
|
|
14493
|
+
title: "SKU\u540D\u79F0",
|
|
14494
|
+
align: 'center',
|
|
14495
|
+
ellipsis: true,
|
|
14496
|
+
width: 250
|
|
14497
|
+
}, {
|
|
14498
|
+
dataIndex: 'specNo',
|
|
14499
|
+
title: "SKU\u7F16\u7801",
|
|
14500
|
+
align: 'center',
|
|
14501
|
+
ellipsis: true,
|
|
14502
|
+
width: 150
|
|
14503
|
+
}, {
|
|
14504
|
+
dataIndex: 'qty',
|
|
14505
|
+
title: "\u6570\u91CF",
|
|
14506
|
+
width: 100,
|
|
14507
|
+
render: function render(val, record, index) {
|
|
14508
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14509
|
+
style: {
|
|
14510
|
+
width: 70
|
|
14511
|
+
},
|
|
14512
|
+
value: val,
|
|
14513
|
+
min: 1,
|
|
14514
|
+
precision: 0,
|
|
14515
|
+
onChange: function onChange(num) {
|
|
14516
|
+
updateDataHandle({
|
|
14517
|
+
qty: num,
|
|
14518
|
+
amount: num && isNumberOrNumberString(record.price) ? num * record.price : null,
|
|
14519
|
+
originAmount: num && isNumberOrNumberString(record.originPrice) ? num * record.originPrice : null
|
|
14520
|
+
}, index);
|
|
14521
|
+
}
|
|
14522
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14523
|
+
}
|
|
14524
|
+
}, {
|
|
14525
|
+
dataIndex: 'price',
|
|
14526
|
+
title: "\u5B9E\u9645\u5355\u4EF7",
|
|
14527
|
+
width: 150,
|
|
14528
|
+
render: function render(val, record, index) {
|
|
14529
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
14530
|
+
style: {
|
|
14531
|
+
width: 130
|
|
14532
|
+
},
|
|
14533
|
+
value: val,
|
|
14534
|
+
min: 0,
|
|
14535
|
+
precision: 2,
|
|
14536
|
+
onChange: function onChange(num) {
|
|
14537
|
+
updateDataHandle({
|
|
14538
|
+
price: num,
|
|
14539
|
+
amount: num && isNumberOrNumberString(record.qty) ? num * record.qty : null
|
|
14540
|
+
}, index);
|
|
14541
|
+
}
|
|
14542
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
14543
|
+
}
|
|
14544
|
+
}, {
|
|
14545
|
+
dataIndex: 'amount',
|
|
14546
|
+
title: "\u5B9E\u9645\u91D1\u989D",
|
|
14547
|
+
width: 150
|
|
14548
|
+
}, {
|
|
14549
|
+
dataIndex: 'originPrice',
|
|
14550
|
+
title: "\u6807\u51C6\u5355\u4EF7",
|
|
14551
|
+
width: 150
|
|
14552
|
+
}, {
|
|
14553
|
+
dataIndex: 'originAmount',
|
|
14554
|
+
title: "\u6807\u51C6\u91D1\u989D",
|
|
14555
|
+
width: 150
|
|
14556
|
+
}, {
|
|
14557
|
+
dataIndex: 'discountFee',
|
|
14558
|
+
title: "\u8BA9\u5229\u91D1\u989D",
|
|
14559
|
+
width: 150
|
|
14560
|
+
}, {
|
|
14561
|
+
dataIndex: 'amountAfter',
|
|
14562
|
+
title: "\u8BA9\u5229\u540E\u91D1\u989D",
|
|
14563
|
+
width: 150
|
|
14564
|
+
}, {
|
|
14565
|
+
dataIndex: 'isGift',
|
|
14566
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
14567
|
+
width: 150,
|
|
14568
|
+
render: function render(val, record, index) {
|
|
14569
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14570
|
+
value: val,
|
|
14571
|
+
onChange: function onChange(value) {
|
|
14572
|
+
updateHandle(value, index, 'isGift');
|
|
14573
|
+
},
|
|
14574
|
+
options: [{
|
|
14575
|
+
label: '是',
|
|
14576
|
+
value: 1
|
|
14577
|
+
}, {
|
|
14578
|
+
label: '否',
|
|
14579
|
+
value: 0
|
|
14580
|
+
}]
|
|
14581
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
14582
|
+
}
|
|
14583
|
+
}].map(function (item) {
|
|
14584
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14585
|
+
align: 'center',
|
|
14586
|
+
ellipsis: true
|
|
14587
|
+
});
|
|
14363
14588
|
})
|
|
14364
14589
|
};
|
|
14365
14590
|
};
|
|
@@ -15290,6 +15515,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
15290
15515
|
case 'JST_EXCHANGE_GOODS':
|
|
15291
15516
|
case 'JST_RETURN_GOODS':
|
|
15292
15517
|
case 'GY_REISSUE_GOODS':
|
|
15518
|
+
case 'GY_RETURN_GOODS':
|
|
15293
15519
|
{
|
|
15294
15520
|
columns = getColumnsMap({
|
|
15295
15521
|
text: text,
|
|
@@ -17056,12 +17282,13 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17056
17282
|
};
|
|
17057
17283
|
|
|
17058
17284
|
var componentMap$2 = {
|
|
17059
|
-
|
|
17285
|
+
WDT_RETURN_GOODS: {
|
|
17060
17286
|
type: 'wdt',
|
|
17061
17287
|
valueKey: 'wdtReturnGoods',
|
|
17062
17288
|
returnTypeKey: 'wdtReturnType',
|
|
17063
17289
|
name: '旺店通',
|
|
17064
17290
|
eventNameMap: {
|
|
17291
|
+
// pubsub 事件
|
|
17065
17292
|
changeShopCode: 'wdtChangeShopCode',
|
|
17066
17293
|
returnType: 'wdtReturnType',
|
|
17067
17294
|
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
@@ -18680,7 +18907,7 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
18680
18907
|
onClick: function onClick() {
|
|
18681
18908
|
return setChangeIndex(index);
|
|
18682
18909
|
}
|
|
18683
|
-
}, msgTypeCh[key], item.ruleName);
|
|
18910
|
+
}, msgTypeCh[key] || key, item.ruleName);
|
|
18684
18911
|
}))) : null, type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
18685
18912
|
showSearch: true,
|
|
18686
18913
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
@@ -19129,12 +19356,17 @@ var GyReissue = function GyReissue(props) {
|
|
|
19129
19356
|
console.log('商品发生变化', newValue["".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)]);
|
|
19130
19357
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19131
19358
|
}, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
|
|
19132
|
-
|
|
19359
|
+
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19133
19360
|
var showChangeBtn = useMemo(function () {
|
|
19134
19361
|
var _typeMap$type27;
|
|
19135
19362
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
19136
19363
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
19137
|
-
return /*#__PURE__*/React.createElement(
|
|
19364
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19365
|
+
id: "TEST_GY",
|
|
19366
|
+
onClick: function onClick() {
|
|
19367
|
+
console.log('TEST_GY', value);
|
|
19368
|
+
}
|
|
19369
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
19138
19370
|
gutter: 8,
|
|
19139
19371
|
wrap: true
|
|
19140
19372
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
@@ -19205,4 +19437,295 @@ var GyReissue = function GyReissue(props) {
|
|
|
19205
19437
|
})));
|
|
19206
19438
|
};
|
|
19207
19439
|
|
|
19208
|
-
|
|
19440
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type"],
|
|
19441
|
+
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19442
|
+
var typeMap$5 = {
|
|
19443
|
+
GY_RETURN_GOODS: {
|
|
19444
|
+
key: 'gyReturnGoods',
|
|
19445
|
+
name: '管易',
|
|
19446
|
+
typeName: 'gyReturnType',
|
|
19447
|
+
systemOrder: 'gySystemOrder',
|
|
19448
|
+
systemOrderNo: 'gySystemOrderNo',
|
|
19449
|
+
returnSelectList: 'gyReturnSelectList',
|
|
19450
|
+
returnSelectListReturn: 'gyReturnSelectListReturn',
|
|
19451
|
+
returnDeleteGood: 'gyReturnDeleteGood',
|
|
19452
|
+
changeShopCode: 'gyChangeShopCode',
|
|
19453
|
+
returnType: 'gyReturnType',
|
|
19454
|
+
formatDefaultField: {
|
|
19455
|
+
money: 'orderPrice',
|
|
19456
|
+
share: 'sharePrice'
|
|
19457
|
+
},
|
|
19458
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
19459
|
+
}
|
|
19460
|
+
};
|
|
19461
|
+
var GyReturnGoods = function GyReturnGoods(props) {
|
|
19462
|
+
var _value$gySystemOrder, _typeMap$type10, _typeMap$type28, _typeMap$type29, _value$typeMap$type$s5, _typeMap$type30, _typeMap$type31, _typeMap$type32;
|
|
19463
|
+
var value = props.value,
|
|
19464
|
+
onChange = props.onChange,
|
|
19465
|
+
_props$reasonList = props.reasonList,
|
|
19466
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19467
|
+
disabled = props.disabled,
|
|
19468
|
+
type = props.type,
|
|
19469
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19470
|
+
var valueRef = useRef({});
|
|
19471
|
+
var getOrderFlag = useRef(false);
|
|
19472
|
+
var _useState = useState(false),
|
|
19473
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19474
|
+
isStrict = _useState2[0],
|
|
19475
|
+
setIsStrict = _useState2[1];
|
|
19476
|
+
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$gySystemOrder = value.gySystemOrder) === null || _value$gySystemOrder === void 0 ? void 0 : _value$gySystemOrder.orders) || []).some(function (order) {
|
|
19477
|
+
var _order$platformCode;
|
|
19478
|
+
return order === null || order === void 0 ? void 0 : (_order$platformCode = order.platformCode) === null || _order$platformCode === void 0 ? void 0 : _order$platformCode.includes(';');
|
|
19479
|
+
});
|
|
19480
|
+
useEffect(function () {
|
|
19481
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
19482
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$5[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$5[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
19483
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19484
|
+
getOrderFlag.current = true;
|
|
19485
|
+
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$5[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
19486
|
+
}
|
|
19487
|
+
return;
|
|
19488
|
+
}, [value]);
|
|
19489
|
+
// useEffect(() => {
|
|
19490
|
+
// pubsub.subscribe('returnSelectList', (_: any, data: any) => {
|
|
19491
|
+
// if (disabled) return;
|
|
19492
|
+
// const newValue = { ...data.goodValue, shopCode: data?.shopCode };
|
|
19493
|
+
// newValue.gyReturnGoods = data?.list || [];
|
|
19494
|
+
// onChange?.(newValue);
|
|
19495
|
+
// });
|
|
19496
|
+
// }, []);
|
|
19497
|
+
// useEffect(() => {
|
|
19498
|
+
// pubsub.subscribe('returnSelectListReturn', (_: any, data: any) => {
|
|
19499
|
+
// // console.log('returnSelectListReturn', data);
|
|
19500
|
+
// if (disabled) return;
|
|
19501
|
+
// const newValue = { ...data.goodValue, shopCode: data?.shopCode };
|
|
19502
|
+
// newValue.gyReturnGoods = data?.list || [];
|
|
19503
|
+
// onChange?.(newValue);
|
|
19504
|
+
// });
|
|
19505
|
+
// }, []);
|
|
19506
|
+
// useEffect(() => {
|
|
19507
|
+
// valueRef.current = value;
|
|
19508
|
+
// pubsub.subscribeOnce('returnDeleteGood', (_: any, data: any) => {
|
|
19509
|
+
// if (disabled) return;
|
|
19510
|
+
// if (value) {
|
|
19511
|
+
// const newValue = { ...value };
|
|
19512
|
+
// newValue.gyReturnGoods = newValue.gyReturnGoods.filter(
|
|
19513
|
+
// (item: any) => item.sku !== data,
|
|
19514
|
+
// );
|
|
19515
|
+
// onChange?.(newValue);
|
|
19516
|
+
// }
|
|
19517
|
+
// });
|
|
19518
|
+
// pubsub.subscribeOnce('changeShopCode', (type: any, data: any) => {
|
|
19519
|
+
// onChange({
|
|
19520
|
+
// ...value,
|
|
19521
|
+
// shopCode: data.shopCode,
|
|
19522
|
+
// });
|
|
19523
|
+
// });
|
|
19524
|
+
// }, [value, disabled]);
|
|
19525
|
+
var getOrderList = /*#__PURE__*/function () {
|
|
19526
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19527
|
+
var _typeMap$type4;
|
|
19528
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19529
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19530
|
+
case 0:
|
|
19531
|
+
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
19532
|
+
var _typeMap$type5, _typeMap$type6;
|
|
19533
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19534
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
19535
|
+
var billNo = _ref2.billNo,
|
|
19536
|
+
billType = _ref2.billType,
|
|
19537
|
+
billTag = _ref2.billTag,
|
|
19538
|
+
tradeTagName = _ref2.tradeTagName,
|
|
19539
|
+
deliveryState = _ref2.deliveryState,
|
|
19540
|
+
vipCode = _ref2.vipCode,
|
|
19541
|
+
shopCode = _ref2.shopCode,
|
|
19542
|
+
rest = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
19543
|
+
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
19544
|
+
billNo: billNo,
|
|
19545
|
+
billType: billType,
|
|
19546
|
+
billTag: billTag,
|
|
19547
|
+
tradeTagName: tradeTagName,
|
|
19548
|
+
deliveryState: deliveryState,
|
|
19549
|
+
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
19550
|
+
vipCode: vipCode,
|
|
19551
|
+
shopCode: shopCode
|
|
19552
|
+
});
|
|
19553
|
+
});
|
|
19554
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]), {}, {
|
|
19555
|
+
showOrderInfo: showOrderInfo,
|
|
19556
|
+
orders: orders
|
|
19557
|
+
}))));
|
|
19558
|
+
});
|
|
19559
|
+
case 1:
|
|
19560
|
+
case "end":
|
|
19561
|
+
return _context.stop();
|
|
19562
|
+
}
|
|
19563
|
+
}, _callee);
|
|
19564
|
+
}));
|
|
19565
|
+
return function getOrderList(_x) {
|
|
19566
|
+
return _ref.apply(this, arguments);
|
|
19567
|
+
};
|
|
19568
|
+
}();
|
|
19569
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
19570
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy, _typeMap$type9;
|
|
19571
|
+
var newValue = _objectSpread2({}, value);
|
|
19572
|
+
// 原订单商品
|
|
19573
|
+
var originTradeGoodList = getGoodDetails({
|
|
19574
|
+
mode: isStrict
|
|
19575
|
+
}) || [];
|
|
19576
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19577
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type7 = typeMap$5[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.key)]) || [];
|
|
19578
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19579
|
+
return skuList.includes(item.uuid);
|
|
19580
|
+
});
|
|
19581
|
+
console.log('商品发生变化', newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)]);
|
|
19582
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19583
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.key)], isStrict]);
|
|
19584
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19585
|
+
var _value$typeMap$type$t, _typeMap$type11, _typeMap$type12;
|
|
19586
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19587
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
19588
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19589
|
+
var newValue = _objectSpread2({}, value);
|
|
19590
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19591
|
+
if (typeName === '1') {
|
|
19592
|
+
var _typeMap$type13;
|
|
19593
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19594
|
+
mode: isStrict
|
|
19595
|
+
});
|
|
19596
|
+
} else if (typeName === '2') {
|
|
19597
|
+
var _typeMap$type14;
|
|
19598
|
+
// 切换到非原单,清空列表
|
|
19599
|
+
newValue[(_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19600
|
+
}
|
|
19601
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19602
|
+
};
|
|
19603
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19604
|
+
var _typeMap$type15;
|
|
19605
|
+
var newValue = _objectSpread2({}, value);
|
|
19606
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key)] = (val || []).map(function (item) {
|
|
19607
|
+
var _typeMap$type16, _typeMap$type17;
|
|
19608
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.money)] = 0;
|
|
19609
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.formatDefaultField.share)] = 0;
|
|
19610
|
+
return item;
|
|
19611
|
+
});
|
|
19612
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19613
|
+
};
|
|
19614
|
+
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19615
|
+
var _typeMap$type18, _value$typeMap$type$t2, _typeMap$type19, _value$typeMap$type$t3, _typeMap$type21;
|
|
19616
|
+
var newValue = _objectSpread2({}, value);
|
|
19617
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo)] = val;
|
|
19618
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
19619
|
+
var _typeMap$type20;
|
|
19620
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.key)] = [];
|
|
19621
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type21 = typeMap$5[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])) {
|
|
19622
|
+
var _typeMap$type22;
|
|
19623
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = getGoodDetails({
|
|
19624
|
+
mode: isStrict,
|
|
19625
|
+
sysOrderNo: val
|
|
19626
|
+
});
|
|
19627
|
+
}
|
|
19628
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19629
|
+
};
|
|
19630
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
19631
|
+
var _typeMap$type23, _typeMap$type24, _order$details;
|
|
19632
|
+
var mode = _ref3.mode,
|
|
19633
|
+
sysOrderNo = _ref3.sysOrderNo;
|
|
19634
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrder];
|
|
19635
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo];
|
|
19636
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19637
|
+
return order.code === systemOrderNo;
|
|
19638
|
+
});
|
|
19639
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$details = order.details) === null || _order$details === void 0 ? void 0 : _order$details.length) ? updateGyGoodsHandle([order]) : [];
|
|
19640
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
19641
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
19642
|
+
return !orderNo || (orderNo || '').includes(goodItem.oid);
|
|
19643
|
+
}) : goodDetails;
|
|
19644
|
+
};
|
|
19645
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
19646
|
+
var _value$typeMap$type$t4, _typeMap$type25, _typeMap$type26;
|
|
19647
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
19648
|
+
setIsStrict(mode);
|
|
19649
|
+
if (!isOriginalOrder) return;
|
|
19650
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key, getGoodDetails({
|
|
19651
|
+
mode: mode
|
|
19652
|
+
}))));
|
|
19653
|
+
};
|
|
19654
|
+
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
19655
|
+
var showChangeBtn = useMemo(function () {
|
|
19656
|
+
var _typeMap$type27;
|
|
19657
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
19658
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo]]);
|
|
19659
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
19660
|
+
gutter: 8,
|
|
19661
|
+
wrap: true
|
|
19662
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
19663
|
+
className: "gutter-row",
|
|
19664
|
+
xs: {
|
|
19665
|
+
span: 11
|
|
19666
|
+
},
|
|
19667
|
+
sm: {
|
|
19668
|
+
span: 6
|
|
19669
|
+
}
|
|
19670
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
19671
|
+
style: {
|
|
19672
|
+
marginBottom: '8px'
|
|
19673
|
+
},
|
|
19674
|
+
disabled: disabled,
|
|
19675
|
+
allowClear: false,
|
|
19676
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrderNo)],
|
|
19677
|
+
onChange: function onChange(val) {
|
|
19678
|
+
return changeSystemOrderHandle(val);
|
|
19679
|
+
},
|
|
19680
|
+
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
19681
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type30 = typeMap$5[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) {
|
|
19682
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
19683
|
+
key: item.billNo,
|
|
19684
|
+
value: item.billNo,
|
|
19685
|
+
label: item.billNo
|
|
19686
|
+
}, item.billNo);
|
|
19687
|
+
}))), /*#__PURE__*/React.createElement(Col, {
|
|
19688
|
+
className: "gutter-row",
|
|
19689
|
+
xs: {
|
|
19690
|
+
span: 11
|
|
19691
|
+
},
|
|
19692
|
+
sm: {
|
|
19693
|
+
span: 6
|
|
19694
|
+
}
|
|
19695
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
19696
|
+
style: {
|
|
19697
|
+
marginBottom: '8px'
|
|
19698
|
+
},
|
|
19699
|
+
disabled: disabled,
|
|
19700
|
+
allowClear: false,
|
|
19701
|
+
options: reasonList,
|
|
19702
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.typeName)],
|
|
19703
|
+
onChange: function onChange(val) {
|
|
19704
|
+
return changeTypeHandle(val);
|
|
19705
|
+
}
|
|
19706
|
+
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
19707
|
+
key: 'returnGoods'
|
|
19708
|
+
}, other), {}, {
|
|
19709
|
+
type: type,
|
|
19710
|
+
disabled: disabled,
|
|
19711
|
+
canUpdateNumber: showChangeBtn,
|
|
19712
|
+
showChangeBtn: showChangeBtn,
|
|
19713
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19714
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type32 = typeMap$5[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.key)],
|
|
19715
|
+
onChange: function onChange(val) {
|
|
19716
|
+
return changeGoodHandle(val);
|
|
19717
|
+
},
|
|
19718
|
+
onModeChange: handleModeChange,
|
|
19719
|
+
showModeBtn: showModeBtn,
|
|
19720
|
+
isStrict: isStrict,
|
|
19721
|
+
showErpGoodsBtn: false,
|
|
19722
|
+
tradeGoods: {
|
|
19723
|
+
originDataSource: getGoodDetails({
|
|
19724
|
+
mode: isStrict
|
|
19725
|
+
}),
|
|
19726
|
+
selectedGoodsChange: selectedGoodsChange
|
|
19727
|
+
}
|
|
19728
|
+
})));
|
|
19729
|
+
};
|
|
19730
|
+
|
|
19731
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, getColumns$5 as getJstColumns };
|