2026-01-28 09:58:31 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
2026-01-29 22:03:42 +08:00
|
|
|
<!-- 搜索表单 -->
|
|
|
|
|
<search-form
|
|
|
|
|
:query-params="queryParams"
|
|
|
|
|
:show-search="showSearch"
|
|
|
|
|
@query="handleQuery"
|
|
|
|
|
/>
|
2026-01-28 09:58:31 +08:00
|
|
|
|
2026-01-29 22:03:42 +08:00
|
|
|
<!-- 工具栏 -->
|
2026-01-28 09:58:31 +08:00
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
2026-01-30 14:15:21 +08:00
|
|
|
v-hasPermi="['ccdi:intermediary:add']"
|
2026-01-28 09:58:31 +08:00
|
|
|
>新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="success"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-upload2"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleImport"
|
2026-01-30 14:15:21 +08:00
|
|
|
v-hasPermi="['ccdi:intermediary:import']"
|
2026-01-28 09:58:31 +08:00
|
|
|
>导入</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
2026-01-29 22:03:42 +08:00
|
|
|
<!-- 数据表格 -->
|
|
|
|
|
<data-table
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:data-list="intermediaryList"
|
2026-01-28 09:58:31 +08:00
|
|
|
:total="total"
|
2026-01-29 22:03:42 +08:00
|
|
|
:page-params="queryParams"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
2026-01-28 09:58:31 +08:00
|
|
|
@pagination="getList"
|
2026-01-29 22:03:42 +08:00
|
|
|
@detail="handleDetail"
|
|
|
|
|
@update="handleUpdate"
|
|
|
|
|
@delete="handleDelete"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 编辑对话框 -->
|
|
|
|
|
<edit-dialog
|
|
|
|
|
:visible.sync="open"
|
|
|
|
|
:title="title"
|
|
|
|
|
:form="form"
|
|
|
|
|
:indiv-type-options="indivTypeOptions"
|
|
|
|
|
:indiv-sub-type-options="indivSubTypeOptions"
|
|
|
|
|
:gender-options="genderOptions"
|
|
|
|
|
:cert-type-options="certTypeOptions"
|
|
|
|
|
:relation-type-options="relationTypeOptions"
|
|
|
|
|
:corp-type-options="corpTypeOptions"
|
|
|
|
|
:corp-nature-options="corpNatureOptions"
|
|
|
|
|
@submit="submitForm"
|
|
|
|
|
@close="cancel"
|
2026-01-28 09:58:31 +08:00
|
|
|
/>
|
|
|
|
|
|
2026-01-29 22:03:42 +08:00
|
|
|
<!-- 详情对话框 -->
|
|
|
|
|
<detail-dialog
|
|
|
|
|
:visible.sync="detailOpen"
|
|
|
|
|
:detail-data="detailData"
|
|
|
|
|
/>
|
2026-01-28 09:58:31 +08:00
|
|
|
|
|
|
|
|
<!-- 导入对话框 -->
|
2026-01-29 22:03:42 +08:00
|
|
|
<import-dialog
|
|
|
|
|
:visible.sync="upload.open"
|
|
|
|
|
:title="upload.title"
|
|
|
|
|
@close="handleImportDialogClose"
|
|
|
|
|
@success="getList"
|
|
|
|
|
/>
|
2026-01-28 09:58:31 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
2026-01-29 22:03:42 +08:00
|
|
|
addEntityIntermediary,
|
|
|
|
|
addPersonIntermediary,
|
2026-01-28 09:58:31 +08:00
|
|
|
delIntermediary,
|
|
|
|
|
getIntermediary,
|
|
|
|
|
listIntermediary,
|
2026-01-29 22:03:42 +08:00
|
|
|
updateEntityIntermediary,
|
|
|
|
|
updatePersonIntermediary
|
2026-01-30 14:15:21 +08:00
|
|
|
} from "@/api/ccdiIntermediary";
|
2026-01-29 22:03:42 +08:00
|
|
|
import {
|
|
|
|
|
getCertTypeOptions,
|
|
|
|
|
getCorpNatureOptions,
|
|
|
|
|
getCorpTypeOptions,
|
|
|
|
|
getGenderOptions,
|
|
|
|
|
getIndivSubTypeOptions,
|
|
|
|
|
getIndivTypeOptions,
|
|
|
|
|
getRelationTypeOptions
|
2026-01-30 14:15:21 +08:00
|
|
|
} from "@/api/ccdiEnum";
|
2026-01-29 22:03:42 +08:00
|
|
|
import SearchForm from "./components/SearchForm";
|
|
|
|
|
import DataTable from "./components/DataTable";
|
|
|
|
|
import EditDialog from "./components/EditDialog";
|
|
|
|
|
import DetailDialog from "./components/DetailDialog";
|
|
|
|
|
import ImportDialog from "./components/ImportDialog";
|
2026-01-28 09:58:31 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Intermediary",
|
2026-01-29 22:03:42 +08:00
|
|
|
components: {
|
|
|
|
|
SearchForm,
|
|
|
|
|
DataTable,
|
|
|
|
|
EditDialog,
|
|
|
|
|
DetailDialog,
|
|
|
|
|
ImportDialog
|
|
|
|
|
},
|
2026-01-28 09:58:31 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
loading: true,
|
|
|
|
|
ids: [],
|
|
|
|
|
single: true,
|
|
|
|
|
multiple: true,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
total: 0,
|
|
|
|
|
intermediaryList: [],
|
|
|
|
|
title: "",
|
|
|
|
|
open: false,
|
2026-01-29 22:03:42 +08:00
|
|
|
detailOpen: false,
|
|
|
|
|
detailData: {},
|
2026-01-28 09:58:31 +08:00
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
name: null,
|
|
|
|
|
certificateNo: null,
|
|
|
|
|
intermediaryType: null,
|
|
|
|
|
status: null
|
|
|
|
|
},
|
|
|
|
|
form: {},
|
|
|
|
|
upload: {
|
|
|
|
|
open: false,
|
2026-01-29 22:03:42 +08:00
|
|
|
title: ""
|
|
|
|
|
},
|
|
|
|
|
indivTypeOptions: [],
|
|
|
|
|
indivSubTypeOptions: [],
|
|
|
|
|
genderOptions: [],
|
|
|
|
|
certTypeOptions: [],
|
|
|
|
|
relationTypeOptions: [],
|
|
|
|
|
corpTypeOptions: [],
|
|
|
|
|
corpNatureOptions: []
|
2026-01-28 09:58:31 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
2026-01-29 22:03:42 +08:00
|
|
|
this.loadEnumOptions();
|
2026-01-28 09:58:31 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2026-01-29 22:03:42 +08:00
|
|
|
/** 加载枚举选项 */
|
|
|
|
|
loadEnumOptions() {
|
|
|
|
|
getIndivTypeOptions().then(response => {
|
|
|
|
|
this.indivTypeOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getIndivSubTypeOptions().then(response => {
|
|
|
|
|
this.indivSubTypeOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getGenderOptions().then(response => {
|
|
|
|
|
this.genderOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getCertTypeOptions().then(response => {
|
|
|
|
|
this.certTypeOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getRelationTypeOptions().then(response => {
|
|
|
|
|
this.relationTypeOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getCorpTypeOptions().then(response => {
|
|
|
|
|
this.corpTypeOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
getCorpNatureOptions().then(response => {
|
|
|
|
|
this.corpNatureOptions = response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
2026-01-28 09:58:31 +08:00
|
|
|
/** 查询中介黑名单列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listIntermediary(this.queryParams).then(response => {
|
|
|
|
|
this.intermediaryList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.intermediaryId);
|
|
|
|
|
this.single = selection.length !== 1;
|
|
|
|
|
this.multiple = !selection.length;
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加中介黑名单";
|
|
|
|
|
},
|
2026-01-29 22:03:42 +08:00
|
|
|
/** 表单重置 */
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
intermediaryId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
certificateNo: null,
|
|
|
|
|
intermediaryType: "1",
|
|
|
|
|
status: "0",
|
|
|
|
|
remark: null,
|
|
|
|
|
indivType: null,
|
|
|
|
|
indivSubType: null,
|
|
|
|
|
indivGender: null,
|
|
|
|
|
indivCertType: null,
|
|
|
|
|
indivPhone: null,
|
|
|
|
|
indivWechat: null,
|
|
|
|
|
indivAddress: null,
|
|
|
|
|
indivCompany: null,
|
|
|
|
|
indivPosition: null,
|
|
|
|
|
indivRelatedId: null,
|
|
|
|
|
indivRelation: null,
|
|
|
|
|
corpCreditCode: null,
|
|
|
|
|
corpType: null,
|
|
|
|
|
corpNature: null,
|
|
|
|
|
corpIndustryCategory: null,
|
|
|
|
|
corpIndustry: null,
|
|
|
|
|
corpEstablishDate: null,
|
|
|
|
|
corpAddress: null,
|
|
|
|
|
corpLegalRep: null,
|
|
|
|
|
corpLegalCertType: null,
|
|
|
|
|
corpLegalCertNo: null,
|
|
|
|
|
corpShareholder1: null,
|
|
|
|
|
corpShareholder2: null,
|
|
|
|
|
corpShareholder3: null,
|
|
|
|
|
corpShareholder4: null,
|
|
|
|
|
corpShareholder5: null
|
|
|
|
|
};
|
|
|
|
|
// 注意:不调用 this.resetForm("form")
|
|
|
|
|
// EditDialog 组件会在 visible 变化时自动处理表单验证状态的重置
|
|
|
|
|
},
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
/** 查看详情操作 */
|
|
|
|
|
handleDetail(row) {
|
|
|
|
|
const intermediaryId = row.intermediaryId;
|
|
|
|
|
getIntermediary(intermediaryId).then(response => {
|
|
|
|
|
this.detailData = response.data;
|
|
|
|
|
this.detailOpen = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
2026-01-28 09:58:31 +08:00
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const intermediaryId = row.intermediaryId || this.ids[0];
|
|
|
|
|
getIntermediary(intermediaryId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改中介黑名单";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
2026-01-29 22:03:42 +08:00
|
|
|
if (this.form.intermediaryId != null) {
|
|
|
|
|
// 修改模式:根据中介类型调用不同的接口
|
|
|
|
|
if (this.form.intermediaryType === '1') {
|
|
|
|
|
// 个人中介
|
|
|
|
|
updatePersonIntermediary(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else if (this.form.intermediaryType === '2') {
|
|
|
|
|
// 机构中介
|
|
|
|
|
updateEntityIntermediary(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
2026-01-28 09:58:31 +08:00
|
|
|
}
|
2026-01-29 22:03:42 +08:00
|
|
|
} else {
|
|
|
|
|
// 新增模式:根据中介类型调用不同的接口
|
|
|
|
|
if (this.form.intermediaryType === '1') {
|
|
|
|
|
// 个人中介
|
|
|
|
|
addPersonIntermediary(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else if (this.form.intermediaryType === '2') {
|
|
|
|
|
// 机构中介
|
|
|
|
|
addEntityIntermediary(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-28 09:58:31 +08:00
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const intermediaryIds = row.intermediaryId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除中介黑名单编号为"' + intermediaryIds + '"的数据项?').then(function() {
|
|
|
|
|
return delIntermediary(intermediaryIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
/** 导入按钮操作 */
|
|
|
|
|
handleImport() {
|
|
|
|
|
this.upload.title = "中介黑名单数据导入";
|
|
|
|
|
this.upload.open = true;
|
|
|
|
|
},
|
2026-01-29 22:03:42 +08:00
|
|
|
/** 导入对话框关闭处理 */
|
|
|
|
|
handleImportDialogClose() {
|
|
|
|
|
// 子组件已处理文件清理
|
2026-01-28 09:58:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|