processAmsFlow.jsp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <%@page import="com.yw.core.session.OASession"%>
  2. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  3. <jsp:useBean id="oasession" class="com.yw.core.session.OASession" scope="session" />
  4. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  5. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  6. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  8. <html class=" width960">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  11. <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
  12. <title>流程启动</title>
  13. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  14. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  15. <%-- <link href="${pageContext.request.contextPath}/yw/bpm/style/bootstrap.css" rel="stylesheet" type="text/css" /> --%>
  16. <%-- <link href="${pageContext.request.contextPath}/yw/bpm/style/flow.css" rel="stylesheet" type="text/css" /> --%>
  17. <link href="/shares/css/yw/flow/bootstrap.css" rel="stylesheet" type="text/css" />
  18. <link href="/shares/css/yw/flow/flow.css" rel="stylesheet" type="text/css" />
  19. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  20. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  21. <script type="text/javascript" src="/shares/js/constant.js"></script>
  22. <script type="text/javascript" src="/shares/js/common.js"></script>
  23. <script type="text/javascript" src="/shares/js/yw/ams/flow/amsflow.js"></script>
  24. <script type="text/javascript" src="/shares/js/file.js"></script>
  25. <script type="text/javascript">
  26. var insId = "${requestScope.flow.insId}";
  27. var formId = "${requestScope.flow.formId.formId}";
  28. var nextTacheDialog = null;
  29. $(function() {
  30. var nextUserTag = "${requestScope.tmodel.pathJudgeType.value }";
  31. if(nextUserTag == "1"){
  32. $("[name='nextUser']").hide();
  33. var nextTmodelId = $("[name='nextTmodelId']").val();
  34. $("#" + nextTmodelId).show();
  35. }
  36. $("[name='nextTmodelId']").change(function(){
  37. $("[name='nextUser']").hide();
  38. var nextTmodelId = $("[name='nextTmodelId']").val();
  39. $("#" + nextTmodelId).show();
  40. });
  41. $("#instructions").change(function(){
  42. $("#remark").val($("#instructions").val());
  43. });
  44. //当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失
  45. $(window).scroll(function() {
  46. if ($(window).scrollTop() > 100) {
  47. $("#top1").fadeIn(100);
  48. } else {
  49. $("#top1").fadeOut(100);
  50. }
  51. });
  52. //当点击跳转链接后,回到页面顶部位置 keleyi.com
  53. $("#top1").click(function() {
  54. $('body,html').animate({
  55. scrollTop : 0
  56. }, 0);
  57. return false;
  58. });
  59. });
  60. function setFrame() {
  61. var iformIns = document.getElementById("formIns");
  62. iformIns.height = "100px";
  63. iformIns.height = formIns.document.body.scrollHeight;
  64. }
  65. /**
  66. * 点击"提交"展示"选择下一环节信息"
  67. */
  68. function chooseNextTache() {
  69. window.scrollTo(0,0);
  70. nextTacheDialog.show();
  71. }
  72. /**
  73. * 初始化"选择下一环节信息"对话框
  74. */
  75. $(function() {
  76. nextTacheDialog = $.ligerDialog.open({
  77. width : 1000,
  78. target : $("#nextTache"),
  79. showMax : false,
  80. showToggle : false,
  81. showMin : false,
  82. show : false,
  83. isResize : false,
  84. modal : true,
  85. title : "选择下一环节信息",
  86. allowClose : true,
  87. containerId : 'processForm'
  88. });
  89. nextTacheDialog.hidden();
  90. });
  91. /**
  92. * 关闭"选择下一环节信息"对话框
  93. */
  94. function closeNextTache() {
  95. nextTacheDialog.hidden();
  96. }
  97. function saveFlow(actionUrl, formName) {
  98. var x = $(formName).serializeArray();
  99. $.each(x, function(i, field) {
  100. field.value = encodeURI(field.value);
  101. });
  102. $.ajax({
  103. url : actionUrl,
  104. async : true,
  105. type : "post",
  106. data : x,
  107. success : function(data) {
  108. addInfo(data);
  109. var oldTabid = $("#tabid").val();
  110. window.parent.f_reloadTab(oldTabid);
  111. window.parent.frames[oldTabid].closeODialog();
  112. },
  113. error : function() {
  114. alert("数据处理失败,请检查网络重新登录或联系管理员!");
  115. }
  116. });
  117. }
  118. function checkForm() {
  119. var rs = true;
  120. var pathJudgeType = $("#pathJudgeType").val();
  121. if (pathJudgeType == "1") {
  122. rs = $.validate({
  123. name : "nextTmodelId",
  124. model : [ {
  125. type : "require",
  126. msg : "下一步环节不能为空!"
  127. } ]
  128. });
  129. }
  130. var usersNames = $("[type='text'][id*='usersName']:visible");
  131. for ( var i = 0; i < usersNames.length; i++) {
  132. rs = $.validate({
  133. name : usersNames[i].id,
  134. model : [ {
  135. type : "require",
  136. msg : "下一步环节操作人不能为空!"
  137. } ]
  138. }) && rs;
  139. }
  140. if (rs) {
  141. return true;
  142. }
  143. return false;
  144. }
  145. //提交
  146. function formJs() {
  147. var rs = checkForm();
  148. $("#formInsId").val("0");
  149. if (rs) {
  150. saveFlow("amsFlowAction.do", "#processForm");
  151. }
  152. }
  153. //驳回
  154. function okCheckRequest(){
  155. //var objParent = document.getElementById("formIns").contentWindow;
  156. //var sign = objParent.document.getElementById("sign");
  157. //if(null != sign){
  158. //if(sign.value==1){
  159. //var request_id = objParent.document.getElementById("request_id").value;
  160. //var param = {"request_id":request_id,"request_check_state":2};
  161. //var action = 'erpPurchaseRequestAction.do?task=check';
  162. //sendAjaxParam(param, action, 'json', requestSuccess);
  163. //}else if(sign.value==2){
  164. //var ins_id = objParent.document.getElementById("ins_id").value;
  165. //window.parent.frames['${param.tabid }'].closeODialog();
  166. //}else if(sign.value==3){
  167. //var outs_id = objParent.document.getElementById("outs_id").value;
  168. //window.parent.frames['${param.tabid }'].closeODialog();
  169. //}
  170. //}
  171. $("#task").val("");
  172. $("#task").val("return");
  173. saveFlow("amsFlowAction.do", "#processForm");
  174. }
  175. </script>
  176. </head>
  177. <body style="background: none;">
  178. <form id="processForm" name="processForm" action="amsFlowAction.do" method="post">
  179. <input type="hidden" id="productAll" name="productAll" value="">
  180. <div class="navbar">
  181. <div class="navbar">
  182. <div class="navbar-inner1">
  183. <button type="button" onclick="chooseNextTache();" class="btn">
  184. <span>提交</span>
  185. </button>
  186. <!---->
  187. <c:if test="${requestScope.tmodel.se.value == 0}">
  188. <button type="button" onclick="okCheckRequest();" class="btn">
  189. <span>驳回</span>
  190. </button>
  191. </c:if>
  192. <button type="button" onclick="window.parent.frames['${param.tabid }'].closeODialog();" class="btn">
  193. <span>关闭</span>
  194. </button>
  195. </div>
  196. <div class="navbar-inner2">
  197. <c:if test="${requestScope.tmodel.se.value == 1 }">
  198. <font id="insNameFont" style=" color: black; font-family: 微软雅黑; font-size: 30px; ">${requestScope.flow.insName }</font>
  199. <input type="text" id="insNameText" style="margin-top: 5px; height: 20px; display: none;" value="${requestScope.flow.insName }">
  200. <a id="insNameEdit" onClick="changeInsName()">点此编辑标题</a>
  201. <a id="insNameEnter" onClick="confirmInsName();" style="display: none;">确定</a>
  202. <input type="hidden" id="insName" name="insName" value="${requestScope.flow.insName }">
  203. </c:if>
  204. <c:if test="${requestScope.tmodel.se.value != 1 }">
  205. <font id="insNameFont" style=" color: black; font-family: 微软雅黑; font-size: 30px; ">${requestScope.flow.insName }</font>
  206. <font style="color: black; font-family: 微软雅黑; font-size: 20px; ">发起人:${requestScope.flow.creator.username }</font>
  207. <input type="hidden" id="insName" name="insName" value="${requestScope.flow.insName }">
  208. </c:if>
  209. </div>
  210. </div>
  211. <div id="word_temp" class="wp" style="position: relative;">
  212. <div id="print_body">
  213. <c:if test="${requestScope.flow.formInsId == '0' }">
  214. <fieldset id="icon-top2">
  215. <div class="wf_shadow">
  216. <span class="z corner_41"></span> <span class="y corner_12"></span>
  217. <c:if test="${requestScope.flow.formInsId == '0' }">
  218. <iframe width="100%" onload="setFrame();" id="formIns" name="formIns"
  219. frameborder="0" scrolling="no" style="width:100%;"
  220. src="${pageContext.request.contextPath}/amsFlowAction.do?task=toInfoDetail&insId=${requestScope.flow.insId}&tinsId=${requestScope.tache.tinsId}" >
  221. </iframe>
  222. </c:if>
  223. <span class="z corner_34"></span> <span class="y corner_23"></span>
  224. </div>
  225. </fieldset>
  226. </c:if>
  227. <fieldset id="icon-top3" style="border: 1px solid #333333; width: 970px; ">
  228. <legend>
  229. <i></i> &nbsp;流程附件
  230. </legend>
  231. <div class="forum-container">
  232. <table class="l-table-edit line" style="margin-left: 10px; width: 950px;">
  233. <tr>
  234. <td class="l-table-edit-text">附件:
  235. </td>
  236. <td class="l-table-edit-td">
  237. <c:if test="${fn:length(requestScope.fileList) > 0 }">
  238. <table>
  239. <tr>
  240. <td width="20%">上传环节</td>
  241. <td width="20%">上传人</td>
  242. <td width="60%">附件</td>
  243. </tr>
  244. <c:forEach items="${requestScope.fileList }" var="file">
  245. <tr>
  246. <td>${file.file_model_name}</td>
  247. <td>${file.file_create_name}</td>
  248. <td><span class="l-file" len="15">${file.file_value}</span></td>
  249. </tr>
  250. </c:forEach>
  251. </table>
  252. </c:if>
  253. <jsp:include page="/include/file.jsp">
  254. <jsp:param name="fieldName" value="fileId"/>
  255. <jsp:param name="folder" value="ams/flow"/>
  256. <jsp:param name="documentId" value=""/>
  257. <jsp:param name="size" value="20"/>
  258. <jsp:param name="isDelFile" value="1"/>
  259. </jsp:include>
  260. </td>
  261. </tr>
  262. </table>
  263. </div>
  264. </fieldset>
  265. <fieldset id="icon-top4"
  266. style="border: 1px solid #333333; width: 970px; ">
  267. <legend>
  268. <i></i> &nbsp;流程审批
  269. </legend>
  270. <div class="forum-container">
  271. <table class="l-table-edit line" style="margin-left: 10px; width: 950px;">
  272. <tr>
  273. <td class="l-table-edit-text" rowspan="2">环节审批:
  274. </td>
  275. <td class="l-table-edit-td">
  276. <select id="instructions" style="width: 200px;">
  277. <option value="">常用批示语</option>
  278. <c:forEach items="${requestScope.inList }" var="in">
  279. <option value="${in.instructions }">${in.instructions }</option>
  280. </c:forEach>
  281. </select>
  282. </td>
  283. </tr>
  284. <tr>
  285. <td class="l-table-edit-td">
  286. <textarea rows="5" cols="100" id="remark" name="remark"></textarea>
  287. </td>
  288. </tr>
  289. </table>
  290. <table class="l-table-edit line" style="margin-left: 10px; width: 950px;">
  291. <tr>
  292. <td class="l-table-edit-td" colspan="2">
  293. 备注及审批意见:
  294. </td>
  295. </tr>
  296. <c:forEach items="${requestScope.tList }" var="tinstance">
  297. <c:if test="${tinstance.remark != null && fn:length(tinstance.remark) > 0 }">
  298. <tr>
  299. <td class="l-table-edit-text">${tinstance.user.username }</td>
  300. <td>${tinstance.remark }</td>
  301. </tr>
  302. </c:if>
  303. </c:forEach>
  304. </table>
  305. </div>
  306. </fieldset>
  307. <fieldset id="icon-top5" style="border: 1px solid #333333; height: 300px;">
  308. <legend>
  309. <i></i> &nbsp;流转过程
  310. </legend>
  311. <div id="maingrid2">
  312. <table class="l-table-edit line" style="margin-left: 10px; width: 950px;" id="tableProcess">
  313. <tr>
  314. <td>环节名称</td>
  315. <td>操作人</td>
  316. <td>状态</td>
  317. <td>环节启动时间</td>
  318. <td>环节结束时间</td>
  319. </tr>
  320. <c:forEach items="${requestScope.tList }" var="tinstance">
  321. <tr>
  322. <td>${tinstance.tmodelId.tmodelName }</td>
  323. <td>${tinstance.user.username }</td>
  324. <td>${tinstance.state.dataName }</td>
  325. <td><fmt:formatDate value="${tinstance.createdate}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
  326. <td><fmt:formatDate value="${tinstance.finishdate}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
  327. </tr>
  328. <!-- <fmt:formatDate value="${ins.ins_create_date }" pattern="yyyy-MM-dd"/> -->
  329. </c:forEach>
  330. </table>
  331. </div>
  332. </fieldset>
  333. <!-- <fieldset id="icon-top6" style="border: 1px solid #333333; width: 970px; ">
  334. <legend>
  335. <i></i> &nbsp;流程图
  336. </legend>
  337. <div style="margin-left: 10px; width: 950px;">开发中......</div>
  338. </fieldset> -->
  339. <fieldset></fieldset>
  340. <br>
  341. </div>
  342. </div>
  343. <!-- end nav-->
  344. <input type="hidden" id="tmodelId" name="tmodelId" value="${requestScope.tmodel.tmodelId }">
  345. <input type="hidden" id="tinsId" name="tinsId" value="${requestScope.tache.tinsId }">
  346. <input type="hidden" id="preTinsId" name="preTinsId" value="${requestScope.tache.preTinsId }">
  347. <input type="hidden" id="insId" name="insId" value="${requestScope.flow.insId }">
  348. <input type="hidden" id="modelId" name="modelId" value="${requestScope.fmodel.modelId }">
  349. <input type="hidden" id="task" name="task" value="process">
  350. <input type="hidden" id="formInsId" name="formInsId" value="${requestScope.flow.formInsId }">
  351. <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
  352. <input type="hidden" id="groupid" name="groupid" value="${requestScope.flow.groupid.groupId}">
  353. <input type="hidden" id="isMoreIns" name="isMoreIns" value="${requestScope.tmodel.isMoreIns.value }">
  354. <input type="hidden" id="pathJudgeType" name="pathJudgeType" value="${requestScope.tmodel.pathJudgeType.value }">
  355. <p class="back-to-top" id="top1" style="display: block;">
  356. <a href="#top"><span></span>返回顶部</a>
  357. </p>
  358. <c:if test="${requestScope.flow.formInsId == '0' }">
  359. <p class="back-to-top" id="top2" style="display: block;">
  360. <a href="#icon-top2"><span></span>查看表单</a>
  361. </p>
  362. </c:if>
  363. <p class="back-to-top" id="top3" style="display: block;">
  364. <a href="#icon-top3"><span></span>查看附件</a>
  365. </p>
  366. <p class="back-to-top" id="top4" style="display: block;">
  367. <a href="#icon-top4"><span></span>审批意见</a>
  368. </p>
  369. <p class="back-to-top" id="top5" style="display: block;">
  370. <a href="#icon-top5"><span></span>流转过程</a>
  371. </p>
  372. <!-- <p class="back-to-top" id="top6" style="display: block;">
  373. <a href="#icon-top6"><span></span>流程图 </a>
  374. </p> -->
  375. <div id="nextTache">
  376. <div class="forum-container">
  377. <table class="l-table-edit line" style="margin-left: 10px; width: 950px;">
  378. <tr>
  379. <th colspan="2">选择下一环节信息</th>
  380. </tr>
  381. <c:choose>
  382. <c:when test="${requestScope.tmodel.pathJudgeType.value == 1 }">
  383. <tr>
  384. <td class="l-table-edit-text" rowspan="2">下一环节<FONT COLOR="red">*</FONT>:
  385. </td>
  386. <td class="l-table-edit-td">
  387. <select id="nextTmodelId" name="nextTmodelId" class="width_150" style="margin-top: 4px; margin-bottom: 2px;">
  388. <c:forEach items="${requestScope.nextTmodels }" var="tmodel">
  389. <option value="${tmodel.nextTmodelId.tmodelId }">${tmodel.nextTmodelId.tmodelName }</option>
  390. </c:forEach>
  391. </select>
  392. </td>
  393. </tr>
  394. <c:forEach items="${requestScope.nextHandTmodels }" var="nhTmodel" varStatus="count">
  395. <tbody id="${nhTmodel.nextTmodelId.tmodelId }" name="nextUser">
  396. <tr>
  397. <td class="l-table-edit-text">下一环节操作人<FONT COLOR="red">*</FONT>:
  398. </td>
  399. <td class="l-table-edit-td">
  400. <input type="text" class="width_150" style="margin-top: 4px;" id="usersName${nhTmodel.nextTmodelId.tmodelId }" name="usersName${nhTmodel.nextTmodelId.tmodelId }" value="">
  401. <input type="hidden" id="users${nhTmodel.nextTmodelId.tmodelId }" name="users${nhTmodel.nextTmodelId.tmodelId }" value="">
  402. <input type="button" class="btn" style="height: 25px;" id="usersButton${nhTmodel.nextTmodelId.tmodelId }" name="usersButton${nhTmodel.nextTmodelId.tmodelId }" value="选择人员">
  403. </td>
  404. </tr>
  405. <script type="text/javascript">
  406. $(document).ready(function(){
  407. loadTypeTree("usersButton${nhTmodel.nextTmodelId.tmodelId }",{type:"user", tab:"1", backId:"users${nhTmodel.nextTmodelId.tmodelId }", backName:"usersName${nhTmodel.nextTmodelId.tmodelId }", tabParam:[{tab:"1", isMultiDept:"1"}]});
  408. });
  409. </script>
  410. </tbody>
  411. </c:forEach>
  412. </c:when>
  413. <c:when test="${requestScope.tmodel.pathJudgeType.value == 0 }">
  414. <c:if test="${fn:length(requestScope.nextHandTmodels) > 0}">
  415. <tr>
  416. <td class="l-table-edit-text">下一环节操作人<FONT COLOR="red">*</FONT>:
  417. </td>
  418. <td class="l-table-edit-td"></td>
  419. </tr>
  420. </c:if>
  421. <c:forEach items="${requestScope.nextHandTmodels }" var="nhTmodel" varStatus="count">
  422. <tbody id="${nhTmodel.nextTmodelId.tmodelId }" name="nextUser">
  423. <tr>
  424. <td class="l-table-edit-text">${nhTmodel.nextTmodelId.tmodelName }<FONT COLOR="red">*</FONT>:
  425. </td>
  426. <td class="l-table-edit-td">
  427. <input type="text" class="width_150" style="margin-top: 4px;" id="usersName${nhTmodel.nextTmodelId.tmodelId }" name="usersName${nhTmodel.nextTmodelId.tmodelId }" value="">
  428. <input type="hidden" id="users${nhTmodel.nextTmodelId.tmodelId }" name="users${nhTmodel.nextTmodelId.tmodelId }" value="">
  429. <input type="button" class="btn" style="height: 25px;" id="usersButton${nhTmodel.nextTmodelId.tmodelId }" name="usersButton${nhTmodel.nextTmodelId.tmodelId }" value="选择人员">
  430. </td>
  431. </tr>
  432. <script type="text/javascript">
  433. $(document).ready(function(){
  434. loadTypeTree("usersButton${nhTmodel.nextTmodelId.tmodelId }",{type:"user", tab:"1", backId:"users${nhTmodel.nextTmodelId.tmodelId }", backName:"usersName${nhTmodel.nextTmodelId.tmodelId }", tabParam:[{tab:"1", isMultiDept:"1"}]});
  435. });
  436. </script>
  437. </tbody>
  438. </c:forEach>
  439. </c:when>
  440. </c:choose>
  441. <tr>
  442. <td class="l-table-edit-text">当前环节名称:
  443. </td>
  444. <td class="l-table-edit-td">
  445. <input type="hidden" id="tmodelName" name="tmodelName" value="${requestScope.tmodel.tmodelName }">
  446. ${requestScope.tmodel.tmodelName }
  447. </td>
  448. </tr>
  449. <tr>
  450. <td class="l-table-edit-text">
  451. </td>
  452. <td class="l-table-edit-td">
  453. <input type="checkbox" id="isNextSms" name="isNextSms" value="1"
  454. <c:if test="${requestScope.tmodel.isSms.value == 1}">
  455. checked="checked"
  456. </c:if>
  457. >&nbsp;短信通知下一环节操作人
  458. </td>
  459. </tr>
  460. <tr>
  461. <td style="text-align: center;" colspan="2">
  462. <button type="button" onClick="formJs()" class="btn">
  463. <span>提交</span>
  464. </button>
  465. <button type="button" onClick="closeNextTache()" class="btn">
  466. <span>关闭</span>
  467. </button>
  468. </td>
  469. </tr>
  470. </table>
  471. </div>
  472. </div>
  473. </form>
  474. </body>
  475. </html>