秀山需求变更调整完毕
This commit is contained in:
		| @@ -2,6 +2,7 @@ import Vue from 'vue' | ||||
| import Vuex from 'vuex' | ||||
| import preState from 'vuex-persistedstate' | ||||
| import * as modules from "dvcp-ui/lib/js/modules" | ||||
| import axios from "../router/axios"; | ||||
|  | ||||
| Vue.use(Vuex) | ||||
|  | ||||
| @@ -15,6 +16,11 @@ export default new Vuex.Store({ | ||||
|     }, | ||||
|     cleanApps(state) { | ||||
|       state.apps = [] | ||||
|     }, | ||||
|     setFinanceUser(state) { | ||||
|       axios.post("appfinancialorganizationuser/checkUser").then(res => { | ||||
|         state.user.financeUser = res.data | ||||
|       }).catch(() => 0) | ||||
|     } | ||||
|   }, | ||||
|   modules, | ||||
|   | ||||
| @@ -0,0 +1,41 @@ | ||||
| <template> | ||||
|   <section class="AppGuaranteeProduct"> | ||||
|     <component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|  | ||||
| import ProductDetail from "./productDetail"; | ||||
| import ProductList from "./productList"; | ||||
| import ProductAdd from "./productAdd"; | ||||
| import ProductRecommend from "./productRecommend"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppGuaranteeProduct", | ||||
|   components: {ProductRecommend, ProductAdd, ProductList, ProductDetail}, | ||||
|   label: "担保产品发布", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     currentComponent() { | ||||
|       return this.$route.hash == "#add" ? ProductAdd : | ||||
|           this.$route.hash == "#productRecommend" ? ProductRecommend : | ||||
|               !!this.$route.query.id ? ProductDetail : ProductList | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("productGuaranteeMode", "productRepaymentMethod", "productRepaymentTimeline", "productStatus", "productFaceUser", | ||||
|         "enterpriseAuditStatus", "yesOrNo", "financialOrganizationType", "financialProductChannels") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppGuaranteeProduct { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										172
									
								
								project/xiushan/apps/finance/AppGuaranteeProduct/productAdd.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										172
									
								
								project/xiushan/apps/finance/AppGuaranteeProduct/productAdd.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,172 @@ | ||||
| <template> | ||||
|   <section class="productAdd"> | ||||
|     <ai-detail> | ||||
|       <ai-title slot="title" :title="addTitle" isShowBottomBorder isShowBack @onBackClick="back"/> | ||||
|       <template #content> | ||||
|         <el-form size="small" label-width="120px" :model="form" ref="ProductForm" :rules="rules"> | ||||
|           <ai-card title="基本信息"> | ||||
|             <template #content> | ||||
|               <el-form-item label="产品名称" prop="productName"> | ||||
|                 <el-input v-model="form.productName" placeholder="请输入" clearable show-word-limit maxlength="30"/> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="产品介绍" prop="productFeatures"> | ||||
|                 <el-input type="textarea" rows="5" v-model="form.productFeatures" placeholder="请输入" clearable | ||||
|                           maxlength="500" show-word-limit/> | ||||
|               </el-form-item> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item label="客户经理" prop="bankCounterpart"> | ||||
|                   <el-input type="text" v-model="form.bankCounterpart" placeholder="客户经理姓名" clearable maxlength="6"/> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="联系方式" prop="consultationTelephone"> | ||||
|                   <el-input type="text" v-model="form.consultationTelephone" placeholder="客户经理电话" clearable | ||||
|                             maxlength="11"/> | ||||
|                 </el-form-item> | ||||
|               </el-row> | ||||
|               <el-form-item label="企业微信二维码" prop="qrCodeUrl"> | ||||
|                 <ai-uploader v-model="form.qrCodeUrl" :instance="instance" :limit="1" isShowTip valueIsUrl/> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="适用范围"> | ||||
|             <template #content> | ||||
|               <el-form-item label="适用范围" prop="areaId"> | ||||
|                 <ai-area-get :instance="instance" v-model="form.areaId" showAll/> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="面向对象" prop="faceUser"> | ||||
|                 <el-checkbox-group v-model="form.faceUser"> | ||||
|                   <el-checkbox v-for="op in dict.getDict('productFaceUser')" :key="op.dictValue" :label="op.dictValue"> | ||||
|                     {{ op.dictName }} | ||||
|                   </el-checkbox> | ||||
|                 </el-checkbox-group> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="办理渠道"> | ||||
|             <template #content> | ||||
|               <el-form-item label="业务办理渠道" prop="handlingChannels"> | ||||
|                 <ai-select v-model="form.handlingChannels" :selectList="dict.getDict('financialProductChannels')" @change="form.zwspId=null"/> | ||||
|               </el-form-item> | ||||
|               <el-form-item v-if="form.handlingChannels==1" label="关联贷款联审" prop="zwspId"> | ||||
|                 <ai-select v-model="form.zwspId" :instance="instance" action="/approval-process-def/list?processDefStatus=1" :prop="{label:'processName'}"/> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|       </template> | ||||
|       <template #footer> | ||||
|         <el-button @click="back">取消</el-button> | ||||
|         <el-button type="primary" @click="submit">申请发布</el-button> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "productAdd", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     addTitle() { | ||||
|       return !!this.$route.query.id ? "编辑金融产品" : "添加金融产品" | ||||
|     }, | ||||
|     rules() { | ||||
|       return { | ||||
|         productName: [{required: true, message: "请输入产品名称", trigger: 'blur'}], | ||||
|         loanMin: [{required: true, message: "请输入最低贷款额度"}], | ||||
|         loanMax: [ | ||||
|           {required: true, message: "请输入最高贷款额度", trigger: 'blur'}, | ||||
|           {validator: (r, v, cb) => v < this.form.loanMin ? cb("输入的最高贷款需大于最低贷款") : cb()} | ||||
|         ], | ||||
|         interestRateMin: [{required: true, message: "请输入最低参考利率", trigger: 'blur'}], | ||||
|         interestRateMax: [ | ||||
|           {required: true, message: "请输入最高参考利率", trigger: 'blur'}, | ||||
|           {validator: (r, v, cb) => v < this.form.interestRateMin ? cb("输入的最高参考利率需大于最低参考利率") : cb()} | ||||
|         ], | ||||
|         repaymentTimeline: [{required: true, message: "请选择还款期限", trigger: 'blur'}], | ||||
|         repaymentMethod: [{required: true, message: "请选择还款方式", trigger: 'blur'}], | ||||
|         guaranteeMode: [{required: true, message: "请选择担保方式", trigger: 'blur'}], | ||||
|         areaId: [{required: true, message: "请选择适用范围", trigger: 'blur'}], | ||||
|         faceUser: [{required: true, message: "请选择面向对象", trigger: 'blur'}], | ||||
|         applyCondition: [{required: true, message: "请输入申请条件", trigger: 'blur'}], | ||||
|         needMaterial: [{required: true, message: "请输入所需材料", trigger: 'blur'}], | ||||
|         productFeatures: [{required: true, message: "请输入产品特色", trigger: 'blur'}], | ||||
|         handlingChannels: [{required: true, message: "请选择办理渠道"}], | ||||
|         zwspId: [{required: true, message: "请选择关联贷款联审"}], | ||||
|         // bankCounterpart: [{required: true, message: "请输入客户经理姓名", trigger: 'change'}], | ||||
|         // consultationTelephone: [ {required: true, message: "请输入客户经理电话", trigger: 'change'}], | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       dialog: false, | ||||
|       form: {guaranteeMode: [], faceUser: [], loanMin: null, zwspId: null}, | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       let {id} = this.$route.query | ||||
|       id && this.instance.post("/appfinancialproduct/queryDetailById", null, { | ||||
|         params: {id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.form = res.data | ||||
|           this.form.faceUser = res.data.faceUser?.split(",") | ||||
|           this.form.guaranteeMode = res.data.guaranteeMode?.split(",") | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.ProductForm.validate(v => { | ||||
|         if (v) { | ||||
|           let {form} = this | ||||
|           form.faceUser = form.faceUser?.toString() | ||||
|           form.guaranteeMode = form.guaranteeMode?.toString() | ||||
|           this.instance.post("/appfinancialproduct/addOrUpdate", form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.back() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     back() { | ||||
|       this.$router.push({}) | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.getDetail() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .productAdd { | ||||
|   height: 100%; | ||||
|  | ||||
|   .flexWrap { | ||||
|     flex-wrap: wrap; | ||||
|  | ||||
|     .el-form-item { | ||||
|       width: 50%; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep.half { | ||||
|     width: 50%; | ||||
|   } | ||||
|  | ||||
|   ::v-deep input[type="number"] { | ||||
|     line-height: 1px !important; | ||||
|  | ||||
|     &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { | ||||
|       -webkit-appearance: none !important; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,165 @@ | ||||
| <template> | ||||
|   <section class="productDetail"> | ||||
|     <ai-detail> | ||||
|       <ai-title slot="title" title="金融产品详情" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})"> | ||||
|         <template #rightBtn> | ||||
|           <el-button v-if="isAdmin&&detail.status==0" type="primary" @click="dialog=true">审核</el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <template #content> | ||||
|         <el-form v-if="detail.id" size="small" label-width="120px"> | ||||
|           <ai-card title="基本信息"> | ||||
|             <template #content> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item class="half" label="产品名称">{{ detail.productName }}</el-form-item> | ||||
|                 <el-form-item class="half" label="状态">{{ dict.getLabel('productStatus', detail.status) }}</el-form-item> | ||||
|               </el-row> | ||||
|               <el-form-item label="产品简介">{{ detail.productFeatures }}</el-form-item> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item label="客户经理" class="half">{{ detail.bankCounterpart }}</el-form-item> | ||||
|                 <el-form-item label="联系方式" class="half">{{ detail.consultationTelephone }}</el-form-item> | ||||
|               </el-row> | ||||
|               <el-form-item label="企业微信二维码" v-if="detail.qrCodeUrl"> | ||||
|                 <el-image class="qrCode" :src="detail.qrCodeUrl" :preview-src-list="[detail.qrCodeUrl]"/> | ||||
|               </el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="适用范围"> | ||||
|             <template #content> | ||||
|               <el-form-item label="适用范围">{{ detail.areaName }}</el-form-item> | ||||
|               <el-form-item label="面向对象">{{ detail.faceUserLabel }}</el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="办理渠道"> | ||||
|             <template #content> | ||||
|               <el-form-item label="业务办理渠道">{{ dict.getLabel('financialProductChannels', detail.handlingChannels) }}</el-form-item> | ||||
|               <el-form-item label="关联贷款联审" v-if="detail.handlingChannels==1">{{ detail.zwspName }}</el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="审核结果" v-if="!isAuthing"> | ||||
|             <template #content> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item class="half" label="审核结果"> | ||||
|                   {{ dict.getLabel("productStatus", detail.status) }} | ||||
|                 </el-form-item> | ||||
|                 <el-form-item class="half" label="审核人">{{ detail.auditUserName }}</el-form-item> | ||||
|                 <el-form-item class="half" label="审核时间">{{ detail.auditTime }}</el-form-item> | ||||
|               </el-row> | ||||
|               <el-form-item label="备注">{{ detail.auditDescription }}</el-form-item> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </el-form> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
|     <ai-dialog :visible.sync="dialog" title="审批" @closed="form={}" @onConfirm="submitAudit" width="560px"> | ||||
|       <el-form :model="form" :rules="rules" ref="AuditForm" size="small" label-width="120px"> | ||||
|         <el-form-item label="审批结果" prop="status"> | ||||
|           <ai-select v-model="form.status" :selectList="dict.getDict('enterpriseAuditStatus')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="审批意见" prop="remark" :required="form.status==2"> | ||||
|           <el-input type="textarea" v-model="form.remark" placeholder="请输入" maxlength="200" rows="4" show-word-limit/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "productDetail", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     isAuthing() { | ||||
|       return this.detail.status == "0" | ||||
|     }, | ||||
|     isAdmin() { | ||||
|       return this.user?.financeUser?.userRole == 1 | ||||
|     }, | ||||
|     rules() { | ||||
|       return { | ||||
|         status: [{required: true, message: "请选择审批结果"}], | ||||
|         remark: [{validator: (r, v, cb) => this.form.status == 2 && !v ? cb("请输入审批意见") : cb()}], | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       dialog: false, | ||||
|       detail: {}, | ||||
|       form: {}, | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       let {id} = this.$route.query | ||||
|       this.instance.post("/appfinancialproduct/queryDetailById", null, { | ||||
|         params: {id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.detail = res.data | ||||
|           this.detail.guaranteeModeLabel = res.data.guaranteeMode?.split(",").map(g => this.dict.getLabel("productGuaranteeMode", g))?.toString() | ||||
|           this.detail.faceUserLabel = res.data.faceUser?.split(",").map(g => this.dict.getLabel("productFaceUser", g))?.toString() | ||||
|           if (this.detail.handlingChannels == 1) { | ||||
|             this.getZWSP(this.detail.zwspId).then(zwsp => this.$set(this.detail, 'zwspName', zwsp.processName)) | ||||
|           } | ||||
|         } else { | ||||
|           this.$message.error("该产品已下架!") | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getZWSP(id) { | ||||
|       //贷款联审信息 | ||||
|       return this.instance.post("/approval-process-def/info-id", null, {params: {id}}).then(res => { | ||||
|         if (res?.data) { | ||||
|           return res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     submitAudit() { | ||||
|       this.$refs.AuditForm.validate(v => { | ||||
|         if (v) { | ||||
|           let {id} = this.detail | ||||
|           this.instance.post("/appfinancialproduct/auditProduct", null, { | ||||
|             params: {id, ...this.form} | ||||
|           }).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.dialog = false | ||||
|               this.$message.success("提交成功!") | ||||
|               this.getDetail() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getDetail() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .productDetail { | ||||
|   height: 100%; | ||||
|  | ||||
|   .flexWrap { | ||||
|     flex-wrap: wrap; | ||||
|   } | ||||
|  | ||||
|   ::v-deep.half { | ||||
|     width: 50%; | ||||
|   } | ||||
|  | ||||
|   .qrCode { | ||||
|     width: 120px; | ||||
|     height: 120px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										135
									
								
								project/xiushan/apps/finance/AppGuaranteeProduct/productList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								project/xiushan/apps/finance/AppGuaranteeProduct/productList.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,135 @@ | ||||
| <template> | ||||
|   <section class="productList"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="产品发布管理" isShowBottomBorder> | ||||
|         <template #rightBtn> | ||||
|           <el-button type="primary" @click="$router.push({hash:'#productRecommend'})" | ||||
|                      v-if="permissions('app_appfinancialproductrecommend_detail')">推荐产品 | ||||
|           </el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="handleEdit()" v-if="isFinanceUser">添加产品</el-button> | ||||
|             <ai-select v-model="search.guaranteeMode" :selectList="dict.getDict('productGuaranteeMode')" | ||||
|                        placeholder="担保方式" @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索产品名称" v-model="search.productName" 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="hot" label="热门推荐" align="center" v-if="!isFinanceUser"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-switch v-model="row.isHot" active-value="1" inactive-value="0" @change="handleIsHot(row)"/> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="interestRateMin" label="参考利率" align="center"> | ||||
|             <template slot-scope="{row}"> | ||||
|               {{ row.interestRateMin }}%~{{ row.interestRateMax }}% | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center" width="200px"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="showDetail(row.id)">详情</el-button> | ||||
|               <template v-if="isFinanceUser"> | ||||
|                 <el-button type="text" @click="handleEdit(row.id)" v-if="['2','1'].includes(row.status)">编辑</el-button> | ||||
|                 <el-button type="text" @click="handleDelete(row.id)" v-if="['2','1'].includes(row.status)">删除</el-button> | ||||
|               </template> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "productList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     isFinanceUser: v => !!v.user.financeUser?.id && v.user.financeUser.organizationType == 2 | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {productName: ""}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       colConfigs: [ | ||||
|         {label: "产品名称", prop: "productName"}, | ||||
|         {label: "客户经理", prop: "bankCounterpart", align: "center"}, | ||||
|         {label: "联系方式", prop: "consultationTelephone"}, | ||||
|         {label: "操作人", prop: "createUserName", align: "center"}, | ||||
|         {label: "状态", prop: "status", dict: "productStatus", align: "center"}, | ||||
|         {label: "热门推荐", slot: "hot"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/appfinancialproduct/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records.map(e => { | ||||
|             let guaranteeModeLabel = e.guaranteeMode.split(",").map(g => this.dict.getLabel("productGuaranteeMode", g))?.toString() | ||||
|             return {...e, guaranteeModeLabel} | ||||
|           }) | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     showDetail(id) { | ||||
|       this.$router.push({query: {id}}) | ||||
|     }, | ||||
|     handleEdit(id) { | ||||
|       this.$router.push({query: {id}, hash: "#add"}) | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要删除该产品?").then(() => { | ||||
|         this.instance.post("/appfinancialproduct/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success("删除成功!") | ||||
|             this.getTableData() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     handleIsHot(row) { | ||||
|       let {id, isHot} = row | ||||
|       this.instance.post("appfinancialproduct/setIsHot", null, { | ||||
|         params: {id, isHot} | ||||
|       }).then(res => { | ||||
|         if (res?.code == 0) { | ||||
|           this.$message.success("修改成功!") | ||||
|           this.getTableData() | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .productList { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,163 @@ | ||||
| <template> | ||||
|   <section class="productRecommend"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="推荐产品" isShowBottomBorder isShowBack @onBackClick="$router.push({query:{}})"/> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button type="primary" @click="dialog=true">新增推荐</el-button> | ||||
|             <ai-select placeholder="机构类型" v-model="search.organizationType" @change="page.current=1,getTableData()" | ||||
|                        :selectList="dict.getDict('financialOrganizationType')"/> | ||||
|           </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="200px"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="handleEdit(row)">编辑</el-button> | ||||
|               <el-button type="text" @click="handleDelete(row.id)">删除</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog :visible.sync="dialog" :title="dialogTitle" @closed="form={}" @onConfirm="submitAudit" width="560px"> | ||||
|       <el-form :model="form" :rules="rules" ref="PRForm" size="small" label-width="120px"> | ||||
|         <el-form-item label="机构类型" prop="organizationType"> | ||||
|           <ai-select v-model="form.organizationType" :selectList="dict.getDict('financialOrganizationType')" | ||||
|                      @change="getProducts(),form.productId=null"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="推荐产品" prop="productId"> | ||||
|           <ai-select v-model="form.productId" :selectList="productOps" @change="getOrgId"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="推荐顺序" prop="showIndex"> | ||||
|           <el-input type="number" v-model.number="form.showIndex" placeholder="请输入" clearable/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "productRecommend", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     isFinanceUser() { | ||||
|       return !!this.user.financeUser?.id | ||||
|     }, | ||||
|     dialogTitle() { | ||||
|       return this.form.id ? "编辑推荐" : "新增推荐" | ||||
|     }, | ||||
|     productOps() { | ||||
|       return this.productList.map(e => ({dictName: e.productName, dictValue: e.id})) || [] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {productName: ""}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       colConfigs: [ | ||||
|         {label: "产品名称", prop: "productName"}, | ||||
|         {label: "机构类型", prop: "organizationType", dict: "financialOrganizationType", width: 120}, | ||||
|         {label: "推荐顺序", prop: "showIndex", align: "center", width: 120}, | ||||
|         {label: "机构名称", prop: "organizationName"}, | ||||
|         {slot: "options"} | ||||
|       ], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: { | ||||
|         showIndex: [ | ||||
|           {required: true, message: "请输入推荐顺序"}, | ||||
|           {pattern: /^[1-7]$/, message: "请输入1~7之间的整数"} | ||||
|         ], | ||||
|         productId: [{required: true, message: "请选择推荐产品", trigger: "blur"}], | ||||
|         organizationType: [{required: true, message: "请选择机构类型"}], | ||||
|       }, | ||||
|       productList: [] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/appfinancialproductrecommend/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleEdit(row) { | ||||
|       this.dialog = true | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.getProducts() | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要删除该推荐?").then(() => { | ||||
|         this.instance.post("/appfinancialproductrecommend/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success("删除成功!") | ||||
|             this.getTableData() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     submitAudit() { | ||||
|       this.$refs.PRForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/appfinancialproductrecommend/addOrUpdate", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.getTableData() | ||||
|               this.dialog = false | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getProducts() { | ||||
|       let {organizationType} = this.form | ||||
|       this.instance.post("/appfinancialproduct/list", null, { | ||||
|         params: {organizationType, size: 999, status: 1} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.productList = res.data?.records | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getOrgId(productId) { | ||||
|       let product = this.productList.find(e => e.id == productId) | ||||
|       this.form.organizationId = product?.organizationId || "" | ||||
|       this.$forceUpdate() | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .productRecommend { | ||||
|   height: 100%; | ||||
|  | ||||
|   ::v-deep input[type="number"] { | ||||
|     line-height: 1px !important; | ||||
|  | ||||
|     &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { | ||||
|       -webkit-appearance: none !important; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -7,71 +7,135 @@ | ||||
|         </template> | ||||
|       </ai-title> | ||||
|       <template #content> | ||||
|         <el-form size="small" label-width="160px"> | ||||
|           <ai-card title="贷款申请"> | ||||
|             <template #content> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item label="产品名称"> | ||||
|                   <el-row type="flex"> | ||||
|                     {{ detail.productName }} | ||||
|                     <el-link type="primary" | ||||
|                              @click="$router.push({name:'27338cb83e77461dbd44356a6760df84',query:{id:detail.productId}})"> | ||||
|                       产品详情 | ||||
|                     </el-link> | ||||
|                   </el-row> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item> | ||||
|                 <el-form-item label="贷款金额(万)">{{ detail.loanAmount }}</el-form-item> | ||||
|                 <el-form-item label="期望使用期限">{{ dict.getLabel('productRepaymentTimeline', detail.hopeLifespan) }} | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="企业主体" v-if="detail.enterpriseId"> | ||||
|                   <el-row type="flex"> | ||||
|                     {{ detail.enterpriseName }} | ||||
|                     <ai-dialog-btn text="企业详情" :dialog-title="detail.enterpriseName||'企业详情'"> | ||||
|                       <enterprise-dialog v-if="detail.enterpriseId" :enterprise-id="detail.enterpriseId" :instance="instance" :dict="dict"/> | ||||
|                     </ai-dialog-btn> | ||||
|                   </el-row> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="所在地区">{{ detail.areaName }}</el-form-item> | ||||
|                 <el-form-item label="资金用途">{{ dict.getLabel('financialFundPurpose', detail.fundPurpose) }} | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="联系人"> | ||||
|                   <el-row type="flex"> | ||||
|                     {{ detail.name }} | ||||
|                     <ai-dialog-btn text="个人详情" :dialog-title="detail.name||'个人详情'"> | ||||
|                       <person-credit-report :personId="detail.idNumber" :instance="instance" :dict="dict"/> | ||||
|                     </ai-dialog-btn> | ||||
|                   </el-row> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="身份证号">{{ detail.idNumber }}</el-form-item> | ||||
|                 <el-form-item label="联系方式">{{ detail.phone }}</el-form-item> | ||||
|                 <el-form-item label="申请时间">{{ detail.createTime }}</el-form-item> | ||||
|               </el-row> | ||||
|               <el-row> | ||||
|                 <el-form-item label="备注">{{ detail.remark }}</el-form-item> | ||||
|               </el-row> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|           <ai-card title="办理结果" v-if="!isAuthing"> | ||||
|             <template #content> | ||||
|               <el-row type="flex" class="flexWrap"> | ||||
|                 <el-form-item label="贷款进度">{{ dict.getLabel('financialLoanApplyStatus', detail.status) }}</el-form-item> | ||||
|                 <el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item> | ||||
|                 <el-form-item label="贷款经理">{{ detail.auditUserName }}</el-form-item> | ||||
|                 <el-form-item label="联系方式 ">{{ detail.auditPhone }}</el-form-item> | ||||
|                 <template v-if="detail.status==1"> | ||||
|                   <el-form-item label="放款金额(万)">{{ detail.auditAmount }}</el-form-item> | ||||
|                   <el-form-item label="放款日期">{{ detail.loanDate }}</el-form-item> | ||||
|                   <el-form-item label="实际使用期限">{{ dict.getLabel('productRepaymentTimeline', detail.auditLifespan) }} | ||||
|         <el-form v-if="detail.id" size="small" label-width="160px"> | ||||
|           <template v-if="isGuaranteeProduct"> | ||||
|             <ai-card title="担保贷款申请"> | ||||
|               <template #content> | ||||
|                 <el-row type="flex" class="flexWrap"> | ||||
|                   <el-form-item label="产品名称"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.productName }} | ||||
|                       <el-link type="primary" | ||||
|                                @click="$router.push({name:'27338cb83e77461dbd44356a6760df84',query:{id:detail.productId}})"> | ||||
|                         产品详情 | ||||
|                       </el-link> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                 </template> | ||||
|                 <el-form-item label="操作时间">{{ detail.auditTime }}</el-form-item> | ||||
|               </el-row> | ||||
|               <el-row> | ||||
|                 <el-form-item v-if="detail.status==2" label="备注">{{ detail.auditDescription }}</el-form-item> | ||||
|               </el-row> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|                   <el-form-item label="担保机构">{{ detail.organizationName }}</el-form-item> | ||||
|                   <el-form-item label="企业主体" v-if="detail.enterpriseId"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.enterpriseName }} | ||||
|                       <ai-dialog-btn text="企业详情" :dialog-title="detail.enterpriseName||'企业详情'"> | ||||
|                         <enterprise-dialog v-if="detail.enterpriseId" :enterprise-id="detail.enterpriseId" :instance="instance" :dict="dict"/> | ||||
|                       </ai-dialog-btn> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="联系人"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.name }} | ||||
|                       <ai-dialog-btn text="个人详情" :dialog-title="detail.name||'个人详情'"> | ||||
|                         <person-credit-report :personId="detail.idNumber" :instance="instance" :dict="dict"/> | ||||
|                       </ai-dialog-btn> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="身份证号">{{ detail.idNumber }}</el-form-item> | ||||
|                   <el-form-item label="联系方式">{{ detail.phone }}</el-form-item> | ||||
|                   <el-form-item label="申请时间">{{ detail.createTime }}</el-form-item> | ||||
|                 </el-row> | ||||
|                 <el-row> | ||||
|                   <el-form-item label="备注">{{ detail.remark }}</el-form-item> | ||||
|                 </el-row> | ||||
|                 <el-form-item label="身份证"> | ||||
|                   <el-image class="thumb" :src="detail.idCardFrontFile.url" :preview-src-list="[detail.idCardFrontFile.url]"/> | ||||
|                   <el-image class="thumb mar-l16" :src="detail.idCardbackFile.url" :preview-src-list="[detail.idCardbackFile.url]"/> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="营业执照"> | ||||
|                   <el-image class="thumb" :src="detail.businessLicenseFile.url" :preview-src-list="[detail.businessLicenseFile.url]"/> | ||||
|                 </el-form-item> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|             <ai-card title="办理结果" v-if="!isAuthing"> | ||||
|               <template #content> | ||||
|                 <el-row type="flex" class="flexWrap"> | ||||
|                   <el-form-item label="审核进度">{{ dict.getLabel('financialLoanApplyStatus', detail.status) }}</el-form-item> | ||||
|                   <el-form-item label="担保机构">{{ detail.organizationName }}</el-form-item> | ||||
|                   <el-form-item label="客户经理">{{ detail.auditUserName }}</el-form-item> | ||||
|                   <el-form-item label="联系方式 ">{{ detail.auditPhone }}</el-form-item> | ||||
|                   <el-form-item label="担保日期">{{ detail.loanDate }}</el-form-item> | ||||
|                   <el-form-item label="操作时间">{{ detail.auditTime }}</el-form-item> | ||||
|                 </el-row> | ||||
|                 <el-row> | ||||
|                   <el-form-item v-if="detail.status==2" label="备注">{{ detail.auditDescription }}</el-form-item> | ||||
|                 </el-row> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|           </template> | ||||
|           <template v-else> | ||||
|             <ai-card title="贷款申请"> | ||||
|               <template #content> | ||||
|                 <el-row type="flex" class="flexWrap"> | ||||
|                   <el-form-item label="产品名称"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.productName }} | ||||
|                       <el-link type="primary" | ||||
|                                @click="$router.push({name:'27338cb83e77461dbd44356a6760df84',query:{id:detail.productId}})"> | ||||
|                         产品详情 | ||||
|                       </el-link> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item> | ||||
|                   <el-form-item label="贷款金额(万)">{{ detail.loanAmount }}</el-form-item> | ||||
|                   <el-form-item label="期望使用期限">{{ dict.getLabel('productRepaymentTimeline', detail.hopeLifespan) }} | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="企业主体" v-if="detail.enterpriseId"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.enterpriseName }} | ||||
|                       <ai-dialog-btn text="企业详情" :dialog-title="detail.enterpriseName||'企业详情'"> | ||||
|                         <enterprise-dialog v-if="detail.enterpriseId" :enterprise-id="detail.enterpriseId" :instance="instance" :dict="dict"/> | ||||
|                       </ai-dialog-btn> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="所在地区">{{ detail.areaName }}</el-form-item> | ||||
|                   <el-form-item label="资金用途">{{ dict.getLabel('financialFundPurpose', detail.fundPurpose) }} | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="联系人"> | ||||
|                     <el-row type="flex"> | ||||
|                       {{ detail.name }} | ||||
|                       <ai-dialog-btn text="个人详情" :dialog-title="detail.name||'个人详情'"> | ||||
|                         <person-credit-report :personId="detail.idNumber" :instance="instance" :dict="dict"/> | ||||
|                       </ai-dialog-btn> | ||||
|                     </el-row> | ||||
|                   </el-form-item> | ||||
|                   <el-form-item label="身份证号">{{ detail.idNumber }}</el-form-item> | ||||
|                   <el-form-item label="联系方式">{{ detail.phone }}</el-form-item> | ||||
|                   <el-form-item label="申请时间">{{ detail.createTime }}</el-form-item> | ||||
|                 </el-row> | ||||
|                 <el-row> | ||||
|                   <el-form-item label="备注">{{ detail.remark }}</el-form-item> | ||||
|                 </el-row> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|             <ai-card title="办理结果" v-if="!isAuthing"> | ||||
|               <template #content> | ||||
|                 <el-row type="flex" class="flexWrap"> | ||||
|                   <el-form-item label="贷款进度">{{ dict.getLabel('financialLoanApplyStatus', detail.status) }}</el-form-item> | ||||
|                   <el-form-item label="贷款银行">{{ detail.organizationName }}</el-form-item> | ||||
|                   <el-form-item label="贷款经理">{{ detail.auditUserName }}</el-form-item> | ||||
|                   <el-form-item label="联系方式 ">{{ detail.auditPhone }}</el-form-item> | ||||
|                   <template v-if="detail.status==1"> | ||||
|                     <el-form-item label="放款金额(万)">{{ detail.auditAmount }}</el-form-item> | ||||
|                     <el-form-item label="放款日期">{{ detail.loanDate }}</el-form-item> | ||||
|                     <el-form-item label="实际使用期限">{{ dict.getLabel('productRepaymentTimeline', detail.auditLifespan) }} | ||||
|                     </el-form-item> | ||||
|                   </template> | ||||
|                   <el-form-item label="操作时间">{{ detail.auditTime }}</el-form-item> | ||||
|                 </el-row> | ||||
|                 <el-row> | ||||
|                   <el-form-item v-if="detail.status==2" label="备注">{{ detail.auditDescription }}</el-form-item> | ||||
|                 </el-row> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|           </template> | ||||
|         </el-form> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
| @@ -81,16 +145,26 @@ | ||||
|           <ai-select v-model="form.auditStatus" :selectList="dict.getDict('enterpriseAuditStatus')"/> | ||||
|         </el-form-item> | ||||
|         <template v-if="form.auditStatus==1"> | ||||
|           <el-form-item label="放款金额(万)" prop="amount"> | ||||
|             <el-input v-model="form.amount" placeholder="请输入"/> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="使用期限" prop="auditLifespan"> | ||||
|             <ai-select v-model="form.auditLifespan" placeholder="请选择" | ||||
|                        :selectList="dict.getDict('productRepaymentTimeline')"/> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="放款日期" prop="loanDate"> | ||||
|             <el-date-picker v-model="form.loanDate" placeholder="请选择" clearable value-format="yyyy-MM-dd"/> | ||||
|           </el-form-item> | ||||
|           <template v-if="isGuaranteeProduct"> | ||||
|             <el-form-item label="担保日期" prop="loanDate"> | ||||
|               <el-date-picker v-model="form.loanDate" placeholder="请选择" clearable value-format="yyyy-MM-dd"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="审批意见"> | ||||
|               <el-input type="textarea" v-model="form.auditDescription" placeholder="请输入" maxlength="200" show-word-limit/> | ||||
|             </el-form-item> | ||||
|           </template> | ||||
|           <template v-else> | ||||
|             <el-form-item label="放款金额(万)" prop="amount"> | ||||
|               <el-input v-model="form.amount" placeholder="请输入"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="使用期限" prop="auditLifespan"> | ||||
|               <ai-select v-model="form.auditLifespan" placeholder="请选择" | ||||
|                          :selectList="dict.getDict('productRepaymentTimeline')"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="放款日期" prop="loanDate"> | ||||
|               <el-date-picker v-model="form.loanDate" placeholder="请选择" clearable value-format="yyyy-MM-dd"/> | ||||
|             </el-form-item> | ||||
|           </template> | ||||
|         </template> | ||||
|         <el-form-item v-else-if="form.auditStatus==2" label="审批意见" prop="auditDescription"> | ||||
|           <el-input type="textarea" v-model="form.auditDescription" placeholder="请输入" maxlength="200" show-word-limit/> | ||||
| @@ -120,7 +194,8 @@ export default { | ||||
|     }, | ||||
|     isAuthing() { | ||||
|       return this.detail.status == "0" | ||||
|     } | ||||
|     }, | ||||
|     isGuaranteeProduct: v => v.detail.organizationType == 2 | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
| @@ -134,7 +209,7 @@ export default { | ||||
|           {pattern: /\d+/, message: "请输入 正确的放款金额"}, | ||||
|         ], | ||||
|         auditLifespan: [{required: true, message: "请选择 使用期限"}], | ||||
|         loanDate: [{required: true, message: "请选择 放款日期"}], | ||||
|         loanDate: [{required: true, message: "请选择 日期"}], | ||||
|         auditDescription: [{required: true, message: "请输入 审批意见"}], | ||||
|       }, | ||||
|       personCR: false | ||||
| @@ -194,5 +269,10 @@ export default { | ||||
|   .el-date-editor { | ||||
|     width: 100%; | ||||
|   } | ||||
|  | ||||
|   .thumb { | ||||
|     width: 320px; | ||||
|     height: 180px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -26,6 +26,17 @@ | ||||
|                 </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="expand" type="expand"> | ||||
|                     <template slot-scope="{row}"> | ||||
|                       <ai-wrapper> | ||||
|                         <ai-info-item labelWidth="200px" v-for="op in desConfigs(row)" :key="op.prop" v-bind="op"> | ||||
|                           <custom-render v-if="op.render" :row="row" :render="op.render"/> | ||||
|                           <p v-else-if="op.dict" v-text="dict.getLabel(op.dict,row[op.prop])"/> | ||||
|                           <p v-else v-text="row[op.prop]"/> | ||||
|                         </ai-info-item> | ||||
|                       </ai-wrapper> | ||||
|                     </template> | ||||
|                   </el-table-column> | ||||
|                   <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|                     <template slot-scope="{row}"> | ||||
|                       <el-button type="text" @click="showDetail(row.id)">详情</el-button> | ||||
| @@ -50,7 +61,19 @@ import LoanSta from "./loanSta"; | ||||
|  | ||||
| export default { | ||||
|   name: "loanList", | ||||
|   components: {LoanSta}, | ||||
|   components: { | ||||
|     LoanSta, | ||||
|     customRender: { | ||||
|       props: { | ||||
|         row: Object, | ||||
|         render: Function | ||||
|       }, | ||||
|       render(h) { | ||||
|         const {row, render} = this.$props | ||||
|         return render(h, {row}) | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
| @@ -60,15 +83,12 @@ export default { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {slot: "expand"}, | ||||
|         {label: "产品名称", prop: "productName"}, | ||||
|         {label: "企业主体", prop: "enterpriseName"}, | ||||
|         {label: "申请时间", prop: "createTime", width: 160}, | ||||
|         {label: "联系人", prop: "name"}, | ||||
|         {label: "联系方式", prop: "phone"}, | ||||
|         {label: "身份证号", render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber)), width: 160}, | ||||
|         {label: "企业主体", prop: "enterpriseName"}, | ||||
|         {label: "贷款金额(万)", prop: "loanAmount"}, | ||||
|         {label: "申请时间", prop: "createTime", width: 160}, | ||||
|         {label: "贷款机构", prop: "organizationName"}, | ||||
|         {label: "机构类型", prop: "organizationType", dict: "financialOrganizationType"}, | ||||
|         {label: "状态", prop: "status", align: "center", dict: "financialLoanApplyStatus"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
| @@ -102,6 +122,22 @@ export default { | ||||
|       this.search.applyEndDate = this.search.applyTime?.[1].substring(0, 10) | ||||
|       this.getTableData() | ||||
|     }, | ||||
|     desConfigs(row) { | ||||
|       let ops = [] | ||||
|       if (row.organizationType == 2) {//担保产品 | ||||
|         ops = [ | ||||
|           {label: "担保机构", prop: "organizationName"}, | ||||
|         ] | ||||
|       } else {//金融产品 | ||||
|         ops = [ | ||||
|           {label: "身份证号", render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber)), width: 160}, | ||||
|           {label: "贷款金额(万)", prop: "loanAmount"}, | ||||
|           {label: "贷款机构", prop: "organizationName"}, | ||||
|           {label: "机构类型", prop: "organizationType", dict: "financialOrganizationType"}, | ||||
|         ] | ||||
|       } | ||||
|       return ops | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load('financialLoanApplyStatus') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user