<!--
  @description: 招标人履历
  @Modifier: haofengxian
  @routerPath: /informationbase/tendereeResumeList
  @date: 2020-6-1-13:34
-->
<template>
  <div>
    <table-crud
      :search-form="searchForm"
      search-label-width="110px"
      @on-load="loadData"
    >
      <template v-slot:header>
        招标人履历
      </template>
      <template v-slot:search="search">
        <el-form-item ref="tenderName" label="招标项目名称" prop="tenderName">
          <el-input
            v-model.trim="searchForm.tenderName"
            placeholder="招标项目名称"
            width="228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <el-form-item ref="tenderNo" label="标段（包）编号" prop="tenderNo">
          <el-input
            v-model.trim="searchForm.tenderNo"
            placeholder="标段（包）编号"
            width="228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
        <el-form-item ref="managerName" label="项目经理" prop="managerName">
          <el-input
            v-model.trim="searchForm.managerName"
            placeholder="项目经理"
            width="228px"
            @keyup.enter.native="search.onSearch"
          />
        </el-form-item>
      </template>
      <template v-slot:GXTable>
        <el-table
          ref="smallTable"
          v-loading="loading"
          :data="tableData"
        >
          <el-table-column
            type="index"
            label="序号"
            width="60px"
            align="center"
          />
          <el-table-column
            prop="tenderNo"
            align="center"
            label="项目编号"
            width="160"
          />
          <el-table-column
            header-align="center"
            prop="tenderName"
            label="项目名称"
            min-width="230"
          />
          <el-table-column
            header-align="center"
            prop="packNo"
            label="标段（包）编号"
            min-width="100"
          />
          <el-table-column
            header-align="center"
            label="标段（包）名称"
            prop="packName"
            align="left"
            min-width="200"
          />
          <el-table-column
            header-align="center"
            label="招标人名称"
            prop="buyersName"
            min-width="160"
          />
          <el-table-column
            label="项目经理"
            prop="managerName"
            align="center"
            min-width="75"
          />
          <el-table-column
            label="标段（包）状态"
            prop="packStatus"
            min-width="110"
          />
        </el-table>
      </template>
    </table-crud>
  </div>
</template>

<script>
/* 接口*/
import { queryTenderProjectListByBuyersId } from '@api/bidding/biddingProject'
export default {
  name: 'TendereeResume',
  data() {
    return {
      loading: true,
      // 搜索
      searchForm: {
        buyersId: this.$route.params.id, // 招标人id
        managerName: '', // 项目经理名称
        packNo: '', // 标段编号
        tenderName: '' // 项目名称
      },
      tableData: []
    }
  },
  methods: {
    // 获取数据
    loadData(params, callback) {
      queryTenderProjectListByBuyersId(params).then(response => {
        this.loading = false
        this.tableData = response.data.records
        callback(response.data.total)
      }).catch(() => {

      })
    },
    // 返回
    back() {
      this.$router.push({
        path: '/informationbase/tendereeInfoList'
      })
    }
  }
}
</script>

<style scoped>

</style>
