<!--
  @description: 入库审核-查看-基本信息
  @Modifier: qk
  @routerPath:supplierDeclaration/supplier/essentialInformation
  @date: 2020-2-20 16:32:31
-->
<template>
  <div>
    <table class="tableData">
      <tr>
        <td>开户银行</td>
        <td>{{ formData.finance.bankname }}</td>
        <td>账号</td>
        <td>{{ formData.finance.bankaccount }}</td>
      </tr>
      <tr>
        <td>注册资本(万元)</td>
        <td>{{ formData.finance.regcapital }}</td>
        <td>币种</td>
        <td><span v-for="(item,indexs) in currencies" v-if="formData.finance.currencies === item.typecode" :key="indexs">{{ item.typename }}</span></td>
      </tr>
    </table>
  </div>
</template>

<script>
/* 接口*/
import { getUpdateDepartInfo, getDepartInfoDictionaries } from
  '@/api/supplier/supplierBaseInfo'// 获取
export default {
  name: 'PreviewProjectInfoDetail',
  data() {
    return {
      formData: {
        finance: ''
      },
      form: {
        finance: ''
      },
      currencies: [] // 注册币种
    }
  },
  watch: {
    form(val) {
      this.formData = val
    }
  },
  mounted() {
    this.initData()// 查询项目基本信息
    this.initkeys() // 查询字典
  },
  methods: {
    // 查询字典
    initkeys() {
      getDepartInfoDictionaries().then(res => {
        this.currencies = res.data.currencies.typeList
      })
    },
    // 获取基本信息
    initData() {
      getUpdateDepartInfo().then((response) => {
        this.form.finance = response.data.finance
        this.formData.finance = response.data.finance
      })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
