This commit is contained in:
2026-04-23 14:57:35 +08:00
parent c77780fa0e
commit 739e08157b
97 changed files with 6120 additions and 14939 deletions

View File

@@ -54,8 +54,8 @@ function getDotColor(name) {
// 获取金额颜色
function getAmountColor(item) {
// 如果净佣金为0或状态为已退款,显示红色
if (item.net_amount <= 0 || item.status === 2) {
// 状态为已退款,显示红色
if (item.status === 2) {
return 'text-red-500'
}
// 如果有部分退款,显示橙色
@@ -68,7 +68,7 @@ function getAmountColor(item) {
// 获取金额前缀(+ 或 -
function getAmountPrefix(item) {
if (item.net_amount <= 0 || item.status === 2) {
if (item.status === 2) {
return '-'
}
return '+'
@@ -76,7 +76,7 @@ function getAmountPrefix(item) {
// 获取状态文本
function getStatusText(item) {
if (item.status === 2 || item.net_amount <= 0) {
if (item.status === 2) {
return '已退款'
}
if (item.status === 1) {
@@ -98,7 +98,7 @@ function getStatusText(item) {
// 获取状态样式
function getStatusStyle(item) {
if (item.status === 2 || item.net_amount <= 0) {
if (item.status === 2) {
return 'bg-red-100 text-red-800'
}
if (item.status === 1) {
@@ -124,6 +124,7 @@ async function getData() {
loading.value = true
const { data: res, error } = await useApiFetch(
`/agent/commission?page=${page.value}&page_size=${pageSize.value}`,
{ silent: true },
).get().json()
if (res.value?.code === 200 && !error.value) {