Browse Source

改用了中文配置,在充值审核修改状态时添加了rechargeId,修复了活动管理页分页没法点击的问题,添加了工作台门店排名通过时间查询的功能。

Hongxilin
hongxilin 5 months ago
parent
commit
5ed4e2d509
  1. 7
      vue/gold-system/src/main.ts
  2. 2
      vue/gold-system/src/util/http.js
  3. 1
      vue/gold-system/src/views/audit/rechargeAudit.vue
  4. 17
      vue/gold-system/src/views/managerecharge/activity.vue
  5. 252
      vue/gold-system/src/views/workspace/index.vue

7
vue/gold-system/src/main.ts

@ -2,6 +2,7 @@ import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import './assets/css/common.css'; // 引入公共CSS文件
@ -10,6 +11,8 @@ const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
}
}
app.use(ElementPlus).use(router).mount('#app');
app.use(ElementPlus, {
locale: zhCn,
}).use(router).mount('#app');

2
vue/gold-system/src/util/http.js

@ -21,7 +21,7 @@ export default function (options) {
//status:HTTP状态码,例如200表示请求成功。
//data:服务器返回的数据。
// statusText:HTTP状态文本,例如"OK"表示请求成功。
console.log(data);
// console.log(data);
if (status == 200) {
return data;
} else {

1
vue/gold-system/src/views/audit/rechargeAudit.vue

@ -295,6 +295,7 @@ const pass = function (row) {
passObj.value.adminId = admin.value.adminId;
passObj.value.auditId = row.auditId;
passObj.value.status = 1;
passObj.value.rechargeId=row.rechargeId;
console.log("通过对象", passObj.value);
};

17
vue/gold-system/src/views/managerecharge/activity.vue

@ -22,15 +22,9 @@ const getAdminData = async function () {
console.log("请求失败", error);
}
};
getAdminData();
//
//
const admin = ref({
adminId: 1,
name: "赵刚",
area: "中国",
});
//
const tableData = ref([]);
//
@ -122,8 +116,8 @@ const addActicity = function () {
console.log("Date", new Date());
//
addObj.value = {};
addObj.value.adminId = admin.value.adminId;
addObj.value.adminName = admin.value.name;
addObj.value.adminId = adminData.value.adminId;
addObj.value.adminName = adminData.value.name;
addObj.value.freeGold = "0";
addObj.value.rechargeRatio = 0;
addObj.value.startTime = null;
@ -278,6 +272,7 @@ const checkNumber = function () {
//
onMounted(async function () {
await getAdminData();
get();
});
</script>
@ -381,12 +376,12 @@ onMounted(async function () {
<el-pagination background :page-size="getObj.pageSize" layout="slot" :total="total">
<div>{{ total }},每页</div>
<el-select v-model="getObj.pageSize" class="page-size" @change="get()" style="width: 80px">
<el-option v-for="item in [5, 6, 7, 8, 9, 10]" :key="item" :label="item" :value="item"></el-option>
<el-option v-for="item in [5, 10, 20, 50, 100]" :key="item" :label="item" :value="item"></el-option>
</el-select>
<div></div>
</el-pagination>
<el-pagination background layout="prev, pager, next, slot" :page-size="getObj.pageSize" :total="total"
:current-page="getObj.pageNum" @current-change="get()">
:current-page="getObj.pageNum" @current-change="get">
<div>跳至</div>
<el-input v-model="getObj.pageNum" style="width: 40px" @change="checkNumber" />
<div></div>

252
vue/gold-system/src/views/workspace/index.vue

@ -5,6 +5,7 @@ import { VscInfo } from "vue-icons-plus/vsc";
import * as bs from "vue-icons-plus/bs";
import axios, { all } from "axios";
import API from "../../api/index";
import moment from "moment";
//
//
@ -15,6 +16,9 @@ const statistics = ref({});
const getYearConsumeCoin = ref({});
const getDayConsumeCoin = ref({});
//
const searchTime = ref([]);
//
//
const payTotalRecharge = ref(0);
@ -500,6 +504,105 @@ const handleChange = function () {
goldType.value = "全部类型";
getAreaRank();
};
//
const disabledDate = function (date) {
const currentDate = new Date();
const startDate = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1);
const endDate = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0);
if(date >= startDate && date <= endDate){
return false;
}
return true;
}
//
const today = function () {
const current = new Date();
const startDate = new Date(
current.getFullYear(),
current.getMonth(),
current.getDate()
);
const endDate = new Date(
current.getFullYear(),
current.getMonth(),
current.getDate() + 1
);
searchTime.value = [startDate, endDate];
search();
// console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
};
//
const thisWeek= function () {
const current = new Date();
const startDate = new Date(
current.getFullYear(),
current.getMonth(),
current.getDate() - 6
);
const endDate = new Date(
current.getFullYear(),
current.getMonth(),
current.getDate() + 1
);
searchTime.value = [startDate, endDate];
search();
// console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
};
//
const thisMonth = function () {
const current = new Date();
const startDate = new Date(
current.getFullYear(),
current.getMonth(),
1
);
const endDate = new Date(
current.getFullYear(),
current.getMonth()+1,
0
);
searchTime.value = [startDate, endDate];
search();
// console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
};
//
const thisYear = function () {
const current = new Date();
const startDate = new Date(
current.getFullYear(),
0,
1
);
const endDate = new Date(
current.getFullYear()+1,
0,
0
);
searchTime.value = [startDate, endDate];
search();
// console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
};
const allTime=function(){
searchTime.value=["",""];
search();
}
//
const search=function(){
console.log("searchTime", moment(searchTime.value[0]).format("YYYY-MM-DD") + "至" + moment(searchTime.value[1]).format("YYYY-MM-DD"))
getAreaRankObj.value.searchStartTime = moment(searchTime.value[0]).format("YYYY-MM-DD");
getAreaRankObj.value.searchEndTime = moment(searchTime.value[1]).format("YYYY-MM-DD");
if(getAreaRankObj.value.searchStartTime=="Invalid date"){
delete getAreaRankObj.value.searchStartTime;
}
if(getAreaRankObj.value.searchEndTime=="Invalid date"){
delete getAreaRankObj.value.searchEndTime;
}
console.log("getAreaRankObj", getAreaRankObj.value);
getAreaRank();
}
//
const changePlatform = function () {
console.log("changePlatform", platform.value);
@ -906,37 +1009,26 @@ onMounted(async function () {
<span v-if="getSumCoin.coinDifference > 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="getSumCoin.coinDifference < 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="getSumCoin.coinDifference == 0">
<div class="comparedWithYesterday">
<span>较前一天 {{ formatNum(getSumCoin.coinDifference) }}</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
</p>
<template #footer
>充值{{ formatNum(getSumCoin.todayRecharge) }} 免费{{
<template #footer>充值{{ formatNum(getSumCoin.todayRecharge) }} 免费{{
formatNum(getSumCoin.todayFree)
}}
任务{{ formatNum(getSumCoin.todayTask) }}</template
>
任务{{ formatNum(getSumCoin.todayTask) }}</template>
</el-card>
</el-col>
<el-col :span="6">
@ -948,8 +1040,7 @@ onMounted(async function () {
<p>
折合新币累计金额 {{ formatNum(Math.abs(statistics.totalSumCoin)) }}
</p>
<template #footer
>昨日新增
<template #footer>昨日新增
{{ formatNum(Math.abs(statistics.totalYesterdaySumCoin)) }}
其中充值
{{ formatNum(Math.abs(statistics.rechargeYesterdaySumCoin)) }}
@ -966,12 +1057,10 @@ onMounted(async function () {
消费 {{ formatNum(Math.abs(getYearConsumeCoin.yearConsumeCoin)) }};
退款 {{ formatNum(Math.abs(getYearConsumeCoin.yearRefundCoin)) }}
</p>
<template #footer
>昨日新增消耗
<template #footer>昨日新增消耗
{{ formatNum(Math.abs(getDayConsumeCoin.daysumCoin)) }} ; 消费
{{ formatNum(Math.abs(getDayConsumeCoin.dayConsumeCoin)) }} ; 退款
{{ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin)) }}</template
>
{{ formatNum(Math.abs(getDayConsumeCoin.dayRefundCoin)) }}</template>
</el-card>
</el-col>
<el-col :span="6">
@ -984,78 +1073,63 @@ onMounted(async function () {
<span v-if="statistics.weekOverWeekRate > 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.weekOverWeekRate < 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.weekOverWeekRate == 0">
<div class="comparedWithYesterday">
<span>周同比 {{ statistics.weekOverWeekRate }}%</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span v-if="statistics.dayOverDayRate > 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="red-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="red-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.dayOverDayRate < 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="green-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="green-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
<span v-if="statistics.dayOverDayRate == 0">
<div class="comparedWithYesterday">
<span> 日环比{{ statistics.dayOverDayRate }}%</span>
<span
class="grey-triangle"
style="margin: 6px 0px 0px 7px"
></span>
<span class="grey-triangle" style="margin: 6px 0px 0px 7px"></span>
</div>
</span>
</p>
<template #footer
>昨日充值人数
<template #footer>昨日充值人数
{{ formatNum(Math.abs(statistics.rechargeCountYesterday)) }}
其中首充
{{ formatNum(Math.abs(statistics.firstRechargeCountYesterday)) }}
</template
>
</template>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col>
<el-card>
<el-tabs
v-model="activeName"
class="demo-tabs"
@tab-click="handleClick"
@tab-change="handleChange"
>
<div class="medium-button">
<el-button text @click="allTime()" style="margin-left: 1000px">全部</el-button>
<el-button text @click="today()">今日</el-button>
<el-button text @click="thisWeek()">本周</el-button>
<el-button text @click="thisMonth()">本月</el-button>
<el-button text @click="thisYear()">本年</el-button>
<el-date-picker v-model="searchTime" type="daterange" range-separator="" start-placeholder="开始时间"
end-placeholder="结束时间" style="width: 200px;" :disabled-date="disabledDate" @change="search"/>
</div>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" @tab-change="handleChange">
<el-tab-pane label="金币充值" name="recharge">
<div>
合计充值金币
@ -1068,7 +1142,10 @@ onMounted(async function () {
<span class="mid-head-font">{{ formatNum(payTotalTask) }}</span>
</div>
<div class="bar">
<el-scrollbar style="width: 1150px;">
<div id="recharge" style="width: 1150px; height: 400px"></div>
</el-scrollbar>
<div style="width: 100px">
<div class="goldCategory">
<span class="light-green-dot"></span>
@ -1085,31 +1162,15 @@ onMounted(async function () {
</div>
<div style="width: 310px">
<div class="ranking-header">
<span style="margin-right: 90px; width: 150px"
>门店金币充值排名</span
>
<el-select
v-model="goldType"
placeholder="请选择金币类型"
size="small"
style="width: 90px"
@change="changeGoldType"
>
<el-option
v-for="item in gold"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<span style="margin-right: 90px; width: 150px">门店金币充值排名</span>
<el-select v-model="goldType" placeholder="请选择金币类型" size="small" style="width: 90px"
@change="changeGoldType">
<el-option v-for="item in gold" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div>
<el-scrollbar height="360px">
<div
v-for="(item, index) in areaRank"
:key="item"
class="ranking-item"
>
<div v-for="(item, index) in areaRank" :key="item" class="ranking-item">
<!-- <component :is="findBsComponent(index)" /> -->
<span style="width: 15px; text-align: center">{{
index + 1
@ -1157,31 +1218,15 @@ onMounted(async function () {
</div>
<div style="width: 310px">
<div class="ranking-header">
<span style="margin-right: 90px; width: 150px"
>门店金币消费排名</span
>
<el-select
v-model="goldType"
placeholder="请选择金币类型"
size="small"
style="width: 90px"
@change="changeGoldType"
>
<el-option
v-for="item in gold"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<span style="margin-right: 90px; width: 150px">门店金币消费排名</span>
<el-select v-model="goldType" placeholder="请选择金币类型" size="small" style="width: 90px"
@change="changeGoldType">
<el-option v-for="item in gold" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<div>
<el-scrollbar height="360px">
<div
v-for="(item, index) in areaRank"
:key="item"
class="ranking-item"
>
<div v-for="(item, index) in areaRank" :key="item" class="ranking-item">
<!-- <component :is="findBsComponent(index)" /> -->
<span style="width: 15px; text-align: center">{{
index + 1
@ -1220,14 +1265,8 @@ onMounted(async function () {
<template #header>
<div class="card-header" style="display: flex">
<span class="tail-head">四大学科类别占比</span>
<el-radio-group
v-model="platform"
fill="#ffffff"
text-color="#409eff"
size="small"
@change="changePlatform"
style="margin-left: auto"
>
<el-radio-group v-model="platform" fill="#ffffff" text-color="#409eff" size="small"
@change="changePlatform" style="margin-left: auto">
<el-radio-button label="全部平台" value="全部平台" />
<el-radio-button label="ERP" value="ERP" />
<el-radio-button label="HC" value="HC" />
@ -1258,6 +1297,7 @@ onMounted(async function () {
</template>
<style scoped>
.head-mid-font {
font-size: 20px;
font-weight: bold;

Loading…
Cancel
Save