<template>
  <view style="padding-top: 50rpx">
    <view class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx">
      <equipment-line title="保险公司" :content="infoData.bxgs" />
      <equipment-line title="交保单号" :content="infoData.jbdh" />
      <equipment-line title="商保单号" :content="infoData.sbdh" />
      <equipment-line title="上牌日期" :content="infoData.spDate" />
      <equipment-line title="交保到期日" :content="infoData.jbdDate" />
      <equipment-line title="商保到期日" :content="infoData.sbdDate" />
      <equipment-line title="首保日期" :content="infoData.sbDate" />
      <equipment-line title="购置日期" :content="infoData.buyDate" />
      <equipment-line title="投用日期" :content="infoData.startDate" />
    </view>
  </view>
</template>
<script>
export default {
  data() {
    return {
      detailId: "",
      infoData: {},
    };
  },
  onLoad(options) {
    this.detailId = options.detailId;
    this.initData();
  },
  methods: {
    initData() {
      this.$Http
        .fetchSbInfo({
          id: this.detailId,
        })
        .then((res) => {
          this.infoData = res.data;
        });
      this.statusMap = this.$DictCache.getLabelByValueMapByType(
        this.$DictCache.TYPE.SB_INFO_STATUS
      );
    },
  },
};
</script>

<style lang="less">
page {
  background-color: #f4f4f4;
}
</style>
