<template>
  <div class="business-review">
    <cy-up-down-drag>
      <div slot="top">
        <history-view></history-view>
      </div>
      <div slot="bar">
        <div>
          业务审核
        </div>
      </div>
      <div slot="bottom">
        <template>
          <acceptance-conclusion ref="conclusion" type="businessReview"></acceptance-conclusion>
          <div class="submit-btn">
            <el-button style="width: 150px;" @click="() => { $router.go(-1) }">取消</el-button>
            <el-button style="width: 150px;" type="primary" @click="onSubmit">提交</el-button>
          </div>
        </template>
      </div>
    </cy-up-down-drag>
  </div>
</template>

<script >
import AcceptanceConclusion from './components/AcceptanceConclusion.vue'
import HistoryView from './components/HistoryView.vue'
import { businessReviewSubmit } from '@/api/acceptanceManagement/index'
import { Loading } from 'element-ui'
export default {
  name: 'AcceptanceLegalReview',
  components: {
    AcceptanceConclusion,
    HistoryView
  },
  data() {
    return {}
  },
  methods: {
    async onSubmit() {
      const { approvalConclusion, approvalComment } = await this.$refs.conclusion.getSubmit()
      const { taskId, id } = this.$route.query
      const params = {
        Loading: true,
        approvalConclusion,
        approvalComment,
        taskId,
        acceptanceBasicInfoId: id
      }
      businessReviewSubmit(params).then(() => {
        this.$message.success('提交成功')
        this.$router.go(-1)
      })
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
