parent
b3b82dbf09
commit
074c8b983d
|
@ -2,32 +2,65 @@
|
|||
<div v-loading="listLoading">
|
||||
<div style="padding:20px">
|
||||
<el-form ref="form" :model="form" label-width="210px">
|
||||
<!-- 动态生成表单项 -->
|
||||
<el-row v-for="(item, index) in uploadConfig" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item v-if="dialogType !== 'savePhoto' && form[item.prop]" :label="`已上传${item.label}`">
|
||||
<div>
|
||||
<img :src="config.fileUrl + form[item.prop]" width="100" height="100">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="item.label" :prop="item.prop">
|
||||
<el-upload
|
||||
ref="photoUpload"
|
||||
:file-list="form[item.prop]"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:class="{hide: form[item.prop] && form[item.prop].length > 0}"
|
||||
:auto-upload="false"
|
||||
: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-form-item label="智能口门管理系统账号申请单" prop="REQUISITION_FILE" :rules="[{ required: true, message: '智能口门管理系统账号申请单', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="REQUISITION_FILESuccess"
|
||||
:on-remove="REQUISITION_FILERemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="form.REQUISITION_FILE" :src="config.fileUrl + form.REQUISITION_FILE" alt="智能口门管理系统账号申请单" style="margin-top: 10px; max-width: 20%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="智能口门管理系统使用承诺书" prop="REQUISITION_FILE" :rules="[{ required: true, message: '智能口门管理系统使用承诺书', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="COMMITMENT_FILESuccess"
|
||||
:on-remove="COMMITMENT_FILERemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="form.COMMITMENT_FILE" :src="config.fileUrl + form.COMMITMENT_FILE" alt="智能口门管理系统使用承诺书" style="margin-top: 10px; max-width: 20%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="营业执照" prop="LICENSE_FILE" :rules="[{ required: true, message: '营业执照', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="LICENSE_FILESuccess"
|
||||
:on-remove="LICENSE_FILERemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="form.LICENSE_FILE" :src="config.fileUrl + form.LICENSE_FILE" alt="营业执照" style="margin-top: 10px; max-width: 20%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="道路运输经营许可证" prop="TRANSPORT_PERMIT_FILE" :rules="[{ required: true, message: '道路运输经营许可证', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="TRANSPORT_PERMIT_FILESuccess"
|
||||
:on-remove="TRANSPORT_PERMIT_FILERemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="form.TRANSPORT_PERMIT_FILE" :src="config.fileUrl + form.TRANSPORT_PERMIT_FILE" alt="道路运输经营许可证" style="margin-top: 10px; max-width: 20%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="危险化学品经营许可证" prop="HAZARDOUS_CHEMICALS_FILE" :rules="[{ required: true, message: '危险化学品经营许可证', trigger: 'blur' }]">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="HAZARDOUS_CHEMICALS_FILESuccess"
|
||||
:on-remove="HAZARDOUS_CHEMICALS_FILERemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="form.HAZARDOUS_CHEMICALS_FILE" :src="config.fileUrl + form.HAZARDOUS_CHEMICALS_FILE" alt="危险化学品经营许可证" style="margin-top: 10px; max-width: 20%;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="ui-height"/>
|
||||
|
@ -52,6 +85,7 @@ export default {
|
|||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
uploadUrl: config.httpurl + '/mkmj/management/fileUpload',
|
||||
config: config,
|
||||
areaList: [], // 省市县列表
|
||||
placeList: [],
|
||||
|
@ -93,7 +127,6 @@ export default {
|
|||
},
|
||||
async created() {
|
||||
this.getList()
|
||||
this.getUploadedFiles()
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
|
@ -115,6 +148,52 @@ export default {
|
|||
}
|
||||
this.getList()
|
||||
},
|
||||
beforeUpload(file) {
|
||||
//文件格式限制
|
||||
const isJPG = file.type === 'image/jpeg';
|
||||
const isPNG = file.type === 'image/png';
|
||||
|
||||
if (!isJPG && !isPNG) {
|
||||
this.$message.error('上传图片只能是 JPG 或 PNG 格式!');
|
||||
return false;
|
||||
}
|
||||
// 文件上传前的校验逻辑
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传文件大小不能超过 2MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
},
|
||||
REQUISITION_FILESuccess(response, file) {
|
||||
this.form.REQUISITION_FILE = response.uploadPath;
|
||||
},
|
||||
REQUISITION_FILERemove(){
|
||||
this.form.REQUISITION_FILE = ''
|
||||
},
|
||||
COMMITMENT_FILESuccess(response, file) {
|
||||
this.form.COMMITMENT_FILE = response.uploadPath;
|
||||
},
|
||||
COMMITMENT_FILERemove(){
|
||||
this.form.COMMITMENT_FILE = ''
|
||||
},
|
||||
LICENSE_FILESuccess(response, file) {
|
||||
this.form.LICENSE_FILE = response.uploadPath;
|
||||
},
|
||||
LICENSE_FILERemove(){
|
||||
this.form.LICENSE_FILE = ''
|
||||
},
|
||||
TRANSPORT_PERMIT_FILESuccess(response, file) {
|
||||
this.form.TRANSPORT_PERMIT_FILE = response.uploadPath;
|
||||
},
|
||||
TRANSPORT_PERMIT_FILERemove(){
|
||||
this.form.TRANSPORT_PERMIT_FILE = ''
|
||||
},
|
||||
HAZARDOUS_CHEMICALS_FILESuccess(response, file) {
|
||||
this.form.HAZARDOUS_CHEMICALS_FILE = response.uploadPath;
|
||||
},
|
||||
HAZARDOUS_CHEMICALS_FILERemove() {
|
||||
this.form.HAZARDOUS_CHEMICALS_FILE = ''
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
|
@ -125,8 +204,15 @@ export default {
|
|||
this.listLoading = false
|
||||
this.varList = data.carInfoList
|
||||
this.total = data.page.totalResult
|
||||
this.hasButton()
|
||||
this.pd = data.pd
|
||||
this.form.REQUISITION_FILE = data.motorcadeList[0].REQUISITION_FILE
|
||||
this.form.COMMITMENT_FILE = data.motorcadeList[0].COMMITMENT_FILE
|
||||
this.form.LICENSE_FILE = data.motorcadeList[0].LICENSE_FILE
|
||||
this.form.TRANSPORT_PERMIT_FILE = data.motorcadeList[0].TRANSPORT_PERMIT_FILE
|
||||
this.form.HAZARDOUS_CHEMICALS_FILE = data.motorcadeList[0].HAZARDOUS_CHEMICALS_FILE
|
||||
console.log('------------------------')
|
||||
console.log(this.form.REQUISITION_FILE)
|
||||
this.hasButton()
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
|
@ -139,82 +225,22 @@ export default {
|
|||
configItem.hideUpload = fileList.length >= 1;
|
||||
}
|
||||
},
|
||||
// 通用文件上传处理
|
||||
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;
|
||||
}
|
||||
},
|
||||
getUploadedFiles() {
|
||||
try {
|
||||
this.listLoading = true
|
||||
requestFN(
|
||||
'/mkmj/management/getUploadedFiles',{
|
||||
MOTORCADE_ID :this.form.MOTORCADE_ID
|
||||
}
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
console.info(data)
|
||||
this.urlfromdsfe = data.corpFilingApplicationEntity
|
||||
console.info(this.urlfromdsfe)
|
||||
if (this.urlfromdsfe) {
|
||||
this.uploadConfig.forEach(item => {
|
||||
if (this.urlfromdsfe[item.prop]) {
|
||||
this.form[item.prop] = [{
|
||||
url: this.config.fileUrl + this.urlfromdsfe[item.prop],
|
||||
name: this.urlfromdsfe[item.prop].split('/').pop()
|
||||
}];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.listLoading = false;
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
|
||||
|
||||
|
||||
} 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;
|
||||
});
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
requestFN(
|
||||
'/mkmj/management/fleetFilingApply',
|
||||
this.form
|
||||
).then((data) => {
|
||||
console.log(data)
|
||||
this.goBack()
|
||||
this.listLoading = false
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
</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-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
|
||||
<el-form-item label="车队名称:" prop="ADD_MOTORCADE_NAME">
|
||||
<el-input v-model="form.ADD_MOTORCADE_NAME" placeholder="请输入车队名称" class="filter-item" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -130,9 +130,13 @@ export default{
|
|||
methods: {
|
||||
getAuditType(IS_AUDIT){
|
||||
if (IS_AUDIT === '1'){
|
||||
return '待审核'
|
||||
}else if (IS_AUDIT === '2'){
|
||||
return '审核通过'
|
||||
}else if (IS_AUDIT === '0'){
|
||||
return '审核驳回'
|
||||
}else {
|
||||
return '未审核'
|
||||
return '待申请'
|
||||
}
|
||||
},
|
||||
// 搜索
|
||||
|
@ -187,22 +191,27 @@ export default{
|
|||
},
|
||||
handleEdit(row){
|
||||
this.form.MOTORCADE_ID = row.MOTORCADE_ID
|
||||
this.form.ADD_MOTORCADE_NAME = row.MOTORCADE_NAME
|
||||
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
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
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
|
||||
})
|
||||
}
|
||||
).then((data) => {
|
||||
this.editLoading = false
|
||||
this.form.MOTORCADE_NAME = ''
|
||||
this.getQuery()
|
||||
}).catch((e) => {
|
||||
this.editLoading = false
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
@ -219,10 +228,22 @@ export default{
|
|||
).then((data) => {
|
||||
this.listLoading = false
|
||||
this.getList()
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '删除失败!'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
getAuditInfo(row) {
|
||||
|
|
|
@ -116,10 +116,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleDrivingLicenseSuccess"
|
||||
:on-remove="handleDrivingLicenseRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.DRIVING_LICENSE" :src="config.fileUrl + addForm.DRIVING_LICENSE" alt="驾驶证" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 绿本 -->
|
||||
|
@ -127,10 +129,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleGreenBookSuccess"
|
||||
:on-remove="handleGreenBookRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.GREEN_BOOK" :src="config.fileUrl + addForm.GREEN_BOOK" alt="绿本" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 环保随车清单 -->
|
||||
|
@ -138,10 +142,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleEcoFriendlyChecklistSuccess"
|
||||
:on-remove="handleEcoFriendlyChecklistRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.ECO_FRIENDLY_CHECKLIST" :src="config.fileUrl + addForm.ECO_FRIENDLY_CHECKLIST" alt="环保随车清单" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 出厂合格证 -->
|
||||
|
@ -149,10 +155,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleFactoryCertificateSuccess"
|
||||
:on-remove="handleFactoryCertificateRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.FACTORY_CERTIFICATE" :src="config.fileUrl + addForm.FACTORY_CERTIFICATE" alt="出厂合格证" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 环保信息截图 -->
|
||||
|
@ -160,10 +168,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleEnvironmentalScreenshotsSuccess"
|
||||
:on-remove="handleEnvironmentalScreenshotsRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.ENVIRONMENTAL_SCREENSHOTS" :src="config.fileUrl + addForm.ENVIRONMENTAL_SCREENSHOTS" alt="环保信息截图" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -226,10 +236,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleDrivingLicenseSuccess"
|
||||
:on-remove="handleDrivingLicenseRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.DRIVING_LICENSE" :src="config.fileUrl + addForm.DRIVING_LICENSE" alt="驾驶证" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 绿本 -->
|
||||
|
@ -237,10 +249,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleGreenBookSuccess"
|
||||
:on-remove="handleGreenBookRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.GREEN_BOOK" :src="config.fileUrl + addForm.GREEN_BOOK" alt="绿本" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 环保随车清单 -->
|
||||
|
@ -248,10 +262,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleEcoFriendlyChecklistSuccess"
|
||||
:on-remove="handleEcoFriendlyChecklistRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.ECO_FRIENDLY_CHECKLIST" :src="config.fileUrl + addForm.ECO_FRIENDLY_CHECKLIST" alt="环保随车清单" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 出厂合格证 -->
|
||||
|
@ -259,10 +275,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleFactoryCertificateSuccess"
|
||||
:on-remove="handleFactoryCertificateRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.FACTORY_CERTIFICATE" :src="config.fileUrl + addForm.FACTORY_CERTIFICATE" alt="出厂合格证" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 环保信息截图 -->
|
||||
|
@ -270,10 +288,12 @@
|
|||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:on-success="handleEnvironmentalScreenshotsSuccess"
|
||||
:on-remove="handleEnvironmentalScreenshotsRemove"
|
||||
:before-upload="beforeUpload"
|
||||
:limit="1">
|
||||
<el-button type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
<img v-if="addForm.ENVIRONMENTAL_SCREENSHOTS" :src="config.fileUrl + addForm.ENVIRONMENTAL_SCREENSHOTS" alt="环保信息截图" style="margin-top: 10px; max-width: 100%;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
@ -297,6 +317,7 @@ export default {
|
|||
components: {Pagination, SelectTree},
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
uploadUrl: config.httpurl + '/mkmj/management/fileUpload',
|
||||
listQuery: {
|
||||
page: 1,
|
||||
|
@ -471,18 +492,33 @@ export default {
|
|||
handleDrivingLicenseSuccess(response, file) {
|
||||
this.addForm.DRIVING_LICENSE = response.uploadPath;
|
||||
},
|
||||
handleDrivingLicenseRemove(){
|
||||
this.addForm.DRIVING_LICENSE = ''
|
||||
},
|
||||
handleGreenBookSuccess(response, file) {
|
||||
this.addForm.GREEN_BOOK = response.uploadPath;
|
||||
},
|
||||
handleGreenBookRemove(){
|
||||
this.addForm.GREEN_BOOK = ''
|
||||
},
|
||||
handleEcoFriendlyChecklistSuccess(response, file) {
|
||||
this.addForm.ECO_FRIENDLY_CHECKLIST = response.uploadPath;
|
||||
},
|
||||
handleEcoFriendlyChecklistRemove(){
|
||||
this.addForm.ECO_FRIENDLY_CHECKLIST = ''
|
||||
},
|
||||
handleFactoryCertificateSuccess(response, file) {
|
||||
this.addForm.FACTORY_CERTIFICATE = response.uploadPath;
|
||||
},
|
||||
handleFactoryCertificateRemove(){
|
||||
this.addForm.FACTORY_CERTIFICATE = ''
|
||||
},
|
||||
handleEnvironmentalScreenshotsSuccess(response, file) {
|
||||
this.addForm.ENVIRONMENTAL_SCREENSHOTS = response.uploadPath;
|
||||
},
|
||||
handleEnvironmentalScreenshotsRemove() {
|
||||
this.addForm.ENVIRONMENTAL_SCREENSHOTS = ''
|
||||
},
|
||||
beforeUpload(file) {
|
||||
//文件格式限制
|
||||
const isJPG = file.type === 'image/jpeg';
|
||||
|
@ -543,6 +579,8 @@ export default {
|
|||
goEdit(row) {
|
||||
this.editDialogVisible = true
|
||||
this.addForm = {...row};
|
||||
this.addForm.VEHICLE_TYPE = this.translateVehicleType(row.VEHICLE_TYPE)
|
||||
this.addForm.LICENCE_TYPE = this.translateLicenceType(row.LICENCE_TYPE)
|
||||
},
|
||||
editDialogCancelBtn() {
|
||||
this.editDialogVisible = false
|
||||
|
|
|
@ -76,22 +76,22 @@
|
|||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-form ref="auditForm" :model="auditForm" label-width="120px">
|
||||
<el-form-item label="访问起始时间">
|
||||
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="120px">
|
||||
<el-form-item label="访问起始时间" prop="VISIT_START_TIME">
|
||||
<el-date-picker
|
||||
v-model="auditForm.VISIT_START_TIME"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问结束时间">
|
||||
<el-form-item label="访问结束时间" prop="VISIT_END_TIME">
|
||||
<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-form-item label="审核人公司" prop="CORPINFO_ID" v-if="showCorpSelect">
|
||||
<el-select
|
||||
v-model="auditForm.CORPINFO_ID"
|
||||
placeholder="请选择公司"
|
||||
|
@ -104,7 +104,7 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核人">
|
||||
<el-form-item label="审核人" prop="AUDITOR_ID">
|
||||
<el-select
|
||||
v-model="auditForm.AUDITOR_ID"
|
||||
placeholder="请选择审核人">
|
||||
|
@ -116,7 +116,7 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地">
|
||||
<el-form-item label="访问地" prop="VISIT_PLACE">
|
||||
<el-select
|
||||
v-model="auditForm.VISIT_PLACE"
|
||||
placeholder="请选择访问口门">
|
||||
|
@ -164,7 +164,35 @@ import SelectTree from '@/components/SelectTree'
|
|||
export default{
|
||||
components: { Pagination, SelectTree},
|
||||
data() {
|
||||
const validateTime = (rule, value, callback) => {
|
||||
if (!this.auditForm.VISIT_START_TIME || !this.auditForm.VISIT_END_TIME) {
|
||||
callback();
|
||||
} else if (this.auditForm.VISIT_START_TIME > this.auditForm.VISIT_END_TIME) {
|
||||
callback(new Error('访问起始时间不能大于访问结束时间'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
return {
|
||||
rules: {
|
||||
VISIT_START_TIME: [
|
||||
{ required: true, message: '请选择访问起始时间', trigger: 'blur' },
|
||||
{ validator: validateTime, trigger: 'blur' }
|
||||
],
|
||||
VISIT_END_TIME: [
|
||||
{ required: true, message: '请选择访问结束时间', trigger: 'blur' },
|
||||
{ validator: validateTime, trigger: 'blur' }
|
||||
],
|
||||
CORPINFO_ID: [
|
||||
{ required: true, message: '请选择审核人公司', trigger: 'change' }
|
||||
],
|
||||
AUDITOR_ID: [
|
||||
{ required: true, message: '请选择审核人', trigger: 'change' }
|
||||
],
|
||||
VISIT_PLACE: [
|
||||
{ required: true, message: '请选择访问地', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
|
@ -337,20 +365,24 @@ export default{
|
|||
},
|
||||
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
|
||||
this.$refs.auditForm.validate(valid => {
|
||||
if (valid) {
|
||||
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()
|
||||
})
|
||||
}
|
||||
).then(response => {
|
||||
this.$message.success('申请提交成功');
|
||||
this.dialogVisible = false;
|
||||
this.getList()
|
||||
});
|
||||
})
|
||||
},
|
||||
handleClose(){
|
||||
this.dialogVisible = false;
|
||||
|
|
|
@ -231,14 +231,14 @@
|
|||
:clearable="false"
|
||||
:options="departmentTreeData"
|
||||
:props="defaultProps"
|
||||
v-model="reapplyForm.DEPARTMENT_ID"
|
||||
v-model="reapplyForm.DEPT_NAME"
|
||||
placeholder="请选择车辆所属部门"
|
||||
style="width: 300px"
|
||||
@change="handleCorpChange"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="U_NAME">
|
||||
<el-select
|
||||
v-model="reapplyForm.USER_ID"
|
||||
v-model="reapplyForm.U_NAME"
|
||||
placeholder="请选择负责人">
|
||||
<el-option
|
||||
v-for="user in personList"
|
||||
|
@ -283,7 +283,18 @@ export default {
|
|||
return {
|
||||
rules: {
|
||||
LICENCE_NO: [
|
||||
{ required: true, message: '车牌号不能为空', trigger: 'blur' }
|
||||
{ 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' }
|
||||
|
@ -611,7 +622,7 @@ export default {
|
|||
this.ISCHECK = false
|
||||
})
|
||||
} else {
|
||||
this.$message.success('车牌号不规范')
|
||||
this.$message.error('车牌号不规范')
|
||||
this.ISCHECK = false
|
||||
}
|
||||
}
|
||||
|
@ -627,9 +638,13 @@ export default {
|
|||
},
|
||||
|
||||
apply(row) {
|
||||
console.log(row)
|
||||
this.reapplyForm = { ...row }; // 将当前行的数据复制到 reapplyForm
|
||||
this.reapplyForm.DEPT_NAME = row.DEPT_NAME
|
||||
console.log('------------------------')
|
||||
console.log(this.reapplyForm.DEPT_NAME)
|
||||
this.reapplyForm.U_NAME = row.U_NAME
|
||||
this.reapplyForm.VEHICLE_TYPE = this.translateVehicleType(row.VEHICLE_TYPE)
|
||||
this.reapplyDialogVisible = true; // 打开对话框
|
||||
console.log(this.reapplyForm)
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<el-table-column prop="personType" label="人员身份"/>
|
||||
<el-table-column prop="personType" label="人员身份"/>
|
||||
<el-table-column prop="regionName" label="区域名称"/>
|
||||
<el-table-column prop="reportTime" label="上报时间"/>
|
||||
<el-table-column prop="syncTime" label="上报时间"/>
|
||||
</el-table>
|
||||
<div class="page-btn-group">
|
||||
<div/><div/>
|
||||
|
|
Loading…
Reference in New Issue