|
@@ -220,7 +220,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-export-order>
|
|
<template #slot-export-order>
|
|
|
- <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportData()">导出数据</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px;" @click="exportData()">导出{{ searchTimeTypeName }}</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-more-do-btn>
|
|
<template #slot-more-do-btn>
|
|
@@ -417,6 +417,18 @@ export default {
|
|
|
totalTkPrice:0
|
|
totalTkPrice:0
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ /** 当前筛选时间类型文案,导出按钮和提示共用 */
|
|
|
|
|
+ searchTimeTypeName() {
|
|
|
|
|
+ if (this.searchTimeType === 2) {
|
|
|
|
|
+ return '发货时间'
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.searchTimeType === 1) {
|
|
|
|
|
+ return '账单时间'
|
|
|
|
|
+ }
|
|
|
|
|
+ return '开单时间'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
this.init();
|
|
this.init();
|
|
|
},
|
|
},
|
|
@@ -851,7 +863,14 @@ export default {
|
|
|
handleClick(tab, e) {
|
|
handleClick(tab, e) {
|
|
|
this.app.refresh(this.getListSearchParams());
|
|
this.app.refresh(this.getListSearchParams());
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出当前列表:区间跟开单/发货/账单类型走,须先选时间段,最长一个月。
|
|
|
|
|
+ */
|
|
|
exportData(){
|
|
exportData(){
|
|
|
|
|
+ if (!this.searchTime) {
|
|
|
|
|
+ this.$message.warning('请选 ' + this.searchTimeTypeName + ' 和时间段')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$service.order.getOrderList(this.getListSearchParams({ pageSize: 9999999, export: 1 })).then(res => {
|
|
this.$service.order.getOrderList(this.getListSearchParams({ pageSize: 9999999, export: 1 })).then(res => {
|
|
|
if(res.file){
|
|
if(res.file){
|
|
|
window.location.href = res.file
|
|
window.location.href = res.file
|