fenxiaodingdan.vue
3.1 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
<template>
<view class="content">
<view class="tapnav flextwo">
<view class="tapnavitem" :class="order==0?'tapnavactive':''" @click="ordersel" :data-id="0">全部</view>
<view class="tapnavitem" :class="order==1?'tapnavactive':''" @click="ordersel" :data-id="1">待付款</view>
<view class="tapnavitem" :class="order==2?'tapnavactive':''" @click="ordersel" :data-id="2">待发货</view>
<view class="tapnavitem" :class="order==3?'tapnavactive':''" @click="ordersel" :data-id="3">待收货</view>
</view>
<view class="nodata" v-if="orderlist.length==0">暂无数据</view>
<view class="fenorderlist" v-else>
<view class='fenorderitem' v-for="(item,index) in orderlist" :key="index">
<view class="fenordertop flextwo">
<view class="fenorederleft">订单号:{{item.order_detail_num}}</view>
<view class="fenorderright" v-if="item.status==1">待付款</view>
<view class="fenorderright" v-if="item.status==2">待发货</view>
<view class="fenorderright" v-if="item.status==3">待收货</view>
</view>
<view class="fenbody flextwo">
<view class="fenbodyleft">
<view class="fenbodytop">分销订单</view>
<view class="fenbodybot">{{item.createtime}} <text>用户名</text></view>
</view>
<view class="fenbodyright">5000.00</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
order:0,
orderlist:[]
}
},
onLoad() {
this.getfenxiaoorder()
},
methods: {
ordersel(e){
this.order=e.currentTarget.dataset.id;
this.getfenxiaoorder()
},
// 获取分销订单
getfenxiaoorder(){
let that = this;
console.log(44747)
var url = 'distribution/distribution_order';
var params = {
status:''
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.orderlist = that.orderlist.concat(res.data.data)
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style>
@import url('../../base/homepage');
page{
background: #F7F7F7;
}
.fenbodytop{
color:#232323;
font-size: 28rpx;
font-weight: bold;
}
.fenbody{
margin-top:16rpx
}
.fenorederleft{
color:#8C9198;
font-size: 24rpx;
}
.fenordertop{
padding-bottom: 16rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.fenbodybot{
color:#8C9198;
font-size: 22rpx;
margin-top:16rpx
}
.fenbodyright{
color:#FF9417;
font-size: 32rpx;
font-weight: bold;
}
.fenorderright{
color:#FF9417;
font-size: 24rpx;
}
.tapnav{
background: #fff;
}
.topnaveitem{
color:#232323;
font-size: 32rpx;
}
.tapnavactive{
color:#FF9417
}
.tapnavactive::after{
width:144rpx;
background: #FF9417;
}
.fenorderitem{
width:686rpx;
padding: 24rpx 32rpx;
box-sizing: border-box;
background: #fff;
margin:32rpx auto 0;
border-radius: 16rpx;
}
</style>