feat(订单): 添加快递公司选择字段并优化发货信息处理
在发货表单中添加快递公司选择字段,支持多种快递公司选项 优化发货信息处理逻辑,包括邮件地址和联系信息的正确处理
This commit is contained in:
parent
f733f06109
commit
2d0f12d0cd
|
|
@ -1201,6 +1201,12 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
{ label: 'uniuni', value: 'uniuni' },
|
{ label: 'uniuni', value: 'uniuni' },
|
||||||
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
||||||
]);
|
]);
|
||||||
|
const [courierCompany, setCourierCompany] = useState([
|
||||||
|
{ label: 'UNIUNI', value: 'UNIUNI' },
|
||||||
|
{ label: 'PuroYYZ', value: 'PuroYYZ' },
|
||||||
|
{ label: 'CPYYZ', value: 'CPYYZ' },
|
||||||
|
{ label: 'UPSYYZ7000NEW', value: 'UPSYYZ7000NEW' },
|
||||||
|
]);
|
||||||
return (
|
return (
|
||||||
<ModalForm
|
<ModalForm
|
||||||
formRef={formRef}
|
formRef={formRef}
|
||||||
|
|
@ -1252,6 +1258,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
||||||
return {
|
return {
|
||||||
shipmentPlatform: 'freightwaves',
|
shipmentPlatform: 'freightwaves',
|
||||||
|
courierCompany: 'UNIUNI',
|
||||||
...data,
|
...data,
|
||||||
// payment_method_id: shipmentInfo?.payment_method_id,
|
// payment_method_id: shipmentInfo?.payment_method_id,
|
||||||
stockPointId: shipmentInfo?.stockPointId,
|
stockPointId: shipmentInfo?.stockPointId,
|
||||||
|
|
@ -1278,7 +1285,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
},
|
},
|
||||||
origin: {
|
origin: {
|
||||||
name: data?.siteName,
|
name: data?.siteName,
|
||||||
email_addresses: data?.email,
|
email_addresses: shipmentInfo?.email_addresses,
|
||||||
contact_name: data?.siteName,
|
contact_name: data?.siteName,
|
||||||
phone_number: shipmentInfo?.phone_number,
|
phone_number: shipmentInfo?.phone_number,
|
||||||
address: {
|
address: {
|
||||||
|
|
@ -1345,6 +1352,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
postal_code: details.origin.address.postal_code,
|
postal_code: details.origin.address.postal_code,
|
||||||
address_line_1: details.origin.address.address_line_1,
|
address_line_1: details.origin.address.address_line_1,
|
||||||
phone_number: details.origin.phone_number,
|
phone_number: details.origin.phone_number,
|
||||||
|
email_addresses: details.origin.email_addresses,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -1376,6 +1384,14 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||||
rules={[{ required: true, message: '请选择一个选项' }]}
|
rules={[{ required: true, message: '请选择一个选项' }]}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<ProFormSelect
|
||||||
|
name="courierCompany"
|
||||||
|
label="快递公司"
|
||||||
|
options={courierCompany}
|
||||||
|
placeholder="请选择快递公司"
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
label="订单号"
|
label="订单号"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue