-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.vue
183 lines (183 loc) · 4.22 KB
/
example.vue
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
<search-and-pagination
ref="searchForm"
:config="searchFormConfig"
:total="total"
@onSearch="onSearch"
@change="searchChange"
>
<template v-slot:table>
<!--表格内容-->
<el-table :data="tableData" border stripe style="width: 100%">
<el-table-column
v-for="(item, i) in tableConfig"
:key="i"
:prop="item.prop"
:label="item.label"
:min-width="item.minWidth"
:width="item.width"
:align="item.align || 'center'"
></el-table-column>
</el-table>
</template>
</search-and-pagination>
</template>
<script>
const orderList = [
{
order_code: "DD0001",
supplier: "供应商店铺名称",
create_order_time: "2020-05-14 12:12:12",
goods_count: "5",
order_gold: "70.00",
pay_method: "分期支付",
delivery_method: "卖家发货",
pay_status_str: "未支付",
delivery_status_str: "未发货"
},
{
order_code: "DD0001",
supplier: "供应商店铺名称",
create_order_time: "2020-05-14 12:12:12",
goods_count: "5",
order_gold: "70.00",
pay_method: "分期支付",
delivery_method: "卖家发货",
pay_status_str: "未支付",
delivery_status_str: "未发货"
},
{
order_code: "DD0001",
supplier: "供应商店铺名称",
create_order_time: "2020-05-14 12:12:12",
goods_count: "5",
order_gold: "70.00",
pay_method: "分期支付",
delivery_method: "卖家发货",
pay_status_str: "未支付",
delivery_status_str: "未发货"
},
{
order_code: "DD0001",
supplier: "供应商店铺名称",
create_order_time: "2020-05-14 12:12:12",
goods_count: "5",
order_gold: "70.00",
pay_method: "分期支付",
delivery_method: "卖家发货",
pay_status_str: "未支付",
delivery_status_str: "未发货"
},
{
order_code: "DD0001",
supplier: "供应商店铺名称",
create_order_time: "2020-05-14 12:12:12",
goods_count: "5",
order_gold: "70.00",
pay_method: "分期支付",
delivery_method: "卖家发货",
pay_status_str: "未支付",
delivery_status_str: "未发货"
}
];
export default {
components: {
SearchAndPagination: () => import("./index")
},
data() {
return {
searchFormConfig: [
{
key: "search_data",
name: "gn-input",
label: "商品名称"
},
{
key: "classify_name",
name: "gn-cascader",
label: "商品分类",
options: []
},
{
key: "status",
name: "gn-select",
label: "商品状态",
options: [
{
value: "0",
label: "上架"
},
{
value: "1",
label: "下架"
},
{
value: "2",
label: "删除"
}
]
}
],
tableConfig: [
{
prop: 'order_code',
label: '订单号',
width: 180
},
{
prop: 'supplier',
label: '供应商',
width: 200
},
{
prop: 'create_order_time',
label: '下单时间',
minWidth: 160
},
{
prop: 'goods_count',
label: '商品数量',
width: 100
},
{
prop: 'order_gold',
label: '订单金额',
width: 130
},
{
prop: 'pay_method',
label: '结算方式',
width: 120
},
{
prop: 'delivery_method',
label: '配送方式',
width: 170
},
{
prop: 'pay_status_str',
label: '支付状态',
width: 100
},
{
prop: 'delivery_status_str',
label: '发货状态',
width: 100
}
],
tableData: orderList,
total: 1
};
},
methods: {
searchChange(param) {
// 搜索表单改变时触发
console.log(param); // 表单的值跟分页的值
},
onSearch(param) {
// 点击搜索按钮时触发
console.log(param); // 表单的值跟分页的值
}
}
};
</script>