Commit ace92b79 authored by wangwei's avatar wangwei

打包

parent 02ae646c
......@@ -12,8 +12,8 @@ module.exports = {
//本地代理设置
proxyTable: {
'/api': {
// target: 'http://local.base-api.sing.com', // 接口的域名
target: 'http://wechat.test.singsingenglish.com/',
target: 'http://local.base-api.sing.com', // 接口的域名
// target: 'http://wechat.test.singsingenglish.com/',
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
}
},
......
......@@ -15,7 +15,7 @@
</template>
<script>
// import {getCategoryApi} from "../../service/api";
import {editAddressApi} from "../../service/api";
import vueAddress from '../framework/address-picker/Address'
import AddressArray from '../framework/address-picker/addr'
export default {
......@@ -63,7 +63,14 @@ import AddressArray from '../framework/address-picker/addr'
receive_name: this.dialogObj.receive_name,
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=>{
// if(res.data.result=='success'){
// this.$message.success(res.data.message);
......
......@@ -38,20 +38,12 @@
>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名称">
prop="user_nickname"
label="购买人">
</el-table-column>
<el-table-column
:min-width="'150px'"
prop="course_title"
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>
prop="goods_name"
label="商品名称">
</el-table-column>
<el-table-column
label="实付金额"
......@@ -60,16 +52,6 @@
{{scope.row.money|moneytFilter}}
</template>
</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
label="付款状态">
<template slot-scope="scope">
......@@ -86,15 +68,15 @@
width="280">
<div style="text-align: center">
<el-button
v-if="scope.row.is_pay == 1"
@click="onRefund(scope.row.pay_id, scope.row.money)"
v-if="scope.row.status == 1"
@click="onRefund(scope.row.id, scope.row.money)"
type="warning"
plain
size="mini">
退款
</el-button>
<el-button
@click="editComment(scope.row.pay_id, scope.row.desc)"
@click="editComment(scope.row.id, scope.row.desc)"
type="warning"
plain
size="mini">
......@@ -151,22 +133,13 @@
cancelButtonText: '取消',
inputValue: desc
}).then(({ value }) => {
editOrderDescApi(id,'refund',{desc: value}).then(res=>{
if( res.data.result === 'success' ){
editOrderDescApi(id,'order',{desc: value}).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
});
}else{
this.$message.error( res.data.message );
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '取消编辑备注'
});
});
})
},
getOrderList(){
getOrderListApi().then((res)=>{
......@@ -190,47 +163,47 @@
this.getOrderList();
},
editAddress(row){
if(!row.province_name){
if(!row.address_info.province_name){
this.dialogObj.province = ''
this.dialogObj.city = ''
this.dialogObj.district = ''
} else {
let provinceObj = AddressArray.filter((item) => {
return item.label === row.province_name
return item.label === row.address_info.province_name
})
if(provinceObj && provinceObj.length > 0){
this.dialogObj.province = row.province_id ? row.province_id : provinceObj[0].value
if(!row.city){
this.dialogObj.province = row.address_info.province_id ? row.address_info.province_id : provinceObj[0].value
if(!row.address_info.city){
this.dialogObj.city = ''
} else {
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
if(!row.area){
this.dialogObj.city = row.address_info.city_id ? row.address_info.city_id : cityObj[0].value
if(!row.address_info.area){
this.dialogObj.district = ''
}else {
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 {
this.dialogObj.province = ''
this.dialogObj.district = ''
this.dialogObj.province = '';
this.dialogObj.district = '';
this.dialogObj.city = ''
}
}
this.dialogObj.detail = row.address
this.dialogObj.user_id = row.user_id
this.dialogObj.pay_id = row.pay_id
this.dialogObj.receive_mobile = row.receive_mobile
this.dialogObj.receive_name = row.receive_name
this.dialogObj.province_name = row.province_name
this.dialogObj.city_name = row.city
this.dialogObj.district_name = row.area
this.dialogObj.detail = row.address_info.address;
this.dialogObj.user_id = row.address_info.user_id;
this.dialogObj.receive_mobile = row.address_info.receive_mobile;
this.dialogObj.receive_name = row.address_info.receive_name;
this.dialogObj.province_name = row.address_info.province_name;
this.dialogObj.city_name = row.address_info.city;
this.dialogObj.district_name = row.address_info.area;
this.dialogObj.id = row.id;
this.dialogObj.show=true;
}
},
......
......@@ -12,21 +12,26 @@
label="退款编号">
</el-table-column>
<el-table-column
prop="user_id"
label="用户ID">
label="用户信息"
>
<template slot-scope="scope">
id:{{scope.row.user_id}}
<br>
名称:{{scope.row.user_nickname}}
</template>
</el-table-column>
<el-table-column
prop="order_money"
label="订单金额">
<template slot-scope="scope">
{{parseFloat(scope.row.order_money / 100)}}
{{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)}}
{{parseFloat(scope.row.refund_money / 100)}}
</template>
</el-table-column>
<el-table-column
......@@ -53,7 +58,7 @@
>
<template slot-scope="scope">
<el-button
@click="editComment(scope.row.out_trade_no, scope.row.desc)"
@click="editComment(scope.row.id, scope.row.desc)"
type="warning"
plain
size="mini">
......@@ -117,25 +122,18 @@
inputValue: desc
}).then(({ value }) => {
editOrderDescApi(id,'refund',{desc: value}).then(res=>{
if( res.data.result === 'success' ){
this.$message({
type: 'success',
message: '编辑备注成功'
});
}else{
this.$message.error( res.data.message );
}
this.$message({
type: 'success',
message: '编辑备注成功'
});
this.getRefundList()
});
}).catch(() => {
this.$message({
type: 'info',
message: '取消编辑备注'
});
});
})
},
getRefundList(){
getRefundListApi().then((res)=>{
this.total = res.total;
this.total = res.total;
this.list = res.list
})
}
}
......@@ -143,7 +141,7 @@
</script>
<style scoped>
.refund{
margin: 10px;
}
.refund{
margin: 10px;
}
</style>
......@@ -444,8 +444,8 @@ export const refundApi = function (id, json) {
} ;
// 修改订单收货地址
const editAddressUrl = `${_baseUrl}api/admin/order/address/`;
export const editAddressApi = function (id) {
return Vue.prototype.$put(`${editAddressUrl}/${id}`)
export const editAddressApi = function (id,json) {
return Vue.prototype.$put(`${editAddressUrl}/${id}`,json)
};
// 提现审核
const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`;
......@@ -467,6 +467,7 @@ const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function (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