信用报告完成
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<section class="AppCreditReport">
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Home from "./home";
|
||||
import PersonDetail from "./personDetail";
|
||||
import CompanyDetail from "./companyDetail";
|
||||
|
||||
export default {
|
||||
name: "AppCreditReport",
|
||||
components: {CompanyDetail, PersonDetail, Home},
|
||||
label: "信用报告",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
const {hash} = this.$route
|
||||
return hash == "#person" ? PersonDetail :
|
||||
hash == "#company" ? CompanyDetail : Home
|
||||
}
|
||||
},
|
||||
created() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.AppCreditReport {
|
||||
.mar-t16 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.mar-l8 {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.color-26f {
|
||||
color: #26f;
|
||||
}
|
||||
|
||||
.color-333 {
|
||||
color: #333;
|
||||
}
|
||||
.color-666 {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<section class="companyDetail">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="企业信用报告" isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<el-button @click="$router.push({})">返回信用报告</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<enterprise-dialog slot="content" :enterpriseId="$route.query.id" v-bind="$props"/>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EnterpriseDialog from "../../../components/enterpriseDialog";
|
||||
|
||||
export default {
|
||||
name: "companyDetail",
|
||||
components: {EnterpriseDialog},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.companyDetail {
|
||||
}
|
||||
</style>
|
||||
129
project/xiushan/apps/creditReport/AppCreditReport/home.vue
Normal file
129
project/xiushan/apps/creditReport/AppCreditReport/home.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<section class="home">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="信用报告查询工具" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<el-input v-model="search.param" :placeholder="placeholder" @change="page.current=1,handleSearch()" clearable>
|
||||
<el-select slot="prepend" v-model="search.type" :clearable="false" @change="search.param=''">
|
||||
<el-option v-for="op in types" :key="op.dictValue" :value="op.dictValue" :label="op.dictName"/>
|
||||
</el-select>
|
||||
<el-button slot="append" type="text" @change="page.current=1,handleSearch()">搜索</el-button>
|
||||
</el-input>
|
||||
<ai-card v-if="hasResult" title="查询结果" class="mar-t16">
|
||||
<el-row type="flex" slot="right" class="color-666">秀兴通为您找到<p class="color-26f" v-text="page.total"/>个结果</el-row>
|
||||
<template #content>
|
||||
<ai-table :tableData="results" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="handleSearch" :col-configs="colConfigs" :dict="dict">
|
||||
<el-table-column slot="name" :label="nameLabel">
|
||||
<template slot-scope="{row}">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-avatar :src="row.avatar">
|
||||
<div v-text="defaultAvatar(row.name)"/>
|
||||
</el-avatar>
|
||||
<div class="mar-l8" v-text="row.name"/>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" label="操作" align="center" width="100px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="showDetail(row.id)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-empty v-else>暂无查询结果</ai-empty>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "home",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
placeholder() {
|
||||
const texts = {
|
||||
0: "搜索个人姓名/身份证号",
|
||||
1: "搜索企业名称/法人姓名",
|
||||
}
|
||||
return texts[this.search.type]
|
||||
},
|
||||
hasResult: v => v.results?.length > 0,
|
||||
isCompany: v => v.search.type == 1,
|
||||
nameLabel: v => v.isCompany ? "企业名称" : "姓名",
|
||||
colConfigs() {
|
||||
const configs = {
|
||||
0: [
|
||||
{slot: "name"},
|
||||
{prop: "idNumber", label: "身份证号", width: 180},
|
||||
],
|
||||
1: [
|
||||
{slot: "name"},
|
||||
{prop: "legalPersonName", label: "法人姓名", width: 80},
|
||||
{prop: "idNumber", label: "统一社会信用代码", width: 180},
|
||||
{prop: "address", label: "地址"},
|
||||
],
|
||||
}
|
||||
return configs[this.search.type]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {type: "0", param: null},
|
||||
types: [
|
||||
{dictValue: "0", dictName: "个人"},
|
||||
{dictValue: "1", dictName: "企业"},
|
||||
],
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
results: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
this.instance.post("/appcreditreport/listForWeb", null, {
|
||||
params: {...this.search, ...this.page}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.results = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
showDetail(id) {
|
||||
const hash = this.isCompany ? "#company" : "#person"
|
||||
this.$router.push({hash, query: {id}})
|
||||
},
|
||||
defaultAvatar(name) {
|
||||
return name?.substring(0, 1) || "无"
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.home {
|
||||
::v-deep .el-input-group__prepend {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
::v-deep .el-input-group__append {
|
||||
width: 100px;
|
||||
padding: 0;
|
||||
background: #26f;
|
||||
color: #fff;
|
||||
border-color: #26f;
|
||||
|
||||
.el-button {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<section class="personDetail">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="个人信用报告" isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<el-button @click="$router.push({})">返回信用报告</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<person-credit-report slot="content" :personId="$route.query.id" v-bind="$props"/>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonCreditReport from "../../../components/personCreditReport";
|
||||
|
||||
export default {
|
||||
name: "personDetail",
|
||||
components: {PersonCreditReport},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.personDetail {
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<section class="AppCreditReportApply">
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from "./list";
|
||||
import Add from "./add";
|
||||
|
||||
export default {
|
||||
name: "AppCreditReportApply",
|
||||
components: {Add, List},
|
||||
label: "信用报告申请",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
let {hash} = this.$route
|
||||
return hash == "#add" ? Add : List
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load('creditReportType')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppCreditReportApply {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<section class="add">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" :title="pageTitle" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<el-tabs tabPosition="left">
|
||||
<el-tab-pane label="申请信息">
|
||||
<el-form ref="AddForm" :model="form" size="small" label-width="120px">
|
||||
<ai-card title="申请信息">
|
||||
<template #content>
|
||||
<el-row type="flex">
|
||||
<div class="fill">
|
||||
<el-form-item label="信用主体" prop="objName">{{ form.objName }}</el-form-item>
|
||||
<el-form-item label="证件号码" prop="idNumber">{{ form.idNumber }}</el-form-item>
|
||||
</div>
|
||||
<div class="fill">
|
||||
<el-form-item label="申请类型" prop="type">{{ dict.getLabel('creditReportType', form.type) }}</el-form-item>
|
||||
<el-form-item label="联系方式" prop="createUserPhone">{{ form.createUserPhone }}</el-form-item>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-form-item label="申请时间" prop="createTime">{{ form.createTime }}</el-form-item>
|
||||
<el-form-item label="证明材料" prop="files">
|
||||
<el-image class="cpImage" v-for="(item,i) in form.files" :key="i" :src="item.url" :preview-src-list="[item.url]"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="信用报告" lazy>
|
||||
<component :is="creditReport" v-bind="cpParams"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonCreditReport from "../../../components/personCreditReport";
|
||||
import EnterpriseDialog from "../../../components/enterpriseDialog";
|
||||
|
||||
export default {
|
||||
name: "add",
|
||||
components: {EnterpriseDialog, PersonCreditReport},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
isEdit: v => !!v.$route.query.id,
|
||||
pageTitle: () => "报告申请详情",
|
||||
cpParams: v => ({...v.$props, personId: v.form.objId, enterpriseId: v.form.objId}),
|
||||
creditReport: v => v.form.type == 1 ? EnterpriseDialog : PersonCreditReport
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post("/app/appcreditreport/applyInfot", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
this.$router.push({})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.add {
|
||||
height: 100%;
|
||||
|
||||
.cpImage {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<section class="list">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="信用报告申请" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索信用主体/证件号码/信用代码" v-model="search.name" clearable @change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width="300">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="handleAdd(row.id)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "list",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{prop: "createUserPhone", label: "联系方式"},
|
||||
{prop: "createUserName", label: "申请人"},
|
||||
{prop: "idNumber", label: "证件号码"},
|
||||
{prop: "objName", label: "信用主体"},
|
||||
{prop: "type", label: "申请类型", dict: "creditReportType"},
|
||||
{prop: "createTime", label: "申请时间"}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/app/appcreditreport/applyList", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd(id) {
|
||||
this.$router.push({hash: "#add", query: {id}})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user