Add product/channel billing condition editors, place-order additional services, billing simulator, forecast-to-inbound fee delta and margin warnings, insurance-aware claim tips, OMS preset dict seeds, and related AI skills/system pages. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { axiosInstance } from '@/api/rbac'
|
|
import { omsUrl, parseListPayload } from '@/api/oms/common'
|
|
|
|
export interface AccountFlowListParams {
|
|
page: number
|
|
pageSize: number
|
|
keyword?: string
|
|
bizType?: string
|
|
customerId?: number
|
|
startTime?: string
|
|
endTime?: string
|
|
amountMin?: number
|
|
amountMax?: number
|
|
sortField?: string
|
|
sortOrder?: string
|
|
}
|
|
|
|
export async function getAccountFlowList(params: AccountFlowListParams) {
|
|
const res = await axiosInstance.get(omsUrl('/customer/account-flow/list'), {
|
|
params: {
|
|
page: params.page,
|
|
pageSize: params.pageSize,
|
|
keyword: params.keyword || undefined,
|
|
bizType: params.bizType && params.bizType !== 'all' ? params.bizType : undefined,
|
|
customerId: params.customerId || undefined,
|
|
startTime: params.startTime || undefined,
|
|
endTime: params.endTime || undefined,
|
|
amountMin: params.amountMin,
|
|
amountMax: params.amountMax,
|
|
sortField: params.sortField || undefined,
|
|
sortOrder: params.sortOrder || undefined,
|
|
},
|
|
})
|
|
return parseListPayload(res.data)
|
|
}
|
|
|
|
/** 支付/充值成功后通知顶部余额刷新 */
|
|
export const CUSTOMER_BALANCE_CHANGED_EVENT = 'oms:customer-balance-changed'
|
|
|
|
export function notifyCustomerBalanceChanged() {
|
|
window.dispatchEvent(new CustomEvent(CUSTOMER_BALANCE_CHANGED_EVENT))
|
|
}
|