<template>
  <div class="table">
    <el-table
      ref="multipleTable"
      :data="data"
      tooltip-effect="dark"
      style="width: 100%"
      :max-height="300"
      stripe
      :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
    >
      <el-table-column label="序号" type="index" width="50"> </el-table-column>
      <el-table-column
        label="编码"
        prop="onlyCode"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        label="名称"
        prop="name"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        label="批号"
        prop="manualBatchNo"
        width="100"
      ></el-table-column>
      <el-table-column
        v-if="clientEnvironmentId != 2"
        label="批次号"
        prop="batchNo"
      ></el-table-column>
      <el-table-column
        label="发货条码"
        prop="barcodes"
        width="80"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column
        label="包装编码"
        prop="code"
        :show-overflow-tooltip="true"
      ></el-table-column>
      <el-table-column label="包装数量" prop="packingCountBase" width="120">
      </el-table-column>
      <el-table-column label="单位" prop="packingUnit"></el-table-column>
      <el-table-column
        label="计量数量"
        prop="availableCountBase"
      ></el-table-column>
      <el-table-column label="计量单位" prop="measuringUnit"></el-table-column>
      <el-table-column
        label="物料代号"
        prop="materielCode"
        width="130"
      ></el-table-column>
      <el-table-column label="客户代号" prop="clientCode"></el-table-column>
      <el-table-column label="重量" prop="weight"></el-table-column>
      <el-table-column label="重量单位" prop="weightUnit"></el-table-column>
    </el-table>
  </div>
</template>

<script>
  import { tableHeader } from '../../common';
  export default {
    props: ['assetType', 'data'],
    data() {
      return {
        batchTable: []
      };
    },
    computed: {
      tableHeader() {
        return tableHeader(this.assetType);
      },
      clientEnvironmentId() {
        return this.$store.state.user.info.clientEnvironmentId;
      }
    }
  };
</script>
