<!--
  @description: 项目履历信息-查看详情
  @Modifier: haofengxian
  @routerPath: /informationbase/projectResumeList
  @date: 2020-5-8-11:22
-->
<template>
  <div>
    <!--标题-->
    <div class="title title_border p0-16">
      <div class="title-back pointer" @click="back">
        <i class="iconfont icon-fanhui mr10" />项目履历信息
      </div>
    </div>
    <section class="p0-16">
      <!--查询条件-->
      <div class="crud_menu_title clearfix">
        <span class="icon-line fl">查询条件</span>
      </div>
      <div class="clearfix SearchContent">
        <div class="SearchContent_leftInput fl">
          <el-form
            ref="searchForm"
            :model="searchForm"
            inline
            label-position="right"
          >
            <el-form-item ref="tenderNo" label="招标项目编号" prop="tenderNo">
              <el-input v-model.trim="searchForm.tenderNo" placeholder="招标项目编号" width="228px" />
            </el-form-item>
            <el-form-item ref="tenderName" label="招标项目名称" prop="tenderName">
              <el-input v-model.trim="searchForm.tenderName" placeholder="招标项目名称" width="228px" />
            </el-form-item>
            <el-form-item ref="tenderName" label="标段（包）状态" prop="tenderName">
              <el-input v-model.trim="searchForm.tenderName" placeholder="标段（包）状态" width="228px" />
            </el-form-item>
          </el-form>
        </div>
        <div class="fr">
          <el-button type="primary" @click="onSearch">
            搜 索
          </el-button>
          <el-button plain type="info" @click="resetForm('searchForm')">
            重 置
          </el-button>
        </div>
      </div>
      <!--查询结果-->
      <div class="crud_menu_title">
        <span class="icon-line">查询结果</span>
      </div>
      <div>
        <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="managerName"
            label="招标人"
            min-width="75"
            align="center"
          />
          <el-table-column
            header-align="center"
            prop="managerName"
            label="标段（包）编号"
            min-width="75"
            align="center"
          />
          <el-table-column
            header-align="center"
            label="标段（包）名称"
            prop="packName"
            align="left"
            min-width="200"
          />
          <el-table-column
            label="项目经理"
            prop="packStatus"
            align="center"
            min-width="110"
          />
          <el-table-column
            label="标段（包）状态"
            prop="packStatus"
            align="center"
            min-width="110"
          />
        </el-table>
        <!--分页组件-->
        <pagination :pagination-data="paginationData" @change="loadData" />
      </div>
    </section>
  </div>
</template>

<script>
/* 接口*/
import { listTenderProjectPages } from '@/api/bidding/biddingProject'
/* 公用方法*/
import { filterObj } from '@/assets/js/utils'// 常用方法
/* 混合开发方法-参数字段*/
import { ListMixin } from '@/mixins/ListMixin'// 分页
/* 组件*/
import pagination from '@comp/common/pagination/pagination'// 分页
export default {
  name: 'ProjectResumeList',
  components: {
    pagination// 分页
  },
  mixins: [ListMixin],
  data() {
    return {
      loading: true,
      // 搜索
      searchForm: {
        auditStatus: '', // 审核状态 00:待审核 01:审核通过 02:审核不通过
        createBeginTime: '', // 创建开始时间
        createEndTime: '', // 创建结束时间
        qualificationMethod: '', // 00资格预审,01 资格后审
        tenderMethod: '', // 招标方式 : 公开招标 00 邀请招标 01 竞争性谈判 02 询价 03 单一来源采购 04 其他 05
        tenderName: '', // 项目名称
        tenderNo: '' // 项目编号
      },
      tableData: []
    }
  },
  created() {
    // 获取列表信息
    this.loadData()
  },
  methods: {
    // 获取数据
    loadData() {
      const params = this.getQueryParams()// 查询条件
      listTenderProjectPages(params).then(response => {
        this.loading = false
        this.tableData = response.data.records
        this.paginationData.total = response.data.total
      }).catch(() => {

      })
    },
    // 查询条件
    getQueryParams() {
      const param = Object.assign({}, this.searchForm)
      param.pageNo = this.paginationData.pageNo
      param.pageSize = this.paginationData.pageSize
      return filterObj(param)
    },
    // 搜索
    onSearch() {
      this.paginationData.pageNo = 1
      this.paginationData.pageSize = 10
      // 获取列表信息
      this.loadData()
    },
    // 重置
    resetForm(formName) {
      this.createTime = ''
      this.paginationData.pageNo = 1
      this.paginationData.pageSize = 10
      this.$refs[formName].resetFields()
      // 获取列表信息
      this.loadData()
    },
    // 返回
    back() {
      this.$router.push({
        path: '/informationbase/projectManagerInfoList'
      })
    }
  }
}
</script>

<style scoped>

</style>
