From c5b854416da0619d38725dc8dd782e2a5f20ad5c Mon Sep 17 00:00:00 2001
From: donghaolin <17667510818@163.com>
Date: Tue, 18 Mar 2025 13:11:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1=E5=99=A8?=
=?UTF-8?q?=E5=9C=B0=E5=9D=80=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=B1=8F=E5=B9=95?=
=?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=AF=94=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
gold-system/README.md | 11 +--
gold-system/index.html | 44 +++++++++---
gold-system/src/views/audit/rechargeAudit.vue | 37 +++++++++-
gold-system/src/views/audit/refundAudit.vue | 57 ++++++++++++++-
gold-system/src/views/consume/allConsume.vue | 66 +++++++++++++++---
gold-system/src/views/index.vue | 22 +++---
gold-system/src/views/login.vue | 3 +-
gold-system/src/views/permissions/index.vue | 1 +
gold-system/src/views/recharge/allRecharge.vue | 97 ++++++++++++++++----------
gold-system/src/views/usergold/index.vue | 70 +++++++++++--------
gold-system/src/views/usergoldInfo/index.vue | 28 +++++---
gold-system/src/views/workspace/index.vue | 17 ++---
gold-system/vite.config.ts | 6 +-
13 files changed, 334 insertions(+), 125 deletions(-)
diff --git a/gold-system/README.md b/gold-system/README.md
index 49b93c3..429c8e8 100644
--- a/gold-system/README.md
+++ b/gold-system/README.md
@@ -22,16 +22,17 @@ npm install echarts 安装 echarts 组件
npm install moment 安装 moment 组件
-npm install mathjs 安装mathjs组件,解决数据计算问题
+npm install mathjs 安装 mathjs 组件,解决数据计算问题
-npm install xlsx 安装xlsx组件,解决excel文件读取问题
+npm install xlsx 安装 xlsx 组件,解决 excel 文件读取问题
npm install vue-json-excel 安装导出 excel 组件
-npm install lodash 安装lodash组件,解决数据处理问题
+npm install lodash 安装 lodash 组件,解决数据处理问题
npm install vite-plugin-lazy-import -D 安装按需加载组件
-npm install vxe-pc-ui@4.3.66 vxe-table@4.10.2 vxe-utils@4.1.11 安装vxe组件
+npm install vxe-pc-ui@4.3.66 vxe-table@4.10.2 vxe-utils@4.1.11 安装 vxe 组件
-npm install --save-dev @types/node 安装typescript声明文件
\ No newline at end of file
+npm install --save-dev @types/node 安装 typescript 声明文件
+npm install -g http-server 安装 http-server 组件,模拟服务器运行
diff --git a/gold-system/index.html b/gold-system/index.html
index 1924bc8..b771669 100644
--- a/gold-system/index.html
+++ b/gold-system/index.html
@@ -1,20 +1,46 @@
-
+
-
+
财务金币管理系统
+
+
-
\ No newline at end of file
diff --git a/gold-system/src/views/audit/rechargeAudit.vue b/gold-system/src/views/audit/rechargeAudit.vue
index eb3438c..4e56a77 100644
--- a/gold-system/src/views/audit/rechargeAudit.vue
+++ b/gold-system/src/views/audit/rechargeAudit.vue
@@ -97,9 +97,19 @@ const payWay = [
const Ref = ref(null);
// 方法
+// 合计数存储
+const totalData = ref({
+ totalno: 0,
+ totalcoin: 0,
+});
+const totalno = ref(0);
+const totalcoin = ref(0);
// 搜索==============================================================
// 搜索方法
const get = async function (val) {
+ // 清空合计数
+ totalno.value = 0;
+ totalcoin.value = 0;
try {
// 地区赋值
if (adminData.value.area != "总部") {
@@ -128,6 +138,27 @@ const get = async function (val) {
rechargeVo: { ...rechargeVo.value },
}
);
+ // 合计数的接口
+ // 创建一个新对象,复制 rechargeVo.value 的属性,但排除 status 字段
+ const { status, ...rechargeVoWithoutStatus } = rechargeVo.value;
+ const result2 = await API.post(
+ "http://54.251.137.151:10702/recharge/recharge/RechargeA",
+ {
+ ...rechargeVoWithoutStatus,
+ }
+ );
+ // 做一个判断,如果result2.data[i].flag="待审核",那么 totalData.value = result2.data[i],否则就赋值为0
+ for (let i = 0; i < result2.data.length; i++) {
+ if (result2.data[i].flag == "待审核") {
+ totalData.value = result2.data[i];
+ totalno.value = totalData.value.raudit;
+ totalcoin.value = totalData.value.sumRaudit;
+ break;
+ }
+ }
+
+ console.log("合计数", totalno.value);
+ console.log("合计数", totalData.value);
// 将响应结果存储到响应式数据中
console.log("请求成功", result);
@@ -546,9 +577,11 @@ onMounted(async function () {
+
+ 待审核:{{ totalno }}条,待审核:{{ totalcoin }}金币
-
-
+
+
{
+ switch (item.status) {
+ case "待审核":
+ // 若 item.raudit 为空则赋值为 0
+ pendingCount.value = item.raudit || 0;
+ // 若 item.sumRaudit 为空则赋值为 0
+ pendingGold.value = item.sumRaudit || 0;
+ break;
+ case "已通过":
+ approvedCount.value = item.raudit || 0;
+ approvedGold.value = item.sumRaudit || 0;
+ break;
+ case "已驳回":
+ rejectedCount.value = item.raudit || 0;
+ rejectedGold.value = item.sumRaudit || 0;
+ break;
+ }
+ });
+ }
// 将响应结果存储到响应式数据中
console.log("请求成功", result);
@@ -524,10 +566,19 @@ onMounted(async function () {
+
+ 待审核:{{ pendingCount }}条,待审核:{{
+ pendingGold
+ }}金币,已通过:{{ approvedCount }}条,已通过:{{
+ approvedGold
+ }}金币,已驳回:{{ rejectedCount }}条,已驳回:{{
+ rejectedGold
+ }}金币
+
-
-
+
+
+
+ 消费金币总数:{{ Math.abs(totalCoin) }},永久金币:{{
+ Math.abs(rechargeCoin)
+ }},免费金币:{{ Math.abs(freeCoin) }},任务金币:{{
+ Math.abs(taskCoin)
+ }}
+
-
-
+
+
-
+
-
+
+
- {{ (scope.row.taskCoin * -1) / 100 }}
+ {{ (scope.row.rechargeCoin * -1) / 100 }}
@@ -415,12 +463,12 @@ getGoods();
{{ (scope.row.freeCoin * -1) / 100 }}
-
-
+
- {{ (scope.row.rechargeCoin * -1) / 100 }}
+ {{ (scope.row.taskCoin * -1) / 100 }}
+
@@ -107,7 +107,7 @@ onMounted(async function () {
index="2"
v-if="
adminData.permission == 1 ||
- adminData.permission == 2 ||
+ adminData.permission == 3 ||
adminData.permission == 5
"
>
@@ -125,7 +125,7 @@ onMounted(async function () {
index="3"
v-if="
adminData.permission == 1 ||
- adminData.permission == 2 ||
+ adminData.permission == 3 ||
adminData.permission == 5
"
>
@@ -143,7 +143,7 @@ onMounted(async function () {
index="4"
v-if="
adminData.permission == 1 ||
- adminData.permission == 3 ||
+ adminData.permission == 2 ||
adminData.permission == 5
"
>
@@ -162,7 +162,7 @@ onMounted(async function () {
index="5"
v-if="
adminData.permission == 1 ||
- adminData.permission == 3 ||
+ adminData.permission == 2 ||
adminData.permission == 5
"
>
@@ -180,7 +180,7 @@ onMounted(async function () {
index="6"
v-if="
adminData.permission == 1 ||
- adminData.permission == 3 ||
+ adminData.permission == 2 ||
adminData.permission == 5
"
>
@@ -214,7 +214,8 @@ onMounted(async function () {
v-if="
adminData.permission == 1 ||
adminData.permission == 2 ||
- adminData.permission == 3
+ adminData.permission == 3 ||
+ adminData.permission == 5
"
>
@@ -233,7 +234,9 @@ onMounted(async function () {
-
+
-
+
+
diff --git a/gold-system/src/views/login.vue b/gold-system/src/views/login.vue
index c0ff148..14021fe 100644
--- a/gold-system/src/views/login.vue
+++ b/gold-system/src/views/login.vue
@@ -40,6 +40,7 @@ const login = async function () {
localStorage.setItem("token", result.data.msg);
localStorage.setItem("permission", result.data.data.permission);
if (
+ result.data.data.permission == "5" ||
result.data.data.permission == "1" ||
result.data.data.permission == "2" ||
result.data.data.permission == "3"
@@ -110,7 +111,7 @@ const login = async function () {