导出订单默认导出一万条,优化代码
parent
5cfbfdf67c
commit
146854b098
|
@ -20,7 +20,7 @@
|
||||||
<div class="store-category">
|
<div class="store-category">
|
||||||
<ul class="cate-list">
|
<ul class="cate-list">
|
||||||
<li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
|
<li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
|
||||||
<li class="cate-item" v-for="(cate, index) in cateList" :key="index" >
|
<li class="cate-item" v-for="(cate, index) in cateList" :key="index">
|
||||||
<Dropdown v-if="cate.children.length">
|
<Dropdown v-if="cate.children.length">
|
||||||
<div @click.self="searchByCate(cate)">{{cate.labelName}} <Icon type="ios-arrow-down"></Icon></div>
|
<div @click.self="searchByCate(cate)">{{cate.labelName}} <Icon type="ios-arrow-down"></Icon></div>
|
||||||
<DropdownMenu slot="list">
|
<DropdownMenu slot="list">
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
|
|
||||||
</Form>
|
</Form>
|
||||||
<div>
|
<div>
|
||||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" :fetch="exportOrder" name="商品订单.xls">
|
||||||
<Button type="info" class="export">
|
<Button type="info" class="export">
|
||||||
导出Excel
|
导出订单
|
||||||
</Button>
|
</Button>
|
||||||
</download-excel>
|
</download-excel>
|
||||||
</div>
|
</div>
|
||||||
|
@ -269,6 +269,24 @@ export default {
|
||||||
query: { sn: sn },
|
query: { sn: sn },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 导出订单
|
||||||
|
async exportOrder () {
|
||||||
|
const params = JSON.parse(JSON.stringify(this.searchForm))
|
||||||
|
params.pageNumber = 1;
|
||||||
|
params.pageSize = 10000
|
||||||
|
const result = await API_Order.getOrderList(params)
|
||||||
|
if (result.success) {
|
||||||
|
if (result.result.records.length === 0) {
|
||||||
|
this.$Message.warning('暂无待发货订单')
|
||||||
|
return []
|
||||||
|
} else {
|
||||||
|
return result.result.records
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$Message.warning('导出订单失败,请重试')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
|
|
|
@ -258,7 +258,7 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
// 搜索框初始化对象
|
// 搜索框初始化对象
|
||||||
pageNumber: 1, // 当前页数
|
pageNumber: 1, // 当前页数
|
||||||
pageSize: 100, // 页面大小
|
pageSize: 10000, // 页面大小
|
||||||
sort: "startDate", // 默认排序字段
|
sort: "startDate", // 默认排序字段
|
||||||
order: "desc", // 默认排序方式
|
order: "desc", // 默认排序方式
|
||||||
startDate: "", // 起始时间
|
startDate: "", // 起始时间
|
||||||
|
|
Loading…
Reference in New Issue