快递接口页面固定
This commit is contained in:
parent
02bf99d229
commit
580893127b
@ -199,8 +199,12 @@ export function getPlatformOauthLink(data?: {
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 获取当前登录仓库下的店铺列表 */
|
||||
export function getShopList() {
|
||||
/** 获取当前登录仓库下的店铺列表(可按平台编码过滤) */
|
||||
export function getShopList(data?: {
|
||||
platform_code?: string
|
||||
platformCode?: string
|
||||
code?: string
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
@ -209,7 +213,7 @@ export function getShopList() {
|
||||
v: '1.0',
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data: {},
|
||||
data: data ?? {},
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ export type ExpressInterfaceCreateParams = {
|
||||
name: string
|
||||
express_code: string
|
||||
platform_code: string
|
||||
shop_id?: number
|
||||
sys_express_code?: string
|
||||
sender_name?: string
|
||||
sender_tel?: string
|
||||
|
||||
@ -423,6 +423,7 @@ export function getDistrictNodes(provinceCode: string, cityCode: string): Region
|
||||
export const defaultExpressInterfaceForm = {
|
||||
id: undefined as number | undefined,
|
||||
warehouse_id: undefined as number | undefined,
|
||||
shop_id: undefined as number | undefined,
|
||||
name: '',
|
||||
express_code: '',
|
||||
sys_express_code: '',
|
||||
@ -488,6 +489,7 @@ export function applyExpressInterfaceRowToForm(
|
||||
Object.assign(form, {
|
||||
id: row.id,
|
||||
warehouse_id: toFormOptionalNumber(row.warehouse_id),
|
||||
shop_id: toFormOptionalNumber(row.shop_id ?? row.shopId),
|
||||
name: toFormString(row.name),
|
||||
express_code: toFormString(row.express_code),
|
||||
sys_express_code: toFormString(row.sys_express_code),
|
||||
@ -586,11 +588,11 @@ export function buildExpressInterfaceCreatePayload(
|
||||
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) {
|
||||
const n = omitOptionalNumber(form[key])
|
||||
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)
|
||||
} else {
|
||||
;(payload as Record<string, number>)[key] = n
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user