This commit is contained in:
@@ -124,7 +124,7 @@ export interface AgentQueryParams extends PaginationParams {
|
||||
// 创建账号参数(匹配后端 ModelCreateAccountRequest)
|
||||
export interface CreatePlatformAccountParams {
|
||||
username: string // 用户名 (3-50字符)
|
||||
password: string // 密码 (8-32字符)
|
||||
password: string // 8~12位,必须包含大写、小写和数字,禁止特殊符号
|
||||
phone: string // 手机号 (11位)
|
||||
user_type: number // 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||||
enterprise_id?: number | null // 关联企业ID(企业账号必填)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
export interface AgentDistributionRegistrationQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
status?: 0 | 1 | 2
|
||||
status?: 0 | 1 | 2 | 3
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
decided_start_time?: string
|
||||
@@ -54,3 +54,17 @@ export interface RecoverAgentDistributionRegistrationResponse {
|
||||
id: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export const AGENT_REGISTRATION_APPROVAL_FAILED_STATUS = 3
|
||||
|
||||
export const canRecoverAgentRegistration = (
|
||||
item?: AgentDistributionRegistrationItem | null
|
||||
): boolean =>
|
||||
!!item && item.status !== AGENT_REGISTRATION_APPROVAL_FAILED_STATUS && item.recoverable === true
|
||||
|
||||
export const getAgentRegistrationStatusName = (item: AgentDistributionRegistrationItem): string =>
|
||||
item.status_name ||
|
||||
({ 0: '待审批', 1: '已通过', 2: '已驳回', 3: '审批提交失败' } as Record<number, string>)[
|
||||
item.status
|
||||
] ||
|
||||
String(item.status)
|
||||
|
||||
@@ -9,7 +9,8 @@ export enum AgentRechargeStatus {
|
||||
COMPLETED = 3, // 已完成
|
||||
CLOSED = 4, // 已关闭
|
||||
REFUNDED = 5, // 已退款
|
||||
REJECTED = 6 // 已驳回
|
||||
REJECTED = 6, // 已驳回
|
||||
APPROVAL_SUBMISSION_FAILED = 7 // 审批提交失败(终态)
|
||||
}
|
||||
|
||||
// 支付方式
|
||||
|
||||
@@ -137,7 +137,8 @@ export enum WithdrawalStatus {
|
||||
PENDING = 1, // 待审核
|
||||
APPROVED = 2, // 已通过
|
||||
REJECTED = 3, // 已拒绝
|
||||
COMPLETED = 4 // 已到账
|
||||
COMPLETED = 4, // 已到账
|
||||
APPROVAL_SUBMISSION_FAILED = 5 // 审批提交失败(终态)
|
||||
}
|
||||
|
||||
// 佣金类型
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
export interface BaseResponse<T = any> {
|
||||
code: number
|
||||
msg: string
|
||||
message?: string
|
||||
data: T
|
||||
timestamp?: string
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ export type CloseEmployeeCollectionBillResult = EmployeeCollectionBill
|
||||
|
||||
// ========== 核销申请 ==========
|
||||
|
||||
/** 申请状态:0 审批中 / 1 已通过 / 2 已驳回 / 3 已关闭 */
|
||||
/** 申请状态:0 审批中 / 1 已通过 / 2 已驳回 / 3 已关闭 / 4 审批提交失败 */
|
||||
export type EmployeeCollectionApplicationStatus = number
|
||||
|
||||
/** 审批尝试记录(历史材料不被覆盖) */
|
||||
|
||||
@@ -10,6 +10,28 @@ export enum PaymentStatus {
|
||||
REFUNDED = 4 // 已退款
|
||||
}
|
||||
|
||||
// 支付单状态与订单支付状态数值不同,必须独立处理。
|
||||
export enum OrderPaymentRecordStatus {
|
||||
PENDING = 0,
|
||||
PAID = 1,
|
||||
FAILED = 2,
|
||||
REFUNDED = 3
|
||||
}
|
||||
|
||||
export interface OrderPaymentRecord {
|
||||
payment_no: string
|
||||
payment_method: 'wechat' | 'alipay'
|
||||
payment_channel: string
|
||||
payment_merchant_name: string
|
||||
third_party_trade_no: string
|
||||
amount: number // 分
|
||||
status: OrderPaymentRecordStatus
|
||||
status_name: string
|
||||
created_at: string
|
||||
paid_at: string | null
|
||||
expire_at: string | null
|
||||
}
|
||||
|
||||
// 订单类型
|
||||
export type OrderType = 'single_card' | 'device'
|
||||
|
||||
@@ -68,6 +90,9 @@ export interface Order {
|
||||
payment_status: PaymentStatus
|
||||
payment_status_text: string
|
||||
payment_method: OrderPaymentMethod
|
||||
third_party_trade_no: string
|
||||
payment_channel: string
|
||||
payment_merchant_name: string
|
||||
total_amount: number // 订单总金额(分)
|
||||
actual_paid_amount?: number // 实付金额(分)
|
||||
paid_at: string | null
|
||||
@@ -97,6 +122,10 @@ export interface Order {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface OrderDetail extends Order {
|
||||
payments: OrderPaymentRecord[]
|
||||
}
|
||||
|
||||
// 订单查询参数
|
||||
export interface OrderQueryParams {
|
||||
page?: number
|
||||
|
||||
@@ -19,7 +19,6 @@ export interface PackageTrafficAlertRuleItem {
|
||||
id: number // 预警规则ID
|
||||
package_id: number // 套餐商品ID
|
||||
package_name: string // 套餐名称
|
||||
real_data_mb: number // 套餐商品当前真流量额度(MB),仅用于配置校验展示,不作为预警分母
|
||||
threshold_percent: number // 真流量预警阈值百分比(1~100,允许两位小数)
|
||||
enabled: boolean // 是否启用
|
||||
enabled_name: string // 启用状态名称(中文)
|
||||
@@ -90,6 +89,9 @@ export interface PackageTrafficAlertRecordItem {
|
||||
asset_type?: PackageTrafficAlertAssetType | null // 资产类型快照
|
||||
asset_identifier?: string | null // 资产或卡标识快照
|
||||
threshold_percent?: number // 触发阈值快照
|
||||
threshold_mb?: number | null // 触发时阈值流量(MB),主套餐与加油包汇总
|
||||
used_mb?: number | null // 触发时已用流量(MB),含加油包
|
||||
limit_mb?: number | null // 触发时总额度(MB),含加油包
|
||||
triggered_at?: string // 触发时间
|
||||
notification_status?: PackageTrafficAlertNotificationStatus // 通知投递结果
|
||||
notification_status_name?: string // 通知投递结果名称
|
||||
|
||||
@@ -9,7 +9,8 @@ export enum RefundStatus {
|
||||
REJECTED = 3, // 已拒绝
|
||||
RETURNED = 4, // 已退回
|
||||
REFUNDING = 5, // 原路退款处理中
|
||||
REFUND_FAILED = 6 // 原路退款失败
|
||||
REFUND_FAILED = 6, // 原路退款失败
|
||||
APPROVAL_SUBMISSION_FAILED = 7 // 审批提交失败(终态)
|
||||
}
|
||||
|
||||
// 退款方式
|
||||
|
||||
21
src/types/components.d.ts
vendored
21
src/types/components.d.ts
vendored
@@ -92,27 +92,16 @@ declare module 'vue' {
|
||||
CreateRefundDialog: typeof import('./../components/business/CreateRefundDialog.vue')['default']
|
||||
CustomerAccountDialog: typeof import('./../components/business/CustomerAccountDialog.vue')['default']
|
||||
DetailPage: typeof import('./../components/common/DetailPage.vue')['default']
|
||||
ElAlert: typeof import('element-plus/es')['ElAlert']
|
||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
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']
|
||||
ElCollapse: typeof import('element-plus/es')['ElCollapse']
|
||||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
||||
ElEmpty: typeof import('element-plus/es')['ElEmpty']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
@@ -125,26 +114,16 @@ declare module 'vue' {
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
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']
|
||||
ElResult: typeof import('element-plus/es')['ElResult']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
|
||||
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']
|
||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
||||
ExportTaskCreateDialog: typeof import('./../components/business/ExportTaskCreateDialog.vue')['default']
|
||||
|
||||
Reference in New Issue
Block a user