123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919 |
- <%@ 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 personTypeObj = null;
- var personType_array = null;
-
- //家庭关系
- var relativeObj = null;
- var relative_array = null;
-
- //婚姻状况
- var maritalStatusObj = null;
- var maritalStatus_array = null;
-
- //申请保障类型
- var applyTypeObj = null;
- var applyType_array = null;
-
- //家庭住房困难类型
- var diffcultTypeObj = null;
- var diffcultType_array = null;
-
- //私有或公有
- var privateOrPublicObj = null;
- var privateOrPublic_array = null;
-
- //产权性质
- var propertyTypeObj = null;
- var propertyType_array = null;
-
-
- //是否
- var yesOrNoObj = null;
- var yesOrNo_array = null;
-
- //审核状态
- var stateObj = null;
- var state_array = null;
-
- //家庭关系
- var relativeObj = null;
- var relative_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;
-
- //工作现状
- var workStateObj = null;
-
- var workState_array = null;
-
- //新就业人员
- var newEmploymentTypeObj = null;
-
- var newEmploymentType_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":"newEmploymentType" ,"aa10.name":"新就业人员类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- newEmploymentTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = newEmploymentTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- newEmploymentType_array = select_arr.join("");
- }
- }
- });
-
- //婚姻情况
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"maritalStatus" ,"aa10.name":"婚姻情况" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- maritalStatusObj = msg.obj.rows;
- var select_arr = [];
- var data = maritalStatusObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- maritalStatus_array = select_arr.join("");
- }
- }
- });
-
- //性别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"sex" ,"aa10.name":"性别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- sexObj = msg.obj.rows;
- var select_arr = [];
- var data = sexObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- sex_array = select_arr.join("");
- }
- }
- });
-
- //申请业务类别
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"applyType" ,"aa10.name":"保障业务类别" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- applyTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = applyTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- applyType_array = select_arr.join("");
- $("#applyType").append(applyType_array);
- }
- }
- });
-
- //家庭住房困难类型
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"diffcultType" ,"aa10.name":"家庭住房困难类型" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- diffcultTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = diffcultTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- diffcultType_array = select_arr.join("");
- }
- }
- });
-
- //私有或公有
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"privateOrPublic" ,"aa10.name":"私有或公有" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- privateOrPublicObj = msg.obj.rows;
- var select_arr = [];
- var data = privateOrPublicObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- privateOrPublic_array = select_arr.join("");
- }
- }
- });
-
- //房屋产权性质
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"propertyType" ,"aa10.name":"产权性质" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- propertyTypeObj = msg.obj.rows;
- var select_arr = [];
- var data = propertyTypeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- propertyType_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":"reviewState" ,"aa10.name":"审核状态" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- stateObj = msg.obj.rows;
- var select_arr = [];
- var data = stateObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- state_array = select_arr.join("");
- }
- }
- });
-
- //家庭关系
- $.ajax({
- type: "post",//使用post方法访问后台
- dataType: "json",//返回json格式的数据
- url: "aa10Action_listAa10All",//要访问的后台地址
- data:{"aa10.letter":"homeRelative" ,"aa10.name":"家庭关系" },
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- relativeObj = msg.obj.rows;
- var select_arr = [];
- var data = relativeObj;
- for(var nItem = 0; nItem < data.length; nItem++ ){
- select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
- }
- relative_array = select_arr.join("");
- }
- }
- });
-
- //审批意见
- $.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("");
- }
- }
- });
- $.ajax({
- type: "post",
- dataType: "json",
- url: "columnSetAction_listColumn?tname=exchangeHouseIntent",
- complete :function(){$("#load").hide();},
- success: function(msg){
- if(msg.success){
- setId();
- var data = msg.obj;
- for(var i = 0;i<data.length;i++){
- if("1"==data[i].type){
- if(typeof(data[i].formatter)!="undefined"){
- data[i].formatter=eval(data[i].formatter);
- }
- user_columns.push(data[i]);
- }else{
- user_frozenColumns.push(data[i]);
- }
- }
- columns.push(user_columns);
- frozenColumns.push(user_frozenColumns);
-
- $('#exchangeHouseIntentDataGrid').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 + '/exchangeHouseIntentAction_listExchangeHouseIntent',
- toolbar:'#searchtool',
- checkOnSelect:true,
- selectOnCheck:true,
- showFooter: true,
- columns:columns,
- frozenColumns:frozenColumns,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });
- toolBar("exchangeHouseIntentDataGrid","setExchangeHouseIntentDialog","exchangeHouseIntent");
- }
- }
- });
- /*$('#exchangeHouseIntentDataGrid').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 + '/exchangeHouseIntentAction_listExchangeHouseIntent',
- toolbar:'#searchtool',
- checkOnSelect:true,
- selectOnCheck:false,
- nowrap:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- });*/
- });
-
- /**婚姻状况格式*/
- var maritalStatusFormatter = function(value , row , index){
- var maritalStatus = "";
- for(var nItem = 0; nItem < maritalStatusObj.length; nItem++ ){
- if(maritalStatusObj[nItem].code == row.maritalStatus){
- maritalStatus = maritalStatusObj[nItem].value;
- break;
- }
- }
- return maritalStatus;
- };
-
- /**婚姻状况编辑*/
- var maritalStatusEditor = {
- type:'combobox',
- options:{
- valueField:'code',
- textField:'value',
- method:'get',
- url:'aa10Action_listAa10All?aa10.letter=maritalStatus',
- required:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj.rows;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
-
- }
- };
-
-
-
- /**是否在保障范围内格式*/
- var isInRangeFormatter = function(value , row , index){
- var yesOrNo = "";
- for(var nItem = 0; nItem < yesOrNoObj.length; nItem++ ){
- if(yesOrNoObj[nItem].code == row.isInRange){
- yesOrNo = yesOrNoObj[nItem].value;
- break;
- }
- }
- return yesOrNo;
- };
-
- /**是否在保障范围内编辑*/
- var isInRangeEditor = {
- type:'combobox',
- options:{
- valueField:'code',
- textField:'value',
- method:'get',
- url:'aa10Action_listAa10All?aa10.letter=yesOrNo',
- required:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj.rows;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
-
- }
- };
-
- /**小数类型*/
- var decimalEditor = {
- type:'numberbox',
- options:{
- precision:2
- }
- }
-
-
- /**家庭关系编辑*/
- var relativeEditor = {
- type:'combobox',
- options:{
- valueField:'code',
- textField:'value',
- method:'get',
- url:'aa10Action_listAa10All?aa10.letter=homeRelative&aa10.name=家庭关系',
- required:true,
- loadFilter:function(result){
- if(result.success){
- return result.obj.rows;
- }else{
- $.messager.alert("提示",result.message);
- return ;
- }
- }
- }
- };
-
- /**查询*/
- function searchFun(){
- $("#exchangeHouseIntentDataGrid").datagrid("load", {
- "exchangeHouseIntent.securityPerson.name":$("#tblQuery").find("input[id='securityPersonName']").val(),
- "exchangeHouseIntent.securityPerson.idCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val(),
- "exchangeHouseIntent.house.community.id":trim($('#communityId').combobox("getValue")),
- "exchangeHouseIntent.house.no":trim($('#no').combobox("getValue")),
- "exchangeHouseIntent.house.houseNumber":trim($('#houseNumber').combobox("getValue"))
- });
- $('#exchangeHouseIntentDataGrid').datagrid({
- columns:columns,
- frozenColumns:frozenColumns
- });
- toolBar("exchangeHouseIntentDataGrid","setExchangeHouseIntentDialog","exchangeHouseIntent");
- }
-
- /*清除查询条件**/
- 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 nameFormatter = function(value , row , index){
- return "<a href='javascript:' onclick=exchangeHouseIntentDetail(" + row.id + ")>"+row.securityPerson.name+"</a>";
- };
-
-
-
- /**身份证号*/
- var idCardFormatter = function(value , row , index){
- return row.securityPerson.idCard ;
- };
- /**电话号码*/
- var phoneFormatter = function(value , row , index){
- return row.securityPerson.phone ;
- };
-
- /**人员类别格式化*/
- var personTypeFormatter = function(value , row , index){
- var personType = "";
- for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
- if(personTypeObj[nItem].code == row.securityPerson.personType){
- personType = personTypeObj[nItem].value;
- break;
- }
- }
- return personType;
- };
-
- /**申请类别格式化*/
- var applyTypeFormatter = function(value , row , index){
- var applyType = "";
- for(var nItem = 0; nItem < applyTypeObj.length; nItem++ ){
- if(applyTypeObj[nItem].code == row.securityPerson.applyType){
- applyType = applyTypeObj[nItem].value;
- break;
- }
- }
- return applyType;
- };
-
-
- /**家庭关系格式*/
- var relativeFormatter = function(value , row , index){
- var relative = "";
- for(var nItem = 0; nItem < relativeObj.length; nItem++ ){
- if(relativeObj[nItem].code == row.relative){
- relative = relativeObj[nItem].value;
- break;
- }
- }
- return relative;
- };
-
- /**居住地点*/
- var addressFormatter = function(value , row , index){
- return row.house.address ;
- };
- /**面积*/
- var areaFormatter = function(value , row , index){
- return row.house.area ;
- };
- /**详细*/
- var detailsFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=exchangeHouseIntentDetail('" + row.id + "') style='cursor:pointer' />";
- };
-
- /**房源详细页面对话框*/
- var exchangeHouseIntentDetail = function(id){
- $("#exchangeHouseIntentDetailDialog").dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#exchangeHouseIntentDetailDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- exchangeHouseIntent_detail_load(id);
- }
- }
- );
- };
-
- /**增加换房记录*/
- function exchangeHouseIntentAdd(){
- $('#addExchangeHouseIntentDialog').dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- exchangeHouseIntent_add_submit();
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#addExchangeHouseIntentDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- exchangeHouseIntent_add_load();
- }
- }
- );
- }
-
-
- /**修改*/
- var updateFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=exchangeHouseIntentUpdate('" + row.id + "') style='cursor:pointer' />";
- };
-
- function updateRow(){
- var row = $('#exchangeHouseIntentDataGrid').datagrid('getSelected');
- if(row == null){
- $.messager.alert("提示","请先选择要修改的换房意向!");
- }
- var id = row.id;
- exchangeHouseIntentUpdate(id)
- }
-
- /**增加换房记录*/
- function exchangeHouseIntentUpdate(id){
- $('#updateExchangeHouseIntentDialog').dialog(
- {
- buttons : [
- {
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- exchangeHouseIntent_update_submit();
- }
- },
- {
- text : '取消',
- iconCls : 'icon-cancel',
- handler : function(){
- $("#updateExchangeHouseIntentDialog").dialog("close");
- }
- }
- ],
- onLoad : function(){
- exchangeHouseIntent_update_load(id);
- }
- }
- );
- }
-
- /**删除*/
- var delFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/images/edit_remove.png' title='删除' onclick=deleteRow(" + row.id + ") style='cursor:pointer' />";
- };
-
- /**删除功能*/
- function deleteRow(){
- var row = $('#exchangeHouseIntentDataGrid').datagrid('getSelected');
- if(row == null){
- $.messager.alert("提示","请先选择要删除的换房意向!");
- }
- var id = row.id;
- $.messager.confirm('删除提示', '确定删除这条记录吗?', function(r){
- if (r){
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "exchangeHouseIntentAction_deleteExchangeHouseIntent",//要访问的后台地址
- data: "exchangeHouseIntent.id="+id,//要发送的数据
- complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
- success: function(msg){//msg为返回的数据,在这里做数据绑定
- if(msg.success){
- $.messager.alert('提示','删除成功!');
- $('#exchangeHouseIntentDataGrid').datagrid('reload');
- }else{
- $.messager.alert('提示','删除失败!');
- }
- }
- });
- }
- });
- }
- /**匹配房源*/
- var matchFormatter = function(value , row , index){
- return "<img src='<%=basePath%>/js/easyui/themes/itemicon/match.png' title='匹配房源' onclick=matchHouse(" + row.id + ") style='cursor:pointer' />";
- };
-
- function matchHouse(id){
- $("#matchHouseListDialog").dialog({
- buttons:[{
- text : '确定',
- iconCls : 'icon-ok',
- handler : function(){
- $("#matchHouseListDialog").dialog("close");
- }
- }],
- onLoad : function(){
- list_load(id);
- }
- });
- }
- </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.securityPerson.name" 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>
- </td>
- </tr>
- <tr>
- <td align="right"><span>小区名称</span></td>
- <td colspan="3" style="font-size: 12px">
- <select id="area" style="width:100px;">
- <option value="">全部</option>
- </select>
- <input id="communityId">
- <input id="no" style="width: 60px;">幢
- <input id="houseNumber" style="width: 80px;">室
- </td>
- <td>
- <a href="javascript:exchangeHouseIntentAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">增加</a>
- <a href="javascript:updateRow();" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
- <a href="javascript:deleteRow();" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
- </td>
- </tr>
- </table>
- <div class="clear"></div>
- </div>
-
- <table id="exchangeHouseIntentDataGrid" title="房源入住情况">
- <!--<thead>
- <tr>
- <th data-options="field:'id',checkbox:true,width:30">ID</th>
- <th data-options="field:'name',align:'center',width:90,formatter:nameFormatter">换房意向登记人</th>
- <th data-options="field:'idCard',align:'center',width:140,formatter:idCardFormatter">登记人身份证号</th>
- <th data-options="field:'phone',align:'center',width:120,formatter:phoneFormatter">登记人联系电话</th>
- <th data-options="field:'address',align:'center',width:200,formatter:addressFormatter">登记人房源</th>
- <th data-options="field:'area',width:60,formatter:areaFormatter">房源面积</th>
- <th data-options="field:'communitieNames',align:'center',width:200">意向房源</th>
- <th data-options="field:'details',width:60,align:'center',formatter:detailsFormatter">查看详情</th>
- <th data-options="field:'update',width:60,align:'center',formatter:updateFormatter">修改</th>
- <th data-options="field:'delete',width:60,align:'center',formatter:delFormatter">删除</th>
- <th data-options="field:'match',width:60,align:'center',formatter:matchFormatter">匹配</th>
- </tr>
- </thead>-->
- </table>
- </div>
- </div>
- <div id="exchangeHouseIntentDetailDialog" data-options="title:' 查看详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toDetail'">
- </div>
- <div id="addExchangeHouseIntentDialog" data-options="title:' 添加换房意向登记信息',iconCls:'icon-add',width:800,height:400,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toAdd'">
- </div>
- <div id="updateExchangeHouseIntentDialog" data-options="title:' 修改换房意向登记信息',iconCls:'icon-edit',width:800,height:400,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toUpdate'">
- </div>
- <div id="securityPersonHouseSelectDialog" data-options="title:' 选择换房意向登记人',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/securityPersonHouseAction_toSecurityPersonHouseSelect1'">
- </div>
- <div id="matchHouseListDialog" data-options="title:' 房源匹配',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toMatchHouseList'">
- </div>
- <div id="setExchangeHouseIntentDialog" data-options="title:' 个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=exchangeHouseIntent'">
- </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>
|