RequestUserDefault.jsp
12.3 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*,java.sql.Timestamp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ include file="/datacenter/maintenance/inputreport/InputReportHrmInclude.jsp" %>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page" />
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="InputReportComInfo" class="weaver.datacenter.InputReportComInfo" scope="page" />
<jsp:useBean id="shareManager" class="weaver.share.ShareManager" scope="page" />
<jsp:useBean id="workflowPhrase" class="weaver.workflow.sysPhrase.WorkflowPhrase" scope="page" />
<!DOCTYPE html>
<%@ include file="/workflow/request/CommonUtils.jsp" %>
<%
String titlename = $label(73,user.getLanguage());
%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%
int userid = user.getUID();
String Showoperator = "0";
String commonuse = "0";
String signlisttype = "1";
int multisubmitnotinputsign = 0;
int wfspaopenwindow = 1;
RecordSet.executeSql("select Showoperator,commonuse from "
+"workflow_requestUserdefault where userid=" + userid);
if(RecordSet.next()){
Showoperator = RecordSet.getString("Showoperator");
commonuse = RecordSet.getString("commonuse");
}
RecordSet.executeSql("select signlisttype, multisubmitnotinputsign,wfspaopenwindow from workflow_RequestUserDefault where userId = "+userid);
if(RecordSet.next()){
signlisttype = RecordSet.getString("signlisttype");
multisubmitnotinputsign = Util.getIntValue(Util.null2String(RecordSet.getString("multisubmitnotinputsign")), 0);
wfspaopenwindow = Util.getIntValue(RecordSet.getString("wfspaopenwindow"),0);
}
boolean hasAddRight = false; //是否有新增批示语的权限
hasAddRight = HrmUserVarify.checkUserRight("PublicPhrase:all", user) || workflowPhrase.hasPrivateRight();
%>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+ $label(86,user.getLanguage()) +",javascript:pager.doSave(),_top} " ;
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<html>
<head>
<link href="/css/Weaver_wev8.css" type="text/css" rel="stylesheet">
<script language="javascript" src="/js/weaver_wev8.js"></script>
<script>
jQuery(document).ready(function(){
pager.init();
});
var pager = {
init : function(){
jQuery("input[type=checkbox]").each(function(){
if(jQuery(this).attr("tzCheckbox") == "true"){
jQuery(this).tzCheckbox({labels:['','']});
}
});
pager.bind();
},
bind : function(){
jQuery('#btnNewPhrase').click( pager.showAddPhraseDialog );
jQuery('#btnDelPhrase').click( pager.doDeleteMany );
jQuery('#btnMessageSetting').click( pager.showMessageSettingDialog );
jQuery(".setting").hover(function(){
$(this).attr("src","/images/homepage/style/settingOver_wev8.png")
},function(){
$(this).attr("src","/images/homepage/style/setting_wev8.png")
})
},
doSave : function(){
jQuery.post(
'RequestUserDefaultOperation.jsp',
{
'Showoperator' : jQuery('#Showoperator').attr('checked') ? '1' : '0',
'commonuse' : jQuery('#commonuse').attr('checked') ? '1' : '0',
'signlisttype':jQuery('#signlisttype').val(),
'multisubmitnotinputsign' : jQuery('#multisubmitnotinputsign').attr('checked') ? '0' : '1',
'wfspaopenwindow' : jQuery('#wfspaopenwindow').attr('checked') ? '1' : '0'
},
function(data){
window.location = window.location;
}
);
},
showMessageSettingDialog : function(){
var dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/system/sysremind/SysRemindWorkflowSetting.jsp?loginid="
+ '<%=user.getLoginid()%>';
dialog.Title = "<%=$label(33552,user.getLanguage())%>";
dialog.Width = 650;
dialog.Height = 530;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
},
showAddPhraseDialog : function(){
pager.showPhraseDialog();
},
showEditPhraseDialog : function(id, args, btn){
jQuery.post("/workflow/sysPhrase/PhraseOperate.jsp",{operation:"check",ids:id},function(data){
data = eval("(" + data + ")");
var _success = data.success;
var _msg = data.msg;
if(_success == "0"){
window.top.Dialog.alert(_msg);
}else{
pager.showPhraseDialog(id);
}
});
},
showPhraseDialog : function(id){
var dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/workflow/request/UserPhraseEdit.jsp?"
if(id) url += ('id=' + id);
var title = "<%= $label(22409,user.getLanguage())%>";
dialog.Title = id? ("<%= $label(26473,user.getLanguage())%>" + title) : ("<%= $label(611,user.getLanguage())%>" + title);
dialog.Width = 850;
dialog.Height = 600;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
},
doDeleteMany : function(){
var ids = _xtable_CheckedCheckboxId();
if(ids){
pager.del( ids + '-1');
}else {
window.top.Dialog.alert('<%=$label(20149,user.getLanguage())%>');
}
},
doDelete : function(id, args, btn){
jQuery.post("/workflow/sysPhrase/PhraseOperate.jsp",{operation:"check",ids:id},function(data){
data = eval("(" + data + ")");
var _success = data.success;
var _msg = data.msg;
if(_success == "0"){
window.top.Dialog.alert(_msg);
}else{
pager.del(id);
}
});
},
del : function(ids){
top.Dialog.confirm("<%=$label(82017,user.getLanguage())%>",function(){
jQuery.post(
'/workflow/sysPhrase/PhraseOperate.jsp',
{
'operation' : 'delete',
'ids' : ids
},
function(data){
window.location.reload();
}
);
},function(){},320,90);
},
refresh : function(){
window.location.reload();
}
};
</script>
</head>
<body>
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input id="btnSave" type="button" value="<%=$label(86,user.getLanguage()) %>" class="e8_btn_top" onclick="pager.doSave()" />
<span title="<%=SystemEnv.getHtmlLabelName(83721,user.getLanguage())%>" class="cornerMenu"></span>
</td>
</tr>
</table>
<form id="weaver" name=frmmain action="RequestUserDefaultOperation.jsp" method=post >
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td class="rightSearchSpan" style="text-align:right;">
<input type="text" class="searchInput" name="flowTitle" value="test"/>
</td>
</tr>
</table>
<wea:layout type="twoCol" attributes="{'expandAllGroup':'true'}">
<wea:group context='<%=$label(33549,user.getLanguage()) %>' attributes="{'class':'e8_title e8_title_1'}">
<wea:item>
<%= $label(22219, user.getLanguage())%>
</wea:item>
<wea:item>
<input type="checkbox" id='Showoperator' name="Showoperator" tzCheckbox="true" <%if(Showoperator.equals("1")){%>checked <%}%>>
</wea:item>
<wea:item>
<%= $label(33551, user.getLanguage())%>
</wea:item>
<wea:item>
<input type="checkbox" id='commonuse' name="commonuse" tzCheckbox="true" <%if(commonuse.equals("1")){%>checked <%}%>>
</wea:item>
<%if(1 == 1){%>
<wea:item>
<%=SystemEnv.getHtmlLabelName(84394,user.getLanguage())%>
</wea:item>
<wea:item>
<select name="signlisttype" id="signlisttype">
<option value="1" <%if(signlisttype.equals("1")){%>selected<%}%>><%=$label(81641,user.getLanguage())%></option>
<option value="0" <%if(signlisttype.equals("0")){%>selected<%}%>><%=$label(81640,user.getLanguage())%></option>
</select>
</wea:item>
<%}%>
<wea:item>
<%=SystemEnv.getHtmlLabelName(84395,user.getLanguage())%>
</wea:item>
<wea:item>
<input type="checkbox" id='multisubmitnotinputsign' name="multisubmitnotinputsign" tzCheckbox="true" <%if(multisubmitnotinputsign == 0){%>checked <%}%>>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(129875,user.getLanguage())%></wea:item>
<wea:item>
<input type="checkbox" id="wfspaopenwindow" name="wfspaopenwindow" tzCheckbox="true" <%if(wfspaopenwindow == 1){%>checked <%}%> />
</wea:item>
</wea:group>
<wea:group context='<%= $label(33550, user.getLanguage())%>' attributes="{'class':'e8_title e8_title_1'}">
<wea:item>
<%= $label(26679, user.getLanguage())%>
</wea:item>
<wea:item>
<img id='btnMessageSetting' class="setting" src="/images/homepage/style/setting_wev8.png" url=""/>
</wea:item>
</wea:group>
<input type="hidden" name="pageId" id="pageId" value="<%= PageIdConst.WF_REQUEST_REQUESTUSERDEFAULT%>"/>
<wea:group context='<%= $label(22409, user.getLanguage()) + $label(33508, user.getLanguage())%>' attributes="{'class':'e8_title e8_title_1'}">
<%
String backFields = "id,hrmId,phraseShort,phraseDesc,groupid,dsporder";
String whereSql = "hrmId=" + user.getUID() + " or hrmId = -1";
int langeid = user.getLanguage();
String para1 = "column:groupid+" + user.getUID() + "+" + user.getLogintype();
String para2 = "column:id+column:groupid+" + user.getUID() + "+" + user.getLogintype();
String operateString = "<operates width='20%'>";
operateString += " <popedom async=\"true\" transmethod=\"weaver.workflow.sysPhrase.WorkflowPhrase.getPhraseOperation\" otherpara=\""+para1+"\"></popedom> ";
operateString += " <operate href='javascript:pager.showEditPhraseDialog()' text='"+$label(26473,user.getLanguage())+"' index='0'/>";
operateString += " <operate href='javascript:pager.doDelete()' text='"+$label(91,user.getLanguage())+"' index='1'/>";
operateString += "</operates>";
String tableDefination = "";
tableDefination += "<table id='phraseTable' name='phraseTable' instanceid='phraseTable' pageId='phraseTable' tabletype='checkbox' pagesize='"+PageIdConst.getPageSize("phraseTable",user.getUID())+"'>";
tableDefination += " <checkboxpopedom id=\"checkbox\" popedompara=\"" + para1 + "\" showmethod=\"weaver.workflow.sysPhrase.WorkflowPhrase.getCheckBox\" />";
tableDefination += " <sql backfields=\""+backFields+"\" sqlform=\"sysPhrase\" sqlwhere=\""+whereSql+"\" sqlprimarykey=\"id\" sqlorderby=\"dsporder,id\" sqlsortway=\"asc\" />";
tableDefination += operateString;
tableDefination += " <head>";
tableDefination += " <col width='30%' name='phraseShort' text='"+$label(18774,user.getLanguage())+"' column='phraseShort' transmethod='weaver.workflow.sysPhrase.WorkflowPhrase.generateLink' otherpara='" + para2 + "'></col>";
tableDefination += " <col width='40%' name='phraseDesc' text='"+$label(18775,user.getLanguage())+"' column='phraseDesc' ></col>";
tableDefination += " <col width='20%' name='groupid' text='"+$label(126819,user.getLanguage())+"' column='groupid' transmethod='weaver.workflow.sysPhrase.WorkflowPhrase.getGroupname' otherpara='" + langeid + "'></col>";
tableDefination += " <col width='10%' name='dsporder' text='"+$label(15513,user.getLanguage())+"' column='dsporder' ></col>";
tableDefination += " </head>";
tableDefination += "</table>";
%>
<wea:item type="groupHead">
<%if(hasAddRight){%>
<input type="button" id="btnNewPhrase" name="btnNewPhrase" class="addbtn" accessKey=A title="<%=$label(82,user.getLanguage())%>"/>
<%}%>
<input type="button" id='btnDelPhrase' name="btnDelPhrase" class="delbtn" accessKey=E title="<%=$label(23777,user.getLanguage())%>"/>
</wea:item>
<wea:item attributes="{'isTableList':'true'}">
<input type="hidden" showCol="false" name="pageId" id="pageId" value="phraseTable"/>
<wea:SplitPageTag tableInstanceId="phraseTable" tableString='<%=tableDefination%>' />
</wea:item>
</wea:group>
</wea:layout>
</form>
</body>
</html>