Commit 39f0089b authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/base-modify' into base-modify-hf

parents f5a45cbf f1d54f2a
module.exports = {
NODE_ENV: '"development"',
<<<<<<< HEAD
<<<<<<< HEAD
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(小威)
=======
BASE_API:'"https://xxtest.upyuns.com"',//'"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(小威)
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
=======
BASE_API:'"https://xxtest.upyuns.com"',//'"https://xxtest.upyuns.com"',//'"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(小威)
>>>>>>> 4ae432b1473866a6dc59f10c1ec4b5c66a9ad5cc
APP_ORIGIN: '"https://wallstreetcn.com"'
}
......@@ -91,15 +91,15 @@
</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 { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import { one, save } from 'src/api/summit/activityShow'
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 { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import { one, save } from 'src/api/summit/activityShow'
export default {
export default {
props: ['reviewRow'],
name: 'reviewPopup',
components: {
......@@ -170,10 +170,6 @@ export default {
beforeAvatarUpload(file) {
var index = file.name.lastIndexOf('.')
var ext = file.name.substr(index + 1)
<<<<<<< HEAD
console.log(ext)
=======
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
if (ext != 'zip') {
this.$message.error('上传压缩包只能是 zip 格式!')
return false
......@@ -200,11 +196,7 @@ export default {
cre() {
let zipPic = []
this.list.forEach(element => {
<<<<<<< HEAD
zipPic.push(element.url)
=======
zipPic.push(element.response.data)
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
})
let mp4Vadio = []
this.vadio.forEach(element => {
......@@ -226,11 +218,8 @@ export default {
: zipPic.join(',') + ',' + this.oldList
: zipPic.join(',')
}
<<<<<<< HEAD
=======
// console.log(params);
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
save(params).then(res => {
this.responseResult(res)
})
......@@ -312,69 +301,69 @@ export default {
}
}
}
}
}
</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;
}
}
.el-dialog__footer .dialog-footer1 {
.el-dialog__footer .dialog-footer1 {
position: relative;
text-align: center;
}
}
.fhjj {
.fhjj {
width: 500px;
}
}
.content {
.content {
margin-left: 4%;
}
}
.height {
.height {
margin-bottom: 2%;
}
}
. el-form-item__content {
. el-form-item__content {
margin-left: 5% !important;
}
}
.status {
.status {
margin-top: 4%;
}
}
</style>
......@@ -105,16 +105,7 @@
<el-form-item label="活动id:">
<!-- <el-input v-model="form.rid" placeholder="请输入签到/抽奖活动的id"></el-input> -->
<el-select v-model="form.rid" placeholder="请选择签到/抽奖活动id">
<<<<<<< HEAD
<el-option
v-for="(item,index) in optionsId"
:key="index"
:label="item"
:value="item"
></el-option>
=======
<el-option v-for="(item,index) in optionsId" :key="index" :label="item" :value="item"></el-option>
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
</el-select>
</el-form-item>
</el-col>
......@@ -155,11 +146,7 @@
<div>
<el-row>
<el-col>
<<<<<<< HEAD
<el-form-item label="房车介绍:">
=======
<el-form-item label="房车介绍:" style="margin-top:20px">
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
<el-upload
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
list-type="picture-card"
......@@ -221,16 +208,16 @@
</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 { 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富文本
import { formatDate } from 'utils/dateFormattor'
export default {
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, activityIds } from 'src/api/summit/activity'
import { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import UE from '../../modal/Ueditor' // 百度ue富文本
import { formatDate } from 'utils/dateFormattor'
export default {
props: ['popupShow', 'popupRow', 'titleNme'],
name: 'summitPopup',
components: {
......@@ -291,11 +278,7 @@ export default {
created() {
activityIds().then(data => {
if (data.status == 200) {
<<<<<<< HEAD
this.optionsId = data.data;
=======
this.optionsId = data.data
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
}
})
},
......@@ -395,11 +378,7 @@ export default {
},
getState(status) {
if (this.$utils.isInteger(status)) {
<<<<<<< HEAD
console.log(status);
=======
console.log(status)
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
if (status == 0) {
return '默认'
} else {
......@@ -465,12 +444,6 @@ export default {
? (this.form.bmCloseTime = this.form.bmCloseTime)
: (this.form.bmCloseTime = this.form.bmCloseTime.getTime())
let pic = []
<<<<<<< HEAD
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
=======
if (this.fileList2 != '') {
console.log(this.fileList2);
this.fileList2.forEach(element => {
......@@ -482,7 +455,6 @@ export default {
});
console.log(pic);
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
this.form.vehicleImgs = pic.join(',')
}
......@@ -530,14 +502,6 @@ export default {
this.form.startTime = this.form.startTime.getTime()
this.form.bmCloseTime = this.form.bmCloseTime.getTime()
let pic = []
<<<<<<< HEAD
if (!!this.form.vehicleImgs) {
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
}
=======
if (this.fileList2 != '') {
this.fileList2.forEach(element => {
pic.push(element.response.data);
......@@ -550,7 +514,6 @@ export default {
// })
// this.form.vehicleImgs = pic.join(',')
// }
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
this.dataProcessing()
add(this.form).then(res => {
this.responseResult(res)
......@@ -560,11 +523,7 @@ export default {
dataProcessing() {
if (this.form.state === '默认') {
this.form.status = '0'
<<<<<<< HEAD
}else{
=======
} else {
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
this.form.status = this.statusRadio
}
this.form.processJson = JSON.stringify(this.processJson)
......@@ -625,72 +584,72 @@ export default {
}
}
}
}
}
</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;
}
}
.el-dialog__footer .dialog-footer1 {
.el-dialog__footer .dialog-footer1 {
position: relative;
text-align: center;
}
}
.fhjj {
.fhjj {
width: 500px;
}
}
.content {
.content {
margin-left: 4%;
}
}
.height {
.height {
margin-bottom: 2%;
}
}
/* . el-form-item__content {
/* . el-form-item__content {
margin-left: 5% !important;
} */
} */
.status {
.status {
margin-top: 4%;
}
.steLine .el-row {
}
.steLine .el-row {
margin-bottom: 10px;
}
}
</style>
......@@ -131,13 +131,6 @@
<span v-if="scope.row.bookType==10">其他</span>
</template>
</el-table-column>
<<<<<<< HEAD
<el-table-column align="center" label="预定时间" width="220">
<template scope="scope">
<span>{{scope.row.bookStartDate}}{{scope.row.bookEndDate}}</span>
</template>
</el-table-column>
=======
<el-table-column align="center" label="预定取/还时间" width="200">
<template scope="scope">
<span>{{scope.row.bookStartDate}}</span> <br/><span>{{scope.row.bookEndDate}}</span>
......@@ -148,7 +141,6 @@
<span>{{scope.row.actualStartDate}}</span> <br/><span>{{scope.row.actualEndDate}}</span>
</template>
</el-table-column>
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
<!-- <el-table-column align="center" label="预定时间" width="220">
<template scope="scope">
<span
......@@ -337,11 +329,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="车辆编号">
<<<<<<< HEAD
<span>{{detailItem.vehicleId}}</span>
=======
<span>{{detailItem.code}}</span>
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
</el-form-item>
</el-col>
<!-- <el-col :span="7">
......@@ -722,7 +710,7 @@
</template>
<script>
import {
import {
page,
prove,
reject,
......@@ -734,33 +722,33 @@ import {
saveOrderViolation,
departureVehicle,
arrivalVehicle
} from 'api/vehicle/bookRecord'
} from 'api/vehicle/bookRecord'
import {
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'
} 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 {
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 {
export default {
name: 'bookRecord',
components: {
bookInfoViewer,
......@@ -1911,30 +1899,30 @@ export default {
})
}
}
}
}
</script>
<style scoped>
.order-details .el-form-item {
.order-details .el-form-item {
margin-bottom: 0px !important;
}
.order-details hr {
}
.order-details hr {
height: 1px;
background-color: #ccc;
border: none;
}
.image {
}
.image {
width: 100%;
height: 110px;
display: block;
}
.el-card__body,
.el-card {
}
.el-card__body,
.el-card {
padding: 0px !important;
width: 150px;
text-align: center;
}
.modal_modal {
}
.modal_modal {
position: fixed;
left: 0;
top: 0;
......@@ -1943,5 +1931,5 @@ export default {
opacity: 0.5;
background: #000;
z-index: 2001;
}
}
</style>
......@@ -925,10 +925,10 @@
</template>
<script>
<<<<<<< HEAD
import upkeepDialog from '../../modal/upkeepDialogVisible'// 保养弹框
import departureDialog from '../../modal/departureDialog'// 出车弹框
import 'static/css/uploadImg.css';// 引入图片上传组件对话框
import axios from 'axios'
import upkeepDialog from '../../modal/upkeepDialogVisible' // 保养弹框
import departureDialog from '../../modal/departureDialog' // 出车弹框
import 'static/css/uploadImg.css' // 引入图片上传组件对话框
import {
page,
addObj,
......@@ -940,38 +940,34 @@
delObj,
getSysRegionByIds,
checkCode,
downloadExcel,
checkVin,
checkEngineNum
} from '../../../api/vehicle/vehicleInfo/';
checkEngineNum,
getArea
} from '../../../api/vehicle/vehicleInfo/'
import {
getAllVehicleModelList,
getAllVehicleList
} from '../../../api/vehicleType';
} from '../../../api/vehicleType'
import {
getConstantByTypeAndCode,
getConstantListByType,
getAllInsuranceCompany,
getInsuranceCompany
} from 'api/base_info/constant/';
} from 'api/base_info/constant/'
import {
departureVehicle,
arrivalVehicle,
upkeepVehicle,
upkeepEndVehicle
} from 'api/vehicle/active';
} from 'api/vehicle/active'
import {
getAllUpkeepItem,
getUpkeepAll
} from 'api/vehicle/upkeep';
import { getAllUpkeepItem, getUpkeepAll } from 'api/vehicle/upkeep'
import {
getSonRegionByCodes,
getRegionByCodes,
} from 'api/base_info/region/';
import { getSonRegionByCodes, getRegionByCodes } from 'api/base_info/region/'
import {
VEHICLE_CONSTANT_VEHICLE_BRAND,
......@@ -980,234 +976,33 @@
BELONG_TO_TYPE_OWN,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN,
VEHICLE_CONSTANT_STATUS_NORMAL
} from '../../../store/modules/baseInfo';
import {
getAllCompany,
getAll
} from 'api/base_info/branch_company/';
import {
formatDate
} from 'utils/dateFormattor';
} from '../../../store/modules/baseInfo'
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str
} from 'utils/dateUtils';
import { getAllCompany, getAll } from 'api/base_info/branch_company/'
import rsCode from '../../../utils/rsCode';
import { formatDate } from 'utils/dateFormattor'
import {mapGetters} from 'vuex';
import {
getToken
} from 'utils/auth';
import bookInfoViewer from '../bookInfoViewer';
import accItemSelector from '../accompanyingItem/accItemSelector.vue';
import Element1 from "../../admin/menu/components/element";
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import {
getAllZone
} from 'api/base_info/constant/';
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
export default {
name: 'vehicleInfo',
components: {
ElFormItem,
ElCol,
ElRow,
Element1,
bookInfoViewer,
accItemSelector,
upkeepDialog,
departureDialog
},
data() {
return {
upkeepRow: {},//保养数据
departureRow: {},//出车数据
state1: '',
vehicleArr: '',
BASE_API: process.env.BASE_API,
dialogForm4LicenceVisible: false,
licenceSrcUrl: undefined,
showLoadingBody: false,
allVehicleList: [],//全部车型
form: {
vehicleModelName:"",
subordinateBranchName: "",
subordinateBranch: undefined,
parkBranchCompanyName: "",
parkBranchCompanyId: undefined,
modelId: undefined,//车型id
status: undefined,
code: undefined,
numberPlate: undefined,
brand: undefined,
useType: undefined,
vin: undefined,
insuranceNo: undefined,
insuranceCompany: undefined,
insuranceDateRange4form: undefined,
annualVerificationDate: undefined,
maintenanceDate: undefined,
belongTo: undefined,
belongToName: undefined,
engineNum: undefined,
manufacturer: undefined,
mileageLastUpdate: undefined,
// receiveTime: undefined,
drivingLicensePath: undefined,
remark: undefined
},
rules: {
subordinateBranchName: [
{
required: true,
message: '请选择所属分公司',
trigger: 'change'
}
],
vehicleModelName:[
{
required: true,
message: '请选择车型',
trigger: 'change'
}
],
parkBranchCompanyName: [
{
required: true,
message: '请选择停靠分公司',
trigger: 'change'
}
],
maintenanceMileage: [this.integerValidator()],
code: [
{
validator: (rule, value, callback) => {
if (this.$utils.isUndefined(value) || this.$utils.isNull(value) || this.$utils.isEmpty("" + value)) {
return callback(new Error("请输入车辆编码"));
}
if (!this.$utils.isInteger(value)) {
return callback(new Error('编码必须为整数'));
}
if (value < 1 || value > 9999999999) {
return callback(new Error('编码合法范围:[1 - 9999999999]'));
}
//检验code码
checkCode(value, this.form.id).then(response => {
// console.log(response.data);
if (response.data === true) {
return callback(new Error("该车辆编码已经被占用,请重新输入"));
} else {
callback();
}
})
},
trigger: 'blur',
required: true
}
],
vin: [
{
<<<<<<< HEAD
min: 0,
max: 200,
message: '长度小于 200 个字符',
trigger: 'blur',
}
],
=======
validator: (rule, value, callback) => {
//检验code码
if (this.$utils.isUndefined(value) || this.$utils.isNull(value) || this.$utils.isEmpty("" + value)) {
return callback(new Error("请输入车架号"));
=======
import axios from 'axios'
import upkeepDialog from '../../modal/upkeepDialogVisible' // 保养弹框
import departureDialog from '../../modal/departureDialog' // 出车弹框
import 'static/css/uploadImg.css' // 引入图片上传组件对话框
import {
page,
addObj,
getObj,
book,
getBookedInfoIn2Month,
getBookedInfo,
putObj,
delObj,
getSysRegionByIds,
checkCode,
downloadExcel,
checkVin,
checkEngineNum,
getArea
} from '../../../api/vehicle/vehicleInfo/'
import {
getAllVehicleModelList,
getAllVehicleList
} from '../../../api/vehicleType'
import {
getConstantByTypeAndCode,
getConstantListByType,
getAllInsuranceCompany,
getInsuranceCompany
} from 'api/base_info/constant/'
import {
departureVehicle,
arrivalVehicle,
upkeepVehicle,
upkeepEndVehicle
} from 'api/vehicle/active'
import { getAllUpkeepItem, getUpkeepAll } from 'api/vehicle/upkeep'
import { getSonRegionByCodes, getRegionByCodes } from 'api/base_info/region/'
import {
VEHICLE_CONSTANT_VEHICLE_BRAND,
VEHICLE_CONSTANT_VEHICLE_USE,
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN,
BELONG_TO_TYPE_OWN,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN,
VEHICLE_CONSTANT_STATUS_NORMAL
} from '../../../store/modules/baseInfo'
import { getAllCompany, getAll } from 'api/base_info/branch_company/'
import { formatDate } from 'utils/dateFormattor'
import {
toEast8Date,
deepCopyDate,
newEast8Date,
convertDate2Str
} from 'utils/dateUtils'
} from 'utils/dateUtils'
import rsCode from '../../../utils/rsCode'
import rsCode from '../../../utils/rsCode'
import { mapGetters } from 'vuex'
import { getToken } from 'utils/auth'
import { mapGetters } from 'vuex'
import { getToken } from 'utils/auth'
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
import Element1 from '../../admin/menu/components/element'
import ElRow from 'element-ui/packages/row/src/row'
import ElCol from 'element-ui/packages/col/src/col'
import { getAllZone } from 'api/base_info/constant/'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import bookInfoViewer from '../bookInfoViewer'
import accItemSelector from '../accompanyingItem/accItemSelector.vue'
import Element1 from '../../admin/menu/components/element'
import ElRow from 'element-ui/packages/row/src/row'
import ElCol from 'element-ui/packages/col/src/col'
import { getAllZone } from 'api/base_info/constant/'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
export default {
export default {
name: 'vehicleInfo',
components: {
ElFormItem,
......@@ -1317,7 +1112,6 @@ export default {
)
} else {
callback()
>>>>>>> 4ae432b1473866a6dc59f10c1ec4b5c66a9ad5cc
}
})
},
......@@ -1352,517 +1146,6 @@ export default {
} else {
callback()
}
<<<<<<< HEAD
checkVin(value, this.form.id).then(response => {
// console.log(response.data);
if (response.data === true) {
return callback(new Error("该车架号已经被占用,请重新输入"));
} else {
callback();
}
})
},
trigger: 'blur',
}
],
engineNum: [
{
validator: (rule, value, callback) => {
//检验code码
checkEngineNum(value, this.form.id).then(response => {
// console.log(response.data);
if (response.data === true) {
return callback(new Error("该发动机号已经被占用,请重新输入"));
} else {
callback();
}
})
},
trigger: 'blur',
}
],
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
numberPlate: [
{
min: 0,
max: 20,
trigger: 'blur',
message: '车牌不能为空且长度小于20个字符',
required: true
}
],
remark: [
{
min: 0,
max: 2000,
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
book_type_list: [
{
name: '维修',
id: 3
}, {
name: '展览',
id: 4
}, {
name: '旅游',
id: 5
}, {
name: '保养',
id: 6
}, {
name: '禁用',
id: 8
}, {
name: '客户用车',
id: 9
}, {
name: '其他',
id: 10
}
],
form4Apply: {
bookStartDate: undefined,
bookEndDate: undefined,
vehicle: undefined,
liftAddr: undefined,
state3: '',
retCompany: undefined,
state4: '',
liftCompany: undefined,
destination: undefined,
selectedAccItem: undefined,
remark: undefined,
vehicleId: undefined,
bookType: undefined,
vehicleUsername: undefined,
vehicleUserPhone: undefined,
upkeepIds: [],
},
pickerOptions4Apply: {
disabledDate: this.checkBookDate
},
rules4Query: {
vin: [
{
min: 0,
max: 200,
message: '长度小于 200 个字符',
trigger: 'blur'
}
],
subordinateBranch: [
{
validator: (rule, value, callback) => {
if ((this.$utils.isString(this.listQuery.bookedStartDate) && this.listQuery.bookedStartDate !== '') ||
(this.$utils.isString(this.listQuery.bookedEndDate) && this.listQuery.bookedEndDate !== '') ||
(this.$utils.isString(this.listQuery.notBookedStartDate) && this.listQuery.notBookedStartDate !== '') ||
(this.$utils.isString(this.listQuery.notBookedEndDate) && this.listQuery.notBookedEndDate !== '')) {
if (!this.listQuery.subordinateBranch) {
return callback(new Error('若需按预定日期查询车辆,选择分公司'));
}
}
callback();
},
trigger: 'blur'
}
],
notBookDateRange: [
{
validator: (rule, value, callback) => {
if (this.notBookDateRange) {
let startDate = toEast8Date(this.listQuery.notBookedStartDate);
let endDate = toEast8Date(this.listQuery.notBookedEndDate);
if (this.$utils.isDate(startDate) && startDate.setMonth(startDate.getMonth() + 2) < endDate) {
return callback(new Error('日期范围不能超过2个月'));
}
}
callback();
},
trigger: 'blur'
}
],
bookDateRange: [
{
validator: (rule, value, callback) => {
if (this.bookDateRange) {
let startDate = toEast8Date(this.listQuery.bookedStartDate);
let endDate = toEast8Date(this.listQuery.bookedEndDate);
if (this.$utils.isDate(startDate) && startDate.setMonth(startDate.getMonth() + 2) < endDate) {
return callback(new Error('日期范围不能超过2个月'));
}
}
callback();
},
trigger: 'blur'
}
]
},
rules4Apply: {
bookDateRange4Apply: [
{
validator: (rule, value, callback) => {
if (!this.$utils.isArray(this.bookDateRange4Apply) || this.bookDateRange4Apply.length === 0) {
return callback(new Error('请输入预定时间。'));
}
let [oriStartDate, ortEndDate] = this.bookDateRange4Apply;
if (!this.$utils.isDate(oriStartDate) || !this.$utils.isDate(ortEndDate)) {
return callback(new Error('请输入预定时间。'));
}
let [startDate, endDate] = [deepCopyDate(oriStartDate), deepCopyDate(ortEndDate)];
if (!this.$utils.isDate(oriStartDate) || !this.$utils.isDate(ortEndDate)) {
return callback();
}
for (let curDate = startDate; curDate <= endDate; curDate.setDate(curDate.getDate() + 1)) {
if (this.checkBookDate(curDate)) {
return callback(new Error('请选择从今天起两个月内,未预定的时间。'));
}
}
callback();
},
required: true,
trigger: 'blur'
}
],
vehicleUsername: [
{
required: true,
message: '请输入使用人',
trigger: 'blur'
}
],
vehicleUserPhone: [
{
required: true,
message: '请输入使用人联系方式',
trigger: 'blur'
}, {
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号'
}
],
bookType: [
{
required: true,
message: '请选择用途',
}
],
liftCompany: [
{
required: true,
message: '请选择提车分公司',
trigger: 'blur',
type: 'integer'
}
],
retCompany: [
{
required: true,
message: '请选择还车分公司',
trigger: 'blur',
type: 'integer'
}
],
destination: [
{
min: 0,
max: 200,
message: '长度小于 200 个字符',
trigger: 'blur'
}
],
remark: [
{
min: 0,
max: 2000,
message: '长度小于 2000 个字符',
trigger: 'blur'
}
]
},
selectArry: [],
selectVehicleModelArray: [],
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
zoneId: undefined,
addrProvince: undefined,
addrCity: undefined,
addrTown: undefined,
vin: undefined,
insuranceCompany: undefined,
mileageRangeStart: undefined,
mileageRangeEnd: undefined,
insuranceDateRange: undefined,
mRange: undefined,
aVRange: undefined,
subordinateBranch: undefined,
numberPlate: undefined,
status: undefined,
bookedStartDate: undefined,
bookedEndDate: undefined,
notBookedStartDate: undefined,
notBookedEndDate: undefined,
code: undefined,
modelId: undefined,
belongToName: undefined,
useType:undefined
},
showMoreQueryFilter: false,
showMoreMoreCol: false,
inline: true,
dialogFormVisible: false,
dialogForm4ApplyVisible: false,
curBookedInfo3Month: undefined,
curBookedInfo: undefined,
dialogStatus: '',
allCompanies: {},
allCompaniesArr: [],
textMap: {
update: '编辑',
create: '创建',
apply: '预定申请'
},
tableKey: 0,
departureDialogVisible: false,//出车弹框
departureForm: {
vehicleId: null,
numberPlate: null,
departureDate: null,
departureBranchCompanyId: null,
departureBranchCompanyName: '',
use: null,
user: null,
userTel: null,
checkMan: null,
checkManTel: null,
expectArrivalBranchCompanyId: null,
expectArrivalBranchCompanyName: '',
mileage: null
},
arrivalDialogVisible: false,
arrivalForm: {
vehicleId: null,
numberPlate: null,
arrivalDate: null,
recycleMan: null,
recycleManTel: null,
mileage: null,
arrivalBranchCompanyId: null,
arrivalBranchCompanyName: ''
},
upkeepDialogVisible: false,
allUpkeepItems: null,
allZoneArr: [],//全部片区
provinceRegions: [],//片区下省份数据
cityList:[],
vehicleInfo_btn_edit: false,//编辑
vehicleInfo_btn_add: false,//新增
vehicleInfo_btn_apply: false,//申请预定
vehicleInfo_btn_ride: false,//出车
vehicleInfo_btn_ret: false,//删除
}
},
created() {
this.getList();
this.getAllVehicleType();//获取全部车型
getAll()
.then(response => {
this.allCompaniesArr = response.data;
})
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
getUpkeepAll().then(response => {
this.allUpkeepItems = response.data;
});
this.getAllProvinceRegions();
this.getAllCities();
this.vehicleInfo_btn_edit = this.elements['vehicleInfo:btn_edit'];
this.vehicleInfo_btn_add = this.elements['vehicleInfo:btn_add'];
this.vehicleInfo_btn_apply = this.elements['vehicleInfo:btn_apply'];
this.vehicleInfo_btn_ride = this.elements['vehicleInfo:btn_ride'];
this.vehicleInfo_btn_ret = this.elements['vehicleInfo:btn_ret'];
},
computed: {
...mapGetters([
'elements',
'belong2Type',
'vehicleStatus'
]),
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
},
townRegions() {
if (!this.$utils.isInteger(this.form.addrCity)) {
return null;
}
return getSonRegionByCodes(this.form.addrCity);
},
getAllZoneList() {
let that = this;
<<<<<<< HEAD
that.allZoneArr = getAllZone();
=======
that.allZoneArr = getAllZone();
>>>>>>> ed66af1f93f55e2551b0b09c15e1697c72ecb84b
return getAllZone();
},
townRegions4Query() {
if (!this.$utils.isInteger(this.listQuery.addrCity)) {
return null;
}
return getSonRegionByCodes(this.listQuery.addrCity);
},
getHeaderWithToken() {
return {Authorization: getToken()};
},
getSelectedAccItemStr() {
if (!this.$utils.isEmpty(this.form4Apply.selectedAccItem)) {
let rsStr = '';
for (let key in this.form4Apply.selectedAccItem) {
rsStr = rsStr + this.$refs.accItemSelector.getNameById(key) + ' : ' + this.form4Apply.selectedAccItem[key] + '\n';
}
return rsStr;
}
return '';
},
getUnkownBrandCode: () => VEHICLE_CONSTANT_BRAND_CODE_UNKOWN,
getCurBookedInfo: function () {
if (!this.$utils.isEmpty(this.curBookedInfo3Month) && this.curBookedInfo3Month.length > 0) {
let rs = {};
for (let index in this.curBookedInfo3Month) {
rs[this.curBookedInfo3Month[index].yearMonth] = this.curBookedInfo3Month[index].bookedDate;
}
return rs;
}
return undefined;
},
bookDateRange: {
get: function () {
let startDate = undefined;
let endDate = undefined;
if (this.$utils.isString(this.listQuery.bookedStartDate) && this.listQuery.bookedStartDate !== '') {
startDate = toEast8Date(this.listQuery.bookedStartDate);
}
if (this.$utils.isString(this.listQuery.bookedEndDate) && this.listQuery.bookedEndDate !== '') {
endDate = toEast8Date(this.listQuery.bookedEndDate);
}
return [startDate, endDate];
},
set: function ([startDate, endDate]) {
if (this.$utils.isDate(startDate)) {
this.listQuery.bookedStartDate = formatDate(startDate, 'yyyy-MM-dd');
} else {
this.listQuery.bookedStartDate = undefined;
}
if (this.$utils.isDate(endDate)) {
this.listQuery.bookedEndDate = formatDate(endDate, 'yyyy-MM-dd');
} else {
this.listQuery.bookedEndDate = undefined;
}
}
},
notBookDateRange: {
get: function () {
let startDate = undefined;
let endDate = undefined;
if (this.$utils.isString(this.listQuery.notBookedStartDate) && this.listQuery.notBookedStartDate !== '') {
startDate = toEast8Date(this.listQuery.notBookedStartDate);
}
if (this.$utils.isString(this.listQuery.notBookedEndDate) && this.listQuery.notBookedEndDate !== '') {
endDate = toEast8Date(this.listQuery.notBookedEndDate);
}
return [startDate, endDate];
},
set: function ([startDate, endDate]) {
if (this.$utils.isDate(startDate)) {
this.listQuery.notBookedStartDate = formatDate(startDate, 'yyyy-MM-dd');
} else {
this.listQuery.notBookedStartDate = undefined;
}
if (this.$utils.isDate(endDate)) {
this.listQuery.notBookedEndDate = formatDate(endDate, 'yyyy-MM-dd');
} else {
this.listQuery.notBookedEndDate = undefined;
}
}
},
bookDateRange4Apply: {
get: function () {
let startDate = undefined;
let endDate = undefined;
if (this.$utils.isString(this.form4Apply.bookStartDate) && this.form4Apply.bookStartDate !== '') {
startDate = toEast8Date(this.form4Apply.bookStartDate);
}
if (this.$utils.isString(this.form4Apply.bookEndDate) && this.form4Apply.bookEndDate !== '') {
endDate = toEast8Date(this.form4Apply.bookEndDate);
}
return [startDate, endDate];
},
set: function ([startDate, endDate]) {
if (this.$utils.isDate(startDate)) {
this.form4Apply.bookStartDate = formatDate(startDate, 'yyyy-MM-dd hh:mm:ss');
} else {
this.form4Apply.bookStartDate = undefined;
}
if (this.$utils.isDate(endDate)) {
this.form4Apply.bookEndDate = formatDate(endDate, 'yyyy-MM-dd hh:mm:ss');
} else {
this.form4Apply.bookEndDate = undefined;
}
}
}
},
methods: {
/**
* 根据片区获取省份数据
* */
getProvinceRegions() {
let that = this;
this.listQuery.addrCity = undefined;
this.listQuery.addrProvince = undefined;
if (!this.$utils.isInteger(this.listQuery.zoneId)) {
return that.getAllProvinceRegions();
}
this.allZoneArr.map(function (item) {
if (item.id == that.listQuery.zoneId) {
getSysRegionByIds(item.provinceIds).then(response => {
let listRs = undefined;
if (!that.$utils.isEmpty(response.data)) {
listRs = response.data;
}
that.provinceRegions = listRs;
});
}
});
},
getAllProvinceRegions() {
let that = this;
var zoneStr = "";
getAllZone().map(function (item) {
zoneStr = zoneStr+item.provinceIds+",";
});
let listRs = undefined;
getSysRegionByIds(zoneStr).then(response => {
if (!that.$utils.isEmpty(response.data)) {
listRs = response.data;
}
that.provinceRegions = listRs;
});
return listRs;
=======
})
},
trigger: 'blur'
......@@ -1907,7 +1190,6 @@ export default {
trigger: 'blur'
}
]
>>>>>>> 4ae432b1473866a6dc59f10c1ec4b5c66a9ad5cc
},
book_type_list: [
{
......@@ -3775,5 +3057,5 @@ export default {
}
}
}
}
}
</script>
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