|
@@ -16,23 +16,44 @@
|
|
|
<view>{{ $method.timestampToTime(item.createTime) }}</view>
|
|
|
</view>
|
|
|
<u-line color="#D6D6DB" />
|
|
|
- <view class="body"
|
|
|
- v-for="(items, indexs) in item.orderGoodsList"
|
|
|
- :key="indexs" @click="goCourse(items,item.orderStatus)"
|
|
|
- >
|
|
|
- <view class="body__content">
|
|
|
- <image class="goods-img" :src="$method.splitImgHost(items.coverUrl)"></image>
|
|
|
- <view class="goods-text">
|
|
|
- <view class="goods-name">{{ items.goodsName }}</view>
|
|
|
- <view class="goods-price">¥ {{ items.goodsRealPrice }}</view>
|
|
|
+ <view v-if="current == 3">
|
|
|
+ <view class="body"
|
|
|
+ >
|
|
|
+ <view class="body__content">
|
|
|
+ <image class="goods-img" :src="$method.splitImgHost(item.coverUrl)"></image>
|
|
|
+ <view class="goods-text">
|
|
|
+ <view class="goods-name">{{ item.goodsName }}</view>
|
|
|
+ <!-- <view class="goods-price">¥ {{ items.goodsRealPrice }}</view> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
|
|
|
- <view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
|
|
|
+ </view>
|
|
|
+ <view v-else >
|
|
|
+ <view class="body"
|
|
|
+ v-for="(items, indexs) in item.orderGoodsList"
|
|
|
+ :key="indexs" @click="goCourse(items,item.orderStatus)"
|
|
|
+ >
|
|
|
+ <view class="body__content">
|
|
|
+ <image class="goods-img" :src="$method.splitImgHost(items.coverUrl)"></image>
|
|
|
+ <view class="goods-text">
|
|
|
+ <view class="goods-name">{{ items.goodsName }}</view>
|
|
|
+ <view class="goods-price">¥ {{ items.goodsRealPrice }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
|
|
|
+ <view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<u-line color="#D6D6DB" />
|
|
|
- <view class="footer">
|
|
|
+ <view class="footer" v-if="current == 3">
|
|
|
+ <view>
|
|
|
+ <text style="color:#999;font-size: 24rpx;margin-right: 8rpx;">退款金额</text>
|
|
|
+ <text style="color:#ff2d55;font-size: 30rpx;font-weight: bold;">¥{{ item.refundFee }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="footer" v-else>
|
|
|
<view>
|
|
|
<text style="color:#999;font-size: 24rpx;margin-right: 8rpx;">共{{ item.orderGoodsList.length }}项</text>
|
|
|
<text style="color: #333;font-size: 30rpx;font-weight: bold;">合计</text>
|
|
@@ -50,9 +71,9 @@
|
|
|
</template>
|
|
|
|
|
|
|
|
|
- <!-- <template v-if="current == 1 && order.length">
|
|
|
+ <template v-if="current == 1 && order.length">
|
|
|
<view class="apply-invoice" @click="goInvoice">发票申请</view>
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -76,6 +97,10 @@ export default {
|
|
|
{
|
|
|
name: '已取消',
|
|
|
count: 0
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已退款',
|
|
|
+ count: 0
|
|
|
}
|
|
|
],
|
|
|
current: 0,
|
|
@@ -87,7 +112,8 @@ export default {
|
|
|
},
|
|
|
pageNum1: 0,
|
|
|
pageNum2: 0,
|
|
|
- pageNum3: 0
|
|
|
+ pageNum3: 0,
|
|
|
+ pageNum4: 0
|
|
|
};
|
|
|
},
|
|
|
// onPullDownRefresh() {},
|
|
@@ -318,6 +344,21 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if(this.current == 3) {
|
|
|
+ if(this.order.length >= this.pageNum4) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.formData.orderStatus = '';
|
|
|
+ this.$api.orderRefundList(this.formData).then(res => {
|
|
|
+ if(res.data.code == 200) {
|
|
|
+ this.order = this.order.concat(res.data.rows);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.$api.getorderlists(this.formData).then(res => {
|
|
|
if (res.data.code === 200) {
|
|
|
if (res.data.rows.length) {
|
|
@@ -338,6 +379,8 @@ export default {
|
|
|
if (this.current === 2) {
|
|
|
this.formData.orderStatus = '-1,-2,4';
|
|
|
}
|
|
|
+
|
|
|
+ this.order = [];
|
|
|
this.$api.getorderlists(this.formData).then(res => {
|
|
|
if (res.data.code === 200) {
|
|
|
if (this.current === 0) {
|
|
@@ -356,12 +399,30 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ orderRefundList() {
|
|
|
+ this.order = [];
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ this.formData.orderStatus = ''
|
|
|
+ this.$api.orderRefundList(this.formData).then(res => {
|
|
|
+ if(res.data.code == 200) {
|
|
|
+ this.order = res.data.rows;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
change(index) {
|
|
|
if (this.current === index) {
|
|
|
return;
|
|
|
}
|
|
|
this.current = index;
|
|
|
- this.getOrderList();
|
|
|
+ if(this.current == 3) { //退款订单
|
|
|
+ this.formData.status = '';
|
|
|
+ this.orderRefundList()
|
|
|
+ } else { //其他订单
|
|
|
+
|
|
|
+ this.formData.status = '0,1';
|
|
|
+ this.getOrderList();
|
|
|
+ }
|
|
|
+
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0
|
|
|
});
|