// 付款确认书信息
<template>
  <dym-form :formValue.sync="form"
            :componentList="componentList"
            editModel="V">
  </dym-form>
</template>
<script>
import { dymForm } from 'newepoch-components'
export default {
  components: {
    dymForm
  },
  props: {
    assetCodeForm: {
      type: Object,
      default () {
        return {}
      }
    },
    initFlag: {
      type: Boolean,
      default () {
        return false
      }
    }
  },
  data () {
    const { factoringBusinessInfo } = this.$i18n.messages[this.$i18n.locale]
    return {
      form: {},
      componentList: [
        // 产品名称
        {
          label: factoringBusinessInfo.product_name,
          value: 'projectName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'projectName'
        },
        // 核心企业
        {
          label: factoringBusinessInfo.core_enterprise,
          value: 'coreEnterpriseName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'coreEnterpriseName'
        },
        // 计划管理人/再保理银行
        {
          label: factoringBusinessInfo.planning_manager,
          value: 'planOrBankName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'planOrBankName'
        },
        // 期数
        {
          label: factoringBusinessInfo.periods,
          value: 'specialPlanPeriods',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'specialPlanPeriods'
        },
        // 原始权益人
        {
          label: factoringBusinessInfo.initial_equity_owner,
          value: 'initialOwnersName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'initialOwnersName'
        },
        // 资产服务机构
        {
          label: factoringBusinessInfo.assest_service,
          value: 'assetServiceName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'assetServiceName'
        },
        // 付款确认书编号
        {
          label: factoringBusinessInfo.pay_code,
          value: 'assetCode',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'assetCode'
        },
        // 供应商名称
        {
          label: factoringBusinessInfo.creditor,
          value: 'creditor',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'creditor'
        },
        // 项目公司名称
        {
          label: factoringBusinessInfo.project_company,
          value: 'debtor',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'debtor'
        },
        // 收款人名称
        {
          label: factoringBusinessInfo.payee_name,
          value: 'receiverName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'receiverName'
        },
        // 收款人开户行
        {
          label: factoringBusinessInfo.payee_bank,
          value: 'receiverBank',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'receiverBank'
        },
        // 收款人账号
        {
          label: factoringBusinessInfo.payee_account,
          value: 'receiverBankAccount',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'receiverBankAccount'
        },
        // 应收账款金额
        {
          label: factoringBusinessInfo.account_receivable,
          value: 'factoringMoney',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'factoringMoney'
        },
        // 费率
        {
          label: factoringBusinessInfo.factoring_rate_je,
          value: 'factoringRate',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'factoringRate'
        },
        // 账款到期日
        {
          label: factoringBusinessInfo.amount_due_date,
          value: 'dueDate',
          disabled: true,
          componentName: 'el-date-picker',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'dueDate'
        },
        // 商务合同名称
        {
          label: factoringBusinessInfo.business_contract_name,
          value: 'bussContractName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'bussContractName'
        },
        // 商务合同编号
        {
          label: factoringBusinessInfo.business_contract_number,
          value: 'bussContractCode',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'bussContractCode'
        },
        // 区域
        {
          label: factoringBusinessInfo.area,
          value: 'coreAreaName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'coreAreaName'
        },
        // 区域编号
        {
          label: factoringBusinessInfo.area_number,
          value: 'regionCode',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'coreArea'
        },
        // 区域专员
        {
          label: factoringBusinessInfo.regional_commissioner,
          value: 'coreAreaAttacheName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '110px',
          prop: 'coreAreaAttacheName'
        },
        // 保理专员
        {
          label: factoringBusinessInfo.factoring_commissioner,
          value: 'customerAccountName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '160px',
          prop: 'customerAccountName'
        }
      ]
    }
  },
  watch: {
    // 初始化数据
    initFlag (val) {
      if (val) {
        this.form = this.assetCodeForm
        // this.form.factoringRate = this.form.factoringRate * 100
      }
    }
  }
}
</script>
