From 08a69b82d497cd585772fd616d449bfc1c27445a Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Tue, 14 May 2024 23:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E8=B4=A6=E6=88=B7=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0excel?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/report/modules/AccountInOutList.vue | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/jshERP-web/src/views/report/modules/AccountInOutList.vue b/jshERP-web/src/views/report/modules/AccountInOutList.vue index 61f7ae52..a9897860 100644 --- a/jshERP-web/src/views/report/modules/AccountInOutList.vue +++ b/jshERP-web/src/views/report/modules/AccountInOutList.vue @@ -13,6 +13,7 @@ cancelText="关闭" style="top:20px;height: 95%;"> @@ -97,8 +98,7 @@ res = '+' + res } return res + "[多账户]"; - } - else { + } else { if(r.changeAmount>0) { return '+' + r.changeAmount } else { @@ -167,6 +167,40 @@ } }) } + }, + exportExcel() { + let list = [] + let head = '单据编号,类型,单位信息,金额,余额,单据日期' + for (let i = 0; i < this.dataSource.length; i++) { + let item = [] + let ds = this.dataSource[i] + item.push(ds.number, ds.type, ds.supplierName, this.getRealChangeAmount(ds), ds.balance, ds.operTime) + list.push(item) + } + let tip = '账户流水' + this.handleExportXlsPost('账户流水', '账户流水', head, tip, list) + }, + getRealChangeAmount(r) { + if (r.aList && r.amList) { + let aListArr = r.aList.toString().split(","); + let amListArr = r.amList.toString().split(","); + let res = 0; + for (let i = 0; i < aListArr.length; i++) { + if (aListArr[i] == r.accountId) { + res = amListArr[i]; + } + } + if(res>0) { + res = '+' + res + } + return res + "[多账户]"; + } else { + if(r.changeAmount>0) { + return '+' + r.changeAmount + } else { + return r.changeAmount + } + } } } }