multiform.jsp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <%@ page language="java" contentType="text/html; charset=utf-8"
  2. pageEncoding="utf-8"%>
  3. <%
  4. request.setCharacterEncoding("utf-8");
  5. String path = request.getContextPath();
  6. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  7. %>
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"></link>
  13. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"></link>
  14. <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/ux/css/CheckHeader.css" />
  15. <style>
  16. .deleted .x-grid-cell{
  17. font-style: italic;
  18. color: gray;
  19. text-decoration: line-through;
  20. }
  21. </style>
  22. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  23. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
  24. <script type="text/javascript" src="<%=basePath %>resource/ux/CheckColumn.js"></script>
  25. <script type="text/javascript">
  26. Ext.Loader.setConfig({
  27. enabled: true
  28. });//开启动态加载
  29. Ext.application({
  30. name: 'erp',//为应用程序起一个名字,相当于命名空间
  31. appFolder: basePath+'app',//app文件夹所在路径
  32. controllers: [//声明所用到的控制层
  33. 'oa.custom.MultiForm'
  34. ],
  35. launch: function() {
  36. Ext.create('erp.view.oa.custom.MultiForm');//创建视图
  37. }
  38. });
  39. var caller = "Form!Custom";
  40. var whoami = getUrlParam('whoami');
  41. var dbfinds = [];
  42. var formCondition = '';
  43. var gridCondition = '';
  44. function Delete(){
  45. var grid=Ext.getCmp('dbgrid');
  46. var lastselected=grid.getSelectionModel().getLastSelected();
  47. grid.getStore().remove(lastselected);
  48. }
  49. function DeleteGrid(){
  50. var grid=Ext.getCmp('dbGridgrid');
  51. var lastselected=grid.getSelectionModel().getLastSelected();
  52. var id=lastselected.data.ds_id;
  53. if(id!=null){
  54. //存在ID 则后台删除
  55. Ext.Ajax.request({
  56. url : basePath + 'common/deleteDbFindSetGrid.action',
  57. params : {
  58. id:id,
  59. },
  60. method : 'post',
  61. callback : function(options,success,response){
  62. var res=new Ext.decode(response.responseText);
  63. if(res.exceptionInfo != null){
  64. showError(res.exceptionInfo);return;
  65. }
  66. if(res.success){
  67. Ext.Msg.alert('提示','删除成功!');
  68. }
  69. }
  70. });
  71. }
  72. grid.getStore().remove(lastselected);
  73. }
  74. </script>
  75. </head>
  76. <body >
  77. </body>
  78. </html>