wq 5 年之前
父節點
當前提交
9772a34fc4

+ 88 - 0
src/layout/financeclaims/manageLookMoneyForm.vue

@@ -0,0 +1,88 @@
+
+<template>
+    <div id="manageLookMoneyForm">
+        <el-row>
+            <el-col :span="24" class="form">
+                <el-form :model="ruleForm"  ref="ruleForm" label-width="120px" class="demo-ruleForm">
+                    <el-col :span="24">
+                        <el-form-item label="产品名称" prop="title">
+                            <el-input disabled v-model="ruleForm.title" placeholder="请输入产品名称"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="收益率" prop="rate">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.rate" placeholder="收益率"></el-input>%
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="产品期限(个月)" prop="min_time">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.min_time" placeholder="产品期限(小)"></el-input>~
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                        <el-form-item prop="max_time" class="formItem">
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.max_time" placeholder="产品期限(大)"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                        <el-form-item label="起购价格(元)" prop="buymin" >
+                            <el-input disabled class="mongeyrate" v-model="ruleForm.buymin" 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" placeholder="请输入产品介绍"></el-input>
+                        </el-form-item>
+                    </el-col>
+
+                </el-form>
+            </el-col>
+        </el-row>
+    </div>
+    <!--:disabled="isAble"-->
+</template>
+
+<script>
+  export default {
+    name: 'manageMoneyForm',
+    props: {
+      ruleForm: null,
+      hkList: null,
+      dbList: null,
+    },
+    components: {},
+    data: () => ({
+
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      submitForm() {
+        this.$emit('submitForm', { data: this.ruleForm });
+      },
+      resetForm() {
+        this.$emit('resetForm');
+      },
+    },
+  };
+</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>

+ 15 - 0
src/router/index.js

@@ -104,6 +104,21 @@ const routes = [
     path: '/financeclaims/financeLookClaimDetail',
     component: () => import('../views/financeclaims/financeLookClaimDetail.vue'),
   },
+  // 理财产品列表
+  {
+    path: '/financeclaims/manageMoneyIndex',
+    component: () => import('../views/financeclaims/manageMoneyIndex.vue'),
+  },
+  //  理财产品信息修改(添加)
+  {
+    path: '/financeclaims/manageMoneyDetail',
+    component: () => import('../views/financeclaims/manageMoneyDetail.vue'),
+  },
+  //  理财产品信息详情
+  {
+    path: '/financeclaims/manageMoneyLookDetail',
+    component: () => import('../views/financeclaims/manageMoneyLookDetail.vue'),
+  },
 ];
 const router = new VueRouter({
   mode: 'history',

+ 2 - 0
src/store/index.js

@@ -10,6 +10,7 @@ import * as states from './user/state';
 import otheruser from './otheruser';
 import institution from './institution';
 import dictionary from './dictionary';
+import managemoney from './managemoney';
 
 Vue.use(Vuex);
 
@@ -23,6 +24,7 @@ export default new Vuex.Store({
     otheruser,
     institution,
     dictionary,
+    managemoney,
   },
   state: { ...states },
   mutations: { ...muta },

+ 4 - 1
src/store/managemoney.js

@@ -25,7 +25,10 @@ const actions = {
     const res = await this.$axios.$post(`${api.managemoneyInfo}/orUpdate`,payload);
     return res;
   },
-
+  async mmoneyList({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.managemoneyInfo}/mmoneyList`,payload);
+    return res;
+  },
 };
 export default {
   namespaced: true,

+ 6 - 6
src/views/financeclaims/manageMoneyIndex.vue

@@ -44,7 +44,7 @@
       ...mapState(['user']),
     },
     methods: {
-      ...managemoney([ 'mmoneyList','orUpdate']),
+      ...managemoney([ 'update','fetch','mmoneyList','orUpdate']),
       async managmoneyList({ skip = 1, limit = 10, uid = this.user.userid,type=1} = {}) {
         const res = await this.mmoneyList({ skip, limit, uid ,type});
         this.$set(this, `debtTable`, res.res);
@@ -58,24 +58,24 @@
         var skip = data.skip;
         var limit = 10;
         var innewname=this.jgname;
-        var name = this.cpname ;
+        var title = this.cpname ;
         var  uid = this.user.userid ;
         var type=1;
-        const res = await this.fclaimsList({ skip, limit, uid ,type,innewname,name});
+        const res = await this.mmoneyList({ skip, limit, uid ,type,innewname,title});
         this.$set(this, `debtTable`, res.res);
         this.$set(this, `total`, res.total);
       },
       //查询
       async clickBtn(data) {
         var innewname=data.innewname;//机构名称
-        var name = data.name;//产品名称
+        var title = data.name;//产品名称
         this.cpname = data.name;
         this.jgname = data.innewname;
         var skip = 0;
         var limit = 10;
         var  uid = this.user.userid;
         var type=1;
-        const res = await this.fclaimsList({ skip, limit, uid ,type,innewname,name});
+        const res = await this.mmoneyList({ skip, limit, uid ,type,innewname,title});
         this.$set(this, `debtTable`, res.res);
         this.$set(this, `total`, res.total);
       },
@@ -98,7 +98,7 @@
             type: 'error',
           });
         }
-        this.financeclaimsList();
+        this.managmoneyList();
       }
     },
   };

+ 81 - 0
src/views/financeclaims/manageMoneyLookDetail.vue

@@ -0,0 +1,81 @@
+
+<template>
+    <div id="manageMoneyLookDetail">
+        <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">
+                        <manageMoneyForm :ruleForm="ruleForm" @submitForm="submitForm" @resetForm="resetForm"></manageMoneyForm>
+                    </el-col>
+                </el-col>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+  import topInfo from '@/layout/common/topInfo.vue';
+  import detailTop from '@/layout/common/detailTop.vue';
+  import manageMoneyForm from '@/layout/financeclaims/manageLookMoneyForm.vue';
+  import { createNamespacedHelpers, mapGetters ,mapState} from 'vuex';
+  const { mapActions: managemoney } = createNamespacedHelpers('managemoney');
+  export default {
+    name: 'manageMoneyDetail',
+    props: {},
+    components: {
+      topInfo, //头部导航
+      detailTop, //头部返回
+      manageMoneyForm, //添加理财产品
+      ...mapState(['user']),
+    },
+    data: () => ({
+      display: 'none',
+      topTitle: '债权产品信息',
+      ruleForm: {},
+    }),
+    created() {
+      this.searchInfo();
+    },
+    computed: {
+      id() {
+        return this.$route.query.id;
+      },
+    },
+    methods: {
+      ...managemoney([ 'create','fetch','update','orUpdate']),
+      async searchInfo() {
+        if (this.id) {
+          const res = await this.fetch(this.id);
+          this.$set(this, `ruleForm`, res.data);
+        }
+      },
+      // 返回
+      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>