<!--
  @description: 查看机构之财务信息
  @author: change by sunxinman
  @routerPath: /systemManagement/lookMachine/financeInfo
  @date:  2019/10/45-03:33
-->
<template>
  <div>
    <div class="page-title">
      Ⅰ开户信息
    </div>
    <table class="tableData">
      <tr>
        <td>开户银行</td>
        <td colspan="3">
          {{ formData.bankname }}
        </td>
      </tr>
      <tr>
        <td>基本账户账号</td>
        <td>{{ formData.bankaccount }}</td>
        <td>注册资金</td>
        <td>{{ formData.regcapital }}{{ formData.currenciesUnit }}</td>
      </tr>
    </table>
    <div class="page-title">
      Ⅱ 审核信息
    </div>
    <div v-if="tBAuditOpinionList.length>0">
      <el-table :data="tBAuditOpinionList" size="medium" style="width: 100%">
        <el-table-column
          prop="auditDate"
          label="审核时间"
          align="center"
        />
        <el-table-column
          prop="auditName"
          label="审核人员"
          align="center"
        />
        <el-table-column
          prop="auditStatus"
          label="审核结果"
          align="center"
        />
        <el-table-column
          prop="auditOpinion"
          label="审核意见"
          align="center"
        />
      </el-table>
    </div>
    <div v-if="tBAuditOpinionList.length==0" class="p16">
      暂无审核信息
    </div>
  </div>
</template>

<script>
import { getDepartInfo } from '@/api/rolemanagment/organization'

export default {
  name: 'ContactInfo',
  data() {
    return {
      formData: {},
      tBAuditOpinionList: []
    }
  },
  mounted() {
    const departId = this.$route.query.departId
    getDepartInfo({ departId }).then(response => {
      this.formData = response.data.finance ? response.data.finance : ''
      this.tBAuditOpinionList = response.data.tbauditOpinionList
      const moment = require('moment')
      for (const i in this.tBAuditOpinionList) {
        this.tBAuditOpinionList[i].auditDate = moment(this.tBAuditOpinionList[i].auditDate).format('YYYY-MM-DD HH:mm')
        if (this.tBAuditOpinionList[i].auditStatus === '00') {
          this.tBAuditOpinionList[i].auditStatus = '待审核'
        }
        if (this.tBAuditOpinionList[i].auditStatus === '01') {
          this.tBAuditOpinionList[i].auditStatus = '审核通过'
        }
        if (this.tBAuditOpinionList[i].auditStatus === '02') {
          this.tBAuditOpinionList[i].auditStatus = '审核不通过'
        }
      }
    }).catch(res => {

    })
  }
}
</script>

<style lang="less" scoped>
</style>
