annualReviewList.jsp 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  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 maritalStatusObj = null;
  7. var maritalStatus_array = null;
  8. //区
  9. var areaObj = null;
  10. var area_array = null;
  11. //学历
  12. var educationObj = null;
  13. var education_array = null;
  14. //家庭关系
  15. var relativeObj = null;
  16. var relative_array = null;
  17. //是否
  18. var yesOrNoObj = null;
  19. var yesOrNo_array = null;
  20. //性别
  21. var sexObj = null;
  22. var sex_array = null;
  23. //申请保障类型
  24. var applyTypeObj = null;
  25. var applyType_array = null;
  26. var personTypeObj = null;
  27. var personType_array = null;
  28. //审核状态
  29. var stateObj = null;
  30. var state_array = null;
  31. /**用户显示区*/
  32. $(function() {
  33. $('#securityPersonInfoDataGrid').datagrid({
  34. rownumbers:true,
  35. fit:true,
  36. pageSize:20,
  37. pageList : [ 10, 20, 30, 40, 50 ],
  38. fitColumns:false,
  39. border:false,
  40. sortOrder:'desc',
  41. pagination:true,
  42. idField:'id',
  43. url:whzl.basePath + '/securityPersonApply2Action_annualReviewList',
  44. toolbar:'#searchtool',
  45. checkOnSelect:true,
  46. selectOnCheck:true,
  47. nowrap:true,
  48. loadFilter:function(result){
  49. if(result.success){
  50. return result.obj;
  51. }else{
  52. $.messager.alert("提示",result.message);
  53. return ;
  54. }
  55. }
  56. });
  57. });
  58. $.ajax({
  59. type: "post",//使用post方法访问后台
  60. dataType: "json",//返回json格式的数据
  61. url: "aa10Action_listAa10All",//要访问的后台地址
  62. data:{"aa10.letter":"maritalStatus" ,"aa10.name":"婚姻情况" },
  63. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  64. success: function(msg){//msg为返回的数据,在这里做数据绑定
  65. if(msg.success){
  66. maritalStatusObj = msg.obj.rows;
  67. var select_arr = [];
  68. var data = maritalStatusObj;
  69. for(var nItem = 0; nItem < data.length; nItem++ ){
  70. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  71. }
  72. maritalStatus_array = select_arr.join("");
  73. $("#maritalStatus_add").append(select_arr)
  74. }
  75. }
  76. });
  77. //获取区
  78. $.ajax({
  79. type: "post",//使用post方法访问后台
  80. dataType: "json",//返回json格式的数据
  81. url: "houseRegisterAction_listChildren",//要访问的后台地址
  82. //data:{"id":id},
  83. success: function(msg){//msg为返回的数据,在这里做数据绑定
  84. if(msg.success){
  85. areaObj = msg.obj.rows;
  86. var select_arr = [];
  87. var data = areaObj;
  88. for(var nItem = 0; nItem < data.length; nItem++ ){
  89. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  90. }
  91. area_array = select_arr.join("");
  92. }
  93. }
  94. });
  95. //审批状态
  96. $.ajax({
  97. type: "post",//使用post方法访问后台
  98. dataType: "json",//返回json格式的数据
  99. url: "aa10Action_listAa10All",//要访问的后台地址
  100. data:{"aa10.letter":"reviewStatus" ,"aa10.name":"审核状态" },
  101. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  102. success: function(msg){//msg为返回的数据,在这里做数据绑定
  103. if(msg.success){
  104. stateObj = msg.obj.rows;
  105. var select_arr = [];
  106. var data = stateObj;
  107. for(var nItem = 0; nItem < data.length; nItem++ ){
  108. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  109. }
  110. state_array = select_arr.join("");
  111. }
  112. }
  113. });
  114. //学历
  115. $.ajax({
  116. type: "post",//使用post方法访问后台
  117. dataType: "json",//返回json格式的数据
  118. url: "aa10Action_listAa10All",//要访问的后台地址
  119. data:{"aa10.letter":"education" ,"aa10.name":"学历" },
  120. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  121. success: function(msg){//msg为返回的数据,在这里做数据绑定
  122. if(msg.success){
  123. educationObj = msg.obj.rows;
  124. var select_arr = [];
  125. var data = educationObj;
  126. for(var nItem = 0; nItem < data.length; nItem++ ){
  127. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  128. }
  129. education_array = select_arr.join("");
  130. }
  131. }
  132. });
  133. //家庭关系
  134. $.ajax({
  135. type: "post",//使用post方法访问后台
  136. dataType: "json",//返回json格式的数据
  137. url: "aa10Action_listAa10All",//要访问的后台地址
  138. data:{"aa10.letter":"homeRelative" ,"aa10.name":"家庭关系" },
  139. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  140. success: function(msg){//msg为返回的数据,在这里做数据绑定
  141. if(msg.success){
  142. relativeObj = msg.obj.rows;
  143. var select_arr = [];
  144. var data = relativeObj;
  145. for(var nItem = 0; nItem < data.length; nItem++ ){
  146. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  147. }
  148. relative_array = select_arr.join("");
  149. }
  150. }
  151. });
  152. //是否
  153. $.ajax({
  154. type: "post",//使用post方法访问后台
  155. dataType: "json",//返回json格式的数据
  156. url: "aa10Action_listAa10All",//要访问的后台地址
  157. data:{"aa10.letter":"yesOrNo" ,"aa10.name":"是否" },
  158. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  159. success: function(msg){//msg为返回的数据,在这里做数据绑定
  160. if(msg.success){
  161. yesOrNoObj = msg.obj.rows;
  162. var select_arr = [];
  163. var data = yesOrNoObj;
  164. for(var nItem = 0; nItem < data.length; nItem++ ){
  165. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  166. }
  167. yesOrNo_array = select_arr.join("");
  168. }
  169. }
  170. });
  171. //性别
  172. $.ajax({
  173. type: "post",//使用post方法访问后台
  174. dataType: "json",//返回json格式的数据
  175. url: "aa10Action_listAa10All",//要访问的后台地址
  176. data:{"aa10.letter":"sex" ,"aa10.name":"性别" },
  177. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  178. success: function(msg){//msg为返回的数据,在这里做数据绑定
  179. if(msg.success){
  180. sexObj = msg.obj.rows;
  181. var select_arr = [];
  182. var data = sexObj;
  183. for(var nItem = 0; nItem < data.length; nItem++ ){
  184. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  185. }
  186. sex_array = select_arr.join("");
  187. }
  188. }
  189. });
  190. //保障类别
  191. $.ajax({
  192. type: "post",//使用post方法访问后台
  193. dataType: "json",//返回json格式的数据
  194. url: "aa10Action_listAa10All",//要访问的后台地址
  195. data:{"aa10.letter":"applyType" ,"aa10.name":"保障业务类别" },
  196. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  197. success: function(msg){//msg为返回的数据,在这里做数据绑定
  198. if(msg.success){
  199. applyTypeObj = msg.obj.rows;
  200. var select_arr = [];
  201. var data = applyTypeObj;
  202. for(var nItem = 0; nItem < data.length; nItem++ ){
  203. select_arr.push("<option value="+data[nItem].code+">"+data[nItem].value+"</option>");
  204. }
  205. applyType_array = select_arr.join("");
  206. $("#applyType").append(applyType_array);
  207. }
  208. }
  209. });
  210. $.ajax({
  211. type: "post",//使用post方法访问后台
  212. dataType: "json",//返回json格式的数据
  213. url: "aa10Action_listAa10All",//要访问的后台地址
  214. data:{"aa10.letter":"personType" ,"aa10.name":"保障人员类别" },
  215. complete :function(){$("#load").hide();},//AJAX请求完成时隐藏loading提示
  216. success: function(msg){//msg为返回的数据,在这里做数据绑定
  217. if(msg.success){
  218. personTypeObj = msg.obj.rows;
  219. }
  220. }
  221. });
  222. /**获取街道列表*/
  223. function getStreetList(id,streetId,objId){
  224. $.ajax({
  225. type: "post",//使用post方法访问后台
  226. dataType: "json",//返回json格式的数据
  227. url: "houseRegisterAction_listChildren",//要访问的后台地址
  228. data:{"id":id},
  229. success: function(msg){//msg为返回的数据,在这里做数据绑定
  230. if(msg.success){
  231. streetObj = msg.obj.rows;
  232. var select_arr = [];
  233. var data = streetObj;
  234. select_arr.push("<option value=''>请选择</option>");
  235. if(id != null && id != ""){
  236. for(var nItem = 0; nItem < data.length; nItem++ ){
  237. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  238. }
  239. }
  240. street_array = select_arr.join("");
  241. $("#" + objId).append(street_array);
  242. $("#" + objId).val(streetId);
  243. }
  244. }
  245. });
  246. }
  247. /**获取居委会列表*/
  248. function getNeighborhoodList(id,neighborhoodId,objId){
  249. $.ajax({
  250. type: "post",//使用post方法访问后台
  251. dataType: "json",//返回json格式的数据
  252. url: "houseRegisterAction_listChildren",//要访问的后台地址
  253. data:{"id":id},
  254. success: function(msg){//msg为返回的数据,在这里做数据绑定
  255. if(msg.success){
  256. neighborhoodObj = msg.obj.rows;
  257. var select_arr = [];
  258. var data = neighborhoodObj;
  259. select_arr.push("<option value=''>请选择</option>");
  260. if(id != null && id != ""){
  261. for(var nItem = 0; nItem < data.length; nItem++ ){
  262. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  263. }
  264. }
  265. neighborhood_array = select_arr.join("");
  266. $("#" + objId).append(neighborhood_array);
  267. $("#" + objId).val(neighborhoodId);
  268. }
  269. }
  270. });
  271. }
  272. //获取社区列表
  273. function getCommunityList(id,communityId,objId){
  274. $.ajax({
  275. type: "post",//使用post方法访问后台
  276. dataType: "json",//返回json格式的数据
  277. url: "houseRegisterAction_listChildren",//要访问的后台地址
  278. data:{"id":id},
  279. success: function(msg){//msg为返回的数据,在这里做数据绑定
  280. if(msg.success){
  281. communityObj = msg.obj.rows;
  282. var select_arr = [];
  283. var data = communityObj;
  284. select_arr.push("<option value=''>请选择</option>");
  285. if(id != null && id != ""){
  286. for(var nItem = 0; nItem < data.length; nItem++ ){
  287. select_arr.push("<option value="+data[nItem].id+">"+data[nItem].name+"</option>");
  288. }
  289. }
  290. community_array = select_arr.join("");
  291. $("#" + objId).append(community_array);
  292. $("#" + objId).val(communityId);
  293. }
  294. }
  295. });
  296. }
  297. /**查询*/
  298. function searchFun(){
  299. $("#securityPersonInfoDataGrid").datagrid("load", {
  300. "securityPerson.name":$("#tblQuery").find("input[id='name']").val(),
  301. "securityPerson.idCard":$("#tblQuery").find("input[id='idCard']").val()
  302. });
  303. }
  304. /*清除查询条件**/
  305. function ClearQuery() {
  306. $("#tblQuery").find("input").val("");
  307. $("#tblQuery").find("select").val("-1");
  308. }
  309. var annualReviewFormatter = function(value , row , index){
  310. /*if(row.applyType=="2"){
  311. var day = countDay(row.houseEndTime);
  312. if(day>0){
  313. return ""
  314. }else{
  315. if(row.nsRegisterState != "4"){
  316. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=annualReview('" + row.securityPersonId +"','" + row.name + "','" +row.idCard + "','" +row.applyType+"') style='cursor:pointer'/>";
  317. }else{
  318. return "已提交申请";
  319. }
  320. }
  321. }else{
  322. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=annualReview('" + row.securityPersonId +"','" + row.name + "','" +row.idCard + "','" +row.applyType + "','" + row.personType +"') style='cursor:pointer'/>";
  323. }*/
  324. if(row.nsRegisterState == "0"){
  325. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=annualReview('" + row.securityPersonId +"','" + row.name + "','" +row.idCard + "','" +row.applyType + "','" + row.personType +"') style='cursor:pointer'/>";
  326. }else if(row.nsRegisterState == "4"){
  327. return "已提交申请";
  328. }else if(row.nsRegisterState == "5"){
  329. return "已关闭";
  330. }
  331. }
  332. function annualReview(id,name,idCard,applyType,personType){
  333. if(applyType =="1"){
  334. if(personType=="4"){//新就业
  335. $('#bt2AnnualReviewDialog').dialog({
  336. buttons:[{
  337. text:"确认",
  338. iconCls : 'icon-ok',
  339. handler : function(){
  340. btAnnualReview_submit();
  341. }
  342. },{
  343. text:"取消",
  344. iconCls : 'icon-cancel',
  345. handler : function(){
  346. $("#bt2AnnualReviewDialog").dialog("close");
  347. }
  348. }],
  349. onLoad:function(){
  350. btAnnualReview_load(id,name,idCard);
  351. $("#maritalStatus_btAnnualReview").append(maritalStatus_array);
  352. $("#maritalStatus1").append(maritalStatus_array);
  353. }
  354. })
  355. }else if(personType=="5"){//外来务工
  356. $('#bt3AnnualReviewDialog').dialog({
  357. buttons:[{
  358. text:"确认",
  359. iconCls : 'icon-ok',
  360. handler : function(){
  361. btAnnualReview_submit();
  362. }
  363. },{
  364. text:"取消",
  365. iconCls : 'icon-cancel',
  366. handler : function(){
  367. $("#bt3AnnualReviewDialog").dialog("close");
  368. }
  369. }],
  370. onLoad:function(){
  371. btAnnualReview_load(id,name,idCard);
  372. $("#maritalStatus_btAnnualReview").append(maritalStatus_array);
  373. $("#maritalStatus1").append(maritalStatus_array);
  374. $("#area_btAnnualReview").append(area_array);
  375. $("#area_btAnnualReview").change(function(){
  376. $("#street_btAnnualReview").children('option').remove();
  377. getStreetList($("#area_btAnnualReview").val(),0,"street_btAnnualReview");
  378. $("#neighborhood_btAnnualReview").children('option').remove();
  379. $("#neighborhood_btAnnualReview").append("<option value=''>请选择</option>");
  380. });
  381. $("#street_btAnnualReview").change(function(){
  382. $("#neighborhood_btAnnualReview").children('option').remove();
  383. getNeighborhoodList($("#street_btAnnualReview").val(),0,"neighborhood_btAnnualReview");
  384. $("#communityId_btAnnualReview").children('option').remove();
  385. $("#communityId_btAnnualReview").append("<option value=''>请选择</option>");
  386. });
  387. $("#neighborhood_btAnnualReview").change(function(){
  388. $("#communityId_btAnnualReview").children('option').remove();
  389. getCommunityList($("#neighborhood_btAnnualReview").val(),0,"communityId_btAnnualReview");
  390. $("#community_btAnnualReview").val("");
  391. });
  392. $("#communityId_btAnnualReview").change(function(){
  393. var community = $("#communityId_btAnnualReview").find("option:selected").text();
  394. $("#community_btAnnualReview").val(community);
  395. });
  396. }
  397. })
  398. }else {
  399. $('#btAnnualReviewDialog').dialog({
  400. buttons:[{
  401. text:"确认",
  402. iconCls : 'icon-ok',
  403. handler : function(){
  404. btAnnualReview_submit();
  405. }
  406. },{
  407. text:"取消",
  408. iconCls : 'icon-cancel',
  409. handler : function(){
  410. $("#btAnnualReviewDialog").dialog("close");
  411. }
  412. }],
  413. onLoad:function(){
  414. btAnnualReview_load(id,name,idCard);
  415. $("#maritalStatus_btAnnualReview").append(maritalStatus_array);
  416. $("#maritalStatus1").append(maritalStatus_array);
  417. $("#area_btAnnualReview").append(area_array);
  418. $("#area_btAnnualReview").change(function(){
  419. $("#street_btAnnualReview").children('option').remove();
  420. getStreetList($("#area_btAnnualReview").val(),0,"street_btAnnualReview");
  421. $("#neighborhood_btAnnualReview").children('option').remove();
  422. $("#neighborhood_btAnnualReview").append("<option value=''>请选择</option>");
  423. });
  424. $("#street_btAnnualReview").change(function(){
  425. $("#neighborhood_btAnnualReview").children('option').remove();
  426. getNeighborhoodList($("#street_btAnnualReview").val(),0,"neighborhood_btAnnualReview");
  427. $("#communityId_btAnnualReview").children('option').remove();
  428. $("#communityId_btAnnualReview").append("<option value=''>请选择</option>");
  429. });
  430. $("#neighborhood_btAnnualReview").change(function(){
  431. $("#communityId_btAnnualReview").children('option').remove();
  432. getCommunityList($("#neighborhood_btAnnualReview").val(),0,"communityId_btAnnualReview");
  433. $("#community_btAnnualReview").val("");
  434. });
  435. $("#communityId_btAnnualReview").change(function(){
  436. var community = $("#communityId_btAnnualReview").find("option:selected").text();
  437. $("#community_btAnnualReview").val(community);
  438. });
  439. $("#area2_btAnnualReview").append(area_array);
  440. $("#area2_btAnnualReview").change(function(){
  441. $("#street2_btAnnualReview").children('option').remove();
  442. getStreetList($("#area2_btAnnualReview").val(),0,"street2_btAnnualReview");
  443. $("#neighborhood2_btAnnualReview").children('option').remove();
  444. $("#neighborhood2_btAnnualReview").append("<option value=''>请选择</option>");
  445. });
  446. $("#street2_btAnnualReview").change(function(){
  447. $("#neighborhood2_btAnnualReview").children('option').remove();
  448. getNeighborhoodList($("#street2_btAnnualReview").val(),0,"neighborhood2_btAnnualReview");
  449. $("#communityId2_btAnnualReview").children('option').remove();
  450. $("#communityId2_btAnnualReview").append("<option value=''>请选择</option>");
  451. });
  452. $("#neighborhood2_btAnnualReview").change(function(){
  453. $("#communityId2_btAnnualReview").children('option').remove();
  454. getCommunityList($("#neighborhood2_btAnnualReview").val(),0,"communityId2_btAnnualReview");
  455. $("#community2_btAnnualReview").val(community);
  456. });
  457. $("#communityId2_btAnnualReview").change(function(){
  458. var community2 = $("#communityId2_btAnnualReview").find("option:selected").text();
  459. $("#community2_btAnnualReview").val(community2);
  460. });
  461. }
  462. })
  463. }
  464. }else if(applyType =="2"){
  465. if(personType=="4"){//新就业
  466. $('#swpz2AnnualReviewDialog').dialog({
  467. buttons:[{
  468. text:"确认",
  469. iconCls : 'icon-ok',
  470. handler : function(){
  471. swpzAnnualReview_submit();
  472. }
  473. },{
  474. text:"取消",
  475. iconCls : 'icon-cancel',
  476. handler : function(){
  477. $("#swpz2AnnualReviewDialog").dialog("close");
  478. }
  479. }],
  480. onLoad:function(){
  481. swpzAnnualReview_load(id,name,idCard);
  482. $("#maritalStatus_swpzAnnualReview").append(maritalStatus_array);
  483. $("#maritalStatus1").append(maritalStatus_array);
  484. }
  485. })
  486. }else if(personType=="5"){//外来务工
  487. $('#swpz3AnnualReviewDialog').dialog({
  488. buttons:[{
  489. text:"确认",
  490. iconCls : 'icon-ok',
  491. handler : function(){
  492. swpzAnnualReview_submit();
  493. }
  494. },{
  495. text:"取消",
  496. iconCls : 'icon-cancel',
  497. handler : function(){
  498. $("#swpz3AnnualReviewDialog").dialog("close");
  499. }
  500. }],
  501. onLoad:function(){
  502. swpzAnnualReview_load(id,name,idCard);
  503. $("#maritalStatus_swpzAnnualReview").append(maritalStatus_array);
  504. $("#maritalStatus1").append(maritalStatus_array);
  505. $("#area_swpzAnnualReview").append(area_array);
  506. $("#area_swpzAnnualReview").change(function(){
  507. $("#street_swpzAnnualReview").children('option').remove();
  508. getStreetList($("#area_swpzAnnualReview").val(),0,"street_swpzAnnualReview");
  509. $("#neighborhood_swpzAnnualReview").children('option').remove();
  510. $("#neighborhood_swpzAnnualReview").append("<option value=''>请选择</option>");
  511. });
  512. $("#street_swpzAnnualReview").change(function(){
  513. $("#neighborhood_swpzAnnualReview").children('option').remove();
  514. getNeighborhoodList($("#street_swpzAnnualReview").val(),0,"neighborhood_swpzAnnualReview");
  515. $("#communityId_swpzAnnualReview").children('option').remove();
  516. $("#communityId_swpzAnnualReview").append("<option value=''>请选择</option>");
  517. });
  518. $("#neighborhood_swpzAnnualReview").change(function(){
  519. $("#communityId_swpzAnnualReview").children('option').remove();
  520. getCommunityList($("#neighborhood_swpzAnnualReview").val(),0,"communityId_swpzAnnualReview");
  521. $("#community_swpzAnnualReview").val("");
  522. });
  523. $("#communityId_swpzAnnualReview").change(function(){
  524. var community = $("#communityId_swpzAnnualReview").find("option:selected").text();
  525. $("#community_swpzAnnualReview").val(community);
  526. });
  527. }
  528. })
  529. }else {//中等偏下
  530. $('#swpzAnnualReviewDialog').dialog({
  531. buttons:[{
  532. text:"确认",
  533. iconCls : 'icon-ok',
  534. handler : function(){
  535. swpzAnnualReview_submit();
  536. }
  537. },{
  538. text:"取消",
  539. iconCls : 'icon-cancel',
  540. handler : function(){
  541. $("#swpzAnnualReviewDialog").dialog("close");
  542. }
  543. }],
  544. onLoad:function(){
  545. swpzAnnualReview_load(id,name,idCard);
  546. $("#maritalStatus_swpzAnnualReview").append(maritalStatus_array);
  547. $("#maritalStatus1").append(maritalStatus_array);
  548. $("#area_swpzAnnualReview").append(area_array);
  549. $("#area_swpzAnnualReview").change(function(){
  550. $("#street_swpzAnnualReview").children('option').remove();
  551. getStreetList($("#area_swpzAnnualReview").val(),0,"street_swpzAnnualReview");
  552. $("#neighborhood_swpzAnnualReview").children('option').remove();
  553. $("#neighborhood_swpzAnnualReview").append("<option value=''>请选择</option>");
  554. });
  555. $("#street_swpzAnnualReview").change(function(){
  556. $("#neighborhood_swpzAnnualReview").children('option').remove();
  557. getNeighborhoodList($("#street_swpzAnnualReview").val(),0,"neighborhood_swpzAnnualReview");
  558. $("#communityId_swpzAnnualReview").children('option').remove();
  559. $("#communityId_swpzAnnualReview").append("<option value=''>请选择</option>");
  560. });
  561. $("#neighborhood_swpzAnnualReview").change(function(){
  562. $("#communityId_swpzAnnualReview").children('option').remove();
  563. getCommunityList($("#neighborhood_swpzAnnualReview").val(),0,"communityId_swpzAnnualReview");
  564. $("#community_swpzAnnualReview").val("");
  565. });
  566. $("#communityId_swpzAnnualReview").change(function(){
  567. var community = $("#communityId_swpzAnnualReview").find("option:selected").text();
  568. $("#community_swpzAnnualReview").val(community);
  569. });
  570. $("#area2_swpzAnnualReview").append(area_array);
  571. $("#area2_swpzAnnualReview").change(function(){
  572. $("#street2_swpzAnnualReview").children('option').remove();
  573. getStreetList($("#area2_swpzAnnualReview").val(),0,"street2_swpzAnnualReview");
  574. $("#neighborhood2_swpzAnnualReview").children('option').remove();
  575. $("#neighborhood2_swpzAnnualReview").append("<option value=''>请选择</option>");
  576. });
  577. $("#street2_swpzAnnualReview").change(function(){
  578. $("#neighborhood2_swpzAnnualReview").children('option').remove();
  579. getNeighborhoodList($("#street2_swpzAnnualReview").val(),0,"neighborhood2_swpzAnnualReview");
  580. $("#communityId2_swpzAnnualReview").children('option').remove();
  581. $("#communityId2_swpzAnnualReview").append("<option value=''>请选择</option>");
  582. });
  583. $("#neighborhood2_swpzAnnualReview").change(function(){
  584. $("#communityId2_swpzAnnualReview").children('option').remove();
  585. getCommunityList($("#neighborhood2_swpzAnnualReview").val(),0,"communityId2_swpzAnnualReview");
  586. $("#community2_swpzAnnualReview").val(community);
  587. });
  588. $("#communityId2_swpzAnnualReview").change(function(){
  589. var community2 = $("#communityId2_swpzAnnualReview").find("option:selected").text();
  590. $("#community2_swpzAnnualReview").val(community2);
  591. });
  592. }
  593. })
  594. }
  595. }
  596. /*if(applyType =="1"){
  597. $('#btAnnualReviewDialog').dialog({
  598. buttons:[{
  599. text:"确认",
  600. iconCls : 'icon-ok',
  601. handler : function(){
  602. btAnnualReview_submit();
  603. }
  604. },{
  605. text:"取消",
  606. iconCls : 'icon-cancel',
  607. handler : function(){
  608. $("#btAnnualReviewDialog").dialog("close");
  609. }
  610. }],
  611. onLoad:function(){
  612. btAnnualReview_load(id,name,idCard);
  613. $("#maritalStatus_btAnnualReview").append(maritalStatus_array);
  614. $("#maritalStatus1").append(maritalStatus_array);
  615. $("#area_btAnnualReview").append(area_array);
  616. $("#area_btAnnualReview").change(function(){
  617. $("#street_btAnnualReview").children('option').remove();
  618. getStreetList($("#area_btAnnualReview").val(),0,"street_btAnnualReview");
  619. $("#neighborhood_btAnnualReview").children('option').remove();
  620. $("#neighborhood_btAnnualReview").append("<option value=''>请选择</option>");
  621. });
  622. $("#street_btAnnualReview").change(function(){
  623. $("#neighborhood_btAnnualReview").children('option').remove();
  624. getNeighborhoodList($("#street_btAnnualReview").val(),0,"neighborhood_btAnnualReview");
  625. $("#communityId_btAnnualReview").children('option').remove();
  626. $("#communityId_btAnnualReview").append("<option value=''>请选择</option>");
  627. });
  628. $("#neighborhood_btAnnualReview").change(function(){
  629. $("#communityId_btAnnualReview").children('option').remove();
  630. getCommunityList($("#neighborhood_btAnnualReview").val(),0,"communityId_btAnnualReview");
  631. $("#community_btAnnualReview").val("");
  632. });
  633. $("#communityId_btAnnualReview").change(function(){
  634. var community = $("#communityId_btAnnualReview").find("option:selected").text();
  635. $("#community_btAnnualReview").val(community);
  636. });
  637. }
  638. })
  639. }else if(applyType =="2"){
  640. $('#swpzAnnualReviewDialog').dialog({
  641. buttons:[{
  642. text:"确认",
  643. iconCls : 'icon-ok',
  644. handler : function(){
  645. swpzAnnualReview_submit();
  646. }
  647. },{
  648. text:"取消",
  649. iconCls : 'icon-cancel',
  650. handler : function(){
  651. $("#swpzAnnualReviewDialog").dialog("close");
  652. }
  653. }],
  654. onLoad:function(){
  655. swpzAnnualReview_load(id,name,idCard);
  656. $("#maritalStatus_swpzAnnualReview").append(maritalStatus_array);
  657. $("#maritalStatus1").append(maritalStatus_array);
  658. $("#area_swpzAnnualReview").append(area_array);
  659. $("#area_swpzAnnualReview").change(function(){
  660. $("#street_swpzAnnualReview").children('option').remove();
  661. getStreetList($("#area_swpzAnnualReview").val(),0,"street_swpzAnnualReview");
  662. $("#neighborhood_swpzAnnualReview").children('option').remove();
  663. $("#neighborhood_swpzAnnualReview").append("<option value=''>请选择</option>");
  664. });
  665. $("#street_swpzAnnualReview").change(function(){
  666. $("#neighborhood_swpzAnnualReview").children('option').remove();
  667. getNeighborhoodList($("#street_swpzAnnualReview").val(),0,"neighborhood_swpzAnnualReview");
  668. $("#communityId_swpzAnnualReview").children('option').remove();
  669. $("#communityId_swpzAnnualReview").append("<option value=''>请选择</option>");
  670. });
  671. $("#neighborhood_swpzAnnualReview").change(function(){
  672. $("#communityId_swpzAnnualReview").children('option').remove();
  673. getCommunityList($("#neighborhood_swpzAnnualReview").val(),0,"communityId_swpzAnnualReview");
  674. $("#community_swpzAnnualReview").val("");
  675. });
  676. $("#communityId_swpzAnnualReview").change(function(){
  677. var community = $("#communityId_swpzAnnualReview").find("option:selected").text();
  678. $("#community_swpzAnnualReview").val(community);
  679. });
  680. }
  681. })
  682. }*/
  683. }
  684. /**性别*/
  685. var sexFormatter = function(value , row , index){
  686. var sex = "";
  687. for(var nItem = 0; nItem < sexObj.length; nItem++ ){
  688. if(sexObj[nItem].code == row.sex){
  689. sex = sexObj[nItem].value;
  690. break;
  691. }
  692. }
  693. return sex;
  694. };
  695. var applyTypeFormatter = function(value , row , index){
  696. var applyType = "";
  697. for(var nItem = 0; nItem < applyTypeObj.length; nItem++ ){
  698. if(applyTypeObj[nItem].code == row.applyType){
  699. applyType = applyTypeObj[nItem].value;
  700. break;
  701. }
  702. }
  703. return applyType;
  704. }
  705. var dateFormatter = function(value , row , index){
  706. return dealDate(value);
  707. }
  708. var personTypeFormatter = function(value , row , index){
  709. var personType = "";
  710. for(var nItem = 0; nItem < personTypeObj.length; nItem++ ){
  711. if(personTypeObj[nItem].code == row.personType){
  712. personType = personTypeObj[nItem].value;
  713. break;
  714. }
  715. }
  716. return personType;
  717. }
  718. /**计算今天到结束时间的天数*/
  719. var countDay = function(time){
  720. var today = new Date();
  721. var endTime = new Date(time.replace(/\-/g, "/"));
  722. return parseInt(parseInt(today - endTime)/1000/60/60/24);
  723. }
  724. /**核实个人信息*/
  725. var updateSecurityPersonInfoFormatter = function(value , row , index){
  726. if(row.applyType=="2"){
  727. var day = countDay(row.houseEndTime);
  728. if(day>0){
  729. return ""
  730. }else{
  731. if(row.nsRegisterState != "1" && row.nsRegisterState != "2"&& row.nsRegisterState != "3"){
  732. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=updateSecurityPersonInfo(" + row.securityPersonId + ") style='cursor:pointer'/>";
  733. }else{
  734. return "";
  735. }
  736. }
  737. }else{
  738. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=updateSecurityPersonInfo(" + row.securityPersonId + ") style='cursor:pointer'/>";
  739. }
  740. }
  741. function updateSecurityPersonInfo(id){
  742. $("#updateSecurityPersonInfoDialog").dialog({
  743. buttons:[{
  744. text:"确认",
  745. iconCls : 'icon-ok',
  746. handler : function(){
  747. task_submit();
  748. }
  749. },{
  750. text:"取消",
  751. iconCls : 'icon-cancel',
  752. handler : function(){
  753. $("#updateSecurityPersonInfoDialog").dialog("close")
  754. }
  755. }],
  756. onLoad : function(){
  757. task_load(id);
  758. }
  759. })
  760. }
  761. var nsRegisterFormatter = function(value , row , index){
  762. if(row.nsRegisterState == "1"){
  763. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/update.png' title='年审' onclick=nsRegister(" + row.securityPersonId + ") style='cursor:pointer'/>";
  764. }else if(row.nsRegisterState == "2"){
  765. return "已提交年审登记"
  766. }else if(row.nsRegisterState == "3"){
  767. return "已导出年审登记";
  768. }
  769. }
  770. function nsRegister(id){
  771. $.messager.confirm('确认','确认提交年审登记吗?',function(r){
  772. if (r){
  773. $.ajax({
  774. type: "POST",
  775. url:"securityPersonAction_nsRegister",
  776. data: "securityPerson.id="+id,// 你的formid
  777. error: function(data) {
  778. $.messager.alert("提示","提交失败");
  779. },
  780. success: function(result) {
  781. $("#securityPersonInfoDataGrid").datagrid("reload");
  782. $('#securityPersonInfoDataGrid').datagrid('clearSelections');
  783. $('#securityPersonInfoDataGrid').datagrid('clearChecked');
  784. }
  785. })
  786. }
  787. });
  788. }
  789. /**详细*/
  790. var detailsFormatter = function(value , row , index){
  791. return "<img src='<%=basePath%>/js/easyui/themes/itemicon/detail.png' title='查看详情' onclick=securityPersonDetails(" + row.securityPersonId +") style='cursor:pointer' />";
  792. };
  793. /**详细页面对话框*/
  794. var securityPersonDetails = function(id,fileNum){
  795. $("#detailsecurityPersonDialog").dialog(
  796. {
  797. buttons : [
  798. {
  799. text : '确定',
  800. iconCls : 'icon-ok',
  801. handler : function(){
  802. $("#detailsecurityPersonDialog").dialog("close");
  803. }
  804. }
  805. ],
  806. onLoad : function(){
  807. securityPersonApply_detail_load(id,"undefined");
  808. }
  809. }
  810. );
  811. };
  812. </script>
  813. <div class="easyui-layout" data-options="fit:true,border:false">
  814. <div data-options="region:'center',border:false">
  815. <div id="searchtool" data-options="region:'north' , border:false">
  816. <div class="clear"></div>
  817. <table id="tblQuery" style="width:100%;">
  818. <tr>
  819. <td align="right" style="width: 8%;"><span>姓名</span></td><td style="width: 10%;"><input id="name" name="securityPerson.name" type="text" style="width: 100px;"/></td>
  820. <td align="right" style="width: 6%;"><span>身份证号</span></td><td style="width: 10%;"><input id="idCard" name="securityPerson.idCard" type="text" style="width: 140px;"/></td>
  821. <td align="left" style="width: 30%;" >
  822. <a href="javascript:searchFun();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true">查询</a>
  823. <a href="javascript:ClearQuery();" class="easyui-linkbutton" data-options="iconCls:'icon-emptied',plain:true">清空</a>
  824. </td>
  825. </tr>
  826. </table>
  827. <div class="clear"></div>
  828. </div>
  829. <table id="securityPersonInfoDataGrid">
  830. <thead frozen="true">
  831. <tr>
  832. <th data-options="field:'id',checkbox:true,width:30">ID</th>
  833. <th data-options="field:'name',sortable:true,width:100 ">姓名</th>
  834. </tr>
  835. </thead>
  836. <thead>
  837. <tr>
  838. <th data-options="field:'idCard',width:140">身份证号</th>
  839. <th data-options="field:'phone',width:90">联系电话</th>
  840. <th data-options="field:'applyType',sortable:true,width:140,formatter:applyTypeFormatter">保障类型</th>
  841. <th data-options="field:'houseRegisterName',sortable:true,width:140">所属街道</th>
  842. <th data-options="field:'address',sortable:true,width:140">房屋坐落</th>
  843. <th data-options="field:'houseEndTime',sortable:true,width:140,formatter:dateFormatter">到期时间</th>
  844. <th data-options="field:'nsRemark',align:'center',width:120">年审备注</th>
  845. <th data-options="field:'annualReviewYear',align:'center',width:120">年度审核</th>
  846. <th data-options="field:'annualReview',align:'center',width:80,formatter:annualReviewFormatter">年审</th>
  847. <th data-options="field:'details',align:'center',width:60,formatter:detailsFormatter">申请记录</th>
  848. <!-- <th data-options="field:'updateSecurityPersonInfo',align:'center',width:80,formatter:updateSecurityPersonInfoFormatter">核实信息</th>
  849. <th data-options="field:'nsRegister',align:'center',width:90,formatter:nsRegisterFormatter">年审登记2</th> -->
  850. </tr>
  851. </thead>
  852. </table>
  853. </div>
  854. </div>
  855. <div id="addSecurityPersonApplyDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1100,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_toAnnualReviewAdd'">
  856. </div>
  857. <div id="addAssetsInfoDialog" data-options="title:'&nbsp;资产信息',iconCls:'icon-add',width:600,height:200,modal:true,href:'<%=basePath %>/securityPersonApply2Action_toAssetsInfo'">
  858. </div>
  859. <div id="swpzAnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_swpzAnnualReview'">
  860. </div>
  861. <div id="swpz2AnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_swpz2AnnualReview'">
  862. </div>
  863. <div id="swpz3AnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_swpz3AnnualReview'">
  864. </div>
  865. <div id="btAnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_btAnnualReview'">
  866. </div>
  867. <div id="bt2AnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_bt2AnnualReview'">
  868. </div>
  869. <div id="bt3AnnualReviewDialog" data-options="title:'&nbsp;年审信息',iconCls:'icon-add',width:1200,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_bt3AnnualReview'">
  870. </div>
  871. <div id="updateSecurityPersonInfoDialog" data-options="title:'&nbsp;修改信息',iconCls:'icon-update',width:600,height:350,modal:true,href:'<%=basePath %>/securityPersonAction_toUpdateSecurityPersonInfo'">
  872. </div>
  873. <div id="detailsecurityPersonDialog" data-options="title:'&nbsp;资料详细信息',iconCls:'icon-details',width:900,height:500,modal:true,href:'<%=basePath %>/securityPersonAction_toSecurityPersonApplyList'">
  874. </div>
  875. <div id="detailsecurityPersonApplyDialog" data-options="title:'&nbsp;资料详细信息',iconCls:'icon-details',width:900,height:500,modal:true,href:'<%=basePath %>/securityPersonApply2Action_toSearchDetail'">
  876. </div>
  877. <script type="text/javascript">
  878. <!--
  879. parent.$.messager.progress('close');
  880. //-->
  881. </script>