|
|
@ -2,12 +2,12 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-05-04 20:47:29
|
|
|
|
* @Date: 2022-05-04 20:47:29
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-05-16 11:23:15
|
|
|
|
* @LastEditTime: 2022-05-16 14:14:18
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="main">
|
|
|
|
<div class="main">
|
|
|
|
<Tab :active="tabActive" @change="changeTab"></Tab>
|
|
|
|
<Tab :active="tabActive" @change="changeTab" ref="tab"></Tab>
|
|
|
|
<UiLoading v-if="loading"></UiLoading>
|
|
|
|
<UiLoading v-if="loading"></UiLoading>
|
|
|
|
<UiEmpty v-if="!orderTotal && !loading" desc="暂无订单数据" :icon="require('@/assets/img/account/order/empty.png')">
|
|
|
|
<UiEmpty v-if="!orderTotal && !loading" desc="暂无订单数据" :icon="require('@/assets/img/account/order/empty.png')">
|
|
|
|
<UiButton type="grey" @click="$router.push('/')">去逛逛</UiButton>
|
|
|
|
<UiButton type="grey" @click="$router.push('/')">去逛逛</UiButton>
|
|
|
@ -47,7 +47,7 @@
|
|
|
|
<td width="145" :rowspan="item.products.length">
|
|
|
|
<td width="145" :rowspan="item.products.length">
|
|
|
|
<template v-if="item.orderStatus === 1">
|
|
|
|
<template v-if="item.orderStatus === 1">
|
|
|
|
<UiButton type="yellow_gradual" @click="pay(item)">去支付</UiButton>
|
|
|
|
<UiButton type="yellow_gradual" @click="pay(item)">去支付</UiButton>
|
|
|
|
<span class="link-btn" @click="canvelPay(item)">取消支付</span>
|
|
|
|
<span class="link-btn" @click="cancelPay(item)">取消支付</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<router-link :to="`./detail?id=${item.orderId}`" v-if="item.orderStatus > 4">查看物流</router-link>
|
|
|
|
<router-link :to="`./detail?id=${item.orderId}`" v-if="item.orderStatus > 4">查看物流</router-link>
|
|
|
|
<template v-if="item.orderStatus === 4">
|
|
|
|
<template v-if="item.orderStatus === 4">
|
|
|
@ -67,8 +67,8 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<BsCancelOrder :visible.sync="cancelVisible" :orderId="operationOrder.orderId"/>
|
|
|
|
<BsCancelOrder :visible.sync="cancelVisible" :orderId="operationOrder.orderId" @cancel="reloadData"/>
|
|
|
|
<BsPay :visible.sync="payVisible" :orderId="operationOrder.orderId" @finish="getOrderList"/>
|
|
|
|
<BsPay :visible.sync="payVisible" :orderId="operationOrder.orderId" @finish="reloadData"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
@ -114,6 +114,9 @@ export default {
|
|
|
|
this.getOrderList();
|
|
|
|
this.getOrderList();
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 查询订单列表
|
|
|
|
|
|
|
|
*/
|
|
|
|
async getOrderList(){
|
|
|
|
async getOrderList(){
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
const {error, result} = await ApiGetOrderList({
|
|
|
|
const {error, result} = await ApiGetOrderList({
|
|
|
@ -129,11 +132,19 @@ export default {
|
|
|
|
this.orderList = result.records;
|
|
|
|
this.orderList = result.records;
|
|
|
|
this.orderTotal = result.total
|
|
|
|
this.orderTotal = result.total
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 重新加载数据,确认收货和取消,支付订单这些操作完成后需要
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
reloadData(){
|
|
|
|
|
|
|
|
this.getOrderList();
|
|
|
|
|
|
|
|
this.$refs.tab.getOrderStatistics();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
pay(item){
|
|
|
|
pay(item){
|
|
|
|
this.operationOrder = item;
|
|
|
|
this.operationOrder = item;
|
|
|
|
this.payVisible = true;
|
|
|
|
this.payVisible = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
canvelPay(item){
|
|
|
|
cancelPay(item){
|
|
|
|
this.operationOrder = item;
|
|
|
|
this.operationOrder = item;
|
|
|
|
this.cancelVisible = true;
|
|
|
|
this.cancelVisible = true;
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -152,7 +163,7 @@ export default {
|
|
|
|
type: 'success',
|
|
|
|
type: 'success',
|
|
|
|
message: '成功收货!'
|
|
|
|
message: '成功收货!'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.getOrderList();
|
|
|
|
this.reloadData()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|