|
|
|
@ -75,6 +75,7 @@ |
|
|
|
<a-space :size="21"> |
|
|
|
<a-button type="primary" class="query_button" @click="getList(1)">查 询</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-col> |
|
|
|
</a-row> |
|
|
|
@ -82,7 +83,6 @@ |
|
|
|
<div class="table"> |
|
|
|
<div class="table_title"> |
|
|
|
<span>查询结果</span> |
|
|
|
<a-button type="primary" class="query_button">导 出</a-button> |
|
|
|
<!-- <a-button type="primary" class="query_button">获 取</a-button> --> |
|
|
|
</div> |
|
|
|
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> |
|
|
|
@ -96,17 +96,9 @@ |
|
|
|
</a-space> |
|
|
|
</template> |
|
|
|
</a-table> |
|
|
|
<a-pagination |
|
|
|
class="pagination" |
|
|
|
size="small" |
|
|
|
:total="total" |
|
|
|
v-model="page" |
|
|
|
:page-size="limit" |
|
|
|
:show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" |
|
|
|
:page-size-options="pageSizeOptions" |
|
|
|
@showSizeChange="onShowSizeChange" |
|
|
|
@change="changePage" |
|
|
|
show-size-changer > |
|
|
|
<a-pagination class="pagination" size="small" :total="total" v-model="page" :page-size="limit" |
|
|
|
:show-total="total => `第 ${startTotal} - ${endTotal} 条 / 总共 ${total} 条`" :page-size-options="pageSizeOptions" |
|
|
|
@showSizeChange="onShowSizeChange" @change="changePage" show-size-changer> |
|
|
|
<template slot="buildOptionText" slot-scope="props"> |
|
|
|
<span>{{ props.value }}条/页</span> |
|
|
|
</template> |
|
|
|
@ -119,7 +111,7 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Operation from '../../Operation.vue' |
|
|
|
import {getOrderList} from '../../../api/index' |
|
|
|
import { getOrderList,xlsdc } from '../../../api/index' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -240,6 +232,21 @@ export default { |
|
|
|
Object.assign(this.query, this.$options.data().query) |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
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) |
|
|
|
}); |
|
|
|
}, |
|
|
|
getList(type) { |
|
|
|
let data = this.query |
|
|
|
data.limit = this.limit |
|
|
|
@ -280,6 +287,4 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
|
|
|
|
</style> |
|
|
|
<style scoped></style> |
|
|
|
|