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

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

<script>
export default {
  name: "detailedData",
  props:["data"],
  data(){
    return {
      basic:[],
      system:[],
      sa_customersid:""
    }
  },
  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
        },
      })
      this.basic = res.data

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

<style>

</style>
<style scoped>

.my-label {
  }
</style>