diff --git a/src/views/emis/emisCustomerInvoiceInfo/index.vue b/src/views/emis/emisCustomerInvoiceInfo/index.vue
index 69e8d4ad..be797630 100644
--- a/src/views/emis/emisCustomerInvoiceInfo/index.vue
+++ b/src/views/emis/emisCustomerInvoiceInfo/index.vue
@@ -123,16 +123,15 @@
批量导入
下载导入Excel模板
-
+
@@ -270,14 +269,12 @@ export default {
tmpDataList: [],
fileList:[],
+ selectionList:[],
+
// 弹出展示层
id:null,
titleView:"",
openView: false,
- // 更新站点时间范围
- daterangeCreateTime: [],
- // 更新站点时间范围
- daterangeUpdateTime: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -452,6 +449,8 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
+
+ this.selectionList = selection;
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
@@ -500,36 +499,45 @@ export default {
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
- /** 导出按钮操作 */
- handleExport() {
- // this.download('emis/emisCustomerInvoiceInfo/export', {
- // ...this.queryParams
- // }, `emisCustomerInvoiceInfo_${new Date().getTime()}.xlsx`)
- const loadingInstance = this.$loading({
- text: '正在导出...'
- })
- var qParam = {...this.queryParams};
- qParam.pageNum=1;
- qParam.pageSize=5000;
- listEmisCustomerInvoiceInfo(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
- this.downloadLoading = false
- if (response.code === 200) {
- const curList = response.rows
- import('@/vendor/Export2Excel').then(excel => {
- const tHeader = ['id','开票名称','开票税号','开票电话','开票地址','开票类型','客户编码','客户名称','联系人','联系电话','纸质发票邮寄地址','发票投递邮箱','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
- const filterVal = ['id','companyName','companyTaxNo','companyTel','companyAddress','invoiceType','customerCode','customerName','contact','phone','recieveAddress','email','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
- const data = this.formatJson(filterVal, curList, response.rows)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '客户开票信息记录表',
- autoWidth: true
- })
- loadingInstance.close()
- })
- }
- });
+
+ /** 导出按钮操作 */
+ handleExport() {
+ const loadingInstance = this.$loading({
+ text: '正在导出...'
+ })
+
+ if(this.selectionList&&this.selectionList.length>0){
+ this.exportData(this.selectionList,loadingInstance);
+ }
+ else{
+
+ let qExportParam={...this.queryParams};
+ qExportParam.pageNum=1;
+ qExportParam.pageSize=20000;
+
+ listEmisCustomerInvoiceInfo(qExportParam).then(response => {
+ if (response.code === 200) {
+ this.exportData(response.rows,loadingInstance);
+ }
+ });
+ }
+ },
+ exportData(selData,loadingInstance){
+ const curList =selData
+ import('@/vendor/Export2Excel').then(excel => {
+ const exportParam=this.$refs.refTable.getExportParam();
+ const tHeader = exportParam.header;
+ const filterVal = exportParam.filter;
+ const data = this.formatJson(filterVal, curList, selData)
+ excel.export_json_to_excel({
+ header: tHeader,
+ data,
+ filename: '客户主体',
+ autoWidth: true
+ })
+ loadingInstance.close()
+ })
},
formatJson(filterVal, jsonData, resData) {
let index = 0