sysPlanEdit.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <html>
  4. <head>
  5. <%@include file="/commons/include/form.jsp"%>
  6. <title>编辑日程</title>
  7. <style type="text/css">
  8. .owner-span{
  9. font-size: 13px;
  10. background-color: #EFF2F7;
  11. border: 1px solid #CCD5E4;
  12. border-radius: 5px 5px 5px 5px;
  13. cursor: default;
  14. float: left;
  15. height: auto !important;
  16. margin: 3px;
  17. overflow: hidden;
  18. padding: 2px 4px;
  19. white-space: nowrap;
  20. }
  21. </style>
  22. <f:link href="form.css" ></f:link>
  23. <script type="text/javascript" src="${ctx}/js/hotent/platform/form/CommonDialog.js"></script>
  24. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysDialog.js"></script>
  25. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysPlanScript.js"></script>
  26. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  27. <script type="text/javascript" src="${ctx}/servlet/ValidJs?form=sysPlan"></script>
  28. <script type="text/javascript" src="${ctx}/js/hotent/platform/form/AttachMent.js" ></script>
  29. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/HtmlUploadDialog.js" ></script>
  30. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/FlexUploadDialog.js" ></script>
  31. <script type="text/javascript">
  32. $(function(){
  33. $("#taskName").val(new Date().Format("yyyy年MM月dd日") + "工作日志");
  34. $("#divTaskName").html(new Date().Format("yyyy年MM月dd日") + "工作日志");
  35. //初始化选择器
  36. initData();
  37. //初始化返回提示
  38. $('#sysPlanEdit').ajaxForm({success:showResponse });
  39. //初始化保存按键
  40. initSubmit();
  41. //初始化点击人员事件
  42. openDetailEvent();
  43. AttachMent.init("w");
  44. });
  45. //提交后返回内容
  46. function showResponse(r){
  47. var type = $("input[name='type']").val();
  48. var id = $("input[name='id']").val();
  49. var data = eval("("+r+")");
  50. var currentViweDate = $("input[name='currentViweDate']").val();
  51. if(data.result){
  52. $.ligerDialog.success(data.message,"消息提示",function(){
  53. var url = __ctx + '/platform/system/sysPlan/submit.ht?currentViweDate='+currentViweDate;
  54. if(id!=''&&type=='charge'){
  55. url = __ctx + '/platform/system/sysPlan/exchange.ht?id='+id+'&currentViweDate='+currentViweDate;
  56. }else if(type=='charge'){
  57. url = __ctx + '/platform/system/sysPlan/charge.ht?currentViweDate='+currentViweDate;
  58. }
  59. window.location.href = url;
  60. });
  61. }
  62. else{
  63. $.ligerDialog.warn(data.message,"消息提示");
  64. }
  65. }
  66. function prohibitPaste(e,textareaName,spanName){
  67. if (event.ctrlKey==1){
  68. if(document.all){
  69. k=e.keyCode
  70. }else{
  71. k=e.which
  72. }
  73. // 粘贴
  74. if(k==86){
  75. $.ligerDialog.warn("当前页面禁止粘贴信息!","消息提示");
  76. }
  77. // 复制
  78. if(k==67){
  79. $.ligerDialog.warn("当前页面禁止复制信息!","消息提示");
  80. }
  81. }
  82. document.getElementById(spanName).innerHTML = "当前字数为:<font color='green'>" + document.getElementById(textareaName).value.length + "</font>个字";
  83. var numberCount = document.getElementById(textareaName).value.length;
  84. $("#numberCount").val(numberCount);
  85. }
  86. </script>
  87. </head>
  88. <body oncontextmenu="return false" oncopy="return false">
  89. <div class="panel">
  90. <div class="panel-top">
  91. <div class="tbar-title">
  92. <span class="tbar-label">编辑日程</span>
  93. </div>
  94. <div class="panel-toolbar">
  95. <div class="toolBar">
  96. <c:if test="${sysPlan.rate!=100}">
  97. <%-- <c:if test="${sysPlan.id==null||$sysPlan.id==''||type eq 'charge'}"> </c:if> --%>
  98. <div class="group">
  99. <a class="link save" ><span></span>保存</a>
  100. </div>
  101. <div class="l-bar-separator"></div>
  102. </c:if>
  103. <div class="group">
  104. <c:choose>
  105. <c:when test="${type eq 'charge'}">
  106. <a class="link back" href="${ctx}/platform/system/sysPlan/charge.ht?currentViweDate=${currentViweDate}"><span></span>返回</a>
  107. </c:when>
  108. <c:when test="${type eq 'myPlan'}">
  109. <a class="link back" href="${ctx}/platform/system/sysPlan/myList.ht"><span></span>返回</a>
  110. </c:when>
  111. <c:otherwise>
  112. <a class="link back" href="${ctx}/platform/system/sysPlan/submit.ht?currentViweDate=${currentViweDate}"><span></span>返回</a>
  113. </c:otherwise>
  114. </c:choose>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="panel-body">
  120. <form id="sysPlanEdit" method="post" action="${ctx}/platform/system/sysPlan/save.ht">
  121. <input type="hidden" name="id" value="${sysPlan.id}"/>
  122. <input type="hidden" name="currentViweDate" value="${currentViweDate}"/>
  123. <input type="hidden" name="type" value="${type}"/>
  124. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  125. <tr>
  126. <th width="20%">日志时间:</th>
  127. <td>
  128. <c:choose>
  129. <c:when test="${sysPlan.taskName == null}">
  130. <input type="hidden" id="taskName" name="taskName" class="inputText" style="width: 250px;" validate="{'required':true}"/>
  131. <div id="divTaskName" name="divTaskName"></div>
  132. </c:when>
  133. <c:otherwise>
  134. <input type="hidden" id="taskName" name="taskName" class="inputText" style="width: 250px;" value="${sysPlan.taskName}" validate="{'required':true}"/>
  135. ${sysPlan.taskName}
  136. </c:otherwise>
  137. </c:choose>
  138. </td>
  139. <th width="20%">提交人:</th>
  140. <td>
  141. <input type="hidden" name="submitId" value="${sysPlan.submitId}" />
  142. <input type="hidden" name="submitor" value="${sysPlan.submitor}" />
  143. <div id='submitDiv'></div>
  144. <!--
  145. <a class="link add" onclick="chooseUser(this,'submitDiv','submitId','submitor','yes');" ><span></span>选择</a>
  146. <a class="link reset" onclick="resetSelect('submitDiv','submitId','submitor');" ><span></span>重置</a>
  147. -->
  148. </td>
  149. </tr>
  150. <tr>
  151. <th width="20%">负责人:</th>
  152. <td>
  153. <input type="hidden" name="chargeId" value="${sysPlan.chargeId}" />
  154. <input type="hidden" name="charge" value="${sysPlan.charge}" />
  155. <div id='chargeDiv'></div>
  156. <!--
  157. <a class="link add" onclick="chooseUser(this,'chargeDiv','chargeId','charge','yes');" ><span></span>选择</a>
  158. <a class="link reset" onclick="resetSelect('chargeDiv','chargeId','charge');" ><span></span>重置</a>
  159. -->
  160. </td>
  161. <th width="20%">参与人:</th>
  162. <td>
  163. <input type="hidden" name="participantIds" value="${participantIds}" />
  164. <input type="hidden" name="participants" value="${participants}" />
  165. <div id='participantDiv'></div>
  166. <a class="link add" onclick="chooseUser(this,'participantDiv','participantIds','participants','no');" ><span></span>选择</a>
  167. <a class="link reset" onclick="resetSelect('participantDiv','participantIds','participants');" ><span></span>重置</a>
  168. </td>
  169. </tr>
  170. <tr>
  171. <th width="20%">开始时间:</th>
  172. <td>
  173. <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}"/>
  174. </td>
  175. <th width="20%">结束时间:</th>
  176. <td>
  177. <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}"/>
  178. </td>
  179. </tr>
  180. <c:choose>
  181. <c:when test="${type eq 'charge' or type eq 'myPlan'}">
  182. <tr>
  183. <th width="20%">日志名称:</th>
  184. <td>
  185. <input type="text" name="projectName" class="inputText" style="width: 250px;" value="${sysPlan.projectName}" validate="{'required':false}" />
  186. </td>
  187. <th width="20%">日程进度:</th>
  188. <td>
  189. <input type="text" name="rate" style="width: 250px;" class="inputText" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" /> %
  190. </td>
  191. </tr>
  192. </c:when>
  193. <c:otherwise>
  194. <tr>
  195. <th width="20%">日志名称:</th>
  196. <td>
  197. <input type="text" name="projectName" class="inputText" style="width: 250px;" value="${sysPlan.projectName}" validate="{'required':true}" />
  198. </td>
  199. <th width="20%">日程进度:</th>
  200. <td>
  201. <c:choose>
  202. <c:when test="${sysPlan.rate==null ||sysPlan.rate==''}">
  203. <input type="text" name="rate" class="inputText" style="width: 250px;" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" />%
  204. </c:when>
  205. <c:otherwise>
  206. <input type="text" name="rate" class="inputText" style="width: 250px;" value="${sysPlan.rate}" validate="{'range':[0,100],'digits':true}" /> %
  207. </c:otherwise>
  208. </c:choose>
  209. </td>
  210. </tr>
  211. </c:otherwise>
  212. </c:choose>
  213. <%--<tr>
  214. <th width="20%">相关客户:</th>
  215. <td colspan="3">
  216. <input type="hidden" name="customerId" value="${sysPlan.customerId}" />
  217. <input type="hidden" name="customer" value="${sysPlan.customer}" />
  218. <div id='customerDiv'></div>
  219. <a class="link add" onclick="chooseCustomer(this,'spxx','','customerDiv','customerId','customer');" ><span></span>选择</a>
  220. <a class="link reset" onclick="resetSelect('customerDiv','customerId','customer');" ><span></span>重置</a>
  221. </td>
  222. </tr>--%>
  223. <tr>
  224. <th width="20%">相关文档: </th>
  225. <td>
  226. <div name="div_attachment_container">
  227. <div class="attachement"></div>
  228. <textarea style="display: none" controltype="attachment"
  229. id="doc" name="doc" lablename="主表附件" validate="{}">${sysPlan.doc}</textarea>
  230. <a href="javascript:;" field="doc" class="link selectFile"
  231. type="select" onclick="AttachMent.addFile(this);">选择</a>
  232. </div>
  233. </td>
  234. <th width="20%">日志级别: </th>
  235. <td>
  236. <c:choose>
  237. <c:when test="${empty dicList}">
  238. 请在数据字典定义一个nodeKey为rzlx的分类
  239. </c:when>
  240. <c:otherwise>
  241. <select name="planLevel" class="inputText" style="width: 275px;">
  242. <c:forEach items="${dicList }" var="dic">
  243. <option value="${dic.itemValue }" <c:if test="${dic.itemValue eq sysPlan.planLevel}">selected="selected"</c:if>>${dic.itemName }</option>
  244. </c:forEach>
  245. </select>
  246. </c:otherwise>
  247. </c:choose>
  248. </td>
  249. </tr>
  250. <tr>
  251. <th width="20%">工单:</th>
  252. <td colspan="3">
  253. <input type="hidden" name="runId" value="${sysPlan.runId}" />
  254. <input type="hidden" name="runName" value="${sysPlan.runName}" />
  255. <div id='runDiv'></div>
  256. <a class="link add" onclick="chooseProcessRun(this,'runDiv','runId','runName','yes');" ><span></span>选择</a>
  257. <a class="link reset" onclick="resetSelect('runDiv','runId','runName');" ><span></span>重置</a>
  258. </td>
  259. </tr>
  260. <tr>
  261. <th width="20%">内容:</th>
  262. <td colspan="3">
  263. <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>
  264. </td>
  265. </tr>
  266. <tr>
  267. <th width="20%"></th>
  268. <td colspan="3">
  269. <input type="hidden" id="numberCount" name="numberCount" value="${sysPlan.numberCount}"/>
  270. <c:choose>
  271. <c:when test="${sysPlan.numberCount==null ||sysPlan.numberCount==''}">
  272. <div id="counter" style="float: left;">当前字数为:<font color="green">0</font>个字</div>
  273. </c:when>
  274. <c:otherwise>
  275. <div id="counter" style="float: left;">当前字数为:<font color="green">${sysPlan.numberCount}</font>个字</div>
  276. </c:otherwise>
  277. </c:choose>
  278. </td>
  279. </tr>
  280. </table>
  281. </form>
  282. </div>
  283. </div>
  284. </body>
  285. </html>