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) + }} +
-
- +
+ - + - + + @@ -415,12 +463,12 @@ getGoods(); {{ (scope.row.freeCoin * -1) / 100 }} - - + +