exchangeHouseIntentList.jsp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  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. var personTypeObj = null;
  7. var personType_array = null;
  8. //家庭关系
  9. var relativeObj = null;
  10. var relative_array = null;
  11. //婚姻状况
  12. var maritalStatusObj = null;
  13. var maritalStatus_array = null;
  14. //申请保障类型
  15. var applyTypeObj = null;
  16. var applyType_array = null;
  17. //家庭住房困难类型
  18. var diffcultTypeObj = null;
  19. var diffcultType_array = null;
  20. //私有或公有
  21. var privateOrPublicObj = null;
  22. var privateOrPublic_array = null;
  23. //产权性质
  24. var propertyTypeObj = null;
  25. var propertyType_array = null;
  26. //是否
  27. var yesOrNoObj = null;
  28. var yesOrNo_array = null;
  29. //审核状态
  30. var stateObj = null;
  31. var state_array = null;
  32. //家庭关系
  33. var relativeObj = null;
  34. var relative_array = null;
  35. //人员类别
  36. var personTypeObj = null;
  37. var personType_array = null;
  38. //审核意见
  39. var opinionObj = null;
  40. var opinion_array = null;
  41. //区
  42. var areaObj = null;
  43. var area_array = null;
  44. //街道
  45. var streetObj = null;
  46. var street_array = null;
  47. //居委会
  48. var neighborhoodObj = null;
  49. var neighborhood_array = null;
  50. //工作现状
  51. var workStateObj = null;
  52. var workState_array = null;
  53. //新就业人员
  54. var newEmploymentTypeObj = null;
  55. var newEmploymentType_array = null;
  56. /**用户显示区*/
  57. $(function() {
  58. //工作现状
  59. $.ajax({
  60. type: "post",//使用post方法访问后台
  61. dataType: "json",//返回json格式的数据
  62. url: "aa10Action_listAa10All",//要访问的后台地址
  63. data:{"aa10.letter":"workState" ,"aa10.name":"工作现状" },
  64. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  65. success: function(msg){//msg为返回的数据,在这里做数据绑定
  66. if(msg.success){
  67. workStateObj = msg.obj.rows;
  68. var select_arr = [];
  69. var data = workStateObj;
  70. for(var nItem = 0; nItem < data.length; nItem++ ){
  71. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  72. }
  73. workState_array = select_arr.join("");
  74. }
  75. }
  76. });
  77. //新就业人员类别
  78. $.ajax({
  79. type: "post",//使用post方法访问后台
  80. dataType: "json",//返回json格式的数据
  81. url: "aa10Action_listAa10All",//要访问的后台地址
  82. data:{"aa10.letter":"newEmploymentType" ,"aa10.name":"新就业人员类别" },
  83. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  84. success: function(msg){//msg为返回的数据,在这里做数据绑定
  85. if(msg.success){
  86. newEmploymentTypeObj = msg.obj.rows;
  87. var select_arr = [];
  88. var data = newEmploymentTypeObj;
  89. for(var nItem = 0; nItem < data.length; nItem++ ){
  90. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  91. }
  92. newEmploymentType_array = select_arr.join("");
  93. }
  94. }
  95. });
  96. //婚姻情况
  97. $.ajax({
  98. type: "post",//使用post方法访问后台
  99. dataType: "json",//返回json格式的数据
  100. url: "aa10Action_listAa10All",//要访问的后台地址
  101. data:{"aa10.letter":"maritalStatus" ,"aa10.name":"婚姻情况" },
  102. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  103. success: function(msg){//msg为返回的数据,在这里做数据绑定
  104. if(msg.success){
  105. maritalStatusObj = msg.obj.rows;
  106. var select_arr = [];
  107. var data = maritalStatusObj;
  108. for(var nItem = 0; nItem < data.length; nItem++ ){
  109. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  110. }
  111. maritalStatus_array = select_arr.join("");
  112. }
  113. }
  114. });
  115. //性别
  116. $.ajax({
  117. type: "post",//使用post方法访问后台
  118. dataType: "json",//返回json格式的数据
  119. url: "aa10Action_listAa10All",//要访问的后台地址
  120. data:{"aa10.letter":"sex" ,"aa10.name":"性别" },
  121. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  122. success: function(msg){//msg为返回的数据,在这里做数据绑定
  123. if(msg.success){
  124. sexObj = msg.obj.rows;
  125. var select_arr = [];
  126. var data = sexObj;
  127. for(var nItem = 0; nItem < data.length; nItem++ ){
  128. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  129. }
  130. sex_array = select_arr.join("");
  131. }
  132. }
  133. });
  134. //申请业务类别
  135. $.ajax({
  136. type: "post",//使用post方法访问后台
  137. dataType: "json",//返回json格式的数据
  138. url: "aa10Action_listAa10All",//要访问的后台地址
  139. data:{"aa10.letter":"applyType" ,"aa10.name":"保障业务类别" },
  140. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  141. success: function(msg){//msg为返回的数据,在这里做数据绑定
  142. if(msg.success){
  143. applyTypeObj = msg.obj.rows;
  144. var select_arr = [];
  145. var data = applyTypeObj;
  146. for(var nItem = 0; nItem < data.length; nItem++ ){
  147. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  148. }
  149. applyType_array = select_arr.join("");
  150. $("#applyType").append(applyType_array);
  151. }
  152. }
  153. });
  154. //家庭住房困难类型
  155. $.ajax({
  156. type: "post",//使用post方法访问后台
  157. dataType: "json",//返回json格式的数据
  158. url: "aa10Action_listAa10All",//要访问的后台地址
  159. data:{"aa10.letter":"diffcultType" ,"aa10.name":"家庭住房困难类型" },
  160. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  161. success: function(msg){//msg为返回的数据,在这里做数据绑定
  162. if(msg.success){
  163. diffcultTypeObj = msg.obj.rows;
  164. var select_arr = [];
  165. var data = diffcultTypeObj;
  166. for(var nItem = 0; nItem < data.length; nItem++ ){
  167. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  168. }
  169. diffcultType_array = select_arr.join("");
  170. }
  171. }
  172. });
  173. //私有或公有
  174. $.ajax({
  175. type: "post",//使用post方法访问后台
  176. dataType: "json",//返回json格式的数据
  177. url: "aa10Action_listAa10All",//要访问的后台地址
  178. data:{"aa10.letter":"privateOrPublic" ,"aa10.name":"私有或公有" },
  179. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  180. success: function(msg){//msg为返回的数据,在这里做数据绑定
  181. if(msg.success){
  182. privateOrPublicObj = msg.obj.rows;
  183. var select_arr = [];
  184. var data = privateOrPublicObj;
  185. for(var nItem = 0; nItem < data.length; nItem++ ){
  186. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  187. }
  188. privateOrPublic_array = select_arr.join("");
  189. }
  190. }
  191. });
  192. //房屋产权性质
  193. $.ajax({
  194. type: "post",//使用post方法访问后台
  195. dataType: "json",//返回json格式的数据
  196. url: "aa10Action_listAa10All",//要访问的后台地址
  197. data:{"aa10.letter":"propertyType" ,"aa10.name":"产权性质" },
  198. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  199. success: function(msg){//msg为返回的数据,在这里做数据绑定
  200. if(msg.success){
  201. propertyTypeObj = msg.obj.rows;
  202. var select_arr = [];
  203. var data = propertyTypeObj;
  204. for(var nItem = 0; nItem < data.length; nItem++ ){
  205. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  206. }
  207. propertyType_array = select_arr.join("");
  208. }
  209. }
  210. });
  211. //是否
  212. $.ajax({
  213. type: "post",//使用post方法访问后台
  214. dataType: "json",//返回json格式的数据
  215. url: "aa10Action_listAa10All",//要访问的后台地址
  216. data:{"aa10.letter":"yesOrNo" ,"aa10.name":"是否" },
  217. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  218. success: function(msg){//msg为返回的数据,在这里做数据绑定
  219. if(msg.success){
  220. yesOrNoObj = msg.obj.rows;
  221. var select_arr = [];
  222. var data = yesOrNoObj;
  223. for(var nItem = 0; nItem < data.length; nItem++ ){
  224. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  225. }
  226. yesOrNo_array = select_arr.join("");
  227. }
  228. }
  229. });
  230. //人员类别
  231. $.ajax({
  232. type: "post",//使用post方法访问后台
  233. dataType: "json",//返回json格式的数据
  234. url: "aa10Action_listAa10All",//要访问的后台地址
  235. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  236. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  237. success: function(msg){//msg为返回的数据,在这里做数据绑定
  238. if(msg.success){
  239. personTypeObj = msg.obj.rows;
  240. var select_arr = [];
  241. var data = personTypeObj;
  242. for(var nItem = 0; nItem < data.length; nItem++ ){
  243. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  244. }
  245. personType_array = select_arr.join("");
  246. $("#personType").append(personType_array);
  247. }
  248. }
  249. });
  250. //审批状态
  251. $.ajax({
  252. type: "post",//使用post方法访问后台
  253. dataType: "json",//返回json格式的数据
  254. url: "aa10Action_listAa10All",//要访问的后台地址
  255. data:{"aa10.letter":"reviewState" ,"aa10.name":"审核状态" },
  256. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  257. success: function(msg){//msg为返回的数据,在这里做数据绑定
  258. if(msg.success){
  259. stateObj = msg.obj.rows;
  260. var select_arr = [];
  261. var data = stateObj;
  262. for(var nItem = 0; nItem < data.length; nItem++ ){
  263. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  264. }
  265. state_array = select_arr.join("");
  266. }
  267. }
  268. });
  269. //家庭关系
  270. $.ajax({
  271. type: "post",//使用post方法访问后台
  272. dataType: "json",//返回json格式的数据
  273. url: "aa10Action_listAa10All",//要访问的后台地址
  274. data:{"aa10.letter":"homeRelative" ,"aa10.name":"家庭关系" },
  275. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  276. success: function(msg){//msg为返回的数据,在这里做数据绑定
  277. if(msg.success){
  278. relativeObj = msg.obj.rows;
  279. var select_arr = [];
  280. var data = relativeObj;
  281. for(var nItem = 0; nItem < data.length; nItem++ ){
  282. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  283. }
  284. relative_array = select_arr.join("");
  285. }
  286. }
  287. });
  288. //审批意见
  289. $.ajax({
  290. type: "post",//使用post方法访问后台
  291. dataType: "json",//返回json格式的数据
  292. url: "aa10Action_listAa10All",//要访问的后台地址
  293. data:{"aa10.letter":"opinion" ,"aa10.name":"审核意见" },
  294. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  295. success: function(msg){//msg为返回的数据,在这里做数据绑定
  296. if(msg.success){
  297. opinionObj = msg.obj.rows;
  298. var select_arr = [];
  299. var data = opinionObj;
  300. for(var nItem = 0; nItem < data.length; nItem++ ){
  301. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  302. }
  303. opinion_array = select_arr.join("");
  304. }
  305. }
  306. });
  307. //获取区
  308. $.ajax({
  309. type: "post",//使用post方法访问后台
  310. dataType: "json",//返回json格式的数据
  311. url: "houseRegisterAction_listChildren",//要访问的后台地址
  312. //data:{"id":id},
  313. success: function(msg){//msg为返回的数据,在这里做数据绑定
  314. if(msg.success){
  315. areaObj = msg.obj.rows;
  316. var select_arr = [];
  317. var data = areaObj;
  318. for(var nItem = 0; nItem < data.length; nItem++ ){
  319. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  320. }
  321. area_array = select_arr.join("");
  322. }
  323. }
  324. });
  325. $.ajax({
  326. type: "post",
  327. dataType: "json",
  328. url: "columnSetAction_listColumn?tname=exchangeHouseIntent",
  329. complete :function(){$("#load").hide();},
  330. success: function(msg){
  331. if(msg.success){
  332. setId();
  333. var data = msg.obj;
  334. for(var i = 0;i<data.length;i++){
  335. if("1"==data[i].type){
  336. if(typeof(data[i].formatter)!="undefined"){
  337. data[i].formatter=eval(data[i].formatter);
  338. }
  339. user_columns.push(data[i]);
  340. }else{
  341. user_frozenColumns.push(data[i]);
  342. }
  343. }
  344. columns.push(user_columns);
  345. frozenColumns.push(user_frozenColumns);
  346. $('#exchangeHouseIntentDataGrid').datagrid({
  347. rownumbers:true,
  348. fit:true,
  349. pageSize:20,
  350. pageList : [ 10, 20, 30, 40, 50 ],
  351. fitColumns:false,
  352. border:false,
  353. sortOrder:'desc',
  354. pagination:true,
  355. idField:'id',
  356. url:whzl.basePath + '/exchangeHouseIntentAction_listExchangeHouseIntent',
  357. toolbar:'#searchtool',
  358. checkOnSelect:true,
  359. selectOnCheck:true,
  360. showFooter: true,
  361. columns:columns,
  362. frozenColumns:frozenColumns,
  363. loadFilter:function(result){
  364. if(result.success){
  365. return result.obj;
  366. }else{
  367. $.messager.alert("提示",result.message);
  368. return ;
  369. }
  370. }
  371. });
  372. toolBar("exchangeHouseIntentDataGrid","setExchangeHouseIntentDialog","exchangeHouseIntent");
  373. }
  374. }
  375. });
  376. /*$('#exchangeHouseIntentDataGrid').datagrid({
  377. rownumbers:true,
  378. fit:true,
  379. pageSize:20,
  380. pageList : [ 10, 20, 30, 40, 50 ],
  381. fitColumns:false,
  382. border:false,
  383. sortOrder:'desc',
  384. pagination:true,
  385. idField:'id',
  386. url:whzl.basePath + '/exchangeHouseIntentAction_listExchangeHouseIntent',
  387. toolbar:'#searchtool',
  388. checkOnSelect:true,
  389. selectOnCheck:false,
  390. nowrap:true,
  391. loadFilter:function(result){
  392. if(result.success){
  393. return result.obj;
  394. }else{
  395. $.messager.alert("提示",result.message);
  396. return ;
  397. }
  398. }
  399. });*/
  400. });
  401. /**婚姻状况格式*/
  402. var maritalStatusFormatter = function(value , row , index){
  403. var maritalStatus = "";
  404. for(var nItem = 0; nItem < maritalStatusObj.length; nItem++ ){
  405. if(maritalStatusObj[nItem].code == row.maritalStatus){
  406. maritalStatus = maritalStatusObj[nItem].value;
  407. break;
  408. }
  409. }
  410. return maritalStatus;
  411. };
  412. /**婚姻状况编辑*/
  413. var maritalStatusEditor = {
  414. type:'combobox',
  415. options:{
  416. valueField:'code',
  417. textField:'value',
  418. method:'get',
  419. url:'aa10Action_listAa10All?aa10.letter=maritalStatus',
  420. required:true,
  421. loadFilter:function(result){
  422. if(result.success){
  423. return result.obj.rows;
  424. }else{
  425. $.messager.alert("提示",result.message);
  426. return ;
  427. }
  428. }
  429. }
  430. };
  431. /**是否在保障范围内格式*/
  432. var isInRangeFormatter = function(value , row , index){
  433. var yesOrNo = "";
  434. for(var nItem = 0; nItem < yesOrNoObj.length; nItem++ ){
  435. if(yesOrNoObj[nItem].code == row.isInRange){
  436. yesOrNo = yesOrNoObj[nItem].value;
  437. break;
  438. }
  439. }
  440. return yesOrNo;
  441. };
  442. /**是否在保障范围内编辑*/
  443. var isInRangeEditor = {
  444. type:'combobox',
  445. options:{
  446. valueField:'code',
  447. textField:'value',
  448. method:'get',
  449. url:'aa10Action_listAa10All?aa10.letter=yesOrNo',
  450. required:true,
  451. loadFilter:function(result){
  452. if(result.success){
  453. return result.obj.rows;
  454. }else{
  455. $.messager.alert("提示",result.message);
  456. return ;
  457. }
  458. }
  459. }
  460. };
  461. /**小数类型*/
  462. var decimalEditor = {
  463. type:'numberbox',
  464. options:{
  465. precision:2
  466. }
  467. }
  468. /**家庭关系编辑*/
  469. var relativeEditor = {
  470. type:'combobox',
  471. options:{
  472. valueField:'code',
  473. textField:'value',
  474. method:'get',
  475. url:'aa10Action_listAa10All?aa10.letter=homeRelative&aa10.name=家庭关系',
  476. required:true,
  477. loadFilter:function(result){
  478. if(result.success){
  479. return result.obj.rows;
  480. }else{
  481. $.messager.alert("提示",result.message);
  482. return ;
  483. }
  484. }
  485. }
  486. };
  487. /**查询*/
  488. function searchFun(){
  489. $("#exchangeHouseIntentDataGrid").datagrid("load", {
  490. "exchangeHouseIntent.securityPerson.name":$("#tblQuery").find("input[id='securityPersonName']").val(),
  491. "exchangeHouseIntent.securityPerson.idCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val(),
  492. "exchangeHouseIntent.house.community.id":trim($('#communityId').combobox("getValue")),
  493. "exchangeHouseIntent.house.no":trim($('#no').combobox("getValue")),
  494. "exchangeHouseIntent.house.houseNumber":trim($('#houseNumber').combobox("getValue"))
  495. });
  496. $('#exchangeHouseIntentDataGrid').datagrid({
  497. columns:columns,
  498. frozenColumns:frozenColumns
  499. });
  500. toolBar("exchangeHouseIntentDataGrid","setExchangeHouseIntentDialog","exchangeHouseIntent");
  501. }
  502. /*清除查询条件**/
  503. function ClearQuery() {
  504. $("#tblQuery").find("input").val("");
  505. $("#tblQuery").find("select").val("-1");
  506. }
  507. var dateFormatter = function(value,row,index){
  508. if(value != null){
  509. return value.substring(0,10);
  510. }else{
  511. return "";
  512. }
  513. }
  514. /**人员名称*/
  515. var nameFormatter = function(value , row , index){
  516. return "<a href='javascript:' onclick=exchangeHouseIntentDetail(" + row.id + ")>"+row.securityPerson.name+"</a>";
  517. };
  518. /**身份证号*/
  519. var idCardFormatter = function(value , row , index){
  520. return row.securityPerson.idCard ;
  521. };
  522. /**电话号码*/
  523. var phoneFormatter = function(value , row , index){
  524. return row.securityPerson.phone ;
  525. };
  526. /**人员类别格式化*/
  527. var personTypeFormatter = function(value , row , index){
  528. var personType = "";
  529. for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
  530. if(personTypeObj[nItem].code == row.securityPerson.personType){
  531. personType = personTypeObj[nItem].value;
  532. break;
  533. }
  534. }
  535. return personType;
  536. };
  537. /**申请类别格式化*/
  538. var applyTypeFormatter = function(value , row , index){
  539. var applyType = "";
  540. for(var nItem = 0; nItem < applyTypeObj.length; nItem++ ){
  541. if(applyTypeObj[nItem].code == row.securityPerson.applyType){
  542. applyType = applyTypeObj[nItem].value;
  543. break;
  544. }
  545. }
  546. return applyType;
  547. };
  548. /**家庭关系格式*/
  549. var relativeFormatter = function(value , row , index){
  550. var relative = "";
  551. for(var nItem = 0; nItem < relativeObj.length; nItem++ ){
  552. if(relativeObj[nItem].code == row.relative){
  553. relative = relativeObj[nItem].value;
  554. break;
  555. }
  556. }
  557. return relative;
  558. };
  559. /**居住地点*/
  560. var addressFormatter = function(value , row , index){
  561. return row.house.address ;
  562. };
  563. /**面积*/
  564. var areaFormatter = function(value , row , index){
  565. return row.house.area ;
  566. };
  567. /**详细*/
  568. var detailsFormatter = function(value , row , index){
  569. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=exchangeHouseIntentDetail('" + row.id + "') style='cursor:pointer' />";
  570. };
  571. /**房源详细页面对话框*/
  572. var exchangeHouseIntentDetail = function(id){
  573. $("#exchangeHouseIntentDetailDialog").dialog(
  574. {
  575. buttons : [
  576. {
  577. text : '确定',
  578. iconCls : 'icon-ok',
  579. handler : function(){
  580. $("#exchangeHouseIntentDetailDialog").dialog("close");
  581. }
  582. }
  583. ],
  584. onLoad : function(){
  585. exchangeHouseIntent_detail_load(id);
  586. }
  587. }
  588. );
  589. };
  590. /**增加换房记录*/
  591. function exchangeHouseIntentAdd(){
  592. $('#addExchangeHouseIntentDialog').dialog(
  593. {
  594. buttons : [
  595. {
  596. text : '确定',
  597. iconCls : 'icon-ok',
  598. handler : function(){
  599. exchangeHouseIntent_add_submit();
  600. }
  601. },
  602. {
  603. text : '取消',
  604. iconCls : 'icon-cancel',
  605. handler : function(){
  606. $("#addExchangeHouseIntentDialog").dialog("close");
  607. }
  608. }
  609. ],
  610. onLoad : function(){
  611. exchangeHouseIntent_add_load();
  612. }
  613. }
  614. );
  615. }
  616. /**修改*/
  617. var updateFormatter = function(value , row , index){
  618. return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=exchangeHouseIntentUpdate('" + row.id + "') style='cursor:pointer' />";
  619. };
  620. function updateRow(){
  621. var row = $('#exchangeHouseIntentDataGrid').datagrid('getSelected');
  622. if(row == null){
  623. $.messager.alert("提示","请先选择要修改的换房意向!");
  624. }
  625. var id = row.id;
  626. exchangeHouseIntentUpdate(id)
  627. }
  628. /**增加换房记录*/
  629. function exchangeHouseIntentUpdate(id){
  630. $('#updateExchangeHouseIntentDialog').dialog(
  631. {
  632. buttons : [
  633. {
  634. text : '确定',
  635. iconCls : 'icon-ok',
  636. handler : function(){
  637. exchangeHouseIntent_update_submit();
  638. }
  639. },
  640. {
  641. text : '取消',
  642. iconCls : 'icon-cancel',
  643. handler : function(){
  644. $("#updateExchangeHouseIntentDialog").dialog("close");
  645. }
  646. }
  647. ],
  648. onLoad : function(){
  649. exchangeHouseIntent_update_load(id);
  650. }
  651. }
  652. );
  653. }
  654. /**删除*/
  655. var delFormatter = function(value , row , index){
  656. return "<img src='<%=basePath%>/images/edit_remove.png' title='删除' onclick=deleteRow(" + row.id + ") style='cursor:pointer' />";
  657. };
  658. /**删除功能*/
  659. function deleteRow(){
  660. var row = $('#exchangeHouseIntentDataGrid').datagrid('getSelected');
  661. if(row == null){
  662. $.messager.alert("提示","请先选择要删除的换房意向!");
  663. }
  664. var id = row.id;
  665. $.messager.confirm('删除提示', '确定删除这条记录吗?', function(r){
  666. if (r){
  667. $.ajax({
  668. type: "post",//使用get方法访问后台
  669. dataType: "json",//返回json格式的数据
  670. url: "exchangeHouseIntentAction_deleteExchangeHouseIntent",//要访问的后台地址
  671. data: "exchangeHouseIntent.id="+id,//要发送的数据
  672. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  673. success: function(msg){//msg为返回的数据,在这里做数据绑定
  674. if(msg.success){
  675. $.messager.alert('提示','删除成功!');
  676. $('#exchangeHouseIntentDataGrid').datagrid('reload');
  677. }else{
  678. $.messager.alert('提示','删除失败!');
  679. }
  680. }
  681. });
  682. }
  683. });
  684. }
  685. /**匹配房源*/
  686. var matchFormatter = function(value , row , index){
  687. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/match.png' title='匹配房源' onclick=matchHouse(" + row.id + ") style='cursor:pointer' />";
  688. };
  689. function matchHouse(id){
  690. $("#matchHouseListDialog").dialog({
  691. buttons:[{
  692. text : '确定',
  693. iconCls : 'icon-ok',
  694. handler : function(){
  695. $("#matchHouseListDialog").dialog("close");
  696. }
  697. }],
  698. onLoad : function(){
  699. list_load(id);
  700. }
  701. });
  702. }
  703. </script>
  704. <div class="easyui-layout" data-options="fit:true,border:false">
  705. <div data-options="region:'center',border:false">
  706. <div id="searchtool" data-options="region:'north' , border:false">
  707. <div class="clear"></div>
  708. <table id="tblQuery" style="width:100%;">
  709. <tr>
  710. <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>
  711. <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>
  712. <td align="left" style="width: 46%;">
  713. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  714. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  715. </td>
  716. </tr>
  717. <tr>
  718. <td align="right"><span>小区名称</span></td>
  719. <td colspan="3" style="font-size: 12px">
  720. <select id="area" style="width:100px;">
  721. <option value="">全部</option>
  722. </select>
  723. <input id="communityId">
  724. <input id="no" style="width: 60px;">幢
  725. <input id="houseNumber" style="width: 80px;">室
  726. </td>
  727. <td>
  728. <a href="javascript:exchangeHouseIntentAdd();" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">增加</a>
  729. <a href="javascript:updateRow();" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
  730. <a href="javascript:deleteRow();" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
  731. </td>
  732. </tr>
  733. </table>
  734. <div class="clear"></div>
  735. </div>
  736. <table id="exchangeHouseIntentDataGrid" title="房源入住情况">
  737. <!--<thead>
  738. <tr>
  739. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  740. <th data-options="field:'name',align:'center',width:90,formatter:nameFormatter">换房意向登记人</th>
  741. <th data-options="field:'idCard',align:'center',width:140,formatter:idCardFormatter">登记人身份证号</th>
  742. <th data-options="field:'phone',align:'center',width:120,formatter:phoneFormatter">登记人联系电话</th>
  743. <th data-options="field:'address',align:'center',width:200,formatter:addressFormatter">登记人房源</th>
  744. <th data-options="field:'area',width:60,formatter:areaFormatter">房源面积</th>
  745. <th data-options="field:'communitieNames',align:'center',width:200">意向房源</th>
  746. <th data-options="field:'details',width:60,align:'center',formatter:detailsFormatter">查看详情</th>
  747. <th data-options="field:'update',width:60,align:'center',formatter:updateFormatter">修改</th>
  748. <th data-options="field:'delete',width:60,align:'center',formatter:delFormatter">删除</th>
  749. <th data-options="field:'match',width:60,align:'center',formatter:matchFormatter">匹配</th>
  750. </tr>
  751. </thead>-->
  752. </table>
  753. </div>
  754. </div>
  755. <div id="exchangeHouseIntentDetailDialog" data-options="title:'&nbsp;查看详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toDetail'">
  756. </div>
  757. <div id="addExchangeHouseIntentDialog" data-options="title:'&nbsp;添加换房意向登记信息',iconCls:'icon-add',width:800,height:400,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toAdd'">
  758. </div>
  759. <div id="updateExchangeHouseIntentDialog" data-options="title:'&nbsp;修改换房意向登记信息',iconCls:'icon-edit',width:800,height:400,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toUpdate'">
  760. </div>
  761. <div id="securityPersonHouseSelectDialog" data-options="title:'&nbsp;选择换房意向登记人',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/securityPersonHouseAction_toSecurityPersonHouseSelect1'">
  762. </div>
  763. <div id="matchHouseListDialog" data-options="title:'&nbsp;房源匹配',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toMatchHouseList'">
  764. </div>
  765. <div id="setExchangeHouseIntentDialog" data-options="title:'&nbsp;个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=exchangeHouseIntent'">
  766. </div>
  767. <script type="text/javascript">
  768. <!--
  769. parent.$.messager.progress('close');
  770. $('#area').combobox({
  771. url: whzl.basePath + '/houseRegisterAction_listChildrenCombobox',
  772. valueField:'value',
  773. textField:'text',
  774. onChange:function (newValue,oldValue) {
  775. $('#communityId').combobox("setValue","");
  776. $('#no').combobox("setValue","");
  777. $('#houseNumber').combobox("setValue","");
  778. $('#communityId').combobox('reload',whzl.basePath + '/communityAction_findAll?community.area='+newValue);
  779. }
  780. });
  781. $('#communityId').combobox({
  782. url: whzl.basePath + '/communityAction_findAll',
  783. valueField:'value',
  784. textField:'text',
  785. filter:function(q,row){
  786. var opts=$(this).combobox("options");
  787. //return row[opts.textField].indexOf(q)==0;//
  788. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  789. },
  790. onChange:function (newValue,oldValue) {
  791. $('#no').combobox("setValue","");
  792. $('#houseNumber').combobox("setValue","");
  793. $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
  794. }
  795. });
  796. $('#no').combobox({
  797. //editable:false,
  798. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
  799. valueField:'value',
  800. textField:'text',
  801. filter:function(q,row){
  802. var opts=$(this).combobox("options");
  803. //return row[opts.textField].indexOf(q)==0;//
  804. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  805. },
  806. onChange:function (newValue,oldValue) {
  807. $('#houseNumber').combobox("setValue","");
  808. $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+newValue);
  809. }
  810. });
  811. $('#houseNumber').combobox({
  812. //editable:false,
  813. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
  814. valueField:'value',
  815. textField:'text',
  816. filter:function(q,row){
  817. var opts=$(this).combobox("options");
  818. //return row[opts.textField].indexOf(q)==0;//
  819. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  820. }
  821. });
  822. //-->
  823. </script>