<template>
  <div class="biddingManagement-successfulBidderConfirm">
    <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 ">
          <successful-bidder-confirm-content ref="successfulBidderConfirmContent" />
          <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 SuccessfulBidderConfirmContent from './components/SuccessfulBidderConfirmContent.vue'
import { bondCollectionConfirmDoAdd } from '@/api/biddingManagement/biddingManagement'
export default {
  name: 'BiddingManagementSuccessfulBidderConfirm',
  components: {
    SuccessfulBidderConfirmContent,
    BiddingManagementView: () => import('./components/BiddingManagementView')
  },
  data() {
    return {

    }
  },
  methods: {
    onSubmit() {
      this.$refs.successfulBidderConfirmContent.getParams().then(data => {
        const params = {
          Loading: true,
          ...data
        }
        bondCollectionConfirmDoAdd(params).then(() => {
          this.$message.success('中标确认提交成功')
          this.$router.push({ name: 'BiddingManagement' })
        })
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
