guhongwei há 5 anos atrás
pai
commit
3871582f43

+ 62 - 0
src/layout/financeclaims/financeClaimInfo.vue

@@ -0,0 +1,62 @@
+<template>
+    <div id="needSearchInfo">
+        <el-row>
+            <el-col :span="24" >
+                <el-col :span="5">
+                    <span>产品名称:</span>
+                    <el-input v-model="name" placeholder="请输入产品名称" class="input"></el-input>
+                </el-col>
+                <el-col :span="5">
+                    <span>机构名称:</span>
+                    <el-input v-model="innewname" placeholder="请输入机构名称" class="input"></el-input>
+                </el-col>
+                <el-col :span="8" class="btn">
+                    <el-button class="btnSearch" @click="clickBtn()" >查询</el-button>
+                </el-col>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+  export default {
+    name: 'needSearchInfo',
+    props: {},
+    components: {},
+    data: () => ({
+      innewname: '',
+      name:''
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      clickBtn() {
+        let finaldata = {};
+        finaldata.innewname=this.innewname;
+        finaldata.name=this.name;
+        this.$emit('clickBtn',finaldata);
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+    .input {
+        width: 150px;
+    }
+    /deep/.el-input__inner {
+        height: 35px;
+        line-height: 35px;
+    }
+    .btnSearch {
+        width: 80px;
+        height: 34px;
+        background: rgba(233, 2, 29, 1);
+        border-radius: 4px;
+        padding: 0;
+        color: #fff;
+    }
+    .qing {
+        background: rgba(185, 185, 185, 1);
+    }
+</style>

+ 121 - 0
src/layout/financeclaims/financeLookClaimsForm.vue

@@ -0,0 +1,121 @@
+<template>
+    <div id="financeLookClaimsForm">
+        <el-row>
+            <el-col :span="24" class="form">
+                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+                    <el-col :span="24">
+                        <el-form-item label="产品名称" prop="name">
+                            <el-input disabled v-model="ruleForm.name" placeholder="请输入产品名称"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="利率范围" prop="mongey_min_rate">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.mongey_min_rate" placeholder="利率范围(小)"></el-input>%~
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item prop="mongey_max_rate" class="formItem">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.mongey_max_rate" placeholder="利率范围(大)"></el-input>%
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="贷款期限(月)" prop="claims_min_term">
+                            <el-input  disabled class="mongeyrate" v-model="ruleForm.claims_min_term" placeholder="贷款期限(小)"></el-input>~
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item prop="claims_max_term" class="formItem">
+                            <el-input  disabled class="mongeyrate" v-model="ruleForm.claims_max_term" placeholder="贷款期限(大)"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="贷款额度(万元)" prop="claims_min_money" >
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.claims_min_money" placeholder="贷款额度(小)"></el-input>~
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item prop="claims_max_money" class="formItem">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.claims_max_money" placeholder="贷款额度(大)"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="24">
+                        <el-form-item label="担保方式" prop="ensure_id">
+                            <el-select disabled v-model="ruleForm.ensure_id" placeholder="请选择担保方式">
+                                <el-option v-for="(item, index) in dbList" :key="index" :label="item.name" :value="item.code"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="还款方式" prop="repayment_id">
+                            <el-select disabled v-model="ruleForm.repayment_id" placeholder="请选择还款方式">
+                                <el-option v-for="(item, index) in hkList" :key="index" :label="item.name" :value="item.code"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="简介名称">
+                            <el-input disabled v-model="ruleForm.news[0].news_name" placeholder="请输入简介名称"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="简介内容">
+                            <el-input disabled type="textarea" v-model="ruleForm.news[0].news_info" placeholder="请输入简介内容"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24" class="btn">
+                        <el-button size="small" v-if="ruleForm.top==0" @click="toTop('ruleForm')" >推荐</el-button>
+                        <el-button size="small" v-if="ruleForm.top==1" @click="toTop('ruleForm')" >取消推荐</el-button>
+                        <el-button type="primary" v-if="ruleForm.status=='0'" size="small" @click="changStatus('ruleForm')">审核</el-button>
+                        <el-button type="primary" v-if="ruleForm.status=='1'" size="small" @click="changStatus('ruleForm')">取消审核</el-button>
+                    </el-col>
+                </el-form>
+            </el-col>
+        </el-row>
+    </div>
+    <!--:disabled="isAble"-->
+</template>
+
+<script>
+  export default {
+    name: 'financeLookClaimsForm',
+    props: {
+      ruleForm: null,
+      hkList: null,
+      dbList: null,
+    },
+    components: {},
+    data: () => ({
+
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      toTop() {
+        this.$emit('toTop', { data: this.ruleForm });
+      },
+      changStatus() {
+        this.$emit('changStatus', { data: this.ruleForm });
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+    .form {
+        padding: 0 200px 0 0;
+    }
+    .mongeyrate {
+        width: 95%;
+    }
+    /deep/.formItem .el-form-item__content {
+        margin-left: 0 !important;
+    }
+    .btn {
+        text-align: center;
+        padding: 30px 0;
+    }
+</style>

+ 72 - 0
src/layout/financeclaims/financeclaimsList.vue

@@ -0,0 +1,72 @@
+<template>
+    <div id="claimList">
+        <el-row>
+            <el-col :span="24">
+                <el-table ref="debtTable" :data="debtTable" style="width: 100%" border>
+                    <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+                    <el-table-column property="name" label="产品名称" align="center"> </el-table-column>
+                    <el-table-column property="innewname" label="机构名称" align="center"> </el-table-column>
+                    <el-table-column label="利率范围" align="center">
+                        <template slot-scope="scope">
+                            <span style="margin-left: 10px">{{ scope.row.mongey_min_rate }}%~{{ scope.row.mongey_max_rate }}%</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column fixed="right" label="操作" align="center">
+                        <template slot-scope="scope">
+                            <el-button @click="$router.push({ path: '/financeclaims/financeLookClaimDetail', query: { id: scope.row._id } })" type="text" icon="el-icon-search" title="查看详情"></el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-row class="page">
+                    <el-pagination
+                            @size-change="handleSizeChange"
+                            @current-change="handleCurrentChange"
+                            :current-page="currentPage"
+                            :page-size="10"
+                            layout="total, prev, pager, next, jumper"
+                            :total="total"
+                    >
+                    </el-pagination>
+                </el-row>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+  export default {
+    name: 'claimList',
+    props: {
+      debtTable: null,
+      total: null,
+    },
+    components: {},
+    data: () => ({
+      currentPage: 1,
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      deleteRow(id) {
+        this.$emit('deleteRow', id);
+      },
+      clickRest(id) {
+        this.$emit('clickRest', id);
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`);
+      },
+      handleCurrentChange(val) {
+        this.$emit('pagechange', { skip: val});
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+    .page {
+        text-align: center;
+        padding: 15px 0;
+    }
+
+</style>

+ 13 - 0
src/layout/layout-part/menus.vue

@@ -64,6 +64,19 @@
       <el-menu-item index="/zhidao/index"> <i class="el-icon-s-grid"></i>指导单位管理</el-menu-item>
       <el-menu-item index="/news/index"> <i class="el-icon-s-grid"></i>新闻中心管理</el-menu-item>
       <el-menu-item index="/companyup/index"> <i class="el-icon-s-grid"></i>企业修改信息审核管理</el-menu-item>
+      <el-submenu index="6">
+        <template v-slot:title>
+          <i class="el-icon-s-grid"></i>
+          <span>金融数字超市</span>
+        </template>
+        <el-menu-item-group>
+          <el-menu-item index="/financeclaims/financeClaimIndex">债权产品管理</el-menu-item>
+          <el-menu-item index="/institution/index/1">股权信息</el-menu-item>
+        </el-menu-item-group>
+      </el-submenu>
+      <el-menu-item index="/zhidao/index"> <i class="el-icon-s-grid"></i>指导单位管理</el-menu-item>
+      <el-menu-item index="/news/index"> <i class="el-icon-s-grid"></i>新闻中心管理</el-menu-item>
+      <el-menu-item index="/companyup/index"> <i class="el-icon-s-grid"></i>企业信息管理</el-menu-item>
       <el-menu-item index="/companyidentify/index"> <i class="el-icon-s-grid"></i>企业认证管理</el-menu-item>
       <el-menu-item index="/character/index"> <i class="el-icon-s-grid"></i>角色管理</el-menu-item>
       <el-menu-item index="/region/index"> <i class="el-icon-s-grid"></i>地区管理</el-menu-item>

+ 10 - 1
src/router/index.js

@@ -201,7 +201,16 @@ const routes = [
     path: '/tDeclarationApproval/detail',
     component: () => import('../views/tDeclarationApproval/detail.vue'),
   },
-
+  // 债权产品列表
+  {
+    path: '/financeclaims/financeClaimIndex',
+    component: () => import('../views/financeclaims/financeClaimIndex.vue'),
+  },
+  // 债权产品信息详情
+  {
+    path: '/financeclaims/financeLookClaimDetail',
+    component: () => import('../views/financeclaims/financeLookClaimDetail.vue'),
+  },
   {
     path: '/login',
     name: 'login',

+ 51 - 0
src/store/financeclaim.js

@@ -0,0 +1,51 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  financeclaimInfo: `/api/financial/financeclaims`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.financeclaimInfo}`, payload);
+    return res;
+  },
+  async fclaimsList({ commit }, payload) {// 债券产品列表
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/claimsList`, payload);
+    return res;
+  },
+  async orUpdate({ commit }, payload) {// 修改前要请求的接口
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/orUpdate`,payload);
+    return res;
+  },
+  async one({ commit }, payload) {// 详情
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/one`,payload);
+    return res;
+  },
+  async publish({ commit }, payload) {// 发布(审核)
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/publish`,payload);
+    return res;
+  },
+  async dupdate({ commit }, { id, ...data }) {//逻辑删除
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/update/${id}`, data);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.financeclaimInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.financeclaimInfo}/update/${id}`, data);
+    return res;
+  },
+
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 2 - 0
src/store/index.js

@@ -18,6 +18,7 @@ import tNewsCenter from './tNewsCenter';
 import tPolicyInterpretation from './tPolicyInterpretation';
 import dictionary from './dictionary';
 import login from './login';
+import financeclaim from './financeclaim';
 import * as muta from './user/mutations';
 import * as states from './user/state';
 
@@ -43,6 +44,7 @@ export default new Vuex.Store({
     tPolicyInterpretation,
     login,
     dictionary,
+    financeclaim,
   },
   state: { ...states },
   mutations: { ...muta },

+ 93 - 0
src/views/financeclaims/financeClaimIndex.vue

@@ -0,0 +1,93 @@
+<template>
+  <div id="financeClaimIndex">
+    <el-col :span="24" class="debt">
+      <el-col :span="24" class="top">
+        <topInfo :topTitle="topTitle" :display="display" ></topInfo>
+      </el-col>
+      <el-col :span="24" class="search">
+        <financeClaimIndexInfo @clickBtn="clickBtn"></financeClaimIndexInfo>
+      </el-col>
+      <el-col :span="24" class="main">
+        <financeclaimsList :debtTable="debtTable" :total="total" @pagechange="pagechange" ></financeclaimsList>
+      </el-col>
+    </el-col>
+  </div>
+</template>
+
+<script>
+import topInfo from '@/layout/common/detailTopInfo.vue';
+import financeClaimIndexInfo from '@/layout/financeclaims/financeClaimInfo.vue';
+import financeclaimsList from '@/layout/financeclaims/financeclaimsList.vue';
+import { createNamespacedHelpers, mapGetters } from 'vuex';
+const { mapActions: financeclaims } = createNamespacedHelpers('financeclaim');
+export default {
+  name: 'financeClaimIndex',
+  props: {},
+  components: {
+    topInfo, //头部导航
+    financeClaimIndexInfo, //搜素
+    financeclaimsList, //债权产品列表
+  },
+  data: () => ({
+    topTitle: '债权产品列表',
+    display: 'none',
+    debtTable: [],
+    total: '',
+    cpname: '',
+    jgname:''
+
+  }),
+  created() {
+    this.financeclaimsList();
+  },
+  computed: {},
+  methods: {
+    ...financeclaims(['fclaimsList', 'orUpdate', 'one', 'dupdate','fetch','update']),
+    async financeclaimsList({ skip = 1, limit = 10,type=0} = {}) {
+      const res = await this.fclaimsList({ skip, limit ,type});
+      this.$set(this, `debtTable`, res.res);
+      this.$set(this, `total`, res.total);
+    },
+    async pagechange(data) {
+      var skip = data.skip;
+      var limit = 10;
+      var innewname=this.jgname;
+      var name = this.cpname ;
+   //   var  uid = '5e79672d0217a7336048b4c5' ;
+      var type=0;
+      const res = await this.fclaimsList({ skip, limit ,type,innewname,name});
+      this.$set(this, `debtTable`, res.res);
+      this.$set(this, `total`, res.total);
+    },
+    //查询
+    async clickBtn(data) {
+      var innewname=data.innewname;
+      var name = data.name;
+      this.cpname = data.name;
+      this.jgname = data.innewname;
+      var skip = 0;
+      var limit = 10;
+     // var  uid = '5e79672d0217a7336048b4c5' ;
+      var type=0;
+      const res = await this.fclaimsList({ skip, limit ,type,innewname,name});
+      this.$set(this, `debtTable`, res.res);
+      this.$set(this, `total`, res.total);
+    },
+
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.debt {
+  padding: 20px;
+}
+.top {
+  border-bottom: 1px solid #ccc;
+}
+.search {
+        width: 97%;
+        height: 35px;
+        margin: 20px;
+}
+</style>

+ 156 - 0
src/views/financeclaims/financeLookClaimDetail.vue

@@ -0,0 +1,156 @@
+<template>
+    <div id="financeLookClaimDetail">
+        <el-row>
+            <el-col :span="24" class="debt">
+                <el-col :span="24" class="top">
+                    <topInfo :topTitle="topTitle" :display="display"></topInfo>
+                </el-col>
+                <el-col :span="24" class="main">
+                    <el-col :span="24" class="back">
+                        <detailTop @goBack="goBack"></detailTop>
+                    </el-col>
+                    <el-col :span="24" class="info">
+                        <financeClaimsForm :ruleForm="ruleForm" :dbList="dbList" :hkList="hkList" @toTop="toTop" @changStatus="changStatus"></financeClaimsForm>
+                    </el-col>
+                </el-col>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+  import topInfo from '@/layout/common/detailTopInfo.vue';
+  import detailTop from '@/layout/common/detailTop.vue';
+  import financeClaimsForm from '@/layout/financeclaims/financeLookClaimsForm.vue';
+  import { createNamespacedHelpers, mapGetters } from 'vuex';
+  const { mapActions: financeclaims } = createNamespacedHelpers('financeclaim');
+  export default {
+    name: 'financeLookClaimDetail',
+    props: {},
+    components: {
+      topInfo, //头部导航
+      detailTop, //头部返回
+      financeClaimsForm, //债权产品详情
+    },
+    data: () => ({
+      display: 'none',
+      topTitle: '债权产品信息',
+      ruleForm: {
+        news: [
+          {
+            news_name: '',
+            news_info: '',
+          },
+        ],
+      },
+      dbList: [
+        { name: '担保1', code: '2201' },
+        { name: '担保2', code: '2202' },
+        { name: '担保3', code: '2203' },
+      ],
+      hkList: [
+        { name: '还款1', code: '2301' },
+        { name: '还款2', code: '2302' },
+        { name: '还款3', code: '2303' },
+      ],
+    }),
+    created() {
+      this.searchInfo();
+    },
+    computed: {
+      id() {
+        return this.$route.query.id;
+      },
+    },
+    methods: {
+      ...financeclaims(['fclaimsList', 'orUpdate', 'dupdate', 'create','fetch','update','publish']),
+      async searchInfo() {
+        if (this.id) {
+          const res = await this.fetch(this.id);
+          this.$set(this, `ruleForm`, res.data);
+        }
+      },
+      async toTop({data}) {
+        let res;
+        let finaldata;
+        if(data.top==0){
+          finaldata=data;
+          finaldata.top=1;
+          res = await this.update(finaldata);
+          if (res.errcode === 0) {
+            this.$message({
+              message: '信息推荐成功',
+              type: 'success',
+            });
+          }else{
+            this.$message({
+              message: '信息推荐失败',
+              type: 'error',
+            });
+          }
+        }else{
+          finaldata=data;
+          finaldata.top=0;
+          res = await this.update(finaldata);
+          if (res.errcode === 0) {
+            this.$message({
+              message: '信息取消推荐成功',
+              type: 'success',
+            });
+          }else{
+            this.$message({
+              message: '信息取消推荐失败',
+              type: 'error',
+            });
+          }
+        }
+        this.searchInfo();
+      },
+      async changStatus({data}){
+            let finaldata={};
+            let res;
+            finaldata.finid = data.id;
+            finaldata.userid='测试ID852784956285296352';
+            if(data.status=='0'){
+              finaldata.publish='1';
+            }else{
+              finaldata.publish='0';
+            }
+            res = await this.publish(finaldata);
+            if(res.status='SUCCESS'){
+              this.$message({
+                message: '审核相关操作成功',
+                type: 'success',
+              });
+            }else{
+              this.$message({
+                message: '审核相关操作失败',
+                type: 'error',
+              });
+            }
+        this.searchInfo();
+      },
+      // 返回
+      goBack() {
+        this.$router.go(-1);
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+    .debt {
+        padding: 20px;
+    }
+    .top {
+        border-bottom: 1px solid #ccc;
+    }
+    .main {
+        border-radius: 10px;
+        margin: 20px 0 0 0;
+        box-shadow: 0 0 3px #666;
+    }
+    .main .back {
+        padding: 10px 0 10px 15px;
+    }
+</style>