<template>
  <div>
    <a-collapse v-model="activeKeys" expand-icon-position="right" :bordered="false">
      <a-collapse-panel key="1" header="保单信息">
        <a-row class="policy_line" :gutter="10">
          <a-col :span="6">保险卡号：{{policyData.cardNo}}</a-col>
          <a-col :span="6">保单号码：{{policyData.policyNo}}</a-col>
          <a-col :span="6">保险计划：{{policyData.planName}}</a-col>
          <a-col :span="6">客户公司名称：{{policyData.corpName}}</a-col>
          <a-col :span="6">首次入保日期：{{dateFormat(policyData.firstEnrollmentTime)}}</a-col>
          <a-col :span="6">保单生效日期：{{dateFormat(policyData.startDate)}}</a-col>
          <a-col :span="6">保单终止日期：{{dateFormat(policyData.endDate)}}</a-col>
          <a-col :span="6">是否承担既往症：{{policyData.isUndertakeAnamnesis}}</a-col>
          <a-col :span="6">保单直付区域：{{policyData.policyDircetArea}}</a-col>
          <a-col :span="6" v-if="policyData.waitingPeriod === 'Y'">剩余等待期天数{{policyData.waitingPeriodTime}}</a-col>
          <a-col :span="6">其他备注：{{policyData.remark}}</a-col>
        </a-row>
      </a-collapse-panel>
    </a-collapse>
  </div>
</template>

<script>
import moment from 'moment'

export default {
  props: {
    policyData: {
      default: {},
    },
  },
  data() {
    return {
      activeKeys: "1",
    };
  },
  methods: {
    dateFormat(val) {
      return val && moment(val).format('YYYY-MM-DD')
    }
  }
};
</script>

<style lang="less" scoped>
.policy_line {
  .pa(0, 30, 0, 30);
  line-height: 60px;
  .ant-col{
    border-bottom: 1px solid #f8fafb;
  }
}
</style>
