Browse Source

流程修改

xuefy 4 years ago
parent
commit
b1cb94bc12

+ 199 - 84
front-vue/src/views/service/credit/addCredit.vue

@@ -199,6 +199,9 @@ import {
 import AddBill from "@/views/service/bill/addBill";
 import EditBill from "@/views/service/bill/editBill";
 import DetailBill from "@/views/service/credit/billDetail";
+import {listCompanyHandler} from "@/api/common/companyHandler";
+import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
+import Cookies from 'js-cookie'
 export default {
     name: "addCredit",
     components: {
@@ -330,7 +333,9 @@ export default {
             show: false,
             heid: false,
             chooseTicket: [],
-            payDate: null
+            payDate: null,
+            //控制内部审批,合同签署按钮展示或隐藏
+            isHas:true,
         };
     },
     created() {
@@ -790,19 +795,19 @@ export default {
         //新增
         submitForm() {
             this.$refs["form"].validate((valid) => {
-                if (parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))) {
+               if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))){
                     this.$message({
-                        message: '签发金额不可大于可用金额',
-                        type: 'warning'
-                    });
-                    return;
+                            message: '签发金额不可大于可用金额',
+                            type: 'warning'
+                        });
+                        return;
                 }
-                if (parseFloat(this.form.zfiAmount) < parseFloat(this.zfpMinimumAmount)) {
+               if(parseFloat(this.form.zfiAmount) < parseFloat(this.zfpMinimumAmount)){
                     this.$message({
-                        message: '签发金额不可小于产品的最小融资金额',
-                        type: 'warning'
-                    });
-                    return;
+                            message: '签发金额不可小于产品的最小融资金额',
+                            type: 'warning'
+                        });
+                        return;
                 }
                 if (valid) {
                     const loading = this.$loading({
@@ -812,75 +817,149 @@ export default {
                     });
                     //选择了应付款,如果申请金额小于合计金额增加提示
                     debugger;
-                    if (this.ticketList.length > 0) {
-                        if ((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))) {
-                            var _this = this;
-                            this.$confirm('签发金额小于应付金额合计,是否确认提交', "警告", {
-                                confirmButtonText: "确定",
-                                cancelButtonText: "取消",
-                                type: "warning"
-                            }).then(function () {
-                                //产品是否可拆分
-                                _this.form.zfpSplit = _this.zfpSplit;
+                    if(this.ticketList.length > 0){
+                        if((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))){
+                                var _this = this;
+                                 this.$confirm('签发金额小于应付金额合计,是否确认提交', "警告", {
+                                    confirmButtonText: "确定",
+                                    cancelButtonText: "取消",
+                                    type: "warning"
+                                    }).then(function() {
+                                       //产品是否可拆分
+                                        _this.form.zfpSplit = _this.zfpSplit;
+                                        //放款方式
+                                        _this.form.zfpcrLoanType = _this.zfpcrLoanType;
+                                        //融信类型
+                                        _this.form.type = "1";
+                                        //利率
+                                        _this.form.zfiRate = _this.zfpcrRate;
+                                        //产品
+                                        _this.form.zfpId = _this.zfpId;
+                                        //应付账款
+                                        _this.form.ticketList = _this.ticketList;
+                                        //可用额度
+                                        _this.form.availableAmt = _this.moneyDelete(_this.availableAmt);
+                                         //最小融资金额
+                                        _this.form.zfpMinimumAmount = _this.zfpMinimumAmount;
+                                        addCredit(_this.form).then((response) => {
+                                                //获取融信编号
+                                                var zfiId = response.data.zfiId;
+                                                loading.close();
+                                                //查询当前用户是否为经办人
+                                                listCompanyHandler().then((response) => {
+                                                    if(false == response.data){
+                                                    //当前用户不是经办人,返回到列表页
+                                                        _this.msgSuccess("融信资料已提交企业内部审批");
+                                                        _this.$store.dispatch(
+                                                            "tagsView/delView",
+                                                            _this.$route
+                                                        ); 
+                                                        _this.$router.go(-1);
+                                                    }else{
+                                                        //当前用户是经办人,判断有无核心开立融信的内部审批
+                                                        //查询有无核心开立内部审批
+                                                        var confirmParam = {};
+                                                        confirmParam.menuId = "1000000000";
+                                                        isOpenApproval(confirmParam).then((response) => {
+                                                            var result = response.data.isOpen;
+                                                            //有核心开立内部审批
+                                                            if(true == result){
+                                                                _this.msgSuccess("融信资料已提交企业内部审批");
+                                                                _this.$store.dispatch(
+                                                                    "tagsView/delView",
+                                                                     _this.$route
+                                                                ); 
+                                                                _this.$router.go(-1);
+                                                            }else{//无核心开立内部审批
+                                                                //关闭当前页面
+                                                                _this.$store.dispatch(
+                                                                    "tagsView/delView",
+                                                                    _this.$route
+                                                                );
+                                                                _this.$router.go(-1);
+                                                                //跳转盖章页面
+                                                                Cookies.set("/credit/creditSeal/"+zfiId + "/", this.$route.fullPath)
+                                                                this.$router.push({ path: "/credit/creditSeal/"+zfiId + "/" });            
+                                                            }
+                                                        });
+                                                        
+                                                    }
+                                                });
+
+                                                
+                                            }).catch((e) => {
+                                                loading.close();
+                                            });
+                                    }).catch((e) => {
+                                                loading.close();
+                                      });
+                        }else{
+                               //产品是否可拆分
+                                this.form.zfpSplit = this.zfpSplit;
                                 //放款方式
-                                _this.form.zfpcrLoanType = _this.zfpcrLoanType;
+                                this.form.zfpcrLoanType = this.zfpcrLoanType;
                                 //融信类型
-                                _this.form.type = "1";
+                                this.form.type = "1";
                                 //利率
-                                _this.form.zfiRate = _this.zfpcrRate;
+                                this.form.zfiRate = this.zfpcrRate;
                                 //产品
-                                _this.form.zfpId = _this.zfpId;
+                                this.form.zfpId = this.zfpId;
                                 //应付账款
-                                _this.form.ticketList = _this.ticketList;
+                                this.form.ticketList = this.ticketList;
                                 //可用额度
-                                _this.form.availableAmt = _this.moneyDelete(_this.availableAmt);
+                                this.form.availableAmt = this.moneyDelete(this.availableAmt);
                                 //最小融资金额
-                                _this.form.zfpMinimumAmount = _this.zfpMinimumAmount;
-                                addCredit(_this.form).then((response) => {
-                                    loading.close();
-                                    _this.msgSuccess("新增成功");
-                                    _this.$store.dispatch(
-                                        "tagsView/delView",
-                                        _this.$route
-                                    );
-                                    _this.$router.go(-1);
-                                }).catch((e) => {
-                                    loading.close();
-                                });
-                            }).catch((e) => {
-                                loading.close();
-                            });
-                        } else {
-                            //产品是否可拆分
-                            this.form.zfpSplit = this.zfpSplit;
-                            //放款方式
-                            this.form.zfpcrLoanType = this.zfpcrLoanType;
-                            //融信类型
-                            this.form.type = "1";
-                            //利率
-                            this.form.zfiRate = this.zfpcrRate;
-                            //产品
-                            this.form.zfpId = this.zfpId;
-                            //应付账款
-                            this.form.ticketList = this.ticketList;
-                            //可用额度
-                            this.form.availableAmt = this.moneyDelete(this.availableAmt);
-                            //最小融资金额
-                            this.form.zfpMinimumAmount = this.zfpMinimumAmount;
-                            addCredit(this.form).then((response) => {
-                                loading.close();
-                                this.msgSuccess("新增成功");
-                                this.$store.dispatch(
-                                    "tagsView/delView",
-                                    this.$route
-                                );
-                                this.$router.go(-1);
-                            }).catch((response) => {
-                                loading.close();
-                            });
+                                this.form.zfpMinimumAmount = this.zfpMinimumAmount;
+                                addCredit(this.form).then((response) => {
+                                        loading.close();
+                                         //获取融信编号
+                                        var zfiId = response.data.zfiId;
+                                        //查询当前用户是否为经办人
+                                        listCompanyHandler().then((response) => {
+                                            if(false == response.data){
+                                            //当前用户不是经办人,返回到列表页
+                                                this.msgSuccess("融信资料已提交企业内部审批");
+                                                this.$store.dispatch(
+                                                    "tagsView/delView",
+                                                     this.$route
+                                                ); 
+                                                this.$router.go(-1);
+                                            }else{
+                                                //当前用户是经办人,判断有无核心开立融信的内部审批
+                                                //查询有无核心开立内部审批
+                                                var confirmParam = {};
+                                                confirmParam.menuId = "1000000000";
+                                                isOpenApproval(confirmParam).then((response) => {
+                                                    var result = response.data.isOpen;
+                                                    //有核心开立内部审批
+                                                    if(true == result){
+                                                        this.msgSuccess("融信资料已提交企业内部审批");
+                                                        this.$store.dispatch(
+                                                            "tagsView/delView",
+                                                            this.$route
+                                                        ); 
+                                                        this.$router.go(-1);
+                                                    }else{//无核心开立内部审批
+                                                        //关闭当前页面
+                                                        this.$store.dispatch(
+                                                            "tagsView/delView",
+                                                             this.$route
+                                                        );
+                                                        this.$router.go(-1);
+                                                        //跳转盖章页面
+                                                        Cookies.set("/credit/creditSeal/"+zfiId + "/", this.$route.fullPath)
+                                                        this.$router.push({ path: "/credit/creditSeal/"+zfiId + "/" });            
+                                                    }
+                                                });
+                                                
+                                            }
+                                        });
+                                    }).catch((response) => {
+                                        loading.close();
+                                    });
                         }
-                    } else {
-                        //产品是否可拆分
+                    }else{
+                         //产品是否可拆分
                         this.form.zfpSplit = this.zfpSplit;
                         //放款方式
                         this.form.zfpcrLoanType = this.zfpcrLoanType;
@@ -894,21 +973,57 @@ export default {
                         this.form.ticketList = this.ticketList;
                         //可用额度
                         this.form.availableAmt = this.moneyDelete(this.availableAmt);
-                        //最小融资金额
+                         //最小融资金额
                         this.form.zfpMinimumAmount = this.zfpMinimumAmount;
                         addCredit(this.form).then((response) => {
-                            loading.close();
-                            this.msgSuccess("新增成功");
-                            this.$store.dispatch(
-                                "tagsView/delView",
-                                this.$route
-                            );
-                            this.$router.go(-1);
-                        }).catch((response) => {
-                            loading.close();
-                        });
+                                //融信编号
+                                var zfiId = response.data.zfiId;
+                                loading.close();
+                                //查询当前用户是否为经办人
+                                listCompanyHandler().then((response) => {
+                                    if(false == response.data){
+                                    //当前用户不是经办人,返回到列表页
+                                        this.msgSuccess("融信资料已提交企业内部审批");
+                                        this.$store.dispatch(
+                                            "tagsView/delView",
+                                                this.$route
+                                        ); 
+                                        this.$router.go(-1);
+                                    }else{
+                                        //当前用户是经办人,判断有无核心开立融信的内部审批
+                                        //查询有无核心开立内部审批
+                                        var confirmParam = {};
+                                        confirmParam.menuId = "1000000000";
+                                        isOpenApproval(confirmParam).then((response) => {
+                                            var result = response.data.isOpen;
+                                            //有核心开立内部审批
+                                            if(true == result){
+                                                this.msgSuccess("融信资料已提交企业内部审批");
+                                                this.$store.dispatch(
+                                                    "tagsView/delView",
+                                                    this.$route
+                                                ); 
+                                                this.$router.go(-1);
+                                            }else{//无核心开立内部审批
+                                                //关闭当前页面
+                                                this.$store.dispatch(
+                                                    "tagsView/delView",
+                                                        this.$route
+                                                );
+                                                this.$router.go(-1);
+                                                //跳转盖章页面
+                                                Cookies.set("/credit/creditSeal/"+zfiId + "/", this.$route.fullPath)
+                                                this.$router.push({ path: "/credit/creditSeal/"+zfiId + "/" });            
+                                            }
+                                        });
+                                        
+                                    }
+                                });
+                            }).catch((response) => {
+                                loading.close();
+                            });
                     }
-
+                   
                 }
             });
         },

+ 255 - 9
front-vue/src/views/service/credit/addInformation.vue

@@ -210,7 +210,10 @@
             </el-table>
             <div class="footer" style="float: right;
                 margin-bottom:2px;">
-                <el-button type="primary" @click="submitForm">保存</el-button>
+                <el-button type="info" @click="refuse">拒绝</el-button>
+                <el-button type="primary" @click="submitForm" v-if="isHas">内部审批</el-button>
+                <el-button type="primary" @click="submit" v-if="submitButton">提交</el-button>
+                <el-button type="primary" @click="sign" v-if="signButton">签收</el-button>
                 <el-button @click="cancel">取 消</el-button>
             </div>
             <!-- 应收账款信息 -->
@@ -279,6 +282,12 @@
                 <img :src="wordUrl" v-if="show" width='450px' height='500px'/>
                 <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid"/>
             </el-dialog>
+            <el-dialog
+            :visible.sync="pdfShowDialog"
+            width="70%">
+                <pdf-show :pdfFileList="pdfFileList" :zfiId="this.form.zfiId" :parent="parent">
+                </pdf-show>
+            </el-dialog>
         </el-tab-pane>
         <el-tab-pane label="签署合同">
             <el-table :data="creditSealList"  style="width: 100%">
@@ -313,14 +322,16 @@
   <!-- </div> -->
 </template>
 <script>
-import {getCreditDetail,getAvailableBalance,getAccountsCollection,getFile} from "@/api/service/credit/credit";
-import {addInfor,getCreditSealFile} from "@/api/service/credit/creditHandle";
+import {getCreditDetail,getAccountsCollection,getFile} from "@/api/service/credit/credit";
+import {addInfor,getCreditSealFile,creditRefuse,getContractFile} from "@/api/service/credit/creditHandle";
 import {accAdd} from "@/utils/calculation";
 import {getToken} from "@/utils/auth";
 import AddBill from "@/views/service/bill/addBill";
+import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
+import pdfShow from "./pdfShow";
 export default {
     name: "addCredit",
-    components: {AddBill},
+    components: {AddBill,pdfShow},
     data() {
         return {
             // 总条数
@@ -394,7 +405,18 @@ export default {
           show:false,
           heid:false,
           chooseTicket:[],
-          payDate:null
+          payDate:null,
+          //内部审批控制
+          isHas:true,
+          //提交按钮
+          submitButton:true,
+          //签收按钮
+          signButton:true,
+          pdfFileList : [],
+          pdfShowDialog : false,
+          parent : this,
+          //平台审批状态
+          zfiPlatformStatus:""
         };
     },
     /* watch:{
@@ -427,6 +449,8 @@ export default {
                 this.zfiCoreId = response.data.financeInf.zfiCoreId;
                 //接收方
                 this.zfiSupplierId = response.data.financeInf.zfiSupplierId;
+                //平台
+                this.zfiPlatformStatus = response.data.zfiPlatformStatus;
              }
              if(response.data.payList){
                  this.ticketList = response.data.payList.records;
@@ -436,6 +460,8 @@ export default {
              }
             //盖章合同
              this.getCreditSealFile();
+             //判断有无开启审批
+             this.isOpenApproval();
         })
     },
     methods: {
@@ -777,7 +803,7 @@ export default {
             this.availableAmt = response.data.remaining;
         });
     }, */
-    //修改
+    //内部审批
     submitForm(){
         this.$refs["form"].validate(valid => {
             if(this.ticketList.length < 1){
@@ -812,7 +838,7 @@ export default {
                             _this.form.ticketList = _this.ticketList;
                             addInfor(_this.form).then(response => {
                                 loading.close();
-                                _this.msgSuccess("补充资料成功");
+                                _this.msgSuccess("融信资料已提交内部审批");
                                 _this.$store.dispatch("tagsView/delView", _this.$route);
                                 _this.$router.go(-1);
                             }).catch((response)=>{
@@ -827,7 +853,7 @@ export default {
                     this.form.ticketList = this.ticketList;
                     addInfor(this.form).then(response => {
                         loading.close();
-                        this.msgSuccess("补充资料成功");
+                        this.msgSuccess("融信资料已提交内部审批");
                         this.$store.dispatch("tagsView/delView", this.$route);
                         this.$router.go(-1);
                     }).catch((response)=>{
@@ -931,7 +957,227 @@ export default {
             }
         })
         self.openAddBill = false
-    }  
+    },
+    //判断有无补充资料内部审批
+    isOpenApproval(){
+        debugger
+        // 平台审批通过
+        if (this.form.zfiPlatformStatus == '01') {
+            this.signButton = true;
+            this.isHas = false;
+            this.submitButton = false;
+        // 平台审批拒绝
+        } else if (this.form.zfiPlatformStatus == '02') {
+            // 融信状态为平台退回
+            if (this.form.zfiStatus == '06') {
+                // 判断是否有内部审批
+                var confirmParam = {};
+                confirmParam.menuId = "1000000003";
+                isOpenApproval(confirmParam).then((response) => {
+                    var result = response.data.isOpen;
+                    // 有内部审批
+                    if (result) {
+                        this.signButton = false;
+                        this.isHas = true;
+                        this.submitButton = false;
+                    // 没有内部审批
+                    } else {
+                        // 判断是否有平台审批
+                        var platParam = {};
+                        platParam.menuId = "1000000004";
+                        isOpenApproval(platParam).then((response) => {
+                            var platResult = response.data.isOpen;
+                            //开启平台审批,显示提交按钮
+                            if(platResult){
+                                this.submitButton = true;
+                                this.isHas = false;
+                                this.signButton = false;
+                            }else{
+                                //未开启平台审批,显示签收按钮
+                                this.signButton = true;
+                                this.submitButton = false;
+                                this.isHas = false;
+                            }
+                        });
+                    }
+                })
+            // 融信状态为 待签收
+            } else if(this.form.zfiStatus == '01') {
+                //不存在此情况
+            }
+        // 平台未审批
+        } else if (this.form.zfiPlatformStatus == null || this.form.zfiPlatformStatus == "04") {
+            // 融资审批状态
+            if (this.form.zfiSupplierStatus == '01') {
+                //不存在此情况
+            // 融资审批状态为拒绝 或者 为 null
+            } else if (this.form.zfiSupplierStatus == '02' || this.form.zfiSupplierStatus == null) {
+                // 判断是否有内部审批
+                var confirmParam = {};
+                confirmParam.menuId = "1000000003";
+                isOpenApproval(confirmParam).then((response) => {
+                    var result = response.data.isOpen;
+                    // 有内部审批
+                    if (result) {
+                        this.signButton = false;
+                        this.isHas = true;
+                        this.submitButton = false;
+                    // 没有内部审批
+                    } else {
+                        // 判断是否有平台审批
+                        var platParam = {};
+                        platParam.menuId = "1000000004";
+                        isOpenApproval(platParam).then((response) => {
+                            var platResult = response.data.isOpen;
+                            //开启平台审批,显示提交按钮
+                            if(platResult){
+                                this.submitButton = true;
+                                this.isHas = false;
+                                this.signButton = false;
+                            }else{
+                                //未开启平台审批,显示签收按钮
+                                this.signButton = true;
+                                this.submitButton = false;
+                                this.isHas = false;
+                            }
+                        });
+                    }
+                })
+            }
+        }
+    },
+    //拒签
+    refuse(){
+          creditRefuse(this.form).then(response => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    background: 'rgba(0, 0, 0,0)'
+                }); 
+                loading.close();
+                this.msgSuccess("该笔融信将作废");
+                this.$store.dispatch("tagsView/delView",this.$route);
+                this.$router.go(-1);
+            }).catch((response)=>{
+                loading.close();
+            });   
+    },
+    //提交
+    submit(){
+            this.$refs["form"].validate(valid => {
+            if(this.ticketList.length < 1){
+                    this.$message({
+                        message: '请选择应收账款',
+                        type: 'warning'
+                    });
+                    return;
+            }
+            if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
+                this.$message({
+                        message: '签发金额不可大于合计金额',
+                        type: 'warning'
+                    });
+                    return;
+            }
+            if (valid) {
+                const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    background: 'rgba(0, 0, 0,0)'
+                }); 
+            //如果签发金额小于合计金额
+            if((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))){
+                        var _this = this;
+                        this.$confirm('签发金额小于应收金额合计,是否确认提交', "警告", {
+                            confirmButtonText: "确定",
+                            cancelButtonText: "取消",
+                            type: "warning"
+                        }).then(function() {
+                           //应收账款
+                            _this.form.ticketList = _this.ticketList;
+                            addInfor(_this.form).then(response => {
+                                loading.close();
+                                _this.msgSuccess("平台正在审核资料,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请平台审批通过后,再次签署");
+                                _this.$store.dispatch("tagsView/delView", _this.$route);
+                                _this.$router.go(-1);
+                            }).catch((response)=>{
+                                loading.close();
+                            });
+                        }).catch((e) => {
+                                loading.close();
+                            });
+
+            }else{
+                    //应收账款
+                    this.form.ticketList = this.ticketList;
+                    addInfor(this.form).then(response => {
+                        loading.close();
+                        this.msgSuccess("平台正在审核资料,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请平台审批通过后,再次签署");
+                        this.$store.dispatch("tagsView/delView", this.$route);
+                        this.$router.go(-1);
+                    }).catch((response)=>{
+                        loading.close();
+                    });
+                }
+            }
+        });
+
+    },
+    //签收
+    sign(){
+        //预览文件
+        this.getContractFile();
+    },
+    //获取合同文件
+    getContractFile(){
+        const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    background: 'rgba(0, 0, 0,0)'
+                });
+         getContractFile(this.form).then((response) => {
+                loading.close();
+                if(response.data.list){
+                    this.pdfFileList = response.data.list;
+                }
+                 //文件存在
+                if(this.pdfFileList.length > 0 ){
+                    this.pdfShowDialog = true;
+
+                }else{
+                     /*  this.$message({
+                        message: '文件不存在!',
+                        type: 'warning'
+                      }); */
+                     //文件不存在,直接盖章
+                    this.contractSigning();
+                }
+            }).catch((response)=>{
+                        loading.close();
+            });
+    },
+    closePdfShow(){
+        this.pdfShowDialog = false;
+    },
+    //盖章
+    contractSigning(){
+            const loading = this.$loading({
+                        lock: true,
+                        text: 'Loading',
+                        background: 'rgba(0, 0, 0,0)'
+                    });
+            contractSigning(this.form).then((response) => {
+                loading.close();
+                this.msgSuccess("确权成功,融信已提交"+this.form.receiveName+"签收");
+                this.$store.dispatch(
+                    "tagsView/delView",
+                    this.$route
+                );
+                this.$router.go(-1);
+            }).catch((response) => {
+                loading.close();
+            });
+    },
     
   }
 };

+ 24 - 3
front-vue/src/views/service/credit/confirmationAudit.vue

@@ -1045,10 +1045,12 @@ export default {
                     this.pdfShowDialog = true;
 
                 }else{
-                      this.$message({
+                     /*  this.$message({
                         message: '文件不存在!',
                         type: 'warning'
-                      });
+                      }); */
+                     //文件不存在,直接盖章
+                    this.contractSigning();
                 }
             }).catch((response)=>{
                         loading.close();
@@ -1056,7 +1058,26 @@ export default {
     },
     closePdfShow(){
         this.pdfShowDialog = false;
-    }
+    },
+    //盖章
+    contractSigning(){
+            const loading = this.$loading({
+                        lock: true,
+                        text: 'Loading',
+                        background: 'rgba(0, 0, 0,0)'
+                    });
+            contractSigning(this.form).then((response) => {
+                loading.close();
+                this.msgSuccess("确权成功,融信已提交"+this.form.receiveName+"签收");
+                this.$store.dispatch(
+                    "tagsView/delView",
+                    this.$route
+                );
+                this.$router.go(-1);
+            }).catch((response) => {
+                loading.close();
+            });
+    },
        
     }
 };

+ 274 - 74
front-vue/src/views/service/credit/credit.vue

@@ -749,28 +749,29 @@
                         "
                       
               >修改</el-button>
-              <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过
-              
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
               -->
               <el-button
                 size="mini"
@@ -778,7 +779,7 @@
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
@@ -817,14 +818,31 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
-              <!--
-                (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
-                (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
-                (融资方)融资开立+融资审批状态/平台审批拒绝||
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
+              <el-button
+                size="mini"
+                type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['credit:credit:del']"
@@ -898,39 +916,41 @@
                         "
                       
               >修改</el-button>
-            <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入-->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+               v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过-->
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
               -->
-              <!-- <el-button
+          <!--    <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -953,7 +973,7 @@
                 (融资方)融资开立:融资方通过+平台通过+其他为空||
                 (核心)确权:融资方通过+核心通过+平台通过+待确权
             -->
-            <!--   <el-button
+            <!--  <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -964,14 +984,31 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
-              <!--
-                (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
-                (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
-                (融资方)融资开立+融资审批状态/平台审批拒绝||
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
+              <el-button
+                size="mini"
+                type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['credit:credit:del']"
@@ -1045,39 +1082,41 @@
                         "
                       
               >修改</el-button>
-              <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入-->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过-->
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
               -->
-            <!--  <el-button
+              <!--    <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1100,7 +1139,7 @@
                 (融资方)融资开立:融资方通过+平台通过+其他为空||
                 (核心)确权:融资方通过+核心通过+平台通过+待确权
             -->
-        <!--       <el-button
+            <!--  <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1111,14 +1150,31 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
-              <!--
-                (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
-                (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
-                (融资方)融资开立+融资审批状态/平台审批拒绝||
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
+              <el-button
+                size="mini"
+                type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['credit:credit:del']"
@@ -1192,39 +1248,41 @@
                         "
                       
               >修改</el-button>
-              <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入-->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过-->
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
               -->
-            <!--  <el-button
+          <!--    <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1247,7 +1305,7 @@
                 (融资方)融资开立:融资方通过+平台通过+其他为空||
                 (核心)确权:融资方通过+核心通过+平台通过+待确权
             -->
-            <!--   <el-button
+            <!--  <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1258,6 +1316,28 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
               <!--
                 (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
                 (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
@@ -1339,39 +1419,41 @@
                         "
                       
               >修改</el-button>
-            <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入-->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+               v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过-->
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
               -->
-              <!-- <el-button
+          <!--    <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1394,7 +1476,7 @@
                 (融资方)融资开立:融资方通过+平台通过+其他为空||
                 (核心)确权:融资方通过+核心通过+平台通过+待确权
             -->
-          <!--    <el-button
+            <!--  <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1405,14 +1487,31 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
-              <!--
-                (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
-                (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
-                (融资方)融资开立+融资审批状态/平台审批拒绝||
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
+              <el-button
+                size="mini"
+                type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['credit:credit:del']"
@@ -1486,39 +1585,41 @@
                         "
                       
               >修改</el-button>
-              <!--融信状态待确权
+              <!--融信状态待确权且为核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleApprove(scope.row)"
-                v-show="scope.row.zfiStatus == '00'"
+                v-show="scope.row.zfiStatus == '00' && scope.row.companyType == '01'"
                 v-hasPermi="['credit:credit:approve']"
               >确权</el-button>
               <!--原补充资料-->
-              <!--核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过)-->
+              <!--核心开立+融信状态为待签收+融资企业   判断内部,平台,审批中不可进入-->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleAddInformation(scope.row)"
                 v-hasPermi="['credit:credit:addInfor']"
-                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && scope.row.zfiStatus=='01' &&((scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01') || (scope.row.zfiPlatformStatus != '00' && scope.row.zfiPlatformStatus != '01'))"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus=='01' || scope.row.zfiStatus=='06')"
               >签收</el-button>
-              <!--融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过-->
+              <!--融资申请+融信状态待签收+融资企业
+              判断是否内部通过 审批中不可进入
+              -->
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
                 @click="handleSignFor(scope.row)"
                 v-hasPermi="['credit:credit:signFor']"
-                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' &&(scope.row.zfiSupplierStatus != '00' && scope.row.zfiSupplierStatus != '01')"
+                v-show="scope.row.zfiCreateType == '0' && scope.row.zfiStatus=='01' && scope.row.companyType == '02'"
               >签收</el-button>
               <!--(融资申请+融信状态待签收+融资审批状态不是审批中并且不是审批通过)||
                   (核心开立+融信状态为待签收+(融资审批状态不是审批中并且不是审批通过)或者(平台审批状态不是审批中并且不是审批通过))
               -->
-    <!--          <el-button
+              <!--    <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1541,7 +1642,7 @@
                 (融资方)融资开立:融资方通过+平台通过+其他为空||
                 (核心)确权:融资方通过+核心通过+平台通过+待确权
             -->
-          <!--     <el-button
+            <!--  <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -1552,14 +1653,31 @@
                       (scope.row.companyType == '02' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiPlatformStatus == '01' && (scope.row.zfiCoreStatus == '' || scope.row.zfiCoreStatus == null || scope.row.zfiCoreStatus =='null') && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null))||
                       (scope.row.companyType == '01' && scope.row.zfiSupplierStatus == '01' && scope.row.zfiCoreStatus == '01' && scope.row.zfiPlatformStatus == '01' &&  scope.row.zfiStatus == '00')"
               >盖章</el-button> -->
-              <!--
-                (核心方)核心开立+核心审批拒绝||融资/平台拒绝||
-                (融资方)融资申请+融资审批状态/平台审批拒绝+融信不等于待签收||
-                (融资方)融资开立+融资审批状态/平台审批拒绝||
+              <!--核心开立
+                类型为核心开立,状态为空,并且核心企业
               -->
               <el-button
                 size="mini"
                 type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '01' && scope.row.zfiCreateType == '1' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >开立融信</el-button>
+               <!--供应商开立
+                类型为供应商开立,状态为空,并且融资企业
+              -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="seal(scope.row)"
+                v-hasPermi="['credit:credit:seal']"
+                v-show="scope.row.companyType == '02' && scope.row.zfiCreateType == '2' && (scope.row.zfiStatus == '' || scope.row.zfiStatus == 'null' ||  scope.row.zfiStatus == null)"
+              >融信开立</el-button>
+              <el-button
+                size="mini"
+                type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['credit:credit:del']"
@@ -2028,20 +2146,77 @@ export default {
 
           
     },
-    //审核
+    //确权审核
     handleApprove(row){
-          const zfiId = row.zfiId || this.ids
-          Cookies.set("/credit/confirmationAudit/"+zfiId + "/", this.$route.fullPath)
-          this.$router.push({ path: "/credit/confirmationAudit/"+zfiId + "/" });
+         //判断审批是否审批中
+         if(row.zfiCoreStatus == "00"){
+                this.$message({
+                  message: "请内部审批通过后,再确权",
+                  type: 'warning'
+                });
+                return false;
+            }
+          //查询当前用户是否为经办人
+          listCompanyHandler().then((response) => {
+            if(false == response.data){
+                this.$message({
+                    message: "此操作需经办人权限,请确认您是否是经办人",
+                    type: 'warning'
+                });
+                return false;
+            }else{
+                const zfiId = row.zfiId || this.ids
+                Cookies.set("/credit/confirmationAudit/"+zfiId + "/", this.$route.fullPath)
+                this.$router.push({ path: "/credit/confirmationAudit/"+zfiId + "/" });
+            }
+
+        }); 
+          
     },
     //补充资料
     handleAddInformation(row){
-        const zfiId = row.zfiId || this.ids
-        Cookies.set("/credit/addInformation/"+zfiId + "/", this.$route.fullPath)
-        this.$router.push({ path: "/credit/addInformation/"+zfiId + "/" });
+         //判断审批是否审批中
+         if(row.zfiSupplierStatus == "00"){
+                this.$message({
+                  message: "请内部审批通过后,再签收",
+                  type: 'warning'
+                });
+                return false;
+            }
+          if(row.zfiPlatformStatus == '00'){
+            this.$message({
+                  message: "平台正在审核资料,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请平台审批通过后,再次签署",
+                  type: 'warning'
+                });
+                return false;
+          }  
+          //查询当前用户是否为经办人
+          listCompanyHandler().then((response) => {
+            if(false == response.data){
+                this.$message({
+                    message: "此操作需经办人权限,请确认您是否是经办人",
+                    type: 'warning'
+                });
+                return false;
+            }else{
+                  const zfiId = row.zfiId || this.ids
+                  Cookies.set("/credit/addInformation/"+zfiId + "/", this.$route.fullPath)
+                  this.$router.push({ path: "/credit/addInformation/"+zfiId + "/" });
+            }
+
+        }); 
+      
     },
     //签收
     handleSignFor(row){
+        //判断审批是否审批中
+         if(row.zfiSupplierStatus == "00"){
+                this.$message({
+                  message: "请内部审批通过后,再签收",
+                  type: 'warning'
+                });
+                return false;
+            }
         //查询当前用户是否为经办人
         listCompanyHandler().then((response) => {
            if(false == response.data){
@@ -2066,6 +2241,31 @@ export default {
     },
     //盖章
     seal(row){
+
+        //获取融信类型
+        if(row.zfiCreateType == '1'){//核心开立
+            if(row.zfiCoreStatus != "01"){
+                this.$message({
+                  message: "请内部审批通过后,再签收",
+                  type: 'warning'
+                });
+                return false;
+            }
+        }else if(row.zfiCreateType == '2'){//供应商开立
+            if(row.zfiSupplierStatus != "01"){
+                this.$message({
+                  message: "请内部审批通过后,再签收",
+                  type: 'warning'
+                });
+                return false;
+            }else if(row.zfiPlatformStatus != "01"){
+                 this.$message({
+                  message: "融信资料已提交平台审核,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请留意站内信息",
+                  type: 'warning'
+                 });
+                return false;
+            }
+        }
          //查询当前用户是否为经办人
         listCompanyHandler().then((response) => {
            if(false == response.data){

+ 23 - 21
front-vue/src/views/service/credit/creditSeal.vue

@@ -161,15 +161,16 @@
         </el-row>
         <div class="footer" style="float: right;
             margin-bottom:2px;">
-            <el-button type="success" @click="getContractFile">预览文件</el-button>
-            <el-button type="info" @click="refuse">拒签</el-button>
-            <el-button type="primary" @click="selectType">合同签署</el-button>
+           <!--  <el-button type="success" @click="getContractFile">预览文件</el-button> -->
+            <el-button type="info" @click="refuse">作废</el-button>
+            <!-- <el-button type="primary" @click="selectType">合同签署</el-button> -->
+            <el-button type="success" @click="getContractFile">签署</el-button>
             <el-button @click="cancel">取消</el-button>
         </div>
         <el-dialog
             :visible.sync="pdfShowDialog"
-            width="90%">
-            <pdf-show :pdfFileList="pdfFileList">
+            width="70%">
+            <pdf-show :pdfFileList="pdfFileList" :zfiId="this.form.zfiId" :parent="parent">
             </pdf-show>
         </el-dialog>
          <!--选择签署意愿类型-->
@@ -323,7 +324,8 @@ export default {
             //时间
             proTimer:60,
             //项目编号
-            projectCode:""
+            projectCode:"",
+            parent : this,
         };
     },
     activated() {
@@ -379,6 +381,8 @@ export default {
                  this.getFile(this.payList);
              }
              this.getCreditSealFile();
+             //预览文件
+             this.getContractFile();
         })
     },
     methods: {
@@ -567,15 +571,13 @@ export default {
                  //文件存在
                 if(this.pdfFileList.length > 0 ){
                     this.pdfShowDialog = true;
-
                 }else{
-                      this.$message({
-                        message: '文件不存在!',
-                        type: 'warning'
-                      });
+                      //文件不存在,直接盖章
+                      this.contractSigning();
+
                 }
             }).catch((response)=>{
-                        loading.close();
+                loading.close();
             });
     },
     //选择类型
@@ -809,14 +811,11 @@ export default {
                     });
             contractSigning(this.form).then((response) => {
                 loading.close();
-                this.msgSuccess("盖章成功");
-                if(this.zfpAuthType == '02'){
-                    //关闭短信验证
-                    this.messageIsShow = false;
-                }else if(this.zfpAuthType == '01'){
-                    //关闭人脸二维码
-                    this.faceIsShow = false;
+                //核心开立盖章
+                if(this.form.zfiCreateType == '1' && this.form.zfiCoreStatus == '01' && !this.form.zfiStatus){
+                    this.msgSuccess("开立成功,融信已提交"+this.form.receiveName+"签收");
                 }
+
                 this.$store.dispatch(
                     "tagsView/delView",
                     this.$route
@@ -888,7 +887,7 @@ export default {
                     });
                     sealRefuse(this.form).then(response => {
                         loading.close();
-                        this.msgSuccess("拒签成功");
+                        this.msgSuccess("该笔融信将作废");
                         this.$store.dispatch("tagsView/delView", this.$route);
                         this.$router.go(-1);
                     }).catch((response)=>{
@@ -954,7 +953,10 @@ export default {
 
                 }
         });
-    }
+    },
+    closePdfShow(){
+        this.pdfShowDialog = false;
+    },
     
     }
 };

+ 6 - 2
front-vue/src/views/service/credit/pdfShow.vue

@@ -85,7 +85,7 @@
                 </div>
             </el-dialog>
             <!--授权编号的短信框-->
-            <el-dialog  :visible.sync="projectIsShow" width="800px"  append-to-body :before-close = "cancelProject" center>
+            <el-dialog  :title="授权短信验证"  :visible.sync="projectIsShow" width="800px"  append-to-body :before-close = "cancelProject" center>
                 <el-form ref="projectForm"  :disabled="false" :model="projectForm"  v-if="projectIsShow" label-width="150px"  class="demo-form-inline" :inline="true">
                         <el-form-item label="验证码" prop="code">
                             <el-input v-model="projectForm.code" style="width: 200px" maxlength="6"  oninput="value=value.replace(/[^\d]/g,'')"/>
@@ -204,7 +204,7 @@ export default {
                 //融信信息
                 this.financeData = response.data.financeInf;
                 //接收方
-                this.form.receiveName = response.data.receiveName;
+                this.receiveName = response.data.receiveName;
              }
         })
         this.dialogVisible = true;
@@ -492,6 +492,10 @@ export default {
                 //确权:状态为待确权
                 if(this.zfiStatus == '00'){
                      this.msgSuccess("确权成功,融信已提交,"+this.receiveName+"签收");
+                }else if(this.zfiStatus == '01' && this.zfiCreateType == '0'){//签收
+                     this.msgSuccess("恭喜您成功签收一笔融信");
+                }else if(this.zfiCreateType == '1' && this.zfiCoreStatus == '01' && !this.zfiStatus){//核心开立
+                    this.msgSuccess("开立成功,融信已提交"+this.receiveName+"签收");
                 }
                 if(this.zfpAuthType == '02'){
                     //关闭短信验证

+ 73 - 13
front-vue/src/views/service/credit/signFor.vue

@@ -158,7 +158,7 @@
             </el-table> -->
             <div class="footer" style="float: right;
                 margin-bottom:2px;">
-                <el-button type="info" @click="submitForm('01')">拒</el-button>
+                <el-button type="info" @click="submitForm('01')">拒</el-button>
                 <el-button type="primary" @click="sign()" v-if="!isHas">签收</el-button>
                 <el-button type="primary" @click="submitForm('00')" v-if="isHas">内部审批</el-button>
                 <el-button @click="cancel">取 消</el-button>
@@ -231,6 +231,12 @@
                 <img :src="wordUrl" v-if="show" width='450px' height='500px'/>
                 <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid"/>
             </el-dialog>
+            <el-dialog
+            :visible.sync="pdfShowDialog"
+            width="70%">
+                <pdf-show :pdfFileList="pdfFileList" :zfiId="this.form.zfiId" :parent="parent">
+                </pdf-show>
+            </el-dialog>
         </el-tab-pane>
         <el-tab-pane label="签署合同">
             <el-table :data="otherFileList"  style="width: 100%">
@@ -266,17 +272,18 @@
 </template>
 <script>
 import {getCreditDetail,getAvailableBalance,getAccountsCollection,getFile} from "@/api/service/credit/credit";
-import {signFor,getCreditSealFile} from "@/api/service/credit/creditHandle";
+import {signFor,getCreditSealFile,getContractFile} from "@/api/service/credit/creditHandle";
 import {accAdd} from "@/utils/calculation";
 import {getToken} from "@/utils/auth";
 import AddBill from "@/views/service/bill/addBill";
 import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
 import {listCompanyHandler} from "@/api/common/companyHandler";
-import Cookies from 'js-cookie';
+import pdfShow from "./pdfShow";
 import DetailBill from "@/views/service/credit/billDetail";
+import {contractSigning} from "@/api/service/credit/message";
 export default {
     name: "addCredit",
-    components: {AddBill,DetailBill},
+    components: {AddBill,DetailBill,pdfShow},
     data() {
         return {
             //往来账款id
@@ -382,6 +389,9 @@ export default {
           zfiSupplierStatus:"",
           //融信编号
           zfiId:"",
+          pdfFileList : [],
+          pdfShowDialog : false,
+          parent : this,
           
         };
     },
@@ -802,11 +812,11 @@ export default {
                                  loading.close();
                                 //通过
                                 if("00" == param){
-                                    _this.msgSuccess("融信资料已提交企业内部审核");
+                                    _this.msgSuccess("融信资料已提交内部审核");
                                     _this.$store.dispatch("tagsView/delView", _this.$route);
                                     _this.$router.go(-1);
                                 }else if ("01" == param){//拒绝
-                                    _this.msgSuccess("拒绝后,该笔融信业务将作废");
+                                    _this.msgSuccess("该笔融信将作废");
                                     _this.$store.dispatch("tagsView/delView", _this.$route);
                                     _this.$router.go(-1);
                                 }
@@ -825,11 +835,11 @@ export default {
                          loading.close();
                         //通过
                         if("00" == param){
-                            this.msgSuccess("融信资料已提交企业内部审核");
+                            this.msgSuccess("融信资料已提交内部审核");
                             this.$store.dispatch("tagsView/delView", this.$route);
                             this.$router.go(-1);
                         }else if ("01" == param){//拒绝
-                            this.msgSuccess("拒绝后,该笔融信业务将作废");
+                            this.msgSuccess("该笔融信将作废");
                             this.$store.dispatch("tagsView/delView", this.$route);
                             this.$router.go(-1);
                         }
@@ -904,7 +914,7 @@ export default {
     },
     //新增应付
     addPay(){
-        //获取选中第一个的预计还款日期
+         //获取选中第一个的预计还款日期
         if(this.chooseTicket[0]){
             var zbiPayDate = this.chooseTicket[0].zbiPayDate;
             this.payDate = zbiPayDate;
@@ -958,7 +968,7 @@ export default {
     sign(){
           if(this.zfiSupplierStatus != "01"){
                 this.$message({
-                  message: "请内部审核通过后,再融信签收",
+                  message: "请内部审批通过后,再签收",
                   type: 'warning'
                 });
                 return false;
@@ -973,13 +983,63 @@ export default {
                     });
                     return false;
                 }else{
-                    Cookies.set("/credit/creditSeal/"+this.zfiId + "/", this.$route.fullPath)
-                    this.$router.push({ path: "/credit/creditSeal/"+this.zfiId + "/" });
+                        //预览文件
+                        this.getContractFile();
                     }
 
             }); 
 
-    }
+    },
+    //获取合同文件
+    getContractFile(){
+        const loading = this.$loading({
+                    lock: true,
+                    text: 'Loading',
+                    background: 'rgba(0, 0, 0,0)'
+                });
+         getContractFile(this.form).then((response) => {
+                loading.close();
+                if(response.data.list){
+                    this.pdfFileList = response.data.list;
+                }
+                 //文件存在
+                if(this.pdfFileList.length > 0 ){
+                    this.pdfShowDialog = true;
+
+                }else{
+                     /*  this.$message({
+                        message: '文件不存在!',
+                        type: 'warning'
+                      }); */
+                      //文件不存在,直接调盖章
+                      this.contractSigning();
+                }
+            }).catch((response)=>{
+                        loading.close();
+            });
+    },
+    closePdfShow(){
+        this.pdfShowDialog = false;
+    },
+    //盖章
+    contractSigning(){
+            const loading = this.$loading({
+                        lock: true,
+                        text: 'Loading',
+                        background: 'rgba(0, 0, 0,0)'
+                    });
+            contractSigning(this.form).then((response) => {
+                loading.close();
+                this.msgSuccess("恭喜您成功签收一笔融信");
+                this.$store.dispatch(
+                    "tagsView/delView",
+                    this.$route
+                );
+                this.$router.go(-1);
+            }).catch((response) => {
+                loading.close();
+            });
+    },
   }
 };
 </script>