<!-- 基本 -->
<template>
  
  <div class="context">
    <div style="text-align: right;">
      <!-- <el-button type="primary" @click="user_examine">
        通过审核
      </el-button>  -->
    </div>
    <div class="xinxi">
      <div style="flex: 1;">
        客户名称：{{ Message.name }}
      </div>
      <div style="flex: 1;">
        客户类型：{{getcustom(Message.custom_type)}}
      </div>
    </div>
    <div class="xinxi">
      <div style="flex: 1;">
        销售人员：{{Message.salesperson}}
      </div>
      <div style="flex: 1;">
        签约时间：{{ Message.sign_time }}
      </div>
    </div>
    <div class="xinxi">
      <div style="flex: 1;">
        合同金额：{{Message.contract_price}}
      </div>
      <div style="flex: 1;">
        软件金额：{{ Message.software_price }}
      </div>
    </div>
    <div class="xinxi">
      <div style="flex: 1;">
        硬件金额：{{ Message.hardware_price }}
      </div>
      <div style="flex: 1;">
        年费金额：{{ Message.year_cost_price }}
      </div>
    </div>
    <div class="xinxi">
      <div style="flex: 1;">
        详细地址：{{ Message.address }}
      </div>
      <div style="flex: 1;">
        上线时间：{{ Message.Topline_time }}
      </div>
    </div>
    <div>
      备注：{{ Message.client_remark}}
    </div>

    <!-- 弹窗 -->
    <div>
      <el-dialog
        title="编辑基本信息"
        :visible.sync="useclick"
        :modal-append-to-body="false"
        width="60%"
        >
        <div>
          <div class="xinxi"  style="">
            <div style="flex: 1;">
              <span>客户名称：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
            <div style="flex: 1;">
              <span>客户类型：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
          </div>
          <div class="xinxi"  style="">
            <div style="flex: 1;">
              <span>销售人员：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
            <div style="flex: 1;">
                <span>签约时间：</span>
                <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
              </div>
          </div>

          <div class="xinxi"  style="">
            <div style="flex: 1;">
                <span>合同金额：</span>
                <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
            <div style="flex: 1;">
              <span>软件金额：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
          </div>
          <div class="xinxi"  style="">
            <div style="flex: 1;">
                <span>硬件金额：</span>
                <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
            <div style="flex: 1;">
              <span>年费金额：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
          </div>

          <div class="xinxi"  style="">
            <div style="flex: 1;">
                <span>详细地址：</span>
                <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
              </div>
            <div style="flex: 1;">
              <span>上线时间：</span>
              <el-input v-model="input" placeholder="请输入内容" style="width: 150px;"></el-input>
            </div>
          </div>
          <div class="xinxi"  style="">
            <div style="flex: 1;">
              <span style="position: relative;bottom: 20px;left: 0;">
                  备注：
              </span>
              <el-input type="textarea" :row="2" v-model="textarea" placeholder="请输入内容" style="width: 80%;"></el-input>
            </div>
          </div>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="useclick = false">取 消</el-button>
          <el-button type="primary" @click="useclick = false">确 定</el-button>
        </span>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import { uParseTime } from "@/utils/tools";
import {getkehucustomcheck} from '@/api/index'
export default{
  props:{
    Message:Object
  },
  components:{
    // Newadd
  },
  
  data(){
    return{
      input:'',
      textarea:'',
      useclick:false,
      custom_options:[{value:1,label:'标准版'},{value:2,label:'尊享版'},{value:3,label:'专业版'}],
    }
  },
  methods:{
    // 客户类型
    getcustom(val){
      const options = this.custom_options
      for(let i in options){
        if(val == options[i].value){
          return options[i].label
        }
      }
    },
    // 转换时间
    getTime(val) {
      if(val < 0){
        return ""
      }
      if(val == ""){
        return ""
      }else {
        return uParseTime(val, '{y}-{m}-{d}')
      }
    },
    // user_examine(){
    //   getkehucustomcheck(this.Message.id).then(res =>{
    //     console.log(res);
    //   })
    // }
  },
  created(){

    console.log('1113333',this.Message);
  },
  mounted(){
    console.log('2222',this.useclick);
  }
}
</script>

<style scoped lang="scss">
  .context{
    padding: 20px 0;
    .xinxi{
      display: flex;
      margin-bottom: 15px;
    }
  }

</style>