WEB/src/api/setting.expressInterface/expressInterface.ts
liufumingren 3641af8694 1
2026-06-01 03:01:02 +08:00

131 lines
2.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from '@/utils/request'
const v = '1.0'
export type ExpressInterfacePagination = {
page?: number
pageSize?: number
currentPage?: number
page_size?: number
size?: number
}
export type ExpressInterfaceListParams = {
pagination?: ExpressInterfacePagination
where?: Record<string, any>
}
export function expressInterfaceList(data?: ExpressInterfaceListParams) {
return request({
url: '/system',
method: 'post',
params: {
method: 'setting.expressInterface.list',
v,
timestamp: new Date().getTime()
},
data: data || {}
})
}
export function expressInterfaceListByWarehousePlatformCode(data: Record<string, any>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'setting.expressInterface.listByWarehousePlatformCode',
v,
timestamp: new Date().getTime()
},
data
})
}
export type ExpressInterfaceCreateParams = {
name: string
express_code: string
platform_code: string
platform_shop_id?: string | null
providerid?: string
shop_id?: number
sys_express_code?: string
is_system_express_code?: number
is_hide_goods?: number
sender_name?: string
sender_tel?: string
weight?: number
weight_type?: number
token?: string
viewer?: string
client_id?: string
share_id?: number
ispickup?: number
shipperno?: string
can_use_count?: number
province_name?: string
city_name?: string
district_name?: string
address?: string
town_name?: string
site_code?: string
template_id?: string | null
template_url?: string
product_type?: string
brandno?: string
shop_name?: string
ext_data?: Record<string, any>
}
export function expressInterfaceCreate(data: ExpressInterfaceCreateParams) {
return request({
url: '/system',
method: 'post',
params: {
method: 'setting.expressInterface.create',
v,
timestamp: new Date().getTime()
},
data
})
}
export function expressInterfaceUpdate(data: Record<string, any>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'setting.expressInterface.update',
v,
timestamp: new Date().getTime()
},
data
})
}
export function expressInterfaceDelete(data: { id: number }) {
return request({
url: '/system',
method: 'post',
params: {
method: 'setting.expressInterface.delete',
v,
timestamp: new Date().getTime()
},
data
})
}
/** 获取打印平台全量列表(文档归属 setting.expressinterface) */
export function getPrintPlatformList(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getPrintPlatformList',
v,
timestamp: new Date().getTime()
},
data: data ?? {}
})
}