c011ff3fc3f8b54953f7011c622c3b4f0722ef22.svn-base 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <%@include file="../../../include1.jsp" %>
  8. <style type="text/css">
  9. .cententCenter{
  10. text-align: center;
  11. }
  12. .table{
  13. /* margin-top: 15px; */
  14. width:90%;
  15. margin: 15px auto;
  16. border-collapse: collapse;
  17. border:1pt solid #cbcbcb;
  18. padding: 5px;
  19. }
  20. .td_head{
  21. border: 1pt solid #cbcbcb;
  22. height:36px;
  23. line-height: 36px;
  24. font-weight: bold;
  25. }
  26. .td_border1{
  27. border-right:1pt solid #cbcbcb;
  28. border-left:1pt solid #cbcbcb;
  29. border-bottom:1pt solid #cbcbcb;
  30. height:36px;
  31. line-height: 36px;
  32. text-align: center
  33. }
  34. .td_break{
  35. word-wrap:break-word;
  36. word-break:break-all;
  37. }
  38. </style>
  39. <script type="text/javascript">
  40. var fd_objectid="<%=request.getParameter("fd_id")%>";
  41. //返回主页面
  42. function goBack() {
  43. //获取iframe中的元素值
  44. var iframe =parent.document.getElementsByName("frmright")[0];
  45. iframe.src = "/nwyj/page/business/em/warningDuty/DutyPlan.jsp";
  46. }
  47. $(function(){
  48. $("#titleShow").text("查看值班汇总");
  49. $("#goback").hover(function(){
  50. $(this).attr("src","/nwyj/images/temp/back_hover.png");
  51. },function(){
  52. $(this).attr("src","/nwyj/images/temp/back.png");
  53. });
  54. $("#goback").bind("click",goBack);
  55. if(fd_objectid.length>0){
  56. var params = {classid : "310",objectID : fd_objectid};
  57. $.ajax({
  58. url : $.pathname() + '/ws/crud/CRUDService/getDataById/',
  59. type : 'post',
  60. data : params,
  61. dataType : 'json',
  62. success : function(data){
  63. for(col in data){
  64. $("div#"+col).html(data[col]);
  65. }
  66. var WAIT_INPUT_DUTY_DEPT_ID = data.WAIT_INPUT_DUTY_DEPT_ID_310;
  67. var dutyNum = data.DUTY_NUM_310;
  68. //查询加载值班详情
  69. queryDutyDetail(WAIT_INPUT_DUTY_DEPT_ID,fd_objectid);
  70. },
  71. error : function(e){
  72. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  73. }
  74. });
  75. }
  76. });
  77. /**
  78. 根据需要安排值班的部门(角色)id查询值班详细
  79. ***/
  80. function queryDutyDetail(deptids,dutyNum){
  81. var url = $.pathname() + '/ws/wduty/WarningDutyService/loadDutyDetailByDeptIds/';
  82. var params = {
  83. deptids : deptids,
  84. planId : fd_objectid
  85. };
  86. $("body").eq(0).showLoading();
  87. $.ajax({
  88. url : url,
  89. type : 'post',
  90. data : params,
  91. dataType : 'json',
  92. success : function(data){
  93. createDutyDetailTable(data,dutyNum);
  94. $("body").eq(0).hideLoading();
  95. },
  96. error : function(e){
  97. $("body").eq(0).hideLoading();
  98. $.messager.alert('系统提示信息', '访问服务失败!', 'error');
  99. }
  100. });
  101. }
  102. function createDutyDetailTable(data,dutyNum){
  103. var table = $("#table_con");
  104. var th = $("<thead></thead>");
  105. var tbody = $("<tbody></tbody>");
  106. table.append(th).append(tbody);
  107. //表头
  108. th.append($("<tr><td class='cententCenter td_head'>值班日期</td><td class='cententCenter td_head'>值班时间</td>"+
  109. "<td class='cententCenter td_head'>带班领导</td><td class='cententCenter td_head'>安监部(处长或主管)</td>"+
  110. "<td class='cententCenter td_head'>办公厅(处长或主管)</td><td class='cententCenter td_head'>市场部(处长或主管)</td>"+
  111. "<td class='cententCenter td_head'>设备部(处长或主管)</td><td class='cententCenter td_head'>物资部(处长或主管)</td>"+
  112. "<td class='cententCenter td_head'>系统部(处长或主管)</td></tr>"));
  113. var str =JSON.stringify(data);
  114. var num = 0;
  115. for (var i = 0; i < data.length; i++) {
  116. var dutyDate = data[i].dutyDate;
  117. var dutyTime = data[i].dutyTime;
  118. var dbld = data[i].dbld.stringWrap();
  119. var ajb = data[i].ajb.stringWrap();
  120. var bgt = data[i].bgt.stringWrap();
  121. var scb = data[i].scb.stringWrap();
  122. var sbb = data[i].sbb.stringWrap();
  123. var wzb = data[i].wzb.stringWrap();
  124. var xtb = data[i].xtb.stringWrap();
  125. var tr = $("<tr></tr>");
  126. tbody.append(tr);
  127. var td1 = "";
  128. var td2 = "";
  129. var td3 = "";
  130. var td4 = "";
  131. var td5 = "";
  132. var td6 = "";
  133. var td7 = "";
  134. var td8 = "";
  135. var td9 = "";
  136. var reg = new RegExp("\""+dutyDate+"\"","g");
  137. var arr = str.match(reg);
  138. if(num==0){
  139. td1 = $("<td class='cententCenter td_border1 td_break' rowspan='"+arr.length+"'>"+dutyDate+"</td>");
  140. td2 = $("<td class='cententCenter td_border1 td_break' >"+dutyTime+"</td>");
  141. td3 = $("<td class='cententCenter td_border1 td_break' rowspan='"+arr.length+"' >"+dbld+"</td>");
  142. td4 = $("<td class='cententCenter td_border1 td_break' >"+ajb+"</td>");
  143. td5 = $("<td class='cententCenter td_border1 td_break' >"+bgt+"</td>");
  144. td6 = $("<td class='cententCenter td_border1 td_break' >"+scb+"</td>");
  145. td7 = $("<td class='cententCenter td_border1 td_break' >"+sbb+"</td>");
  146. td8 = $("<td class='cententCenter td_border1 td_break' >"+wzb+"</td>");
  147. td9 = $("<td class='cententCenter td_border1 td_break' >"+xtb+"</td>");
  148. tr.append(td1).append(td2).append(td3).append(td4).append(td5).append(td6).append(td7).append(td8).append(td9);
  149. num++;
  150. }else{
  151. td2 = $("<td class='cententCenter td_border1 td_break' >"+dutyTime+"</td>");
  152. td4 = $("<td class='cententCenter td_border1 td_break' >"+ajb+"</td>");
  153. td5 = $("<td class='cententCenter td_border1 td_break' >"+bgt+"</td>");
  154. td6 = $("<td class='cententCenter td_border1 td_break' >"+scb+"</td>");
  155. td7 = $("<td class='cententCenter td_border1 td_break' >"+sbb+"</td>");
  156. td8 = $("<td class='cententCenter td_border1 td_break' >"+wzb+"</td>");
  157. td9 = $("<td class='cententCenter td_border1 td_break' >"+xtb+"</td>");
  158. tr.append(td1).append(td2).append(td3).append(td4).append(td5).append(td6).append(td7).append(td8).append(td9);
  159. num++;
  160. }
  161. if(arr.length==num){
  162. num=0;
  163. }
  164. }
  165. setHight();
  166. }
  167. /**
  168. * 字符串将@符号转化为换行符
  169. */
  170. String.prototype.stringWrap = function(){
  171. return this.replace(/@/g, "</br>");
  172. };
  173. </script>
  174. </head>
  175. <body class="bd" align="center" >
  176. <div id="formContent" class="d_ground">
  177. <div class="title" align="center"><a href="javascript:;"><img id='goback' class="back" title="返回" align="left" alt="返回" src="/nwyj/images/temp/back.png" ></img></a><font class="title_font" id="titleShow"></font></div>
  178. <form id="myFormId" >
  179. <fieldset class="fieldset">
  180. <legend class="legend">基本信息:</legend>
  181. <table class="add_table_style view_table" >
  182. <tr>
  183. <td width="15%" align="right" >任务名称:</td>
  184. <td width="40%"><div name="PLAN_NAME_310" id="PLAN_NAME_310" style="width:90%"></div></td>
  185. <td width="15%" align="right" >事件名称:</td>
  186. <td width="30%"><div name="EVENT_ID_310_SHOW" id="EVENT_ID_310_SHOW" style="width:90%"></div></td>
  187. </tr>
  188. <tr>
  189. <td align="right" >值班开始日期:</td>
  190. <td ><div name="START_DATE_310" id="START_DATE_310" style="width:90%"></div></td>
  191. <td align="right" >值班截止日期:</td>
  192. <td ><div name="END_DATE_310" id="END_DATE_310" style="width:90%"></div></td>
  193. </tr>
  194. <tr>
  195. <td align="right" >每天班次数:</td>
  196. <td ><div name="DUTY_NUM_310" id="DUTY_NUM_310" style="width:90%"> </div></td>
  197. <td align="right" >值班开始时间:</td>
  198. <td ><div name="START_TIME_310" id="START_TIME_310" style='word-wrap:break-word; word-break:break-all;display:block;width:97%;' ></div></td>
  199. </tr>
  200. <tr>
  201. <td align="right" >需要安排值班的部门:</td>
  202. <td colspan="3"><div name="WAIT_INPUT_DUTY_DEPT_NAME_310" id="WAIT_INPUT_DUTY_DEPT_NAME_310" style='word-wrap:break-word; word-break:break-all;display:block;width:97%;' ></div></td>
  203. </tr>
  204. <tr id="RETURN_EXPLAIN">
  205. <td align="right" >需要安排带班领导的部门:</td>
  206. <td colspan="3"><div name="WAIT_INPUT_LINGDAO_DEPT_NAME_310" id="WAIT_INPUT_LINGDAO_DEPT_NAME_310" style='word-wrap:break-word; word-break:break-all;display:block;width:97%;' ></div></td>
  207. </tr>
  208. <tr>
  209. <td align="right" >发布状态: </td>
  210. <td colspan="3"><div name="RELEASE_STATE_310_SHOW" id="RELEASE_STATE_310_SHOW" style="width:90%"></div></td>
  211. </tr>
  212. </table>
  213. </fieldset>
  214. <fieldset class="fieldset" >
  215. <legend class="legend">填写人员信息:</legend>
  216. <table class="add_table_style view_table" align="center" id="fillForm">
  217. <tr>
  218. <td width="114px" align="right" >单位:</td>
  219. <td width="35%"><div name="INPUT_PER_UNIT_NAME_310" id="INPUT_PER_UNIT_NAME_310" /></td>
  220. <td width="114px" align="right" >部门:</td>
  221. <td><div name="INPUT_PER_DEPT_NAME_310" id="INPUT_PER_DEPT_NAME_310" /></td>
  222. </tr>
  223. <tr>
  224. <td width="114px" align="right" >填写人员:</td>
  225. <td width="35%"><div name="INPUT_PER_NAME_310" id="INPUT_PER_NAME_310" /></td>
  226. <td width="114px" align="right" >更新时间:</td>
  227. <td><div name="UPDATEDATE_310" id="UPDATEDATE_310" /></td>
  228. </tr>
  229. </table>
  230. </fieldset>
  231. <div >
  232. <table id='table_con' class='table'>
  233. </table>
  234. </div>
  235. </form>
  236. </div>
  237. </body>
  238. </html>