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-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 :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisCustomerInvoiceInfo:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user