<!--
 * @Author: wanglj 471442253@qq.com
 * @Date: 2022-12-29 18:00:08
 * @LastEditors: wanglj
 * @LastEditTime: 2022-12-30 09:03:39
 * @Description: file content
 * @FilePath: \opms_frontend\src\views\customer\components\FollowDetail.vue
-->
<template>
  <el-dialog title="跟进详情" :visible.sync="visible">
    <el-descriptions border class="margin-top" :column="1" size="medium">
      <el-descriptions-item label="跟进类型">
        {{ formatType(form.followType) }}
      </el-descriptions-item>
      <el-descriptions-item label="跟进时间">
        {{ form.followDate }}
      </el-descriptions-item>
      <el-descriptions-item label="跟进描述">
        {{ form.followDate }}
      </el-descriptions-item>
      <el-descriptions-item label="客户名称">
        {{ form.custName }}
      </el-descriptions-item>
      <el-descriptions-item label="联系人">
        {{ form.contactsName }}
      </el-descriptions-item>
      <el-descriptions-item label="相关附件">
        {{ form.files }}
      </el-descriptions-item>
      <el-descriptions-item label="评论数量">
        {{ form.commentNumber }}
      </el-descriptions-item>
      <el-descriptions-item label="创建时间">
        {{ form.createdTime }}
      </el-descriptions-item>
    </el-descriptions>
    <span slot="footer">
      <!-- <el-button>编辑跟进</el-button>
        <el-button>删除跟进</el-button> -->
      <el-button @click="visible = false">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    data() {
      return {
        visible: false,
        form: {
          id: '',
          followType: '',
          followDate: '',
          followContent: '',
          targetId: '',
          targetType: '',
          targetName: '',
          custId: '',
          custName: '',
          contactsId: 0,
          contactsName: '',
          reminders: '',
          nextTime: '',
          remark: '',
          createdBy: '',
          createdName: '',
          createdTime: '',
          updatedBy: '',
          updatedName: '',
          updatedTime: '',
          deletedTime: '',
        },
      }
    },
    methods: {
      init(form) {
        this.form = form
        this.visible = true
      },
      formatType(val) {
        let str = ''
        if (val == 10) str = '电话'
        else if (val == 20) str = '邮件'
        else if (val == 30) str = '拜访'
        return str
      },
    },
  }
</script>

<style></style>
