<template>
  <div class="owner-box">
    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-position="top" label-width="120px" class="rule-form-orange">

      <el-form-item label="企业基本变动信息" prop="enterpriseChange" class="one-form-item">
        <el-input :value="ruleForm.enterpriseChange=='1'?'存在':'不存在'" placeholder="请输入企业基本变动信息" />
      </el-form-item>
      <el-form-item label="评估得分" prop="enterpriseChangeScore" class="one-form-item">
        <el-input v-model="ruleForm.enterpriseChangeScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="失信被执行信息" prop="shiXin" class="one-form-item">
        <el-input :value="ruleForm.shiXin=='1'?'存在':'不存在'" placeholdenr="请输入失信被执行信息" />
      </el-form-item>
      <el-form-item label="评估得分" prop="shiXinScore" class="one-form-item">
        <el-input v-model="ruleForm.shiXinScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="限高消费情况（企业）" prop="stCount" class="one-form-item">
        <el-input :value="ruleForm.stCount=='1'?'存在':'不存在'" placeholder="请输入限高消费情况（企业）" />
      </el-form-item>
      <el-form-item label="评估得分" prop="stCountScore" class="one-form-item">
        <el-input v-model="ruleForm.stCountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="限高消费情况（法人）" prop="stCountPerson" class="one-form-item">
        <el-input :value="ruleForm.stCountPerson=='1'?'存在':'不存在'" placeholder="请输入限高消费情况（法人）" />
      </el-form-item>
      <el-form-item label="评估得分" prop="stCountPersonScore" class="one-form-item">
        <el-input v-model="ruleForm.stCountPersonScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="当前被执行金额" prop="zhiXingAmount" class="one-form-item">
        <el-input v-model="ruleForm.zhiXingAmount" placeholder="请输入当前被执行金额" />
      </el-form-item>
      <el-form-item label="评估得分" prop="zhiXingAmountScore" class="one-form-item">
        <el-input v-model="ruleForm.zhiXingAmountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="当前被执行频率" prop="zhiXingFrequent" class="one-form-item">
        <el-input v-model="ruleForm.zhiXingFrequent" placeholder="请输入当前被执行频率" />
      </el-form-item>
      <el-form-item label="评估得分" prop="zhiXingFrequentScore" class="one-form-item">
        <el-input v-model="ruleForm.zhiXingFrequentScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="历史涉诉金额" prop="historicalLitigationAmount" class="one-form-item">
        <el-input v-model="ruleForm.historicalLitigationAmount" placeholder="请输入历史涉诉金额" />
      </el-form-item>
      <el-form-item label="评估得分" prop="historicalLitigationAmountScore" class="one-form-item">
        <el-input v-model="ruleForm.historicalLitigationAmountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="历史涉诉数量（近一年）" prop="historicalLitigationCount" class="one-form-item">
        <el-input v-model="ruleForm.historicalLitigationCount" placeholder="请输入历史涉诉数量（近一年）" />
      </el-form-item>
      <el-form-item label="评估得分" prop="historicalLitigationCountScore" class="one-form-item">
        <el-input v-model="ruleForm.historicalLitigationCountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="民间借贷被告记录" prop="privateLending" class="one-form-item">
        <el-input :value="ruleForm.privateLending=='1'?'存在':'不存在'" placeholder="请输入民间借贷被告记录" />
      </el-form-item>
      <el-form-item label="评估得分" prop="privateLendingScore" class="one-form-item">
        <el-input v-model="ruleForm.privateLendingScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="金融机构被告案件" prop="financialInstitution" class="one-form-item">
        <el-input :value="ruleForm.financialInstitution=='1'?'存在':'不存在'" placeholder="请输入金融机构被告案件" />
      </el-form-item>
      <el-form-item label="评估得分" prop="financialInstitutionScore" class="one-form-item">
        <el-input v-model="ruleForm.financialInstitutionScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="股权冻结" prop="equityFreeze" class="one-form-item">
        <el-input :value="ruleForm.equityFreeze=='1'?'存在':'不存在'" placeholder="请输入股权冻结" />
      </el-form-item>
      <el-form-item label="评估得分" prop="equityFreezeScore" class="one-form-item">
        <el-input v-model="ruleForm.equityFreezeScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="重大异常诉讼" prop="majorAbnormalLitigation" class="one-form-item">
        <el-input :value="ruleForm.majorAbnormalLitigation=='1'?'存在':'不存在'" placeholder="请输入重大异常诉讼" />
      </el-form-item>
      <el-form-item label="评估得分" prop="majorAbnormalLitigationScore" class="one-form-item">
        <el-input v-model="ruleForm.majorAbnormalLitigationScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="严重违法行为" prop="seriousIllegality" class="one-form-item">
        <el-input :value="ruleForm.seriousIllegality=='1'?'存在':'不存在'" placeholder="请输入严重违法行为" />
      </el-form-item>
      <el-form-item label="评估得分" prop="seriousIllegalityScore" class="one-form-item">
        <el-input v-model="ruleForm.seriousIllegalityScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="欠税公告" prop="taxOweNotice" class="one-form-item">
        <el-input :value="ruleForm.taxOweNotice=='1'?'存在':'不存在'" placeholder="请输入欠税公告" />
      </el-form-item>
      <el-form-item label="评估得分" prop="taxOweNoticeScore" class="one-form-item">
        <el-input v-model="ruleForm.taxOweNoticeScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="税收违法" prop="taxIllegal" class="one-form-item">
        <el-input :value="ruleForm.taxIllegal=='1'?'存在':'不存在'" placeholder="请输入税收违法" />
      </el-form-item>
      <el-form-item label="评估得分" prop="taxIllegalScore" class="one-form-item">
        <el-input v-model="ruleForm.taxIllegalScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="黑名单信息" prop="blacklist" class="one-form-item">
        <el-input :value="ruleForm.blacklist=='1'?'存在':'不存在'" placeholder="请输入黑名单信息" />
      </el-form-item>
      <el-form-item label="评估得分" prop="blacklistScore" class="one-form-item">
        <el-input v-model="ruleForm.blacklistScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="其他经营异常" prop="exception" class="one-form-item">
        <el-input :value="ruleForm.exception=='1'?'存在':'不存在'" placeholder="请输入其他经营异常" />
      </el-form-item>
      <el-form-item label="评估得分" prop="exceptionScore" class="one-form-item">
        <el-input v-model="ruleForm.exceptionScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="行政处罚数量（近一年）" prop="administrativePenaltyCount" class="one-form-item">
        <el-input v-model="ruleForm.administrativePenaltyCount" placeholder="请输入行政处罚数量（近一年）" />
      </el-form-item>
      <el-form-item label="评估得分" prop="administrativePenaltyCountScore" class="one-form-item">
        <el-input v-model="ruleForm.administrativePenaltyCountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="行政处罚金额" prop="administrativePenaltyAmount" class="one-form-item">
        <el-input v-model="ruleForm.administrativePenaltyAmount" placeholder="请输入行政处罚金额" />
      </el-form-item>
      <el-form-item label="评估得分" prop="administrativePenaltyAmountScore" class="one-form-item">
        <el-input v-model="ruleForm.administrativePenaltyAmountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="环保处罚金额" prop="environmentalPenaltiesAmount" class="one-form-item">
        <el-input v-model="ruleForm.environmentalPenaltiesAmount" placeholder="请输入环保处罚金额" />
      </el-form-item>
      <el-form-item label="评估得分" prop="environmentalPenaltiesAmountScore" class="one-form-item">
        <el-input v-model="ruleForm.environmentalPenaltiesAmountScore" placeholder="请输入评估得分" />
      </el-form-item>

      <el-form-item label="重大负面新闻舆情" prop="news" class="one-form-item">
        <el-input :value="ruleForm.news=='1'?'存在':'不存在'" placeholder="请输入重大负面新闻舆情" />
      </el-form-item>
      <el-form-item label="评估得分" prop="newsScore" class="one-form-item">
        <el-input v-model="ruleForm.newsScore" placeholder="请输入评估得分" />
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    details: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      ruleForm: {
        enterpriseChange: '',
        enterpriseChangeScore: '',
        shiXin: '',
        shiXinScore: '',
        stCount: '',
        stCountScore: '',
        stCountPerson: '',
        stCountPersonScore: '',
        zhiXingAmount: '',
        zhiXingAmountScore: '',
        zhiXingFrequent: '',
        zhiXingFrequentScore: '',
        historicalLitigationAmount: '',
        historicalLitigationAmountScore: '',
        historicalLitigationCount: '',
        historicalLitigationCountScore: '',
        privateLending: '',
        privateLendingScore: '',
        financialInstitution: '',
        financialInstitutionScore: '',
        equityFreeze: '',
        equityFreezeScore: '',
        majorAbnormalLitigation: '',
        majorAbnormalLitigationScore: '',
        seriousIllegality: '',
        seriousIllegalityScore: '',
        taxOweNotice: '',
        taxOweNoticeScore: '',
        taxIllegal: '',
        taxIllegalScore: '',
        blacklist: '',
        blacklistScore: '',
        exception: '',
        exceptionScore: '',
        administrativePenaltyCount: '',
        administrativePenaltyCountScore: '',
        administrativePenaltyAmount: '',
        administrativePenaltyAmountScore: '',
        environmentalPenaltiesAmount: '',
        environmentalPenaltiesAmountScore: '',
        news: '',
        newsScore: ''
      },
      rules: {}
    }
  },
  watch: {
    details: {
      handler(newV) {
        if (newV && Object.keys(newV)) {
          const details = JSON.parse(JSON.stringify(newV))
          for (const k in this.ruleForm) {
            if (details[k] !== '' && details[k] !== null && details[k] !== undefined) {
              this.ruleForm[k] = details[k]
            }
          }
        }
      },
      immediate: true,
      deep: true
    }
  }
}
</script>

<style lang="scss" scoped>
.owner-box {
padding: 10px 15px;
}
</style>
