<template>
  <el-table
    border
    :data="orderData.tickets">
    <el-table-column
      prop="ticketNo"
      label="票号"
    >
    </el-table-column>

    <el-table-column
      prop="tname"
      label="票种"
    >
    </el-table-column>

    <el-table-column
      v-if="orderData.tickets[0]&&orderData.tickets[0].batch_config_id"
      min-width="120"
      label="场次名称"
    >
      <template slot-scope="scope">
        <el-tag type="primary">
          {{ scope.row.batch_config.name }}
        </el-tag>
      </template>
    </el-table-column>

    <el-table-column
      width="80"
      label="原价(￥)"
      v-if="orderData.customerType"
    >
      <template slot-scope="scope">
        {{ scope.row.originalPrice/scope.row.checkNum }}
      </template>
    </el-table-column>

    <el-table-column
      width="80"
      label="票价(￥)"
    >
      <template slot-scope="scope">
        {{ scope.row.price/scope.row.checkNum }}
      </template>
    </el-table-column>

    <el-table-column
      width="80"
      label="折扣"
      v-if="orderData.customerType"
    >
      <template slot-scope="scope">
        {{ scope.row.discount===100?'无': scope.row.discount/10+'折' }}
      </template>
    </el-table-column>

    <el-table-column
      prop="guestName"
      label="游客姓名"
    >
    </el-table-column>

    <el-table-column
      prop="guestIdentify"
      label="身份证"
    >
    </el-table-column>

    <el-table-column
      width="100"
      prop="checkNum"
      label="检票人数"
    >
    </el-table-column>

    <el-table-column
      width="100"
      prop="payDateBegin"
      label="游玩时间"
    >
      <template slot-scope="scope">
        {{ scope.row.isNeedPlaytime?scope.row.payDateBegin:'无限制' }}
      </template>
    </el-table-column>

    <el-table-column
      width="80"
      label="状态"
    >
      <template slot-scope="scope">
        {{ scope.row.status | ticketStatus }}
      </template>
    </el-table-column>

    <el-table-column
      width="80"
      prop="price"
      label="小计"
    >
    </el-table-column>
  </el-table>
</template>

<script>

export default {
  props: {
    orderData: {
      type: Object,
      default: () => {}
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
