<template>
  <div>
    <div class="container normal-panel" style="margin-top: 2%">
      <el-descriptions title="基本信息">
        <el-descriptions-item label="客户名称">{{ basic.enterprisename }}</el-descriptions-item>
        <el-descriptions-item label="客户编号">{{ basic.sa_customersid }}</el-descriptions-item>
        <el-descriptions-item label="企业简称">{{ basic.abbreviation }}</el-descriptions-item>
        <el-descriptions-item label="客户类型">{{ basic.type }}</el-descriptions-item>
        <el-descriptions-item label="客户级别">{{ basic.grade }}</el-descriptions-item>
        <el-descriptions-item label="所属行业">{{ basic.industry }}</el-descriptions-item>
        <el-descriptions-item label="上级企业">{{ basic.superiorenterprisename }}</el-descriptions-item>
        <el-descriptions-item label="成交状态">{{ basic.tradingstatus }}</el-descriptions-item>
        <el-descriptions-item label="合作状态">{{ basic.status }}</el-descriptions-item>
        <el-descriptions-item label="负责人">{{ basic.createby }}</el-descriptions-item>
        <el-descriptions-item label="来源">{{ basic.source }}</el-descriptions-item>
        <el-descriptions-item label="所属公海">{{ basic.poolname }}</el-descriptions-item>
      </el-descriptions>
    </div>

    <div class="container normal-panel" style="margin-top: 2%">
      <el-descriptions title="系统信息">
        <el-descriptions-item label="创建人">{{ system.createby }}</el-descriptions-item>
        <el-descriptions-item label="创建时间">{{ system.createdate }}</el-descriptions-item>
        <el-descriptions-item label="最近跟进人">{{ system.followby }}</el-descriptions-item>
        <el-descriptions-item label="最近跟进时间">{{ system.followdate }}</el-descriptions-item>
        <el-descriptions-item label="成交状态">{{ system.tradingstatus }}</el-descriptions-item>
        <el-descriptions-item label="锁定状态" v-if="system.datastatus === 0">未锁定</el-descriptions-item>
        <el-descriptions-item label="锁定状态" v-else-if="system.datastatus === 2">已锁定</el-descriptions-item>
        <el-descriptions-item label="退回/回收原因">{{ system.returnreson }}</el-descriptions-item>
        <el-descriptions-item label="最近编辑人">{{ system.changeby }}</el-descriptions-item>
        <el-descriptions-item label="最近编辑时间">{{ system.changedate }}</el-descriptions-item>
        <el-descriptions-item label="转手次数">{{ system.changecount }}</el-descriptions-item>
        <el-descriptions-item label="客户资料完善度">{{ system.percentage }}</el-descriptions-item>
      </el-descriptions>
    </div>
  </div>
</template>

<script>
export default {
  name: "detailedData",
  props:["data"],
  data(){
    return {
      basic:[],
      system:[]
    }
  },
  mounted() {
    this.basicData(this.data)
    this.systemData(this.data)
  },
  methods:{
    /*基本信息*/
    async basicData(id){
      const res = await this.$api.requested({
        "id": 20221012164302,
        "content": {
          "sa_customersid": id
        },
      })
      console.log(res)
      this.basic = res.data

    },
    /*系统信息*/
    async systemData(id){
      const res = await this.$api.requested({
        "id": 20221019091602,
        "content": {
          "sa_customersid": id
        },
      })
      this.system = res.data
    }
  }
}
</script>

<style scoped>

</style>