|
@@ -91,7 +91,7 @@
|
|
|
<el-col :span="9">
|
|
|
<el-form-item
|
|
|
label="车牌类型"
|
|
|
- prop="license"
|
|
|
+ prop="carTypes"
|
|
|
>
|
|
|
<el-select
|
|
|
placeholder="请选择车牌类型"
|
|
@@ -255,7 +255,7 @@
|
|
|
<el-input
|
|
|
v-model="tableData[scope.$index].positionInformation"
|
|
|
@click.native="positionInformation(scope.$index)"
|
|
|
- placeholder="请输入内容"
|
|
|
+ placeholder="请选择车位"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
|
|
@@ -263,6 +263,7 @@
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
+ width="100"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-tooltip
|
|
@@ -395,10 +396,15 @@
|
|
|
placement="bottom"
|
|
|
content="编辑"
|
|
|
>
|
|
|
- <i
|
|
|
- class="zoniot_font zoniot-icon-bianji"
|
|
|
- @click="addEdit(scope.$index)"
|
|
|
- ></i>
|
|
|
+ <span>
|
|
|
+ <img
|
|
|
+ src="../../../assets/img/btn_peizhi.png"
|
|
|
+ alt=""
|
|
|
+ style="width: 15px; height: 13px; margin-left: 10px; cursor: pointer;"
|
|
|
+ @click="addEdit(scope.$index)"
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
|
|
@@ -414,10 +420,12 @@
|
|
|
<script>
|
|
|
import { parse } from 'path';
|
|
|
import native from './native.vue'
|
|
|
+import configure from './configure.vue';
|
|
|
export default {
|
|
|
- props: ['params'],
|
|
|
+ props: ['params', configure],
|
|
|
data () {
|
|
|
return {
|
|
|
+ url: '',
|
|
|
areaNamed: [],
|
|
|
formDate: {
|
|
|
userName: '',
|
|
@@ -596,6 +604,15 @@ export default {
|
|
|
{ required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
{ pattern: /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/, message: '请输入正确的电话' }
|
|
|
],
|
|
|
+ carTypes: [
|
|
|
+ { type: 'date', required: true, message: '请选择车牌类型', trigger: 'change' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ },
|
|
|
+ rule: {
|
|
|
+ parkingArea: [
|
|
|
+ { type: 'date', required: true, message: '请选择车牌类型', trigger: 'change' }
|
|
|
+ ]
|
|
|
},
|
|
|
|
|
|
room: [],
|
|
@@ -623,8 +640,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
parked (item) {
|
|
|
- debugger
|
|
|
this.areaNamed.push(item.label);
|
|
|
// this.tableData.areaName = item.label;
|
|
|
this.formDate.sort = item.startDate;
|
|
@@ -635,7 +653,18 @@ export default {
|
|
|
// /sc-community-web/parkingCar/queryRechargeRules
|
|
|
this.recharge = []
|
|
|
this.$http
|
|
|
- .get('/sc-community-web/parkingCar/queryRechargeRules', { carType: this.formDate.carType, parkingId: this.formDate.parkId })
|
|
|
+ .get('/sc-community-web/parkingCar/queryRechargeRules', {
|
|
|
+ carType: this.formDate.carTypes == '临时车' ? '0' :
|
|
|
+ this.formDate.carTypes == 'VIP车' ? '1' :
|
|
|
+ this.formDate.carTypes == '月租车' ? '2' :
|
|
|
+ this.formDate.carTypes == '充时车' ? '3' :
|
|
|
+ this.formDate.carTypes == '时租车' ? '4' :
|
|
|
+ this.formDate.carTypes == '产全车' ? '5' :
|
|
|
+ this.formDate.carTypes == '计次车' ? '6' :
|
|
|
+ this.formDate.carTypes == '贵宾车' ? '7' :
|
|
|
+ this.formDate.carTypes == '员工卡' ? '8' : this.formDate.carTypes
|
|
|
+ , parkingId: this.formDate.parkId
|
|
|
+ })
|
|
|
.then(({ data, msg, status }) => {
|
|
|
console.log('data', data);
|
|
|
|
|
@@ -669,7 +698,7 @@ export default {
|
|
|
console.log(this.formDate.tel)
|
|
|
this.room = [];
|
|
|
this.$http
|
|
|
- .get('/sc-community-web/parkingCar/getUserInfo', { phone: this.formDate.tel })
|
|
|
+ .get('/sc-community/parkingCar/getUserInfo', { phone: this.formDate.tel })
|
|
|
.then(({ data, msg, status }) => {
|
|
|
for (let i = 0; i < data.houseInfos.length; i++) {
|
|
|
this.room.push({
|
|
@@ -678,6 +707,10 @@ export default {
|
|
|
residentId: data.houseInfos[i].residentId,
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ this.formDate.resDate = data.houseInfos[0].id;
|
|
|
+ this.formDate.id = data.houseInfos[0].residentId;
|
|
|
+
|
|
|
})
|
|
|
.catch(() => { });
|
|
|
}
|
|
@@ -734,7 +767,6 @@ export default {
|
|
|
title: '选择车位'
|
|
|
});
|
|
|
}).then((data) => {
|
|
|
- debugger
|
|
|
var id = data[0].id;
|
|
|
this.tableData[id].positionInformation = data[0].positionInformation;
|
|
|
this.tableData[id].parkingId = data[0].value;
|
|
@@ -800,7 +832,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
region () {
|
|
|
- debugger
|
|
|
this.$http.post('/sc-community-web/parkingCar/findAreaInfo', { parkId: this.formDate.parkId }).then(({ data, status, msg }) => {
|
|
|
this.eloption = [];
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
@@ -819,22 +850,34 @@ export default {
|
|
|
},
|
|
|
submit () {
|
|
|
debugger
|
|
|
+ if (this.params.comm == 'add') {
|
|
|
+ // this.url = '/sc-community-web/parkingCar/addVehicleInfor'
|
|
|
+ this.url = '/sc-community-web/parkingCar/updateVehicleInfor'
|
|
|
+ for (let i = 0; i < this.tableData.length; i++) {
|
|
|
+ this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // this.url = '/sc-community-web/parkingCar/updateVehicleInfor'
|
|
|
+ this.url = '/sc-community-web/parkingCar/addVehicleInfor'
|
|
|
+ }
|
|
|
this.$refs.formDate.validate((valid) => {
|
|
|
console.log('valid', valid);
|
|
|
if (valid) {
|
|
|
var table = [];
|
|
|
- debugger
|
|
|
- this.tableData.areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
- debugger
|
|
|
for (let i = 0; i < this.tableData.length; i++) {
|
|
|
+ // this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
+ this.tableData[i].areaName = (Array.from(new Set(this.areaNamed))).join(',');
|
|
|
+ console.log(this.tableData[i]);
|
|
|
+ debugger
|
|
|
table.push({
|
|
|
areaId: [this.tableData[i].parkingArea],
|
|
|
areaName: this.tableData[i].areaName,
|
|
|
lotCount: this.num,
|
|
|
lotName: this.tableData[i].positionInformation,
|
|
|
+
|
|
|
// ruleId: this.formDate.ruleId,//暂无
|
|
|
parkingId: this.tableData[i].parkingId,
|
|
|
- lotName: '',
|
|
|
+ // lotName: '',
|
|
|
carType: '',
|
|
|
ruleId: this.formDate.ruleId,
|
|
|
sequence: this.formDate.sort,
|
|
@@ -842,6 +885,7 @@ export default {
|
|
|
|
|
|
|
|
|
})
|
|
|
+
|
|
|
this.formDate.areaName = this.tableData[i].areaName
|
|
|
}
|
|
|
var parkingSpace = [];
|
|
@@ -849,11 +893,11 @@ export default {
|
|
|
parkingSpace.push({
|
|
|
carNo: this.parkingSpaceSetting[k].licensePlate + this.parkingSpaceSetting[k].license,
|
|
|
cardNo: this.parkingSpaceSetting[k].accessCredentials,
|
|
|
- enable: this.parkingSpaceSetting[k].state,
|
|
|
+ enable: this.parkingSpaceSetting[k].state == '启用' ? '1' : this.parkingSpaceSetting[k].state == '禁用' ? '2' : this.parkingSpaceSetting[k].state,
|
|
|
remark: this.parkingSpaceSetting[k].remarks,
|
|
|
|
|
|
|
|
|
- carType: this.formDate.carType,
|
|
|
+ carType: this.form[k].vehicleType,
|
|
|
carNoColor: this.form[k].vehicleColor,
|
|
|
carColor: this.form[k].vehicleColors,
|
|
|
carBrand: this.form[k].vehicleBrand,
|
|
@@ -863,21 +907,29 @@ export default {
|
|
|
this.plateNoInfo.push((this.parkingSpaceSetting[k].licensePlate + this.parkingSpaceSetting[k].license));
|
|
|
|
|
|
for (let j = 0; j < table.length; j++) {
|
|
|
- table[j].lotName = this.parkingSpaceSetting[k].license;
|
|
|
table[j].carType = this.formDate.carType;
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
- this.$http.post('/sc-community-web/parkingCar/addVehicleInfor', {
|
|
|
+ debugger
|
|
|
+ this.$http.post(this.url, {
|
|
|
+ cardId: this.params.cardId != undefined ? this.params.cardId : '',
|
|
|
cardName: this.formDate.userName,
|
|
|
userName: this.formDate.userName,
|
|
|
tel: this.formDate.tel,
|
|
|
houseId: this.formDate.residentId,
|
|
|
residentId: this.formDate.id,
|
|
|
remark: this.formDate.remark,
|
|
|
- cardType: this.formDate.carTypes,
|
|
|
+ cardType: this.formDate.carTypes == '临时车' ? '0' :
|
|
|
+ this.formDate.carTypes == 'VIP车' ? '1' :
|
|
|
+ this.formDate.carTypes == '月租车' ? '2' :
|
|
|
+ this.formDate.carTypes == '充时车' ? '3' :
|
|
|
+ this.formDate.carTypes == '时租车' ? '4' :
|
|
|
+ this.formDate.carTypes == '产全车' ? '5' :
|
|
|
+ this.formDate.carTypes == '计次车' ? '6' :
|
|
|
+ this.formDate.carTypes == '贵宾车' ? '7' :
|
|
|
+ this.formDate.carTypes == '员工卡' ? '8' : this.formDate.carTypes,
|
|
|
beginTime: this.formDate.beginTime,
|
|
|
parkId: this.formDate.parkId,
|
|
|
areaName: this.formDate.areaName,
|
|
@@ -904,7 +956,6 @@ export default {
|
|
|
},
|
|
|
created () {
|
|
|
this.nameParking();
|
|
|
-
|
|
|
if (this.params.cardId != undefined) {
|
|
|
this.params.cardId;
|
|
|
this.$http.get('/sc-community-web/parkingCar/getVehicleInfor', { id: this.params.cardId }).then(({ data, msg, status }) => {
|
|
@@ -925,32 +976,31 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
this.nameParkingLotName = '1';//随便
|
|
|
|
|
|
this.formDate.beginTime = data.beginTime
|
|
|
this.formDate.parkId = data.parkId
|
|
|
var carLotStr = JSON.parse(data.carLotStr)
|
|
|
for (let i = 0; i < carLotStr.length; i++) {
|
|
|
- debugger
|
|
|
// this.tableData[i].parkingArea = carLotStr[i].areaId
|
|
|
this.tableData[i].areaName = carLotStr[i].areaName
|
|
|
this.tableData[i].carType = data.cardType
|
|
|
this.tableData[i].lotCount = carLotStr[i].lotCount
|
|
|
this.tableData[i].positionInformation = carLotStr[i].lotName
|
|
|
+ this.tableData[i].parkingId = carLotStr[i].parkingId
|
|
|
// this.formDate.ruleId = carLotStr.ruleId
|
|
|
this.formDate.sort = carLotStr.sequence
|
|
|
}
|
|
|
for (let k = 0; k < data.parkCarDetails.length; k++) {
|
|
|
this.parkingSpaceSetting[k].licensePlate = (data.fullCarNoStr).substr(0, 1)
|
|
|
this.parkingSpaceSetting[k].license = (data.fullCarNoStr).substr(1)
|
|
|
- this.parkingSpaceSetting[k].state = data.parkCarDetails[k].enable == 0 ? '启用' : '禁用'
|
|
|
+ this.parkingSpaceSetting[k].state = data.parkCarDetails[k].enable == 1 ? '启用' : '禁用'
|
|
|
this.parkingSpaceSetting[k].remarks = data.parkCarDetails[k].remark
|
|
|
|
|
|
- this.formDate.carType = data.cardType
|
|
|
- this.form[k].vehicleColor = data.parkCarDetails[k].carNoColor
|
|
|
- this.form[k].vehicleColors = data.parkCarDetails[k].carColor
|
|
|
- this.form[k].vehicleBrand = data.parkCarDetails[k].carBrand
|
|
|
+ // this.formDate.carType = data.cardType
|
|
|
+ // this.form[k].vehicleColor = data.parkCarDetails[k].carNoColor
|
|
|
+ // this.form[k].vehicleColors = data.parkCarDetails[k].carColor
|
|
|
+ // this.form[k].vehicleBrand = data.parkCarDetails[k].carBrand
|
|
|
}
|
|
|
|
|
|
|
|
@@ -958,12 +1008,18 @@ export default {
|
|
|
this.nameParking();
|
|
|
this.region();
|
|
|
|
|
|
-
|
|
|
for (let i = 0; i < carLotStr.length; i++) {
|
|
|
- debugger
|
|
|
this.tableData[i].parkingArea = Number(carLotStr[i].areaId)
|
|
|
this.formDate.ruleId = carLotStr[i].ruleId
|
|
|
}
|
|
|
+ debugger
|
|
|
+ for (let k = 0; k < data.parkCarDetails.length; k++) {
|
|
|
+ this.formDate.carType = data.cardType;
|
|
|
+ this.form[k].vehicleType = data.parkCarDetails[k].carType;
|
|
|
+ this.form[k].vehicleColor = data.parkCarDetails[k].carNoColor
|
|
|
+ this.form[k].vehicleColors = data.parkCarDetails[k].carColor
|
|
|
+ this.form[k].vehicleBrand = data.parkCarDetails[k].carBrand
|
|
|
+ }
|
|
|
|
|
|
});
|
|
|
}
|