|
|
@ -232,6 +232,20 @@ const walletDetailQuery = ref({ |
|
|
pageSize: 20 |
|
|
pageSize: 20 |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const getWalletRecordTypeText = (item) => { |
|
|
|
|
|
const type = Number(item.type) |
|
|
|
|
|
if (type === 0) { |
|
|
|
|
|
return t('clientCount.recharge') |
|
|
|
|
|
} |
|
|
|
|
|
if (type === 1) { |
|
|
|
|
|
return t('clientCount.consume') |
|
|
|
|
|
} |
|
|
|
|
|
if (type === 2) { |
|
|
|
|
|
return t('clientCount.refund') |
|
|
|
|
|
} |
|
|
|
|
|
return item.typeText || t('clientCount.other') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const getWalletDetail = async () => { |
|
|
const getWalletDetail = async () => { |
|
|
walletDetailLoading.value = true |
|
|
walletDetailLoading.value = true |
|
|
try { |
|
|
try { |
|
|
@ -253,9 +267,9 @@ const getWalletDetail = async () => { |
|
|
if (result.code === 200) { |
|
|
if (result.code === 200) { |
|
|
walletDetailList.value = result.data.list.map(item => ({ |
|
|
walletDetailList.value = result.data.list.map(item => ({ |
|
|
time: moment(item.createTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
time: moment(item.createTime).format('YYYY-MM-DD HH:mm:ss'), |
|
|
type: item.type === 0 ? t('common.recharge') : t('common.consume'), |
|
|
|
|
|
amount: item.type === 1 ? -Math.abs(item.amount) : Math.abs(item.amount), |
|
|
|
|
|
desc: item.description, |
|
|
|
|
|
|
|
|
type: getWalletRecordTypeText(item), |
|
|
|
|
|
amount: Number(item.amount) || 0, |
|
|
|
|
|
desc: item.description || '', |
|
|
orderNo: item.orderCode, |
|
|
orderNo: item.orderCode, |
|
|
status: item.status === 0 ? 1 : 2 |
|
|
status: item.status === 0 ? 1 : 2 |
|
|
})) |
|
|
})) |
|
|
|