wfSubmitErrorMsg.jsp
10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.workflow.request.WorkflowRequestMessage" %>
<%@ page import="weaver.common.StringUtil" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="org.json.JSONObject"%>
<%@ page import="org.json.JSONException" %>
<%@ page import="weaver.systeminfo.SystemEnv" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<%
User user = HrmUserVarify.getUser (request , response) ;
if(user == null) return;
String message = request.getParameter("message");
String requestid = request.getParameter("requestid");
String messagecontent = Util.null2String(session.getAttribute("errormsg_"+user.getUID()+"_"+requestid));
if("1021".equals(message)){
String _fnaBudgetControl_AlertInfo = Util.null2String(session.getAttribute(requestid+"_"+1021)).trim();
if(!"".equals(_fnaBudgetControl_AlertInfo)){
messagecontent = _fnaBudgetControl_AlertInfo;
session.setAttribute(requestid+"_"+1021,"");
}
}
String islock = Util.null2String(request.getParameter("islock"));
String nodeid = Util.null2String(request.getParameter("nodeid"));
String userid = Util.null2String(request.getParameter("userid"));
String needcheckLock = Util.null2String(request.getParameter("needcheckLock"));
String timestamp = Util.null2String(request.getParameter("timestamp"));
int formid=Util.getIntValue((String)session.getAttribute(user.getUID()+"_"+requestid+"formid"),0);
String bottom = "";
String details = "";
if(StringUtil.isNotNull(messagecontent)){
try{
JSONObject jo = new JSONObject(messagecontent);
if(jo.has("details")){
details = Util.null2String(jo.getString("details"));
}
if(jo.has("bottomprefix")){
String bottomprefix = Util.null2String(jo.getString("bottomprefix"));
int msgurlparm = jo.getInt("msgurlparm");
int msgtype = jo.getInt("msgtype");
bottom = WorkflowRequestMessage.getBottomWorkflowInfo(bottomprefix,msgtype,user,msgurlparm);
}
}catch(JSONException e){
details = messagecontent;
}
}
%>
<html>
<head>
<link type="text/css" href="/css/ecology8/worflowmessage_wev8.css" rel="stylesheet"></link>
<script type="text/javascript">
//弹出流程设置窗口
function resetWorkflow(url,title,type){
if(type == '3'){
openFullWindowHaveBar(url);
return;
}else if(type == '1'||type =='2'){
url = "/workflow/request/WFReset.jsp?wfid="+url+"&type="+type;
title = '<%=SystemEnv.getHtmlLabelName(33488,user.getLanguage()) %>';
}
dialog = new window.top.Dialog();
dialog.currentWindow = window;
dialog.Title = title;
dialog.Width = 1020;
dialog.Height = 580;
dialog.Drag = true;
dialog.maxiumnable = false;
dialog.URL = url;
dialog.show();
}
//生成系统提醒流程
function triggerSystemWorkflow(prefix,url,title,loginuserid,type){
prefix = prefix.replace(/~0~/g,"<span class='importantInfo'>");
prefix = prefix.replace(/~1~/g,"</span>");
prefix = prefix.replace(/~2~/g,"<span class='importantDetailInfo'>");
var infohtml = jQuery('.message-detail').html();
if(!infohtml){
infohtml = "";
}else{
infohtml = "<div class='message-detail'>"+infohtml+"</div>";
}
var botfix = "<%=SystemEnv.getHtmlLabelName(126558,user.getLanguage())%>";
if("<%=SystemEnv.getHtmlLabelName(18913,user.getLanguage())%>" == title){
botfix="<%=SystemEnv.getHtmlLabelName(126556,user.getLanguage())%>";
}
var messagedetail = infohtml + '<span>'+prefix + ',<%=SystemEnv.getHtmlLabelName(126554,user.getLanguage())%><a id="wfSErrorResetBtn" style="color:#2b8ae2!important;" href="'+url+'" title="'+title+'" type="'+type+'"> <%=SystemEnv.getHtmlLabelName(126555,user.getLanguage())%> </a>'+botfix+'</span>';
var ahtml = jQuery('.message-bottom span').html();
jQuery('<span> <%=SystemEnv.getHtmlLabelName(126555,user.getLanguage())%> <span>').replaceAll('.message-bottom .sendMsgBtn');
jQuery.ajax({
type:'post',
url:'/workflow/request/TriggerRemindWorkflow.jsp?_'+new Date().getTime()+"=1",
data:{
remark:messagedetail,
loginuserid:loginuserid,
requestid:'<%=requestid%>'
},
error:function (XMLHttpRequest, textStatus, errorThrown) {
jQuery('.message-bottom span').html(ahtml);
} ,
success:function (data, textStatus) {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(126317,user.getLanguage())%>");
}
});
}
jQuery(document).ready(function(){
jQuery('.message-detail .condition').each(function(){
var _a = jQuery(this).attr('index');
if(!jQuery.isEmptyObject(_a)){
jQuery(this).hover(
function(){
jQuery('#condit'+_a).css('display','block');
jQuery('#condit'+_a).css('left',window.event.clientX);
},
function(){
jQuery('#condit'+_a).css('display','none');
}
);
}
});
<%if(formid == 14){%>
var url = jQuery('#wfSErrorResetBtn').attr('href');
var title = jQuery('#wfSErrorResetBtn').attr('title');
var type = jQuery('#wfSErrorResetBtn').attr('type');
jQuery('#wfSErrorResetBtn').attr('href','#');
jQuery('#wfSErrorResetBtn').attr('onclick',"resetWorkflow('"+url+"','"+title+"','"+type+"')");
jQuery('#wfSErrorResetBtn').removeAttr('target');
jQuery('#wfSErrorResetBtn').removeAttr('title');
jQuery('.condition').css('color','#123885!important');
jQuery("#wfSErrorResetBtn").removeAttr('style');
<%}%>
});
//重新选择操作者
function rechoseoperator(){
var frmmain = jQuery("form[name='frmmain']");
var eh_dialog = null;
if(window.top.Dialog)
eh_dialog = new window.top.Dialog();
else
eh_dialog = new Dialog();
eh_dialog.currentWindow = window;
eh_dialog.Width = 650;
eh_dialog.Height = 500;
eh_dialog.Modal = true;
eh_dialog.maxiumnable = false;
eh_dialog.Title = "<%=SystemEnv.getHtmlLabelName(18214,user.getLanguage())%>";
eh_dialog.URL = "/workflow/request/requestChooseOperator.jsp";
eh_dialog.callbackfun = function(paramobj, datas) {
frmmain.append('<input type="hidden" name="eh_setoperator" value="y" />');
frmmain.append('<input type="hidden" name="eh_relationship" value="'+datas.relationship+'" />');
frmmain.append('<input type="hidden" name="eh_operators" value="'+datas.operators+'" />');
doSubmitBack(); //模拟提交
};
eh_dialog.closeHandle = function(paramobj, datas){
if(frmmain.find("input[name='eh_setoperator']").size() == 0){
frmmain.append('<input type="hidden" name="eh_setoperator" value="n" />');
doSubmitBack(); //模拟提交
}
};
eh_dialog.show();
}
//校验当前页面是否有效
function checkEffictive(){
var effictiveFlag = true;
<%if("true".equals(needcheckLock)){%>
jQuery.ajax({
url: "/workflow/request/checkLockAjax.jsp?type=checkEffictive&requestid=<%=requestid%>&nodeid=<%=nodeid%>&userid=<%=userid%>×tamp=<%=timestamp%>",
dataType: "text",
type:"post",
async:false,
contentType : "charset=gbk",
error:function(ajaxrequest){},
success:function(data){
effictiveFlag = jQuery.trim(data);
}
});
<%}%>
return effictiveFlag;
}
//点击解锁流程超链接
function doUnlock(){
if(checkEffictive() == 'true'){
top.Dialog.confirm('<%=SystemEnv.getHtmlLabelName(128824,user.getLanguage())%>', function () {
unlockRequest(1);
doSave_nNew(window.document);
}, function () {
top.window.opener=null;
top.window.open('', '_self', '');
top.window.close();
}, 320, 90,true);
}else{
unEffictiveAlert();
}
}
function unEffictiveAlert(){
top.Dialog.confirm('<%=SystemEnv.getHtmlLabelName(128819,user.getLanguage())%>', function () {
top.window.opener=null;
top.window.open('', '_self', '');
top.window.close();
}, function () {}, 320, 90,true);
}
//流程解锁
function unlockRequest(needclose){
jQuery.ajax({
url: "/workflow/request/checkLockAjax.jsp?type=unlockRequest&requestid=<%=requestid%>&nodeid=<%=nodeid%>&userid=<%=userid%>&needclose="+needclose,
dataType: "text",
type:"post",
async:false,
contentType : "charset=gbk",
error:function(ajaxrequest){},
success:function(data){
}
});
}
</script>
</head>
<body>
<%if(StringUtil.isNotNull(message)){%>
<div class="message-box">
<table>
<tr>
<td valign="top">
<div class="message-title-icon"></div>
</td>
<td>
<div class="message-content">
<span class="message-title">
<%=WorkflowRequestMessage.getNewMessageId(message,user.getLanguage())%>
</span>
<%if(StringUtil.isNotNull(details)){%>
<div class="message-detail">
<%=details %>
</div>
<%}%>
<%if(StringUtil.isNotNull(bottom)){%>
<div class="message-bottom">
<span><%=bottom %></span>
</div>
<%}%>
</div>
</td>
</tr>
</table>
</div>
<%}else{
if("true".equals(islock)){
String messageContent = "";
if(user.getLanguage() == 7){
messageContent = "当前流程已被您签出,其他人目前不能对表单数据进行操作,如需取消签出,请<a style='color:blue;' href=\"#\" onclick=\"doUnlock();\" target=\"_self\">点击这里解锁</a>";
}else if(user.getLanguage() == 9){
messageContent = "當前流程已被您簽出,其他人現時不能對表單數據進行操作,如需取消簽出,請<a style='color:blue;' href=\"#\" onclick=\"doUnlock();\" target=\"_self\">點擊這裡解鎖</a>";
}else{
messageContent = "The request has been checked by yourself,if you want to checkout,please <a style='color:blue;' href=\"#\" onclick=\"doUnlock();\" target=\"_self\">click here </a> to unlock";
}
%>
<div class="message-box2">
<table>
<tr>
<td valign="top">
<div class="lockinfo-icon"></div>
</td>
<td>
<div class="message-content">
<span class="message-title">
<%=messageContent %>
</span>
</div>
</td>
</tr>
</table>
</div>
<%}} %>
</body>
</html>