浏览代码

无内部审批不直接打开文件,修改授信额度及执行顺序

xuefy 3 年之前
父节点
当前提交
d43e4e21dc
共有 1 个文件被更改,包括 43 次插入32 次删除
  1. 43 32
      front-vue/src/views/service/credit/confirmationAudit.vue

+ 43 - 32
front-vue/src/views/service/credit/confirmationAudit.vue

@@ -356,10 +356,10 @@ export default {
                 pageNum: 1,
                 pageSize: 10,
             },
-            creditParams: {
+           /*  creditParams: {
                 zfsqId:null,
                 type: "1",
-            },
+            }, */
             supplierCreditParams: {
                  zfsqId:null
             },
@@ -485,7 +485,8 @@ export default {
         this.zfiId = zfiId;
         getCreditDetail(zfiId).then((response) => {
              if(response.data){
-                this.form = response.data.financeInf;
+                var tempForm = response.data.financeInf;
+                // this.form = response.data.financeInf;
                 //融信类型
                 this.zfiCreateType = response.data.financeInf.zfiCreateType;
                 //核心审批状态
@@ -498,38 +499,35 @@ export default {
                       this.isUpdate = false;
                 }
                 //接收方
-                this.form.receiveName = response.data.receiveName;
+                tempForm.receiveName = response.data.receiveName;
                 //产品
-                this.form.zfpName = response.data.zfpName;
+                tempForm.zfpName = response.data.zfpName;
                 //开立方
-                this.form.openName = response.data.openName;
+                tempForm.openName = response.data.openName;
                 //创建人
-                this.form.createName = response.data.createName;
+                tempForm.createName = response.data.createName;
                 //签发金额大写
-                this.issuedAmount = this.smallToBig(this.form.zfiAmount);
-             }
-             if(response.data.payList){
-                 this.ticketList = response.data.payList.records;
-                 this.getReTotal(this.ticketList);
-                //附件
-                 this.getFile(this.ticketList);
-                //承诺还款日为空
-                if(!this.form.zfiExpireDate){
-                    if(this.ticketList.length > 0){
-                            if(new Date(this.ticketList[0].zbiPayDate) >= new Date()){
-                                this.$set(this.form, "zfiExpireDate", this.ticketList[0].zbiPayDate);
-                            }
+                this.issuedAmount = this.smallToBig(tempForm.zfiAmount);
+
+                if(response.data.payList){
+                    this.ticketList = response.data.payList.records;
+                    this.getReTotal(this.ticketList);
+                    //附件
+                    this.getFile(this.ticketList);
+                    //承诺还款日为空
+                    if(!tempForm.zfiExpireDate){
+                        if(this.ticketList.length > 0){
+                                if(new Date(this.ticketList[0].zbiPayDate) >= new Date()){
+                                    tempForm.zfiExpireDate = this.ticketList[0].zbiPayDate;
+                                    // this.$set(this.form, "zfiExpireDate", this.ticketList[0].zbiPayDate);
+                                }
+                        }
                     }
                 }
+                //授信额度
+                this.listCreditLine(tempForm);
              }
-             //查询有无确权的内部审批
-             this.isOpenApproval();
-             //盖章合同
-             this.getCreditSealFile();
-             
         })
-        //授信额度
-        this.listCreditLine();
        
     },
     methods: {
@@ -543,9 +541,12 @@ export default {
         rowkeyCustomer(row) {
             return row.cciId;
         },
-        //供应商授信额度    
-        listCreditLine(){
-                listCreditLine(this.creditParams).then((response) => {
+        //核心授信额度    
+        listCreditLine(tempForm){
+                var creditParams = {};
+                creditParams.zfpcrId = tempForm.zfiCoreQuotaId;
+                creditParams.type = '1';
+                listCreditLine(creditParams).then((response) => {
                     this.creditLineList = response.data.map((item) => {
                         return {
                             value: item.zfpcrId,
@@ -561,7 +562,13 @@ export default {
                             zfpMinimumAmount:item.zfpMinimumAmount
                         };
                     });
+                    this.form = tempForm;
+                    //盖章合同
+                    this.getCreditSealFile();
+                    //查询有无确权的内部审批
+                    this.isOpenApproval();
               });
+              
         },
         //应收账款查询列表
         getAccountsCollection() {
@@ -746,6 +753,7 @@ export default {
     },
     //选择授信触发
     change(val) {
+        debugger;
        if (!val) {
             //可用额度
             this.availableAmt = "0.00";
@@ -1049,8 +1057,11 @@ export default {
                 }
             }else{//无确权内部审批,显示确权按钮
                 this.isHas = false;
-                 //调文件
-                this.getContractFile(true);
+                if(this.zfiCoreStatus == "01"){//这种情况出现在审批先开启审批后关闭审批
+                    //调文件
+                    this.getContractFile(true);
+                }
+                 
 
             }
         });