Commit 74ccb7bc authored by chenfenglei's avatar chenfenglei

教师详情展示期数列表下面展示这个老师的月课订单列表

parent b2c4209f
......@@ -3,35 +3,114 @@
:title="dialogObj.title"
:visible.sync="dialogObj.show"
>
<el-table
:data="classList"
style="width: 100%">
<el-table-column
label="购买人"
className="f-c"
width="150">
<template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar"/> {{scope.row.nickname}}<br>(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
prop="out_trade_no"
label="交易订单号"
>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名字"
>
</el-table-column>
<el-table-column
prop="money"
label="金额(元)"
>
</el-table-column>
<el-table-column
prop="pay_at"
label="支付时间"
>
</el-table-column>
</el-table>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</el-dialog>
</template>
<script>
import {getTeacherClassApi} from "../../service/api";
import page from '../framework/page'
export default {
props:[
'dialogObj'
],
data(){
return{
nowPage: 1,
total: 0,
limit: 10,
classList:[],
}
},
components:{
page
},
methods:{
initPage(){
onPageChange(val){
this.nowPage = val;
this.classListOption();
},
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.classListOption();
},
classListOption(){
console.log(this.dialogObj)
let json ={
page:this.nowPage,
limit:this.limit,
start_at:this.dialogObj.timeValue[0],
end_at:this.dialogObj.timeValue[1],
}
getTeacherClassApi(json,this.dialogObj.teacher_id).then(res=>{
console.log(res.list)
this.classList=res.list
this.total=res.total;
})
},
},
watch:{
'dialogObj.show'(value){
if(value){
this.initPage()
this.classListOption()
}
}
}
}
</script>
<style scoped>
.avatar{
width: 50px;
min-width: 50px;
height: 50px;
margin-right: 5px;
border-radius: 50%;
}
.order {
padding: 20px 0;
}
</style>
<style>
.f-c > .cell {
display: flex !important;
flex-flow: row;
justify-content: flex-start;
align-items: center;
}
</style>
\ No newline at end of file
......@@ -29,9 +29,9 @@
label="班主任名字"
>
<template slot-scope="scope">
<!-- <el-button type="text" @click="nameClick(scope.row)"> -->
<el-button type="text" @click="nameClick(scope.row,searchFirstFrom.dateValue)">
{{scope.row.teacher_name}}
<!-- </el-button> -->
</el-button>
</template>
</el-table-column>
<el-table-column
......@@ -88,9 +88,9 @@
label="班主任名字"
>
<template slot-scope="scope">
<!-- <el-button type="text" @click="nameClick(scope.row)"> -->
<el-button type="text" @click="nameClick(scope.row,searchSecondFrom.dateValue)">
{{scope.row.teacher_name}}
<!-- </el-button> -->
</el-button>
</template>
</el-table-column>
<el-table-column
......@@ -140,7 +140,7 @@
show:false,
title:'售卖课程',
teacher_id:"",
timeValue:"",
timeValue:[],
},
}
},
......@@ -201,11 +201,9 @@
this.searchFirstFrom.dateValue = [star,end]
this.searchSecondFrom.dateValue = [star,end]
},
nameClick(val){
nameClick(val,dataTime){
this.dialogObj.teacher_id=val.tid;
if(val.cur_date){
this.dialogObj.timeValue=val.cur_date
}
this.dialogObj.timeValue=dataTime
this.dialogObj.show=true;
},
}
......
......@@ -114,6 +114,7 @@
start_at:this.searchFrom.dateValue[0],
end_at:this.searchFrom.dateValue[1],
goods_ids:this.searchFrom.priceList.toString(),
course_type:1,
};
orderCountApi(json).then(res=>{
if(res.length>0){
......
<template>
<el-dialog
title="优惠券详情"
center
append-to-body
:visible.sync="dialogObj.show"
width="90%">
<el-table
:data="detail"
style="width: 100%">
<el-table-column
prop="coupon_no"
label="优惠券码">
</el-table-column>
<el-table-column
prop="out_trade_no"
label="订单号">
</el-table-column>
<el-table-column
label="用户信息"
min-width="140"
className="userInfo"
>
<template slot-scope="scope">
<img class="avatar" :src="scope.row.user_avatar">
{{scope.row.user_nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
label="优惠券金额">
<template slot-scope="scope">
{{parseFloat(scope.row.money / 100)}}
</template>
</el-table-column>
<el-table-column
label="使用状态">
<template slot-scope="scope">
{{scope.row.status|filterStatus}}
</template>
</el-table-column>
<el-table-column
prop="use_at"
label="使用时间">
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import {getCouponListApi} from "../../service/api";
export default {
name: "sourceDialog",
props:[
'dialogObj'
],
data(){
return{
detail:[]
}
},
mounted(){
this.initPage()
},
filters:{
filterStatus:function (value) {
let msg = '';
if(value === 0){
msg = '未使用'
}else if(value === 1){
msg = '已使用'
}else if(value === 2){
msg = '禁用'
}
return msg;
}
},
methods:{
initPage(){
let json = {
order_coupon_id:this.dialogObj.order_coupon_id,
limit:10000
};
getCouponListApi(json).then(res=>{
this.detail = res.list
})
}
},
watch:{
'dialogObj.show'(value){
if(value === true){
this.initPage()
}
}
}
}
</script>
<style scoped>
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
This diff is collapsed.
<template>
<el-dialog
title="退款详情"
center
append-to-body
:visible.sync="dialogObj.show"
width="90%">
<el-table
:data="detail"
style="width: 100%">
<el-table-column
prop="refund_no"
label="退款编号">
</el-table-column>
<el-table-column
prop="out_trade_no"
label="订单号">
</el-table-column>
<el-table-column
label="用户信息"
min-width="140"
className="userInfo"
>
<template slot-scope="scope">
<img class="avatar" :src="scope.row.user_avatar">
{{scope.row.user_nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
prop="order_money"
label="订单金额">
<template slot-scope="scope">
{{parseFloat(scope.row.order_money / 100)}}
</template>
</el-table-column>
<el-table-column
prop="refund_money"
label="退款金额">
<template slot-scope="scope">
{{parseFloat(scope.row.refund_money / 100)}}
</template>
</el-table-column>
<el-table-column
prop="desc"
label="备注">
</el-table-column>
<el-table-column
label="退款状态">
<template slot-scope="scope">
{{scope.row.status|filterStatus}}
</template>
</el-table-column>
<el-table-column
prop="success_at"
label="退款成功时间">
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import {getRefundListApi} from "../../service/api";
export default {
name: "refundDetail",
props:[
'dialogObj'
],
data(){
return{
detail:[]
}
},
filters:{
filterStatus:function (value) {
let msg = '';
if(value === 0){
msg = '退款中'
}else if(value === 1){
msg = '退款成功'
}else if(value === 2){
msg = '退款失败'
}
return msg;
}
},
mounted(){
this.initPage()
},
methods:{
initPage(){
let json = {
out_trade_no:this.dialogObj.out_trade_no,
limit:10000
};
getRefundListApi(json).then(res=>{
this.detail = res.list
})
}
},
watch:{
'dialogObj.show'(value) {
if (value === true) {
this.initPage()
}
}
}
}
</script>
<style scoped>
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<template>
<el-dialog
title="提现详情"
center
append-to-body
:visible.sync="dialogObj.show"
width="90%">
<el-table
:data="detail"
style="width: 100%">
<el-table-column
prop="withdraw_no"
label="提现单号"
>
</el-table-column>
<el-table-column
prop="out_trade_no"
label="订单号"
>
</el-table-column>
<el-table-column
label="用户"
width="200"
className="f-c"
>
<template slot-scope="scope">
<img class="avatar" :src="scope.row.user_avatar"/> {{scope.row.user_nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
prop="user_mobile"
label="手机号"
>
</el-table-column>
<el-table-column
label="提现金额"
>
<template slot-scope="scope">
{{ scope.row.money | moneyYuan}}
</template>
</el-table-column>
<el-table-column
label="提现状态"
>
<template slot-scope="scope">
<span :class="{status:true,red:scope.row.status === 2,green:scope.row.status === 1}">
{{ scope.row.status | filterStatus}}
</span>
</template>
</el-table-column>
<el-table-column
label="提现成功时间"
>
<template slot-scope="scope">
{{ scope.row.success_at }}
</template>
</el-table-column>
<el-table-column
label="提现时间"
>
<template slot-scope="scope">
{{ scope.row.created_at }}
</template>
</el-table-column>
<el-table-column
prop="reason"
label="失败原因"
>
</el-table-column>
<el-table-column
prop="desc"
label="备注"
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import {getWithdrawListApi} from "../../service/api";
export default {
name: "sourceDialog",
props:[
'dialogObj'
],
data(){
return{
detail:[]
}
},
filters:{
moneyYuan:function (value) {
if(!value){
return '';
}
return value = (value/100).toFixed(2) + '元';
},
filterStatus:function (value) {
let msg = '';
if(value === 0){
msg = '审核中'
}else if(value === 1){
msg = '提现成功'
}else if(value === 2){
msg = '提现失败'
}
return msg;
}
},
mounted(){
this.initPage()
},
methods:{
initPage(){
let json = {
out_trade_no:this.dialogObj.out_trade_no,
limit:10000
};
getWithdrawListApi(json).then(res=>{
this.detail = res.list
})
}
},
watch:{
'dialogObj.show'(value){
if(value === true){
this.initPage()
}
}
}
}
</script>
<style scoped>
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<template>
<div class="user">
<div class="header">
<div class="clear-both" style="margin-top: 20px" v-if="detail">
<!-- <div class="clear-both" style="margin-top: 20px" v-if="detail">
<el-button size="mini" plain type="success" v-if="!$store.state.readonly" @click="bindTeacher" style="float: right">
绑定老师
</el-button>
</div>
</div> -->
<el-row>
<el-col :span="6">
<label>昵称:</label>
......@@ -599,6 +599,7 @@
getDetail(){
if(!this.id) return;
getUserDetailApi(this.id).then(res=>{
console.log(res)
this.detail = res;
if (res.periods_list) {
this.periodList = res.periods_list
......
......@@ -805,4 +805,10 @@ export const bindTeacherApi = function(json,id) {
const orderDescUrl = `/api/admin/yunji/order/desc/`;
export const orderDescApi = function(json,id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`,json)
}
\ No newline at end of file
}
//老师销卖课程列表
const getTeacherClassUrl = `/api/admin/teacher/performance/course/`;
export const getTeacherClassApi = function(json,id) {
return Vue.prototype.$fetch(`${getTeacherClassUrl}${id}`,json)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment