<!--
  @description:不合格供应商加入/移除审核-详情
  @Modifier:qrf
  @routerPath:
  @date:2020/9/17-17:27
-->
<template>
  <table class="tableData mb10 main">
    <tr>
      <td>供应商名称</td>
      <td>{{ formData.supplierName }}</td>
      <td>处罚意见</td>
      <td>{{ formData.punishIdea }}</td>
    </tr>
    <tr>
      <td>淘汰原因</td>
      <td colspan="3">
        {{ formData.freezingReasons }}
      </td>
    </tr>
    <tr>
      <td>处罚时间期限（月）</td>
      <td colspan="3">
        {{ formData.punishTime }}
      </td>
    </tr>
    <tr>
      <td>事件说明</td>
      <td colspan="3">
        {{ formData.remarks }}
      </td>
    </tr>
    <tr>
      <td>附件</td>
      <td colspan="3">
        <downloadFile />
      </td>
    </tr>
  </table>
</template>
<script>
import downloadFile from '@comp/common/updownload/downloadFile' // 获取附件信息 下载组件
import { queryBlacklistAuditInfo } from '@api/supplier/supplierUnqualified.js'
/* 公用方法*/
import { filterObj } from '@/assets/js/utils'// 常用方法
export default {
  name: 'ReviewUnqualifiedInfo',
  components: {
    downloadFile // 文件下载
  },
  props: {
    headTitle: {
      type: String,
      default() {
      }
    }
  },
  data() {
    return {
      formData: {
        auditReason: '',
        supplierName: '', // 供应商名称
        punishIdea: '', // 处罚意见
        freezingReasons: '', // 淘汰原因
        punishTime: '', // 处罚时间期限
        remarks: '' // 事件说明
      },
      rowOrderInfo: {},
      // 获取缴纳凭证参数
      upLoadData: {
        bizId: '', // 业务主键Id
        fileType: 'docfeePayFile'// 文件类型
      }
    }
  },
  created() {
    // 获取列表信息
    this.loadData()
    // // 获取字典
    // this.initGetTaskDictionaries()
  },
  methods: {
    // 获取数据
    loadData() {
      const params = this.getQueryParams()// 查询条件
      queryBlacklistAuditInfo(params).then(response => {
        console.log(response)
        this.loading = false// 列表查询Loading
        this.paginationData.total = response.data.total
        this.tableData = response.data.records
        this.tableData.forEach(item => {
          item.createTime = this.$Moment(item.createTime).format(this.momentDateTime)
        })
      }).catch(() => {

      })
    },
    // 查询条件
    getQueryParams() {
      const param = Object.assign({}, this.searchForm)
      // param.pageNo = this.paginationData.pageNo
      // param.pageSize = this.paginationData.pageSize
      param.updateTimeBegin = param.updateTime[0]// 审核时间开始
      param.updateTimeEnd = param.updateTime[1]// 审核时间结束
      // 删除不传给后端的参数字段
      delete param.updateTime// 审核时间
      return filterObj(param)
    }
  }
}
</script>
<style lang="less" scoped>
</style>
