完善功能
This commit is contained in:
2023-03-08 17:57:45 +08:00
parent 12ef832fc1
commit 419533df1f
6 changed files with 953 additions and 841 deletions

View File

@@ -8,14 +8,14 @@
<view class="i-top b-b">
<text class="state" :style="{ color: orderInfo.stateTipColor }">{{orderInfo.orderSn}}</text>
</view>
<view class="i-top b-b">
<text class="time">{{ orderInfo.createTime }}</text>
<!-- <text class="state" :style="{ color: orderInfo.stateTipColor }" @click="navToDetailPage(item)">{{ orderInfo.id }}--</text> -->
<text class="state"
:style="{ color: orderInfo.stateTipColor }">{{ orderInfo.stateTip }}</text>
</view>
<view v-if="goodsItem.type === 1" class="goods-box-single"
v-for="(goodsItem, goodsIndex) in orderInfo.orderItemList" :key="goodsIndex">
<img class="goods-img" :src="goodsItem.productPic" mode="aspectFill"></img>
@@ -25,13 +25,13 @@
<text class="attr-box">x {{ goodsItem.productQuantity }}</text>
<text class="price">{{ goodsItem.productPrice }}</text>
</view>
<view style="display: flex;flex-direction: row;">
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{orderInfo.deliveryCompany}}</text>
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{ orderInfo.deliverySn }}</text>
</view>
<view style="display: flex;flex-direction: row;">
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{orderInfo.deliveryCompany}}</text>
<text style="color: #c1c1c1;font-size: 13px;"
v-if="orderInfo.status === 5||orderInfo.status === 3">{{ orderInfo.deliverySn }}</text>
</view>
</view>
</view>
<!-- <view class="i-top b-b">
@@ -48,34 +48,34 @@
</view>
</view> -->
<view style="display: flex;flex-direction: column; margin-right: 13px;margin-bottom: 10px;">
<view class="price-box">
<text class="num">{{ orderInfo.orderItemList.length }}</text>
件商品, 会员折扣
<text class="price">{{ orderInfo.vipAmount }}</text>
, 优惠券抵扣
<text class="price">{{ orderInfo.couponAmount }}</text>
</view>
<view class="price-box">
积分抵扣
<text class="price">{{ orderInfo.integrationAmount }}</text>
, 运费
<text class="price">{{ orderInfo.freightAmount }}</text>
<!-- <view class="yt-list-cell b-b" v-if="groupActivity">
<view class="price-box">
<text class="num">{{ orderInfo.orderItemList.length }}</text>
件商品, 会员折扣
<text class="price">{{ orderInfo.vipAmount }}</text>
, 优惠券抵扣
<text class="price">{{ orderInfo.couponAmount }}</text>
</view>
<view class="price-box">
积分抵扣
<text class="price">{{ orderInfo.integrationAmount }}</text>
, 运费
<text class="price">{{ orderInfo.freightAmount }}</text>
<!-- <view class="yt-list-cell b-b" v-if="groupActivity">
<text class="cell-tit clamp">活动金额</text>
<text class="cell-tip">{{ groupActivity.price }}</text>
</view> -->
, 实付款
<text class="price">{{ orderInfo.payAmount }}</text>
</view>
, 实付款
<text class="price">{{ orderInfo.payAmount }}</text>
</view>
</view>
<view class="action-box b-t" v-if="orderInfo.status==12||orderInfo.status==3">
<button v-if="orderInfo.status == 12" class="action-btn"
@click="cancelOrder(orderInfo)">取消订单</button>
<button v-if="orderInfo.status == 12" class="action-btn recom"
@click="payOrder(orderInfo)">立即支付</button>
<!-- <button v-if="orderInfo.status <7" class="action-btn recom"
<!-- <button v-if="orderInfo.status <7" class="action-btn recom"
@click="applyRefund(orderInfo.id)">申请售后</button> -->
<button v-if="orderInfo.status == 3" class="action-btn recom"
@click="confimDelivery(orderInfo)">确认收货</button>
@@ -112,7 +112,7 @@
return {
tabCurrentIndex: 0,
orderInfo: {
orderItemList:[]
orderItemList: []
},
navList: [{
status: 0,
@@ -212,6 +212,12 @@
if (data) {
this.$api.msg(data);
let params = {
id: item.id
};
this.orderInfo = await Api.apiCall('get', Api.order.orderDetail, params);
this.orderInfo = Object.assign(this.orderInfo, this.orderStateExp(this.orderInfo.status));
this.orderInfo.createTime = this.dateFormat(this.orderInfo.createTime);
}
uni.hideLoading();
},
@@ -247,11 +253,11 @@
orderStateExp(value) {
let stateTip = '',
stateTipColor = '#fa436a';
if (value === 1) {
stateTipColor = '#909399';
stateTip= '支付成功,没有回掉';
}else if (value === 2) {
stateTip = '支付成功,没有回掉';
} else if (value === 2) {
stateTip = '待发货';
} else if (value === 3) {
stateTip = '待收货';
@@ -266,9 +272,9 @@
stateTip = ' 维权已完成';
} else if (value === 8) {
stateTip = '待分享';
}else if (value === 12) {
} else if (value === 12) {
stateTipColor = '#909399';
stateTip= '待付款';
stateTip = '待付款';
} else if (value === 13) {
stateTip = '申请退款';
} else if (value === 14) {
@@ -439,31 +445,31 @@
line-height: 1;
}
.num_price {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 5px;
.attr-box {
flex: 1;
font-size: $font-sm + 2upx;
color: $font-color-light;
margin: 0 2upx 0 8upx;
}
.price {
font-size: $font-base + 2upx;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
.num_price {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 5px;
.attr-box {
flex: 1;
font-size: $font-sm + 2upx;
color: $font-color-light;
margin: 0 2upx 0 8upx;
}
.price {
font-size: $font-base + 2upx;
color: $font-color-dark;
&:before {
content: '¥';
font-size: $font-sm;
margin: 0 2upx 0 8upx;
}
}
}
}
}
}
.price-box {