确认收货

msb_beta
ch 3 years ago
parent dcfe4376cf
commit 78bb47f8fc

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-29 17:38:17
* @LastEditors: ch
* @LastEditTime: 2022-04-18 15:37:05
* @LastEditTime: 2022-04-18 17:42:52
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
@ -21,6 +21,7 @@ export const ApiGetOrderList = (params) =>
*/
export const ApiGetBeforeOrder = (data) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/buyAdvanceOrder`, data));
/**
* 获取购物车预订单
* @param {*} data
@ -44,10 +45,16 @@ export const ApiGetOrderProductDetail = ({orderProductId}) =>
/**
* 获取物流信息
* @param {*} orderProductId
* @param {*} orderId
*/
export const ApiGetOrderLogistics = ({orderId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/logistics/${orderId}`));
/**
* 确认收货
* @param {*} orderId
*/
export const ApiPutOrderReceive = (params) =>
ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/tradeOrder/receive`, params));
/**
* 提交订单
* @param {*} data

@ -162,6 +162,13 @@
"navigationBarBackgroundColor" : "#F8F8F8"
}
},
{
"path": "pages/order/orderSuccess",
"aliasPath" : "/orderSuccess",
"style": {
"navigationBarTitleText": "交易成功"
}
},
{
"path": "pages/order/paySuccess",
"aliasPath" : "/paySuccess",

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
* @LastEditTime: 2022-04-18 16:16:26
* @LastEditTime: 2022-04-18 17:41:55
* @Description: file content
-->
<template>
@ -12,7 +12,7 @@
<!-- 交易关闭可以联系客服 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 2"></UiButton>
<!-- 已发货可以确认收货 -->
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 4" type="gradual"></UiButton>
<UiButton class="footer--btn" v-if="orderInfo.orderStatus === 4" type="gradual" @click="receive"></UiButton>
<!-- 待支付可以取消支付订单 -->
<template v-if="orderInfo.orderStatus === 1">
<UiButton class="footer--btn" @click="cancelShow = true">取消订单</UiButton>
@ -42,12 +42,13 @@
<UiButton type="gradual" :disabed="cancelValue == 0">确认取消</UiButton>
</view>
</u-popup>
</view>
</template>
<script>
import UiButton from '@/components/UiButton.vue'
import UiCell from '@/components/UiCell.vue'
import {ApiPutCancelOrder} from '@/common/api/order'
import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order'
export default {
components: { UiButton, UiCell },
props : {
@ -82,6 +83,19 @@ export default {
return false;
}
//
},
/**
* 确认收货
*/
async receive(){
const {error} = await ApiPutOrderReceive({
orderId : this.$Route.query.id
});
if(error){
uni.$toast(error.message);
return false;
}
this.$Router.push('/orderSuccess')
}
}
}
@ -124,4 +138,7 @@ export default {
}
}
.modal{
flex: 0;
}
</style>

@ -2,13 +2,12 @@
* @Author: ch
* @Date: 2022-04-18 15:28:14
* @LastEditors: ch
* @LastEditTime: 2022-04-18 17:10:26
* @LastEditTime: 2022-04-18 17:13:27
* @Description: file content
-->
<template>
<view>
<UiWhiteBox>
<UiGoodsInfo :class="idx === orderInfo.products.length-1 ? 'goods-info__last' : ''" :key="item.orderProductId"
v-for="(item, idx) in orderInfo.products" :data="item"></UiGoodsInfo>
</UiWhiteBox>
@ -96,7 +95,7 @@ page{
content: '';
border-radius: 50%;
border:6rpx solid $color-yellow3;
background: #fff;
background: $color-grey0;
position: absolute;
left: 0;
}

@ -0,0 +1,48 @@
<!--
* @Author: ch
* @Date: 2022-03-28 17:16:44
* @LastEditors: ch
* @LastEditTime: 2022-04-18 17:39:27
* @Description: file content
-->
<template>
<view>
<image class="icon" src="@/static/order/paySuccess.png"/>
<view class="title">交易成功</view>
<view class="btns">
<UiButton class="btn" type="primaryLine" @click="$Router.replaceAll('/')"></UiButton>
</view>
</view>
</template>
<script>
import UiButton from '@/components/UiButton.vue'
export default {
components: { UiButton },
}
</script>
<style lang="scss" scoped>
page{
text-align: center;
}
.icon{
width: 400rpx;
height: 256rpx;
margin: 169rpx auto 42rpx;
}
.title{
font-size: $font-size-lg;
line-height: 44rpx;
color: $color-grey6;
}
.desc{
font-size: $font-size-sm;
line-height: 34rpx;
color: $color-grey4;
}
.btns{
margin: 74rpx 105rpx 0;
display: flex;
justify-content: space-between;
}
</style>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-11 13:51:10
* @LastEditors: ch
* @LastEditTime: 2022-04-14 17:59:09
* @LastEditTime: 2022-04-18 17:55:17
* @Description: file content
-->
<template>
@ -15,7 +15,7 @@
<input class="input" slot="value" disabled placeholder="请选择" :value="refundSelected.label"/>
</UiCell>
<UiCell title="退款金额" :rightIcon="false">
<text class="price" slot="value">36.3</text>
<text class="price" slot="value">{{$Route.query.amount}}</text>
</UiCell>
<view class="title">
<view>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-14 16:50:37
* @LastEditors: ch
* @LastEditTime: 2022-04-18 15:33:42
* @LastEditTime: 2022-04-18 17:54:03
* @Description: file content
-->
<template>
@ -12,11 +12,11 @@
</UiWhiteBox>
<UiWhiteBox>
<view class="title">选择售后类型</view>
<view class="item item__first" @click="$Router.push(`/saleAfterApply?type=1`)">
<view class="item item__first" @click="select(1)">
<view>申请退款</view>
<text>没有收到货或已协商同意不退货只退款</text>
</view>
<view class="item" @click="$Router.push(`/saleAfterApply?type=2&status=2`)">
<view class="item" @click="select(2,2)">
<view>申请退货退款</view>
<text>已收到货需要退还收到的货物</text>
</view>
@ -47,6 +47,18 @@ export default {
return false;
}
this.orderInfo = result;
},
select(type,status){
const {orderProductId,realAmount} = this.orderInfo.orderProduct;
this.$Router.push({
path:'/saleAfterApply',
query:{
status,
type,
id: orderProductId,
amount : realAmount,
}
});
}
}
}

Loading…
Cancel
Save