Showing
1 changed file
with
231 additions
and
0 deletions
app/pages/order/list/list.vue
0 → 100644
1 | +<template> | ||
2 | + <layout-body> | ||
3 | + <layout-filter ref="filter" :model="query"> | ||
4 | + <filter-item label="订单号"> | ||
5 | + <Input v-model.trim="query.orderCode" :maxlength="11" /> | ||
6 | + </filter-item> | ||
7 | + <filter-item label="SKN"> | ||
8 | + <Input v-model.trim="query.productSkn" :maxlength="9" /> | ||
9 | + </filter-item> | ||
10 | + <filter-item label="SKU"> | ||
11 | + <Input v-model.trim="query.productSku" :maxlength="9" /> | ||
12 | + </filter-item> | ||
13 | + <filter-item label="收货人"> | ||
14 | + <Input v-model.trim="query.userName" /> | ||
15 | + </filter-item> | ||
16 | + <filter-item label="买家昵称"> | ||
17 | + <Input v-model.trim="query.nickName" /> | ||
18 | + </filter-item> | ||
19 | + <filter-item label="商品名称"> | ||
20 | + <Input v-model.trim="query.prodName" /> | ||
21 | + </filter-item> | ||
22 | + <filter-item label="订单状态"> | ||
23 | + <Select v-model.trim="query.orderStatusStr" clearable> | ||
24 | + <Option v-for="option in orderStatusArr" :key="option.id" :value="option.id"> | ||
25 | + {{ option.name }} | ||
26 | + </Option> | ||
27 | + </Select> | ||
28 | + </filter-item> | ||
29 | + <filter-item> | ||
30 | + <Button type="primary" @click="search">筛选</Button> | ||
31 | + <Button @click="reset">清空条件</Button> | ||
32 | + <Button type="primary" @click="exportExcel">导出</Button> | ||
33 | + </filter-item> | ||
34 | + </layout-filter> | ||
35 | + <layout-list> | ||
36 | + <list-tabs @change-tabs="onChangeTabs"></list-tabs> | ||
37 | + <data-table :table-cols="tableCols" :table-data="tableData"></data-table> | ||
38 | + <Page :total="pageData.total" :current="pageData.current" :page-size="20" show-total @on-change="pageChange"> | ||
39 | + </Page> | ||
40 | + </layout-list> | ||
41 | + </layout-body> | ||
42 | +</template> | ||
43 | + | ||
44 | +<script> | ||
45 | +import { ListTabs, DataTable } from './components'; | ||
46 | +import OrderService from 'services/order/order-service'; | ||
47 | +import _ from 'lodash'; | ||
48 | +export default { | ||
49 | + components: { ListTabs, DataTable }, | ||
50 | + data() { | ||
51 | + return { | ||
52 | + query: { | ||
53 | + orderCode: '', | ||
54 | + productSkn: '', | ||
55 | + productSku: '', | ||
56 | + prodName: '', | ||
57 | + nickName: '', | ||
58 | + userName: '', | ||
59 | + orderStatus: '', | ||
60 | + pageSize: 20, | ||
61 | + pageNo: 1, | ||
62 | + orderStatusStr: '', | ||
63 | + queryType: 1, | ||
64 | + }, | ||
65 | + orderStatusArr: [ | ||
66 | + { id: 1, name: 'a' }, | ||
67 | + { id: 2, name: 'b' }, | ||
68 | + { id: 3, name: 'c' }, | ||
69 | + ], | ||
70 | + pageData: { | ||
71 | + total: 100, | ||
72 | + current: 1, | ||
73 | + }, | ||
74 | + tableData: [ | ||
75 | + { | ||
76 | + orderCode: '11111', | ||
77 | + parentOrderCode: '1111-22222', | ||
78 | + createTime: '2020-04-08 12:39:39', | ||
79 | + buyerNickeName: '小乌贼', | ||
80 | + receiver: '收货人', | ||
81 | + paymentStatus: '支付状态', | ||
82 | + orderStatus: '订单状态', | ||
83 | + realAmount: '实收金额', | ||
84 | + orderGoods: [ | ||
85 | + { | ||
86 | + imageUrl: 'fdsafdsa', //商品图片 | ||
87 | + prodcutName: 'Converse RENEW工装大衣', //商品名称 | ||
88 | + prodcutCode: '10019501-A01', | ||
89 | + sizeName: 'M', // 尺码名称 | ||
90 | + colorName: '黑', // 颜色名称 | ||
91 | + price: '¥120.00', //单价 | ||
92 | + buyNums: '2', //购买数量 | ||
93 | + productSkn: '34556778', // 商品skn | ||
94 | + productSku: '34556778', // 商品sku | ||
95 | + }, | ||
96 | + { | ||
97 | + imageUrl: 'fdsafdsa', //商品图片 | ||
98 | + prodcutName: 'Converse RENEW工装大衣', //商品名称 | ||
99 | + prodcutCode: '10019501-A01', | ||
100 | + sizeName: 'M', // 尺码名称 | ||
101 | + colorName: '黑', // 颜色名称 | ||
102 | + price: '¥120.00', //单价 | ||
103 | + buyNums: '2', //购买数量 | ||
104 | + productSkn: '34556778', // 商品skn | ||
105 | + productSku: '34556778', // 商品sku | ||
106 | + }, | ||
107 | + { | ||
108 | + imageUrl: 'fdsafdsa', //商品图片 | ||
109 | + prodcutName: 'Converse RENEW工装大衣', //商品名称 | ||
110 | + prodcutCode: '10019501-A01', | ||
111 | + sizeName: 'M', // 尺码名称 | ||
112 | + colorName: '黑', // 颜色名称 | ||
113 | + price: '¥120.00', //单价 | ||
114 | + buyNums: '2', //购买数量 | ||
115 | + productSkn: '34556778', // 商品skn | ||
116 | + productSku: '34556778', // 商品sku | ||
117 | + }, | ||
118 | + ], | ||
119 | + }, | ||
120 | + { | ||
121 | + orderCode: '2222222', | ||
122 | + parentOrderCode: '1111-22222', | ||
123 | + createTime: '2020-04-08 12:39:39', | ||
124 | + buyerNickeName: '小乌贼', | ||
125 | + receiver: '收货人', | ||
126 | + paymentStatus: '支付状态', | ||
127 | + orderStatus: '订单状态', | ||
128 | + realAmount: '实收金额', | ||
129 | + orderGoods: [ | ||
130 | + { | ||
131 | + imageUrl: 'fdsafdsa', //商品图片 | ||
132 | + prodcutName: 'Converse RENEW工装大衣', //商品名称 | ||
133 | + prodcutCode: '10019501-A01', | ||
134 | + sizeName: 'M', // 尺码名称 | ||
135 | + colorName: '黑', // 颜色名称 | ||
136 | + price: '¥120.00', //单价 | ||
137 | + buyNums: '2', //购买数量 | ||
138 | + productSkn: '34556778', // 商品skn | ||
139 | + productSku: '34556778', // 商品sku | ||
140 | + }, | ||
141 | + ], | ||
142 | + }, | ||
143 | + ], | ||
144 | + tableCols: [ | ||
145 | + { title: '图片', width: '8%' }, | ||
146 | + { title: '商品信息', width: '20%' }, | ||
147 | + { title: '单价', width: '8%' }, | ||
148 | + { title: '数量', width: '5%' }, | ||
149 | + { title: 'SKN', width: '5%' }, | ||
150 | + { title: 'SKU', width: '5%' }, | ||
151 | + { title: '买家昵称', width: '5%' }, | ||
152 | + { title: '收货人', width: '5%' }, | ||
153 | + { title: '支付状态', width: '5%' }, | ||
154 | + { title: '实收金额', width: '5%' }, | ||
155 | + { title: '订单状态', width: '5%' }, | ||
156 | + { title: '操作', width: '10%' }, | ||
157 | + ], | ||
158 | + }; | ||
159 | + }, | ||
160 | + created() { | ||
161 | + this.orderService = new OrderService(); | ||
162 | + }, | ||
163 | + methods: { | ||
164 | + onChangeTabs(type) { | ||
165 | + this.query.queryType = +type; | ||
166 | + this.reset(); | ||
167 | + }, | ||
168 | + search() { | ||
169 | + this.orderService.orderList(this.query).then(ret => { | ||
170 | + this.tableData = _.get(ret, 'data.records', []); | ||
171 | + this.pageData.total = _.get(ret, 'data.totalCount', 0); | ||
172 | + this.pageData.pageNo = _.get(ret, 'data.pageNo', 1); | ||
173 | + }); | ||
174 | + }, | ||
175 | + pageChange(page) { | ||
176 | + this.pageData.current = page; | ||
177 | + this.query.pageNo = page; | ||
178 | + this.search(); | ||
179 | + }, | ||
180 | + reset() { | ||
181 | + this.query.orderCode = ''; | ||
182 | + this.query.productSkn = ''; | ||
183 | + this.query.productSku = ''; | ||
184 | + this.query.prodName = ''; | ||
185 | + this.query.nickName = ''; | ||
186 | + this.query.userName = ''; | ||
187 | + this.query.orderStatus = 0; | ||
188 | + this.query.pageSize = 20; | ||
189 | + this.query.pageNo = 1; | ||
190 | + this.query.orderStatusStr = ''; | ||
191 | + this.search(); | ||
192 | + }, | ||
193 | + exportExcel() {}, | ||
194 | + }, | ||
195 | +}; | ||
196 | +</script> | ||
197 | + | ||
198 | +<style lang="scss"> | ||
199 | +table.order-table { | ||
200 | + width: 100%; | ||
201 | + height: auto; | ||
202 | + thead { | ||
203 | + background: #000000; | ||
204 | + th { | ||
205 | + padding: 8px 0; | ||
206 | + border: 1px solid #cccccc; | ||
207 | + color: #ffffff; | ||
208 | + text-align: center; | ||
209 | + } | ||
210 | + } | ||
211 | + tbody { | ||
212 | + tr { | ||
213 | + height: 35px; | ||
214 | + td { | ||
215 | + border: 1px solid #cccccc; | ||
216 | + border-top: none; | ||
217 | + border-right: none; | ||
218 | + text-align: center; | ||
219 | + padding: 5px; | ||
220 | + span { | ||
221 | + margin-left: 10px; | ||
222 | + margin-right: 20px; | ||
223 | + } | ||
224 | + } | ||
225 | + td:last-child { | ||
226 | + border-right: 1px solid #cccccc; | ||
227 | + } | ||
228 | + } | ||
229 | + } | ||
230 | +} | ||
231 | +</style> |
-
Please register or login to post a comment