xuefy 4 年之前
父节点
当前提交
3817d7e9a6

+ 20 - 1
front-vue/src/api/service/credit/creditHandle.js

@@ -12,8 +12,27 @@ export function approveCredit(data) {
 //补充资料
 export function addInfor(data) {
   return request({
-    url: '/sc-service/creditHandle',
+    url: '/sc-service/ownCreditHandle',
     method: 'post',
     data: data
   })
+}
+
+
+//签收
+export function signFor(data) {
+  return request({
+    url: '/sc-service/ownCreditHandle/signFor',
+    method: 'put',
+    data: data
+  })
+}
+
+//获取合同文件信息
+export function getContractFile(data) {
+  return request({
+    url: '/sc-service/ownCreditHandle/getContractFile',
+    method: 'put',
+    data: data
+  })
 }

+ 128 - 8
front-vue/src/views/service/credit/addCredit.vue

@@ -15,7 +15,6 @@
                             </el-option>
                         </el-select>
                     </el-form-item>
-
                 </el-col>
                 <el-col :span="8">
                     <span>可用额度:</span>
@@ -173,6 +172,29 @@
                 <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
             </span>
         </el-dialog>
+        <!--选择签署意愿类型-->
+        <el-dialog  :visible.sync="confirmIsShow" width="600px" append-to-body :before-close = "cancelUpdate">
+            <el-form ref="updateForm"  :disabled="false" :model="updateForm"  v-if="confirmIsShow" label-width="150px"  class="demo-form-inline" :inline="true">
+                 <el-radio-group v-model="updateForm.radio">
+                    <el-radio label="01">人脸</el-radio>
+                    <el-radio label="02">短信</el-radio>
+                 </el-radio-group>
+            </el-form>
+              
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="getContractFile">确 定</el-button>
+                <el-button @click="cancelUpdate">取 消</el-button>
+            </div>
+        </el-dialog>
+        <el-dialog
+            title="预览"
+            :visible.sync="pdfShowDialog"
+            width="30%">
+            <pdf-show
+            :pdfFileList="pdfFileList"
+            >
+            </pdf-show>
+        </el-dialog>
     </div>
 </template>
 <script>
@@ -184,11 +206,13 @@ import {
     addCredit,
     getFile
 } from "@/api/service/credit/credit";
+import {getContractFile} from "@/api/service/credit/creditHandle";
 import { getRandom } from "@/api/common/getRandom";
 import { accAdd } from "@/utils/calculation";
+import pdfShow from "./pdfShow";
 export default {
     name: "addCredit",
-    components: {},
+    components: {pdfShow},
     data() {
         return {
             // 总条数
@@ -256,7 +280,7 @@ export default {
                         message: "请选择承诺还款日",
                         trigger: ["blur", "change"],
                     },
-                ],
+                ]
             },
             // 是否显示弹出层
             open: false,
@@ -295,7 +319,15 @@ export default {
             //发票附件
             invoiceFileList:[],
             //其他文件
-            otherFileList:[]
+            otherFileList:[],
+            //签署意愿
+            zfpAuthType:"",
+            //展示选择意愿
+            confirmIsShow:false,
+            //意愿
+            updateForm:{},
+            pdfShowDialog : false,
+            pdfFileList : []
         };
     },
     created() {
@@ -316,7 +348,8 @@ export default {
                         zfpcrLoanType: item.zfpcrLoanType,
                         zfpSplit: item.zfpSplit,
                         zfpId: item.zfpId,
-                        zfpcrRate:item.zfpcrRate
+                        zfpcrRate:item.zfpcrRate,
+                        zfpAuthType:item.zfpAuthType
                     };
                 });
             });
@@ -377,6 +410,31 @@ export default {
             this.queryParamsPay.pageNum = 1;
             this.getAccountsPay();
         },
+        //取消选择意愿
+        cancelUpdate(){
+            this.confirmIsShow = false;
+            this.resetUpdate();
+        },
+        resetUpdate() {
+            this.updateForm = {
+                radio:"1"
+            };
+            this.resetForm("updateForm");
+        },
+        //确定选择意愿
+        confirmSubmit(){
+            if(!this.updateForm.radio){
+                this.$message({
+                    message: '请选择签署意愿类型',
+                    type: 'warning'
+                });
+                return;
+            }
+
+            this.confirmIsShow = false;
+            this.zfpAuthType = this.updateForm.radio;
+            this.selectType();
+        },
         //打开应付账款选择列表
         openTicket() {
             this.getAccountsPay();
@@ -489,10 +547,10 @@ export default {
         },
         //取消选择按钮
         cancelTicket() {
-            this.ticketList = [];
+            /* this.ticketList = [];
             if (this.$refs.tablePay) {
                 this.$refs.tablePay.clearSelection();
-            }
+            } */
             this.open = false;
         },
         /** 清空选择信息 */
@@ -540,6 +598,8 @@ export default {
                 this.zfpcrRate = "";
                 //有效期类型
                 this.zfpcrDateType = "";
+                //签署意愿
+                this.zfpAuthType ="";
                 return;
             }
             let obj = {};
@@ -556,6 +616,8 @@ export default {
             this.zfpId = obj.zfpId;
             //利率
             this.zfpcrRate = obj.zfpcrRate;
+            //签署意愿
+            this.zfpAuthType = obj.zfpAuthType;
             //长期
             if ("0" == this.zfpcrDateType) {
                 this.validityDate = "长期";
@@ -674,10 +736,29 @@ export default {
             }
             return chineseStr;
         },
+        selectType(){
+                this.$refs["form"].validate((valid) => {
+                    if(valid){
+                         //全部
+                        if(this.zfpAuthType == '00'){
+
+                            this.confirmIsShow = true;
+                            
+                        }else if(this.zfpAuthType == '01'){
+                            //人脸
+                            alert("人脸");
+                        }else if(this.zfpAuthType == '02'){
+                            //短信
+                            alert("短信");
+                        }
+                    }
+                    
+                });
+        },
         //新增
         submitForm() {
             this.$refs["form"].validate((valid) => {
-               if(parseFloat(this.form.zfiAmount) > parseFloat(this.availableAmt)){
+               if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))){
                     this.$message({
                             message: '签发金额不可大于可用金额',
                             type: 'warning'
@@ -712,6 +793,8 @@ export default {
                                         _this.form.zfpId = _this.zfpId;
                                         //应付账款
                                         _this.form.ticketList = _this.ticketList;
+                                        //可用额度
+                                        _this.form.availableAmt = _this.moneyDelete(_this.availableAmt);
                                         addCredit(_this.form).then((response) => {
                                                 loading.close();
                                                 _this.msgSuccess("新增成功");
@@ -739,6 +822,8 @@ export default {
                                 this.form.zfpId = this.zfpId;
                                 //应付账款
                                 this.form.ticketList = this.ticketList;
+                                //可用额度
+                                this.form.availableAmt = this.moneyDelete(this.availableAmt);
                                 addCredit(this.form).then((response) => {
                                         loading.close();
                                         this.msgSuccess("新增成功");
@@ -764,6 +849,8 @@ export default {
                         this.form.zfpId = this.zfpId;
                         //应付账款
                         this.form.ticketList = this.ticketList;
+                        //可用额度
+                        this.form.availableAmt = this.moneyDelete(this.availableAmt);
                         addCredit(this.form).then((response) => {
                                 loading.close();
                                 this.msgSuccess("新增成功");
@@ -790,6 +877,23 @@ export default {
                 }else{
                     return num;
                 }
+        },
+        //获取合同文件
+        getContractFile(){
+             //产品
+             this.form.zfpcrProductId = this.zfpId;
+             //节点
+             this.form.code = "02";
+             getContractFile(this.form).then((response) => {
+               if(response.data.list){
+                   
+                 this.pdfFileList = response.data.list;
+                   /*   for(var i = 0 ; i < list.length;i++){
+                        var base64 = list[i].base64;
+                        <embed src="base64"  type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
+                   } */
+               }
+            });
         }
     },
 };
@@ -809,4 +913,20 @@ table th.star div::before {
     content: "*";
     color: red;
 }
+.el-dialog{
+       display: flex;
+       flex-direction: column;
+       margin:0 !important;
+       position:absolute;
+       top:50%;
+       left:50%;
+       transform:translate(-50%,-50%);
+       /*height:600px;*/
+       max-height:calc(100% - 30px);
+       max-width:calc(100% - 30px);
+   }
+.el-dialog .el-dialog__body{
+    flex:1;
+    overflow: auto;
+}
 </style>

+ 2 - 12
front-vue/src/views/service/credit/addInformation.vue

@@ -355,16 +355,6 @@ export default {
         rowkeyCustomer(row) {
             return row.cciId;
         },
-        //重新合计
-        getReTotal(chooseTicket){
-                 //合计
-                this.checkTotalAmt = "0.00";
-                for(var i = 0; i < chooseTicket.length;i++){
-                        this.checkTotalAmt  = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
-                }
-                this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
-                this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
-        },
         //获取附件信息
         getFile(datas){
             var queryParamsFile = {};
@@ -499,10 +489,10 @@ export default {
       },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+        /* this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */

+ 2 - 2
front-vue/src/views/service/credit/applyCreditEdit.vue

@@ -515,10 +515,10 @@ export default {
     },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+        /* this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */

+ 2 - 2
front-vue/src/views/service/credit/confirmationAudit.vue

@@ -511,10 +511,10 @@ export default {
     },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+       /*  this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */

+ 22 - 7
front-vue/src/views/service/credit/credit.vue

@@ -182,29 +182,33 @@
             type="text"
             icon="el-icon-edit"
             @click="handleApprove(scope.row)"
-            v-if="scope.row.zfiCreateType != '1' && (scope.row.zfiStatus == '00'||scope.row.zfiStatus == '06')"
             v-hasPermi="['credit:credit:approve']"
-          >确权审核</el-button>
+          >确权</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleAddInformation(scope.row)"
-            v-if="scope.row.zfiCreateType == '1' && (scope.row.zfpPlatform == '1')"
             v-hasPermi="['credit:credit:addInfor']"
+            v-if="scope.row.zfiCreateType == '1'"
           >补充资料</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleAddSignFor(scope.row)"
-            v-if="(scope.row.zfiCreateType == '1' && scope.row.zfpPlatform == '0') || (scope.row.zfiCreateType == '0' && scope.row.zfiStatus == '01') || (scope.row.zfiCreateType == '1' && scope.row.zfiStatus == '01')"
+            @click="handleSignFor(scope.row)"
             v-hasPermi="['credit:credit:signFor']"
           >签收</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleGoFinance(scope.row)"
+            v-hasPermi="['credit:credit:goFinance']"
+          >去融资</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
     <pagination
       v-show="total>0"
       :total="total"
@@ -460,7 +464,18 @@ export default {
         Cookies.set("/credit/addInformation/"+zfiId + "/", this.$route.fullPath)
         this.$router.push({ path: "/credit/addInformation/"+zfiId + "/" });
     },
-
+    //签收
+    handleSignFor(row){
+        const zfiId = row.zfiId || this.ids
+        Cookies.set("/credit/signFor/"+zfiId + "/", this.$route.fullPath)
+        this.$router.push({ path: "/credit/signFor/"+zfiId + "/" });
+    },
+    //去融资
+    handleGoFinance(row){
+        const zfiId = row.zfiId || this.ids
+        Cookies.set("/credit/goFinance/"+zfiId + "/", this.$route.fullPath)
+        this.$router.push({ path: "/credit/goFinance/"+zfiId + "/" });
+    },
     //格式化类型
     typeFormat(row, column) {
       return this.selectDictLabel(this.typeOptions, row.zfiCreateType);

+ 2 - 2
front-vue/src/views/service/credit/creditApply.vue

@@ -431,10 +431,10 @@ export default {
     },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+     /*    this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */

+ 8 - 13
front-vue/src/views/service/credit/creditUpdate.vue

@@ -401,16 +401,7 @@ export default {
         rowkeyCustomer(row) {
             return row.cciId;
         },
-        //重新合计
-        getReTotal(chooseTicket){
-                 //合计
-                this.checkTotalAmt = "0.00";
-                for(var i = 0; i < chooseTicket.length;i++){
-                        this.checkTotalAmt  = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
-                }
-                this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
-                this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
-        },
+       
         //获取附件信息
         getFile(datas){
             var queryParamsFile = {};
@@ -546,10 +537,10 @@ export default {
       },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+        /* this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */
@@ -715,7 +706,7 @@ export default {
     //修改
     submitForm(){
         this.$refs["form"].validate(valid => {
-            if(parseFloat(this.form.zfiAmount) > parseFloat(this.availableAmt)){
+            if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))){
                     this.$message({
                             message: '签发金额不可大于可用金额',
                             type: 'warning'
@@ -748,6 +739,8 @@ export default {
                             _this.form.zfiRate = _this.zfiRate;
                             //融信类型
                             _this.form.type = "1";
+                             //可用额度
+                            _this.form.availableAmt = _this.moneyDelete(_this.availableAmt);
                             updateCredit(_this.form).then(response => {
                                 loading.close();
                                 _this.msgSuccess("修改成功");
@@ -773,6 +766,8 @@ export default {
                     this.form.zfiRate = this.zfiRate;
                     //融信类型
                     this.form.type = "1";
+                     //可用额度
+                    this.form.availableAmt = this.moneyDelete(this.availableAmt);
                     updateCredit(this.form).then(response => {
                         loading.close();
                         this.msgSuccess("修改成功");

+ 3 - 3
front-vue/src/views/service/credit/financeOpen.vue

@@ -508,10 +508,10 @@ export default {
     },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+      /*   this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */
@@ -698,7 +698,7 @@ export default {
             }
         } */
 
-        if(parseFloat(this.form.zfiAmount) > parseFloat(this.availableAmt)){
+        if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))){
              this.$message({
                     message: '签发金额不可大于可用金额',
                     type: 'warning'

+ 3 - 3
front-vue/src/views/service/credit/financeOpenUpdate.vue

@@ -541,10 +541,10 @@ export default {
     },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+       /*  this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */
@@ -726,7 +726,7 @@ export default {
                 return;
             }
         } */
-        if(parseFloat(this.form.zfiAmount) > parseFloat(this.availableAmt)){
+        if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.availableAmt))){
              this.$message({
                     message: '签发金额不可大于可用金额',
                     type: 'warning'

+ 17 - 9
front-vue/src/views/service/credit/goFinance.vue

@@ -6,7 +6,7 @@
         <el-row>
           <el-col :span="8">
             <el-form-item label="融信编号:" prop="zfrFinanceId">
-              <el-select v-model="form.zfrFinanceId" style="width : 284px" clearable @clear="clearBoth">
+              <el-select v-model="form.zfrFinanceId" style="width : 284px"   :disabled="true" clearable @clear="clearBoth">
                   <el-option
                     v-for="(item,index) in financeInfList"
                     :key="index"
@@ -114,10 +114,11 @@
                 </template>
             </el-table-column>
           </el-table>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <!-- <el-button @click="cancel">取 消</el-button> -->
-      </div>
+      <div class="footer" style="float: right;
+            margin-bottom:2px;">
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button @click="cancel">取 消</el-button>
+        </div>
   </div>
 </template>
 
@@ -193,21 +194,28 @@ export default {
     };
   },
   created() {
-    this.getFinanceInf();
+      const zfiId = this.$route.params && this.$route.params.zfiId;
+      this.$set(this.form, "zfrFinanceId", zfiId);
+      this.getFinanceInf(zfiId);
   },
   methods: {
      /** 查询融信编号 */
-    getFinanceInf(){
+    getFinanceInf(zfiId){
       this.loading = true;
       listFinanceInf().then(response => {
         this.financeInfList = response.data;
+        for (let item of this.financeInfList) {
+          if (item.zfiId == zfiId) {
+            this.amount(item);
+          }
+        }
         this.loading = false;
       });
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+            this.$store.dispatch("tagsView/delView", this.$route);
+            this.$router.go(-1);
     },
     // 表单重置
     reset() {

+ 94 - 0
front-vue/src/views/service/credit/pdfShow.vue

@@ -0,0 +1,94 @@
+<template>
+    <div>
+        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
+
+        <el-dialog title="提示" :visible.sync="dialogVisible" width="50%" height="1080px;" :before-close="handleClose" append-to-body	>
+            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+                <el-tab-pane v-for="item in pdfFileList" :key="item.value" label="申请协议" name="first"  style="height:780px;">
+                    <embed :src="'data:application/pdf;base64,' + item.base64"  type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
+                </el-tab-pane>
+                <!-- <el-tab-pane label="申请协议" name="first"  style="height:780px;">
+                    招采融信申请协议
+                    编号:ZCRXKL-20210712001
+                    本《供应链金融服务平台融信转让协议》(以下简称为“本协议”、“《融信转让
+                    协议》”)由融信转让人、融信受让人于本协议约定的时间在北京市东城区签署:
+                    融信转让人:B 供应商 2_TSCF 培训专用
+                    住所:成都市高新区新园南二路一号
+                    法定代表人:张健
+                    融信受让人:B 供应商 1_TSCF 培训专用
+                    住所:成都市高新区新园南二路一号
+                    法定代表人:张健 鉴于:
+                    (A) 融信反向保理平台由中粮资本科技有限责任公司建设并运营,向用户提供
+                    应收账款管理、转让、融资等服务。
+                    (B) 融信转让人与融信受让人(以下简称为“双方”)均为融信反向保理平台的
+                    用户。
+                    (C) 融信转让人现持有融信,享有融信项下的应收账款债权。
+                    (D) 双方均同意使用融信反向保理平台的服务,现融信转让人拟将融信项下应
+                    收账款债权全部或部分通过融信反向保理平台转让给融信受让人,融信受
+                    因此,经双方协商一致,签订本协议,约定如下:
+                </el-tab-pane>
+                <el-tab-pane label="配置管理" name="second" style="height:780px;">
+                    住所:成都市高新区新园南二路一号
+                    法定代表人:张健
+                    融信受让人:B 供应商 1_TSCF 培训专用
+                    住所:成都市高新区新园南二路一号
+                    法定代表人:张健 鉴于:
+                    (A) 融信反向保理平台由中粮资本科技有限责任公司建设并运营,向用户提供
+                    应收账款管理、转让、融资等服务。
+                    (B) 融信转让人与融信受让人(以下简称为“双方”)均为融信反向保理平台的
+                    用户。
+                    (C) 融信转让人现持有融信,享有融信项下的应收账款债权。
+                    (D) 双方均同意使用融信反向保理平台的服务,现融信转让人拟将融信项下应
+                    收账款债权全部或部分通过融信反向保理平台转让给融信受让人,融信受
+                    因此,经双方协商一致,签订本协议,约定如下:</el-tab-pane> -->
+
+            </el-tabs>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+
+
+<script>
+//import PDFObject from 'pdfobject'
+export default {
+    props : ['pdfFileList'],
+    data() {
+        return {
+            activeName: "first",
+            dialogVisible: false,
+            dialogTableVisible: false,
+            dialogFormVisible: false,
+            form: {
+                name: "",
+                region: "",
+                date1: "",
+                date2: "",
+                delivery: false,
+                type: [],
+                resource: "",
+                desc: "",
+            },
+            formLabelWidth: "120px",
+        };
+    },
+    created() {
+        for(var i = 0 ; i < this.pdfFileList.length; i++){
+            var base64 = this.pdfFileList[i].base64;
+            <embed src="data:application/pdf;base64,"  type="application/pdf" title="Embedded PDF" style="overflow: auto; width: 100%; height: 100%;"/>
+        } 
+    },
+    methods: {
+        handleClose(done) {
+            this.$confirm("确认关闭?")
+                .then((_) => {
+                    done();
+                })
+                .catch((_) => {});
+        },
+    },
+};
+</script>

+ 66 - 160
front-vue/src/views/service/credit/signFor.vue

@@ -1,103 +1,10 @@
 <template>
     <div class="app-container">
         <el-form ref="form" :model="form" :rules="rules" :inline="true" style="margin-top: 20px" label-width="auto" >
-            <el-divider content-position="left">补充资料</el-divider>
-            <el-row>
-                <el-col :span="8">
-                        <el-form-item label="融信编号" prop="zfiNumber">
-                            <el-input v-model="form.zfiNumber" style="width: 200px" disabled/>
-                        </el-form-item>
-                </el-col> 
-                <el-col :span="8">
-                        <el-form-item label="创建时间" prop="createTime">
-                           <el-date-picker disabled size="small" style="width: 200px" v-model="form.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss">
-                            </el-date-picker>
-                        </el-form-item>
-                </el-col> 
-                <el-col :span="8">
-                        <el-form-item label="创建人" prop="createName">
-                            <el-input v-model="form.createName" style="width: 200px" disabled/>
-                        </el-form-item>
-                </el-col> 
-                <el-col :span="8">
-                        <el-form-item label="开立方" prop="openName">
-                            <el-input v-model="form.openName" style="width: 200px" disabled/>
-                        </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                    <el-form-item label="接收方" prop="zfiSupplierId">
-                        <el-select
-                            style="width: 200px"
-                            v-model="form.zfiSupplierId"
-                            filterable
-                            clearable
-                            remote
-                            disabled
-                            >
-                            <el-option
-                            v-for="item in supplierList"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value">
-                            </el-option>
-                            </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                    <el-form-item label="签发有效期" prop="zfiEffectiveDate"> 
-                        <el-date-picker clearable size="small" style="width: 200px"
-                            v-model="form.zfiEffectiveDate"
-                            type="date"
-                            value-format="yyyy-MM-dd"
-                            placeholder="选择签发有效期"
-                            disabled>
-                        </el-date-picker>
-                    </el-form-item>
-                </el-col>
-            </el-row>
-            <el-row>
-                <el-col :span="8">
-                    <el-form-item label="承诺还款日" prop="zfiExpireDate"> 
-                        <el-date-picker clearable size="small" style="width: 200px"
-                            v-model="form.zfiExpireDate"
-                            type="date"
-                            value-format="yyyy-MM-dd"
-                            placeholder="选择承诺还款日"
-                            disabled>
-                        </el-date-picker>
-                    </el-form-item>
-                </el-col> 
-                <el-col :span="8">
-                    <el-form-item label="授信额度" prop="zfiCoreQuotaId">
-                        <el-select
-                            style="width: 200px"
-                            v-model="form.zfiCoreQuotaId"
-                            filterable
-                            clearable
-                            remote
-                            disabled
-                            >
-                            <el-option
-                            v-for="item in creditLineList"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value">
-                            </el-option>
-                            </el-select>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                    <span>可用额度:</span>
-                    <span>{{availableAmt}}</span>
-                    <br>   
-                    <span>有效期:</span>
-                    <span>{{validityDate}}</span>  
-                </el-col>
-            </el-row>  
-            <el-divider content-position="left" >应收账款</el-divider>
+            <el-divider content-position="left">签收</el-divider>
             <el-form-item  style="margin-left: 100px">
-                 <el-button size="mini" type="primary" @click="openTicket">选择</el-button>
-                 <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
+                 <el-button size="mini" type="primary" :disabled="isClick" @click="openTicket">选择</el-button>
+                 <el-button size="mini" @click="deleteTicekt" :disabled="isClick" >清空全部</el-button>
                 <el-form-item label="合计金额:"> 
                         <span>{{checkTotalAmt}}</span>
                 </el-form-item>
@@ -117,6 +24,7 @@
                             size="mini"
                             type="text"
                             icon="el-icon-delete"
+                            :disabled="isClick"
                             @click="handleDelete(scope.$index, ticketList)"
                         >删除</el-button>
                         </template>
@@ -186,7 +94,8 @@
         </el-table>
         <div class="footer" style="float: right;
             margin-bottom:2px;">
-            <el-button type="primary" @click="submitForm">确 定</el-button>
+            <el-button type="info" @click="submitForm('01')">拒签</el-button>
+            <el-button type="primary" @click="submitForm('00')">签收</el-button>
             <el-button @click="cancel">取 消</el-button>
         </div>
            <!-- 应收账款信息 -->
@@ -247,8 +156,8 @@
   </div>
 </template>
 <script>
-import {getCreditDetail,getReceiverList,listCreditLine,getAvailableBalance,getAccountsCollection,updateCredit,getFile} from "@/api/service/credit/credit";
-import {addInfor} from "@/api/service/credit/creditHandle";
+import {getCreditDetail,getAvailableBalance,getAccountsCollection,getFile} from "@/api/service/credit/credit";
+import {signFor,getContractFile} from "@/api/service/credit/creditHandle";
 import {accAdd} from "@/utils/calculation";
 export default {
     name: "addCredit",
@@ -317,7 +226,12 @@ export default {
           //开立方编号
           zfiCoreId:"",
           //接收方
-          zfiSupplierId:""  
+          zfiSupplierId:"" ,
+          //融信类型
+          zfiCreateType:"",
+          //控制按钮是否可点击
+          isClick:true
+          
         };
     },
     watch:{
@@ -327,14 +241,22 @@ export default {
          const zfiId = this.$route.params && this.$route.params.zfiId;
          getCreditDetail(zfiId).then((response) => {
              if(response.data){
-                //接收方编号
-                this.supplierForm.zfiSupplierId = response.data.financeInf.zfiSupplierId;
-                getReceiverList(this.supplierForm).then((response) => {
-                  this.supplierList = response.data.records.map(item => {
-                      return { value: item.scyId, label: item.scyName};
-                  }); 
-                });
-                this.listCreditLine(response.data);
+                 //签发金额
+                this.form= response.data.financeInf;
+                //签发金额大写
+                this.issuedAmount = this.smallToBig(this.form.zfiAmount);
+                //开立方编号
+                this.zfiCoreId = response.data.financeInf.zfiCoreId;
+                //接收方
+                this.zfiSupplierId = response.data.financeInf.zfiSupplierId;
+                //类型
+                this.zfiCreateType = response.data.financeInf.zfiCreateType;
+                //核心
+                if( this.zfiCreateType == "1"){
+                    this.isClick = false;
+                }else{
+                    this.isClick = true;
+                }
              }
              if(response.data.payList){
                  this.ticketList = response.data.payList.records;
@@ -355,16 +277,6 @@ export default {
         rowkeyCustomer(row) {
             return row.cciId;
         },
-        //重新合计
-        getReTotal(chooseTicket){
-                 //合计
-                this.checkTotalAmt = "0.00";
-                for(var i = 0; i < chooseTicket.length;i++){
-                        this.checkTotalAmt  = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
-                }
-                this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
-                this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
-        },
         //获取附件信息
         getFile(datas){
             var queryParamsFile = {};
@@ -394,26 +306,6 @@ export default {
             this.open = true;
             this.payTitle = "应收账款";
         },
-        //核心授信额度
-        listCreditLine(data){
-              this.creditParams.zfpcrId = data.financeInf.zfiCoreQuotaId;
-              listCreditLine(this.creditParams).then((response) => {
-                this.creditLineList = response.data.map(item => {
-                    return { value: item.zfpcrId, label: item.zfpName,zfpcrDateType:item.zfpcrDateType,zfpcrEndDate:item.zfpcrEndDate,zfpcrLoanType:item.zfpcrLoanType,zfpSplit:item.zfpSplit,zfpId:item.zfpId,zfpcrRate:item.zfpcrRate};
-                }); 
-                this.form = data.financeInf;
-                //开立方
-                this.form.openName = data.openName;
-                //创建人
-                this.form.createName = data.createName;
-                //签发金额大写
-                this.issuedAmount = this.smallToBig(this.form.zfiAmount);
-                //开立方编号
-                this.zfiCoreId = data.financeInf.zfiCoreId;
-                //接收方
-                this.zfiSupplierId = data.financeInf.zfiSupplierId;
-              });
-        },   
         //应收账款查询列表
         getAccountsCollection() {
             //开立方为应收企业的
@@ -499,10 +391,10 @@ export default {
       },
     //取消选择按钮
     cancelTicket(){
-        this.ticketList = [];
+        /* this.ticketList = [];
         if(this.$refs.tablePay){
             this.$refs.tablePay.clearSelection();
-        }
+        } */
         this.open = false;
     },
     /** 清空选择信息 */
@@ -666,22 +558,26 @@ export default {
         });
     },
     //修改
-    submitForm(){
+    submitForm(param){
         this.$refs["form"].validate(valid => {
-            if(this.ticketList.length < 1){
+            //通过
+           if(param == "00"){
+                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(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
-                this.$message({
-                        message: '签发金额不可大于合计金额',
-                        type: 'warning'
-                    });
-                    return;
-            }
+                            message: '签发金额不可大于合计金额',
+                            type: 'warning'
+                        });
+                        return;
+                }
+           }
+            
             if (valid) {
                 const loading = this.$loading({
                     lock: true,
@@ -698,9 +594,10 @@ export default {
                         }).then(function() {
                            //应收账款
                             _this.form.ticketList = _this.ticketList;
-                            addInfor(_this.form).then(response => {
+                             _this.form.flag = param;
+                            signFor(_this.form).then(response => {
                                 loading.close();
-                                _this.msgSuccess("补充资料成功");
+                                _this.msgSuccess("签收成功");
                                 _this.$store.dispatch("tagsView/delView", _this.$route);
                                 _this.$router.go(-1);
                             }).catch((response)=>{
@@ -713,9 +610,10 @@ export default {
             }else{
                     //应收账款
                     this.form.ticketList = this.ticketList;
-                    addInfor(this.form).then(response => {
+                    this.form.flag = param;
+                    signFor(this.form).then(response => {
                         loading.close();
-                        this.msgSuccess("补充资料成功");
+                        this.msgSuccess("签收成功");
                         this.$store.dispatch("tagsView/delView", this.$route);
                         this.$router.go(-1);
                     }).catch((response)=>{
@@ -735,8 +633,16 @@ export default {
             }else{
                 return num;
             }
-    }  
-    
+    },
+    //获取合同文件  
+    getContractFile(){
+        var fileForm = {};
+        getContractFile().then(response => {
+            
+        }).catch((response)=>{
+            loading.close();
+        });
+    }
   }
 };
 </script>