From 9fe45bda3e33eb99ea7c7c488dabbf518bb772ff Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 14 Jun 2022 14:01:17 +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 --- .../prestoreAccount/prestoreAccount.js | 90 ++++++++--------- .../printPayFeeXinShiDai.html | 42 ++++---- .../printPayFeeXinShiDai.js | 96 +++++++++++++------ 3 files changed, 127 insertions(+), 101 deletions(-) diff --git a/public/components/property/prestoreAccount/prestoreAccount.js b/public/components/property/prestoreAccount/prestoreAccount.js index ddfd97e4a..eab78a46e 100644 --- a/public/components/property/prestoreAccount/prestoreAccount.js +++ b/public/components/property/prestoreAccount/prestoreAccount.js @@ -1,4 +1,4 @@ -(function (vc) { +(function(vc) { vc.extends({ data: { prestoreAccountInfo: { @@ -8,21 +8,20 @@ amount: '', remark: '', acctTypes: [], - acctType: '', + acctType: '2003', } }, - _initMethod: function () { - }, - _initEvent: function () { - vc.on('prestoreAccount', 'openAddModal', function () { + _initMethod: function() {}, + _initEvent: function() { + vc.on('prestoreAccount', 'openAddModal', function() { $('#prestoreAccountModel').modal('show'); //与字典表单位关联 - vc.getDict('account', "acct_type", function (_data) { + vc.getDict('account', "acct_type", function(_data) { vc.component.prestoreAccountInfo.acctTypes = _data; }); }); - vc.on('prestoreAccount', 'openAddModalWithParams', function (_param) { + vc.on('prestoreAccount', 'openAddModalWithParams', function(_param) { vc.component.prestoreAccountInfo.amount = _param.redepositAmount; $('#prestoreAccountModel').modal('show'); }); @@ -32,15 +31,12 @@ return vc.validate.validate({ prestoreAccountInfo: vc.component.prestoreAccountInfo }, { - 'prestoreAccountInfo.ownerId': [ - { - limit: "required", - param: "", - errInfo: "业主不能为空" - } - ], - 'prestoreAccountInfo.amount': [ - { + 'prestoreAccountInfo.ownerId': [{ + limit: "required", + param: "", + errInfo: "业主不能为空" + }], + 'prestoreAccountInfo.amount': [{ limit: "required", param: "", errInfo: "金额不能为空" @@ -51,23 +47,19 @@ errInfo: "金额格式错误" }, ], - 'prestoreAccountInfo.acctType': [ - { - limit: "required", - param: "", - errInfo: "请选择账户类型" - } - ], - 'prestoreAccountInfo.remark': [ - { - limit: "maxLength", - param: "200", - errInfo: "备注长度不能超过200位" - } - ] + 'prestoreAccountInfo.acctType': [{ + limit: "required", + param: "", + errInfo: "请选择账户类型" + }], + 'prestoreAccountInfo.remark': [{ + limit: "maxLength", + param: "200", + errInfo: "备注长度不能超过200位" + }] }); }, - savePrestoreAccountInfo: function () { + savePrestoreAccountInfo: function() { if (!vc.component.prestoreAccountValidate()) { vc.toast(vc.validate.errInfo); return; @@ -75,11 +67,10 @@ vc.component.prestoreAccountInfo.communityId = vc.getCurrentCommunity().communityId; vc.http.apiPost( '/account/ownerPrestoreAccount', - JSON.stringify(vc.component.prestoreAccountInfo), - { + JSON.stringify(vc.component.prestoreAccountInfo), { emulateJSON: true }, - function (json, res) { + function(json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); if (res.status == 200) { //关闭model @@ -91,12 +82,12 @@ } vc.component.prestoreAccountInfo.errorInfo = json; }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); vc.component.prestoreAccountInfo.errorInfo = errInfo; }); }, - clearPrestoreAccountInfo: function () { + clearPrestoreAccountInfo: function() { vc.component.prestoreAccountInfo = { tel: '', ownerId: '', @@ -104,27 +95,28 @@ amount: '', remark: '', acctTypes: [], - acctType: '', + acctType: '2003', }; }, - _changeTel: function () { + _changeTel: function() { var param = { - params: { - communityId: vc.getCurrentCommunity().communityId, - row: 50, - page: 1, - link: $that.prestoreAccountInfo.tel, - ownerTypeCd: '1001' + params: { + communityId: vc.getCurrentCommunity().communityId, + row: 50, + page: 1, + link: $that.prestoreAccountInfo.tel, + ownerTypeCd: '1001' + } } - } - //发送get请求 + //发送get请求 vc.http.get('listOwner', 'list', param, - function (json, res) { + function(json, res) { var listOwnerData = JSON.parse(json); vc.component.prestoreAccountInfo.owners = listOwnerData.owners; - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); vc.component.prestoreAccountInfo.owners = []; } diff --git a/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.html b/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.html index 18786f5f6..792267353 100644 --- a/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.html +++ b/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.html @@ -5,19 +5,18 @@
{{printPayFeeInfo.payObjName}}
-
+
{{printPayFeeInfo.feeReceipt[0].objName}}
- - - - - - + + + + + + @@ -34,13 +33,13 @@ - + - - + @@ -48,33 +47,33 @@ - - + + - + - + - - + + - - + + @@ -87,10 +86,9 @@ - - + \ No newline at end of file diff --git a/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.js b/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.js index eb52829e8..b8637729b 100644 --- a/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.js +++ b/public/pages/property/printPayFeeXinShiDai/printPayFeeXinShiDai.js @@ -1,4 +1,4 @@ -(function (vc) { +(function(vc) { vc.extends({ data: { @@ -21,7 +21,7 @@ }, printFlag: '0' }, - _initMethod: function () { + _initMethod: function() { //vc.component._initPrintPurchaseApplyDateInfo(); $that.printPayFeeInfo.receiptId = vc.getParam('receiptId'); @@ -36,15 +36,15 @@ $that._loadPrintSpec(); }, - _initEvent: function () { + _initEvent: function() { }, methods: { - _initPayFee: function () { + _initPayFee: function() { }, - _loadReceipt: function () { + _loadReceipt: function() { var param = { params: { @@ -59,7 +59,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; @@ -82,14 +82,15 @@ $that._listOwnerCar(_feeReceipt[0].objId); } - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _loadReceiptDetail: function () { + _loadReceiptDetail: function() { - var param = { + let param = { params: { page: 1, row: 100, @@ -101,7 +102,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 => { @@ -110,15 +111,48 @@ item.objName = im.objName; item.feeTypeCd = im.feeTypeCd; } - }) + }); + + $that._queryFeeDetailDiscount(item.detailId, item); }) $that.printPayFeeInfo.fees = _feeReceiptDetails; - }, function (errInfo, error) { + + setTimeout(function() { + $that.$forceUpdate(); + }, 2000) + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _loadPrintSpec: function () { + _queryFeeDetailDiscount: function(_detailId, _item) { + let param = { + params: { + page: 1, + row: 100, + detailId: _detailId, + communityId: vc.getCurrentCommunity().communityId + } + }; + //发送get请求 + vc.http.apiGet('/feeDiscount/queryFeeDetailDiscount', + param, + function(json, res) { + let _feeReceiptManageInfo = JSON.parse(json); + let _feeReceiptDetails = _feeReceiptManageInfo.data; + _feeReceiptDetails.forEach(data => { + if (data.discountType == '2002') { + _item.discountPrice = parseFloat(data.discountPrice) * -1; + } + }) + }, + function(errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _loadPrintSpec: function() { var param = { params: { page: 1, @@ -131,7 +165,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) { @@ -141,44 +175,46 @@ $that.printPayFeeInfo.communityName = _data[0].printName; } } - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); }, - _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(); }, - _listOwnerCar: function (_carId) { + _listOwnerCar: function(_carId) { let param = { - params: { - page: 1, - row: 1, - communityId: vc.getCurrentCommunity().communityId, - carId: _carId + params: { + page: 1, + row: 1, + communityId: vc.getCurrentCommunity().communityId, + carId: _carId + } } - } - //发送get请求 + //发送get请求 vc.http.apiGet('owner.queryOwnerCars', param, - function (json, res) { + function(json, res) { let _json = JSON.parse(json); let ownerCar = _json.data[0]; - let _roomName = ownerCar.roomName.replace('栋','-').replace("单元",'-').replace('室',''); + let _roomName = ownerCar.roomName.replace('栋', '-').replace("单元", '-').replace('室', ''); $that.printPayFeeInfo.feeReceipt[0].objName = _roomName; - }, function (errInfo, error) { + }, + function(errInfo, error) { console.log('请求失败处理'); } ); @@ -186,4 +222,4 @@ } }); -})(window.vc); +})(window.vc); \ No newline at end of file
{{vc.dateFormat(item.startTime)}}{{vc.dateSubOneDay(vc.dateFormat(item.startTime),vc.dateFormat(item.endTime),item.feeFlag)}} 0.00{{item.discountPrice}} {{item.amount}}
+ (大写){{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}} :
{{printPayFeeInfo.feeTime}}
{{printPayFeeInfo.receiptNum}}
{{printPayFeeInfo.carName}}
{{printPayFeeInfo.userName}}