Commit b603274f authored by hanfeng's avatar hanfeng

修改旅游定单和车辆排班列表

parent 7770ef55
...@@ -203,10 +203,12 @@ ...@@ -203,10 +203,12 @@
this.form.orderTourDetail.endTime = timestamp2Date(a.orderTourDetail.endTime) this.form.orderTourDetail.endTime = timestamp2Date(a.orderTourDetail.endTime)
this.costDetail = JSON.parse(a.orderTourDetail.costDetail) this.costDetail = JSON.parse(a.orderTourDetail.costDetail)
var cost = ''; var cost = '';
this.costDetail.children.forEach(function(a1) { if ( this.costDetail.children){
var detail = a1.detail==undefined?'':a1.detail this.costDetail.children.forEach(function(a1) {
cost += a1.key + ":" +detail+" " var detail = a1.detail==undefined?'':a1.detail
}) cost += a1.key + ":" +detail+" "
})
}
if (this.form.status == 2) { if (this.form.status == 2) {
this.form.ststusName = '取消'; this.form.ststusName = '取消';
} }
......
...@@ -9,32 +9,33 @@ ...@@ -9,32 +9,33 @@
: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="请选择" @change="getAllBranchCompanyChange"> <el-select class="filter-item" v-model="listQuery.liftCompany" placeholder="请选择"
@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"
...@@ -53,7 +54,8 @@ ...@@ -53,7 +54,8 @@
style="width: 100%"> style="width: 100%">
<el-table-column align="center" label="车牌号(车序)" width="150"> <el-table-column align="center" label="车牌号(车序)" width="150">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.numberPlate}}</span><span v-if="scope.row.code!=0">({{scope.row.code}})</span><span v-if="scope.row.code==0">(无)</span> <span>{{scope.row.numberPlate}}</span><span v-if="scope.row.code!=0">({{scope.row.code}})</span><span
v-if="scope.row.code==0">(无)</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -185,25 +187,39 @@ ...@@ -185,25 +187,39 @@
<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" @click="illegalInquiry(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 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> @click="illegalInquiry(scope.row)">违章记录
<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>
<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" class="el-button el-button--text el-button--small" @click="handleLift(scope.row)">出车</el-button> <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>
</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" size="small" class="el-button el-button--text el-button--small" @click="handleRet(scope.row)">收车</el-button> <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>
</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" class="el-button el-button--text el-button--small" style="color: red;" @click="handleUnbook(scope.row)">取消预定</el-button> <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>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
...@@ -271,7 +287,7 @@ ...@@ -271,7 +287,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>
...@@ -329,9 +345,11 @@ ...@@ -329,9 +345,11 @@
</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" style="margin-bottom:10px"> <el-col :span="3" v-for="(item, index) in departurePicList" :key="index" :offset="index%6 > 0 ? 1 : 0"
style="margin-bottom:10px">
<el-card> <el-card>
<img :src="item" class="image"> <img :src="item" class="image" :class="imgStyle" @mouseover="setImgStyle('show')"
@mouseout="setImgStyle('hide')">
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
...@@ -360,8 +378,9 @@ ...@@ -360,8 +378,9 @@
</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" style="margin-bottom:10px"> <el-col :span="3" v-for="(item, index) in arrivalPicList" :key="index" :offset="index%6 > 0 ? 1 : 0"
style="margin-bottom:10px">
<el-card> <el-card>
<img :src="item" class="image"> <img :src="item" class="image">
</el-card> </el-card>
...@@ -374,11 +393,11 @@ ...@@ -374,11 +393,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">
...@@ -544,10 +563,12 @@ ...@@ -544,10 +563,12 @@
</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="请输入违章罚款金额" style="width: 50%;margin-right:10px"></el-input> <el-input v-model="price" type="number" placeholder="请输入违章罚款金额"
</el-form-item> style="width: 50%;margin-right:10px"></el-input>
</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">
...@@ -580,10 +601,10 @@ ...@@ -580,10 +601,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
...@@ -618,13 +639,14 @@ ...@@ -618,13 +639,14 @@
}, },
data() { data() {
return { return {
rejectVisible:false, imgStyle: false,
rejectFrom:{ rejectVisible: false,
vehicleBookRecordId:'', rejectFrom: {
rejectRemark:'' vehicleBookRecordId: '',
rejectRemark: ''
}, },
rejectRules:{ rejectRules: {
rejectRemark:{ rejectRemark: {
type: "string", type: "string",
required: true, required: true,
message: "请输入拒绝原因", message: "请输入拒绝原因",
...@@ -632,13 +654,13 @@ ...@@ -632,13 +654,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: '请输入验车人联系方式',
...@@ -649,14 +671,14 @@ ...@@ -649,14 +671,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: '',//出发地分公司名称
...@@ -669,14 +691,14 @@ ...@@ -669,14 +691,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,
...@@ -685,17 +707,17 @@ ...@@ -685,17 +707,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: '请输入收车人联系方式',
...@@ -706,108 +728,106 @@ ...@@ -706,108 +728,106 @@
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,
...@@ -945,9 +965,9 @@ ...@@ -945,9 +965,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 !== '') {
...@@ -970,12 +990,12 @@ ...@@ -970,12 +990,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 => {
...@@ -998,7 +1018,7 @@ ...@@ -998,7 +1018,7 @@
} }
}); });
}, },
/** /**
* 上传成功 * 上传成功
* */ * */
handleSuccess(res, file) { handleSuccess(res, file) {
...@@ -1009,10 +1029,10 @@ ...@@ -1009,10 +1029,10 @@
/** /**
* 删除违章图片 * 删除违章图片
* */ * */
handleRemove(file, fileList1){ handleRemove(file, fileList1) {
this.fileList2 = fileList1; this.fileList2 = fileList1;
}, },
/** /**
* 出车上传成功 * 出车上传成功
* */ * */
handleDepartureSuccess(res, file) { handleDepartureSuccess(res, file) {
...@@ -1023,10 +1043,10 @@ ...@@ -1023,10 +1043,10 @@
/** /**
* 删除出车图片 * 删除出车图片
* */ * */
handleDepartureRemove(file, fileList2){ handleDepartureRemove(file, fileList2) {
this.departurePicList = fileList2; this.departurePicList = fileList2;
}, },
/** /**
* 上传成功 * 上传成功
* */ * */
handleArrivalSuccess(res, file) { handleArrivalSuccess(res, file) {
...@@ -1037,21 +1057,21 @@ ...@@ -1037,21 +1057,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
}; };
...@@ -1059,7 +1079,7 @@ ...@@ -1059,7 +1079,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;
...@@ -1071,51 +1091,51 @@ ...@@ -1071,51 +1091,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 = {
...@@ -1123,7 +1143,7 @@ ...@@ -1123,7 +1143,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);
}); });
...@@ -1140,14 +1160,14 @@ ...@@ -1140,14 +1160,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);
}, },
...@@ -1166,7 +1186,7 @@ ...@@ -1166,7 +1186,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',
...@@ -1176,10 +1196,10 @@ ...@@ -1176,10 +1196,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;
...@@ -1238,9 +1258,9 @@ ...@@ -1238,9 +1258,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)
...@@ -1251,30 +1271,30 @@ ...@@ -1251,30 +1271,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]) {
...@@ -1334,7 +1354,7 @@ ...@@ -1334,7 +1354,7 @@
type: 'success', type: 'success',
duration: 2000 duration: 2000
}); });
if(this.dialogDetailVisible){ if (this.dialogDetailVisible) {
this.dialogDetailVisible = false this.dialogDetailVisible = false
} }
} }
...@@ -1347,30 +1367,30 @@ ...@@ -1347,30 +1367,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){ if (this.dialogDetailVisible) {
this.dialogDetailVisible = false this.dialogDetailVisible = false
}
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
} }
}else{ });
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
});
} else { } else {
return false; return false;
} }
...@@ -1388,28 +1408,28 @@ ...@@ -1388,28 +1408,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();
...@@ -1434,7 +1454,7 @@ ...@@ -1434,7 +1454,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();
...@@ -1446,7 +1466,7 @@ ...@@ -1446,7 +1466,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',
...@@ -1456,10 +1476,10 @@ ...@@ -1456,10 +1476,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;
...@@ -1492,12 +1512,12 @@ ...@@ -1492,12 +1512,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: '操作成功',
...@@ -1505,7 +1525,7 @@ ...@@ -1505,7 +1525,7 @@
duration: 2000 duration: 2000
}); });
this.getList(); this.getList();
}else{ } else {
this.$notify({ this.$notify({
title: '失败', title: '失败',
message: response.message, message: response.message,
...@@ -1513,13 +1533,19 @@ ...@@ -1513,13 +1533,19 @@
duration: 2000 duration: 2000
}); });
} }
}).catch(response=>{ }).catch(response => {
console.log(response) console.log(response)
} }
);
);
}); });
}, },
setImgStyle(el) {
if (el.eq('show')) {
this.imgStyle=true;
} else if (el.eq('hide')) {
this.imgStyle=false;
}
},
/** /**
* 清空出车弹框数据 * 清空出车弹框数据
*/ */
...@@ -1537,13 +1563,13 @@ ...@@ -1537,13 +1563,13 @@
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,
}; };
}, },
cleanArrivalForm(){ cleanArrivalForm() {
this.arrivalForm = { this.arrivalForm = {
vehicleId: null, vehicleId: null,
numberPlate: null, numberPlate: null,
...@@ -1553,9 +1579,9 @@ ...@@ -1553,9 +1579,9 @@
mileage: null, mileage: null,
arrivalBranchCompanyId: null, arrivalBranchCompanyId: null,
arrivalBranchCompanyName: '', arrivalBranchCompanyName: '',
arrivalPic:'', arrivalPic: '',
remark:'', remark: '',
bookRecordId:null bookRecordId: null
} }
}, },
} }
...@@ -1563,18 +1589,33 @@ ...@@ -1563,18 +1589,33 @@
</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 {
height: 1px; .order-details hr {
background-color: #ccc; height: 1px;
border: none; background-color: #ccc;
} border: none;
.image { }
width: 100%;
height: 110px; .image {
display: block; width: 100%;
} height: 110px;
.el-card__body,.el-card{padding: 0px !important;width: 150px;text-align: center;} display: block;
}
.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>
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