yaohaoItemList_search.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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. var personTypeObj = null;
  7. var personType_array = null;
  8. /**用户显示区*/
  9. $(function() {
  10. //人员类别
  11. $.ajax({
  12. type: "post",//使用post方法访问后台
  13. dataType: "json",//返回json格式的数据
  14. url: "aa10Action_listAa10All",//要访问的后台地址
  15. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  16. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  17. success: function(msg){//msg为返回的数据,在这里做数据绑定
  18. if(msg.success){
  19. personTypeObj = msg.obj.rows;
  20. var select_arr = [];
  21. var data = personTypeObj;
  22. for(var nItem = 0; nItem < data.length; nItem++ ){
  23. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  24. }
  25. personType_array = select_arr.join("");
  26. $("#personType").append(personType_array);
  27. }
  28. }
  29. });
  30. $.ajax({
  31. type: "post",
  32. dataType: "json",
  33. url: "columnSetAction_listColumn?tname=yaohaoItemSearch",
  34. complete :function(){$("#load").hide();},
  35. success: function(msg){
  36. if(msg.success){
  37. setId();
  38. var data = msg.obj;
  39. for(var i = 0;i<data.length;i++){
  40. if("1"==data[i].type){
  41. if(typeof(data[i].formatter)!="undefined"){
  42. data[i].formatter=eval(data[i].formatter);
  43. }
  44. user_columns.push(data[i]);
  45. }else{
  46. user_frozenColumns.push(data[i]);
  47. }
  48. }
  49. columns.push(user_columns);
  50. frozenColumns.push(user_frozenColumns);
  51. $('#yaohaoItemDataGrid').datagrid({
  52. rownumbers:true,
  53. fit:true,
  54. pageSize:20,
  55. pageList : [ 10, 20, 30, 40, 50 ],
  56. fitColumns:false,
  57. border:false,
  58. sortOrder:'desc',
  59. pagination:true,
  60. idField:'id',
  61. url:whzl.basePath + '/yaohaoAction_yaohaoList',
  62. toolbar:'#searchtool',
  63. checkOnSelect:true,
  64. selectOnCheck:false,
  65. nowrap:true,
  66. showFooter: true,
  67. columns:columns,
  68. frozenColumns:frozenColumns,
  69. loadFilter:function(result){
  70. if(result.success){
  71. return result.obj;
  72. }else{
  73. $.messager.alert("提示",result.message);
  74. return ;
  75. }
  76. }
  77. });
  78. toolBar("yaohaoItemDataGrid","setYaohaoItemSearchDialog","yaohaoItemSearch");
  79. }
  80. }
  81. });
  82. /*$('#yaohaoItemDataGrid').datagrid({
  83. rownumbers:true,
  84. fit:true,
  85. pageSize:20,
  86. pageList : [ 10, 20, 30, 40, 50 ],
  87. fitColumns:false,
  88. border:false,
  89. sortOrder:'desc',
  90. pagination:true,
  91. idField:'id',
  92. url:whzl.basePath + '/yaohaoAction_yaohaoList',
  93. toolbar:'#searchtool',
  94. checkOnSelect:true,
  95. selectOnCheck:false,
  96. nowrap:true,
  97. loadFilter:function(result){
  98. if(result.success){
  99. return result.obj;
  100. }else{
  101. $.messager.alert("提示",result.message);
  102. return ;
  103. }
  104. }
  105. });*/
  106. });
  107. /**查询*/
  108. function searchFun(){
  109. $("#yaohaoItemDataGrid").datagrid("load", {
  110. "yaohaoItem.securityPerson.name":$("#tblQuery").find("input[id='securityPersonName']").val(),
  111. "yaohaoItem.securityPerson.idCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val(),
  112. "house.community.id":trim($('#communityId').combobox("getValue")),
  113. "house.no":trim($('#no').combobox("getValue")),
  114. "house.houseNumber":trim($('#houseNumber').combobox("getValue")),
  115. "yaohaoItem.securityPerson.personType":$('#personType').val()
  116. });
  117. $('#yaohaoItemDataGrid').datagrid({
  118. columns:columns,
  119. frozenColumns:frozenColumns
  120. //url:whzl.basePath + '/yaohaoAction_yaohaoList?'+params,pageNumber:1
  121. });
  122. toolBar("yaohaoItemDataGrid","setYaohaoItemSearchDialog","yaohaoItemSearch");
  123. }
  124. /*清除查询条件**/
  125. function ClearQuery() {
  126. $("#tblQuery").find("input").val("");
  127. $("#tblQuery").find("select").val("-1");
  128. }
  129. var dateFormatter = function(value,row,index){
  130. if(value != null){
  131. return value.substring(0,10);
  132. }else{
  133. return "";
  134. }
  135. }
  136. /**合同列表详细*/
  137. var yaohaoItem_leaseContractDetailFormatter = function(value , row , index){
  138. if(row.startDate != ""){
  139. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=leaseContractDetailList('" + row.idCard + "') style='cursor:pointer' />";
  140. }else{
  141. return "暂未签订";
  142. }
  143. };
  144. /**详细页面对话框*/
  145. var leaseContractDetailList = function(idCard){
  146. $("#detailLeaseContractListDialog").dialog(
  147. {
  148. buttons : [
  149. {
  150. text : '确定',
  151. iconCls : 'icon-ok',
  152. handler : function(){
  153. $("#detailLeaseContractListDialog").dialog("close");
  154. }
  155. }
  156. ],
  157. onLoad : function(){
  158. leaseContract_detail_load(idCard);
  159. }
  160. }
  161. );
  162. };
  163. /**房租收取列表详细*/
  164. var yaohaoItem_rentDetailFormatter = function(value , row , index){
  165. if(row.rendEndDate != ""){
  166. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=rentDetailList('" + row.idCard + "') style='cursor:pointer' />";
  167. }else{
  168. return "暂无记录";
  169. }
  170. };
  171. /**房租收取详细页面对话框*/
  172. var rentDetailList = function(idCard){
  173. $("#detailRentListDialog").dialog(
  174. {
  175. buttons : [
  176. {
  177. text : '确定',
  178. iconCls : 'icon-ok',
  179. handler : function(){
  180. $("#detailRentListDialog").dialog("close");
  181. }
  182. }
  183. ],
  184. onLoad : function(){
  185. rent_detail_load(idCard);
  186. }
  187. }
  188. );
  189. };
  190. /**小区名称*/
  191. var communityNameFormatter = function(value , row , index){
  192. return row.communityName ;
  193. };
  194. /**居住地点*/
  195. var addressFormatter = function(value , row , index){
  196. return row.address ;
  197. };
  198. /**房号*/
  199. var houseNumberFormatter = function(value , row , index){
  200. return row.houseNumber ;
  201. };
  202. /**面积*/
  203. var areaFormatter = function(value , row , index){
  204. return row.area ;
  205. };
  206. /**人员名称*/
  207. var nameFormatter = function(value , row , index){
  208. return row.securityPerson.name ;
  209. };
  210. /**身份证号*/
  211. var idCardFormatter = function(value , row , index){
  212. return row.securityPerson.idCard ;
  213. };
  214. /**联系电话*/
  215. var phoneFormatter = function(value , row , index){
  216. return row.securityPerson.phone ;
  217. };
  218. /**适用户型*/
  219. var roomTypeFormatter = function(value , row , index){
  220. if(row.securityPerson.securityNum >=3){
  221. return "二居室";
  222. }else{
  223. return "一居室";
  224. }
  225. };
  226. /**意向小区*/
  227. var communityNameApplyFormatter = function(value , row , index){
  228. return row.communityName ;
  229. };
  230. /**小区名称*/
  231. var yaohaoItem_communityNameFormatter = function(value , row , index){
  232. if(row.house != null){
  233. return row.house.communityName ;
  234. }
  235. };
  236. /**居住地点*/
  237. var yaohaoItem_addressFormatter = function(value , row , index){
  238. if(row.house != null){
  239. return row.house.address ;
  240. }
  241. };
  242. /**房号*/
  243. var yaohaoItem_houseNumberFormatter = function(value , row , index){
  244. if(row.house != null){
  245. return row.house.houseNumber ;
  246. }
  247. };
  248. /**面积*/
  249. var yaohaoItem_areaFormatter = function(value , row , index){
  250. if(row.house != null){
  251. return row.house.area ;
  252. }
  253. };
  254. /**人员名称*/
  255. var yaohaoItem_nameFormatter = function(value , row , index){
  256. if(row.securityPerson != null){
  257. return row.securityPerson.name ;
  258. }
  259. };
  260. /**身份证号*/
  261. var yaohaoItem_idCardFormatter = function(value , row , index){
  262. if(row.securityPerson != null){
  263. return row.securityPerson.idCard ;
  264. }
  265. };
  266. /**人员类别格式化*/
  267. var personTypeFormatter = function(value , row , index){
  268. var personType = "";
  269. for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
  270. if(personTypeObj[nItem].code == row.personType){
  271. personType = personTypeObj[nItem].value;
  272. break;
  273. }
  274. }
  275. return personType;
  276. };
  277. --></script>
  278. <div class="easyui-layout" data-options="fit:true,border:false">
  279. <div data-options="region:'center',border:false">
  280. <div id="searchtool" data-options="region:'north' , border:false">
  281. <div class="clear"></div>
  282. <table id="tblQuery" style="width:100%;">
  283. <tr>
  284. <td align="right" style="width: 70px;"><span>人员名称</span></td><td style="width: 120px;"><input id="securityPersonName" name="yaohaoItem.securityPerson.name" type="text" style="width: 100px;"/></td>
  285. <td align="right" style="width: 70px;"><span>身份证号码</span></td><td style="width: 120px;"><input id="securityPersonIdCard" name="yaohaoItem.securityPerson.idCard" type="text" style="width: 140px;"/></td>
  286. <td align="right" style="width: 70px;"><span>人员类别</span></td>
  287. <td style="width: 120px;">
  288. <select id="personType" name="securityPerson.personType" style="width:100px" onchange="searchFun();" >
  289. <option value="">全部</option>
  290. </select>
  291. </td>
  292. </tr>
  293. <tr>
  294. <td align="right"><span>小区名称</span></td>
  295. <td colspan="4">
  296. <select id="area" style="width:100px;">
  297. <option value="">全部</option>
  298. </select>
  299. <input id="communityId">
  300. <input id="no" style="width: 60px;">幢
  301. <input id="houseNumber" style="width: 80px;">室
  302. </td>
  303. <td align="left" style="width: 200px;">
  304. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  305. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  306. </td>
  307. </tr>
  308. </table>
  309. <div class="clear"></div>
  310. </div>
  311. <table id="yaohaoItemDataGrid" title="摇号结果">
  312. <!--<thead>
  313. <tr>
  314. <th data-options="field:'name',align:'center',width:80">姓名</th>
  315. <th data-options="field:'idCard',align:'center',width:140">身份证号码</th>
  316. <th data-options="field:'personType',align:'center',width:80,formatter:personTypeFormatter">人员类别</th>
  317. <th data-options="field:'communityName',width:100">小区名称</th>
  318. <th data-options="field:'address',width:200">小区地点</th>
  319. <th data-options="field:'haddress',width:200">居住地址</th>
  320. <th data-options="field:'moneyActual',width:100">月租金</th>
  321. <th data-options="field:'startDate',width:100,formatter:dateFormatter">合同开始时间</th>
  322. <th data-options="field:'endDate',width:100,formatter:dateFormatter">合同结束时间</th>
  323. <th data-options="field:'rendEndDate',width:100,formatter:dateFormatter">租金截止时间</th>
  324. <th data-options="field:'leaseContractDetail',align:'center',width:100,formatter:yaohaoItem_leaseContractDetailFormatter">公租房合同</th>
  325. <th data-options="field:'rentDetail',align:'center',width:80,formatter:yaohaoItem_rentDetailFormatter">租金收取</th>
  326. </tr>
  327. </thead>-->
  328. </table>
  329. </div>
  330. </div>
  331. <div id="detailLeaseContractListDialog" data-options="title:'&nbsp;合同列表',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toLeaseContractList'">
  332. </div>
  333. <div id="detailRentListDialog" data-options="title:'&nbsp;房租收取列表',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toRentList'">
  334. </div>
  335. <div id="setYaohaoItemSearchDialog" data-options="title:'&nbsp;个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=yaohaoItemSearch'">
  336. </div>
  337. <script type="text/javascript">
  338. <!--
  339. parent.$.messager.progress('close');
  340. $('#area').combobox({
  341. url: whzl.basePath + '/houseRegisterAction_listChildrenCombobox',
  342. valueField:'value',
  343. textField:'text',
  344. onChange:function (newValue,oldValue) {
  345. $('#communityId').combobox("setValue","");
  346. $('#no').combobox("setValue","");
  347. $('#houseNumber').combobox("setValue","");
  348. $('#communityId').combobox('reload',whzl.basePath + '/communityAction_findAll?community.area='+newValue);
  349. }
  350. });
  351. $('#communityId').combobox({
  352. url: whzl.basePath + '/communityAction_findAll',
  353. valueField:'value',
  354. textField:'text',
  355. filter:function(q,row){
  356. var opts=$(this).combobox("options");
  357. //return row[opts.textField].indexOf(q)==0;//
  358. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  359. },
  360. onChange:function (newValue,oldValue) {
  361. $('#no').combobox("setValue","");
  362. $('#houseNumber').combobox("setValue","");
  363. $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
  364. }
  365. });
  366. $('#no').combobox({
  367. //editable:false,
  368. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
  369. valueField:'value',
  370. textField:'text',
  371. filter:function(q,row){
  372. var opts=$(this).combobox("options");
  373. //return row[opts.textField].indexOf(q)==0;//
  374. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  375. },
  376. onChange:function (newValue,oldValue) {
  377. $('#houseNumber').combobox("setValue","");
  378. $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+newValue);
  379. }
  380. });
  381. $('#houseNumber').combobox({
  382. //editable:false,
  383. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
  384. valueField:'value',
  385. textField:'text',
  386. filter:function(q,row){
  387. var opts=$(this).combobox("options");
  388. //return row[opts.textField].indexOf(q)==0;//
  389. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  390. }
  391. });
  392. //-->
  393. </script>