<!--
  @description: 招标计划-流程控制信息
  @Modifier: haofengxian
  @routerPath:
  @date: 2020-6-12-15:50
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialogVisible"
    title="流程控制信息查看"
    width="960px"
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <table class="tableData">
      <tr>
        <td>招标方式</td>
        <td>
          {{ filterDictText(purchasesSchemeBidWayList, formData.biddingMethod) }}
        </td>
        <td>资格审查方式</td>
        <td>
          {{ filterDictText(purchasesSchemeQuaWayList, formData.qualificationCheckWay) }}
        </td>
      </tr>
      <tr v-if="screenProjectToggle">
        <td>年度资格预审筛选项目</td>
        <td>
          {{ filterDictText(purchasesSchemeQuaProjectList, formData.annualPrequalificationScreeningProject) }}
        </td>
        <td />
        <td />
      </tr>
      <tr v-if="thirdToggle">
        <td>资格预审开启方式</td>
        <td>
          {{ filterDictText(purchasesSchemeQuaOpenWayList, formData.prequalificationOpeningMethod) }}
        </td>
        <td>资格预审评审方式</td>
        <td>
          {{ filterDictText(purchasesSchemeQuaEvalWayList, formData.prequalificationEvaluationWay) }}
        </td>
      </tr>
      <tr>
        <template v-if="thirdToggle">
          <td>
            资格预审评审办法
          </td>
          <td>
            {{ filterDictText(purchasesSchemeQuaEvalMethodList, formData.prequalificationEvaluationMethod) }}
          </td>
        </template>
        <template v-if="numberLimitToggle">
          <td>
            数量限制
          </td>
          <td>
            {{ formData.quantitativeRestriction }}
          </td>
        </template>
      </tr>
      <tr>
        <td>开标方式</td>
        <td>
          {{ filterDictText(purchasesSchemeOpenWayList, formData.bidOpeningMethod) }}
        </td>
        <td>开标步制</td>
        <td>
          {{ filterDictText(purchasesSchemeOpenStepWayList, formData.bidOpeningStep) }}
        </td>
      </tr>
      <tr>
        <td>评标方式</td>
        <td>
          {{ filterDictText(purchasesSchemeEvalWayList, formData.biddingEvaluationWay) }}
        </td>
        <td>评标办法</td>
        <td>
          {{ filterDictText(purchasesSchemeProEvalMethodList, formData.bidEvaluationMethod) }}
        </td>
      </tr>
      <tr>
        <td>投标报价方式</td>
        <td>
          {{ filterDictText(purchaseSchemeBidPriceMethodList, formData.biddingQuotationMethod) }}
        </td>
        <td>投标文件递交方式</td>
        <td>
          {{ filterDictText(purchasesSchemeDocWayList, formData.bidSubmissionMethod) }}
        </td>
      </tr>
    </table>
  </el-dialog>
</template>

<script>
/* 接口*/
import { getPretenderingPurchasesSchemeAllById } from '@/api/purchasePlan/pretcloudPurchasescheme'
/* mixins混入公共方法*/
import { tenderPlan } from '../mixins/tenderPlan'
import { baseInfoCommon } from '../mixins/baseInfoCommon'
export default {
  name: 'ProcesscControlInfoDialog',
  mixins: [tenderPlan, baseInfoCommon],
  data() {
    return {
      dialogVisible: false,
      formData: { annualPrequalificationScreeningProject: '01', // 年度资格预审筛选项目 默认01 否
        bidEvaluationMethod: '00', // 评标办法
        bidOpeningMethod: '00', // 开标方式
        bidOpeningStep: '00', // 开标步制
        bidSubmissionMethod: '00', // 投标文件递交方式
        biddingEvaluationWay: '00', // 评标方式
        biddingMethod: '00', // 招标方式
        biddingQuotationMethod: '01', // 投标报价方式
        createUser: '',
        id: '',
        prequalificationEvaluationMethod: '01', // 资格预审评审办法 默认01 有限数量制
        prequalificationEvaluationWay: '00', // 资格预审评审方式
        prequalificationOpeningMethod: '00', // 资格预审开启方式
        qualificationCheckWay: '02', // 资格审查方式 02 默认 资格后审
        quantitativeRestriction: '', // 数量限制
        schemeId: '',
        updateUser: '',
        useStatus: '00' // 00临时,01正式
      }
    }
  },
  created() {
    // 招标计划-字典信息
    this.initPurchaseSchemeWebTypeGroup()
  },
  methods: {
    // 父组件触发打开弹框 查看页面
    openProcessControlInfoDetail(schemeId) {
      this.dialogVisible = true
      this.getPretenderingPurchasesSchemeAll(schemeId)
    },
    // 根据方案id获取招标计划所有信息
    getPretenderingPurchasesSchemeAll(schemeId) {
      getPretenderingPurchasesSchemeAllById(schemeId).then(res => {
        const { pretPurchaseschemePretenderingPurchasesProcessVo } = res.data // 流程控制信息
        /* ================招标计划基本信息-流程控制信息==============*/
        this.formData = {
          ...pretPurchaseschemePretenderingPurchasesProcessVo // 流程控制信息
        }
      })
    }
  }
}
</script>

<style scoped lang="less">
  .tableData tr td:nth-child(odd){
    width: 18%!important;
  }
</style>
