<template>
  <zj-page-container>
    <div style="height: 40px">
      <el-page-header slot="head" content="" @back="$emit('handleClose')" />
    </div>
    <el-tabs v-model="tibleType" type="card" size="mini">
      <el-tab-pane label="发送详情" name="fsxq"> </el-tab-pane>
      <el-tab-pane label="保单信息" name="bdxx"> </el-tab-pane>
    </el-tabs>
    <zj-page-fill>
      <div v-show="tibleType === 'fsxq'">
        <el-descriptions class="margin-top" :column="2" border :labelStyle="{ width: '140px' }">
          <el-descriptions-item>
            <template slot="label"> 邮件发送批次 </template>
            {{ info.sendBatch }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 发送邮箱 </template>
            {{ info.sendMailbox }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 接收邮箱 </template>
            {{ info.receiveMailbox }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 发送状态 </template>
            {{ info.sendStatus }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 发送时间 </template>
            {{ info.sendTime }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 回执状态 </template>
            {{ info.receiptStatus }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 回执时间 </template>
            {{ info.receiptTime }}
          </el-descriptions-item>
          <el-descriptions-item>
            <template slot="label"> 操作时间 </template>
            {{ info.updateTime }}
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <List v-show="tibleType === 'bdxx'" v-if="info.sendBatch" :batchEamilNo="info.sendBatch" />
    </zj-page-fill>
  </zj-page-container>
</template>

<script>
import List from './list.vue'
import { insureDetailemail } from '@/api/InsuranceManagement.js'
export default {
  components: { List },
  props: {
    item: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      tibleType: 'fsxq',
      info: {}
    }
  },
  created() {
    // 获取详情
    insureDetailemail({
      id: this.item.id
    }).then(res => {
      this.info = res.data
    })
  },
  methods: {}
}
</script>

<style lang="scss" scoped></style>
