<template>
  <a-card :body-style="{padding: '12px 24px 24px 24px'}" >

    <!--顶部tab页签-->
    <div>
      <a-tabs type="card" :defaultActiveKey="type" @change="callback">
        <a-tab-pane key="0" :tab="tabs.tab1">
          <hlw-invoice-manage-payment-modal-form ref="realForm" @ok="handleOk"></hlw-invoice-manage-payment-modal-form>
        </a-tab-pane>
      </a-tabs>
      <a-button class="backTop" type="primary" @click="handleBack">返回</a-button>
    </div>

  </a-card>
</template>

<script>

  import { httpAction, getAction } from '@/api/manage'
  import pick from 'lodash.pick'
  import { validateDuplicateValue } from '@/utils/util'
  import HlwInvoiceManagePaymentModalForm from './HlwInvoiceManagePaymentModalForm'

  export default {
    name: "HlwInvoiceManagePaymentModal",
    components: {
      HlwInvoiceManagePaymentModalForm,

    },
    data () {
      return {
        tabs: {tab1: '创客付款单'},
        tabs_detail: {tab1: '创客付款单'},
        title:"操作",
        width:800,
        visible: false,
        model: {
        },
        type: '0',
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
      }
    },
    created () {
      const id = this.$route.query.id;
      if(id){
        this.tabs = this.tabs_detail;
      }
    },
    methods: {
      add () {
        this.edit({});
      },
      edit (record) {
        this.model = Object.assign({}, record);
        this.visible = true;
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        this.$emit('ok');
        this.visible = false;
        this.handleBack();
      },
      handleCancel () {
        this.close()
      },
      popupCallback(row){
        this.model = Object.assign(this.model, row);
      },
      callback(key) {
        console.log(key);
      },
      handleBack(){
        this.$router.go(-1);//返回上一层
      },

    }
  }
</script>
<style scoped>
  .backTop{
    position: absolute;
    right: 24px;
    top: 12px;
  }
</style>