|
|
<template>
|
|
|
<div class="order-status">
|
|
|
<p>{{order.statusStr}}</p>
|
|
|
<p v-if="order.isCancel !== 'Y' && order.status == 0 && order.payLefttime != 0">剩余: <span v-count-down v-bind:left-time="order.payLefttime"></span>,订单将被取消</p>
|
|
|
</div>
|
|
|
<div class="order-address">
|
|
|
<p><span>{{order.userName}}</span><span>{{order.mobile}}</span></p>
|
|
|
<p>{{order.area}} <br>{{order.address}}</p>
|
|
|
</div>
|
|
|
<div class="order-code">
|
|
|
<p>订单号: {{order.orderCode}}</p>
|
|
|
<p>下单时间: {{order.createTime | convertTime}}</p>
|
|
|
</div>
|
|
|
<div class="order-goods">
|
|
|
<ul>
|
|
|
<li class="goods-info" v-for="product in order.orderGoods">
|
|
|
<div class="img-box">
|
|
|
<img v-bind:src="product.goodsImage | resize 49 65">
|
|
|
<label v-if="product.goodsType === 'gift'">赠品</label>
|
|
|
<label class="price-gift" v-if="product.goodsType === 'price_gift'">加价购</label>
|
|
|
</div>
|
|
|
<div class="goods-detail">
|
|
|
<p class="name">{{product.productName}}</p>
|
|
|
<p class="size">
|
|
|
<span>颜色:{{product.colorName}}</span>
|
|
|
<span>尺码:{{product.sizeName}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="goods-price">
|
|
|
<p>¥{{product.goodsPrice}}</p>
|
|
|
<p>×{{product.buyNumber}}</p>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="order-amount">
|
|
|
<ul>
|
|
|
<li v-for="promotion in order.promotionFormulas">
|
|
|
<label>{{promotion.promotion}}:</label><span>{{promotion.promotionAmount}}</span>
|
|
|
</li>
|
|
|
<li class="sum"><label>总计:</label><span>{{order.amount}}</span></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="order-button" v-show="order.status != 1 && order.status != 2 && order.status != 3">
|
|
|
<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>
|
|
|
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
|
|
|
</template>
|
|
|
</div>
|
|
|
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
|
|
|
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
|
|
|
</select>
|
|
|
<template v-if="show">
|
|
|
<div class="order-status">
|
|
|
<p>{{order.statusStr}}</p>
|
|
|
<p v-if="order.isCancel !== 'Y' && order.status == 0 && order.payLefttime != 0">剩余: <span v-count-down v-bind:left-time="order.payLefttime"></span>,订单将被取消</p>
|
|
|
</div>
|
|
|
<div class="order-address">
|
|
|
<p><span>{{order.userName}}</span><span>{{order.mobile}}</span></p>
|
|
|
<p>{{order.area}} <br>{{order.address}}</p>
|
|
|
</div>
|
|
|
<div class="order-code">
|
|
|
<p>订单号: {{order.orderCode}}</p>
|
|
|
<p>下单时间: {{order.createTime | convertTime}}</p>
|
|
|
</div>
|
|
|
<div class="order-goods">
|
|
|
<ul>
|
|
|
<li class="goods-info" v-for="product in order.orderGoods">
|
|
|
<div class="img-box">
|
|
|
<img v-bind:src="product.goodsImage | resize 49 65">
|
|
|
<label v-if="product.goodsType === 'gift'">赠品</label>
|
|
|
<label class="price-gift" v-if="product.goodsType === 'price_gift'">加价购</label>
|
|
|
</div>
|
|
|
<div class="goods-detail">
|
|
|
<p class="name">{{product.productName}}</p>
|
|
|
<p class="size">
|
|
|
<span>颜色:{{product.colorName}}</span>
|
|
|
<span>尺码:{{product.sizeName}}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="goods-price">
|
|
|
<p>¥{{product.goodsPrice}}</p>
|
|
|
<p>×{{product.buyNumber}}</p>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="order-amount">
|
|
|
<ul>
|
|
|
<li v-for="promotion in order.promotionFormulas">
|
|
|
<label>{{promotion.promotion}}:</label><span>{{promotion.promotionAmount}}</span>
|
|
|
</li>
|
|
|
<li class="sum"><label>总计:</label><span>{{order.amount}}</span></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="order-button" v-show="order.status != 1 && order.status != 2 && order.status != 3">
|
|
|
<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>
|
|
|
<button v-if="order.isSupportRefund == 'Y' || order.isSupportExchange == 'Y'" class="normal" @click="applyRefund()">申请售后</button>
|
|
|
</template>
|
|
|
</div>
|
|
|
<select id="cancel-reason" class="cancel-reason" v-on:blur="reasonChange" v-model="selected">
|
|
|
<option v-for="option in options" v-bind:value="{id:option.id,reason:option.reason}">{{option.reason}}</option>
|
|
|
</select>
|
|
|
</template>
|
|
|
</template>
|
|
|
<script>
|
|
|
'use strict';
|
...
|
...
|
@@ -69,12 +71,13 @@ |
|
|
module.exports = {
|
|
|
data() {
|
|
|
return {
|
|
|
show: false,
|
|
|
order: {},
|
|
|
options: [],
|
|
|
selected: {}
|
|
|
};
|
|
|
},
|
|
|
ready() {
|
|
|
created() {
|
|
|
this.getOrderData();
|
|
|
|
|
|
yohoAPI.addNativeMethod('goToService', () => {
|
...
|
...
|
@@ -91,6 +94,7 @@ |
|
|
}
|
|
|
}).then(result => {
|
|
|
if (result.code === 200) {
|
|
|
this.show = true;
|
|
|
this.$set('order', result.data);
|
|
|
genderSel = genderSel([{
|
|
|
key: this.order.isSupportRefund,
|
...
|
...
|
|