Commit 51cc6deb authored by lixy's avatar lixy

车辆管理、用户管理

parent ed66af1f
...@@ -379,12 +379,12 @@ export const asyncRouterMap = [{ ...@@ -379,12 +379,12 @@ export const asyncRouterMap = [{
name: '车辆排班记录', name: '车辆排班记录',
authority: 'vehicleRecords' authority: 'vehicleRecords'
}, },
{ {
path: 'vehicleCount', path: 'vehicleCount',
component: _import('vehicle/vehicleCount/index'), component: _import('vehicle/vehicleCount/index'),
name: '车辆出行统计', name: '车辆出行统计',
authority: 'vehicleCount' authority: 'vehicleCount'
}, }
// { // {
// path: 'dispatchApply', // path: 'dispatchApply',
// component: _import('vehicle/dispatchApply/index'), // component: _import('vehicle/dispatchApply/index'),
...@@ -515,7 +515,7 @@ export const asyncRouterMap = [{ ...@@ -515,7 +515,7 @@ export const asyncRouterMap = [{
path:'imCustomerServiceManger', path:'imCustomerServiceManger',
component: _import('userManagement/imCustomerServiceManger/cusomterServiceList'), component: _import('userManagement/imCustomerServiceManger/cusomterServiceList'),
name:'客服列表', name:'客服列表',
authority: 'imCustomerServiceManger' authority: 'imCustomerServiceManger'
},{ },{
path: 'employeesInput', path: 'employeesInput',
component: _import('userManagement/employeesInput'), component: _import('userManagement/employeesInput'),
......
...@@ -235,10 +235,14 @@ import { staffImport } from 'src/api/admin/UserMember/index' ...@@ -235,10 +235,14 @@ import { staffImport } from 'src/api/admin/UserMember/index'
import { getAll } from 'api/base_info/branch_company' import { getAll } from 'api/base_info/branch_company'
export default { export default {
created() { created() {
this.getList() let query = localStorage.getItem("employeesInput");
this.postionsFn() if(query !="null" && query){
this.getAllFn() this.listQuery = JSON.parse(query);
this.jobsFn() }
this.getList();
this.postionsFn();
this.getAllFn();
this.jobsFn();
}, },
computed: { computed: {
...mapGetters(['elements']), ...mapGetters(['elements']),
...@@ -336,9 +340,8 @@ export default { ...@@ -336,9 +340,8 @@ export default {
getAll().then(data => { getAll().then(data => {
if (data.status == 200) { if (data.status == 200) {
this.companyList = data.data; this.companyList = data.data;
this.companyList.unshift({name:'全部',id:''}) this.companyList.unshift({name:'全部',id:''});
console.log(this.companyList);
} }
}) })
}, },
...@@ -431,26 +434,40 @@ export default { ...@@ -431,26 +434,40 @@ export default {
}) })
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val this.listQuery.limit = val;
this.getList() if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val this.listQuery.page = val;
this.getList() if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList();
}, },
//搜索 //搜索
handleFilter() { handleFilter() {
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList() this.getList()
}, },
//清空搜索条件 //清空搜索条件
cleaningQuery() { cleaningQuery() {
this.listQuery.page = 1 this.listQuery = {
this.listQuery.limit = 10 name: '',
this.listQuery.name = '' phone: '',
this.listQuery.phone = '' status: null,
this.listQuery.status = '' page: 1,
this.listQuery.companyId = '' limit: 10,
this.listQuery.companyName = '' companyId: '',
companyName: ''
};
if(this.listQuery){
localStorage.setItem("employeesInput", JSON.stringify(this.listQuery));
}
this.getList() this.getList()
}, },
//新增员工 //新增员工
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<el-button class="filter-item" style="margin-left: 10px;" @click="bulkUpload" <el-button class="filter-item" style="margin-left: 10px;" @click="bulkUpload"
type="primary" icon="edit" v-if="memberEnter_btn_addIn">批量导入会员 type="primary" icon="edit" v-if="memberEnter_btn_addIn">批量导入会员
</el-button> </el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div> </div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row <el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%"> style="width: 100%">
...@@ -302,6 +303,11 @@ ...@@ -302,6 +303,11 @@
this.memberEnter_btn_add=this.elements['memberEnter:btn_add'];//添加一条 this.memberEnter_btn_add=this.elements['memberEnter:btn_add'];//添加一条
this.memberEnter_btn_del=this.elements['memberEnter:btn_del'];//删除 this.memberEnter_btn_del=this.elements['memberEnter:btn_del'];//删除
this.memberEnter_btn_addIn=this.elements['memberEnter:btn_addIn'];//批量上传 this.memberEnter_btn_addIn=this.elements['memberEnter:btn_addIn'];//批量上传
let query = localStorage.getItem("memberEnter");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList(); this.getList();
this. getMembersLevel() this. getMembersLevel()
} , } ,
...@@ -441,7 +447,6 @@ ...@@ -441,7 +447,6 @@
* 获取用户列表 * 获取用户列表
*/ */
getList() { getList() {
let query = this.listQuery; let query = this.listQuery;
console.log(typeof this.listQuery.startTime); console.log(typeof this.listQuery.startTime);
if(this.listQuery.startTime && (typeof this.listQuery.startTime == "object")){ if(this.listQuery.startTime && (typeof this.listQuery.startTime == "object")){
...@@ -450,6 +455,9 @@ ...@@ -450,6 +455,9 @@
if(this.listQuery.endTime && (typeof this.listQuery.endTime == "object")){ if(this.listQuery.endTime && (typeof this.listQuery.endTime == "object")){
this.listQuery.endTime = this.listQuery.endTime.getTime(); this.listQuery.endTime = this.listQuery.endTime.getTime();
} }
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
getMemberEntryList(query) getMemberEntryList(query)
.then(response => { .then(response => {
let totalCountRs = undefined; let totalCountRs = undefined;
...@@ -467,6 +475,22 @@ ...@@ -467,6 +475,22 @@
this.listLoading = false; this.listLoading = false;
}) })
}, },
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
startTime: undefined,
username: undefined,
endTime: undefined,
};
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList();
},
/** /**
* 搜索 * 搜索
*/ */
...@@ -475,10 +499,16 @@ ...@@ -475,10 +499,16 @@
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("memberEnter", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
handleCreate() { handleCreate() {
......
...@@ -810,6 +810,10 @@ ...@@ -810,6 +810,10 @@
this.userList_btn_unmute = this.elements['userList:btn_unmute'];//取消禁用 this.userList_btn_unmute = this.elements['userList:btn_unmute'];//取消禁用
this.userList_btn_del = this.elements['userList:btn_del'];//删除 this.userList_btn_del = this.elements['userList:btn_del'];//删除
this.admin_btn_user_postion_put = this.elements['admin:btn:user_postion:put'];//身份设置 this.admin_btn_user_postion_put = this.elements['admin:btn:user_postion:put'];//身份设置
let query = localStorage.getItem("userList");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList(); this.getList();
this.getMembersLevel(); this.getMembersLevel();
} }
...@@ -1026,6 +1030,9 @@ ...@@ -1026,6 +1030,9 @@
*查询 *查询
*/ */
handleFilter() { handleFilter() {
if(this.listQuery){
localStorage.setItem("userList", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
} }
, ,
...@@ -1378,6 +1385,9 @@ ...@@ -1378,6 +1385,9 @@
this.listQuery.registrationTimeEnd = undefined this.listQuery.registrationTimeEnd = undefined
this.listQuery.registrationTimeBegin = undefined this.listQuery.registrationTimeBegin = undefined
this.listQuery.postionState = undefined this.listQuery.postionState = undefined
if(this.listQuery){
localStorage.setItem("userList", JSON.stringify(this.listQuery));
}
}, },
change() { change() {
this.$forceUpdate() this.$forceUpdate()
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form> </el-form>
</div> </div>
...@@ -73,19 +74,19 @@ ...@@ -73,19 +74,19 @@
highlight-current-row highlight-current-row
style="width: 100%" style="width: 100%"
> >
<el-table-column align="center" label="车牌号" width="120"> <el-table-column align="center" label="车牌号" width="110">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.numberPlate}}</span> <span>{{scope.row.numberPlate}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="申请状态"> <el-table-column align="center" label="申请状态" width="100">
<template scope="scope"> <template scope="scope">
<span>{{getBookRecordStatus(scope.row)}}</span> <span>{{getBookRecordStatus(scope.row)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="使用人/联系方式" width="250"> <el-table-column align="center" label="使用人/联系方式">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.vehicleUsername}}/{{scope.row.vehicleUserPhone}}</span> <span>{{scope.row.vehicleUsername}}/{{scope.row.vehicleUserPhone}}</span>
</template> </template>
...@@ -182,7 +183,7 @@ ...@@ -182,7 +183,7 @@
<span>{{scope.row.reviewerNameReturn}}</span> <span>{{scope.row.reviewerNameReturn}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="随车物品" width="120"> <el-table-column align="center" label="随车物品" width="120">
<template scope="scope"> <template scope="scope">
...@@ -1051,18 +1052,26 @@ export default { ...@@ -1051,18 +1052,26 @@ export default {
} }
}, },
created() { created() {
this.getList() let t = this;
getAll().then(response => { getAll().then(response => {
this.allCompaniesArr = response.data this.allCompaniesArr = response.data;
// response.data.map(function(item) { let query = localStorage.getItem("bookRecord");
// item.value = item.name if(query !="null" && query){
// this.allCompaniesArr.push(item) this.listQuery = JSON.parse(query);
// }) if(t.listQuery.liftCompany){
}) t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.liftCompany){
t.listQuery.liftCompanyName = item.name;
}
});
}
}
this.getList()
});
getAllCompany(codeAndBranchCompany => { getAllCompany(codeAndBranchCompany => {
//初始化公司列表 //初始化公司列表
this.allCompanies = codeAndBranchCompany this.allCompanies = codeAndBranchCompany
}) });
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove'] this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject'] this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook'] this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
...@@ -1098,6 +1107,26 @@ export default { ...@@ -1098,6 +1107,26 @@ export default {
} }
}, },
methods: { methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
flag: false,
zoneId: undefined,
liftCompany: undefined,
numberPlate: undefined,
selectedMonth: undefined,
status: undefined,
bookType: undefined
};
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList();
},
confirm() { confirm() {
if (this.returnForm.retCompany == '') { if (this.returnForm.retCompany == '') {
this.$notify({ this.$notify({
...@@ -1531,6 +1560,9 @@ export default { ...@@ -1531,6 +1560,9 @@ export default {
this.listQuery.page = 1 this.listQuery.page = 1
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate(valid => {
if (valid) { if (valid) {
if(this.listQuery){
localStorage.setItem("bookRecord", JSON.stringify(this.listQuery));
}
this.getList() this.getList()
} else { } else {
return false return false
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<el-button class="filter-item" type="primary" @click="downloadExcel"> <el-button class="filter-item" type="primary" @click="downloadExcel">
导出 导出
</el-button> </el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-row> </el-row>
</el-form> </el-form>
<el-table id = "out-table" :key='tableKey' :data="list" border fit highlight-current-row style="width: 100%"> <el-table id = "out-table" :key='tableKey' :data="list" border fit highlight-current-row style="width: 100%">
...@@ -69,7 +70,7 @@ ...@@ -69,7 +70,7 @@
<span>{{scope.row.departureNum}}</span> <span>{{scope.row.departureNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="提前交车"> <el-table-column width="130" align="center" label="提前交车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.beforeDepartureNum}}</span> <span>{{scope.row.beforeDepartureNum}}</span>
...@@ -80,13 +81,13 @@ ...@@ -80,13 +81,13 @@
<span>{{scope.row.actualDepartureNum}}</span> <span>{{scope.row.actualDepartureNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="延后交车"> <el-table-column width="130" align="center" label="延后交车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.afterDepartureNum}}</span> <span>{{scope.row.afterDepartureNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="应收车"> <el-table-column width="130" align="center" label="应收车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.arrivalNum}}</span> <span>{{scope.row.arrivalNum}}</span>
...@@ -98,31 +99,31 @@ ...@@ -98,31 +99,31 @@
<span>{{scope.row.beforeArrivalNum}}</span> <span>{{scope.row.beforeArrivalNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="正常收车"> <el-table-column width="130" align="center" label="正常收车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.actualArrivalNum}}</span> <span>{{scope.row.actualArrivalNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="延后收车"> <el-table-column width="130" align="center" label="延后收车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.afterArrivalNum}}</span> <span>{{scope.row.afterArrivalNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="过期未出车"> <el-table-column width="130" align="center" label="过期未出车">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.noUseNum}}</span> <span>{{scope.row.noUseNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="已取消"> <el-table-column width="130" align="center" label="已取消">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.cancelNum}}</span> <span>{{scope.row.cancelNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="130" align="center" label="日期"> <el-table-column width="130" align="center" label="日期">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.countDate}}</span> <span>{{scope.row.countDate}}</span>
...@@ -138,7 +139,7 @@ ...@@ -138,7 +139,7 @@
import XLSX from 'xlsx' import XLSX from 'xlsx'
import { import {
get,excelExport,excelDownload get,excelExport,excelDownload
} from 'api/vehicle/vehicleCount'; } from 'api/vehicle/vehicleCount';
import { formatDate,deepCopyDate,getYMD_date } from "../../../utils/dateUtils"; import { formatDate,deepCopyDate,getYMD_date } from "../../../utils/dateUtils";
export default { export default {
name: 'vehicleInfo', name: 'vehicleInfo',
...@@ -160,13 +161,28 @@ ...@@ -160,13 +161,28 @@
name: 'export' name: 'export'
} }
}, },
created() { created() {
this.handlerSearch() let query = localStorage.getItem("vehicleCount");
}, if(query !="null" && query){
computed: { this.listQuery = JSON.parse(query);
}
}, this.handlerSearch();
methods: { },
methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
type: null,
startTime: new Date(),
endTime:new Date()
};
if(this.listQuery){
localStorage.setItem("vehicleCount", JSON.stringify(this.listQuery));
}
this.handlerSearch();
},
handlerSearch() { handlerSearch() {
if (this.listQuery.startTime) { if (this.listQuery.startTime) {
this.listQuery.startTime = getYMD_date(new Date(this.listQuery.startTime)); this.listQuery.startTime = getYMD_date(new Date(this.listQuery.startTime));
...@@ -174,6 +190,9 @@ ...@@ -174,6 +190,9 @@
if(this.listQuery.endTime) { if(this.listQuery.endTime) {
this.listQuery.endTime = getYMD_date(new Date(this.listQuery.endTime)); this.listQuery.endTime = getYMD_date(new Date(this.listQuery.endTime));
} }
if(this.listQuery){
localStorage.setItem("vehicleCount", JSON.stringify(this.listQuery));
}
get(this.listQuery).then(response => { get(this.listQuery).then(response => {
if (response.status === 200) { if (response.status === 200) {
this.list = response.data this.list = response.data
...@@ -202,7 +221,7 @@ ...@@ -202,7 +221,7 @@
downloadExcel() { downloadExcel() {
var valueList = [] var valueList = []
var mapList = [] var mapList = []
this.list.forEach(v=>{ this.list.forEach(v=>{
for(let key in v) { for(let key in v) {
if(key == 'type') { if(key == 'type') {
if(v[key] == 1) { if(v[key] == 1) {
...@@ -215,7 +234,7 @@ ...@@ -215,7 +234,7 @@
mapList.push('内部用车') mapList.push('内部用车')
} }
} else { } else {
mapList.push(v[key]) mapList.push(v[key])
} }
} }
valueList.push(mapList) valueList.push(mapList)
...@@ -249,7 +268,7 @@ ...@@ -249,7 +268,7 @@
window.location.href="https://"+domain+"/vehicle/vehicleCount/app/unauth/download?path="+fileName; window.location.href="https://"+domain+"/vehicle/vehicleCount/app/unauth/download?path="+fileName;
}) })
}, },
} }
} }
</script> </script>
...@@ -55,11 +55,11 @@ ...@@ -55,11 +55,11 @@
<el-col :span="5"> <el-col :span="5">
<el-form-item> <el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div v-show="statisticVisiable"> <div v-show="statisticVisiable">
<el-row style="text-align: center;margin-top: 10px;margin-bottom: 10px"> <el-row style="text-align: center;margin-top: 10px;margin-bottom: 10px">
...@@ -295,15 +295,26 @@ ...@@ -295,15 +295,26 @@
} }
}, },
created() { created() {
const numberPlate = this.$route.query.numberPlate; let t = this;
if (numberPlate) { const numberPlate = this.$route.query.numberPlate;
this.listQuery.numberPlate = numberPlate; if (numberPlate) {
this.listQuery.numberPlate = numberPlate;
}
getAll() .then(response => {
this.allCompaniesArr = response.data;
let query = localStorage.getItem("vehicleDepartureLog");
if(query !="null" && query && !numberPlate){
this.listQuery = JSON.parse(query);
if(t.listQuery.departureId){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.departureId){
t.state1 = item.name;
}
});
}
} }
this.handleFilter(); t.handleFilter();
getAll() })
.then(response => {
this.allCompaniesArr = response.data;
})
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
...@@ -315,14 +326,35 @@ ...@@ -315,14 +326,35 @@
}, },
}, },
methods: { methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 20,
startTime: undefined,
endTime:undefined,
numberPlate: undefined,
departureId:undefined,
};
if(this.listQuery){
localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
}
this.handleFilter();
},
handleFilter() { handleFilter() {
this.getList(); if(this.listQuery){
if (this.listQuery.numberPlate) { localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
statistic({numberPlate: this.listQuery.numberPlate}).then(response => { }
this.statisticData = response.data; this.getList();
}); if (this.listQuery.numberPlate) {
this.statisticVisiable = true; statistic({numberPlate: this.listQuery.numberPlate}).then(response => {
} this.statisticData = response.data;
});
this.statisticVisiable = true;
}
}, },
dateToString: function (date) { dateToString: function (date) {
var year = date.getFullYear(); var year = date.getFullYear();
...@@ -387,12 +419,18 @@ ...@@ -387,12 +419,18 @@
} }
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
this.getList(); if(this.listQuery){
localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
}
this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); if(this.listQuery){
localStorage.setItem("vehicleDepartureLog", JSON.stringify(this.listQuery));
}
this.getList();
}, },
} }
} }
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col>--> </el-col>-->
</el-row> </el-row>
</div> </div>
</transition> </transition>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
@click="showMoreMoreCol=!showMoreMoreCol"> @click="showMoreMoreCol=!showMoreMoreCol">
更多列 更多列
</el-button> </el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">刷新</el-button> <el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div> </div>
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="80" align="center" v-if="showMoreMoreCol" label="行驶证"> <el-table-column width="80" align="center" v-if="showMoreMoreCol" label="行驶证">
...@@ -1249,12 +1249,22 @@ ...@@ -1249,12 +1249,22 @@
} }
}, },
created() { created() {
this.getList(); let t = this;
this.getAllVehicleType();//获取全部车型 getAll().then(response => {
getAll() this.allCompaniesArr = response.data;
.then(response => { let query = localStorage.getItem("vehicleInfo");
this.allCompaniesArr = response.data; if(query !="null" && query){
}) this.listQuery = JSON.parse(query);
if(t.listQuery.subordinateBranch){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.subordinateBranch){
t.state1 = item.name;
}
});
}
}
t.getAllVehicleType();//获取全部车型
});
getAllCompany(codeAndBranchCompany => { getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany; this.allCompanies = codeAndBranchCompany;
}); });
...@@ -1287,13 +1297,13 @@ ...@@ -1287,13 +1297,13 @@
} }
return getSonRegionByCodes(this.form.addrCity); return getSonRegionByCodes(this.form.addrCity);
}, },
getAllZoneList() { getAllZoneList() {
let that = this; let that = this;
that.allZoneArr = getAllZone(); that.allZoneArr = getAllZone();
return getAllZone(); return getAllZone();
}, },
townRegions4Query() { townRegions4Query() {
if (!this.$utils.isInteger(this.listQuery.addrCity)) { if (!this.$utils.isInteger(this.listQuery.addrCity)) {
return null; return null;
...@@ -1458,7 +1468,7 @@ ...@@ -1458,7 +1468,7 @@
this.cityList = cityStr; this.cityList = cityStr;
return cityStr; return cityStr;
}, },
getValue(e) { getValue(e) {
this.listQuery.addrCity = undefined; this.listQuery.addrCity = undefined;
}, },
...@@ -1466,16 +1476,29 @@ ...@@ -1466,16 +1476,29 @@
* 获取全部车型 * 获取全部车型
* */ * */
getAllVehicleType() { getAllVehicleType() {
getAllVehicleList().then(response => { let t = this;
let listRs = undefined; getAllVehicleList().then(response => {
if (!this.$utils.isEmpty(response.data)) { let listRs = undefined;
listRs = response.data; if (!this.$utils.isEmpty(response.data)) {
} listRs = response.data;
this.allVehicleList = listRs; }
}); this.allVehicleList = listRs;
let query = localStorage.getItem("vehicleInfo");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.modelId){
t.allVehicleList.map(function (item) {
if(item.id == queryJson.modelId){
t.vehicleArr = item.name;
}
});
}
}
t.getList();
});
}, },
/** /**
* 刷新 * 重置
* */ * */
reloadPage() { reloadPage() {
this.state1 = ""; this.state1 = "";
...@@ -1503,6 +1526,9 @@ ...@@ -1503,6 +1526,9 @@
notBookedEndDate: undefined, notBookedEndDate: undefined,
code: undefined code: undefined
}; };
if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
/** /**
...@@ -1991,22 +2017,35 @@ ...@@ -1991,22 +2017,35 @@
return regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' '; return regions[0].name + ' ' + regions[1].name + ' ' + regions[2].name + ' ';
}, },
handleFilter() { handleFilter() {
let t = this;
let query = localStorage.getItem("vehicleInfo");
if(query =="null" || !query){
this.listQuery.page = 1; this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => { }
if (valid) { this.$refs.queryForm.validate(valid => {
this.getList(); if (valid) {
} else { if(t.listQuery){
return false; localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
} }
}); this.getList();
} else {
return false;
}
});
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
this.getList(); if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); if(this.listQuery){
localStorage.setItem("vehicleInfo", JSON.stringify(this.listQuery));
}
this.getList();
}, },
handleCreate() { handleCreate() {
this.resetTemp(); this.resetTemp();
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
></el-autocomplete> ></el-autocomplete>
</el-form-item> </el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-row> </el-row>
<!-- <el-row> --> <!-- <el-row> -->
<!-- <el-col :span="8"> <!-- <el-col :span="8">
...@@ -90,7 +91,7 @@ ...@@ -90,7 +91,7 @@
<!-- </el-row> --> <!-- </el-row> -->
</el-form> </el-form>
</div> </div>
<el-form label-width="100px" v-if="countTJ"> <el-form label-width="100px" v-if="countTJ" style="margin: 10px 0;">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col> <el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col>
<el-col :span="5" v-for="(item, index) in countTJ" :key="item.id"> <el-col :span="5" v-for="(item, index) in countTJ" :key="item.id">
...@@ -476,12 +477,12 @@ ...@@ -476,12 +477,12 @@
} }
}, },
created() { created() {
const numberPlate = this.$route.query.numberPlate; let t = this;
if (numberPlate) { const numberPlate = this.$route.query.numberPlate;
this.listQuery.numberPlate = numberPlate; if (numberPlate) {
} this.listQuery.numberPlate = numberPlate;
this.getList(); }
this.getAllVehicleType();
let currentMonth = getCurrentMonth(); let currentMonth = getCurrentMonth();
this.currentMonth = parseInt(currentMonth); this.currentMonth = parseInt(currentMonth);
if(this.currentMonth < 12){ if(this.currentMonth < 12){
...@@ -492,10 +493,21 @@ ...@@ -492,10 +493,21 @@
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")" this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")"
this.getTempDayList(); this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000); this.mar = setInterval(this.showMarquee, 2000);
getAll() getAll().then(response => {
.then(response => { this.allCompaniesArr = response.data;
this.allCompaniesArr = response.data; let query = localStorage.getItem("vehicleSchedulManage");
}) if(query !="null" && query){
this.listQuery = JSON.parse(query);
if(t.listQuery.parkBranchCompanyId){
t.allCompaniesArr.map(function (item) {
if(item.id == t.listQuery.parkBranchCompanyId){
t.listQuery.parkBranchCompanyName = item.name;
}
});
}
}
this.getAllVehicleType();
});
getAllCompany(codeAndBranchCompany => { getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany; this.allCompanies = codeAndBranchCompany;
}); });
...@@ -512,16 +524,53 @@ ...@@ -512,16 +524,53 @@
}, },
}, },
methods: { methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 10,
parkBranchCompanyId: undefined,//停靠分公司id
parkBranchCompanyName: undefined,//停靠分公司名称
subordinateBranch: undefined,//所属分公司
subordinateBranchName: undefined,//所属分公司名称
zoneId: undefined,//所属片区
startTime: undefined,
endTime:undefined,
status: undefined,//车辆状态
useType:undefined,//用途
modelId:undefined,//车型
};
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList();
},
/** /**
* 获取全部车型 * 获取全部车型
* */ * */
getAllVehicleType() { getAllVehicleType() {
let t = this;
getAllVehicleList().then(response => { getAllVehicleList().then(response => {
let listRs = undefined; let listRs = undefined;
if (!this.$utils.isEmpty(response.data)) { if (!this.$utils.isEmpty(response.data)) {
listRs = response.data; listRs = response.data;
} }
this.allVehicleList = listRs; this.allVehicleList = listRs;
let query = localStorage.getItem("vehicleSchedulManage");
if(query !="null" && query){
let queryJson = JSON.parse(query);
if(queryJson.modelId){
t.allVehicleList.map(function (item) {
if(item.id == queryJson.modelId){
t.vehicleArr = item.name;
}
});
}
}
t.getList();
}); });
}, },
/** /**
...@@ -900,10 +949,13 @@ ...@@ -900,10 +949,13 @@
handleFilter() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;
if(this.listQuery.numberPlate==''){ if(this.listQuery.numberPlate==''){
this.listQuery.numberPlate = null; this.listQuery.numberPlate = null;
} }
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate(valid => {
if (valid) { if (valid) {
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
} else { } else {
return false; return false;
...@@ -912,10 +964,16 @@ ...@@ -912,10 +964,16 @@
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleSchedulManage", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
/** /**
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
placeholder="选择月"> placeholder="选择月">
</el-date-picker> </el-date-picker>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div> </div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row <el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%"> style="width: 100%">
...@@ -161,6 +162,7 @@ ...@@ -161,6 +162,7 @@
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
code: undefined,
selectedMonth: "", selectedMonth: "",
numberPlate: undefined numberPlate: undefined
}, },
...@@ -198,10 +200,33 @@ ...@@ -198,10 +200,33 @@
mounted() { mounted() {
this.listQuery.selectedMonth = this.$route.query.selectedMonth; this.listQuery.selectedMonth = this.$route.query.selectedMonth;
this.listQuery.numberPlate = this.$route.query.numberPlate; this.listQuery.numberPlate = this.$route.query.numberPlate;
let query = localStorage.getItem("vehicleRecords");
if(query !="null" && query && !this.$route.query.selectedMonth && !this.$route.query.numberPlate){
this.listQuery = JSON.parse(query);
}
this.getList(); this.getList();
}, },
methods: { methods: {
/**
* 重置
* */
reloadPage() {
this.listQuery = {
page: 1,
limit: 20,
selectedMonth: "",
code: undefined,
numberPlate: undefined
};
if(this.listQuery){
localStorage.setItem("vehicleRecords", JSON.stringify(this.listQuery));
}
this.getList();
},
handleFilter() { handleFilter() {
if(this.listQuery){
localStorage.setItem("vehicleRecords", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
/** /**
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
v-model="listQuery.numberPlate"></el-input> v-model="listQuery.numberPlate"></el-input>
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code" class="filter-item" placeholder="请输入车辆编码"></el-input> <el-input type="number" style="width: 200px;" v-model.number="listQuery.code" class="filter-item" placeholder="请输入车辆编码"></el-input>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</div> </div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row <el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%"> style="width: 100%">
...@@ -111,13 +112,18 @@ ...@@ -111,13 +112,18 @@
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
numberPlate: undefined numberPlate: undefined,
code: undefined
}, },
tableKey: 0, tableKey: 0,
dialogFormVisible: false dialogFormVisible: false
} }
}, },
created() { created() {
let query = localStorage.getItem("vehicleUpkeepLog");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList(); this.getList();
}, },
methods: { methods: {
...@@ -129,7 +135,23 @@ ...@@ -129,7 +135,23 @@
} }
}); });
}, },
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 20,
numberPlate: undefined,
code: undefined
};
this.handleFilter();
},
handleFilter() { handleFilter() {
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
getList() { getList() {
...@@ -142,10 +164,16 @@ ...@@ -142,10 +164,16 @@
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleUpkeepLog", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
} }
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
@click="handleCreate" @click="handleCreate"
type="primary" icon="edit">添加 type="primary" icon="edit">添加
</el-button> </el-button>
<el-button class="filter-item" type="primary" v-waves @click="reloadPage">重置</el-button>
</el-form> </el-form>
</div> </div>
...@@ -233,6 +234,10 @@ ...@@ -233,6 +234,10 @@
} }
}, },
created() { created() {
let query = localStorage.getItem("vehicleWarningMsg");
if(query !="null" && query){
this.listQuery = JSON.parse(query);
}
this.getList(); this.getList();
getAll() getAll()
.then(response => { .then(response => {
...@@ -255,6 +260,24 @@ ...@@ -255,6 +260,24 @@
]) ])
}, },
methods: { methods: {
/**
* 重置
* */
reloadPage() {
this.state1='';
this.listQuery = {
page: 1,
limit: 10,
numberPlate: undefined,
vehicleCode: undefined,
type: undefined,
colorType:undefined,
};
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList();
},
getTypeName: function(type) { getTypeName: function(type) {
if (this.$utils.isEmpty(this.vehicleWarningMsgType[type])) { if (this.$utils.isEmpty(this.vehicleWarningMsgType[type])) {
return '未知'; return '未知';
...@@ -276,8 +299,12 @@ ...@@ -276,8 +299,12 @@
}) })
}, },
handleFilter() { handleFilter() {
let t = this;
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate(valid => {
if (valid) { if (valid) {
if(t.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(t.listQuery));
}
this.getList(); this.getList();
} else { } else {
return false; return false;
...@@ -286,10 +313,16 @@ ...@@ -286,10 +313,16 @@
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
if(this.listQuery){
localStorage.setItem("vehicleWarningMsg", JSON.stringify(this.listQuery));
}
this.getList(); this.getList();
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment