houseList1.jsp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <%--房源收租 --%>
  2. <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
  3. <jsp:include page="../../common/include.jsp" />
  4. <% String basePath = request.getScheme()+ "://" + request.getServerName() + ":" +request.getServerPort() + request.getContextPath(); %>
  5. <script type="text/javascript">
  6. //家庭收入情况
  7. var incomeTypeObj = null;
  8. var incomeType_array = null;
  9. $.ajax({
  10. type: "post",//使用post方法访问后台
  11. dataType: "json",//返回json格式的数据
  12. url: "aa10Action_listAa10All",//要访问的后台地址
  13. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  14. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  15. success: function(msg){//msg为返回的数据,在这里做数据绑定
  16. if(msg.success){
  17. incomeTypeObj = msg.obj.rows;
  18. }
  19. }
  20. });
  21. /**小区显示区*/
  22. $(function() {
  23. $('#houseDataGrid').datagrid({
  24. rownumbers:true,
  25. fit:true,
  26. pageSize:10,
  27. pageList : [ 10, 20, 30, 40, 50 ],
  28. fitColumns:false,
  29. border:false,
  30. sortOrder:'desc',
  31. pagination:true,
  32. idField:'id',
  33. toolbar:'#searchtool',
  34. url:whzl.basePath + '/rent10Action_houseList',
  35. pageNumber:1,
  36. nowrap:true,
  37. loadFilter:function(result){
  38. if(result.success){
  39. return result.obj;
  40. }else{
  41. $.messager.alert("提示",result.message);
  42. return ;
  43. }
  44. },
  45. rowStyler:function(index,row){
  46. if("1" == row.specialRemark){
  47. return "background-color:#00868B;"
  48. }
  49. if("1" == row.status){
  50. if(row.endTime == null){
  51. }else{
  52. var day = calDay(row.endTime);
  53. if(day<0&&day>-30){
  54. return "background-color:#B8E455;"
  55. }else if(day<=-30){
  56. return "background";
  57. }else if(day>=0){
  58. return "background-color:#FFC0CB;";
  59. }
  60. }
  61. }
  62. }
  63. });
  64. });
  65. /**查询*/
  66. function searchFun(){
  67. $("#houseDataGrid").datagrid("load", {
  68. "house.community.id":trim($('#communityId').combobox("getValue")),
  69. "house.no":trim($('#no').combobox("getValue")),
  70. "house.houseNumber":trim($('#houseNumber').combobox("getValue")),
  71. "house.lesseeId":trim($('#lesseeId').val()),
  72. "houseState":$("#houseState").val(),
  73. "unpaidStartDay":$("#unpaidStartDay").datebox('getValue'),
  74. "unpaidEndDay":$("#unpaidEndDay").datebox('getValue')
  75. });
  76. }
  77. /*清除查询条件**/
  78. function ClearQuery() {
  79. $("#tblQuery").find("input").val("");
  80. $("#tblQuery").find("select").val("-1");
  81. }
  82. /**导入房源*/
  83. function houseImport() {
  84. $('#importHouseDialog').dialog({
  85. buttons : [{
  86. text : '确定',
  87. iconCls : 'icon-ok',
  88. handler : function(){
  89. $("#importHouseDialog").dialog("close");
  90. }
  91. },{
  92. text : '取消',
  93. iconCls : 'icon-cancel',
  94. handler : function(){
  95. $("#importHouseDialog").dialog("close");
  96. }
  97. }]
  98. });
  99. }
  100. //收租
  101. var addRentsFormatter = function(value , row , index){
  102. if(row.lessee!=null&&row.lessee!=""){
  103. if(row.endTime != null && row.endTime !=""){
  104. var day = calDay(row.endTime);
  105. if(day>-300){
  106. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/pay.png' title='收租' onclick=addRents(" + row.id + ") style='cursor:pointer' />"
  107. }else{
  108. return "";
  109. }
  110. }else{
  111. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/pay.png' title='收租' onclick=addRents(" + row.id + ") style='cursor:pointer' />"
  112. }
  113. }else{
  114. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/pay.png' title='收租' onclick=addRents(" + row.id + ") style='cursor:pointer' />"
  115. }
  116. }
  117. //退租
  118. var checkoutFormatter = function(value , row , index){
  119. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/export.png' title='退租' onclick=checkout(" + row.id + ") style='cursor:pointer' />"
  120. }
  121. function addRents(houseId){
  122. $("#addRentsDialog").dialog({
  123. buttons : [{
  124. text : '确定',
  125. iconCls : 'icon-ok',
  126. handler : function(){
  127. addRents_submit();
  128. }
  129. },{
  130. text : '取消',
  131. iconCls : 'icon-cancel',
  132. handler : function(){
  133. $("#addRentsDialog").dialog("close");
  134. }
  135. }],
  136. onLoad : function(){
  137. addRents_load(houseId);
  138. }
  139. })
  140. }
  141. function checkout(houseId){
  142. $("#checkoutDialog").dialog({
  143. buttons : [{
  144. text : '确定',
  145. iconCls : 'icon-ok',
  146. handler : function(){
  147. checkOutHouse_submit();
  148. }
  149. },{
  150. text : '取消',
  151. iconCls : 'icon-cancel',
  152. handler : function(){
  153. $("#checkoutDialog").dialog("close");
  154. }
  155. }],
  156. onLoad : function(){
  157. checkOutHouse_load(houseId);
  158. }
  159. })
  160. }
  161. //详情
  162. var detailFormatter = function(value , row , index){
  163. return "<img src='<%=basePath%>/images/details.png' title='详情' onclick=houseDetail(" + row.id + ") style='cursor:pointer' />"
  164. }
  165. function houseDetail(houseId){
  166. $("#houseDetailDialog").dialog({
  167. buttons : [{
  168. text : '确定',
  169. iconCls : 'icon-ok',
  170. handler : function(){
  171. $("#houseDetailDialog").dialog("close");
  172. }
  173. }],
  174. onLoad : function(){
  175. detail_load(houseId);
  176. }
  177. })
  178. }
  179. /**上传文件*/
  180. function formSubmit(){
  181. var upload = $("#upload").val();
  182. if(upload == null || upload == ''){
  183. $.messager.alert("系统提示","请选择文件上传!","error");
  184. }else{
  185. parent.$.messager.progress({
  186. title : '提示',
  187. text : '上传数据中,请稍候....'
  188. });
  189. $('#importHouseForm').form('submit',
  190. {
  191. url : whzl.basePath+"/houseAction_uploadExcel",//要访问的后台地址
  192. success : function(result){
  193. parent.$.messager.progress('close');
  194. result = $.parseJSON(result);
  195. if(result.success){
  196. $("#message").text(result.message);
  197. $("#errorShowList").hide();
  198. $("#exportBtn").hide();
  199. }else{
  200. $("#message").text(result.message + "一共存在" + result.obj.length + "错误。");
  201. $("#errorShowList").show();
  202. $("#exportBtn").show();
  203. var error = "";//全部错误信息
  204. var errorShow = "";//只显示前6条错误信息
  205. for(var i = 0; i < result.obj.length; i++){
  206. error += (i+1) + "、" + result.obj[i] + "\r\n";
  207. if(i < 6){
  208. errorShow += "<p>" + (i+1) + "、" + result.obj[i] + "</p>";
  209. }
  210. }
  211. $("#errorShowList").html(errorShow);
  212. $("#errorList").html(error);
  213. $("#errorText").val(error);
  214. parent.$.messager.progress('close');
  215. }
  216. }
  217. }
  218. );
  219. }
  220. }
  221. //新增
  222. function add(){
  223. $("#addHouseDialog").dialog({
  224. buttons : [{
  225. text : '确定',
  226. iconCls : 'icon-ok',
  227. handler : function(){
  228. addHouse_submit();
  229. }
  230. },{
  231. text : '取消',
  232. iconCls : 'icon-cancel',
  233. handler : function(){
  234. $("#addHouseDialog").dialog("close");
  235. }
  236. }]
  237. })
  238. }
  239. //修改房源信息
  240. var updateFormatter = function(value , row , index){
  241. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='修改' onclick=updateHouse(" + row.id + ") style='cursor:pointer' />"
  242. }
  243. function updateHouse(id){
  244. $("#updateHouseDialog").dialog({
  245. buttons : [{
  246. text : '确定',
  247. iconCls : 'icon-ok',
  248. handler : function(){
  249. updateHouse_submit();
  250. }
  251. },{
  252. text : '取消',
  253. iconCls : 'icon-cancel',
  254. handler : function(){
  255. $("#updateHouseDialog").dialog("close");
  256. }
  257. }],
  258. onLoad : function(){
  259. updateHouse_load(id);
  260. }
  261. })
  262. }
  263. var endTimeFormatter = function(value , row , index){
  264. if(row.endTime == ""||row.endTime==null){
  265. return "";
  266. }else{
  267. return dealDate(value);
  268. }
  269. }
  270. var statsuFormatter = function(value , row , index){
  271. if("1" == value){
  272. var day = calDay(row.endTime);
  273. if(day<=0&&day>-30){
  274. return "待缴"
  275. }else if(day<=-30){
  276. return "已缴";
  277. }else if(day>0){
  278. return "欠缴";
  279. }
  280. }else{
  281. return "未配租";
  282. }
  283. }
  284. /**打印租金合同*/
  285. var printRentFormatter = function(value , row , index){
  286. if(row.contractNo!=null&&row.contractNo!=""){
  287. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/print.png' title='打印' onclick=printRent(" + row.id + ") style='cursor:pointer' />"
  288. }else{
  289. return "";
  290. }
  291. }
  292. /**模板选择对话框*/
  293. var printRent = function(id){
  294. $("#templetSelectDialog").dialog(
  295. {
  296. buttons : [
  297. {
  298. text : '关闭',
  299. iconCls : 'icon-ok',
  300. handler : function(){
  301. $("#templetSelectDialog").dialog("close");
  302. }
  303. }
  304. ],
  305. onLoad : function(){
  306. templet_load(id);
  307. }
  308. }
  309. );
  310. };
  311. /**打印租金合同*/
  312. var rentDetailFormatter = function(value , row , index){
  313. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/print.png' title='打印' onclick=rentDetail(" + row.id + ") style='cursor:pointer' />"
  314. }
  315. /**模板选择对话框*/
  316. var rentDetail = function(id){
  317. $("#rentDetailDialog").dialog(
  318. {
  319. buttons : [
  320. {
  321. text : '关闭',
  322. iconCls : 'icon-ok',
  323. handler : function(){
  324. $("#rentDetailDialog").dialog("close");
  325. }
  326. }
  327. ],
  328. onLoad : function(){
  329. rentDetail_load(id);
  330. }
  331. }
  332. );
  333. };
  334. //申请作废
  335. var applyInvalidFormatter = function(value , row , index){
  336. if(row.lessee!=null&&row.lessee!=""){
  337. return "<img src='<%=basePath%>/images/pencil.png' title='申请作废' onclick=applyInvalid(" + row.id + ") style='cursor:pointer' />"
  338. }else{
  339. return "";
  340. }
  341. }
  342. function applyInvalid(houseId){
  343. $.messager.prompt('提醒', '请输入作废原因(必填)', function(r){
  344. if (r){
  345. $.ajax({
  346. type: "post",//使用get方法访问后台
  347. dataType: "json",//返回json格式的数据
  348. url: "rent10Action_applyInvalid",//要访问的后台地址
  349. data: "house.id="+houseId+"&rent10.invalidApplyRemark="+r+"&rent10.id="+0,//要发送的数据
  350. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  351. success: function(msg){
  352. if(msg.success){
  353. $.messager.alert("提醒","当前合同已申请作废");
  354. $("#houseDataGrid").datagrid("reload");
  355. }
  356. }
  357. })
  358. }
  359. });
  360. }
  361. var initialPlacementTimeFormatter = function(value , row , index){
  362. return dealDate(value);
  363. }
  364. /**导出合同*/
  365. function houseExport(){
  366. $("#exportColumnDialog").dialog({
  367. buttons : [{
  368. text : '确认',
  369. iconCls : 'icon-ok',
  370. handler : function(){
  371. var columnValue = [];
  372. var columnName = [];
  373. $("input[name='columnName']:checked").each(function () {
  374. columnValue.push($(this).val());
  375. columnName.push($(this).attr('valueText'));
  376. });
  377. if(columnValue==""){
  378. $.messager.alert("提示","请选择导出的字段名称!");
  379. return;
  380. }else{
  381. var params = encodeURI("house.community.id="+trim($('#communityId').combobox("getValue"))+
  382. "&house.no="+trim($('#no').combobox("getValue")) +
  383. "&house.houseNumber="+trim($('#houseNumber').combobox("getValue"))+
  384. "&houseState="+$('#houseState').val()+
  385. "&unpaidStartDay="+$('#unpaidStartDay').datebox('getValue')+
  386. "&unpaidEndDay="+$('#unpaidEndDay').datebox('getValue')
  387. );
  388. if(columnValue.includes("name")){
  389. window.location.href = whzl.basePath+"/rent10Action_houseExport?columnValue="+columnValue+"&columnName="+columnName+"&"+params;
  390. }else{
  391. window.location.href = whzl.basePath+"/rent10Action_houseHZExport?columnValue="+columnValue+"&columnName="+columnName+"&"+params;
  392. }
  393. //window.location.href = whzl.basePath+"/rent10Action_houseExport?columnValue="+columnValue+"&columnName="+columnName+"&"+params;
  394. }
  395. }
  396. }]
  397. })
  398. }
  399. /**提交换房申请*/
  400. var changeApplicationFormatter= function(value , row , index){
  401. //欠缴不可换房
  402. if(row.endTime!=null&&row.endTime!=""){
  403. var day = calDay(row.endTime);
  404. if(day<=0){
  405. return "<img src='<%=basePath%>/images/gzfhf.png' title='调房申请' onclick=changeApplication(" + row.id + ") style='cursor:pointer' />"
  406. }else{
  407. return "";
  408. }
  409. }else{
  410. return "<img src='<%=basePath%>/images/gzfhf.png' title='调房申请' onclick=changeApplication(" + row.id + ") style='cursor:pointer' />"
  411. }
  412. }
  413. function changeApplication(id){
  414. $('#addExchangeHouseDialog').dialog({
  415. buttons : [{
  416. text : '确认',
  417. iconCls : 'icon-ok',
  418. handler : function(){
  419. addExchangeHouse_submit();
  420. }
  421. },{
  422. text : '取消',
  423. iconCls : 'icon-cancel',
  424. handler : function(){
  425. $('#addExchangeHouseDialog').dialog("close")
  426. }
  427. }],
  428. onLoad : function(){
  429. house1_load(id);
  430. }
  431. })
  432. }
  433. /**计算今天到结束时间的天数*/
  434. var calDay = function(time){
  435. if(time == null){
  436. return ;
  437. }else{
  438. var today = new Date();
  439. var endTime = new Date(time.replace(/\-/g, "/"));
  440. return parseInt(parseInt(today - endTime)/1000/60/60/24);
  441. }
  442. }
  443. function rentAllExport(){
  444. var columnValue = [];
  445. var columnName = [];
  446. $("input[name='columnName']:checked").each(function () {
  447. columnValue.push($(this).val());
  448. columnName.push($(this).attr('valueText'));
  449. });
  450. if(columnValue==""){
  451. $.messager.alert("提示","请选择导出的字段名称!");
  452. return;
  453. }else{
  454. var params = encodeURI("house.community.id="+trim($('#communityId').combobox("getValue"))+
  455. "&house.no="+trim($('#no').combobox("getValue")) +
  456. "&house.houseNumber="+trim($('#houseNumber').combobox("getValue"))+
  457. "&houseState="+$('#houseState').val()+
  458. "&unpaidStartDay="+$('#unpaidStartDay').datebox('getValue')+
  459. "&unpaidEndDay="+$('#unpaidEndDay').datebox('getValue')
  460. );
  461. window.location.href = whzl.basePath+"/rent10Action_houseAllExport?columnValue="+columnValue+"&columnName="+columnName+"&"+params;
  462. }
  463. }
  464. function rentNewExport(){
  465. var columnValue = [];
  466. var columnName = [];
  467. $("input[name='columnName']:checked").each(function () {
  468. columnValue.push($(this).val());
  469. columnName.push($(this).attr('valueText'));
  470. });
  471. if(columnValue==""){
  472. $.messager.alert("提示","请选择导出的字段名称!");
  473. return;
  474. }else{
  475. var params = encodeURI("house.community.id="+trim($('#communityId').combobox("getValue"))+
  476. "&house.no="+trim($('#no').combobox("getValue")) +
  477. "&house.houseNumber="+trim($('#houseNumber').combobox("getValue"))+
  478. "&houseState="+$('#houseState').val()+
  479. "&unpaidStartDay="+$('#unpaidStartDay').datebox('getValue')+
  480. "&unpaidEndDay="+$('#unpaidEndDay').datebox('getValue')
  481. );
  482. window.location.href = whzl.basePath+"/rent10Action_houseExport?columnValue="+columnValue+"&columnName="+columnName+"&"+params;
  483. }
  484. }
  485. </script>
  486. <div class="easyui-layout" data-options="fit:true,border:false">
  487. <div data-options="region:'center',border:false">
  488. <div id="searchtool" data-options="region:'north',border:false">
  489. <div class="clear"></div>
  490. <table id="tblQuery" style="width:100%;font-size:12px;">
  491. <tr>
  492. <td><span>小区名称</span></td>
  493. <td>
  494. <input id="communityId">
  495. <input id="no" style="width: 90px;">幢
  496. <input id="houseNumber" style="width: 80px;">室
  497. </td>
  498. <td>承租人身份证号</td>
  499. <td><input id="lesseeId"/></td>
  500. <td>租金状态</td>
  501. <td>
  502. <select id="houseState">
  503. <option value=""></option>
  504. <option value="0">已缴</option>
  505. <option value="1">待缴</option>
  506. <option value="2">欠缴</option>
  507. </select>
  508. </td>
  509. <td align="center">
  510. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  511. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  512. <a href="javascript:houseExport();" class="easyui-linkbutton" data-options="iconCls:'icon-import',plain:true">导出</a>
  513. </td>
  514. </tr>
  515. <tr>
  516. <td>欠缴时间</td>
  517. <td><input id="unpaidStartDay" class="easyui-datebox" type="text">至<input id="unpaidEndDay" class="easyui-datebox" type="text"></td>
  518. </tr>
  519. </table>
  520. <div class="clear"></div>
  521. </div>
  522. <table id="houseDataGrid">
  523. <thead frozen="true">
  524. <tr>
  525. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  526. <th data-options="field:'communityName',sortable:true,width:100">小区名称</th>
  527. </tr>
  528. </thead>
  529. <thead>
  530. <tr>
  531. <th data-options="field:'no',width:80">楼号</th>
  532. <th data-options="field:'houseNumber',width:80">房号</th>
  533. <th data-options="field:'area',width:60">面积</th>
  534. <th data-options="field:'garageArea',width:60">车库面积</th>
  535. <th data-options="field:'status',width:70,formatter:statsuFormatter">状态</th>
  536. <th data-options="field:'lessee',width:60">承租人</th>
  537. <th data-options="field:'lesseeId',width:160">承租人身份证号</th>
  538. <th data-options="field:'endTime',width:80,formatter:endTimeFormatter">到期时间</th>
  539. <th data-options="field:'initialPlacementTime',width:80,formatter:initialPlacementTimeFormatter">初始安置时间</th>
  540. <th data-options="field:'detail',width:60,formatter:detailFormatter">详情</th>
  541. <th data-options="field:'addRents123',align:'center',width:60,formatter:addRentsFormatter">收租</th>
  542. <th data-options="field:'applyInvalid',align:'center',width:60,formatter:applyInvalidFormatter">申请作废</th>
  543. <th data-options="field:'changeApplication',align:'center',width:60,formatter:changeApplicationFormatter">换房申请</th>
  544. <th data-options="field:'checkout',align:'center',width:60,formatter:checkoutFormatter">退房申请</th>
  545. </tr>
  546. </thead>
  547. </table>
  548. </div>
  549. </div>
  550. <div id="p" class="easyui-progressbar" style="width:400px;"></div>
  551. <div id="houseDetailDialog" data-options="title:'&nbsp;房源详情信息',iconCls:'icon-detail',width:1000,height:500,modal:true,href:'<%=basePath %>/rent10Action_toDetail'">
  552. </div>
  553. <div id="rentDetailDialog" data-options="title:'&nbsp;合同详情信息',iconCls:'icon-detail',width:1000,height:500,modal:true,href:'<%=basePath %>/rent10Action_toRentDetail'">
  554. </div>
  555. <div id="addRentsDialog" data-options="title:'&nbsp;收租信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/rent10Action_toAddRent1'">
  556. </div>
  557. <div id="checkoutDialog" data-options="title:'&nbsp;退租信息',iconCls:'icon-add',width:800,height:400,modal:true,href:'<%=basePath %>/rent10Action_toCheckout'">
  558. </div>
  559. <div id="addHouseDialog" data-options="title:'&nbsp;增加房源信息',iconCls:'icon-add',width:500,height:300,modal:true,href:'<%=basePath %>/houseAction_toAddHouse'">
  560. </div>
  561. <div id="updateHouseDialog" data-options="title:'&nbsp;修改房源信息',iconCls:'icon-update',width:500,height:300,modal:true,href:'<%=basePath %>/houseAction_toUpdateHouse'">
  562. </div>
  563. <div id="templetSelectDialog" data-options="title:'&nbsp;选择合同模板',iconCls:'icon-details',width:420,height:320,modal:true,href:'<%=basePath %>/rent10Action_toSelectList'">
  564. </div>
  565. <div id="exportColumnDialog" data-options="title:'&nbsp;选择导出字段',iconCls:'icon-details',width:1200,height:550,modal:true,href:'<%=basePath %>/rent10Action_toExportColumn'">
  566. </div>
  567. <div id="addExchangeHouseDialog" data-options="title:'&nbsp;添加换房信息',iconCls:'icon-add',width:800,height:400,modal:true,href:'<%=basePath %>/exchangeHouseAction_toAdd'">
  568. </div>
  569. <div id="exchangeHouseIntentSelectDialog" data-options="title:'&nbsp;选择换房人',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseIntentAction_toexchangeHouseIntentSelect'">
  570. </div>
  571. <div id="detailsecurityPersonApplyDialog" data-options="title:'&nbsp;申请详细信息',iconCls:'icon-details',width:900,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_toSearchDetail'">
  572. </div>
  573. <script type="text/javascript">
  574. $(function(){
  575. parent.$.messager.progress('close');
  576. $('#communityId').combobox({
  577. url: whzl.basePath + '/communityAction_findAll',
  578. valueField:'value',
  579. textField:'text',
  580. filter:function(q,row){
  581. var opts=$(this).combobox("options");
  582. //return row[opts.textField].indexOf(q)==0;//
  583. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  584. },
  585. onChange:function (newValue,oldValue) {
  586. $('#no').combobox("setValue","");
  587. $('#houseNumber').combobox("setValue","");
  588. $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
  589. }
  590. });
  591. $('#no').combobox({
  592. //editable:false,
  593. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
  594. valueField:'value',
  595. textField:'text',
  596. filter:function(q,row){
  597. var opts=$(this).combobox("options");
  598. //return row[opts.textField].indexOf(q)==0;//
  599. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  600. },
  601. onChange:function (newValue,oldValue) {
  602. $('#houseNumber').combobox("setValue","");
  603. $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+encodeURIComponent(newValue));
  604. }
  605. });
  606. $('#houseNumber').combobox({
  607. //editable:false,
  608. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
  609. valueField:'value',
  610. textField:'text',
  611. filter:function(q,row){
  612. var opts=$(this).combobox("options");
  613. //return row[opts.textField].indexOf(q)==0;//
  614. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  615. }
  616. });
  617. })
  618. </script>