otherInfo.vue 3.05 KB
<template>
  <Card title="其他信息" class="" openBtn>
    <div class="other-info" v-for="(item, idx) in form" :key="idx">
      <span class="title">{{ item.parentTitle }}</span>
      <div class="info-wrap">
        <li v-for="sonItem in item.li" :key="sonItem.key">
          <label class="label" for="">{{ sonItem.label }}</label>
          <span class="content">{{ otherInfoData[sonItem.key] || '--' }}</span>
        </li>
      </div>
    </div>
  </Card>
</template>
<script type="text/ecmascript-6">
import Card from './card.vue'
export default {
  name: 'otherInfo',
  props: {
    otherInfoData: Object
  },
  data() {
    return {
      form: [
        {
          parentTitle: '店面信息',
          li: [
            {
              key: 'merchantName',
              label: '店面名称:'
            },
            {
              key: 'merchantPhone',
              label: '店面联系方式:'
            },
            {
              key: 'merchantAddr',
              label: '店面地址:'
            }
          ]
        },
        {
          parentTitle: '产品详情',
          li: [
            {
              key: 'packageName',
              label: '产品名称:'
            },
            {
              key: 'contractNo',
              label: '合同编号:'
            },
            {
              key: 'effectiveDate',
              label: '生效时间:'
            },
            {
              key: 'servicePeriod',
              label: '服务期限/年:'
            },
            {
              key: 'expirationDate',
              label: '起止时间:'
            }
          ]
        },
        {
          parentTitle: '客户信息',
          li: [
            {
              key: 'customerName',
              label: '客户姓名:'
            },
            {
              key: 'customerPhone',
              label: '电话号码:'
            },
            {
              key: 'customerAddr',
              label: '联系地址:'
            }
          ]
        },
        {
          parentTitle: '车辆信息',
          li: [
            {
              key: 'vin',
              label: '车架号:'
            },
            {
              key: 'brandAndShape',
              label: '品牌车型:'
            },
            {
              key: 'billingDate',
              label: '新车开票日期:'
            },
            {
              key: 'invoicePrice',
              label: '车辆购置价:'
            }
          ]
        }
      ]
    }
  },
  components: {
    Card
  },
  mounted() {},
  methods: {}
}
</script>
<style lang="scss" scoped>
.other-info {
  list-style: none;
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  line-height: 22px;
  color: #333333;
  margin-bottom: 16px;
  .info-wrap {
    background: #f9f9f9;
    padding: 20px;
    li {
      display: inline-block;
      line-height: 22px;
      padding: 10px 0;
      text-align: center;
      width: 500px;
      .label {
        color: #666666;
      }
    }
  }
}
</style>