Commit 432d95cf authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 7474fa8b e18ff9e6
...@@ -418,10 +418,12 @@ ...@@ -418,10 +418,12 @@
let arr = info.images.split(",");//图片 let arr = info.images.split(",");//图片
let temp = []; let temp = [];
for(let i = 0; i < arr.length; i++){ for(let i = 0; i < arr.length; i++){
let p = { if(arr[i]){
url: arr[i] let p = {
url: arr[i]
}
temp.push(p);
} }
temp.push(p);
} }
t.fileList2 = temp; t.fileList2 = temp;
this.activeName2 = "first"; this.activeName2 = "first";
...@@ -466,7 +468,7 @@ ...@@ -466,7 +468,7 @@
}); });
return; return;
} }
if(!this.form.images){ if(this.fileList2.length<=0){
this.tabName = "second"; this.tabName = "second";
this.$notify({ this.$notify({
title: '警告', title: '警告',
......
...@@ -2,40 +2,39 @@ ...@@ -2,40 +2,39 @@
<div class="app-container calendar-list-container"> <div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container"> <div class="filter-container" ref="filter-container">
<el-form :rules="rules4Query" ref="queryForm" :inline="inline" :model="listQuery"> <el-form :rules="rules4Query" ref="queryForm" :inline="inline" :model="listQuery">
<el-form-item label="用车状态"> <el-form-item label="申请状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择用车状态"> <el-select class="filter-item" v-model="listQuery.status" placeholder="请选择申请状态">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in statusList " :key="val.code" :label="val.val" <el-option v-for="(val, key, index) in statusList " :key="val.code" :label="val.val"
: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-form-item label="车辆编码">
<el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input> <el-input type="number" v-model.number="listQuery.code" placeholder="请输入车辆编码"></el-input>
</el-form-item> </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>
<el-option v-for="val in bookTypeList" :key="val.id" :label="val.name" :value="val.id"></el-option> <el-option v-for="val in bookTypeList" :key="val.id" :label="val.name" :value="val.id"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属大区"> <el-form-item label="所属大区">
<el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions"> <el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option> <el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提车公司"> <el-form-item label="提车公司">
<el-select class="filter-item" v-model="listQuery.liftCompany" placeholder="请选择" <el-select class="filter-item" v-model="listQuery.liftCompany" placeholder="请选择" @change="getAllBranchCompanyChange">
@change="getAllBranchCompanyChange">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"></el-option> <el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="预订月份" prop="selectedMonth4Query"> <el-form-item label="预订月份" prop="selectedMonth4Query">
<el-date-picker <el-date-picker
v-model="selectedMonth4Query" v-model="selectedMonth4Query"
...@@ -52,14 +51,13 @@ ...@@ -52,14 +51,13 @@
<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%">
<el-table-column align="center" label="车牌号(车序)" width="150"> <el-table-column align="center" label="车牌号" width="120">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.numberPlate}}</span><span v-if="scope.row.code!=0">({{scope.row.code}})</span><span <span>{{scope.row.numberPlate}}</span>
v-if="scope.row.code==0">(无)</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="120" label="用车状态"> <el-table-column align="center" label="申请状态">
<template scope="scope"> <template scope="scope">
<span>{{getBookRecordStatus(scope.row)}}</span> <span>{{getBookRecordStatus(scope.row)}}</span>
</template> </template>
...@@ -84,7 +82,7 @@ ...@@ -84,7 +82,7 @@
<span v-if="scope.row.bookType==10">其他</span> <span v-if="scope.row.bookType==10">其他</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="预定时间" width="310"> <el-table-column align="center" label="预定时间" width="220">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.bookStartDate}}{{scope.row.bookEndDate}}</span> <span>{{scope.row.bookStartDate}}{{scope.row.bookEndDate}}</span>
</template> </template>
...@@ -187,39 +185,25 @@ ...@@ -187,39 +185,25 @@
<span>{{scope.row.haveViolation?'是':'否'}}</span> <span>{{scope.row.haveViolation?'是':'否'}}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column align="center" label="详情" width="100" fixed="right"> <el-table-column align="center" label="详情" width="100" fixed="right">
<template scope="scope"> <template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleDetail(scope.row)">用车详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleDetail(scope.row)">订单详情</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="200" fixed="right"> <el-table-column align="center" label="操作" width="200" fixed="right">
<template scope="scope"> <template scope="scope">
<!-- <el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button> --> <!-- <el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button> -->
<el-button size="small" class="el-button el-button--text el-button--small" v-if="scope.row.status==3" <el-button size="small" class="el-button el-button--text el-button--small" v-if="scope.row.status==3" @click="illegalInquiry(scope.row)">违章记录</el-button>
@click="illegalInquiry(scope.row)">违章记录 <el-button v-if="bookRecord_btn_prove&&scope.row.status==1" size="small" class="el-button el-button--text el-button--small" @click="handleProve(scope.row)">通过</el-button>
</el-button> <el-button v-if="bookRecord_btn_reject&&scope.row.status==1" size="small" class="el-button el-button--text el-button--small" style="color: red;" @click="handleReject(scope.row)">驳回</el-button>
<el-button v-if="bookRecord_btn_prove&&scope.row.status==1" size="small"
class="el-button el-button--text el-button--small" @click="handleProve(scope.row)">通过
</el-button>
<el-button v-if="bookRecord_btn_reject&&scope.row.status==1" size="small"
class="el-button el-button--text el-button--small" style="color: red;"
@click="handleReject(scope.row)">驳回
</el-button>
<template v-if="scope.row.vehicleDepartureLogVo==undefined"> <template v-if="scope.row.vehicleDepartureLogVo==undefined">
<el-button v-if="bookRecord_btn_lift&&scope.row.liftStatus==1&&scope.row.status==2" size="small" <el-button v-if="bookRecord_btn_lift&&scope.row.liftStatus==1&&scope.row.status==2" size="small" class="el-button el-button--text el-button--small" @click="handleLift(scope.row)">出车</el-button>
class="el-button el-button--text el-button--small" @click="handleLift(scope.row)">出车
</el-button>
</template> </template>
<template v-if="scope.row.vehicleDepartureLogVo!=undefined"> <template v-if="scope.row.vehicleDepartureLogVo!=undefined">
<el-button v-if="bookRecord_btn_ret&&scope.row.vehicleDepartureLogVo.state==0&&scope.row.retStatus==1" <el-button v-if="bookRecord_btn_ret&&scope.row.vehicleDepartureLogVo.state==0&&scope.row.retStatus==1" size="small" class="el-button el-button--text el-button--small" @click="handleRet(scope.row)">收车</el-button>
size="small" class="el-button el-button--text el-button--small" @click="handleRet(scope.row)">收车
</el-button>
</template> </template>
<template v-if="scope.row.vehicleDepartureLogVo==undefined"> <template v-if="scope.row.vehicleDepartureLogVo==undefined">
<el-button v-if="bookRecord_btn_unbook&&scope.row.status==2" size="small" <el-button v-if="bookRecord_btn_unbook&&scope.row.status==2" size="small" class="el-button el-button--text el-button--small" style="color: red;" @click="handleUnbook(scope.row)">取消预定</el-button>
class="el-button el-button--text el-button--small" style="color: red;"
@click="handleUnbook(scope.row)">取消预定
</el-button>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
...@@ -240,7 +224,7 @@ ...@@ -240,7 +224,7 @@
<el-form label-width="100px"> <el-form label-width="100px">
<el-row> <el-row>
<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==3">待出行</span> <span v-if="detailItem.status==3">待出行</span>
<span v-if="detailItem.status==4">驳回</span> <span v-if="detailItem.status==4">驳回</span>
...@@ -257,8 +241,8 @@ ...@@ -257,8 +241,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="车辆编"> <el-form-item label="车辆编">
<span>{{detailItem.code}}</span> <span>{{detailItem.vehicleId}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="7"> <!-- <el-col :span="7">
...@@ -287,7 +271,7 @@ ...@@ -287,7 +271,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="预定时间"> <el-form-item label="预定时间">
<span>{{detailItem.bookStartDate}}</span><span>{{detailItem.bookEndDate}}</span> <span>{{detailItem.bookStartDate}}</span> <span>{{detailItem.bookEndDate}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -345,11 +329,9 @@ ...@@ -345,11 +329,9 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-left: 20px;" v-if="departurePicList.length>0"> <el-row style="margin-left: 20px;" v-if="departurePicList.length>0">
<el-col :span="3" v-for="(item, index) in departurePicList" :key="index" :offset="index%6 > 0 ? 1 : 0" <el-col :span="3" v-for="(item, index) in departurePicList" :key="index" :offset="index%6 > 0 ? 1 : 0" style="margin-bottom:10px">
style="margin-bottom:10px">
<el-card> <el-card>
<img :src="item" class="image" :class="imgStyle" @mouseover="setImgStyle('show')" <img :src="item" class="image">
@mouseout="setImgStyle('hide')">
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -378,9 +360,8 @@ ...@@ -378,9 +360,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-left: 20px;" v-if="arrivalPicList.length>0"> <el-row style="margin-left: 20px;" v-if="arrivalPicList.length>0">
<el-col :span="3" v-for="(item, index) in arrivalPicList" :key="index" :offset="index%6 > 0 ? 1 : 0" <el-col :span="3" v-for="(item, index) in arrivalPicList" :key="index" :offset="index%6 > 0 ? 1 : 0" style="margin-bottom:10px">
style="margin-bottom:10px">
<el-card> <el-card>
<img :src="item" class="image"> <img :src="item" class="image">
</el-card> </el-card>
...@@ -393,11 +374,11 @@ ...@@ -393,11 +374,11 @@
<span>{{detailItem.reviewerNameApply}}</span> <span>{{detailItem.reviewerNameApply}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="8">--> <el-col :span="8">
<!-- <el-form-item label="通过操作">--> <el-form-item label="通过操作">
<!-- <span></span>--> <span></span>
<!-- </el-form-item>--> </el-form-item>
<!-- </el-col>--> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -563,12 +544,10 @@ ...@@ -563,12 +544,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col> <el-col>
<el-form-item label="违章罚款"> <el-form-item label="违章罚款">
<el-input v-model="price" type="number" placeholder="请输入违章罚款金额" <el-input v-model="price" type="number" placeholder="请输入违章罚款金额" style="width: 50%;margin-right:10px"></el-input>
style="width: 50%;margin-right:10px"></el-input> </el-form-item>
</el-col>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -601,10 +580,10 @@ ...@@ -601,10 +580,10 @@
getAll getAll
} from 'api/base_info/branch_company/'; } from 'api/base_info/branch_company/';
import { import {
getAllZone getAllZone
} from 'api/base_info/constant/'; } from 'api/base_info/constant/';
import { import {
getAllBranchCompanyByZoneId getAllBranchCompanyByZoneId
} from 'api/order/rentVehicle'; } from 'api/order/rentVehicle';
import { import {
formatDate formatDate
...@@ -639,14 +618,13 @@ ...@@ -639,14 +618,13 @@
}, },
data() { data() {
return { return {
imgStyle: false, rejectVisible:false,
rejectVisible: false, rejectFrom:{
rejectFrom: { vehicleBookRecordId:'',
vehicleBookRecordId: '', rejectRemark:''
rejectRemark: ''
}, },
rejectRules: { rejectRules:{
rejectRemark: { rejectRemark:{
type: "string", type: "string",
required: true, required: true,
message: "请输入拒绝原因", message: "请输入拒绝原因",
...@@ -654,13 +632,13 @@ ...@@ -654,13 +632,13 @@
} }
}, },
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
departureFormrules: { departureFormrules:{
checkMan: { checkMan:{
required: true, required: true,
message: '请输入验车人', message: '请输入验车人',
trigger: 'blur' trigger: 'blur'
}, },
checkManTel: [ checkManTel:[
{ {
required: true, required: true,
message: '请输入验车人联系方式', message: '请输入验车人联系方式',
...@@ -671,14 +649,14 @@ ...@@ -671,14 +649,14 @@
message: '请输入正确的手机号' message: '请输入正确的手机号'
} }
], ],
mileage: { mileage:{
type: "number", type:"number",
required: true, required: true,
message: '请输入公里数', message: '请输入公里数',
trigger: 'blur' trigger: 'blur'
} }
}, },
departureForm: { departureForm:{
vehicleId: null, vehicleId: null,
departureBranchCompanyId: null,//出发地分公司id departureBranchCompanyId: null,//出发地分公司id
departureBranchCompanyName: '',//出发地分公司名称 departureBranchCompanyName: '',//出发地分公司名称
...@@ -691,14 +669,14 @@ ...@@ -691,14 +669,14 @@
numberPlate: null, numberPlate: null,
expectArrivalBranchCompanyId: null,//目的地分公司id expectArrivalBranchCompanyId: null,//目的地分公司id
expectArrivalBranchCompanyName: '',//目的地分公司名称 expectArrivalBranchCompanyName: '',//目的地分公司名称
bookRecordId: null, bookRecordId:null,
departurePic: '', departurePic:'',
remark: null, remark:null,
bookStartDate: null, bookStartDate: null,
}, },
departurePicList: [], departurePicList:[],
arrivalPicList: [], arrivalPicList:[],
arrivalForm: { arrivalForm:{
vehicleId: null, vehicleId: null,
numberPlate: null, numberPlate: null,
arrivalDate: null, arrivalDate: null,
...@@ -707,17 +685,17 @@ ...@@ -707,17 +685,17 @@
mileage: null, mileage: null,
arrivalBranchCompanyId: null, arrivalBranchCompanyId: null,
arrivalBranchCompanyName: '', arrivalBranchCompanyName: '',
arrivalPic: '', arrivalPic:'',
remark: '', remark:'',
bookRecordId: null, bookRecordId:null,
}, },
arrivalFormrules: { arrivalFormrules:{
recycleMan: { recycleMan:{
required: true, required: true,
message: '请输入收车人', message: '请输入收车人',
trigger: 'blur' trigger: 'blur'
}, },
recycleManTel: [ recycleManTel:[
{ {
required: true, required: true,
message: '请输入收车人联系方式', message: '请输入收车人联系方式',
...@@ -728,106 +706,108 @@ ...@@ -728,106 +706,108 @@
message: '请输入正确的手机号' message: '请输入正确的手机号'
} }
], ],
mileage: { mileage:{
type: "number", type:"number",
required: true, required: true,
message: '请输入收车公里数', message: '请输入收车公里数',
trigger: 'blur' trigger: 'blur'
} }
}, },
statusList: [ statusList:[
{ {
code: '1', code:'1',
val: '申请中' val:'申请中'
}, },
{ {
code: '3', code:'3',
val: '待出行' val:'待出行'
}, },
{ {
code: '4', code:'4',
val: '驳回' val:'驳回'
}, },
{ {
code: '5', code:'5',
val: '出行中' val:'出行中'
}, },
{ {
code: '6', code:'6',
val: '取消预订' val:'取消预订'
}, },
{ {
code: '7', code:'7',
val: '已完成' val:'已完成'
}, },
], ],
bookTypeList: [ bookTypeList:[
{ {
id: '1', id:'1',
name: '租车' name:'租车'
}, },
{ {
id: '2', id:'2',
name: '用户租赁' name:'用户租赁'
}, },
{ {
id: '3', id:'3',
name: '维修' name:'维修'
}, },
{ {
id: '4', id:'4',
name: '展览' name:'展览'
}, },
{ {
id: '5', id:'5',
name: '旅游' name:'旅游'
}, },
{ {
id: '6', id:'6',
name: '保养' name:'保养'
}, },
{ {
id: '7', id:'7',
name: '预约中' name:'预约中'
}, },
{ {
id: '8', id:'8',
name: '禁用' name:'禁用'
}, },
{ {
id: '9', id:'9',
name: '客户用车' name:'客户用车'
}, },
{ {
id: '10', id:'10',
name: '其他' name:'其他'
} }
], ],
detailId: '', detailId:'',
illegalVisible: false, illegalVisible:false,
price: undefined,//违章罚款金额 price: undefined,//违章罚款金额
fileList2: [],//违章截图 fileList2:[],//违章截图
detailItem: {}, detailItem:{},
dialogDetailVisible: false, dialogDetailVisible:false,
baranchQuery: { baranchQuery: {
zoneId: null zoneId:null
}, },
allZoneArr: [],//全部片区 allZoneArr:[],//全部片区
allBranchCompany: [], allBranchCompany:[],
state2: '',//搜索-分公司名称 state2: '',//搜索-分公司名称
rules4Query: {}, rules4Query: {
},
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
zoneId: undefined, zoneId:undefined,
liftCompany: undefined, liftCompany: undefined,
numberPlate: undefined, numberPlate: undefined,
selectedMonth: undefined, selectedMonth: undefined,
status: undefined, status: undefined,
bookType: undefined bookType:undefined
}, },
inline: true, inline: true,
dialogFormVisible: false, dialogFormVisible: false,
...@@ -965,9 +945,9 @@ ...@@ -965,9 +945,9 @@
return {Authorization: getToken()}; return {Authorization: getToken()};
}, },
//获取大区列表 //获取大区列表
getAllZoneList() { getAllZoneList(){
return getAllZone(); return getAllZone();
}, },
selectedMonth4Query: { selectedMonth4Query: {
get: function () { get: function () {
if (this.$utils.isString(this.listQuery.selectedMonth) && this.listQuery.selectedMonth !== '') { if (this.$utils.isString(this.listQuery.selectedMonth) && this.listQuery.selectedMonth !== '') {
...@@ -990,12 +970,12 @@ ...@@ -990,12 +970,12 @@
* */ * */
okHandler() { okHandler() {
let arr = []; let arr = [];
this.fileList2.map(function (item) { this.fileList2.map(function(item){
arr.push(item.url); arr.push(item.url);
}); });
let params = { let params = {
illegalPic: arr.join(","), illegalPic:arr.join(","),
illegalAmount: this.price, illegalAmount:this.price,
id: this.detailId, id: this.detailId,
}; };
saveOrderViolation(params).then(response => { saveOrderViolation(params).then(response => {
...@@ -1018,7 +998,7 @@ ...@@ -1018,7 +998,7 @@
} }
}); });
}, },
/** /**
* 上传成功 * 上传成功
* */ * */
handleSuccess(res, file) { handleSuccess(res, file) {
...@@ -1029,10 +1009,10 @@ ...@@ -1029,10 +1009,10 @@
/** /**
* 删除违章图片 * 删除违章图片
* */ * */
handleRemove(file, fileList1) { handleRemove(file, fileList1){
this.fileList2 = fileList1; this.fileList2 = fileList1;
}, },
/** /**
* 出车上传成功 * 出车上传成功
* */ * */
handleDepartureSuccess(res, file) { handleDepartureSuccess(res, file) {
...@@ -1043,10 +1023,10 @@ ...@@ -1043,10 +1023,10 @@
/** /**
* 删除出车图片 * 删除出车图片
* */ * */
handleDepartureRemove(file, fileList2) { handleDepartureRemove(file, fileList2){
this.departurePicList = fileList2; this.departurePicList = fileList2;
}, },
/** /**
* 上传成功 * 上传成功
* */ * */
handleArrivalSuccess(res, file) { handleArrivalSuccess(res, file) {
...@@ -1057,21 +1037,21 @@ ...@@ -1057,21 +1037,21 @@
/** /**
* 删除违章图片 * 删除违章图片
* */ * */
handleArrivalRemove(file, fileList3) { handleArrivalRemove(file, fileList3){
this.arrivalPicList = fileList3; this.arrivalPicList = fileList3;
}, },
/** /**
* 操作-违章查询按钮,显示违章弹框 * 操作-违章查询按钮,显示违章弹框
*/ */
illegalInquiry(row) { illegalInquiry(row){
var t = this; var t = this;
this.fileList2 = []; this.fileList2 = [];
this.price = ''; this.price = '';
if (row.vehicleDepartureLogVo.illegalPic) { if(row.vehicleDepartureLogVo.illegalPic){
let arr = row.vehicleDepartureLogVo.illegalPic.split(","); let arr = row.vehicleDepartureLogVo.illegalPic.split(",");
let fileList2 = []; let fileList2 = [];
let p = {}; let p = {};
arr.map(function (item) { arr.map(function(item){
p = { p = {
url: item url: item
}; };
...@@ -1079,7 +1059,7 @@ ...@@ -1079,7 +1059,7 @@
}); });
t.fileList2 = fileList2; t.fileList2 = fileList2;
} }
if (row.vehicleDepartureLogVo.illegalAmount) { if(row.vehicleDepartureLogVo.illegalAmount){
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount); t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount);
} }
this.detailId = row.vehicleDepartureLogVo.id; this.detailId = row.vehicleDepartureLogVo.id;
...@@ -1091,51 +1071,51 @@ ...@@ -1091,51 +1071,51 @@
cancel() { cancel() {
this.illegalVisible = false; this.illegalVisible = false;
}, },
handleDetail(row) { handleDetail(row){
var t = this var t = this
this.detailItem = row; this.detailItem = row;
if (row.vehicleDepartureLogVo != undefined) { if(row.vehicleDepartureLogVo!= undefined){
if (row.vehicleDepartureLogVo.departurePic != undefined && row.vehicleDepartureLogVo.departurePic != '') { if(row.vehicleDepartureLogVo.departurePic!= undefined&&row.vehicleDepartureLogVo.departurePic!=''){
let arr = row.vehicleDepartureLogVo.departurePic.split(","); let arr = row.vehicleDepartureLogVo.departurePic.split(",");
let departurePicList = []; let departurePicList = [];
let p = {}; let p = {};
arr.map(function (item) { arr.map(function(item){
departurePicList.push(item); departurePicList.push(item);
}); });
t.departurePicList = departurePicList; t.departurePicList = departurePicList;
} else { }else{
t.departurePicList = []; t.departurePicList = [];
} }
if (row.vehicleDepartureLogVo.arrivalPic != undefined && row.vehicleDepartureLogVo.arrivalPic != '') { if(row.vehicleDepartureLogVo.arrivalPic!= undefined&&row.vehicleDepartureLogVo.arrivalPic!=''){
let Arr = row.vehicleDepartureLogVo.arrivalPic.split(","); let Arr = row.vehicleDepartureLogVo.arrivalPic.split(",");
let arrivalPicList = []; let arrivalPicList = [];
let p = {}; let p = {};
Arr.map(function (item) { Arr.map(function(item){
arrivalPicList.push(item); arrivalPicList.push(item);
}); });
t.arrivalPicList = arrivalPicList; t.arrivalPicList = arrivalPicList;
} else { }else{
t.arrivalPicList = []; t.arrivalPicList = [];
} }
} else { }else{
t.departurePicList = []; t.departurePicList = [];
t.arrivalPicList = []; t.arrivalPicList = [];
} }
this.dialogDetailVisible = true; this.dialogDetailVisible = true;
}, },
//监听change事件 //监听change事件
getProvinceRegions(item) { getProvinceRegions(item) {
this.listQuery.zoneId = item this.listQuery.zoneId = item
this.baranchQuery.zoneId = item this.baranchQuery.zoneId = item
this.listQuery.liftCompany = undefined; this.listQuery.liftCompany = undefined;
getAllBranchCompanyByZoneId(this.baranchQuery) getAllBranchCompanyByZoneId(this.baranchQuery)
.then(response => { .then(response => {
this.allBranchCompany = response.data; this.allBranchCompany = response.data;
}) })
}, },
getAllBranchCompanyChange(item) { getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item this.listQuery.liftCompany = item
}, },
querySearch(queryString, cb) { querySearch(queryString, cb) {
let selectArry = []; let selectArry = [];
let iitem = { let iitem = {
...@@ -1143,7 +1123,7 @@ ...@@ -1143,7 +1123,7 @@
name: "全部" name: "全部"
}; };
selectArry.push(iitem); selectArry.push(iitem);
this.allCompaniesArr.map(function (item) { this.allCompaniesArr.map(function(item){
item.value = item.name; item.value = item.name;
selectArry.push(item); selectArry.push(item);
}); });
...@@ -1160,14 +1140,14 @@ ...@@ -1160,14 +1140,14 @@
/** /**
* 分公司搜索 * 分公司搜索
* */ * */
handleSelect2(item) { handleSelect2(item){
this.listQuery.subordinateBranch = item.id; this.listQuery.subordinateBranch = item.id;
console.log(item); console.log(item);
}, },
/** /**
* 提车分公司 * 提车分公司
* */ * */
handleSelect1(item) { handleSelect1(item){
this.form4Lift.liftCompany = item.id; this.form4Lift.liftCompany = item.id;
console.log(item); console.log(item);
}, },
...@@ -1186,7 +1166,7 @@ ...@@ -1186,7 +1166,7 @@
const set = this.$refs; const set = this.$refs;
set[formName].validate(valid => { set[formName].validate(valid => {
if (valid) { if (valid) {
if (Number(this.departureForm.mileage) > 999999) { if(Number(this.departureForm.mileage)>999999){
this.$notify({ this.$notify({
title: '警告', title: '警告',
message: '公里数不能大于999999', message: '公里数不能大于999999',
...@@ -1196,10 +1176,10 @@ ...@@ -1196,10 +1176,10 @@
return false; return false;
} }
var arr = []; var arr = [];
this.departurePicList.map(function (item) { this.departurePicList.map(function(item){
arr.push(item.url); arr.push(item.url);
}); });
this.departureForm.departurePic = arr.join(","); this.departureForm.departurePic=arr.join(",");
departureVehicle(this.departureForm).then(response => { departureVehicle(this.departureForm).then(response => {
if (response.status == 200) { if (response.status == 200) {
this.dialogForm4LiftVisible = false; this.dialogForm4LiftVisible = false;
...@@ -1258,9 +1238,9 @@ ...@@ -1258,9 +1238,9 @@
}, },
getList() { getList() {
this.listLoading = true; this.listLoading = true;
for (var key in this.listQuery) { for(var key in this.listQuery){
if (this.listQuery[key] == '') { if(this.listQuery[key]==''){
this.listQuery[key] = undefined this.listQuery[key]=undefined
} }
} }
page(this.listQuery) page(this.listQuery)
...@@ -1271,30 +1251,30 @@ ...@@ -1271,30 +1251,30 @@
}) })
}, },
getBookRecordStatus: function (data) { getBookRecordStatus: function (data) {
this.bookRecordStatus['3'].val = '待出行' this.bookRecordStatus['3'].val = '待出行'
this.bookRecordStatus['4'].val = '驳回' this.bookRecordStatus['4'].val = '驳回'
this.bookRecordStatus['5'].val = '出行中' this.bookRecordStatus['5'].val = '出行中'
this.bookRecordStatus['7'].val = '已完成' this.bookRecordStatus['7'].val = '已完成'
if (data) { if(data) {
if (!this.$utils.isInteger(data.status)) { if (!this.$utils.isInteger(data.status)) {
return '未知'; return '未知';
} }
if (data.status == 2 && (data.vehicleDepartureLogVo == undefined || data.vehicleDepartureLogVo == null)) { if(data.status == 2 && (data.vehicleDepartureLogVo == undefined || data.vehicleDepartureLogVo == null)) {
return this.bookRecordStatus['3'].val; return this.bookRecordStatus['3'].val;
} }
if (data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 0) { if(data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 0) {
return this.bookRecordStatus['5'].val; return this.bookRecordStatus['5'].val;
} }
if (data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 1) { if(data.status == 2 && data.vehicleDepartureLogVo != undefined && data.vehicleDepartureLogVo != null && data.vehicleDepartureLogVo.state == 1) {
return this.bookRecordStatus['7'].val; return this.bookRecordStatus['7'].val;
} }
return this.bookRecordStatus[data.status + ''].val; return this.bookRecordStatus[data.status + ''].val;
} }
return ''; return '';
}, },
getAllBookRecordStatus: function () { getAllBookRecordStatus: function () {
console.log(this.bookRecordStatus) console.log(this.bookRecordStatus)
return this.bookRecordStatus; return this.bookRecordStatus;
}, },
getDatePeriodStr([startDate, endDate]) { getDatePeriodStr([startDate, endDate]) {
...@@ -1304,6 +1284,44 @@ ...@@ -1304,6 +1284,44 @@
} }
return '未知'; return '未知';
}, },
/**
* 清空出车弹框数据
*/
cleanDepartureForm() {
this.departureForm = {
vehicleId: null,
departureBranchCompanyId: null,//出发地分公司id
departureBranchCompanyName: '',//出发地分公司名称
use: null,
user: null,
userTel: null,
checkMan: null,
checkManTel: null,
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null,//目的地分公司id
expectArrivalBranchCompanyName: '',//目的地分公司名称
bookRecordId:null,
departurePic:'',
remark:null,
bookStartDate: null,
};
},
cleanArrivalForm(){
this.arrivalForm = {
vehicleId: null,
numberPlate: null,
arrivalDate: null,
recycleMan: null,
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: '',
arrivalPic:'',
remark:'',
bookRecordId:null
}
},
/** /**
* 搜索按钮 * 搜索按钮
* */ * */
...@@ -1354,7 +1372,7 @@ ...@@ -1354,7 +1372,7 @@
type: 'success', type: 'success',
duration: 2000 duration: 2000
}); });
if (this.dialogDetailVisible) { if(this.dialogDetailVisible){
this.dialogDetailVisible = false this.dialogDetailVisible = false
} }
} }
...@@ -1367,30 +1385,30 @@ ...@@ -1367,30 +1385,30 @@
set[formName].validate(valid => { set[formName].validate(valid => {
if (valid) { if (valid) {
reject(this.rejectFrom) reject(this.rejectFrom)
.then(response => { .then(response => {
if (response.code == 1) { if (response.code == 1) {
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
duration: 2000 duration: 2000
}); });
this.getList(); this.getList();
if (this.rejectVisible) { if(this.rejectVisible){
this.rejectVisible = false this.rejectVisible = false
}
if (this.dialogDetailVisible) {
this.dialogDetailVisible = false
}
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
} }
}); if(this.dialogDetailVisible){
this.dialogDetailVisible = false
}
}else{
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
});
} else { } else {
return false; return false;
} }
...@@ -1408,28 +1426,28 @@ ...@@ -1408,28 +1426,28 @@
handleLift(row) { handleLift(row) {
this.cleanDepartureForm(); this.cleanDepartureForm();
this.departurePicList = []; this.departurePicList = [];
if (row.bookType == 1) { if(row.bookType==1){
this.departureForm.use = '租车' this.departureForm.use = '租车'
} else if (row.bookType == 2) { }else if(row.bookType==2){
this.departureForm.use = '用户租赁' this.departureForm.use = '用户租赁'
} else if (row.bookType == 3) { }else if(row.bookType==3){
this.departureForm.use = '维修' this.departureForm.use = '维修'
} else if (row.bookType == 4) { }else if(row.bookType==4){
this.departureForm.use = '展览' this.departureForm.use = '展览'
} else if (row.bookType == 5) { }else if(row.bookType==5){
this.departureForm.use = '旅游' this.departureForm.use = '旅游'
} else if (row.bookType == 6) { }else if(row.bookType==6){
this.departureForm.use = '保养' this.departureForm.use = '保养'
} else if (row.bookType == 7) { }else if(row.bookType==7){
this.departureForm.use = '预约中' this.departureForm.use = '预约中'
} else if (row.bookType == 8) { }else if(row.bookType==8){
this.departureForm.use = '禁用' this.departureForm.use = '禁用'
} else if (row.bookType == 9) { }else if(row.bookType==9){
this.departureForm.use = '客户用车' this.departureForm.use = '客户用车'
} else if (row.bookType == 10) { }else if(row.bookType==10){
this.departureForm.use = '其他' this.departureForm.use = '其他'
} }
this.departureForm.bookRecordId = row.id this.departureForm.bookRecordId=row.id
this.departureForm.vehicleId = row.vehicleId this.departureForm.vehicleId = row.vehicleId
this.departureForm.numberPlate = row.numberPlate this.departureForm.numberPlate = row.numberPlate
this.departureForm.departureDate = Date(); this.departureForm.departureDate = Date();
...@@ -1454,7 +1472,7 @@ ...@@ -1454,7 +1472,7 @@
*/ */
handleRet(row) { handleRet(row) {
this.arrivalPicList = []; this.arrivalPicList = [];
this.arrivalForm.bookRecordId = row.id this.arrivalForm.bookRecordId = row.id
this.arrivalForm.vehicleId = row.vehicleId this.arrivalForm.vehicleId = row.vehicleId
this.arrivalForm.numberPlate = row.numberPlate this.arrivalForm.numberPlate = row.numberPlate
this.arrivalForm.arrivalDate = Date(); this.arrivalForm.arrivalDate = Date();
...@@ -1466,7 +1484,7 @@ ...@@ -1466,7 +1484,7 @@
const set = this.$refs; const set = this.$refs;
set[formName].validate(valid => { set[formName].validate(valid => {
if (valid) { if (valid) {
if (Number(this.arrivalForm.mileage) > 999999) { if(Number(this.arrivalForm.mileage)>999999){
this.$notify({ this.$notify({
title: '警告', title: '警告',
message: '公里数不能大于999999', message: '公里数不能大于999999',
...@@ -1476,10 +1494,10 @@ ...@@ -1476,10 +1494,10 @@
return false; return false;
} }
var arr = []; var arr = [];
this.arrivalPicList.map(function (item) { this.arrivalPicList.map(function(item){
arr.push(item.url); arr.push(item.url);
}); });
this.arrivalForm.arrivalPic = arr.join(","); this.arrivalForm.arrivalPic=arr.join(",");
arrivalVehicle(this.arrivalForm).then(response => { arrivalVehicle(this.arrivalForm).then(response => {
if (response.status == 200) { if (response.status == 200) {
this.dialogForm4RetVisible = false; this.dialogForm4RetVisible = false;
...@@ -1512,12 +1530,12 @@ ...@@ -1512,12 +1530,12 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
var obj = { var obj = {
vehicleBookRecordId: row.id vehicleBookRecordId:row.id
}; };
unbook(obj) unbook(obj)
.then(response => { .then(response => {
if (response.code == 1) { if(response.code==1){
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '操作成功', message: '操作成功',
...@@ -1525,7 +1543,7 @@ ...@@ -1525,7 +1543,7 @@
duration: 2000 duration: 2000
}); });
this.getList(); this.getList();
} else { }else{
this.$notify({ this.$notify({
title: '失败', title: '失败',
message: response.message, message: response.message,
...@@ -1533,91 +1551,30 @@ ...@@ -1533,91 +1551,30 @@
duration: 2000 duration: 2000
}); });
} }
}).catch(response => { }).catch(response=>{
console.log(response) console.log(response)
} }
);
});
},
setImgStyle(el) {
console.log('鼠标移入事件:setImgStyle') );
if (el === 'show') { });
this.imgStyle = true;
} else if (el === 'hide') {
this.imgStyle = false;
}
}, },
},
/**
* 清空出车弹框数据
*/
cleanDepartureForm() {
this.departureForm = {
vehicleId: null,
departureBranchCompanyId: null,//出发地分公司id
departureBranchCompanyName: '',//出发地分公司名称
use: null,
user: null,
userTel: null,
checkMan: null,
checkManTel: null,
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null,//目的地分公司id
expectArrivalBranchCompanyName: '',//目的地分公司名称
bookRecordId: null,
departurePic: '',
remark: null,
bookStartDate: null,
}
},
cleanArrivalForm() {
this.arrivalForm = {
vehicleId: null,
numberPlate: null,
arrivalDate: null,
recycleMan: null,
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: '',
arrivalPic: '',
remark: '',
bookRecordId: null
}
} }
} }
</script> </script>
<style scoped> <style scoped>
.order-details .el-form-item { .order-details .el-form-item{
margin-bottom: 0px !important; margin-bottom: 0px !important;
} }
.order-details hr {
.order-details hr { height: 1px;
height: 1px; background-color: #ccc;
background-color: #ccc; border: none;
border: none; }
} .image {
width: 100%;
.image { height: 110px;
width: 100%; display: block;
height: 110px; }
display: block; .el-card__body,.el-card{padding: 0px !important;width: 150px;text-align: center;}
}
.imgStyle {
width: 100%;
height: 550px;
display: block;
position: relative;
bottom: 55px;
}
.el-card__body, .el-card {
padding: 0px !important;
width: 150px;
text-align: center;
}
</style> </style>
...@@ -39,6 +39,16 @@ ...@@ -39,6 +39,16 @@
<template scope="scope"> <template scope="scope">
<span>{{scope.row.provinceName}}-{{scope.row.cityName}}</span> <span>{{scope.row.provinceName}}-{{scope.row.cityName}}</span>
</template> </template>
<el-table-column align="center" label="取车分公司" width="200">
<template scope="scope">
<span>{{scope.row.companyName}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="还车分公司" width="200">
<template scope="scope">
<span>{{scope.row.arrivalCompanyName}}</span>
</template>
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column align="center" label="车辆型号" width="300"> <el-table-column align="center" label="车辆型号" width="300">
<template scope="scope"> <template scope="scope">
......
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