flow_predefine_action_modify_getfieldtitle.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*" %>
  3. <%@ page import="com.redmoon.oa.person.*" %>
  4. <%@ page import="com.redmoon.oa.dept.*" %>
  5. <%@ page import="com.redmoon.oa.flow.*" %>
  6. <%
  7. String flowTypeCode = ParamUtil.get(request, "flowTypeCode");
  8. if (flowTypeCode.equals(""))
  9. return;
  10. Leaf lf = new Leaf();
  11. lf = lf.getLeaf(flowTypeCode);
  12. String formCode = lf.getFormCode();
  13. String fieldWrite = ParamUtil.get(request, "fieldWrite");
  14. String[] fieldAry = null;
  15. String fieldText = "";
  16. if (fieldWrite!=null && !fieldWrite.equals("")) {
  17.   fieldAry = fieldWrite.split(",");
  18.    FormDb fd = new FormDb();
  19. fd = fd.getFormDb(formCode);
  20. int len = fieldAry.length;
  21. for (int i=0; i<len; i++) {
  22. if (fieldText.equals(""))
  23. fieldText = fd.getFieldTitle(fieldAry[i]);
  24. else
  25. fieldText += "," + fd.getFieldTitle(fieldAry[i]);
  26. }
  27. %>
  28. <script>
  29. window.parent.setFieldWriteText("<%=fieldText%>");
  30. </script>
  31. <%}%>
  32. <%
  33. String dept = ParamUtil.get(request, "dept");
  34. String deptName = "";
  35. if (!dept.equals("")) {
  36. String[] deptAry = StrUtil.split(dept, ",");
  37. int len = 0;
  38. if (deptAry!=null)
  39. len = deptAry.length;
  40. com.redmoon.oa.dept.DeptMgr dm = new com.redmoon.oa.dept.DeptMgr();
  41. for (int i=0; i<len; i++) {
  42. if (deptName.equals(""))
  43. deptName = dm.getDeptDb(deptAry[i]).getName();
  44. else
  45. deptName += "," + dm.getDeptDb(deptAry[i]).getName();
  46. }
  47. }
  48. else
  49. return;
  50. // System.out.println("ddd flowTypeCode=" + flowTypeCode);
  51. // System.out.println("fieldWrite=" + fieldWrite);
  52. // System.out.println("fieldText=" + fieldText);
  53. %>
  54. <script>
  55. window.parent.setDeptName("<%=deptName%>");
  56. </script>