| 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
 | | <template> |  |     <div> |  |         <div style="padding: 10px 10px 0px 10px;"> |  |             <el-form :inline="true" :model="searchForm"> |  |               <el-form-item label="停车场"> |  |               <el-select v-model="searchForm.parkId"> |  |                 <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id"></el-option> |  |               </el-select> |  |               </el-form-item> |  |               <el-form-item label="选择时间"> |  |                 <div class="date-box"> |  |                   <el-date-picker type="daterange" value-format="yyyy-MM-dd" format="yyyy-MM-dd" |  |                                   v-model="searchForm.date" placeholder=""> |  |                   </el-date-picker> |  |                 </div> |  |               </el-form-item> |  |                 <el-form-item> |  |                     <el-button type="primary" size="small" @click="onSearch" icon="el-icon-search">查询</el-button> |  |                 </el-form-item> |  |             </el-form> |  |         </div> |  |   |  |         <el-table :data="table2" border style="width:100%;border:1px solid #bcbec2;"> |  |             <el-table-column type="index" width="50" label="序号" align="center"> </el-table-column> |  |             <el-table-column prop="parkName" label="停车场" align="center" width="150"></el-table-column> |  |           <el-table-column prop="orderNum" label="有效订单数" align="center" width="150"></el-table-column> |  |             <el-table-column prop="orderMoney" label="订单总金额" align="center"></el-table-column> |  |         </el-table> |  |     </div> |  | </template> |  |   |  | <script> |  |     export default { |  |         name: "index", |  |         data: function () { |  |             return { |  |                 flag:false, |  |                 flag2:false, |  |                 searchForm: { |  |                     parkId: '', |  |                     startTime:'', |  |                     endTime:'', |  |                     date:[], |  |                 }, |  |                 formData: { |  |                   parkName:'', |  |                   orderNum:'', |  |                   orderMoney:'' |  |                 }, |  |                 urlPath:this.$systemconfig.basePath + '/orderrecord/', |  |                 table1:[], |  |                 table2:[], |  |             } |  |         }, |  |         mounted() { |  |             this.loadData(); |  |             this.$byutil.postData(this, this.$systemconfig.basePath+'/park/findAll', this.formData, res => { |  |                 this.table1 = res.data; |  |             }) |  |         }, |  |         methods: { |  |             loadData() { |  |               if (this.searchForm.date) { |  |                 this.searchForm.startTime = this.searchForm.date[0]; |  |                 this.searchForm.endTime = this.searchForm.date[1]; |  |               } else { |  |                 this.searchForm.startTime = null; |  |                 this.searchForm.endTime = null; |  |               } |  |                 this.$byutil.postData(this, this.urlPath+'findCountPage', this.searchForm,res => { |  |                   this.table2 = res.data; |  |                 }); |  |             }, |  |             onSearch() { |  |                 this.loadData(); |  |             }, |  |         } |  |     } |  | </script> |  |   |  | <style scoped> |  |   |  | </style> | 
 |