Commit 1bf64e23 authored by 王's avatar

conflit

parents 215eca8f 79c7caed
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<script> <script>
// import {getCategoryApi} from "../../service/api"; import {editAddressApi} from "../../service/api";
import vueAddress from '../framework/address-picker/Address' import vueAddress from '../framework/address-picker/Address'
import AddressArray from '../framework/address-picker/addr' import AddressArray from '../framework/address-picker/addr'
export default { export default {
...@@ -63,7 +63,14 @@ import AddressArray from '../framework/address-picker/addr' ...@@ -63,7 +63,14 @@ import AddressArray from '../framework/address-picker/addr'
receive_name: this.dialogObj.receive_name, receive_name: this.dialogObj.receive_name,
receive_mobile: this.dialogObj.receive_mobile receive_mobile: this.dialogObj.receive_mobile
}; };
this.$emit("reflash"); editAddressApi(this.dialogObj.id,json).then(res=>{
this.$message({
type: 'success',
message: '修改成功'
});
this.dialogObj.show=false;
this.$emit("reflash");
});
// Service.updateUserAddress(json, this.dialogObj.user_id, this.dialogObj.pay_id).then(res=>{ // Service.updateUserAddress(json, this.dialogObj.user_id, this.dialogObj.pay_id).then(res=>{
// if(res.data.result=='success'){ // if(res.data.result=='success'){
// this.$message.success(res.data.message); // this.$message.success(res.data.message);
......
...@@ -38,20 +38,12 @@ ...@@ -38,20 +38,12 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="goods_name" prop="user_nickname"
label="商品名称"> label="购买人">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:min-width="'150px'" prop="goods_name"
prop="course_title" label="商品名称">
label="课程名称"
>
<template slot-scope="scope">
<router-link :to="{name:'ClassList', params: { courseId: scope.row.courses_id }, query: { courseName: scope.row.course_title}}" >
{{scope.row.course_title}} <br>{{scope.row.instructor}}<br>
{{scope.row|courseTypeFilter}}
</router-link>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="实付金额" label="实付金额"
...@@ -60,16 +52,6 @@ ...@@ -60,16 +52,6 @@
{{scope.row.money|moneytFilter}} {{scope.row.money|moneytFilter}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="created_at"
label="订单创建时间"
>
</el-table-column>
<el-table-column
prop="pay_at"
label="购买时间"
>
</el-table-column>
<el-table-column <el-table-column
label="付款状态"> label="付款状态">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -86,15 +68,15 @@ ...@@ -86,15 +68,15 @@
width="280"> width="280">
<div style="text-align: center"> <div style="text-align: center">
<el-button <el-button
v-if="scope.row.is_pay == 1" v-if="scope.row.status == 1"
@click="onRefund(scope.row.pay_id, scope.row.money)" @click="onRefund(scope.row.id, scope.row.money)"
type="warning" type="warning"
plain plain
size="mini"> size="mini">
退款 退款
</el-button> </el-button>
<el-button <el-button
@click="editComment(scope.row.pay_id, scope.row.desc)" @click="editComment(scope.row.id, scope.row.desc)"
type="warning" type="warning"
plain plain
size="mini"> size="mini">
...@@ -151,22 +133,13 @@ ...@@ -151,22 +133,13 @@
cancelButtonText: '取消', cancelButtonText: '取消',
inputValue: desc inputValue: desc
}).then(({ value }) => { }).then(({ value }) => {
editOrderDescApi(id,'refund',{desc: value}).then(res=>{ editOrderDescApi(id,'order',{desc: value}).then(res=>{
if( res.data.result === 'success' ){
this.$message({ this.$message({
type: 'success', type: 'success',
message: '编辑备注成功' message: '编辑备注成功'
}); });
}else{
this.$message.error( res.data.message );
}
}); });
}).catch(() => { })
this.$message({
type: 'info',
message: '取消编辑备注'
});
});
}, },
getOrderList(){ getOrderList(){
getOrderListApi().then((res)=>{ getOrderListApi().then((res)=>{
...@@ -190,47 +163,47 @@ ...@@ -190,47 +163,47 @@
this.getOrderList(); this.getOrderList();
}, },
editAddress(row){ editAddress(row){
if(!row.province_name){ if(!row.address_info.province_name){
this.dialogObj.province = '' this.dialogObj.province = ''
this.dialogObj.city = '' this.dialogObj.city = ''
this.dialogObj.district = '' this.dialogObj.district = ''
} else { } else {
let provinceObj = AddressArray.filter((item) => { let provinceObj = AddressArray.filter((item) => {
return item.label === row.province_name return item.label === row.address_info.province_name
}) })
if(provinceObj && provinceObj.length > 0){ if(provinceObj && provinceObj.length > 0){
this.dialogObj.province = row.province_id ? row.province_id : provinceObj[0].value this.dialogObj.province = row.address_info.province_id ? row.address_info.province_id : provinceObj[0].value
if(!row.city){ if(!row.address_info.city){
this.dialogObj.city = '' this.dialogObj.city = ''
} else { } else {
let cityObj = provinceObj[0].children.filter((city) => { let cityObj = provinceObj[0].children.filter((city) => {
return city.label === row.city return city.label === row.address_info.city
}) })
this.dialogObj.city = row.city_id ? row.city_id : cityObj[0].value this.dialogObj.city = row.address_info.city_id ? row.address_info.city_id : cityObj[0].value
if(!row.area){ if(!row.address_info.area){
this.dialogObj.district = '' this.dialogObj.district = ''
}else { }else {
let districtObj = cityObj[0].children.filter((district) => { let districtObj = cityObj[0].children.filter((district) => {
return district.label === row.area return district.label === row.address_info.area
}) })
this.dialogObj.district = row.area_id ? row.area_id : districtObj[0].value this.dialogObj.district = row.address_info.area_id ? row.address_info.area_id : districtObj[0].value
} }
} }
} else { } else {
this.dialogObj.province = '' this.dialogObj.province = '';
this.dialogObj.district = '' this.dialogObj.district = '';
this.dialogObj.city = '' this.dialogObj.city = ''
} }
} }
this.dialogObj.detail = row.address this.dialogObj.detail = row.address_info.address;
this.dialogObj.user_id = row.user_id this.dialogObj.user_id = row.address_info.user_id;
this.dialogObj.pay_id = row.pay_id this.dialogObj.receive_mobile = row.address_info.receive_mobile;
this.dialogObj.receive_mobile = row.receive_mobile this.dialogObj.receive_name = row.address_info.receive_name;
this.dialogObj.receive_name = row.receive_name this.dialogObj.province_name = row.address_info.province_name;
this.dialogObj.province_name = row.province_name this.dialogObj.city_name = row.address_info.city;
this.dialogObj.city_name = row.city this.dialogObj.district_name = row.address_info.area;
this.dialogObj.district_name = row.area this.dialogObj.id = row.id;
this.dialogObj.show=true; this.dialogObj.show=true;
} }
}, },
......
...@@ -12,21 +12,26 @@ ...@@ -12,21 +12,26 @@
label="退款编号"> label="退款编号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="user_id" label="用户信息"
label="用户ID"> >
<template slot-scope="scope">
id:{{scope.row.user_id}}
<br>
名称:{{scope.row.user_nickname}}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="order_money" prop="order_money"
label="订单金额"> label="订单金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{parseFloat(scope.row.order_money / 100)}} {{parseFloat(scope.row.order_money / 100)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="refund_money" prop="refund_money"
label="退款金额"> label="退款金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{parseFloat(scope.row.refund_money / 100)}} {{parseFloat(scope.row.refund_money / 100)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click="editComment(scope.row.out_trade_no, scope.row.desc)" @click="editComment(scope.row.id, scope.row.desc)"
type="warning" type="warning"
plain plain
size="mini"> size="mini">
...@@ -117,25 +122,18 @@ ...@@ -117,25 +122,18 @@
inputValue: desc inputValue: desc
}).then(({ value }) => { }).then(({ value }) => {
editOrderDescApi(id,'refund',{desc: value}).then(res=>{ editOrderDescApi(id,'refund',{desc: value}).then(res=>{
if( res.data.result === 'success' ){ this.$message({
this.$message({ type: 'success',
type: 'success', message: '编辑备注成功'
message: '编辑备注成功' });
}); this.getRefundList()
}else{
this.$message.error( res.data.message );
}
}); });
}).catch(() => { })
this.$message({
type: 'info',
message: '取消编辑备注'
});
});
}, },
getRefundList(){ getRefundList(){
getRefundListApi().then((res)=>{ getRefundListApi().then((res)=>{
this.total = res.total; this.total = res.total;
this.list = res.list
}) })
} }
} }
...@@ -143,7 +141,7 @@ ...@@ -143,7 +141,7 @@
</script> </script>
<style scoped> <style scoped>
.refund{ .refund{
margin: 10px; margin: 10px;
} }
</style> </style>
...@@ -444,8 +444,8 @@ export const refundApi = function (id, json) { ...@@ -444,8 +444,8 @@ export const refundApi = function (id, json) {
} ; } ;
// 修改订单收货地址 // 修改订单收货地址
const editAddressUrl = `${_baseUrl}api/admin/order/address/`; const editAddressUrl = `${_baseUrl}api/admin/order/address/`;
export const editAddressApi = function (id) { export const editAddressApi = function (id,json) {
return Vue.prototype.$put(`${editAddressUrl}/${id}`) return Vue.prototype.$put(`${editAddressUrl}/${id}`,json)
}; };
// 提现审核 // 提现审核
const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`; const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`;
...@@ -467,6 +467,7 @@ const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`; ...@@ -467,6 +467,7 @@ const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function (json) { export const addBoxTypeApi = function (json) {
return Vue.prototype.$post(addBoxTypeUrl, json) return Vue.prototype.$post(addBoxTypeUrl, 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