Compare commits

..

No commits in common. "8d3c3ff71c02ecf83f78ec806e7291d7a42750be" and "3690fd00f7002f2ecf5dc500d6b351f09576dc9c" have entirely different histories.

4 changed files with 13 additions and 64 deletions

View File

@ -393,14 +393,6 @@ const UpdateForm: React.FC<{
})); }));
}} }}
/> />
<ProFormText
name={['email']}
label="邮箱"
width="lg"
placeholder="请输入邮箱"
required
rules={[{ required: true, message: '请输入邮箱' }]}
/>
<ProForm.Group title="地址"> <ProForm.Group title="地址">
<ProFormText <ProFormText
name={['address', 'country']} name={['address', 'country']}
@ -439,8 +431,6 @@ const UpdateForm: React.FC<{
required required
rules={[{ required: true, message: '请输入详细地址' }]} rules={[{ required: true, message: '请输入详细地址' }]}
/> />
</ProForm.Group> </ProForm.Group>
<ProFormItem <ProFormItem
name="contact" name="contact"

View File

@ -77,7 +77,6 @@ import {
} from 'antd'; } from 'antd';
import React, { useMemo, useRef, useState } from 'react'; import React, { useMemo, useRef, useState } from 'react';
import RelatedOrders from '../../Subscription/Orders/RelatedOrders'; import RelatedOrders from '../../Subscription/Orders/RelatedOrders';
import dayjs from 'dayjs';
const ListPage: React.FC = () => { const ListPage: React.FC = () => {
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
@ -1268,10 +1267,7 @@ const Shipping: React.FC<{
const [rates, setRates] = useState<API.RateDTO[]>([]); const [rates, setRates] = useState<API.RateDTO[]>([]);
const [ratesLoading, setRatesLoading] = useState(false); const [ratesLoading, setRatesLoading] = useState(false);
const { message } = App.useApp(); const { message } = App.useApp();
const [shipmentPlatforms, setShipmentPlatforms] = useState([
{ label: 'uniuni', value: 'uniuni' },
{ label: 'tms.freightwaves', value: 'freightwaves' },
]);
return ( return (
<ModalForm <ModalForm
formRef={formRef} formRef={formRef}
@ -1300,7 +1296,6 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
await ordercontrollerGetorderdetail({ await ordercontrollerGetorderdetail({
orderId: id, orderId: id,
}); });
console.log('success data',success,data)
if (!success || !data) return {}; if (!success || !data) return {};
data.sales = data.sales?.reduce( data.sales = data.sales?.reduce(
(acc: API.OrderSale[], cur: API.OrderSale) => { (acc: API.OrderSale[], cur: API.OrderSale) => {
@ -1323,8 +1318,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
if (reShipping) data.sales = [{}]; if (reShipping) data.sales = [{}];
let shipmentInfo = localStorage.getItem('shipmentInfo'); let shipmentInfo = localStorage.getItem('shipmentInfo');
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo); if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
const a = { return {
shipmentPlatform: 'uniuni',
...data, ...data,
// payment_method_id: shipmentInfo?.payment_method_id, // payment_method_id: shipmentInfo?.payment_method_id,
stockPointId: shipmentInfo?.stockPointId, stockPointId: shipmentInfo?.stockPointId,
@ -1384,7 +1378,6 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
}, },
}, },
}; };
return a
}} }}
onFinish={async ({ onFinish={async ({
customer_note, customer_note,
@ -1448,18 +1441,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
} }
}} }}
> >
<Row gutter={16}> <ProFormText label="订单号" readonly name={'externalOrderId'} />
<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" /> <ProFormText label="客户备注" readonly name="customer_note" />
<ProFormList <ProFormList
label="后台备注" label="后台备注"
@ -1591,21 +1573,16 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
title="发货信息" title="发货信息"
extra={ extra={
<AddressPicker <AddressPicker
onChange={(row) => { onChange={({
console.log(row);
const {
address, address,
phone_number, phone_number,
phone_number_extension, phone_number_extension,
stockPointId, stockPointId,
email, }) => {
} = row;
formRef?.current?.setFieldsValue({ formRef?.current?.setFieldsValue({
stockPointId, stockPointId,
// address_id: row.id,
details: { details: {
origin: { origin: {
email_addresses:email,
address, address,
phone_number: { phone_number: {
phone: phone_number, phone: phone_number,
@ -1618,11 +1595,6 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
/> />
} }
> >
{/* <ProFormText
label="address_id"
name={'address_id'}
rules={[{ required: true, message: '请输入ID' }]}
/> */}
<ProFormSelect <ProFormSelect
name="stockPointId" name="stockPointId"
width="md" width="md"
@ -1715,6 +1687,7 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
<ProFormText <ProFormText
label="公司名称" label="公司名称"
name={['details', 'destination', 'name']} name={['details', 'destination', 'name']}
rules={[{ required: true, message: '请输入公司名称' }]}
/> />
<ProFormItem <ProFormItem
name={['details', 'destination', 'address', 'country']} name={['details', 'destination', 'address', 'country']}
@ -2044,7 +2017,6 @@ const [shipmentPlatforms, setShipmentPlatforms] = useState([
details.origin.phone_number.number = details.origin.phone_number.number =
details.origin.phone_number.phone; details.origin.phone_number.phone;
const res = await logisticscontrollerGetshipmentfee({ const res = await logisticscontrollerGetshipmentfee({
shipmentPlatform: data.shipmentPlatform,
stockPointId: data.stockPointId, stockPointId: data.stockPointId,
sender: details.origin.contact_name, sender: details.origin.contact_name,
@ -2371,7 +2343,7 @@ const CreateOrder: React.FC<{
<ProFormText <ProFormText
label="公司名称" label="公司名称"
name={['billing', 'company']} name={['billing', 'company']}
rules={[{ message: '请输入公司名称' }]} rules={[{ required: true, message: '请输入公司名称' }]}
/> />
<ProFormItem <ProFormItem
name={['billing', 'country']} name={['billing', 'country']}
@ -2457,11 +2429,6 @@ const AddressPicker: React.FC<{
value: item.id, value: item.id,
})); }));
}, },
},
{
title: 'id',
dataIndex: ['id'],
hideInSearch: true,
}, },
{ {
title: '地区', title: '地区',
@ -2489,11 +2456,6 @@ const AddressPicker: React.FC<{
`+${record.phone_number_extension} ${record.phone_number}`, `+${record.phone_number_extension} ${record.phone_number}`,
hideInSearch: true, hideInSearch: true,
}, },
{
title: '邮箱',
dataIndex: [ 'email'],
hideInSearch: true,
},
]; ];
return ( return (
<ModalForm <ModalForm

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState, useMemo } from 'react'; import React, { useEffect, useState, useMemo } from 'react';
import { PageContainer, ProFormSelect } from '@ant-design/pro-components'; import { PageContainer, ProFromSelect } from '@ant-design/pro-components';
import { Card, Collapse, Divider, Image, Select, Space, Typography, message } from 'antd'; import { Card, Collapse, Divider, Image, Select, Space, Typography, message } from 'antd';
import { categorycontrollerGetall } from '@/servers/api/category'; import { categorycontrollerGetall } from '@/servers/api/category';
import { productcontrollerGetproductlistgrouped } from '@/servers/api/product'; import { productcontrollerGetproductlistgrouped } from '@/servers/api/product';
@ -272,7 +272,7 @@ const ProductGroupBy: React.FC = () => {
{categoryAttributes.map(attr => ( {categoryAttributes.map(attr => (
<div key={attr.id} style={{ display: 'flex', alignItems: 'center' }}> <div key={attr.id} style={{ display: 'flex', alignItems: 'center' }}>
<Text style={{ width: '100px' }}>{attr.title}</Text> <Text style={{ width: '100px' }}>{attr.title}</Text>
<ProFormSelect <ProFromSelect
placeholder={`请选择${attr.title}`} placeholder={`请选择${attr.title}`}
style={{ width: 300 }} style={{ width: 300 }}
value={attributeFilters[attr.name] || null} value={attributeFilters[attr.name] || null}

View File

@ -1627,11 +1627,9 @@ declare namespace API {
details?: ShippingDetailsDTO; details?: ShippingDetailsDTO;
stockPointId?: number; stockPointId?: number;
orderIds?: number[]; orderIds?: number[];
shipmentPlatform?: string;
}; };
type ShipmentFeeBookDTO = { type ShipmentFeeBookDTO = {
shipmentPlatform?: string;
stockPointId?: number; stockPointId?: number;
sender?: string; sender?: string;
startPhone?: string; startPhone?: string;
@ -1652,7 +1650,6 @@ declare namespace API {
dimensionUom?: string; dimensionUom?: string;
weight?: number; weight?: number;
weightUom?: string; weightUom?: string;
address_id?: number;
}; };
type ShippingAddress = { type ShippingAddress = {