<template>
  <show-data-table
    border
    style="margin: 0; padding: 0"
    :sitem="detail"
    :columns="mianColumns"
  >
    <template #orderCode>
      {{ Object.keys(detail.orderCode).map(key => detail.orderCode[key]).join(" , ") }}
    </template>

    <template #status>
      <el-tag
        size="mini"
      >{{ (approvalStatusOptions.find(({value}) => value === detail.status) || {}).label || '--' }}</el-tag>
    </template>

    <template #company>
      <el-tooltip :content="'业务公司编码 : ' + detail.companyNo" placement="top">
        <i class="el-icon-warning-outline" style="margin-right:2px;cursor:pointer" />
      </el-tooltip>
      {{ detail.companyName }}
    </template>
  </show-data-table>
</template>

<script>
import { mianColumns } from './_columns'
export default {
  props: ['detail'],
  data() {
    return {
      mianColumns,
      approvalStatusOptions: [
        { value: '1', label: '待审核' },
        { value: '2', label: '审核通过' },
        { value: '3', label: '审核驳回' }
      ]
    }
  }
}
</script>
