123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
- <jsp:include page="../../common/include.jsp" />
- <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
- <script type="text/javascript"><!--
- /**用户显示区*/
- $(function() {
- $('#leaseContractDataGrid').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:20,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- url:whzl.basePath + '/leaseContractAction_listLeaseContract',
- toolbar:'#searchtool',
- checkOnSelect:true,
- selectOnCheck:false,
- nowrap:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- });
-
-
- /**查询*/
- function searchFun(){
- $("#leaseContractDataGrid").datagrid("load", {
- "leaseContract.contractName":$("#tblQuery").find("input[id='contractName']").val(),
- "leaseContract.securityPersonName":$("#tblQuery").find("input[id='securityPersonName']").val(),
- "leaseContract.securityPersonIdCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val()
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- var dateFormatter = function(value,row,index){
- if(value != null){
- return value.substring(0,10);
- }else{
- return "";
- }
- }
-
- /**详细*/
- var detailsFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/details.png' title='查看详情' onclick=leaseContractDetails(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**详细页面对话框*/
- var leaseContractDetails = function(id){
- $("#detailLeaseContractDialog").dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#detailLeaseContractDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- detail_load(id);
- }
- }
- );
- };
-
- /**修改*/
- var updateFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=updateRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**更新事件*/
- function updateRow(id){
- leaseContractUpdate(id,0);
- }
-
- /**修改租房合同信息*/
- function leaseContractUpdate(id,page){
- $('#updateLeaseContractDialog').dialog(
- {
- buttons : [
- {
- text : '上一步',
- iconCls : 'icon-undo',
- handler : function(){
- if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 0){
- $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) - 1);
- }
- }
- },
- {
- text : '下一步',
- iconCls : 'icon-redo',
- handler : function(){
- if($('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) != 1){
- $('#tabs_update').tabs('select', $('#tabs_update').tabs('getTabIndex', $('#tabs_update').tabs('getSelected')) + 1);
- }else{
- update_submit(id);
- }
-
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#updateLeaseContractDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- update_load(id,page);
- }
- }
- );
- }
- /**增加租房合同*/
- function leaseContractAdd(){
- $('#addLeaseContractDialog').dialog(
- {
- buttons : [
- {
- text : '下一步',
- iconCls : 'icon-redo',
- handler : function(){
- add_submit();
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addLeaseContractDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- add_load();
- }
- }
- );
- }
-
-
- --></script>
- <div class="easyui-layout" data-options="fit:true,border:false">
- <div data-options="region:'center',border:false">
- <div id="searchtool" data-options="region:'north' , border:false">
- <div class="clear"></div>
- <table id="tblQuery" style="width:100%;">
- <tr>
- <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>
- <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>
- <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>
- <td align="left" style="width: 200px;">
- <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
- <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
- </td>
- </tr>
-
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="leaseContractDataGrid">
- <thead>
- <tr>
- <th data-options="field:'contractName',sortable:true,width:170">合同名称</th>
- <th data-options="field:'contractNo',sortable:true,width:120">合同编号</th>
- <th data-options="field:'securityPersonName',sortable:true,width:80">租赁人</th>
- <th data-options="field:'securityPersonIdCard',sortable:true,width:160">租赁身份证号</th>
- <th data-options="field:'houseAddress',sortable:true,width:220">租赁房屋</th>
- <th data-options="field:'startDate',sortable:true,width:120,formatter:dateFormatter">租房开始日期</th>
- <th data-options="field:'endDate',sortable:true,width:120,formatter:dateFormatter">租房结束日期</th>
- <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">查看详情</th>
- <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">修改</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="detailLeaseContractDialog" data-options="title:' 租房合同详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toDetail'">
- </div>
- <div id="addLeaseContractDialog" data-options="title:' 添加租房合同',iconCls:'icon-add',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toAdd'">
- </div>
- <div id="updateLeaseContractDialog" data-options="title:' 租房合同信息',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/leaseContractAction_toUpdate'">
- </div>
- <div id="yaohaoItemSelectDialog" data-options="title:' 选择摇号结果',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/yaohaoAction_toYaohaoItemSelect'">
- </div>
- <script type="text/javascript">
- <!--
- parent.$.messager.progress('close');
- //-->
- </script>
|