<template>
  <div class="cmain">
    <el-form ref="form" :model="form" :disabled="param.detail" :rules="rules" label-width="110px">
      <div class="bos">
        <div class="lab">
          <div class="bsg"></div>
          <div class="tit">企业信息</div>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="企业名称" prop="companyName">
              <el-input v-model="form.companyName" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="邮箱地址" prop="email">
              <el-input v-model="form.email" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="企业负责人" prop="director">
              <el-input v-model="form.director" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="手机号" prop="phone">
              <el-input v-model="form.phone" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="综合服务费率" prop="rate">
          <el-input type="number" v-model="form.rate"><template slot="append">%</template></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="12">
            <el-form-item label="联系地址" prop="address">
              <el-input type="textarea" v-model="form.address" rows="4" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="营业执照" prop="business">
              <ImageUpload v-model="form.business" :isShowTip="false" :limit="1" :read="param.detail"></ImageUpload>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div class="bos">
        <div class="lab">
          <div class="bsg"></div>
          <div class="tit">对公账户信息</div>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="开户行" prop="bankName">
              <el-input v-model="form.bankName" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="对公账号" prop="bankAccount">
              <el-input v-model="form.bankAccount" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="开户许可证" prop="b1">
          <ImageUpload v-model="form.b1" :isShowTip="false" :limit="1" :read="param.detail"></ImageUpload>
        </el-form-item>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
      rules: {}
    };
  },
  props: {
    param: {
      type: Object,
      default: () => {
        return {};
      }
    },
    layerid: {
      type: String
    }
  },
  mounted() {
    if (this.param.id) {
      this.ajax({ url: '/work/company/index' }).then((response) => {
        this.form = response.data;
      });
    }
  },
  methods: {}
};
</script>
