diff --git a/app.js b/app.js index cf911fe7b..de97f63d2 100644 --- a/app.js +++ b/app.js @@ -36,12 +36,12 @@ let 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://192.168.1.16:8012',opts)); -//app.use('/app',proxy('http://192.168.1.16:8012',opts)); +app.use('/callComponent',proxy('http://192.168.1.16:8012',opts)); +app.use('/app',proxy('http://192.168.1.16:8012',opts)); //app.listen(3000); app.use(express.json()); diff --git a/public/components/admin/confirmRenting/confirmRenting.html b/public/components/admin/confirmRenting/confirmRenting.html new file mode 100644 index 000000000..310e6d013 --- /dev/null +++ b/public/components/admin/confirmRenting/confirmRenting.html @@ -0,0 +1,54 @@ + \ No newline at end of file diff --git a/public/components/admin/confirmRenting/confirmRenting.js b/public/components/admin/confirmRenting/confirmRenting.js new file mode 100644 index 000000000..35f9c98fc --- /dev/null +++ b/public/components/admin/confirmRenting/confirmRenting.js @@ -0,0 +1,124 @@ +(function (vc, vm) { + + vc.extends({ + data: { + confirmRentingInfo: { + msg: '', + appointmentId: '', + tenantName: '', + communityId: '', + communitys: [], + rentingPools: [], + rentingId: '' + } + }, + _initMethod: function () { + $that._loadCommunitys(); + }, + _initEvent: function () { + vc.on('confirmRenting', 'openConfirmRentingModal', function (_params) { + + //vc.component.confirmRentingInfo = _params; + vc.copyObject(_params, $that.confirmRentingInfo); + $('#confirmRentingModel').modal('show'); + + }); + }, + methods: { + confirmRenting: function () { + + let data = { + appointmentId: $that.confirmRentingInfo.appointmentId, + rentingId: $that.confirmRentingInfo.rentingId + }; + + + vc.http.apiPost( + '/rentingAppointment/confirmRenting', + JSON.stringify(data), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#confirmRentingModel').modal('hide'); + $that._clearRentingAppointment(); + vc.emit('rentingAppointmentManage', 'listRentingAppointment', {}); + return; + } + vc.message(_json.msg); + }, + function (errInfo, error) { + console.log('请求失败处理'); + vc.message(json); + + }); + }, + closeConfirmRentingModel: function () { + $('#confirmRentingModel').modal('hide'); + }, + _clearRentingAppointment: function () { + let _communitys = $that.confirmRentingInfo.communitys; + $that.confirmRentingInfo = { + msg: '', + appointmentId: '', + tenantName: '', + communityId: '', + communitys: _communitys, + rentingPools: [], + rentingId: '' + } + }, + _loadCommunitys: function () { + let param = { + params: { + _uId: 'ccdd00opikookjuhyyttvhnnjuuu', + page: 1, + row: 50 + } + }; + vc.http.get('initData', + 'getCommunitys', + param, + function (json, res) { + if (res.status == 200) { + let _communityInfos = JSON.parse(json).communitys; + $that.confirmRentingInfo.communitys = _communityInfos; + } + }, function () { + console.log('请求失败处理'); + vc.jumpToPage(_param.url); + } + ); + }, + _changeCommunity: function () { + $that._listRentingPoolsByConfirmRenting(); + }, + _listRentingPoolsByConfirmRenting: function (_page, _rows) { + var param = { + params: { + page: 1, + row: 100, + communityId: $that.confirmRentingInfo.communityId, + state: '1,2,3,4,5' + } + }; + + //发送get请求 + vc.http.apiGet('/renting/queryRentingPool', + param, + function (json, res) { + var _rentingPoolManageInfo = JSON.parse(json); + vc.component.confirmRentingInfo.rentingPools = _rentingPoolManageInfo.data; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + } + }); + +})(window.vc, window.vc.component); diff --git a/public/components/admin/deleteRentingAppointment/deleteRentingAppointment.html b/public/components/admin/deleteRentingAppointment/deleteRentingAppointment.html index eb1e4b5a6..a47452a19 100644 --- a/public/components/admin/deleteRentingAppointment/deleteRentingAppointment.html +++ b/public/components/admin/deleteRentingAppointment/deleteRentingAppointment.html @@ -1,19 +1,36 @@ -
- +
@@ -65,6 +68,7 @@ 租客电话 预约时间 预约房屋 + 状态 备注 操作 @@ -76,15 +80,20 @@ {{rentingAppointment.tenantTel}} {{rentingAppointment.appointmentTime}} {{rentingAppointment.appointmentRoomId}} + {{rentingAppointment.stateName}} {{rentingAppointment.remark}} +
+ +
-
+
+ v-on:click="_openDeleteRentingAppointmentModel(rentingAppointment)">放弃
@@ -110,5 +119,6 @@ +
\ No newline at end of file diff --git a/public/pages/admin/rentingAppointmentManage/rentingAppointmentManage.js b/public/pages/admin/rentingAppointmentManage/rentingAppointmentManage.js index 8b6df8c79..33a057cdd 100644 --- a/public/pages/admin/rentingAppointmentManage/rentingAppointmentManage.js +++ b/public/pages/admin/rentingAppointmentManage/rentingAppointmentManage.js @@ -15,8 +15,7 @@ conditions: { tenantName: '', tenantTel: '', - appointmentRoomId: '', - + state: '1001', } } }, @@ -77,6 +76,10 @@ } else { vc.component.rentingAppointmentManageInfo.moreCondition = true; } + }, + _openRentingModel:function(_rentingAppointment){ + //确认租房 + vc.emit('confirmRenting', 'openConfirmRentingModal',_rentingAppointment); }