<template>
  <div>
    <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="getLabelName">
        <PartChoose />
      </el-table-column>
      <el-table-column label="规格" />
      <el-table-column label="编码" />
      <el-table-column label="数量" />
      <el-table-column label="单位" />
      <el-table-column label="折扣" />
      <el-table-column label="金额" />
      <el-table-column label="施工人员" />
      <el-table-column label="销售人员" />
      <el-table-column label="类型" />
      <el-table-column label="账类" />
      <el-table-column label="状态" />
      <el-table-column label="备注" />
      <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>
          <el-button size="mini" type="text" icon="el-icon-delete"
          >删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import PartChoose from "@/views/repair/Components/PartChoose.vue";

export default {
  name: "TicketItem",
  components: {PartChoose},
  props:{
    itemType:{
      type: String,
      defaultValue: 'project',
      required: true
    }
  },
  data() {
    return {
      loading: false,
      list: []
    }
  },
  computed:{
    getLabelName(){
      switch (this.itemType){
        case "project":
          return "维修项目";
        case "part":
          return "维修配件";
        case "other":
          return "附加费用";
        default:
          return '';
      }
    }
  },
  methods: {}
}
</script>

<style scoped lang="scss">

</style>
