Commit 7354dfb2 authored by denghr's avatar denghr

随车物品和车辆排班修改

parent a099a446
......@@ -4,10 +4,8 @@ import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/vehicle/accompanyingItem/page',
method: 'get',
params: {
queryAccompanyItemVoJson: JSON.stringify(query)
}
method: 'post',
data: query
});
}
......
......@@ -51,3 +51,14 @@ export function getLog(id) {
method: 'get'
})
}
/**
*
* 获取保养类型
*/
export function getUpkeepAll() {
return fetch({
url: '/vehicle/upkeep/item/all',
method: 'get',
});
}
......@@ -58,12 +58,13 @@
<div class="carEarlyWarning" style="padding-bottom:30px">
<div class="carEarlyWarningTitle" style="display: flex;justify-content: space-between;margin-bottom:20px">
<div style="flex:1">车辆排班</div>
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
<div style="color: rgb(87, 81, 96);font-family: 微软雅黑;font-weight: 400;font-style: normal;font-size: 14px;">
<span class="tip-co bg-1"></span><span>租房车</span>
<span class="tip-co bg-1"></span><span>租房车/客户用车</span>
<span class="tip-co bg-5"></span><span>房车游</span>
<span class="tip-co bg-4"></span><span>展览</span>
<span class="tip-co bg-6"></span><span>保养</span>
<span class="tip-co bg-6"></span><span>保养/维修</span>
<span class="tip-co bg-10"></span><span>其他</span>
<span class="tip-co bg-7"></span><span>预约中</span>
<span class="tip-co bg-8"></span><span>禁用</span>
</div>
......@@ -179,24 +180,33 @@
.tip-co:first-child{
margin-left: 0;
}
/*1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用*/
/* 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他 */
.bg-1{
background: #20a0ff;
}
.bg-9{
background: #20a0ff;
}
.bg-5{
background: #6633cc;
}
.bg-4{
background: #00cc66;
}
.bg-3{
background: #ff6633;
}
.bg-6{
background: #ff6633;
}
.bg-7{
background: #cff1f6;
background: #ffcc00;
}
.bg-8{
background: #d7d7d7;
background: #868686;
}
.bg-10{
background: #ff6699;
}
.ii-day{
height: 3px;
......@@ -535,7 +545,7 @@
* 点击事件
* */
toShowDialog(item, iitem, ii){
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用9、客户用车、10、其他-->
if(!ii.bg){
//空白-可安排用车
// this.anpai = true;
......@@ -547,18 +557,25 @@
//保养
this.baoyang = true;
this.currentItem = {item: item, iitem: iitem, ii: ii};
} else if(ii.bookType == 3){
//维修
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "维修",upkeepName:'维修'};
} else if(ii.bookType == 4){
//展览
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "展览用车"};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "展览用车",upkeepName:'展览'};
} else if(ii.bookType == 7){
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车"};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车",upkeepName:'预定'};
} else if(ii.bookType == 1){
this.getOneVechi(ii.vehicleBookRecord.orderNo);
// this.rentOrder = true;
// this.rentOrderInfo = {};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "租车订单"};
} else if(ii.bookType == 9){
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "客户用车",upkeepName:'客户用车'};
} else if(ii.bookType == 5) {
//房车游订单详情
this.tourRow = {no: ii.vehicleBookRecord.orderNo};
......@@ -567,6 +584,9 @@
//禁用
this.jinyong = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "禁用"};
} else if(ii.bookType == 10) {
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "其他",upkeepName:'其他'};
}
}
},
......@@ -943,7 +963,7 @@
pp.h = h;
item.vehicleBookRecord.map(function (iitem) {
if (iitem.bookStartDate <= tt && iitem.bookEndDate >=tt) {
// <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
if(iitem.bookStartDate == tt && (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4)){//租车、旅游、展览显示起止时间
pp.timeStr = h;
}
......
......@@ -21,7 +21,7 @@
<span>{{currentItem.ii.vehicleBookRecord.bookStartDate}}~{{currentItem.ii.vehicleBookRecord.bookEndDate}}</span>
</el-form-item>
<el-form-item label="用途:">
<span>{{currentItem.title == "展览用车"?"展览": currentItem.title == "预定用车"?"预定":""}}</span>
<span>{{currentItem.upkeepName}}</span>
</el-form-item>
<el-form-item label="申请说明:">
<span>{{currentItem.ii.vehicleBookRecord.remark}}</span>
......
......@@ -51,6 +51,12 @@
</template>
</el-table-column>
<el-table-column align="center" label="价格">
<template scope="scope">
<span>{{scope.row.price}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="最后更新时间">
<template scope="scope">
<span>{{scope.row.updateTime?scope.row.updateTime:scope.row.createTime}}</span>
......@@ -78,7 +84,7 @@
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form :model="form" :rules="rules" ref="form" label-width="120px">
<el-form-item label="名称">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称"></el-input>
</el-form-item>
......@@ -89,6 +95,10 @@
</el-select>
</el-form-item>
<el-form-item label="价格" prop="price">
<el-input v-model="form.price" placeholder="请输入价格"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="5" v-model="form.remark" placeholder="请输入备注信息"></el-input>
</el-form-item>
......@@ -131,6 +141,7 @@
form: {
name: undefined,
type: undefined,
price:undefined
},
rules: {
name: [
......@@ -148,6 +159,17 @@
message: '长度小于 2000 个字符',
trigger: 'blur'
}
],
price: [
{
type: 'string',
required: true,
message: '请输入输入价格',
trigger: 'blur'
},{
pattern: /^\d+$|^\d*\.\d+$/,
message: '请输入正确的价格'
}
]
},
list: null,
......@@ -208,6 +230,7 @@
})
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
......@@ -322,7 +345,8 @@
resetTemp() {
this.form = {
name: undefined,
type: undefined
type: undefined,
price:undefined
};
}
}
......
......@@ -276,12 +276,10 @@
<el-col :span="24">
<el-form-item label="出车用途">
<span v-if="detailItem.bookType==1">租车</span>
<span v-if="detailItem.bookType==2">用户租赁</span>
<span v-if="detailItem.bookType==3">维修</span>
<span v-if="detailItem.bookType==4">展览</span>
<span v-if="detailItem.bookType==5">旅游</span>
<span v-if="detailItem.bookType==6">保养</span>
<span v-if="detailItem.bookType==7">预约中</span>
<span v-if="detailItem.bookType==8">禁用</span>
<span v-if="detailItem.bookType==9">客户用车</span>
<span v-if="detailItem.bookType==10">其他</span>
......
......@@ -320,18 +320,18 @@
<el-table-column align="center" label="操作" width="380" fixed="right">
<template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small"@click="handleUpdate(scope.row)">{{vehicleInfo_btn_edit?"编辑":"查看"}}
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleUpdate(scope.row)">{{vehicleInfo_btn_edit?"编辑":"查看"}}
</el-button>
<!-- <el-button v-if="scope.row.status == 1&&vehicleInfo_btn_ride" size="small" class="el-button el-button--text el-button--small" @click="departureHandler(scope.row)">出车
</el-button> -->
<!-- <el-button v-if="scope.row.status == 4" size="small" class="el-button el-button--text el-button--small" @click="arrivalHandler(scope.row)">收车
</el-button> -->
<el-button v-if="scope.row.status == 1" size="small" class="el-button el-button--text el-button--small" @click="upkeepHandler(scope.row)">保养
<!-- <el-button v-if="scope.row.status == 1" size="small" class="el-button el-button--text el-button--small" @click="upkeepHandler(scope.row)">保养
</el-button>
<el-button v-if="scope.row.status == 5" size="small" class="el-button el-button--text el-button--small" @click="upkeepEndHandler(scope.row)">
保养结束
</el-button>
</el-button> -->
<el-button v-if="vehicleInfo_btn_apply && checkIfRuning(scope.row) " size="small" class="el-button el-button--text el-button--small"
@click="handleApply(scope.row)">申请预订
......@@ -638,10 +638,15 @@
<el-option v-for="(val, key, index) in book_type_list " :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="保养项目" prop="upkeepIds" v-if="form4Apply.bookType==6">
<el-checkbox-group v-model="form4Apply.upkeepIds">
<el-checkbox v-for="item in allUpkeepItems" :label="item.id" :key="item.id">{{item.name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="目的地" prop="destination">
<el-input v-model="form4Apply.destination" placeholder="请输入目的地"></el-input>
</el-form-item>
<el-form-item label="随行物品" prop="selectedAccItem">
<el-form-item label="随行物品" prop="selectedAccItem" v-if="form4Apply.bookType!=3&&form4Apply.bookType!=6&&form4Apply.bookType!=8&&form4Apply.bookType!=10">
<el-input type="textarea" v-model="getSelectedAccItemStr" :rows="5" icon="menu" @focus="handleAccItemSelect"
clearable placeholder="请选择随行物品"
></el-input>
......@@ -742,7 +747,8 @@
} from 'api/vehicle/active';
import {
getAllUpkeepItem
getAllUpkeepItem,
getUpkeepAll
} from 'api/vehicle/upkeep';
import {
......@@ -902,9 +908,6 @@
{
name:'租车',
id:1
},{
name:'用户租赁',
id:2
},{
name:'维修',
id:3
......@@ -917,9 +920,6 @@
},{
name:'保养',
id:6
},{
name:'预约中',
id:7
},{
name:'禁用',
id:8
......@@ -947,6 +947,7 @@
bookType:undefined,
vehicleUsername:undefined,
vehicleUserPhone:undefined,
upkeepIds:[],
},
pickerOptions4Apply: {
disabledDate: this.checkBookDate
......@@ -1177,7 +1178,7 @@
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
getAllUpkeepItem().then(response => {
getUpkeepAll().then(response => {
this.allUpkeepItems = response.data;
});
this.vehicleInfo_btn_edit = this.elements['vehicleInfo:btn_edit'];
......@@ -1992,6 +1993,18 @@
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
if(this.form4Apply.bookType==6){
if(this.form4Apply.upkeepIds.length==0){
this.$notify({
title: '警告',
message: '请选择保养项目',
type: 'warning',
duration: 2000
});
return false;
}
}
this.form4Apply.upkeepIds = this.form4Apply.bookType==6?this.form4Apply.upkeepIds.join(","):''
this.dialogFormVisible = false;
book(this.form4Apply).then(() => {
this.dialogForm4ApplyVisible = false;
......@@ -2084,6 +2097,7 @@
bookType:undefined,
vehicleUsername:undefined,
vehicleUserPhone:undefined,
upkeepIds:[],
};
},
resetTemp4BookInfo() {
......
......@@ -90,12 +90,13 @@
</ul>
</div>
<!--车辆排班-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
<div style="display: flex;margin-bottom: 20px;">
<span class="tip-co bg-1"></span><span>租房车</span>
<span class="tip-co bg-1"></span><span>租房车/客户用车</span>
<span class="tip-co bg-5"></span><span>房车游</span>
<span class="tip-co bg-4"></span><span>展览</span>
<span class="tip-co bg-6"></span><span>保养</span>
<span class="tip-co bg-6"></span><span>保养/维修</span>
<span class="tip-co bg-10"></span><span>其他</span>
<span class="tip-co bg-7"></span><span>预约中</span>
<span class="tip-co bg-8"></span><span>禁用</span>
</div>
......@@ -162,24 +163,33 @@
.tip-co:first-child{
margin-left: 0;
}
/*1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用*/
/* 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他 */
.bg-1{
background: #20a0ff;
}
.bg-9{
background: #20a0ff;
}
.bg-5{
background: #6633cc;
}
.bg-4{
background: #00cc66;
}
.bg-3{
background: #ff6633;
}
.bg-6{
background: #ff6633;
}
.bg-7{
background: #cff1f6;
background: #ffcc00;
}
.bg-8{
background: #d7d7d7;
background: #868686;
}
.bg-10{
background: #ff6699;
}
.ii-day{
height: 3px;
......@@ -470,7 +480,7 @@
* 点击事件
* */
toShowDialog(item, iitem, ii){
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用9、客户用车、10、其他-->
if(!ii.bg){
//空白-可安排用车
this.anpai = true;
......@@ -482,18 +492,25 @@
//保养
this.baoyang = true;
this.currentItem = {item: item, iitem: iitem, ii: ii};
} else if(ii.bookType == 3){
//维修
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "维修",upkeepName:'维修'};
} else if(ii.bookType == 4){
//展览
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "展览用车"};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "展览用车",upkeepName:'展览'};
} else if(ii.bookType == 7){
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车"};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车",upkeepName:'预定'};
} else if(ii.bookType == 1){
this.getOneVechi(ii.vehicleBookRecord.orderNo);
// this.rentOrder = true;
// this.rentOrderInfo = {};
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "租车订单"};
}else if(ii.bookType == 9){
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "客户用车",upkeepName:'客户用车'};
} else if(ii.bookType == 5) {
//房车游订单详情
this.tourRow = {no: ii.vehicleBookRecord.orderNo};
......@@ -502,6 +519,9 @@
//禁用
this.jinyong = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "禁用"};
} else if(ii.bookType == 10) {
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "其他",upkeepName:'其他'};
}
}
},
......@@ -829,7 +849,7 @@
pp.h = h;
item.vehicleBookRecord.map(function (iitem) {
if (iitem.bookStartDate <= tt && iitem.bookEndDate >=tt) {
// <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
if(iitem.bookStartDate == tt && (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4)){//租车、旅游、展览显示起止时间
pp.timeStr = h;
}
......
......@@ -21,16 +21,16 @@
<span>{{currentItem.ii.vehicleBookRecord.bookStartDate}}~{{currentItem.ii.vehicleBookRecord.bookEndDate}}</span>
</el-form-item>
<el-form-item label="用途:">
<span>{{currentItem.title == "展览用车"?"展览": currentItem.title == "预定用车"?"预定":""}}</span>
<span>{{currentItem.upkeepName}}</span>
</el-form-item>
<el-form-item label="申请说明:">
<span>{{currentItem.ii.vehicleBookRecord.remark}}</span>
</el-form-item>
</el-form>
<div slot="footer" v-if='currentItem.title == "展览用车" && currentItem.ii.vehicleBookRecord.status==2' class="dialog-footer">
<div slot="footer" v-if='currentItem.ii.vehicleBookRecord.status==2' class="dialog-footer">
<el-button @click="cancel()">取消用车</el-button>
</div>
<div slot="footer" v-if='currentItem.title == "预定用车" && currentItem.ii.vehicleBookRecord.status==1' class="dialog-footer">
<div slot="footer" v-if='currentItem.ii.vehicleBookRecord.status==1' class="dialog-footer">
<el-button type="primary" @click="agree()">同 意</el-button>
<el-button @click="notAgree()">不同意</el-button>
</div>
......
......@@ -57,7 +57,7 @@
<!--:value="item.code"></el-option>-->
</el-select>
</el-form-item>
<el-form-item label="保养类型" prop="upkeepIds" v-if="form.bookType==6">
<el-form-item label="保养项目" prop="upkeepIds" v-if="form.bookType==6">
<el-checkbox-group v-model="form.upkeepIds">
<el-checkbox v-for="item in upkeepList" :label="item.id" :key="item.id">{{item.name}}</el-checkbox>
</el-checkbox-group>
......
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