123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <%@page language="java" pageEncoding="UTF-8"%>
- <%@include file="/commons/include/html_doctype.html"%>
- <html>
- <head>
- <%@include file="/commons/include/form.jsp"%>
- <title>编辑日程</title>
- <style type="text/css">
- .owner-span{
- font-size: 13px;
- background-color: #EFF2F7;
- border: 1px solid #CCD5E4;
- border-radius: 5px 5px 5px 5px;
- cursor: default;
- float: left;
- height: auto !important;
- margin: 3px;
- overflow: hidden;
- padding: 2px 4px;
- white-space: nowrap;
- }
- </style>
- <f:link href="form.css" ></f:link>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/form/CommonDialog.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysDialog.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysPlanScript.js"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
- <script type="text/javascript" src="${ctx}/servlet/ValidJs?form=sysPlan"></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/form/AttachMent.js" ></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/HtmlUploadDialog.js" ></script>
- <script type="text/javascript" src="${ctx}/js/hotent/platform/system/FlexUploadDialog.js" ></script>
- <script type="text/javascript">
- $(function(){
- $("#taskName").val(new Date().Format("yyyy年MM月dd日") + "工作日志");
- $("#divTaskName").html(new Date().Format("yyyy年MM月dd日") + "工作日志");
- //初始化选择器
- initData();
- //初始化返回提示
- $('#sysPlanEdit').ajaxForm({success:showResponse });
-
- //初始化保存按键
- initSubmit();
-
- //初始化点击人员事件
- openDetailEvent();
- AttachMent.init("w");
- });
-
-
- //提交后返回内容
- function showResponse(r){
- var type = $("input[name='type']").val();
- var id = $("input[name='id']").val();
- var data = eval("("+r+")");
- var currentViweDate = $("input[name='currentViweDate']").val();
- if(data.result){
- $.ligerDialog.success(data.message,"消息提示",function(){
- var url = __ctx + '/platform/system/sysPlan/submit.ht?currentViweDate='+currentViweDate;
- if(id!=''&&type=='charge'){
- url = __ctx + '/platform/system/sysPlan/exchange.ht?id='+id+'¤tViweDate='+currentViweDate;
- }else if(type=='charge'){
- url = __ctx + '/platform/system/sysPlan/charge.ht?currentViweDate='+currentViweDate;
- }
- window.location.href = url;
- });
- }
- else{
- $.ligerDialog.warn(data.message,"消息提示");
- }
- }
-
- function prohibitPaste(e,textareaName,spanName){
- if (event.ctrlKey==1){
- if(document.all){
- k=e.keyCode
- }else{
- k=e.which
- }
- // 粘贴
- if(k==86){
- $.ligerDialog.warn("当前页面禁止粘贴信息!","消息提示");
- }
- // 复制
- if(k==67){
- $.ligerDialog.warn("当前页面禁止复制信息!","消息提示");
- }
- }
- document.getElementById(spanName).innerHTML = "当前字数为:<font color='green'>" + document.getElementById(textareaName).value.length + "</font>个字";
- var numberCount = document.getElementById(textareaName).value.length;
- $("#numberCount").val(numberCount);
- }
- </script>
- </head>
- <body oncontextmenu="return false" oncopy="return false">
- <div class="panel">
- <div class="panel-top">
- <div class="tbar-title">
- <span class="tbar-label">编辑日程</span>
- </div>
- <div class="panel-toolbar">
- <div class="toolBar">
- <c:if test="${sysPlan.rate!=100}">
- <%-- <c:if test="${sysPlan.id==null||$sysPlan.id==''||type eq 'charge'}"> </c:if> --%>
- <div class="group">
- <a class="link save" ><span></span>保存</a>
- </div>
- <div class="l-bar-separator"></div>
- </c:if>
-
- <div class="group">
- <c:choose>
- <c:when test="${type eq 'charge'}">
- <a class="link back" href="${ctx}/platform/system/sysPlan/charge.ht?currentViweDate=${currentViweDate}"><span></span>返回</a>
- </c:when>
- <c:when test="${type eq 'myPlan'}">
- <a class="link back" href="${ctx}/platform/system/sysPlan/myList.ht"><span></span>返回</a>
- </c:when>
- <c:otherwise>
- <a class="link back" href="${ctx}/platform/system/sysPlan/submit.ht?currentViweDate=${currentViweDate}"><span></span>返回</a>
- </c:otherwise>
- </c:choose>
- </div>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <form id="sysPlanEdit" method="post" action="${ctx}/platform/system/sysPlan/save.ht">
- <input type="hidden" name="id" value="${sysPlan.id}"/>
- <input type="hidden" name="currentViweDate" value="${currentViweDate}"/>
- <input type="hidden" name="type" value="${type}"/>
- <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
-
- <tr>
- <th width="20%">日志时间:</th>
- <td>
- <c:choose>
- <c:when test="${sysPlan.taskName == null}">
- <input type="hidden" id="taskName" name="taskName" class="inputText" style="width: 250px;" validate="{'required':true}"/>
- <div id="divTaskName" name="divTaskName"></div>
- </c:when>
- <c:otherwise>
- <input type="hidden" id="taskName" name="taskName" class="inputText" style="width: 250px;" value="${sysPlan.taskName}" validate="{'required':true}"/>
- ${sysPlan.taskName}
- </c:otherwise>
- </c:choose>
- </td>
- <th width="20%">提交人:</th>
- <td>
- <input type="hidden" name="submitId" value="${sysPlan.submitId}" />
- <input type="hidden" name="submitor" value="${sysPlan.submitor}" />
- <div id='submitDiv'></div>
- <!--
- <a class="link add" onclick="chooseUser(this,'submitDiv','submitId','submitor','yes');" ><span></span>选择</a>
- <a class="link reset" onclick="resetSelect('submitDiv','submitId','submitor');" ><span></span>重置</a>
- -->
- </td>
- </tr>
-
- <tr>
- <th width="20%">负责人:</th>
- <td>
- <input type="hidden" name="chargeId" value="${sysPlan.chargeId}" />
- <input type="hidden" name="charge" value="${sysPlan.charge}" />
- <div id='chargeDiv'></div>
- <!--
- <a class="link add" onclick="chooseUser(this,'chargeDiv','chargeId','charge','yes');" ><span></span>选择</a>
- <a class="link reset" onclick="resetSelect('chargeDiv','chargeId','charge');" ><span></span>重置</a>
- -->
- </td>
- <th width="20%">参与人:</th>
- <td>
- <input type="hidden" name="participantIds" value="${participantIds}" />
- <input type="hidden" name="participants" value="${participants}" />
- <div id='participantDiv'></div>
- <a class="link add" onclick="chooseUser(this,'participantDiv','participantIds','participants','no');" ><span></span>选择</a>
- <a class="link reset" onclick="resetSelect('participantDiv','participantIds','participants');" ><span></span>重置</a>
- </td>
- </tr>
-
- <tr>
- <th width="20%">开始时间:</th>
- <td>
- <input type="text" name="startTime" class="inputText datetime" style="width: 250px;" value="<fmt:formatDate value='${sysPlan.startTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" validate="{'required':true}"/>
- </td>
- <th width="20%">结束时间:</th>
- <td>
- <input type="text" name="endTime" class="inputText datetime" style="width: 250px;" value="<fmt:formatDate value='${sysPlan.endTime}' pattern='yyyy-MM-dd HH:mm:ss'/>" validate="{'required':true}"/>
- </td>
- </tr>
-
- <c:choose>
- <c:when test="${type eq 'charge' or type eq 'myPlan'}">
- <tr>
- <th width="20%">日志名称:</th>
- <td>
- <input type="text" name="projectName" class="inputText" style="width: 250px;" value="${sysPlan.projectName}" validate="{'required':false}" />
- </td>
- <th width="20%">日程进度:</th>
- <td>
- <input type="text" name="rate" style="width: 250px;" class="inputText" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" /> %
- </td>
- </tr>
- </c:when>
- <c:otherwise>
- <tr>
- <th width="20%">日志名称:</th>
- <td>
- <input type="text" name="projectName" class="inputText" style="width: 250px;" value="${sysPlan.projectName}" validate="{'required':true}" />
- </td>
- <th width="20%">日程进度:</th>
- <td>
- <c:choose>
- <c:when test="${sysPlan.rate==null ||sysPlan.rate==''}">
- <input type="text" name="rate" class="inputText" style="width: 250px;" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" />%
- </c:when>
- <c:otherwise>
- <input type="text" name="rate" class="inputText" style="width: 250px;" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" /> %
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </c:otherwise>
- </c:choose>
-
- <%--<tr>
- <th width="20%">相关客户:</th>
- <td colspan="3">
- <input type="hidden" name="customerId" value="${sysPlan.customerId}" />
- <input type="hidden" name="customer" value="${sysPlan.customer}" />
- <div id='customerDiv'></div>
- <a class="link add" onclick="chooseCustomer(this,'spxx','','customerDiv','customerId','customer');" ><span></span>选择</a>
- <a class="link reset" onclick="resetSelect('customerDiv','customerId','customer');" ><span></span>重置</a>
- </td>
- </tr>--%>
- <tr>
- <th width="20%">相关文档: </th>
- <td>
- <div name="div_attachment_container">
- <div class="attachement"></div>
- <textarea style="display: none" controltype="attachment"
- id="doc" name="doc" lablename="主表附件" validate="{}">${sysPlan.doc}</textarea>
- <a href="javascript:;" field="doc" class="link selectFile"
- type="select" onclick="AttachMent.addFile(this);">选择</a>
- </div>
- </td>
- <th width="20%">日志级别: </th>
- <td>
- <c:choose>
- <c:when test="${empty dicList}">
- 请在数据字典定义一个nodeKey为rzlx的分类
- </c:when>
- <c:otherwise>
- <select name="planLevel" class="inputText" style="width: 275px;">
- <c:forEach items="${dicList }" var="dic">
- <option value="${dic.itemValue }" <c:if test="${dic.itemValue eq sysPlan.planLevel}">selected="selected"</c:if>>${dic.itemName }</option>
- </c:forEach>
- </select>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- <tr>
- <th width="20%">工单:</th>
- <td colspan="3">
- <input type="hidden" name="runId" value="${sysPlan.runId}" />
- <input type="hidden" name="runName" value="${sysPlan.runName}" />
- <div id='runDiv'></div>
- <a class="link add" onclick="chooseProcessRun(this,'runDiv','runId','runName','yes');" ><span></span>选择</a>
- <a class="link reset" onclick="resetSelect('runDiv','runId','runName');" ><span></span>重置</a>
- </td>
- </tr>
- <tr>
- <th width="20%">内容:</th>
- <td colspan="3">
- <textarea id="description" name="description" rows="30" style="width: 98%;overflow:scroll;" onkeyup='prohibitPaste(event,"description","counter")' onkeydown='prohibitPaste(event,"description","counter")' >${sysPlan.description}</textarea>
- </td>
- </tr>
- <tr>
- <th width="20%"></th>
- <td colspan="3">
- <input type="hidden" id="numberCount" name="numberCount" value="${sysPlan.numberCount}"/>
- <c:choose>
- <c:when test="${sysPlan.numberCount==null ||sysPlan.numberCount==''}">
- <div id="counter" style="float: left;">当前字数为:<font color="green">0</font>个字</div>
- </c:when>
- <c:otherwise>
- <div id="counter" style="float: left;">当前字数为:<font color="green">${sysPlan.numberCount}</font>个字</div>
- </c:otherwise>
- </c:choose>
- </td>
- </tr>
- </table>
- </form>
- </div>
- </div>
-
- </body>
- </html>
|