...
|
...
|
@@ -4,7 +4,7 @@ |
|
|
<div class="order-detail">
|
|
|
<div class="order-code">
|
|
|
<p>订单号:{{order.orderCode}}</p>
|
|
|
<p>{{order.status | convertOrderState}}</p>
|
|
|
<p>{{order.statusStr}}</p>
|
|
|
</div>
|
|
|
<div class="order-goods" >
|
|
|
<div class="goods-info" v-for="goods in order.orderGoods">
|
...
|
...
|
@@ -28,13 +28,17 @@ |
|
|
<div class="order-option">
|
|
|
<div class="goods-total">合计: <b>¥{{order.amount}}</b></div>
|
|
|
<div class="options">
|
|
|
<button v-if="order.status === 0" @click="cancelOrder(order.orderCode)">取消订单</button>
|
|
|
<button v-if="order.status === 0 " class="countdown" @click="goBuy(order.orderCode)">去支付
|
|
|
<span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span>
|
|
|
</button>
|
|
|
<button v-if="order.status === 4 || order.status === 5 " @click="seeExpress(order.orderCode)">查看物流</button>
|
|
|
<button v-if="order.status === 4 || order.status === 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
|
|
|
<button v-if="order.status === 6" @click="deleteOrder(order,index)" class="normal">删除订单</button>
|
|
|
<button v-if="order.isCancel === 'Y'" @click="deleteOrder(order,index)" class="normal">删除订单</button>
|
|
|
<template v-else>
|
|
|
<button v-if="order.status === 0" @click="cancelOrder(order.orderCode)">取消订单</button>
|
|
|
<button v-if="order.status === 0 " class="countdown" @click="goBuy(order.orderCode)">去支付
|
|
|
<span v-count-down v-bind:left-time="order.payLefttime" v-bind:callback="autoCancel(order.orderCode)"></span>
|
|
|
</button>
|
|
|
<a v-if="order.status === 4 || order.status === 5 "
|
|
|
href="/me/logistic?order_code={{order.orderCode}}">查看物流</a>
|
|
|
<button v-if="order.status === 4 || order.status === 5 " class="black" @click="confirmGoods(order.orderCode)">确认收货</button>
|
|
|
<button v-if="order.status === 6" @click="deleteOrder(order,index)" class="normal">删除订单</button>
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -111,13 +115,12 @@ |
|
|
});
|
|
|
},
|
|
|
reasonChange(){
|
|
|
console.log(this.currentCode)
|
|
|
this.order().cancel({
|
|
|
orderCode: this.currentCode,
|
|
|
reasonId: this.selected.id
|
|
|
}, (result) => {
|
|
|
if (result.code === 200) {
|
|
|
location.href = '/me/order?type=2';
|
|
|
location.reload();
|
|
|
} else {
|
|
|
tip(result.message);
|
|
|
}
|
...
|
...
|
@@ -163,7 +166,7 @@ |
|
|
cancelOrder(code) {
|
|
|
let _that = this;
|
|
|
|
|
|
Modal.confirm('订单取消后不能恢复,确认取消订单吗?', '', function() {
|
|
|
Modal.confirm('', '取消后不能恢复,确认取消吗?', function() {
|
|
|
this.hide();
|
|
|
_that.currentCode = code;
|
|
|
_that.dropDown('cancel-reason');
|
...
|
...
|
@@ -172,7 +175,7 @@ |
|
|
deleteOrder(order, index) {
|
|
|
let that = this;
|
|
|
|
|
|
Modal.confirm('确认删除订单?', '', function() {
|
|
|
Modal.confirm('', '确认删除订单?', function() {
|
|
|
this.hide();
|
|
|
$.ajax({
|
|
|
url: '/me/deleteOrder',
|
...
|
...
|
@@ -211,11 +214,9 @@ |
|
|
goBuy(code) {
|
|
|
yohoAPI.goPay({orderid: code});
|
|
|
},
|
|
|
seeExpress(code) {
|
|
|
location.href = '/me/logistic?order_code='+code;
|
|
|
},
|
|
|
dropDown(elementId){
|
|
|
let dropdown = document.getElementById(elementId);
|
|
|
|
|
|
try {
|
|
|
this.showDropdown(dropdown);
|
|
|
} catch(e) {
|
...
|
...
|
@@ -223,9 +224,9 @@ |
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
|
|
|
showDropdown(element) {
|
|
|
let event;
|
|
|
|
|
|
event = document.createEvent('MouseEvents');
|
|
|
event.initMouseEvent('mousedown', true, true, window);
|
|
|
element.dispatchEvent(event);
|
...
|
...
|
@@ -242,6 +243,4 @@ body { |
|
|
}
|
|
|
|
|
|
@import "../../scss/me/_order.css";
|
|
|
|
|
|
|
|
|
</style> |
...
|
...
|
|