订单转台修改
This commit is contained in:
@ -77,3 +77,9 @@ export function getOrderDetail(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getNowOrderStatus(id) {
|
||||||
|
return request({
|
||||||
|
url: '/api/getNowOrderStatus/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div>
|
<div>
|
||||||
<el-steps :active="formatStepStatus(order._status)" finish-status="success" align-center>
|
<el-steps v-if="order.refundStatus===0" :active="orderStatus.size" align-center process-status="process" finish-status="success">
|
||||||
<el-step title="提交订单" :description="formatTime(order.createTime)"></el-step>
|
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
|
||||||
<el-step title="支付订单" :description="formatTime(order.payTime)"></el-step>
|
<el-step title="待发货" :description="orderStatus.paySuccess"></el-step>
|
||||||
<el-step title="平台发货" :description="formatTime(order.deliveryTime)"></el-step>
|
<el-step title="待收货" :description="orderStatus.deliveryGoods"></el-step>
|
||||||
<el-step title="确认收货" :description="formatTime(order.receiveTime)"></el-step>
|
<el-step title="待评价" :description="orderStatus.userTakeDelivery"></el-step>
|
||||||
<el-step title="完成评价" :description="formatTime(order.commentTime)"></el-step>
|
<el-step title="已完成" :description="orderStatus.checkOrderOver"></el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
|
<el-steps v-else :active="order.refundStatus+1" align-center process-status="process" finish-status="success">
|
||||||
|
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
|
||||||
|
<el-step title="用户申请退款" :description="orderStatus.applyRefund"></el-step>
|
||||||
|
<el-step title="退款申请通过" :description="orderStatus.refundOrderSuccess"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-card shadow="never" style="margin-top: 15px">
|
<el-card shadow="never" style="margin-top: 15px">
|
||||||
<div class="operate-container">
|
<div class="operate-container">
|
||||||
@ -373,7 +379,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { express, getOrderDetail } from '@/api/yxStoreOrder'
|
import { express, getOrderDetail,
|
||||||
|
getNowOrderStatus} from '@/api/yxStoreOrder'
|
||||||
import {formatTimeTwo} from '@/utils/index';
|
import {formatTimeTwo} from '@/utils/index';
|
||||||
import eForm from './form'
|
import eForm from './form'
|
||||||
import eRefund from './refund'
|
import eRefund from './refund'
|
||||||
@ -394,6 +401,7 @@ import eRemark from './remark'
|
|||||||
components: {eForm, eRefund, editOrder, eRemark},
|
components: {eForm, eRefund, editOrder, eRemark},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderStatus:null,
|
||||||
isAdd: false,
|
isAdd: false,
|
||||||
id: null,
|
id: null,
|
||||||
order: {
|
order: {
|
||||||
@ -765,6 +773,7 @@ import eRemark from './remark'
|
|||||||
init(){
|
init(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let id = that.$route.params.id || 0;
|
let id = that.$route.params.id || 0;
|
||||||
|
this.getNowOrderStatus();
|
||||||
getOrderDetail(id).then(response => {
|
getOrderDetail(id).then(response => {
|
||||||
this.order = response;
|
this.order = response;
|
||||||
this.userDTO = this.order.userDTO;
|
this.userDTO = this.order.userDTO;
|
||||||
@ -784,13 +793,19 @@ import eRemark from './remark'
|
|||||||
},
|
},
|
||||||
formatStepStatus(value) {
|
formatStepStatus(value) {
|
||||||
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
|
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
|
||||||
if (value === 2) {
|
if (value === 1) {
|
||||||
//待发货
|
//待发货
|
||||||
return 2;
|
return 1;
|
||||||
} else if (value === 4) {
|
} else if (value === 2) {
|
||||||
//已发货
|
//已发货
|
||||||
return 3;
|
return 3;
|
||||||
} else if (value === 6) {
|
} else if (value === 3) {
|
||||||
|
//已完成
|
||||||
|
return 4;
|
||||||
|
} else if (value === 4) {
|
||||||
|
//已完成
|
||||||
|
return 5;
|
||||||
|
} else if (value === 5) {
|
||||||
//已完成
|
//已完成
|
||||||
return 4;
|
return 4;
|
||||||
}else {
|
}else {
|
||||||
@ -949,7 +964,19 @@ import eRemark from './remark'
|
|||||||
showLogisticsDialog(){
|
showLogisticsDialog(){
|
||||||
this.express();
|
this.express();
|
||||||
|
|
||||||
}
|
}, //获取当前订单状态
|
||||||
|
|
||||||
|
getNowOrderStatus() {
|
||||||
|
let id = this.$route.params.id || 0;
|
||||||
|
|
||||||
|
getNowOrderStatus(id)
|
||||||
|
.then(res => {
|
||||||
|
this.orderStatus = res;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err.response.data.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '订单详情'" width="700px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '订单详情'" width="700px">
|
||||||
|
<el-card>
|
||||||
|
<div slot="header">
|
||||||
|
<span>进度信息</span>
|
||||||
|
</div>
|
||||||
|
<el-steps
|
||||||
|
v-if="form.refundStatus===0"
|
||||||
|
:active="orderStatus.size"
|
||||||
|
align-center
|
||||||
|
process-status="process"
|
||||||
|
finish-status="success"
|
||||||
|
>
|
||||||
|
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
|
||||||
|
<el-step title="待核销" :description="orderStatus.paySuccess"></el-step>
|
||||||
|
<el-step title="待评价" :description="orderStatus.orderVerific"></el-step>
|
||||||
|
<el-step title="已完成" :description="orderStatus.checkOrderOver"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<el-steps v-else :active="form.refundStatus+1" align-center process-status="process" finish-status="success">
|
||||||
|
<el-step title="用户下单" :description="orderStatus.cacheKeyCreateOrder"></el-step>
|
||||||
|
<el-step title="用户申请退款" :description="orderStatus.applyRefund"></el-step>
|
||||||
|
<el-step title="退款申请通过" :description="orderStatus.refundOrderSuccess"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span>收货信息</span>
|
<span>收货信息</span>
|
||||||
@ -65,8 +87,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { add, edit, express } from '@/api/yxStoreOrder'
|
import { add, edit, express,
|
||||||
import { parseTime } from '@/utils/index'
|
getNowOrderStatus } from '@/api/yxStoreOrder'
|
||||||
|
import {formatTimeTwo, parseTime} from '@/utils/index'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
isAdd: {
|
isAdd: {
|
||||||
@ -76,6 +99,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderStatus:null,
|
||||||
loading: false, dialog: false, expressInfo: [],
|
loading: false, dialog: false, expressInfo: [],
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
@ -138,6 +162,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'form': function(val) {
|
||||||
|
this.getNowOrderStatus();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
parseTime,
|
parseTime,
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -196,6 +225,28 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
|
}, formatTime(time) {
|
||||||
|
if (time == null || time === '') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
let date = new Date(time);
|
||||||
|
return formatTimeTwo(date, 'yyyy-MM-dd hh:mm:ss')
|
||||||
|
},
|
||||||
|
formatStepStatus(value) {
|
||||||
|
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
|
||||||
|
if (value === 2) {
|
||||||
|
//待发货
|
||||||
|
return 2;
|
||||||
|
} else if (value === 4) {
|
||||||
|
//已发货
|
||||||
|
return 3;
|
||||||
|
} else if (value === 6) {
|
||||||
|
//已完成
|
||||||
|
return 4;
|
||||||
|
}else {
|
||||||
|
//待付款、已关闭、无限订单
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.dialog = false
|
this.dialog = false
|
||||||
@ -253,7 +304,18 @@ export default {
|
|||||||
isRemind: '',
|
isRemind: '',
|
||||||
isSystemDel: ''
|
isSystemDel: ''
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
getNowOrderStatus() {
|
||||||
|
let id = this.form.id || 0;
|
||||||
|
|
||||||
|
getNowOrderStatus(id)
|
||||||
|
.then(res => {
|
||||||
|
this.orderStatus = res;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err.response.data.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user