From 6f19ca5cd0061d88046b2279559127127d4d404d Mon Sep 17 00:00:00 2001 From: qiankunpingtai Date: Mon, 6 May 2019 14:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=93=E7=AE=97=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E6=9F=A5=E8=AF=A2js=E6=95=88=E7=8E=87=E4=BD=8E?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/pages/reports/account_report.html | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/erp_web/pages/reports/account_report.html b/erp_web/pages/reports/account_report.html index 481d8692..2daf8787 100644 --- a/erp_web/pages/reports/account_report.html +++ b/erp_web/pages/reports/account_report.html @@ -98,10 +98,17 @@ {title: '本月发生额', field: 'thismonthamount', width: 100, align: "center"}, {title: '当前余额', field: 'currentamount', width: 100, align: "center"}, { - title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) { + title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec,index) { + /** + * create by: qiankunpingtai + * create time: 2019/5/6 9:33 + * website:https://qiankunpingtai.cn + * description: + * 修改效率低下的js实现 + */ var str = ''; - var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount; - str += ' 流水  '; + // var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount; + str += ' 流水  '; return str; } } @@ -204,10 +211,12 @@ }); } - function showAccountInOutList(accountInfo) { - var info = accountInfo.split("AaBb"); - var accountId = info[0]; - var initialAmount = info[3]; + function showAccountInOutList(index) { + // var info = accountInfo.split("AaBb"); + //获取当前行 + var rowsdata = $("#tableData").datagrid("getRows")[index]; + var accountId = rowsdata.id; + var initialAmount = rowsdata.initialamount; $('#accountDetailListDlg').dialog('open').dialog('setTitle', ' 查看账户流水'); $(".window-mask").css({width: webW, height: webH}); initAccountDetailData(accountId);