|
|
@@ -8,6 +8,41 @@
|
|
|
label-width="0px"
|
|
|
style="width: 100%;">
|
|
|
<div class="filter-view">
|
|
|
+ <div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="filter.pageVo.dateRange"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ :clearable="false"
|
|
|
+ start-placeholder="Start Date"
|
|
|
+ end-placeholder="End Date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="handleFilter"/>
|
|
|
+ </div>
|
|
|
+ <el-select
|
|
|
+ class="filter-view-item"
|
|
|
+ v-model="filter.pageVo.filter"
|
|
|
+ placeholder="Charging Status"
|
|
|
+ @change="handleFilter"
|
|
|
+ clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in filterOptions"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.value"/>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ class="filter-view-item"
|
|
|
+ v-model="filter.pageVo.chargingPlatform"
|
|
|
+ placeholder="Charging Platform"
|
|
|
+ @change="changeUserType"
|
|
|
+ clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in chargePlatOptions"
|
|
|
+ :key="item"
|
|
|
+ :label="item"
|
|
|
+ :value="item" />
|
|
|
+ </el-select>
|
|
|
<el-select
|
|
|
class="filter-view-item"
|
|
|
v-model="filter.pageVo.userType"
|
|
|
@@ -45,28 +80,6 @@
|
|
|
:label="item.value"
|
|
|
:value="item.key" />
|
|
|
</el-select>
|
|
|
- <el-select
|
|
|
- class="filter-view-item"
|
|
|
- v-model="filter.pageVo.filter"
|
|
|
- placeholder="Charging Status"
|
|
|
- @change="handleFilter"
|
|
|
- clearable>
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in filterOptions"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.value"/>
|
|
|
- </el-select>
|
|
|
- <div>
|
|
|
- <el-date-picker
|
|
|
- v-model="filter.pageVo.dateRange"
|
|
|
- type="daterange"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="Start Date"
|
|
|
- end-placeholder="End Date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- @change="handleFilter"/>
|
|
|
- </div>
|
|
|
<div style="flex: 1; max-width: 500px;">
|
|
|
<el-input
|
|
|
v-model="filter.pageVo.criteria"
|
|
|
@@ -127,6 +140,14 @@
|
|
|
<span :title="row.phoneNo">{{ row.phoneNo }}</span>
|
|
|
</template>
|
|
|
</el-table-column-->
|
|
|
+ <el-table-column
|
|
|
+ label="Charging Platform"
|
|
|
+ align="center"
|
|
|
+ min-width="120">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span :title="row.chargingPlatform">{{ row.chargingPlatform }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="User Type"
|
|
|
align="center"
|
|
|
@@ -172,7 +193,7 @@
|
|
|
label="Carpark Code"
|
|
|
prop="carParkCode"
|
|
|
align="center"
|
|
|
- min-width="120"/>
|
|
|
+ min-width="90"/>
|
|
|
<el-table-column
|
|
|
min-width="90"
|
|
|
label="Connector"
|
|
|
@@ -271,6 +292,7 @@ import Pagination from '@/components/Pagination'
|
|
|
import api from '../../http/api/transaction'
|
|
|
import apiUser from '../../http/api/apiUser.js'
|
|
|
import financial from '@/http/api/financial'
|
|
|
+import { parseTime } from '@/utils'
|
|
|
|
|
|
export default {
|
|
|
components: { Pagination },
|
|
|
@@ -286,12 +308,14 @@ export default {
|
|
|
userType: "",
|
|
|
creditType: "",
|
|
|
dateRange: [],
|
|
|
+ chargingPlatform : ""
|
|
|
}
|
|
|
},
|
|
|
groupOptions: [],
|
|
|
filterOptions: [],
|
|
|
payTypeOptions: [],
|
|
|
userTypeOptions: [],
|
|
|
+ chargePlatOptions: [],
|
|
|
listLoading: true,
|
|
|
tableList: [],
|
|
|
total: 0,
|
|
|
@@ -302,12 +326,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getFilters();
|
|
|
+ this.init();
|
|
|
this.getUserTypeOption();
|
|
|
this.getPaymentTypeOption();
|
|
|
- //this.handleFilter();
|
|
|
+ this.getChargePlatformList();
|
|
|
+ this.getFilters();
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ const date = new Date();
|
|
|
+ const year = date.getFullYear();
|
|
|
+ const month = date.getMonth();
|
|
|
+ const firstDay = new Date(year, month, 1);
|
|
|
+ const lastDay = new Date(year, month + 1, 0);
|
|
|
+ this.filter.pageVo.dateRange = [
|
|
|
+ parseTime(firstDay, "{y}-{m}-{d}"),
|
|
|
+ parseTime(lastDay, "{y}-{m}-{d}")
|
|
|
+ ]
|
|
|
+ },
|
|
|
handleFilter() {
|
|
|
this.filter.pageNo = 1;
|
|
|
this.getList();
|
|
|
@@ -374,6 +410,18 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getChargePlatformList() {
|
|
|
+ financial.getChargePlatformOptions().then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.chargePlatOptions = res.data
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
getList() {
|
|
|
this.listLoading = true;
|
|
|
api.getTransactionPages(this.filter).then(res => {
|