Commit 12a0da55 authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents 0828e966 51039a4a
import fetch from 'utils/fetch';
/**
* 获取列表
* @param query
*/
export function getPushList(query) {
return fetch({
url: '/api/universal/jpush/list',
method: 'Get',
params: query
});
}
/**
* 系统发送类型
* @param query
*/
export function getSendTypeList() {
return fetch({
url: '/api/universal/jpush/sendTpyes',
method: 'Get',
});
}
/**
* 跳转页面类型
* @param query
*/
export function getJumpTypeList() {
return fetch({
url: '/api/universal/jpush/jumpTpyes',
method: 'Get',
});
}
/**
* 获取弹窗管理列表某一条数据
* @param query
*/
export function getObj(id) {
return fetch({
url: '/api/universal/jpush/getOne/'+id,
method: 'Get'
})
}
/**
* 弹窗管理--添加
* @param query
*/
export function addObj(obj) {
return fetch({
url: '/api/universal/jpush/addMessagePush',
method: 'post',
data: obj
});
}
/**
* 编辑某一条数据,上下架
* @param query
*/
export function editObj(data) {
return fetch({
url: '/api/universal/jpush/udpMessagePush',
method: 'post',
data: data
})
}
/**
* 删除数据
* @param query
*/
export function delObj(id) {
return fetch({
url: '/api/universal/jpush/del/' + id,
method: 'delete',
})
}
/**
* 立即推送
* @param query
*/
export function pushStype(query) {
return fetch({
url: '/api/universal/jpush/stype',
method: 'Get',
params: query
});
}
...@@ -63,6 +63,7 @@ export function getBookedInfo(vehicleId, yearMonth) { ...@@ -63,6 +63,7 @@ export function getBookedInfo(vehicleId, yearMonth) {
method: 'get' method: 'get'
}); });
} }
/* /*
* 根据id获取片区下省份 * 根据id获取片区下省份
* */ * */
...@@ -89,3 +90,11 @@ export function editObj(param) { ...@@ -89,3 +90,11 @@ export function editObj(param) {
data: param data: param
}); });
} }
//检查车辆编码是否存在
export function checkCode(code, id) {
return fetch({
url: '/vehicle/vehicleInfo/exist_code/' + code + '?id=' + id,
method: 'get'
});
}
...@@ -334,7 +334,7 @@ export const asyncRouterMap = [{ ...@@ -334,7 +334,7 @@ export const asyncRouterMap = [{
{ {
path: 'bookRecord', path: 'bookRecord',
component: _import('vehicle/bookRecord/index'), component: _import('vehicle/bookRecord/index'),
name: '车辆申请管理', name: '车辆排班管理',
authority: 'bookRecord' authority: 'bookRecord'
}, },
{ {
...@@ -364,7 +364,7 @@ export const asyncRouterMap = [{ ...@@ -364,7 +364,7 @@ export const asyncRouterMap = [{
{ {
path: 'vehicleSchedulManage', path: 'vehicleSchedulManage',
component: _import('vehicle/vehicleSchedulManage/index'), component: _import('vehicle/vehicleSchedulManage/index'),
name: '车辆排班管理', name: '车辆排班',
authority: 'vehicleSchedulManage' authority: 'vehicleSchedulManage'
}, },
{ {
...@@ -519,6 +519,12 @@ export const asyncRouterMap = [{ ...@@ -519,6 +519,12 @@ export const asyncRouterMap = [{
component: _import('appManagement/selectedActivities/index'), component: _import('appManagement/selectedActivities/index'),
name: '首页精选活动', name: '首页精选活动',
authority: 'selectedActivities' authority: 'selectedActivities'
},
{
path: 'pushManagement',
component: _import('appManagement/pushManagement/index'),
name: '消息推送',
authority: 'pushManagement'
} }
] ]
}, },
......
This diff is collapsed.
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
:value="val.code"></el-option> :value="val.code"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车辆编码">
<el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item>
<el-form-item label="车牌号"> <el-form-item label="车牌号">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌号"></el-input> <el-input v-model="listQuery.numberPlate" placeholder="请输入车牌号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用途"> <el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.bookType" placeholder="请选择"> <el-select class="filter-item" v-model="listQuery.bookType" placeholder="请选择">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
...@@ -55,15 +57,9 @@ ...@@ -55,15 +57,9 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" label="停靠公司" width="120">
<template scope="scope">
<span>{{scope.row.liftCompanyName}}</span>
</template>
</el-table-column> -->
<el-table-column align="center" label="申请状态"> <el-table-column align="center" label="申请状态">
<template scope="scope"> <template scope="scope">
<span>{{getBookRecordStatus(scope.row.status)}}</span> <span>{{getBookRecordStatus(scope.row)}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -230,12 +226,11 @@ ...@@ -230,12 +226,11 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="申请状态"> <el-form-item label="申请状态">
<span v-if="detailItem.status==1">申请中</span> <span v-if="detailItem.status==1">申请中</span>
<span v-if="detailItem.status==2">已通过</span> <span v-if="detailItem.status==3">待出行</span>
<span v-if="detailItem.status==3">已归还</span> <span v-if="detailItem.status==4">驳回</span>
<span v-if="detailItem.status==4">拒绝</span> <span v-if="detailItem.status==5">出行中</span>
<span v-if="detailItem.status==5">逾期归还</span>
<span v-if="detailItem.status==6">取消预订</span> <span v-if="detailItem.status==6">取消预订</span>
<span v-if="detailItem.status==7">提车</span> <span v-if="detailItem.status==7">完成</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -718,27 +713,22 @@ ...@@ -718,27 +713,22 @@
trigger: 'blur' trigger: 'blur'
} }
}, },
departurePicList:[],
statusList:[ statusList:[
{ {
code:'1', code:'1',
val:'申请中' val:'申请中'
}, },
{
code:'2',
val:'已通过'
},
{ {
code:'3', code:'3',
val:'已归还' val:'待出行'
}, },
{ {
code:'4', code:'4',
val:'拒绝' val:'驳回'
}, },
{ {
code:'5', code:'5',
val:'逾期归还' val:'出行中'
}, },
{ {
code:'6', code:'6',
...@@ -746,7 +736,7 @@ ...@@ -746,7 +736,7 @@
}, },
{ {
code:'7', code:'7',
val:'已提车' val:'已完成'
}, },
], ],
bookTypeList:[ bookTypeList:[
...@@ -1260,13 +1250,31 @@ ...@@ -1260,13 +1250,31 @@
this.listLoading = false; this.listLoading = false;
}) })
}, },
getBookRecordStatus: function (code) { getBookRecordStatus: function (data) {
if (!this.$utils.isInteger(code)) { this.bookRecordStatus['3'].val = '待出行'
this.bookRecordStatus['4'].val = '驳回'
this.bookRecordStatus['5'].val = '出行中'
this.bookRecordStatus['7'].val = '已完成'
if(data) {
if (!this.$utils.isInteger(data.status)) {
return '未知'; return '未知';
} }
return this.bookRecordStatus[code + ''].val; if(data.status == 2 && (data.vehicleDepartureLogVo == undefined || data.vehicleDepartureLogVo == null)) {
return this.bookRecordStatus['3'].val;
}
if(data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 0) {
return this.bookRecordStatus['5'].val;
}
if(data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 1) {
return this.bookRecordStatus['7'].val;
}
return this.bookRecordStatus[data.status + ''].val;
}
return '';
}, },
getAllBookRecordStatus: function () { getAllBookRecordStatus: function () {
console.log(this.bookRecordStatus)
return this.bookRecordStatus; return this.bookRecordStatus;
}, },
getDatePeriodStr([startDate, endDate]) { getDatePeriodStr([startDate, endDate]) {
......
...@@ -3,25 +3,44 @@ ...@@ -3,25 +3,44 @@
<div class="filter-container"> <div class="filter-container">
<el-form> <el-form>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="5">
<el-form-item> <el-form-item>
<el-date-picker <el-date-picker
v-model="listQuery.time" v-model="listQuery.time"
type="date" type="date"
:editable="false" :editable="false"
format="yyyy-MM-dd" format="yyyy-MM-dd"
prop = "time" prop="time"
placeholder="请选择日期"> placeholder="请选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="5">
<el-form-item > <el-form-item>
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code"
placeholder="请输入车辆编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item>
<el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="车牌号" <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="车牌号"
v-model="listQuery.numberPlate"></el-input> v-model="listQuery.numberPlate"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> </el-row>
<el-row>
<el-col :span="5">
<el-form-item label="分公司" prop="departureId">
<el-autocomplete
class="inline-input"
v-model="state1"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
</el-col>
<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-form-item> </el-form-item>
...@@ -121,25 +140,25 @@ ...@@ -121,25 +140,25 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="使用人电话" v-if="showMoreMoreCol" > <el-table-column width="200" align="center" label="使用人电话" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.userTel}}</span> <span>{{scope.row.userTel}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="验车人电话" v-if="showMoreMoreCol" > <el-table-column width="200" align="center" label="验车人电话" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.checkManTel}}</span> <span>{{scope.row.checkManTel}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="开始公里数" v-if="showMoreMoreCol" > <el-table-column width="100" align="center" label="开始公里数" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.mileageStart}}</span> <span>{{scope.row.mileageStart}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="结束公里数" v-if="showMoreMoreCol" > <el-table-column width="100" align="center" label="结束公里数" v-if="showMoreMoreCol">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.mileageEnd}}</span> <span>{{scope.row.mileageEnd}}</span>
</template> </template>
...@@ -182,11 +201,22 @@ ...@@ -182,11 +201,22 @@
page, page,
statistic statistic
} from '../../../api/vehicle/departureLog'; } from '../../../api/vehicle/departureLog';
import {
getAllCompany,
getAll
} from 'api/base_info/branch_company/';
import {
getAllZone
} from 'api/base_info/constant/';
import {
getAllBranchCompanyByZoneId
} from 'api/order/rentVehicle';
import { import {
toEast8Date, toEast8Date,
deepCopyDate, deepCopyDate,
newEast8Date newEast8Date
} from 'utils/dateUtils'; } from 'utils/dateUtils';
export default { export default {
name: 'vehicleDepartureLog', name: 'vehicleDepartureLog',
data() { data() {
...@@ -207,7 +237,9 @@ ...@@ -207,7 +237,9 @@
arrivalTime: null, arrivalTime: null,
mileageStart: null, mileageStart: null,
mileageEnd: null, mileageEnd: null,
state: null state: null,
allCompaniesArr:[],
selectArry: [],
}, },
rules: { rules: {
name: [ name: [
...@@ -221,11 +253,18 @@ ...@@ -221,11 +253,18 @@
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
allBranchCompany:[],
baranchQuery: {
zoneId:null
},
allZoneArr:[],//全部片区
state1:'',
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
time: "", time: "",
numberPlate: undefined numberPlate: undefined,
departureId:undefined,
}, },
dialogStatus: '', dialogStatus: '',
textMap: { textMap: {
...@@ -248,11 +287,19 @@ ...@@ -248,11 +287,19 @@
this.listQuery.numberPlate = numberPlate; this.listQuery.numberPlate = numberPlate;
} }
this.handleFilter(); this.handleFilter();
getAll()
.then(response => {
this.allCompaniesArr = response.data;
})
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'elements' 'elements'
]) ]),
//获取大区列表
getAllZoneList() {
return getAllZone();
},
}, },
methods: { methods: {
handleFilter() { handleFilter() {
...@@ -264,9 +311,9 @@ ...@@ -264,9 +311,9 @@
this.statisticVisiable = true; this.statisticVisiable = true;
} }
}, },
dateToString: function(date){ dateToString: function (date) {
var year = date.getFullYear(); var year = date.getFullYear();
var month =(date.getMonth() + 1).toString(); var month = (date.getMonth() + 1).toString();
var day = (date.getDate()).toString(); var day = (date.getDate()).toString();
if (month.length == 1) { if (month.length == 1) {
month = "0" + month; month = "0" + month;
...@@ -282,9 +329,12 @@ ...@@ -282,9 +329,12 @@
if (!this.listQuery.numberPlate) { if (!this.listQuery.numberPlate) {
this.statisticVisiable = false; this.statisticVisiable = false;
} }
if(this.listQuery.time){ if (this.listQuery.time) {
this.listQuery.time = this.dateToString(this.listQuery.time); this.listQuery.time = this.dateToString(this.listQuery.time);
} }
if (!this.state1) {
this.listQuery.departureId = undefined;
}
page(this.listQuery) page(this.listQuery)
.then(response => { .then(response => {
this.list = response.data.list; this.list = response.data.list;
...@@ -292,6 +342,34 @@ ...@@ -292,6 +342,34 @@
this.listLoading = false; this.listLoading = false;
}) })
}, },
querySearch(queryString, cb) {
let selectArry = [];
let iitem = {
value: "全部",
name: "全部"
};
selectArry.push(iitem);
this.allCompaniesArr.map(function (item) {
item.value = item.name;
selectArry.push(item);
});
this.selectArry = selectArry;
var results = queryString ? selectArry.filter(this.createFilter(queryString)) : selectArry;
// 调用 callback 返回建议列表的数据
cb(results);
},
createFilter(queryString) {
return (restaurant) => {
return (restaurant.name.indexOf(queryString.toLowerCase()) != -1);
};
},
handleSelect(item) {
if (item.value == "全部") {
this.listQuery.departureId = undefined;
} else {
this.listQuery.departureId = item.id;
}
},
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
this.getList(); this.getList();
...@@ -299,7 +377,7 @@ ...@@ -299,7 +377,7 @@
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
} },
} }
} }
</script> </script>
This diff is collapsed.
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
<el-form-item label="车牌"> <el-form-item label="车牌">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌"></el-input> <el-input v-model="listQuery.numberPlate" placeholder="请输入车牌"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="车辆编码">
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item>
<el-form-item label="用途"> <el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.useType" placeholder="请选择用途"> <el-select class="filter-item" v-model="listQuery.useType" placeholder="请选择用途">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
...@@ -473,6 +476,10 @@ ...@@ -473,6 +476,10 @@
} }
}, },
created() { created() {
const numberPlate = this.$route.query.numberPlate;
if (numberPlate) {
this.listQuery.numberPlate = numberPlate;
}
this.getList(); this.getList();
this.getAllVehicleType(); this.getAllVehicleType();
let currentMonth = getCurrentMonth(); let currentMonth = getCurrentMonth();
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="filter-container"> <div class="filter-container">
<el-input style="width: 200px;" placeholder="车牌号" <el-input style="width: 200px;" placeholder="车牌号"
v-model="listQuery.numberPlate"></el-input> v-model="listQuery.numberPlate"></el-input>
<el-input type="number" style="width: 200px;" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
<el-date-picker <el-date-picker
v-model="listQuery.selectedMonth" v-model="listQuery.selectedMonth"
type="month" type="month"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<div class="filter-container"> <div class="filter-container">
<el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="车牌号" <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="车牌号"
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-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>
</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
......
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