退货详情

This commit is contained in:
sin 2019-04-27 12:47:18 +08:00
parent 207fdc1d55
commit a5a51b9cdb
4 changed files with 90 additions and 54 deletions

View File

@ -149,7 +149,7 @@ export function getLogisticsInfo(params) {
export function getOrderReturnReason() { export function getOrderReturnReason() {
return request({ return request({
url: '/order-api/users/order_return/reason', url: '/order-api/users/order_return/reason',
method: 'get', method: 'GET',
}); });
} }
@ -165,3 +165,13 @@ export function orderReturnApply(params) {
}, },
}); });
} }
export function getOrderReturnInfo(orderId) {
return request({
url: '/order-api/users/order_return/info',
method: 'GET',
params: {
orderId,
},
});
}

View File

@ -140,7 +140,7 @@ const routes = [
} }
}, },
{ {
path: '/user/aftersale/detail', path: '/user/aftersale/detail/:orderId',
component: () => import('../page/user/aftersale/detail'), component: () => import('../page/user/aftersale/detail'),
meta: { meta: {
title: '服务单详情' title: '服务单详情'

View File

@ -1,4 +1,4 @@
</<template> <template>
<div> <div>
<headerNav title="服务单详情"/> <headerNav title="服务单详情"/>
<van-steps :active="active"> <van-steps :active="active">
@ -9,7 +9,8 @@
<van-step>完成</van-step> <van-step>完成</van-step>
</van-steps> </van-steps>
<van-cell class="logistics" to="/user/aftersale/track/1" title="您的服务单435703816的商品已收到" label="2018-08-31 21:04:03" is-link /> <van-cell class="logistics" to="/user/aftersale/track/1" title="您的服务单435703816的商品已收到"
label="2018-08-31 21:04:03" is-link/>
<div style="height:15px;"></div> <div style="height:15px;"></div>
<div v-for="(product,i) in products" :key="i"> <div v-for="(product,i) in products" :key="i">
@ -18,24 +19,32 @@
<div style="height:15px;"></div> <div style="height:15px;"></div>
<van-cell-group> <van-cell-group>
<van-cell title="服务单号" value="18081609422771742" /> <van-cell title="服务单号" :value="serviceNumber"/>
<van-cell title="申请时间" value="2018-08-16 09:42:27" /> <van-cell title="申请时间" :value="applyTime"/>
<van-cell title="服务类型" value="退货" /> <van-cell title="服务类型" :value="serviceType"/>
</van-cell-group> </van-cell-group>
<div style="height:15px;"></div> <div style="height:15px;"></div>
<van-cell-group>
<van-cell title="联系人" value="张三" /> <!-- 暂时没有 -->
<van-cell title="联系电话" value="138****6514" /> <!--<van-cell-group>-->
</van-cell-group> <!--<van-cell title="联系人" value="张三"/>-->
<!--<van-cell title="联系电话" value="138****6514"/>-->
<!--</van-cell-group>-->
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment';
import { getOrderReturnInfo } from '../../../api/order';
export default { export default {
data() { data() {
return { return {
active: 0, active: 0,
serviceNumber: -1,
applyTime: '-1',
serviceType: '',
products: [ products: [
{ {
imageURL: 'https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712', imageURL: 'https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712',
@ -43,15 +52,27 @@ export default {
price: '499', price: '499',
quantity: 2 quantity: 2
}, },
{
imageURL:'https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712',
title:'BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套',
price:'499',
quantity:2
},
] ]
} }
},
mounted() {
const { orderId } = this.$route.params;
getOrderReturnInfo(orderId).then(res => {
console.log('getOrderReturnInfo success', res)
const { returnInfo, orderItems } = res;
this.serviceType = returnInfo.serviceTypeText
this.serviceNumber = returnInfo.serviceNumber
this.applyTime = moment(returnInfo.createTime).format("YYYY-MM-DD HH:mm")
this.products = orderItems.map(item => {
return {
...item,
title: item.skuName,
picUrls: [item.skuImage],
price: item.presentTotal,
} }
})
})
},
} }
</script> </script>

View File

@ -46,7 +46,12 @@
</van-cell-group> </van-cell-group>
<div class="footer"> <div class="footer">
<div class="munu"> <div class="munu">
<router-link v-if="orderInfo.hasOrderReturn === -1 " :to="'/user/aftersale/apply/'+orderId">
<van-button size="small">申请售后</van-button> <van-button size="small">申请售后</van-button>
</router-link>
<router-link v-if="orderInfo.hasOrderReturn !== -1" :to="'/user/aftersale/detail/'+orderId">
<van-button size="small">查看进度</van-button>
</router-link>
<van-button v-if="orderInfo.status === 3 " size="small" v-on:click="clickConfirmReceiving(orderId)">确认收货</van-button> <van-button v-if="orderInfo.status === 3 " size="small" v-on:click="clickConfirmReceiving(orderId)">确认收货</van-button>
<van-button v-if="orderInfo.status === 1 " size="small" type="danger" @click="goPay(orderInfo.id)">支付</van-button> <van-button v-if="orderInfo.status === 1 " size="small" type="danger" @click="goPay(orderInfo.id)">支付</van-button>
</div> </div>