feat(订单列表): 添加最佳物流选项并优化邮件地址处理
添加"最佳物流"到快递公司选项列表 将origin.email_addresses改为直接使用而不分割,保持与destination.email_addresses处理方式一致
This commit is contained in:
parent
bf41887b6b
commit
49eeb7f47e
|
|
@ -1386,6 +1386,7 @@ const Shipping: React.FC<{
|
||||||
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
{ label: 'tms.freightwaves', value: 'freightwaves' },
|
||||||
]);
|
]);
|
||||||
const [courierCompany, setCourierCompany] = useState([
|
const [courierCompany, setCourierCompany] = useState([
|
||||||
|
{ label: '最佳物流', value: '最优物流' },
|
||||||
{ label: 'UNIUNI', value: 'UNIUNI' },
|
{ label: 'UNIUNI', value: 'UNIUNI' },
|
||||||
{ label: 'PuroYYZ', value: 'PuroYYZ' },
|
{ label: 'PuroYYZ', value: 'PuroYYZ' },
|
||||||
{ label: 'CPYYZ', value: 'CPYYZ' },
|
{ label: 'CPYYZ', value: 'CPYYZ' },
|
||||||
|
|
@ -1444,7 +1445,7 @@ const Shipping: React.FC<{
|
||||||
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
if (shipmentInfo) shipmentInfo = JSON.parse(shipmentInfo);
|
||||||
const a = {
|
const a = {
|
||||||
shipmentPlatform: 'uniuni',
|
shipmentPlatform: 'uniuni',
|
||||||
courierCompany: 'UNIUNI',
|
courierCompany: '最优物流',
|
||||||
...data,
|
...data,
|
||||||
// payment_method_id: shipmentInfo?.payment_method_id,
|
// payment_method_id: shipmentInfo?.payment_method_id,
|
||||||
stockPointId: shipmentInfo?.stockPointId,
|
stockPointId: shipmentInfo?.stockPointId,
|
||||||
|
|
@ -1514,8 +1515,9 @@ const Shipping: React.FC<{
|
||||||
externalOrderId,
|
externalOrderId,
|
||||||
...data
|
...data
|
||||||
}) => {
|
}) => {
|
||||||
|
debugger
|
||||||
details.origin.email_addresses =
|
details.origin.email_addresses =
|
||||||
details.origin.email_addresses.split(',');
|
details.origin.email_addresses;
|
||||||
details.destination.email_addresses =
|
details.destination.email_addresses =
|
||||||
details.destination.email_addresses.split(',');
|
details.destination.email_addresses.split(',');
|
||||||
details.destination.phone_number.number =
|
details.destination.phone_number.number =
|
||||||
|
|
@ -2165,7 +2167,7 @@ const Shipping: React.FC<{
|
||||||
const originEmail = details.origin.email_addresses;
|
const originEmail = details.origin.email_addresses;
|
||||||
const destinationEmail = details.destination.email_addresses;
|
const destinationEmail = details.destination.email_addresses;
|
||||||
details.origin.email_addresses =
|
details.origin.email_addresses =
|
||||||
details.origin.email_addresses.split(',');
|
details.origin.email_addresses;
|
||||||
details.destination.email_addresses =
|
details.destination.email_addresses =
|
||||||
details.destination.email_addresses.split(',');
|
details.destination.email_addresses.split(',');
|
||||||
details.destination.phone_number.number =
|
details.destination.phone_number.number =
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import * as order from './order';
|
||||||
import * as product from './product';
|
import * as product from './product';
|
||||||
import * as site from './site';
|
import * as site from './site';
|
||||||
import * as siteApi from './siteApi';
|
import * as siteApi from './siteApi';
|
||||||
|
import * as siteProduct from './siteProduct';
|
||||||
import * as statistics from './statistics';
|
import * as statistics from './statistics';
|
||||||
import * as stock from './stock';
|
import * as stock from './stock';
|
||||||
import * as subscription from './subscription';
|
import * as subscription from './subscription';
|
||||||
|
|
@ -28,6 +29,7 @@ export default {
|
||||||
order,
|
order,
|
||||||
product,
|
product,
|
||||||
siteApi,
|
siteApi,
|
||||||
|
siteProduct,
|
||||||
site,
|
site,
|
||||||
statistics,
|
statistics,
|
||||||
stock,
|
stock,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
// @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 || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1103,8 +1103,8 @@ declare namespace API {
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
/** 库存组成 */
|
/** 库存组成 */
|
||||||
components?: ProductStockComponent[];
|
components?: ProductStockComponent[];
|
||||||
/** 站点 SKU 列表 */
|
/** 站点 SKU关联 */
|
||||||
siteSkus?: string[];
|
siteSkus?: SiteSku[];
|
||||||
/** 来源 */
|
/** 来源 */
|
||||||
source?: number;
|
source?: number;
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
|
|
@ -1630,10 +1630,12 @@ declare namespace API {
|
||||||
stockPointId?: number;
|
stockPointId?: number;
|
||||||
orderIds?: number[];
|
orderIds?: number[];
|
||||||
shipmentPlatform?: string;
|
shipmentPlatform?: string;
|
||||||
|
courierCompany?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ShipmentFeeBookDTO = {
|
type ShipmentFeeBookDTO = {
|
||||||
shipmentPlatform?: string;
|
shipmentPlatform?: string;
|
||||||
|
courierCompany?: string;
|
||||||
stockPointId?: number;
|
stockPointId?: number;
|
||||||
sender?: string;
|
sender?: string;
|
||||||
startPhone?: Record<string, any>;
|
startPhone?: Record<string, any>;
|
||||||
|
|
@ -2221,6 +2223,23 @@ declare namespace API {
|
||||||
id: string;
|
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 = {
|
type SitesResponse = {
|
||||||
/** 状态码 */
|
/** 状态码 */
|
||||||
code?: number;
|
code?: number;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue