Commit 992ce157 authored by lixy's avatar lixy

车辆排班记录

parent f4d747db
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="用途"> <el-table-column width="150" align="center" label="用途">
<template scope="scope"> <template scope="scope">
<!--/*1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用*/--> <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
<span>{{scope.row.bookType==1?"租房车":scope.row.bookType==4?"展览":scope.row.bookType==5?"房车游":scope.row.bookType==6?"保养":scope.row.bookType==7?"预约中":scope.row.bookType==8?"禁用":scope.row.bookType==2?"分公司使用":'未知用途'}}</span> <span>{{scope.row.bookType==1?"租房车":scope.row.bookType==3?"维修":scope.row.bookType==8?"禁用":scope.row.bookType==9?"客户用车":scope.row.bookType==10?"其他":scope.row.bookType==4?"展览":scope.row.bookType==5?"房车游":scope.row.bookType==6?"保养":scope.row.bookType==7?"预约中":scope.row.bookType==8?"禁用":scope.row.bookType==2?"分公司使用":'未知用途'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="订单号"> <el-table-column align="center" label="订单号">
...@@ -63,6 +63,22 @@ ...@@ -63,6 +63,22 @@
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" :current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
<el-dialog title="重新安排" :visible.sync="reAnpai" class="user-car">
<el-form :model="form" ref="form" :rules="rules" label-width="140px">
<el-form-item label="选择时间" prop="times">
<el-date-picker
v-model="form.times"
type="datetimerange"
:picker-options="pickerOptions0"
placeholder="选择时间范围">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="handelOk('form')">确 定</el-button>
</div>
</el-dialog>
<!--保养弹框--> <!--保养弹框-->
<vehicleMaintenanceModal v-if="baoyang" :currentItem="currentItem" v-on:baoyangDialogEvent = "baoyangDialogEvent"></vehicleMaintenanceModal> <vehicleMaintenanceModal v-if="baoyang" :currentItem="currentItem" v-on:baoyangDialogEvent = "baoyangDialogEvent"></vehicleMaintenanceModal>
...@@ -86,6 +102,9 @@ ...@@ -86,6 +102,9 @@
import rentOrderDetailModal from "../../order/modal/rentOrderDetailModal";//租车订单详情 import rentOrderDetailModal from "../../order/modal/rentOrderDetailModal";//租车订单详情
import tourOrderDetailModal from "../../order/modal/tourOrderDetailModal";//房车游订单详情 import tourOrderDetailModal from "../../order/modal/tourOrderDetailModal";//房车游订单详情
import disableModal from "./disableModal";//禁用弹框 import disableModal from "./disableModal";//禁用弹框
import {
bookPlan
} from 'api/vehicle/vehicleSchedulManage';
import { import {
getVehicleOrderDetail getVehicleOrderDetail
} from 'api/vehicle/vehicleSchedulManage'; } from 'api/vehicle/vehicleSchedulManage';
...@@ -121,19 +140,17 @@ ...@@ -121,19 +140,17 @@
}, },
data() { data() {
return { return {
currentItem: {},//当前操作表单
dialogVisible: false,//记录详情 dialogVisible: false,//记录详情
form: { reAnpai: false,//重新安排
vehicleId: null, pickerOptions0: {
numberPlate: null, disabledDate(time) {
operator: null, return time.getTime() < Date.now() - 8.64e7;
date: null, }
mileage: null, },
amount: null, form:{
approvers: null, times: [],//起止日期
branchCompanyId: null, vehicleId: undefined,//车型id
branchCompanyName: null, bookRecordId: undefined,//预定记录id
upkeepItems: []
}, },
list: null, list: null,
total: null, total: null,
...@@ -156,6 +173,12 @@ ...@@ -156,6 +173,12 @@
rentCostDetail: {},//租车订单费用明细 rentCostDetail: {},//租车订单费用明细
tourDialogVisible: false,//旅游订单弹框 tourDialogVisible: false,//旅游订单弹框
tourRow: {},//旅游订单详情-当前行 tourRow: {},//旅游订单详情-当前行
rules: {
times: {
required: true,
message: '请选择时间',
}
}
} }
}, },
created() { created() {
...@@ -169,6 +192,51 @@ ...@@ -169,6 +192,51 @@
handleFilter() { handleFilter() {
this.getList(); this.getList();
}, },
/**
* 重新排期
* */
getLogInfo(row){
this.form.vehicleId = row.vehicleId;
this.form.bookRecordId = row.id;
this.form.times = [row.bookStartDate, row.bookEndDate];
this.reAnpai = true;
},
/**
* 弹框-取消
* */
cancel() {
this.reAnpai = false;
},
/**
* 确定用车
* */
handelOk(formName){
const set = this.$refs;
console.log(this.form.times);
set[formName].validate(valid => {
if (valid) {
let params = {
vehicleId:this.form.vehicleId,
bookStartDate: formatDate(this.form.times[0], "yyyy-MM-dd hh")+":00:00",//预定开始时间
bookEndDate: formatDate(this.form.times[1], "yyyy-MM-dd hh")+":00:00",//预定结束时间
vehicleBookRecordId: this.form.bookRecordId,//预订记录id
};
bookPlan(params).then(response => {
if (response.status === 200) {
this.reAnpai = false;
this.getList();
} else {
this.$notify({
title: '失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
}
})
}
})
},
/** /**
* 点击事件 * 点击事件
* */ * */
......
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