yaohaoDetail.jsp 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script type="text/javascript"><!--
  3. /**小区名称*/
  4. var communityNameFormatter_detail = function(value , row , index){
  5. return row.communityName ;
  6. };
  7. /**居住地点*/
  8. var addressFormatter_detail = function(value , row , index){
  9. return row.address ;
  10. };
  11. /**房号*/
  12. var houseNumberFormatter_detail = function(value , row , index){
  13. return row.houseNumber ;
  14. };
  15. /**面积*/
  16. var areaFormatter_detail = function(value , row , index){
  17. return row.area ;
  18. };
  19. /**人员名称*/
  20. var nameFormatter_detail = function(value , row , index){
  21. if(row.securityPerson!=null){
  22. return row.securityPerson.name ;
  23. }else{
  24. return "";
  25. }
  26. };
  27. /**身份证号*/
  28. var idCardFormatter_detail = function(value , row , index){
  29. if(row.securityPerson!=null){
  30. return row.securityPerson.idCard ;
  31. }else{
  32. return "";
  33. }
  34. };
  35. /**联系电话*/
  36. var phoneFormatter_detail = function(value , row , index){
  37. if(row.securityPerson!=null){
  38. return row.securityPerson.phone ;
  39. }else{
  40. return "";
  41. }
  42. };
  43. /**适用户型*/
  44. var roomTypeFormatter_detail = function(value , row , index){
  45. if(row.securityPerson.securityNum >=3){
  46. return "二居室";
  47. }else{
  48. return "一居室";
  49. }
  50. };
  51. /**意向小区*/
  52. var communityNameApplyFormatter_detail = function(value , row , index){
  53. return row.communityName ;
  54. };
  55. /**小区名称*/
  56. var yaohaoItem_communityNameFormatter_detail = function(value , row , index){
  57. if(row.house != null){
  58. return row.house.communityName ;
  59. }
  60. };
  61. /**居住地点*/
  62. var yaohaoItem_addressFormatter_detail = function(value , row , index){
  63. if(row.house != null){
  64. return row.house.address ;
  65. }
  66. };
  67. /**房号*/
  68. var yaohaoItem_houseNumberFormatter_detail = function(value , row , index){
  69. if(row.house != null){
  70. return row.house.houseNumber ;
  71. }
  72. };
  73. /**面积*/
  74. var yaohaoItem_areaFormatter_detail = function(value , row , index){
  75. if(row.house != null){
  76. return row.house.area ;
  77. }
  78. };
  79. /**人员名称*/
  80. var yaohaoItem_nameFormatter_detail = function(value , row , index){
  81. if(row.securityPerson != null){
  82. return row.securityPerson.name ;
  83. }
  84. };
  85. /**身份证号*/
  86. var yaohaoItem_idCardFormatter_detail = function(value , row , index){
  87. if(row.securityPerson != null){
  88. return row.securityPerson.idCard ;
  89. }
  90. };
  91. var detail_load = function(id){
  92. //加载摇号信息
  93. $.ajax({
  94. type: "post",//使用post方法访问后台
  95. dataType: "json",//返回json格式的数据
  96. url: "yaohaoAction_findById",//要访问的后台地址
  97. data:{"yaohao.id":id },
  98. success: function(msg){//msg为返回的数据,在这里做数据绑定
  99. if(msg.success){
  100. var rentPlanId = msg.obj.rentPlan.id;
  101. //加载配租方案
  102. $.ajax({
  103. type: "post",//使用post方法访问后台
  104. dataType: "json",//返回json格式的数据
  105. url: "rentPlanAction_findById",//要访问的后台地址
  106. data:{"rentPlan.id":rentPlanId },
  107. success: function(msg){//msg为返回的数据,在这里做数据绑定
  108. if(msg.success){
  109. $("#title_detail").text(msg.obj.title);
  110. $("#content_detail").text(msg.obj.content);
  111. $("#startDate_detail").text(msg.obj.startDate.substring(0,10));
  112. $("#endDate_detail").text(msg.obj.endDate.substring(0,10));
  113. }
  114. }
  115. });
  116. }
  117. }
  118. });
  119. $('#houseDataGrid_detail').datagrid({
  120. rownumbers:true,
  121. border:false,
  122. sortOrder:'desc',
  123. url:whzl.basePath + '/yaohaoAction_findHousesById?yaohao.id=' + id,
  124. checkOnSelect:true,
  125. selectOnCheck:false,
  126. loadFilter:function(result){
  127. if(result.success){
  128. return result.obj;
  129. }else{
  130. $.messager.alert("提示",result.message);
  131. return ;
  132. }
  133. }
  134. });
  135. $('#rentPlanApplyDataGrid_detail').datagrid({
  136. rownumbers:true,
  137. border:false,
  138. sortOrder:'desc',
  139. url:whzl.basePath + '/yaohaoAction_findSecurityPersonByIds?yaohao.id=' + id,
  140. checkOnSelect:true,
  141. selectOnCheck:false,
  142. loadFilter:function(result){
  143. if(result.success){
  144. return result.obj;
  145. }else{
  146. $.messager.alert("提示",result.message);
  147. return ;
  148. }
  149. }
  150. });
  151. $('#yaohaoItemDataGrid_detail').datagrid({
  152. rownumbers:true,
  153. border:false,
  154. sortOrder:'desc',
  155. url:whzl.basePath + '/yaohaoAction_listYaohaoItemByYaohaoId?yaohaoItem.yaohao.id=' + id,
  156. checkOnSelect:true,
  157. selectOnCheck:false,
  158. loadFilter:function(result){
  159. if(result.success){
  160. return result.obj;
  161. }else{
  162. $.messager.alert("提示",result.message);
  163. return ;
  164. }
  165. },
  166. onLoadSuccess : function(){
  167. var rows = $("#yaohaoItemDataGrid_detail").datagrid("getRows");
  168. if(rows.length==0){
  169. $("#yaohaoItemDataGrid_detail").remove()
  170. var $image = $("<div style='width: 100px;height: 40px;float:left;'>暂未摇号</div>")
  171. $("#yhjg_detail").append($image)
  172. }
  173. }
  174. });
  175. }
  176. --></script>
  177. <div class="easyui-tabs" id="tabs_detail">
  178. <div title="基本信息" id="jbxx_detail">
  179. <table class="mytable" style="width: 100%;">
  180. <tr>
  181. <th width="30%">配租方案标题</th>
  182. <td width="70%" colspan = "3">
  183. <span id="title_detail" />
  184. </td>
  185. </tr>
  186. <tr>
  187. <th width="30%" >配租方案开始时间</th>
  188. <td width="20%" >
  189. <span id="startDate_detail" />
  190. </td>
  191. <th width="30%" >配租方案结束时间</th>
  192. <td width="20%" >
  193. <span id="endDate_detail" />
  194. </td>
  195. </tr>
  196. <tr>
  197. <th>配租方案内容</th>
  198. <td colspan = "3" >
  199. <span id="content_detail" />
  200. </td>
  201. </tr>
  202. </table>
  203. </div>
  204. <div title="房源信息" id="fyxx_detail">
  205. <table id="houseDataGrid_detail" title="房源信息" >
  206. <thead>
  207. <tr>
  208. <th data-options="field:'communityName',width:150,formatter:communityNameFormatter_detail">小区名称</th>
  209. <th data-options="field:'address',width:200,formatter:addressFormatter_detail">地址</th>
  210. <th data-options="field:'houseNumber',width:40,formatter:houseNumberFormatter_detail">房号</th>
  211. <th data-options="field:'area',width:60,formatter:areaFormatter_detail">面积</th>
  212. </tr>
  213. </thead>
  214. </table>
  215. </div>
  216. <div title="人员信息" id="yxdj_detail">
  217. <table id="rentPlanApplyDataGrid_detail" title="人员信息">
  218. <thead>
  219. <tr>
  220. <th data-options="field:'name',align:'center',sortable:true,width:80,formatter:nameFormatter_detail">姓名</th>
  221. <th data-options="field:'idCard',align:'center',sortable:true,width:180,formatter:idCardFormatter_detail">身份证<br/>号码</th>
  222. <th data-options="field:'phone',align:'center',sortable:true,width:90,formatter:phoneFormatter_detail">联系<br/>电话</th>
  223. <th data-options="field:'roomType',align:'center',sortable:true,width:90,formatter:roomTypeFormatter_detail">适用户型</th><!--
  224. <th data-options="field:'communityName',align:'center',sortable:true,width:90,formatter:communityNameApplyFormatter_detail">意向小区</th>
  225. --></tr>
  226. </thead>
  227. </table>
  228. </div>
  229. <div title="摇号结果" id="yhjg_detail">
  230. <table id="yaohaoItemDataGrid_detail" title="摇号结果">
  231. <thead>
  232. <tr>
  233. <th data-options="field:'name',align:'center',sortable:true,width:80,formatter:yaohaoItem_nameFormatter_detail">姓名</th>
  234. <th data-options="field:'idCard',align:'center',sortable:true,width:180,formatter:yaohaoItem_idCardFormatter_detail">身份证<br/>号码</th>
  235. <th data-options="field:'communityName',width:100,formatter:yaohaoItem_communityNameFormatter_detail">小区名称</th>
  236. <th data-options="field:'address',width:200,formatter:yaohaoItem_addressFormatter_detail">地址</th>
  237. <th data-options="field:'houseNumber',width:40,formatter:yaohaoItem_houseNumberFormatter_detail">房号</th>
  238. <th data-options="field:'area',width:60,formatter:yaohaoItem_areaFormatter_detail">面积</th>
  239. </tr>
  240. </thead>
  241. </table>
  242. </div>
  243. </div>