Commit 74ccb7bc authored by chenfenglei's avatar chenfenglei

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

parent b2c4209f
...@@ -3,35 +3,114 @@ ...@@ -3,35 +3,114 @@
:title="dialogObj.title" :title="dialogObj.title"
:visible.sync="dialogObj.show" :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> </el-dialog>
</template> </template>
<script> <script>
import {getTeacherClassApi} from "../../service/api";
import page from '../framework/page'
export default { export default {
props:[ props:[
'dialogObj' 'dialogObj'
], ],
data(){ data(){
return{ return{
nowPage: 1,
total: 0,
limit: 10,
classList:[],
} }
}, },
components:{
page
},
methods:{ methods:{
initPage(){ onPageChange(val){
this.nowPage = val;
this.classListOption();
},
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.classListOption();
},
classListOption(){
console.log(this.dialogObj) 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:{ watch:{
'dialogObj.show'(value){ 'dialogObj.show'(value){
if(value){ if(value){
this.initPage() this.classListOption()
} }
} }
} }
} }
</script> </script>
<style scoped> <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> </style>
\ No newline at end of file
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
label="班主任名字" label="班主任名字"
> >
<template slot-scope="scope"> <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}} {{scope.row.teacher_name}}
<!-- </el-button> --> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
label="班主任名字" label="班主任名字"
> >
<template slot-scope="scope"> <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}} {{scope.row.teacher_name}}
<!-- </el-button> --> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
show:false, show:false,
title:'售卖课程', title:'售卖课程',
teacher_id:"", teacher_id:"",
timeValue:"", timeValue:[],
}, },
} }
}, },
...@@ -201,11 +201,9 @@ ...@@ -201,11 +201,9 @@
this.searchFirstFrom.dateValue = [star,end] this.searchFirstFrom.dateValue = [star,end]
this.searchSecondFrom.dateValue = [star,end] this.searchSecondFrom.dateValue = [star,end]
}, },
nameClick(val){ nameClick(val,dataTime){
this.dialogObj.teacher_id=val.tid; this.dialogObj.teacher_id=val.tid;
if(val.cur_date){ this.dialogObj.timeValue=dataTime
this.dialogObj.timeValue=val.cur_date
}
this.dialogObj.show=true; this.dialogObj.show=true;
}, },
} }
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
start_at:this.searchFrom.dateValue[0], start_at:this.searchFrom.dateValue[0],
end_at:this.searchFrom.dateValue[1], end_at:this.searchFrom.dateValue[1],
goods_ids:this.searchFrom.priceList.toString(), goods_ids:this.searchFrom.priceList.toString(),
course_type:1,
}; };
orderCountApi(json).then(res=>{ orderCountApi(json).then(res=>{
if(res.length>0){ 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>
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<div style="padding: 15px"> <div style="padding: 15px">
<el-button type="success" @click="onAddUser(true)" v-if="!$store.state.readonly">老师绑定用户</el-button> <el-button type="success" @click="onAddUser(true)" v-if="!$store.state.readonly">老师绑定用户</el-button>
</div> </div>
<div class="b-title">期数列表</div>
<el-table <el-table
@expand-change="changeRow" @expand-change="changeRow"
:data="list" :data="list"
...@@ -130,8 +131,181 @@ ...@@ -130,8 +131,181 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<div class="b-title">月课订单列表</div>
<el-form ref="form" :model="form" label-width="100px" inline>
<el-form-item label="用户ID">
<el-input v-model="form.user_id"></el-input>
</el-form-item>
<el-form-item label="用户昵称">
<el-input v-model="form.nickname"></el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model="form.mobile"></el-input>
</el-form-item>
<el-form-item label="商品名称">
<el-select v-model="form.goods_id" placeholder="请选择" @change="getOrderList" clearable>
<el-option
v-for="(data,index) in goodList"
:key="index"
:label="data | filterGoods"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单状态">
<el-select multiple v-model="form.status" placeholder="请选择" @change="getOrderList" clearable>
<el-option
v-for="item in orderStatusOption"
:key="item.id"
:label="item.value"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="交易订单号">
<el-input v-model="form.out_trade_no"></el-input>
</el-form-item>
<el-form-item >
<el-button type="primary" plain @click="getOrderList">搜索</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
style="width: 100%" class="order_list">
<el-table-column
prop="out_trade_no"
label="订单号"
>
</el-table-column>
<el-table-column
label="购买人"
className="f-c"
width="150">
<template slot-scope="scope">
<img class="avatar" :src="scope.row.user_avatar"/> {{scope.row.user_nickname}}<br>(ID:{{scope.row.user_id}})<br>手机:{{scope.row.user_mobile}}
</template>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名称">
</el-table-column>
<el-table-column
width="250"
prop="invite_id"
className="f-c"
label="推广人">
<template slot-scope="scope">
<div @click="showSource(scope.row)" v-if="scope.row.invite_earnings > 0 && scope.row.invite_id !== 0" style="width:100%;display: flex;color: #409eff;cursor: pointer">
<img :src="scope.row.invite_avatar" class="avatar"/>
类型:{{scope.row.invite_type}}
<br>
收益:{{scope.row.invite_earnings / 100}}
<br>
用户ID:{{scope.row.invite_id}}
<br>
昵称:{{scope.row.invite_nickname}}
<br>
手机:{{scope.row.invite_mobile}}
</div>
<div v-if="scope.row.invite_earnings === 0 && scope.row.invite_id !== 0" style="display: flex;">
<img :src="scope.row.invite_avatar" class="avatar"/>
类型:{{scope.row.invite_type}}
<br>
收益:{{scope.row.invite_earnings / 100}}
<br>
用户ID:{{scope.row.invite_id}}
<br>
昵称:{{scope.row.invite_nickname}}
<br>
手机:{{scope.row.invite_mobile}}
</div>
<div v-if="scope.row.invite_id === 0">
</div>
</template>
</el-table-column>
<el-table-column
label="优惠活动">
<template slot-scope="scope">
<span v-if="scope.row.order_coupon_id === 0">
</span>
<el-button type="text" v-if="scope.row.order_coupon_id !== 0" @click="showCoupon(scope.row)">
优惠券
</el-button>
</template>
</el-table-column>
<el-table-column
label="付款状态"
width="80">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.status === 5 || scope.row.status === 3" @click="showRef(scope.row)">{{scope.row.status|status}}</el-button>
<div v-if="scope.row.status !== 5 && scope.row.status !== 3">{{scope.row.status|status}}</div>
</template>
</el-table-column>
<el-table-column
label="实付金额"
width="80">
<template slot-scope="scope">
{{scope.row.money | moneytFilter}}
</template>
</el-table-column>
<el-table-column
label="收货地址">
<template slot-scope="scope">
<div v-if="scope.row.user_address_id && scope.row.address_info">
{{scope.row.address_info.receive_name}}<br>
{{scope.row.address_info.receive_mobile}}<br>
{{scope.row.address_info.province_name}}{{scope.row.address_info.city}}{{scope.row.address_info.area}}{{scope.row.address_info.address}}
</div>
</template>
</el-table-column>
<el-table-column
prop="pay_at"
label="购买时间" sortable>
</el-table-column>
<el-table-column
prop="created_at"
label="下单时间" sortable>
</el-table-column>
<el-table-column
prop="desc"
label="备注">
</el-table-column>
<el-table-column
width="50"
label="操作"
v-if="!$store.state.readonly"
>
<template slot-scope="scope">
<el-popover
placement="top"
width="400">
<div style="text-align: center">
<el-button
@click="editComment(scope.row.id, scope.row.desc)"
type="info"
plain
size="mini">
编辑备注
</el-button>
</div>
<el-button slot="reference" size="mini" type="text" >操作</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
<page-order :total="orderListObj.total" :limit="orderListObj.limit" @pageChange="onPageChange2" @sizeChange="onSizeChange2"/>
<source-dialog :dialogObj="sourceDialog"/>
<refund-detail :dialogObj="refundDetail"/>
<coupon-dialog :dialogObj="couponDetail"/>
<user-list :userObj="userObj" @reflash="getTeacherDetail"/> <user-list :userObj="userObj" @reflash="getTeacherDetail"/>
<choose-good-dialog v-if="chooseGoodDialogObj.show" :dialogObj="chooseGoodDialogObj" @changeShow="changeShow"/> <choose-good-dialog v-if="chooseGoodDialogObj.show" :dialogObj="chooseGoodDialogObj" @changeShow="changeShow"/>
<el-dialog :modal="false" :visible.sync="addShow"> <el-dialog :modal="false" :visible.sync="addShow">
<el-form label-width="90px"> <el-form label-width="90px">
<!--<el-form-item label="用户id">--> <!--<el-form-item label="用户id">-->
...@@ -183,7 +357,7 @@ ...@@ -183,7 +357,7 @@
label="手机号"> label="手机号">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page-teacher :total="userObj.total" :limit="userObj.limit" @pageChange="onPageChange3" @sizeChange="onSizeChange3"/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addShow = false">取 消</el-button> <el-button @click="addShow = false">取 消</el-button>
<el-button type="primary" @click="onAdd">确 定</el-button> <el-button type="primary" @click="onAdd">确 定</el-button>
...@@ -193,17 +367,31 @@ ...@@ -193,17 +367,31 @@
</template> </template>
<script> <script>
import {getTeacherDetailApi,getClassStatisticsApi,getUserListApi,teacherBindUserApi} from "../../service/api"; import {getTeacherDetailApi,getClassStatisticsApi,getUserListApi,teacherBindUserApi,getOrderListApi,getGoodsListApi,editOrderDescApi,updateOrderTeacherApi } from "../../service/api";
import {TEACHERTYPE} from "../../util/wordbook"; import {TEACHERTYPE,ORDERSTATUSOPTION,GOODSTYPE,ORDERSTATUS} from "../../util/wordbook";
import AddressArray from '../framework/address-picker/addr'
import page from '../framework/page' import page from '../framework/page'
import pageTeacher from '../framework/page'
import pageOrder from '../framework/page'
import sourceDialog from './sourceDialog'
import couponDialog from './couponDialog'
import refundDetail from './refundDetail'
import UserList from '../class/userList' import UserList from '../class/userList'
import chooseGoodDialog from './chooseGoodDialog' import chooseGoodDialog from './chooseGoodDialog'
export default { export default {
name: "index", name: "index",
components:{ components:{
page, page,
pageTeacher,
pageOrder,
UserList, UserList,
chooseGoodDialog chooseGoodDialog,
couponDialog,
refundDetail,
sourceDialog
}, },
data(){ data(){
return { return {
...@@ -214,6 +402,17 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -214,6 +402,17 @@ import chooseGoodDialog from './chooseGoodDialog'
start_at:'', start_at:'',
end_at:'' end_at:''
}, },
form: {
nickname: '',
user_id: '',
status: [1,4,5],
goods_id: '',
out_trade_no: '',
receive_mobile:"",
},
goodList:[],
orderStatusOption:ORDERSTATUSOPTION,
tableData:[],
userList:[], userList:[],
list:[], list:[],
id: '', id: '',
...@@ -227,13 +426,34 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -227,13 +426,34 @@ import chooseGoodDialog from './chooseGoodDialog'
classId:'', classId:'',
title:'', title:'',
show:false, show:false,
total: 0,
limit: 10,
nowPage: 1,
}, },
addId:'', addId:'',
multipleSelection:[], multipleSelection:[],
chooseGoodDialogObj: { chooseGoodDialogObj: {
show: false, show: false,
code: '' code: ''
} },
orderListObj:{
total: 0,
limit: 10,
nowPage: 1,
},
sourceDialog:{
show:false,
out_trade_no:''
},
couponDetail:{
show:false,
order_coupon_id:''
},
refundDetail:{
show:false,
out_trade_no:''
},
} }
}, },
methods:{ methods:{
...@@ -281,8 +501,8 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -281,8 +501,8 @@ import chooseGoodDialog from './chooseGoodDialog'
}, },
getUser(){ getUser(){
let json = { let json = {
page: this.nowPage, page: this.userObj.nowPage,
limit: this.limit, limit: this.userObj.limit,
}; };
if (this.searchFrom.userId) { if (this.searchFrom.userId) {
json.user_id = this.searchFrom.userId json.user_id = this.searchFrom.userId
...@@ -295,7 +515,7 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -295,7 +515,7 @@ import chooseGoodDialog from './chooseGoodDialog'
} }
getUserListApi(json).then(res=>{ getUserListApi(json).then(res=>{
this.userList = res.list; this.userList = res.list;
this.total = res.total; this.userObj.total = res.total;
}) })
}, },
changeRow(data,b){ changeRow(data,b){
...@@ -320,17 +540,34 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -320,17 +540,34 @@ import chooseGoodDialog from './chooseGoodDialog'
teacherId: data.teacher_id, teacherId: data.teacher_id,
periods_id: data.periods_id periods_id: data.periods_id
} }
},
onPageChange3(val){
this.userObj.nowPage = val;
this.getUser()
},
onSizeChange3(val){
this.userObj.limit = val;
this.userObj.nowPage = 1;
this.getUser();
}, },
onPageChange(val){ onPageChange(val){
this.nowPage = val; this.nowPage = val;
this.getTeacherDetail(); this.getTeacherDetail();
this.getUser()
}, },
onSizeChange(val){ onSizeChange(val){
this.limit = val; this.limit = val;
this.nowPage = 1; this.nowPage = 1;
this.getTeacherDetail(); this.getTeacherDetail();
this.getUser(); },
onPageChange2(val){
this.orderListObj.nowPage = val;
this.getOrderList()
},
onSizeChange2(val){
this.orderListObj.limit = val;
this.orderListObj.nowPage = 1;
this.getOrderList()
}, },
getTeacherDetail(){ getTeacherDetail(){
this.searchFrom = { this.searchFrom = {
...@@ -361,6 +598,8 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -361,6 +598,8 @@ import chooseGoodDialog from './chooseGoodDialog'
this.total = res.class_list.total; this.total = res.class_list.total;
} }
this.detail = res; this.detail = res;
this.getOrderList();
}) })
}, },
createInviteLink(id){ createInviteLink(id){
...@@ -370,7 +609,88 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -370,7 +609,88 @@ import chooseGoodDialog from './chooseGoodDialog'
changeShow(){ changeShow(){
this.chooseGoodDialogObj.show = false; this.chooseGoodDialogObj.show = false;
this.chooseGoodDialogObj.code = ''; this.chooseGoodDialogObj.code = '';
},
getOrderList(){
let json = {
limit: this.orderListObj.limit,
page: this.orderListObj.nowPage
};
if (this.form.nickname) {
json.nickname = this.form.nickname
}
if (this.form.user_id) {
json.user_id = this.form.user_id
}
if (this.form.status) {
json.status = this.form.status.toString()
}
if (this.form.goods_id) {
json.goods_id = this.form.goods_id
}
if (this.form.out_trade_no) {
json.out_trade_no = this.form.out_trade_no
} }
if (this.form.mobile) {
json.mobile = this.form.mobile
}
json.course_type=0 //月课
// json.invite_id=this.id;
if(this.detail.user_id !==0){
json.invite_id=this.detail.user_id;
getOrderListApi(json).then((res)=>{
res.list.forEach(i=>{
i.refundList=[]
});
this.tableData = res.list;
this.orderListObj.total = res.total
})
}
},
getGoodsOption(){
let json = {
page: 1,
limit: 100,
course_type:0,
};
getGoodsListApi(json).then(res=>{
this.goodList = res.list;
})
},
editComment(id, desc) {
this.$prompt('', '编辑备注', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType:'textarea',
inputValue: desc || ''
}).then(({ value }) => {
this.$confirm('确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
editOrderDescApi(id,'order',{desc: value}).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
});
this.getOrderList();
});
});
})
},
showRef(data){
this.refundDetail.show = true;
this.refundDetail.out_trade_no = data.out_trade_no;
},
showCoupon(data){
this.couponDetail.show = true;
this.couponDetail.order_coupon_id = data.order_coupon_id;
},
showSource(data){
this.sourceDialog.show = true;
this.sourceDialog.out_trade_no = data.out_trade_no;
},
}, },
filters:{ filters:{
teacherType(value){ teacherType(value){
...@@ -378,17 +698,31 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -378,17 +698,31 @@ import chooseGoodDialog from './chooseGoodDialog'
}, },
percent(val){ percent(val){
return (val * 100).toFixed(2)+'%' return (val * 100).toFixed(2)+'%'
},
status(value){
return ORDERSTATUS[value]
},
moneytFilter(val){
return val = val / 100 + '元'
},
filterGoods(val){
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
} }
}, },
mounted(){ mounted(){
this.id = this.$route.params.id; this.id = this.$route.params.id;
this.getTeacherDetail(); this.getTeacherDetail();
this.getGoodsOption();
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.b-title {
padding: 20px;
color: #666;
}
.teacher { .teacher {
padding: 20px 0; padding: 20px 0;
} }
...@@ -424,6 +758,15 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -424,6 +758,15 @@ import chooseGoodDialog from './chooseGoodDialog'
color: #5982e6; color: #5982e6;
} }
} }
.order_list{
.avatar{
width: 50px;
min-width: 50px;
height: 50px;
margin-right: 5px;
border-radius: 50%;
}
}
</style> </style>
<style> <style>
.demo-table-expand { .demo-table-expand {
...@@ -438,4 +781,12 @@ import chooseGoodDialog from './chooseGoodDialog' ...@@ -438,4 +781,12 @@ import chooseGoodDialog from './chooseGoodDialog'
margin-bottom: 0; margin-bottom: 0;
width: 50%; width: 50%;
} }
.f-c > .cell {
display: flex !important;
flex-flow: row;
justify-content: flex-start;
align-items: center;
}
</style> </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="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> <template>
<div class="user"> <div class="user">
<div class="header"> <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 size="mini" plain type="success" v-if="!$store.state.readonly" @click="bindTeacher" style="float: right">
绑定老师 绑定老师
</el-button> </el-button>
</div> </div> -->
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<label>昵称:</label> <label>昵称:</label>
...@@ -599,6 +599,7 @@ ...@@ -599,6 +599,7 @@
getDetail(){ getDetail(){
if(!this.id) return; if(!this.id) return;
getUserDetailApi(this.id).then(res=>{ getUserDetailApi(this.id).then(res=>{
console.log(res)
this.detail = res; this.detail = res;
if (res.periods_list) { if (res.periods_list) {
this.periodList = res.periods_list this.periodList = res.periods_list
......
...@@ -806,3 +806,9 @@ const orderDescUrl = `/api/admin/yunji/order/desc/`; ...@@ -806,3 +806,9 @@ const orderDescUrl = `/api/admin/yunji/order/desc/`;
export const orderDescApi = function(json,id) { export const orderDescApi = function(json,id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`,json) return Vue.prototype.$put(`${orderDescUrl}${id}`,json)
} }
//老师销卖课程列表
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