抽奖次数、邀请好友优化

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>
</div>
<el-table :data="list">
<el-table :data="rechargeData.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="avatar" label="头像">
<template slot-scope="scope">
@@ -20,18 +20,9 @@
</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="totalDrawCount" 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 prop="todayUnlocked" label="今日订单数">
</el-table-column>
<el-table-column prop="unlocked" label="抽奖次数信息">
<template slot-scope="scope">
<div>共获得抽奖次数{{ scope.row.totalDrawCount }}</div>
<div>剩余抽奖次数{{ scope.row.residueDrawCount }}</div>
<div>今日抽奖次数{{ scope.row.todayDrawCount }}</div>
</template>
<el-table-column prop="todayDrawCount" label="当日抽奖次数">
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
@@ -41,18 +32,25 @@
</el-table>
<div style="text-align: center;margin-top: 10px;">
<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">
</el-pagination>
</div>
<!-- 详情 -->
<el-dialog title="抽奖详情" :visible.sync="dialogVisible" width="50%">
<div>抽奖次数合计:{{ rewardtotalPage }} </div>
<el-table :data="rewardDetailsList">
<div>抽奖次数合计:{{ rechargeDataA.totalCount }} </div>
<el-table :data="rechargeDataA.list">
<el-table-column prop="id" label="ID"></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>
<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>
</div>
</template>
@@ -64,16 +62,21 @@ export default {
formInline: {
keywords: ''
},
page: 1,
limit: 10,
rechargeData: {
totalCount: 0,
list: []
list: [],
page: 1,
limit: 10,
},
rechargeDataA: {
totalCount: 0,
list: [],
page: 1,
limit: 10,
itemUserId: ''
},
list: [],
dialogVisible: false,
rewardDetailsList: [],
rewardtotalPage: 0,
}
},
mounted() {
@@ -81,11 +84,11 @@ export default {
},
methods: {
goUrl(item) {
this.$router.push({ path: '/orderCenter', query: { userName: item.phone } })
this.$router.push({ path: '/orderCenter', query: { userName: item.userName } })
},
onSubmit() {
this.page = 1
this.limit = 10
this.rechargeData.page = 1
this.rechargeData.limit = 10
this.getRechargeData()
}, reset() {
this.formInline = {
@@ -96,13 +99,15 @@ export default {
getRechargeData() {
this.$http.get('/ext/sys/lottery/count/query/page', {
params: {
page: this.page,
limit: this.limit,
page: this.rechargeData.page,
limit: this.rechargeData.limit,
keywords: this.formInline.keywords
}
}).then(response => {
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 {
this.$message.error(response.data.msg)
}
@@ -110,16 +115,20 @@ export default {
console.error(error)
})
}, rewardDetails(item) {
if (item) {
this.rechargeDataA.itemUserId = item.userId
}
this.$http.get('/ext/sys/lottery/detail/page', {
params: {
page: 1,
limit: 100,
userId: item.userId
page: this.rechargeDataA.page,
limit: this.rechargeDataA.limit,
userId: this.rechargeDataA.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.rewardDetailsList = response.data.data.list
this.rewardtotalPage = response.data.data.totalPage
this.rechargeDataA.list = response.data.data.list
this.rechargeDataA.totalCount = response.data.data.totalCount
this.dialogVisible = true
} else {
this.$message.error(response.data.message)
@@ -132,12 +141,23 @@ export default {
handleSizeChange4(val) {
this.limit = val
this.rechargeData.limit = val
this.rechargeData.page = 1
this.getRechargeData()
},
handleCurrentChange4(val) {
this.page = val
this.rechargeData.page = val
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>
</div>
<el-table :data="rechargeDataList">
<el-table :data="rechargeDataAA.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column label="头像" width="200">
<template slot-scope="scope">
@@ -32,25 +32,31 @@
</el-table>
<div style="text-align: center;margin-top: 10px;">
<el-pagination @size-change="handleSizeChange4" @current-change="handleCurrentChange4"
:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeData.totalCount">
:page-sizes="[10, 20, 30, 40]" :page-size="rechargeDataAA.limit" :current-page="rechargeDataAA.page"
layout="total,sizes, prev, pager, next,jumper" :total="rechargeDataAA.totalCount">
</el-pagination>
</div>
<!-- 奖励详情 -->
<el-dialog title="奖励详情" :visible.sync="dialogVisible" width="50%">
<div>奖励发放金额合计{{ rewardtotalPage }} </div>
<el-table :data="rewardDetailsList">
<div>奖励发放金额合计{{ rechargeDataBB.totalCount }} </div>
<el-table :data="rechargeDataBB.list">
<el-table-column prop="userId" label="ID"></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="createTime" label="发放时间"></el-table-column>
</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 title="签到详情" :visible.sync="dialogVisibles" width="50%">
<div><span>签到人数合计{{ signInDetailsTotalPage }}</span> <span>实名人数合计{{ signInDetailsTotalPage }}</span> </div>
<el-table :data="signInDetailsList">
<div><span>签到人数合计{{ rechargeDataCC.totalCount }}</span> <span>实名人数合计{{
rechargeDataCC.totalCount }}</span> </div>
<el-table :data="rechargeDataCC.list">
<el-table-column prop="userId" label="ID"></el-table-column>
<el-table-column prop="userName" label="签到账号"></el-table-column>
<el-table-column prop="phone" label="签到手机号"></el-table-column>
@@ -64,6 +70,12 @@
</el-table-column>
<el-table-column prop="createTime" label="签到时间"></el-table-column>
</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>
</div>
</template>
@@ -71,7 +83,6 @@
export default {
data() {
return {
rechargeDataList: [],
rewardDetailsList: [], // 奖励详情列表
rewardtotalPage: 0, // 奖励详情总页数
signInDetailsList: [], // 签到详情列表
@@ -81,9 +92,23 @@ export default {
},
page: 1,
limit: 10,
rechargeData: {
rechargeDataAA: {
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,// 控制奖励详情弹窗的显示与隐藏
dialogVisibles: false // 控制签到详情弹窗的显示与隐藏
@@ -97,16 +122,19 @@ export default {
this.$router.push({ path: '/userDetail', query: { userId: item.userId, active: 'first' } })
},
rewardDetails(item) {
if (item) {
this.rechargeDataBB.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/award/detail/page', {
params: {
page: 1,
limit: 100,
userId: item.userId
page: this.rechargeDataBB.page,
limit: this.rechargeDataBB.limit,
userId: this.rechargeDataBB.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.rewardDetailsList = response.data.data.list
this.rewardtotalPage = response.data.data.totalPage
this.rechargeDataBB.list = response.data.data.list
this.rechargeDataBB.totalCount = response.data.data.totalCount
this.dialogVisible = true
} else {
this.$message.error(response.data.message)
@@ -117,16 +145,19 @@ export default {
})
},
signInDetails(item) {
if (item) {
this.rechargeDataCC.itemUserId = item.userId
}
this.$http.get('/ext/sys/invite/friend/signIn/page', {
params: {
page: 1,
limit: 100,
userId: item.userId
page: this.rechargeDataCC.page,
limit: this.rechargeDataCC.limit,
userId: this.rechargeDataCC.itemUserId
}
}).then(response => {
if (response.data.code === 0) {
this.signInDetailsList = response.data.data.list
this.signInDetailsTotalPage = response.data.data.totalPage
this.rechargeDataCC.list = response.data.data.list
this.rechargeDataCC.totalCount = response.data.data.totalCount
this.dialogVisibles = true
} else {
this.$message.error(response.data.message)
@@ -137,8 +168,8 @@ export default {
})
},
onSubmit() {
this.page = 1
this.limit = 10
this.rechargeDataAA.page = 1
this.rechargeDataAA.limit = 10
this.getRechargeData()
},
reset() {
@@ -150,13 +181,14 @@ export default {
getRechargeData() {
this.$http.get('/ext/sys/invite/friend/award/page', {
params: {
page: this.page,
limit: this.limit,
page: this.rechargeDataAA.page,
limit: this.rechargeDataAA.limit,
keywords: this.formInline.keywords
}
}).then(response => {
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 {
this.$message.error(response.data.message)
}
@@ -166,13 +198,34 @@ export default {
})
},
handleSizeChange4(val) {
this.limit = val
this.rechargeDataAA.limit = val
this.rechargeDataAA.page = 1
this.getRechargeData()
},
handleCurrentChange4(val) {
this.page = val
this.rechargeDataAA.page = val
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>

View File

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