<template>
  <el-form label-width="120px" ref="form" :model="form" class="el-form-box">
    <el-row>
      <el-col :span="24">
        <el-form-item label="客户名称：" prop="contactName">
          <el-input v-model="form.contactName" disabled></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="	商机名称：" prop="name">
          <el-input v-model="form.name" disabled></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="负责人名称：" prop="responsibleName">
          <el-input v-model="form.responsibleName" disabled></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="商机来源：" prop="sourceCode">
          <el-input v-model="form.sourceName" disabled></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="赢单率：" prop="winRate">
          <el-input v-model="form.winRate" disabled>
            <template slot="append">%</template>
          </el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="预算：" prop="budget">
          <el-input v-model="form.budget" disabled>
            <template slot="append">万元</template>
          </el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="预计结单日期：" prop="expectedClosingDate">
          <el-input v-model="form.expectedClosingDate" disabled> </el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="商机阶段：" prop="stageCode">
          <el-input v-model="form.stageName" disabled> </el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="附件：" prop="files">
          <fileMain v-model="form.files" type="view"></fileMain>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="备注：" prop="remark">
          <el-input type="textarea" v-model="form.remark" disabled> </el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="创建人：" prop="createUserName">
          <el-input v-model="form.createUserName" disabled></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="创建时间：" prop="createTime">
          <el-input v-model="form.createTime" disabled></el-input>
        </el-form-item>
      </el-col>
     
    </el-row>
  </el-form>
</template>

<script>
import fileMain from '@/components/addDoc/index.vue';

import dictMixins from '@/mixins/dictMixins';
export default {
  mixins: [dictMixins],
  components: {fileMain},
  data() {
    return {
      form: {}
    };
  },
  methods: {
    async init(row) {
      this.form = row;
    },

    downloadFile(file) {
      getFile({ objectName: file.storePath }, file.name);
    }
  }
};
</script>
<style lang="scss" scoped>
:deep(.el-input) {
  width: 50%;
}
:deep(.el-textarea) {
  width: 50%;
}
</style>