-
充值类型:
+
充值方式:
diff --git a/src/views/refund/addCoinRefund.vue b/src/views/refund/addCoinRefund.vue
index 7bf0614..a900aa4 100644
--- a/src/views/refund/addCoinRefund.vue
+++ b/src/views/refund/addCoinRefund.vue
@@ -474,86 +474,88 @@ onMounted(async function () {
-
-
- 客户信息
-
-
-
- {{ user.name }}
-
-
-
-
-
-
- {{ Number(user.historySumGold) }}
-
-
-
-
-
-
-
- {{ user.jwcode }}
-
-
-
-
- {{
- (user.nowSumGold)
- }}
- (永久金币:{{ user.nowPermanentGold }};免费金币:{{
- (user.nowFreeGold)
- }};任务金币:{{ user.nowTaskGold}})
-
-
-
-
-
- {{ moment(user.firstRecharge).format('YYYY-MM-DD HH:mm:ss') }}
-
-
-
-
-
- {{ user.rechargeNum }}
-
-
-
-
-
- {{ user.consumeNum }}
-
-
-
-
- {{ user.market }}
-
-
-
-
-
-
-
-
+
+
+ 客户信息
+
+
+
+
+
+ {{ user.name }}
+
+
+
+
+
+ {{ Number(user.historySumGold) }}
+
+
+
+
+
+
+
+
+
+ {{ user.jwcode }}
+
+
+
+
+ {{ user.nowSumGold }}
+
+
+
+ (永久金币:{{ user.nowPermanentGold }};
+ 免费金币:{{ user.nowFreeGold }};
+ 任务金币:{{ user.nowTaskGold }})
+
+
+
+
+
+
+
+
+
+ {{ moment(user.firstRecharge).format('YYYY-MM-DD HH:mm:ss') }}
+
+
+
+
+
+ {{ user.rechargeNum }}
+
+
+
+
+
+
+
+
+ {{ user.consumeNum }}
+
+
+
+
+ {{ user.market }}
+
+
+
+
+
diff --git a/src/views/usergold/clientCountDetail.vue b/src/views/usergold/clientCountDetail.vue
index b588ae3..6e058d5 100644
--- a/src/views/usergold/clientCountDetail.vue
+++ b/src/views/usergold/clientCountDetail.vue
@@ -7,6 +7,13 @@ import moment from 'moment'
import API from '@/util/http'
import { writeFile, utils } from 'xlsx'
+
+// 定义ref 变量来存储合计数据
+const totalPermanentGold = ref(0)
+const totalFreeGold = ref(0)
+const totalTaskGold = ref(0)
+const totalGoldTotal = ref(0)
+
// 变量
const adminData = ref({})
const getAdminData = async function () {
@@ -174,14 +181,40 @@ const get = async function (val) {
total.value = result.data.total
// 更新永久金币、任务金币
- permanentGold.value = tableData.value.reduce((total, row) => {
- return total + (Number(row.permanentGold) || 0);
- }, 0);
+ // permanentGold.value = tableData.value.reduce((total, row) => {
+ // return total + (Number(row.permanentGold) || 0);
+ // }, 0);
- taskGold.value = tableData.value.reduce((total, row) => {
- return total + (Number(row.taskGold) || 0);
- }, 0);
+ // taskGold.value = tableData.value.reduce((total, row) => {
+ // return total + (Number(row.taskGold) || 0);
+ // }, 0);
//由于免费金币的计算方式是6月免费+12月免费,所以需要单独处理,以及计算总的免费金币和总的金币数放在一块
+
+
+ const totalResult = await API({
+ url: '/goldDetail/getTotal',
+ method: 'post',
+ data: {
+ jwcode: goldDetail.value.jwcode || '',
+ payPlatform: goldDetail.value.payPlatform || '',
+ type: goldDetail.value.type || '',
+ market: goldDetail.value.market || '',
+ startTime: goldDetail.value.startTime || '',
+ endTime: goldDetail.value.endTime || ''
+ }
+ })
+
+ if (totalResult.code === 200) {
+ const data = totalResult.data
+ totalPermanentGold.value = data.permanentGolds
+ totalFreeGold.value = data.freeGolds
+ totalTaskGold.value = data.taskGolds
+ totalGoldTotal.value = data.sumGolds
+ } else {
+ ElMessage.error('获取合计数据失败')
+ }
+
+
} catch (error) {
console.log('请求失败', error)
}
@@ -237,12 +270,12 @@ const get7Days = function () {
search()
}
-// 计算所有记录的金币总数
-const sumGoldTotal = computed(() => {
- return tableData.value.reduce((total, row) => {
- return total + (Number(row.sumGold) || 0);
- }, 0);
-});
+// // 计算所有记录的金币总数
+// const sumGoldTotal = computed(() => {
+// return tableData.value.reduce((total, row) => {
+// return total + (Number(row.sumGold) || 0);
+// }, 0);
+// });
// 计算每行免费金币6月+12月的方法
@@ -253,11 +286,11 @@ const calculateFreeGold = (row) => {
};
// 计算总免费金币的计算属性
-const totalFreeGold = computed(() => {
- return tableData.value.reduce((total, row) => {
- return total + calculateFreeGold(row);
- }, 0);
-});
+// const totalFreeGold = computed(() => {
+// return tableData.value.reduce((total, row) => {
+// return total + calculateFreeGold(row);
+// }, 0);
+// });
// 验证页码跳转输入框的数字是否合法
const checkNumber = function () {
@@ -301,9 +334,7 @@ const handleSortChange = (column) => {
sortField.value = 'free_gold'
} else if (column.prop === 'auditTime') {//删除了更新时间的creatTime
sortField.value = 'audit_time'
- } else if (column.prop === 'gold') {
- sortField.value = 'gold'
- }
+ }
sortOrder.value = column.order === 'ascending' ? 'ASC' : 'DESC'
//get()要写在handleSortChange方法里面,不然会导致排序失效
get()
@@ -389,10 +420,10 @@ onMounted(async function () {