...
|
...
|
@@ -43,10 +43,11 @@ |
|
|
<div class="order-button" v-show="order.status != 1 && order.status != 2 && order.status != 3">
|
|
|
<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 ">查看物流</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)">删除订单</button>
|
|
|
<button v-if="order.status == 6" class="normal">再次购买</button>
|
|
|
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
...
|
...
|
@@ -56,6 +57,7 @@ |
|
|
const tip = require('common/tip');
|
|
|
const Modal = require('common/modal');
|
|
|
const yohoAPI = require('yoho');
|
|
|
let genderSel = require('common/select');
|
|
|
|
|
|
module.exports = {
|
|
|
data() {
|
...
|
...
|
@@ -76,6 +78,24 @@ |
|
|
}).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
this.$set('order', result.data);
|
|
|
genderSel = genderSel([
|
|
|
{
|
|
|
key: this.order.isSupportRefund,
|
|
|
val: this.order.isSupportRefund === 'Y' ? '申请退货' : '<span class="overdue">申请退货(已过期限)</span>',
|
|
|
url: '/home/refund?orderId=' + this.order.orderCode,
|
|
|
disabled: this.order.isSupportRefund !== 'Y'
|
|
|
},
|
|
|
{
|
|
|
key: this.order.isSupportExchange,
|
|
|
val: this.order.isSupportExchange === 'Y' ? '申请换货' : '<span class="overdue">申请换货(已过期限)</span>',
|
|
|
url: '/home/exchange?orderId=' + this.order.orderCode,
|
|
|
disabled: this.order.isSupportExchange !== 'Y'
|
|
|
},
|
|
|
{
|
|
|
key: 'onlineService',
|
|
|
val: '在线客服'
|
|
|
}
|
|
|
]);
|
|
|
} else {
|
|
|
tip(result.message);
|
|
|
}
|
...
|
...
|
@@ -161,8 +181,19 @@ |
|
|
goBuy(code) {
|
|
|
yohoAPI.goPay({orderid: code});
|
|
|
},
|
|
|
seeExpress() {
|
|
|
location.href = '';
|
|
|
seeExpress(code) {
|
|
|
location.href = '/home/logistic?order_code='+code;
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 申请售后
|
|
|
*/
|
|
|
applyRefund(code) {
|
|
|
genderSel.show(function(item) {
|
|
|
console.log(item);
|
|
|
return;
|
|
|
location.href = item.url;
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|