LgcCountTypeEdit.jsp
11.2 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
<%@ page import="weaver.general.Util" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="LedgerComInfo" class="weaver.fna.maintenance.LedgerComInfo" scope="page"/>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="../../js/weaver_wev8.js"></script>
</head>
<%
String id = Util.null2String(request.getParameter("id"));
int msgid = Util.getIntValue(request.getParameter("msgid"),-1);
RecordSet.executeProc("LgcCountType_SelectByID",id);
RecordSet.next();
String typename = RecordSet.getString("typename");
String typedesc = RecordSet.getString("typedesc");
String salesinid = Util.null2String(RecordSet.getString("salesinid"));
String salescostid = Util.null2String(RecordSet.getString("salescostid"));
String salestaxid = Util.null2String(RecordSet.getString("salestaxid"));
String purchasetaxid = Util.null2String(RecordSet.getString("purchasetaxid"));
String stockid = Util.null2String(RecordSet.getString("stockid"));
String stockdiffid = Util.null2String(RecordSet.getString("stockdiffid"));
String producecostid = Util.null2String(RecordSet.getString("producecostid"));
boolean canedit = HrmUserVarify.checkUserRight("LgcCountTypeEdit:Edit", user) ;
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(703,user.getLanguage())+" : "+ Util.toScreen(typename,user.getLanguage());
String needfav ="1";
String needhelp ="";
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<table width=100% height=100% border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td ></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top"><%
if(msgid!=-1){
%>
<DIV>
<font color=red size=2>
<%=SystemEnv.getErrorMsgName(msgid,user.getLanguage())%>
</font>
</DIV>
<%}%>
<FORM style="MARGIN-TOP: 0px" name=frmMain method=post action="LgcCountTypeOperation.jsp">
<input type="hidden" name="operation">
<input type="hidden" name="id" value="<%=id%>">
<div style="display:none">
<% if(canedit) {%>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(86,user.getLanguage())+",javascript:onEdit(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<BUTTON class=btn id=btnSave accessKey=S name=btnSave onclick="onEdit()"><U>S</U>-<%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%></BUTTON>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(199,user.getLanguage())+",javascript:frmMain.reset(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<BUTTON class=btn id=btnClear accessKey=R name=btnClear type=reset><U>R</U>-<%=SystemEnv.getHtmlLabelName(199,user.getLanguage())%></BUTTON>
<% }
if(HrmUserVarify.checkUserRight("LgcCountTypeEdit:Delete", user)){
%>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(91,user.getLanguage())+",javascript:onDelete(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<BUTTON class=btnDelete id=Delete accessKey=D onclick="onDelete()"><U>D</U>-<%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%></BUTTON>
<%
}
if(HrmUserVarify.checkUserRight("LgcCountType:Log", user)){
%>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(83,user.getLanguage())+",javascript:frmMain.myfun1.click(),_top} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<BUTTON class=BtnLog accessKey=L name=button2 id=myfun1 onclick="location='/systeminfo/SysMaintenanceLog.jsp?sqlwhere=where operateitem =47 and relatedid=<%=id%>'"><U>L</U>-<%=SystemEnv.getHtmlLabelName(83,user.getLanguage())%></BUTTON>
<%}
%>
</div> <br>
<TABLE class=ViewForm>
<COLGROUP> <COL width="20%"> <COL width="80%"><TBODY>
<TR class=Title>
<TH colSpan=2>资产类型信息</TH>
</TR>
<TR class=Spacing>
<TD class=Line1 colSpan=2></TD>
</TR>
<TR>
<TD>名称</TD>
<TD Class=Field>
<% if(canedit) { %>
<input class=InputStyle accesskey=Z name=typename size="30" onChange='checkinput("typename","typenameimage")' value="<%=Util.toScreenToEdit(typename,user.getLanguage())%>" maxlength="30">
<span id=typenameimage></span>
<% } else {%>
<%=Util.toScreen(typename,user.getLanguage())%>
<%}%>
</TD>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>说明</td>
<td class=Field>
<% if(canedit) { %>
<textarea class=InputStyle accesskey="Z" name="typedesc" cols="60"><%=Util.toScreenToEdit(typedesc,user.getLanguage())%></textarea>
<% } else {%>
<%=Util.toScreen(typedesc,user.getLanguage())%>
<%}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>销售收入科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser
id=SelectLedger1 onClick='onShowLedger(salesinidspan,salesinid)'></button>
<span class=InputStyle id=salesinidspan>
<% if(!salesinid.equals("") && !salesinid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(salesinid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salesinid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=salesinid type=hidden name=salesinid value="<%=salesinid%>">
<% } else {
if(!salesinid.equals("") && !salesinid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(salesinid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salesinid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>销售成本科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger2 onClick='onShowLedger(salescostidspan,salescostid)'></button>
<span class=InputStyle id=salescostidspan><% if(!salescostid.equals("") && !salescostid.equals("0")) {%><%=LedgerComInfo.getLedgermark(salescostid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salescostid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=salescostid type=hidden name=salescostid value="<%=salescostid%>">
<% } else {
if(!salescostid.equals("") && !salescostid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(salescostid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salescostid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>销项税科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger3 onClick='onShowLedger(salestaxidspan,salestaxid)'></button>
<span class=InputStyle id=salestaxidspan><% if(!salestaxid.equals("") && !salestaxid.equals("0")) {%><%=LedgerComInfo.getLedgermark(salestaxid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salestaxid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=salestaxid type=hidden name=salestaxid value="<%=salestaxid%>">
<% } else {
if(!salestaxid.equals("") && !salestaxid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(salestaxid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(salestaxid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>进项税科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger4 onClick='onShowLedger(purchasetaxidspan,purchasetaxid)'></button>
<span class=InputStyle id=purchasetaxidspan><% if(!purchasetaxid.equals("") && !purchasetaxid.equals("0")) {%><%=LedgerComInfo.getLedgermark(purchasetaxid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(purchasetaxid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=purchasetaxid type=hidden name=purchasetaxid value="<%=purchasetaxid%>">
<% } else {
if(!purchasetaxid.equals("") && !purchasetaxid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(purchasetaxid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(purchasetaxid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>存货核算科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger5 onClick='onShowLedger(stockidspan,stockid)'></button>
<span class=InputStyle id=stockidspan><% if(!stockid.equals("") && !stockid.equals("0")) {%><%=LedgerComInfo.getLedgermark(stockid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(stockid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=stockid type=hidden name=stockid value="<%=stockid%>">
<% } else {
if(!stockid.equals("") && !stockid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(stockid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(stockid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
<TR>
<TD>存货差异科目</TD>
<TD class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger6 onClick='onShowLedger(stockdiffidspan,stockdiffid)'></button>
<span class=InputStyle id=stockdiffidspan><% if(!stockdiffid.equals("") && !stockdiffid.equals("0")) {%><%=LedgerComInfo.getLedgermark(stockdiffid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(stockdiffid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=stockdiffid type=hidden name=stockdiffid value="<%=stockdiffid%>">
<% } else {
if(!stockdiffid.equals("") && !stockdiffid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(stockdiffid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(stockdiffid),user.getLanguage())%>
<%}}%>
</TD>
</TR><tr><td class=Line colspan=2></td></tr>
<tr>
<td>生产成本科目</td>
<td class=Field>
<% if(canedit) { %>
<button class=Browser id=SelectLedger7 onClick='onShowLedger(producecostidspan,producecostid)'></button>
<span class=InputStyle id=producecostidspan><% if(!producecostid.equals("") && !producecostid.equals("0")) {%><%=LedgerComInfo.getLedgermark(producecostid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(producecostid),user.getLanguage())%><%}%></span>
<input class=InputStyle id=producecostid type=hidden name=producecostid value="<%=producecostid%>">
<% } else {
if(!producecostid.equals("") && !producecostid.equals("0")) {%>
<%=LedgerComInfo.getLedgermark(producecostid)%>-<%=Util.toScreen(LedgerComInfo.getLedgername(producecostid),user.getLanguage())%>
<%}}%>
</td>
</TR><tr><td class=Line colspan=2></td></tr>
</TBODY>
</TABLE>
</FORM>
</td>
</tr>
</TABLE>
</td>
<td></td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</table>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<script language="VBS">
sub onShowLedger(spanname, inputname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/fna/maintenance/FnaLedgerBrowser.jsp")
if NOT isempty(id) then
if id(0)<> "" then
spanname.innerHtml = id(1)
inputname.value=id(0)
else
spanname.innerHtml = ""
inputname.value=""
end if
end if
end sub
</script>
<script language=javascript>
function onEdit(){
if(check_form(document.frmMain,'typename')){
document.frmMain.operation.value="edittype";
document.frmMain.submit();
}
}
function onDelete(){
if(confirm("<%=SystemEnv.getHtmlNoteName(7,user.getLanguage())%>")) {
document.frmMain.operation.value="deletetype";
document.frmMain.submit();
}
}
</script>
</BODY>
</HTML>