fix: some
This commit is contained in:
@@ -159,6 +159,7 @@ export interface AssetExchangeTrace {
|
||||
export interface AssetResolveResponse {
|
||||
asset_type: AssetType // 资产类型:card 或 device
|
||||
asset_id: number // 数据库 ID
|
||||
associated_phones?: string[] // 当前关联手机号列表(完整手机号,无关联时为空数组)
|
||||
identifier?: string // 原样回传本次查询所用的标识符
|
||||
virtual_no: string // 虚拟号
|
||||
status: number // 资产状态
|
||||
|
||||
74
src/types/api/businessUserGroup.ts
Normal file
74
src/types/api/businessUserGroup.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* 业务用户组相关类型定义 - 匹配后端 AUG26-003 接口
|
||||
*/
|
||||
|
||||
import type { PaginationParams } from './common'
|
||||
|
||||
/** 业务线枚举:standard 标品 / smart 智能产品 / other 其他 */
|
||||
export type BusinessUserGroupBusinessLine = 'standard' | 'smart' | 'other'
|
||||
|
||||
/** 业务用户组响应实体 */
|
||||
export interface BusinessUserGroupItem {
|
||||
id: number // 业务用户组ID
|
||||
code: string // 业务用户组稳定编码,创建后不可修改
|
||||
name: string // 业务用户组名称
|
||||
business_line: string // 所属业务线,空字符串表示未设置
|
||||
business_line_name: string // 所属业务线中文名称,未设置时为空字符串
|
||||
enabled: boolean // 是否启用;停用后不得新增成员,也不得作为批量目标
|
||||
sort: number // 排序值
|
||||
remark: string // 备注
|
||||
created_at: string // 创建时间
|
||||
updated_at: string // 更新时间
|
||||
}
|
||||
|
||||
/** 业务用户组列表查询参数 */
|
||||
export interface BusinessUserGroupQueryParams extends PaginationParams {
|
||||
page?: number // 页码,默认 1
|
||||
page_size?: number // 每页数量,默认 20,最大 100
|
||||
enabled?: boolean // 按启用状态过滤;不传返回全部
|
||||
keyword?: string // 按稳定编码或名称模糊搜索,最多 100 字符
|
||||
business_line?: BusinessUserGroupBusinessLine | '' // 按所属业务线过滤
|
||||
}
|
||||
|
||||
/** 业务用户组分页响应 */
|
||||
export interface BusinessUserGroupPageResult {
|
||||
items: BusinessUserGroupItem[] | null
|
||||
page?: number
|
||||
size?: number
|
||||
total?: number
|
||||
}
|
||||
|
||||
/** 创建业务用户组请求 */
|
||||
export interface CreateBusinessUserGroupParams {
|
||||
code: string // 稳定编码,1-64 字符,未删除组内唯一,创建后不可修改
|
||||
name: string // 名称,1-100 字符
|
||||
business_line?: BusinessUserGroupBusinessLine | '' // 所属业务线,留空表示不设置
|
||||
enabled?: boolean // 是否启用,默认启用
|
||||
sort?: number // 排序值,非负整数,默认 0
|
||||
remark?: string // 备注,最多 500 字符
|
||||
}
|
||||
|
||||
/** 更新业务用户组请求(部分更新,全部可选) */
|
||||
export interface UpdateBusinessUserGroupParams {
|
||||
name?: string // 名称,1-100 字符
|
||||
business_line?: BusinessUserGroupBusinessLine | '' | null // 三态:缺省不改 / "" 清空 / 枚举设置
|
||||
enabled?: boolean // 是否启用
|
||||
sort?: number // 排序值,非负整数
|
||||
remark?: string // 备注,最多 500 字符
|
||||
}
|
||||
|
||||
/** 删除业务用户组请求 */
|
||||
export interface DeleteBusinessUserGroupParams {
|
||||
confirm: boolean // 确认删除,必须为 true
|
||||
}
|
||||
|
||||
/** 批量设置/清空成员请求 */
|
||||
export interface SetBusinessUserGroupMembersParams {
|
||||
account_ids: number[] // 平台用户账号ID列表,至少一个;每个账号必须是启用平台用户
|
||||
}
|
||||
|
||||
/** 批量设置/清空成员结果 */
|
||||
export interface BusinessUserGroupMembersResult {
|
||||
group_id: number // 目标业务用户组ID;清空操作为 0
|
||||
account_ids: number[] | null // 本次成功维护归属的平台用户账号ID列表
|
||||
}
|
||||
@@ -384,6 +384,7 @@ export interface StandaloneIotCard {
|
||||
gateway_card_imei?: string // 网关侧返回的卡 IMEI(可空)
|
||||
id: number // 卡ID
|
||||
iccid: string // ICCID
|
||||
associated_phones?: string[] // 当前关联手机号列表(完整手机号,无关联时为空数组)
|
||||
imsi?: string // IMSI (可选)
|
||||
msisdn?: string // 卡接入号 (可选)
|
||||
virtual_no?: string // 卡虚拟号(可空)
|
||||
|
||||
@@ -4,12 +4,131 @@
|
||||
|
||||
import { PaginationParams } from '@/types'
|
||||
|
||||
// ==================== 提现资料资格相关 ====================
|
||||
|
||||
/**
|
||||
* 提交/替换提现资料资格请求参数
|
||||
*/
|
||||
export interface WithdrawalQualificationSubmitParams {
|
||||
subject_type: string // 主体类型(enterprise 等)
|
||||
subject_code: string // 主体证件号
|
||||
legal_person_id_card: string // 法人身份证号
|
||||
contract_file_key: string // 合同附件 Key
|
||||
id_card_front_file_key: string // 身份证正面 Key
|
||||
id_card_back_file_key: string // 身份证背面 Key
|
||||
business_license_file_key?: string // 营业执照 Key
|
||||
shop_front_file_key?: string // 门头照 Key
|
||||
invoice_file_key?: string // 发票附件 Key
|
||||
invoice_title?: string // 发票抬头
|
||||
invoice_subject_code?: string // 发票主体证件号
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现资料资格项
|
||||
*/
|
||||
export interface WithdrawalQualificationItem {
|
||||
id: number // 资格ID
|
||||
shop_id: number // 店铺ID
|
||||
shop_name: string // 店铺名称
|
||||
subject_type: string // 主体类型
|
||||
subject_type_name: string // 主体类型名称
|
||||
subject_code_masked: string // 脱敏后主体证件号
|
||||
legal_person_id_card_masked: string // 脱敏后法人身份证号
|
||||
status: number // 状态(0 待审批等)
|
||||
status_name: string // 状态名称
|
||||
approval_instance_id?: number // 审批实例ID
|
||||
approval_status?: number // 审批状态
|
||||
approval_status_name?: string // 审批状态名称
|
||||
contract_file_key?: string // 合同附件 Key
|
||||
id_card_front_file_key?: string // 身份证正面 Key
|
||||
id_card_back_file_key?: string // 身份证背面 Key
|
||||
business_license_file_key?: string // 营业执照 Key
|
||||
shop_front_file_key?: string // 门头照 Key
|
||||
invoice_file_key?: string // 发票附件 Key
|
||||
invoice_title?: string // 发票抬头
|
||||
invalid_reason?: string // 作废原因
|
||||
invalidated_at?: string | null // 作废时间
|
||||
created_at: string // 创建时间
|
||||
updated_at: string // 更新时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现资料资格查询参数
|
||||
*/
|
||||
export interface WithdrawalQualificationQueryParams extends PaginationParams {
|
||||
status?: number // 状态筛选
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现资料资格分页结果
|
||||
*/
|
||||
export interface WithdrawalQualificationPageResult {
|
||||
items: WithdrawalQualificationItem[] | null
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废提现资料资格请求参数
|
||||
*/
|
||||
export interface VoidWithdrawalQualificationParams {
|
||||
reason: string // 作废原因(必填)
|
||||
}
|
||||
|
||||
/**
|
||||
* 重提被驳回的提现请求参数
|
||||
*/
|
||||
export interface ResubmitWithdrawalRequestParams {
|
||||
account_name: string // 收款账户名
|
||||
account_number: string // 收款账号
|
||||
amount: number // 提现金额(分)
|
||||
withdrawal_method: WithdrawalMethod // 提现方式
|
||||
invoice_keys?: string[] // 发票附件 Key 列表
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请尝试记录项
|
||||
*/
|
||||
export interface WithdrawalAttemptItem {
|
||||
attempt: number // 第几次尝试
|
||||
status: number // 状态
|
||||
status_name: string // 状态名称
|
||||
reject_reason?: string // 驳回原因
|
||||
created_at: string // 尝试时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现申请详情
|
||||
*/
|
||||
export interface WithdrawalRequestDetail {
|
||||
id: number // 提现申请ID
|
||||
shop_id: number // 店铺ID
|
||||
shop_name: string // 店铺名称
|
||||
withdrawal_no: string // 提现单号
|
||||
withdrawal_method: WithdrawalMethod // 提现方式
|
||||
account_name: string // 收款账户名
|
||||
account_number: string // 收款账号
|
||||
amount: number // 提现金额(分)
|
||||
actual_amount: number // 实际到账(分)
|
||||
fee: number // 手续费(分)
|
||||
fee_rate: number // 手续费率(基点,100=1%)
|
||||
status: number // 状态
|
||||
status_name: string // 状态名称
|
||||
reject_reason?: string // 驳回原因
|
||||
anomaly_flag: number // 异常标记
|
||||
anomaly_name: string // 异常名称
|
||||
anomaly_reason?: string // 异常原因
|
||||
attempts?: WithdrawalAttemptItem[] // 尝试记录
|
||||
}
|
||||
|
||||
// 佣金状态
|
||||
export enum CommissionStatus {
|
||||
FROZEN = 1, // 已冻结
|
||||
UNFREEZING = 2, // 解冻中
|
||||
RELEASED = 3, // 已发放
|
||||
INVALID = 4, // 已失效
|
||||
CLAWBACK = 5, // 回溯
|
||||
PENDING_CORRECTION = 99 // 待人工修正
|
||||
}
|
||||
|
||||
@@ -146,7 +265,7 @@ export interface MyCommissionRecordItem {
|
||||
export interface CommissionRecordQueryParams extends PaginationParams {
|
||||
page_size?: number // 每页数量
|
||||
commission_source?: string // 佣金来源(cost_diff:成本差价,one_time:一次性佣金)
|
||||
status?: number // 状态(1已入账,2已失效)
|
||||
status?: number // 状态(1已冻结,2解冻中,3已发放,4已失效,5回溯,99待人工修正)
|
||||
start_time?: string // 开始时间
|
||||
end_time?: string // 结束时间
|
||||
iccid?: string // ICCID(模糊查询)
|
||||
@@ -189,7 +308,7 @@ export interface ShopCommissionRecordItem {
|
||||
amount: number // 佣金金额(分)
|
||||
balance_after: number // 入账后佣金余额(分)
|
||||
commission_source: string // 佣金来源(cost_diff:成本差价,one_time:一次性佣金)
|
||||
status: number // 状态(1已冻结, 2解冻中, 3已发放, 4已失效)
|
||||
status: number // 状态(1已冻结, 2解冻中, 3已发放, 4已失效, 5回溯, 99待人工修正)
|
||||
status_name: string // 状态名称
|
||||
order_id?: number // 订单ID
|
||||
order_no?: string // 订单号
|
||||
@@ -199,6 +318,45 @@ export interface ShopCommissionRecordItem {
|
||||
created_at: string // 佣金入账时间
|
||||
seller_shop_id?: number // 卖家店铺ID
|
||||
seller_shop_name?: string // 卖家店铺名称
|
||||
source?: ShopCommissionRecordSource // 记录来源(original:原佣金, clawback:回溯明细)
|
||||
released_at?: string // 佣金入账时间,回溯明细为空
|
||||
withdrawable?: boolean | null // 是否可提现,仅回溯明细返回且恒为 false
|
||||
original_commission_id?: number // 被回溯的原佣金记录ID,仅回溯明细返回
|
||||
refund_id?: number // 来源退款申请ID,仅回溯明细返回
|
||||
refund_no?: string // 来源退款单号,仅回溯明细返回
|
||||
clawback_records?: ShopCommissionClawbackItem[] | null // 该原佣金已生成的全部回溯明细,仅原佣金返回
|
||||
clawback_total_amount?: number | null // 该原佣金累计回溯金额(分,负值),仅原佣金返回
|
||||
}
|
||||
|
||||
/**
|
||||
* 佣金记录来源
|
||||
*/
|
||||
export type ShopCommissionRecordSource = 'original' | 'clawback'
|
||||
|
||||
/**
|
||||
* 佣金回溯明细项(原佣金详情中返回的回溯摘要,或回溯明细行)
|
||||
*/
|
||||
export interface ShopCommissionClawbackItem {
|
||||
id: number // 回溯明细ID
|
||||
amount: number // 回溯金额(分),恒为负数
|
||||
balance_after: number // 回溯后佣金余额(分),可为负数
|
||||
original_commission_id: number // 被回溯的原佣金记录ID
|
||||
refund_id?: number // 来源退款申请ID
|
||||
refund_no?: string // 来源退款单号
|
||||
status: number // 状态(5:回溯)
|
||||
status_name?: string // 状态名称
|
||||
withdrawable?: boolean | null // 是否可提现,回溯明细恒为不可提现
|
||||
created_at: string // 生成时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 佣金明细详情响应
|
||||
*/
|
||||
export interface ShopCommissionRecordDetail {
|
||||
source?: ShopCommissionRecordSource // 记录来源(original:原佣金, clawback:回溯明细)
|
||||
record: ShopCommissionRecordItem // 当前记录
|
||||
clawback_records?: ShopCommissionClawbackItem[] | null // 该原佣金已生成的全部回溯明细,仅原佣金详情返回
|
||||
original_commission?: ShopCommissionRecordItem | null // 回溯明细对应的原佣金,仅回溯详情返回
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,6 +39,7 @@ export type SwitchMode = '0' | '1' // 0=自动, 1=手动
|
||||
export interface Device {
|
||||
id: number // 设备ID
|
||||
virtual_no: string // 虚拟号(原 device_no)
|
||||
associated_phones?: string[] // 当前关联手机号列表(完整手机号,无关联时为空数组)
|
||||
device_name: string // 设备名称
|
||||
device_model: string // 设备型号
|
||||
device_type: string // 设备类型
|
||||
|
||||
@@ -9,6 +9,8 @@ export type ExportTaskScene =
|
||||
| 'agent_recharge'
|
||||
| 'refund'
|
||||
| 'exchange'
|
||||
| 'commission_record'
|
||||
| 'package_traffic_alert'
|
||||
|
||||
export type ExportTaskFormat = 'xlsx' | 'csv'
|
||||
|
||||
|
||||
113
src/types/api/h5PopupConfiguration.ts
Normal file
113
src/types/api/h5PopupConfiguration.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
/**
|
||||
* H5 运营弹窗配置相关类型
|
||||
* 契约来源:docs/产品迭代8月份/通知.md
|
||||
*/
|
||||
|
||||
// 命中页面集合 (home:首页, asset_detail:资产详情, package_purchase:套餐购买, asset_wallet_recharge:资产钱包充值)
|
||||
export type H5PopupPage = 'home' | 'asset_detail' | 'package_purchase' | 'asset_wallet_recharge'
|
||||
|
||||
// 投放频率 (once:每客户每配置版本仅一次, daily:每客户每配置版本每个上海自然日一次)
|
||||
export type H5PopupFrequency = 'once' | 'daily'
|
||||
|
||||
// 受控动作 (package_purchase:套餐购买, asset_wallet_recharge:资产钱包充值);空字符串表示无受控动作
|
||||
export type H5PopupActionType = 'package_purchase' | 'asset_wallet_recharge' | ''
|
||||
|
||||
// 卡类型范围 (CMCC:中国移动, CUCC:中国联通, CTCC:中国电信, CBN:中国广电)
|
||||
export type H5PopupCardType = 'CMCC' | 'CUCC' | 'CTCC' | 'CBN'
|
||||
|
||||
/**
|
||||
* H5 运营弹窗配置(列表项 / 详情 / 创建与更新响应)
|
||||
*/
|
||||
export interface H5PopupConfiguration {
|
||||
id: number // 配置ID
|
||||
title: string // 弹窗标题
|
||||
content: string // 弹窗正文
|
||||
pages: H5PopupPage[] | null // 命中页面集合;空数组等价于非法(页面必选)
|
||||
priority: number // 优先级,数值越大越优先
|
||||
frequency: H5PopupFrequency // 投放频率
|
||||
frequency_text: string // 投放频率名称(中文)
|
||||
enabled: boolean // 是否启用;停用后停止新投放,历史通知在展示期内仍可见
|
||||
enabled_text: string // 启停状态名称(中文)
|
||||
action_type: H5PopupActionType // 受控动作;空值表示无受控动作
|
||||
shop_ids: number[] | null // 店铺范围;空数组表示全量
|
||||
device_types: string[] | null // 设备类型范围;空数组表示全量
|
||||
card_types: H5PopupCardType[] | null // 卡类型范围;空数组表示全量
|
||||
starts_at: string // 生效开始时间(ISO 8601)
|
||||
ends_at: string // 生效结束时间(ISO 8601)
|
||||
version: number // 配置版本,每次更新递增;版本参与频率去重,旧版本通知保留原快照
|
||||
creator: number // 创建人账号ID
|
||||
updater: number // 最近更新人账号ID
|
||||
created_at: string // 创建时间(ISO 8601)
|
||||
updated_at: string // 最近更新时间(ISO 8601);启停同样刷新该时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询参数
|
||||
* GET /api/admin/h5-popup-configurations
|
||||
*/
|
||||
export interface H5PopupConfigurationQueryParams {
|
||||
page?: number // 页码,默认 1(1~10000)
|
||||
page_size?: number // 每页数量,默认 20,最大 100
|
||||
enabled?: boolean | null // 是否启用筛选
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表分页响应
|
||||
*/
|
||||
export interface H5PopupConfigurationListResponse {
|
||||
items: H5PopupConfiguration[] | null
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建请求
|
||||
* POST /api/admin/h5-popup-configurations
|
||||
* title/content/pages/frequency/starts_at/ends_at 必填;
|
||||
* shop_ids/device_types/card_types 空数组 = 全量。
|
||||
*/
|
||||
export interface CreateH5PopupConfigurationRequest {
|
||||
title: string // 弹窗标题,1~100 字符
|
||||
content: string // 弹窗正文,1~2000 字符,不接受 HTML、URL 或前端路由
|
||||
pages: H5PopupPage[] // 命中页面集合(非空)
|
||||
priority?: number // 优先级,数值越大越优先,0~1000000
|
||||
frequency: H5PopupFrequency // 投放频率
|
||||
starts_at: string // 生效开始时间(ISO 8601)
|
||||
ends_at: string // 生效结束时间(ISO 8601),不得早于开始时间
|
||||
enabled?: boolean // 是否启用,默认由后端决定
|
||||
action_type?: H5PopupActionType // 受控动作
|
||||
shop_ids?: number[] // 店铺范围,空数组 = 全量
|
||||
device_types?: string[] // 设备类型范围,空数组 = 全量
|
||||
card_types?: H5PopupCardType[] // 卡类型范围,空数组 = 全量
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新请求
|
||||
* PUT /api/admin/h5-popup-configurations/{id}
|
||||
* 除 id 外全部可选,不传保持原值;action_type 空字符串 = 清除受控动作;
|
||||
* shop_ids/device_types/card_types 空数组 = 改为全量;pages 空数组非法。
|
||||
*/
|
||||
export interface UpdateH5PopupConfigurationRequest {
|
||||
id: number // 运营弹窗配置ID
|
||||
title?: string // 不传保持原值,1~100 字符
|
||||
content?: string // 不传保持原值,1~2000 字符
|
||||
pages?: H5PopupPage[] // 不传保持原值;传空数组等价于非法(页面必选)
|
||||
priority?: number // 不传保持原值,0~1000000
|
||||
frequency?: H5PopupFrequency // 不传保持原值
|
||||
starts_at?: string // 不传保持原值(ISO 8601)
|
||||
ends_at?: string // 不传保持原值(ISO 8601),不得早于开始时间
|
||||
enabled?: boolean // 不传保持原值;启停会刷新最近更新时间并影响同优先级排序
|
||||
action_type?: H5PopupActionType | null // 不传保持原值;传空字符串 = 清除受控动作
|
||||
shop_ids?: number[] | null // 不传保持原值;传空数组 = 改为全量
|
||||
device_types?: string[] | null // 不传保持原值;传空数组 = 改为全量
|
||||
card_types?: H5PopupCardType[] | null // 不传保持原值;传空数组 = 改为全量
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用/停用请求体
|
||||
* POST /api/admin/h5-popup-configurations/{id}/enable、/{id}/disable
|
||||
*/
|
||||
export interface H5PopupConfigurationIDParams {
|
||||
id: number // 运营弹窗配置ID
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* API 类型统一导出
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ export * from './account'
|
||||
|
||||
// 店铺相关
|
||||
export * from './shop'
|
||||
export * from './businessUserGroup'
|
||||
|
||||
// 网卡相关
|
||||
export * from './card'
|
||||
@@ -137,3 +138,12 @@ export * from './wecom'
|
||||
|
||||
// 员工代收款相关
|
||||
export * from './employeeCollection'
|
||||
|
||||
// 手机号资产关联相关
|
||||
export * from './phoneAsset'
|
||||
|
||||
// H5 运营弹窗配置相关
|
||||
export * from './h5PopupConfiguration'
|
||||
|
||||
// 套餐真流量预警相关
|
||||
export * from './packageTrafficAlert'
|
||||
|
||||
137
src/types/api/packageTrafficAlert.ts
Normal file
137
src/types/api/packageTrafficAlert.ts
Normal file
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 套餐真流量预警相关类型
|
||||
* 对应 docs/产品迭代8月份/套餐真流量预警_API_前端简版.md
|
||||
* 6 个接口仅超级管理员/平台账号可访问,其他账号后端返回 403
|
||||
*/
|
||||
|
||||
import type { BaseResponse, PaginationParams, PaginationResponse } from './common'
|
||||
|
||||
// ========== 预警规则 ==========
|
||||
|
||||
/** 预警规则列表查询参数 */
|
||||
export interface PackageTrafficAlertRuleQueryParams extends PaginationParams {
|
||||
package_id?: number // 按套餐商品ID过滤
|
||||
enabled?: boolean // 按启用状态过滤;不传时查询全部
|
||||
}
|
||||
|
||||
/** 预警规则项 */
|
||||
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 // 启用状态名称(中文)
|
||||
remark: string // 备注
|
||||
updated_at: string // 最近更新时间
|
||||
}
|
||||
|
||||
/** 创建预警规则参数 */
|
||||
export interface CreatePackageTrafficAlertRuleParams {
|
||||
package_id: number // 套餐商品ID;必须存在且真流量额度大于零
|
||||
threshold_percent: number // 真流量预警阈值百分比,取值 1 至 100,允许两位小数
|
||||
enabled?: boolean // 是否启用(默认 true);停用后扫描不再创建新预警
|
||||
remark?: string // 备注,最多 500 字符
|
||||
}
|
||||
|
||||
/** 修改预警规则参数(允许修改阈值、启停与备注;修改不影响既有预警快照) */
|
||||
export interface UpdatePackageTrafficAlertRuleParams {
|
||||
threshold_percent?: number // 新的真流量预警阈值百分比,取值 1 至 100,允许两位小数
|
||||
enabled?: boolean // 是否启用;停用后扫描不再创建新预警,既有预警保留
|
||||
remark?: string // 备注,最多 500 字符
|
||||
}
|
||||
|
||||
// ========== 预警记录 ==========
|
||||
|
||||
/** 资产类型(iot_card:物联网卡, device:设备) */
|
||||
export type PackageTrafficAlertAssetType = 'iot_card' | 'device'
|
||||
|
||||
/** 通知投递结果 */
|
||||
export enum PackageTrafficAlertNotificationStatus {
|
||||
/** 已通知 */
|
||||
NOTIFIED = 1,
|
||||
/** 待投递 */
|
||||
PENDING_DELIVERY = 2,
|
||||
/** 投递失败 */
|
||||
DELIVERY_FAILED = 3,
|
||||
/** 未通知(接收人已失效) */
|
||||
NOT_NOTIFIED_RECEIVER_INVALID = 4,
|
||||
/** 未通知(无有效业务员) */
|
||||
NOT_NOTIFIED_NO_VALID_OWNER = 5
|
||||
}
|
||||
|
||||
/** 预警记录列表查询参数(与导出筛选一致) */
|
||||
export interface PackageTrafficAlertRecordQueryParams extends PaginationParams {
|
||||
package_id?: number // 按阈值来源套餐商品ID过滤
|
||||
shop_id?: number // 按触发时所属店铺ID过滤
|
||||
business_owner_account_id?: number // 按触发时店铺业务员账号ID过滤
|
||||
asset_type?: PackageTrafficAlertAssetType // 资产类型 (iot_card:物联网卡, device:设备)
|
||||
asset_identifier?: string // 资产或卡标识关键词,匹配资产标识、卡标识与对应标识符快照
|
||||
threshold_percent?: number // 按触发阈值快照精确过滤,允许两位小数
|
||||
start_time?: string // 触发时间起始(RFC3339,含该时刻)
|
||||
end_time?: string // 触发时间截止(RFC3339,含该时刻)
|
||||
notification_status?: PackageTrafficAlertNotificationStatus // 通知投递结果过滤 (1-5)
|
||||
}
|
||||
|
||||
/**
|
||||
* 预警记录项
|
||||
* 除 business_user_group_names(当前值)外,其余字段均为触发时快照
|
||||
*/
|
||||
export interface PackageTrafficAlertRecordItem {
|
||||
id: number // 预警记录ID
|
||||
package_id?: number // 阈值来源套餐商品ID
|
||||
package_name?: string | null // 套餐名称快照
|
||||
shop_id?: number | null // 触发时所属店铺ID
|
||||
shop_name?: string | null // 触发时所属店铺名称
|
||||
business_owner_account_id?: number | null // 触发时店铺业务员账号ID
|
||||
business_owner_username?: string | null // 触发时店铺业务员账号名
|
||||
business_user_group_names?: string[] // 当前业务用户组名称(非触发时快照,可为空数组)
|
||||
asset_type?: PackageTrafficAlertAssetType | null // 资产类型快照
|
||||
asset_identifier?: string | null // 资产或卡标识快照
|
||||
threshold_percent?: number // 触发阈值快照
|
||||
triggered_at?: string // 触发时间
|
||||
notification_status?: PackageTrafficAlertNotificationStatus // 通知投递结果
|
||||
notification_status_name?: string // 通知投递结果名称
|
||||
}
|
||||
|
||||
/** 预警记录详情(在列表项基础上标识触发后归属是否变化) */
|
||||
export interface PackageTrafficAlertRecordDetail extends PackageTrafficAlertRecordItem {
|
||||
shop_changed_since_trigger?: boolean // 触发后店铺归属是否变化
|
||||
owner_changed_since_trigger?: boolean // 触发后业务员归属是否变化
|
||||
}
|
||||
|
||||
// ========== 导出 ==========
|
||||
|
||||
/** 创建预警记录导出任务参数(复用既有异步导出任务) */
|
||||
export interface ExportPackageTrafficAlertParams {
|
||||
format: 'xlsx' | 'csv' // 导出格式 (xlsx:Excel, csv:CSV)
|
||||
package_id?: number
|
||||
shop_id?: number
|
||||
business_owner_account_id?: number
|
||||
asset_type?: PackageTrafficAlertAssetType
|
||||
asset_identifier?: string // 最多 100 字符
|
||||
threshold_percent?: number
|
||||
start_time?: string
|
||||
end_time?: string
|
||||
notification_status?: PackageTrafficAlertNotificationStatus
|
||||
}
|
||||
|
||||
/** 创建预警记录导出任务响应 */
|
||||
export interface CreatePackageTrafficAlertExportResponse {
|
||||
task_id: number // 导出任务ID
|
||||
task_no: string // 任务编号
|
||||
status: number // 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:已失败, 5:已取消)
|
||||
status_name: string // 任务状态名称(中文)
|
||||
message: string // 提示信息
|
||||
}
|
||||
|
||||
// ========== 响应类型 ==========
|
||||
|
||||
export type PackageTrafficAlertRuleListResponse = PaginationResponse<PackageTrafficAlertRuleItem>
|
||||
export type PackageTrafficAlertRuleResponse = BaseResponse<PackageTrafficAlertRuleItem>
|
||||
export type PackageTrafficAlertRecordListResponse =
|
||||
PaginationResponse<PackageTrafficAlertRecordItem>
|
||||
export type PackageTrafficAlertRecordDetailResponse = BaseResponse<PackageTrafficAlertRecordDetail>
|
||||
export type CreatePackageTrafficAlertExportApiResponse =
|
||||
BaseResponse<CreatePackageTrafficAlertExportResponse>
|
||||
@@ -241,7 +241,7 @@ export const PAYMENT_CREDENTIAL_FIELD_SPECS: Record<
|
||||
},
|
||||
wechat_v2: {
|
||||
required: ['wx_mch_id', 'wx_api_v2_key', 'wx_notify_url'],
|
||||
optional: []
|
||||
optional: ['wx_client_cert_content', 'wx_client_key_content']
|
||||
},
|
||||
fuiou: {
|
||||
required: [
|
||||
|
||||
@@ -36,6 +36,8 @@ interface WechatPayConfigFields {
|
||||
wx_serial_no: string
|
||||
wx_cert_content: string
|
||||
wx_key_content: string
|
||||
wx_client_cert_content: string
|
||||
wx_client_key_content: string
|
||||
}
|
||||
|
||||
interface AlipayConfigFields {
|
||||
|
||||
192
src/types/api/phoneAsset.ts
Normal file
192
src/types/api/phoneAsset.ts
Normal file
@@ -0,0 +1,192 @@
|
||||
/**
|
||||
* 手机号资产关联相关类型
|
||||
* 契约来源:docs/产品迭代8月份/手机号资产关联.md
|
||||
*/
|
||||
|
||||
// 资产类型
|
||||
export type PhoneAssetType = 'iot_card' | 'device'
|
||||
|
||||
// 关联状态 (0:已失效, 1:有效)
|
||||
export type PhoneAssetAssociationStatus = 0 | 1
|
||||
|
||||
// 失效方式
|
||||
export type PhoneAssetInvalidationMethod = 'backend_single' | 'backend_batch' | 'csv_import'
|
||||
|
||||
// 建立来源(固定为 H5 短信验证)
|
||||
export type PhoneAssetSource = 'h5_sms_verification'
|
||||
|
||||
/**
|
||||
* 手机号资产关联列表项
|
||||
* GET /api/admin/phone-asset-associations
|
||||
*/
|
||||
export interface PhoneAssetAssociation {
|
||||
id: number // 关联关系ID
|
||||
asset_id: number // 资产ID
|
||||
asset_identifier: string // 资产当前标识(卡为 ICCID,设备为虚拟号)
|
||||
asset_type: PhoneAssetType // 资产类型
|
||||
phone: string // 关联手机号(完整值)
|
||||
established_at: string // 建立时间(短信验证通过时间)
|
||||
source: PhoneAssetSource // 建立来源,固定为 h5_sms_verification
|
||||
status: PhoneAssetAssociationStatus // 关联状态 (0:已失效, 1:有效)
|
||||
status_name: string // 关联状态中文名称
|
||||
invalidated_at: string | null // 失效时间;有效关系为空
|
||||
invalidation_method: PhoneAssetInvalidationMethod | null // 失效方式;有效关系为空
|
||||
invalidation_method_name: string // 失效方式中文名称;有效关系为空
|
||||
invalidation_reason: string // 失效原因;有效关系为空
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联列表查询参数
|
||||
*/
|
||||
export interface PhoneAssetAssociationQueryParams {
|
||||
page?: number // 页码,默认 1
|
||||
page_size?: number // 每页数量,默认 20,最大 100
|
||||
asset_identifier?: string // 资产标识(ICCID、虚拟号、IMEI、SN 或接入号,精确匹配)
|
||||
phone?: string // 手机号(完整值精确匹配)
|
||||
status?: PhoneAssetAssociationStatus | null // 关联状态 (0:已失效, 1:有效)
|
||||
created_at_start?: string // 关联创建时间起(含)
|
||||
created_at_end?: string // 关联创建时间止(含)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联列表分页响应
|
||||
*/
|
||||
export interface PhoneAssetAssociationListResponse {
|
||||
items: PhoneAssetAssociation[] | null
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 单条解绑响应
|
||||
* DELETE /api/admin/phone-asset-associations/{id}
|
||||
*/
|
||||
export interface UnbindPhoneAssetAssociationResponse {
|
||||
asset_id: number // 资产ID
|
||||
asset_type: PhoneAssetType // 资产类型
|
||||
id: number // 关联关系ID
|
||||
invalidated_at: string // 失效时间
|
||||
unbound_count: number // 本次解除的有效关系数,成功时为 1
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量解绑资产项
|
||||
*/
|
||||
export interface BatchUnbindAssetItem {
|
||||
asset_id: number // 资产ID
|
||||
asset_type: PhoneAssetType // 资产类型 (iot_card:物联网卡, device:设备)
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量解绑请求
|
||||
* POST /api/admin/phone-asset-associations/batch-unbind
|
||||
*/
|
||||
export interface BatchUnbindPhoneAssetAssociationRequest {
|
||||
assets: BatchUnbindAssetItem[] // 待解除的资产集合,按 (资产类型, 资产ID) 去重后执行
|
||||
confirmed: boolean // 二次确认,必须为 true
|
||||
reason: string // 解除原因(1~500 字符)
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量解绑逐项结果
|
||||
*/
|
||||
export interface BatchUnbindAssetResult {
|
||||
asset_id: number // 资产ID
|
||||
asset_type: PhoneAssetType // 资产类型
|
||||
success: boolean // 该项是否解除成功
|
||||
reason: string // 该项失败原因,成功时为空
|
||||
unbound_count: number // 该项解除的有效关系数
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量解绑响应
|
||||
*/
|
||||
export interface BatchUnbindPhoneAssetAssociationResponse {
|
||||
success_count: number // 解除成功的资产项数
|
||||
fail_count: number // 解除失败的资产项数
|
||||
items: BatchUnbindAssetResult[] | null // 逐项结果,顺序与请求去重后的资产集合一致
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑导入任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
|
||||
*/
|
||||
export type PhoneAssetUnbindImportTaskStatus = 1 | 2 | 3 | 4
|
||||
|
||||
/**
|
||||
* 创建解绑导入任务请求
|
||||
* POST /api/admin/phone-asset-associations/unbind-imports
|
||||
*/
|
||||
export interface CreatePhoneAssetUnbindImportRequest {
|
||||
file_key: string // CSV 对象存储 Key(phone-unbind-imports/ 开头且扩展名为 .csv)
|
||||
reason: string // 任务级解绑原因(1~500 字符)
|
||||
confirmed: boolean // 二次确认,必须为 true
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑导入任务(列表项 / 创建响应)
|
||||
*/
|
||||
export interface PhoneAssetUnbindImportTask {
|
||||
id: number // 导入任务ID
|
||||
task_no: string // 导入任务编号
|
||||
file_name: string // 上传的源 CSV 文件名
|
||||
status: PhoneAssetUnbindImportTaskStatus // 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
|
||||
status_name: string // 任务状态中文名称
|
||||
total_count: number // 数据行总数;任务级失败时为 0
|
||||
success_count: number // 成功行数
|
||||
fail_count: number // 失败行数
|
||||
unbind_reason: string // 任务级解绑原因
|
||||
error_message: string // 任务级失败原因;与行级失败原因分开记录
|
||||
creator_name: string // 任务创建人名称快照
|
||||
created_at: string // 创建时间
|
||||
started_at: string // 开始处理时间
|
||||
completed_at: string // 完成时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑导入任务列表分页响应
|
||||
* GET /api/admin/phone-asset-associations/unbind-imports
|
||||
*/
|
||||
export interface PhoneAssetUnbindImportTaskListResponse {
|
||||
items: PhoneAssetUnbindImportTask[] | null
|
||||
page: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑导入任务列表查询参数
|
||||
*/
|
||||
export interface PhoneAssetUnbindImportTaskQueryParams {
|
||||
page?: number // 页码,默认 1
|
||||
page_size?: number // 每页数量,默认 20,最大 100
|
||||
status?: PhoneAssetUnbindImportTaskStatus | null // 任务状态 (1:待处理, 2:处理中, 3:已完成, 4:失败)
|
||||
}
|
||||
|
||||
/**
|
||||
* 逐行状态 (3:成功, 4:失败)
|
||||
*/
|
||||
export type PhoneAssetUnbindImportItemStatus = 3 | 4
|
||||
|
||||
/**
|
||||
* 解绑导入任务逐行结果
|
||||
*/
|
||||
export interface PhoneAssetUnbindImportItem {
|
||||
line: number // 行号,自数据首行起计(表头不计入)
|
||||
asset_identifier: string // 导入文件中的资产标识原文
|
||||
asset_id: number // 资产ID;未定位到资产时为 0
|
||||
asset_type: PhoneAssetType | '' // 资产类型;未定位到资产时为空
|
||||
status: PhoneAssetUnbindImportItemStatus // 行状态 (3:成功, 4:失败)
|
||||
status_name: string // 行状态中文名称
|
||||
reason: string // 失败原因;成功行为空
|
||||
associated_phones: string[] | null // 解绑当时的完整关联手机号快照;失败行为空数组
|
||||
unbound_count: number // 该行解除的有效关系数
|
||||
}
|
||||
|
||||
/**
|
||||
* 解绑导入任务详情
|
||||
* GET /api/admin/phone-asset-associations/unbind-imports/{id}
|
||||
*/
|
||||
export interface PhoneAssetUnbindImportTaskDetail extends PhoneAssetUnbindImportTask {
|
||||
items: PhoneAssetUnbindImportItem[] | null // 逐行结果明细;任务级失败时为空数组
|
||||
}
|
||||
@@ -7,7 +7,36 @@ export enum RefundStatus {
|
||||
PENDING = 1, // 待审批
|
||||
APPROVED = 2, // 已通过
|
||||
REJECTED = 3, // 已拒绝
|
||||
RETURNED = 4 // 已退回
|
||||
RETURNED = 4, // 已退回
|
||||
REFUNDING = 5, // 原路退款处理中
|
||||
REFUND_FAILED = 6 // 原路退款失败
|
||||
}
|
||||
|
||||
// 退款方式
|
||||
export enum RefundMethod {
|
||||
ORIGINAL_ROUTE = 'original_route', // 原路退回
|
||||
CUSTOMER_ACCOUNT = 'customer_account', // 客户收款信息
|
||||
ASSET_WALLET = 'asset_wallet', // 资产钱包
|
||||
AGENT_WALLET = 'agent_wallet' // 代理钱包
|
||||
}
|
||||
|
||||
// 渠道退款状态
|
||||
export enum ChannelRefundStatus {
|
||||
NOT_STARTED = 0, // 未发起或不适用
|
||||
PROCESSING = 1, // 处理中
|
||||
SUCCEEDED = 2, // 已成功
|
||||
FAILED = 3 // 已失败
|
||||
}
|
||||
|
||||
// 失败原因分类
|
||||
export enum RefundFailureReason {
|
||||
CHANNEL_REJECTED = 'channel_rejected', // 渠道明确拒绝
|
||||
CREDENTIAL_INVALID = 'credential_invalid', // 渠道凭证失效
|
||||
INSUFFICIENT_BALANCE = 'insufficient_balance', // 渠道余额不足
|
||||
TIMEOUT_UNKNOWN = 'timeout_unknown', // 超时或结果未知
|
||||
APPROVAL_REJECTED = 'approval_rejected', // 企微驳回或关闭
|
||||
REVOKED_AFTER_APPROVED = 'revoked_after_approved', // 企微通过后撤销
|
||||
PAYMENT_FACT_INVALID = 'payment_fact_invalid' // 本地原支付事实不可用
|
||||
}
|
||||
|
||||
export interface RefundAttachment {
|
||||
@@ -42,6 +71,25 @@ export interface RefundApproval {
|
||||
business_process_result?: unknown
|
||||
}
|
||||
|
||||
// 退款申请审批尝试历史项
|
||||
export interface RefundAttemptItem {
|
||||
id: number // 尝试记录ID
|
||||
attempt_no: number // 第几次尝试
|
||||
method?: RefundMethod | null // 退款方式
|
||||
method_name?: string | null // 退款方式名称
|
||||
refund_amount?: number | null // 退款金额(分)
|
||||
frozen_actual_received_amount?: number | null // 冻结实收金额(分)
|
||||
refund_reason?: string | null // 退款原因
|
||||
customer_account_info?: Record<string, string> | null // 客户收款信息
|
||||
customer_voucher_key?: string[] | string | null // 客户凭证键
|
||||
channel_refund_request_no?: string | null // 渠道退款申请号
|
||||
submitted_by_account_id?: number | null // 提交人账号ID
|
||||
approval_instance_id?: number | null // 审批实例ID
|
||||
approval_status?: number | null // 审批状态
|
||||
approval_status_name?: string | null // 审批状态名称
|
||||
created_at: string // 创建时间
|
||||
}
|
||||
|
||||
// 退款申请
|
||||
export interface Refund {
|
||||
id: number
|
||||
@@ -55,9 +103,29 @@ export interface Refund {
|
||||
asset_type: string // 资产类型
|
||||
requested_refund_amount?: number | null // 申请退款金额(分)
|
||||
approved_refund_amount?: number | null // 实际退款金额(分)
|
||||
actual_received_amount?: number | null // 实收金额(分)
|
||||
actual_received_amount?: number | null // 实收金额(分,历史数据保留)
|
||||
status: RefundStatus
|
||||
status_name?: string | null
|
||||
method?: RefundMethod | null // 退款方式
|
||||
method_name?: string | null // 退款方式名称
|
||||
frozen_actual_received_amount?: number | null // 冻结实收金额(分)
|
||||
customer_account_info?: Record<string, string> | null // 客户收款信息
|
||||
channel_refund_status?: ChannelRefundStatus | null // 渠道退款状态
|
||||
channel_refund_status_name?: string | null // 渠道退款状态名称
|
||||
channel_refund_no?: string | null // 渠道退款单号
|
||||
channel_refund_request_no?: string | null // 渠道退款申请号
|
||||
channel_refund_amount?: number | null // 渠道退款金额(分)
|
||||
channel_refunded_at?: string | null // 渠道退款时间
|
||||
failure_reason?: RefundFailureReason | null // 失败分类
|
||||
failure_reason_name?: string | null // 失败分类名称
|
||||
failure_message?: string | null // 失败消息
|
||||
anomaly_flag?: number // 异常标记(0 正常、1 异常)
|
||||
anomaly_reason?: string | null // 异常原因
|
||||
latest_attempt_id?: number | null // 最新尝试记录ID
|
||||
latest_approval_instance_id?: number | null // 最新审批实例ID
|
||||
attempts?: RefundAttemptItem[] // 审批尝试历史
|
||||
refund_package_used_mb?: number // 当前退款套餐已用量(MB)
|
||||
refund_package_total_mb?: number // 当前退款套餐总量(MB)
|
||||
refund_reason: string
|
||||
refund_voucher_key?: string[] | string // 退款凭证附件列表;历史数据可能为单字符串或逗号字符串
|
||||
attachments?: RefundAttachment[]
|
||||
@@ -110,17 +178,36 @@ export interface RefundListResponse {
|
||||
// 创建退款申请请求
|
||||
export interface CreateRefundRequest {
|
||||
order_id: number
|
||||
method: RefundMethod // 退款方式(必填)
|
||||
requested_refund_amount: number // 申请退款金额(分)
|
||||
actual_received_amount: number // 实收金额(分)
|
||||
package_usage_id: number // 关联套餐使用记录 ID,无关联记录时传 0
|
||||
refund_reason: string
|
||||
refund_voucher_key: string[]
|
||||
customer_account_info?: Record<string, string> | null // 客户收款信息(customer_account 方式必填)
|
||||
refund_voucher_key?: string[] | null // 退款凭证(customer_account 方式必填至少 1 个)
|
||||
}
|
||||
|
||||
// 重新提交退款申请请求
|
||||
export interface ResubmitRefundRequest {
|
||||
method?: RefundMethod | null // 退款方式(不传沿用原值)
|
||||
requested_refund_amount?: number
|
||||
actual_received_amount?: number
|
||||
attachments?: RefundAttachment[]
|
||||
refund_reason?: string
|
||||
customer_account_info?: Record<string, string> | null // 客户收款信息(不传沿用原值)
|
||||
refund_voucher_key?: string[] | null
|
||||
attachments?: RefundAttachment[]
|
||||
}
|
||||
|
||||
// 审批通过退款申请请求
|
||||
export interface ApproveRefundRequest {
|
||||
approved_refund_amount?: number | null // 审批退款金额(分)
|
||||
remark?: string
|
||||
}
|
||||
|
||||
// 审批拒绝退款申请请求
|
||||
export interface RejectRefundRequest {
|
||||
reject_reason: string
|
||||
}
|
||||
|
||||
// 退回退款申请请求
|
||||
export interface ReturnRefundRequest {
|
||||
remark?: string
|
||||
}
|
||||
@@ -26,7 +26,13 @@ export interface ShopResponse {
|
||||
business_owner_username: string // 平台业务员账号名
|
||||
business_owner_phone_summary: string // 平台业务员手机号摘要
|
||||
business_owner_available: boolean // 是否仍可用于通知接收
|
||||
distribution_code?: string // 分销码(用于生成注册二维码)
|
||||
client_login_disabled: boolean // 是否禁止 C 端新登录
|
||||
business_user_group_id: number | null // 业务用户组ID(实时推导,可空)
|
||||
business_user_group_code: string // 业务用户组编码
|
||||
business_user_group_name: string // 业务用户组名称
|
||||
business_user_group_enabled: boolean // 业务用户组是否启用;停用仍返回组且 enabled=false
|
||||
business_user_group_business_line: string // 业务用户组业务线
|
||||
}
|
||||
|
||||
// 店铺列表查询参数
|
||||
@@ -41,6 +47,9 @@ export interface ShopQueryParams extends PaginationParams {
|
||||
contact_phone?: string // 联系电话精确查询
|
||||
business_owner_account_id?: number | null // 平台业务员账号ID
|
||||
client_login_disabled?: boolean
|
||||
business_user_group_id?: number | null // 按业务用户组ID筛选
|
||||
business_line?: string | null // 按业务线筛选(standard/smart/other)
|
||||
ungrouped?: boolean // true=无负责人或负责人无分组
|
||||
page?: number // 页码
|
||||
page_size?: number // 每页数量
|
||||
}
|
||||
@@ -139,3 +148,69 @@ export interface UpdateShopCreditLimitResponse {
|
||||
version: number // 更新后的钱包版本
|
||||
wallet_id: number // 主钱包 ID
|
||||
}
|
||||
|
||||
// ========== 批量交接平台业务员 ==========
|
||||
|
||||
/** 批量交接平台业务员请求 */
|
||||
export interface BatchUpdateBusinessOwnerParams {
|
||||
shop_ids: number[] // 店铺ID列表,1-500,自动去重
|
||||
business_owner_account_id: number | null // 显式必传:null=清空负责人,ID=换绑
|
||||
}
|
||||
|
||||
/** 批量交接平台业务员响应 */
|
||||
export interface BatchUpdateBusinessOwnerResult {
|
||||
batch_key: string // 批次标识
|
||||
shop_count: number // 处理店铺数
|
||||
cleared: number // 清空负责人的店铺数
|
||||
}
|
||||
|
||||
// ========== 业务负责人 CSV 导入 ==========
|
||||
|
||||
/** 业务负责人导入任务行级结果 */
|
||||
export interface BusinessOwnerImportRow {
|
||||
line: number // 行号,从数据首行 1 开始
|
||||
shop_code: string // 店铺编码
|
||||
operation_type: string // 操作类型:换绑 / 清空
|
||||
status: number // 3=成功 4=失败
|
||||
status_name?: string // 状态中文名(成功/失败)
|
||||
reason: string // 失败原因
|
||||
}
|
||||
|
||||
/** 业务负责人导入任务详情 */
|
||||
export interface BusinessOwnerImportDetail {
|
||||
id: number // 导入任务ID
|
||||
task_no?: string // 任务编号
|
||||
file_name?: string // 文件名
|
||||
creator_name?: string // 创建人
|
||||
status: number // 1=待处理 2=处理中 3=已完成 4=失败
|
||||
status_name?: string // 状态中文名(待处理/处理中/已完成/失败)
|
||||
started_at?: string // 开始时间
|
||||
completed_at?: string // 完成时间
|
||||
total_count?: number
|
||||
success_count?: number
|
||||
fail_count?: number
|
||||
error_message?: string | null // 任务级失败原因
|
||||
items?: BusinessOwnerImportRow[] | null // 行级结果
|
||||
created_at?: string
|
||||
updated_at?: string
|
||||
}
|
||||
|
||||
/** 创建业务负责人导入任务请求 */
|
||||
export interface CreateBusinessOwnerImportParams {
|
||||
file_key: string // 由 /storage/upload-url(purpose=shop_import)获取
|
||||
}
|
||||
|
||||
/** 业务负责人导入任务列表查询参数 */
|
||||
export interface BusinessOwnerImportQueryParams {
|
||||
page?: number
|
||||
page_size?: number
|
||||
status?: number // 按状态筛选
|
||||
}
|
||||
|
||||
/** 业务负责人导入任务列表响应 */
|
||||
export interface BusinessOwnerImportPageResult {
|
||||
items: BusinessOwnerImportDetail[] | null
|
||||
page?: number
|
||||
size?: number
|
||||
total?: number
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ export type WecomBusinessType =
|
||||
| 'refund_approval'
|
||||
| 'offline_recharge_approval'
|
||||
| 'employee_collection_approval'
|
||||
| 'agent_distribution_approval'
|
||||
| 'withdrawal_qualification_approval'
|
||||
| 'commission_withdrawal_approval'
|
||||
|
||||
export interface WecomApplication {
|
||||
id: number
|
||||
|
||||
3
src/types/components.d.ts
vendored
3
src/types/components.d.ts
vendored
@@ -86,6 +86,7 @@ declare module 'vue' {
|
||||
CommentItem: typeof import('./../components/custom/comment-widget/widget/CommentItem.vue')['default']
|
||||
CommentWidget: typeof import('./../components/custom/comment-widget/index.vue')['default']
|
||||
CommissionDisplay: typeof import('./../components/business/CommissionDisplay.vue')['default']
|
||||
CommissionRecordDetailDialog: typeof import('./../components/business/CommissionRecordDetailDialog.vue')['default']
|
||||
ContainerSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/ContainerSettings.vue')['default']
|
||||
CreateRefundDialog: typeof import('./../components/business/CreateRefundDialog.vue')['default']
|
||||
CustomerAccountDialog: typeof import('./../components/business/CustomerAccountDialog.vue')['default']
|
||||
@@ -126,6 +127,7 @@ declare module 'vue' {
|
||||
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']
|
||||
@@ -152,6 +154,7 @@ declare module 'vue' {
|
||||
PackageSelector: typeof import('./../components/business/PackageSelector.vue')['default']
|
||||
PaymentVoucherDialog: typeof import('./../components/business/PaymentVoucherDialog.vue')['default']
|
||||
RealnamePolicyDialog: typeof import('./../components/device/RealnamePolicyDialog.vue')['default']
|
||||
RefundApprovalDialog: typeof import('./../components/business/RefundApprovalDialog.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SectionTitle: typeof import('./../components/core/layouts/art-settings-panel/widget/SectionTitle.vue')['default']
|
||||
|
||||
Reference in New Issue
Block a user