From 9dacec694994fca0b6e0a5428ee896e4352a381f Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Sun, 27 Sep 2020 18:06:40 +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 --- .../viewRentingPoolInfo.html | 108 ++++++++++-------- .../viewRentingPoolInfo.js | 101 +++++++++++----- .../frame/uploadImage/uploadImage.js | 2 +- .../admin/rentingDetail/rentingDetail.html | 78 +++++++++++++ .../admin/rentingDetail/rentingDetail.js | 95 +++++++++++++++ .../rentingHistoryManage.js | 2 +- 6 files changed, 308 insertions(+), 78 deletions(-) create mode 100644 public/pages/admin/rentingDetail/rentingDetail.html create mode 100644 public/pages/admin/rentingDetail/rentingDetail.js diff --git a/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.html b/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.html index a13c6bac1..01866e35e 100644 --- a/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.html +++ b/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.html @@ -4,81 +4,97 @@
房源信息
- - - +
-
+
- +
-
-
+
+
- +
-
-
+
+
- - + +
-
-
-
-
+
+
+
+
- - + +
-
-
+
+
- - + +
-
-
+
+
- +
-
-
-
-
+
+
+
+
- +
-
-
+
+
- +
-
-
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+ +
- + + - - + + \ No newline at end of file diff --git a/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.js b/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.js index cec5b8d37..a4149eaab 100644 --- a/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.js +++ b/public/components/admin/viewRentingPoolInfo/viewRentingPoolInfo.js @@ -1,53 +1,94 @@ /** 房源 组件 **/ -(function(vc){ +(function (vc) { vc.extends({ - propTypes: { - callBackListener:vc.propTypes.string, //父组件名称 - callBackFunction:vc.propTypes.string //父组件监听方法 - }, - data:{ - viewRentingPoolInfo:{ - index:0, - flowComponent:'viewRentingPoolInfo', - rentingTitle:'', -price:'', -paymentType:'', -checkInDate:'', -rentingConfigId:'', -rentingDesc:'', -ownerName:'', -ownerTel:'', - + data: { + viewRentingPoolInfo: { + index: 0, + flowComponent: 'viewRentingPoolInfo', + rentingTitle: '', + price: '', + paymentType: '', + checkInDate: '', + rentingConfigId: '', + rentingDesc: '', + ownerName: '', + ownerTel: '', + paymentTypeName: '', + roomName: '', + serviceOwnerFee: 0.0, + serviceTenantFee: 0.0 } }, - _initMethod:function(){ + _initMethod: function () { //根据请求参数查询 查询 业主信息 vc.component._loadRentingPoolInfoData(); + + }, - _initEvent:function(){ - vc.on('viewRentingPoolInfo','chooseRentingPool',function(_app){ + _initEvent: function () { + vc.on('viewRentingPoolInfo', 'chooseRentingPool', function (_app) { vc.copyObject(_app, vc.component.viewRentingPoolInfo); - vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewRentingPoolInfo); }); - vc.on('viewRentingPoolInfo', 'onIndex', function(_index){ + vc.on('viewRentingPoolInfo', 'onIndex', function (_index) { vc.component.viewRentingPoolInfo.index = _index; }); - }, - methods:{ + methods: { - _openSelectRentingPoolInfoModel(){ - vc.emit('chooseRentingPool','openChooseRentingPoolModel',{}); + _openSelectRentingPoolInfoModel() { + vc.emit('chooseRentingPool', 'openChooseRentingPoolModel', {}); }, - _openAddRentingPoolInfoModel(){ - vc.emit('addRentingPool','openAddRentingPoolModal',{}); + _openAddRentingPoolInfoModel() { + vc.emit('addRentingPool', 'openAddRentingPoolModal', {}); }, - _loadRentingPoolInfoData:function(){ + _loadRentingPoolInfoData: function () { + let _rentingId = vc.getParam('rentingId'); + var param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + page: 1, + row: 1, + rentingId: _rentingId + } + }; + //发送get请求 + vc.http.apiGet('/renting/queryRentingPool', + param, + function (json, res) { + var _rentingPoolManageInfo = JSON.parse(json); + let total = _rentingPoolManageInfo.total; + + if (total < 1) { + vc.toast('未查询到 房屋出租信息'); + return; + } + vc.copyObject(_rentingPoolManageInfo.data[0], $that.viewRentingPoolInfo); + + let _data = _rentingPoolManageInfo.data[0]; + + let _rentingFormula = _data.rentingFormula; + //收费计算公式,1001 固定值 ,2002 每月租金比例 + if (_rentingFormula == '1001') { + $that.viewRentingPoolInfo.serviceOwnerFee = (_data.servicePrice * _data.serviceOwnerRate).toFixed(2); + $that.viewRentingPoolInfo.serviceTenantFee = (_data.servicePrice * _data.serviceTenantRate).toFixed(2); + } else { + let _monthPrice = _data.price; + $that.viewRentingPoolInfo.serviceOwnerFee = (_monthPrice * _data.servicePrice * _data.serviceOwnerRate).toFixed(2); + $that.viewRentingPoolInfo.serviceTenantFee = (_monthPrice * _data.servicePrice * _data.serviceTenantRate).toFixed(2); + } + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _goBack: function () { + vc.goBack(); } } }); diff --git a/public/components/frame/uploadImage/uploadImage.js b/public/components/frame/uploadImage/uploadImage.js index 1e7147f02..023d13197 100644 --- a/public/components/frame/uploadImage/uploadImage.js +++ b/public/components/frame/uploadImage/uploadImage.js @@ -68,7 +68,7 @@ if (photoFiles && photoFiles.length > 0) { // 获取目前上传的文件 var file = photoFiles[0];// 文件大小校验的动作 - if (file.size > 1024 * 1024 * 1) { + if (file.size > 1024 * 1024 * 2) { vc.toast("图片大小不能超过 2MB!") return false; } diff --git a/public/pages/admin/rentingDetail/rentingDetail.html b/public/pages/admin/rentingDetail/rentingDetail.html new file mode 100644 index 000000000..54469d10d --- /dev/null +++ b/public/pages/admin/rentingDetail/rentingDetail.html @@ -0,0 +1,78 @@ +
+ + + +
+
+
+
+
租房流转
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
序号处理人电话状态处理时间角色意见
{{index+1}}{{item.useName}}{{item.userTel}}{{item.stateName}}{{item.dealTime}}{{_getUserRole(item.userRole)}}{{item.context}}
+
+
+
+
+ +
+
+
+
+
服务费分成
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
序号费用名称分成金额支付时间收款对象
{{index+1}}{{item.feeName}}{{item.amount}}{{item.startTime}}{{item.incomeObjName}}
+
+
+
+
+
\ No newline at end of file diff --git a/public/pages/admin/rentingDetail/rentingDetail.js b/public/pages/admin/rentingDetail/rentingDetail.js new file mode 100644 index 000000000..9afd322df --- /dev/null +++ b/public/pages/admin/rentingDetail/rentingDetail.js @@ -0,0 +1,95 @@ +/** + 房源 组件 +**/ +(function (vc) { + + vc.extends({ + data: { + rentingDetailInfo: { + rentingFlows:[], + fees:[] + } + }, + _initMethod: function () { + //根据请求参数查询 查询 业主信息 + $that._loadRentingFlow(); + $that._loadRentingFee(); + }, + _initEvent: function () { + + + }, + methods: { + + _loadRentingFlow:function(){ + let _rentingId = vc.getParam('rentingId'); + + var param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + page: 1, + row: 50, + rentingId: _rentingId + } + }; + + //发送get请求 + vc.http.apiGet('/rentingPoolFlow/queryRentingPoolFlow', + param, + function (json, res) { + var _rentingFlow = JSON.parse(json); + let total = _rentingFlow.total; + if (total < 1) { + return; + } + $that.rentingDetailInfo.rentingFlows = _rentingFlow.data; + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _loadRentingFee:function(){ + let _rentingId = vc.getParam('rentingId'); + + var param = { + params: { + communityId: vc.getCurrentCommunity().communityId, + page: 1, + row: 50, + rentingId: _rentingId + } + }; + + //发送get请求 + vc.http.apiGet('/rentingFee/queryFee', + param, + function (json, res) { + var _rentingFlow = JSON.parse(json); + let total = _rentingFlow.total; + if (total < 1) { + return; + } + $that.rentingDetailInfo.fees = _rentingFlow.data; + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _getUserRole:function(_userRole){ + + if(_userRole == 1){ + return "业主"; + }else if(_userRole == 2){ + return "租客"; + }{ + return "运营团队"; + } + } + + + } + }); + +})(window.vc); \ No newline at end of file diff --git a/public/pages/admin/rentingHistoryManage/rentingHistoryManage.js b/public/pages/admin/rentingHistoryManage/rentingHistoryManage.js index 595b90f8f..f84bbbbaa 100644 --- a/public/pages/admin/rentingHistoryManage/rentingHistoryManage.js +++ b/public/pages/admin/rentingHistoryManage/rentingHistoryManage.js @@ -72,7 +72,7 @@ } }, _toRentingHistory:function(rentingPool){ - + vc.jumpToPage('/admin.html#/pages/admin/rentingDetail?rentingId='+rentingPool.rentingId); } } });