HrmResourceSearchResult_wev8.js
6.42 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
function onBtnSearchClick(){
resource.submit();
}
function jsChangeMould(obj){
window.location.href="HrmResourceSearchResult.jsp?cmd=changeMould&mouldid="+obj.value;
}
jQuery(document).ready(function(){
hideGroup("moreKeyWord");
var languageid=readCookie("languageidweaver");
var showText = SystemEnv.getHtmlNoteName(3550,languageid);
var hideText = SystemEnv.getHtmlNoteName(3549,languageid);
jQuery(".myHideBlockDiv").unbind("click").bind("click", function () {
var _status = jQuery(this).attr("_status");
var currentTREle = jQuery(this).closest("table").closest("TR");
if (!!!_status || _status == "0") {
jQuery(this).attr("_status", "1");
jQuery(this).html(showText+"<image src='/wui/theme/ecology8/templates/default/images/1_wev8.png'>");
currentTREle.next("TR.Spacing").next("TR.items").hide();
hideGroup("moreKeyWord");
} else {
jQuery(this).attr("_status", "0");
jQuery(this).html(hideText+"<image src='/wui/theme/ecology8/templates/default/images/2_wev8.png'>");
currentTREle.next("TR.Spacing").next("TR.items").show();
showGroup("moreKeyWord");
}
}).hover(function(){
$(this).css("color","#000000");
},function(){
$(this).css("color","#cccccc");
});
});
function doAddWorkPlan(id) {
openFullWindowForXtable("/workplan/data/WorkPlan.jsp?resourceid="+id+"&add=1")
}
function jsHrmResourceSystemView(id){
openFullWindowForXtable('/hrm/HrmTab.jsp?_fromURL=HrmResourceSystemView&id='+id);
}
function submitData() {
//jQuery("#advancedSearch").click();
jQuery("#searchForm").val("hrmResource");
resource.submit();
}
function onRefresh(){
document.frmMain.submit();
}
function onNewResource(departmentid){
window.location.href="/hrm/resource/HrmResourceAdd.jsp?departmentid="+departmentid;
}
function onNumberBlur(f,id){
checknumber(id+"_"+f);
var o=document.getElementById(id);
var iStart=document.all(id+"_start").value;
iStart=(iStart!="")?parseInt(iStart):'A';
var iEnd=document.all(id+"_end").value;
iEnd=(iEnd!="")?parseInt(iEnd):'A';
o.value=iStart+","+iEnd;
//alert(o.value);
}
function customDateAction(realInputDate,span1,date1){
var inputDate=document.getElementById(realInputDate);
var strDate=date1+"_dateSpan";
var objDate=document.getElementById(strDate);
var dates=inputDate.value.split(",");
var prefixStr=span1.id.substring(0,3);
if(prefixStr=="sta"){
objDate.value=dates[0];
}else if(prefixStr=="end"){
objDate.value=dates[1];
}
getDate(span1,objDate);//getDate
if(prefixStr=="sta"){
dates[0]=objDate.value;
dates[0]=(dates[0]=="")?"A":dates[0];
}else if(prefixStr=="end"){
dates[1]=objDate.value;
dates[1]=(dates[1]=="")?"A":dates[1];
}
inputDate.value=dates.join(",");
//alert(inputDate.value);
}
function checkNewmould(){
if(document.resource.mouldname.value==''){
oTrname.style.display='';
return false;
}
return true;
}
function doSaveas(mouldname){
document.resource.mouldname.value = mouldname;
document.resource.opera.value="insert";
document.resource.action="HrmResourceSearchMouldOperation.jsp";
document.resource.target="";
document.resource.submit();
dialog.close();
jQuery("#advancedSearch").click();
}
function onUpdateSaveas(){
document.resource.opera.value="update";
document.resource.action="HrmResourceSearchMouldOperation.jsp";
document.resource.target="";
document.resource.submit();
}
function onDelSaveas(){
document.resource.opera.value="delete";
document.resource.action="HrmResourceSearchMouldOperation.jsp";
document.resource.target="";
document.resource.submit();
}
function onSave(){
document.resource.opera.value="update";
document.resource.action="HrmResourceSearchMouldOperation.jsp";
document.resource.target="";
document.resource.submit();
jQuery("#advancedSearch").click();
}
function HrmUserDefine(){
window.location.href="/hrm/userdefine/HrmUserDefine.jsp";
}
function onShowBrowser(id,url,linkurl,type1,ismand, scopeid){
spanname = "column_"+scopeid+"_"+id+"span";
inputname = "column_"+scopeid+"_"+id;
if (type1== 2 || type1 == 19){
if (type1 == 2){
onShowADTDate(id);
}else{
onShowTime(spanname,inputname);
}
}else{
if (type1 != 17 && type1 != 18 && type1!=27 && type1!=37 && type1!=56 && type1!=57 && type1!=65 && type1!=4 && type1!=166 && type1!=167 && type1!=164 && type1!=169 && type1!=170&&type1!=161&&type1!=162){
tmpids = jQuery("input[name=column_"+scopeid+"_"+id+"]").val();
id1 = window.showModalDialog(url+"?resourceids="+tmpids);
}else if (type1==4 || type1==167 || type1==164 || type1==169 || type1==170){
tmpids = jQuery("input[name=column_"+scopeid+"_"+id+"]").val();
id1 = window.showModalDialog(url+"?selectedids="+tmpids)
}else if (type1==37){
tmpids = jQuery("input[name=column_"+scopeid+"_"+id+"]").val();
id1 = window.showModalDialog(url+"?documentids="+tmpids)
}else if (type1==161||type1==162){
tmpids = jQuery("input[name=column_"+scopeid+"_"+id+"]").val();
id1 = window.showModalDialog(url+"&selectedids="+tmpids)
}else{
tmpids = jQuery("input[name=column_"+scopeid+"_"+id+"]").val();
id1 = window.showModalDialog(url+"?resourceids="+tmpids)
}
//alert(id1.id+" "+id1.name)
if (id1!=null){
if (type1 == 17 || type1 == 18 || type1==27 || type1==37 || type1==56 || type1==57 || type1==65){
if (id1.id!= "" && id1.id!= "0"){
ids = id1.id.split(",");
names =id1.name.split(",");
sHtml = "";
for( var i=0;i<ids.length;i++){
if(ids[i]!=""){
sHtml = sHtml+"<a href="+linkurl+curid+">"+curname+"</a> ";
}
}
jQuery("#column_"+scopeid+"_"+id+"span").html(sHtml);
}else{
if (ismand==0){
jQuery("#column_"+scopeid+"_"+id+"span").html("");
}else{
jQuery("#column_"+scopeid+"_"+id+"span").html("<img src='/images/BacoError_wev8.gif' align=absmiddle>");
}
jQuery("input[name=column_"+scopeid+"_"+id+"]").val("");
}
}else{
if (id1.id!="" && id1.id!= "0"){
if (linkurl == ""){
jQuery("#column_"+scopeid+"_"+id+"span").html(id1.name);
}else{
jQuery("#column_"+scopeid+"_"+id+"span").html("<a href="+linkurl+id1.id+">"+id1.name+"</a>");
}
jQuery("input[name=column_"+scopeid+"_"+id+"]").val(id1.id);
}else{
if (ismand==0){
jQuery("#column_"+scopeid+"_"+id+"span").html("");
}else{
jQuery("#column_"+scopeid+"_"+id+"span").html("<img src='/images/BacoError_wev8.gif' align=absmiddle>");
}
jQuery("input[name=column_"+scopeid+"_"+id+"]").val("");
}
}
}
}
}