快递接口页面固定

This commit is contained in:
liufumingren 2026-05-23 00:53:54 +08:00
parent 02bf99d229
commit 580893127b
4 changed files with 548 additions and 293 deletions

View File

@ -199,8 +199,12 @@ export function getPlatformOauthLink(data?: {
} as any) } as any)
} }
/** 获取当前登录仓库下的店铺列表 */ /** 获取当前登录仓库下的店铺列表(可按平台编码过滤) */
export function getShopList() { export function getShopList(data?: {
platform_code?: string
platformCode?: string
code?: string
}) {
return request({ return request({
url: '/system', url: '/system',
method: 'post', method: 'post',
@ -209,7 +213,7 @@ export function getShopList() {
v: '1.0', v: '1.0',
timestamp: new Date().getTime() timestamp: new Date().getTime()
}, },
data: {}, data: data ?? {},
isSystemApi: true isSystemApi: true
} as any) } as any)
} }

View File

@ -45,6 +45,7 @@ export type ExpressInterfaceCreateParams = {
name: string name: string
express_code: string express_code: string
platform_code: string platform_code: string
shop_id?: number
sys_express_code?: string sys_express_code?: string
sender_name?: string sender_name?: string
sender_tel?: string sender_tel?: string

View File

@ -423,6 +423,7 @@ export function getDistrictNodes(provinceCode: string, cityCode: string): Region
export const defaultExpressInterfaceForm = { export const defaultExpressInterfaceForm = {
id: undefined as number | undefined, id: undefined as number | undefined,
warehouse_id: undefined as number | undefined, warehouse_id: undefined as number | undefined,
shop_id: undefined as number | undefined,
name: '', name: '',
express_code: '', express_code: '',
sys_express_code: '', sys_express_code: '',
@ -488,6 +489,7 @@ export function applyExpressInterfaceRowToForm(
Object.assign(form, { Object.assign(form, {
id: row.id, id: row.id,
warehouse_id: toFormOptionalNumber(row.warehouse_id), warehouse_id: toFormOptionalNumber(row.warehouse_id),
shop_id: toFormOptionalNumber(row.shop_id ?? row.shopId),
name: toFormString(row.name), name: toFormString(row.name),
express_code: toFormString(row.express_code), express_code: toFormString(row.express_code),
sys_express_code: toFormString(row.sys_express_code), sys_express_code: toFormString(row.sys_express_code),
@ -586,11 +588,11 @@ export function buildExpressInterfaceCreatePayload(
if (v !== undefined) payload[key] = v if (v !== undefined) payload[key] = v
} }
const optionalNumbers = ['weight', 'weight_type', 'share_id', 'ispickup', 'can_use_count'] as const const optionalNumbers = ['shop_id', 'weight', 'weight_type', 'share_id', 'ispickup', 'can_use_count'] as const
for (const key of optionalNumbers) { for (const key of optionalNumbers) {
const n = omitOptionalNumber(form[key]) const n = omitOptionalNumber(form[key])
if (n === undefined) continue if (n === undefined) continue
if (key === 'weight' || key === 'weight_type' || key === 'ispickup' || key === 'can_use_count') { if (key === 'shop_id' || key === 'weight' || key === 'weight_type' || key === 'ispickup' || key === 'can_use_count') {
;(payload as Record<string, number>)[key] = Math.round(n) ;(payload as Record<string, number>)[key] = Math.round(n)
} else { } else {
;(payload as Record<string, number>)[key] = n ;(payload as Record<string, number>)[key] = n

File diff suppressed because it is too large Load Diff