leaseContractList_search.jsp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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. $('#leaseContractDataGrid').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 + '/leaseContractAction_listLeaseContract',
  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. $("#leaseContractDataGrid").datagrid("load", {
  35. "leaseContract.contractName":$("#tblQuery").find("input[id='contractName']").val(),
  36. "leaseContract.securityPersonName":$("#tblQuery").find("input[id='securityPersonName']").val(),
  37. "leaseContract.securityPersonIdCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val()
  38. });
  39. }
  40. /*清除查询条件**/
  41. function ClearQuery() {
  42. $("#tblQuery").find("input").val("");
  43. $("#tblQuery").find("select").val("-1");
  44. }
  45. var dateFormatter = function(value,row,index){
  46. if(value != null){
  47. return value.substring(0,10);
  48. }else{
  49. return "";
  50. }
  51. }
  52. /**详细*/
  53. var detailsFormatter = function(value , row , index){
  54. return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=leaseContractDetails(" + row.id + ") style='cursor:pointer' />";
  55. };
  56. /**详细页面对话框*/
  57. var leaseContractDetails = function(id){
  58. $("#detailLeaseContractDialog").dialog(
  59. {
  60. buttons : [
  61. {
  62. text : '确定',
  63. iconCls : 'icon-ok',
  64. handler : function(){
  65. $("#detailLeaseContractDialog").dialog("close");
  66. }
  67. }
  68. ],
  69. onLoad : function(){
  70. detail_load(id);
  71. }
  72. }
  73. );
  74. };
  75. /**修改*/
  76. var updateFormatter = function(value , row , index){
  77. return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow(" + row.id + ") style='cursor:pointer' />";
  78. };
  79. /**更新事件*/
  80. function updateRow(id){
  81. leaseContractUpdate(id,0);
  82. }
  83. /**修改租房合同信息*/
  84. function leaseContractUpdate(id,page){
  85. $('#updateLeaseContractDialog').dialog(
  86. {
  87. buttons : [
  88. {
  89. text : '上一步',
  90. iconCls : 'icon-undo',
  91. handler : function(){
  92. if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 0){
  93. $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) - 1);
  94. }
  95. }
  96. },
  97. {
  98. text : '下一步',
  99. iconCls : 'icon-redo',
  100. handler : function(){
  101. if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 1){
  102. $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) + 1);
  103. }else{
  104. update_submit(id);
  105. }
  106. }
  107. },
  108. {
  109. text : '取消',
  110. iconCls : 'icon-cancel',
  111. handler : function(){
  112. $("#updateLeaseContractDialog").dialog("close");
  113. }
  114. }
  115. ],
  116. onLoad : function(){
  117. update_load(id,page);
  118. }
  119. }
  120. );
  121. }
  122. /**增加租房合同*/
  123. function leaseContractAdd(){
  124. $('#addLeaseContractDialog').dialog(
  125. {
  126. buttons : [
  127. {
  128. text : '下一步',
  129. iconCls : 'icon-redo',
  130. handler : function(){
  131. add_submit();
  132. }
  133. },
  134. {
  135. text : '取消',
  136. iconCls : 'icon-cancel',
  137. handler : function(){
  138. $("#addLeaseContractDialog").dialog("close");
  139. }
  140. }
  141. ],
  142. onLoad : function(){
  143. add_load();
  144. }
  145. }
  146. );
  147. }
  148. --></script>
  149. <div class="easyui-layout" data-options="fit:true,border:false">
  150. <div data-options="region:'center',border:false">
  151. <div id="searchtool" data-options="region:'north' , border:false">
  152. <div class="clear"></div>
  153. <table id="tblQuery" style="width:100%;">
  154. <tr>
  155. <td align="right" style="width: 70px;"><span>租房合同标题</span></td><td style="width: 120px;"><input id="contractName" name="leaseContract.contractName" type="text" style="width: 100px;"/></td>
  156. <td align="right" style="width: 70px;"><span>租房人姓名</span></td><td style="width: 120px;"><input id="securityPersonName" name="leaseContract.securityPersonName" type="text" style="width: 100px;"/></td>
  157. <td align="right" style="width: 70px;"><span>租房人身份证号码</span></td><td style="width: 120px;"><input id="securityPersonIdCard" name="leaseContract.securityPersonIdCard" type="text" style="width: 140px;"/></td>
  158. <td align="left" style="width: 200px;">
  159. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  160. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  161. </td>
  162. </tr>
  163. </table>
  164. <div class="clear"></div>
  165. </div>
  166. <table id="leaseContractDataGrid">
  167. <thead>
  168. <tr>
  169. <th data-options="field:'contractName',sortable:true,width:170">合同名称</th>
  170. <th data-options="field:'contractNo',sortable:true,width:120">合同编号</th>
  171. <th data-options="field:'securityPersonName',sortable:true,width:80">租赁人</th>
  172. <th data-options="field:'securityPersonIdCard',sortable:true,width:160">租赁身份证号</th>
  173. <th data-options="field:'houseAddress',sortable:true,width:220">租赁房屋</th>
  174. <th data-options="field:'startDate',sortable:true,width:120,formatter:dateFormatter">租房开始日期</th>
  175. <th data-options="field:'endDate',sortable:true,width:120,formatter:dateFormatter">租房结束日期</th>
  176. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
  177. <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">修改</th>
  178. </tr>
  179. </thead>
  180. </table>
  181. </div>
  182. </div>
  183. <div id="detailLeaseContractDialog" data-options="title:'&nbsp;租房合同详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toDetail'">
  184. </div>
  185. <div id="addLeaseContractDialog" data-options="title:'&nbsp;添加租房合同',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toAdd'">
  186. </div>
  187. <div id="updateLeaseContractDialog" data-options="title:'&nbsp;租房合同信息',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toUpdate'">
  188. </div>
  189. <div id="yaohaoItemSelectDialog" data-options="title:'&nbsp;选择摇号结果',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toYaohaoItemSelect'">
  190. </div>
  191. <script type="text/javascript">
  192. <!--
  193. parent.$.messager.progress('close');
  194. //-->
  195. </script>