Commit c0244bcb authored by jiaorz's avatar jiaorz

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

parents f7ae515b d6ad630e
......@@ -155,7 +155,22 @@ export function stockSearchPage(query) {
});
}
// 修改订单还车公司
export function updateEndCompany(params) {
return fetch({
url: '/api/order/baseOrder/updateEndCompany',
method: 'post',
data: params
});
}
// 修改预定订单还车公司
export function updateById(params) {
return fetch({
url: '/vehicle/vehicleInfo/bookRecord/updateById',
method: 'post',
data: params
});
}
export function delObj(id) {
return fetch({
url: '/vehicle/branchCompany/' + id,
......@@ -184,6 +199,7 @@ export function getDetail(id) {
method: 'get'
})
}
/**
* 获取所有公司信息
* @returns {null|*}
......
......@@ -31,7 +31,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="配车:">
<span style="margin-right: 10px;">{{form.vehicleNumberPlat?form.vehicleNumberPlat:form.vehicalNumberPlat}}</span><el-button size="small" type="primary" icon="edit" v-if="form.status==4" @click="resetCar">重新配车</el-button>
<span
style="margin-right: 10px;"
>{{form.vehicleNumberPlat?form.vehicleNumberPlat:form.vehicalNumberPlat}}</span>
<el-button
size="small"
type="primary"
icon="edit"
v-if="form.status==4"
@click="resetCar"
>重新配车</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -42,7 +51,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" label-width="10px">
<el-form-item label label-width="10px">
<span>{{form.orderRentVehicleDetail.startAddr}}</span>
</el-form-item>
</el-col>
......@@ -59,18 +68,22 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" label-width="10px">
<el-form-item label label-width="10px">
<span>{{form.orderRentVehicleDetail.endAddr}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交车公司:">
<el-form-item label="还车公司:">
<span>{{form.endCompanyName}}</span>
<el-button size="mini" type="primary" style="padding: 7px 9px;" @click="resetReturn = true">更换</el-button>
</el-form-item>
</el-col>
</el-row>
<table class="orderDetail">
<tr><th>房车</th><th>租借天数</th><th>费用明细</th>
<tr>
<th>房车</th>
<th>租借天数</th>
<th>费用明细</th>
</tr>
<tr>
<td>{{form.name}}{{rentCostDetail}}</td>
......@@ -78,26 +91,33 @@
<td>{{rentCostDetail}}</td>
</tr>
<tr>
<td ></td>
<td ></td>
<td >共计:¥{{form.realAmount}}</td>
<td></td>
<td></td>
<td>共计:¥{{form.realAmount}}</td>
</tr>
</table>
<div v-if="form.orderVehicleCrosstownDto" style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">驾驶人信息</span></div>
<div v-if="form.orderVehicleCrosstownDto" style="margin: 20px 0;">
<span style="font-size: 18px;font-weight: bold;">驾驶人信息</span>
</div>
<table class="orderDetail" v-if="form.orderVehicleCrosstownDto">
<tr><th>姓名</th><th>手机号</th><th>身份证号</th><!-- <th>驾照</th>--></tr>
<tr>
<th>姓名</th>
<th>手机号</th>
<th>身份证号</th>
<!-- <th>驾照</th>-->
</tr>
<tr>
<td>{{form.orderVehicleCrosstownDto.licenseName}}</td>
<td>{{form.orderVehicleCrosstownDto.licensePhone}}</td>
<td>{{form.orderVehicleCrosstownDto.licenseIdCard}}</td>
<!-- <td><img style="width: 140px;height: 140px;" :src="form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"></td>-->
<!-- <td><img style="width: 140px;height: 140px;" :src="form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"></td>-->
</tr>
</table>
</el-form>
<div class="modal_modal" v-show="resetCarVisible"></div>
<!-- 重新配车 -->
<el-dialog title="重新配车" :visible.sync="resetCarVisible" :append-to-body='true' :modal="false">
<el-dialog title="重新配车" :visible.sync="resetCarVisible" :append-to-body="true" :modal="false">
<el-form :model="resetCarForm" ref="carForm" :rules="rules" label-width="90px">
<el-form-item label="车牌号:" prop="numberPlate">
<el-input v-model="resetCarForm.numberPlate" placeholder="请输入重配的车牌号"></el-input>
......@@ -108,18 +128,32 @@
<el-button type="primary" @click="update('carForm')">确定</el-button>
</div>
</el-dialog>
<!-- 更改还车地点 -->
<div class="modal_modal" v-show="resetReturn"></div>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
<el-form :model="returnForm" ref="returnForm" label-width="90px">
<el-form-item label="还车地点:" prop="endCompanyId">
<el-select clearable v-model="returnForm.endCompanyId" filterable placeholder="请选择/搜索还车地点">
<el-option v-for="item in allCompaniesArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-top:20px" type="primary" @click="confirm('returnForm')">确定</el-button>
</el-form>
</el-dialog>
</el-dialog>
</template>
<script>
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
import {editObj} from 'api/vehicle/vehicleInfo';
export default {
props: ["form", "rentCostDetail"],
import ElRow from 'element-ui/packages/row/src/row'
import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
import ElCol from 'element-ui/packages/col/src/col'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import ElForm from '../../../../node_modules/element-ui/packages/form/src/form.vue'
import { editObj } from 'api/vehicle/vehicleInfo'
import { getAll, updateEndCompany } from 'api/base_info/branch_company'
export default {
props: ['form', 'rentCostDetail'],
name: 'rentOrderDetailModal',
components: {
ElFormItem,
......@@ -129,12 +163,26 @@
},
data() {
return {
updateNumberPlat:false,//是否重新配车
returnForm: {
endCompanyId: ''
},
allCompaniesArr: [],
resetReturn: false, //更改换成地点loading
updateNumberPlat: false, //是否重新配车
dialogVisible: false,
resetCarVisible:false,
resetCarForm:{
no:'',
numberPlate:'',//重新配车车牌号
resetCarVisible: false,
resetCarForm: {
no: '',
numberPlate: '' //重新配车车牌号
},
rules1: {
endCompanyId: [
{
required: true,
message: '请选择更换地点',
trigger: 'change'
}
]
},
rules: {
numberPlate: [
......@@ -145,55 +193,100 @@
trigger: 'blur'
}
]
},
}
}
},
watch: {
dialogVisible(newValue, oldValue){
if(!newValue){
this.$emit("rentOrderDetailDialogEvent", this.updateNumberPlat);
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit('rentOrderDetailDialogEvent', this.updateNumberPlat)
}
}
},
},
mounted() {
this.dialogVisible = true;
console.log(this.form)
this.dialogVisible = true
if (this.form.status == 2) {
this.form.ststusName = '取消';
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
this.form.ststusName = '已完成'
}
this.getAllFn()
},
methods: {
resetCar(){
this.clearFrom();
getAllFn() {
let _this = this
getAll().then(data => {
_this.allCompaniesArr = []
data.data.map(function(item) {
item.value = item.name
_this.allCompaniesArr.push(item)
})
})
},
confirm(formName) {
if (this.returnForm.endCompanyId == '') {
this.$notify({
title: '失败',
message: '还车地点不能为空',
type: 'error',
duration: 2000
})
} else {
this.returnForm.id = this.form.detailId
updateEndCompany(this.returnForm).then(data => {
console.log(data.status);
if (data.status == 200) {
this.$notify({
title: '成功',
message: '修改还车地点成功',
type: 'success',
duration: 3000
})
this.resetReturn = false
}else{
this.$notify({
title: '失败',
message: data.message,
type: 'error',
duration:3000
})
}
})
}
},
resetCar() {
this.clearFrom()
this.resetCarVisible = true
this.resetCarForm.no = this.form.no
},
cancelResetCar(){
cancelResetCar() {
this.resetCarVisible = false
},
clearFrom(){
clearFrom() {
this.resetCarForm = {
no:'',
numberPlate:'',//重新配车车牌号
no: '',
numberPlate: '' //重新配车车牌号
}
},
/**
* 重新配车
* */
update(formName) {
let that = this;
const set = this.$refs;
let that = this
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
editObj(this.resetCarForm).then(response => {
......@@ -203,7 +296,7 @@
message: '修改成功',
type: 'success',
duration: 2000
});
})
this.resetCarVisible = false
this.form.vehicleNumberPlat = this.resetCarForm.numberPlate
this.updateNumberPlat = true
......@@ -213,55 +306,56 @@
message: response.message,
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
},
})
}
}
}
</script>
<style>
.label-text{
.label-text {
margin-left: 10px;
margin-right: 20px;
}
.label-title{
}
.label-title {
margin-top: 10px;
}
.orderDetail tr th{
}
.orderDetail tr th {
background: #eef1f6;
}
.orderDetail tr td, .orderDetail tr th{
}
.orderDetail tr td,
.orderDetail tr th {
width: 500px;
text-align: center;
border: 1px solid #dfe6ec;
margin-left: 100px;
margin-right: 100px;
padding: 10px;
}
.label-value{
}
.label-value {
margin-left: 80px;
margin-right: 100px;
}
#license-img{
}
#license-img {
width: 50px;
height: 50px;
}
.order-details .el-form-item{
}
.order-details .el-form-item {
margin-bottom: 10px !important;
}
.modal_modal{
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
opacity: 0.5;
background: #000;
z-index: 2000;
}
}
</style>
......@@ -697,7 +697,6 @@ export default {
});
},
handleOrderDetail(row) {
debugger
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = "取消";
......
......@@ -165,12 +165,21 @@
<el-form-item label="峰会流程:">
<el-row class="height" v-for="(item, index) in processJson" :key="index">
<el-col :span="6">
<el-date-picker
<!-- <el-date-picker
v-model="item.time"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
></el-date-picker>
></el-date-picker>-->
<el-time-select
v-model="item.time"
:picker-options="{
start: '06:00',
step: '00:15',
end: '23:59'
}"
placeholder="选择/输入时间"
></el-time-select>
</el-col>
<el-col :span="8">
<el-input class="content" v-model="item.content" placeholder="请输入内容"></el-input>
......@@ -256,6 +265,7 @@ export default {
longitude: undefined,
latitude: undefined,
state: '默认',
status: 0,
rid: undefined,
content: '', // 峰会主题
contentFirm: '',
......@@ -305,10 +315,10 @@ export default {
res.data.state = this.getState(res.data.status)
this.form = res.data
this.form.bmCloseTime = Number(res.data.bmCloseTime)
let introduce = this.form.vehicleImgs.split(',');
let introduce = this.form.vehicleImgs.split(',')
introduce.forEach(element => {
this.fileList2.push({name:'峰会介绍',url:element})
});
this.fileList2.push({ name: '峰会介绍', url: element })
})
if (res.data.processJson) {
this.processJson = JSON.parse(res.data.processJson)
}
......@@ -378,7 +388,7 @@ export default {
},
addTag() {
const t = {
time: undefined,
time: null,
content: ''
}
this.processJson.push(t)
......@@ -388,43 +398,98 @@ export default {
*
* */
update1() {
this.dataProcessing()
if (!this.form.title) {
this.$notify({
title: '失败',
message: '标题不能为空',
type: 'error',
duration: 2000
})
return false
} else if (!this.form.startTime) {
this.$notify({
title: '失败',
message: '开始时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.endTime) {
this.$notify({
title: '失败',
message: '结束时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.bmCloseTime) {
this.$notify({
title: '失败',
message: '报名截止时间不能为空',
type: 'error',
duration: 2000
})
} else {
typeof(this.form.endTime) == 'number' ? this.form.endTime = this.form.endTime : this.form.endTime = this.form.endTime.getTime();
typeof(this.form.startTime) == 'number' ? this.form.startTime = this.form.startTime : this.form.startTime = this.form.startTime.getTime();
typeof(this.form.bmCloseTime) == 'number' ? this.form.bmCloseTime = this.form.bmCloseTime : this.form.bmCloseTime = this.form.bmCloseTime.getTime();
let pic = []
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
}
this.form.processJson = this.processJson
update(this.form).then(res => {
this.responseResult(res)
})
this.dataProcessing()
}
},
create(formName) {
if (
!this.form.title ||
!this.form.startTime ||
!this.form.endTime
) {
create() {
if (!this.form.title) {
this.$notify({
title: '失败',
message: '必填项不能为空',
message: '标题不能为空',
type: 'error',
duration: 2000
})
return false
} else if (!this.form.startTime) {
this.$notify({
title: '失败',
message: '开始时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.endTime) {
this.$notify({
title: '失败',
message: '结束时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.bmCloseTime) {
this.$notify({
title: '失败',
message: '报名截止时间不能为空',
type: 'error',
duration: 2000
})
} else {
this.form.endTime = this.form.endTime.getTime()
this.form.startTime = this.form.startTime.getTime()
this.form.bmCloseTime = this.form.bmCloseTime.getTime()
let pic = []
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
let demo = []
this.processJson.forEach(element => {
demo.push({
time:
formatDate(element.time, 'yyyy-MM-dd hh') +
':00:00',
content: element.content
})
})
this.form.processJson = demo
}
this.form.processJson = this.processJson
add(this.form).then(res => {
this.responseResult(res)
......
......@@ -36,12 +36,7 @@
@change="getProvinceRegions"
>
<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-form-item>
......@@ -53,12 +48,7 @@
@change="getAllBranchCompanyChange"
>
<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-form-item>
<el-form-item label="预订月份" prop="selectedMonth4Query">
......@@ -382,9 +372,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="操作人">
<span
v-if="detailItem.vehicleDepartureLogVo"
>{{detailItem.vehicleDepartureLogVo.checkMan}}</span>
<span v-if="detailItem.vehicleDepartureLogVo">{{detailItem.vehicleDepartureLogVo.checkMan}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -422,13 +410,17 @@
<el-col :span="8">
<el-form-item label="还车分公司">
<span>{{detailItem.retCompanyName}}</span>
<el-button
size="mini"
type="primary"
style="padding: 7px 9px;"
@click="resetReturn = true"
>更换</el-button>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="操作人">
<span
v-if="detailItem.vehicleDepartureLogVo"
>{{detailItem.vehicleDepartureLogVo.recycleMan}}</span>
<span v-if="detailItem.vehicleDepartureLogVo">{{detailItem.vehicleDepartureLogVo.recycleMan}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -481,6 +473,19 @@
</div>
</el-dialog>
<!-- 更改还车地点 -->
<div class="modal_modal" v-show="resetReturn"></div>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
<el-form :model="returnForm" ref="returnForm" label-width="90px">
<el-form-item label="还车地点:" prop="retCompany">
<el-select clearable v-model="returnForm.retCompany" filterable placeholder="请选择/搜索还车地点">
<el-option v-for="item in allCompaniesArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-top:20px" type="primary" @click="confirm('returnForm')">确定</el-button>
</el-form>
</el-dialog>
<el-dialog title="驳回" :visible.sync="rejectVisible">
<el-form :model="rejectFrom" :rules="rejectRules" ref="rejectDialogFrom" label-width="80px">
<el-form-item label="驳回理由" prop="rejectRemark">
......@@ -688,78 +693,87 @@ import {
saveOrderViolation,
departureVehicle,
arrivalVehicle
} from "api/vehicle/bookRecord";
} from 'api/vehicle/bookRecord'
import { getAllCompany, getAll } from "api/base_info/branch_company/";
import { getAllZone } from "api/base_info/constant/";
import { getAllBranchCompanyByZoneId } from "api/order/rentVehicle";
import { formatDate } from "utils/dateFormattor";
import {
getAllCompany,
getAll,
updateById
} from 'api/base_info/branch_company/'
import { getAllZone } from 'api/base_info/constant/'
import { getAllBranchCompanyByZoneId } from 'api/order/rentVehicle'
import { formatDate } from 'utils/dateFormattor'
import rsCode from "../../../utils/rsCode";
import rsCode from '../../../utils/rsCode'
import { mapGetters } from "vuex";
import { mapGetters } from 'vuex'
import { toEast8Date, deepCopyDate, newEast8Date } from "utils/dateUtils";
import { getToken } from "../../../utils/auth";
import { toEast8Date, deepCopyDate, newEast8Date } from 'utils/dateUtils'
import { getToken } from '../../../utils/auth'
import {
BOOK_RECORD_STATUS_APPLY,
BOOK_RECORD_STATUS_PROVED,
BOOK_RECORD_STATUS_LIFT
} from "../../../store/modules/baseInfo";
} from '../../../store/modules/baseInfo'
import bookInfoViewer from "../bookInfoViewer";
import accItemSelector from "../accompanyingItem/accItemSelector.vue";
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
export default {
name: "bookRecord",
name: 'bookRecord',
components: {
bookInfoViewer,
accItemSelector
},
data() {
return {
returnForm: {
retCompany: ''
},
allCompaniesArr: [],
resetReturn: false, //更改换成地点loading
rejectVisible: false,
rejectFrom: {
vehicleBookRecordId: "",
rejectRemark: ""
vehicleBookRecordId: '',
rejectRemark: ''
},
rejectRules: {
rejectRemark: {
type: "string",
type: 'string',
required: true,
message: "请输入拒绝原因",
trigger: "blur"
message: '请输入拒绝原因',
trigger: 'blur'
}
},
BASE_API: process.env.BASE_API,
departureFormrules: {
checkMan: {
required: true,
message: "请输入验车人",
trigger: "blur"
message: '请输入验车人',
trigger: 'blur'
},
checkManTel: [
{
required: true,
message: "请输入验车人联系方式",
trigger: "blur"
message: '请输入验车人联系方式',
trigger: 'blur'
},
{
pattern: /^1[3456789]\d{9}$/,
message: "请输入正确的手机号"
message: '请输入正确的手机号'
}
],
mileage: {
type: "number",
type: 'number',
required: true,
message: "请输入公里数",
trigger: "blur"
message: '请输入公里数',
trigger: 'blur'
}
},
departureForm: {
vehicleId: null,
departureBranchCompanyId: null, //出发地分公司id
departureBranchCompanyName: "", //出发地分公司名称
departureBranchCompanyName: '', //出发地分公司名称
use: null,
user: null,
userTel: null,
......@@ -768,9 +782,9 @@ export default {
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null, //目的地分公司id
expectArrivalBranchCompanyName: "", //目的地分公司名称
expectArrivalBranchCompanyName: '', //目的地分公司名称
bookRecordId: null,
departurePic: "",
departurePic: '',
remark: null,
bookStartDate: null
},
......@@ -784,104 +798,105 @@ export default {
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: "",
arrivalPic: "",
remark: "",
arrivalBranchCompanyName: '',
arrivalPic: '',
remark: '',
bookRecordId: null
},
arrivalFormrules: {
recycleMan: {
required: true,
message: "请输入收车人",
trigger: "blur"
message: '请输入收车人',
trigger: 'blur'
},
recycleManTel: [
{
required: true,
message: "请输入收车人联系方式",
trigger: "blur"
message: '请输入收车人联系方式',
trigger: 'blur'
},
{
pattern: /^1[3456789]\d{9}$/,
message: "请输入正确的手机号"
message: '请输入正确的手机号'
}
],
mileage: {
type: "number",
type: 'number',
required: true,
message: "请输入收车公里数",
trigger: "blur"
message: '请输入收车公里数',
trigger: 'blur'
}
},
statusList: [
{
code: "1",
val: "申请中"
code: '1',
val: '申请中'
},
{
code: "3",
val: "待出行"
code: '3',
val: '待出行'
},
{
code: "4",
val: "驳回"
code: '4',
val: '驳回'
},
{
code: "5",
val: "出行中"
code: '5',
val: '出行中'
},
{
code: "6",
val: "取消预订"
code: '6',
val: '取消预订'
},
{
code: "7",
val: "已完成"
code: '7',
val: '已完成'
}
],
activeId: '',
bookTypeList: [
{
id: "1",
name: "租车"
id: '1',
name: '租车'
},
{
id: "2",
name: "用户租赁"
id: '2',
name: '用户租赁'
},
{
id: "3",
name: "维修"
id: '3',
name: '维修'
},
{
id: "4",
name: "展览"
id: '4',
name: '展览'
},
{
id: "5",
name: "旅游"
id: '5',
name: '旅游'
},
{
id: "6",
name: "保养"
id: '6',
name: '保养'
},
{
id: "7",
name: "预约中"
id: '7',
name: '预约中'
},
{
id: "8",
name: "禁用"
id: '8',
name: '禁用'
},
{
id: "9",
name: "客户用车"
id: '9',
name: '客户用车'
},
{
id: "10",
name: "其他"
id: '10',
name: '其他'
}
],
detailId: "",
detailId: '',
illegalVisible: false,
price: undefined, //违章罚款金额
fileList2: [], //违章截图
......@@ -892,7 +907,7 @@ export default {
},
allZoneArr: [], //全部片区
allBranchCompany: [],
state2: "", //搜索-分公司名称
state2: '', //搜索-分公司名称
rules4Query: {},
list: null,
total: null,
......@@ -910,7 +925,7 @@ export default {
},
inline: true,
dialogFormVisible: false,
dialogStatus: "",
dialogStatus: '',
bookRecord_btn_prove: false,
bookRecord_btn_unbook: false,
bookRecord_btn_reject: false,
......@@ -919,10 +934,9 @@ export default {
dialogForm4LiftVisible: false,
dialogForm4RetVisible: false,
allCompanies: {},
allCompaniesArr: [],
tableKey: 0,
form4Lift: {
state1: "",
state1: '',
id: undefined,
mileageLift: undefined,
liftCompany: undefined,
......@@ -932,40 +946,47 @@ export default {
liftCompany: [
{
required: true,
message: "请选择提车分公司",
trigger: "blur",
type: "integer"
message: '请选择提车分公司',
trigger: 'blur',
type: 'integer'
}
],
mileageLift: [
{
required: true,
message: "请输入当前里程数",
trigger: "blur",
type: "integer"
message: '请输入当前里程数',
trigger: 'blur',
type: 'integer'
},
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(value) || this.$utils.isNull(value)) {
return callback();
if (
this.$utils.isUndefined(value) ||
this.$utils.isNull(value)
) {
return callback()
}
if (!this.$utils.isInteger(value)) {
return callback(new Error("里程数必须为整数"));
return callback(new Error('里程数必须为整数'))
}
if (value < 0 || value > 9999999999) {
return callback(new Error("里程数合法范围:[0 - 9999999999]"));
return callback(
new Error(
'里程数合法范围:[0 - 9999999999]'
)
)
}
callback();
callback()
},
trigger: "blur"
trigger: 'blur'
}
],
retRemark: [
{
min: 0,
max: 2000,
message: "长度小于 2000 个字符",
trigger: "blur"
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
......@@ -980,404 +1001,446 @@ export default {
retCompany: [
{
required: true,
message: "请选择提车分公司",
trigger: "blur",
type: "integer"
message: '请选择提车分公司',
trigger: 'blur',
type: 'integer'
}
],
mileageRet: [
{
required: true,
message: "请输入当前里程数",
trigger: "blur",
type: "integer"
message: '请输入当前里程数',
trigger: 'blur',
type: 'integer'
},
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(value) || this.$utils.isNull(value)) {
return callback();
if (
this.$utils.isUndefined(value) ||
this.$utils.isNull(value)
) {
return callback()
}
if (!this.$utils.isInteger(value)) {
return callback(new Error("里程数必须为整数"));
return callback(new Error('里程数必须为整数'))
}
if (value < 0 || value > 9999999999) {
return callback(new Error("里程数合法范围:[0 - 9999999999]"));
return callback(
new Error(
'里程数合法范围:[0 - 9999999999]'
)
)
}
callback();
callback()
},
trigger: "blur"
trigger: 'blur'
}
],
retRemark: [
{
min: 0,
max: 2000,
message: "长度小于 2000 个字符",
trigger: "blur"
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
selectedAccItem: undefined
};
}
},
created() {
this.getList();
this.getList()
getAll().then(response => {
this.allCompaniesArr = response.data;
});
this.allCompaniesArr = response.data
// response.data.map(function(item) {
// item.value = item.name
// this.allCompaniesArr.push(item)
// })
})
getAllCompany(codeAndBranchCompany => {
//初始化公司列表
this.allCompanies = codeAndBranchCompany;
});
this.bookRecord_btn_prove = this.elements["bookRecord:btn_prove"];
this.bookRecord_btn_reject = this.elements["bookRecord:btn_reject"];
this.bookRecord_btn_unbook = this.elements["bookRecord:btn_unbook"];
this.bookRecord_btn_lift = this.elements["bookRecord:btn_lift"];
this.bookRecord_btn_ret = this.elements["bookRecord:btn_ret"];
this.allCompanies = codeAndBranchCompany
})
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
this.bookRecord_btn_lift = this.elements['bookRecord:btn_lift']
this.bookRecord_btn_ret = this.elements['bookRecord:btn_ret']
},
computed: {
...mapGetters(["elements", "bookRecordStatus"]),
...mapGetters(['elements', 'bookRecordStatus']),
getHeaderWithToken() {
return { Authorization: getToken() };
return { Authorization: getToken() }
},
//获取大区列表
getAllZoneList() {
return getAllZone();
return getAllZone()
},
selectedMonth4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.selectedMonth) &&
this.listQuery.selectedMonth !== ""
this.listQuery.selectedMonth !== ''
) {
return toEast8Date(this.listQuery.selectedMonth);
return toEast8Date(this.listQuery.selectedMonth)
}
return undefined;
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.selectedMonth = formatDate(date, "yyyy-MM");
this.listQuery.selectedMonth = formatDate(date, 'yyyy-MM')
} else {
this.listQuery.selectedMonth = undefined;
this.listQuery.selectedMonth = undefined
}
}
}
},
methods: {
confirm() {
if (this.returnForm.retCompany == '') {
this.$notify({
title: '失败',
message: '还车地点不能为空',
type: 'error',
duration: 2000
})
} else {
this.returnForm.id = this.activeId
updateById(this.returnForm).then(data => {
if (data.status == 200) {
this.$notify({
title: '成功',
message: '修改还车地点成功',
type: 'success',
duration: 2000
})
this.resetReturn = false
} else {
this.$notify({
title: '失败',
message: data.message,
type: 'error',
duration: 2000
})
}
})
}
},
/**
* 确定
* */
okHandler() {
let arr = [];
let arr = []
this.fileList2.map(function(item) {
arr.push(item.url);
});
arr.push(item.url)
})
let params = {
illegalPic: arr.join(","),
illegalPic: arr.join(','),
illegalAmount: this.price,
id: this.detailId
};
}
saveOrderViolation(params).then(response => {
if (response.status === 200) {
this.$notify({
title: "成功",
message: "创建成功",
type: "success",
title: '成功',
message: '创建成功',
type: 'success',
duration: 2000
});
this.illegalVisible = false;
this.getList();
})
this.illegalVisible = false
this.getList()
} else {
this.$notify({
title: "创建失败",
message: "操作失败!",
type: "error",
title: '创建失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
},
/**
* 上传成功
* */
handleSuccess(res, file) {
let c = { url: res.data };
this.fileList2.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.fileList2.push(c)
this.showLoadingBody = false
},
/**
* 删除违章图片
* */
handleRemove(file, fileList1) {
this.fileList2 = fileList1;
this.fileList2 = fileList1
},
/**
* 出车上传成功
* */
handleDepartureSuccess(res, file) {
let c = { url: res.data };
this.departurePicList.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.departurePicList.push(c)
this.showLoadingBody = false
},
/**
* 删除出车图片
* */
handleDepartureRemove(file, fileList2) {
this.departurePicList = fileList2;
this.departurePicList = fileList2
},
/**
* 上传成功
* */
handleArrivalSuccess(res, file) {
let c = { url: res.data };
this.arrivalPicList.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.arrivalPicList.push(c)
this.showLoadingBody = false
},
/**
* 删除违章图片
* */
handleArrivalRemove(file, fileList3) {
this.arrivalPicList = fileList3;
this.arrivalPicList = fileList3
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row) {
var t = this;
this.fileList2 = [];
this.price = "";
var t = this
this.fileList2 = []
this.price = ''
if (row.vehicleDepartureLogVo.illegalPic) {
let arr = row.vehicleDepartureLogVo.illegalPic.split(",");
let fileList2 = [];
let p = {};
let arr = row.vehicleDepartureLogVo.illegalPic.split(',')
let fileList2 = []
let p = {}
arr.map(function(item) {
p = {
url: item
};
fileList2.push(p);
});
t.fileList2 = fileList2;
}
fileList2.push(p)
})
t.fileList2 = fileList2
}
if (row.vehicleDepartureLogVo.illegalAmount) {
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount);
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount)
}
this.detailId = row.vehicleDepartureLogVo.id;
this.illegalVisible = true;
this.detailId = row.vehicleDepartureLogVo.id
this.illegalVisible = true
},
/**
* 弹框-取消
* */
cancel() {
this.illegalVisible = false;
this.illegalVisible = false
},
handleDetail(row) {
var t = this;
this.detailItem = row;
this.activeId = row.id
var t = this
this.detailItem = row
if (row.vehicleDepartureLogVo != undefined) {
if (
row.vehicleDepartureLogVo.departurePic != undefined &&
row.vehicleDepartureLogVo.departurePic != ""
row.vehicleDepartureLogVo.departurePic != ''
) {
let arr = row.vehicleDepartureLogVo.departurePic.split(",");
let departurePicList = [];
let p = {};
let arr = row.vehicleDepartureLogVo.departurePic.split(',')
let departurePicList = []
let p = {}
arr.map(function(item) {
departurePicList.push(item);
});
t.departurePicList = departurePicList;
departurePicList.push(item)
})
t.departurePicList = departurePicList
} else {
t.departurePicList = [];
t.departurePicList = []
}
if (
row.vehicleDepartureLogVo.arrivalPic != undefined &&
row.vehicleDepartureLogVo.arrivalPic != ""
row.vehicleDepartureLogVo.arrivalPic != ''
) {
let Arr = row.vehicleDepartureLogVo.arrivalPic.split(",");
let arrivalPicList = [];
let p = {};
let Arr = row.vehicleDepartureLogVo.arrivalPic.split(',')
let arrivalPicList = []
let p = {}
Arr.map(function(item) {
arrivalPicList.push(item);
});
t.arrivalPicList = arrivalPicList;
arrivalPicList.push(item)
})
t.arrivalPicList = arrivalPicList
} else {
t.arrivalPicList = [];
t.arrivalPicList = []
}
} else {
t.departurePicList = [];
t.arrivalPicList = [];
t.departurePicList = []
t.arrivalPicList = []
}
this.dialogDetailVisible = true;
this.dialogDetailVisible = true
},
//监听change事件
getProvinceRegions(item) {
this.listQuery.zoneId = item;
this.baranchQuery.zoneId = item;
this.listQuery.liftCompany = undefined;
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
this.listQuery.liftCompany = undefined
getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
this.allBranchCompany = response.data;
});
this.allBranchCompany = response.data
})
},
getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item;
this.listQuery.liftCompany = item
},
querySearch(queryString, cb) {
let selectArry = [];
let selectArry = []
let iitem = {
value: "全部",
name: "全部"
};
selectArry.push(iitem);
value: '全部',
name: '全部'
}
selectArry.push(iitem)
this.allCompaniesArr.map(function(item) {
item.value = item.name;
selectArry.push(item);
});
this.selectArry = selectArry;
item.value = item.name
selectArry.push(item)
})
this.selectArry = selectArry
var results = queryString
? selectArry.filter(this.createFilter(queryString))
: selectArry;
: selectArry
// 调用 callback 返回建议列表的数据
cb(results);
cb(results)
},
createFilter(queryString) {
return restaurant => {
return restaurant.name.indexOf(queryString.toLowerCase()) != -1;
};
return restaurant.name.indexOf(queryString.toLowerCase()) != -1
}
},
/**
* 分公司搜索
* */
handleSelect2(item) {
this.listQuery.subordinateBranch = item.id;
console.log(item);
this.listQuery.subordinateBranch = item.id
console.log(item)
},
/**
* 提车分公司
* */
handleSelect1(item) {
this.form4Lift.liftCompany = item.id;
console.log(item);
this.form4Lift.liftCompany = item.id
console.log(item)
},
cancelDialog4Lift(formName) {
this.dialogForm4LiftVisible = false;
this.$refs[formName].resetFields();
this.dialogForm4LiftVisible = false
this.$refs[formName].resetFields()
},
cancelDialog4Ret(formName) {
this.dialogForm4RetVisible = false;
this.$refs[formName].resetFields();
this.dialogForm4RetVisible = false
this.$refs[formName].resetFields()
},
/**
* 出车弹框-确定
* */
liftOk(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
if (Number(this.departureForm.mileage) > 999999) {
this.$notify({
title: "警告",
message: "公里数不能大于999999",
type: "warning",
title: '警告',
message: '公里数不能大于999999',
type: 'warning',
duration: 2000
});
return false;
})
return false
}
var arr = [];
var arr = []
this.departurePicList.map(function(item) {
arr.push(item.url);
});
this.departureForm.departurePic = arr.join(",");
arr.push(item.url)
})
this.departureForm.departurePic = arr.join(',')
departureVehicle(this.departureForm).then(response => {
if (response.status == 200) {
this.dialogForm4LiftVisible = false;
this.dialogForm4LiftVisible = false
this.$notify({
title: "成功",
message: "出车成功",
type: "success",
title: '成功',
message: '出车成功',
type: 'success',
duration: 2000
});
this.cleanDepartureForm();
this.getList();
})
this.cleanDepartureForm()
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleBookInfo(row) {
this.$refs.bookInfoViewer.handleBookInfo(row.vehicle);
this.$refs.bookInfoViewer.handleBookInfo(row.vehicle)
},
handleAccItemInfo(row) {
this.selectedAccItem = row.accItemAndAmount;
this.$refs.accItemSelector.show();
this.selectedAccItem = row.accItemAndAmount
this.$refs.accItemSelector.show()
},
checkIfBooked(bookedDate, [startDateStr, endDateStr]) {
if (
this.$utils.isInteger(bookedDate) &&
this.$utils.isString(startDateStr) &&
startDateStr !== "" &&
startDateStr !== '' &&
this.$utils.isString(endDateStr) &&
endDateStr !== ""
endDateStr !== ''
) {
let startDate = toEast8Date(startDateStr);
let endDate = toEast8Date(endDateStr);
let startDate = toEast8Date(startDateStr)
let endDate = toEast8Date(endDateStr)
for (
;
this.$utils.toDateString(startDate, "yyyy-MM-dd") <=
this.$utils.toDateString(endDate, "yyyy-MM-dd");
this.$utils.toDateString(startDate, 'yyyy-MM-dd') <=
this.$utils.toDateString(endDate, 'yyyy-MM-dd');
startDate.setDate(startDate.getDate() + 1)
) {
if ((bookedDate & (1 << (startDate.getDate() - 1))) !== 0) {
return true;
return true
}
}
}
return false;
return false
},
checkIfApply(code) {
return code === BOOK_RECORD_STATUS_APPLY;
return code === BOOK_RECORD_STATUS_APPLY
},
checkIfProved(code) {
return code === BOOK_RECORD_STATUS_PROVED;
return code === BOOK_RECORD_STATUS_PROVED
},
checkIfLift(code) {
return code === BOOK_RECORD_STATUS_LIFT;
return code === BOOK_RECORD_STATUS_LIFT
},
getList() {
this.listLoading = true;
this.listLoading = true
for (var key in this.listQuery) {
if (this.listQuery[key] === "") {
this.listQuery[key] = undefined;
if (this.listQuery[key] === '') {
this.listQuery[key] = undefined
}
}
page(this.listQuery).then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
});
this.list = response.data.data
this.total = response.data.totalCount
this.listLoading = false
})
},
getBookRecordStatus: function(data) {
this.bookRecordStatus["3"].val = "待出行";
this.bookRecordStatus["4"].val = "驳回";
this.bookRecordStatus["5"].val = "出行中";
this.bookRecordStatus["7"].val = "已完成";
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 '未知'
}
if (
data.status == 2 &&
(data.vehicleDepartureLogVo == undefined ||
data.vehicleDepartureLogVo == null)
) {
return this.bookRecordStatus["3"].val;
return this.bookRecordStatus['3'].val
}
if (
data.status == 2 &&
......@@ -1385,7 +1448,7 @@ export default {
data.vehicleDepartureLogVo != null &&
data.vehicleDepartureLogVo.state == 0
) {
return this.bookRecordStatus["5"].val;
return this.bookRecordStatus['5'].val
}
if (
data.status == 2 &&
......@@ -1393,31 +1456,31 @@ export default {
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() {
console.log(this.bookRecordStatus);
console.log(this.bookRecordStatus)
return this.bookRecordStatus;
return this.bookRecordStatus
},
getDatePeriodStr([startDate, endDate]) {
if (
this.$utils.isString(startDate) &&
startDate !== "" &&
startDate !== '' &&
this.$utils.isString(endDate) &&
endDate !== ""
endDate !== ''
) {
return (
formatDate(toEast8Date(startDate), "yyyy-MM-dd") +
" 至 " +
formatDate(toEast8Date(endDate), "yyyy-MM-dd")
);
formatDate(toEast8Date(startDate), 'yyyy-MM-dd') +
' 至 ' +
formatDate(toEast8Date(endDate), 'yyyy-MM-dd')
)
}
return "未知";
return '未知'
},
/**
* 清空出车弹框数据
......@@ -1426,7 +1489,7 @@ export default {
this.departureForm = {
vehicleId: null,
departureBranchCompanyId: null, //出发地分公司id
departureBranchCompanyName: "", //出发地分公司名称
departureBranchCompanyName: '', //出发地分公司名称
use: null,
user: null,
userTel: null,
......@@ -1435,12 +1498,12 @@ export default {
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null, //目的地分公司id
expectArrivalBranchCompanyName: "", //目的地分公司名称
expectArrivalBranchCompanyName: '', //目的地分公司名称
bookRecordId: null,
departurePic: "",
departurePic: '',
remark: null,
bookStartDate: null
};
}
},
cleanArrivalForm() {
this.arrivalForm = {
......@@ -1451,149 +1514,157 @@ export default {
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: "",
arrivalPic: "",
remark: "",
arrivalBranchCompanyName: '',
arrivalPic: '',
remark: '',
bookRecordId: null
};
}
},
/**
* 搜索按钮
* */
handleFilter() {
this.listQuery.page = 1;
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
this.getList()
} else {
return false;
return false
}
});
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
this.listQuery.limit = val
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
this.listQuery.page = val
this.getList()
},
handleProve(row) {
this.$confirm("确定批准申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('确定批准申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
prove(row.id).then(response => {
if (
response.code === rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
response.code ===
rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
) {
this.$notify({
title: "失败",
title: '失败',
message:
rsCode.msg[rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED],
type: "error",
rsCode.msg[
rsCode.code
.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
type: 'error',
duration: 2000
});
})
} else if (
response.code === rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
response.code ===
rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
) {
this.$notify({
title: "失败",
title: '失败',
message:
rsCode.msg[rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED],
type: "error",
rsCode.msg[
rsCode.code
.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
type: 'error',
duration: 2000
});
})
} else if (response.code === rsCode.RS_CODE_SUC) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
})
if (this.dialogDetailVisible) {
this.dialogDetailVisible = false;
this.dialogDetailVisible = false
}
}
this.getList();
});
});
this.getList()
})
})
},
rejectBtn(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
reject(this.rejectFrom).then(response => {
if (response.code == 1) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
if (this.rejectVisible) {
this.rejectVisible = false;
this.rejectVisible = false
}
if (this.dialogDetailVisible) {
this.dialogDetailVisible = false;
this.dialogDetailVisible = false
}
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleReject(row) {
this.rejectVisible = true;
this.rejectFrom.vehicleBookRecordId = row.id;
this.rejectFrom.rejectRemark = "";
this.rejectVisible = true
this.rejectFrom.vehicleBookRecordId = row.id
this.rejectFrom.rejectRemark = ''
},
/**
* 操作-出车
* @param row
*/
handleLift(row) {
this.cleanDepartureForm();
this.departurePicList = [];
this.cleanDepartureForm()
this.departurePicList = []
if (row.bookType == 1) {
this.departureForm.use = "租车";
this.departureForm.use = '租车'
} else if (row.bookType == 2) {
this.departureForm.use = "用户租赁";
this.departureForm.use = '用户租赁'
} else if (row.bookType == 3) {
this.departureForm.use = "维修";
this.departureForm.use = '维修'
} else if (row.bookType == 4) {
this.departureForm.use = "展览";
this.departureForm.use = '展览'
} else if (row.bookType == 5) {
this.departureForm.use = "旅游";
this.departureForm.use = '旅游'
} else if (row.bookType == 6) {
this.departureForm.use = "保养";
this.departureForm.use = '保养'
} else if (row.bookType == 7) {
this.departureForm.use = "预约中";
this.departureForm.use = '预约中'
} else if (row.bookType == 8) {
this.departureForm.use = "禁用";
this.departureForm.use = '禁用'
} else if (row.bookType == 9) {
this.departureForm.use = "客户用车";
this.departureForm.use = '客户用车'
} else if (row.bookType == 10) {
this.departureForm.use = "其他";
}
this.departureForm.bookRecordId = row.id;
this.departureForm.vehicleId = row.vehicleId;
this.departureForm.numberPlate = row.numberPlate;
this.departureForm.departureDate = Date();
this.departureForm.departureBranchCompanyId = row.liftCompany;
this.departureForm.departureBranchCompanyName = row.liftCompanyName;
this.departureForm.user = row.vehicleUsername;
this.departureForm.userTel = row.vehicleUserPhone;
this.departureForm.use = '其他'
}
this.departureForm.bookRecordId = row.id
this.departureForm.vehicleId = row.vehicleId
this.departureForm.numberPlate = row.numberPlate
this.departureForm.departureDate = Date()
this.departureForm.departureBranchCompanyId = row.liftCompany
this.departureForm.departureBranchCompanyName = row.liftCompanyName
this.departureForm.user = row.vehicleUsername
this.departureForm.userTel = row.vehicleUserPhone
// if(row.vehicleDepartureLogVo!=undefined){
// this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:''
// this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:''
......@@ -1601,103 +1672,104 @@ export default {
// this.departureForm.user = ''
// this.departureForm.userTel = ''
// }
this.departureForm.expectArrivalBranchCompanyId = row.retCompany;
this.departureForm.expectArrivalBranchCompanyName = row.retCompanyName;
this.dialogForm4LiftVisible = true;
this.departureForm.expectArrivalBranchCompanyId = row.retCompany
this.departureForm.expectArrivalBranchCompanyName =
row.retCompanyName
this.dialogForm4LiftVisible = true
},
/**
* 操作-收车
* @param row
*/
handleRet(row) {
this.arrivalPicList = [];
this.arrivalForm.bookRecordId = row.id;
this.arrivalForm.vehicleId = row.vehicleId;
this.arrivalForm.numberPlate = row.numberPlate;
this.arrivalForm.arrivalDate = Date();
this.arrivalForm.arrivalBranchCompanyId = row.retCompany;
this.arrivalForm.arrivalBranchCompanyName = row.retCompanyName;
this.dialogForm4RetVisible = true;
this.arrivalPicList = []
this.arrivalForm.bookRecordId = row.id
this.arrivalForm.vehicleId = row.vehicleId
this.arrivalForm.numberPlate = row.numberPlate
this.arrivalForm.arrivalDate = Date()
this.arrivalForm.arrivalBranchCompanyId = row.retCompany
this.arrivalForm.arrivalBranchCompanyName = row.retCompanyName
this.dialogForm4RetVisible = true
},
ret(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
if (Number(this.arrivalForm.mileage) > 999999) {
this.$notify({
title: "警告",
message: "公里数不能大于999999",
type: "warning",
title: '警告',
message: '公里数不能大于999999',
type: 'warning',
duration: 2000
});
return false;
})
return false
}
var arr = [];
var arr = []
this.arrivalPicList.map(function(item) {
arr.push(item.url);
});
this.arrivalForm.arrivalPic = arr.join(",");
arr.push(item.url)
})
this.arrivalForm.arrivalPic = arr.join(',')
arrivalVehicle(this.arrivalForm).then(response => {
if (response.status == 200) {
this.dialogForm4RetVisible = false;
this.dialogForm4RetVisible = false
this.$notify({
title: "成功",
message: "收车成功",
type: "success",
title: '成功',
message: '收车成功',
type: 'success',
duration: 2000
});
this.cleanArrivalForm();
this.getList();
})
this.cleanArrivalForm()
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleUnbook(row) {
this.$confirm("确定取消预定?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('确定取消预定?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var obj = {
vehicleBookRecordId: row.id
};
}
unbook(obj)
.then(response => {
if (response.code == 1) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
})
.catch(response => {
console.log(response);
});
});
console.log(response)
})
})
}
}
};
}
</script>
<style scoped>
......@@ -1720,4 +1792,14 @@ export default {
width: 150px;
text-align: center;
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.5;
background: #000;
z-index: 2001;
}
</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