浏览代码

优化报修页面

wuxw 6 年之前
父节点
当前提交
482ac9ddd4

+ 39 - 0
WebService/src/main/java/com/java110/web/components/ownerRepair/OwnerRepairDetailComponent.java

@@ -0,0 +1,39 @@
+package com.java110.web.components.ownerRepair;
+
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.IRoomServiceSMO;
+import com.java110.web.smo.ownerRepair.IListOwnerRepairsSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * 业主报修组件管理类
+ *
+ * add by wuxw
+ *
+ * 2019-06-29
+ */
+@Component("ownerRepairDetail")
+public class OwnerRepairDetailComponent {
+
+
+    @Autowired
+    private IRoomServiceSMO roomServiceSMOImpl;
+
+
+    public ResponseEntity<String> getRoom(IPageData pd){
+
+        return roomServiceSMOImpl.listRoom(pd);
+    }
+
+    public IRoomServiceSMO getRoomServiceSMOImpl() {
+        return roomServiceSMOImpl;
+    }
+
+    public void setRoomServiceSMOImpl(IRoomServiceSMO roomServiceSMOImpl) {
+        this.roomServiceSMOImpl = roomServiceSMOImpl;
+    }
+}

+ 9 - 3
WebService/src/main/resources/components/ownerRepairPackage/myRepairDispatch-manage/myRepairDispatchManage.html

@@ -79,7 +79,7 @@
                             <th class="text-center">联系方式</th>
                             <th class="text-center">预约时间</th>
                             <th class="text-center">状态</th>
-                            <th class="text-center">操作</th>
+                            <th class="text-right">操作</th>
                         </tr>
                         </thead>
                         <tbody>
@@ -90,13 +90,18 @@
                             <td class="text-center">{{ownerRepair.tel}}</td>
                             <td class="text-center">{{ownerRepair.appointmentTime}}</td>
                             <td class="text-center">{{ownerRepair.repairDispatchStateName}}</td>
-                            <td class="text-center">
+                            <td class="text-right">
                                 <div class="btn-group">
                                     <button class="btn-white btn btn-xs"
                                             v-bind:disabled="ownerRepair.repairDispatchState == '10002' || ownerRepair.repairDispatchState == '10003'"
                                             v-on:click="_openDealRepair(ownerRepair)">办理
                                     </button>
                                 </div>
+                                <div class="btn-group">
+                                    <button class="btn-white btn btn-xs"
+                                            v-on:click="_openDispatchRepairDetail(ownerRepair)">详情
+                                    </button>
+                                </div>
                             </td>
 
                         </tr>
@@ -120,8 +125,9 @@
                callBackListener="myRepairDispatch"
                callBackFunction="notifyData"
     >
-
     </vc:create>
 
+    <vc:create name="ownerRepairDetail"></vc:create>
+
 
 </div>

+ 3 - 0
WebService/src/main/resources/components/ownerRepairPackage/myRepairDispatch-manage/myRepairDispatchManage.js

@@ -117,6 +117,9 @@
                     });
 
             },
+            _openDispatchRepairDetail:function(_ownerRepair){
+                vc.emit('ownerRepairDetail','openOwnerRepairDetailModal',_ownerRepair);
+            },
             _queryMyRepairDispatchMethod:function(){
                 vc.component._listOwnerRepairs(DEFAULT_PAGE, DEFAULT_ROWS);
             }

+ 7 - 0
WebService/src/main/resources/components/ownerRepairPackage/ownerRepairDetail/ownerRepairDetail.html

@@ -56,6 +56,13 @@
                                            readonly class="form-control ">
                                 </div>
                             </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">状态</label>
+                                <div class="col-sm-10">
+                                    <input v-model="ownerRepairDetailInfo.stateName" type="text"
+                                           readonly class="form-control ">
+                                </div>
+                            </div>
                             <div class="form-group row">
                                 <label class="col-sm-2 col-form-label">报修内容</label>
                                 <div class="col-sm-10">

+ 41 - 0
WebService/src/main/resources/components/ownerRepairPackage/ownerRepairDetail/ownerRepairDetail.js

@@ -5,12 +5,15 @@
             ownerRepairDetailInfo:{
                 repairId:'',
                 repairType:'',
+                repairTypeName:'',
                 repairName:'',
                 tel:'',
                 roomId:'',
                 roomName:'',
                 appointmentTime:'',
                 context:'',
+                stateName:'',
+                roomId:''
 
             }
         },
@@ -21,6 +24,7 @@
             vc.on('ownerRepairDetail','openOwnerRepairDetailModal',function(_ownerInfo){
                 vc.component.clearOwnerRepairDetailInfo();
                 vc.copyObject(_ownerInfo,vc.component.ownerRepairDetailInfo);
+                vc.component._getRoom();
                 $('#ownerRepairDetailModel').modal('show');
             });
         },
@@ -29,13 +33,50 @@
                 vc.component.ownerRepairDetailInfo = {
                         repairId:'',
                         repairType:'',
+                        repairTypeName:'',
                         repairName:'',
                         tel:'',
                         roomId:'',
                         roomName:'',
                         appointmentTime:'',
                         context:'',
+                        stateName:'',
+                        roomId:''
                     };
+            },
+            _getRoom:function(){
+                var param={
+                    params:{
+                        roomId:vc.component.ownerRepairDetailInfo.roomId,
+                        communityId:vc.getCurrentCommunity().communityId,
+                        page:1,
+                        row:1
+                    }
+                };
+                //查询房屋信息 业主信息
+               vc.http.get('ownerRepairManage',
+                            'getRoom',
+                             param,
+                             function(json,res){
+                                if(res.status == 200){
+                                    var _roomInfos=JSON.parse(json);
+                                    if(!_roomInfos.hasOwnProperty("rooms")){
+                                         vc.toast("非法操作,未找到房屋信息");
+                                         //vc.jumpToPage('/flow/ownerFlow');
+                                         return ;
+                                    }
+                                    var _roomInfo = _roomInfos.rooms[0];
+                                    vc.component.ownerRepairManageInfo.roomName= _roomInfo.floorNum+"号楼 "+_roomInfo.unitNum+"单元 "+_roomInfo.roomNum + "室";
+                                }else{
+                                     vc.message("非法操作,未找到房屋信息");
+                                     vc.jumpToPage('/flow/ownerFlow');
+                                }
+                             },function(errInfo,error){
+                                console.log('请求失败处理');
+                                vc.message("非法操作,未找到房屋信息");
+                                vc.jumpToPage('/flow/ownerFlow');
+                             }
+                 );
             }
         }
     });