<template>
  <div class="eContainer">
    <c-page title="出口信保保单融资详情、操作">
      <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
        <c-tabs v-model="tabVal" ref="elment" type="card">
          <el-tab-pane label="融资信息界面" name="mainp">
            <m-mainp :model="model" :codes="codes" />
          </el-tab-pane>
          <el-tab-pane label="单据信息界面" name="danjup">
            <m-danjup :model="model" :codes="codes" />
          </el-tab-pane>
        </c-tabs>
      </el-form>
      <div class="m-Btn-eContainer">
        <div class="m-funcBtn-eContainer" style="text-align: center">
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('detsrc')" @click="queryDetail">详情查询</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('kjcbtz')" @click="applyNoticeApl">承保通知</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('cbtzxz')" @click="applyNoticeDown">承保下载</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('bund')" @click="handleAplBund">绑定</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('unbund')" @click="handleAplUnBund">解绑定</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('loareg')" @click="sinoPay">放款登记</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('rcvreg')" @click="aplSinoRecOnce">还款登记</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('stamdf')" @click="staMdf">状态修改</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('apldel')" @click="apldel">申请废弃</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('loaund')" @click="loaund">放款冲正</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('sav')" @click="handleSubmit">提交</el-button>
          <el-button type="primary" size="small" style="margin-right: 10px" :disabled="this.isDisabledButton('exit')" @click="handleExit">退出</el-button>
        </div>
      </div>
    </c-page>

    <el-dialog v-dialogDrag v-if="showDialog" :visible.sync="showDialog" :title="title">
      <c-col :span="24">
        <c-input type="textarea" v-model="model.recgrp.rec.rfurea" maxlength="49" :row="4" show-word-limit placeholder="请输入废弃原因">废弃原因</c-input>
      </c-col>
      <c-col :span="24">
        <c-col :span="12">
          <el-button type="primary" size="small" style="margin-right: 10px" @click="handleConfirm">确认</el-button>
        </c-col>
        <c-col :span="12">
          <el-button type="primary" size="small" style="margin-right: 10px" @click="handleCancel">取消</el-button>
        </c-col>
      </c-col>
    </el-dialog>

    <el-dialog :visible.sync="showDetails" title="详情查询">
      <m-detailinfo :info="model.info"></m-detailinfo>
    </el-dialog>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CodeTable from "~/config/CodeTable";
import event from "../event";
import Check from "../model/check";
import Default from "../model/default";
import Dbizxb from "../model";
import Mainp from "./Mainp";
import Danjup from "./Danjup";
import detailinfo from "./detailinfo";

export default {
  name: "Dbizxb",
  components: {
    "m-mainp": Mainp,
    "m-danjup": Danjup,
    "m-detailinfo": detailinfo
  },
  provide() {
    return {
      root: this
    };
  },
  mixins: [Check, Default, event],
  data() {
    return {
      tabVal: "mainp",
      trnName: "dbizxb",
      trnType: "",
      title: "",
      showDialog: false,
      showDetails: false,
      model: new Dbizxb().data,
      codes: {
        ...CodeTable
      }
    };
  },
  methods: {
    
  },
  created() {
    console.log("进入dbizxb交易");
    let params = {
      transName: this.trnName,
      recgrp: {
        rec: {
          inr: this.$route.query.inr
        }
      }
    };
    this.init(params);
  }
};
</script>
<style scoped lang="less">
.m-Btn-eContainer {
  display: flex; /*flex布局*/
  position: relative;
  z-index: 10;
  height: 54px;
  padding: 10px 20px;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  background-color: var(--white);
  box-shadow: 0 0 11px 0 rgba(0, 0, 0, 0.1);
}
.m-funcBtn-eContainer {
  order: 1;
}
.m-funcBtn-eContainer button,
.m-funcBtn-eContainer .el-button + .el-button {
  margin: 0px 10px 0px 0px;
}
.m-funcBtn-eContainer .el-button--default {
  /* background-image: linear-gradient(#fff,#dedede); */
  border: 1px solid #ccc;
}
/* ui美化 */
.m-Btn-eContainer .el-button--small,
.m-Btn-eContainer .el-button--small.is-round {
  padding: 0 20px !important;
  font-size: 14px;
  height: 34px;
  line-height: 34px;
  font-weight: bold;
}
</style>