wq 5 năm trước cách đây
mục cha
commit
ef626ea11f

+ 17 - 6
src/layout/businessneed/claimList.vue

@@ -4,6 +4,11 @@
       <el-col :span="24">
         <el-table ref="debtTable" :data="debtTable" :row-class-name="tableRowClassName" style="width: 100%" border>
           <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
+          <el-table-column label="企业名称" align="center">
+            <template slot-scope="scope">
+              <span class="hand" @click="$router.push({ path: '/businessneed/claimDetail', query: { id: scope.row.id } })">{{ scope.row.comnewname}}</span>
+            </template>
+          </el-table-column>
           <el-table-column property="money" label="融资金额(万元)" align="center"> </el-table-column>
           <el-table-column property="use" label="融资用途" align="center"> </el-table-column>
           <el-table-column label="需求状态" align="center">已推送 </el-table-column>
@@ -19,12 +24,12 @@
           </el-table-column>
           <el-table-column fixed="right" label="操作" align="center">
             <template slot-scope="scope">
-              <el-button
-                @click="$router.push({ path: '/businessneed/claimDetail', query: { id: scope.row.id } })"
-                type="text"
-                icon="el-icon-search"
-                title="查看详情"
-              ></el-button>
+              <!--<el-button-->
+                <!--@click="$router.push({ path: '/businessneed/claimDetail', query: { id: scope.row.id } })"-->
+                <!--type="text"-->
+                <!--icon="el-icon-search"-->
+                <!--title="查看详情"-->
+              <!--&gt;</el-button>-->
               <el-button @click="zhipai(scope.row.id)" type="text" icon="el-icon-s-promotion" title="分配"></el-button>
             </template>
           </el-table-column>
@@ -118,4 +123,10 @@ export default {
 /deep/.el-table  .warning-row {
   background:oldlace;
 }
+
+  .hand:hover{
+    cursor: pointer;
+    color: dodgerblue;
+    margin-left: 10px;
+  }
 </style>

+ 41 - 4
src/layout/follow/followForm.vue

@@ -25,10 +25,12 @@
             <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="large" @click="shouxin()">通过</el-button>
+            <el-button type="danger" size="large" @click="deleteRow()">拒绝</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="large" @click="shouxin()">放款</el-button>
+            <el-button type="danger" size="large" @click="deleteRow()">拒绝</el-button>
           </el-form-item>
         </el-form>
         <!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
@@ -64,14 +66,38 @@
             <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-button type="primary" size="large" @click="shouxin()">通过</el-button>
+            <el-button type="danger" size="large " @click="deleteRow()">拒绝</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="large" @click="shouxin()">放款</el-button>
+            <el-button type="danger" size="large" @click="deleteRow()">拒绝</el-button>
           </el-form-item>
         </el-form>
       </el-col>
     </el-row>
+    <el-row>
+      <el-dialog title="分配" :visible.sync="dialogFormVisible" :show-close="false" width="30%">
+        <el-form :model="dialogform">
+          <el-form-item label="放款额度" :label-width="formLabelWidth">
+            <el-input  style="width: 50%" v-model="dialogform.money" autocomplete="off"></el-input>万元
+          </el-form-item>
+          <el-form-item label="放款产品" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxcpname" autocomplete="off"></el-input>
+          </el-form-item>
+          <el-form-item label="放款期限" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxhowlong" autocomplete="off"></el-input>个月
+          </el-form-item>
+          <el-form-item label="放款利率" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxcplilue" autocomplete="off"></el-input>%
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="quxiao">取 消</el-button>
+          <el-button type="primary" @click="queding">确 定</el-button>
+        </div>
+      </el-dialog>
+    </el-row>
   </div>
 </template>
 
@@ -82,6 +108,8 @@ export default {
     ruleForm: null,
     charList: null,
     orcredit: null,
+    dialogFormVisible: null,
+    dialogform:null,
   },
   components: {},
   data: () => ({}),
@@ -91,6 +119,15 @@ export default {
     shouxin() {
       this.$emit('shouxin');
     },
+    quxiao() {
+      this.$emit('quxiao');
+    },
+    queding() {
+      this.$emit('queding', { data: this.dialogform });
+    },
+    deleteRow(){
+      this.$emit('deleteRow');
+    }
   },
 };
 </script>

+ 46 - 9
src/layout/follow/followList.vue

@@ -4,13 +4,16 @@
       <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 label="企业名称" align="center">
+            <template slot-scope="scope">
+              <span class="hand"  @click="$router.push({ path: '/follow/followDetail', query: { id: scope.row.clamnew._id, sxid: scope.row._id, orcredit: scope.row.orcredit } })">{{ scope.row.comnewname}}</span>
+            </template>
+          </el-table-column>
           <el-table-column property="clamnew.money" label="融资金额(万元)" align="center"> </el-table-column>
           <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">
@@ -20,12 +23,8 @@
           </el-table-column>
           <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 v-if="scope.row.orcredit == 0" @click.prevent="tongguosp(scope.row.orcredit,scope.row._id)" type="text" icon="el-icon-s-help" title="通过"></el-button>
+              <el-button v-if="scope.row.orcredit == 2" @click.prevent="tongguosp(scope.row.orcredit,scope.row._id)" type="text" icon="el-icon-s-check" 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>
@@ -43,6 +42,28 @@
         </el-row>
       </el-col>
     </el-row>
+    <el-row>
+      <el-dialog title="分配" :visible.sync="dialogFormVisible" :show-close="false" width="30%">
+        <el-form :model="dialogform">
+          <el-form-item label="放款额度" :label-width="formLabelWidth">
+            <el-input  style="width: 50%" v-model="dialogform.money" autocomplete="off"></el-input>万元
+          </el-form-item>
+          <el-form-item label="放款产品" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxcpname" autocomplete="off"></el-input>
+          </el-form-item>
+          <el-form-item label="放款期限" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxhowlong" autocomplete="off"></el-input>个月
+          </el-form-item>
+          <el-form-item label="放款利率" :label-width="formLabelWidth">
+            <el-input style="width: 50%" v-model="dialogform.sxcplilue" autocomplete="off"></el-input>%
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="quxiao">取 消</el-button>
+          <el-button type="primary" @click="queding">确 定</el-button>
+        </div>
+      </el-dialog>
+    </el-row>
   </div>
 </template>
 
@@ -52,6 +73,8 @@ export default {
   props: {
     debtTable: null,
     total: null,
+    dialogFormVisible: null,
+    dialogform:null,
   },
   components: {},
   data: () => ({
@@ -72,6 +95,15 @@ export default {
     handleCurrentChange(val) {
       this.$emit('pagechange', { skip: val });
     },
+    tongguosp(orcredit,followid) {
+      this.$emit('tongguosp', orcredit,followid);
+    },
+    quxiao() {
+      this.$emit('quxiao');
+    },
+    queding() {
+      this.$emit('queding', { data: this.dialogform });
+    },
   },
 };
 </script>
@@ -81,4 +113,9 @@ export default {
   text-align: center;
   padding: 15px 0;
 }
+.hand:hover{
+  cursor: pointer;
+  color: dodgerblue;
+  margin-left: 10px;
+}
 </style>

+ 0 - 1
src/views/businessneed/claim.vue

@@ -61,7 +61,6 @@ export default {
     ...claimneed(['followclaim', 'fclaim', 'one', 'beforFollow']),
     ...otheruser(['fetch', 'query']),
     async claimList({ skip = 1, limit = 10, jg_id = this.user.userid } = {}) {
-      console.log(skip+"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
       const res = await this.fclaim({ skip, limit, jg_id });
       this.$set(this, `debtTable`, res.res);
       this.$set(this, `total`, res.total);

+ 67 - 31
src/views/follow/followDetail.vue

@@ -10,7 +10,9 @@
             <detailTop @goBack="goBack"></detailTop>
           </el-col>
           <el-col :span="24" class="info">
-            <followForm :ruleForm="followForm" :orcredit="finorcredit" @shouxin="shouxin"></followForm>
+            <followForm :ruleForm="followForm" :orcredit="finorcredit" @shouxin="shouxin"
+                        :dialogFormVisible="dialogFormVisible" :dialogform="dialogform"
+                        @queding = "queding" @quxiao="quxiao" @deleteRow="deleteRow"></followForm>
           </el-col>
         </el-col>
       </el-col>
@@ -41,6 +43,8 @@ export default {
       name: '10',
     },
     finorcredit: '',
+    dialogFormVisible: false,
+    dialogform:{},
   }),
   created() {
     this.searchInfo();
@@ -72,42 +76,27 @@ export default {
     // 授信
     async shouxin() {
       if (this.orcredit == 0) {
-        this.$prompt('请输审批信息', '提示', {
+        this.$confirm('此操作将通过审批, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
-        })
-          .then(({ value }) => {
-            this.finalshenhe(value);
-          })
-          .catch(() => {
-            this.$message({
-              type: 'info',
-              message: '取消输入',
-            });
+          type: 'warning'
+        }).then(() => {
+          this.finalshenhe("审批通过");
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
           });
+        });
       } else if (this.orcredit == 2) {
-        this.$prompt('请输入授信额度(万元)', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          inputPattern: /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/,
-          inputErrorMessage: '请输入正确金额',
-        })
-          .then(({ value }) => {
-            this.finalSx(value);
-          })
-          .catch(() => {
-            this.$message({
-              type: 'info',
-              message: '取消输入',
-            });
-          });
+        this.dialogFormVisible = true;
       }
     },
-    async finalSx(value) {
-      const res = await this.credit({ id: this.sxid, money: value, orcredit: '1' });
-      this.$checkRes(res, '授信成功', '授信失败');
-      this.goBack();
-    },
+    // async finalSx(value) {
+    //   const res = await this.credit({ id: this.sxid, money: value, orcredit: '1' });
+    //   this.$checkRes(res, '授信成功', '授信失败');
+    //   this.goBack();
+    // },
     async finalshenhe(value) {
       const res = await this.credit({ id: this.sxid, senhemessage: value, orcredit: '2' });
       this.$checkRes(res, '审核成功', '审核失败');
@@ -122,6 +111,53 @@ export default {
     goBack() {
       this.$router.go(-1);
     },
+    async queding({ data }) {
+      if(!data.money){
+        alert("请输入金额");
+        return;
+      }
+      if(!data.sxcpname){
+        alert("产品名称");
+        return;
+      }
+      if(!data.sxhowlong){
+        alert("请输入产品期限");
+        return;
+      }
+      if(!data.sxcplilue){
+        alert("请输入产品利率");
+        return;
+      }
+      const res = await this.credit({ id: this.sxid,  money: data.money,sxcpname:data.sxcpname,sxhowlong:data.sxhowlong,sxcplilue:data.sxcplilue, orcredit: '1' });
+      this.$checkRes(res, '授信成功', '授信失败');
+      this.dialogform={};
+      this.dialogFormVisible = false;
+      this.$router.go(-1);
+    },
+    quxiao() {
+      this.dialogform={};
+      this.dialogFormVisible = false;
+    },
+    async deleteRow() {
+      this.$prompt('请输拒绝信息', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+      })
+        .then(({ value }) => {
+          this.jujue(value);
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消输入',
+          });
+        });
+    },
+    async jujue(value) {
+      const res = await this.credit({id:this.sxid,jindiaomessage:value,orcredit:'3'});
+      this.$checkRes(res, '拒绝成功', '拒绝失败');
+      this.$router.go(-1);
+    },
   },
 };
 </script>

+ 61 - 2
src/views/follow/followindex.vue

@@ -8,7 +8,8 @@
         <searchInfo @clickBtn="clickBtn"></searchInfo>
       </el-col>
       <el-col :span="24" class="main">
-        <followList :debtTable="debtTable" :total="total" @pagechange="pagechange" @deleteRow="deleteRow"></followList>
+        <followList :debtTable="debtTable" :total="total"  :dialogFormVisible="dialogFormVisible" :dialogform="dialogform"
+                    @queding = "queding" @tongguosp="tongguosp" @quxiao="quxiao" @pagechange="pagechange" @deleteRow="deleteRow"></followList>
       </el-col>
     </el-col>
   </div>
@@ -35,6 +36,9 @@ export default {
     total: '',
     jgpro: '0',
     orcredit: 'SUCC',
+    dialogFormVisible: false,
+    dialogform:{},
+    zhuangtaiid:'',
   }),
   created() {
     this.followList();
@@ -50,7 +54,8 @@ export default {
       this.$set(this, `total`, res.total);
     },
     // 删除
-    async deleteRow(id) {this.$prompt('请输拒绝信息', '提示', {
+    async deleteRow(id) {
+      this.$prompt('请输拒绝信息', '提示', {
       confirmButtonText: '确定',
       cancelButtonText: '取消',
     })
@@ -96,6 +101,60 @@ export default {
       this.$set(this, `debtTable`, res.res);
       this.$set(this, `total`, res.total);
     },
+    async tongguosp(orcredit,followid) {
+      this.zhuangtaiid=followid;
+      if (orcredit == 0) {
+        this.$confirm('此操作将通过审批, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.finalshenhe("审批通过");
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });
+        });
+      } else if (orcredit == 2) {
+        this.dialogFormVisible = true;
+      }
+    },
+    quxiao() {
+      this.dialogform={};
+      this.dialogFormVisible = false;
+    },
+
+    async queding({ data }) {
+      if(!data.money){
+        alert("请输入金额");
+        return;
+      }
+      if(!data.sxcpname){
+        alert("产品名称");
+        return;
+      }
+      if(!data.sxhowlong){
+        alert("请输入产品期限");
+        return;
+      }
+      if(!data.sxcplilue){
+        alert("请输入产品利率");
+        return;
+      }
+      const res = await this.credit({ id: this.zhuangtaiid, money: data.money,sxcpname:data.sxcpname,sxhowlong:data.sxhowlong,sxcplilue:data.sxcplilue, orcredit: '1' });
+      this.$checkRes(res, '授信成功', '授信失败');
+      this.dialogform={};
+      this.dialogFormVisible = false;
+      this.followList();
+    },
+
+    async finalshenhe(value) {
+      const res = await this.credit({ id: this.zhuangtaiid, senhemessage: value, orcredit: '2' });
+      this.$checkRes(res, '通过成功', '通过失败');
+      this.followList();
+    },
+
   },
 };
 </script>