  <!--
  @description: 推荐邀请商查看
  @Modifier: qink/haofengxian
  @routerPath:
  @date: 2020-2-25 13:20:35
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialog"
    title="推荐/邀请供应商"
    width="700px"
    custom-class="el-dialog__body-p0"
  >
    <div class="p8">
      <el-form
        ref="form"
        :model="formData"
        :inline-message="true"
      >
        <table class="from_table">
          <tr>
            <td>
              <el-form-item label="类型" prop="tenderNo" />
            </td>
            <td>
              {{ filterDictText(supplierQualificationsTypeGroup,formData.qualificationsType) }}
            </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 v-if="formData.qualificationsType === '02'">
            <td>
              <el-form-item label="推荐单位" prop="departName" />
            </td>
            <td>
              {{ formData.departName }}
            </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>
              {{ formData.remark }}
            </td>
          </tr>
        </table>
      </el-form>
    </div>
  </el-dialog>
</template>

<script>
/* 接口*/
import { queryDeclarationInfo } from '@/api/supplier/declaraTionrecord'
/* 常用方法 */
import { filterDictText } from '@/assets/js/utils'// 常用方法
/* 混入 */
import { declareHegSupperGroupMixin } from '../editorDeclaration/mixins/declareHegSupperGroupMixin'
import { supplierGroupMixin } from '../mixins/supplierGroupMixin'
export default {
  name: 'RecommendeDetailDialog',
  mixins: [declareHegSupperGroupMixin, supplierGroupMixin],
  data() {
    return {
      dialog: false, // 弹框状态
      formData: {
      }
    }
  },
  created() {
    // 获取字典
    this.getDeclarationDictionariesGroup()
  },
  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>
