<template>
  <div ref="tab" class="m20">
    <div class="body">
      <el-row style="margin-bottom: 30px;margin-left: 30px">
        <el-col :span="6">
          <el-row>
            <label class="label-name_1">选择日期：</label> <!-- value-format="yyyy-MM-dd" 指定日期发送格式  -->
            <el-date-picker
              v-model="searchForm.searchDate"
              size="mini"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            />
          </el-row>
        </el-col>
        <el-col :span="4">
          <el-button size="mini" type="primary" @click="busSearch">查询</el-button>
        </el-col>
      </el-row>
      <el-row style="margin-bottom: 30px;margin-left: 30px">
        <label class="label-name_1">业务状态：</label>
        <el-radio-group v-model="searchForm.busstatus">
          <el-radio :label="0">全部</el-radio>
          <el-radio :label="1">完成审批</el-radio>
          <el-radio :label="2">审核/审批中</el-radio>
        </el-radio-group>
      </el-row>
    </div>
    <el-table
      v-loading="busLoading"
      :data="cphStatistics"
      :row-class-name="tableRowClassName"
      :header-cell-style="{'text-align':'center', background:'#8cc3fb',color:'#fff'}"
      style="wdith:100%;border:1px solid #8CC3FB"
      :cell-style="{'text-align':'center'}"
    >
      <el-table-column prop="orgunitname" label="单位" min-width="20" />
      <el-table-column prop="leglrnum" label="列入" min-width="20" />
      <el-table-column prop="legxfnum" label="移出" min-width="20" />
      <el-table-column prop="legyynum" label="异议" min-width="20" />
    </el-table>
  </div>
</template>

<script>
import { queryCphStatisticsSplit } from '@/api/comprehensive'

export default {
  data() {
    return {
      busLoading: false,
      searchForm: {
        bustype: 'illegal',
        searchDate: '',
        busstatus: 0
      },
      cphStatistics: []
    }
  },
  mounted() {
    //this.busSearch()
  },
  methods: {
    tableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 === 1) {
        return 'warning-row'
      }
    },
    busSearch() {
      this.busLoading = true
      queryCphStatisticsSplit(this.searchForm).then(res => {
        if (res.code === 0) {
          this.cphStatistics = res.data
          this.busLoading = false
        } else {
          this.$message.error(res.msg)
        }
      }).catch(_ => {
        this.busLoading = false
      })
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/.bgColor{
  background: #7cb1ff!important;
}
.main-content {
  padding: 10pt;

  .arrow{
    color: #3296FA;
    cursor: pointer;
    margin-right: 16px;
  }
  .search-box{
    padding:10px 0;
    .search-field{
      display:flex;
      width:100%;
      >p{
        margin:3px 16px 10px 0;
        font-family: Microsoft YaHei, Microsoft YaHei-Bold;
        color: #666;
        font-size:16PX;
        width:200px;
        text-align: right;
      }
    }
    .el-col{
      margin-bottom:15px;
    }
  }

  .content-header {
    background: white;

    .label-name_1u {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 180px;
      font-size: 16px;
    }

    .search-input-box_1u {
      display: inline-block;
      width: calc(100% - 230px);
    }

    .label-name_2u {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 210px;
      font-size: 16px;
    }

    .search-input-box_2u {
      display: inline-block;
      width: calc(65% - 120px);
    }

    .label-name_u {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 210px;
      font-size: 16px;
    }

    .search-input-box_u {
      display: inline-block;
      width: calc(65% - 120px);
    }

    .label-name_3u {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 180px;
      font-size: 16px;
    }

    .label-name_1 {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 100px;
      font-size: $font-size-content-text;
    }

    .search-input-box_1 {
      display: inline-block;
      width: calc(100% - 110px);
    }

    .label-name_2 {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 110px;
      font-size: $font-size-content-text;
    }

    .search-input-box_2 {
      display: inline-block;
      width: calc(100% - 120px);
    }

    .label-name_3 {
      text-align: right;
      display: inline-block; //转成行内快，才可定义宽度
      width: 140px;
      font-size: $font-size-content-text;
    }

    .custom {
      width: calc(100% - 150px);
    }

    .search-input {
      cursor: pointer;
    }

    .body {
      padding: 20px 0;
      border-top: none;
      margin-bottom: 10PX;
    }
  }

  .content-body {
    background: white;
    margin-bottom: 100px;
  }

  .header {
    /* height:50PX; */
    /* padding:15PX 10PX; */
    .title {
      font-weight: 600;
      /* font-size: 1.2rem; */
    }
  }

  .page-box {
    margin: 10PX;
    text-align: right
  }

  // .mb10{
  //   margin-bottom: 10px;
  // }
  .btn-box {
    display: inline-block;
    padding-left: 10px;
  }

  .prompt {
    color: #F53633;
  }
}

.tab {
  margin-bottom: 10px;
}

.fixed-bottom {
  position: fixed;
  width: 100%;
  bottom: -10px;
  right: 0;
  z-index: 99;
  padding: 10px;
  /* background: #8bbef6; */
  border-radius: 5px 5px 0 0;
  background: linear-gradient(to bottom, #fff 0%, #8bbef6 100%);
  box-shadow: 1px -4px 4px rgba(0, 21, 41, 0.08);
}

.content-body {
  background: #fff;

  /deep/ .el-table .warning-row {
    background: #eaf4fe !important;
  }

  /deep/ .el-table .sort-caret.descending {
    border-top-color: #fff !important;
  }

  /deep/ .el-table .sort-caret.ascending {
    border-bottom-color: #fff !important;
  }
}
</style>

<style lang="scss">

.el-input__inner {
  height: 28px !important;
}

.fixed-bottom {
  .el-pagination {
    text-align: right !important;
  }
}
</style>

<style lang="scss">
  .market.search-result{
    .el-table__row{
      cursor: pointer;
    }
  }
</style>

