<template>
  <div class="biddingManagement-marginCollectionConfirm">
    <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-collection-confirm-content ref="marginCollectionConfirmContent" />
          <div class="submit-btn">
            <el-button style="width: 150px;" type="primary" @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 MarginCollectionConfirmContent from './components/MarginCollectionConfirmContent'
import { awardConfirmDoAdd } from '@/api/biddingManagement/biddingManagement'
export default {
  name: 'BiddingManagementMarginCollectionConfirm',
  components: {
    MarginCollectionConfirmContent,
    BiddingManagementView: () => import('./components/BiddingManagementView')
  },
  data() {
    return {

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

<style lang="scss" scoped>

</style>

