md
This commit is contained in:
parent
ac108c7727
commit
39db7dadca
@ -123,16 +123,15 @@
|
|||||||
<el-button plain class="filter-item" size="mini" type="primary" icon="el-icon-upload2" @click="handleBatchImport">批量导入</el-button>
|
<el-button plain class="filter-item" size="mini" type="primary" icon="el-icon-upload2" @click="handleBatchImport">批量导入</el-button>
|
||||||
<el-link type="primary" style="line-height: 28px;font-size:13px;color:blue" href="/static/tpl/import_invoice_info.xls">下载导入Excel模板</el-link>
|
<el-link type="primary" style="line-height: 28px;font-size:13px;color:blue" href="/static/tpl/import_invoice_info.xls">下载导入Excel模板</el-link>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['emis:emisCustomerInvoiceInfo:export']"
|
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -270,14 +269,12 @@ export default {
|
|||||||
tmpDataList: [],
|
tmpDataList: [],
|
||||||
fileList:[],
|
fileList:[],
|
||||||
|
|
||||||
|
selectionList:[],
|
||||||
|
|
||||||
// 弹出展示层
|
// 弹出展示层
|
||||||
id:null,
|
id:null,
|
||||||
titleView:"",
|
titleView:"",
|
||||||
openView: false,
|
openView: false,
|
||||||
// 更新站点时间范围
|
|
||||||
daterangeCreateTime: [],
|
|
||||||
// 更新站点时间范围
|
|
||||||
daterangeUpdateTime: [],
|
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -452,6 +449,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
|
||||||
|
this.selectionList = selection;
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
@ -500,36 +499,45 @@ export default {
|
|||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// this.download('emis/emisCustomerInvoiceInfo/export', {
|
|
||||||
// ...this.queryParams
|
|
||||||
// }, `emisCustomerInvoiceInfo_${new Date().getTime()}.xlsx`)
|
|
||||||
const loadingInstance = this.$loading({
|
const loadingInstance = this.$loading({
|
||||||
text: '正在导出...'
|
text: '正在导出...'
|
||||||
})
|
})
|
||||||
var qParam = {...this.queryParams};
|
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=5000;
|
|
||||||
|
|
||||||
listEmisCustomerInvoiceInfo(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
if(this.selectionList&&this.selectionList.length>0){
|
||||||
this.downloadLoading = false
|
this.exportData(this.selectionList,loadingInstance);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
let qExportParam={...this.queryParams};
|
||||||
|
qExportParam.pageNum=1;
|
||||||
|
qExportParam.pageSize=20000;
|
||||||
|
|
||||||
|
listEmisCustomerInvoiceInfo(qExportParam).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
const curList = response.rows
|
this.exportData(response.rows,loadingInstance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
exportData(selData,loadingInstance){
|
||||||
|
const curList =selData
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
const tHeader = ['id','开票名称','开票税号','开票电话','开票地址','开票类型','客户编码','客户名称','联系人','联系电话','纸质发票邮寄地址','发票投递邮箱','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
const exportParam=this.$refs.refTable.getExportParam();
|
||||||
const filterVal = ['id','companyName','companyTaxNo','companyTel','companyAddress','invoiceType','customerCode','customerName','contact','phone','recieveAddress','email','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
const tHeader = exportParam.header;
|
||||||
const data = this.formatJson(filterVal, curList, response.rows)
|
const filterVal = exportParam.filter;
|
||||||
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
excel.export_json_to_excel({
|
excel.export_json_to_excel({
|
||||||
header: tHeader,
|
header: tHeader,
|
||||||
data,
|
data,
|
||||||
filename: '客户开票信息记录表',
|
filename: '客户主体',
|
||||||
autoWidth: true
|
autoWidth: true
|
||||||
})
|
})
|
||||||
loadingInstance.close()
|
loadingInstance.close()
|
||||||
})
|
})
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
formatJson(filterVal, jsonData, resData) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user