Merge pull request '财务开票处理-定制导出' (#131) from master-dev into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-frontend/pulls/131
This commit is contained in:
wuteng 2025-11-04 13:17:03 +08:00
commit 3e4bbfb8f7

View File

@ -169,16 +169,16 @@
v-hasPermi="['emis:emisSettleInvoiceRecord:payByInvoice']"
>发票收款</el-button>
</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:emisSettleInvoiceRecord:export']"
>导出</el-button>
</el-col> -->
@click="handleCustomExport"
v-hasPermi="['emis:emisSettleInvoiceRecord:customExport']"
>定制导出</el-button>
</el-col>
</el-row>
</div>
@ -646,35 +646,11 @@ export default {
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('emis/emisSettleInvoiceRecord/export', {
// ...this.queryParams
// }, `emisSettleInvoiceRecord_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisSettleInvoiceRecord(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','applySeqNo','applyDate','applyManCode','applySiteCode','customerCode','customerName','settleBillNo','settleBillName','applyMoney','invoiceType','companyName','companyTaxNo','companyTel','companyAddress','contact','phone','realTaxType','openMoneyMax','openMoney','invoiceNo','invoiceStatus','invoiceStatusDesc','recieveAddress','email','filePath','remark','blAudit','auditDate','auditManCode','auditSiteCode','opManCode','opDate','opSiteCode','openChId','openChStatus','openChStatusDesc','openComCode','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()
})
}
});
handleCustomExport() {
this.download('emis/emisSettleInvoiceRecord/customExport', {
...this.queryParams,pageSize:10000
}, `已开票列表.xlsx`)
},
formatJson(filterVal, jsonData, resData) {
let index = 0