<template>
  <a-modal
    :title="title"
    :visible="visible"
    :width="width"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
    :maskClosable="false"
    :footer="null">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form" style="padding-bottom: 120px;padding-top: 120px;text-align: center;">

        <div style="font-size: 16px;">
          账户余额不足，请先进行充值。
        </div>
        <div style="font-size: 16px;margin-top: 10px;">
          当前余额:&nbsp;&nbsp;￥<span style="font-size: 22px;">{{model.accountBalance}}</span>
        </div>

      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
  export default {
    name: "HlwPaymentError",
    data(){
      return{
        title: '',
        height: 600,
        width: 600,
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        form: this.$form.createForm(this),
        disableSubmit: false,
        validatorRules: {
          totalAmount: {
            rules: [{ required: true, message: '请输入充值金额！' }, {
              validator: this.checkMoney
            }]
          }
        },
        confirmLoading: false,
      }
    },

    methods: {
      edit(record) {
        this.confirmLoading = true;
        setTimeout(()=>{
          this.confirmLoading = false
        },500)
        this.model = Object.assign({}, record)
        this.visible = true
      },
      close() {
        this.visible = false
      },
      handleCancel() {
        this.close()
      },
    }
  }
</script>

<style scoped>

</style>