<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"></el-table-column>
              <el-table-column label="到货部门" prop="targetDeptName"></el-table-column>
              <el-table-column label="到货仓库" prop="targetInvName"></el-table-column>
              <el-table-column label="申购仓库" prop="invName"></el-table-column>
              <el-table-column label="紧急程度" prop="emergency">
                <template slot-scope="scope">
                  {{ emergencyMap[scope.row.emergency] }}
                </template>
              </el-table-column>
              <el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
              <el-table-column label="单据状态" prop="status">
                <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="remark"></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: 'invDevicePurApplyDialog',
  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>
