exchangeHouseList_verify1.jsp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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 yesOrNoObj = null;
  7. var yesOrNo_array = null;
  8. //人员类别
  9. var personTypeObj = null;
  10. var personType_array = null;
  11. //审核意见
  12. var opinionObj = null;
  13. var opinion_array = null;
  14. //区
  15. var areaObj = null;
  16. var area_array = null;
  17. //街道
  18. var streetObj = null;
  19. var street_array = null;
  20. //居委会
  21. var neighborhoodObj = null;
  22. var neighborhood_array = null;
  23. /**用户显示区*/
  24. $(function() {
  25. //工作现状
  26. $.ajax({
  27. type: "post",//使用post方法访问后台
  28. dataType: "json",//返回json格式的数据
  29. url: "aa10Action_listAa10All",//要访问的后台地址
  30. data:{"aa10.letter":"workState" ,"aa10.name":"工作现状" },
  31. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  32. success: function(msg){//msg为返回的数据,在这里做数据绑定
  33. if(msg.success){
  34. workStateObj = msg.obj.rows;
  35. var select_arr = [];
  36. var data = workStateObj;
  37. for(var nItem = 0; nItem < data.length; nItem++ ){
  38. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  39. }
  40. workState_array = select_arr.join("");
  41. }
  42. }
  43. });
  44. //是否
  45. $.ajax({
  46. type: "post",//使用post方法访问后台
  47. dataType: "json",//返回json格式的数据
  48. url: "aa10Action_listAa10All",//要访问的后台地址
  49. data:{"aa10.letter":"yesOrNo" ,"aa10.name":"是否" },
  50. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  51. success: function(msg){//msg为返回的数据,在这里做数据绑定
  52. if(msg.success){
  53. yesOrNoObj = msg.obj.rows;
  54. var select_arr = [];
  55. var data = yesOrNoObj;
  56. for(var nItem = 0; nItem < data.length; nItem++ ){
  57. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  58. }
  59. yesOrNo_array = select_arr.join("");
  60. }
  61. }
  62. });
  63. //人员类别
  64. $.ajax({
  65. type: "post",//使用post方法访问后台
  66. dataType: "json",//返回json格式的数据
  67. url: "aa10Action_listAa10All",//要访问的后台地址
  68. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  69. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  70. success: function(msg){//msg为返回的数据,在这里做数据绑定
  71. if(msg.success){
  72. personTypeObj = msg.obj.rows;
  73. var select_arr = [];
  74. var data = personTypeObj;
  75. for(var nItem = 0; nItem < data.length; nItem++ ){
  76. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  77. }
  78. personType_array = select_arr.join("");
  79. $("#personType").append(personType_array);
  80. }
  81. }
  82. });
  83. //审批意见
  84. $.ajax({
  85. type: "post",//使用post方法访问后台
  86. dataType: "json",//返回json格式的数据
  87. url: "aa10Action_listAa10All",//要访问的后台地址
  88. data:{"aa10.letter":"opinion" ,"aa10.name":"审核意见" },
  89. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  90. success: function(msg){//msg为返回的数据,在这里做数据绑定
  91. if(msg.success){
  92. opinionObj = msg.obj.rows;
  93. var select_arr = [];
  94. var data = opinionObj;
  95. for(var nItem = 0; nItem < data.length; nItem++ ){
  96. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  97. }
  98. opinion_array = select_arr.join("");
  99. }
  100. }
  101. });
  102. //获取区
  103. $.ajax({
  104. type: "post",//使用post方法访问后台
  105. dataType: "json",//返回json格式的数据
  106. url: "houseRegisterAction_listChildren",//要访问的后台地址
  107. //data:{"id":id},
  108. success: function(msg){//msg为返回的数据,在这里做数据绑定
  109. if(msg.success){
  110. areaObj = msg.obj.rows;
  111. var select_arr = [];
  112. var data = areaObj;
  113. for(var nItem = 0; nItem < data.length; nItem++ ){
  114. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  115. }
  116. area_array = select_arr.join("");
  117. }
  118. }
  119. });
  120. var state = '2,3';
  121. $('#exchangeHouseDataGrid').datagrid({
  122. rownumbers:true,
  123. fit:true,
  124. pageSize:20,
  125. pageList : [ 10, 20, 30, 40, 50 ],
  126. fitColumns:false,
  127. border:false,
  128. sortOrder:'desc',
  129. pagination:true,
  130. idField:'id',
  131. url:whzl.basePath + '/exchangeHouseAction_listExchangeHouse?exchangeHouse.state='+state,
  132. toolbar:'#searchtool',
  133. checkOnSelect:true,
  134. selectOnCheck:false,
  135. nowrap:true,
  136. loadFilter:function(result){
  137. if(result.success){
  138. return result.obj;
  139. }else{
  140. $.messager.alert("提示",result.message);
  141. return ;
  142. }
  143. }
  144. });
  145. })
  146. /**查询*/
  147. function searchFun(){
  148. $("#exchangeHouseDataGrid").datagrid("load", {
  149. "exchangeHouse.securityPerson1.name":$("#tblQuery").find("input[id='securityPersonName']").val(),
  150. "exchangeHouse.securityPerson1.idCard":$("#tblQuery").find("input[id='securityPersonIdCard']").val(),
  151. "exchangeHouse.house1.community.id":trim($('#communityId').combobox("getValue")),
  152. "exchangeHouse.house1.no":trim($('#no').combobox("getValue")),
  153. "exchangeHouse.house1.houseNumber":trim($('#houseNumber').combobox("getValue")),
  154. "exchangeHouse.securityPerson1.personType":$('#personType').val()
  155. });
  156. }
  157. /*清除查询条件**/
  158. function ClearQuery() {
  159. $("#tblQuery").find("input").val("");
  160. $("#tblQuery").find("select").val("-1");
  161. }
  162. var dateFormatter = function(value,row,index){
  163. if(value != null){
  164. return value.substring(0,10);
  165. }else{
  166. return "";
  167. }
  168. }
  169. /**人员类别格式化*/
  170. var personTypeFormatter = function(value , row , index){
  171. var personType = "";
  172. for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
  173. if(personTypeObj[nItem].code == row.securityPerson.personType){
  174. personType = personTypeObj[nItem].value;
  175. break;
  176. }
  177. }
  178. return personType;
  179. };
  180. /**人员详细*/
  181. var detailFormatter = function(value , row , index){
  182. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=exchangeHouseDetail('" + row.id + "') style='cursor:pointer' />";
  183. };
  184. /**房源详细页面对话框*/
  185. var exchangeHouseDetail = function(id){
  186. $("#exchangeHouseDetailDialog").dialog({
  187. buttons : [{
  188. text : '确定',
  189. iconCls : 'icon-ok',
  190. handler : function(){
  191. $("#exchangeHouseDetailDialog").dialog("close");
  192. }
  193. }],
  194. onLoad : function(){
  195. detail_load(id);
  196. }
  197. });
  198. };
  199. /**合同打印*/
  200. var printFormatter = function(value , row , index){
  201. return "<img src='<%=basePath%>/images/printer.png' title='选择合同模板' onclick=printRow(" + row.id + ") style='cursor:pointer' />";
  202. };
  203. function printRow(id){
  204. window.open(whzl.basePath+"/exchangeHouseAction_toApplicationPrint?exchangeHouseId="+id);
  205. }
  206. function templetSelect(id){
  207. $("#templetSelectDialog").dialog({
  208. buttons : [{
  209. text : '关闭',
  210. iconCls : 'icon-ok',
  211. handler : function(){
  212. $("#templetSelectDialog").dialog("close");
  213. }
  214. }],
  215. onLoad : function(){
  216. templet_load(id);
  217. }
  218. });
  219. }
  220. /**合同文件上传*/
  221. var uploadFormatter = function(value , row , index){
  222. return "<img src='<%=basePath%>/images/pencil.png' title='修改' onclick=exchangeContractUpload(" + row.id + ") style='cursor:pointer' />";
  223. };
  224. function uploadRow(){
  225. var row = $('#exchangeHouseDataGrid').datagrid('getSelected');
  226. if(row == null){
  227. $.messager.alert("提示","请先选择要修改的租房合同!");
  228. }
  229. var id = row.id;
  230. exchangeContractUpload(id);
  231. }
  232. function exchangeContractUpload(id){
  233. $("#uploadExchangeContractDialog").dialog({
  234. buttons : [{
  235. text : '确定',
  236. iconCls : 'icon-ok',
  237. handler : function(){
  238. $("#uploadExchangeContractDialog").dialog("close");
  239. }
  240. }],
  241. onLoad : function(){
  242. upload_load(id);
  243. }
  244. });
  245. }
  246. /**更新*/
  247. var updateFormatter = function(value , row , index){
  248. if(row.state == 2){
  249. return "<img src='<%=basePath%>/images/pencil.png' title='审核' onclick=updateRow('" + row.id +"') style='cursor:pointer' />";
  250. }else{
  251. return "";
  252. }
  253. };
  254. function updateRow(id){
  255. $("#updateExchangeHouseDialog").dialog({
  256. buttons : [{
  257. text : '确定',
  258. iconCls : 'icon-ok',
  259. handler : function(){
  260. task_submit();
  261. $("#updateExchangeHouseDialog").dialog("close");
  262. $("#exchangeHouseDataGrid").datagrid("reload");
  263. }
  264. }],
  265. onLoad : function(){
  266. task_load(id);
  267. }
  268. });
  269. }
  270. --></script>
  271. <div class="easyui-layout" data-options="fit:true,border:false">
  272. <div data-options="region:'center',border:false">
  273. <div id="searchtool" data-options="region:'north' , border:false">
  274. <div class="clear"></div>
  275. <table id="tblQuery" style="width:100%;">
  276. <tr>
  277. <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>
  278. <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>
  279. <td align="left" style="width: 46%;">
  280. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  281. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  282. </td>
  283. </tr>
  284. <tr>
  285. <td align="right"><span>小区名称</span></td>
  286. <td colspan="3" style="font-size: 12px">
  287. <select id="area" style="width:100px;">
  288. <option value="">全部</option>
  289. </select>
  290. <input id="communityId">
  291. <input id="no" style="width: 60px;">幢
  292. <input id="houseNumber" style="width: 80px;">室
  293. </td>
  294. </tr>
  295. </table>
  296. <div class="clear"></div>
  297. </div>
  298. <table id="exchangeHouseDataGrid" title="房源入住情况">
  299. <thead>
  300. <tr>
  301. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  302. <th data-options="field:'name1',align:'center',width:80">换房人甲</th>
  303. <th data-options="field:'idCard1',align:'center',width:140">换房人甲身份证号</th>
  304. <th data-options="field:'houseAddress1',align:'center',width:200">房源甲</th>
  305. <th data-options="field:'name2',align:'center',width:80">换房人乙</th>
  306. <th data-options="field:'idCard2',align:'center',width:140">换房人乙身份证号</th>
  307. <th data-options="field:'houseAddress2',width:200">房源乙</th>
  308. <th data-options="field:'detail',width:60,align:'center',formatter:detailFormatter">换房详情</th>
  309. <th data-options="field:'update',align:'center',width:60,formatter:updateFormatter">审核</th>
  310. </tr>
  311. </thead>
  312. </table>
  313. </div>
  314. </div>
  315. <div id="exchangeHouseDetailDialog" data-options="title:'&nbsp;查看详情',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseAction_toDetail'">
  316. </div>
  317. <div id="templetSelectDialog" data-options="title:'&nbsp;选择合同模板',iconCls:'icon-details',width:420,height:320,modal:true,href:'<%=basePath %>/exchangeHouseAction_toTempletSelect'">
  318. </div>
  319. <div id="updateExchangeHouseDialog" data-options="title:'&nbsp;审核',iconCls:'icon-details',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseAction_toVerify1'">
  320. </div>
  321. <div id="uploadExchangeContractDialog" data-options="title:'&nbsp;合同文件上传',iconCls:'icon-edit',width:800,height:420,modal:true,href:'<%=basePath %>/exchangeHouseAction_toUpload'">
  322. </div>
  323. <div id="setExchangeHouseDialog" data-options="title:'&nbsp;个性化设置',iconCls:'icon-cog',width:500,height:370,modal:true,href:'<%=basePath %>/columnSetAction_toSet?tname=exchangeHouse'">
  324. </div>
  325. <script type="text/javascript">
  326. <!--
  327. parent.$.messager.progress('close');
  328. $('#area').combobox({
  329. url: whzl.basePath + '/houseRegisterAction_listChildrenCombobox',
  330. valueField:'value',
  331. textField:'text',
  332. onChange:function (newValue,oldValue) {
  333. $('#communityId').combobox("setValue","");
  334. $('#no').combobox("setValue","");
  335. $('#houseNumber').combobox("setValue","");
  336. $('#communityId').combobox('reload',whzl.basePath + '/communityAction_findAll?community.area='+newValue);
  337. }
  338. });
  339. $('#communityId').combobox({
  340. url: whzl.basePath + '/communityAction_findAll',
  341. valueField:'value',
  342. textField:'text',
  343. filter:function(q,row){
  344. var opts=$(this).combobox("options");
  345. //return row[opts.textField].indexOf(q)==0;//
  346. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  347. },
  348. onChange:function (newValue,oldValue) {
  349. $('#no').combobox("setValue","");
  350. $('#houseNumber').combobox("setValue","");
  351. $('#no').combobox('reload',whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"));
  352. }
  353. });
  354. $('#no').combobox({
  355. //editable:false,
  356. url: whzl.basePath + '/houseAction_findAllNo?house.community.id='+$('#communityId').combobox("getValue"),
  357. valueField:'value',
  358. textField:'text',
  359. filter:function(q,row){
  360. var opts=$(this).combobox("options");
  361. //return row[opts.textField].indexOf(q)==0;//
  362. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  363. },
  364. onChange:function (newValue,oldValue) {
  365. $('#houseNumber').combobox("setValue","");
  366. $('#houseNumber').combobox('reload',whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+newValue);
  367. }
  368. });
  369. $('#houseNumber').combobox({
  370. //editable:false,
  371. url: whzl.basePath + '/houseAction_findAllHouseNumber?house.community.id='+$('#communityId').combobox("getValue") + '&house.no='+$('#no').combobox("getValue"),
  372. valueField:'value',
  373. textField:'text',
  374. filter:function(q,row){
  375. var opts=$(this).combobox("options");
  376. //return row[opts.textField].indexOf(q)==0;//
  377. return row[opts.textField].indexOf(q)>-1;//将从头位置匹配改为任意匹配
  378. }
  379. });
  380. //-->
  381. </script>