zksu
/
WEB
forked from yoone/WEB
1
0
Fork 0

Compare commits

..

4 Commits

Author SHA1 Message Date
tikkhun fba6e4f83a refactor(Customer/StatisticList): 替换客户列表接口为统计列表接口并调整排序参数格式 2026-01-30 16:44:13 +08:00
tikkhun a9c0a8728f fix(SyncForm): 修正日期格式化中的秒数显示问题 2026-01-30 16:17:02 +08:00
tikkhun 079f397adf fix: 移除订单列表页中的调试日志 2026-01-30 11:56:54 +08:00
tikkhun 80dcfffbe1 fix(Product): 禁用批量创建套装按钮当未选择行时
fix(Order): 调整同步订单日期范围格式并添加调试日志

fix(Customer): 优化客户信息显示逻辑和空值处理

refactor(SyncForm): 重构同步表单初始值和日期处理逻辑
2026-01-30 10:28:39 +08:00
4 changed files with 309 additions and 380 deletions

View File

@ -1381,17 +1381,10 @@ const Shipping: React.FC<{
const [rates, setRates] = useState<API.RateDTO[]>([]);
const [ratesLoading, setRatesLoading] = useState(false);
const { message } = App.useApp();
const [shipmentPlatforms, setShipmentPlatforms] = useState([
const [shipmentPlatforms, setShipmentPlatforms] = useState([
{ label: 'uniuni', value: 'uniuni' },
{ label: 'tms.freightwaves', value: 'freightwaves' },
]);
const [courierCompany, setCourierCompany] = useState([
{ label: '最佳物流', value: '' },
{ label: 'UNIUNI', value: 'UNIUNI' },
{ label: 'PuroYYZ', value: 'PuroYYZ' },
{ label: 'CPYYZ', value: 'CPYYZ' },
{ label: 'UPSYYZ7000NEW', value: 'UPSYYZ7000NEW' },
]);
return (
<ModalForm
formRef={formRef}
@ -1420,7 +1413,7 @@ const Shipping: React.FC<{
await ordercontrollerGetorderdetail({
orderId: id,
});
console.log('success data', success, data)
console.log('success data',success,data)
if (!success || !data) return {};
data.sales = data.sales?.reduce(
(acc: API.OrderSale[], cur: API.OrderSale) => {
@ -1444,8 +1437,7 @@ const Shipping: React.FC<{
let shipmentInfo = localStorage.getItem('shipmentInfo');
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
const a = {
shipmentPlatform: 'freightwaves',
courierCompany: '',
shipmentPlatform: 'uniuni',
...data,
// payment_method_id: shipmentInfo?.payment_method_id,
stockPointId: shipmentInfo?.stockPointId,
@ -1472,7 +1464,7 @@ const Shipping: React.FC<{
},
origin: {
name: data?.name,
email_addresses: shipmentInfo?.email_addresses,
email_addresses: data?.email,
contact_name: data?.name,
phone_number: shipmentInfo?.phone_number,
address: {
@ -1516,7 +1508,7 @@ const Shipping: React.FC<{
...data
}) => {
details.origin.email_addresses =
details.origin.email_addresses;
details.origin.email_addresses.split(',');
details.destination.email_addresses =
details.destination.email_addresses.split(',');
details.destination.phone_number.number =
@ -1549,7 +1541,6 @@ const Shipping: React.FC<{
postal_code: details.origin.address.postal_code,
address_line_1: details.origin.address.address_line_1,
phone_number: details.origin.phone_number,
email_addresses: details.origin.email_addresses,
}),
);
@ -1580,14 +1571,6 @@ const Shipping: React.FC<{
rules={[{ required: true, message: '请选择一个选项' }]}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="courierCompany"
label="快递公司"
options={courierCompany}
placeholder="请选择快递公司"
/>
</Col>
</Row>
<ProFormText label="订单号" readonly name='externalOrderId' />
<ProFormText label="客户备注" readonly name="customer_note" />
@ -1735,7 +1718,7 @@ const Shipping: React.FC<{
// address_id: row.id,
details: {
origin: {
email_addresses: email,
email_addresses:email,
address,
phone_number: {
phone: phone_number,
@ -2166,7 +2149,7 @@ const Shipping: React.FC<{
const originEmail = details.origin.email_addresses;
const destinationEmail = details.destination.email_addresses;
details.origin.email_addresses =
details.origin.email_addresses;
details.origin.email_addresses.split(',');
details.destination.email_addresses =
details.destination.email_addresses.split(',');
details.destination.phone_number.number =
@ -2621,7 +2604,7 @@ const AddressPicker: React.FC<{
},
{
title: '邮箱',
dataIndex: ['email'],
dataIndex: [ 'email'],
hideInSearch: true,
},
];

View File

@ -12,7 +12,6 @@ import * as order from './order';
import * as product from './product';
import * as site from './site';
import * as siteApi from './siteApi';
import * as siteProduct from './siteProduct';
import * as statistics from './statistics';
import * as stock from './stock';
import * as subscription from './subscription';
@ -29,7 +28,6 @@ export default {
order,
product,
siteApi,
siteProduct,
site,
statistics,
stock,

View File

@ -1,33 +0,0 @@
// @ts-ignore
/* eslint-disable */
import { request } from 'umi';
/** 此处后端没有提供注释 GET /site-product/list */
export async function siteproductcontrollerGetsiteproductlist(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.siteproductcontrollerGetsiteproductlistParams,
options?: { [key: string]: any },
) {
return request<any>('/site-product/list', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 此处后端没有提供注释 POST /site-product/sync */
export async function siteproductcontrollerSyncsiteproducts(
body: number,
options?: { [key: string]: any },
) {
return request<any>('/site-product/sync', {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
},
data: body,
...(options || {}),
});
}

View File

@ -1103,8 +1103,8 @@ declare namespace API {
categoryId?: number;
/** 库存组成 */
components?: ProductStockComponent[];
/** 站点 SKU关联 */
siteSkus?: SiteSku[];
/** 站点 SKU 列表 */
siteSkus?: string[];
/** 来源 */
source?: number;
/** 创建时间 */
@ -1630,12 +1630,10 @@ declare namespace API {
stockPointId?: number;
orderIds?: number[];
shipmentPlatform?: string;
courierCompany?: string;
};
type ShipmentFeeBookDTO = {
shipmentPlatform?: string;
courierCompany?: string;
stockPointId?: number;
sender?: string;
startPhone?: Record<string, any>;
@ -2223,23 +2221,6 @@ declare namespace API {
id: string;
};
type siteproductcontrollerGetsiteproductlistParams = {
sku?: string;
name?: string;
siteId?: number;
pageSize?: number;
current?: number;
};
type SiteSku = {
/** sku */
sku?: string;
/** 商品ID */
productId?: number;
/** 是否旧版数据 */
isOld?: boolean;
};
type SitesResponse = {
/** 状态码 */
code?: number;