<template>
  <div class="customer-info-examine">
    <ol class="breadcrumb">
      <i class="icon-chevron-sign-left newBackBtn" @click="() => { $router.go(-1) }"></i>
      <li>客户支用管理</li>
      <li>合同清单</li>
    </ol>
    <up-down-drag>
      <div slot="top">
        <customer-view></customer-view>
      </div>
      <div slot="bar">
        <div>
          合同清单
        </div>
      </div>
      <div slot="bottom">
        <div class="tempalte-content" style="min-height: auto; padding: 0px 20px ">
          <contract-content ref="contractContent"></contract-content>
          <div class="submit-btn">
            <el-button type="primary" @click="onSubmit" style="width: 150px;">确定</el-button>
            <el-button @click="() => { $router.go(-1) }" style="width: 150px;">取消</el-button>
          </div>
        </div>
      </div>
    </up-down-drag>
  </div>
</template>
<script>
module.exports = {
  components: {
    ContractContent: httpVueLoader('./components/ContractContent.vue'),
    CustomerView: httpVueLoader('./components/CustomerView.vue')
  },
  data() {
    return {
      
    }
  },
  methods: {
    onSubmit() {
      this.$refs.contractContent.getSubmit().then(data => {
        const { businessKey } = this.$route.query
        const params = {
          id: businessKey,
          ...data
        }
        this.$api.capitalManage.customerDisburseInfoContract(params).then(() => {
          this.$message.success('客户支用上传合同成功')
          this.$router.push({ path: '/customerDisburseInfo' })
        })
      })
    }
  },
}
</script>


