<!-- 供应商信息列表 -->
<template>
  <div class="app-container">
    <el-card>
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
        <div class="filter-box">
          <div class="filter-lf">
            <el-form-item label="合同编号">
              <el-input v-model="queryParams.roleName" placeholder="请输入合同编号" clearable @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="供应商名称">
              <el-input v-model="queryParams.roleName" placeholder="请输入供应商名称" clearable @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="签约人员">
              <el-input v-model="queryParams.roleName" placeholder="请输入签约人员" clearable @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            </el-form-item>
          </div>
          <div class="filter-rt">
            <el-form-item>
              <el-button type="primary" size="mini" @click="handleAdd">新增审批</el-button>
            </el-form-item>
          </div>
        </div>
      </el-form>
      <el-table stripe border v-loading="loading" v-hasPermi="['procurement:supplierCt:list']" :data="tableList" @selection-change="handleSelectionChange">
        <el-table-column label="合同编号" prop="roleName" />
        <el-table-column label="供应商名称" prop="roleName" />
        <el-table-column label="类型" prop="roleName" />
        <el-table-column label="合同金额" prop="roleName" />
        <el-table-column label="签约人员" prop="roleName" />
        <el-table-column label="合同起止时间" prop="roleName" />
        <el-table-column label="合同状态" prop="roleName" />
        <el-table-column label="操作" align="center" width="200">
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['procurement:supplierCt:show']" @click="handleShow(scope.row)">查看
            </el-button>
            <el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['procurement:supplierCt:del']" @click="handleDelete(scope.row)">删除
            </el-button>
            <el-button size="mini" type="text" icon="el-icon-position" v-hasPermi="['procurement:supplierCt:push']" @click="handlePush(scope.row.id)">催款
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getTableList" />
    </el-card>
  </div>
</template>

<script>
import { srCtListApi, srCtDelApi, agreeSrTbApi, disAgreeSrTbApi } from '@/api/procurement/supplierCt'
import VerifyFunc from '@/utils/verity'
export default {
  name: 'supplierTb',
  props: {},
  computed: {},
  data() {
    return {
      disabled: false,
      id: null,
      isOpen: false,
      total: 0,
      loading: false,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        roleName: undefined,
      },
      tableList: [
        { roleName: 'roleName' }
      ]
    }
  },
  created() {
  },
  methods: {
    handleAdd() {
      this.$router.push('/procurement/supplierTb')
    },
    handlePush() {
      this.$sm('催款提醒已经发送成功！')
    },
    handleShow(row, type) {
      this.$router.push({
        path: "/supplierTb/show"
      });
    },
    handleSave() {
      // this.$nextTick(() => {
      //   this.$refs.form.validate((bool) => {
      //     if (bool) {
      //       this.$sm('保存成功！')
      //     }
      //   })
      // })
      this.$router.push('/procurement/supplierCt')
    },
    handleCancel() {
      this.isOpen = false
    },
    handleAddMsg() {
      this.isOpen = true
    },
    handleUpdate() {

    },
    handleDelete(id) {
      this.$confirm('您确定要删除吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$sm('删除成功！')
        this.getTableList()
      })
    },
    getTableList() {

    },
    resetQuery() {

    },
    handleQuery() {

    },
    handleSelectionChange() {

    },
  },



}

</script>
<style lang='scss' scoped>
@import '@/assets/styles/header/index.scss';
@import '@/assets/styles/common/index.scss';
</style>