123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- <%-- 退房查询 --%>
- <%@ 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() {
- $('#checkOutHouseDataGrid').datagrid({
- rownumbers:true,
- fit:true,
- pageSize:10,
- pageList : [ 10, 20, 30, 40, 50 ],
- fitColumns:false,
- border:false,
- sortOrder:'desc',
- pagination:true,
- idField:'id',
- toolbar:'#searchtool',
- url:whzl.basePath + '/rent10Action_checkOutHouseList',
- pageNumber:1,
- nowrap:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- });
-
- /**查询*/
- function searchFun(){
- $("#checkOutHouseDataGrid").datagrid("load", {
- "checkOutHouse.name":trim($('#name').val()),
- "checkOutHouse.idCard":trim($('#idCard').val()),
- });
- }
-
- /*清除查询条件**/
- function ClearQuery() {
- $("#tblQuery").find("input").val("");
- $("#tblQuery").find("select").val("-1");
- }
-
- /**详情*/
- var detailFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/details.png' title='详情' onclick=checkOutDetail(" + row.id + ") style='cursor:pointer' />";
- }
-
- var checkOutDetail = function(id){
- $("#checkOutDetailDialog").dialog(
- {
- buttons : [
- {
- text : '关闭',
- iconCls : 'icon-ok',
- handler : function(){
- $("#checkOutDetailDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- detail_load(id);
- }
- }
- );
- };
-
- /**打印注销申请书*/
- var printFormatter = function(value , row , index){
- if(value != undefined && value !=""){
- return "<span onclick=cancelApplicationPrint("+row.id+") style='cursor:pointer'>"+value+"</span>";
- }else{
- return "<img src='<%=basePath%>/images/printer.png' title='打印委托书' onclick=addCheckOutNo(" + row.id + ") style='cursor:pointer' />"
- }
- }
-
- /**生成注销编号*/
- function addCheckOutNo(id){
- parent.$.messager.progress({
- title : '提示',
- text : '数据处理中,请稍候....'
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_addCheckOutNo",//要访问的后台地址
- data: "checkOutHouse.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){
- parent.$.messager.progress('close');
- if(msg.success){
- $.messager.alert("提醒","已生成注销编号 ");
- $("#checkOutHouseDataGrid").datagrid("reload");
- }
- }
- })
- }
-
- function cancelApplicationPrint(id){
- window.open(whzl.basePath+"/rent10Action_toCancelApplication?checkOut.id="+id);
- }
-
- /**上传附件*/
- uploadFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/up.png' title='确认退房' onclick=uploadCheckOutHouse(" + row.id + ") style='cursor:pointer' />"
- }
-
- function uploadCheckOutHouse(id){
- $("#uploadCheckOutHouseDialog").dialog({
- buttons : [{
- text : '提交',
- iconCls : 'icon-ok',
- handler : function(){
- uploadCheckOutHouse_submit(id);
- $("#uploadCheckOutHouseDialog").dialog("close");
- }
- },{
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#uploadCheckOutHouseDialog").dialog("close");
- }
- }],
- onLoad : function(){
- detail_load(id);
- }
- });
- }
-
- /**确认退房*/
- var checkOutFormatter = function(value , row , index){
- if(row.state =="3"||row.state =="1"){
- return "";
- }else{
- return "<img src='<%=basePath%>/images/error.png' title='确认退房' onclick=checkOutHouse(" + row.id + ") style='cursor:pointer' />"
- }
- }
-
- function checkOutHouse(id){
- $.messager.confirm('提示','确定退房吗?',function(r){
- if(r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_checkOutHouse",//要访问的后台地址
- data: "checkOutHouse.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){
- parent.$.messager.progress('close');
- if(msg.success){
- $("#checkOutHouseDataGrid").datagrid("reload");
- }
- }
- })
- }
- });
- }
-
- var rentTransferSubsidyFormatter = function(value , row , index){
- if(row.state =="3"||row.state =="1"){
- return "";
- }else{
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='公转补' onclick=rentTransferSubsidy(" + row.id + ") style='cursor:pointer' />"
- }
- }
- function rentTransferSubsidy(id){
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_rentTransferSubsidy",//要访问的后台地址
- data:{"checkOutHouse.id":id},
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $("#checkOutHouseDataGrid").datagrid("reload");
- }
- }
- });
- }
- /**导出退房信息*/
- function checkOutExport(){
- window.location.href = whzl.basePath+"/rent10Action_checkOutExport";
- }
-
- function checkOutPDF(){
- var ids = [];
- var rows = $('#checkOutHouseDataGrid').datagrid('getSelections');
- if(rows.length>0){
- for(var i=0; i<rows.length; i++){
- ids.push(rows[i].id);
- }
- var checkOutHouseIds = ids.join(',');
- parent.$.messager.progress({
- title : '提示',
- text : '正在生成审批表,请稍候....'
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_addCheckOutHousePDF?ids="+checkOutHouseIds,//要访问的后台地址
- success: function(msg){
- parent.$.messager.progress('close');
- $("#checkOutHouseDataGrid").datagrid("reload");
- if(msg.success){
- $.messager.alert('成功','审批表完成');
- }else{
- $.messager.alert('失败',msg.message);
- }
- }
- })
- }else{
- $.messager.alert('提示',"请选择数据");
- }
- }
-
-
-
- function checkOutHouseFile(){
- var ids = [];
- var rows = $('#checkOutHouseDataGrid').datagrid('getSelections');
- if(rows.length>0){
- for(var i=0; i<rows.length; i++){
- ids.push(rows[i].id);
- }
- var checkOutHouseIds = ids.join(',');
- parent.$.messager.progress({
- title : '提示',
- text : '正在下载,请稍候....'
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "rent10Action_checkOutHouseFileDownload?ids="+checkOutHouseIds,//要访问的后台地址
- success: function(msg){
- parent.$.messager.progress('close');
- $("#checkOutHouseDataGrid").datagrid("reload");
- if(msg.success){
- $.messager.alert('成功','下载完成');
- }else{
- $.messager.alert('失败',msg.message);
- }
- }
- })
- }else{
- $.messager.alert('提示',"请选择数据");
- }
- }
-
-
- function checkOutHouseExcelDownload(){
- var ids = [];
- var rows = $('#checkOutHouseDataGrid').datagrid('getSelections');
- if(rows.length>0){
- for(var i=0; i<rows.length; i++){
- ids.push(rows[i].id);
- }
- var checkOutHouseIds = ids.join(',');
- window.location.href = whzl.basePath+"/rent10Action_checkOutHouseExcelDownload?ids="+checkOutHouseIds
- }else{
- $.messager.alert('提示',"请选择数据");
- }
- }
-
- </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%;font-size:12px;">
- <tr>
- <td align="right">承租人姓名</td>
- <td><input id="name"/></td>
- <td align="right"><span>承租人身份证号</span></td>
- <td><input id="idCard"/></td>
- <td align="center">
- <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>
- <a href="javascript:checkOutExport();" class="easyui-linkbutton" data-options="iconCls:'icon-import',plain:true">导出</a>
- <a href="javascript:checkOutPDF();" class="easyui-linkbutton" data-options="iconCls:'icon-nextstep',plain:true">生成审批表</a>
- <a href="javascript:checkOutHouseFile();" class="easyui-linkbutton" data-options="iconCls:'icon-nextstep',plain:true">附件下载</a>
- <a href="javascript:checkOutHouseExcelDownload();" class="easyui-linkbutton" data-options="iconCls:'icon-nextstep',plain:true">下载Excel</a>
-
- </td>
- </tr>
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="checkOutHouseDataGrid">
- <thead frozen="true">
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'address',align:'center',sortable:true,width:210">房源地址</th>
-
- </tr>
- </thead>
- <thead>
- <tr>
- <th data-options="field:'name',sortable:true,width:100">申请人</th>
- <th data-options="field:'idCard',width:150">身份证号</th>
- <th data-options="field:'detail',width:80,align:'center',formatter:detailFormatter">详情</th>
- <th data-options="field:'checkOutNo',width:150,align:'center',formatter:printFormatter">打印注销申请书</th>
- <th data-options="field:'upload',width:150,align:'center',formatter:uploadFormatter">上传附件</th>
- <th data-options="field:'checkOut',width:80,align:'center',formatter:checkOutFormatter">确认退房</th>
- <th data-options="field:'rentTransferSubsidy',align:'center',width:60,formatter:rentTransferSubsidyFormatter">公转补</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="checkOutDetailDialog" data-options="title:' 退房注销详情',iconCls:'icon-detail',width:1000,height:500,modal:true,href:'<%=basePath %>/rent10Action_toCheckOutHouseDetail'">
- </div>
- <div id="uploadCheckOutHouseDialog" data-options="title:' 上传附件',iconCls:'icon-detail',width:1000,height:500,modal:true,href:'<%=basePath %>/rent10Action_toUploadCheckOutHouse'">
- </div>
- <script type="text/javascript">
- $(function(){
- parent.$.messager.progress('close');
- })
- </script>
|