|
|
@ -65,6 +65,7 @@ |
|
|
<a-space :size="21"> |
|
|
<a-space :size="21"> |
|
|
<a-button type="primary" class="query_button" @click="getAllDate(1)">查 询</a-button> |
|
|
<a-button type="primary" class="query_button" @click="getAllDate(1)">查 询</a-button> |
|
|
<a-button class="query_button" @click="resetQurey">重 置</a-button> |
|
|
<a-button class="query_button" @click="resetQurey">重 置</a-button> |
|
|
|
|
|
<a-button type="default" class="query_button" @click="xlsdc">导 出</a-button> |
|
|
</a-space> |
|
|
</a-space> |
|
|
</a-col> |
|
|
</a-col> |
|
|
</a-row> |
|
|
</a-row> |
|
|
@ -72,7 +73,7 @@ |
|
|
<div class="table"> |
|
|
<div class="table"> |
|
|
<div class="table_title"> |
|
|
<div class="table_title"> |
|
|
<span>查询结果</span> |
|
|
<span>查询结果</span> |
|
|
<a-button type="primary" class="query_button">导 出</a-button> |
|
|
<!-- <a-button type="primary" class="query_button">导 出</a-button> --> |
|
|
<!-- <a-button type="primary" class="query_button">获 取</a-button> --> |
|
|
<!-- <a-button type="primary" class="query_button">获 取</a-button> --> |
|
|
</div> |
|
|
</div> |
|
|
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> |
|
|
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> |
|
|
@ -234,6 +235,22 @@ export default { |
|
|
// return |
|
|
// return |
|
|
location.href=this.$host+'/admin/order.InvoiceManagement/downloadInvoice?id='+id |
|
|
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 |
|
|
// 重置query |
|
|
resetQurey(){ |
|
|
resetQurey(){ |
|
|
Object.assign(this.query, this.$options.data().query) |
|
|
Object.assign(this.query, this.$options.data().query) |
|
|
|