
<!--
  @description:供应商结果通告信息列表
  @Modifier:gmy
  @routerPath:/procurement/procurementDriveSupplier/procurementSupplierResult
  @date:2020/10/23-11:37
-->
<template>
  <div class="main">
    <p class="page-title">
      1.结果通知书列表
    </p>
    <section>
      <el-table
        ref="multipleTable"
        :data="tableData"
      >
        <el-table-column type="index" label="序号" width="55px" align="center" />
        <el-table-column
          header-align="center"
          prop="noticeTitle"
          label="通知书标题"
          min-width="260"
          align="left"
        />
        <el-table-column header-align="center" prop="contacts" label="联系人" min-width="140 " align="left" />
        <el-table-column header-align="center" prop="contactsTelephone" label="联系电话" min-width="120" align="center" />
        <el-table-column header-align="center" label="发送时间" min-width="150" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.sendTime">
              {{ $Moment(scope.row.sendTime).format(momentDateTime) }}
            </span>
          </template>
        </el-table-column>
        <el-table-column label="操作" min-width="80" align="center">
          <template slot-scope="scope">
            <el-link
              v-if="scope.row.isWinBiding !== '00'"
              :underline="false"
              size="mini"
              type="primary"
              @click="lookAdvicenote(scope.row)"
            >
              [查看通知书]
            </el-link>
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination :pagination-data="paginationData" @change="initData" />
    </section>
  </div>
</template>

<script>
/** api */
import { listProcurementNoticeSupplierPages } from '@/api/procurement/procurementResult'
/* 组件*/
import pagination from '@comp/common/pagination/pagination' // 分页
/* 公共方法*/
import { ListMixin } from '@/mixins/ListMixin' // 分页
import { filterObj } from '@/assets/js/utils' // 深拷贝
export default {
  name: 'ProcurementYetNoAdvicenoteListVue',
  inject: ['getTenderBase'],
  components: {
    pagination // 分页
  },
  mixins: [ListMixin],
  data() {
    return {
      tableData: [],
      // 搜索数据
      searchData: {
        packId: '' // 标段id
      },
      tenderBase: this.getTenderBase() // 获取项目信息
    }
  },
  created() {
    // 初始化查询成交通知书列表信息
    this.initData()
  },
  methods: {
    // 查询条件
    getQueryParams() {
      const param = Object.assign({}, this.searchForm)
      param.pageNo = this.paginationData.pageNo
      param.pageSize = this.paginationData.pageSize
      return filterObj(param)
    },
    // 获取成交通知书列表
    initData() {
      // 查询条件
      const params = this.getQueryParams()
      params.packId = this.tenderBase.packId
      listProcurementNoticeSupplierPages(params)
        .then(res => {
          this.tableData = res.data.records
          this.paginationData.total = res.data.total
        })
        .catch(() => {})
    },
    // 跳转查看通知书页面
    lookAdvicenote(row) {
      this.$router.push({
        path: '/procurement/procurementDriveSupplier/procurementResultAdviceDetail',
        query: {
          winningResultId: row.winningResultId, // 中选结果id
          supplierId: row.supplierId // 供应商id
        }
      })
    }
  }
}
</script>

<style>
</style>
