yaohaoList.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  2. <jsp:include page="../../common/include.jsp" />
  3. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  4. <script type="text/javascript"><!--
  5. /**用户显示区*/
  6. $(function() {
  7. $('#yaohaoDataGrid').datagrid({
  8. rownumbers:true,
  9. fit:true,
  10. pageSize:20,
  11. pageList : [ 10, 20, 30, 40, 50 ],
  12. fitColumns:false,
  13. border:false,
  14. sortOrder:'desc',
  15. pagination:true,
  16. idField:'id',
  17. url:whzl.basePath + '/yaohaoAction_listYaohao',
  18. toolbar:'#searchtool',
  19. checkOnSelect:true,
  20. selectOnCheck:false,
  21. nowrap:true,
  22. loadFilter:function(result){
  23. if(result.success){
  24. return result.obj;
  25. }else{
  26. $.messager.alert("提示",result.message);
  27. return ;
  28. }
  29. }
  30. });
  31. });
  32. /**查询*/
  33. function searchFun(){
  34. $("#yaohaoDataGrid").datagrid("load", {
  35. "yaohao.title":$("#tblQuery").find("input[id='title']").val()
  36. });
  37. }
  38. /*清除查询条件**/
  39. function ClearQuery() {
  40. $("#tblQuery").find("input").val("");
  41. $("#tblQuery").find("select").val("-1");
  42. }
  43. var dateFormatter = function(value,row,index){
  44. if(value != null){
  45. return value.substring(0,10);
  46. }else{
  47. return "";
  48. }
  49. }
  50. /**详细*/
  51. var detailsFormatter = function(value , row , index){
  52. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=yaohaoDetails('" + row.id + "','" + row.rentPlan.id + "') style='cursor:pointer' />";
  53. };
  54. /**详细页面对话框*/
  55. var yaohaoDetails = function(id){
  56. $("#detailYaohaoDialog").dialog(
  57. {
  58. buttons : [
  59. {
  60. text : '确定',
  61. iconCls : 'icon-ok',
  62. handler : function(){
  63. $("#detailYaohaoDialog").dialog("close");
  64. }
  65. }
  66. ],
  67. onLoad : function(){
  68. detail_load(id);
  69. }
  70. }
  71. );
  72. };
  73. /**修改*/
  74. var updateFormatter = function(value , row , index){
  75. return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow(" + row.id + ") style='cursor:pointer' />";
  76. };
  77. /**更新事件*/
  78. function updateRow(id){
  79. yaohaoUpdate(id,0);
  80. }
  81. /**修改摇号信息*/
  82. function yaohaoUpdate(id,page){
  83. $('#updateYaohaoDialog').dialog(
  84. {
  85. buttons : [
  86. {
  87. text : '上一步',
  88. iconCls : 'icon-undo',
  89. handler : function(){
  90. if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 0){
  91. $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) - 1);
  92. }
  93. }
  94. },
  95. {
  96. text : '下一步',
  97. iconCls : 'icon-redo',
  98. handler : function(){
  99. if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 2){
  100. $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) + 1);
  101. }else{
  102. update_submit(id);
  103. }
  104. }
  105. },
  106. {
  107. text : '取消',
  108. iconCls : 'icon-cancel',
  109. handler : function(){
  110. $("#updateYaohaoDialog").dialog("close");
  111. }
  112. }
  113. ],
  114. onLoad : function(){
  115. update_load(id,page);
  116. }
  117. }
  118. );
  119. }
  120. /**摇号*/
  121. var yaohaoFormatter = function(value , row , index){
  122. return "<a title='开始摇号' href='yaohaoAction_yaohao?yaohao.id=" + row.id + "' target='_blank' style='cursor:pointer'> <img src='<%=basePath%>/images/pencil.png'/> </a>";
  123. };
  124. /**增加摇号*/
  125. function yaohaoAdd(){
  126. $('#addYaohaoDialog').dialog(
  127. {
  128. buttons : [
  129. {
  130. text : '下一步',
  131. iconCls : 'icon-redo',
  132. handler : function(){
  133. add_submit();
  134. }
  135. },
  136. {
  137. text : '取消',
  138. iconCls : 'icon-cancel',
  139. handler : function(){
  140. $("#addYaohaoDialog").dialog("close");
  141. }
  142. }
  143. ],
  144. onLoad : function(){
  145. add_load();
  146. }
  147. }
  148. );
  149. }
  150. /**小区名称*/
  151. var communityNameFormatter = function(value , row , index){
  152. return row.communityName ;
  153. };
  154. /**居住地点*/
  155. var addressFormatter = function(value , row , index){
  156. return row.address ;
  157. };
  158. /**房号*/
  159. var houseNumberFormatter = function(value , row , index){
  160. return row.houseNumber ;
  161. };
  162. /**面积*/
  163. var areaFormatter = function(value , row , index){
  164. return row.area ;
  165. };
  166. /**人员名称*/
  167. var nameFormatter = function(value , row , index){
  168. return row.securityPerson.name ;
  169. };
  170. /**身份证号*/
  171. var idCardFormatter = function(value , row , index){
  172. return row.securityPerson.idCard ;
  173. };
  174. /**联系电话*/
  175. var phoneFormatter = function(value , row , index){
  176. return row.securityPerson.phone ;
  177. };
  178. /**适用户型*/
  179. var roomTypeFormatter = function(value , row , index){
  180. if(row.securityPerson.securityNum >=3){
  181. return "二居室";
  182. }else{
  183. return "一居室";
  184. }
  185. };
  186. /**意向小区*/
  187. var communityNameApplyFormatter = function(value , row , index){
  188. return row.communityName ;
  189. };
  190. /**小区名称*/
  191. var yaohaoItem_communityNameFormatter = function(value , row , index){
  192. if(row.house != null){
  193. return row.house.communityName ;
  194. }
  195. };
  196. /**居住地点*/
  197. var yaohaoItem_addressFormatter = function(value , row , index){
  198. if(row.house != null){
  199. return row.house.address ;
  200. }
  201. };
  202. /**房号*/
  203. var yaohaoItem_houseNumberFormatter = function(value , row , index){
  204. if(row.house != null){
  205. return row.house.houseNumber ;
  206. }
  207. };
  208. /**面积*/
  209. var yaohaoItem_areaFormatter = function(value , row , index){
  210. if(row.house != null){
  211. return row.house.area ;
  212. }
  213. };
  214. /**人员名称*/
  215. var yaohaoItem_nameFormatter = function(value , row , index){
  216. if(row.securityPerson != null){
  217. return row.securityPerson.name ;
  218. }
  219. };
  220. /**身份证号*/
  221. var yaohaoItem_idCardFormatter = function(value , row , index){
  222. if(row.securityPerson != null){
  223. return row.securityPerson.idCard ;
  224. }
  225. };
  226. --></script>
  227. <div class="easyui-layout" data-options="fit:true,border:false">
  228. <div data-options="region:'center',border:false">
  229. <div id="searchtool" data-options="region:'north' , border:false">
  230. <div class="clear"></div>
  231. <table id="tblQuery" style="width:100%;">
  232. <tr>
  233. <td align="right" style="width: 70px;"><span>摇号标题</span></td><td style="width: 120px;"><input id="title" name="yaohao.title" type="text" style="width: 100px;"/></td>
  234. <td align="left" style="width: 200px;">
  235. <a href="javascript:yaohaoAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">新增</a>
  236. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  237. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  238. </td>
  239. </tr>
  240. </table>
  241. <div class="clear"></div>
  242. </div>
  243. <table id="yaohaoDataGrid">
  244. <thead>
  245. <tr>
  246. <th data-options="field:'title',sortable:true,width:255">标题</th>
  247. <th data-options="field:'date',sortable:true,width:150,formatter:dateFormatter">摇号日期</th>
  248. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
  249. <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">修改</th>
  250. <th data-options="field:'yaohao',align:'center',width:60,formatter:yaohaoFormatter">开始摇号</th>
  251. </tr>
  252. </thead>
  253. </table>
  254. </div>
  255. </div>
  256. <div id="detailYaohaoDialog" data-options="title:'&nbsp;摇号详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toDetail'">
  257. </div>
  258. <div id="addYaohaoDialog" data-options="title:'&nbsp;添加摇号',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toAdd'">
  259. </div>
  260. <div id="updateYaohaoDialog" data-options="title:'&nbsp;摇号信息',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toUpdate'">
  261. </div>
  262. <div id="addSecurityPersonDialog" data-options="title:'&nbsp;待选人员列表',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toSecurityPersonList'">
  263. </div>
  264. <div id="addHouseDialog" data-options="title:'&nbsp;待选房源列表',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/rentPlanAction_toHouseSelectList'">
  265. </div>
  266. <script type="text/javascript">
  267. <!--
  268. parent.$.messager.progress('close');
  269. //-->
  270. </script>