<template>
  <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
    <el-table-column label="序号" align="center">
      <template scope="scope">
        <span>{{ scope.$index + 1 }}</span>
      </template>
    </el-table-column>
    <el-table-column label="商品名称" align="center" width="200"/>
    <el-table-column label="规格" align="center" width="180"/>
    <el-table-column label="商品编码" align="center" width="180"/>
    <el-table-column label="仓库" align="center" width="150"/>
    <el-table-column label="库存" align="center" width="150" />
    <el-table-column label="单位" align="center" width="150"/>
    <el-table-column label="数量" align="center" width="150"/>
    <el-table-column :label="soByType ? '上次进价' : '成本'" align="center" width="150"/>
    <el-table-column v-if="soByType" label="采购进价" align="center" width="150"/>
    <el-table-column :label="soByType ? '采购金额' : '合计'" align="center" width="150"/>
    <el-table-column label="备注" align="center" width="180"/>
    <el-table-column label="操作" fixed="right" align="center" width="150">
      <template v-slot="scope">
        <el-button size="mini" type="text" icon="el-icon-delete"
        >删除
        </el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: "SoTable",
  props:{
    soByType:{
      type: Boolean,
      defaultValue: true,
      required: true
    }
  },
  data() {
    return {
      loading: false,
      list: [],
    }
  },
  methods: {

  }
}
</script>

<style scoped lang="scss">

</style>
