<template>
  <ele-modal :visible.sync="visible" title="出入库详情" width="90%">
    <ele-pro-table :columns="columns" :datasource="tableList" cache-key="tgDetails" height="calc(100vh - 350px)"
      :need-page="false">
    </ele-pro-table>
  </ele-modal>
</template>

<script>
import storageApi from '@/api/warehouseManagement';
export default {
  computed: {
    clientEnvironmentId() {
      return this.$store.state.user.info.clientEnvironmentId;
    }
  },
  data() {
    return {
      visible: false,
      tableList: [],
      columns: [
        {
          label: '序号',
          type: 'index',
          width: 55,
          align: 'center'
        },
        {
          label: '物品名称',
          prop: 'categoryName'
        },
        {
          label: '物品分类名称',
          prop: 'categoryLevelName'
        },

        {
          label: '牌号',
          prop: 'brandNum'
        },

        {
          label: '型号',
          prop: 'modelType'
        },
        {
          label: '计量数量',
          prop: 'measureQuantity'
        },
        {
          label: '包装数量',
          prop: 'packingQuantity'
        },

        {
          label: '包装单位',
          prop: 'packingUnit'
        },

        {
          label: '本包重量',
          prop: 'weight'
        },
        { label: '重量单位', prop: 'weightUnit' },
        {
          label: '发货码',
          prop: 'sendCode'
        },
        {
          label: '用途',
          prop: 'purpose'
        },
        {
          label: '申请人名称',
          prop: 'userName'
        },
        {
          label: '使用人部门',
          prop: 'employGroupName'
        },
        {
          label: '使用人名称',
          prop: 'employName'
        }
      ]
    };
  },
  created() { },
  methods: {
    open(row) {
      storageApi.getApplystoragedetail({ applyId: row.id }).then((res) => {
        console.log(res);
        this.tableList = res;
        this.visible = true;
      });
    }
  }
};
</script>
