<template>
  <div>
    <div v-for="(item, index) in list" :key="index">
      <span>{{'第' +( indexRow == '' ? index+1 : indexRow)  + '次审核'}}</span>
      <div class="divider"></div>
      <dym-form :formValue.sync="item"
                :componentList="componentList"
                editModel="V">
      </dym-form>
      <data-table operateBtnLayout
                  :columns="columns"
                  :sourceData.sync="item.sourceData"
                  :showPage="false">
      </data-table><br>
    </div>
  </div>
</template>
<script>
import { dymForm, DataTable } from 'newepoch-components'
export default {
  components: {
    dymForm,
    DataTable
  },
  props: {
    list: {
      type: Array,
      default () {
        return []
      }
    },
    indexRow: String
  },
  data () {
    const { factoringBusinessInfo } = this.$i18n.messages[this.$i18n.locale]
    return {
      componentList: [
        // 审核人员
        {
          label: factoringBusinessInfo.review_persons,
          value: 'auditorName',
          disabled: true,
          componentName: 'el-input',
          cols: [8, 8, 8, 8],
          labelWidth: '70px',
          prop: 'auditorName'
        },
        // 是否退回
        {
          label: factoringBusinessInfo.if_feedback,
          value: 'isBack',
          disabled: true,
          componentName: 'SelectDictionary',
          dictTypeCode: 'ZD0039',
          store: this.$store,
          cols: [8, 8, 8, 8],
          labelWidth: '70px',
          prop: 'isBack'
        },
        // 审核时间
        {
          label: factoringBusinessInfo.audit_date,
          value: 'auditTime',
          disabled: true,
          componentName: 'el-date-picker',
          type: 'datetime',
          cols: [8, 8, 8, 8],
          labelWidth: '70px',
          prop: 'auditTime'
        }
      ],
      columns: [
        // 文件名称
        {
          prop: 'fileName',
          align: 'left',
          width: '110px',
          label: factoringBusinessInfo.file_name
        },
        // 审核意见
        {
          prop: 'auditOpinions',
          align: 'left',
          width: '110px',
          label: factoringBusinessInfo.review_opinion
        }
      ]
    }
  }
}
</script>
