<template>
  <div>

    <el-table
      v-loading="loading"
      :data="spaceCodeList"
      style="width: 100%"
      highlight-current-row
      height="500"
      border
      @current-change="handleDetail"
    >
      <el-table-column label="序号" type="index"></el-table-column>
      <el-table-column
        label="UDI码"
        prop="code"
        width="220"
        show-overflow-tooltip
      ></el-table-column>
      <el-table-column label="仓库" prop="invName" width="120"></el-table-column>
      <el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column>
      <el-table-column label="药品编码" prop="nameCode" width="150"></el-table-column>
      <el-table-column label="药品名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
      <el-table-column label="规格型号" prop="ggxh" width="150" show-overflow-tooltip></el-table-column>
      <el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
      <el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
      <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
      <el-table-column label="计量单位" prop="expireDate" width="120"></el-table-column>
      <el-table-column label="批准文号" prop="zczbhhzbapzbh" show-overflow-tooltip
                       width="200"></el-table-column>
      <el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
                       width="200"></el-table-column>
      <el-table-column label="供应商" prop="supName" show-overflow-tooltip
                       width="200"></el-table-column>
      <el-table-column width="200" label="操作" fixed="right">
        <template slot-scope="scope">
          <el-button
            type="text"
            size="small"
            @click.native.stop="selectSpace(scope.row)"
          >选入绑定
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import {selectMutiPlace} from "@/api/inventory/invPlaceOrder";

export default {
  name: "DialogSelectSpace",
  props: {
    spaceCodeList: {
      type: Object,
      required: true,
    },


  },
  data() {
    return {
      loading: false,
      list: [],
      filterQuery: {
        invCode: null,
        code: null,
      },
    }
  },
  methods: {

    selectSpace(row) {
      this.$emit("selectSpaceBind", row.invSpaceCode);
      this.$emit("closeBindDialog", true);
    },
  },
  created() {
    this.list = this.spaceCodeList;
  },
  mounted() {

  }

}
</script>

<style scoped>

</style>
