<template>
  <div class="app-container">
    <div class="tab-header webtop">
      <div>{{ viewTitle }}</div>
      <div>
        <el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
      </div>
    </div>
    <div class="listconadd">
      <el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
        <el-row style="border-left: 0px">
          <el-col :span="24" style="border-right: 0px">
            <div class="span-sty" style="border-right: 0px">其它融名称:</div>
            <el-form-item>
              <span class="addinputInfo">
                {{ formobj.bankShortName }} {{ formobj.productTypeValue }} {{ formobj.period !=='' ? formobj.period + '期' : '' }} {{ formobj.maxLoanRatio !== '' ? formobj.maxLoanRatio + '%' : '' }}
              </span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <div class="span-sty">资方简称</div>
            <el-form-item><span class="addinputInfo">{{ formobj.bankShortName }}</span></el-form-item>
          </el-col>
          <el-col :span="16" class="tlineheightb">
            <div class="span-sty">适用销售部门</div>
            <el-form-item><span class="addinputInfo">{{ formobj.useDeptNames }}</span></el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <div class="span-sty">业务类型</div>
            <el-form-item><span class="addinputInfo">{{ formobj.busTypeValue }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">车辆大类</div>
            <el-form-item><span class="addinputInfo">{{ formobj.vehCategoryValue }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">车辆功能</div>
            <el-form-item><span class="addinputInfo">{{ formobj.vehTypeValue }}</span></el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <div class="span-sty">产品类别</div>
            <el-form-item><span class="addinputInfo">{{ formobj.productTypeValue }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">最高融资比例(%)</div>
            <el-form-item><span class="addinputInfo">{{ formobj.maxLoanRatio }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">最高融资额(元)</div>
            <el-form-item><span class="addinputInfo">{{ formobj.maxLoanAmount }}</span></el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <div class="span-sty">期数</div>
            <el-form-item><span class="addinputInfo">{{ formobj.period }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">年利率(%)</div>
            <el-form-item><span class="addinputInfo">{{ formobj.yearRatio }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <div class="span-sty">有效期至</div>
            <el-form-item><span class="addinputInfo">{{ formobj.validDateTo }}</span></el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>

<script>
import req from '@/api/otherfinancialpolicymanagement/otherfinancialpolicymanagement'

export default {
  data() {
    return {
      viewTitle: '',
      tableKey: 0,
      index: 0,
      formobj: {
        bankShortName: '',
        otherPolicyName: '',
        bankSid: '',
        mainPolicySid: '',
        useDeptSids: '',
        useDeptNames: '',
        useDeptList: [],
        productTypeKey: '',
        productTypeValue: '',
        busTypeKey: '',
        busTypeValue: '',
        vehCategoryKey: '',
        vehCategoryValue: '',
        vehTypeKey: '',
        vehTypeValue: '',
        maxLoanRatio: '',
        maxLoanAmount: '',
        period: '',
        periodKey: '',
        yearRatio: '',
        validDateTo: '',
        sid: '',
        orgSidPath: '',
        createBySid: '',
        createOrgSid: '',
        createOrgName: '',
        useOrgSid: '',
        useOrgName: ''
      },
      rules: {}
    }
  },
  methods: {
    showInfo(sid) {
      this.viewTitle = '其他融产品详情'
      req.fetchBySid({ sid: sid }).then((res) => {
        if (res.success) {
          this.formobj = res.data
        }
      })
    },
    handleReturn() {
      this.formobj = {}
      this.$emit('doback')
    }
  }
}
</script>

<style scoped>
.span-sty {
  width: 120px !important;
}
.addinputInfo {
  margin-left: 110px !important;
}
.tlineheightb {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
/deep/ .tlineheightb .el-form-item .el-form-item__content .addinputInfo {
  line-height: 15px !important;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
</style>
