yaohaoItemSelectList.jsp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script>
  3. //摇号结果状态
  4. var yaohaoItemStateObj = null;
  5. var yaohaoItemState_array = null;
  6. /**小区名称*/
  7. var yaohaoItem_communityNameFormatter = function(value , row , index){
  8. if(row.house !=null){
  9. return row.house.communityName ;
  10. }else{
  11. return "";
  12. }
  13. };
  14. /**居住地点*/
  15. var yaohaoItem_addressFormatter = function(value , row , index){
  16. if(row.house !=null){
  17. return row.house.address ;
  18. }else{
  19. return "";
  20. }
  21. };
  22. /**房号*/
  23. var yaohaoItem_houseNumberFormatter = function(value , row , index){
  24. if(row.house !=null){
  25. return row.house.houseNumber ;
  26. }else{
  27. return "";
  28. }
  29. };
  30. /**面积*/
  31. var yaohaoItem_areaFormatter = function(value , row , index){
  32. if(row.house !=null){
  33. return row.house.area ;
  34. }else{
  35. return "";
  36. }
  37. };
  38. /**人员名称*/
  39. var yaohaoItem_nameFormatter = function(value , row , index){
  40. if(row.securityPerson !=null){
  41. return row.securityPerson.name ;
  42. }else{
  43. return "";
  44. }
  45. };
  46. /**身份证号*/
  47. var yaohaoItem_idCardFormatter = function(value , row , index){
  48. if(row.securityPerson !=null){
  49. return row.securityPerson.idCard ;
  50. }else{
  51. return "";
  52. }
  53. };
  54. var select_load = function(){
  55. //摇号结果状态
  56. $.ajax({
  57. type: "post",//使用post方法访问后台
  58. dataType: "json",//返回json格式的数据
  59. url: "aa10Action_listAa10All",//要访问的后台地址
  60. data:{"aa10.letter":"yaohaoItemState" ,"aa10.name":"摇号结果状态" },
  61. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  62. success: function(msg){//msg为返回的数据,在这里做数据绑定
  63. if(msg.success){
  64. yaohaoItemStateObj = msg.obj.rows;
  65. var select_arr = [];
  66. var data = yaohaoItemStateObj;
  67. for(var nItem = 0; nItem < data.length; nItem++ ){
  68. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  69. }
  70. yaohaoItemState_array = select_arr.join("");
  71. $("#yaohaoItemState_selectList").append(yaohaoItemState_array);
  72. }
  73. }
  74. });
  75. $('#yaohaoItemSelectDataGrid').datagrid({
  76. rownumbers:true,
  77. fit:true,
  78. fitColumns:false,
  79. border:false,
  80. sortOrder:'desc',
  81. toolbar:'#searchtoolHouse',
  82. url:whzl.basePath + '/yaohaoAction_listYaohaoItemByYaohaoId',
  83. checkOnSelect:true,
  84. selectOnCheck:true,
  85. singleSelect:true,
  86. nowrap:true,
  87. rowStyler:function(index,row){
  88. if(row.yaohaoItemState == 2){
  89. return 'background-color:green;';
  90. }
  91. },
  92. loadFilter:function(result){
  93. if(result.success){
  94. return result.obj;
  95. }else{
  96. return ;
  97. }
  98. }
  99. });
  100. }
  101. /**查询*/
  102. function yaohaoItemSearchFun(){
  103. var params = encodeURI("yaohaoItem.house.address="+trim($('#houseAddress_selectList').val())+
  104. "&yaohaoItem.securityPerson.name="+trim($('#securityPersonName_selectList').val()) +
  105. "&yaohaoItem.securityPerson.idCard="+trim($('#securityPersonIdCard_selectList').val()) +
  106. "&yaohaoItem.yaohaoItemState="+$('#yaohaoItemState_selectList').val()
  107. );
  108. $('#yaohaoItemSelectDataGrid').datagrid({url:whzl.basePath + '/yaohaoAction_listYaohaoItemByYaohaoId?a=1&'+params});
  109. }
  110. /*清除查询条件**/
  111. function yaohaoItemClearQuery() {
  112. $("#tblQuery1").find("input").val("");
  113. $("#tblQuery1").find("select").val("-1");
  114. }
  115. var select_submit = function(){
  116. var selectedItems = $('#yaohaoItemSelectDataGrid').datagrid('getSelections');
  117. var ids = [];
  118. $.each(selectedItems,function(index,item){
  119. ids.push(item.id);
  120. })
  121. if(ids.length==0){
  122. $.messager.alert("警告","请选择至少一条记录!");
  123. return;
  124. }
  125. var idsStr = ids.join(",");
  126. return idsStr;
  127. }
  128. </script>
  129. <div class="easyui-layout" data-options="fit:true,border:false">
  130. <div data-options="region:'center',border:false">
  131. <div id="searchtoolHouse" data-options="region:'north',border:false">
  132. <div class="clear"></div>
  133. <table id="tblQuery1" style="width:100%;">
  134. <tr>
  135. <td align="right" style="width: 70px;">
  136. <span>租房人名称</span>
  137. </td>
  138. <td style="width: 120px;">
  139. <input id="securityPersonName_selectList" type="text" style="width: 100px;"/>
  140. </td>
  141. <td align="right" style="width: 70px;">
  142. <span>租房人身份证号码</span>
  143. </td>
  144. <td style="width: 120px;">
  145. <input id="securityPersonIdCard_selectList" type="text" style="width: 100px;"/>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td align="right" style="width: 70px;">
  150. <span>租房地址</span>
  151. </td>
  152. <td style="width: 120px;">
  153. <input id="houseAddress_selectList" type="text" style="width: 100px;"/>
  154. </td>
  155. <td align="right" style="width: 70px;">
  156. <span>申请状态</span>
  157. </td>
  158. <td style="width: 120px;">
  159. <select id="yaohaoItemState_selectList" style="width:100px" onchange="yaohaoItemSearchFun();" >
  160. <option value="">全部</option>
  161. </select>
  162. </td>
  163. </tr>
  164. <tr>
  165. <td align="right" style="width: 70px;">
  166. </td>
  167. <td style="width: 120px;">
  168. <span >新建人员</span>
  169. <span style="background-color:green;">续租人员</span>
  170. </td>
  171. <td colspan="2">
  172. <a href="javascript:yaohaoItemSearchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  173. <a href="javascript:yaohaoItemClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  174. </td>
  175. </tr>
  176. </table>
  177. <div class="clear"></div>
  178. </div>
  179. <table id="yaohaoItemSelectDataGrid" >
  180. <thead frozen="true">
  181. <tr><th data-options="field:'id',checkbox:true,width:30">ID</th>
  182. </tr>
  183. </thead>
  184. <thead>
  185. <tr>
  186. <th data-options="field:'name',align:'center',sortable:true,width:80,formatter:yaohaoItem_nameFormatter">姓名</th>
  187. <th data-options="field:'idCard',align:'center',sortable:true,width:180,formatter:yaohaoItem_idCardFormatter">身份证<br/>号码</th>
  188. <th data-options="field:'communityName',width:100,formatter:yaohaoItem_communityNameFormatter">小区名称</th>
  189. <th data-options="field:'address',width:200,formatter:yaohaoItem_addressFormatter">居住地点</th>
  190. <th data-options="field:'houseNumber',width:40,formatter:yaohaoItem_houseNumberFormatter">房号</th>
  191. <th data-options="field:'area',width:60,formatter:yaohaoItem_areaFormatter">面积</th>
  192. </tr>
  193. </thead>
  194. </table>
  195. </div>
  196. </div>