信用报告查询完成
This commit is contained in:
		| @@ -1,57 +0,0 @@ | ||||
| <template> | ||||
|   <section class="AppCreditInquiry"> | ||||
|     <!-- <keep-alive :include="['List']"> | ||||
|       <component ref="component" :is="component" :instance="instance" :params="params" :dict="dict" @change="onChange"/> | ||||
|     </keep-alive> --> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| // import List from "./components/List.vue"; | ||||
| // import Add from "./components/Add.vue"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppCreditInquiry", | ||||
|   label: "信用查询", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   // components: {Add, List}, | ||||
|   data() { | ||||
|     return { | ||||
|       component: "List", | ||||
|       params: {}, | ||||
|       include: [], | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     onChange(data) { | ||||
|       if (data.type === "Add") { | ||||
|         this.component = "Add"; | ||||
|         this.params = data.params; | ||||
|       } | ||||
|  | ||||
|       if (data.type === "List") { | ||||
|         this.component = "List"; | ||||
|         this.params = data.params; | ||||
|  | ||||
|         this.$nextTick(() => { | ||||
|           if (data.isRefresh) { | ||||
|             this.$refs.component.getTableData(); | ||||
|           } | ||||
|         }); | ||||
|       } | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("portalUserStatus", "enterpriseStatus", "userEnterpriseStatus","enterpriseType") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppCreditInquiry { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										54
									
								
								project/xiushan/apps/AppCreditReport/AppCreditReport.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								project/xiushan/apps/AppCreditReport/AppCreditReport.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -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> | ||||
							
								
								
									
										33
									
								
								project/xiushan/apps/AppCreditReport/companyDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								project/xiushan/apps/AppCreditReport/companyDetail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -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/AppCreditReport/home.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								project/xiushan/apps/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> | ||||
							
								
								
									
										33
									
								
								project/xiushan/apps/AppCreditReport/personDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								project/xiushan/apps/AppCreditReport/personDetail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -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> | ||||
		Reference in New Issue
	
	Block a user