<template>
  <div>
    <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
              :default-sort="defaultSort"
    >
      <el-table-column label="序号" type="index" width="60"></el-table-column>
      <el-table-column label="采购单号" prop="billNo" width="160"></el-table-column>
      <el-table-column label="采购部门" prop="deptName" width="120"></el-table-column>
      <el-table-column label="采购仓库" prop="invName" width="120"></el-table-column>
      <el-table-column label="申购仓库" prop="applyInvName" width="120"></el-table-column>
      <el-table-column label="申购人" prop="applyCreateBy" width="120"></el-table-column>
      <el-table-column label="供应商" prop="supName" width="180"></el-table-column>
      <el-table-column label="紧急程度" prop="emergency" width="120">
        <template slot-scope="scope">
          {{ emergencyMap[scope.row.emergency] }}
        </template>
      </el-table-column>
      <el-table-column label="到货截止" prop="arrivalTime" width="160"></el-table-column>
      <el-table-column label="单据状态" prop="status" width="120">
        <template slot-scope="scope">
          <el-tag :type="(scope.row.status) | statusFilterType">
            {{ statusMap[scope.row.status] }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column label="创建时间" prop="createTime"></el-table-column>
      <el-table-column label="操作" width="120">
        <template slot-scope="scope">
          <el-button type="text" size="small">详情</el-button>
        </template>
      </el-table-column>
    </el-table>


    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="filterQuery.page"
      :limit.sync="filterQuery.limit"
      @pagination="handleCurrentChange"

    ></pagination>
  </div>
</template>

<script>

export default {

  name: 'invDevicePurOrderDialog',
  props: {
    idQuery: {
      type: Object,
      required: true
    },
    rowData: {
      type: Object,
      required: true
    }

  },
  watch: {
    rowData: function(newVal, oldVal) {

      this.searchData(newVal)
    }
  }
  ,
  data() {
    return {
      loading: false,
      list: [],
      total: 0,
      filterQuery: {
        limit: 1,
        page: 10
      }

    }
  }
  ,
  methods: {}
  ,
  created() {

  },
  components: {}
}

</script>
<style scoped>
.itemTag {
  float: left;
  text-align: left;
  margin-top: 10px;
  width: 120px;
}

.text {
  width: 100%;
  font-size: 13px;
  font-family: "Microsoft YaHei";
}

.el-card {
  margin-right: 20px;
  margin-top: 15px;
  /*transition: all .5s;*/
}

.el-row {
  display: flex;
  flex-wrap: wrap;
}

.el-col {
  border-radius: 4px;
  flex-wrap: wrap;
}
</style>
