This commit is contained in:
@@ -47,6 +47,7 @@ export type UsageType = 'single_card' | 'device'
|
||||
export interface AssetResolveResponse {
|
||||
asset_type: AssetType // 资产类型:card 或 device
|
||||
asset_id: number // 数据库 ID
|
||||
identifier?: string // 原样回传本次查询所用的标识符
|
||||
virtual_no: string // 虚拟号
|
||||
status: number // 资产状态
|
||||
batch_no: string // 批次号
|
||||
@@ -97,6 +98,7 @@ export interface AssetResolveResponse {
|
||||
software_version?: string // 固件版本号(仅 device)
|
||||
switch_mode?: string // 切卡模式:"0"=自动, "1"=手动(仅 device)
|
||||
last_gateway_sync_at?: string | null // 最后 sync-info 同步时间(仅 device)
|
||||
extend?: any // 扩展信息字段
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,3 +345,64 @@ export interface AssetWalletResponse {
|
||||
created_at?: string // 创建时间(RFC3339)
|
||||
updated_at?: string // 更新时间(RFC3339)
|
||||
}
|
||||
|
||||
// ========== 资产历史订单 ==========
|
||||
|
||||
/**
|
||||
* 资产历史订单查询参数
|
||||
*/
|
||||
export interface AssetOrdersParams {
|
||||
page?: number // 页码,默认 1
|
||||
page_size?: number // 每页条数,默认 20,最大 100
|
||||
include_previous?: boolean // 是否追溯换货前代,默认 false
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单项
|
||||
*/
|
||||
export interface AssetOrderItem {
|
||||
package_name: string // 套餐名称
|
||||
quantity: number // 数量
|
||||
unit_price: number // 单价(分)
|
||||
amount: number // 金额(分)
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单信息
|
||||
*/
|
||||
export interface AssetOrder {
|
||||
order_no: string // 订单号
|
||||
order_type: string // 订单类型
|
||||
payment_status: number // 支付状态
|
||||
payment_status_text: string // 支付状态文本
|
||||
total_amount: number // 总金额(分)
|
||||
payment_method: string // 支付方式
|
||||
paid_at?: string // 支付时间
|
||||
generation?: number // 代数
|
||||
items: AssetOrderItem[] // 订单项
|
||||
created_at: string // 创建时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 代订单信息
|
||||
*/
|
||||
export interface GenerationOrders {
|
||||
generation: number // 代数
|
||||
identifier: string // 标识符
|
||||
asset_type: string // 资产类型
|
||||
exchange_no?: string // 换货单号(前代才有)
|
||||
exchanged_at?: string // 换货时间(前代才有)
|
||||
total: number // 订单总数
|
||||
page?: number // 页码(当前代才有)
|
||||
page_size?: number // 每页条数(当前代才有)
|
||||
items: AssetOrder[] // 订单列表
|
||||
}
|
||||
|
||||
/**
|
||||
* 资产历史订单响应
|
||||
*/
|
||||
export interface AssetOrdersResponse {
|
||||
current_generation: GenerationOrders // 当前代订单
|
||||
previous_generations?: GenerationOrders[] // 前代订单(仅 include_previous=true 时有)
|
||||
truncated: boolean // 是否截断(换货链超过 10 代)
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ export interface Device {
|
||||
software_version?: string // 固件版本号
|
||||
switch_mode?: SwitchMode // 切卡模式:"0"=自动, "1"=手动
|
||||
last_gateway_sync_at?: string | null // 最后 sync-info 同步时间
|
||||
imei?: string // IMEI(设备国际移动设备识别码)
|
||||
sn?: string // 设备序列号
|
||||
}
|
||||
|
||||
// 设备查询参数
|
||||
@@ -64,6 +66,7 @@ export interface DeviceQueryParams extends PaginationParams {
|
||||
created_at_start?: string // 创建时间起始
|
||||
created_at_end?: string // 创建时间结束
|
||||
series_id?: number // 套餐系列ID
|
||||
keyword?: string // 关键词搜索(虚拟号或IMEI)
|
||||
}
|
||||
|
||||
// 设备列表响应
|
||||
|
||||
@@ -52,6 +52,8 @@ export interface Order {
|
||||
commission_config_version: number
|
||||
device_id: number | null
|
||||
iot_card_id: number | null
|
||||
asset_identifier?: string // 资产标识符快照(ICCID 或 VirtualNo)
|
||||
asset_type?: string // 资产类型:single_card 或 device
|
||||
items: OrderItem[] | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
@@ -64,6 +66,7 @@ export interface OrderQueryParams {
|
||||
payment_status?: PaymentStatus
|
||||
order_type?: OrderType
|
||||
order_no?: string
|
||||
identifier?: string // 按资产标识符过滤
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
dateRange?: string[] | any // For date range picker in UI
|
||||
@@ -80,10 +83,8 @@ export interface OrderListResponse {
|
||||
|
||||
// 创建订单请求
|
||||
export interface CreateOrderRequest {
|
||||
order_type: OrderType
|
||||
package_ids: number[]
|
||||
iot_card_id?: number | null
|
||||
device_id?: number | null
|
||||
identifier: string // 资产标识符(ICCID 或 VirtualNo)
|
||||
package_ids: number[] // 套餐ID列表
|
||||
payment_method: OrderPaymentMethod // 支付方式
|
||||
}
|
||||
|
||||
@@ -93,8 +94,8 @@ export type CreateOrderResponse = Order
|
||||
// 套餐购买预检请求
|
||||
export interface PurchaseCheckRequest {
|
||||
order_type: OrderType // 订单类型 (single_card:单卡购买, device:设备购买)
|
||||
package_ids: number[] // 套餐ID列表
|
||||
resource_id: number // 资源ID (IoT卡ID或设备ID)
|
||||
package_ids: number[] // 套餐ID列表
|
||||
}
|
||||
|
||||
// 套餐购买预检响应
|
||||
|
||||
13
src/types/auto-imports.d.ts
vendored
13
src/types/auto-imports.d.ts
vendored
@@ -7,19 +7,6 @@
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ElButton: (typeof import('element-plus/es'))['ElButton']
|
||||
const ElButton2: (typeof import('element-plus/es'))['ElButton2']
|
||||
const ElDropdown: (typeof import('element-plus/es'))['ElDropdown']
|
||||
const ElDropdown2: (typeof import('element-plus/es'))['ElDropdown2']
|
||||
const ElDropdownItem: (typeof import('element-plus/es'))['ElDropdownItem']
|
||||
const ElDropdownMenu: (typeof import('element-plus/es'))['ElDropdownMenu']
|
||||
const ElMessage: (typeof import('element-plus/es'))['ElMessage']
|
||||
const ElMessageBox: (typeof import('element-plus/es'))['ElMessageBox']
|
||||
const ElNotification: (typeof import('element-plus/es'))['ElNotification']
|
||||
const ElPopconfirm: (typeof import('element-plus/es'))['ElPopconfirm']
|
||||
const ElPopover: (typeof import('element-plus/es'))['ElPopover']
|
||||
const ElTableColumn: (typeof import('element-plus/es'))['ElTableColumn']
|
||||
const ElTag: (typeof import('element-plus/es'))['ElTag']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||
|
||||
@@ -27,7 +27,7 @@ export type KeyValue<T = any> = {
|
||||
// 选项类型
|
||||
export interface Option {
|
||||
label: string
|
||||
value: string | number
|
||||
value: string | number | boolean
|
||||
disabled?: boolean
|
||||
children?: Option[]
|
||||
}
|
||||
|
||||
20
src/types/components.d.ts
vendored
20
src/types/components.d.ts
vendored
@@ -61,7 +61,6 @@ declare module 'vue' {
|
||||
ArtSidebarMenu: typeof import('./../components/core/layouts/art-menus/art-sidebar-menu/index.vue')['default']
|
||||
ArtStatsCard: typeof import('./../components/core/cards/ArtStatsCard.vue')['default']
|
||||
ArtTable: typeof import('./../components/core/tables/ArtTable.vue')['default']
|
||||
ArtTableColumn: typeof import('./../components/core/tables/ArtTableColumn.vue')['default']
|
||||
ArtTableFullScreen: typeof import('./../components/core/tables/ArtTableFullScreen.vue')['default']
|
||||
ArtTableHeader: typeof import('./../components/core/tables/ArtTableHeader.vue')['default']
|
||||
ArtTextScroll: typeof import('./../components/core/text-effect/ArtTextScroll.vue')['default']
|
||||
@@ -86,12 +85,8 @@ declare module 'vue' {
|
||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
|
||||
ElCalendar: typeof import('element-plus/es')['ElCalendar']
|
||||
ElCard: typeof import('element-plus/es')['ElCard']
|
||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
@@ -107,40 +102,25 @@ declare module 'vue' {
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
ElImage: typeof import('element-plus/es')['ElImage']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSegmented: typeof import('element-plus/es')['ElSegmented']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']
|
||||
ElStep: typeof import('element-plus/es')['ElStep']
|
||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
||||
ElTree: typeof import('element-plus/es')['ElTree']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||
|
||||
Reference in New Issue
Block a user