From f41c544f451e869f49969dceec1ac4e76f4875cb Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 2 Aug 2022 09:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=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 --- .../editPropertyCompany.html | 7 +- .../editPropertyCompany.js | 68 +++++++++---------- .../commonReportTable/commonReportTable.html | 5 +- .../commonReportTable/commonReportTable.js | 6 +- .../printCommonReportTable.html | 33 +++++++++ .../printCommonReportTable.js | 33 +++++++++ 6 files changed, 111 insertions(+), 41 deletions(-) create mode 100644 public/pages/property/printCommonReportTable/printCommonReportTable.html create mode 100644 public/pages/property/printCommonReportTable/printCommonReportTable.js diff --git a/public/components/admin/editPropertyCompany/editPropertyCompany.html b/public/components/admin/editPropertyCompany/editPropertyCompany.html index c5925f1f1..78975b044 100644 --- a/public/components/admin/editPropertyCompany/editPropertyCompany.html +++ b/public/components/admin/editPropertyCompany/editPropertyCompany.html @@ -1,5 +1,4 @@ -
@@ -73,4 +76,4 @@
- + \ No newline at end of file diff --git a/public/components/property/commonReportTable/commonReportTable.js b/public/components/property/commonReportTable/commonReportTable.js index da2b4c918..3efb58ae7 100644 --- a/public/components/property/commonReportTable/commonReportTable.js +++ b/public/components/property/commonReportTable/commonReportTable.js @@ -201,9 +201,11 @@ } let urlParam = _result.join('&'); - vc.jumpToPage('/callComponent/importAndExportFee/exportCustomReportTableData?' + urlParam) - + }, + _printReportTableMethod: function(_data) { + vc.saveData('printCommonReportTableData', _data); + window.open('/print.html#/pages/property/printCommonReportTable'); } } }); diff --git a/public/pages/property/printCommonReportTable/printCommonReportTable.html b/public/pages/property/printCommonReportTable/printCommonReportTable.html new file mode 100644 index 000000000..3d1bd0486 --- /dev/null +++ b/public/pages/property/printCommonReportTable/printCommonReportTable.html @@ -0,0 +1,33 @@ +
+
+

{{printCommonReportTableInfo.componentName}}

+
+ +
+ + + + + + + + + + + +
{{itemTh}}
+ {{itemData[tmpItemTh]}}
+
+ +
{{key}}: {{tmpItemTh}}
+
+
+ +
+
\ No newline at end of file diff --git a/public/pages/property/printCommonReportTable/printCommonReportTable.js b/public/pages/property/printCommonReportTable/printCommonReportTable.js new file mode 100644 index 000000000..65fc808f2 --- /dev/null +++ b/public/pages/property/printCommonReportTable/printCommonReportTable.js @@ -0,0 +1,33 @@ +/** + 入驻小区 + **/ +(function(vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + printCommonReportTableInfo: {} + }, + _initMethod: function() { + $that.printCommonReportTableInfo = vc.getData('printCommonReportTableData') + + }, + methods: { + _printPurchaseApplyDiv: function() { + + $that.printFlag = '1'; + console.log('console.log($that.printFlag);', $that.printFlag); + document.getElementById("print-btn").style.display = "none"; //隐藏 + + window.print(); + //$that.printFlag = false; + window.opener = null; + window.close(); + }, + _closePage: function() { + window.opener = null; + window.close(); + }, + } + }); +})(window.vc); \ No newline at end of file