抽奖次数、邀请好友优化

This commit is contained in:
duan 2025-04-02 09:51:53 +08:00
parent 6cccadbbce
commit 9ee23afc38
3 changed files with 485 additions and 409 deletions

View File

@ -11,7 +11,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-table :data="list"> <el-table :data="rechargeData.list">
<el-table-column prop="userId" label="ID"></el-table-column> <el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="avatar" label="头像"> <el-table-column prop="avatar" label="头像">
<template slot-scope="scope"> <template slot-scope="scope">
@ -20,18 +20,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="用户昵称"></el-table-column> <el-table-column prop="userName" label="用户昵称"></el-table-column>
<el-table-column prop="phone" label="手机号"></el-table-column> <el-table-column prop="phone" label="手机号"></el-table-column>
<el-table-column prop="totalDrawCount" label="支付解锁信息"> <el-table-column prop="todayUnlocked" label="今日订单数">
<template slot-scope="scope">
<div @click="goUrl(scope.row)" style="color: rgb(101, 165, 249);cursor: pointer;">共解锁{{ scope.row.unlocked }}</div>
<div>今日解锁{{ scope.row.todayUnlocked }}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="unlocked" label="抽奖次数信息"> <el-table-column prop="todayDrawCount" label="当日抽奖次数">
<template slot-scope="scope">
<div>共获得抽奖次数{{ scope.row.totalDrawCount }}</div>
<div>剩余抽奖次数{{ scope.row.residueDrawCount }}</div>
<div>今日抽奖次数{{ scope.row.todayDrawCount }}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="操作"> <el-table-column prop="" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
@ -41,18 +32,25 @@
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4" <el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="rechargeData.limit" :current-page="rechargeData.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="rechargeData.totalCount">
</el-pagination> </el-pagination>
</div> </div>
<!-- 详情 --> <!-- 详情 -->
<el-dialog title="抽奖详情" :visible.sync="dialogVisible" width="50%"> <el-dialog title="抽奖详情" :visible.sync="dialogVisible" width="50%">
<div>抽奖次数合计:{{ rewardtotalPage }} </div> <div>抽奖次数合计:{{ rechargeDataA.totalCount }} </div>
<el-table :data="rewardDetailsList"> <el-table :data="rechargeDataA.list">
<el-table-column prop="id" label="ID"></el-table-column> <el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="name" label="抽奖结果"></el-table-column> <el-table-column prop="name" label="抽奖结果"></el-table-column>
<el-table-column prop="number" label="金额"></el-table-column>
<el-table-column prop="createTime" label="抽奖时间"></el-table-column> <el-table-column prop="createTime" label="抽奖时间"></el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4A" @current-change="handleCurrentChange4A"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataA.limit" :current-page="rechargeDataA.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataA.totalCount">
</el-pagination>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -64,16 +62,21 @@ export default {
formInline: { formInline: {
keywords: '' keywords: ''
}, },
page: 1,
limit: 10,
rechargeData: { rechargeData: {
totalCount: 0, totalCount: 0,
list: [] list: [],
page: 1,
limit: 10,
},
rechargeDataA: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
itemUserId: ''
}, },
list: [], list: [],
dialogVisible: false, dialogVisible: false,
rewardDetailsList: [],
rewardtotalPage: 0,
} }
}, },
mounted() { mounted() {
@ -81,11 +84,11 @@ export default {
}, },
methods: { methods: {
goUrl(item) { goUrl(item) {
this.$router.push({ path: '/orderCenter', query: { userName: item.phone } }) this.$router.push({ path: '/orderCenter', query: { userName: item.userName } })
}, },
onSubmit() { onSubmit() {
this.page = 1 this.rechargeData.page = 1
this.limit = 10 this.rechargeData.limit = 10
this.getRechargeData() this.getRechargeData()
}, reset() { }, reset() {
this.formInline = { this.formInline = {
@ -96,13 +99,15 @@ export default {
getRechargeData() { getRechargeData() {
this.$http.get('/ext/sys/lottery/count/query/page', { this.$http.get('/ext/sys/lottery/count/query/page', {
params: { params: {
page: this.page, page: this.rechargeData.page,
limit: this.limit, limit: this.rechargeData.limit,
keywords: this.formInline.keywords keywords: this.formInline.keywords
} }
}).then(response => { }).then(response => {
if (response.data.code === 0) { if (response.data.code === 0) {
this.list = response.data.data.list this.rechargeData.list = response.data.data.list
this.rechargeData.totalCount = response.data.data.totalCount
// this.rechargeData = response.data.data
} else { } else {
this.$message.error(response.data.msg) this.$message.error(response.data.msg)
} }
@ -110,16 +115,20 @@ export default {
console.error(error) console.error(error)
}) })
}, rewardDetails(item) { }, rewardDetails(item) {
if (item) {
this.rechargeDataA.itemUserId = item.userId
}
this.$http.get('/ext/sys/lottery/detail/page', { this.$http.get('/ext/sys/lottery/detail/page', {
params: { params: {
page: 1, page: this.rechargeDataA.page,
limit: 100, limit: this.rechargeDataA.limit,
userId: item.userId userId: this.rechargeDataA.itemUserId
} }
}).then(response => { }).then(response => {
if (response.data.code === 0) { if (response.data.code === 0) {
this.rewardDetailsList = response.data.data.list this.rechargeDataA.list = response.data.data.list
this.rewardtotalPage = response.data.data.totalPage this.rechargeDataA.totalCount = response.data.data.totalCount
this.dialogVisible = true this.dialogVisible = true
} else { } else {
this.$message.error(response.data.message) this.$message.error(response.data.message)
@ -132,12 +141,23 @@ export default {
handleSizeChange4(val) { handleSizeChange4(val) {
this.limit = val this.rechargeData.limit = val
this.rechargeData.page = 1
this.getRechargeData() this.getRechargeData()
}, },
handleCurrentChange4(val) { handleCurrentChange4(val) {
this.page = val this.rechargeData.page = val
this.getRechargeData() this.getRechargeData()
},
handleSizeChange4A(val) {
this.rechargeDataA.limit = val
this.rechargeDataA.page = 1
this.rewardDetails()
},
handleCurrentChange4A(val) {
console.log(val, '11111111111')
this.rechargeDataA.page = val
this.rewardDetails()
} }
} }
} }

View File

@ -11,7 +11,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-table :data="rechargeDataList"> <el-table :data="rechargeDataAA.list">
<el-table-column prop="userId" label="ID"></el-table-column> <el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column label="头像" width="200"> <el-table-column label="头像" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
@ -32,25 +32,31 @@
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;"> <div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4" <el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataAA.limit" :current-page="rechargeDataAA.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataAA.totalCount">
</el-pagination> </el-pagination>
</div> </div>
<!-- 奖励详情 --> <!-- 奖励详情 -->
<el-dialog title="奖励详情" :visible.sync="dialogVisible" width="50%"> <el-dialog title="奖励详情" :visible.sync="dialogVisible" width="50%">
<div>奖励发放金额合计{{ rewardtotalPage }} </div> <div>奖励发放金额合计{{ rechargeDataBB.totalCount }} </div>
<el-table :data="rewardDetailsList"> <el-table :data="rechargeDataBB.list">
<el-table-column prop="userId" label="ID"></el-table-column> <el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="amount" label="发放金额"></el-table-column> <el-table-column prop="amount" label="发放金额"></el-table-column>
<el-table-column prop="userPhone" label="有效邀请人"></el-table-column> <el-table-column prop="userPhone" label="有效邀请人"></el-table-column>
<el-table-column prop="createTime" label="发放时间"></el-table-column> <el-table-column prop="createTime" label="发放时间"></el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4BB" @current-change="handleCurrentChange4BB"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataCC.limit" :current-page="rechargeDataCC.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataCC.totalCount">
</el-pagination>
</div>
</el-dialog> </el-dialog>
<!-- 签到详情 --> <!-- 签到详情 -->
<el-dialog title="签到详情" :visible.sync="dialogVisibles" width="50%"> <el-dialog title="签到详情" :visible.sync="dialogVisibles" width="50%">
<div><span>签到人数合计{{ signInDetailsTotalPage }}</span> <span>实名人数合计{{ signInDetailsTotalPage }}</span> </div> <div><span>签到人数合计{{ rechargeDataCC.totalCount }}</span> <span>实名人数合计{{
rechargeDataCC.totalCount }}</span> </div>
<el-table :data="signInDetailsList"> <el-table :data="rechargeDataCC.list">
<el-table-column prop="userId" label="ID"></el-table-column> <el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="userName" label="签到账号"></el-table-column> <el-table-column prop="userName" label="签到账号"></el-table-column>
<el-table-column prop="phone" label="签到手机号"></el-table-column> <el-table-column prop="phone" label="签到手机号"></el-table-column>
@ -64,6 +70,12 @@
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="签到时间"></el-table-column> <el-table-column prop="createTime" label="签到时间"></el-table-column>
</el-table> </el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4CC" @current-change="handleCurrentChange4CC"
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataCC.limit" :current-page="rechargeDataCC.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataCC.totalCount">
</el-pagination>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -71,7 +83,6 @@
export default { export default {
data() { data() {
return { return {
rechargeDataList: [],
rewardDetailsList: [], // rewardDetailsList: [], //
rewardtotalPage: 0, // rewardtotalPage: 0, //
signInDetailsList: [], // signInDetailsList: [], //
@ -81,9 +92,23 @@ export default {
}, },
page: 1, page: 1,
limit: 10, limit: 10,
rechargeData: { rechargeDataAA: {
totalCount: 0, totalCount: 0,
list: [] list: [],
page: 1,
limit: 10,
},
rechargeDataBB: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
},
rechargeDataCC: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
}, },
dialogVisible: false,// dialogVisible: false,//
dialogVisibles: false // dialogVisibles: false //
@ -97,16 +122,19 @@ export default {
this.$router.push({ path: '/userDetail', query: { userId: item.userId, active: 'first' } }) this.$router.push({ path: '/userDetail', query: { userId: item.userId, active: 'first' } })
}, },
rewardDetails(item) { rewardDetails(item) {
if (item) {
this.rechargeDataBB.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/award/detail/page', { this.$http.get('/ext/sys/invite/friend/award/detail/page', {
params: { params: {
page: 1, page: this.rechargeDataBB.page,
limit: 100, limit: this.rechargeDataBB.limit,
userId: item.userId userId: this.rechargeDataBB.itemUserId
} }
}).then(response => { }).then(response => {
if (response.data.code === 0) { if (response.data.code === 0) {
this.rewardDetailsList = response.data.data.list this.rechargeDataBB.list = response.data.data.list
this.rewardtotalPage = response.data.data.totalPage this.rechargeDataBB.totalCount = response.data.data.totalCount
this.dialogVisible = true this.dialogVisible = true
} else { } else {
this.$message.error(response.data.message) this.$message.error(response.data.message)
@ -117,16 +145,19 @@ export default {
}) })
}, },
signInDetails(item) { signInDetails(item) {
if (item) {
this.rechargeDataCC.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/signIn/page', { this.$http.get('/ext/sys/invite/friend/signIn/page', {
params: { params: {
page: 1, page: this.rechargeDataCC.page,
limit: 100, limit: this.rechargeDataCC.limit,
userId: item.userId userId: this.rechargeDataCC.itemUserId
} }
}).then(response => { }).then(response => {
if (response.data.code === 0) { if (response.data.code === 0) {
this.signInDetailsList = response.data.data.list this.rechargeDataCC.list = response.data.data.list
this.signInDetailsTotalPage = response.data.data.totalPage this.rechargeDataCC.totalCount = response.data.data.totalCount
this.dialogVisibles = true this.dialogVisibles = true
} else { } else {
this.$message.error(response.data.message) this.$message.error(response.data.message)
@ -137,8 +168,8 @@ export default {
}) })
}, },
onSubmit() { onSubmit() {
this.page = 1 this.rechargeDataAA.page = 1
this.limit = 10 this.rechargeDataAA.limit = 10
this.getRechargeData() this.getRechargeData()
}, },
reset() { reset() {
@ -150,13 +181,14 @@ export default {
getRechargeData() { getRechargeData() {
this.$http.get('/ext/sys/invite/friend/award/page', { this.$http.get('/ext/sys/invite/friend/award/page', {
params: { params: {
page: this.page, page: this.rechargeDataAA.page,
limit: this.limit, limit: this.rechargeDataAA.limit,
keywords: this.formInline.keywords keywords: this.formInline.keywords
} }
}).then(response => { }).then(response => {
if (response.data.code === 0) { if (response.data.code === 0) {
this.rechargeDataList = response.data.data.list this.rechargeDataAA.list = response.data.data.list
this.rechargeDataAA.totalCount = response.data.data.totalCount
} else { } else {
this.$message.error(response.data.message) this.$message.error(response.data.message)
} }
@ -166,13 +198,34 @@ export default {
}) })
}, },
handleSizeChange4(val) { handleSizeChange4(val) {
this.limit = val this.rechargeDataAA.limit = val
this.rechargeDataAA.page = 1
this.getRechargeData() this.getRechargeData()
}, },
handleCurrentChange4(val) { handleCurrentChange4(val) {
this.page = val this.rechargeDataAA.page = val
this.getRechargeData() this.getRechargeData()
},
handleSizeChange4BB(val) {
this.rechargeDataBB.limit = val
this.rechargeDataBB.page = 1
this.rewardDetails()
},
handleCurrentChange4BB(val) {
this.rechargeDataBB.page = val
this.rewardDetails()
},
handleSizeChange4CC(val) {
this.rechargeDataCC.limit = val
this.rechargeDataCC.page = 1
this.signInDetails()
},
handleCurrentChange4CC(val) {
this.rechargeDataCC.page = val
this.signInDetails()
} }
} }
} }
</script> </script>

View File

@ -119,26 +119,27 @@
<el-table-column prop="createTime" label="创建时间" width="200"></el-table-column> <el-table-column prop="createTime" label="创建时间" width="200"></el-table-column>
<el-table-column label="操作" width="80" align="center" fixed="right"> <el-table-column label="操作" width="80" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button style="margin:5px;" size="mini" type="warning" icon="document" :disabled="!isAuth('orderCenter:tuikuan')" @click="tuikuanBtn(scope.row)" v-if="scope.row.status==1&&scope.row.payWay != 5">退款 <el-button style="margin:5px;" size="mini" type="warning" icon="document"
:disabled="!isAuth('orderCenter:tuikuan')" @click="tuikuanBtn(scope.row)"
v-if="scope.row.status == 1 && scope.row.payWay != 5">退款
</el-button> </el-button>
<el-button size = "mini" type = "danger" :disabled = "!isAuth('orderCenter:delete')" style="margin:5px;" <el-button size="mini" type="danger" :disabled="!isAuth('orderCenter:delete')"
@click = "deletes(scope.row)">删除</el-button> style="margin:5px;" @click="deletes(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="color: #B94A48;font-size: 20px;margin-top: 10px;display: inline-block;"> <div style="color: #B94A48;font-size: 20px;margin-top: 10px;display: inline-block;">
本页累计收入统计{{ totalMoney.toFixed(2) }} </div> 本页累计收入统计{{ totalMoney.toFixed(2) }} </div>
<div style="text-align: center;margin-top: 10px;float:right"> <div style="text-align: center;margin-top: 10px;float:right">
<el-pagination @size-change = "handleSizeChange" @current-change = "handleCurrentChange" :page-sizes = "[10, 20, 30, 40, 100, 200, 500]" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-size = "limit" :current-page = "page" layout = "total,sizes, prev, pager, next,jumper" :page-sizes="[10, 20, 30, 40, 100, 200, 500]" :page-size="limit" :current-page="page"
:total = "tableData.totalCount"> layout="total,sizes, prev, pager, next,jumper" :total="tableData.totalCount">
</el-pagination> </el-pagination>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
<script> <script>
import { watch } from 'fs'
export default { export default {
data() { data() {
@ -360,15 +361,17 @@ import { watch } from 'fs'
}, },
}, },
mounted() { mounted() {
// if(this.$route.query.userName) { if (this.$route.query.userName) {
// this.userName = this.$route.query.userName this.status = 1
// } this.userName = this.$route.query.userName
}
this.dataSelect() this.dataSelect()
}, },
watch: { watch: {
// //
'$route'(to, from) { '$route'(to, from) {
if (to.query.userName) { if (to.query.userName) {
this.status = 1
this.userName = to.query.userName this.userName = to.query.userName
this.dataSelect() this.dataSelect()
} }