From bf9beea1c37ac4665efb404dc6f314e99e028e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sat, 2 Sep 2017 00:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A04=E5=BC=A0=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/js/print/print.html | 21 +++++ src/main/webapp/js/print/print.js | 79 +++++++++++++++++++ src/main/webapp/pages/reports/in_detail.jsp | 13 ++- .../pages/reports/in_material_count.jsp | 14 +++- src/main/webapp/pages/reports/out_detail.jsp | 12 ++- .../pages/reports/out_material_count.jsp | 14 +++- 6 files changed, 143 insertions(+), 10 deletions(-) create mode 100644 src/main/webapp/js/print/print.html create mode 100644 src/main/webapp/js/print/print.js diff --git a/src/main/webapp/js/print/print.html b/src/main/webapp/js/print/print.html new file mode 100644 index 00000000..ee802e46 --- /dev/null +++ b/src/main/webapp/js/print/print.html @@ -0,0 +1,21 @@ + + +
+| 1) { + tableString += ' rowspan="' + frozenColumns[index][i].rowspan + '"'; + } + if (typeof frozenColumns[index][i].colspan != 'undefined' && frozenColumns[index][i].colspan > 1) { + tableString += ' colspan="' + frozenColumns[index][i].colspan + '"'; + } + if (typeof frozenColumns[index][i].field != 'undefined' && frozenColumns[index][i].field != '') { + nameList += ',{"f":"' + frozenColumns[index][i].field + '", "a":"' + frozenColumns[index][i].align + '"}'; + } + tableString += '>' + frozenColumns[0][i].title + ' | '; + } + } + } + for (var i = 0; i < columns[index].length; ++i) { + if (!columns[index][i].hidden) { + tableString += '\n1) { + tableString += ' rowspan="' + columns[index][i].rowspan + '"'; + } + if (typeof columns[index][i].colspan != 'undefined' && columns[index][i].colspan > 1) { + tableString += ' colspan="' + columns[index][i].colspan + '"'; + } + if (typeof columns[index][i].field != 'undefined' && columns[index][i].field != '') { + nameList += ',{"f":"' + columns[index][i].field + '", "a":"' + columns[index][i].align + '"}'; + } + tableString += '>' + columns[index][i].title + ' | '; + } + } + tableString += '\n
|---|---|
| '; + if (e + 2 == nl[j].f.length) { + tableString += rows[i][nl[j].f.substring(0, e)]; + } + else + tableString += rows[i][nl[j].f]; + tableString += ' | '; + }); + tableString += '\n