Browse Source

个贷报告相关

wucl 1 year ago
parent
commit
bb9967d4a5

+ 4 - 1
src/api/modules/personal.js

@@ -23,5 +23,8 @@ export default {
    },
    allotOutward(params){
     return request.put(`personal/allot/outward`, params)
-   }
+   },
+   doRecall(params){
+    return request.get(`personal/recall/${params}`)
+  }
 }

+ 4 - 4
src/components/personalForms/houseCertificate.vue

@@ -299,9 +299,9 @@
                                                 class="postInfo-container-item"
                                             >
                                                 <el-select v-model="certificate.isPledge" placeholder="请选择" style="width:255px">
-                                                    <el-option  label="否" value="NO">否</el-option>
-                                                    <el-option  label="向同一抵押权人申请续期贷款" value="SAME">向同一抵押权人申请续期贷款</el-option>
-                                                    <el-option  label="向新抵押权人申请贷款" value="DIFFERENT">向新抵押权人申请贷款</el-option>
+                                                    <el-option  label="否" value="">否</el-option>
+                                                    <el-option  label="向同一抵押权人申请续期贷款" value="向同一抵押权人申请续期贷款">向同一抵押权人申请续期贷款</el-option>
+                                                    <el-option  label="向新抵押权人申请贷款" value="向新抵押权人申请贷款">向新抵押权人申请贷款</el-option>
                                                 </el-select>
                                             </el-form-item>
                                         </el-col>
@@ -496,7 +496,7 @@ export default {
                 otherOwner:null,
                 otherOwnerNo:null,
                 landRightOwnType:null,
-                isPledge:"NO",
+                isPledge:"",
                 pledgePerson:null,
                 otherPledgePerson:null,
                 ensureDebiAmount:null,

+ 4 - 4
src/components/personalForms/immovableCertificate.vue

@@ -281,9 +281,9 @@
                                                 class="postInfo-container-item"
                                             >
                                                 <el-select v-model="certificate.isPledge" placeholder="请选择" style="width:255px">
-                                                    <el-option  label="否" value="NO">否</el-option>
-                                                    <el-option  label="向同一抵押权人申请续期贷款" value="SAME">向同一抵押权人申请续期贷款</el-option>
-                                                    <el-option  label="向新抵押权人申请贷款" value="DIFFERENT">向新抵押权人申请贷款</el-option>
+                                                    <el-option  label="否" value="">否</el-option>
+                                                    <el-option  label="向同一抵押权人申请续期贷款" value="向同一抵押权人申请续期贷款">向同一抵押权人申请续期贷款</el-option>
+                                                    <el-option  label="向新抵押权人申请贷款" value="向新抵押权人申请贷款">向新抵押权人申请贷款</el-option>
                                                 </el-select>
                                             </el-form-item>
                                         </el-col>
@@ -470,7 +470,7 @@ export default {
                 useLimit:null,
                 otherInfo:null,
                 attachmentInfo:null,
-                isPledge:"NO",
+                isPledge:"",
                 pledgePerson:null,
                 otherPledgePerson:null,
                 ensureDebiAmount:null,

+ 1 - 1
src/utils/personalUtil.js

@@ -250,7 +250,7 @@ export function validateParams(data){
                   })
                   flag =  false;
             }
-            if (element.index!='权重' && !element.target.valueA  ){
+            if (element.index!='权重' && element.index!='单价(元)' && !element.target.valueA  ){
                 Message({
                     message: "评估对象["+ element.index +"]不能为空",
                     type: 'error',

+ 2 - 1
src/views/major/detail.vue

@@ -18,7 +18,7 @@
      <el-tabs v-model="activeTagName" @tab-click="handleClick" type="border-card">
       <el-tab-pane name="order" class="pane-class" :lazy=true>
         <span slot="label"><i class="el-icon-document"></i> 市场订单</span>
-        <y-detail-page-layout @save="handleCreate"  :editStatus="couldEdit" :couldBack="couldBack">
+        <y-detail-page-layout ref="myPersonalOrder" @save="handleCreate"  :editStatus="couldEdit" :couldBack="couldBack">
           <div>
             <el-form ref="majorForm" :model="major" class="form-container" :rules="rules">
               <div class="createMajor-main-container">
@@ -3019,6 +3019,7 @@
             }
           })
       },
+
     }
   }
 </script>

+ 1 - 9
src/views/personal/myOrder.vue

@@ -200,15 +200,7 @@ export default {
     },
 
     orderDetail(row){
-      if (row.reportNo && row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
-      }else if (!row.reportNo && row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&statementNo=${row.statementNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
-      }else if (row.reportNo && !row.statementNo){
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&reportNo=${row.reportNo}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
-      }else {
-        this.$router.push(`/major/detail?id=${row.majorId}&currentNodeName=${row.nodeName}&couldEdit=${false}&currentNodeId=${row.currentNodeId}&back=${'/major/list'}`)
-      }
+      this.$router.push(`/personal/order?id=${row.id}&couldEdit=${false}&recall=${true}$couldBack=${true}&back=${'/personal/my/order'}`)
     },
   },
   

+ 145 - 16
src/views/personal/order.vue

@@ -4,7 +4,7 @@
         <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
       </div>
       <div class="form-container">
-        <y-detail-page-layout @save="handleCreate" :edit-status="true" :couldBack="true" >
+        <y-detail-page-layout ref="myPersonalOrder" @save="handleCreate" :editStatus="couldEdit" @doRecall="doRecall" :couldBack="couldBack" :rules="rules">
           <el-form ref="personalForm" :model="personal">
             <div class="createMajor-main-container">
               <div class="postInfo-container">
@@ -48,6 +48,7 @@
                       label="房屋用途:"
                       prop="purpose"
                       label-width="160px"
+                      :rules="{required: true, message: '房屋用途不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
                       <el-checkbox-group v-model="personal.purpose">
@@ -93,6 +94,7 @@
                       label="客户名称:"
                       prop="clienteleId"
                       label-width="120px"
+                      :rules="{required: true, message: '客户名称不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
                     <el-select v-model="personal.clienteleId" placeholder="请选择(可搜索)" @change="findSubClientele(0)" clearable filterable  v-if="couldEdit">
@@ -106,6 +108,7 @@
                       label="业务来源:"
                       prop="clienteleSubId"
                       label-width="120px"
+                      :rules="{required: true, message: '业务来源不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
                     <el-select v-model="personal.clienteleSubId" placeholder="请选择(可搜索)"  @change="getCustomerContract" clearable filterable  v-if="couldEdit">
@@ -202,6 +205,7 @@
                       label="贷款额度:"
                       prop="loanLimit"
                       label-width="120px"
+                      :rules="{required: true, message: '贷款额度不能为空', trigger: 'blur'}"
                       class="postInfo-container-item"
                     >
                     <el-input v-model="personal.loanLimit" class="filter-item" style=" width: 225px" >
@@ -299,7 +303,6 @@
                     <el-form-item
                       label="终端客户类型:"
                       prop="terminalClienteleType"
-                      :rules="{required: true, message: '终端客户类型不能为空', trigger: 'blur'}"
                       label-width="140px"
                       class="postInfo-container-item"
                     >
@@ -747,18 +750,8 @@
       data() {
         return {
           rules:{
-            buildAcreage:[{required:true,message:"建筑面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
-            landAcreage:[{required:false,validator:isNumber,trigger:'blur'}],
-            evaluateValue:[{required:true,message:"评估价格不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
-            checkValue:[{required:true,message:"审核价格不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
-            production:[{required:true,message:"产品类型不能为空",trigger:'blur'}],
-            printing:[{required:true,message:"打印份数不能为空",trigger:'blur'}],
-            useAcreage:[{required:true,message:"使用权面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
-            residueYears:[{required:false,validator:isNumber,trigger:'blur'}],
-            plotRatio:[{required:false,validator:isNumber,trigger:'blur'}],
-            clientTel:[{required:true,message:"委托方电话不能为空",trigger:'blur'},{validator:phoneNumber,trigger:'blur'}],
-            evaluateAmount:[{required:true,message:"评估总价不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
-            evaluateAcreage:[{required:true,message:"评估面积不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
+            loanLimit:[{required:true,message:"贷款额度不能为空",trigger:'blur'},{validator:isNumber,trigger:'blur'}],
+
           },
           personal:{
               id:null,
@@ -845,9 +838,10 @@
         }
       },
       created() {
+        this.personal.id = this.$route.query.id
         this.couldEdit = this.$route.query.couldEdit ==='true';
-        this.showBtn = this.$route.query.showBtn ==='true';
         this.couldBack = this.$route.query.couldBack ==='true';
+        this.getPersonal();
         this.getCustomerCompany(0);
         this.getCustomerCompany(1);
       },
@@ -1056,7 +1050,142 @@
               }
           })
         }
-      },
+        },
+        createLinkman(val){
+          this.createLinkmanVisible = true;
+          this.linkmanFrom.terminal = val;
+          this.linkmanFrom.clienteleType = this.major.clienteleType;
+          this.linkmanFrom.clienteleId = this.major.clienteleId;
+          this.linkmanFrom.clienteleSubId = this.major.clienteleSubId;
+          if (this.major.clienteleType==='企业'){
+            this.linkmanFrom.ccId = this.major.clienteleSubId
+          }else{
+            this.major.clienteleSubId = 1;
+            this.linkmanFrom.ccId = this.major.clienteleSubId;
+          }
+          
+        },
+        createTlinkman(){
+            this.createTlinkmanVisible = true;
+            this.tLinkmanFrom.terminal = 1;
+            this.major.clienteleSubId = 1;
+            this.tLinkmanFrom.ccId = this.major.clienteleSubId;
+        },
+        saveLinkman(){
+            this.$refs.linkmanFrom.validate(valid =>{
+              if (valid){
+                  this.$api.customerLinkman.add(this.linkmanFrom).then(res=>{
+                    if (res.code ===200){
+                        this.$notify({
+                          title: '成功',
+                          message: '新增客户联系人成功',
+                          type: 'success',
+                          duration: 2000
+                        });
+                    }
+                    this.getCustomerContract();
+                    setTimeout(()=>{
+                      this.major.clienteleContactId = this.customerContract[0].id;
+                      this.getContactInfo();
+                    },2000)
+                    this.createLinkmanVisible=false;
+                  })
+              }
+            })
+        },
+        saveTlinkman(){
+          this.$refs.tLinkmanFrom.validate(valid =>{
+              if (valid){
+                  this.$api.customerLinkman.add(this.tLinkmanFrom).then(res=>{
+                    if (res.code ===200){
+                        this.$notify({
+                          title: '成功',
+                          message: '新增终端联系人成功',
+                          type: 'success',
+                          duration: 2000
+                        });
+                    }
+                    let simpleAll = new Object();
+                    simpleAll.ccId = 1;
+                    simpleAll.terminal = 1;
+                    this.$api.customerLinkman.simpleAll(simpleAll).then(res=>{
+                      if (res.code === 200){
+                          this.tCustomerContract = res.data;
+                      }
+                    })
+                    setTimeout(()=>{
+                      this.major.terminalClienteleContactId = this.tCustomerContract[0].id;
+                      this.getTcontactInfo();
+                    },2000)
+                    this.createTlinkmanVisible=false;
+                  })
+              }
+            })
+        },
+        saveClient(){
+            this.$refs.terminalClientFrom.validate(valid =>{
+              if (valid){
+                  this.$api.customerCompany.add(this.terminalClientFrom).then(res=>{
+                    if (res.code ===200){
+                        this.$notify({
+                          title: '成功',
+                          message: '新增客户成功',
+                          type: 'success',
+                          duration: 2000
+                        });
+                    }
+                    this.getCustomerCompany(1);
+                    setTimeout(()=>{
+                      this.major.terminalClienteleId  = this.tCustomerCompany[0].id;
+                      this.findSubClientele(1);
+                    },2000)
+                    this.createTerminalClientVisible=false;
+                  })
+              }
+            })
+        },
+        getPersonal(){
+            if (this.personal.id){
+                this.$api.personal.detail(this.personal.id).then(res=>{
+                    if (res.code ===200 ){
+                        res.data.credentials = JSON.parse(res.data.credentials);
+                        res.data.purpose = JSON.parse(res.data.purpose);
+                        this.personal = res.data;
+                    }
+                })
+            }
+        },
+        doRecall(){
+        this.$confirm('请确认是否撤回此个贷订单的业务流程?','提示',{
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
+        }).then(()=>{
+            if (this.personal.id){
+              this.$api.personal.doRecall(this.personal.id).then(res=>{
+                if (res.code ===200 && res.data){
+                    this.$notify({
+                    title: '成功',
+                    message: '业务流程撤回成功',
+                    type: 'success',
+                    duration: 2000
+                  });
+                  this.$refs.myPersonalOrder.initPageStatus(true,true);
+                  this.couldEdit = true;
+                  //this.$refs.myPersonalOrder.forceUpdate();
+                }else{
+                  this.$notify({
+                    title: '失败',
+                    message: '业务流程撤回失败',
+                    type: 'error',
+                    duration: 2000
+                  });
+                }
+              })
+            }
+        })
+      }
       },
     }
   </script>