123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- <%@include file="../../../include1.jsp" %>
- <style type="text/css">
- .cententCenter{
- text-align: center;
- }
- .table{
- /* margin-top: 15px; */
- width:90%;
- margin: 15px auto;
- border-collapse: collapse;
- border:1pt solid #cbcbcb;
- padding: 5px;
- }
- .td_head{
- border: 1pt solid #cbcbcb;
- height:36px;
- line-height: 36px;
- font-weight: bold;
- }
- .td_border1{
- border-right:1pt solid #cbcbcb;
- border-left:1pt solid #cbcbcb;
- border-bottom:1pt solid #cbcbcb;
- height:36px;
- line-height: 36px;
- text-align: center
- }
- .td_break{
- word-wrap:break-word;
- word-break:break-all;
- }
- </style>
- <script type="text/javascript">
- var fd_objectid="<%=request.getParameter("fd_id")%>";
-
- //返回主页面
- function goBack() {
- //获取iframe中的元素值
- var iframe =parent.document.getElementsByName("frmright")[0];
- iframe.src = "/nwyj/page/business/em/warningDuty/DutyPlan.jsp";
- }
- $(function(){
- $("#titleShow").text("查看值班汇总");
-
- $("#goback").hover(function(){
- $(this).attr("src","/nwyj/images/temp/back_hover.png");
- },function(){
- $(this).attr("src","/nwyj/images/temp/back.png");
- });
- $("#goback").bind("click",goBack);
- if(fd_objectid.length>0){
- var params = {classid : "310",objectID : fd_objectid};
- $.ajax({
- url : $.pathname() + '/ws/crud/CRUDService/getDataById/',
- type : 'post',
- data : params,
- dataType : 'json',
- success : function(data){
- for(col in data){
- $("div#"+col).html(data[col]);
- }
- var WAIT_INPUT_DUTY_DEPT_ID = data.WAIT_INPUT_DUTY_DEPT_ID_310;
- var dutyNum = data.DUTY_NUM_310;
- //查询加载值班详情
- queryDutyDetail(WAIT_INPUT_DUTY_DEPT_ID,fd_objectid);
- },
- error : function(e){
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }
-
- });
- /**
- 根据需要安排值班的部门(角色)id查询值班详细
- ***/
- function queryDutyDetail(deptids,dutyNum){
- var url = $.pathname() + '/ws/wduty/WarningDutyService/loadDutyDetailByDeptIds/';
- var params = {
- deptids : deptids,
- planId : fd_objectid
- };
- $("body").eq(0).showLoading();
- $.ajax({
- url : url,
- type : 'post',
- data : params,
- dataType : 'json',
- success : function(data){
- createDutyDetailTable(data,dutyNum);
- $("body").eq(0).hideLoading();
- },
- error : function(e){
- $("body").eq(0).hideLoading();
- $.messager.alert('系统提示信息', '访问服务失败!', 'error');
- }
- });
- }
- function createDutyDetailTable(data,dutyNum){
- var table = $("#table_con");
- var th = $("<thead></thead>");
- var tbody = $("<tbody></tbody>");
- table.append(th).append(tbody);
- //表头
- th.append($("<tr><td class='cententCenter td_head'>值班日期</td><td class='cententCenter td_head'>值班时间</td>"+
- "<td class='cententCenter td_head'>带班领导</td><td class='cententCenter td_head'>安监部(处长或主管)</td>"+
- "<td class='cententCenter td_head'>办公厅(处长或主管)</td><td class='cententCenter td_head'>市场部(处长或主管)</td>"+
- "<td class='cententCenter td_head'>设备部(处长或主管)</td><td class='cententCenter td_head'>物资部(处长或主管)</td>"+
- "<td class='cententCenter td_head'>系统部(处长或主管)</td></tr>"));
- var str =JSON.stringify(data);
- var num = 0;
- for (var i = 0; i < data.length; i++) {
- var dutyDate = data[i].dutyDate;
- var dutyTime = data[i].dutyTime;
- var dbld = data[i].dbld.stringWrap();
- var ajb = data[i].ajb.stringWrap();
- var bgt = data[i].bgt.stringWrap();
- var scb = data[i].scb.stringWrap();
- var sbb = data[i].sbb.stringWrap();
- var wzb = data[i].wzb.stringWrap();
- var xtb = data[i].xtb.stringWrap();
- var tr = $("<tr></tr>");
- tbody.append(tr);
- var td1 = "";
- var td2 = "";
- var td3 = "";
- var td4 = "";
- var td5 = "";
- var td6 = "";
- var td7 = "";
- var td8 = "";
- var td9 = "";
- var reg = new RegExp("\""+dutyDate+"\"","g");
- var arr = str.match(reg);
- if(num==0){
- td1 = $("<td class='cententCenter td_border1 td_break' rowspan='"+arr.length+"'>"+dutyDate+"</td>");
- td2 = $("<td class='cententCenter td_border1 td_break' >"+dutyTime+"</td>");
- td3 = $("<td class='cententCenter td_border1 td_break' rowspan='"+arr.length+"' >"+dbld+"</td>");
- td4 = $("<td class='cententCenter td_border1 td_break' >"+ajb+"</td>");
- td5 = $("<td class='cententCenter td_border1 td_break' >"+bgt+"</td>");
- td6 = $("<td class='cententCenter td_border1 td_break' >"+scb+"</td>");
- td7 = $("<td class='cententCenter td_border1 td_break' >"+sbb+"</td>");
- td8 = $("<td class='cententCenter td_border1 td_break' >"+wzb+"</td>");
- td9 = $("<td class='cententCenter td_border1 td_break' >"+xtb+"</td>");
- tr.append(td1).append(td2).append(td3).append(td4).append(td5).append(td6).append(td7).append(td8).append(td9);
- num++;
- }else{
- td2 = $("<td class='cententCenter td_border1 td_break' >"+dutyTime+"</td>");
- td4 = $("<td class='cententCenter td_border1 td_break' >"+ajb+"</td>");
- td5 = $("<td class='cententCenter td_border1 td_break' >"+bgt+"</td>");
- td6 = $("<td class='cententCenter td_border1 td_break' >"+scb+"</td>");
- td7 = $("<td class='cententCenter td_border1 td_break' >"+sbb+"</td>");
- td8 = $("<td class='cententCenter td_border1 td_break' >"+wzb+"</td>");
- td9 = $("<td class='cententCenter td_border1 td_break' >"+xtb+"</td>");
- tr.append(td1).append(td2).append(td3).append(td4).append(td5).append(td6).append(td7).append(td8).append(td9);
- num++;
- }
- if(arr.length==num){
- num=0;
- }
- }
- setHight();
- }
- /**
- * 字符串将@符号转化为换行符
- */
- String.prototype.stringWrap = function(){
- return this.replace(/@/g, "</br>");
- };
- </script>
- </head>
- <body class="bd" align="center" >
- <div id="formContent" class="d_ground">
- <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>
- <form id="myFormId" >
- <fieldset class="fieldset">
- <legend class="legend">基本信息:</legend>
- <table class="add_table_style view_table" >
- <tr>
- <td width="15%" align="right" >任务名称:</td>
- <td width="40%"><div name="PLAN_NAME_310" id="PLAN_NAME_310" style="width:90%"></div></td>
- <td width="15%" align="right" >事件名称:</td>
- <td width="30%"><div name="EVENT_ID_310_SHOW" id="EVENT_ID_310_SHOW" style="width:90%"></div></td>
- </tr>
- <tr>
- <td align="right" >值班开始日期:</td>
- <td ><div name="START_DATE_310" id="START_DATE_310" style="width:90%"></div></td>
- <td align="right" >值班截止日期:</td>
- <td ><div name="END_DATE_310" id="END_DATE_310" style="width:90%"></div></td>
- </tr>
- <tr>
- <td align="right" >每天班次数:</td>
- <td ><div name="DUTY_NUM_310" id="DUTY_NUM_310" style="width:90%"> </div></td>
- <td align="right" >值班开始时间:</td>
- <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>
- </tr>
- <tr>
- <td align="right" >需要安排值班的部门:</td>
- <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>
- </tr>
- <tr id="RETURN_EXPLAIN">
- <td align="right" >需要安排带班领导的部门:</td>
- <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>
- </tr>
- <tr>
- <td align="right" >发布状态: </td>
- <td colspan="3"><div name="RELEASE_STATE_310_SHOW" id="RELEASE_STATE_310_SHOW" style="width:90%"></div></td>
- </tr>
- </table>
- </fieldset>
- <fieldset class="fieldset" >
- <legend class="legend">填写人员信息:</legend>
- <table class="add_table_style view_table" align="center" id="fillForm">
- <tr>
- <td width="114px" align="right" >单位:</td>
- <td width="35%"><div name="INPUT_PER_UNIT_NAME_310" id="INPUT_PER_UNIT_NAME_310" /></td>
- <td width="114px" align="right" >部门:</td>
- <td><div name="INPUT_PER_DEPT_NAME_310" id="INPUT_PER_DEPT_NAME_310" /></td>
- </tr>
- <tr>
- <td width="114px" align="right" >填写人员:</td>
- <td width="35%"><div name="INPUT_PER_NAME_310" id="INPUT_PER_NAME_310" /></td>
- <td width="114px" align="right" >更新时间:</td>
- <td><div name="UPDATEDATE_310" id="UPDATEDATE_310" /></td>
- </tr>
- </table>
- </fieldset>
- <div >
- <table id='table_con' class='table'>
-
- </table>
- </div>
- </form>
- </div>
- </body>
- </html>
|