commonCertificationStatusTable.vue 4.13 KB
<template>
  <div>
    <a-card title="认证状态信息" :bordered="false">
      <a-table ref="table" size="middle" bordered :rowKey="(record, index) => index" :columns="companyApproveData" :dataSource="collCreditStatuses" :pagination="false" :loading="loading" @change="handleTableChange">
        <span v-if="!disableSubmit" slot="action" slot-scope="text, record">
          <a v-if="(record.certDetailCode == 'IDCARD_EFFECT_CHECK' || record.certDetailCode == 'BUSINESS_INFO_CHECK' || record.certDetailCode == 'LEGAL_REPRESENTATIVE_CONSISTENCY_CHECK') && record.certStatus==2" @click="handlePass(record)">人工认证通过</a>
        </span>
      </a-table>
    </a-card>
    <common-certification-status-modal ref="commonCertificationStatusModal" @ok="commonCertificationStatusModalOk"></common-certification-status-modal>
  </div>
</template>

<script>
import { JeecgListMixin } from '@/mixins/CoreListMixin'
import commonCertificationStatusModal from './commonCertificationStatusModal'
export default {
  name: 'commonCertificationStatusTable',
  mixins: [JeecgListMixin],
  components: {
    commonCertificationStatusModal
  },
  props: {
    userType: {
      type: Number,
      default: null
    },
    collCreditStatuses: {
      type: Array,
      default: () => {
        return []
      }
    },
    applyNo: {
      type: String,
      default: ''
    },
    disableSubmit: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      creditCertCode: JSON.parse(sessionStorage.getItem('CREDITCERTCODE')),
      creditCertDetailCode: JSON.parse(sessionStorage.getItem('CREDITCERTDETAILCODE')),
      creditDetailCertStatus: JSON.parse(sessionStorage.getItem('CREDIT_DETAIL_CERT_STATUS')),
      rowKey: {
        type: String,
        default: 'id'
      },
      companyApproveData: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          width: 60,
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '认证名称',
          align: 'center',
          dataIndex: 'certCode',
          customRender: (t, r, index) => {
            for (var i = 0; i < this.creditCertCode.length; i++) {
              if (t === this.creditCertCode[i].name) {
                return this.creditCertCode[i].title
              }
            }
          }
        },
        {
          title: '节点服务',
          align: 'center',
          dataIndex: 'certDetailCode',
          customRender: (t, r, index) => {
            for (var i = 0; i < this.creditCertDetailCode.length; i++) {
              if (t === this.creditCertDetailCode[i].name) {
                return this.creditCertDetailCode[i].title
              }
            }
          }
        },
        {
          title: '认证结果',
          align: 'center',
          dataIndex: 'certStatus',
          customRender: (t, r, index) => {
            for (var i = 0; i < this.creditDetailCertStatus.length; i++) {
              if (t === Number(this.creditDetailCertStatus[i].name)) {
                return this.creditDetailCertStatus[i].title
              }
            }
          }
        },
        {
          title: '认证日期',
          align: 'center',
          dataIndex: 'certDate'
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          title: '操作人',
          align: 'center',
          dataIndex: 'updateUser'
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 150,
          fixed: 'right'
        }
      ],
      disableMixinCreated: true
    }
  },
  methods: {
    handlePass (record) {
      console.log(record)
      this.$refs.commonCertificationStatusModal.edit(record)
      this.$refs.commonCertificationStatusModal.title = '人工认证'
      this.$refs.commonCertificationStatusModal.disableSubmit = true
    },
    commonCertificationStatusModalOk () {
      this.$emit('editReload')
    }
  }
}
</script>
<style>
</style>