<template>
  <div>
    <group title="开票历史">
      <cell title="发票预览" :link="$route.query.invoiceUrl"></cell>
      <cell title="收件信息" :inline-desc="'电子邮箱:'+ $route.query.custEmail"></cell>
      <cell title="发票包含内容" :inline-desc="'该发票包含'+$route.query.len+'笔交易'" :link="{path:'exchange'}"></cell>
    </group>

    <group title="">
      <div  style="padding: 40px 20px;">
        <div >
          <x-button :gradients="['#1D62F0', '#19D5FD']" @click.native="sentEmail">重发电子邮箱</x-button>
        </div>
        <div style="text-align: center;padding-top: 20px;">客服电话: 0714-6212345</div>
      </div>
    </group>
  </div>
</template>


<script>
import {
  resendInvoiceMail
} from "@/api/invoice/invoice.js";
export default {
  name: "invoiceDetail",

  data() {
    return {
      list: []
    };
  },
  mounted() {
  },
  methods: {
    sentEmail: function() {
      let obj = {
        invoiceId:this.$route.query.invoiceId,
        orgId:this.$utils.myOrgId
      }
      let jsondata = Object.assign(obj, this.$utils.commonParams());
      jsondata.sign = this.$utils.signObject(jsondata);
      console.log(JSON.stringify(jsondata));
      resendInvoiceMail(jsondata).then(response => {
        console.log(response);
        this.$vux.toast.text(response. message, 'top')
      });
    }
  }
};
</script>

<style scoped lang="scss">
  .noDada {
    text-align: center;
    img {
      margin: 20px auto;
    }
  }

</style>
