<template>
  <div class="biddingManagement-guaranteeConfirm">
    <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 ">
          <guarantee-confirm-content ref="guaranteeConfirmContent" />
          <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 GuaranteeConfirmContent from './components/GuaranteeConfirmContent.vue'
import { guaranteeMethodDoAdd } from '@/api/biddingManagement/biddingManagement'
export default {
  name: 'BiddingManagementGuaranteeConfirm',
  components: {
    GuaranteeConfirmContent,
    BiddingManagementView: () => import('./components/BiddingManagementView')
  },
  data() {
    return {

    }
  },
  methods: {
    onSubmit() {
      this.$refs.guaranteeConfirmContent.getParams().then(data => {
        const params = {
          Loading: true,
          ...data
        }
        guaranteeMethodDoAdd(params).then(() => {
          this.$message.success('保证方式确认成功')
          this.$router.push({ name: 'BiddingManagement' })
        })
      })
    }
  }
}
</script>

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

