parent
288053aba9
commit
2e35e8f5ca
|
@ -2,132 +2,28 @@
|
|||
<div v-loading="listLoading">
|
||||
<div style="padding:20px">
|
||||
<el-form ref="form" :model="form" label-width="210px">
|
||||
<!--第一行-->
|
||||
<el-row>
|
||||
<!-- 动态生成表单项 -->
|
||||
<el-row v-for="(item, index) in uploadConfig" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
|
||||
<div >
|
||||
<img :src="config.fileUrl + form.REQUISITION_FILE" width="100" height="100">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" :label="`已上传${item.label}`">
|
||||
<div>
|
||||
<img :src="config.fileUrl + form[item.prop]" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="智能口门管理系统账号申请单" prop="REQUISITION_FILE" >
|
||||
<el-form-item :label="item.label" :prop="item.prop">
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form.REQUISITION_FILE"
|
||||
:file-list="form[item.prop]"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
:class="{hide: item.hideUpload}"
|
||||
:auto-upload="false"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:on-change="REQUISITION_FILEChangeIMG"
|
||||
:on-remove="(file, fileList) => handleRemove(file, fileList, item.prop)"
|
||||
:on-change="(file, fileList) => handleChange(file, fileList, item.prop)"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--第二行-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
|
||||
<div >
|
||||
<img :src="config.fileUrl + form.COMMITMENT_FILE" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="智能口门管理系统使用承诺书" prop="COMMITMENT_FILE" >
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form.COMMITMENT_FILE"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
:auto-upload="false"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:on-change="REQUISITION_FILEChangeIMG"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--第三行-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
|
||||
<div >
|
||||
<img :src="config.fileUrl + form.LICENSE_FILE" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业执照" prop="LICENSE_FILE" >
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form.LICENSE_FILE"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
:auto-upload="false"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:on-change="REQUISITION_FILEChangeIMG"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--第四行-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
|
||||
<div >
|
||||
<img :src="config.fileUrl + form.TRANSPORT_PERMIT_FILE" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="道路运输经营许可证" prop="TRANSPORT_PERMIT_FILE" >
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form.TRANSPORT_PERMIT_FILE"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
:auto-upload="false"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:on-change="REQUISITION_FILEChangeIMG"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--第五行-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto'" label="已上传图片">
|
||||
<div >
|
||||
<img :src="config.fileUrl + form.HAZARDOUS_CHEMICALS_FILE" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="危险化学品经营许可证" prop="HAZARDOUS_CHEMICALS_FILE" >
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form.HAZARDOUS_CHEMICALS_FILE"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide:hideUpload}"
|
||||
:auto-upload="false"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:on-change="REQUISITION_FILEChangeIMG"
|
||||
action="#"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus" />
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -144,10 +40,12 @@
|
|||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import {requestFN} from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
export default{
|
||||
components: { Pagination, SelectTree},
|
||||
import {upload} from "../../../../../utils/upload";
|
||||
|
||||
export default {
|
||||
components: {Pagination, SelectTree},
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
|
@ -172,7 +70,7 @@ export default{
|
|||
VEHICLE_TYPE: '',
|
||||
CONTACT: '',
|
||||
PHONE: '',
|
||||
EMISSION_STANDARDS:'',
|
||||
EMISSION_STANDARDS: '',
|
||||
},
|
||||
form: {
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
|
@ -182,11 +80,19 @@ export default{
|
|||
LICENSE_FILE: '',
|
||||
TRANSPORT_PERMIT_FILE: '',
|
||||
HAZARDOUS_CHEMICALS_FILE: ''
|
||||
}
|
||||
},
|
||||
uploadConfig: [
|
||||
{label: '智能口门管理系统账号申请单', prop: 'REQUISITION_FILE', hideUpload: false},
|
||||
{label: '智能口门管理系统使用承诺书', prop: 'COMMITMENT_FILE', hideUpload: false},
|
||||
{label: '营业执照', prop: 'LICENSE_FILE', hideUpload: false},
|
||||
{label: '道路运输经营许可证', prop: 'TRANSPORT_PERMIT_FILE', hideUpload: false},
|
||||
{label: '危险化学品经营许可证', prop: 'HAZARDOUS_CHEMICALS_FILE', hideUpload: false}
|
||||
]
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getList()
|
||||
this.getUploadedFiles()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
|
@ -212,7 +118,7 @@ export default{
|
|||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
|
@ -224,43 +130,85 @@ export default{
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
reSetAddDialog() {
|
||||
this.addForm.LICENCE_NO = ''
|
||||
this.addForm.USER_ID = ''
|
||||
this.addForm.VEHICLE_DEPARTMENT_ID = ''
|
||||
this.addForm.LICENCE_TYPE = ''
|
||||
this.addForm.VEHICLE_TYPE = ''
|
||||
this.addForm.VEHICLE_BELONG_TYPE = ''
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_ID = ''
|
||||
this.userList = []
|
||||
this.addForm.DEPARTMENT_NAME = ''
|
||||
this.addForm.DEPARTMENT_ID = ''
|
||||
},
|
||||
REQUISITION_FILERemove(file, fileList) {
|
||||
this.form.REQUISITION_FILE = fileList
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
REQUISITION_FILEChangeIMG(file, fileList) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png']
|
||||
const isImage = types.includes(file.raw.type)
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!')
|
||||
fileList.pop()
|
||||
this.form.REQUISITION_FILE = []
|
||||
return
|
||||
// 通用文件移除处理
|
||||
handleRemove(file, fileList, prop) {
|
||||
this.form[prop] = fileList;
|
||||
const configItem = this.uploadConfig.find(item => item.prop === prop);
|
||||
if (configItem) {
|
||||
configItem.hideUpload = fileList.length >= 1;
|
||||
}
|
||||
this.form.REQUISITION_FILE = []
|
||||
this.form.REQUISITION_FILE.push(file)
|
||||
this.hideUpload = fileList.length >= 1
|
||||
},
|
||||
confirm(){
|
||||
alert('1111')
|
||||
// 通用文件上传处理
|
||||
handleChange(file, fileList, prop) {
|
||||
const types = ['image/jpeg', 'image/jpg', 'image/png'];
|
||||
const isImage = types.includes(file.raw.type);
|
||||
if (!isImage) {
|
||||
this.$message.error('上传图片只能是 JPG、JPEG、PNG 格式!');
|
||||
fileList.pop();
|
||||
this.form[prop] = [];
|
||||
return;
|
||||
}
|
||||
this.form[prop] = [];
|
||||
this.form[prop].push(file);
|
||||
const configItem = this.uploadConfig.find(item => item.prop === prop);
|
||||
if (configItem) {
|
||||
configItem.hideUpload = fileList.length >= 1;
|
||||
}
|
||||
},
|
||||
goBack(){
|
||||
alert('222')
|
||||
getUploadedFiles() {
|
||||
try {
|
||||
const response = requestFN('/mkmj/management/getUploadedFiles', {
|
||||
MOTORCADE_ID: this.form.MOTORCADE_ID
|
||||
});
|
||||
|
||||
// 检查响应是否成功
|
||||
if (response && response.result === "success" && response.corpFilingApplicationEntity) {
|
||||
const uploadedFiles = response.corpFilingApplicationEntity;
|
||||
|
||||
// 遍历 uploadConfig 配置
|
||||
this.uploadConfig.forEach(item => {
|
||||
if (uploadedFiles[item.prop]) {
|
||||
// 将已上传的文件信息填充到 form 对象中
|
||||
this.form[item.prop] = [{
|
||||
url: this.config.fileUrl + uploadedFiles[item.prop], // 拼接完整的文件 URL
|
||||
name: uploadedFiles[item.prop] // 文件名
|
||||
}];
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取已上传文件失败', error);
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
this.listLoading = true;
|
||||
console.log(this.form);
|
||||
const formData = new FormData();
|
||||
formData.append('CORPINFO_ID', this.form.CORPINFO_ID);
|
||||
formData.append("MOTORCADE_ID",this.form.MOTORCADE_ID);
|
||||
formData.append('REQUISITION_FILE', this.form.REQUISITION_FILE[0].raw);
|
||||
formData.append('COMMITMENT_FILE', this.form.COMMITMENT_FILE[0].raw);
|
||||
formData.append('LICENSE_FILE', this.form.LICENSE_FILE[0].raw);
|
||||
formData.append('TRANSPORT_PERMIT_FILE', this.form.TRANSPORT_PERMIT_FILE[0].raw);
|
||||
formData.append('HAZARDOUS_CHEMICALS_FILE', this.form.HAZARDOUS_CHEMICALS_FILE[0].raw);
|
||||
|
||||
console.log(formData); // 打印 FormData 对象
|
||||
|
||||
upload(
|
||||
'/mkmj/management/fleetFilingApply',
|
||||
formData
|
||||
).then(response => {
|
||||
console.log('上传成功', response);
|
||||
this.listLoading = false;
|
||||
this.goBack()
|
||||
}).catch(error => {
|
||||
console.error('上传失败', error);
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -38,15 +38,43 @@
|
|||
<el-table-column prop="MOTORCADE_NAME" label="车队名称"/>
|
||||
<el-table-column label="操作" align="left" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" @click="getAuditInfo(row)">备案申请</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<div/>
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
|
||||
<!--新增-->
|
||||
<el-dialog :visible.sync="addLoading" width="600px">
|
||||
<el-form ref="form" :model="form" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="车队名称:">
|
||||
<el-input v-model="form.ADD_MOTORCADE_NAME" placeholder="请输入车队名称" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addLoading = false">取 消</el-button>
|
||||
<el-button type="primary" @click="saveMotorcade">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑-->
|
||||
<el-dialog :visible.sync="editLoading" width="600px">
|
||||
<el-form ref="form" :model="form" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="车队名称:">
|
||||
<el-input v-model="form.ADD_MOTORCADE_NAME" placeholder="请输入车队名称" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="editLoading = false">取 消</el-button>
|
||||
<el-button type="primary" @click="editMotorcade()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -64,12 +92,16 @@ export default{
|
|||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
addLoading: false,
|
||||
editLoading: false,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
MOTORCADE_ID: '',
|
||||
MOTORCADE_NAME: '',
|
||||
ADD_MOTORCADE_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
|
@ -121,6 +153,64 @@ export default{
|
|||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleAdd(){
|
||||
this.addLoading = true
|
||||
},
|
||||
saveMotorcade(){
|
||||
requestFN(
|
||||
'/mkmj/management/motorcadeInfoManagement',
|
||||
{
|
||||
MOTORCADE_NAME: this.form.ADD_MOTORCADE_NAME,
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.addLoading = false
|
||||
this.form.MOTORCADE_NAME = ''
|
||||
this.getQuery()
|
||||
}).catch((e) => {
|
||||
this.addLoading = false
|
||||
})
|
||||
},
|
||||
handleEdit(row){
|
||||
this.form.MOTORCADE_ID = row.MOTORCADE_ID
|
||||
this.editLoading = true
|
||||
},
|
||||
editMotorcade(){
|
||||
requestFN(
|
||||
'/mkmj/management/motorcadeInfoManagement',
|
||||
{
|
||||
MOTORCADE_ID : this.form.MOTORCADE_ID,
|
||||
MOTORCADE_NAME: this.form.ADD_MOTORCADE_NAME,
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.editLoading = false
|
||||
this.form.MOTORCADE_NAME = ''
|
||||
this.getQuery()
|
||||
}).catch((e) => {
|
||||
this.editLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
requestFN(
|
||||
'/mkmj/management/deleteMotorCade',
|
||||
{
|
||||
MOTORCADE_ID : row.MOTORCADE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
getAuditInfo(row) {
|
||||
this.$parent.activeName = 'Apply'
|
||||
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="车队名称:">
|
||||
<el-input v-model="form.MOTORCADE_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
<el-form-item label="车牌号:">
|
||||
<el-input v-model="form.LICENCE_NO" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
|
@ -42,22 +42,21 @@
|
|||
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
|
||||
<el-table-column label="操作" align="left" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="getAuditInfo(row)">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="getAuditInfo(row)">删除</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="goEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="goDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="openAddDialogAddBtn(row)">新增</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="openAddDialogAddBtn()">新增</el-button>
|
||||
<div/>
|
||||
<div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</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-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
|
||||
<el-form-item :rules="[{required: true}]" label="车牌号" prop="LICENCE_NO">
|
||||
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
|
||||
</el-form-item>
|
||||
<!-- 白牌、蓝牌、黄牌、绿牌、黑牌 下拉框-->
|
||||
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
|
||||
|
@ -81,20 +80,189 @@
|
|||
placeholder="请选择车辆类型"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人">
|
||||
<!--是否为危化车辆-->
|
||||
<el-form-item :rules="[{required: true}]" label="是否为危化车辆" prop="IS_DANGEROUS_CAR">
|
||||
<SelectTree
|
||||
ref="selectTree_add4"
|
||||
:clearable="false"
|
||||
:options="DANGEROUS_CAR_LIST"
|
||||
:props="vehicleDefaultProps"
|
||||
v-model="addForm.IS_DANGEROUS_CAR"
|
||||
placeholder="请选择是否危化车辆"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" :rules="[{ required: true, message: '请填写负责人姓名', trigger: 'blur' }]">
|
||||
<el-input v-model="addForm.CONTACT" type="text" maxlength="300" placeholder="这里输入负责人名称..."/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人手机号">
|
||||
<el-form-item label="负责人手机号" :rules="[{ required: true, message: '请填写负责人手机号', trigger: 'blur' }]">
|
||||
<el-input v-model="addForm.PHONE" type="text" maxlength="300" placeholder="这里输入负责人手机号..."/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排放标准" :rules="[{ required: true, message: '请填写排放标准', trigger: 'blur' }]">
|
||||
<el-input v-model="addForm.EMISSION_STANDARDS" type="text" maxlength="300" placeholder="这里输入排放标准..."/>
|
||||
</el-form-item>
|
||||
<!-- 驾驶证上传 -->
|
||||
<el-form-item label="驾驶证" :rules="[{ required: true, message: '请上传驾驶证', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleDrivingLicenseSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="绿本" :rules="[{ required: true, message: '请上传绿本', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleGreenBookSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="环保随车清单" :rules="[{ required: true, message: '请上传环保随车清单', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleEcoFriendlyChecklistSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出厂合格证" :rules="[{ required: true, message: '请上传出厂合格证', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleFactoryCertificateSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="环保信息截图" :rules="[{ required: true, message: '请上传环保信息截图', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleEnvironmentalScreenshotsSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogCancelBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="addDialogConfirmBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--编辑-->
|
||||
<el-dialog :visible.sync="editDialogVisible" title="编辑车辆信息" width="600px">
|
||||
<el-form v-if="editDialogVisible" ref="editForm" :model="addForm" label-width="170px" style="padding:0 20px; width: 500px;">
|
||||
<el-form-item label="车牌号" prop="LICENCE_NO">
|
||||
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
|
||||
</el-form-item>
|
||||
<!-- 白牌、蓝牌、黄牌、绿牌、黑牌 下拉框-->
|
||||
<el-form-item label="车牌类型" prop="LICENCE_TYPE">
|
||||
<SelectTree
|
||||
ref="selectTree_edit2"
|
||||
:clearable="false"
|
||||
:options="licenceTypeList"
|
||||
:props="vehicleDefaultProps"
|
||||
v-model="addForm.LICENCE_TYPE"
|
||||
placeholder="请选择车牌类型"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<!-- 货车、轿车、大巴客车 下拉框-->
|
||||
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
|
||||
<SelectTree
|
||||
ref="selectTree_edit3"
|
||||
:clearable="false"
|
||||
:options="vehicleTypeList"
|
||||
:props="vehicleDefaultProps"
|
||||
v-model="addForm.VEHICLE_TYPE"
|
||||
placeholder="请选择车辆类型"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<!--是否为危化车辆-->
|
||||
<el-form-item label="是否为危化车辆" prop="IS_DANGEROUS_CAR">
|
||||
<SelectTree
|
||||
ref="selectTree_edit4"
|
||||
:clearable="false"
|
||||
:options="DANGEROUS_CAR_LIST"
|
||||
:props="vehicleDefaultProps"
|
||||
v-model="addForm.IS_DANGEROUS_CAR"
|
||||
placeholder="请选择是否危化车辆"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人">
|
||||
<el-input v-model="addForm.CONTACT" type="text" maxlength="300" placeholder="这里输入负责人名称..."/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人手机号">
|
||||
<el-input v-model="addForm.PHONE" type="text" maxlength="300" placeholder="这里输入负责人手机号..."/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排放标准">
|
||||
<el-input v-model="addForm.EMISSION_STANDARDS" type="text" maxlength="300" placeholder="这里输入排放标准..."/>
|
||||
</el-form-item>
|
||||
<!-- 驾驶证上传 -->
|
||||
<el-form-item label="驾驶证">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleDrivingLicenseSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
|
||||
<el-form-item label="绿本">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleGreenBookSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="环保随车清单">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleEcoFriendlyChecklistSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出厂合格证">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleFactoryCertificateSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="环保信息截图">
|
||||
<el-upload
|
||||
action="http://127.0.0.1:8199/mkmj/management/fileUpload"
|
||||
:on-success="handleEnvironmentalScreenshotsSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogCancelBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="editDialogConfirmBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="bottom-btn-group">
|
||||
<el-button type="info" icon="el-icon-back" size="mini" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -118,15 +286,25 @@ export default{
|
|||
title: '',
|
||||
isShow: false,
|
||||
addDialogVisible: false,
|
||||
editDialogVisible: false,
|
||||
addForm: {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
MOTORCADE_ID: '', // 所属车队ID
|
||||
CORPINFO_ID: '',
|
||||
VEHICLE_ID: '',
|
||||
LICENCE_NO: '',
|
||||
LICENCE_TYPE: '',
|
||||
VEHICLE_TYPE: '',
|
||||
CONTACT: '',
|
||||
PHONE: '',
|
||||
EMISSION_STANDARDS:'',
|
||||
EMISSION_STANDARDS: '',
|
||||
IS_DANGEROUS_CAR: '',
|
||||
DRIVING_LICENSE: '',
|
||||
GREEN_BOOK: '',
|
||||
ECO_FRIENDLY_CHECKLIST: '',
|
||||
FACTORY_CERTIFICATE: '',
|
||||
ENVIRONMENTAL_SCREENSHOTS: '',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
MOTORCADE_ID: this.$parent.MOTORCADE_ID,
|
||||
VEHICLE_BELONG_TYPE: '3',
|
||||
CAR_FROM: '2'
|
||||
},
|
||||
form: {
|
||||
MOTORCADE_NAME: '',
|
||||
|
@ -143,7 +321,6 @@ export default{
|
|||
},
|
||||
// 车牌类型列表
|
||||
licenceTypeList: [
|
||||
// { ID: '', NAME: '请选择' },
|
||||
{ ID: '0', NAME: '白牌' },
|
||||
{ ID: '1', NAME: '蓝牌' },
|
||||
{ ID: '2', NAME: '黄牌' },
|
||||
|
@ -157,6 +334,10 @@ export default{
|
|||
{ ID: '1', NAME: '轿车' },
|
||||
{ ID: '2', NAME: '大巴客车' }
|
||||
],
|
||||
DANGEROUS_CAR_LIST: [
|
||||
{ ID: '0', NAME: '否' },
|
||||
{ ID: '1', NAME: '是' },
|
||||
],
|
||||
// 车辆下拉树默认属性
|
||||
vehicleDefaultProps: {
|
||||
value: 'ID',
|
||||
|
@ -211,7 +392,7 @@ export default{
|
|||
if (result) {
|
||||
console.log('格式校验通过')
|
||||
requestFN(
|
||||
'vehiclemessage/goCheckLicenceNo',
|
||||
'/mkmj/management/goCheckLicenceNo',
|
||||
{
|
||||
'LICENCE_NO': this.addForm.LICENCE_NO
|
||||
}
|
||||
|
@ -241,26 +422,108 @@ export default{
|
|||
this.ISCHECK = false
|
||||
},
|
||||
reSetAddDialog() {
|
||||
this.addForm.LICENCE_NO = ''
|
||||
this.addForm.USER_ID = ''
|
||||
this.addForm.VEHICLE_DEPARTMENT_ID = ''
|
||||
this.addForm.LICENCE_TYPE = ''
|
||||
this.addForm.VEHICLE_TYPE = ''
|
||||
this.addForm.VEHICLE_BELONG_TYPE = ''
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_ID = ''
|
||||
this.userList = []
|
||||
this.addForm.DEPARTMENT_NAME = ''
|
||||
this.addForm.DEPARTMENT_ID = ''
|
||||
this.addForm.VEHICLE_ID = '',
|
||||
this.addForm.LICENCE_NO = '',
|
||||
this.addForm.LICENCE_TYPE = '',
|
||||
this.addForm.VEHICLE_TYPE = '',
|
||||
this.addForm.CONTACT = '',
|
||||
this.addForm.PHONE = '',
|
||||
this.addForm.EMISSION_STANDARDS = '',
|
||||
this.addForm.IS_DANGEROUS_CAR = '',
|
||||
this.addForm.DRIVING_LICENSE = '',
|
||||
this.addForm.GREEN_BOOK = '',
|
||||
this.addForm.ECO_FRIENDLY_CHECKLIST = '',
|
||||
this.addForm.FACTORY_CERTIFICATE = '',
|
||||
this.addForm.ENVIRONMENTAL_SCREENSHOTS = ''
|
||||
},
|
||||
handleDrivingLicenseSuccess(response, file) {
|
||||
this.addForm.DRIVING_LICENSE = response.uploadPath;
|
||||
},
|
||||
handleGreenBookSuccess(response, file) {
|
||||
this.addForm.GREEN_BOOK = response.uploadPath;
|
||||
},
|
||||
handleEcoFriendlyChecklistSuccess(response, file) {
|
||||
this.addForm.ECO_FRIENDLY_CHECKLIST = response.uploadPath;
|
||||
},
|
||||
handleFactoryCertificateSuccess(response, file) {
|
||||
this.addForm.FACTORY_CERTIFICATE = response.uploadPath;
|
||||
},
|
||||
handleEnvironmentalScreenshotsSuccess(response, file) {
|
||||
this.addForm.ENVIRONMENTAL_SCREENSHOTS = response.uploadPath;
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 文件上传前的校验逻辑
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传文件大小不能超过 2MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
},
|
||||
// 添加弹窗的取消按钮
|
||||
addDialogCancelBtn() {
|
||||
this.addDialogVisible = false
|
||||
this.addDialogVisible = false;
|
||||
},
|
||||
getAuditInfo(row) {
|
||||
this.$refs.flowStep.init(row)
|
||||
addDialogConfirmBtn() {
|
||||
requestFN(
|
||||
'/mkmj/management/carInfoMaintenance' ,
|
||||
this.addForm
|
||||
).then((data) => {
|
||||
this.addDialogVisible = false
|
||||
this.reSetAddDialog()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.addDialogVisible = false
|
||||
})
|
||||
},
|
||||
goDelete(row){
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
requestFN(
|
||||
'/mkmj/management/deleteCarInfo',
|
||||
{
|
||||
VEHICLE_ID : row.VEHICLE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
goEdit(row){
|
||||
this.addForm.VEHICLE_ID = row.VEHICLE_ID
|
||||
this.editDialogVisible = true
|
||||
},
|
||||
editDialogCancelBtn(){
|
||||
this.editDialogVisible = false
|
||||
},
|
||||
editDialogConfirmBtn(){
|
||||
requestFN(
|
||||
'/mkmj/management/carInfoMaintenance' ,
|
||||
this.addForm
|
||||
).then((data) => {
|
||||
this.editDialogVisible = false
|
||||
this.reSetAddDialog()
|
||||
this.getList()
|
||||
}).catch((e) => {
|
||||
this.editDialogVisible = false
|
||||
})
|
||||
},
|
||||
goBack(){
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.bottom-btn-group {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -123,6 +123,7 @@ export default{
|
|||
},
|
||||
carMaintenance(row) {
|
||||
console.log('---------------------------------')
|
||||
console.log(row)
|
||||
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID
|
||||
this.$parent.activeName = 'CarList'
|
||||
},
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="车牌号:">
|
||||
<el-input v-model="form.LICENCE_NO" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="LICENCE_NO" label="车牌号"/>
|
||||
<el-table-column prop="LICENCE_TYPE" label="车牌类型"/>
|
||||
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
|
||||
<el-table-column prop="vehicle_arrival_barrier" label="车辆入港闸口"/>
|
||||
<el-table-column prop="vehicle_arrival_time" label="车辆入港时间"/>
|
||||
<el-table-column prop="vehicle_departure_barrier" label="车辆离岗闸口"/>
|
||||
<el-table-column prop="vehicle_departure_time" label="车辆离岗时间"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
export default{
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
LICENCE_NO: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: '',
|
||||
TEMPORARY_TYPE: '2',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/getCarExitRecords?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.recordList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName==='List'" ref="list" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
export default {
|
||||
components: {
|
||||
List: List
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
USER_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,322 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="车队名称:">
|
||||
<el-input v-model="form.MOTORCADE_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="LICENCE_NO" label="车牌号"/>
|
||||
<el-table-column prop="CONTACT" label="联系人姓名"/>
|
||||
<el-table-column prop="PHONE" label="联系人电话"/>
|
||||
<el-table-column prop="LICENCE_TYPE" label="车牌类型"/>
|
||||
<el-table-column prop="VEHICLE_TYPE" label="车辆类型"/>
|
||||
<el-table-column prop="AUDIT_STATE" label="审核状态" >
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.IS_AUDIT === '0' || row.IS_AUDIT === null" type="success">待公安审批</el-tag>
|
||||
<el-tag v-if="row.IS_AUDIT === '1'" type="success">待企业审批</el-tag>
|
||||
<el-tag v-if="row.IS_AUDIT === '2'" type="success">企业审批通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="left" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="apply(row)">申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button plain type="info" @click="returnBtn">返回</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<el-dialog
|
||||
title="申请信息"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-form ref="auditForm" :model="auditForm" label-width="120px">
|
||||
<el-form-item label="访问起始时间">
|
||||
<el-date-picker
|
||||
v-model="auditForm.VISIT_START_TIME"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问结束时间">
|
||||
<el-date-picker
|
||||
v-model="auditForm.VISIT_END_TIME"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人公司" v-if="showCorpSelect">
|
||||
<el-select
|
||||
v-model="auditForm.CORPINFO_ID"
|
||||
placeholder="请选择公司"
|
||||
@change="handleCorpChange">
|
||||
<el-option
|
||||
v-for="corp in corpList"
|
||||
:key="corp.CORPINFO_ID"
|
||||
:label="corp.CORP_NAME"
|
||||
:value="corp.CORPINFO_ID">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人">
|
||||
<el-select
|
||||
v-model="auditForm.AUDITOR_ID"
|
||||
placeholder="请选择审核人">
|
||||
<el-option
|
||||
v-for="auditor in personList"
|
||||
:key="auditor.USER_ID"
|
||||
:label="auditor.USERNAME"
|
||||
:value="auditor.USER_ID">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地">
|
||||
<el-select
|
||||
v-model="auditForm.VISIT_PLACE"
|
||||
placeholder="请选择访问口门">
|
||||
<el-option
|
||||
v-for="place in doorList"
|
||||
:key="place.DOOR_ID"
|
||||
:label="place.DOOR_NAME"
|
||||
:value="place.DOOR_ID">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAudit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import SelectTree from '@/components/SelectTree'
|
||||
export default{
|
||||
components: { Pagination, SelectTree},
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
dialogVisible: false,
|
||||
addForm: {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
MOTORCADE_ID: '', // 所属车队ID
|
||||
CORPINFO_ID: '',
|
||||
LICENCE_TYPE: '',
|
||||
VEHICLE_TYPE: '',
|
||||
CONTACT: '',
|
||||
PHONE: '',
|
||||
EMISSION_STANDARDS:'',
|
||||
},
|
||||
form: {
|
||||
MOTORCADE_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: '',
|
||||
TEMPORARY_TYPE: '2',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
MOTORCADE_ID: this.$parent.MOTORCADE_ID
|
||||
},
|
||||
showCorpSelect: true,
|
||||
auditForm: {
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
CORPINFO_ID: '',
|
||||
AUDITOR_ID: '',
|
||||
VISIT_PLACE: ''
|
||||
},
|
||||
corpList: [], // 公司列表
|
||||
doorList: [], // 口门列表
|
||||
personList: [], // 审核人
|
||||
// 车牌类型列表
|
||||
licenceTypeList: [
|
||||
// { ID: '', NAME: '请选择' },
|
||||
{ ID: '0', NAME: '白牌' },
|
||||
{ ID: '1', NAME: '蓝牌' },
|
||||
{ ID: '2', NAME: '黄牌' },
|
||||
{ ID: '3', NAME: '绿牌' },
|
||||
{ ID: '4', NAME: '黑牌' }
|
||||
],
|
||||
// 车辆类型列表
|
||||
vehicleTypeList: [
|
||||
// { ID: '', NAME: '请选择' },
|
||||
{ ID: '0', NAME: '货车' },
|
||||
{ ID: '1', NAME: '轿车' },
|
||||
{ ID: '2', NAME: '大巴客车' }
|
||||
],
|
||||
// 车辆下拉树默认属性
|
||||
vehicleDefaultProps: {
|
||||
value: 'ID',
|
||||
label: 'NAME',
|
||||
children: 'nodes'
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/carInfoList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.carInfoList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
apply(row) {
|
||||
this.dialogVisible = true;
|
||||
this.auditForm = {
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
CORPINFO_ID: '',
|
||||
AUDITOR_ID: '',
|
||||
VISIT_PLACE: ''
|
||||
};
|
||||
this.VEHICLE_ID = row.VEHICLE_ID
|
||||
this.IS_DANGEROUS_CAR = row.IS_DANGEROUS_CAR
|
||||
this.showCorpSelect = row.IS_DANGEROUS_CAR !== '1';
|
||||
// 这里可以调用接口获取公司列表、审核人列表和访问地列表
|
||||
this.getCorpList();
|
||||
this.getPlaceList();
|
||||
if (!this.showCorpSelect){
|
||||
this.getAuditorList();
|
||||
}
|
||||
},
|
||||
handleCorpChange(corpId) {
|
||||
// 根据选择的公司ID获取审核人列表
|
||||
this.getAuditorList(corpId);
|
||||
},
|
||||
getCorpList() {
|
||||
// 调用接口获取公司列表
|
||||
requestFN('/mkmj/management/getCorpList').then(response => {
|
||||
this.corpList = response.corpList;
|
||||
});
|
||||
},
|
||||
getAuditorList(corpId) {
|
||||
// 调用接口获取审核人列表
|
||||
requestFN('/mkmj/management/getPersonList',
|
||||
{ CORPINFO_ID: corpId }
|
||||
).then(response => {
|
||||
this.personList = response.personList;
|
||||
});
|
||||
},
|
||||
getPlaceList() {
|
||||
// 调用接口获取访问地列表
|
||||
requestFN('/mkmj/management/getPlaceList').then(response => {
|
||||
this.doorList = response.doorList;
|
||||
});
|
||||
},
|
||||
submitAudit() {
|
||||
// 提交审核信息
|
||||
requestFN('/mkmj/management/intoPortApplication',
|
||||
{
|
||||
VEHICLE_ID: this.VEHICLE_ID,
|
||||
IS_DANGEROUS_CAR: this.IS_DANGEROUS_CAR,
|
||||
VISIT_START_TIME: this.auditForm.VISIT_START_TIME,
|
||||
VISIT_END_TIME: this.auditForm.VISIT_END_TIME,
|
||||
AUDITOR: this.auditForm.AUDITOR_ID,
|
||||
DOOR_ID: this.auditForm.VISIT_PLACE
|
||||
}
|
||||
).then(response => {
|
||||
this.$message.success('申请提交成功');
|
||||
this.dialogVisible = false;
|
||||
this.getList()
|
||||
});
|
||||
},
|
||||
handleClose(){
|
||||
this.dialogVisible = false;
|
||||
this.auditForm = {
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
CORPINFO_ID: '',
|
||||
AUDITOR_ID: '',
|
||||
VISIT_PLACE: ''
|
||||
};
|
||||
},
|
||||
returnBtn(){
|
||||
this.$parent.activeName = 'List'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-form ref="form" v-model="form">
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="车队名称:">
|
||||
<el-input v-model="form.MOTORCADE_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">搜索</el-button>
|
||||
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="multipleTable"
|
||||
:data="varList"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="MOTORCADE_NAME" label="车队名称"/>
|
||||
<el-table-column label="操作" align="left" width="200">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="primary" icon="el-icon-view" size="mini" @click="carMaintenance(row)">入港申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
|
||||
</div>
|
||||
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
export default{
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
listLoading: true,
|
||||
varList: [],
|
||||
total: 0,
|
||||
title: '',
|
||||
isShow: false,
|
||||
form: {
|
||||
MOTORCADE_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: '',
|
||||
TEMPORARY_TYPE: '2',
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.getList()
|
||||
},
|
||||
// 重置
|
||||
reset() {
|
||||
this.form = {
|
||||
USER_NAME: '',
|
||||
PHONE: '',
|
||||
ID_CARD: '',
|
||||
CORPINFO_NAME: '',
|
||||
DEPARTMENT_NAME: '',
|
||||
VISIT_START_TIME: '',
|
||||
VISIT_END_TIME: '',
|
||||
DOOR_NAME: ''
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/getMotorcadeList?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page, this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
carMaintenance(row) {
|
||||
console.log('---------------------------------')
|
||||
this.$parent.MOTORCADE_ID = row.MOTORCADE_ID
|
||||
this.$parent.activeName = 'CarList'
|
||||
},
|
||||
getAuditInfo(row) {
|
||||
this.$refs.flowStep.init(row)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName==='List'" ref="list" />
|
||||
<CarList v-if="activeName==='CarList'"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import CarList from "./components/carList";
|
||||
export default {
|
||||
components: {
|
||||
List: List,
|
||||
CarList: CarList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'List',
|
||||
USER_ID: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -77,25 +77,24 @@
|
|||
{{ translateVehicleType(row.VEHICLE_TYPE) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="DEPARTMENT_NAME" label="车辆所属部门" align="center" />
|
||||
<el-table-column prop="USER_NAME" label="车辆责任人" align="center"/>
|
||||
<!-- <el-table-column label="操作" align="center" width="480">-->
|
||||
<!-- <template slot-scope="{row}">-->
|
||||
<!-- <el-button type="warning" icon="el-icon-more" size="mini" @click="vehicleInOutRecordBtn(row.LICENCE_NO)">车辆进出记录</el-button>-->
|
||||
<!-- <el-button icon="el-icon-view" size="mini" @click="showDetail(row.VEHICLE_ID)">查看</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="DEPT_NAME" label="车辆所属部门" align="center" />
|
||||
<el-table-column prop="U_NAME" label="车辆责任人" align="center"/>
|
||||
<el-table-column label="操作" align="center" width="480">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="warning" icon="el-icon-more" size="mini" @click="vehicleInOutRecordBtn(row.LICENCE_NO)">车辆进出记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="openAddDialogAddBtn">新增</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getPageList" />
|
||||
</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-input v-model="addForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
|
||||
<el-form-item :rules="[{required: true}]" label="车牌号" prop="LICENCE_NO">
|
||||
<el-input v-model="addForm.LICENCE_NO" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoAdd()"/>
|
||||
</el-form-item>
|
||||
<!-- 白牌、蓝牌、黄牌、绿牌、黑牌 下拉框-->
|
||||
<el-form-item :rules="[{required: true}]" label="车牌类型" prop="LICENCE_TYPE">
|
||||
|
@ -119,40 +118,30 @@
|
|||
placeholder="请选择车辆类型"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<!-- 员工车辆、单位车辆、外部车辆 下拉框 -->
|
||||
<el-form-item :rules="[{required: true}]" label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
|
||||
<SelectTree
|
||||
ref="selectTree_add4"
|
||||
:clearable="false"
|
||||
:options="vehicleBelongTypeList"
|
||||
:props="vehicleDefaultProps"
|
||||
v-model="addForm.VEHICLE_BELONG_TYPE"
|
||||
placeholder="请选择车辆所属类型"
|
||||
style="width: 300px"/>
|
||||
</el-form-item>
|
||||
<!-- 车辆所属部门下拉框 -->
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
ref="selectTree_add1"
|
||||
:clearable="false"
|
||||
:options="departmentTreeData"
|
||||
:props="defaultProps"
|
||||
v-model="addForm.VEHICLE_DEPARTMENT_ID"
|
||||
placeholder="请选择车辆所属部门"
|
||||
style="width: 300px"
|
||||
@change="addUserList"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="roleName === '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<el-input v-model="loginDepartmentName" disabled/>
|
||||
</el-form-item>
|
||||
<!-- 车辆责任人下拉框 -->
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" :rules="[{required: true}]" label="车辆责任人" prop="USER_ID">
|
||||
<el-select :value="addForm.USER_ID" clearable placeholder="请选择" @visible-change="$forceUpdate()" @change="userIdAddChange">
|
||||
<el-option v-for="item in userList" :key="item.USER_ID" :label="item.NAME" :value="item.USER_ID"/>
|
||||
<el-form-item label="车辆所属部门">
|
||||
<el-select
|
||||
v-model="addForm.DEPARTMENT_ID"
|
||||
placeholder="请选择部门"
|
||||
@change="handleCorpChange">
|
||||
<el-option
|
||||
v-for="dept in departmentTreeData"
|
||||
:key="dept.DEPARTMENT_ID"
|
||||
:label="dept.NAME"
|
||||
:value="dept.DEPARTMENT_ID">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="roleName === '普通用户角色'" label="车辆责任人" prop="USER_ID">
|
||||
<el-input v-model="loginUserName" disabled/>
|
||||
<el-form-item label="负责人">
|
||||
<el-select
|
||||
v-model="addForm.USER_ID"
|
||||
placeholder="请选择负责人">
|
||||
<el-option
|
||||
v-for="user in personList"
|
||||
:key="user.USER_ID"
|
||||
:label="user.NAME"
|
||||
:value="user.USER_ID">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -160,81 +149,6 @@
|
|||
<el-button type="primary" @click="addDialogConfirmBtn">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="editDialogVisible" title="修改" width="600px">
|
||||
<el-form ref="editForm" :model="editForm" label-width="170px" style="width: 500px;">
|
||||
<el-form-item :rules="[{required: true}]" label="车牌号">
|
||||
<el-input v-model="editForm.LICENCE_NO" :autosize="{ minRows: 1}" type="text" maxlength="300" placeholder="这里输入车牌号..." @blur="goCheckLicenceNoUpdate()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌类型" prop="LICENCE_TYPE">
|
||||
<el-select v-model="editForm.LICENCE_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
|
||||
<el-option v-for="item in licenceTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆类型" prop="VEHICLE_TYPE">
|
||||
<el-select v-model="editForm.VEHICLE_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
|
||||
<el-option v-for="item in vehicleTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆所属类型" prop="VEHICLE_BELONG_TYPE">
|
||||
<el-select v-model="editForm.VEHICLE_BELONG_TYPE" clearable placeholder="请选择" @visible-change="$forceUpdate()">
|
||||
<el-option v-for="item in vehicleBelongTypeList" :key="item.ID" :label="item.NAME" :value="item.ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 车辆所属部门下拉框 -->
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<SelectTree
|
||||
ref="selectTree_edit"
|
||||
:clearable="true"
|
||||
:options="departmentTreeData"
|
||||
:props="defaultProps"
|
||||
v-model="editForm.VEHICLE_DEPARTMENT_ID"
|
||||
placeholder="请选择车辆所属部门"
|
||||
style="width: 300px"
|
||||
@change="updateUserList"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="roleName === '普通用户角色'" label="车辆所属部门" prop="VEHICLE_DEPARTMENT_ID">
|
||||
<el-input v-model="loginDepartmentName" disabled/>
|
||||
</el-form-item>
|
||||
<!-- 车辆责任人下拉框 -->
|
||||
<el-form-item v-show="roleName !== '普通用户角色'" label="车辆责任人" prop="USER_ID">
|
||||
<el-select :value="editForm.USER_ID" clearable placeholder="请选择" @visible-change="$forceUpdate()" @change="userIdUpdateChange">
|
||||
<el-option v-for="item in userList" :key="item.USER_ID" :label="item.NAME" :value="item.USER_ID" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="roleName === '普通用户角色'" label="车辆责任人" prop="USER_ID">
|
||||
<el-input v-model="loginUserName" disabled/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDialogCancelBtn">取 消</el-button>
|
||||
<el-button type="primary" @click="editDialogConfirmBtn">提 交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="detailDialogVisible" title="详情" width="600px">
|
||||
<el-form ref="form" :model="detailForm" label-width="170px" style="width: 500px;">
|
||||
<el-form-item label="车牌号">
|
||||
<el-input v-model="detailForm.LICENCE_NO" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌类型">
|
||||
<el-input v-model="detailForm.LICENCE_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆类型">
|
||||
<el-input v-model="detailForm.VEHICLE_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆所属类型">
|
||||
<el-input v-model="detailForm.VEHICLE_BELONG_TYPE" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆所属部门">
|
||||
<el-input v-model="detailForm.VEHICLE_DEPARTMENT_ID" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆责任人">
|
||||
<el-input v-model="detailForm.USER_ID" :disabled="true" :autosize="{ minRows: 1}" type="text" maxlength="300"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="detailDialogReturnBtn">返回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -301,6 +215,7 @@ export default {
|
|||
children: 'nodes'
|
||||
},
|
||||
departmentTreeData: [],
|
||||
personList: [],
|
||||
// inspectionTypeList: [], //字典列表
|
||||
// 列表展示的数据
|
||||
varList: [],
|
||||
|
@ -314,8 +229,7 @@ export default {
|
|||
// 添加表单的数据
|
||||
addForm: {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
VEHICLE_DEPARTMENT_ID: '', // 车辆所属部门id
|
||||
VEHICLE_DEPARTMENT_NAME: '', // 车辆所属部门名称
|
||||
CORPINFO_ID: '',
|
||||
USER_ID: '', // 车辆责任人
|
||||
LICENCE_TYPE: '', // 车牌类型
|
||||
VEHICLE_TYPE: '', // 车辆类型
|
||||
|
@ -363,7 +277,6 @@ export default {
|
|||
this.loginUserInfo = JSON.parse(sessionStorage.getItem('user')) // 获取当前登陆用户的信息
|
||||
this.getDepartmentTreeData() // 获取部门树的数据
|
||||
this.getLoginUserInfo() // 获取当前登陆用户的信息
|
||||
// this.getDict() // 获取字典
|
||||
this.getPageList() // 获取分页列表要展示的数据
|
||||
},
|
||||
methods: {
|
||||
|
@ -380,13 +293,7 @@ export default {
|
|||
if (this.vehicleTypeList[i].ID == id) return this.vehicleTypeList[i].NAME
|
||||
}
|
||||
},
|
||||
vehicleBelongType(id) {
|
||||
for (var i = 0; i < this.vehicleBelongTypeList.length; i++) {
|
||||
if (this.vehicleBelongTypeList[i].ID == id) return this.vehicleBelongTypeList[i].NAME
|
||||
}
|
||||
},
|
||||
getLoginUserInfo() { // 获取登录人信息
|
||||
// return new Promise((resolve) => {
|
||||
requestFN(
|
||||
'/user/goEditMyInfo',
|
||||
{}
|
||||
|
@ -439,14 +346,6 @@ export default {
|
|||
this.reSetAddDialog()
|
||||
this.ISCHECK = false
|
||||
},
|
||||
// 添加弹窗的取消按钮
|
||||
addDialogCancelBtn() {
|
||||
this.addDialogVisible = false
|
||||
},
|
||||
// 查看弹窗的返回按钮
|
||||
detailDialogReturnBtn() {
|
||||
this.detailDialogVisible = false
|
||||
},
|
||||
// 置空添加弹窗
|
||||
reSetAddDialog() {
|
||||
this.addForm.LICENCE_NO = ''
|
||||
|
@ -460,288 +359,31 @@ export default {
|
|||
this.addForm.DEPARTMENT_NAME = ''
|
||||
this.addForm.DEPARTMENT_ID = ''
|
||||
},
|
||||
// 添加弹窗的确定按钮
|
||||
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'
|
||||
})
|
||||
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) => {
|
||||
})
|
||||
},
|
||||
// 打开编辑弹窗的编辑按钮
|
||||
openEditDialogEditBtn(VEHICLE_ID) {
|
||||
this.editForm = {
|
||||
VEHICLE_ID: VEHICLE_ID, // 车辆id(基础属性)
|
||||
LICENCE_NO: '', // 车牌号
|
||||
OLD_LICENCE_NO: '', // 修改前的车牌号
|
||||
USER_ID: '', // 车辆责任人
|
||||
EMPLOYEE_VEHICLE_USER_ID: '', // 车辆所属人
|
||||
VEHICLE_DEPARTMENT_ID: '' // 车辆归属公司或责任公司(车辆所属部门)
|
||||
}
|
||||
this.userList = []
|
||||
this.editDialogVisible = true
|
||||
// 提供查询接口回显数据
|
||||
requestFN(
|
||||
'vehiclemessage/updateShowVehicleMessage',
|
||||
{
|
||||
VEHICLE_ID: VEHICLE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.editForm.LICENCE_NO = data.pd.LICENCE_NO // 车牌号
|
||||
this.editForm.OLD_LICENCE_NO = data.pd.LICENCE_NO // 车牌号
|
||||
this.editForm.USER_ID = data.pd.USER_ID // 车辆责任人
|
||||
this.editForm.LICENCE_TYPE = String(data.pd.LICENCE_TYPE) // 车牌类型
|
||||
this.editForm.VEHICLE_TYPE = String(data.pd.VEHICLE_TYPE) // 车辆类型
|
||||
this.editForm.VEHICLE_BELONG_TYPE = data.pd.VEHICLE_BELONG_TYPE === undefined ? '' : data.pd.VEHICLE_BELONG_TYPE // 车辆所属类型
|
||||
if ('VEHICLE_DEPARTMENT_ID' in data.pd) { // 存在车辆归属部门id
|
||||
const node = {}
|
||||
node.id = data.pd.VEHICLE_DEPARTMENT_ID
|
||||
// this.$refs.selectTree_edit.clearHandle()
|
||||
this.editForm.VEHICLE_DEPARTMENT_ID = data.pd.VEHICLE_DEPARTMENT_ID
|
||||
this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
|
||||
this.$refs.selectTree_edit.handleNodeClick(node)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message({
|
||||
message: '数据回显失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
editDialogCancelBtn() {
|
||||
this.editDialogVisible = false
|
||||
},
|
||||
// 查看按钮(展示详情)
|
||||
showDetail(VEHICLE_ID) {
|
||||
// this.$parent.activeName = 'Info'
|
||||
// this.$parent.INSPECTION_ID = row.INSPECTION_ID
|
||||
this.detailForm = {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
VEHICLE_DEPARTMENT_ID: '', // 车辆所属部门
|
||||
VEHICLE_BELONG_TYPE: '', // 车辆所属类型
|
||||
USER_ID: '', // 车辆责任人
|
||||
USER_NAME: '', // 车辆责任人姓名
|
||||
EMPLOYEE_VEHICLE_USER_ID: '', // 员工车辆所属人
|
||||
LICENCE_TYPE: null, // 车牌类型
|
||||
VEHICLE_TYPE: null // 车辆类型
|
||||
}
|
||||
this.detailDialogVisible = true
|
||||
// 提供查询接口回显数据
|
||||
requestFN(
|
||||
'vehiclemessage/detailVehicleMessage',
|
||||
{
|
||||
VEHICLE_ID: VEHICLE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.detailForm.LICENCE_NO = data.pd.LICENCE_NO // 车牌号
|
||||
this.detailForm.VEHICLE_DEPARTMENT_ID = data.pd.DEPARTMENT_NAME // 车辆所属部门
|
||||
this.detailForm.USER_ID = data.pd.USER_NAME // 车辆责任人
|
||||
this.detailForm.LICENCE_TYPE = this.translateLicenceType(data.pd.LICENCE_TYPE) // 车牌类型
|
||||
this.detailForm.VEHICLE_TYPE = this.translateVehicleType(data.pd.VEHICLE_TYPE) // 车辆类型
|
||||
this.detailForm.VEHICLE_BELONG_TYPE = data.pd.VEHICLE_BELONG_TYPE === undefined ? '' : this.vehicleBelongType(data.pd.VEHICLE_BELONG_TYPE)
|
||||
} else {
|
||||
this.$message({
|
||||
message: '数据回显失败',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
judgeEdit() {
|
||||
if (this.editForm.VEHICLE_BELONG_TYPE === '0') { // 员工车辆(责任人和所属人都需要添加)
|
||||
this.editForm.EMPLOYEE_VEHICLE_USER_ID = this.editForm.USER_ID // 车辆所属人id
|
||||
this.editForm.EMPLOYEE_VEHICLE_USER_NAME = this.editForm.USER_NAME // 车辆所属人姓名
|
||||
} else { // 单位车辆(只需添加责任人,无需添加所属人)
|
||||
this.editForm.EMPLOYEE_VEHICLE_USER_ID = '' // 车辆所属人id
|
||||
this.editForm.EMPLOYEE_VEHICLE_USER_NAME = '' // 车辆所属人姓名
|
||||
}
|
||||
},
|
||||
// 修改弹窗的确定按钮
|
||||
editDialogConfirmBtn() {
|
||||
this.judgeEdit()
|
||||
this.$refs.editForm.validate(valid => {
|
||||
if (valid) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据保存中...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'vehiclemessage/updateVehicleMessage',
|
||||
{
|
||||
...this.editForm,
|
||||
'CORPINFO_ID': this.loginUserInfo.CORPINFO_ID,
|
||||
'loginUserId': this.loginUserInfo.USER_ID,
|
||||
'roleName': this.loginUserInfo.ROLE_NAME
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
this.listLoading = false
|
||||
loading.close()
|
||||
this.editDialogVisible = false
|
||||
this.getQuery()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
loading.close()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除单条数据的删除按钮
|
||||
deleteSingleDataDeleteBtn(id, USER_ID, EMPLOYEE_VEHICLE_USER_ID) {
|
||||
this.$confirm('确定要删除吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'vehiclemessage/deleteVehicleMessage',
|
||||
{
|
||||
'VEHICLE_ID': id,
|
||||
'USER_ID': USER_ID,
|
||||
'EMPLOYEE_VEHICLE_USER_ID': EMPLOYEE_VEHICLE_USER_ID,
|
||||
'CORPINFO_ID': this.loginUserInfo.CORPINFO_ID,
|
||||
'loginUserId': this.loginUserInfo.USER_ID,
|
||||
'roleName': this.loginUserInfo.ROLE_NAME
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getPageList()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 获取数据字典数据
|
||||
// getDict: function() {
|
||||
// requestFN(
|
||||
// '/dictionaries/listSelectTree',
|
||||
// {
|
||||
// DICTIONARIES_ID: '60e6481d96e44a5390ff5c347c4d1ffe' // 检查类型
|
||||
// }
|
||||
// ).then((data) => {
|
||||
// this.inspectionTypeList = JSON.parse(data.zTreeNodes)
|
||||
// }).catch((e) => {
|
||||
//
|
||||
// })
|
||||
// },
|
||||
// 获得部门树
|
||||
getDepartmentTreeData() {
|
||||
requestFN(
|
||||
'/department/listTree',
|
||||
{}
|
||||
'/mkmj/management/getDeptList',
|
||||
{
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.departmentTreeData = JSON.parse(data.zTreeNodes)
|
||||
this.departmentTreeData = data.deptList
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
handleCorpChange(deptId) {
|
||||
// 根据选择的公司ID获取审核人列表
|
||||
this.getUserList(deptId);
|
||||
},
|
||||
getUserList(deptId){
|
||||
requestFN(
|
||||
'/mkmj/management/getUserListByDeptId',
|
||||
{
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
DEPARTMENT_ID: deptId
|
||||
}
|
||||
).then((data) => {
|
||||
this.personList = data.userList
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
|
@ -752,86 +394,6 @@ export default {
|
|||
this.$refs.selectTree_Search1.clearHandle() // 清空
|
||||
this.$refs.selectTree_Search2.clearHandle()
|
||||
},
|
||||
addUserList(DEPARTMENT_ID) {
|
||||
this.getUserList(DEPARTMENT_ID)
|
||||
this.handleDepartmentAddChange(DEPARTMENT_ID)
|
||||
},
|
||||
updateUserList(DEPARTMENT_ID) {
|
||||
this.getUserList(DEPARTMENT_ID)
|
||||
this.handleDepartmentUpdateChange(DEPARTMENT_ID)
|
||||
},
|
||||
getUserList(DEPARTMENT_ID) { // 根据部门获取部门内的人员
|
||||
requestFN(
|
||||
'/user/listAll',
|
||||
{
|
||||
DEPARTMENT_ID: DEPARTMENT_ID,
|
||||
tm: new Date().getTime()
|
||||
}
|
||||
).then((data) => {
|
||||
this.userList = data.userList
|
||||
}).catch((e) => {
|
||||
// this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 添加弹窗中的车辆责任人
|
||||
userIdAddChange(event) {
|
||||
this.addForm.USER_ID = event
|
||||
this.handleUserAddChange(event)
|
||||
},
|
||||
// 添加弹窗中的车辆所属人
|
||||
employeeUserIdAddChange(event) {
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_ID = event
|
||||
this.handleEmployeeUserAddChange(event)
|
||||
},
|
||||
// 修改弹窗中的车辆责任人
|
||||
userIdUpdateChange(event) {
|
||||
this.editForm.USER_ID = event
|
||||
this.handleUserUpdateChange(event)
|
||||
},
|
||||
handleDepartmentAddChange(value) {
|
||||
this.addForm.VEHICLE_DEPARTMENT_NAME = this.findLabelByValue(this.departmentTreeData, value)
|
||||
},
|
||||
handleDepartmentUpdateChange(value) {
|
||||
this.editForm.VEHICLE_DEPARTMENT_NAME = this.findLabelByValue(this.departmentTreeData, value)
|
||||
},
|
||||
findLabelByValue(tree, value) {
|
||||
for (const node of tree) {
|
||||
if (node.id === value) {
|
||||
return node.name
|
||||
}
|
||||
if (node.nodes && node.nodes.length > 0) {
|
||||
const result = this.findLabelByValue(node.nodes, value)
|
||||
if (result) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
return ''
|
||||
},
|
||||
handleUserAddChange(value) {
|
||||
const selectedUser = this.userList.find(user => user.USER_ID === value)
|
||||
if (selectedUser) {
|
||||
this.addForm.USER_NAME = selectedUser.NAME
|
||||
} else {
|
||||
this.addForm.USER_NAME = ''
|
||||
}
|
||||
},
|
||||
handleEmployeeUserAddChange(value) {
|
||||
const selectedUser = this.userList.find(user => user.USER_ID === value)
|
||||
if (selectedUser) {
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = selectedUser.NAME
|
||||
} else {
|
||||
this.addForm.EMPLOYEE_VEHICLE_USER_NAME = ''
|
||||
}
|
||||
},
|
||||
handleUserUpdateChange(value) {
|
||||
const selectedUser = this.userList.find(user => user.USER_ID === value)
|
||||
if (selectedUser) {
|
||||
this.editForm.USER_NAME = selectedUser.NAME
|
||||
} else {
|
||||
this.editForm.USER_NAME = ''
|
||||
}
|
||||
},
|
||||
resetForm(row) {
|
||||
this.searchFrom = {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
|
@ -846,7 +408,7 @@ export default {
|
|||
if (result) {
|
||||
console.log('格式校验通过')
|
||||
requestFN(
|
||||
'vehiclemessage/goCheckLicenceNo',
|
||||
'/mkmj/management/goCheckLicenceNo',
|
||||
{
|
||||
'LICENCE_NO': this.addForm.LICENCE_NO
|
||||
}
|
||||
|
@ -869,42 +431,32 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
goCheckLicenceNoUpdate() {
|
||||
if (this.editForm.LICENCE_NO) {
|
||||
if (this.editForm.LICENCE_NO !== this.editForm.OLD_LICENCE_NO) {
|
||||
const regex = /^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})$/
|
||||
const result = regex.test(this.editForm.LICENCE_NO)
|
||||
if (result) {
|
||||
console.log('格式校验通过')
|
||||
requestFN(
|
||||
'vehiclemessage/goCheckLicenceNo',
|
||||
{
|
||||
'LICENCE_NO': this.editForm.LICENCE_NO
|
||||
}
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message.success('验证通过')
|
||||
this.ISCHECK = true
|
||||
} else {
|
||||
this.$message.error('车牌号已存在,请重新输入')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
}).catch((e) => {
|
||||
console.info(e)
|
||||
this.listLoading = false
|
||||
this.ISCHECK = false
|
||||
})
|
||||
} else {
|
||||
this.$message.success('车牌号不规范')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 车辆进出记录按钮的点击事件
|
||||
vehicleInOutRecordBtn(LICENCE_NO) {
|
||||
this.$parent.activeName = 'Record'
|
||||
this.$parent.LICENCE_NO = LICENCE_NO
|
||||
},
|
||||
addDialogCancelBtn(){
|
||||
this.addDialogVisible = false
|
||||
this.reSetAddDialog()
|
||||
},
|
||||
addDialogConfirmBtn(){
|
||||
requestFN(
|
||||
'/mkmj/management/saveLongTimeCarInfo',
|
||||
{
|
||||
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
|
||||
DEPARTMENT_ID: this.addForm.DEPARTMENT_ID,
|
||||
USER_ID: this.addForm.USER_ID,
|
||||
LICENCE_NO: this.addForm.LICENCE_NO,
|
||||
LICENCE_TYPE: this.addForm.LICENCE_TYPE,
|
||||
VEHICLE_TYPE: this.addForm.VEHICLE_TYPE,
|
||||
CAR_FROM: '2'
|
||||
}
|
||||
).then((data) => {
|
||||
this.addDialogVisible = false
|
||||
this.getPageList()
|
||||
}).catch((e) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="口门名称:" label-width="110px">
|
||||
<el-input v-model="searchForm.KEYWORDS" style="width:206px" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="口门状态" label-width="110px">
|
||||
<el-select v-model="searchForm.GATE_STATUS" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in StatusList" :key="index" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item label="所属区域" label-width="110px">
|
||||
<el-select v-model="searchForm.REGION_BIANMA" placeholder="请选择">
|
||||
<el-option v-for="(item,index) in RegionList" :key="index" :label="item.NAME" :value="item.BIANMA"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button v-waves type="success" icon="el-icon-refresh" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
ref="queryTable"
|
||||
:data="varList"
|
||||
:cell-style="getPlateColor"
|
||||
:row-key="getRowKey"
|
||||
:header-cell-style="{
|
||||
'font-weight': 'bold',
|
||||
'color': '#000'
|
||||
}"
|
||||
tooltip-effect="dark"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"/>
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column prop="REGION_NAME" label="区域" width="100px" align="center"/>
|
||||
<el-table-column prop="AREA_NAME" label="口门名称" width="100px" align="center"/>
|
||||
<el-table-column prop="AREA_LEVEL_NAME" label="口门级别" width="100px" align="center"/>
|
||||
<el-table-column prop="vehicle_plate_number" label="车牌号" width="100px" align="center"/>
|
||||
<!-- <el-table-column prop="vehicle_category_name" label="车辆类型" width="150px" align="center"/>-->
|
||||
<el-table-column prop="VEHICLE_TYPE_NAME" label="车辆类型" width="150px" align="center"/>
|
||||
<!-- <el-table-column prop="vehicle_filing_method" label="车辆所属类型" width="100px" align="center"/>-->
|
||||
<el-table-column prop="VEHICLE_BELONG_TYPE_NAME" label="车辆所属类型" width="100px" align="center"/>
|
||||
<el-table-column prop="vehicle_arrival_status" label="车辆在港状态" width="100px" align="center"/>
|
||||
<el-table-column prop="VEHICLE_DEPARTMENT_NAME" label="车辆所属部门" align="center"/>
|
||||
<!-- <el-table-column prop="vehicle_filing_info_recording_org" label="车辆所属部门" align="center"/>-->
|
||||
<el-table-column prop="USER_NAME" label="车辆责任人" width="150ox" align="center"/>
|
||||
<!-- <el-table-column prop="vehicle_contact_name" label="车辆联系人" width="150ox" align="center"/>-->
|
||||
<!-- <el-table-column prop="vehicle_contact_phone_number" label="联系人手机号" width="120px" align="center"/>-->
|
||||
<el-table-column prop="vehicle_arrival_barrier" label="入港闸口" align="center"/>
|
||||
<el-table-column prop="vehicle_arrival_time" label="入港时间" align="center"/>
|
||||
<el-table-column prop="vehicle_departure_barrier" label="离港闸口" align="center"/>
|
||||
<el-table-column prop="vehicle_departure_time" label="离港时间" align="center"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div>
|
||||
<el-button plain type="info" @click="returnBtn">返回</el-button>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getPageList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包
|
||||
import { requestFN } from '@/utils/request'
|
||||
import waves from '@/directive/waves' // waves directive
|
||||
export default {
|
||||
components: { Pagination},
|
||||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
add: false,
|
||||
del: false,
|
||||
edit: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total: 0,
|
||||
KEYWORDS: '',
|
||||
// 列表展示的数据
|
||||
varList: [],
|
||||
// 查询表单的数据
|
||||
searchForm: {
|
||||
LICENCE_NO: '', // 车牌号
|
||||
KEYWORDS: '',
|
||||
GATE_STATUS: '',
|
||||
REGION_BIANMA: ''
|
||||
},
|
||||
RegionList: [],
|
||||
StatusList: [
|
||||
{ value: '0', label: '停用' },
|
||||
{ value: '1', label: '正常' },
|
||||
{ value: '2', label: '暂时关闭' }
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
this.searchForm.LICENCE_NO = this.$parent.LICENCE_NO
|
||||
this.getPageList() // 获取分页列表要展示的数据
|
||||
},
|
||||
methods: {
|
||||
getRowKey(row) {
|
||||
return row.id_sequence
|
||||
},
|
||||
// 搜索
|
||||
getQuery() {
|
||||
this.$refs.queryTable.clearSelection() // 先置空表格再查询
|
||||
this.getPageList()
|
||||
},
|
||||
resetSearch() {
|
||||
this.searchForm.KEYWORDS = ''
|
||||
this.searchForm.GATE_STATUS = ''
|
||||
this.searchForm.REGION_BIANMA = ''
|
||||
},
|
||||
goKeyReset() {
|
||||
this.resetSearch()
|
||||
this.getQuery()
|
||||
},
|
||||
// 获取列表
|
||||
getPageList() {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/getCarExitRecords?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||
{
|
||||
LICENCE_NO: this.searchForm.LICENCE_NO
|
||||
}
|
||||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
// this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 车辆进出记录按钮的点击事件
|
||||
returnBtn() {
|
||||
this.$parent.activeName = 'List'
|
||||
},
|
||||
getPlateColor(row, column, rowIndex, columnIndex) {
|
||||
if (row.column.label === '车牌号') {
|
||||
const colorMap = {
|
||||
蓝牌: 'background-color: blue;color: white',
|
||||
黄牌: 'background-color: yellow;color: black',
|
||||
新能源: 'background-color: green;color: white',
|
||||
白牌: 'background-color: gray;color: black',
|
||||
黑牌: 'background-color: black;color: white',
|
||||
其他: 'background-color: white;color: black',
|
||||
default: 'background-color: white;color: black'
|
||||
}
|
||||
// const plateColor = row.row.vehicle_plate_color || 'default'
|
||||
const plateColor = row.row.LICENCE_TYPE_NAME || 'default'
|
||||
const backgroundColorAndColor = colorMap[plateColor] || colorMap.default
|
||||
return backgroundColorAndColor
|
||||
}
|
||||
},
|
||||
getDict() {
|
||||
requestFN(
|
||||
'dictionaries/getLevels',
|
||||
{
|
||||
DICTIONARIES_ID: '1c73fa2717f2835165104aee234caefe'
|
||||
}
|
||||
).then((data) => {
|
||||
this.RegionList = data.list
|
||||
})
|
||||
.catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,14 +1,17 @@
|
|||
<template>
|
||||
<div>
|
||||
<List v-show="activeName==='List'" ref="list" />
|
||||
<Record v-if="activeName==='Record'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/list'
|
||||
import Record from './components/record'
|
||||
export default {
|
||||
components: {
|
||||
List
|
||||
List: List,
|
||||
Record: Record
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue