[问题修复](pet_门口门禁):

- bug修复
pet_门口门禁
huangyuxuan 2025-02-07 14:09:01 +08:00
parent 125c2c9a00
commit 95241390b2
11 changed files with 244 additions and 191 deletions

View File

@ -18,15 +18,14 @@
placeholder="请选择车辆类型"/>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_Search2"
:clearable="false"
:options="departmentTreeData"
:props="defaultProps"
v-model="searchFrom.VEHICLE_DEPARTMENT_ID"
placeholder="请选择车辆所属部门"/>
<el-col :span="4">
<el-form-item label="车辆所属企业">
<el-input v-model="searchFrom.RELEVANT_UNIT_NAME" placeholder="请输入车辆所属企业..." />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="车辆所属部门">
<el-input v-model="searchFrom.VEHICLE_DEPARTMENT_NAME" placeholder="请输入车辆所属部门..." />
</el-form-item>
</el-col>
<el-col :span="3">
@ -77,6 +76,7 @@
{{ translateVehicleType(row.VEHICLE_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="RELEVANT_UNIT_NAME" label="车辆所属企业" align="center" />
<el-table-column prop="DEPT_NAME" label="车辆所属部门" align="center" />
<el-table-column prop="U_NAME" label="车辆责任人" align="center"/>
<el-table-column prop="VISIT_START_TIME" label="访问起始时间" align="center"/>
@ -195,7 +195,8 @@ export default {
VEHICLE_ID: '', // ID()
LICENCE_NO: '', //
VEHICLE_TYPE: '', //
VEHICLE_DEPARTMENT_ID: '' // ID
VEHICLE_DEPARTMENT_NAME: '', //
RELEVANT_UNIT_NAME: ''
},
//
addForm: {

View File

@ -107,6 +107,8 @@ export default {
this.loading = true
this.visible = true
this.VEHICLE_ID = e.VEHICLE_ID
this.form.STATUS = ''
this.form.OPINION = ''
this.loading = false
},
handleClose() {
@ -127,24 +129,28 @@ export default {
this.$parent.activeName = 'List'
},
sendMessage() {
this.$refs.form.validate((valid) => {
if (!valid) {
this.$refs.form.validate(valid => {
if (valid) {
requestFN(
'/vehiclemessage/auditChronicallyCar',
{
FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID,
IS_AUDIT: this.form.STATUS,
VEHICLE_ID: this.VEHICLE_ID,
REMARK: this.form.OPINION
}
).then((data) => {
this.visible = false
this.$emit('refresh', '')
this.$message.success('操作成功') //
}).catch((e) => {
this.loading = false
this.$message.error('操作失败,请重试') //
})
} else {
this.$message.warning('请填写完整信息') //
return false
}
requestFN(
'/vehiclemessage/auditChronicallyCar',
{
FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID,
IS_AUDIT: this.form.STATUS,
VEHICLE_ID: this.VEHICLE_ID,
REMARK: this.form.OPINION
}
).then((data) => {
this.visible = false
this.$emit('refresh', '')
}).catch((e) => {
this.loading = false
})
})
}
}

View File

@ -96,12 +96,12 @@
</div>
<!-- 添加车辆信息 -->
<el-dialog :visible.sync="addDialogVisible" title="添加车辆信息" width="600px">
<el-form v-if="addDialogVisible" ref="addForm" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item :rules="[{required: true}]" label="车牌号">
<el-form v-if="addDialogVisible" ref="addForm" :model="addForm" :rules="rules" label-width="170px" style="padding:0 20px; width: 500px;">
<el-form-item label="车牌号" prop="LICENCE_NO">
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
<el-form-item label="车牌类型" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_add2"
:clearable="false"
@ -112,7 +112,7 @@
style="width: 300px"/>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item :rules="[{required: true}]" label="车辆类型" prop="VEHICLE_TYPE">
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
@ -123,7 +123,7 @@
style="width: 300px"/>
</el-form-item>
<!-- 员工车辆单位车辆外部车辆 下拉框 -->
<el-form-item :rules="[{required: true}]" label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
<el-form-item label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
<SelectTree
ref="selectTree_add4"
:clearable="false"
@ -134,7 +134,7 @@
style="width: 300px"/>
</el-form-item>
<!-- 车辆所属部门下拉框 -->
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
<SelectTree
ref="selectTree_add1"
:clearable="false"
@ -252,6 +252,40 @@ export default {
directives: { waves },
data() {
return {
rules: {
LICENCE_NO: [
{ required: true, message: '车牌号不能为空', trigger: 'blur' },
{
validator: (rule, value, callback) => {
const reg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/
if (!reg.test(value)) {
callback(new Error('车牌号格式不正确'))
} else {
callback()
}
},
trigger: 'blur'
}
],
LICENCE_TYPE: [
{ required: true, message: '车牌类型不能为空', trigger: 'change' }
],
VEHICLE_TYPE: [
{ required: true, message: '车辆类型不能为空', trigger: 'change' }
],
VEHICLE_BELONG_TYPE: [
{ required: true, message: '车辆所属类型不能为空', trigger: 'change' }
],
VEHICLE_DEPARTMENT_ID: [
{ required: true, message: '车辆所属部门不能为空', trigger: 'change' }
],
VISIT_START_TIME: [
{ required: true, message: '访问起始时间不能为空', trigger: 'change' }
],
VISIT_END_TIME: [
{ required: true, message: '访问结束时间不能为空', trigger: 'change' }
]
},
ISCHECK: false,
userInfo: JSON.parse(sessionStorage.getItem('user')),
listLoading: true,
@ -471,85 +505,29 @@ export default {
},
//
addDialogConfirmBtn() {
if (this.addForm.LICENCE_NO !== null && this.addForm.LICENCE_NO === '') {
this.$message({
message: '车牌号不能为空',
type: 'error'
})
return false
}
if (this.addForm.LICENCE_TYPE !== null && this.addForm.LICENCE_TYPE === '') {
this.$message({
message: '请选择车牌类型',
type: 'error'
})
return false
}
if (this.addForm.VEHICLE_TYPE !== null && this.addForm.VEHICLE_TYPE === '') {
this.$message({
message: '请选择车辆类型',
type: 'error'
})
return false
}
if (this.addForm.VEHICLE_BELONG_TYPE !== null && this.addForm.VEHICLE_BELONG_TYPE === '') {
this.$message({
message: '请选择车辆所属类型',
type: 'error'
})
return false
}
if (this.roleName !== '普通用户角色') {
if (this.addForm.VEHICLE_DEPARTMENT_ID !== null && this.addForm.VEHICLE_DEPARTMENT_ID === '') {
this.$message({
message: '请选择车辆所属部门',
type: 'error'
this.$refs.addForm.validate(valid => {
if (valid) {
requestFN(
'vehiclemessage/addVehicleMessage',
{
...this.addForm,
'CORPINFO_ID': this.corpInfoId,
'loginUserId': this.loginUserId
}
).then((data) => {
if (data.result === 'fail') {
this.$message({
message: data.msg,
type: 'error'
})
} else {
this.$message.success('车辆信息添加成功')
this.getPageList() //
this.addDialogVisible = false
}
}).catch((e) => {
})
return false
}
if (this.addForm.USER_ID !== null && this.addForm.USER_ID === '') {
this.$message({
message: '请选择车辆责任人',
type: 'error'
})
return false
}
} else {
this.addForm.VEHICLE_DEPARTMENT_ID = this.loginDepartmentId // id
this.addForm.VEHICLE_DEPARTMENT_NAME = this.loginDepartmentName //
this.addForm.USER_ID = this.loginUserId // id
this.addForm.USER_NAME = this.loginUserName //
}
if (this.addForm.VEHICLE_BELONG_TYPE === '0') { // ()
this.addForm.EMPLOYEE_VEHICLE_USER_ID = this.addForm.USER_ID // id
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = this.addForm.USER_NAME //
} else { //
this.addForm.EMPLOYEE_VEHICLE_USER_ID = '' // id
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = '' //
}
this.addRequest()
},
addRequest() {
requestFN(
'vehiclemessage/addVehicleMessage',
{
...this.addForm,
'CORPINFO_ID': this.corpInfoId,
'loginUserId': this.loginUserId
}
).then((data) => {
if (data.result === 'fail') {
this.$message({
message: data.msg,
type: 'error'
})
} else {
this.$message.success('车辆信息添加成功')
this.getPageList() //
this.addDialogVisible = false
}
}).catch((e) => {
})
},
//
@ -858,7 +836,7 @@ export default {
this.ISCHECK = false
})
} else {
this.$message.success('车牌号不规范')
this.$message.error('车牌号格式不正确')
this.ISCHECK = false
}
}

View File

@ -7,11 +7,11 @@
<el-input v-model="form.USER_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="企业名称:">
<el-input v-model="form.CORPINFO_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-col>
<!-- <el-col :span="5">-->
<!-- <el-form-item label="企业名称:">-->
<!-- <el-input v-model="form.CORPINFO_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="5">
<el-form-item label="部门名称:">
<el-input v-model="form.DEPARTMENT_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
@ -45,7 +45,7 @@
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="NAME" label="姓名"/>
<el-table-column prop="PHONE" label="手机号"/>
<el-table-column prop="CORPINFO_NAME" label="企业名称"/>
<!-- <el-table-column prop="CORPINFO_NAME" label="企业名称"/>-->
<el-table-column prop="DEPARTMENT_NAME" label="部门名称"/>
<el-table-column label="来源" align="center" width="120">
<template slot-scope="{row}">

View File

@ -49,6 +49,7 @@
</el-table-column>
<el-table-column prop="CONTACT" label="联系人"/>
<el-table-column prop="PHONE" label="联系人电话"/>
<el-table-column prop="APPLY_TIME" label="申请时间"/>
<el-table-column label="审核状态" align="center" width="120">
<template slot-scope="{row}">
{{ getType(row.IS_AUDIT) }}
@ -74,19 +75,39 @@
<el-input v-model="detailForm.EMISSION_STANDARDS" readonly />
</el-form-item>
<el-form-item label="驾驶证图片">
<el-image :src="config.fileUrl + detailForm.DRIVING_LICENSE" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.DRIVING_LICENSE"
:preview-src-list="[config.fileUrl + detailForm.DRIVING_LICENSE]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="绿本图片">
<el-image :src="config.fileUrl + detailForm.GREEN_BOOK" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.GREEN_BOOK"
:preview-src-list="[config.fileUrl + detailForm.GREEN_BOOK]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="环保随车清单图片">
<el-image :src="config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST"
:preview-src-list="[config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="出厂合格证图片">
<el-image :src="config.fileUrl + detailForm.FACTORY_CERTIFICATE" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.FACTORY_CERTIFICATE"
:preview-src-list="[config.fileUrl + detailForm.FACTORY_CERTIFICATE]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="环保信息截图图片">
<el-image :src="config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS"
:preview-src-list="[config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="访问起始时间">
<el-input v-model="detailForm.VISIT_START_TIME" readonly />

View File

@ -74,9 +74,6 @@ export default {
rules: {
STATUS: [
{ required: true, message: '请选择是否通过', trigger: 'change' }
],
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
]
},
heirloom: {},
@ -109,6 +106,8 @@ export default {
this.loading = true
this.visible = true
this.VEHICLE_ID = e.VEHICLE_ID
this.form.STATUS = ''
this.form.OPINION = ''
this.loading = false
},
handleClose() {

View File

@ -48,6 +48,7 @@
</el-table-column>
<el-table-column prop="CONTACT" label="联系人"/>
<el-table-column prop="PHONE" label="联系人电话"/>
<el-table-column prop="APPLY_TIME" label="申请时间"/>
<el-table-column label="审核状态" align="center" width="120">
<template slot-scope="{row}">
{{ getType(row.IS_AUDIT) }}
@ -72,19 +73,39 @@
<el-input v-model="detailForm.EMISSION_STANDARDS" readonly />
</el-form-item>
<el-form-item label="驾驶证图片">
<el-image :src="config.fileUrl + detailForm.DRIVING_LICENSE" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.DRIVING_LICENSE"
:preview-src-list="[config.fileUrl + detailForm.DRIVING_LICENSE]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="绿本图片">
<el-image :src="config.fileUrl + detailForm.GREEN_BOOK" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.GREEN_BOOK"
:preview-src-list="[config.fileUrl + detailForm.GREEN_BOOK]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="环保随车清单图片">
<el-image :src="config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST"
:preview-src-list="[config.fileUrl + detailForm.ECO_FRIENDLY_CHECKLIST]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="出厂合格证图片">
<el-image :src="config.fileUrl + detailForm.FACTORY_CERTIFICATE" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.FACTORY_CERTIFICATE"
:preview-src-list="[config.fileUrl + detailForm.FACTORY_CERTIFICATE]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="环保信息截图图片">
<el-image :src="config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS" style="width: 100px; height: 100px" />
<el-image
:src="config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS"
:preview-src-list="[config.fileUrl + detailForm.ENVIRONMENTAL_SCREENSHOTS]"
style="width: 100px; height: 100px"
/>
</el-form-item>
<el-form-item label="访问起始时间">
<el-input v-model="detailForm.VISIT_START_TIME" readonly />

View File

@ -74,9 +74,6 @@ export default {
rules: {
STATUS: [
{ required: true, message: '请选择是否通过', trigger: 'change' }
],
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
]
},
heirloom: {},
@ -109,6 +106,8 @@ export default {
this.loading = true
this.visible = true
this.VEHICLE_ID = e.VEHICLE_ID
this.form.STATUS = ''
this.form.OPINION = ''
this.loading = false
},
beforeClose() {

View File

@ -387,25 +387,41 @@ export default {
this.detailDialogVisible = false
},
deleteSingleDataDeleteBtn(BLACK_LIST_ID, VEHICLE_ID) {
requestFN(
'blackListManage/delBlackList',
{
'BLACK_LIST_ID': BLACK_LIST_ID,
'VEHICLE_ID': VEHICLE_ID
}
).then((data) => {
if (data.result === 'success') {
this.$confirm('确定要删除该黑名单记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'blackListManage/delBlackList',
{
'BLACK_LIST_ID': BLACK_LIST_ID,
'VEHICLE_ID': VEHICLE_ID
}
).then((data) => {
if (data.result === 'success') {
this.$message({
message: '删除成功',
type: 'success'
})
this.getPageList() //
} else {
this.$message({
message: data.msg,
type: 'error'
})
}
}).catch(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.getPageList()
} else {
this.$message({
message: data.msg,
message: '请求失败,请稍后重试',
type: 'error'
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
//

View File

@ -177,22 +177,42 @@ export default {
},
//
deleteSingleDataDeleteBtn(VIOLATION_ID) {
requestFN(
'/breakRulesRecord/deleteRecord',
{
'VIOLATION_ID': VIOLATION_ID
}
).then((data) => {
if (data.result == 'error') {
this.$confirm('确定要清除该违规记录吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/breakRulesRecord/deleteRecord',
{
'VIOLATION_ID': VIOLATION_ID
}
).then((data) => {
if (data.result == 'error') {
this.$message({
message: '违规记录清除失败',
type: 'error'
})
return false
} else {
this.$refs.vehicleViolationTable.clearSelection() //
this.getList() //
this.$message({
message: '违规记录清除成功',
type: 'success'
})
}
}).catch(() => {
this.$message({
message: '违规记录清除失败',
message: '请求失败,请稍后重试',
type: 'error'
})
return false
} else {
this.$refs.vehicleViolationTable.clearSelection() //
this.getList() //
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消清除'
})
})
}
}

View File

@ -97,26 +97,16 @@
<el-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNo()"/>
</el-form-item>
<!-- 白牌蓝牌黄牌绿牌黑牌 下拉框-->
<el-form-item :rules="[{required: true}]" label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
<SelectTree
ref="selectTree_add2"
:clearable="false"
:options="licenceTypeList"
:props="oneselfDefaultProps"
v-model="addForm.LICENCE_TYPE"
placeholder="请选择车牌类型"
style="width: 300px"/>
<el-form-item label="车牌类型" label-width="110px" prop="LICENCE_TYPE">
<el-select v-model="addForm.LICENCE_TYPE" label-width="110px">
<el-option v-for="item in licenceTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
<!-- 货车轿车大巴客车 下拉框-->
<el-form-item :rules="[{required: true}]" label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
<SelectTree
ref="selectTree_add3"
:clearable="false"
:options="vehicleTypeList"
:props="oneselfDefaultProps"
v-model="addForm.VEHICLE_TYPE"
placeholder="请选择车辆类型"
style="width: 300px"/>
<el-form-item label="车辆类型" label-width="110px" prop="VEHICLE_TYPE">
<el-select v-model="addForm.VEHICLE_TYPE" label-width="110px">
<el-option v-for="item in vehicleTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
</el-select>
</el-form-item>
<el-form-item :rules="[{required: true}]" label="违规时间" label-width="110px">
<el-date-picker id="VIOLATIONTIME" ref="VIOLATIONTIME" v-model="addForm.VIOLATIONTIME" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" style="width: 100%" type="datetime" placeholder="请选择" />
@ -543,18 +533,20 @@ export default {
//
goCheckLicenceNo() {
if (this.addForm.LICENCE_NO === '') {
this.$message.success('请输入车牌号')
this.ISCHECK = false
} else {
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.addForm.LICENCE_NO)
if (result) {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.success('车牌号不规范')
this.ISCHECK = false
}
return
}
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
const result = regex.test(this.addForm.LICENCE_NO)
if (result) {
requestFN(
'/vehiclemessage/licenceNo',
{
'licenceNo': this.addForm.LICENCE_NO
}
).then((data) => {
this.addForm.LICENCE_TYPE = String(data.res.LICENCE_TYPE)
this.addForm.VEHICLE_TYPE = String(data.res.VEHICLE_TYPE)
})
}
}
}