CptCapitalOther.jsp
7.79 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
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="CapitalComInfo" class="weaver.cpt.capital.CapitalComInfo" scope="page"/>
<%
if(!HrmUserVarify.checkUserRight("CptCapital:Other", user)){
response.sendRedirect("/notice/noright.jsp");
return;
}
int msgid = Util.getIntValue(request.getParameter("msgid"),-1);
String capitalid = request.getParameter("capitalid");
String sptcount = request.getParameter("sptcount");
%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="../../js/weaver_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdHRMCard_wev8.gif";
String titlename = Util.toScreen(CapitalComInfo.getCapitalname(capitalid),user.getLanguage());
String needfav ="1";
String needhelp ="";
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%
/*资产数量超出库存数*/
if(msgid!=-1){
%>
<DIV>
<font color=red size=2>
<%=SystemEnv.getHtmlLabelName(1405,user.getLanguage())%>
</font>
</DIV>
<%}%>
<FORM id=weaver name=frmain method=post onSubmit="onSubmit()">
<DIV class=HdrProps></DIV>
<BUTTON type='button' class=btnSave accessKey=S onclick="onSubmit()"><U>S</U>-<%=SystemEnv.getHtmlLabelName(811,user.getLanguage())%></BUTTON>
<BUTTON type='button' class=btn accessKey=B onclick='window.history.back(-1)'><U>B</U>-<%=SystemEnv.getHtmlLabelName(1390,user.getLanguage())%></BUTTON>
<TABLE class=form>
<COLGROUP> <COL width="15%"> <COL width="85%"> <TBODY>
<%if(!sptcount.equals("1")) { %>
<tr>
<td><%=SystemEnv.getHtmlLabelName(1331,user.getLanguage())%></td>
<td class=Field>
<input class=saveHistory
maxlength=10 size=10 name="capitalnum" onKeyPress="ItemCount_KeyPress()" onBlur='checknumber("capitalnum");checkinput("capitalnum","capitalnumimage")'>
<span id=capitalnumimage><IMG src="/images/BacoError_wev8.gif" align=absMiddle></span>
</td>
</tr>
<%}%>
<tr>
<td><%=SystemEnv.getHtmlLabelName(97,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Calendar id=selectotherdate onClick="getotherDate()"></button>
<span id=otherdatespan ><IMG src="/images/BacoError_wev8.gif" align=absMiddle></span>
<input type="hidden" name="otherdate">
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(124,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Browser id=SelectDeparment onClick="onShowDepartment()"></button>
<span class=saveHistory id=departmentspan><img src="/images/BacoError_wev8.gif"
align=absMiddle></span>
<input id=departmentid type=hidden name=departmentid>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(425,user.getLanguage())%><%=SystemEnv.getHtmlLabelName(426,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Browser id=SelectCostCenter onClick="onShowCostCenter()"></button>
<span class=saveHistory id=costcenterspan><img src="/images/BacoError_wev8.gif"
align=absMiddle></span>
<input id=costcenterid type=hidden name=costcenterid>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(602,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Browser id=SelectStateID onClick="onShowStateID()"></button>
<span id=stateidspan><img src="/images/BacoError_wev8.gif" align=absMiddle></span>
<input class=saveHistory id=stateid type=hidden name=stateid>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(179,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Browser id=SelectResourceID onClick="onShowResourceID()"></button>
<span
id=resourceidspan></span>
<input class=saveHistory id=resourceid type=hidden name=resourceid>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(259,user.getLanguage())%></td>
<td class=Field><BUTTON type='button' class=Browser id=SelectUseRequest onClick="onShowUseRequest()"></button>
<span
id=userequestspan></span>
<input class=saveHistory id=userequest type=hidden name=userequest>
</td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(1387,user.getLanguage())%></td>
<td class=Field>
<input type=text size=60 maxlength=100 name="location" onChange='checkinput("location","locationimage")'>
<span id=locationimage><img src="/images/BacoError_wev8.gif" align=absMiddle></span></td>
</tr>
<tr>
<td><%=SystemEnv.getHtmlLabelName(454,user.getLanguage())%></td>
<td class=Field colspan=2>
<textarea class="saveHistory" style="width:100%" name=remark rows="6"></textarea>
</td>
</tr>
<input type="hidden" name=capitalid value=<%=capitalid%>>
<input type="hidden" name=sptcount value=<%=sptcount%>>
</TBODY>
</TABLE>
</form>
<script language=vbs>
sub onShowDepartment()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp?selectedids="&frmain.departmentid.value)
issame = false
if (Not IsEmpty(id)) then
if id(0)<> 0 then
if id(0) = frmain.departmentid.value then
issame = true
end if
departmentspan.innerHtml = id(1)
frmain.departmentid.value=id(0)
else
departmentspan.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
frmain.departmentid.value=""
end if
if issame = false then
costcenterspan.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
frmain.costcenterid.value=""
end if
end if
end sub
sub onShowCostCenter()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/company/CostcenterBrowser.jsp?sqlwhere= where departmentid="&frmain.departmentid.value)
if (Not IsEmpty(id)) then
if id(0)<> 0 then
costcenterspan.innerHtml = id(1)
frmain.costcenterid.value=id(0)
else
costcenterspan.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
frmain.costcenterid.value=""
end if
end if
end sub
sub onShowUseRequest()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/workflow/request/RequestBrowser.jsp?isrequest=1")
if (Not IsEmpty(id)) then
if id(0)<> "" then
userequestspan.innerHtml = id(1)
frmain.userequest.value=id(0)
else
userequestspan.innerHtml = ""
frmain.userequest.value=""
end if
end if
end sub
sub onShowResourceID()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp")
if (Not IsEmpty(id)) then
if id(0)<> "" then
resourceidspan.innerHtml = "<A href='/hrm/resource/HrmResource.jsp?id="&id(0)&"'>"&id(1)&"</A>"
frmain.resourceid.value=id(0)
else
resourceidspan.innerHtml = ""
frmain.resourceid.value=""
end if
end if
end sub
sub onShowStateID()
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/cpt/maintenance/CapitalStateBrowser.jsp?from=other")
if (Not IsEmpty(id)) then
if id(0)<> 0 then
stateidspan.innerHtml = id(1)
frmain.stateid.value=id(0)
else
stateidspan.innerHtml = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>"
frmain.stateid.value=""
end if
end if
end sub
</script>
<script language="javascript">
function onSubmit(){
if(check_form(document.frmain,'<%if(!sptcount.equals("1")) {%>capitalnum,<%}%>stateid,otherdate,location,departmentid,costcenterid')){
<%if(!sptcount.equals("1")) {%>
if(document.frmain.capitalnum.value<=0){
alert("<%=SystemEnv.getHtmlLabelName(15303,user.getLanguage())%>");
return;
}
<%}%>
document.frmain.action="CapitalOtherOperation.jsp"
document.frmain.submit();
}
}
</script>
</BODY>
<SCRIPT language="javascript" defer="defer" src="/js/datetime_wev8.js"></script>
<SCRIPT language="javascript" defer="defer" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</HTML>