<template>
  <div class="biddingManagement-marginRefundConfirm">
    <cy-up-down-drag>
      <div slot="top">
        <bidding-management-view></bidding-management-view>
      </div>
      <div slot="bar">
        <div>
          保证金退款确认
        </div>
      </div>
      <div slot="bottom">
        <div class="tempalte-content" style="min-height: auto; padding: 0px 20px ">
          <margin-refund-confirm-content ref="marginRefundConfirmContent" />
          <div class="submit-btn">
            <el-button type="primary" style="width: 150px;" @click="onSubmit">确定</el-button>
            <el-button style="width: 150px;" @click="() => { $router.go(-1) }">取消</el-button>
          </div>
        </div>
      </div>
    </cy-up-down-drag>
  </div>
</template>

<script setup>
import MarginRefundConfirmContent from './components/MarginRefundConfirmContent.vue'
import { refundDepositConfirmationDoAdd } from '@/api/biddingManagement/biddingManagement'
export default {
  name: 'BiddingManagementMarginRefundConfirm',
  components: {
    MarginRefundConfirmContent,
    BiddingManagementView: () => import('./components/BiddingManagementView')
  },
  data() {
    return {

    }
  },
  methods: {
    onSubmit() {
      this.$refs.marginRefundConfirmContent.getParams().then(data => {
        const params = {
          Loading: true,
          ...data
        }
        refundDepositConfirmationDoAdd(params).then(() => {
          this.$message.success('保证金退款确认提交成功')
          this.$router.push({ name: 'BiddingManagement' })
        })
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>

