<template>
  <a-modal
    :title="title"
    :width="modelStyle.width"
    :visible="visible"
    :bodyStyle="bodyStyle"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    :maskClosable="false"
    cancelText="关闭">
    <template slot="footer">
      <a-button type="primary" @click="handleOk">
        关闭
      </a-button>
    </template>
    <a-spin :spinning="confirmLoading">
      <a-card :bordered="false">
        <!-- 查询区域 -->

        <!-- 查询区域-END -->

        <!-- 操作按钮区域 -->

        <!-- table区域-begin -->
        <div>

          <a-table
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="false">
          </a-table>
        </div>
      </a-card>
    </a-spin>
  </a-modal>
</template>

<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { httpAction, getAction } from '@/api/manage'
  import pick from 'lodash.pick'
  import JDate from '@/components/jeecg/JDate'

  export default {
    name: 'HlgPaymentErrorPeopleListModal',
    mixins: [JeecgListMixin],
    components: {
      JDate

    },
    data() {
      return {
        title: '',
        bodyStyle: {
          padding: '0',
          height: (window.innerHeight * 0.62) + 'px',
          'overflow-y': 'auto'
        },
        modelStyle: {
          width: '60%',
          style: { top: '10px' },
          fullScreen: false
        },
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        // 表头
        columns: [
          {
            title: '姓名',
            align: 'left',
            dataIndex: 'userName'
          },
          {
            title: '手机号',
            align: 'left',
            dataIndex: 'phone'
          },
          {
            title: '身份证号',
            align: 'left',
            dataIndex: 'idcardNumber'
          },
          {
            title: '付款金额',
            align: 'left',
            dataIndex: 'netPayment',
            customRender: (value,record) => {
              return record.payment ? record.payment: value
            }
          },
        ],
        confirmLoading: false,
        dataSource: [],
        companyName: '',
        companyId: 0,
        accountId: 0,
        url: {
          list: '/hlgaccount/hlgAccountDetail/refundList'
        }

      }
    },
    created() {
    },
    methods: {
      add() {
        this.edit({})
      },
      edit(record) {
        this.dataSource =  record.list
        this.visible = true
      },
      loadData(arg) {

      },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleOk() {
        this.close()
      },
      handleCancel() {
        this.close()
      }
    }
  }
</script>