jprocessDeal.jsp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
  4. <%
  5. String path = request.getContextPath();
  6. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  7. %>
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  13. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  14. <style type="text/css">
  15. .myradio{
  16. border: 0 !important;
  17. /* background-color: #FFFAFA; */
  18. font-size: 15px !important;
  19. font-weight: bold !important;
  20. /* color:#515151; */
  21. }
  22. .x-html-editor-wrap textarea {
  23. background-color: #FAFAFA;
  24. }
  25. </style>
  26. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  27. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  28. <script type="text/javascript">
  29. Ext.Loader.setConfig({
  30. enabled: true,
  31. });//开启动态加载
  32. Ext.application({
  33. name: 'erp',//为应用程序起一个名字,相当于命名空间
  34. appFolder: '<%=basePath %>'+'app',//app文件夹所在路径
  35. controllers: [//声明所用到的控制层
  36. 'common.JProcessDeal'
  37. ],
  38. launch: function() {
  39. Ext.create('erp.view.common.JProcess.Viewport');
  40. }
  41. });
  42. var caller = "JProcess";
  43. var dbfinds = [];
  44. var basePath = '<%=basePath %>';
  45. var en_uu = '<%=session.getAttribute("en_uu")%>';
  46. var em_type = '<%=session.getAttribute("em_type")%>';
  47. var formCondition = '';
  48. var gridCondition = '';
  49. var basestarttime=new Date();
  50. var nodeId='<%=request.getAttribute("jp_nodeId")%>';
  51. var nextnodeId=null;
  52. var requiredFields=null;
  53. var canexecute=false;
  54. var ISexecuted=getUrlParam("_do")==1;
  55. var master=getUrlParam("newMaster");
  56. var ProcessData=null;
  57. function scanAttachs(val){
  58. var attach = new Array();
  59. Ext.Ajax.request({//拿到grid的columns
  60. url : basePath + 'common/getFilePaths.action',
  61. async: false,
  62. params: {
  63. id:val
  64. },
  65. method : 'post',
  66. callback : function(options,success,response){
  67. var res = new Ext.decode(response.responseText);
  68. if(res.exception || res.exceptionInfo){
  69. showError(res.exceptionInfo);
  70. return;
  71. }
  72. attach = res.files != null ? res.files : [];
  73. }
  74. });
  75. var items=new Array();
  76. items.push({
  77. height: 20,
  78. width: 600,
  79. style: 'background:#CDBA96;',
  80. html: '<h3>附件:</h3>',
  81. });
  82. Ext.each(attach, function(item){
  83. var path = item.fp_path;
  84. var name = '';
  85. if(contains(path, '\\', true)){
  86. name = path.substring(path.lastIndexOf('\\') + 1);
  87. } else {
  88. name = path.substring(path.lastIndexOf('/') + 1);
  89. }
  90. items.push({
  91. style: 'background:#C6E2FF;',
  92. html: '<img src="' + basePath + 'resource/images/mainpage/things.png" width=16 height=16/>' +
  93. '<span>文件:' + name + '<a href="' + basePath + "common/download.action?path=" + path + '">下载</a></span>',
  94. });
  95. });
  96. var win = new Ext.window.Window({
  97. title: '附件下载',
  98. id : 'win',
  99. height: "60%",
  100. width: "40%",
  101. items: items,
  102. buttonAlign: 'center',
  103. buttons: [{
  104. text: $I18N.common.button.erpCloseButton,
  105. iconCls: 'x-button-icon-close',
  106. cls: 'x-btn-gray',
  107. handler: function(){
  108. Ext.getCmp('win').close();
  109. }
  110. }]
  111. });
  112. win.show();
  113. }
  114. </script>
  115. </head>
  116. <body style="size: 1">
  117. </body>
  118. </html>