This commit is contained in:
@@ -5,12 +5,16 @@
|
||||
import { BaseService } from '../BaseService'
|
||||
import type { BaseResponse } from '@/types/api'
|
||||
|
||||
export type ExchangeAssetType = 'iot_card' | 'device'
|
||||
export type ExchangeFlowType = 'shipping' | 'direct'
|
||||
export type ExchangeStatus = 1 | 2 | 3 | 4 | 5
|
||||
|
||||
// 换货单查询参数
|
||||
export interface ExchangeQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
status?: number // 换货状态
|
||||
flow_type?: string // 流程类型(shipping/direct)
|
||||
status?: ExchangeStatus // 换货状态
|
||||
flow_type?: ExchangeFlowType // 流程类型(shipping/direct)
|
||||
old_asset_keyword?: string // 旧资产关键词(ICCID、接入号、虚拟号、IMEI、SN)
|
||||
new_asset_keyword?: string // 新资产关键词(ICCID、接入号、虚拟号、IMEI、SN)
|
||||
created_at_start?: string // 创建时间起始
|
||||
@@ -20,9 +24,9 @@ export interface ExchangeQueryParams {
|
||||
// 创建换货单请求
|
||||
export interface CreateExchangeRequest {
|
||||
exchange_reason: string // 换货原因
|
||||
old_asset_type: string // 旧资产类型 (iot_card 或 device)
|
||||
old_asset_type: ExchangeAssetType // 旧资产类型 (iot_card 或 device)
|
||||
old_identifier: string // 旧资产标识符(ICCID/虚拟号/IMEI/SN)
|
||||
flow_type?: string // 流程类型(shipping/direct),默认 shipping
|
||||
flow_type?: ExchangeFlowType // 流程类型(shipping/direct),默认 shipping
|
||||
new_identifier?: string // 新资产标识符(direct 时必填)
|
||||
migrate_data?: boolean // 是否迁移数据(默认 false)
|
||||
remark?: string // 备注(可选)
|
||||
@@ -33,16 +37,16 @@ export interface ExchangeResponse {
|
||||
id: number
|
||||
exchange_no: string
|
||||
exchange_reason: string
|
||||
old_asset_type: string
|
||||
old_asset_type: ExchangeAssetType
|
||||
old_asset_id: number
|
||||
old_asset_identifier: string
|
||||
new_asset_type?: string | null
|
||||
new_asset_type?: ExchangeAssetType | null
|
||||
new_asset_id?: number | null
|
||||
new_asset_identifier?: string | null
|
||||
status: number // 换货状态(1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
|
||||
status: ExchangeStatus // 换货状态(1:待填写信息, 2:待发货, 3:已发货待确认, 4:已完成, 5:已取消)
|
||||
status_name?: string
|
||||
status_text: string
|
||||
flow_type: string // 流程类型(shipping/direct)
|
||||
flow_type: ExchangeFlowType // 流程类型(shipping/direct)
|
||||
flow_type_name: string // 流程类型名称
|
||||
shipped_at?: string | null // 发货时间(仅 shipping 发货后有值)
|
||||
completed_at?: string | null // 换货完成时间
|
||||
|
||||
Reference in New Issue
Block a user