Commit 1915df9b authored by xiaosl's avatar xiaosl

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parent 7430439e
module.exports = {
NODE_ENV: '"development"',
BASE_API:'"https://dev.dfangche.com"',//'"https://xxtest.upyuns.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
BASE_API:'"https://xxtest.upyuns.com"',//'"https://dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
APP_ORIGIN: '"https://wallstreetcn.com"'
}
......@@ -155,7 +155,22 @@ export function stockSearchPage(query) {
});
}
// 修改订单还车公司
export function updateEndCompany(params) {
return fetch({
url: '/api/order/baseOrder/updateEndCompany',
method: 'post',
data: params
});
}
// 修改预定订单还车公司
export function updateById(params) {
return fetch({
url: '/vehicle/vehicleInfo/bookRecord/updateById',
method: 'post',
data: params
});
}
export function delObj(id) {
return fetch({
url: '/vehicle/branchCompany/' + id,
......@@ -184,6 +199,7 @@ export function getDetail(id) {
method: 'get'
})
}
/**
* 获取所有公司信息
* @returns {null|*}
......
......@@ -32,3 +32,17 @@ export function add(obj) {
data:obj
})
}
export function activityIds() {
return fetch({
url: '/api/summit/imxr/ids',
method: 'get'
})
}
export function remove(id) {
return fetch({
url: '/api/summit/activity/remove/' + id,
method: 'delete'
})
}
\ No newline at end of file
......@@ -31,7 +31,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="配车:">
<span style="margin-right: 10px;">{{form.vehicleNumberPlat?form.vehicleNumberPlat:form.vehicalNumberPlat}}</span><el-button size="small" type="primary" icon="edit" v-if="form.status==4" @click="resetCar">重新配车</el-button>
<span
style="margin-right: 10px;"
>{{form.vehicleNumberPlat?form.vehicleNumberPlat:form.vehicalNumberPlat}}</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>
......@@ -42,7 +51,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" label-width="10px">
<el-form-item label label-width="10px">
<span>{{form.orderRentVehicleDetail.startAddr}}</span>
</el-form-item>
</el-col>
......@@ -59,18 +68,22 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="" label-width="10px">
<el-form-item label label-width="10px">
<span>{{form.orderRentVehicleDetail.endAddr}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交车公司:">
<el-form-item label="还车公司:">
<span>{{form.endCompanyName}}</span>
<el-button v-show="form.status == 4 || form.status == 5" size="mini" type="primary" style="padding: 7px 9px;" @click="resetReturn = true">更换</el-button>
</el-form-item>
</el-col>
</el-row>
<table class="orderDetail">
<tr><th>房车</th><th>租借天数</th><th>费用明细</th>
<tr>
<th>房车</th>
<th>租借天数</th>
<th>费用明细</th>
</tr>
<tr>
<td>{{form.name}}{{rentCostDetail}}</td>
......@@ -78,26 +91,33 @@
<td>{{rentCostDetail}}</td>
</tr>
<tr>
<td ></td>
<td ></td>
<td >共计:¥{{form.realAmount}}</td>
<td></td>
<td></td>
<td>共计:¥{{form.realAmount}}</td>
</tr>
</table>
<div v-if="form.orderVehicleCrosstownDto" style="margin: 20px 0;"><span style="font-size: 18px;font-weight: bold;">驾驶人信息</span></div>
<div v-if="form.orderVehicleCrosstownDto" style="margin: 20px 0;">
<span style="font-size: 18px;font-weight: bold;">驾驶人信息</span>
</div>
<table class="orderDetail" v-if="form.orderVehicleCrosstownDto">
<tr><th>姓名</th><th>手机号</th><th>身份证号</th><!-- <th>驾照</th>--></tr>
<tr>
<th>姓名</th>
<th>手机号</th>
<th>身份证号</th>
<!-- <th>驾照</th>-->
</tr>
<tr>
<td>{{form.orderVehicleCrosstownDto.licenseName}}</td>
<td>{{form.orderVehicleCrosstownDto.licensePhone}}</td>
<td>{{form.orderVehicleCrosstownDto.licenseIdCard}}</td>
<!-- <td><img style="width: 140px;height: 140px;" :src="form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"></td>-->
<!-- <td><img style="width: 140px;height: 140px;" :src="form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"></td>-->
</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-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>
......@@ -108,18 +128,32 @@
<el-button type="primary" @click="update('carForm')">确定</el-button>
</div>
</el-dialog>
<!-- 更改还车地点 -->
<div class="modal_modal" v-show="resetReturn"></div>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
<el-form :model="returnForm" ref="returnForm" label-width="90px">
<el-form-item label="还车地点:" prop="endCompanyId">
<el-select clearable v-model="returnForm.endCompanyId" filterable placeholder="请选择/搜索还车地点">
<el-option v-for="item in allCompaniesArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-top:20px" type="primary" @click="confirm('returnForm')">确定</el-button>
</el-form>
</el-dialog>
</el-dialog>
</template>
<script>
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
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"],
import ElRow from 'element-ui/packages/row/src/row'
import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
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'
import { getAll, updateEndCompany } from 'api/base_info/branch_company'
export default {
props: ['form', 'rentCostDetail'],
name: 'rentOrderDetailModal',
components: {
ElFormItem,
......@@ -129,12 +163,26 @@
},
data() {
return {
updateNumberPlat:false,//是否重新配车
returnForm: {
endCompanyId: ''
},
allCompaniesArr: [],
resetReturn: false, //更改换成地点loading
updateNumberPlat: false, //是否重新配车
dialogVisible: false,
resetCarVisible:false,
resetCarForm:{
no:'',
numberPlate:'',//重新配车车牌号
resetCarVisible: false,
resetCarForm: {
no: '',
numberPlate: '' //重新配车车牌号
},
rules1: {
endCompanyId: [
{
required: true,
message: '请选择更换地点',
trigger: 'change'
}
]
},
rules: {
numberPlate: [
......@@ -145,55 +193,100 @@
trigger: 'blur'
}
]
},
}
}
},
watch: {
dialogVisible(newValue, oldValue){
if(!newValue){
this.$emit("rentOrderDetailDialogEvent", this.updateNumberPlat);
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit('rentOrderDetailDialogEvent', this.updateNumberPlat)
}
}
},
},
mounted() {
this.dialogVisible = true;
console.log(this.form)
this.dialogVisible = true
if (this.form.status == 2) {
this.form.ststusName = '取消';
this.form.ststusName = '取消'
}
if (this.form.status == 3) {
this.form.ststusName = '待付款';
this.form.ststusName = '待付款'
}
if (this.form.status == 4) {
this.form.ststusName = '待出行';
this.form.ststusName = '待出行'
}
if (this.form.status == 5) {
this.form.ststusName = '出行中';
this.form.ststusName = '出行中'
}
if (this.form.status == 6) {
this.form.ststusName = '已完成';
this.form.ststusName = '已完成'
}
this.getAllFn()
},
methods: {
resetCar(){
this.clearFrom();
getAllFn() {
let _this = this
getAll().then(data => {
_this.allCompaniesArr = []
data.data.map(function(item) {
item.value = item.name
_this.allCompaniesArr.push(item)
})
})
},
confirm(formName) {
if (this.returnForm.endCompanyId == '') {
this.$notify({
title: '失败',
message: '还车地点不能为空',
type: 'error',
duration: 2000
})
} else {
this.returnForm.id = this.form.detailId
updateEndCompany(this.returnForm).then(data => {
if (data.status == 200) {
this.$notify({
title: '成功',
message: '修改还车地点成功',
type: 'success',
duration: 3000
})
this.resetReturn = false;
this.dialogVisible = false;
this.$emit('rentOrderDetailDialogEvent', true)
} else {
this.$notify({
title: '失败',
message: data.message,
type: 'error',
duration: 3000
})
}
})
}
},
resetCar() {
this.clearFrom()
this.resetCarVisible = true
this.resetCarForm.no = this.form.no
},
cancelResetCar(){
cancelResetCar() {
this.resetCarVisible = false
},
clearFrom(){
clearFrom() {
this.resetCarForm = {
no:'',
numberPlate:'',//重新配车车牌号
no: '',
numberPlate: '' //重新配车车牌号
}
},
/**
* 重新配车
* */
update(formName) {
let that = this;
const set = this.$refs;
let that = this
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
editObj(this.resetCarForm).then(response => {
......@@ -203,7 +296,7 @@
message: '修改成功',
type: 'success',
duration: 2000
});
})
this.resetCarVisible = false
this.form.vehicleNumberPlat = this.resetCarForm.numberPlate
this.updateNumberPlat = true
......@@ -213,55 +306,56 @@
message: response.message,
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
},
})
}
}
}
</script>
<style>
.label-text{
.label-text {
margin-left: 10px;
margin-right: 20px;
}
.label-title{
}
.label-title {
margin-top: 10px;
}
.orderDetail tr th{
}
.orderDetail tr th {
background: #eef1f6;
}
.orderDetail tr td, .orderDetail tr th{
}
.orderDetail tr td,
.orderDetail tr th {
width: 500px;
text-align: center;
border: 1px solid #dfe6ec;
margin-left: 100px;
margin-right: 100px;
padding: 10px;
}
.label-value{
}
.label-value {
margin-left: 80px;
margin-right: 100px;
}
#license-img{
}
#license-img {
width: 50px;
height: 50px;
}
.order-details .el-form-item{
}
.order-details .el-form-item {
margin-bottom: 10px !important;
}
.modal_modal{
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
opacity: 0.5;
background: #000;
z-index: 2000;
}
}
</style>
<template>
<div class="app-container calendar-list-container">
<div class="filter-container">
......@@ -8,7 +9,7 @@
<el-date-picker
v-model="listQuery.time"
type="daterange"
range-separator="至"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changeTime"
......@@ -31,14 +32,7 @@
</el-col>
</el-row>
</el-form>
<el-table
:data="list"
border
fit
highlight-current-row
style="width: 100%"
v-loading="loading"
>
<el-table :data="list" border fit highlight-current-row style="width: 100%" v-loading="loading">
<el-table-column align="center" label="时间">
<template scope="scope">
<span>{{scope.row.timeSlot}}</span>
......@@ -80,119 +74,145 @@
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="listQuery.page"
:page-sizes="[10,20,30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
style="margin-top:20px"
></el-pagination>
</div>
</div>
</template>
<script>
import { orderStatistics, downloadExcel } from "api/order/rentVehicle";
import { orderStatistics, downloadExcel } from 'api/order/rentVehicle'
export default {
created() {
this.getList();
this.getList()
},
data() {
return {
loading: false,
total: null,
list: [],
// 统计时间筛选
listQuery: {
time: "null",
type: "1",
time: 'null',
type: '1',
startTime: null,
endTime: null
endTime: null,
time: '',
limit: 10,
page: 1
},
//统计方式筛选
way: [
{
label: "日统计",
id: "1"
label: '日统计',
id: '1'
},
{
label: "周统计",
id: "2"
label: '周统计',
id: '2'
},
{
label: "月统计",
id: "3"
label: '月统计',
id: '3'
}
],
isactive: "日统计"
};
isactive: '日统计'
}
},
methods: {
//统计时间筛选
changeTime() {
!!this.listQuery.time[0]
? (this.listQuery.startTime = this.listQuery.time[0].getTime())
: (this.listQuery.startTime = null);
: (this.listQuery.startTime = null)
!!this.listQuery.time[1]
? (this.listQuery.endTime = this.listQuery.time[1].getTime())
: (this.listQuery.endTime = null);
this.getList();
: (this.listQuery.endTime = null)
this.getList()
},
//统计方式筛选
changeWay(val) {
this.isactive = val.label;
this.listQuery.type = val.id;
this.getList();
this.isactive = val.label
this.listQuery.type = val.id
this.getList()
},
//导出
handleFilter() {
downloadExcel(this.listQuery).then(res => {
const content = res;
const blob = new Blob([content]);
const fileName = "导出信息.xlsx";
if ("download" in document.createElement("a")) {
const content = res
const blob = new Blob([content])
const fileName = '导出信息.xlsx'
if ('download' in document.createElement('a')) {
// 非IE下载
const elink = document.createElement("a");
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
} else {
// IE10+下载
navigator.msSaveBlob(blob, fileName);
navigator.msSaveBlob(blob, fileName)
}
});
})
},
handleSizeChange(val) {
this.listQuery.limit = val
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val
this.getList()
},
//列表
getList() {
let params = {};
this.loading = true;
let params = {}
this.loading = true
orderStatistics(this.listQuery).then(data => {
console.log(data);
if (data.status == 200) {
data.data.forEach(element => {
data.data.list.forEach(element => {
for (let i in element.members) {
if (element.members[i].level == 1) {
element.pAmount = element.members[i].amount;
element.plevel = element.members[i].level;
element.pMemberName = element.members[i].memberName;
element.pNumber = element.members[i].number;
element.pAmount = element.members[i].amount
element.plevel = element.members[i].level
element.pMemberName =
element.members[i].memberName
element.pNumber = element.members[i].number
} else if (element.members[i].level == 2) {
element.goldAmount = element.members[i].amount;
element.goldlevel = element.members[i].level;
element.goldMemberName = element.members[i].memberName;
element.goldNumber = element.members[i].number;
element.goldAmount = element.members[i].amount
element.goldlevel = element.members[i].level
element.goldMemberName =
element.members[i].memberName
element.goldNumber = element.members[i].number
} else if (element.members[i].level == 3) {
element.hAmount = element.members[i].amount;
element.hlevel = element.members[i].level;
element.hMemberName = element.members[i].memberName;
element.hNumber = element.members[i].number;
element.hAmount = element.members[i].amount
element.hlevel = element.members[i].level
element.hMemberName =
element.members[i].memberName
element.hNumber = element.members[i].number
}
}
});
this.list = data.data;
})
this.total = data.data.total;
this.list = data.data.list
}
setTimeout(() => {
this.loading = false;
}, 300);
});
this.loading = false
}, 300)
})
}
}
};
}
</script>
<style>
.wayMsg span {
......
......@@ -136,14 +136,14 @@
<template scope="scope">
<span>{{scope.row.startCompanyName}}</span>
<br />
<span>({{scope.row.orderRentVehicleDetail.startCityName}}{{scope.row.orderRentVehicleDetail.startAddr}})</span>
<span>({{scope.row.orderRentVehicleDetail.startAddr}})</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="收车公司">
<template scope="scope">
<span>{{scope.row.endCompanyName}}</span>
<br />
<span>({{scope.row.orderRentVehicleDetail.endCityName}}{{scope.row.orderRentVehicleDetail.endAddr}})</span>
<span>({{scope.row.orderRentVehicleDetail.endAddr}})</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单金额">
......@@ -398,8 +398,9 @@
<span class="label-text">拍照取证*:</span>
<br />
<img
v-for="item in otherImg"
v-for="(item,index) in otherImg"
:src="item"
:key="index"
style="width: 100px; height: 100px;margin-left:110px;"
/>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
......@@ -697,7 +698,6 @@ export default {
});
},
handleOrderDetail(row) {
debugger
this.form = row;
if (this.form.status == 2) {
this.form.ststusName = "取消";
......@@ -776,7 +776,7 @@ export default {
illegalEvent(params) {
this.illegalVisible = false;
if (params) {
console.log(params);
// console.log(params);
}
},
/**
......@@ -785,11 +785,11 @@ export default {
detailEvent(params) {
this.detailVisible = false;
if (params) {
console.log(params);
// console.log(params);
}
},
handleHandoverOrderVehicle(row) {
console.log(row);
// console.log(row);
this.modalTitle = "交车记录";
this.form = row;
if (this.form.status == 2) {
......@@ -838,7 +838,7 @@ export default {
},
getAllOrderVehicleCrosstown() {
getOrderVehicleCrosstown(this.orderVehicleQuery).then(response => {
console.log(response);
// console.log(response);
if (response.data.length <= 0) {
alert("交还车记录不存在");
} else {
......@@ -852,7 +852,7 @@ export default {
},
handleReturnOrderVehicle(row) {
console.log(row);
// console.log(row);
this.modalTitle = "还车记录";
this.form = row;
if (this.form.status == 2) {
......@@ -900,7 +900,7 @@ export default {
this.depositDetail = false;
},
handleRefundVehicle(row) {
console.log(row);
// console.log(row);
var that = this;
that.pictureList = [];
that.dedDetail = [];
......@@ -948,7 +948,7 @@ export default {
}
that.depositRefundRecord = arr;
console.log(that.depositRefundRecord);
// console.log(that.depositRefundRecord);
}
});
});
......@@ -1069,7 +1069,7 @@ export default {
page(this.listQuery).then(response => {
if (response.data.data) {
response.data.data.map(function(el) {
console.log(el);
// console.log(el);
if (el.status == 2) {
el.ststusName = "取消";
}
......@@ -1107,6 +1107,7 @@ export default {
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
},
templateModel() {
this.costDetail = {
......
......@@ -15,14 +15,9 @@
@change="changeTime"
></el-date-picker>
</el-form-item>
<el-form-item label="用户来源">
<el-form-item label="峰会状态">
<el-select class="filter-item" v-model="query.status" placeholder="状态">
<el-option
v-for="(val,index) in status"
:key="index"
:label="val.name"
:value="val.id"
></el-option>
<el-option v-for="(val,index) in status" :key="index" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
</el-row>
......@@ -84,7 +79,7 @@
size="small"
class="el-button el-button--text el-button--small"
@click="applyPage(scope.row)"
>报名页面</el-button> -->
>报名页面</el-button>-->
<el-button
class="el-button el-button--text el-button--small"
size="small"
......@@ -128,44 +123,40 @@
:enrollRow="enrollRow"
v-on:enrollDialogEvent="enrollDialogEvent"
/>
<reviewPopup
v-if="reviewShow"
:reviewRow="reviewRow"
v-on:reviewDialogEvent="reviewDialogEvent"
/>
<reviewPopup v-if="reviewShow" :reviewRow="reviewRow" v-on:reviewDialogEvent="reviewDialogEvent" />
<!-- <applyPage :applyInfo='applyInfo'></applyPage> -->
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { timestamp2Date } from "src/utils/dateUtils";
import { page, update } from "src/api/summit/activity";
import summitPopup from "src/views/summit/model/summitPopup";
import enrollDataPopup from "src/views/summit/model/enrollDataPopup";
import reviewPopup from "src/views/summit/model/reviewPopup";
import { mapGetters } from 'vuex'
import { timestamp2Date } from 'src/utils/dateUtils'
import { page, update, remove } from 'src/api/summit/activity'
import summitPopup from 'src/views/summit/model/summitPopup'
import enrollDataPopup from 'src/views/summit/model/enrollDataPopup'
import reviewPopup from 'src/views/summit/model/reviewPopup'
// import applyPage from "src/views/summit/model/applyPage";
import { getToken } from "src/utils/auth";
import { getToken } from 'src/utils/auth'
export default {
name: "summitList",
name: 'summitList',
components: {
summitPopup,
enrollDataPopup,
reviewPopup,
reviewPopup
// applyPage
},
data() {
return {
applyInfo:{
dialogVisible:false,
applyInfo: {
dialogVisible: false
},
query: {
page: 1,
limit: 10,
title: "",
startTime: "",
title: '',
startTime: '',
status: undefined,
type: 1
},
......@@ -173,15 +164,15 @@ export default {
list: [],
listLoading: true,
status: [
{ id: 0, name: "默认" },
{ id: 1, name: "报名中" },
{ id: 2, name: "进行中" },
{ id: 3, name: "已结束" }
{ id: 0, name: '全部' },
{ id: 1, name: '报名中' },
{ id: 2, name: '进行中' },
{ id: 3, name: '已结束' }
],
total: 0,
inline: true,
popupShow: false,
titleNme: "创建峰会",
titleNme: '创建峰会',
popupRow: undefined,
enrollRow: undefined,
enrollShow: false,
......@@ -189,21 +180,21 @@ export default {
reviewShow: false,
statusNameList: {
1: "默认",
2: "报名中",
3: "进行中",
4: "已结束"
1: '默认',
2: '报名中',
3: '进行中',
4: '已结束'
}
}
};
},
created() {
this.getList();
this.getList()
},
computed: {
...mapGetters(["elements"]),
...mapGetters(['elements']),
getHeaderWithToken() {
return { Authorization: getToken() };
return { Authorization: getToken() }
}
},
methods: {
......@@ -212,85 +203,106 @@ export default {
// this.applyInfo.dialogVisible = true;
// },
getList() {
this.listLoading = true;
this.listLoading = true
page(this.query).then(res => {
this.list = res.data.list;
this.total = res.data.total;
});
this.list = res.data.list
this.total = res.data.total
})
setTimeout(() => {
this.listLoading = false;
}, 500);
this.listLoading = false
}, 500)
},
changeTime(val) {
!!val
? (this.query.startTime = Date.now(val))
: this.query.startTime == "";
: this.query.startTime == ''
},
handleFilter() {
this.getList();
this.getList()
},
viewDetails(row) {
update(row).then(res => {
if (res.rel) {
this.$notify.success({
title: "编辑成功",
title: '编辑成功',
message: `success`
});
this.getList();
})
this.getList()
} else {
this.$notify.warning({
title: "编辑失败",
title: '编辑失败',
message: `failed`
});
})
}
});
})
},
handleSizeChange(val) {
this.query.limit = val;
this.getList();
this.query.limit = val
this.getList()
},
handleCurrentChange(val) {
this.query.page = val;
this.getList();
this.query.page = val
this.getList()
},
timestamp2Date(timeStamp) {
return timestamp2Date(timeStamp);
return timestamp2Date(timeStamp)
},
enrollData(row) {
this.enrollRow = row;
this.enrollShow = true;
this.enrollRow = row
this.enrollShow = true
},
edit(row) {
// debugger;
this.popupRow = row;
this.titleNme = "编辑峰会";
this.popupShow = true;
this.popupRow = row
this.titleNme = '编辑峰会'
this.popupShow = true
},
createSummit() {
this.popupRow = {};
this.titleNme = "创建峰会";
this.popupShow = true;
this.popupRow = {}
this.titleNme = '创建峰会'
this.popupShow = true
},
review(row) {
this.reviewRow = row;
this.reviewShow = true;
this.reviewRow = row
this.reviewShow = true
},
deleteSummit(row) {
this.$confirm('此操作将删除该峰会, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
remove(row.id).then(data => {
if (data.status == 200) {
this.getList()
this.$message({
type: 'success',
message: '删除成功!'
})
} else {
this.$message({
type: 'error',
message: data.message
})
}
})
})
},
deleteSummit() {},
getStatusName(status) {
return status + 1 ? this.statusNameList[status + 1] : "";
return status + 1 ? this.statusNameList[status + 1] : ''
},
summitDialogEvent(e) {
this.popupShow = false;
this.popupShow = false
if (e) {
this.getList();
this.getList()
}
},
enrollDialogEvent(e) {
this.enrollShow = false;
this.enrollShow = false
},
reviewDialogEvent(e) {
this.reviewShow = false;
this.reviewShow = false
}
}
};
}
</script>
......@@ -41,7 +41,7 @@
list-type="picture-card"
:file-list="list"
:on-success="handlePictureCardPreview"
:on-remove="handleRemove"
:on-remove="handleRemoveZip"
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus"></i>
......@@ -64,11 +64,11 @@
>
<i class="el-icon-plus"></i>
</el-upload>
<video
<!-- <video
v-if="$utils.isString(form.videoPath) && !$utils.isEmpty(form.videoPath) && !imgFlag"
:src="form.videoPath"
style="width:300px;max-height:300px;"
/>
/>-->
<!-- <i
v-else-if="!imgFlag"
class="el-icon-plus avatar-uploader-icon"
......@@ -78,8 +78,8 @@
</el-col>
<el-col>
<el-form-item>
<el-button class="button" type="primary" @click="cre">确 定</el-button>
<el-button class="button" @click="cancelHandel">取 消</el-button>
<!-- <el-button class="button" type="primary" @click="cre">确 定</el-button> -->
</el-form-item>
</el-col>
</el-row>
......@@ -117,12 +117,14 @@ export default {
imgFlag: false,
BASE_API: process.env.BASE_API,
percent: 0, //上传进度
list: [],
list: [], //压缩包
oldList: '',
oldVadio: '',
vadio: [], //视频
activeId: '', //峰会id
form: {
id: undefined,
banner: undefined,
activityId: undefined,
banner: undefined,
videoPath: undefined,
picturePath: undefined
}
......@@ -142,54 +144,82 @@ export default {
return { Authorization: getToken() }
}
},
watch: {
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit('summitDialogEvent', this.result)
}
}
},
// watch: {
// dialogVisible(newValue, oldValue) {
// if (!newValue) {
// this.$emit('summitDialogEvent', this.result)
// }
// }
// },
mounted() {
this.getOrderInfo()
console.log(this.reviewRow)
},
methods: {
vidioSuccess(res) {
console.log(res)
vidioSuccess(res, file, fileList) {
if (res.status == 200) {
this.$notify({
title: '成功',
title: '提示',
message: res.message,
type: 'success',
duration: 2000
})
this.vadio = fileList
}
},
beforeAvatarUpload(file) {
const zip = file.type === 'application/zip'
if (!zip) {
this.$message.error('上传头像图片只能是 zip 格式!')
var index = file.name.lastIndexOf('.')
var ext = file.name.substr(index + 1)
console.log(ext)
if (ext != 'zip') {
this.$message.error('上传压缩包只能是 zip 格式!')
return false
}
return zip
return true
},
videoUpload(file) {
console.log(file.type)
const isJPG = file.type === 'video/mp4'
if (!isJPG) {
this.$message.error('上传头像图片只能是 mp4 格式!')
this.$message.error('上传压缩包只能是 mp4 格式!')
}
return isJPG
},
getOrderInfo() {
console.log(this.reviewRow.id)
one(this.reviewRow.id).then(res => {
this.form = res.data
this.activeId = res.data.id //峰会id
this.oldList = res.data.picturePath || '' //压缩包
this.oldVadio = res.data.videoPath || '' //视频
this.dialogVisible = true
this.imgDialogVisible = true
})
},
cre() {
console.log(this.form.picturePath)
save(this.form).then(res => {
let zipPic = []
this.list.forEach(element => {
zipPic.push(element.url)
})
let mp4Vadio = []
this.vadio.forEach(element => {
mp4Vadio.push(element.response.data)
})
let params = {
id: this.activeId, //回顾id
banner: this.form.banner,
activityId: this.reviewRow.id, //峰会id
videoPath: this.oldVadio
? mp4Vadio == ''
? this.oldVadio
: mp4Vadio.join(',') + ',' + this.oldVadio
: mp4Vadio.join(','),
picturePath: this.oldList
? zipPic == ''
? this.oldList
: zipPic.join(',') + ',' + this.oldList
: zipPic.join(',')
}
save(params).then(res => {
this.responseResult(res)
})
},
......@@ -242,20 +272,22 @@ export default {
this.form.videoPath = file.data
this.imgDialogVisible = true
},
handleRemoveZip(file, fileList) {
this.list = fileList
},
handleRemove(file, fileList) {
// console.log(file)
console.log(file, fileList)
this.vadio = fileList
},
handlePictureCardPreview(res, file) {
handlePictureCardPreview(res, file, fileList) {
if (res.status == 200) {
this.$notify({
title: '成功',
message: res.message,
type: 'success',
duration: 2000
title: '提示',
message: '上传成功',
type: 'success'
})
this.list.push({ url: res.data })
// this.imgDialogVisible = true;
this.list = fileList
}
},
cleanForm() {
this.form = {
......
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" class="order-details">
<el-dialog
:title="title"
:visible.sync="dialogVisible"
class="order-details"
:close-on-click-modal="false"
>
<div>
<!-- <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="100px" class="demo-ruleForm"> -->
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<div>
<p style="padding:20px 0;border-bottom:1px solid #d9d9d9">基础信息</p>
<div class="steLine">
<el-row>
<el-col :span="12">
......@@ -77,11 +81,6 @@
<el-form-item style="display:inline-block;margin-left:-120px">
<el-input class="content" v-model="form.latitude" placeholder="纬度" style="width:100px"></el-input>
</el-form-item>
<!-- <el-col :span="6" class="content">
<el-form-item>
<el-input class="content" v-model="form.latitude" placeholder="纬度"></el-input>
</el-form-item>
</el-col>-->
</el-row>
<el-row>
<el-col :span="8">
......@@ -93,7 +92,7 @@
</el-form-item>
</el-col>
<el-col :span="9" v-if="form.state==='自定义'">
<el-radio-group v-model="form.status">
<el-radio-group v-model="statusRadio">
<el-radio class="status" :label="0">默认</el-radio>
<el-radio class="status" :label="1">报名中</el-radio>
<el-radio class="status" :label="2">进行中</el-radio>
......@@ -102,20 +101,23 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="12">
<el-form-item label="活动id:">
<el-input v-model="form.rid" placeholder="请输入签到/抽奖活动的id"></el-input>
<!-- <el-input v-model="form.rid" placeholder="请输入签到/抽奖活动的id"></el-input> -->
<el-select v-model="form.rid" placeholder="请选择签到/抽奖活动id">
<el-option
v-for="(item,index) in optionsId"
:key="index"
:label="item"
:value="item"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<div>
<p style="padding:20px 0;border-bottom:1px solid #d9d9d9">报名页面</p>
<div>
<el-row>
<el-col>
<el-form-item label="峰会主题:">
<el-tabs v-model="activeNameTab">
<el-tab-pane label="峰会主题" name="first">
<UE
:editorId="activeName"
:defaultMsg="form.content"
......@@ -123,8 +125,8 @@
ref="ue"
@ready="editorReadyEvent"
></UE>
</el-form-item>
<el-form-item label="诚邀莅临:" prop="name">
</el-tab-pane>
<el-tab-pane label="诚邀莅临" name="second">
<UE
:editorId="activeNameShare"
:defaultMsg="form.actDesc "
......@@ -132,8 +134,8 @@
ref="ue"
@ready="editorReadyEventShare"
></UE>
</el-form-item>
<el-form-item label="公司简章:" prop="name">
</el-tab-pane>
<el-tab-pane label="公司简章" name="third">
<UE
:editorId="activeNameFirm"
:defaultMsg="form.companyDesc"
......@@ -141,9 +143,12 @@
ref="ue"
@ready="editorReadyEventFirm"
></UE>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div>
<div>
<el-row>
<el-col>
<el-form-item label="房车介绍:">
......@@ -165,12 +170,15 @@
<el-form-item label="峰会流程:">
<el-row class="height" v-for="(item, index) in processJson" :key="index">
<el-col :span="6">
<el-date-picker
<el-time-select
v-model="item.time"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
></el-date-picker>
:picker-options="{
start: '06:00',
step: '00:15',
end: '23:59'
}"
placeholder="选择/输入时间"
></el-time-select>
</el-col>
<el-col :span="8">
<el-input class="content" v-model="item.content" placeholder="请输入内容"></el-input>
......@@ -213,7 +221,7 @@ import ElRow from 'element-ui/packages/row/src/row'
import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
import ElCol from 'element-ui/packages/col/src/col'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import { getOne, update, add } from 'src/api/summit/activity'
import { getOne, update, add, activityIds } from 'src/api/summit/activity'
import { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import UE from '../../modal/Ueditor' // 百度ue富文本
......@@ -230,6 +238,9 @@ export default {
},
data() {
return {
optionsId: [],
statusRadio: '0',
activeNameTab: 'first',
fileList2: [],
config: {
initialFrameWidth: null,
......@@ -256,21 +267,30 @@ export default {
longitude: undefined,
latitude: undefined,
state: '默认',
status: 0,
rid: undefined,
content: '', // 峰会主题
contentFirm: '',
actDesc: '', // 诚邀莅临
companyDesc: '', // 公司简章
vehicleImgs: [] // 房车介绍
vehicleImgs: [], // 房车介绍
processJson: []
},
result: false,
processJson: []
processJson: [{ time: undefined, content: '' }]
}
},
mounted() {
this.cleanForm()
this.getOrderInfo()
},
created() {
activityIds().then(data => {
if (data.status == 200) {
this.optionsId = data.data;
}
})
},
computed: {
...mapGetters(['elements']),
......@@ -305,10 +325,11 @@ export default {
res.data.state = this.getState(res.data.status)
this.form = res.data
this.form.bmCloseTime = Number(res.data.bmCloseTime)
let introduce = this.form.vehicleImgs.split(',');
let introduce = this.form.vehicleImgs.split(',')
this.statusRadio = res.data.status
introduce.forEach(element => {
this.fileList2.push({name:'峰会介绍',url:element})
});
this.fileList2.push({ name: '峰会介绍', url: element })
})
if (res.data.processJson) {
this.processJson = JSON.parse(res.data.processJson)
}
......@@ -363,6 +384,7 @@ export default {
},
getState(status) {
if (this.$utils.isInteger(status)) {
console.log(status);
if (status == 0) {
return '默认'
} else {
......@@ -378,7 +400,7 @@ export default {
},
addTag() {
const t = {
time: undefined,
time: null,
content: ''
}
this.processJson.push(t)
......@@ -388,53 +410,114 @@ export default {
*
* */
update1() {
this.dataProcessing()
if (!this.form.title) {
this.$notify({
title: '失败',
message: '标题不能为空',
type: 'error',
duration: 2000
})
return false
} else if (!this.form.startTime) {
this.$notify({
title: '失败',
message: '开始时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.endTime) {
this.$notify({
title: '失败',
message: '结束时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.bmCloseTime) {
this.$notify({
title: '失败',
message: '报名截止时间不能为空',
type: 'error',
duration: 2000
})
} else {
typeof this.form.endTime == 'number'
? (this.form.endTime = this.form.endTime)
: (this.form.endTime = this.form.endTime.getTime())
typeof this.form.startTime == 'number'
? (this.form.startTime = this.form.startTime)
: (this.form.startTime = this.form.startTime.getTime())
typeof this.form.bmCloseTime == 'number'
? (this.form.bmCloseTime = this.form.bmCloseTime)
: (this.form.bmCloseTime = this.form.bmCloseTime.getTime())
let pic = []
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
}
this.form.processJson = this.processJson
update(this.form).then(res => {
this.responseResult(res)
})
this.dataProcessing()
}
},
create(formName) {
if (
!this.form.title ||
!this.form.startTime ||
!this.form.endTime
) {
create() {
if (!this.form.title) {
this.$notify({
title: '失败',
message: '必填项不能为空',
message: '标题不能为空',
type: 'error',
duration: 2000
})
return false
} else if (!this.form.startTime) {
this.$notify({
title: '失败',
message: '开始时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.endTime) {
this.$notify({
title: '失败',
message: '结束时间不能为空',
type: 'error',
duration: 2000
})
} else if (!this.form.bmCloseTime) {
this.$notify({
title: '失败',
message: '报名截止时间不能为空',
type: 'error',
duration: 2000
})
} else {
// this.form.processJson = this.processJson
this.form.endTime = this.form.endTime.getTime()
this.form.startTime = this.form.startTime.getTime()
this.form.bmCloseTime = this.form.bmCloseTime.getTime()
let pic = []
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
let demo = []
this.processJson.forEach(element => {
demo.push({
time:
formatDate(element.time, 'yyyy-MM-dd hh') +
':00:00',
content: element.content
})
})
this.form.processJson = demo
}
this.dataProcessing()
add(this.form).then(res => {
this.responseResult(res)
})
this.dataProcessing()
}
},
dataProcessing() {
if (this.form.state === '默认') {
this.form.status = 0
this.form.status = '0'
}else{
this.form.status = this.statusRadio
}
this.form.processJson = JSON.stringify(this.processJson)
},
......@@ -489,7 +572,8 @@ export default {
contentFirm: '',
actDesc: '', // 诚邀莅临
companyDesc: '', // 公司简章
vehicleImgs: [] // 房车介绍
vehicleImgs: [], // 房车介绍
processJson: []
}
}
}
......
......@@ -42,6 +42,13 @@
<img class="image" :src="scope.row.bigIcon" />
</span>
</template>
</el-table-column>
<el-table-column align="center" label="商品图片">
<template scope="scope">
<span>
<img class="image" :src="scope.row.itemImg" />
</span>
</template>
</el-table-column>
<el-table-column align="center" label="折扣">
<template scope="scope">
......@@ -210,6 +217,29 @@
</el-upload>
</el-form-item>
</el-row>
<el-row>
<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="product"
list-type="picture"
>
<img
v-if="$utils.isString(add.itemImg) && !$utils.isEmpty(add.itemImg)"
:src="add.itemImg"
style="width:300px;max-height:300px;"
/>
<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-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSetMemberArea('membershipGrade')">取消</el-button>
......@@ -250,7 +280,8 @@ export default {
price: undefined,
endDate: undefined,
icon: undefined,
bigIcon: null
bigIcon: null,
itemImg:null
},
endDatelist: [
{ id: 0, name: "永久" },
......@@ -336,7 +367,8 @@ export default {
price: row.price,
endDate: row.endDate,
icon: row.icon,
bigIcon: row.bigIcon
bigIcon: row.bigIcon,
itemImg:row.itemImg
};
this.activeId = row.id
},
......@@ -445,6 +477,10 @@ export default {
//大图标
handleAvatarSuccessBig(res) {
this.add.bigIcon = res.data;
},
//商品展示
product(res) {
this.add.itemImg = res.data;
}
}
};
......
......@@ -36,12 +36,7 @@
@change="getProvinceRegions"
>
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option
v-for="val in getAllZoneList"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
......@@ -53,12 +48,7 @@
@change="getAllBranchCompanyChange"
>
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option
v-for="val in allBranchCompany"
:key="val.id"
:label="val.name"
:value="val.id"
></el-option>
<el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="预订月份" prop="selectedMonth4Query">
......@@ -382,9 +372,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="操作人">
<span
v-if="detailItem.vehicleDepartureLogVo"
>{{detailItem.vehicleDepartureLogVo.checkMan}}</span>
<span v-if="detailItem.vehicleDepartureLogVo">{{detailItem.vehicleDepartureLogVo.checkMan}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -422,13 +410,18 @@
<el-col :span="8">
<el-form-item label="还车分公司">
<span>{{detailItem.retCompanyName}}</span>
<el-button
size="mini"
type="primary"
style="padding: 7px 9px;"
@click="resetReturn = true"
v-show="detailItem.status == 2 || detailItem.status == 5"
>更换</el-button>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="操作人">
<span
v-if="detailItem.vehicleDepartureLogVo"
>{{detailItem.vehicleDepartureLogVo.recycleMan}}</span>
<span v-if="detailItem.vehicleDepartureLogVo">{{detailItem.vehicleDepartureLogVo.recycleMan}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -481,6 +474,19 @@
</div>
</el-dialog>
<!-- 更改还车地点 -->
<div class="modal_modal" v-show="resetReturn"></div>
<el-dialog title="更改还车地点" :visible.sync="resetReturn" :append-to-body="true" :modal="false">
<el-form :model="returnForm" ref="returnForm" label-width="90px">
<el-form-item label="还车地点:" prop="retCompany">
<el-select clearable v-model="returnForm.retCompany" filterable placeholder="请选择/搜索还车地点">
<el-option v-for="item in allCompaniesArr" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-top:20px" type="primary" @click="confirm('returnForm')">确定</el-button>
</el-form>
</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">
......@@ -688,78 +694,87 @@ import {
saveOrderViolation,
departureVehicle,
arrivalVehicle
} from "api/vehicle/bookRecord";
} from 'api/vehicle/bookRecord'
import { getAllCompany, getAll } from "api/base_info/branch_company/";
import { getAllZone } from "api/base_info/constant/";
import { getAllBranchCompanyByZoneId } from "api/order/rentVehicle";
import { formatDate } from "utils/dateFormattor";
import {
getAllCompany,
getAll,
updateById
} from 'api/base_info/branch_company/'
import { getAllZone } from 'api/base_info/constant/'
import { getAllBranchCompanyByZoneId } from 'api/order/rentVehicle'
import { formatDate } from 'utils/dateFormattor'
import rsCode from "../../../utils/rsCode";
import rsCode from '../../../utils/rsCode'
import { mapGetters } from "vuex";
import { mapGetters } from 'vuex'
import { toEast8Date, deepCopyDate, newEast8Date } from "utils/dateUtils";
import { getToken } from "../../../utils/auth";
import { toEast8Date, deepCopyDate, newEast8Date } from 'utils/dateUtils'
import { getToken } from '../../../utils/auth'
import {
BOOK_RECORD_STATUS_APPLY,
BOOK_RECORD_STATUS_PROVED,
BOOK_RECORD_STATUS_LIFT
} from "../../../store/modules/baseInfo";
} from '../../../store/modules/baseInfo'
import bookInfoViewer from "../bookInfoViewer";
import accItemSelector from "../accompanyingItem/accItemSelector.vue";
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
export default {
name: "bookRecord",
name: 'bookRecord',
components: {
bookInfoViewer,
accItemSelector
},
data() {
return {
returnForm: {
retCompany: ''
},
allCompaniesArr: [],
resetReturn: false, //更改换成地点loading
rejectVisible: false,
rejectFrom: {
vehicleBookRecordId: "",
rejectRemark: ""
vehicleBookRecordId: '',
rejectRemark: ''
},
rejectRules: {
rejectRemark: {
type: "string",
type: 'string',
required: true,
message: "请输入拒绝原因",
trigger: "blur"
message: '请输入拒绝原因',
trigger: 'blur'
}
},
BASE_API: process.env.BASE_API,
departureFormrules: {
checkMan: {
required: true,
message: "请输入验车人",
trigger: "blur"
message: '请输入验车人',
trigger: 'blur'
},
checkManTel: [
{
required: true,
message: "请输入验车人联系方式",
trigger: "blur"
message: '请输入验车人联系方式',
trigger: 'blur'
},
{
pattern: /^1[3456789]\d{9}$/,
message: "请输入正确的手机号"
message: '请输入正确的手机号'
}
],
mileage: {
type: "number",
type: 'number',
required: true,
message: "请输入公里数",
trigger: "blur"
message: '请输入公里数',
trigger: 'blur'
}
},
departureForm: {
vehicleId: null,
departureBranchCompanyId: null, //出发地分公司id
departureBranchCompanyName: "", //出发地分公司名称
departureBranchCompanyName: '', //出发地分公司名称
use: null,
user: null,
userTel: null,
......@@ -768,9 +783,9 @@ export default {
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null, //目的地分公司id
expectArrivalBranchCompanyName: "", //目的地分公司名称
expectArrivalBranchCompanyName: '', //目的地分公司名称
bookRecordId: null,
departurePic: "",
departurePic: '',
remark: null,
bookStartDate: null
},
......@@ -784,104 +799,105 @@ export default {
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: "",
arrivalPic: "",
remark: "",
arrivalBranchCompanyName: '',
arrivalPic: '',
remark: '',
bookRecordId: null
},
arrivalFormrules: {
recycleMan: {
required: true,
message: "请输入收车人",
trigger: "blur"
message: '请输入收车人',
trigger: 'blur'
},
recycleManTel: [
{
required: true,
message: "请输入收车人联系方式",
trigger: "blur"
message: '请输入收车人联系方式',
trigger: 'blur'
},
{
pattern: /^1[3456789]\d{9}$/,
message: "请输入正确的手机号"
message: '请输入正确的手机号'
}
],
mileage: {
type: "number",
type: 'number',
required: true,
message: "请输入收车公里数",
trigger: "blur"
message: '请输入收车公里数',
trigger: 'blur'
}
},
statusList: [
{
code: "1",
val: "申请中"
code: '1',
val: '申请中'
},
{
code: "3",
val: "待出行"
code: '3',
val: '待出行'
},
{
code: "4",
val: "驳回"
code: '4',
val: '驳回'
},
{
code: "5",
val: "出行中"
code: '5',
val: '出行中'
},
{
code: "6",
val: "取消预订"
code: '6',
val: '取消预订'
},
{
code: "7",
val: "已完成"
code: '7',
val: '已完成'
}
],
activeId: '',
bookTypeList: [
{
id: "1",
name: "租车"
id: '1',
name: '租车'
},
{
id: "2",
name: "用户租赁"
id: '2',
name: '用户租赁'
},
{
id: "3",
name: "维修"
id: '3',
name: '维修'
},
{
id: "4",
name: "展览"
id: '4',
name: '展览'
},
{
id: "5",
name: "旅游"
id: '5',
name: '旅游'
},
{
id: "6",
name: "保养"
id: '6',
name: '保养'
},
{
id: "7",
name: "预约中"
id: '7',
name: '预约中'
},
{
id: "8",
name: "禁用"
id: '8',
name: '禁用'
},
{
id: "9",
name: "客户用车"
id: '9',
name: '客户用车'
},
{
id: "10",
name: "其他"
id: '10',
name: '其他'
}
],
detailId: "",
detailId: '',
illegalVisible: false,
price: undefined, //违章罚款金额
fileList2: [], //违章截图
......@@ -892,7 +908,7 @@ export default {
},
allZoneArr: [], //全部片区
allBranchCompany: [],
state2: "", //搜索-分公司名称
state2: '', //搜索-分公司名称
rules4Query: {},
list: null,
total: null,
......@@ -910,7 +926,7 @@ export default {
},
inline: true,
dialogFormVisible: false,
dialogStatus: "",
dialogStatus: '',
bookRecord_btn_prove: false,
bookRecord_btn_unbook: false,
bookRecord_btn_reject: false,
......@@ -919,10 +935,9 @@ export default {
dialogForm4LiftVisible: false,
dialogForm4RetVisible: false,
allCompanies: {},
allCompaniesArr: [],
tableKey: 0,
form4Lift: {
state1: "",
state1: '',
id: undefined,
mileageLift: undefined,
liftCompany: undefined,
......@@ -932,40 +947,47 @@ export default {
liftCompany: [
{
required: true,
message: "请选择提车分公司",
trigger: "blur",
type: "integer"
message: '请选择提车分公司',
trigger: 'blur',
type: 'integer'
}
],
mileageLift: [
{
required: true,
message: "请输入当前里程数",
trigger: "blur",
type: "integer"
message: '请输入当前里程数',
trigger: 'blur',
type: 'integer'
},
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(value) || this.$utils.isNull(value)) {
return callback();
if (
this.$utils.isUndefined(value) ||
this.$utils.isNull(value)
) {
return callback()
}
if (!this.$utils.isInteger(value)) {
return callback(new Error("里程数必须为整数"));
return callback(new Error('里程数必须为整数'))
}
if (value < 0 || value > 9999999999) {
return callback(new Error("里程数合法范围:[0 - 9999999999]"));
return callback(
new Error(
'里程数合法范围:[0 - 9999999999]'
)
)
}
callback();
callback()
},
trigger: "blur"
trigger: 'blur'
}
],
retRemark: [
{
min: 0,
max: 2000,
message: "长度小于 2000 个字符",
trigger: "blur"
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
......@@ -980,404 +1002,448 @@ export default {
retCompany: [
{
required: true,
message: "请选择提车分公司",
trigger: "blur",
type: "integer"
message: '请选择提车分公司',
trigger: 'blur',
type: 'integer'
}
],
mileageRet: [
{
required: true,
message: "请输入当前里程数",
trigger: "blur",
type: "integer"
message: '请输入当前里程数',
trigger: 'blur',
type: 'integer'
},
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(value) || this.$utils.isNull(value)) {
return callback();
if (
this.$utils.isUndefined(value) ||
this.$utils.isNull(value)
) {
return callback()
}
if (!this.$utils.isInteger(value)) {
return callback(new Error("里程数必须为整数"));
return callback(new Error('里程数必须为整数'))
}
if (value < 0 || value > 9999999999) {
return callback(new Error("里程数合法范围:[0 - 9999999999]"));
return callback(
new Error(
'里程数合法范围:[0 - 9999999999]'
)
)
}
callback();
callback()
},
trigger: "blur"
trigger: 'blur'
}
],
retRemark: [
{
min: 0,
max: 2000,
message: "长度小于 2000 个字符",
trigger: "blur"
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
selectedAccItem: undefined
};
}
},
created() {
this.getList();
this.getList()
getAll().then(response => {
this.allCompaniesArr = response.data;
});
this.allCompaniesArr = response.data
// response.data.map(function(item) {
// item.value = item.name
// this.allCompaniesArr.push(item)
// })
})
getAllCompany(codeAndBranchCompany => {
//初始化公司列表
this.allCompanies = codeAndBranchCompany;
});
this.bookRecord_btn_prove = this.elements["bookRecord:btn_prove"];
this.bookRecord_btn_reject = this.elements["bookRecord:btn_reject"];
this.bookRecord_btn_unbook = this.elements["bookRecord:btn_unbook"];
this.bookRecord_btn_lift = this.elements["bookRecord:btn_lift"];
this.bookRecord_btn_ret = this.elements["bookRecord:btn_ret"];
this.allCompanies = codeAndBranchCompany
})
this.bookRecord_btn_prove = this.elements['bookRecord:btn_prove']
this.bookRecord_btn_reject = this.elements['bookRecord:btn_reject']
this.bookRecord_btn_unbook = this.elements['bookRecord:btn_unbook']
this.bookRecord_btn_lift = this.elements['bookRecord:btn_lift']
this.bookRecord_btn_ret = this.elements['bookRecord:btn_ret']
},
computed: {
...mapGetters(["elements", "bookRecordStatus"]),
...mapGetters(['elements', 'bookRecordStatus']),
getHeaderWithToken() {
return { Authorization: getToken() };
return { Authorization: getToken() }
},
//获取大区列表
getAllZoneList() {
return getAllZone();
return getAllZone()
},
selectedMonth4Query: {
get: function() {
if (
this.$utils.isString(this.listQuery.selectedMonth) &&
this.listQuery.selectedMonth !== ""
this.listQuery.selectedMonth !== ''
) {
return toEast8Date(this.listQuery.selectedMonth);
return toEast8Date(this.listQuery.selectedMonth)
}
return undefined;
return undefined
},
set: function(date) {
if (this.$utils.isDate(date)) {
this.listQuery.selectedMonth = formatDate(date, "yyyy-MM");
this.listQuery.selectedMonth = formatDate(date, 'yyyy-MM')
} else {
this.listQuery.selectedMonth = undefined;
this.listQuery.selectedMonth = undefined
}
}
}
},
methods: {
confirm() {
if (this.returnForm.retCompany == '') {
this.$notify({
title: '失败',
message: '还车地点不能为空',
type: 'error',
duration: 2000
})
} else {
this.returnForm.id = this.activeId
updateById(this.returnForm).then(data => {
if (data.status == 200) {
this.$notify({
title: '成功',
message: '修改还车地点成功',
type: 'success',
duration: 2000
})
this.resetReturn = false;
this.dialogDetailVisible = false;
this.getList();
} else {
this.$notify({
title: '失败',
message: data.message,
type: 'error',
duration: 2000
})
}
})
}
},
/**
* 确定
* */
okHandler() {
let arr = [];
let arr = []
this.fileList2.map(function(item) {
arr.push(item.url);
});
arr.push(item.url)
})
let params = {
illegalPic: arr.join(","),
illegalPic: arr.join(','),
illegalAmount: this.price,
id: this.detailId
};
}
saveOrderViolation(params).then(response => {
if (response.status === 200) {
this.$notify({
title: "成功",
message: "创建成功",
type: "success",
title: '成功',
message: '创建成功',
type: 'success',
duration: 2000
});
this.illegalVisible = false;
this.getList();
})
this.illegalVisible = false
this.getList()
} else {
this.$notify({
title: "创建失败",
message: "操作失败!",
type: "error",
title: '创建失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
})
}
});
})
},
/**
* 上传成功
* */
handleSuccess(res, file) {
let c = { url: res.data };
this.fileList2.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.fileList2.push(c)
this.showLoadingBody = false
},
/**
* 删除违章图片
* */
handleRemove(file, fileList1) {
this.fileList2 = fileList1;
this.fileList2 = fileList1
},
/**
* 出车上传成功
* */
handleDepartureSuccess(res, file) {
let c = { url: res.data };
this.departurePicList.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.departurePicList.push(c)
this.showLoadingBody = false
},
/**
* 删除出车图片
* */
handleDepartureRemove(file, fileList2) {
this.departurePicList = fileList2;
this.departurePicList = fileList2
},
/**
* 上传成功
* */
handleArrivalSuccess(res, file) {
let c = { url: res.data };
this.arrivalPicList.push(c);
this.showLoadingBody = false;
let c = { url: res.data }
this.arrivalPicList.push(c)
this.showLoadingBody = false
},
/**
* 删除违章图片
* */
handleArrivalRemove(file, fileList3) {
this.arrivalPicList = fileList3;
this.arrivalPicList = fileList3
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry(row) {
var t = this;
this.fileList2 = [];
this.price = "";
var t = this
this.fileList2 = []
this.price = ''
if (row.vehicleDepartureLogVo.illegalPic) {
let arr = row.vehicleDepartureLogVo.illegalPic.split(",");
let fileList2 = [];
let p = {};
let arr = row.vehicleDepartureLogVo.illegalPic.split(',')
let fileList2 = []
let p = {}
arr.map(function(item) {
p = {
url: item
};
fileList2.push(p);
});
t.fileList2 = fileList2;
}
fileList2.push(p)
})
t.fileList2 = fileList2
}
if (row.vehicleDepartureLogVo.illegalAmount) {
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount);
t.price = parseFloat(row.vehicleDepartureLogVo.illegalAmount)
}
this.detailId = row.vehicleDepartureLogVo.id;
this.illegalVisible = true;
this.detailId = row.vehicleDepartureLogVo.id
this.illegalVisible = true
},
/**
* 弹框-取消
* */
cancel() {
this.illegalVisible = false;
this.illegalVisible = false
},
handleDetail(row) {
var t = this;
this.detailItem = row;
this.activeId = row.id
var t = this
this.detailItem = row
if (row.vehicleDepartureLogVo != undefined) {
if (
row.vehicleDepartureLogVo.departurePic != undefined &&
row.vehicleDepartureLogVo.departurePic != ""
row.vehicleDepartureLogVo.departurePic != ''
) {
let arr = row.vehicleDepartureLogVo.departurePic.split(",");
let departurePicList = [];
let p = {};
let arr = row.vehicleDepartureLogVo.departurePic.split(',')
let departurePicList = []
let p = {}
arr.map(function(item) {
departurePicList.push(item);
});
t.departurePicList = departurePicList;
departurePicList.push(item)
})
t.departurePicList = departurePicList
} else {
t.departurePicList = [];
t.departurePicList = []
}
if (
row.vehicleDepartureLogVo.arrivalPic != undefined &&
row.vehicleDepartureLogVo.arrivalPic != ""
row.vehicleDepartureLogVo.arrivalPic != ''
) {
let Arr = row.vehicleDepartureLogVo.arrivalPic.split(",");
let arrivalPicList = [];
let p = {};
let Arr = row.vehicleDepartureLogVo.arrivalPic.split(',')
let arrivalPicList = []
let p = {}
Arr.map(function(item) {
arrivalPicList.push(item);
});
t.arrivalPicList = arrivalPicList;
arrivalPicList.push(item)
})
t.arrivalPicList = arrivalPicList
} else {
t.arrivalPicList = [];
t.arrivalPicList = []
}
} else {
t.departurePicList = [];
t.arrivalPicList = [];
t.departurePicList = []
t.arrivalPicList = []
}
this.dialogDetailVisible = true;
this.dialogDetailVisible = true
},
//监听change事件
getProvinceRegions(item) {
this.listQuery.zoneId = item;
this.baranchQuery.zoneId = item;
this.listQuery.liftCompany = undefined;
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
this.listQuery.liftCompany = undefined
getAllBranchCompanyByZoneId(this.baranchQuery).then(response => {
this.allBranchCompany = response.data;
});
this.allBranchCompany = response.data
})
},
getAllBranchCompanyChange(item) {
this.listQuery.liftCompany = item;
this.listQuery.liftCompany = item
},
querySearch(queryString, cb) {
let selectArry = [];
let selectArry = []
let iitem = {
value: "全部",
name: "全部"
};
selectArry.push(iitem);
value: '全部',
name: '全部'
}
selectArry.push(iitem)
this.allCompaniesArr.map(function(item) {
item.value = item.name;
selectArry.push(item);
});
this.selectArry = selectArry;
item.value = item.name
selectArry.push(item)
})
this.selectArry = selectArry
var results = queryString
? selectArry.filter(this.createFilter(queryString))
: selectArry;
: selectArry
// 调用 callback 返回建议列表的数据
cb(results);
cb(results)
},
createFilter(queryString) {
return restaurant => {
return restaurant.name.indexOf(queryString.toLowerCase()) != -1;
};
return restaurant.name.indexOf(queryString.toLowerCase()) != -1
}
},
/**
* 分公司搜索
* */
handleSelect2(item) {
this.listQuery.subordinateBranch = item.id;
console.log(item);
this.listQuery.subordinateBranch = item.id
console.log(item)
},
/**
* 提车分公司
* */
handleSelect1(item) {
this.form4Lift.liftCompany = item.id;
console.log(item);
this.form4Lift.liftCompany = item.id
console.log(item)
},
cancelDialog4Lift(formName) {
this.dialogForm4LiftVisible = false;
this.$refs[formName].resetFields();
this.dialogForm4LiftVisible = false
this.$refs[formName].resetFields()
},
cancelDialog4Ret(formName) {
this.dialogForm4RetVisible = false;
this.$refs[formName].resetFields();
this.dialogForm4RetVisible = false
this.$refs[formName].resetFields()
},
/**
* 出车弹框-确定
* */
liftOk(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
if (Number(this.departureForm.mileage) > 999999) {
this.$notify({
title: "警告",
message: "公里数不能大于999999",
type: "warning",
title: '警告',
message: '公里数不能大于999999',
type: 'warning',
duration: 2000
});
return false;
})
return false
}
var arr = [];
var arr = []
this.departurePicList.map(function(item) {
arr.push(item.url);
});
this.departureForm.departurePic = arr.join(",");
arr.push(item.url)
})
this.departureForm.departurePic = arr.join(',')
departureVehicle(this.departureForm).then(response => {
if (response.status == 200) {
this.dialogForm4LiftVisible = false;
this.dialogForm4LiftVisible = false
this.$notify({
title: "成功",
message: "出车成功",
type: "success",
title: '成功',
message: '出车成功',
type: 'success',
duration: 2000
});
this.cleanDepartureForm();
this.getList();
})
this.cleanDepartureForm()
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleBookInfo(row) {
this.$refs.bookInfoViewer.handleBookInfo(row.vehicle);
this.$refs.bookInfoViewer.handleBookInfo(row.vehicle)
},
handleAccItemInfo(row) {
this.selectedAccItem = row.accItemAndAmount;
this.$refs.accItemSelector.show();
this.selectedAccItem = row.accItemAndAmount
this.$refs.accItemSelector.show()
},
checkIfBooked(bookedDate, [startDateStr, endDateStr]) {
if (
this.$utils.isInteger(bookedDate) &&
this.$utils.isString(startDateStr) &&
startDateStr !== "" &&
startDateStr !== '' &&
this.$utils.isString(endDateStr) &&
endDateStr !== ""
endDateStr !== ''
) {
let startDate = toEast8Date(startDateStr);
let endDate = toEast8Date(endDateStr);
let startDate = toEast8Date(startDateStr)
let endDate = toEast8Date(endDateStr)
for (
;
this.$utils.toDateString(startDate, "yyyy-MM-dd") <=
this.$utils.toDateString(endDate, "yyyy-MM-dd");
this.$utils.toDateString(startDate, 'yyyy-MM-dd') <=
this.$utils.toDateString(endDate, 'yyyy-MM-dd');
startDate.setDate(startDate.getDate() + 1)
) {
if ((bookedDate & (1 << (startDate.getDate() - 1))) !== 0) {
return true;
return true
}
}
}
return false;
return false
},
checkIfApply(code) {
return code === BOOK_RECORD_STATUS_APPLY;
return code === BOOK_RECORD_STATUS_APPLY
},
checkIfProved(code) {
return code === BOOK_RECORD_STATUS_PROVED;
return code === BOOK_RECORD_STATUS_PROVED
},
checkIfLift(code) {
return code === BOOK_RECORD_STATUS_LIFT;
return code === BOOK_RECORD_STATUS_LIFT
},
getList() {
this.listLoading = true;
this.listLoading = true
for (var key in this.listQuery) {
if (this.listQuery[key] === "") {
this.listQuery[key] = undefined;
if (this.listQuery[key] === '') {
this.listQuery[key] = undefined
}
}
page(this.listQuery).then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
});
this.list = response.data.data
this.total = response.data.totalCount
this.listLoading = false
})
},
getBookRecordStatus: function(data) {
this.bookRecordStatus["3"].val = "待出行";
this.bookRecordStatus["4"].val = "驳回";
this.bookRecordStatus["5"].val = "出行中";
this.bookRecordStatus["7"].val = "已完成";
this.bookRecordStatus['3'].val = '待出行'
this.bookRecordStatus['4'].val = '驳回'
this.bookRecordStatus['5'].val = '出行中'
this.bookRecordStatus['7'].val = '已完成'
if (data) {
if (!this.$utils.isInteger(data.status)) {
return "未知";
return '未知'
}
if (
data.status == 2 &&
(data.vehicleDepartureLogVo == undefined ||
data.vehicleDepartureLogVo == null)
) {
return this.bookRecordStatus["3"].val;
return this.bookRecordStatus['3'].val
}
if (
data.status == 2 &&
......@@ -1385,7 +1451,7 @@ export default {
data.vehicleDepartureLogVo != null &&
data.vehicleDepartureLogVo.state == 0
) {
return this.bookRecordStatus["5"].val;
return this.bookRecordStatus['5'].val
}
if (
data.status == 2 &&
......@@ -1393,31 +1459,31 @@ export default {
data.vehicleDepartureLogVo != null &&
data.vehicleDepartureLogVo.state == 1
) {
return this.bookRecordStatus["7"].val;
return this.bookRecordStatus['7'].val
}
return this.bookRecordStatus[data.status + ""].val;
return this.bookRecordStatus[data.status + ''].val
}
return "";
return ''
},
getAllBookRecordStatus: function() {
console.log(this.bookRecordStatus);
console.log(this.bookRecordStatus)
return this.bookRecordStatus;
return this.bookRecordStatus
},
getDatePeriodStr([startDate, endDate]) {
if (
this.$utils.isString(startDate) &&
startDate !== "" &&
startDate !== '' &&
this.$utils.isString(endDate) &&
endDate !== ""
endDate !== ''
) {
return (
formatDate(toEast8Date(startDate), "yyyy-MM-dd") +
" 至 " +
formatDate(toEast8Date(endDate), "yyyy-MM-dd")
);
formatDate(toEast8Date(startDate), 'yyyy-MM-dd') +
' 至 ' +
formatDate(toEast8Date(endDate), 'yyyy-MM-dd')
)
}
return "未知";
return '未知'
},
/**
* 清空出车弹框数据
......@@ -1426,7 +1492,7 @@ export default {
this.departureForm = {
vehicleId: null,
departureBranchCompanyId: null, //出发地分公司id
departureBranchCompanyName: "", //出发地分公司名称
departureBranchCompanyName: '', //出发地分公司名称
use: null,
user: null,
userTel: null,
......@@ -1435,12 +1501,12 @@ export default {
mileage: null,
numberPlate: null,
expectArrivalBranchCompanyId: null, //目的地分公司id
expectArrivalBranchCompanyName: "", //目的地分公司名称
expectArrivalBranchCompanyName: '', //目的地分公司名称
bookRecordId: null,
departurePic: "",
departurePic: '',
remark: null,
bookStartDate: null
};
}
},
cleanArrivalForm() {
this.arrivalForm = {
......@@ -1451,149 +1517,157 @@ export default {
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: "",
arrivalPic: "",
remark: "",
arrivalBranchCompanyName: '',
arrivalPic: '',
remark: '',
bookRecordId: null
};
}
},
/**
* 搜索按钮
* */
handleFilter() {
this.listQuery.page = 1;
this.listQuery.page = 1
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
this.getList()
} else {
return false;
return false
}
});
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
this.listQuery.limit = val
this.getList()
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
this.listQuery.page = val
this.getList()
},
handleProve(row) {
this.$confirm("确定批准申请?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('确定批准申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
prove(row.id).then(response => {
if (
response.code === rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
response.code ===
rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
) {
this.$notify({
title: "失败",
title: '失败',
message:
rsCode.msg[rsCode.code.VEHICLE_BOOKED_INFO_ALREADY_CHANGED],
type: "error",
rsCode.msg[
rsCode.code
.VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
type: 'error',
duration: 2000
});
})
} else if (
response.code === rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
response.code ===
rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
) {
this.$notify({
title: "失败",
title: '失败',
message:
rsCode.msg[rsCode.code.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED],
type: "error",
rsCode.msg[
rsCode.code
.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
type: 'error',
duration: 2000
});
})
} else if (response.code === rsCode.RS_CODE_SUC) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
})
if (this.dialogDetailVisible) {
this.dialogDetailVisible = false;
this.dialogDetailVisible = false
}
}
this.getList();
});
});
this.getList()
})
})
},
rejectBtn(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
reject(this.rejectFrom).then(response => {
if (response.code == 1) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
if (this.rejectVisible) {
this.rejectVisible = false;
this.rejectVisible = false
}
if (this.dialogDetailVisible) {
this.dialogDetailVisible = false;
this.dialogDetailVisible = false
}
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleReject(row) {
this.rejectVisible = true;
this.rejectFrom.vehicleBookRecordId = row.id;
this.rejectFrom.rejectRemark = "";
this.rejectVisible = true
this.rejectFrom.vehicleBookRecordId = row.id
this.rejectFrom.rejectRemark = ''
},
/**
* 操作-出车
* @param row
*/
handleLift(row) {
this.cleanDepartureForm();
this.departurePicList = [];
this.cleanDepartureForm()
this.departurePicList = []
if (row.bookType == 1) {
this.departureForm.use = "租车";
this.departureForm.use = '租车'
} else if (row.bookType == 2) {
this.departureForm.use = "用户租赁";
this.departureForm.use = '用户租赁'
} else if (row.bookType == 3) {
this.departureForm.use = "维修";
this.departureForm.use = '维修'
} else if (row.bookType == 4) {
this.departureForm.use = "展览";
this.departureForm.use = '展览'
} else if (row.bookType == 5) {
this.departureForm.use = "旅游";
this.departureForm.use = '旅游'
} else if (row.bookType == 6) {
this.departureForm.use = "保养";
this.departureForm.use = '保养'
} else if (row.bookType == 7) {
this.departureForm.use = "预约中";
this.departureForm.use = '预约中'
} else if (row.bookType == 8) {
this.departureForm.use = "禁用";
this.departureForm.use = '禁用'
} else if (row.bookType == 9) {
this.departureForm.use = "客户用车";
this.departureForm.use = '客户用车'
} else if (row.bookType == 10) {
this.departureForm.use = "其他";
}
this.departureForm.bookRecordId = row.id;
this.departureForm.vehicleId = row.vehicleId;
this.departureForm.numberPlate = row.numberPlate;
this.departureForm.departureDate = Date();
this.departureForm.departureBranchCompanyId = row.liftCompany;
this.departureForm.departureBranchCompanyName = row.liftCompanyName;
this.departureForm.user = row.vehicleUsername;
this.departureForm.userTel = row.vehicleUserPhone;
this.departureForm.use = '其他'
}
this.departureForm.bookRecordId = row.id
this.departureForm.vehicleId = row.vehicleId
this.departureForm.numberPlate = row.numberPlate
this.departureForm.departureDate = Date()
this.departureForm.departureBranchCompanyId = row.liftCompany
this.departureForm.departureBranchCompanyName = row.liftCompanyName
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:''
......@@ -1601,103 +1675,104 @@ export default {
// this.departureForm.user = ''
// this.departureForm.userTel = ''
// }
this.departureForm.expectArrivalBranchCompanyId = row.retCompany;
this.departureForm.expectArrivalBranchCompanyName = row.retCompanyName;
this.dialogForm4LiftVisible = true;
this.departureForm.expectArrivalBranchCompanyId = row.retCompany
this.departureForm.expectArrivalBranchCompanyName =
row.retCompanyName
this.dialogForm4LiftVisible = true
},
/**
* 操作-收车
* @param row
*/
handleRet(row) {
this.arrivalPicList = [];
this.arrivalForm.bookRecordId = row.id;
this.arrivalForm.vehicleId = row.vehicleId;
this.arrivalForm.numberPlate = row.numberPlate;
this.arrivalForm.arrivalDate = Date();
this.arrivalForm.arrivalBranchCompanyId = row.retCompany;
this.arrivalForm.arrivalBranchCompanyName = row.retCompanyName;
this.dialogForm4RetVisible = true;
this.arrivalPicList = []
this.arrivalForm.bookRecordId = row.id
this.arrivalForm.vehicleId = row.vehicleId
this.arrivalForm.numberPlate = row.numberPlate
this.arrivalForm.arrivalDate = Date()
this.arrivalForm.arrivalBranchCompanyId = row.retCompany
this.arrivalForm.arrivalBranchCompanyName = row.retCompanyName
this.dialogForm4RetVisible = true
},
ret(formName) {
const set = this.$refs;
const set = this.$refs
set[formName].validate(valid => {
if (valid) {
if (Number(this.arrivalForm.mileage) > 999999) {
this.$notify({
title: "警告",
message: "公里数不能大于999999",
type: "warning",
title: '警告',
message: '公里数不能大于999999',
type: 'warning',
duration: 2000
});
return false;
})
return false
}
var arr = [];
var arr = []
this.arrivalPicList.map(function(item) {
arr.push(item.url);
});
this.arrivalForm.arrivalPic = arr.join(",");
arr.push(item.url)
})
this.arrivalForm.arrivalPic = arr.join(',')
arrivalVehicle(this.arrivalForm).then(response => {
if (response.status == 200) {
this.dialogForm4RetVisible = false;
this.dialogForm4RetVisible = false
this.$notify({
title: "成功",
message: "收车成功",
type: "success",
title: '成功',
message: '收车成功',
type: 'success',
duration: 2000
});
this.cleanArrivalForm();
this.getList();
})
this.cleanArrivalForm()
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
});
})
} else {
return false;
return false
}
});
})
},
handleUnbook(row) {
this.$confirm("确定取消预定?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
this.$confirm('确定取消预定?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var obj = {
vehicleBookRecordId: row.id
};
}
unbook(obj)
.then(response => {
if (response.code == 1) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
})
this.getList()
} else {
this.$notify({
title: "失败",
title: '失败',
message: response.message,
type: "error",
type: 'error',
duration: 2000
});
})
}
})
.catch(response => {
console.log(response);
});
});
console.log(response)
})
})
}
}
};
}
</script>
<style scoped>
......@@ -1720,4 +1795,14 @@ export default {
width: 150px;
text-align: center;
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.5;
background: #000;
z-index: 2001;
}
</style>
......@@ -17,7 +17,7 @@
<el-form-item label="车辆状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择车辆状态">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in getAllVehicleStatus() " :key="val.code" :label="val.val"
<el-option v-for="(val,index) in getAllVehicleStatus() " :key="index" :label="val.val"
:value="val.code"></el-option>
</el-select>
</el-form-item>
......@@ -92,7 +92,7 @@
<el-form-item label="保险公司" prop="insuranceCompany">
<el-select class="filter-item" v-model="listQuery.insuranceCompany" placeholder="请选择保险公司">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in getAllInsuranceCompany() " :key="val.code" :label="val.val"
<el-option v-for="(val, index ) in getAllInsuranceCompany() " :key="index" :label="val.val"
:value="val.code"></el-option>
</el-select>
</el-form-item>
......@@ -345,7 +345,7 @@
<!-- 对话框相关html元素 -->
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" @close='closePop'>
<el-form :model="form" :rules="rules" ref="form" label-width="90px">
<el-row>
......@@ -369,7 +369,7 @@
<el-col :span="12">
<el-form-item label="车辆状态" prop="status">
<el-select class="filter-item" v-model="form.status" placeholder="请选择车辆状态">
<el-option v-for="(val, key, index) in getAllVehicleStatus() " :key="val.code" :label="val.val"
<el-option v-for="(val,index ) in getAllVehicleStatus() " :key="index" :label="val.val"
:value="val.code"></el-option>
</el-select>
</el-form-item>
......@@ -396,7 +396,7 @@
<el-col :span="12">
<el-form-item label="所属人">
<el-select v-model.number="form.belongTo" placeholder="请选择所属人">
<el-option v-for="(val, key, index) in getAllBelong2Type() " :key="val.code" :label="val.val"
<el-option v-for="(val,index ) in getAllBelong2Type() " :key="index" :label="val.val"
:value="val.code"></el-option>
</el-select>
<el-input v-if="typeof(form.belongTo) !== 'undefined' && form.belongTo != 1" v-model="form.belongToName"
......@@ -409,7 +409,7 @@
<el-form-item label="保险公司" prop="insuranceCompany">
<el-select class="filter-item" v-model="form.insuranceCompany" placeholder="请选择保险公司">
<el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in getAllInsuranceCompany() " :key="val.code" :label="val.val"
<el-option v-for="(val, index) in getAllInsuranceCompany() " :key="index" :label="val.val"
:value="val.code"></el-option>
</el-select>
</el-form-item>
......@@ -638,7 +638,7 @@
<el-form-item label="用途" prop="bookType">
<el-select class="filter-item" v-model="form4Apply.bookType" placeholder="请选择用途">
<el-option :key="undefined" label="" :value="undefined"></el-option>
<el-option v-for="(val, key, index) in book_type_list " :key="val.id" :label="val.name"
<el-option v-for="(val, index) in book_type_list " :key="index" :label="val.name"
:value="val.id"></el-option>
</el-select>
</el-form-item>
......@@ -895,6 +895,7 @@
}
//检验code码
checkCode(value, this.form.id).then(response => {
// console.log(response.data);
if (response.data === true) {
return callback(new Error("该车辆编码已经被占用,请重新输入"));
} else {
......@@ -911,15 +912,16 @@
min: 0,
max: 200,
message: '长度小于 200 个字符',
trigger: 'blur'
trigger: 'blur',
}
],
numberPlate: [
{
min: 0,
max: 20,
message: '长度小于 20 个字符',
trigger: 'blur'
trigger: 'blur',
message: '车牌不能为空且长度小于20个字符',
required: true
}
],
remark: [
......@@ -1241,7 +1243,8 @@
return getSonRegionByCodes(this.listQuery.addrProvince);
},
getAllZoneList() {
this.allZoneArr = getAllZone();
let that = this;
that.allZoneArr = getAllZone();
return getAllZone();
},
townRegions4Query() {
......@@ -1455,11 +1458,11 @@
},
queryVehicleModelSearch(queryString, cb) {
let selectArry = [];
let iitem = {
value: "全部",
name: "全部"
};
selectArry.push(iitem);
// let iitem = {
// value: "全部",
// name: "全部"
// };
// selectArry.push(iitem);
this.allVehicleList.map(function (item) {
item.value = item.name;
selectArry.push(item);
......@@ -2027,6 +2030,10 @@
this.dialogFormVisible = false;
this.dialogForm4ApplyVisible = false;
this.$refs[formName].resetFields();
// this.listQuery.code = ''
},
closePop(formName){
this.$refs.form.resetFields();
},
cancel4Apply(formName) {
this.dialogForm4ApplyVisible = false;
......
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