f
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user