<template>
  <div class="changeTemplate-review">
    <cy-up-down-drag>
      <div slot="top">
        <sales-contract-management-view></sales-contract-management-view>
      </div>
      <div slot="bar">
        <div>
          变更合同审核
        </div>
      </div>
      <div slot="bottom">
        <div class="tempalte-content" style="min-height: auto; padding: 0px 20px ">
          <change-contract-review-content ref="changeContractReviewContent" />
          <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 { salesContractChangeDoAudit } from '@/api/salesContractManagement/salesContractManagement'
import ChangeContractReviewContent from './components/ChangeContractReviewContent.vue'
import salesContractManagementView from './components/salesContractManagementView.vue'
export default {
  name: 'BiddingManagementTemplateReview',
  components: {
    ChangeContractReviewContent,
    salesContractManagementView
  },
  data() {
    return {

    }
  },
  methods: {
    onSubmit() {
      this.$refs.changeContractReviewContent.getParams().then(data => {
        const params = {
          Loading: true,
          ...data
        }
        salesContractChangeDoAudit(params).then(() => {
          this.$message.success('变更模板审核成功')
          this.$router.push({ name: 'SalesContractManagement' })
        })
      })
    }
  }
}
</script>

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

