Commit 24086b1a authored by denghr's avatar denghr

驳回理由、排班按钮权限、车辆信息车辆状态修改

parent 15b155f0
......@@ -24,10 +24,11 @@ export function prove(id) {
});
}
export function reject(id) {
export function reject(obj) {
return fetch({
url: '/vehicle/vehicleInfo/book/4employee/reject/' + id,
method: 'put'
url: '/vehicle/vehicleInfo/book/4employee/reject',
method: 'put',
data: obj
});
}
......
......@@ -36,7 +36,7 @@ export function delObj(id) {
export function book(param) {
return fetch({
url: '/vehicle/vehicleInfo/book/4employee',
url: '/vehicle/vehicleInfo/apply/book/vehicle',
method: 'post',
data: param
})
......
......@@ -598,7 +598,8 @@
set[formName].validate(valid => {
if (valid) {
addObj(this.form)
.then(() => {
.then(res => {
if(res.status==200){
this.dialogFormVisible = false;
this.getList();
this.$notify({
......@@ -607,6 +608,15 @@
type: 'success',
duration: 2000
});
}else{
this.$notify({
title: '失败',
message: res.message,
type: 'error',
duration: 2000
});
}
})
} else {
return false;
......@@ -621,8 +631,8 @@
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
this.dialogFormVisible = false;
putObj(this.form).then(() => {
putObj(this.form).then(res => {
if(res.status==200){
this.dialogFormVisible = false;
this.getList();
this.$notify({
......@@ -631,6 +641,14 @@
type: 'success',
duration: 2000
});
}else{
this.$notify({
title: '失败',
message: res.message,
type: 'error',
duration: 2000
});
}
});
} else {
return false;
......
......@@ -31,8 +31,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="配车:">
<span style="margin-right: 10px;">{{form.vehicleNumberPlat}}</span>
<!-- <el-button size="small" type="primary" icon="edit" @click="resetCar">重新配车</el-button> -->
<span style="margin-right: 10px;">{{form.vehicleNumberPlat}}</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>
......@@ -43,7 +42,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="">
<el-form-item label="" label-width="10px">
<span>{{form.orderRentVehicleDetail.startAddr}}</span>
</el-form-item>
</el-col>
......@@ -60,7 +59,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="">
<el-form-item label="" label-width="10px">
<span>{{form.orderRentVehicleDetail.endAddr}}</span>
</el-form-item>
</el-col>
......@@ -129,6 +128,7 @@
},
data() {
return {
updateNumberPlat:false,//是否重新配车
dialogVisible: false,
resetCarVisible:false,
resetCarForm:{
......@@ -150,7 +150,7 @@
watch: {
dialogVisible(newValue, oldValue){
if(!newValue){
this.$emit("rentOrderDetailDialogEvent", false);
this.$emit("rentOrderDetailDialogEvent", this.updateNumberPlat);
}
},
},
......@@ -205,6 +205,7 @@
});
this.resetCarVisible = false
this.form.vehicleNumberPlat = this.resetCarForm.numberPlate
this.updateNumberPlat = true
} else {
this.$notify({
title: '失败',
......
......@@ -156,13 +156,13 @@
<p class="stepTitle">
<template v-if="item.status==1">
<div class="picBox">
<div style="flex: 1">15000押金退还已申请</div>
<div style="flex: 1">{{item.restAmount}}押金退还已申请</div>
<div style="font-size: 10px;color: #999">{{item.updTimeStr}}</div>
</div>
</template>
<template v-if="item.status==2">
<div class="picBox">
<div style="flex: 1">15000元押金退还到账</div>
<div style="flex: 1">{{item.restAmount}}元押金退还到账</div>
<div style="font-size: 10px;color: #999">{{item.updTimeStr}}</div>
</div>
</template>
......@@ -512,7 +512,9 @@
* */
rentOrderDetailDialogEvent(e){
this.rentDialogVisible = false;
if(e){
this.getList()
}
},
/**
* 操作-违章查询按钮,显示违章弹框
......
......@@ -384,6 +384,17 @@
</div>
</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">
<el-input type="textarea" v-model="rejectFrom.rejectRemark" placeholder="请输入驳回理由"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="rejectBtn('rejectDialogFrom')">确 定</el-button>
</div>
</el-dialog>
<!-- 出车对话框相关html元素 -->
<el-dialog title="出车" :visible.sync="dialogForm4LiftVisible">
<el-form :model="departureForm" :rules="departureFormrules" ref="departureForm" label-width="120px">
......@@ -604,6 +615,19 @@
},
data() {
return {
rejectVisible:false,
rejectFrom:{
vehicleBookRecordId:'',
rejectRemark:''
},
rejectRules:{
rejectRemark:{
type: "string",
required: true,
message: "请输入拒绝原因",
trigger: "blur"
}
},
BASE_API: process.env.BASE_API,
departureFormrules:{
checkMan:{
......@@ -1231,43 +1255,45 @@
});
});
},
handleReject(row) {
this.$confirm('确定拒绝申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
reject(row.id)
rejectBtn(formName) {
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
reject(this.rejectFrom)
.then(response => {
if (response.code === rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED) {
this.$notify({
title: '失败',
message: rsCode.msg[rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED],
type: 'error',
duration: 2000
});
} else if (response.code === rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED) {
this.$notify({
title: '失败',
message: rsCode.msg[rsCode.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED],
type: 'error',
duration: 2000
});
} else if (response.code === rsCode.RS_CODE_SUC) {
if (response.code == 1) {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
if(this.rejectVisible){
this.rejectVisible = false
}
if(this.dialogDetailVisible){
this.dialogDetailVisible = false
}
}else{
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
this.getList();
});
} else {
return false;
}
});
},
handleReject(row) {
this.rejectVisible = true;
this.rejectFrom.vehicleBookRecordId = row.id;
this.rejectFrom.rejectRemark = '';
},
/**
* 操作-出车
* @param row
......
......@@ -182,9 +182,9 @@
type="index"
align="center" label="序号" width="65">
</el-table-column>
<el-table-column width="400" align="center" label="车辆编码">
<el-table-column width="200" align="center" label="车辆编码">
<template scope="scope">
<span>{{scope.row.id}}</span>
<span>{{scope.row.code}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="车牌">
......@@ -1769,7 +1769,20 @@
return this.vehicleStatus[code].val;
},
getAllVehicleStatus: function () {
return this.vehicleStatus;
return {
1: {
code: 1,
val: '正常运行'
},
3: {
code: 3,
val: '报废'
},
4: {
code: 4,
val: '出车'
}
};
},
getBrand: function (code) {
if (!this.$utils.isInteger(code) || code == VEHICLE_CONSTANT_BRAND_CODE_UNKOWN) {
......
......@@ -16,6 +16,13 @@
<el-form-item label="车牌">
<el-input v-model="listQuery.numberPlate" placeholder="请输入车牌"></el-input>
</el-form-item>
<el-form-item label="用途">
<el-select class="filter-item" v-model="listQuery.useType" placeholder="请选择用途">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="item in useTypeList" :key="item.code" :label="item.val"
:value="item.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属地区" prop="zoneId">
<el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
......@@ -33,7 +40,7 @@
</el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
</el-row>
<el-row>
<!-- <el-row> -->
<!-- <el-col :span="8">
<el-form-item label="所属分公司" prop="subordinateBranch">
<el-select class="filter-item" v-model="listQuery.subordinateBranch" placeholder="请选择" @change="getAllBranchCompanyChange">
......@@ -71,7 +78,7 @@
></el-autocomplete>
</el-form-item>
</el-col> -->
</el-row>
<!-- </el-row> -->
</el-form>
</div>
<el-form label-width="100px" v-if="countTJ">
......@@ -419,6 +426,7 @@
startTime: undefined,
endTime:undefined,
status: undefined,//车辆状态
useType:undefined,//用途
},
inline: true,
mar: null,//滚屏
......@@ -441,6 +449,16 @@
rentCostDetail: {},//租车订单费用明细
tourDialogVisible: false,//旅游订单弹框
tourRow: {},//旅游订单详情-当前行
useTypeList:[
{
code:1,
val:'租赁'
},
{
code:2,
val:'自用'
}
]
}
},
created() {
......
......@@ -79,7 +79,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="handelOk('form')" v-if="vehicleInfo_btn_apply">确 定</el-button>
<el-button type="primary" @click="handelOk('form')" v-if="vehicleSchedulManage_btn_add_plan">确 定</el-button>
</div>
</el-dialog>
</template>
......@@ -191,12 +191,12 @@
message: '请选择时间',
}
},
vehicleInfo_btn_apply: false,//申请预定
vehicleSchedulManage_btn_add_plan: false,//申请预定
}
},
created() {
console.log(this.currentItem);
this.vehicleInfo_btn_apply = this.elements['vehicleInfo:btn_apply'];
this.vehicleSchedulManage_btn_add_plan = this.elements['vehicleSchedulManage:btn_add_plan'];
getAll()
.then(response => {
this.allCompaniesArr = response.data;
......
......@@ -76,7 +76,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="handelOk('form')" v-if="vehicleInfo_btn_apply">确 定</el-button>
<el-button type="primary" @click="handelOk('form')" v-if="vehicleSchedulManage_btn_add_plan">确 定</el-button>
</div>
</el-dialog>
......@@ -180,11 +180,11 @@
message: '请选择时间',
}
},
vehicleInfo_btn_apply:false,
vehicleSchedulManage_btn_add_plan:false,
}
},
created() {
this.vehicleInfo_btn_apply = this.elements['vehicleInfo:btn_apply'];
this.vehicleSchedulManage_btn_add_plan = this.elements['vehicleSchedulManage:btn_add_plan'];
},
computed: {
...mapGetters([
......
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