diff --git a/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.html b/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.html index 56b7ff5a1..fa92b8665 100644 --- a/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.html +++ b/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.html @@ -1,4 +1,16 @@
+
+ +
+
+
+ +
+
diff --git a/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.js b/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.js index a62498a75..a4ab0c588 100644 --- a/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.js +++ b/public/components/property/simplifyOwnerComplaint/simplifyOwnerComplaint.js @@ -6,7 +6,8 @@ simplifyOwnerComplaintInfo: { complaints: [], ownerId: '', - roomId: '' + roomId: '', + roomName: '' } }, _initMethod: function () { @@ -16,14 +17,14 @@ //切换 至费用页面 vc.on('simplifyOwnerComplaint', 'switch', function (_param) { - if(_param.roomId == ''){ - return ; + if (_param.roomId == '') { + return; } $that.clearSimplifyOwnerComplaintInfo(); vc.copyObject(_param, $that.simplifyOwnerComplaintInfo) $that._listSimplifyOwnerComplaint(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('simplifyOwnerComplaint','paginationPlus', 'page_event', + vc.on('simplifyOwnerComplaint', 'paginationPlus', 'page_event', function (_currentPage) { $that._listSimplifyOwnerComplaint(_currentPage, DEFAULT_ROWS); }); @@ -49,7 +50,7 @@ vc.component.simplifyOwnerComplaintInfo.total = _complaintManageInfo.total; vc.component.simplifyOwnerComplaintInfo.records = _complaintManageInfo.records; vc.component.simplifyOwnerComplaintInfo.complaints = _complaintManageInfo.complaints; - vc.emit('simplifyOwnerComplaint','paginationPlus', 'init', { + vc.emit('simplifyOwnerComplaint', 'paginationPlus', 'init', { total: vc.component.simplifyOwnerComplaintInfo.records, currentPage: _page }); @@ -93,7 +94,11 @@ ownerId: '', roomId: '' } - } + }, + _openAddComplaintModal: function () { + //vc.emit('addComplaint', 'openAddComplaintModal', {}); + vc.jumpToPage("/admin.html#/pages/common/addRoomComplaint?roomId=" + $that.simplifyOwnerComplaintInfo.roomId) + }, } diff --git a/public/components/property/simplifyOwnerMember/simplifyOwnerMember.html b/public/components/property/simplifyOwnerMember/simplifyOwnerMember.html index a513f06ef..31cc193c2 100644 --- a/public/components/property/simplifyOwnerMember/simplifyOwnerMember.html +++ b/public/components/property/simplifyOwnerMember/simplifyOwnerMember.html @@ -25,6 +25,7 @@ + @@ -58,6 +59,9 @@ +
联系方式 创建员工 备注{{item}} 操作
{{owner.remark}} + {{item}} +
diff --git a/public/components/property/simplifyOwnerMember/simplifyOwnerMember.js b/public/components/property/simplifyOwnerMember/simplifyOwnerMember.js index e24227349..094c62f06 100644 --- a/public/components/property/simplifyOwnerMember/simplifyOwnerMember.js +++ b/public/components/property/simplifyOwnerMember/simplifyOwnerMember.js @@ -5,24 +5,27 @@ data: { simplifyOwnerMemberInfo: { members: [], - ownerId: '' + ownerId: '', + listColumns: [] } }, _initMethod: function () { - + $that._getSimplifyOwnerMemberColumns(function () { + }); }, _initEvent: function () { //切换 至费用页面 vc.on('simplifyOwnerMember', 'switch', function (_param) { - if(_param.ownerId == ''){ - return ; + if (_param.ownerId == '') { + return; } $that.clearSimplifyOwnerMemberInfo(); vc.copyObject(_param, $that.simplifyOwnerMemberInfo) $that._listSimplifyOwnerMember(DEFAULT_PAGE, DEFAULT_ROWS); + }); - vc.on('simplifyOwnerMember', 'listOwnerData',function (_param){ + vc.on('simplifyOwnerMember', 'listOwnerData', function (_param) { $that._listSimplifyOwnerMember(DEFAULT_PAGE, DEFAULT_ROWS); }); vc.on('pagination', 'page_event', @@ -45,8 +48,9 @@ 'list', param, function (json) { - let _memberInfo = JSON.parse(json); - $that.simplifyOwnerMemberInfo.members = _memberInfo.owners; + let _simplifyOwnerMemberInfo = JSON.parse(json); + $that.simplifyOwnerMemberInfo.members = _simplifyOwnerMemberInfo.owners; + $that.dealSimplifyOwnerMemberAttr(_simplifyOwnerMemberInfo.owners); }, function () { console.log('请求失败处理'); }); @@ -64,10 +68,55 @@ vc.emit('editOwner', 'openEditOwnerModal', _member); }, clearSimplifyOwnerMemberInfo: function () { + let _listColumns = $that.simplifyOwnerMemberInfo.listColumns; $that.simplifyOwnerMemberInfo = { members: [], - ownerId: '' + ownerId: '', + listColumns: _listColumns } + }, + dealSimplifyOwnerMemberAttr: function (owners) { + owners.forEach(item => { + $that._getSimplifyOwnerMemberColumnsValue(item); + }); + }, + _getSimplifyOwnerMemberColumnsValue: function (_owner) { + _owner.listValues = []; + + if (!_owner.hasOwnProperty('ownerAttrDtos') || _owner.ownerAttrDtos.length < 1) { + $that.simplifyOwnerMemberInfo.listColumns.forEach(_value => { + _owner.listValues.push(''); + }) + return; + } + + let _ownerAttrDtos = _owner.ownerAttrDtos; + + + + $that.simplifyOwnerMemberInfo.listColumns.forEach(_value => { + let _tmpValue = ''; + _ownerAttrDtos.forEach(_attrItem => { + if (_value == _attrItem.specName) { + _tmpValue = _attrItem.valueName; + } + }) + _owner.listValues.push(_tmpValue); + }) + + }, + _getSimplifyOwnerMemberColumns: function (_call) { + console.log('_getColumns'); + $that.simplifyOwnerMemberInfo.listColumns = []; + vc.getAttrSpec('building_owner_attr', function (data) { + $that.simplifyOwnerMemberInfo.listColumns = []; + data.forEach(item => { + if (item.listShow == 'Y') { + $that.simplifyOwnerMemberInfo.listColumns.push(item.specName); + } + }); + _call(); + }); } } diff --git a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html index 1a0b97b70..bca9eda6a 100644 --- a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html +++ b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html @@ -1,4 +1,16 @@
+
+ +
+
+
+ +
+
diff --git a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.js b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.js index dbad90f99..9519aa7ec 100644 --- a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.js +++ b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.js @@ -6,7 +6,8 @@ simplifyOwnerRepairInfo: { repairs: [], ownerId: '', - roomId: '' + roomId: '', + roomName: '' } }, _initMethod: function () { @@ -15,15 +16,15 @@ _initEvent: function () { //切换 至费用页面 vc.on('simplifyOwnerRepair', 'switch', function (_param) { - if(_param.roomId == ''){ - return ; + if (_param.roomId == '') { + return; } $that.clearSimplifyOwnerRepairInfo(); vc.copyObject(_param, $that.simplifyOwnerRepairInfo) $that._listSimplifyOwnerRepair(DEFAULT_PAGE, DEFAULT_ROWS); }); - vc.on('simplifyOwnerRepair','paginationPlus', 'page_event', + vc.on('simplifyOwnerRepair', 'paginationPlus', 'page_event', function (_currentPage) { $that._listSimplifyOwnerRepair(_currentPage, DEFAULT_ROWS); }); @@ -49,7 +50,7 @@ vc.component.simplifyOwnerRepairInfo.total = _repairPoolManageInfo.total; vc.component.simplifyOwnerRepairInfo.records = _repairPoolManageInfo.records; vc.component.simplifyOwnerRepairInfo.repairs = _repairPoolManageInfo.data; - vc.emit('simplifyOwnerRepair','paginationPlus', 'init', { + vc.emit('simplifyOwnerRepair', 'paginationPlus', 'init', { total: vc.component.simplifyOwnerRepairInfo.records, currentPage: _page }); @@ -66,8 +67,12 @@ $that.simplifyOwnerRepairInfo = { repairs: [], ownerId: '', - roomId: '' + roomId: '', + roomName: '' } + }, + _openAddOwnerRepairModal: function () { + vc.jumpToPage("/admin.html#/pages/common/addRoomRepair?roomId=" + $that.simplifyOwnerRepairInfo.roomId + "&roomName=" + $that.simplifyOwnerRepairInfo.roomName) } } diff --git a/public/pages/common/addComplaintStep/addComplaintStep.js b/public/pages/common/addComplaintStep/addComplaintStep.js index 76b1e1f73..a14647d03 100644 --- a/public/pages/common/addComplaintStep/addComplaintStep.js +++ b/public/pages/common/addComplaintStep/addComplaintStep.js @@ -81,7 +81,8 @@ vc.toast('处理成功'); //关闭model - vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json))); + //vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json))); + vc.goBack(); return; } vc.toast(json); diff --git a/public/pages/common/addRoomComplaint/addRoomComplaint.html b/public/pages/common/addRoomComplaint/addRoomComplaint.html new file mode 100644 index 000000000..effb2c699 --- /dev/null +++ b/public/pages/common/addRoomComplaint/addRoomComplaint.html @@ -0,0 +1,60 @@ +
+
+
+
+
+
登记投诉建议
+
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/public/pages/common/addRoomComplaint/addRoomComplaint.js b/public/pages/common/addRoomComplaint/addRoomComplaint.js new file mode 100644 index 000000000..f791e5b00 --- /dev/null +++ b/public/pages/common/addRoomComplaint/addRoomComplaint.js @@ -0,0 +1,115 @@ +/** + 入驻小区 + **/ +(function (vc) { + vc.extends({ + data: { + addRoomComplaintInfo: { + flowComponent: 'addComplainView', + typeCd: '', + complaintName: '', + tel: '', + context: '', + roomId:'' + } + }, + _initMethod: function () { + $that.addRoomComplaintInfo.roomId = vc.getParam('roomId') + }, + _initEvent: function () { + + }, + methods: { + + addComplainValidate: function () { + return vc.validate.validate({ + addRoomComplaintInfo: vc.component.addRoomComplaintInfo + }, { + 'addRoomComplaintInfo.typeCd': [ + { + limit: "required", + param: "", + errInfo: "投诉类型不能为空" + }, + { + limit: "num", + param: "", + errInfo: "投诉类型格式错误" + }, + ], + 'addRoomComplaintInfo.complaintName': [ + { + limit: "required", + param: "", + errInfo: "投诉人不能为空" + }, + { + limit: "maxLength", + param: "200", + errInfo: "投诉人不能大于200位" + }, + ], + 'addRoomComplaintInfo.tel': [ + { + limit: "required", + param: "", + errInfo: "投诉电话不能为空" + }, + { + limit: "phone", + param: "", + errInfo: "投诉电话格式错误" + }, + ], + 'addRoomComplaintInfo.context': [ + { + limit: "required", + param: "", + errInfo: "投诉内容不能为空" + }, + { + limit: "maxLength", + param: "4000", + errInfo: "投诉状态超过4000位" + }, + ], + + }); + }, + saveAddComplainInfo: function () { + vc.component.addRoomComplaintInfo.communityId = vc.getCurrentCommunity().communityId; + if (!vc.component.addComplainValidate()) { + //侦听回传 + vc.toast("请选择或填写必选信息"); + return; + } + vc.http.post( + 'addComplaintStepBinding', + 'binding', + JSON.stringify(vc.component.addRoomComplaintInfo), + { + emulateJSON: true + }, + function (json, res) { + if (res.status == 200) { + + vc.toast('处理成功'); + //关闭model + //vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json))); + vc.goBack(); + return; + } + vc.toast(json); + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.toast(errInfo); + }); + }, + _goBack:function(){ + vc.goBack(); + } + } + }); +})(window.vc); diff --git a/public/pages/common/addRoomRepair/addRoomRepair.html b/public/pages/common/addRoomRepair/addRoomRepair.html new file mode 100644 index 000000000..ff6ebc96d --- /dev/null +++ b/public/pages/common/addRoomRepair/addRoomRepair.html @@ -0,0 +1,67 @@ +
+
+
+
+
+
电话报修
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/public/pages/common/addRoomRepair/addRoomRepair.js b/public/pages/common/addRoomRepair/addRoomRepair.js new file mode 100644 index 000000000..1d9284d3c --- /dev/null +++ b/public/pages/common/addRoomRepair/addRoomRepair.js @@ -0,0 +1,174 @@ +(function (vc) { + vc.extends({ + data: { + addRoomRepairInfo: { + repairId: '', + repairType: '', + repairName: '', + tel: '', + appointmentTime: '', + context: '', + repairObjType: '004', + repairObjId: '', + repairObjName: '', + repairSettings: [] + } + }, + _initMethod: function () { + vc.component._initAddOwnerRepairInfo(); + $that._listRepairSettings(1, 50, 'F') + $that.addRoomRepairInfo.repairObjId = vc.getParam('roomId') + $that.addRoomRepairInfo.repairObjName = vc.getParam('roomName') + + + }, + _initEvent: function () { + + }, + methods: { + addOwnerRepairValidate() { + return vc.validate.validate({ + addRoomRepairInfo: vc.component.addRoomRepairInfo + }, { + 'addRoomRepairInfo.repairType': [ + { + limit: "required", + param: "", + errInfo: "报修类型不能为空" + }, + { + limit: "maxin", + param: "2,50", + errInfo: "报修类型错误" + }, + ], + 'addRoomRepairInfo.repairName': [ + { + limit: "required", + param: "", + errInfo: "报修人不能为空" + }, + { + limit: "maxin", + param: "2,50", + errInfo: "报修人名称必须在2至50字符之间" + }, + ], + 'addRoomRepairInfo.tel': [ + { + limit: "required", + param: "", + errInfo: "联系方式不能为空" + }, + { + limit: "phone", + param: "", + errInfo: "联系方式格式不正确" + }, + ], + 'addRoomRepairInfo.repairObjId': [ + { + limit: "required", + param: "", + errInfo: "报修对象不能为空" + } + ], + 'addRoomRepairInfo.appointmentTime': [ + { + limit: "required", + param: "", + errInfo: "预约时间不能为空" + }, + { + limit: "dateTime", + param: "", + errInfo: "预约时间格式错误" + }, + ], + 'addRoomRepairInfo.context': [ + { + limit: "required", + param: "", + errInfo: "报修内容不能为空" + }, + { + limit: "maxLength", + param: "2000", + errInfo: "报修内容不能超过2000" + }, + ], + }); + }, + saveOwnerRepairInfo: function () { + if (!vc.component.addOwnerRepairValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + vc.component.addRoomRepairInfo.communityId = vc.getCurrentCommunity().communityId; + + vc.http.post( + 'addOwnerRepair', + 'save', + JSON.stringify(vc.component.addRoomRepairInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + $that._goBack(); + return; + } + vc.toast(json.msg); + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.toast(errInfo); + + }); + }, + _initAddOwnerRepairInfo: function () { + vc.component.addRoomRepairInfo.appointmentTime = vc.dateTimeFormat(new Date().getTime()); + $('.addAppointmentTime').datetimepicker({ + language: 'zh-CN', + fontAwesome: 'fa', + format: 'yyyy-mm-dd hh:ii:ss', + initTime: true, + initialDate: new Date(), + autoClose: 1, + todayBtn: true + }); + $('.addAppointmentTime').datetimepicker() + .on('changeDate', function (ev) { + var value = $(".addAppointmentTime").val(); + vc.component.addRoomRepairInfo.appointmentTime = value; + }); + }, + _listRepairSettings: function (_page, _rows, _publicArea) { + var param = { + params: { + page: _page, + row: _rows, + communityId: vc.getCurrentCommunity().communityId, + publicArea: _publicArea + } + }; + //发送get请求 + vc.http.apiGet('repair.listRepairSettings', + param, + function (json, res) { + var _repairSettingManageInfo = JSON.parse(json); + vc.component.addRoomRepairInfo.repairSettings = _repairSettingManageInfo.data; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _goBack: function () { + vc.goBack(); + } + } + }); +})(window.vc); diff --git a/public/pages/property/simplifyAcceptance/simplifyAcceptance.js b/public/pages/property/simplifyAcceptance/simplifyAcceptance.js index dc413faa0..c315c2533 100644 --- a/public/pages/property/simplifyAcceptance/simplifyAcceptance.js +++ b/public/pages/property/simplifyAcceptance/simplifyAcceptance.js @@ -156,7 +156,8 @@ $that.simplifyAcceptanceInfo._currentTab = _tab; vc.emit(_tab, 'switch', { ownerId: $that.simplifyAcceptanceInfo.ownerId, - roomId: $that.simplifyAcceptanceInfo.roomId + roomId: $that.simplifyAcceptanceInfo.roomId, + roomName: $that.simplifyAcceptanceInfo.roomName, }) }, errorLoadImg: function () {