123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458 |
- <%@ 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"><!--
- //是否
- var yesOrNoObj = null;
- var yesOrNo_array = null;
-
-
- //人员类别
- var personTypeObj = null;
- var personType_array = null;
-
- //审核意见
- var opinionObj = null;
-
- var opinion_array = null;
-
- //区
- var areaObj = null;
-
- var area_array = null;
-
- //街道
- var streetObj = null;
-
- var street_array = null;
-
- //居委会
- var neighborhoodObj = null;
-
- var neighborhood_array = null;
-
- /**用户显示区*/
- $(function() {
- //工作现状
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"workState" ,"aa10.name":"工作现状" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- workStateObj = msg.obj.rows;
- var select_arr = [];
- var data = workStateObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- workState_array = select_arr.join("");
- }
- }
- });
-
-
- //是否
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"yesOrNo" ,"aa10.name":"是否" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- yesOrNoObj = msg.obj.rows;
- var select_arr = [];
- var data = yesOrNoObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- yesOrNo_array = select_arr.join("");
- }
- }
- });
-
- //人员类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- personTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = personTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- personType_array = select_arr.join("");
- $("#personType").append(personType_array);
- }
- }
- });
-
- //审批意见
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"opinion" ,"aa10.name":"审核意见" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- opinionObj = msg.obj.rows;
- var select_arr = [];
- var data = opinionObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- opinion_array = select_arr.join("");
- }
- }
- });
-
- //获取区
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "houseRegisterAction_listChildren",//要访问的后台地址
- //data:{"id":id},
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- areaObj = msg.obj.rows;
- var select_arr = [];
- var data = areaObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
- }
- area_array = select_arr.join("");
- }
- }
- });
- $('#exchangeHouseDataGrid').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 + '/exchangeHouseAction_listExchangeHouse',
- 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(){
- $("#exchangeHouseDataGrid").datagrid("load", {
- "exchangeHouse.name1":$("#tblQuery").find("input[id='securityPersonName']").val(),
- "exchangeHouse.idCard1":$("#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 detailFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=exchangeHouseDetail('" + row.id + "') style='cursor:pointer' />";
- };
-
- /**房源详细页面对话框*/
- var exchangeHouseDetail = function(id){
- $("#exchangeHouseDetailDialog").dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#exchangeHouseDetailDialog").dialog("close");
- }
- }],
- onLoad : function(){
- detail_load(id);
- }
- });
- };
-
-
- /**打印审批表*/
- var printFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/printer.png' title='选择合同模板' onclick=printRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- function printRow(id){
- window.open(whzl.basePath+"/exchangeHouseAction_toApplicationPrint?exchangeHouseId="+id);
- }
-
- /**打印协议书*/
- var agreementPrintFormatter = function(value , row , index){
- if(row.state=="1"){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/print.png' title='查看详情' onclick=agreementPrint(" + row.id +") style='cursor:pointer' />";
- }else{
- return "";
- }
- };
-
- function agreementPrint(id){
- window.open(whzl.basePath+"/exchangeHouseAction_toAgreementPrint?exchangeHouseId="+id);
- }
-
- /**上传审批表*/
- var uploadFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=applicationUpload(" + row.id + ") style='cursor:pointer' />";
- };
-
- function applicationUpload(id){
- $("#uploadDialog").dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#uploadExchangeContractDialog").dialog("close");
- }
- }],
- onLoad : function(){
- upload_load(id);
- }
- });
- }
- /**上传协议书*/
- var agreementUploadFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=agreementUpload(" + row.id + ") style='cursor:pointer' />";
-
- /*if(row.state=="1"){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=agreementUpload(" + row.id + ") style='cursor:pointer' />";
- }else{
- return "";
- }*/
- };
-
- function agreementUpload(id){
- $("#uploadDialog").dialog({
- buttons : [{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#uploadDialog").dialog("close");
- $("#exchangeHouseDataGrid").datagrid("reload");
- }
- }],
- onLoad : function(){
- upload_load(id);
- }
- });
- }
-
- /**更新*/
- var updateFormatter = function(value , row , index){
- if(row.state == 2){
- return "<img src='<%=basePath%>/images/pencil.png' title='审核' onclick=updateRow('" + row.id +"') style='cursor:pointer' />";
- }else{
- return "";
- }
- };
-
- function updateRow(id){
- $.messager.confirm('提示', '确认调换房源吗?', function(r){
- if(r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "exchangeHouseAction_verify1ExchangeHouse",//要访问的后台地址
- data: "exchangeHouse.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){
- parent.$.messager.progress('close');
- $('#exchangeHouseDataGrid').datagrid("reload");
- }
- })
- }
- })
- }
-
- /**导出退房信息*/
- function exchangeExport(){
- window.location.href = whzl.basePath+"/exchangeHouseAction_exchangeExport";
- }
-
- function exchangeHouseFile(){
- var ids = [];
- var rows = $('#exchangeHouseDataGrid').datagrid('getSelections');
- if(rows.length>0){
- for(var i=0; i<rows.length; i++){
- ids.push(rows[i].id);
- }
- var exchangeHouseIds = ids.join(',');
- parent.$.messager.progress({
- title : '提示',
- text : '正在下载,请稍候....'
- });
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "exchangeHouseAction_exchangeHouseFileDownload?ids="+exchangeHouseIds,//要访问的后台地址
- success: function(msg){
- parent.$.messager.progress('close');
- $("#exchangeHouseDataGrid").datagrid("reload");
- if(msg.success){
- $.messager.alert('成功','下载完成');
- }else{
- $.messager.alert('失败',msg.message);
- }
- }
- })
- }else{
- $.messager.alert('提示',"请选择数据");
- }
- }
-
- function exchangeHouseExcelDownload(){
- var ids = [];
- var rows = $('#exchangeHouseDataGrid').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+"/exchangeHouseAction_exchangeHouseExcelDownload?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%;">
- <tr>
- <td align="right" style="width: 10%;"><span>人员名称</span></td><td style="width: 10%;"><input id="securityPersonName" name="securityPersonHouse.name1" type="text" style="width: 100px;"/></td>
- <td align="right" style="width: 16%;"><span>身份证号码</span></td><td style="width: 18%;"><input id="securityPersonIdCard" name="securityPersonHouse.securityPerson.idCard" type="text" style="width: 140px;"/></td>
- <td align="left" style="width: 46%;">
- <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:exchangeExport();" class="easyui-linkbutton" data-options="iconCls:'icon-import',plain:true">导出</a>
- <a href="javascript:exchangeHouseFile();" class="easyui-linkbutton" data-options="iconCls:'icon-nextstep',plain:true">附件下载</a>
- <a href="javascript:exchangeHouseExcelDownload();" class="easyui-linkbutton" data-options="iconCls:'icon-nextstep',plain:true">下载Excel</a>
-
- </td>
- </tr>
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="exchangeHouseDataGrid" title="房源入住情况">
- <thead>
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'name1',width:80">换房人甲</th>
- <th data-options="field:'idCard1',width:140">换房人甲身份证号</th>
- <th data-options="field:'houseAddress1',width:200">房源甲</th>
- <th data-options="field:'name2',width:80">换房人乙</th>
- <th data-options="field:'idCard2',width:140">换房人乙身份证号</th>
- <th data-options="field:'houseAddress2',width:200">房源乙</th>
- <th data-options="field:'detail',width:60,align:'center',formatter:detailFormatter">换房详情</th>
- <th data-options="field:'agreementPrint',align:'center',width:70,formatter:agreementPrintFormatter">打印协议书</th>
- <th data-options="field:'agreementUpload',align:'center',width:70,formatter:agreementUploadFormatter">上传协议书</th>
- <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">确认换房</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div id="exchangeHouseDetailDialog" data-options="title:' 查看详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseAction_toDetail'">
- </div>
- <div id="uploadDialog" data-options="title:' 合同文件上传',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseAction_toUpload'">
- </div>
- <script type="text/javascript">
- <!--
- parent.$.messager.progress('close');
- $('#area').combobox({
- url: whzl.basePath + '/houseRegisterAction_listChildrenCombobox',
- valueField:'value',
- textField:'text',
- onChange:function (newValue,oldValue) {
- $('#communityId').combobox("setValue","");
- $('#no').combobox("setValue","");
- $('#houseNumber').combobox("setValue","");
- $('#communityId').combobox('reload',whzl.basePath + '/communityAction_findAll?community.area='+newValue);
- }
- });
- $('#communityId').combobox({
- url: whzl.basePath + '/communityAction_findAll',
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- },
- onChange:function (newValue,oldValue) {
- $('#no').combobox("setValue","");
- $('#houseNumber').combobox("setValue","");
- $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
- }
- });
- $('#no').combobox({
- //editable:false,
- url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- },
- onChange:function (newValue,oldValue) {
- $('#houseNumber').combobox("setValue","");
- $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+newValue);
- }
- });
- $('#houseNumber').combobox({
- //editable:false,
- url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
- valueField:'value',
- textField:'text',
- filter:function(q,row){
- var opts=$(this).combobox("options");
- //return row[opts.textField].indexOf(q)==0;//
- return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
- }
- });
- //-->
- </script>
|