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 + } + } } } }