From 3f4ad33b38d17dab653a5417c17ff34bfab6081b Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 17 Dec 2021 16:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../printPayFeeBangTai/printPayFeeBangTai.js | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/public/pages/property/printPayFeeBangTai/printPayFeeBangTai.js b/public/pages/property/printPayFeeBangTai/printPayFeeBangTai.js index 317ef053d..3a196feba 100644 --- a/public/pages/property/printPayFeeBangTai/printPayFeeBangTai.js +++ b/public/pages/property/printPayFeeBangTai/printPayFeeBangTai.js @@ -1,4 +1,4 @@ -(function (vc) { +(function(vc) { vc.extends({ data: { @@ -19,7 +19,7 @@ }, printFlag: '0' }, - _initMethod: function () { + _initMethod: function() { //vc.component._initPrintPurchaseApplyDateInfo(); $that.printPayFeeInfo.receiptId = vc.getParam('receiptId'); @@ -34,15 +34,15 @@ $that._loadPrintSpec(); }, - _initEvent: function () { + _initEvent: function() { }, methods: { - _initPayFee: function () { + _initPayFee: function() { }, - _loadReceipt: function () { + _loadReceipt: function() { var param = { params: { @@ -57,7 +57,7 @@ //发送get请求 vc.http.apiGet('/feeReceipt/queryFeeReceipt', param, - function (json, res) { + function(json, res) { var _feeReceiptManageInfo = JSON.parse(json); let _feeReceipt = _feeReceiptManageInfo.data; let _amount = 0; @@ -74,12 +74,13 @@ $that._loadReceiptDetail(); - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _loadReceiptDetail: function () { + _loadReceiptDetail: function() { var param = { params: { @@ -94,7 +95,7 @@ //发送get请求 vc.http.apiGet('/feeReceipt/queryFeeReceiptDetail', param, - function (json, res) { + function(json, res) { var _feeReceiptManageInfo = JSON.parse(json); let _feeReceiptDetails = _feeReceiptManageInfo.data; _feeReceiptDetails.forEach(item => { @@ -108,12 +109,13 @@ $that.printPayFeeInfo.fees = _feeReceiptDetails; - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _loadPrintSpec: function () { + _loadPrintSpec: function() { var param = { params: { page: 1, @@ -126,7 +128,7 @@ //发送get请求 vc.http.apiGet('/feePrintSpec/queryFeePrintSpec', param, - function (json, res) { + function(json, res) { var _json = JSON.parse(json); var _data = _json.data; if (_data.length > 0) { @@ -136,38 +138,39 @@ $that.printPayFeeInfo.communityName = _data[0].printName; } } - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _computeSumArea: function () { + _computeSumArea: function() { let _sum = 0.00; $that.printPayFeeInfo.fees.forEach(item => { if (item.area && vc.isNumber(item.area)) { _sum += parseFloat(item.area); } }) - return _sum; + return _sum.toFixed(2); }, - _printPurchaseApplyDiv: function () { + _printPurchaseApplyDiv: function() { $that.printFlag = '1'; console.log('console.log($that.printFlag);', $that.printFlag); - document.getElementById("print-btn").style.display = "none";//隐藏 + document.getElementById("print-btn").style.display = "none"; //隐藏 window.print(); //$that.printFlag = false; window.opener = null; window.close(); }, - _closePage: function () { + _closePage: function() { window.opener = null; window.close(); } } }); -})(window.vc); +})(window.vc); \ No newline at end of file