From 728c34247e1abcd150e2db83a537d15988d8d6b7 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Mon, 23 Nov 2020 23:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=A2=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 10 +- .../common/editCommunity/editCommunity.html | 48 ++++++---- .../common/editCommunity/editCommunity.js | 2 + .../editCommunityArea/editCommunityArea.html | 31 ++++++ .../editCommunityArea/editCommunityArea.js | 96 +++++++++++++++++++ .../property/addFeeFormula/addFeeFormula.html | 1 + .../editFeeFormula/editFeeFormula.html | 1 + .../common/enterCommunity/enterCommunity.html | 14 ++- .../common/enterCommunity/enterCommunity.js | 3 + .../feeFormulaManage/feeFormulaManage.js | 2 +- 10 files changed, 179 insertions(+), 29 deletions(-) create mode 100644 public/components/common/editCommunityArea/editCommunityArea.html create mode 100644 public/components/common/editCommunityArea/editCommunityArea.js diff --git a/app.js b/app.js index e192f9858..11d945a37 100644 --- a/app.js +++ b/app.js @@ -32,15 +32,15 @@ let opts = { //app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts)); -//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts)); +//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); //app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -// app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); -// app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts)); + app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts)); -app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); -app.use('/app',proxy('http://127.0.0.1:8012',opts)); +//app.use('/callComponent',proxy('http://127.0.0.1:8012',opts)); +//app.use('/app',proxy('http://127.0.0.1:8012',opts)); //app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); //app.use('/app',proxy('http://192.168.1.16:8012',opts)); diff --git a/public/components/common/editCommunity/editCommunity.html b/public/components/common/editCommunity/editCommunity.html index 31613969b..be9e4e85e 100644 --- a/public/components/common/editCommunity/editCommunity.html +++ b/public/components/common/editCommunity/editCommunity.html @@ -1,4 +1,5 @@ - + \ No newline at end of file diff --git a/public/components/common/editCommunity/editCommunity.js b/public/components/common/editCommunity/editCommunity.js index 76587ab4f..3c81fd190 100644 --- a/public/components/common/editCommunity/editCommunity.js +++ b/public/components/common/editCommunity/editCommunity.js @@ -10,6 +10,7 @@ cityCode: '', mapX: '101.33', mapY: '101.33', + communityArea:'' } }, @@ -124,6 +125,7 @@ cityCode: '', mapX: '101.33', mapY: '101.33', + communityArea:'' } } diff --git a/public/components/common/editCommunityArea/editCommunityArea.html b/public/components/common/editCommunityArea/editCommunityArea.html new file mode 100644 index 000000000..4303e4aa0 --- /dev/null +++ b/public/components/common/editCommunityArea/editCommunityArea.html @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/public/components/common/editCommunityArea/editCommunityArea.js b/public/components/common/editCommunityArea/editCommunityArea.js new file mode 100644 index 000000000..690fa4bf1 --- /dev/null +++ b/public/components/common/editCommunityArea/editCommunityArea.js @@ -0,0 +1,96 @@ +(function (vc, vm) { + + vc.extends({ + data: { + editCommunityAreaInfo: { + communityId: '', + name: '', + address: '', + nearbyLandmarks: '', + cityCode: '', + mapX: '101.33', + mapY: '101.33', + communityArea: '' + + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('editCommunityArea', 'openEditCommunityModal', + function (_params) { + vc.component.refreshEditCommunityInfo(); + $('#editCommunityAreaModel').modal('show'); + vc.copyObject(_params, vc.component.editCommunityAreaInfo); + //vc.component.editCommunityAreaInfo.communityId = vc.getCurrentCommunity().communityId; + }); + }, + methods: { + editCommunityAreaValidate: function () { + return vc.validate.validate({ + editCommunityAreaInfo: vc.component.editCommunityAreaInfo + }, + { + + 'editCommunityAreaInfo.communityArea': [{ + limit: "required", + param: "", + errInfo: "小区面积不能为空" + }, + { + limit: "money", + param: "", + errInfo: "小区面积必须是3.00 格式" + }, + ], + 'editCommunityAreaInfo.communityId': [{ + limit: "required", + param: "", + errInfo: "小区ID不能为空" + }] + + }); + }, + editCommunityArea: function () { + if (!vc.component.editCommunityAreaValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + + vc.http.post('editCommunity', 'update', JSON.stringify(vc.component.editCommunityAreaInfo), { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + if (res.status == 200) { + //关闭model + $('#editCommunityAreaModel').modal('hide'); + vc.emit('enterCommunity','listMyCommunity', {}); + return; + } + vc.toast(json); + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.toast(errInfo); + }); + }, + refreshEditCommunityInfo: function () { + vc.component.editCommunityAreaInfo = { + communityId: '', + name: '', + address: '', + nearbyLandmarks: '', + cityCode: '', + mapX: '101.33', + mapY: '101.33', + communityArea: '' + + } + } + } + }); + +})(window.vc, window.vc.component); \ No newline at end of file diff --git a/public/components/property/addFeeFormula/addFeeFormula.html b/public/components/property/addFeeFormula/addFeeFormula.html index 4e21f8115..4950a8f13 100644 --- a/public/components/property/addFeeFormula/addFeeFormula.html +++ b/public/components/property/addFeeFormula/addFeeFormula.html @@ -32,6 +32,7 @@
T 代表总量,如电费总使用量
+
C 代表房屋对应小区面积
F 代表房屋对应楼栋面积
U 代表房屋对应单元面积
R 代表房屋面积
diff --git a/public/components/property/editFeeFormula/editFeeFormula.html b/public/components/property/editFeeFormula/editFeeFormula.html index b91d88e1d..295a18ab2 100644 --- a/public/components/property/editFeeFormula/editFeeFormula.html +++ b/public/components/property/editFeeFormula/editFeeFormula.html @@ -32,6 +32,7 @@
T 代表总量,如电费总使用量
+
C 代表房屋对应小区面积
F 代表房屋对应楼栋面积
U 代表房屋对应单元面积
R 代表房屋面积
diff --git a/public/pages/common/enterCommunity/enterCommunity.html b/public/pages/common/enterCommunity/enterCommunity.html index 84afa474b..08b364044 100644 --- a/public/pages/common/enterCommunity/enterCommunity.html +++ b/public/pages/common/enterCommunity/enterCommunity.html @@ -18,11 +18,12 @@ 省份 市/州 - 县/区 - 小区名称 + 县/区 + 小区名称 小区编码 联系方式 + 面积 状态 @@ -53,6 +54,9 @@ {{community.tel}} + + {{community.communityArea}} + @@ -66,6 +70,10 @@
+ +
+ +
@@ -84,5 +92,7 @@
+ +
\ No newline at end of file diff --git a/public/pages/common/enterCommunity/enterCommunity.js b/public/pages/common/enterCommunity/enterCommunity.js index 3b8b349d6..1324439c1 100644 --- a/public/pages/common/enterCommunity/enterCommunity.js +++ b/public/pages/common/enterCommunity/enterCommunity.js @@ -42,6 +42,9 @@ _openExitCommunityModel:function(_community){ vc.emit('storeExitCommunity','openStoreExitCommunityModal',_community); }, + _openUpdateCommunityModel:function(_community){ + vc.emit('editCommunityArea', 'openEditCommunityModal',_community); + }, _showCommunityStatus(_statusCd){ if(_statusCd == '1000'){ return "入驻审核"; diff --git a/public/pages/property/feeFormulaManage/feeFormulaManage.js b/public/pages/property/feeFormulaManage/feeFormulaManage.js index fbb4a7c1a..5dcc12e03 100644 --- a/public/pages/property/feeFormulaManage/feeFormulaManage.js +++ b/public/pages/property/feeFormulaManage/feeFormulaManage.js @@ -39,11 +39,11 @@ var param = { params:vc.component.feeFormulaManageInfo.conditions }; - //发送get请求 vc.http.apiGet('/feeFormula/queryFeeFormula', param, function(json,res){ + var _feeFormulaManageInfo=JSON.parse(json); vc.component.feeFormulaManageInfo.total = _feeFormulaManageInfo.total; vc.component.feeFormulaManageInfo.records = _feeFormulaManageInfo.records;