diff --git a/src/components/page/afterService/invoice.vue b/src/components/page/afterService/invoice.vue index b17ac5a..8d1040d 100644 --- a/src/components/page/afterService/invoice.vue +++ b/src/components/page/afterService/invoice.vue @@ -65,6 +65,7 @@ 查 询 重 置 + 导 出 @@ -72,7 +73,7 @@
查询结果 - 导 出 +
@@ -234,6 +235,22 @@ export default { // return location.href=this.$host+'/admin/order.InvoiceManagement/downloadInvoice?id='+id }, + // 导出xls + xlsdc(){ + xlsdc(this.query).then(res=>{ + const fname = new Date().getTime()+".xlsx" + let bloburl = window.URL.createObjectURL(new Blob([res])) + const a = document.createElement('a') + a.download = fname + a.href = bloburl + // add click + a.click() + window.URL.revokeObjectURL(bloburl) + }) + .catch(err=>{ + console.error(err) + }); + }, // 重置query resetQurey(){ Object.assign(this.query, this.$options.data().query)