From 781e2e12a015db837b3cff13de7141dfd37e7a43 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 25 Apr 2023 00:46:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=88=E5=90=8C=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contractDetailFee/contractDetailFee.html | 161 ++++++++++++++++++ .../contractDetailFee/contractDetailFee.js | 135 +++++++++++++++ .../contractDetailFile.html | 19 +++ .../contractDetailFile/contractDetailFile.js | 51 ++++++ .../contractDetailRoom.html | 135 +++++++-------- .../contractDetailRoom/contractDetailRoom.js | 76 +++------ .../ownerDetailRoom/ownerDetailRoom.html | 2 +- .../contractDetail/contractDetail.html | 14 +- 8 files changed, 462 insertions(+), 131 deletions(-) create mode 100644 public/components/contract/contractDetailFee/contractDetailFee.html create mode 100644 public/components/contract/contractDetailFee/contractDetailFee.js create mode 100644 public/components/contract/contractDetailFile/contractDetailFile.html create mode 100644 public/components/contract/contractDetailFile/contractDetailFile.js diff --git a/public/components/contract/contractDetailFee/contractDetailFee.html b/public/components/contract/contractDetailFee/contractDetailFee.html new file mode 100644 index 000000000..67fd111f1 --- /dev/null +++ b/public/components/contract/contractDetailFee/contractDetailFee.html @@ -0,0 +1,161 @@ +
+
+
+ +
+
+ +
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + +
{{fee.feeName}}{{fee.feeFlagName}}{{fee.feeTypeCdName}}{{fee.amountOwed}}{{fee.startTime}}{{_getEndTime(fee)}}~
{{_getDeadlineTime(fee)}}
+
+ + {{fee.preDegrees}}
+
+ + {{fee.curDegrees}}
+
+ + {{fee.mwPrice?fee.mwPrice:fee.squarePrice}}
+
+ + {{fee.additionalAmount}}
+
+
+ + {{_getAttrValue(fee.feeAttrs,'390006')}}
+
+ + {{fee.squarePrice}}
+
+ + {{fee.additionalAmount}}
+
+
+ + {{_getAttrValue(fee.feeAttrs,'390005')}}
+
+ + {{_getAttrValue(fee.feeAttrs,'390003')}}
+
+
+
+ +
+ + {{fee.squarePrice}}
+
+ + {{fee.additionalAmount}}
+
+ + {{fee.additionalAmount}}
+
{{fee.stateName}} + + + + + +
+ +
+
+
注意: 应收结束时间 “-” 表示未到应收时间 或 收费已结束
+
应收金额为-1 一般为费用项公式设置出错请检查
+
+
+ +
+
+
+ + + + + +
\ No newline at end of file diff --git a/public/components/contract/contractDetailFee/contractDetailFee.js b/public/components/contract/contractDetailFee/contractDetailFee.js new file mode 100644 index 000000000..b53cbc7e2 --- /dev/null +++ b/public/components/contract/contractDetailFee/contractDetailFee.js @@ -0,0 +1,135 @@ +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + contractDetailFeeInfo: { + rooms: [], + contractId: '', + roomNum: '', + allOweFeeAmount: '0' + } + }, + _initMethod: function () { + }, + _initEvent: function () { + vc.on('contractDetailFee', 'switch', function (_data) { + $that.contractDetailFeeInfo.contractId = _data.contractId; + $that._loadContractDetailFeeData(DEFAULT_PAGE, DEFAULT_ROWS); + }); + vc.on('contractDetailFee', 'paginationPlus', 'page_event', + function (_currentPage) { + $that._loadContractDetailFeeData(_currentPage, DEFAULT_ROWS); + }); + vc.on('contractDetailFee', 'notify', function (_data) { + $that._loadContractDetailFeeData(DEFAULT_PAGE, DEFAULT_ROWS); + }) + }, + methods: { + _loadContractDetailFeeData: function (_page, _row) { + let param = { + params: { + page: _page, + row: _row, + communityId: vc.getCurrentCommunity().communityId, + payerObjId: $that.contractDetailFeeInfo.contractId, + } + }; + //发送get请求 + vc.http.apiGet('/fee.listFee', + param, + function(json) { + let _feeConfigInfo = JSON.parse(json); + $that.contractDetailFeeInfo.total = _feeConfigInfo.total; + $that.contractDetailFeeInfo.records = _feeConfigInfo.records; + $that.contractDetailFeeInfo.fees = _feeConfigInfo.fees; + vc.emit('pagination', 'init', { + total: _feeConfigInfo.records, + currentPage: _page + }); + }, + function() { + console.log('请求失败处理'); + } + ); + }, + //查询 + _qureyContractDetailFee: function () { + $that._loadContractDetailFeeData(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _openTempImportContractFeeModal: function() { + vc.emit('tempImportRoomFee', 'openImportRoomFeeModal', { + roomId: $that.listContractFeeInfo.contractId, + objType: '7777', + roomName: $that.listContractFeeInfo.contractName, + ownerName: $that.listContractFeeInfo.ownerName + }) + }, + _payFee: function(_fee) { + vc.jumpToPage('/#/pages/property/payFeeOrder?feeId=' + _fee.feeId); + }, + _editFee: function(_fee) { + vc.emit('editFee', 'openEditFeeModal', _fee); + }, + _payFeeHis: function(_fee) { + _fee.builtUpArea = $that.listContractFeeInfo.builtUpArea; + vc.jumpToPage('/#/pages/property/propertyFee?' + vc.objToGetParam(_fee)); + }, + _deleteFee: function(_fee) { + // var dateA = new Date(_fee.startTime); + // var dateB = new Date(); + // if(dateA.setHours(0, 0, 0, 0) != dateB.setHours(0, 0, 0, 0)){ + // vc.toast("只能取消当天添加的费用"); + // return; + // } + vc.emit('deleteFee', 'openDeleteFeeModal', { + communityId: vc.getCurrentCommunity().communityId, + feeId: _fee.feeId + }); + }, + _finishFee: function(_fee) { + vc.emit('finishFee', 'openFinishFeeModal', { + communityId: vc.getCurrentCommunity().communityId, + feeId: _fee.feeId + }); + }, + _toOwnerPayFee: function() { + vc.jumpToPage('/#/pages/property/owePayFeeOrder?payObjId=' + $that.listContractFeeInfo.contractId + "&payObjType=7777&contractName=" + $that.listContractFeeInfo.contractName); + }, + _openRoomCreateFeeAddModal: function() { + vc.emit('contractCreateFeeAdd', 'openContractCreateFeeAddModal', { + isMore: false, + contract: $that.listContractFeeInfo + }); + }, + _getAttrValue: function(_attrs, _specCd) { + let _value = ""; + _attrs.forEach(item => { + if (item.specCd == _specCd) { + _value = item.value; + return; + } + }); + return _value; + }, + _getDeadlineTime: function(_fee) { + if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) { + return "-"; + } + if (_fee.state == '2009001') { + return "-"; + } + return vc.dateSubOneDay(_fee.startTime, _fee.deadlineTime, _fee.feeFlag); + }, + _getEndTime: function(_fee) { + if (_fee.state == '2009001') { + return "-"; + } + return vc.dateFormat(_fee.endTime); + }, + } + }); +})(window.vc); \ No newline at end of file diff --git a/public/components/contract/contractDetailFile/contractDetailFile.html b/public/components/contract/contractDetailFile/contractDetailFile.html new file mode 100644 index 000000000..e1f416c9a --- /dev/null +++ b/public/components/contract/contractDetailFile/contractDetailFile.html @@ -0,0 +1,19 @@ +
+
+ +
+
+
+
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/public/components/contract/contractDetailFile/contractDetailFile.js b/public/components/contract/contractDetailFile/contractDetailFile.js new file mode 100644 index 000000000..21ad957fb --- /dev/null +++ b/public/components/contract/contractDetailFile/contractDetailFile.js @@ -0,0 +1,51 @@ +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + contractDetailFileInfo: { + files: [], + contractId: '', + roomNum: '', + allOweFeeAmount: '0' + } + }, + _initMethod: function () { + }, + _initEvent: function () { + vc.on('contractDetailFile', 'switch', function (_data) { + $that.contractDetailFileInfo.contractId = _data.contractId; + $that._loadContractDetailFileData(DEFAULT_PAGE, DEFAULT_ROWS); + }); + + }, + methods: { + _loadContractDetailFileData: function (_page, _row) { + let param = { + params: { + contractId: $that.contractDetailFileInfo.contractId, + page: 1, + row: 100 + } + } + //发送get请求 + vc.http.apiGet('/contractFile/queryContractFile', + param, + function (json, res) { + var _contractTFile = JSON.parse(json); + vc.component.contractDetailInfo.files = _contractTFile.data; + }, + function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _viewFile: function (_file) { + window.open(_file.fileSaveName); + }, + } + }); +})(window.vc); \ No newline at end of file diff --git a/public/components/contract/contractDetailRoom/contractDetailRoom.html b/public/components/contract/contractDetailRoom/contractDetailRoom.html index f3216a747..0521aeafa 100644 --- a/public/components/contract/contractDetailRoom/contractDetailRoom.html +++ b/public/components/contract/contractDetailRoom/contractDetailRoom.html @@ -1,102 +1,81 @@
- +
- +
-
- -
- - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + +
- - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + +
- {{room.floorNum}}-{{room.unitNum}}-{{room.roomNum}} - - {{room.layer}} - - {{room.roomSubTypeName}} - - {{room.builtUpArea}}/{{room.roomArea}} - - {{room.roomRent}} - - {{room.stateName}} - - {{room.roomOweFee || '0.00'}}(按天更新) - -
- -
-
- -
-
- -
-
+ {{room.roomName}} + + {{room.layer}} + + {{room.roomSubTypeName}} + + {{room.builtUpArea}}/{{room.roomArea}} + + {{room.roomRent}} + + {{room.stateName}} + +
+ +
+
- {{contractDetailRoomInfo.allOweFeeAmount}} - + + {{_sumRoomArea()}}
diff --git a/public/components/contract/contractDetailRoom/contractDetailRoom.js b/public/components/contract/contractDetailRoom/contractDetailRoom.js index 4dd164bfe..e964ea504 100644 --- a/public/components/contract/contractDetailRoom/contractDetailRoom.js +++ b/public/components/contract/contractDetailRoom/contractDetailRoom.js @@ -8,9 +8,9 @@ data: { contractDetailRoomInfo: { rooms: [], - contractId:'', + contractId: '', roomNum: '', - allOweFeeAmount:'0' + allOweFeeAmount: '0' } }, _initMethod: function () { @@ -25,35 +25,26 @@ vc.component._loadContractDetailRoomData(_currentPage, DEFAULT_ROWS); }); vc.on('contractDetailRoom', 'notify', function (_data) { - $that._loadContractDetailRoomData(DEFAULT_PAGE,DEFAULT_ROWS); + $that._loadContractDetailRoomData(DEFAULT_PAGE, DEFAULT_ROWS); }) }, methods: { _loadContractDetailRoomData: function (_page, _row) { let param = { params: { - communityId: vc.getCurrentCommunity().communityId, - contractId:$that.contractDetailRoomInfo.contractId, - roomNum:$that.contractDetailRoomInfo.roomNum, - page:_page, - row:_row + contractId: $that.contractDetailRoomInfo.contractId, + page: 1, + row: 100 } - }; - + } //发送get请求 - vc.http.apiGet('/room.queryRoomsByContract', + vc.http.apiGet('/contract/queryContractRoom', param, - function (json) { - var _roomInfo = JSON.parse(json); - vc.component.contractDetailRoomInfo.rooms = _roomInfo.rooms; - $that._computeContractRoomOweFeeAmount(); - vc.emit('contractDetailRoom', 'paginationPlus', 'init', { - total: _roomInfo.records, - dataCount: _roomInfo.total, - currentPage: _page - }); + function (json, res) { + var _contractTFile = JSON.parse(json); + $that.contractDetailRoomInfo.rooms = _contractTFile.data; }, - function () { + function (errInfo, error) { console.log('请求失败处理'); } ); @@ -62,32 +53,6 @@ _qureyContractDetailRoom: function () { $that._loadContractDetailRoomData(DEFAULT_PAGE, DEFAULT_ROWS); }, - - _computeContractRoomOweFeeAmount(){ - let _rooms = $that.contractDetailRoomInfo.rooms; - let _totalOweFeeAmount = 0; - $that.contractDetailRoomInfo.allOweFeeAmount = 0; - if(!_rooms ||_rooms.length <1){ - return ; - } - - _rooms.forEach(_room => { - if(_room.roomOweFee){ - _totalOweFeeAmount += parseFloat(_room.roomOweFee); - } - }); - - $that.contractDetailRoomInfo.allOweFeeAmount = _totalOweFeeAmount.toFixed(2); - }, - _openAddContractRoom: function () { - vc.jumpToPage("/#/pages/property/addContractRoomBinding?contractId=" + $that.contractDetailRoomInfo.contractId); - }, - contractExitRoomModel: function(_room) { - vc.emit('contractExitRoom', 'openExitRoomModel', { - contractId: $that.contractDetailRoomInfo.contractId, - roomId: _room.roomId - }); - }, _toSimplifyAcceptance: function (_room) { let _date = new Date(); vc.saveData("JAVA110_IS_BACK", _date.getTime()); @@ -98,9 +63,20 @@ }) vc.jumpToPage('/#/pages/property/simplifyAcceptance?tab=业务受理'); }, - _openEditRoomModel: function (_room) { - vc.emit('editRoom', 'openEditRoomModal', _room); - }, + _sumRoomArea:function(){ + let _rooms = $that.contractDetailRoomInfo.rooms; + if(!_rooms || _rooms.length<1){ + return 0; + } + + let _totalArea = 0; + + _rooms.forEach(_room => { + _totalArea += parseFloat(_room.builtUpArea) + }); + + return _totalArea.toFixed(2); + } } }); })(window.vc); \ No newline at end of file diff --git a/public/components/owner/ownerDetailRoom/ownerDetailRoom.html b/public/components/owner/ownerDetailRoom/ownerDetailRoom.html index 82b1d631a..7022606f3 100644 --- a/public/components/owner/ownerDetailRoom/ownerDetailRoom.html +++ b/public/components/owner/ownerDetailRoom/ownerDetailRoom.html @@ -23,7 +23,7 @@ - + diff --git a/public/pages/contract/contractDetail/contractDetail.html b/public/pages/contract/contractDetail/contractDetail.html index 4869cc414..4af295d81 100644 --- a/public/pages/contract/contractDetail/contractDetail.html +++ b/public/pages/contract/contractDetail/contractDetail.html @@ -172,12 +172,12 @@ @@ -222,4 +222,14 @@
+ +
+ +
+ +
+ +
+ +
\ No newline at end of file