抽奖次数、邀请好友优化

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

@ -1,385 +1,388 @@
<template>
<el-tabs v-model = "activeName" @tab-click = "handleClick">
<el-tab-pane label = "订单列表" name = "first">
<div style = "margin-right:2%;">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="订单列表" name="first">
<div style="margin-right:2%;">
<span>状态</span>
<el-select v-model="status" style="width:150px;margin-left: 10px;" @change="animeDat(status)">
<el-option v-for="item in statesnum" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<div style="position: relative;display: inline-block;">
<span>订单编号</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入订单编号"
v-model="ordersNo"></el-input>&nbsp;&nbsp;
</div>
<span>订单类型</span>
<el-select v-model="ordersType" style="width:150px;margin-left: 10px;" @change="animeDat()">
<el-option v-for="item in ordersTypenum" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<div style="position: relative;display: inline-block;">
<span>购买用户昵称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入购买用户昵称"
v-model="userName"></el-input>&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;">
<span>渠道码</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道码"
v-model="qdCode"></el-input>&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;">
<span>渠道商名称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道商名称"
v-model="sysUserName"></el-input>&nbsp;&nbsp;
</div>
<div style="margin:5px;display: inline-block;">
<span>开始时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
</el-date-picker>
</div>
<div style="margin:5px;display: inline-block;">
<span>截止时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
</el-date-picker>
</div>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
<div style="position: relative;display: inline-block;">
<span>订单编号</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入订单编号"
v-model="ordersNo"></el-input>&nbsp;&nbsp;
</div>
<span>订单类型</span>
<el-select v-model="ordersType" style="width:150px;margin-left: 10px;" @change="animeDat()">
<el-option v-for="item in ordersTypenum" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>&nbsp;&nbsp;&nbsp;&nbsp;
<div style="position: relative;display: inline-block;">
<span>购买用户昵称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入购买用户昵称"
v-model="userName"></el-input>&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;">
<span>渠道码</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道码"
v-model="qdCode"></el-input>&nbsp;&nbsp;
</div>
<div style="position: relative;display: inline-block;">
<span>渠道商名称</span>
<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入渠道商名称"
v-model="sysUserName"></el-input>&nbsp;&nbsp;
</div>
<div style="margin:5px;display: inline-block;">
<span>开始时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
</el-date-picker>
</div>
<div style="margin:5px;display: inline-block;">
<span>截止时间</span>
<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
</el-date-picker>
</div>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="select">查询
</el-button>
<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
</el-button>
</div>
<el-table v-loading = "tableDataLoading" :data = "tableData.list" >
<el-table-column fixed prop = "ordersId" label = "编号" width = "80"></el-table-column>
<el-table-column prop = "ordersNo" label = "订单编号" width = "180"></el-table-column>
<el-table-column prop = "userName" label = "购买用户昵称" width = "120" align="center">
<template slot-scope = "scope">
<span style = "color: #4f9dec;cursor: pointer;" @click = "updates(scope.row)">
{{ scope.row.userName}}
</span>
</template>
</el-table-column>
<el-table-column prop = "title" label = "购买短剧/会员等级" width = "180" align="center">
<template slot-scope = "scope">
<span v-if = "scope.row.ordersType == 1">{{scope.row.title}}</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==0">月卡</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==1">季卡</span>
<span v-if = "scope.row.ordersType == 2 && scope.row.vipNameType==2">年卡</span>
</template>
</el-table-column>
<el-table-column prop = "qdCode" label = "渠道码"></el-table-column>
<el-table-column prop = "sysUserName" label = "渠道商名称" width = "180">
<template slot-scope = "scope">
<span style = "color: #4f9dec;">{{ scope.row.sysUserName}}</span>
</template>
</el-table-column>
<el-table-column prop = "payWay" label = "订单类型" width = "120">
<template slot-scope = "scope">
<span v-if = "scope.row.ordersType == 1">短剧</span>
<span v-if = "scope.row.ordersType == 2">会员</span>
</template>
</el-table-column>
<el-table-column prop = "payWay" label = "支付方式" width = "120">
<template slot-scope = "scope">
<span v-if = "scope.row.payWay == null">暂无</span>
<span v-if = "scope.row.payWay == 1">微信APP</span>
<span v-if = "scope.row.payWay == 2">微信公众号</span>
<span v-if = "scope.row.payWay == 3">微信小程序</span>
<span v-if = "scope.row.payWay == 4">支付宝</span>
<span v-if = "scope.row.payWay == 5">会员免费</span>
<span v-if = "scope.row.payWay == 6">金币</span>
<span v-if = "scope.row.payWay == 7">抖音</span>
<span v-if = "scope.row.payWay == 8">快手</span>
</template>
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格" width="100">
</el-table-column>
<el-table-column prop="diamond" label="是否是钻石支付" width="100">
<template slot-scope="scope">
<span v-if="scope.row.diamond == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop = "payMoney" label = "支付金额" width = "120"></el-table-column>
<el-table-column prop = "qdMoney" label = "渠道佣金">
<template slot-scope = "scope">
<span >{{ scope.row.qdMoney?scope.row.qdMoney:0}}</span>
</template>
</el-table-column>
<el-table-column prop = "status" label = "状态" width="80" fixed="right">
<template slot-scope = "scope">
<span v-if = "scope.row.status == null">待支付</span>
<span v-if = "scope.row.status == 0">待支付</span>
<span v-if = "scope.row.status == 1">已支付</span>
<span v-if = "scope.row.status == 2">已退款</span>
</template>
</el-table-column>
<!-- <el-table-column prop = "refundContent" label = "退款原因" ></el-table-column> -->
<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>
<el-button size = "mini" type = "danger" :disabled = "!isAuth('orderCenter:delete')" style="margin:5px;"
@click = "deletes(scope.row)">删除</el-button>
<el-table v-loading="tableDataLoading" :data="tableData.list">
<el-table-column fixed prop="ordersId" label="编号" width="80"></el-table-column>
<el-table-column prop="ordersNo" label="订单编号" width="180"></el-table-column>
<el-table-column prop="userName" label="购买用户昵称" width="120" align="center">
<template slot-scope="scope">
<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row)">
{{ scope.row.userName }}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="title" label="购买短剧/会员等级" width="180" align="center">
<template slot-scope="scope">
<span v-if="scope.row.ordersType == 1">{{ scope.row.title }}</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 0">月卡</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 1">季卡</span>
<span v-if="scope.row.ordersType == 2 && scope.row.vipNameType == 2">年卡</span>
</template>
</el-table-column>
<el-table-column prop="qdCode" label="渠道码"></el-table-column>
<el-table-column prop="sysUserName" label="渠道商名称" width="180">
<template slot-scope="scope">
<span style="color: #4f9dec;">{{ scope.row.sysUserName }}</span>
</template>
</el-table-column>
<el-table-column prop="payWay" label="订单类型" width="120">
<template slot-scope="scope">
<span v-if="scope.row.ordersType == 1">短剧</span>
<span v-if="scope.row.ordersType == 2">会员</span>
</template>
</el-table-column>
<el-table-column prop="payWay" label="支付方式" width="120">
<template slot-scope="scope">
<span v-if="scope.row.payWay == null">暂无</span>
<span v-if="scope.row.payWay == 1">微信APP</span>
<span v-if="scope.row.payWay == 2">微信公众号</span>
<span v-if="scope.row.payWay == 3">微信小程序</span>
<span v-if="scope.row.payWay == 4">支付宝</span>
<span v-if="scope.row.payWay == 5">会员免费</span>
<span v-if="scope.row.payWay == 6">金币</span>
<span v-if="scope.row.payWay == 7">抖音</span>
<span v-if="scope.row.payWay == 8">快手</span>
</template>
</el-table-column>
<el-table-column prop="payDiamond" label="钻石价格" width="100">
</el-table-column>
<el-table-column prop="diamond" label="是否是钻石支付" width="100">
<template slot-scope="scope">
<span v-if="scope.row.diamond == 1"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="payMoney" label="支付金额" width="120"></el-table-column>
<el-table-column prop="qdMoney" label="渠道佣金">
<template slot-scope="scope">
<span>{{ scope.row.qdMoney ? scope.row.qdMoney : 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="80" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.status == null">待支付</span>
<span v-if="scope.row.status == 0">待支付</span>
<span v-if="scope.row.status == 1">已支付</span>
<span v-if="scope.row.status == 2">已退款</span>
</template>
</el-table-column>
<!-- <el-table-column prop = "refundContent" label = "退款原因" ></el-table-column> -->
<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>
<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>
本页累计收入统计{{ 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>
</div>
</el-tab-pane>
</el-tabs>
</template>
<script>
import { watch } from 'fs'
export default {
data () {
return {
page: 1,
limit: 10,
classify: 1,
ordersNo: '',
imageUrl: '',
url: '',
status: '',
activeName: 'first',
tableDataLoading: true,
tableData: [],
checkBoxData: [],//
statesnum:[
{
label: '全部',
value: ''
},
{
label: '待支付',
value: 0
},
{
label: '已支付',
value: 1
},
{
label: '已退款',
value: 2
},
],
totalMoney: 0,
ordersTypenum: [{
label: '全部',
value: ''
},
{
label: '短剧',
value: 1
},
{
label: '会员',
value: 2
},
],
ordersType: '',
userName: '',
startTime: '',
endTime: '',
qdCode:'',
sysUserName:'',
}
export default {
data() {
return {
page: 1,
limit: 10,
classify: 1,
ordersNo: '',
imageUrl: '',
url: '',
status: '',
activeName: 'first',
tableDataLoading: true,
tableData: [],
checkBoxData: [],//
statesnum: [
{
label: '全部',
value: ''
},
{
label: '待支付',
value: 0
},
{
label: '已支付',
value: 1
},
{
label: '已退款',
value: 2
},
],
totalMoney: 0,
ordersTypenum: [{
label: '全部',
value: ''
},
{
label: '短剧',
value: 1
},
{
label: '会员',
value: 2
},
],
ordersType: '',
userName: '',
startTime: '',
endTime: '',
qdCode: '',
sysUserName: '',
}
},
methods: {
//
changeFun(val) {
this.checkBoxData = val
},
methods: {
//
changeFun (val) {
this.checkBoxData = val
},
//
// getNowTime () {
// var now = new Date()
// var year = now.getFullYear() //
// var month = now.getMonth() //
// var date = now.getDate() //
// var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours()
// var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()
// var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds()
// month = month + 1
// month = month.toString().padStart(2, '0')
// date = date.toString().padStart(2, '0')
// var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`
// return defaultDate
// this.$set(this.info, 'stockDate', defaultDate)
// },
// tabs
handleClick (tab, event) {
if (tab._props.label == '订单列表') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
}
},
handleSizeChange (val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange (val) {
this.page = val
this.dataSelect()
},
//
select() {
//
// getNowTime () {
// var now = new Date()
// var year = now.getFullYear() //
// var month = now.getMonth() //
// var date = now.getDate() //
// var hh = now.getHours() < 10 ? '0' + now.getHours() : now.getHours()
// var mm = now.getMinutes() < 10 ? '0' + now.getMinutes() : now.getMinutes()
// var ss = now.getSeconds() < 10 ? '0' + now.getSeconds() : now.getSeconds()
// month = month + 1
// month = month.toString().padStart(2, '0')
// date = date.toString().padStart(2, '0')
// var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`
// return defaultDate
// this.$set(this.info, 'stockDate', defaultDate)
// },
// tabs
handleClick(tab, event) {
if (tab._props.label == '订单列表') {
this.page = 1
this.limit = 10
this.classify = 1
this.dataSelect()
},
//
cleans() {
this.ordersNo = ''
this.status = ''
this.page = 1
this.ordersType = ''
this.userName = ''
this.startTime = ''
this.endTime = ''
this.qdCode = ''
this.sysUserName = ''
this.dataSelect()
},
// select
animeDat(state) {
this.page = 1
this.status = state
console.log(state)
this.dataSelect()
},
// banner
deletes (row) {
let delid = row.ordersId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`order/deleteOrders?ids=${delid}`),
method: 'get',
data: this.$http.adornData({})
}).then(({data}) => {
}
},
handleSizeChange(val) {
this.limit = val
this.dataSelect()
},
handleCurrentChange(val) {
this.page = val
this.dataSelect()
},
//
select() {
this.page = 1
this.limit = 10
this.dataSelect()
},
//
cleans() {
this.ordersNo = ''
this.status = ''
this.page = 1
this.ordersType = ''
this.userName = ''
this.startTime = ''
this.endTime = ''
this.qdCode = ''
this.sysUserName = ''
this.dataSelect()
},
// select
animeDat(state) {
this.page = 1
this.status = state
console.log(state)
this.dataSelect()
},
// banner
deletes(row) {
let delid = row.ordersId
this.$confirm(`确定删除此条信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl(`order/deleteOrders?ids=${delid}`),
method: 'get',
data: this.$http.adornData({})
}).then(({ data }) => {
this.$message({
message: '删除成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {
})
},
//
dataSelect() {
this.tableDataLoading = true
this.totalMoney = 0
this.$http({
url: this.$http.adornUrl('order/selectOrders'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'ordersNo': this.ordersNo,
'status': this.status,
'ordersType': this.ordersType,
'userName': this.userName,
'startTime': this.startTime,
'endTime': this.endTime,
'qdCode': this.qdCode,
'sysUserName': this.sysUserName,
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.tableDataLoading = false
for (var i in data.data.list) {
if (data.data.list[i].payMoney) {
this.totalMoney = this.totalMoney + Number(data.data.list[i].payMoney)
}
}
let returnData = data.data
this.tableData = returnData
}
})
},
//
updates(row) {
this.$router.push({ path: '/userDetail', query: { userId: row.userId } })
},
// 退
tuikuanBtn(row) {
let delid = row.ordersId
this.$confirm(`确定退款吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('order/refundOrders?ordersId=' + delid),
method: 'post',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if (data.code == 0) {
this.$message({
message: '删除成功',
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
})
}).catch(() => {
})
},
//
dataSelect () {
this.tableDataLoading = true
this.totalMoney = 0
this.$http({
url: this.$http.adornUrl('order/selectOrders'),
method: 'get',
params: this.$http.adornParams({
'page': this.page,
'limit': this.limit,
'ordersNo':this.ordersNo,
'status':this.status,
'ordersType': this.ordersType,
'userName': this.userName,
'startTime': this.startTime,
'endTime': this.endTime,
'qdCode': this.qdCode,
'sysUserName': this.sysUserName,
})
}).then(({data}) => {
if (data && data.code === 0) {
this.tableDataLoading = false
for (var i in data.data.list) {
if (data.data.list[i].payMoney) {
this.totalMoney = this.totalMoney + Number(data.data.list[i].payMoney)
} else {
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
}
let returnData = data.data
this.tableData = returnData
})
}
})
},
//
updates (row) {
this.$router.push({path: '/userDetail', query: {userId: row.userId}})
},
// 退
tuikuanBtn(row){
let delid = row.ordersId
this.$confirm(`确定退款吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('order/refundOrders?ordersId='+delid),
method: 'post',
params: this.$http.adornParams({})
}).then(({
data
}) => {
if(data.code==0){
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.dataSelect()
}
})
}else{
this.$message({
message: data.msg,
type: 'warning',
duration: 1500,
onClose: () => {
}
})
}
})
})
},
})
},
mounted () {
// if(this.$route.query.userName) {
// this.userName = this.$route.query.userName
// }
this.dataSelect()
},
mounted() {
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()
}
},
watch: {
//
'$route' (to, from) {
if (to.query.userName) {
this.userName = to.query.userName
this.dataSelect()
}
},
},
},
}
</script>
<style>
.customWidth {
width: 80% !important;
}
.customWidth {
width: 80% !important;
}
</style>