houseDetail.jsp 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  3. <script type="text/javascript">
  4. /**详细*/
  5. var houseLogDetailFormatter = function(value , row , index){
  6. if(row.href != null){
  7. return "<img src='" + whzl.basePath + "/images/details.png' title='查看详情' onclick=houseLogDetails('" + row.title + "','" + row.href + "','" + row.classId + "') style='cursor:pointer' />";
  8. }else{
  9. return "";
  10. }
  11. };
  12. var houseLogDetails = function(title,href,objId){
  13. $('#detailDialog').dialog({
  14. title: title,
  15. width: 800,
  16. height: 400,
  17. closed: false,
  18. cache: false,
  19. iconCls : 'icon-details',
  20. href: href,
  21. modal: true,
  22. buttons : [
  23. {
  24. text : '关闭',
  25. iconCls : 'icon-cancel',
  26. handler : function(){
  27. $("#detailDialog").dialog("close");
  28. }
  29. }
  30. ],
  31. onLoad : function(){
  32. detail_load(objId);
  33. }
  34. });
  35. }
  36. function house_detail_load(id){
  37. $.ajax({
  38. type: "post",//使用get方法访问后台
  39. dataType: "json",//返回json格式的数据
  40. url: "houseAction_findById",//要访问的后台地址
  41. data: "house.id="+id,//要发送的数据
  42. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  43. success: function(msg){//msg为返回的数据,在这里做数据绑定
  44. $("#communityName_detail").text(msg.obj.communityName);
  45. $("#address_detail").text(msg.obj.address);
  46. $("#area_detail").text(msg.obj.area);
  47. $("#buildingName_detail").text(msg.obj.buildingName);
  48. $("#remark_detail").text(msg.obj.remark);
  49. for(var nItem = 0; nItem < roomTypeObj.length; nItem++ ){
  50. if(roomTypeObj[nItem].code == msg.obj.roomType){
  51. $("#roomType_detail").text(roomTypeObj[nItem].value);
  52. }
  53. }
  54. var type="";
  55. if(msg.obj.type=="1"){
  56. type="省厅任务";
  57. }else if(msg.obj.type=="2"){
  58. type="非省厅任务";
  59. }
  60. $("#type_detail").text(type)
  61. $("#deliveryDate_detail").text(dealDate(msg.obj.deliveryDate));
  62. $("#developerDeadline_detail").text(dealDate(msg.obj.developerDeadline));
  63. $("#garageArea_detail").text(msg.obj.garageArea);
  64. for(var nItem = 0; nItem < isExistHouseObj.length; nItem++){
  65. if(isExistHouseObj[nItem].code == msg.obj.isExistHouse){
  66. $("#isExistHouse_detail").text(isExistHouseObj[nItem].value);
  67. }
  68. }
  69. //水电气卡号
  70. $("#waterCardNum_detail").text(msg.obj.waterCardNum);
  71. $("#electricCardNum_detail").text(msg.obj.electricCardNum);
  72. $("#gasCardNum_detail").text(msg.obj.gasCardNum);
  73. //创建时间
  74. $("#createdOn_detail").text(msg.obj.createdOn);
  75. //创建人
  76. $("#createdBy_detail").text(msg.obj.createdUser.fullName);
  77. //修改时间
  78. $("#modifiedOn_detail").text(msg.obj.modifiedOn);
  79. //修改人
  80. if (typeof(msg.obj.modifiedUser) != "undefined") {
  81. $("#modifiedBy_detail").text(msg.obj.modifiedUser.fullName);
  82. }
  83. for(var i=0;i< msg.obj.deliveryFile.length;i++){
  84. var $file = $("<div style='display: inline-block;'><a style='padding-right:10px;' href=<%=basePath %>/"+msg.obj.deliveryFile[i].filePath+" download="+msg.obj.deliveryFile[i].fileName+">"+msg.obj.deliveryFile[i].fileName+"</a><div>");
  85. $("#deliveryFile_detail_file").append ($file);
  86. }
  87. for(var i=0;i< msg.obj.recordFile.length;i++){
  88. var $file = $("<div style='display: inline-block;'><a style='padding-right:10px;' href=<%=basePath %>/"+msg.obj.recordFile[i].filePath+" download="+msg.obj.recordFile[i].fileName+">"+msg.obj.recordFile[i].fileName+"</a><div>");
  89. $("#recordFile_detail_file").append ($file);
  90. }
  91. for(var i=0;i< msg.obj.purchaseFile.length;i++){
  92. var $file = $("<div style='display: inline-block;'><a style='padding-right:10px;' href=<%=basePath %>/"+msg.obj.purchaseFile[i].filePath+" download="+msg.obj.purchaseFile[i].fileName+">"+msg.obj.purchaseFile[i].fileName+"</a><div>");
  93. $("#purchaseFile_detail_file").append ($file);
  94. }
  95. }
  96. });
  97. $('#houseLog_list').datagrid({
  98. rownumbers:true,
  99. pageSize:10,
  100. pageList : [ 10, 20, 30, 40, 50 ],
  101. fitColumns:false,
  102. border:false,
  103. sortOrder:'desc',
  104. pagination:true,
  105. url:whzl.basePath + '/houseAction_listHouseLog?houseId='+id,
  106. checkOnSelect:true,
  107. selectOnCheck:false,
  108. nowrap:true,
  109. loadFilter:function(result){
  110. if(result.success){
  111. return result.obj;
  112. }else{
  113. $.messager.alert("提示",result.message);
  114. return ;
  115. }
  116. }
  117. });
  118. $.ajax({
  119. type: "post",//使用get方法访问后台
  120. dataType: "json",//返回json格式的数据
  121. url: "houseAction_workRecord",//要访问的后台地址
  122. data: "house.id="+id,//要发送的数据
  123. complete :function(){$("#load").hide();}
  124. })
  125. }
  126. </script>
  127. <div class="easyui-tabs" id="tabs_detail">
  128. <div title="房屋信息" id="jbxx_detail">
  129. <table class="mytable" style="width: 100%;">
  130. <tr>
  131. <th style="width:20%;">小区名称</th>
  132. <td width="30%"><span id="communityName_detail"></span></td>
  133. <th style="width:20%;">大楼名称</th>
  134. <td width="30%"><span id="buildingName_detail"></span></td>
  135. </tr>
  136. <tr>
  137. <th>居住地点</th>
  138. <td><span id="address_detail"></span></td>
  139. <th>面积</th>
  140. <td><span id="area_detail"></span></td>
  141. </tr>
  142. <tr>
  143. <th>户型</th>
  144. <td><span id="roomType_detail"></span></td>
  145. <th>交房时间</th>
  146. <td><span id="deliveryDate_detail"></span></td>
  147. </tr>
  148. <tr>
  149. <th>是否省厅任务</th>
  150. <td colspan="3"><span id="type_detail"></span></td>
  151. </tr>
  152. <tr>
  153. <th>水卡卡号</th>
  154. <td><span id="waterCardNum_detail"></span></td>
  155. <th>电卡卡号</th>
  156. <td><span id="electricCardNum_detail"></span></td>
  157. </tr>
  158. <tr>
  159. <th>天然气卡卡号</th>
  160. <td><span id="gasCardNum_detail"></span></td>
  161. </tr>
  162. <tr>
  163. <th>开发商维修截止日期</th>
  164. <td><span id="developerDeadline_detail"></span></td>
  165. </tr>
  166. <tr>
  167. <th>车库面积</th>
  168. <td><span id="garageArea_detail"></span></td>
  169. <th>是否现房</th>
  170. <td><span id="isExistHouse_detail"></span></td>
  171. </tr>
  172. <tr>
  173. <th>备注</th>
  174. <td colspan="3"><span id="remark_detail"></span></td>
  175. </tr>
  176. <tr>
  177. <th>创建时间</th>
  178. <td><span id="createdOn_detail"></span></td>
  179. <th>创建人</th>
  180. <td><span id="createdBy_detail"></span></td>
  181. </tr>
  182. <tr id="modifiedOn_tr" style="display: none;">
  183. <th>修改时间</th>
  184. <td><span id="modifiedOn_detail"></span></td>
  185. <th>修改人</th>
  186. <td><span id="modifiedBy_detail"></span></td>
  187. </tr>
  188. </table>
  189. </div>
  190. <div title="合同文件上传" id="htwj_update">
  191. <table class="mytable" style="width: 100%;">
  192. <tr>
  193. <th width="20%">交房通知单</th>
  194. <td width="80%">
  195. <span id="deliveryFile_detail_file">
  196. </span>
  197. </td>
  198. </tr>
  199. <tr>
  200. <th width="20%">交付备案证明</th>
  201. <td width="80%">
  202. <span id="recordFile_detail_file">
  203. </span>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th width="20%">采购合同</th>
  208. <td width="80%">
  209. <span id="purchaseFile_detail_file">
  210. </span>
  211. </td>
  212. </tr>
  213. </table>
  214. </div>
  215. <div title="房屋历史记录" id="fwls_detail">
  216. <table id="houseLog_list" title="房屋历史记录" >
  217. <thead>
  218. <tr>
  219. <th data-options="field:'remark',sortable:true,width:300,align:'center'">内容</th>
  220. <th data-options="field:'date',sortable:true,width:160,align:'center'">时间</th>
  221. <th data-options="field:'houseLogDetail',sortable:true,width:70,align:'center',formatter:houseLogDetailFormatter">历史记录</th>
  222. </tr>
  223. </thead>
  224. </table>
  225. </div>
  226. </div>