asset_type_list.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.web.*"%>
  5. <%@ page import = "cn.js.fan.util.*"%>
  6. <%@ page import = "com.redmoon.oa.asset.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>资产类别管理</title>
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. <%@ include file="../inc/nocache.jsp"%>
  14. <script language="JavaScript" type="text/JavaScript">
  15. <!--
  16. function openWin(url,width,height)
  17. {
  18.   var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=150,left=220,width="+width+",height="+height);
  19. }
  20. //-->
  21. </script>
  22. <style type="text/css">
  23. <!--
  24. .style2 {font-size: 14px}
  25. .STYLE3 {color: #FFFFFF}
  26. .STYLE5 {color: #FF0000}
  27. .STYLE6 {color: #000000}
  28. -->
  29. </style>
  30. </head>
  31. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  32. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  33. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  34. <%
  35. String priv="oa.asset";
  36. if (!privilege.isUserPrivValid(request, priv)) {
  37. out.println(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
  38. return;
  39. }
  40. String op = ParamUtil.get(request, "op");
  41. if (op.equals("del")) {
  42. AssetTypeMgr atm = new AssetTypeMgr();
  43. boolean re = false;
  44. try {
  45. re = atm.del(request);
  46. }
  47. catch (ErrMsgException e) {
  48. out.print(StrUtil.Alert(e.getMessage()));
  49. }
  50. if (re)
  51. out.print(StrUtil.Alert("操作成功!"));
  52. }
  53. %>
  54. <%@ include file="asset_inc_menu_top.jsp"%>
  55. <br>
  56. <table width="89%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC" class="tableframe">
  57.   <tr bgcolor="#00CCFF">
  58.     <td align="center" bgcolor="#BBF1FF" class="right-title">资产类别名称</span></td>
  59.     <td align="center" bgcolor="#BBF1FF" class="right-title">净残值率</td>
  60.     <td align="center" bgcolor="#BBF1FF" class="right-title">折旧年限</td>
  61.     <td align="center" bgcolor="#BBF1FF" class="right-title">备 注</td>
  62.     <td width="12%" align="center" bgcolor="#BBF1FF" class="right-title">操 作</td>
  63.   </tr>
  64.   <%
  65.   AssetTypeDb atd = new AssetTypeDb();
  66.   String sql = "select id from asset_type_info";
  67.   Iterator ir = atd.list(sql).iterator();
  68.   while (ir.hasNext()) {
  69. atd = (AssetTypeDb)ir.next();
  70.     %>
  71.   <tr>
  72.     <td width="30%" bgcolor="#FFFFFF"><a href="#" class="STYLE2" onClick="window.open('asset_type_edit.jsp?id=<%=atd.getId()%>','','height=170, width=494, top=200,left=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no,status=no')"><%=atd.getName()%></a></td>
  73.     <td width="18%" bgcolor="#FFFFFF"><%=atd.getDepreciationRate()%></td>
  74.     <td width="18%" bgcolor="#FFFFFF"><%=atd.getDepreciationYears()%></td>
  75.     <td width="22%" bgcolor="#FFFFFF"><% 
  76. String abstracts = "";
  77. if (atd.getAbstracts() == null)
  78.        abstracts = "";
  79. else    
  80.        abstracts = atd.getAbstracts();
  81. %>
  82.     <%=abstracts%> </td>
  83.     <td align="center" bgcolor="#FFFFFF"><a href="#" onClick="if (confirm('您确定要删除<%=atd.getName()%>吗?')) window.location.href='?op=del&id=<%=atd.getId()%>'">删除</a></td>
  84.   </tr>
  85.   <%}%>
  86. </table>
  87. <p align="center"><input type="button" class="button1" onClick="openWin('asset_type_add.jsp?id=<%=atd.getId()%>',494,170)" value="添加类别">
  88. </p>
  89. </td>
  90. </tr>
  91. <tr> 
  92.     <td height="9">&nbsp;</td>
  93. </tr>
  94. <br>
  95. <br>
  96. </body>
  97. </html>