Blame view

src/pages/custom-service/components/policy-head-list.vue 4.09 KB
joe committed
1
<template>
1  
joe committed
2
  <div class="list-container">
joe committed
3
    <div class="cell-group">
1  
joe committed
4 5 6 7 8 9 10 11 12 13
      <div class="table-contaner">
        <div class="table-header orange">
          <div class="normal-header">
            <div class="td w1">{{$t('customService.insuranceQuery.InsurantNumber')}}</div>
            <div class="td w2">{{$t('customService.insuranceQuery.Insurant')}}</div>
            <div class="td w1">{{$t('customService.insuranceQuery.InsurantName')}}</div>
            <div class="td w2">{{$t('customService.insuranceQuery.InsurantAmount')}}</div>
            <div class="td w2">{{$t('customService.insuranceQuery.effectiveDate')}}</div>
            <div class="td w2">{{$t('customService.insuranceQuery.period')}}</div>
          </div>
joe committed
14
        </div>
1  
joe committed
15
        <div class="guide" :class="{rotate180 : hide}" @click="hide = !hide"></div>
joe committed
16
      </div>
joe committed
17
      <div class="table-content" :class="{hide : hide}">
joe committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
        <template v-if="myPolicyList">
          <div v-for="(item,index) in myPolicyList" :key="index">
            <template v-if="index < maxShow">
              <div class="data-line" @click="handlePolicySelect(item,index)">
                <div class="td w1 pointer">
                  <template v-if="multiSelectable">
                    <img v-if="item.activity" class="icon-check pointer" src="@/assets/images/insurance-query/check.png">
                    <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png">
                    <span class="sp" :class="{ac: item.activity}">{{item.policyCode}}</span>
                  </template>
                  <template v-else>
                    <template v-if="model != 'download'">
                      <img v-if="selectPolicyCode == item.policyCode" class="icon-check pointer" src="@/assets/images/insurance-query/check.png">
                      <img v-else class="icon-check pointer" src="@/assets/images/insurance-query/un-check.png">
                    </template>
                    <span class="sp" :class="{ac: selectPolicyCode == item.policyCode}">{{item.policyCode}}</span>
                    <template v-if="model == 'download'">
joe committed
35
                      <img @click="downloadPolicy(item)" class="icon-download" src="@/assets/images/insurance-query/icon-down-load.png" alt="">
joe committed
36 37 38
                    </template>
                  </template>
                </div>
1  
joe committed
39 40
                
                <div class="td w2">{{lan == 'en' ? (item.insuredNameEn ? item.insuredNameEn : item.insuredNameCn) : (item.insuredNameCn ? item.insuredNameCn : item.insuredNameEn)}}</div>
joe committed
41
                <div class="td w1">{{formatPolicyName(item.productCode, item.productName)}}</div>
joe committed
42
                <div class="td w2">{{item.moneyCode}} {{formatMoney(item.amount,0)}}</div>
joe committed
43
                <div class="td w2">{{item.expireAt?item.expireAt.split(" ")[0]:""}}</div>
1  
joe committed
44 45 46
                <!-- <div class="td w2">{{item.guaranteeAge?item.guaranteeAge.split(" ")[0]:""}}</div> -->
                <div class="td w2">{{formatInsuredPeriod(item.insuredPeriodType,item.insuredPeriodValue)}}</div>
                
joe committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
              </div>
              <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div>
            </template>
          </div>
          <template v-if="!policyList || maxShow < policyList.length">
            <div class="separator-h"></div>
            <div class="data-line show-more-btn" @click="maxShow = policyList.length">{{$t('customService.insuranceQuery.showMore')}}</div>
          </template>
        </template>

        <template v-else>
          <div class="empty">
            <div class="tips">
              <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt="">
              <div class="txt">
                {{$t('customService.insuranceQuery.noPolicy')}}
joe committed
63
                <span class="pointer btn" @click="toContactUs">{{$t('customService.insuranceQuery.customService')}}</span>
joe committed
64 65 66 67 68 69 70 71 72 73 74 75 76
              </div>
            </div>
          </div>
        </template>
      </div>
    </div>
  </div>
</template>


<script src="./policy-head-list.js"></script>
<style lang="scss" scoped>
@import "./policy-head-list.scss";
simon committed
77
</style>