You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/pages/order/saleAfter/saleAfterDetail/index.vue

91 lines
2.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
* @LastEditTime: 2022-04-15 11:17:04
* @Description: file content
-->
<template>
<view>
<!-- 头部状态信息 -->
<StatusTips :data="orderInfo"/>
<!-- 等待商家通过审核时显示 -->
<AwaitExamine :data="orderInfo" v-if="orderInfo.refundStatus == 1" @reload="getOrderInfo" />
<!-- 商家通过但需要填写物流信息时显示 -->
<SubmitLogistics :data="orderInfo" v-if="orderInfo.refundStatus == 3" :company="logisticsCompany" @reload="getOrderInfo" />
<!-- 退款完成时显示 -->
<LogisticsInfo :data="orderInfo.refundLogistics" v-if="[4,5,6].includes(orderInfo.refundStatus)"/>
<!-- 退款订单信息 -->
<GoodsInfo :data="orderInfo"/>
</view>
</template>
<script>
import {ApiGetSaleAfterOrderDetail, ApiGetLogisticsCompanylist} from '@/common/api/order'
import UiPageHeader from '@/components/UiPageHeader.vue'
import UiGoodsInfo from '@/components/UiGoodsInfo.vue'
import UiWhiteBox from '@/components/UiWhiteBox.vue'
import UiButton from '@/components/UiButton.vue'
import StatusTips from './components/StatusTips.vue'
import UiCell from '@/components/UiCell.vue'
import GoodsInfo from './components/GoodsInfo.vue'
import AwaitExamine from './components/AwaitExamine.vue'
import SubmitLogistics from './components/SubmitLogistics.vue'
import LogisticsInfo from './components/LogisticsInfo.vue'
export default {
components: { UiPageHeader, UiGoodsInfo, UiWhiteBox, UiButton, StatusTips, UiCell, GoodsInfo, AwaitExamine, SubmitLogistics, LogisticsInfo },
data(){
return {
orderInfo : {
refundProduct:{}
},
logisticsCompany : []
}
},
onLoad(){
this.getOrderInfo();
},
methods : {
/**
* 获取订单最新信息
*/
async getOrderInfo(){
const {error, result} = await ApiGetSaleAfterOrderDetail({refundId:this.$Route.query.id});
if(error){
uni.$u.toast(error.message);
return false;
}
if(result.refundLogistics){
result.refundLogistics.completeReturnRemark = result.completeReturnRemark;
}
this.orderInfo = {...result};
// 需要填写物流信息是查询物流公司列表
if(result.refundStatus == 3){
this.getLogisticsCompanyList()
}
},
async getLogisticsCompanyList(){
const {error, result} = await ApiGetLogisticsCompanylist();
if(error){
uni.$u.toast(error.message);
return false;
}
this.logisticsCompany = [result]
}
}
}
</script>
<style lang="scss" scoped>
page{
background: $color-grey1;
padding-bottom: 120rpx;
}
</style>