Commit 6b0d1afb authored by denghr's avatar denghr

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

parent cc9ad312
...@@ -76,7 +76,16 @@ export function getSysRegionByIds(ids) { ...@@ -76,7 +76,16 @@ export function getSysRegionByIds(ids) {
export function getSysRegionById(id) { export function getSysRegionById(id) {
return fetch({ return fetch({
url: '/vehicle/sysRegion/getSysRegionById//' + id, url: '/vehicle/sysRegion/getSysRegionById/' + id,
method: 'get' method: 'get'
}); });
} }
//重新配车
export function editObj(param) {
return fetch({
url: '/api/order/baseOrder/bg/change-vehicle',
method: 'post',
data: param
});
}
...@@ -64,6 +64,21 @@ ...@@ -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> <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-upload>
</el-form-item> </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-form-item label="轮播图" :style="{display:'block'}">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
...@@ -156,6 +171,8 @@ ...@@ -156,6 +171,8 @@
}, },
data() { data() {
return { return {
imgPosterFlag:false,
percent_poster:0,
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
defaultMsg: '这里是UE测试', defaultMsg: '这里是UE测试',
config: { config: {
...@@ -189,6 +206,7 @@ ...@@ -189,6 +206,7 @@
configure: '',//配套&收费 configure: '',//配套&收费
campsiteTagListVos: [],//营地类型 campsiteTagListVos: [],//营地类型
carouse:[],//banner轮播 carouse:[],//banner轮播
posterBackground:'',//海报背景
}, },
showCampsiteVisible: false,//编辑营地地址 showCampsiteVisible: false,//编辑营地地址
rules: { rules: {
...@@ -316,6 +334,7 @@ ...@@ -316,6 +334,7 @@
address: this.campsiteObj.address,//详细地址 address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude, latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude, longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
}; };
console.log(params); console.log(params);
this.isExistCampsiteShop("create", params); this.isExistCampsiteShop("create", params);
...@@ -395,6 +414,7 @@ ...@@ -395,6 +414,7 @@
address: this.campsiteObj.address,//详细地址 address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude, latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude, longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
}; };
console.log(params); console.log(params);
this.isExistCampsiteShop("update", params); this.isExistCampsiteShop("update", params);
...@@ -599,6 +619,22 @@ ...@@ -599,6 +619,22 @@
this.fileList2.push({url:res.data}); this.fileList2.push({url:res.data});
this.form.carouse.push({imgUrl: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 @@ ...@@ -625,6 +661,7 @@
configure: '',//配套&收费 configure: '',//配套&收费
campsiteTagListVos: [],//营地类型 campsiteTagListVos: [],//营地类型
carouse:[],//banner轮播 carouse:[],//banner轮播
posterBackground:''
}; };
this.showCampsiteVisible= false;//编辑营地地址 this.showCampsiteVisible= false;//编辑营地地址
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="配车:"> <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-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -94,6 +94,19 @@ ...@@ -94,6 +94,19 @@
</tr> </tr>
</table> </table>
</el-form> </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> </el-dialog>
</template> </template>
...@@ -103,6 +116,7 @@ ...@@ -103,6 +116,7 @@
import ElCol from "element-ui/packages/col/src/col"; import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue"; 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 ElForm from "../../../../node_modules/element-ui/packages/form/src/form.vue";
import {editObj} from 'api/vehicle/vehicleInfo';
export default { export default {
props: ["form", "rentCostDetail"], props: ["form", "rentCostDetail"],
name: 'rentOrderDetailModal', name: 'rentOrderDetailModal',
...@@ -114,7 +128,22 @@ ...@@ -114,7 +128,22 @@
}, },
data() { data() {
return { return {
dialogVisible: false dialogVisible: false,
resetCarVisible:false,
resetCarForm:{
no:'',
numberPlate:'',//重新配车车牌号
},
rules: {
numberPlate: [
{
type: 'string',
required: true,
message: '请输入车牌号',
trigger: 'blur'
}
]
},
} }
}, },
watch: { watch: {
...@@ -143,7 +172,52 @@ ...@@ -143,7 +172,52 @@
} }
}, },
methods: { 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> </script>
...@@ -177,4 +251,14 @@ ...@@ -177,4 +251,14 @@
.order-details .el-form-item{ .order-details .el-form-item{
margin-bottom: 10px !important; margin-bottom: 10px !important;
} }
.modal_modal{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
background: #000;
z-index: 2000;
}
</style> </style>
...@@ -512,6 +512,7 @@ ...@@ -512,6 +512,7 @@
* */ * */
rentOrderDetailDialogEvent(e){ rentOrderDetailDialogEvent(e){
this.rentDialogVisible = false; this.rentDialogVisible = false;
this.getList()
}, },
/** /**
* 操作-违章查询按钮,显示违章弹框 * 操作-违章查询按钮,显示违章弹框
......
...@@ -1302,13 +1302,15 @@ ...@@ -1302,13 +1302,15 @@
this.departureForm.departureDate = Date(); this.departureForm.departureDate = Date();
this.departureForm.departureBranchCompanyId = row.liftCompany this.departureForm.departureBranchCompanyId = row.liftCompany
this.departureForm.departureBranchCompanyName = row.liftCompanyName this.departureForm.departureBranchCompanyName = row.liftCompanyName
if(row.vehicleDepartureLogVo!=undefined){ this.departureForm.user = row.vehicleUsername
this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:'' this.departureForm.userTel = row.vehicleUserPhone
this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:'' // if(row.vehicleDepartureLogVo!=undefined){
}else{ // this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:''
this.departureForm.user = '' // this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:''
this.departureForm.userTel = '' // }else{
} // this.departureForm.user = ''
// this.departureForm.userTel = ''
// }
this.departureForm.expectArrivalBranchCompanyId = row.retCompany this.departureForm.expectArrivalBranchCompanyId = row.retCompany
this.departureForm.expectArrivalBranchCompanyName = row.retCompanyName this.departureForm.expectArrivalBranchCompanyName = row.retCompanyName
this.dialogForm4LiftVisible = true; this.dialogForm4LiftVisible = true;
......
...@@ -182,25 +182,30 @@ ...@@ -182,25 +182,30 @@
type="index" type="index"
align="center" label="序号" width="65"> align="center" label="序号" width="65">
</el-table-column> </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"> <template scope="scope">
<span>{{scope.row.numberPlate}}</span> <span>{{scope.row.numberPlate}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="车辆状态"> <el-table-column width="200" align="center" label="车辆状态">
<template scope="scope"> <template scope="scope">
<span>{{getVehicleStatus(scope.row.status)}}</span> <span>{{getVehicleStatus(scope.row.status)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center" label="车辆品牌"> <el-table-column width="200" align="center" label="车辆品牌">
<template scope="scope"> <template scope="scope">
<span>{{getBrand(scope.row.brand)}}</span> <span>{{getBrand(scope.row.brand)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" align="center" label="停靠分公司"> <el-table-column width="200" align="center" label="停靠分公司">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.parkBranchCompanyName}}</span> <span>{{scope.row.parkBranchCompanyName}}</span>
</template> </template>
...@@ -218,11 +223,11 @@ ...@@ -218,11 +223,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="备注"> <!-- <el-table-column align="center" label="备注">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.remark}}</span> <span>{{scope.row.remark}}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column width="200" align="center" v-if="showMoreMoreCol" label="车架号"> <el-table-column width="200" align="center" v-if="showMoreMoreCol" label="车架号">
...@@ -630,7 +635,7 @@ ...@@ -630,7 +635,7 @@
<el-input v-model="form4Apply.vehicleUsername" placeholder="请输入使用人"></el-input> <el-input v-model="form4Apply.vehicleUsername" placeholder="请输入使用人"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系方式" prop="vehicleUserPhone"> <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>
<el-form-item label="用途" prop="bookType"> <el-form-item label="用途" prop="bookType">
<el-select class="filter-item" v-model="form4Apply.bookType" placeholder="请选择用途"> <el-select class="filter-item" v-model="form4Apply.bookType" placeholder="请选择用途">
...@@ -1046,6 +1051,9 @@ ...@@ -1046,6 +1051,9 @@
required: true, required: true,
message: '请输入使用人联系方式', message: '请输入使用人联系方式',
trigger: 'blur' trigger: 'blur'
},{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号'
} }
], ],
bookType:[ bookType:[
......
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