Commit 2cbcc9fd authored by 王's avatar

订单管理

parent 09c2daa5
<template>
<el-dialog
title="订单详情"
center
:visible.sync="dialogObj.show"
width="800px">
<el-row align="middle" type="flex">
<el-col :span="4"><label>订单号</label></el-col>
<el-col :span="8">
{{detail.out_trade_no}}
</el-col>
<el-col :span="4"><label>商品名称</label></el-col>
<el-col :span="8">{{detail.goods_name}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>用户昵称</label></el-col>
<el-col :span="8">
{{detail.user_nickname}}
</el-col>
<el-col :span="4"><label>用户手机号</label></el-col>
<el-col :span="8">{{detail.user_mobile}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>推广人类型</label></el-col>
<el-col :span="8">{{detail.invite_type}}</el-col>
<el-col :span="4"><label>推广人ID</label></el-col>
<el-col :span="8">{{detail.invite_id}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>推广人收益</label></el-col>
<el-col :span="8">{{ detail.invite_earnings ? detail.invite_earnings/100 : 0}}</el-col>
<template v-if="detail.buy_type === 2">
<el-col :span="4"><label>团购信息</label></el-col>
<el-col :span="8">团ID:{{detail.order_group_id}}<br>时否是团长:{{detail.is_captain === 0 ? '否' : '是'}}</el-col>
</template>
</el-row>
<el-row>
<el-col :span="4"><label>期数ID</label></el-col>
<el-col :span="8">{{detail.periods_id}}</el-col>
<el-col :span="4"><label>描述</label></el-col>
<el-col :span="8">{{detail.desc}}</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>收获地址</label></el-col>
<el-col :span="20">
<template v-if="detail.user_address_id">
收货人:{{detail.receive_name}}<br>
手机号:{{detail.receive_mobile}}<br>
收获地址: {{detail.province_name}}{{detail.city}}{{detail.area}}{{detail.address}}
</template>
</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>付款时间</label></el-col>
<el-col :span="8">{{detail.pay_at}}</el-col>
</el-row>
</el-dialog>
</template>
<script>
import {INVITETYPE,ORDERSTATUS,BUYTYPE} from "../../util/wordbook";
export default {
name: "detail",
props:[
'dialogObj'
],
data(){
return {
detail:{},
show:false
}
},
methods:{
initDialog(){
this.detail = this.dialogObj.detail;
this.show = this.dialogObj.show;
}
},
filters:{
payMentFilter(val){
return val=='1'?'已付款':'未付款'
},
courseTypeFilter(val){
return val.type=='1'?`正式课(${val.duration}个月)`:`试听课(${val.duration}天)`
},
inviteType(value){
return INVITETYPE[value]
},
status(value){
return ORDERSTATUS[value]
},
buyType(value){
return BUYTYPE[value]
},
moneytFilter(val){
return val = val / 100 + '元'
}
},
watch:{
dialogObj:{
handler: function () {
this.initDialog()
},
deep: true
},
show(value){
this.$emit("changeShow",value);
}
}
}
</script>
<style scoped lang="less">
.el-col{
height: 60px;
img{
width: 50px;
border-radius: 100px;
}
label{
color: #5982e6;
}
}
</style>
This diff is collapsed.
<template>
<div>
<div class="putForward">
<el-form :inline="true" :model="search" class="demo-form-inline" label-width="80px">
<el-form-item label="关键字">
<el-input v-model="search.key" placeholder="用户名/手机号"></el-input>
......@@ -139,7 +139,7 @@
import {getWithdrawListApi,editOrderDescApi,withdrawApi} from "../../service/api";
import page from '../framework/page'
export default {
name: "orderMoney",
name: "putForward",
data(){
return {
nowPage: 1,
......@@ -206,19 +206,11 @@
methods:{
//获取列表
getList:function () {
let data = {
key : this.search.key,
page : this.page.current,
per_page : this.page.pageSize,
status : this.search.status
let json = {
};
getWithdrawListApi( data ).then(res=>{
if( res.data.result === 'success' ){
this.tableData = res.data.data.data;
this.total = res.data.data.total;
}else{
this.$message.error( res.data.message );
}
getWithdrawListApi(json).then(res=>{
this.tableData = res.list;
this.total = res.total;
})
},
// 查询按钮
......@@ -272,11 +264,7 @@
return false
}
editOrderDescApi(this.nowObj.id,'withdraw',data).then(res=>{
if( res.data.result === 'success' ){
this.doCallback()
}else{
this.$message.error( res.data.message );
}
this.doCallback()
});
// 审核
}else{
......@@ -291,11 +279,7 @@
data.reason = '';
}
withdrawApi(this.nowObj.id, data ).then(res=>{
if( res.data.result === 'success' ){
this.doCallback()
}else{
this.$message.error( res.data.message );
}
this.doCallback()
})
}
}
......@@ -304,6 +288,9 @@
</script>
<style scoped>
.putForward {
padding: 20px;
}
.status{
color: #e9a038;
}
......
<template>
<div class="refund">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item label="用户昵称">
<el-input v-model="searchFrom.nickname"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="用户ID">
<el-input v-model="searchFrom.user_id"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" :offset="6">
<el-form-item style="float: right">
<el-button type="primary" plain @click="getRefundList">搜索</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="list"
style="width: 100%">
......@@ -84,19 +103,11 @@
return {
nowPage: 1,
total: 0,
list: [
{
out_trade_no: '111',
refund_no: '111',
user_id: '1',
order_money: 100,
refund_money: 100,
desc: 'sdfaf',
callback: 'ewewew',
status: 1,
success_at: '2018-09-01'
}
]
searchFrom: {
nickname:'',
user_id: ''
},
list: []
}
},
filters:{
......@@ -132,7 +143,14 @@
})
},
getRefundList(){
getRefundListApi().then((res)=>{
let json = {}
if(this.searchFrom.nickname){
json.nickname = this.searchFrom.nickname
}
if(this.searchFrom.user_id){
json.user_id = this.searchFrom.user_id
}
getRefundListApi(json).then((res)=>{
this.total = res.total;
this.list = res.list
})
......@@ -144,6 +162,6 @@
<style scoped>
.refund{
margin: 10px;
padding: 20px;
}
</style>
......@@ -16,6 +16,11 @@
<img class="avatar" :src="detail.qr"/>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<label>老师状态:</label>{{detail.status === 0 ? '正常' : '禁用'}}
</el-col>
</el-row>
</div>
<el-table
:data="list"
......
......@@ -15,26 +15,36 @@
<el-row>
<el-col :span="4"><label>手机号</label></el-col>
<el-col :span="8">{{userDetail.mobile}}</el-col>
<el-col :span="4"><label>注册时间</label></el-col>
<el-col :span="8">{{userDetail.created_at}}</el-col>
<el-col :span="4"><label>用户ID</label></el-col>
<el-col :span="8">{{userDetail.user_id}}</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>生日</label></el-col>
<el-col :span="8">{{userDetail.birthday}}</el-col>
<el-col :span="4"><label>ID</label></el-col>
<el-col :span="8">{{userDetail.user_id}}</el-col>
<el-col :span="4"><label>邀请类型</label></el-col>
<el-col :span="8">{{userDetail.invite_type}}</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>等级</label></el-col>
<el-col :span="8">{{userDetail.level}}</el-col>
<el-col :span="4"><label>最后登录</label></el-col>
<el-col :span="8">{{userDetail.last_login_at}}</el-col>
<el-col :span="4"><label>邀请人ID</label></el-col>
<el-col :span="8">{{userDetail.invite_user_id}}</el-col>
</el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>邀请码</label></el-col>
<el-col :span="8">
{{userDetail.invite_code}}
</el-col>
<el-col :span="4"><label>老师ID</label></el-col>
<el-col :span="8">
{{userDetail.teacher_id}}
</el-col>
</el-row>
<el-row>
<el-col :span="4"><label>注册时间</label></el-col>
<el-col :span="8">{{userDetail.created_at}}</el-col>
<el-col :span="4"><label>最后登录</label></el-col>
<el-col :span="8">{{userDetail.last_login_at}}</el-col>
</el-row>
</el-dialog>
</template>
......@@ -81,7 +91,7 @@
<style scoped lang="less">
.el-col{
height: 50px;
height: 60px;
img{
width: 50px;
border-radius: 100px;
......
......@@ -445,7 +445,7 @@ export const refundApi = function (id, json) {
// 修改订单收货地址
const editAddressUrl = `${_baseUrl}api/admin/order/address/`;
export const editAddressApi = function (id,json) {
return Vue.prototype.$put(`${editAddressUrl}/${id}`,json)
return Vue.prototype.$put(`${editAddressUrl}${id}`,json)
};
// 提现审核
const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`;
......
export default{
dateFmt:function(date,format) {
var o = {
"M+" : date.getMonth()+1, //month
"d+" : date.getDate(), //day
"h+" : date.getHours(), //hour
"m+" : date.getMinutes(), //minute
"s+" : date.getSeconds(), //second
"q+" : Math.floor((date.getMonth()+3)/3), //quarter
"S" : date.getMilliseconds() //millisecond
}
if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
(date.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o)if(new RegExp("("+ k +")").test(format))
format = format.replace(RegExp.$1,
RegExp.$1.length==1 ? o[k] :
("00"+ o[k]).substr((""+ o[k]).length));
return format;
}
}
\ No newline at end of file
......@@ -48,3 +48,45 @@ export const BUYTYPE = {
1:'单买',
2:'团购'
}
export const BUYTYPEOPTION = [
{
id: 1,
value: '单买'
},
{
id: 2,
value: '团购'
}
]
export const ORDERSTATUSOPTION = [
{
id: 0,
value: '待付款'
},
{
id: 1,
value: '付款成功'
},
{
id: 2,
value: '付款失败'
},
{
id: 3,
value: '退款成功'
}
]
export const INVITETYPEOPTION = [
{
id: 0,
value: '用户'
},
{
id: 1,
value: '老师'
},
{
id: 2,
value: '推广渠道'
}
]
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