wq před 5 roky
rodič
revize
b20b174f49

+ 59 - 0
src/layout/common/followztInfo.vue

@@ -0,0 +1,59 @@
+<template>
+    <div id="followztInfo">
+        <el-row>
+            <el-col :span="24" class="info">
+                <el-col :span="12">
+                    <span>筛选条件:</span>
+                    <el-select v-model="region" >
+                        <el-option label="接单" value="0"></el-option>
+                        <el-option label="审批" value="2"></el-option>
+                        <el-option label="拒绝" value="3"></el-option>
+                    </el-select>
+                </el-col>
+                <el-col :span="5" class="btn">
+                    <el-button type="primary" @click="clickBtn()" >查询</el-button>
+                </el-col>
+            </el-col>
+        </el-row>
+    </div>
+</template>
+
+<script>
+  export default {
+    name: 'followztInfo',
+    props: {},
+    components: {},
+    data: () => ({
+      region: '',
+    }),
+    created() {},
+    computed: {},
+    methods: {
+      clickBtn() {
+        this.$emit('clickBtn',this.region);
+      },
+    },
+  };
+</script>
+
+<style lang="less" scoped>
+    .info {
+        padding: 15px 0;
+    }
+    .info .input {
+        padding: 6px 0;
+    }
+    .info .btn {
+        text-align: center;
+    }
+
+    /deep/.el-button {
+        color: #fff;
+        background-color: red;
+        border-color: red;
+    }
+    /deep/.el-input__inner {
+        height: 30px;
+        line-height: 30px;
+    }
+</style>

+ 6 - 12
src/layout/follow/followForm.vue

@@ -25,13 +25,10 @@
                         <el-link :href="ruleForm[0].cdata" :underline="false">{{ruleForm[0].cdata}}</el-link>
                     </el-form-item>
                     <el-form-item v-if="orcredit == 0 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">审</el-button>
+                        <el-button  type="primary" size="small" @click="shouxin()">审</el-button>
                     </el-form-item>
-                    <el-form-item v-if="orcredit == 2 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">尽调</el-button>
-                    </el-form-item>
-                    <el-form-item  v-if="orcredit == 3 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">授信</el-button>
+                    <el-form-item  v-if="orcredit == 2 ">
+                        <el-button  type="primary" size="small" @click="shouxin()">放款</el-button>
                     </el-form-item>
                 </el-form>
                 <!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
@@ -67,13 +64,10 @@
                         <span>{{ruleForm[0].jgpronew.claims_min_term}}个月~{{ruleForm[0].jgpronew.claims_max_term}}个月</span>
                     </el-form-item>
                     <el-form-item v-if="orcredit == 0 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">审核</el-button>
-                    </el-form-item>
-                    <el-form-item v-if="orcredit == 2 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">尽调</el-button>
+                        <el-button  type="primary" size="small" @click="shouxin()">审批</el-button>
                     </el-form-item>
-                    <el-form-item  v-if="orcredit == 3 ">
-                        <el-button  type="primary" size="small" @click="shouxin()">授信</el-button>
+                    <el-form-item  v-if="orcredit == 2 ">
+                        <el-button  type="primary" size="small" @click="shouxin()">放款</el-button>
                     </el-form-item>
                 </el-form>
             </el-col>

+ 2 - 2
src/layout/follow/followList.vue

@@ -8,7 +8,7 @@
                     <el-table-column property="clamnew.use" label="融资用途" align="center"> </el-table-column>
                     <el-table-column   label="当前状态" align="center">
                         <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.orcredit=='0'?'已关注':scope.row.orcredit=='2'?'已审核':scope.row.orcredit=='3'?'已尽调': ' '}}</span>
+                            <span style="margin-left: 10px">{{ scope.row.orcredit=='0'?'已接单':scope.row.orcredit=='2'?'已审批':scope.row.orcredit=='3'?'已拒绝': ' '}}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="期望利率范围" align="center">
@@ -19,7 +19,7 @@
                     <el-table-column fixed="right" label="操作" align="center">
                         <template slot-scope="scope">
                             <el-button @click="$router.push({ path: '/follow/followDetail', query: { id: scope.row.clamnew._id ,sxid:scope.row._id,orcredit:scope.row.orcredit} })" type="text" icon="el-icon-search" title="查看详情"></el-button>
-                            <el-button @click.prevent="deleteRow(scope.row._id)" type="text" icon="el-icon-star-on" title="取消关注"></el-button>
+                            <el-button @click.prevent="deleteRow(scope.row._id)" type="text" icon="el-icon-warning-outline" title="拒绝"></el-button>
                         </template>
                     </el-table-column>
                 </el-table>

+ 12 - 4
src/views/businessneed/claim.vue

@@ -93,9 +93,18 @@ export default {
       this.dialogFormVisible=false;
     },
     //指派
-    zhipai(valid){
+    async zhipai(valid){
       this.zpid = valid;
-      this.dialogFormVisible=true;
+      let userid = this.user.userid;
+      const res = await this.beforFollow({finceId:valid,userid:userid});
+      if(res.data.finstatus=='SUCCESS') {
+        this.$message({
+          message: '您已分配过该需求',
+          type: 'success',
+        });
+      }else{
+        this.dialogFormVisible=true;
+      }
     },
     async zhipaiformBtn({data}){
       let finceId=this.zpid;
@@ -107,7 +116,6 @@ export default {
           message: '您已分配成功',
           type: 'success',
         });
-        this.$router.replace("/follow/followindex");
       }else{
         const followres = await this.followclaim({finceId:finceId,userid:userid,uuid:uuid});
         if(followres.errcode===0){
@@ -115,7 +123,6 @@ export default {
             message: '分配成功',
             type: 'success',
           });
-          this.$router.replace("/follow/followindex");
         }else{
           this.$message({
             message: '分配失败',
@@ -123,6 +130,7 @@ export default {
           });
         }
       }
+      this.dialogFormVisible=false;
     },
   },
 };

+ 0 - 2
src/views/businessneed/claimDetail.vue

@@ -103,7 +103,6 @@
             message: '您已分配成功',
             type: 'success',
           });
-          this.$router.replace("/follow/followindex");
         }else{
         const followres = await this.followclaim({finceId:finceId,userid:userid,uuid:uuid});
         if(followres.errcode===0){
@@ -111,7 +110,6 @@
             message: '分配成功',
             type: 'success',
           });
-          this.$router.replace("/follow/followindex");
         }else{
          this.$message({
             message: '分配失败',

+ 6 - 19
src/views/follow/followDetail.vue

@@ -72,7 +72,7 @@
       // 授信
       async shouxin() {
           if(this.orcredit==0){
-            this.$prompt('请输审信息', '提示', {
+            this.$prompt('请输审信息', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消'
             })
@@ -85,19 +85,6 @@
               });
             });
           }else if(this.orcredit==2){
-            this.$prompt('请输尽调信息', '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消'
-            })
-              .then(({ value }) => {
-                this.finaljindiao(value);
-              }).catch(() => {
-              this.$message({
-                type: 'info',
-                message: '取消输入'
-              });
-            });
-          }else if(this.orcredit==3){
             this.$prompt('请输入授信额度(万元)', '提示', {
               confirmButtonText: '确定',
               cancelButtonText: '取消',
@@ -124,11 +111,11 @@
         this.$checkRes(res, '审核成功', '审核失败');
         this.goBack();
       },
-      async finaljindiao(value){
-        const res = await this.credit({id:this.sxid,jindiaomessage:value,orcredit:'3'});
-        this.$checkRes(res, '尽调成功', '尽调失败');
-        this.goBack();
-      },
+      // async finaljindiao(value){
+      //   const res = await this.credit({id:this.sxid,jindiaomessage:value,orcredit:'3'});
+      //   this.$checkRes(res, '尽调成功', '尽调失败');
+      //   this.goBack();
+      // },
       // 返回
       goBack() {
         this.$router.go(-1);

+ 24 - 11
src/views/follow/followindex.vue

@@ -4,6 +4,9 @@
             <el-col :span="24" class="top">
                 <topInfo :topTitle="topTitle" :display="display" ></topInfo>
             </el-col>
+            <el-col :span="24" class="search">
+                <searchInfo @clickBtn="clickBtn"></searchInfo>
+            </el-col>
             <el-col :span="24" class="main">
                 <followList :debtTable="debtTable" :total="total" @pagechange="pagechange" @deleteRow="deleteRow"></followList>
             </el-col>
@@ -14,6 +17,7 @@
 <script>
   import topInfo from '@/layout/common/topInfo.vue';
   import followList from '@/layout/follow/followList.vue';
+  import searchInfo from '@/layout/common/followztInfo.vue';
   import { createNamespacedHelpers, mapGetters,mapState } from 'vuex';
   const { mapActions: financefollow } = createNamespacedHelpers('follow');
   export default {
@@ -22,13 +26,15 @@
     components: {
       topInfo, //头部导航
       followList, //债权需求列表
+      searchInfo,
     },
     data: () => ({
       topTitle: '授信债权需求',
       display: 'none',
       debtTable: [],
       total: '',
-      jgpro: '0'
+      jgpro: '0',
+      orcredit:'SUCC'
     }),
     created() {
       this.followList();
@@ -38,34 +44,41 @@
     },
     methods: {
       ...financefollow(['credit','followlist','delete']),
-      async followList({ skip = 1, limit = 10,userid =this.user.userid,finceType=this.jgpro} = {}) {
+      async followList({ skip = 1, limit = 10,userid =this.user.uid,finceType=this.jgpro} = {}) {
         const res = await this.followlist({ skip, limit,userid, finceType});
         this.$set(this, `debtTable`, res.res);
         this.$set(this, `total`, res.total);
       },
       // 删除
       async deleteRow(id) {
-        const res = await this.delete(id);
-        this.$checkRes(res, '取消关注成功', '取消关注失败');
-       this.followList();
+        const res = await this.credit({id:id,orcredit:'3'});
+        this.$checkRes(res, '拒绝成功', '拒绝失败');
+        this.followList();
 
       },
       async pagechange(data) {
         var skip = data.skip;
         var limit = 10;
-        var userid = this.user.userid;
+        var userid = this.user.uid;
         var finceType = this.jgpro;
-        const res = await this.followlist({ skip, limit,userid,finceType });
+        var res;
+        if(this.orcredit=='SUCC'){
+           res = await this.followlist({ skip, limit,userid,finceType });
+        }else{
+          var finalorc = this.orcredit;
+           res = await this.followlist({ skip, limit,userid,finceType,finalorc});
+        }
         this.$set(this, `debtTable`, res.res);
         this.$set(this, `total`, res.total);
       },
       async clickBtn(message) {//查询
-        this.jgpro = message;
+        this.orcredit = message;
         var skip = 0;
         var limit =10;
-        var userid =this.user.userid;
-        var finceType =message;
-        const res = await this.followlist({ skip, limit,userid,finceType });
+        var userid =this.user.uid;
+        var finceType = this.jgpro;
+        var finalorc = message;
+        const res = await this.followlist({ skip, limit,userid,finceType,finalorc });
         this.$set(this, `debtTable`, res.res);
         this.$set(this, `total`, res.total);
       },