<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    :confirmLoading="confirmLoading"
    okText="继续付款"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-form-item label=" " :colon="false" :labelCol="labelCol" :wrapperCol="wrapperCol">
          张一、张二、张三、张四、张五等11人本月累计收款超出第一级税率。
        </a-form-item>
        <a-form-item label=" " :colon="false" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-button type="link" @click="checkList">查看名单</a-button>
        </a-form-item>

      </a-form>
    </a-spin>
    <HlgPaymentErrorPeopleListModal ref="errorPeopleListModal"></HlgPaymentErrorPeopleListModal>
  </a-modal>
</template>

<script>

  import { httpAction } from '@/api/manage'
  import pick from 'lodash.pick'
  import JDate from '@/components/jeecg/JDate'
  import HlgPaymentErrorPeopleListModal from './HlgPaymentErrorPeopleListModal'

  export default {
    name: 'HlgPaymentErrorModal',
    components: {
      JDate,
      HlgPaymentErrorPeopleListModal
    },
    data() {
      return {
        form: this.$form.createForm(this),
        title: '操作',
        width: 800,
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },

        confirmLoading: false,
        list: [],
        url: {
          add: '/hlgpayment/hlgPaymentDetail/add',
          edit: '/hlgpayment/hlgPaymentDetail/edit'
        }

      }
    },
    created() {
    },
    methods: {
      add() {
        this.edit({})
      },
      edit(record) {
        this.form.resetFields()
        this.model = Object.assign({}, record)
        this.visible = true

      },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleOk() {
        this.$emit('ok')
        this.visible = false
      },
      handleCancel() {
        this.close()
      },
      checkList() {
        this.$refs.errorPeopleListModal.edit({ list: this.list })
        this.$refs.errorPeopleListModal.title = '查看名单'
        this.$refs.errorPeopleListModal.disableSubmit = false
      }
    }
  }
</script>