aftersale.vue
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<template>
<view class="page">
<u-tabs active-color="#26c570" :list="list" :current="current" @change="change"></u-tabs>
<view v-if="alllist.length == 0" style="text-align: center;margin-top: 50rpx;" class="tit1">暂无数据</view>
<view style="padding: 0 20rpx;">
<view v-for="(item,index) in alllist" :key="index"
@click="gopath('/pages/orderList/aftersaledetails',item.afterId)"
style="background: #fff;margin-top: 40rpx;padding: 30rpx;border-radius: 18rpx;">
<view style="display: flex;line-height: 50rpx;">
<view>
售后单号:
</view>
<view class="t1">
{{item.afterFormid}}
</view>
</view>
<view style="display: flex;line-height: 50rpx;">
<view>
售后类型:
</view>
<view class="t1">
<span v-if="item.afterType == 1">仅退款</span>
<span v-if="item.afterType == 2">退货退款</span>
</view>
</view>
<view style="display: flex;line-height: 50rpx;">
<view>
退款金额:
</view>
<view class="t1">
{{item.price}}
</view>
</view>
<view style="display: flex;line-height: 50rpx;">
<view>
售后状态:
</view>
<view class="t1">
{{item.afterStateName}}
</view>
</view>
<view style="display: flex;line-height: 50rpx;">
<view>
申请时间:
</view>
<view class="t1">
{{item.createTime}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
type: '',
name: '全部'
},
{
type: '1',
name: '待商家处理'
},
{
type: '2',
name: '待商家收货'
},
],
current: 0,
alllist: [],
pageindex: {
page: 1,
pageSize: 10,
type: '',
searchType: "1"
},
imgurl: '',
total: 0
};
},
onLoad(optiong) {
this.imgurl = this.$img
if(uni.getStorageSync('shopId')) {
this.getALL()
} else {
}
},
onReachBottom(e) {
console.error(e)
if (this.alllist.length < this.total) {
this.pageindex.page++
this.getALL()
}
},
methods: {
gopath(url, id) {
uni.navigateTo({
url: url + '?id=' + id
})
},
getALL() {
this.$http.sendRequest('/after/getAll', 'POST', this.pageindex, 2).then(res => {
//成功回调
this.alllist = [...this.alllist, ...res.data.data.list]
this.total = res.data.data.total
console.error(this.alllist)
})
},
change(index) {
this.current = index;
if (this.current == 0) {
this.pageindex.type = ''
} else {
this.pageindex.type = this.list[this.current].type
}
this.pageindex.page = 1
this.alllist = []
this.getALL()
}
}
}
</script>
<style scoped lang="scss">
.page {}
.t1 {
font-size: 26rpx;
color: #979797;
}
</style>