<!--
 * @Author: PangXingYue
 * @Date: 2021-03-22 09:46:16
 * @LastEditTime: 2021-03-22 14:02:35
 * @LastEditors: PangXingYue
 * @Description: 
 * @FilePath: \ebiz-h5\src\components\ebiz\insureAgain\Order.vue
-->
<template>
  <div class="order">
    <slot name="header">
      <p class="title pt10 pb10">保单号: 23042834929832</p>
    </slot>
    <div class="content p15">
      <p class="name mb8">
        <van-tag plain color="#5CA7DE">投保</van-tag>
        <span class="ml5">{{ order.appntName }}</span>
      </p>
      <p class="name mb8">
        <van-tag plain color="#DD9C56">被保</van-tag>
        <span class="ml5">{{ order.insuredName }}</span>
         <!-- <span v-for="(main, mainIndex) in insured.mainRisk" :key="mainIndex">
          <div class="mv10">
            <span class="w45 inline-b">
              <van-tag plain type="danger">主险</van-tag>
            </span>
            <span class="fs15 c-gray-dark">{{ main.riskName }}</span>
          </div>
          <div class="mv10 pl45 flex" v-for="(addtional, addtionIndex) in main.addtion" :key="addtionIndex">
            <span class="mr10" style="flex-shrink: 0">
              <van-tag mark color="#DDF2EF" text-color="#E9332E">附加</van-tag>
            </span>
            <span class="fs13">{{ addtional.riskName }}</span>
          </div>
        </span> -->
      </p>    
      <p class="prem mb10">
        <span>首期总保费(元)</span>
        <span>{{ order.prem == 0 ? '0.00' : order.prem | moneyFormat }}</span>
      </p>
      <div class="divider mb10" />
      <slot></slot>
      <div class="btns">
        <slot name="btns" />
      </div>
    </div>
  </div>
</template>

<script>
import { Tag } from 'vant'
export default {
  name: 'Order',
  components: {
    [Tag.name]: Tag
  },
  props: {
    order: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.order {
  background: #fff;
  .title {
    font-size: 14px;
    text-align: center;
    background-color: #f2f2f2;
  }

  .content {
    .name {
      font-size: 14px;
      .span {
        color: #999999;
      }
    }

    .prem {
      color: #e42b2b;
      display: flex;
      justify-content: space-between;
      font-size: 14px;
      font-weight: bolder;
    }

    .divider {
      width: 200%;
      border-bottom: 1px solid #cccccc;
      transform-origin: left;
      transform: scale(0.5);
    }
    .btns {
      display: flex;
      justify-content: flex-end;
    }
  }
}
</style>
