fwpj.jsp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. <!DOCTYPE HTML>
  2. <%@ page language="java" pageEncoding="UTF-8" import="java.util.*"
  3. contentType="text/html; charset=UTF-8"%>
  4. <%@ page import="cn.sinobest.framework.util.Util"%>
  5. <%@ page import="cn.sinobest.framework.util.ConfUtil" %>
  6. <%@ taglib uri="/WEB-INF/hnisi.tld" prefix="hnisi"%>
  7. <%
  8. String path = request.getContextPath();
  9. String basePath = path+"/";
  10. %>
  11. <script src="/web/js/comm/lib/jquery-min.js"></script>
  12. <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
  13. <link rel="stylesheet" href="<%=basePath %>player/js/bootstrap-3.3.7-dist/css/bootstrap.min.css">
  14. <script src="/web/js/comm/lib/jquery-2.1.1.min.js"></script>
  15. <script src="<%=basePath %>player/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
  16. <html>
  17. <head lang="zh-cn">
  18. <meta charset="utf-8">
  19. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  20. <meta name="viewport" content="width=device-width,initial-scale=1">
  21. <title>湛江智慧人社</title>
  22. </head>
  23. <%
  24. String sllsh = request.getParameter("sllsh")==null?"":request.getParameter("sllsh");
  25. final String getSlxxUrl = ConfUtil.getParam("ZWNW_HCP_GETSLXX_URL");
  26. final String getdictsUrl = ConfUtil.getParam("ZWNW_HCP_GETDICTS_URL");
  27. final String saveHcpUrl = ConfUtil.getParam("ZWNW_HCP_SAVEHCP_URL");
  28. %>
  29. <script>
  30. var evalprocess = '';
  31. var sfjbsx = '';
  32. var pjqd = 'yctb';
  33. var sfjbsx = '';
  34. var slbh = '';
  35. var sllsh = "<%=sllsh%>";
  36. var sxmc = '';
  37. var yhpj = '';
  38. var yhpjnw = '';
  39. function hcpsave(onlyone){
  40. if(onlyone == '1'){
  41. evalprocess = evalprocess
  42. var mycd = document.getElementById("blpj").getElementsByTagName("button");
  43. for(let i=0;i<mycd.length;i++){
  44. if(mycd[i].getAttribute("choose")=="true"){
  45. yhpj = mycd[i].getAttribute("value")
  46. }
  47. }
  48. yhpjnw = $("#sqpjnr").val();
  49. }
  50. var submitdata = {
  51. evalprocess: evalprocess,
  52. pjqd: "yctb",
  53. rsWbBjLsh: "",
  54. sfjbsx: sfjbsx,
  55. slbh: slbh,
  56. sllsh: sllsh,
  57. sxmc: sxmc,
  58. yhpj: yhpj,
  59. yhpjnw: yhpjnw
  60. }
  61. $.ajax({
  62. type: 'post',
  63. url: "<%=saveHcpUrl%>",
  64. data: JSON.stringify(submitdata),
  65. cache: false,
  66. processData: false,
  67. dataType: "json",
  68. contentType: "application/json;charset=utf-8",
  69. async:false,
  70. }).success(function (data) {
  71. if(onlyone.indexOf("2") !== -1 || onlyone.indexOf("1") !== -1){
  72. $('#myModal').modal('show');
  73. }
  74. console.log("保存成功");
  75. }).error(function () {
  76. console.log("保存失败");
  77. });
  78. }
  79. function formsubmit(){
  80. //调用两次
  81. //办理
  82. if((evalprocess === '1,2' && sfjbsx !== '1') || (sfjbsx !== '1' && evalprocess === '1,2')){
  83. var mycd = document.getElementById("blpj").getElementsByTagName("button");
  84. for(let i=0;i<mycd.length;i++){
  85. if(mycd[i].getAttribute("choose")=="true"){
  86. yhpj = mycd[i].getAttribute("value")
  87. }
  88. }
  89. yhpjnw = $("#sqpjnr").val();
  90. evalprocess = '1'
  91. hcpsave("第一次保存");
  92. var mycd2 = document.getElementById("bjpj").getElementsByTagName("button");
  93. for(let i=0;i<mycd.length;i++){
  94. if(mycd2[i].getAttribute("choose")=="true"){
  95. yhpj = mycd2[i].getAttribute("value")
  96. }
  97. }
  98. evalprocess = '2'
  99. yhpjnw = $("#bjpjnr").val();
  100. hcpsave("2");
  101. setTimeout(function() {
  102. location.reload();
  103. },3000);
  104. }else{//调用一次
  105. hcpsave("1");
  106. setTimeout(function() {
  107. location.reload();
  108. },3000);
  109. }
  110. }
  111. function getbjpj(){
  112. var verygood = document.getElementById("bjpj").getElementsByTagName("button");
  113. for(let i=0;i<verygood.length;i++){
  114. verygood[i].style.color = 'rgba(0, 0, 0, 0.65)'
  115. if( verygood[i].getAttribute("value") == "5"){
  116. verygood[i].setAttribute("class","pjcss btn blpj");
  117. verygood[i].style.color = '#fff'
  118. verygood[i].setAttribute("choose",true)
  119. }
  120. verygood[i].onclick = function(){
  121. for(var j=0;j<verygood.length;j++){
  122. verygood[j].setAttribute("class","btn blpj");
  123. verygood[j].style.backgroundColor = ''
  124. verygood[j].style.color = 'rgba(0, 0, 0, 0.65)'
  125. verygood[j].removeAttribute("choose")
  126. }
  127. this.style.backgroundColor = '#1e6ddd'
  128. this.style.color = '#fff'
  129. verygood[i].setAttribute("choose",true)
  130. var pjbtn = document.getElementById("bjpj").getElementsByTagName("button");
  131. var selectbtnvalue = '';
  132. for(var k = 0;k<pjbtn.length;k++){
  133. if(pjbtn[k].getAttribute("choose")){
  134. selectbtnvalue = parseInt(pjbtn[k].getAttribute("value"));
  135. var img = document.getElementById("imgbox2").getElementsByTagName("img");
  136. for(var n = 0; n<selectbtnvalue;n++){
  137. for(var m=0;m<img.length;m++){
  138. if(m+1 <= selectbtnvalue){
  139. img[m].setAttribute("src","/web/images/selected.jpg")
  140. }else{
  141. img[m].setAttribute("src","/web/images/unselected.jpg")
  142. }
  143. }
  144. }
  145. break;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. window.onload = function() {
  152. // dom加载完毕
  153. $.ajax({
  154. type: 'post',
  155. url: "<%=getSlxxUrl%>",
  156. data: JSON.stringify({sllsh:sllsh}),
  157. cache: false,
  158. processData: false,
  159. dataType: "json",
  160. contentType: "application/json;charset=utf-8",
  161. async:false,
  162. }).success(function (data) {
  163. console.log("获取成功");
  164. sxmc = data.map.data.sxmc;
  165. slbh = data.map.data.slbh;
  166. evalprocess = data.map.data.evalprocess;
  167. sfjbsx = data.map.data.sfjbsx;
  168. var zy = '申请';
  169. if (sfjbsx === '1') {
  170. zy = '办结'
  171. } else {
  172. if (evalprocess === '1') {
  173. zy = '申请'
  174. } else if (evalprocess === '2') {
  175. zy = '办结'
  176. }
  177. }
  178. var ywsq = document.getElementById("ywsq");
  179. var sxlx = document.getElementById("sxlx");
  180. var slbhdata = document.getElementById("slbh");
  181. sxlx.innerText = sxmc
  182. slbhdata.innerText = slbh
  183. ywsq.innerText = "请您对本次业务"+zy+"的整体服务进行评价:"
  184. //已办结,只显示图片
  185. if (!evalprocess) {
  186. var child=document.getElementById("allcontent");
  187. child.parentNode.removeChild(child);
  188. var successbox = document.getElementById("success");
  189. successbox.style.display ='';
  190. }else {
  191. var allcontent = document.getElementById("allcontent");
  192. allcontent.style.display = ''
  193. if (evalprocess === '1,2') {
  194. if (sfjbsx === '1') {
  195. //即办即结事项 显示办结
  196. var child=document.getElementById("ywsqpj");
  197. child.parentNode.removeChild(child);
  198. } else {
  199. ywsq.innerText = "请您对本次业务申请的整体服务进行评价:"
  200. }
  201. }
  202. //即办即结事项,始终只有一条显示页面
  203. //非即办即结事项,仅评价受理或者办结阶段,只有一条显示,办结阶段两条
  204. if (sfjbsx === '1') {
  205. //即办即结事项
  206. var child=document.getElementById("ztfwpj");
  207. child.parentNode.removeChild(child);
  208. } else {
  209. //非即办即结事项
  210. if (evalprocess === '1,2') {
  211. var child=document.getElementById("success");
  212. child.parentNode.removeChild(child);
  213. } else {
  214. var child=document.getElementById("success");
  215. child.parentNode.removeChild(child);
  216. var child1=document.getElementById("ztfwpj");
  217. child1.parentNode.removeChild(child1);
  218. }
  219. }
  220. }
  221. }).error(function () {
  222. console.log("获取失败");
  223. });
  224. if(evalprocess){
  225. $.ajax({
  226. type: 'post',
  227. url: "<%=getdictsUrl%>",
  228. data: JSON.stringify({
  229. "dictArr":["RS_JK_HCP_PJDJ"]
  230. }),
  231. cache: false,
  232. processData: false,
  233. dataType: "json",
  234. contentType: "application/json;charset=utf-8",
  235. async:false,
  236. }).success(function (data) {
  237. console.log("初始化字典成功");
  238. var dicts = data.map.data.code_detail.RS_JK_HCP_PJDJ;
  239. dicts.sort((a, b) => {
  240. return Number(b.code) - Number(a.code)
  241. })
  242. dicts.forEach( function(item){
  243. var node=document.createElement("button");
  244. var textnode=document.createTextNode(item.detail);
  245. node.setAttribute("class","btn blpj")
  246. node.setAttribute("value",item.code);
  247. node.appendChild(textnode);
  248. document.getElementById("blpj").appendChild(node);
  249. if((evalprocess === '1,2' && sfjbsx !== '1') || (sfjbsx === '1' && evalprocess === '1,2')){
  250. var node=document.createElement("button");
  251. var textnode=document.createTextNode(item.detail);
  252. node.setAttribute("class","btn blpj")
  253. node.setAttribute("itemvalue",parseInt(item.code)+5)
  254. node.setAttribute("value",item.code);
  255. node.appendChild(textnode);
  256. document.getElementById("bjpj").appendChild(node);
  257. }
  258. })
  259. var verygood = document.getElementById("blpj").getElementsByTagName("button");
  260. for(let i=0;i<verygood.length;i++){
  261. verygood[i].style.color = 'rgba(0, 0, 0, 0.65)'
  262. if( verygood[i].getAttribute("value") == "5"){
  263. verygood[i].setAttribute("class","pjcss btn blpj");
  264. verygood[i].style.color = '#fff'
  265. verygood[i].setAttribute("choose",true)
  266. }
  267. verygood[i].onclick = function(){
  268. for(var j=0;j<verygood.length;j++){
  269. verygood[j].setAttribute("class","btn blpj");
  270. verygood[j].style.backgroundColor = ''
  271. verygood[j].style.color = 'rgba(0, 0, 0, 0.65)'
  272. verygood[j].removeAttribute("choose")
  273. }
  274. this.style.backgroundColor = '#1e6ddd'
  275. this.style.color = '#fff'
  276. verygood[i].setAttribute("choose",true)
  277. var pjbtn = document.getElementById("blpj").getElementsByTagName("button");
  278. let selectbtnvalue = '';
  279. for(var k = 0;k<pjbtn.length;k++){
  280. if(pjbtn[k].getAttribute("choose")){
  281. selectbtnvalue = parseInt(pjbtn[k].getAttribute("value"));
  282. var img = document.getElementById("imgbox1").getElementsByTagName("img");
  283. for(var n = 0; n<selectbtnvalue;n++){
  284. for(var m=0;m<img.length;m++){
  285. if(m+1 <= selectbtnvalue){
  286. img[m].setAttribute("src","/web/images/selected.jpg")
  287. }else{
  288. img[m].setAttribute("src","/web/images/unselected.jpg")
  289. }
  290. }
  291. }
  292. break;
  293. }
  294. }
  295. }
  296. }
  297. }).error(function () {
  298. console.log("初始化字典失败");
  299. });
  300. if(evalprocess === '1,2' && sfjbsx !== '1'){
  301. getbjpj();
  302. }
  303. }
  304. }
  305. </script>
  306. <body>
  307. <!-- 模态框(Modal) -->
  308. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  309. <div class="modal-dialog">
  310. <div class="modal-content">
  311. <div class="modal-header" style="height:100px">
  312. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
  313. </button>
  314. <h2 style="line-height: 70px;" class="modal-title" id="myModalLabel">
  315. 提交成功!感谢您的评价!
  316. </h2>
  317. </div>
  318. </div><!-- /.modal-content -->
  319. </div><!-- /.modal-dialog -->
  320. </div><!-- /.modal -->
  321. <div id="success" style="margin:0 0 0 0; text-align: center;display:none">
  322. <img border='0' width='100%' height='800px' style='position: absolute;left:0px; top:0px;' src="/web/images/hcp-success.jpg"
  323. style="height: 800px;width:100%;margin:0 0 0 0;overflow: hidden; display:block" />
  324. </div>
  325. <div class="ui-form-wrap" id="allcontent" style="display:none">
  326. <div class="ui-form-edit">
  327. <div class="card" style="height: 991px; ">
  328. <div style="
  329. text-align: center;
  330. font-size: 35px;
  331. font-weight: bold;
  332. color: rgba(0, 0, 0);
  333. margin: 0 24px 16px;
  334. padding: 20px 0px 12px;
  335. ">
  336. <span>您的评价让服务变得更好</span>
  337. </div>
  338. <div class="allcontent" style="padding-left: 100px;">
  339. <div id="ywsqpj">
  340. <div class="tittlecommon">
  341. <span>您办理的业务:</span>
  342. <span id="sxlx" class="sxlxcommon"></span>
  343. </div>
  344. <div class="tittlecommon">
  345. <span>业务受理编号:</span>
  346. <span id="slbh" class="sxlxcommon"></span>
  347. </div>
  348. <div class="tittlecommon">
  349. <span id="ywsq" >请您对本次业务申请的整体服务进行评价:</span>
  350. </div>
  351. <div style="padding:4px 0px;overflow:hidden;">
  352. <div class="blpj" id="blpj" >
  353. </div>
  354. </div>
  355. <div class="tittlecommon">
  356. <span>评价星数:</span>
  357. <div id="imgbox1" style="display:inline-block;">
  358. <img id="sqpjimg1" src="/web/images/selected.jpg" style="vertical-align:top;" />
  359. <img id="sqpjimg2" src="/web/images/selected.jpg" style="vertical-align:top;" />
  360. <img id="sqpjimg3" src="/web/images/selected.jpg" style="vertical-align:top;" />
  361. <img id="sqpjimg4" src="/web/images/selected.jpg" style="vertical-align:top;" />
  362. <img id="sqpjimg5" src="/web/images/selected.jpg" style="vertical-align:top;" />
  363. </div>
  364. </div>
  365. <div style="padding:4px 0px;padding-left:8px;height: 41px;line-height: 41px;">
  366. <span style="padding-left:8px; font-size: 25px;color: rgba(0, 0, 0, 0.65);">感谢您的评价!请录入您的评价理由,以帮助我们更好地提升政务服务水平。</span>
  367. </div>
  368. <div class="pjcontent" style="width:1106px;height:216px;margin-left:8px; margin-bottom: 16px; border:1px solid #e8e8e8">
  369. <div style="height: 184px;width: 1073px;padding: 16px;">
  370. <p style="line-height: 21px;margin-bottom: 20px; display: inline-block; font-weight: 500;color: rgba(0, 0, 0, 0.65);font-size: 20px;">我的评价</p>
  371. <textarea id="sqpjnr" class="yhpjnr" rows="4" maxlength="150" placeholder="请输入150个字以内"></textarea>
  372. </div>
  373. </div>
  374. </div>
  375. <div id="ztfwpj">
  376. <div class="tittlecommon">
  377. <span>请您对本次业务办结的整体服务进行评价:</span>
  378. </div>
  379. <div style="padding-left:8px;overflow:hidden;">
  380. <div class="blpj" id="bjpj" >
  381. </div>
  382. </div>
  383. <div class="tittlecommon">
  384. <span>评价星数:</span>
  385. <div id="imgbox2" style="display:inline-block;">
  386. <img id="sqpjimg6" src="/web/images/selected.jpg" style="vertical-align:top;" />
  387. <img id="sqpjimg7" src="/web/images/selected.jpg" style="vertical-align:top;" />
  388. <img id="sqpjimg8" src="/web/images/selected.jpg" style="vertical-align:top;" />
  389. <img id="sqpjimg9" src="/web/images/selected.jpg" style="vertical-align:top;" />
  390. <img id="sqpjimg10" src="/web/images/selected.jpg" style="vertical-align:top;" />
  391. </div>
  392. </div>
  393. <div style="padding:4px 0px;padding-left:8px;height: 41px;line-height: 41px;">
  394. <span style="padding-left:8px; font-size: 25px;color: rgba(0, 0, 0, 0.65);">感谢您的评价!请录入您的评价理由,以帮助我们更好地提升政务服务水平。</span>
  395. </div>
  396. <div class="pjcontent" style="width:1106px;height:216px;margin-left:8px; margin-bottom: 16px; border:1px solid #e8e8e8">
  397. <div style="height: 184px;width: 1073px;padding: 16px;">
  398. <p style="line-height: 21px;margin-bottom: 20px; display: inline-block; font-weight: 500;color: rgba(0, 0, 0, 0.65);font-size: 20px;">我的评价</p>
  399. <textarea id="bjpjnr" class="yhpjnr" rows="4" maxlength="150" placeholder="请输入150个字以内"></textarea>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. <div id="tipj" style="width: 100%; text-align: center;">
  405. <button class="submitpj" onclick="formsubmit()">
  406. <span>提交评价</span>
  407. </button>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </body>
  413. </html>
  414. <style>
  415. * {
  416. margin : 0 ;
  417. padding : 0 ;
  418. }
  419. .mycd li {
  420. list-style: none;
  421. height: 21px;
  422. padding: 5px 10px;
  423. margin-right: 20px;
  424. float: left;
  425. color: rgb(94, 88, 91);
  426. font-size: 14px;
  427. margin-top: 10px;
  428. }
  429. #myModal{
  430. left: 50%;
  431. top: 50%;
  432. transform: translate(-50%,-50%);
  433. min-width:80%;/*这个比例可以自己按需调节*/
  434. overflow: visible;
  435. bottom: inherit;
  436. right: inherit;
  437. }
  438. .blpj{
  439. text-align: center;
  440. list-style: none;
  441. height: 65px;
  442. padding: 5px 10px;
  443. margin-right: 20px;
  444. float: left;
  445. font-size: 14px;
  446. }
  447. .btn{
  448. font-size: 25px;
  449. text-align: center;
  450. width: 160px;
  451. border-radius: 4px 0 0 4px;
  452. background-color: #fff;
  453. height: 58px;
  454. border: 1px solid #d9d9d9
  455. }
  456. .pjcss {
  457. background-color:#1e6ddd;
  458. color: #fff;
  459. }
  460. textarea:focus {
  461. outline: none !important;
  462. border:1px solid #1e6ddd;
  463. box-shadow: 0 0 3px #719ECE;
  464. }
  465. .tittlecommon{
  466. padding:4px 0px 4px 8px;height: 41px;line-height: 41px;font-weight: bold;color: rgba(0, 0, 0);font-size: 25px;
  467. }
  468. .sxlxcommon{
  469. font-weight:400px;font-size:25px;color:rgba(0, 0, 0,0.65);
  470. }
  471. .submitpj {
  472. display: inline-block;
  473. border-radius: 4px;
  474. height: 58px;
  475. padding: 0px 15px;
  476. margin: 0px 8px;
  477. margin-bottom: 15px;
  478. font-size: 25px;
  479. border: 1px solid #1e6ddd;
  480. background-color:#1e6ddd;
  481. color:#fff;
  482. }
  483. .submitpj:hover{
  484. -webkit-box-shadow: #ccc 0px 5px 5px;
  485. -moz-box-shadow: #ccc 0px 5px 5px;
  486. box-shadow: #ccc 0px 10px 10px;
  487. }
  488. .yhpjnr{
  489. resize:none;
  490. width: 1038px;
  491. height:120px;
  492. padding: 4px 22px 4px 11px;
  493. border:1px solid #e8e8e8;
  494. font-size: 25px;
  495. color: rgba(0, 0, 0, 0.65);
  496. }
  497. .yhpjnrclick{
  498. resize:none;
  499. width: 723px;
  500. height:84px;
  501. padding: 4px 22px 4px 11px;
  502. border: 1px solid #1e6ddd;
  503. }
  504. .yhpjnr:hover{
  505. border: 1px solid #1e6ddd;
  506. }
  507. textarea::-webkit-input-placeholder {
  508. rgba(0, 0, 0, 0.65);
  509. font-size: 25px;
  510. }
  511. textarea::-moz-placeholder { /* Mozilla Firefox 19+ */
  512. rgba(0, 0, 0, 0.65);
  513. font-size: 25px;
  514. }
  515. textarea:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
  516. rgba(0, 0, 0, 0.65);
  517. font-size: 25px;
  518. }
  519. textarea:-ms-input-placeholder { /* Internet Explorer 10-11 */
  520. rgba(0, 0, 0, 0.65);
  521. font-size: 25px;
  522. }
  523. </style>
  524. <script type="text/javascript">
  525. </script>