Commit 6b0d1afb authored by denghr's avatar denghr

营地背景海报、车辆重新分配

parent cc9ad312
......@@ -76,7 +76,16 @@ export function getSysRegionByIds(ids) {
export function getSysRegionById(id) {
return fetch({
url: '/vehicle/sysRegion/getSysRegionById//' + id,
url: '/vehicle/sysRegion/getSysRegionById/' + id,
method: 'get'
});
}
//重新配车
export function editObj(param) {
return fetch({
url: '/api/order/baseOrder/bg/change-vehicle',
method: 'post',
data: param
});
}
......@@ -64,6 +64,21 @@
<i v-else class="el-icon-plus avatar-uploader-icon" style="lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"></i>
</el-upload>
</el-form-item>
<el-form-item label="海报背景" :style="{display:'block'}">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list="false"
:on-success="handlePosterSuccess"
:on-progress="uploadPosterProcess"
list-type="picture">
<div slot="tip" class="el-upload__tip"> <span style="color: red;">建议尺寸:485*485px</span></div>
<el-progress v-show="imgPosterFlag == true" type="circle" :percentage="percent_poster" style="margin-top: 20px"></el-progress>
<img v-if="$utils.isString(form.posterBackground) && !$utils.isEmpty(form.posterBackground)&& !imgPosterFlag" :src="form.posterBackground" style="width:300px;max-height:300px;">
<i v-else-if="!imgPosterFlag" class="el-icon-plus avatar-uploader-icon" style="lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"></i>
</el-upload>
</el-form-item>
<el-form-item label="轮播图" :style="{display:'block'}">
<el-upload
class="upload-demo"
......@@ -156,6 +171,8 @@
},
data() {
return {
imgPosterFlag:false,
percent_poster:0,
BASE_API: process.env.BASE_API,
defaultMsg: '这里是UE测试',
config: {
......@@ -189,6 +206,7 @@
configure: '',//配套&收费
campsiteTagListVos: [],//营地类型
carouse:[],//banner轮播
posterBackground:'',//海报背景
},
showCampsiteVisible: false,//编辑营地地址
rules: {
......@@ -316,6 +334,7 @@
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("create", params);
......@@ -395,6 +414,7 @@
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("update", params);
......@@ -599,6 +619,22 @@
this.fileList2.push({url:res.data});
this.form.carouse.push({imgUrl:res.data});
},
/**
* 海报背景上传
* **/
handlePosterSuccess(res, file){
this.percent_poster = 0;
this.imgPosterFlag = false;
this.form.posterBackground = res.data;
},
/**
* 海报背景图上传进度
* */
uploadPosterProcess(event, file, fileList) {
this.imgPosterFlag = true;
console.log(event.percent);
this.percent_poster = Math.floor(event.percent);
},
/**
* 清空旅游弹框数据
*/
......@@ -625,6 +661,7 @@
configure: '',//配套&收费
campsiteTagListVos: [],//营地类型
carouse:[],//banner轮播
posterBackground:''
};
this.showCampsiteVisible= false;//编辑营地地址
}
......
......@@ -31,7 +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" v-if="form.status==4">重新配车</el-button>
<span style="margin-right: 10px;">{{form.vehicleNumberPlat}}</span><el-button size="small" type="primary" icon="edit" @click="resetCar">重新配车</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -94,6 +94,19 @@
</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-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>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelResetCar">取消</el-button>
<el-button type="primary" @click="update('carForm')">确定</el-button>
</div>
</el-dialog>
</el-dialog>
</template>
......@@ -103,6 +116,7 @@
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"],
name: 'rentOrderDetailModal',
......@@ -114,7 +128,22 @@
},
data() {
return {
dialogVisible: false
dialogVisible: false,
resetCarVisible:false,
resetCarForm:{
no:'',
numberPlate:'',//重新配车车牌号
},
rules: {
numberPlate: [
{
type: 'string',
required: true,
message: '请输入车牌号',
trigger: 'blur'
}
]
},
}
},
watch: {
......@@ -143,7 +172,52 @@
}
},
methods: {
resetCar(){
this.clearFrom();
this.resetCarVisible = true
this.resetCarForm.no = this.form.no
},
cancelResetCar(){
this.resetCarVisible = false
},
clearFrom(){
this.resetCarForm = {
no:'',
numberPlate:'',//重新配车车牌号
}
},
/**
* 重新配车
* */
update(formName) {
let that = this;
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
editObj(this.resetCarForm).then(response => {
if (response.status === 200) {
this.$notify({
title: '成功',
message: '修改成功',
type: 'success',
duration: 2000
});
this.resetCarVisible = false
this.form.vehicleNumberPlat = this.resetCarForm.numberPlate
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
});
} else {
return false;
}
});
},
}
}
</script>
......@@ -177,4 +251,14 @@
.order-details .el-form-item{
margin-bottom: 10px !important;
}
.modal_modal{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
background: #000;
z-index: 2000;
}
</style>
......@@ -506,12 +506,13 @@
this.serviceCost = this.form.orderRentVehicleDetail.dayNum * 600
}
this.rentDialogVisible = true;
},
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e){
this.rentDialogVisible = false;
this.rentDialogVisible = false;
this.getList()
},
/**
* 操作-违章查询按钮,显示违章弹框
......
......@@ -1302,13 +1302,15 @@
this.departureForm.departureDate = Date();
this.departureForm.departureBranchCompanyId = row.liftCompany
this.departureForm.departureBranchCompanyName = row.liftCompanyName
if(row.vehicleDepartureLogVo!=undefined){
this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:''
this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:''
}else{
this.departureForm.user = ''
this.departureForm.userTel = ''
}
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:''
// }else{
// this.departureForm.user = ''
// this.departureForm.userTel = ''
// }
this.departureForm.expectArrivalBranchCompanyId = row.retCompany
this.departureForm.expectArrivalBranchCompanyName = row.retCompanyName
this.dialogForm4LiftVisible = true;
......
......@@ -182,25 +182,30 @@
type="index"
align="center" label="序号" width="65">
</el-table-column>
<el-table-column width="120" align="center" label="车牌">
<el-table-column width="400" align="center" label="车辆编码">
<template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="车牌">
<template scope="scope">
<span>{{scope.row.numberPlate}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="车辆状态">
<el-table-column width="200" align="center" label="车辆状态">
<template scope="scope">
<span>{{getVehicleStatus(scope.row.status)}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" label="车辆品牌">
<el-table-column width="200" align="center" label="车辆品牌">
<template scope="scope">
<span>{{getBrand(scope.row.brand)}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="停靠分公司">
<el-table-column width="200" align="center" label="停靠分公司">
<template scope="scope">
<span>{{scope.row.parkBranchCompanyName}}</span>
</template>
......@@ -218,11 +223,11 @@
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<!-- <el-table-column align="center" label="备注">
<template scope="scope">
<span>{{scope.row.remark}}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column width="200" align="center" v-if="showMoreMoreCol" label="车架号">
......@@ -630,7 +635,7 @@
<el-input v-model="form4Apply.vehicleUsername" placeholder="请输入使用人"></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="vehicleUserPhone">
<el-input v-model="form4Apply.vehicleUserPhone" placeholder="请输入使用人联系方式"></el-input>
<el-input type="number" v-model="form4Apply.vehicleUserPhone" placeholder="请输入使用人联系方式"></el-input>
</el-form-item>
<el-form-item label="用途" prop="bookType">
<el-select class="filter-item" v-model="form4Apply.bookType" placeholder="请选择用途">
......@@ -1046,6 +1051,9 @@
required: true,
message: '请输入使用人联系方式',
trigger: 'blur'
},{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号'
}
],
bookType:[
......@@ -2108,4 +2116,4 @@
}
}
}
</script>
</script>
\ No newline at end of file
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