Compare commits
6 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8d3c3ff71c | |
|
|
5f1c6eeb44 | |
|
|
0abe06d9df | |
|
|
860b7970c8 | |
|
|
67aa625785 | |
|
|
1d9838f72e |
|
|
@ -393,6 +393,14 @@ const UpdateForm: React.FC<{
|
|||
}));
|
||||
}}
|
||||
/>
|
||||
<ProFormText
|
||||
name={['email']}
|
||||
label="邮箱"
|
||||
width="lg"
|
||||
placeholder="请输入邮箱"
|
||||
required
|
||||
rules={[{ required: true, message: '请输入邮箱' }]}
|
||||
/>
|
||||
<ProForm.Group title="地址">
|
||||
<ProFormText
|
||||
name={['address', 'country']}
|
||||
|
|
@ -431,6 +439,8 @@ const UpdateForm: React.FC<{
|
|||
required
|
||||
rules={[{ required: true, message: '请输入详细地址' }]}
|
||||
/>
|
||||
|
||||
|
||||
</ProForm.Group>
|
||||
<ProFormItem
|
||||
name="contact"
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ import {
|
|||
} from 'antd';
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const ListPage: React.FC = () => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
|
|
@ -1267,7 +1268,10 @@ const Shipping: React.FC<{
|
|||
const [rates, setRates] = useState<API.RateDTO[]>([]);
|
||||
const [ratesLoading, setRatesLoading] = useState(false);
|
||||
const { message } = App.useApp();
|
||||
|
||||
const [shipmentPlatforms, setShipmentPlatforms] = useState([
|
||||
{ label: 'uniuni', value: 'uniuni' },
|
||||
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
||||
]);
|
||||
return (
|
||||
<ModalForm
|
||||
formRef={formRef}
|
||||
|
|
@ -1296,6 +1300,7 @@ const Shipping: React.FC<{
|
|||
await ordercontrollerGetorderdetail({
|
||||
orderId: id,
|
||||
});
|
||||
console.log('success data',success,data)
|
||||
if (!success || !data) return {};
|
||||
data.sales = data.sales?.reduce(
|
||||
(acc: API.OrderSale[], cur: API.OrderSale) => {
|
||||
|
|
@ -1318,7 +1323,8 @@ const Shipping: React.FC<{
|
|||
if (reShipping) data.sales = [{}];
|
||||
let shipmentInfo = localStorage.getItem('shipmentInfo');
|
||||
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
||||
return {
|
||||
const a = {
|
||||
shipmentPlatform: 'uniuni',
|
||||
...data,
|
||||
// payment_method_id: shipmentInfo?.payment_method_id,
|
||||
stockPointId: shipmentInfo?.stockPointId,
|
||||
|
|
@ -1378,6 +1384,7 @@ const Shipping: React.FC<{
|
|||
},
|
||||
},
|
||||
};
|
||||
return a
|
||||
}}
|
||||
onFinish={async ({
|
||||
customer_note,
|
||||
|
|
@ -1441,7 +1448,18 @@ const Shipping: React.FC<{
|
|||
}
|
||||
}}
|
||||
>
|
||||
<ProFormText label="订单号" readonly name={'externalOrderId'} />
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<ProFormSelect
|
||||
name="shipmentPlatform"
|
||||
label="发货平台"
|
||||
options={shipmentPlatforms}
|
||||
placeholder="请选择发货平台"
|
||||
rules={[{ required: true, message: '请选择一个选项' }]}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<ProFormText label="订单号" readonly name='externalOrderId' />
|
||||
<ProFormText label="客户备注" readonly name="customer_note" />
|
||||
<ProFormList
|
||||
label="后台备注"
|
||||
|
|
@ -1573,16 +1591,21 @@ const Shipping: React.FC<{
|
|||
title="发货信息"
|
||||
extra={
|
||||
<AddressPicker
|
||||
onChange={({
|
||||
address,
|
||||
phone_number,
|
||||
phone_number_extension,
|
||||
stockPointId,
|
||||
}) => {
|
||||
onChange={(row) => {
|
||||
console.log(row);
|
||||
const {
|
||||
address,
|
||||
phone_number,
|
||||
phone_number_extension,
|
||||
stockPointId,
|
||||
email,
|
||||
} = row;
|
||||
formRef?.current?.setFieldsValue({
|
||||
stockPointId,
|
||||
// address_id: row.id,
|
||||
details: {
|
||||
origin: {
|
||||
email_addresses:email,
|
||||
address,
|
||||
phone_number: {
|
||||
phone: phone_number,
|
||||
|
|
@ -1595,6 +1618,11 @@ const Shipping: React.FC<{
|
|||
/>
|
||||
}
|
||||
>
|
||||
{/* <ProFormText
|
||||
label="address_id"
|
||||
name={'address_id'}
|
||||
rules={[{ required: true, message: '请输入ID' }]}
|
||||
/> */}
|
||||
<ProFormSelect
|
||||
name="stockPointId"
|
||||
width="md"
|
||||
|
|
@ -1687,7 +1715,6 @@ const Shipping: React.FC<{
|
|||
<ProFormText
|
||||
label="公司名称"
|
||||
name={['details', 'destination', 'name']}
|
||||
rules={[{ required: true, message: '请输入公司名称' }]}
|
||||
/>
|
||||
<ProFormItem
|
||||
name={['details', 'destination', 'address', 'country']}
|
||||
|
|
@ -2017,6 +2044,7 @@ const Shipping: React.FC<{
|
|||
details.origin.phone_number.number =
|
||||
details.origin.phone_number.phone;
|
||||
const res = await logisticscontrollerGetshipmentfee({
|
||||
shipmentPlatform: data.shipmentPlatform,
|
||||
stockPointId: data.stockPointId,
|
||||
|
||||
sender: details.origin.contact_name,
|
||||
|
|
@ -2343,7 +2371,7 @@ const CreateOrder: React.FC<{
|
|||
<ProFormText
|
||||
label="公司名称"
|
||||
name={['billing', 'company']}
|
||||
rules={[{ required: true, message: '请输入公司名称' }]}
|
||||
rules={[{ message: '请输入公司名称' }]}
|
||||
/>
|
||||
<ProFormItem
|
||||
name={['billing', 'country']}
|
||||
|
|
@ -2429,6 +2457,11 @@ const AddressPicker: React.FC<{
|
|||
value: item.id,
|
||||
}));
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'id',
|
||||
dataIndex: ['id'],
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '地区',
|
||||
|
|
@ -2456,6 +2489,11 @@ const AddressPicker: React.FC<{
|
|||
`+${record.phone_number_extension} ${record.phone_number}`,
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
dataIndex: [ 'email'],
|
||||
hideInSearch: true,
|
||||
},
|
||||
];
|
||||
return (
|
||||
<ModalForm
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState, useMemo } from 'react';
|
||||
import { PageContainer, ProFromSelect } from '@ant-design/pro-components';
|
||||
import { PageContainer, ProFormSelect } from '@ant-design/pro-components';
|
||||
import { Card, Collapse, Divider, Image, Select, Space, Typography, message } from 'antd';
|
||||
import { categorycontrollerGetall } from '@/servers/api/category';
|
||||
import { productcontrollerGetproductlistgrouped } from '@/servers/api/product';
|
||||
|
|
@ -272,7 +272,7 @@ const ProductGroupBy: React.FC = () => {
|
|||
{categoryAttributes.map(attr => (
|
||||
<div key={attr.id} style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Text style={{ width: '100px' }}>{attr.title}:</Text>
|
||||
<ProFromSelect
|
||||
<ProFormSelect
|
||||
placeholder={`请选择${attr.title}`}
|
||||
style={{ width: 300 }}
|
||||
value={attributeFilters[attr.name] || null}
|
||||
|
|
|
|||
|
|
@ -1627,9 +1627,11 @@ declare namespace API {
|
|||
details?: ShippingDetailsDTO;
|
||||
stockPointId?: number;
|
||||
orderIds?: number[];
|
||||
shipmentPlatform?: string;
|
||||
};
|
||||
|
||||
type ShipmentFeeBookDTO = {
|
||||
shipmentPlatform?: string;
|
||||
stockPointId?: number;
|
||||
sender?: string;
|
||||
startPhone?: string;
|
||||
|
|
@ -1650,6 +1652,7 @@ declare namespace API {
|
|||
dimensionUom?: string;
|
||||
weight?: number;
|
||||
weightUom?: string;
|
||||
address_id?: number;
|
||||
};
|
||||
|
||||
type ShippingAddress = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue