<!--
  @description:供应商-不良记录解除申请-不良记录解除申请处理
  @Modifier: qrf
  @routerPath: supplierEvaluation/supplierEnterpriseAudit-list
  @date:2020/11/04-14:27
-->
<template>
  <div>
    <section class="title title_border p0-16 clearfi">
      <template>
        <div class="pointer" @click="back">
          <i class="iconfont icon-fanhui mr10" />
          解除不良记录申请处理
        </div>
      </template>
    </section>
    <div class="main p0-16">
      <table class="tableData">
        <tr>
          <td>供应商名称</td>
          <td>{{ tableData.supplierName }}</td>
        </tr>
        <tr>
          <td>列入不良记录原因</td>
          <td>{{ tableData.badReason }}</td>
        </tr>
        <tr>
          <td>事件说明</td>
          <td>{{ tableData.eventDescription }}</td>
        </tr>
        <tr>
          <td>附件</td>
          <td>
            <downloadFile :data="idCards" />
          </td>
        </tr>
        <tr>
          <td>解除申请原因</td>
          <td>{{ tableData.removeApplyReason }}</td>
        </tr>
        <tr>
          <td>说明附件</td>
          <td>
            <downloadFile :data="idCards" />
          </td>
        </tr>
        <tr>
          <td>申请人</td>
          <td colspan="3">
            {{ tableData.applyPerson }}
          </td>
        </tr>
        <tr>
          <td>联系电话</td>
          <td>{{ tableData.applyPersonPhone }}</td>
        </tr>
        <tr>
          <td>电子邮箱</td>
          <td>{{ tableData.email }}</td>
        </tr>
      </table>
    </div>
    <!--操作按鈕-->
    <div class="but_footer">
      <div class="p0-16">
        <div class="page-title">
          审核意见
        </div>
        <el-form ref="auditInfoParam" :model="auditInfoParam">
          <el-form-item ref="auditReason" prop="auditReason">
            <el-input
              v-model="auditInfoParam.auditReason"
              :rows="4"
              type="textarea"
              placeholder="请填写审核意见"
              maxlength="200"
              show-word-limit
            />
          </el-form-item>
        </el-form>
      </div>
      <div class="but_footer-h">
        <div class="but_footer-but">
          <el-button type="primary" @click="verified()">
            通过
          </el-button>
          <el-button @click="auditFail()">
            退回
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
/* api*/
import { querySupplierRemoveBadInfo } from '@/api/supplier/supplierBad'
/* 公共方法*/
import { filterDictText } from '@/assets/js/utils'
/* 公共组件*/
import downloadFile from '@comp/common/updownload/downloadFile'

export default {
  name: 'ExpertBaseInfoDetail',
  components: {
    downloadFile
  },
  data() {
    return {
      auditInfoParam: {
        auditReason: ''
      },
      tableData: {}
    }
  },
  created() {
    // 获取基本信息
    this.initData()
  },
  methods: {
    filterDictText, // 引入字典值替换文本通用方法
    // 获取数据
    loadData() {
      querySupplierRemoveBadInfo().then(res => {
        this.tableData = res.data.records
      })
    },
    back() {
      this.$router.push({
        path: 'supplierBadRemove-list'
      })
    }
  }
}
</script>

<style lang='less' scoped>
.baseInfo{
  font-weight: bolder;
}
</style>
