<!--
  @description:申报单位记录详情组件
  @Modifier: qrf
  @routerPath:
  @date: 2020-9-16-10:15
-->
<template>
  <el-dialog
    :visible.sync="dialog"
    :close-on-click-modal="false"
    title="查看审核记录"
    width="700px"
    append-to-body
    custom-class="el-dialog_table"
  >
    <div class="p8">
      <el-form
        ref="form"
        :model="formData"
      >
        <table class="from_table">
          <tr>
            <td>
              <el-form-item label="审核单位名称" prop="departName" />
            </td>
            <td>
              {{ formData.departName }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="供应商名称" prop="supplierName" />
            </td>
            <td>
              {{ formData.supplierName }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="申报供应范围" prop="supplyScope" />
            </td>
            <td>
              {{ formData.supplyScope }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="申报时间" prop="createTime" />
            </td>
            <td>
              {{ formData.createTime }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="申报状态" prop="auditStatus" />
            </td>
            <td>
              <!--              <span-->
              <!--                v-for="(item,index) in auditStatusList"-->
              <!--                v-if="formData.auditStatus===item.typecode"-->
              <!--                :key="index"-->
              <!--              >-->
              <!--                {{ item.typename }}-->
              <!--              </span>-->
              {{ filterDictText(auditStatusList, formData.auditStatus) }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="调查方式" prop="nvestigationMethod" />
            </td>
            <td>
              {{ filterDictText(nvestigationMethodList, formData.nvestigationMethod) }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="推荐理由" prop="reason" />
            </td>
            <td>
              {{ formData.reason }}
            </td>
          </tr>
          <tr>
            <td>
              <el-form-item label="现场评审报告" prop="remark" />
            </td>
            <td>
              <downloadFile :data="{}" />
            </td>
          </tr>
        </table>
      </el-form>
    </div>
  </el-dialog>
</template>

<script>
/* 接口*/
import { queryDeclarationInfo } from '@/api/supplier/declaraTionrecord'
/* 混合开发方法-参数字段*/
import { supplierGroupMixin } from '@/views/supplier/mixins/supplierGroupMixin'
import { filterDictText } from '@/assets/js/utils' // 深拷贝
/* 组件*/
import downloadFile from '@comp/common/updownload/downloadFile' // 获取附件信息 下载组件

export default {
  name: 'BlacklistInfoCompDetail',
  components: {
    downloadFile// 文件下载
  },
  mixins: [supplierGroupMixin],
  data() {
    return {
      // 供应商信息
      detailType: {
        detailType: 'dialog', // 查看形式 dialog 弹框
        departId: ''// 供应商主键id
      },
      dialog: false, // 弹窗状态 false 关闭 true 打开
      formData: {
        departName: '', // 审核单位名称
        id: '', // 主键
        supplierName: '', // 供应商名称
        supplyScope: '', // 申报供应范围
        createTime: '', // 申报时间
        status: '', // 状态 00保存 01提交
        supplierId: '', // 供应商id
        nvestigationMethod: '', // 调查方式
        reason: '' // 推荐理由
      }
    }
  },
  methods: {
    filterDictText, // 引入字典值替换文本通用方法
    // 打开弹框-主键id
    openDialog(id) {
      this.dialog = true
      this.initData(id)
    },
    // 获取数据
    initData(id) {
      queryDeclarationInfo(id).then(res => {
        this.formData = res.data.data
      })
    }
  }
}
</script>

<style scoped lang="less">

</style>
