<template>
  <div class="biddingManagement-template-review">
    <cy-up-down-drag>
      <div slot="top">
        <refund-view-content></refund-view-content>
      </div>
      <div slot="bar">
        <div>
          退款审核
        </div>
      </div>
      <div slot="bottom">
        <div style="min-height: auto;">
          <reFund-approve-content ref="approveContent" />
          <div class="submit-btn">
            <el-button style="width: 150px;" @click="() => { $router.go(-1) }">取消</el-button>
            <el-button style="width: 150px;" type="primary" @click="onSubmit">确定</el-button>
          </div>
        </div>
      </div>
    </cy-up-down-drag>
  </div>
</template>

<script>
import { submitApprovalRefund } from '@/api/refundManage'

export default {
  name: 'BiddingManagementTemplateReview',
  components: {
    reFundApproveContent: () => import('./components/reFundApproveContent'),
    refundViewContent: () => import('./components/refundViewContent.vue')
  },
  data() {
    return {

    }
  },
  methods: {
    onSubmit() {
      this.$refs.approveContent.getSubmit().then(data => {
        const { taskId, id } = this.$route.query
        const params = {
          Loading: true,
          ...data,
          taskId,
          refundManagementId: id
        }
        submitApprovalRefund(params).then((res) => {
          this.$message.success('提交成功')
          this.$router.go(-1)
        })
      })
    }
  }
}
</script>

<style lang="scss" scoped>
  /* .template-examine .submit-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
  } */
</style>
