flow.jsp 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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. .custom-rest{
  16. background: url('<%=basePath %>/resource/images/x.png') no-repeat center
  17. center !important;
  18. width: 16px !important;
  19. background-image: url('<%=basePath %>/resource/ext/4.2/resources/ext-theme-gray/images/form/text-bg.gif');
  20. height: 16px;
  21. border: 0!important;
  22. visibility:hidden;
  23. margin: 2px 0px 0px 0px;
  24. }
  25. .x-grid-cell .x-grid-cell-inner {
  26. white-space: normal;
  27. height: auto !important;
  28. border-color: #ededed;
  29. border-style: solid;
  30. border-width: 0 !important;
  31. border-top:none;
  32. border-bottom: none;
  33. /* //color:gray; */
  34. }
  35. .x-grid-cell-inner{
  36. line-height: 19px!important;
  37. }
  38. .nodedealman{
  39. padding-left:5px;
  40. }
  41. #win-body{
  42. background-color: white;
  43. }
  44. .addcommonwordsbtncls{
  45. background-image: url("jprocessDeal/images/add.png");
  46. margin-bottom: 2px;
  47. }
  48. /* #AssigneeComboxcode-labelEl{
  49. margin-right:-14px !important;
  50. }
  51. #notifyPeople-labelEl{
  52. margin-right:-20px !important;
  53. } */
  54. #com_record .x-toolbar{
  55. border:none!important;
  56. padding:0!important;
  57. }
  58. #historyGrid .x-grid-cell .x-grid-cell-inner{
  59. white-space: normal!important;
  60. /* font:13px arial,sans-serif; */
  61. word-break:break-all!important;
  62. }
  63. .dealMessageCls{
  64. background-image:url(../../resource/images/icon/editpen.png)!important;
  65. background-repeat: no-repeat!important;
  66. background-position: left center!important;
  67. padding-left: 20px!important;
  68. padding-right: 20px!important;
  69. }
  70. #dealMessage .x-form-trigger{
  71. border-bottom:none;
  72. }
  73. .x-field-formbody{
  74. background-color: #f7f7f7 !important;
  75. }
  76. .iframe-background{
  77. background:rgb(255, 250, 192);
  78. }
  79. </style>
  80. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  81. <script type="text/javascript" src="<%=basePath %>/resource/ux/PreviewPlugin.js"></script>
  82. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  83. <script type="text/javascript">
  84. Ext.Loader.setConfig({
  85. enabled: true,
  86. });//开启动态加载
  87. Ext.application({
  88. name: 'erp',//为应用程序起一个名字,相当于命名空间
  89. appFolder: basePath+'app',//app文件夹所在路径
  90. controllers: [//声明所用到的控制层
  91. 'common.Flow'
  92. ],
  93. launch: function() {
  94. Ext.create('erp.view.common.flow.Flow');
  95. }
  96. });
  97. var caller = "JProcess";
  98. var dbfinds = [];
  99. var en_uu = '<%=session.getAttribute("en_uu")%>';
  100. var formCondition = getUrlParam('formCondition');
  101. var gridCondition = '';
  102. var basestarttime=new Date();
  103. var nodeId='<%=request.getAttribute("jp_nodeId")%>';
  104. var nextnodeId=null;
  105. var requiredFields=null;
  106. var conditionValidation=null;
  107. var canexecute=false;
  108. var ISexecuted=getUrlParam("_do")==1;
  109. var master=getUrlParam("newMaster");
  110. var _center=getUrlParam("_center");
  111. var TaskId=null;
  112. var ProcessData=null;
  113. var forknode=0;//判断当前审批节点是否并行节点
  114. var disagree = getUrlParam('_disagree')==1;;
  115. function scanAttachs(val,jnname,jndealManName){
  116. var attach = new Array();
  117. Ext.Ajax.request({//拿到grid的columns
  118. url : basePath + 'common/getFilePaths.action',
  119. async: false,
  120. params: {
  121. id:val
  122. },
  123. method : 'post',
  124. callback : function(options,success,response){
  125. var res = new Ext.decode(response.responseText);
  126. if(res.exception || res.exceptionInfo){
  127. showError(res.exceptionInfo);
  128. return;
  129. }
  130. attach = res.files != null ? res.files : [];
  131. }
  132. });
  133. var data=new Array();
  134. Ext.each(attach, function(item){
  135. var path = item.fp_path;
  136. var name = '';
  137. if(contains(path, '\\', true)){
  138. name = path.substring(path.lastIndexOf('\\') + 1);
  139. } else {
  140. name = path.substring(path.lastIndexOf('/') + 1);
  141. }
  142. data.push(item);
  143. });
  144. var win = new Ext.window.Window({
  145. title: '查看附件',
  146. id : 'attchWin',
  147. width:500,
  148. height:400,
  149. modal:true,
  150. layout:'column',
  151. bodyStyle:'background:white!important',
  152. items: [{
  153. xtype:'displayfield',
  154. fieldLabel:'节点名称',
  155. value:jnname,
  156. columnWidth:1,
  157. border:0,
  158. margin:'5 0 0 5',
  159. labelWidth:75,
  160. style:{
  161. 'background':'#ffffff'
  162. },
  163. },{
  164. xtype:'displayfield',
  165. fieldLabel:'上传者',
  166. value:jndealManName,
  167. border:0,
  168. margin:'5 0 0 5',
  169. labelWidth:75,
  170. columnWidth:1,
  171. style:{
  172. 'background':'#ffffff'
  173. },
  174. },{
  175. xtype:'form',
  176. columnWidth:1,
  177. border:false,
  178. padding:'10 0 0 0',
  179. items:[{
  180. xtype: 'fieldset',
  181. title: '<span style="font-weight:bold;font-size:13px;">附件明细</span>',
  182. collapsible: false,
  183. collapsed: false,
  184. layout:'fit',
  185. padding:'10 0 0 0',
  186. items:[{
  187. xtype:'grid',
  188. id:'fjgrid',
  189. //layout:'fit',
  190. border:false,
  191. columns: [{
  192. flex:0.8,
  193. header: '附件类型',
  194. dataIndex:'fp_name',
  195. align:'center',
  196. renderer:function(val,meta,record){
  197. var type=Ext.util.Format.uppercase(val.substring(val.indexOf("."),val.length));
  198. var urlhead='<img style="vertical-align:middle;"src="' + basePath + 'jsps/common/jprocessDeal/images/';
  199. var urlend='.png" width=25 height=25/>'
  200. switch(type){
  201. case '.JPG': case '.BMP': case '.GIF': case '.JPEG':
  202. case '.TIFF': case '.PNG': case '.SWF':
  203. return urlhead+'jpg'+urlend;
  204. break;
  205. case '.MP3': case '.WAV': case '.MP4': case '.WMA':
  206. case '.OGG': case '.APE': case '.RMVB': case '.MID':
  207. return urlhead+'mp3'+urlend;
  208. break;
  209. case '.DOC': case '.DOCX':
  210. return urlhead+'office'+urlend;
  211. break;
  212. case '.XLS': case '.XLSX':
  213. return urlhead+'excel'+urlend;
  214. break;
  215. case '.PPT': case '.PPTX':
  216. return urlhead+'ppt'+urlend;
  217. break;
  218. case '.WPS': case '.WPT': case '.DOT': case '.DPS': case '.DPT':
  219. case '.POT': case '.ET': case '.ETT': case '.XLT':
  220. return urlhead+'wps'+urlend;
  221. break;
  222. case '.PDF':
  223. return urlhead+'pdf'+urlend;
  224. break;
  225. case '.RAR': case '.ZIP':case '.CAB': case '.GZIP':
  226. return urlhead+'rar'+urlend;
  227. break;
  228. case '.TXT':
  229. return urlhead+'txt'+urlend;
  230. break;
  231. default :
  232. return urlhead+'other'+urlend;
  233. break;
  234. }
  235. }
  236. },{
  237. header: '附件名称', dataIndex: 'fp_name',flex:1.3,align:'center',
  238. },{
  239. header: '文件大小', dataIndex: 'fp_size' ,flex:0.9,align:'center',
  240. renderer:function(val,meta,record){
  241. return val/1000+'K';
  242. }
  243. },{
  244. header: '操作',
  245. flex:0.8,
  246. align:'center',
  247. dataIndex:'fp_path',
  248. renderer:function(val,meta,record){
  249. var fp_id = record.get('fp_id');
  250. if(fp_id){
  251. return '<span><a href="' + basePath + "common/downloadbyId.action?id=" + fp_id + '"><img src="' + basePath + 'jsps/common/jprocessDeal/images/upload.png" width=20 height=20/></a></span>'
  252. }
  253. return '';
  254. }
  255. }],
  256. store:new Ext.data.Store({
  257. fields: ['fp_date', 'fp_id', 'fp_man','fp_name','fp_path','fp_size']
  258. }),
  259. }]
  260. }]
  261. }],
  262. buttonAlign: 'center',
  263. buttons: [{
  264. text: $I18N.common.button.erpCloseButton,
  265. iconCls: 'x-button-icon-close',
  266. cls: 'x-btn-gray',
  267. handler: function(){
  268. Ext.getCmp('attchWin').close();
  269. }
  270. }]
  271. });
  272. Ext.getCmp('fjgrid').store.loadData(data);
  273. win.show();
  274. }
  275. function deleteCommonWords(id,event){
  276. Ext.Ajax.request({
  277. url: basePath + 'common/deleteCommonWords.action',
  278. params: {
  279. id:id
  280. },
  281. async: false,
  282. method: 'post',
  283. callback: function(options, success, response) {
  284. var res = new Ext.decode(response.responseText);
  285. if (res.exceptionInfo) {
  286. showError(res.exceptionInfo);
  287. return;
  288. }
  289. if (res.success) {
  290. alert('删除成功!');
  291. var combo = Ext.getCmp('dealMessage');
  292. combo.doQuery();
  293. }else{
  294. alert('删除失败!');
  295. }
  296. }
  297. });
  298. var e = event?event:window.event;
  299. if (window.event) {
  300. e.cancelBubble=true;
  301. } else {
  302. e.stopPropagation();
  303. }
  304. }
  305. </script>
  306. </head>
  307. </html>