Commit 83e232986d69ba8cc326b55780fdf5d4d88dd73d
1 parent
016a6243
补缴
Showing
4 changed files
with
178 additions
and
115 deletions
src/filters/index.js
... | ... | @@ -131,6 +131,9 @@ export function date2Long (date) { |
131 | 131 | * @return 解析后的Date对象 |
132 | 132 | */ |
133 | 133 | export function string2Date(date,formatType) { |
134 | + if(date == null || date == undefined){ | |
135 | + return ""; | |
136 | + } | |
134 | 137 | let dateTime; |
135 | 138 | switch (formatType) { |
136 | 139 | case 0 : | ... | ... |
src/views/dashboard/index.vue
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | </div> |
110 | 110 | |
111 | 111 | <div class="table-wrap"> |
112 | - <p class="table-title">最新订单</p> | |
112 | + <p class="table-title">最新订单(近三个月)</p> | |
113 | 113 | <el-table |
114 | 114 | :data="orderData" |
115 | 115 | style="width: 100%;" |
... | ... | @@ -125,8 +125,15 @@ |
125 | 125 | :show-overflow-tooltip="true"> |
126 | 126 | </el-table-column> |
127 | 127 | <el-table-column |
128 | + prop="orderTotalFee" | |
129 | + label="应收费用"> | |
130 | + <template slot-scope="scope"> | |
131 | + <span>{{(scope.row.orderTotalFee) |fen2Yuan}} </span> | |
132 | + </template> | |
133 | + </el-table-column> | |
134 | + <el-table-column | |
128 | 135 | prop="orderActFee" |
129 | - label="停车费"> | |
136 | + label="实收费用"> | |
130 | 137 | <template slot-scope="scope"> |
131 | 138 | <span>{{(scope.row.orderActFee) |fen2Yuan}} </span> |
132 | 139 | </template> |
... | ... | @@ -203,7 +210,7 @@ |
203 | 210 | totalScore: 0, |
204 | 211 | validScore: 0, |
205 | 212 | }, |
206 | - total: 15, | |
213 | + total: 0, | |
207 | 214 | currentPage: 1, |
208 | 215 | pageSize: 10, |
209 | 216 | moneyData: [{ | ... | ... |
src/views/order/index.vue
... | ... | @@ -50,8 +50,15 @@ |
50 | 50 | :show-overflow-tooltip="true"> |
51 | 51 | </el-table-column> |
52 | 52 | <el-table-column |
53 | + prop="orderTotalFee" | |
54 | + label="应收费用"> | |
55 | + <template slot-scope="scope"> | |
56 | + <span>{{(scope.row.orderTotalFee) |fen2Yuan}} </span> | |
57 | + </template> | |
58 | + </el-table-column> | |
59 | + <el-table-column | |
53 | 60 | prop="orderActFee" |
54 | - label="停车费"> | |
61 | + label="实收费用"> | |
55 | 62 | <template slot-scope="scope"> |
56 | 63 | <span>{{(scope.row.orderActFee) |fen2Yuan}} </span> |
57 | 64 | </template> | ... | ... |
src/views/payback/index.vue
... | ... | @@ -16,162 +16,208 @@ |
16 | 16 | </div> |
17 | 17 | |
18 | 18 | <div class="table-wrap"> |
19 | - <p class="table-title">订单详情</p> | |
19 | + <el-row :gutter="20"> | |
20 | + <el-col :xs="8" :sm="6" :md="3" :lg="22" :xl="1"> | |
21 | + <p class="table-title">订单详情</p> | |
22 | + </el-col> | |
23 | + <el-col :xs="8" :sm="3" :md="3" :lg="2" :xl="1"> | |
24 | + <el-button style="margin-top: 8px" size="small" type="primary" @click="toBackSubmit">补缴</el-button> | |
25 | + </el-col> | |
26 | + </el-row> | |
20 | 27 | <el-table |
21 | 28 | :data="orderData" |
22 | 29 | style="width: 100%;" |
23 | - :show-overflow-tooltip="true"> | |
30 | + :show-overflow-tooltip="true" | |
31 | + @selection-change="handleSelectionChange"> | |
32 | + <el-table-column | |
33 | + type="selection"> | |
34 | + </el-table-column> | |
24 | 35 | <el-table-column |
25 | - prop="parkName" | |
36 | + prop="plName" | |
26 | 37 | label="停车场" |
27 | 38 | :show-overflow-tooltip="true"> |
28 | 39 | </el-table-column> |
29 | 40 | <el-table-column |
30 | - prop="license" | |
41 | + prop="carNumber" | |
31 | 42 | label="车牌" |
32 | 43 | :show-overflow-tooltip="true"> |
33 | 44 | </el-table-column> |
34 | 45 | <el-table-column |
35 | - prop="money" | |
36 | - label="停车费"> | |
46 | + prop="orderTotalFee" | |
47 | + label="应收费用"> | |
48 | + <template slot-scope="scope"> | |
49 | + <span>{{(scope.row.orderTotalFee) |fen2Yuan}} </span> | |
50 | + </template> | |
37 | 51 | </el-table-column> |
38 | 52 | <el-table-column |
39 | - prop="inTime" | |
40 | - label="进场时间" | |
53 | + prop="parkInTime" | |
54 | + label="入场时间" | |
41 | 55 | :show-overflow-tooltip="true"> |
56 | + <template slot-scope="scope"> | |
57 | + <span>{{(scope.row.parkInTime) |string2Date(7)}} </span> | |
58 | + </template> | |
42 | 59 | </el-table-column> |
43 | 60 | <el-table-column |
44 | - prop="outTime" | |
61 | + prop="parkOutTime" | |
45 | 62 | label="出场时间" |
46 | 63 | :show-overflow-tooltip="true"> |
64 | + <template slot-scope="scope"> | |
65 | + <span>{{(scope.row.parkOutTime) |string2Date(7)}} </span> | |
66 | + </template> | |
47 | 67 | </el-table-column> |
48 | 68 | <el-table-column |
49 | - prop="duration" | |
69 | + prop="parkingDuration" | |
50 | 70 | label="停车时长" |
51 | 71 | :show-overflow-tooltip="true"> |
72 | + <template slot-scope="scope"> | |
73 | + <span>{{(scope.row) |parkingDurationFormatter(scope.row.parkingDuration)}} </span> | |
74 | + </template> | |
52 | 75 | </el-table-column> |
53 | 76 | <el-table-column |
54 | - prop="berthNum" | |
77 | + prop="berthNo" | |
55 | 78 | label="泊位编号"> |
56 | 79 | </el-table-column> |
57 | 80 | <el-table-column |
58 | - prop="status" | |
81 | + prop="orderState" | |
59 | 82 | label="订单状态"> |
83 | + <template slot-scope="scope"> | |
84 | + <span>{{(scope.row) |inOutStateFormatter}} </span> | |
85 | + </template> | |
60 | 86 | </el-table-column> |
61 | 87 | </el-table> |
62 | 88 | <el-pagination |
63 | 89 | :page-size="10" |
64 | 90 | :pager-count="11" |
65 | 91 | layout="prev, pager, next" |
66 | - :total="total"> | |
92 | + :total="total" | |
93 | + @size-change="handleSizeChange" | |
94 | + @current-change="handleSizeChange" | |
95 | + @prev-click="handleSizeChange" | |
96 | + @next-click="handleSizeChange" | |
97 | + > | |
67 | 98 | </el-pagination> |
68 | 99 | </div> |
100 | + <!--补缴对话框--> | |
101 | + <el-dialog | |
102 | + title="补缴" | |
103 | + :visible.sync="dialogVisible" | |
104 | + width="30%" | |
105 | + :close-on-click-modal="false"> | |
106 | + <span>这是二维码</span> | |
107 | + <span slot="footer" class="dialog-footer"> | |
108 | + <el-button type="primary" @click="dialogVisible = false">确 定</el-button> | |
109 | + </span> | |
110 | + </el-dialog> | |
111 | + | |
69 | 112 | </div> |
70 | 113 | </template> |
71 | 114 | |
72 | 115 | <script> |
73 | -export default { | |
74 | - data() { | |
75 | - return { | |
76 | - form: { | |
77 | - name: '', | |
78 | - region: '', | |
79 | - date1: '', | |
80 | - date2: '', | |
81 | - delivery: false, | |
82 | - type: [], | |
83 | - resource: '', | |
84 | - desc: '' | |
85 | - }, | |
86 | - total: 55, | |
87 | - currentPage: 1, | |
88 | - pageSize: 10, | |
89 | - orderData: [ | |
90 | - { | |
91 | - parkName: '承德老二中停车场', | |
92 | - license: '冀H7517732', | |
93 | - money: '31', | |
94 | - inTime: '2019-06-02 00:00:00', | |
95 | - outTime: '2019-06-01 08:00:00', | |
96 | - duration: '2小时28分钟43秒', | |
97 | - berthNum: 'A1212231', | |
98 | - status: '完成' | |
99 | - }, | |
100 | - { | |
101 | - parkName: '承德老二中停车场', | |
102 | - license: '冀H7517732', | |
103 | - money: '31', | |
104 | - inTime: '2019-06-02 00:00:00', | |
105 | - outTime: '2019-06-01 08:00:00', | |
106 | - duration: '2小时28分钟43秒', | |
107 | - berthNum: 'A1212231', | |
108 | - status: '完成' | |
109 | - }, | |
110 | - { | |
111 | - parkName: '承德老二中停车场', | |
112 | - license: '冀H7517732', | |
113 | - money: '31', | |
114 | - inTime: '2019-06-02 00:00:00', | |
115 | - outTime: '2019-06-01 08:00:00', | |
116 | - duration: '2小时28分钟43秒', | |
117 | - berthNum: 'A1212231', | |
118 | - status: '完成' | |
119 | - }, | |
120 | - { | |
121 | - parkName: '承德老二中停车场', | |
122 | - license: '冀H7517732', | |
123 | - money: '31', | |
124 | - inTime: '2019-06-02 00:00:00', | |
125 | - outTime: '2019-06-01 08:00:00', | |
126 | - duration: '2小时28分钟43秒', | |
127 | - berthNum: 'A1212231', | |
128 | - status: '完成' | |
129 | - }, | |
130 | - { | |
131 | - parkName: '承德老二中停车场', | |
132 | - license: '冀H7517732', | |
133 | - money: '31', | |
134 | - inTime: '2019-06-02 00:00:00', | |
135 | - outTime: '2019-06-01 08:00:00', | |
136 | - duration: '2小时28分钟43秒', | |
137 | - berthNum: 'A1212231', | |
138 | - status: '完成' | |
139 | - }, | |
140 | - { | |
141 | - parkName: '承德老二中停车场', | |
142 | - license: '冀H7517732', | |
143 | - money: '31', | |
144 | - inTime: '2019-06-02 00:00:00', | |
145 | - outTime: '2019-06-01 08:00:00', | |
146 | - duration: '2小时28分钟43秒', | |
147 | - berthNum: 'A1212231', | |
148 | - status: '完成' | |
149 | - }, | |
150 | - { | |
151 | - parkName: '承德老二中停车场', | |
152 | - license: '冀H7517732', | |
153 | - money: '31', | |
154 | - inTime: '2019-06-02 00:00:00', | |
155 | - outTime: '2019-06-01 08:00:00', | |
156 | - duration: '2小时28分钟43秒', | |
157 | - berthNum: 'A1212231', | |
158 | - status: '完成' | |
116 | + import {queryOwnerParkRecord} from '@/api/index'; | |
117 | + import {fen2Yuan,string2Date,inOutStateFormatter,parkingDurationFormatter} from '@/filters/index'; | |
118 | + export default { | |
119 | + data() { | |
120 | + return { | |
121 | + form: { | |
122 | + plNos: null, | |
123 | + carNum: null, | |
124 | + | |
159 | 125 | }, |
160 | - ] | |
161 | - } | |
162 | - }, | |
163 | - methods: { | |
164 | - onSubmit() { | |
165 | - this.$message('submit!') | |
126 | + total: 0, | |
127 | + currentPage: 1, | |
128 | + pageSize: 10, | |
129 | + orderData: [ | |
130 | + ], | |
131 | + multipleSelection:[], | |
132 | + dialogVisible:false, | |
133 | + } | |
166 | 134 | }, |
167 | - onCancel() { | |
168 | - this.$message({ | |
169 | - message: 'cancel!', | |
170 | - type: 'warning' | |
171 | - }) | |
135 | + mounted: function() { | |
136 | + | |
137 | + this.queryOwnerParkRecord(); | |
138 | + }, | |
139 | + methods: { | |
140 | + /** | |
141 | + * 获取查询参数 | |
142 | + */ | |
143 | + getQueryParams: function() { | |
144 | + let userInfo = this.$store.state.user.userInfo; | |
145 | + let plNos = []; | |
146 | + if(this.form.plNos != null && this.form.plNos != ''){ | |
147 | + plNos.push(this.form.plNos); | |
148 | + } | |
149 | + let req = { | |
150 | + //custId:userInfo.custId, | |
151 | + custId:'501519113641649119232', | |
152 | + orderStates:[52], | |
153 | + plNos:plNos, | |
154 | + carNum:this.form.carNum, | |
155 | + } | |
156 | + return req; | |
157 | + }, | |
158 | + /** | |
159 | + * 查询订单信息 | |
160 | + */ | |
161 | + queryOwnerParkRecord: function() { | |
162 | + let req = this.getQueryParams(); | |
163 | + | |
164 | + req.baseRequest={ | |
165 | + pageNum:this.currentPage, | |
166 | + pageSize:this.pageSize, | |
167 | + }, | |
168 | + queryOwnerParkRecord (req).then(response =>{ | |
169 | + if(response.code=='8888'){ | |
170 | + this.orderData = response.data.dataList; | |
171 | + this.total = response.data.pageTotals; | |
172 | + }else{ | |
173 | + console.log(response); | |
174 | + } | |
175 | + | |
176 | + }); | |
177 | + }, | |
178 | + // 获取子组件页码方法 | |
179 | + handleSizeChange: function(page) { | |
180 | + console.log(page) | |
181 | + this.currentPage = page; | |
182 | + /** 调用表格数据.*/ | |
183 | + this.queryOwnerParkRecord(); | |
184 | + | |
185 | + }, | |
186 | + //多选 | |
187 | + handleSelectionChange:function(val) { | |
188 | + this.multipleSelection = val; | |
189 | + | |
190 | + }, | |
191 | + toBackSubmit:function(){ | |
192 | + let selects = this.multipleSelection; | |
193 | + if(selects == null || selects.length < 1){ | |
194 | + this.$message({ | |
195 | + message: '请至少选择一行数据!', | |
196 | + type: 'warning' | |
197 | + }); | |
198 | + return; | |
199 | + } | |
200 | + let backs = []; | |
201 | + selects.forEach(item=>{ | |
202 | + backs.push({orderId:item.orderId,carNumber:item.carNumber}); | |
203 | + }); | |
204 | + console.log(backs); | |
205 | + //TODO 调用后台接口获取二维码信息 | |
206 | + | |
207 | + this.dialogVisible = true; | |
208 | + }, | |
209 | + | |
210 | + onSubmit:function() { | |
211 | + this.queryOwnerParkRecord(); | |
212 | + }, | |
213 | + onCancel:function() { | |
214 | + this.$message({ | |
215 | + message: 'cancel!', | |
216 | + type: 'warning' | |
217 | + }) | |
218 | + } | |
172 | 219 | } |
173 | 220 | } |
174 | -} | |
175 | 221 | </script> |
176 | 222 | |
177 | 223 | <style scoped> | ... | ... |