<!--合约信息-->
<template>
  <div>
    <tags :data="tagsData" v-if="tagsData && tagsData.length > 0"></tags>
    <div class="userInfoPanel mt10">
      <el-row class="userInfo" v-if="data && data.length > 0">
        <el-col :span="12">
          <span class="name">保险单号</span>
          <span class="value">{{data[0].policyno}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">保险期限</span>
          <span class="value">{{data[0].agrmntage}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">承保分公司</span>
          <span class="value">{{data[0].pwcomp}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">起保日期</span>
          <span class="value">{{parseTime(data[0].pindate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">终保日期</span>
          <span class="value">{{parseTime(data[0].pmdate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">签单日期</span>
          <span class="value">{{parseTime(data[0].pisdate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">投保日期</span>
          <span class="value">{{parseTime(data[0].padate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">续保日期</span>
          <span class="value">{{parseTime(data[0].renewaldate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">续保次数</span>
          <span class="value">{{data[0].norenewal}}次</span>
        </el-col>
        <el-col :span="12">
          <span class="name">销售渠道</span>
          <span class="value" v-if="data[0].schannel==1">团险渠道</span>
          <span class="value" v-if="data[0].schannel==2">个人营销</span>
          <span class="value" v-if="data[0].schannel==3">银行代理</span>
          <span class="value" v-if="data[0].schannel==4">中介渠道</span>
          <span class="value" v-if="data[0].schannel==5">网销渠道</span>
        </el-col>
        <el-col :span="12">
          <span class="name">保单状态</span>
          <span class="value">{{data[0].policystate}}</span>
<!--          <span class="value" v-if="data[0].PolicyState=='0'">未承保</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='1'">承保</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='2'">新增附加险</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='4'">终止</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='9'">续保</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='B'">未对账</span>-->
<!--          <span class="value" v-if="data[0].PolicyState=='F'">对账失败</span>-->
        </el-col><el-col :span="12">
        <span class="name">缴费方式</span>
        <span class="value">{{data[0].payment}}</span>
      </el-col>
        <el-col :span="12">
          <span class="name">保单保额</span>
          <span class="value">{{data[0].risk}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">保单保费</span>
          <span class="value">{{data[0].prem}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">下次缴费日期</span>
          <span class="value">{{parseTime(data[0].npdate,'{yy}-{mm}-{dd}')}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">被保人数</span>
          <span class="value">{{data[0].soinsured}}人</span>
        </el-col>
        <el-col :span="12">
          <span class="name">基本保额</span>
          <span class="value">{{data[0].bsinsured}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">保单价值</span>
          <span class="value">{{data[0].insurvalue}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">主被保险人名称</span>
          <span class="value">{{data[0].insname}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">险种名称</span>
          <span class="value">{{data[0].productname}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">业务员</span>
          <span class="value">{{data[0].salesperson}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">业绩归属</span>
          <span class="value">{{data[0].policybelong}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">代理渠道</span>
          <span class="value">{{data[0].agentchannel}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">代理机构</span>
          <span class="value">{{data[0].agentorg}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">是否保全</span>
          <span class="value">{{data[0].poservice}}</span>
        </el-col>
        <el-col :span="12">
          <span class="name">缴费年期</span>
          <span class="value">{{data[0].payendyear}}年</span>
        </el-col>
      </el-row>
      <el-row class="userInfo" v-if="data.length == 0">
        <div class="noData">暂无数据</div>
      </el-row>
    </div>
  </div>
</template>
<script>
  import tags from './tags'
  export default {
    components: {
      tags
    },
    props: {
      data: {
        type: Array,
        default: function (){
          return [];
        }
      },
      tagsData: {
        type: Array,
        default: function (){
          return [];
        }
      },
    },
    data() {
      return {

      };
    },
    mounted() {

    },
    methods: {

    }
  };
</script>
<style lang="scss">
  .noData{
    color: #303133;
    text-align: center;
    padding: 20px 0;
  }
</style>

