Commit 10eaca84 authored by chenfenglei's avatar chenfenglei

订单拆分日课订单月课订单

parent 106119fc
<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>
<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 | inviteType}}</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.address_info">
收货人:{{detail.address_info.receive_name}}<br>
手机号:{{detail.address_info.receive_mobile}}<br>
收货地址: {{detail.address_info.province_name}}{{detail.address_info.city}}{{detail.address_info.area}}{{detail.address_info.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;
console.log('this.dialogObj.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>
<template>
<el-dialog
title="编辑收货地址"
center
append-to-body
:visible.sync="dialogObj.show"
width="800px">
<vue-address :province="dialogObj.province" :city="dialogObj.city" :district="dialogObj.district" :detail="dialogObj.detail" :mobile="dialogObj.receive_mobile" :name="dialogObj.receive_name" @change="handlerAddressChange">
</vue-address>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogObj.show = false">取 消</el-button>
<el-button type="primary" @click="saveAddress">保 存</el-button>
</div>
</el-dialog>
</template>
<script>
import {editAddressApi} from "../../service/api";
import vueAddress from '../framework/address-picker/Address'
import AddressArray from '../framework/address-picker/addr'
export default {
name: "dialogObj",
props:[
'dialogObj'
],
data(){
return{
}
},
methods:{
handlerAddressChange (val) {
if(!val.province || !val.city || !val.district){
return
}
this.dialogObj.detail = val.detail;
this.dialogObj.province = val.province;
this.dialogObj.city = val.city;
this.dialogObj.receive_mobile = val.mobile;
this.dialogObj.receive_name = val.name;
let provinceObj = AddressArray.filter((item) => {
return item.value === val.province
})
let cityObj = provinceObj[0].children.filter((city) => {
return city.value === val.city
})
let districtObj = cityObj[0].children.filter((district) => {
return district.value === val.district
})
this.dialogObj.province_name = provinceObj[0].label;
this.dialogObj.city_name = cityObj[0].label;
this.dialogObj.district_name = districtObj.length > 0 ? districtObj[0].label : cityObj[0].children[0].label;
this.dialogObj.district = districtObj.length > 0 ? districtObj[0].value : cityObj[0].children[0].value;
},
saveAddress () {
this.$confirm('确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
let json = {
province_id: this.dialogObj.province,
province_name: this.dialogObj.province_name,
city_id: this.dialogObj.city,
city: this.dialogObj.city_name,
area: this.dialogObj.district_name,
area_id: this.dialogObj.district,
address: this.dialogObj.detail,
receive_name: this.dialogObj.receive_name,
receive_mobile: this.dialogObj.receive_mobile
};
editAddressApi(this.dialogObj.id,json).then(res=>{
this.$message({
type: 'success',
message: '修改成功'
});
this.dialogObj.show=false;
this.$emit("reflash");
});
})
},
},
components:{
vueAddress
},
mounted(){
}
}
</script>
<style scoped lang="less">
.dialog-footer{
display: block;
text-align: center;
}
</style>
This diff is collapsed.
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="show"
width="800px">
<div v-loading="loading">
<el-form ref="form" :model="form" :rules="rules" >
<el-row :gutter="20">
<el-col :span="4"><label>退款金额</label></el-col>
<el-col :span="8">
<el-form-item prop="key">
<el-input v-model="form.money"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-button type="success" round size="small" @click="form.money=100">¥100</el-button>
<el-button type="success" round size="mini" @click="form.money=150">¥150</el-button>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4"><label>退课</label></el-col>
<el-col :span="8">
<el-form-item>
<el-switch
v-model="form.refund_type"
:active-value="2"
:inactive-value="1">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="4"><label>退款原因</label></el-col>
<el-col :span="12">
<el-form-item>
<el-input v-model="form.desc" type="textarea"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">取 消</el-button>
<el-button type="primary" @click="save">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
import {refundApi} from "../../service/api";
export default {
name: "dialogObj",
props:[
'dialogObj'
],
data(){
return{
show:false,
id: '',
loading:true,
form:{
money:0,
refund_type:1,
desc:''
},
rules:{
money:[
{ required: true, message: '请输入退款金额', trigger: 'change' }
],
desc:[
{ required: true, message: '请输入退款原因', trigger: 'change' }
]
}
}
},
methods:{
save(){
this.$confirm('确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
if(this.dialogObj.id){
this.$refs['form'].validate((valid) => {
if(valid){
let json = {
refund_money: parseFloat(this.form.money) * 100,
desc: this.form.desc
};
refundApi(this.dialogObj.id,json).then(res=>{
this.$message({
type: 'success',
message: '退款成功!'
});
this.$emit("reflash");
this.show = false;
})
}
});
}
});
},
initDialog(){
this.show = this.dialogObj.show;
if (this.dialogObj.id) {
this.id = this.dialogObj.id;
}
this.form.money = parseFloat(this.dialogObj.money / 100);
this.form.desc = this.dialogObj.desc;
this.loading = false
}
},
watch:{
dialogObj:{
handler: function () {
this.initDialog()
},
deep: true
},
show(value){
this.$emit("changeShow",value);
}
}
}
</script>
<style scoped lang="less">
</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>
This diff is collapsed.
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
if(this.search.money){ if(this.search.money){
json.money = parseFloat(this.search.money) * 100 json.money = parseFloat(this.search.money) * 100
} }
exportExcelApi('/api/public/withdraw/export',json) exportExcelApi('/api/admin/withdraw/export',json)
}, },
//获取列表 //获取列表
getList:function () { getList:function () {
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
if(this.searchFrom.out_trade_no){ if(this.searchFrom.out_trade_no){
json.out_trade_no = this.searchFrom.out_trade_no json.out_trade_no = this.searchFrom.out_trade_no
} }
exportExcelApi('/api/public/refund/export',json) exportExcelApi('/api/admin/refund/export',json)
}, },
} }
} }
......
...@@ -40,6 +40,12 @@ ...@@ -40,6 +40,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="课程类别">
<el-select v-model="searchFrom.course_type" placeholder="请选择" @change="getUser" clearable>
<el-option v-for="item in classType" :key="item.course_type" :label="item.value" :value="item.course_type">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品状态" > <el-form-item label="商品状态" >
<el-select v-model="searchFrom.status" placeholder="请选择" @change="getUser"> <el-select v-model="searchFrom.status" placeholder="请选择" @change="getUser">
<el-option value="" label="请选择"></el-option> <el-option value="" label="请选择"></el-option>
...@@ -224,8 +230,19 @@ ...@@ -224,8 +230,19 @@
name:'', name:'',
goods_type: '', goods_type: '',
status: '', status: '',
course_id: '' course_id: '',
course_type:"",
},
classType:[
{
course_type: 0,
value: "月课"
}, },
{
course_type: 1,
value: "日课"
}
],
userList:[], userList:[],
total:0, total:0,
nowPage:1, nowPage:1,
...@@ -359,6 +376,8 @@ ...@@ -359,6 +376,8 @@
if (this.searchFrom.current_price) { if (this.searchFrom.current_price) {
json.current_price = this.searchFrom.current_price * 100 json.current_price = this.searchFrom.current_price * 100
} }
json.course_type = this.searchFrom.course_type
console.log(json)
getGoodsListApi(json).then(res=>{ getGoodsListApi(json).then(res=>{
res.list.forEach(i=>{ res.list.forEach(i=>{
if(i.conflict_goods_ids === ''){ if(i.conflict_goods_ids === ''){
......
...@@ -108,7 +108,7 @@ export default [{ ...@@ -108,7 +108,7 @@ export default [{
value: '订单管理', value: '订单管理',
icon: 'icon-dingdan', icon: 'icon-dingdan',
list: [{ list: [{
value: '订单列表', value: '日课订单列表',
routerName: 'order', routerName: 'order',
path: '/order', path: '/order',
cover: '5-1', cover: '5-1',
...@@ -117,7 +117,19 @@ export default [{ ...@@ -117,7 +117,19 @@ export default [{
name: 'order', name: 'order',
component: e => require(['@/components/order'], e), component: e => require(['@/components/order'], e),
} }
}, { },
,{
value: '月课订单列表',
routerName: 'monthOrder',
path: '/monthOrder',
cover: '5-10',
router: {
path: '/monthOrder',
name: 'monthOrder',
component: e => require(['@/components/monthOrder'], e),
}
},
{
value: '退款列表', value: '退款列表',
routerName: 'refund', routerName: 'refund',
path: '/refund', path: '/refund',
......
...@@ -130,3 +130,7 @@ export const QRSTATUS = { ...@@ -130,3 +130,7 @@ export const QRSTATUS = {
0:'正常', 0:'正常',
1:'禁用' 1:'禁用'
}; };
export const ISLEADER = {
0:'不是',
1:'是'
}
\ No newline at end of file
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