writeOffDetail.vue 3.74 KB
<template>
  <div class="writeOff">
    <div class="box">
      <div class="header title" style="height: 53px; line-height: 53px">
        <span style="height: 53px; cursor: pointer; display: flex; align-items: center" @click="back">
          <i class="el-icon-arrow-left" style="font-size: 18px"></i>
          返回
        </span>
      </div>
      <div class="custom-info">
        <p class="title" style="margin-bottom: 20px">报案信息(客户提交)</p>
        <div class="info">
          <span class="item" v-for="(val, key) in customObj" :key="key">
            <span class="label">{{ val ? val + ':' : '' }}</span>
            {{ info[key] }}
          </span>
        </div>
      </div>
    </div>
    <div class="box" style="margin-top: 10px">
      <div class="header title">报案信息(店面补充)</div>
      <div class="handler-info">
        <span class="item" v-for="(val, key) in handlerObj" :key="key">
          <span class="label">{{ val ? val + ':' : '' }}</span>
          {{ info[key] }}
        </span>
        <div class="item service">
          <span class="label">申请核赔服务:</span>
          <div class="sevice-box">
            <div v-for="(item, index) in info.serviceItemsList" :key="index" class="service-item">
              {{ item.serviceItemName }}
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
export default {
  name: 'writeOffDetail',
  data() {
    return {
      info: {},
      customObj: {
        writeOffCode: '核销码',
        nullval: '',
        reporterName: '报案人',
        reporterPhone: '报案人联系号码',
        reporterDate: '报案日期',
        reimbursementDate: '出险日期'
      },
      handlerObj: {
        handlerName: '经办人',
        handlerPhone: '经办人联系号码'
      }
    }
  },
  mounted() {
    this.getDetail(this.$route.params)
  },
  methods: {
    getDetail({ id }) {
      this.$apis.beforeSale.getWriteOffDetail({ writeOffCode: id }).then(res => {
        if (res.code == '0') {
          this.info = res.data
        }
      })
    },
    back() {
      this.$router.push({
        path: '/beforeSale/index'
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.writeOff {
  .box {
    background-color: #fff;
  }
  p {
    margin: 0;
  }
  .item {
    width: 350px;
    padding: 15px 0;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #6c6f71;
    line-height: 17px;
    display: inline-block;
    margin-right: 120px;
    .label {
      width: 140px;
      text-align: right;
      display: inline-block;
    }
  }
  .service {
    margin-right: 0 !important;
    display: flex;
    width: 100%;
    .label {
      height: 36px;
      line-height: 36px;
      white-space: nowrap;
    }
    .sevice-box {
      width: 800px;
      .service-item {
        width: 240px;
        height: 36px;
        background: #f7f7f7;
        border: 1px solid #e9e9e9;
        display: inline-flex;
        align-items: center;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #6c6f71;
        line-height: 17px;
        padding: 0 12px;
        box-sizing: border-box;
        margin: 0 20px 20px 0;
      }
    }
  }
  .title {
    font-family: PingFangSC-Medium;
    font-size: 14px;
    color: #333333;
    font-weight: 700;
  }
  .header {
    border-bottom: 1px solid #eeeeee;
    height: 60px;
    background-color: #fff;
    line-height: 60px;
    padding: 0 20px;
  }
  .custom-info {
    height: 220px;
    padding: 20px;
    box-sizing: border-box;
    .info {
      width: 950px;
    }
  }
  .handler-info {
    padding: 20px;
  }
}
</style>