main.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <%@page import="com.uas.erp.model.Master"%>
  2. <%@page import="com.uas.erp.model.Employee"%>
  3. <%@ page language="java" pageEncoding="utf-8"%>
  4. <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
  5. <%
  6. String path = request.getContextPath();
  7. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  8. Object mobile = session.getAttribute("_mobile");
  9. if("true".equals(mobile))
  10. response.sendRedirect("jsps/mobile/main/index.jsp");
  11. %>
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  13. <html>
  14. <head>
  15. <title><spring:message code="main.title"></spring:message></title>
  16. <link rel="icon" href="<%=basePath %>resource/images/icon_title.png" type="image/x-icon"/>
  17. <link rel="stylesheet" href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" type="text/css"/>
  18. <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/css/TabScrollerMenu.css"/>
  19. <link rel="stylesheet" href="<%=basePath %>resource/css/main.css" type="text/css"/>
  20. <link rel="stylesheet" type="text/css" href="<%=basePath %>resource/ux/css/CheckHeader.css" />
  21. <link rel="stylesheet" href="<%=basePath %>resource/css/tree.css" type="text/css"/>
  22. <link rel="stylesheet" href="<%=basePath %>jsps/oa/doc/resources/css/button.css" type="text/csss"></link>
  23. <script type="text/javascript" src="<%=basePath %>resource/ext/ext-all.js"></script>
  24. <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js?_em=<%=session.getAttribute("em_uu") %>"></script>
  25. <script type="text/javascript" src="<%=basePath %>resource/ux/TabScrollerMenu.js"></script>
  26. <script type="text/javascript" src="<%=basePath %>resource/ux/TabCloseMenu.js"></script>
  27. <script type="text/javascript" src="<%=basePath %>resource/jquery/jquery-1.4.min.js"></script>
  28. <script type="text/javascript" src="<%=basePath%>resource/ux/layout/component/form/ItemSelector.js"></script>
  29. <script type="text/javascript" src="<%=basePath%>resource/ux/layout/component/form/MultiSelect.js"></script>
  30. <script type="text/javascript" src="<%=basePath%>resource/ux/form/MultiSelect.js"></script>
  31. <style type="text/css">
  32. .x-window-header-default-top {
  33. -moz-box-shadow: #ebe7e7 0 1px 0px 0 inset, #ebe7e7 -1px 0 0px 0 inset, #ebe7e7 1px 0 0px 0 inset;
  34. -webkit-box-shadow: #ebe7e7 0 1px 0px 0 inset, #ebe7e7 -1px 0 0px 0 inset, #ebe7e7 1px 0 0px 0 inset;
  35. -o-box-shadow: #ebe7e7 0 1px 0px 0 inset, #ebe7e7 -1px 0 0px 0 inset, #ebe7e7 1px 0 0px 0 inset;
  36. box-shadow: #ebe7e7 0 1px 0px 0 inset, #ebe7e7 -1px 0 0px 0 inset, #ebe7e7 1px 0 0px 0 inset;
  37. }
  38. .main-btn-underline .x-btn-inner{font-size:13px;}
  39. .main-btn-underline-over .x-btn-inner{text-decoration: underline;color: blue;}
  40. .bottom-left{float: left;cursor: pointer;padding-bottom: 6px;margin-left: 3px;text-decoration: none;font-weight:lighter;font-family: "宋体"}
  41. .bottom_right{text-decoration: none;float:right;cursor: pointer;padding-bottom: 4px; margin-left: 1px;font-weight:lighter;color: blue;font-family: "宋体"}
  42. .bottom_right:hover{float:right;color: green;cursor: pointer;text-decoration: underline;}
  43. .float{ width:200px; padding:5px 10px; border:1px solid #ffecb0; font-size:12px; background-color:#fffee0; -moz-box-shadow:1px 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:1px 1px 2px rgba(0,0,0,.2); box-shadow:1px 1px 2px rgba(0,0,0,.2); position:absolute; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; }
  44. .float .close-ico{ position:absolute; top:5px; right:5px; display:block; width:16px; height:16px; background-image:url(../resource/images/cup.gif); text-indent:-900px; overflow:hidden; }
  45. .float .close-ico:hover{ background-position:0 -16px;}
  46. .float p{ line-height:22px}
  47. .x-panel-body-default {
  48. background: #f1f2f5;
  49. border: none !important;
  50. }
  51. .searchMenu{
  52. position:absolute;top:110;left:180;width:auto;height:auto;z-index:4;visibility:hidden;border: 1;background-color: BECEBE;
  53. border:1px solid #ffecb0; -moz-box-shadow:1px 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:1px 1px 2px rgba(0,0,0,.2); box-shadow:1px 1px 2px rgba(0,0,0,.2); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;
  54. }
  55. .menuDiv{
  56. position:absolute;width:auto;height:auto;z-index:4;visibility:hidden;border: 1;background-color: #dedede;
  57. border:1px; -moz-box-shadow:1px 1px 2px rgba(0,0,0,.2); -webkit-box-shadow:1px 1px 2px rgba(0,0,0,.2); box-shadow:1px 1px 2px rgba(0,0,0,.2); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;
  58. }
  59. .menuDiv a{
  60. text-decoration: none;
  61. }
  62. .menuDiv a:hover{
  63. color: black;
  64. font-weight: bold;
  65. }
  66. .main-btn-left {
  67. border: none;
  68. float: left;
  69. font-size: 13px;
  70. }
  71. .main-btn-right {
  72. border: none;
  73. float: right;
  74. font-size: 13px;
  75. }
  76. .main-btn-left a:hover,.main-btn-right font:hover{
  77. text-decoration: underline;
  78. }
  79. .menuitem-lock{
  80. background: url('<%=basePath %>resource/images/icon/lock.png') no-repeat center center;
  81. }
  82. .main-btn-user {
  83. background-image: url('<%=basePath %>resource/images/wishmaster.gif');
  84. }
  85. .main-btn-link {
  86. background-image: url('<%=basePath %>resource/images/ie.png');
  87. }
  88. .main-btn-msg {
  89. background-image: url('<%=basePath %>resource/images/mainpage/message.gif');
  90. }
  91. #myinfo{
  92. font-size: 13px;
  93. display: none;
  94. }
  95. #myinfo font,input{
  96. font-size: 13px;
  97. }
  98. .label{
  99. width: 45px;
  100. font-family: 隶书;
  101. color: blue;
  102. }
  103. #myinfo input{
  104. border: none;
  105. width: 100px;
  106. }
  107. #phones {
  108. background-color: #fff;
  109. text-shadow: #fff 0 1px 0;
  110. position: relative;
  111. display: block;
  112. height: auto;
  113. }
  114. #phones div.phone img {
  115. margin-bottom: 1px;
  116. }
  117. #phones div.phone {
  118. float: left;
  119. padding: 1px 1px;
  120. margin: 0px;
  121. text-align: center;
  122. line-height: 14px;
  123. color: #333;
  124. font-size: 10px;
  125. font-family: "Helvetica Neue",sans-serif;
  126. height: 130px;
  127. width: 140px;
  128. overflow: hidden;
  129. border: 1px solid gray;
  130. cursor: pointer;
  131. }
  132. .x-ie6 #phones div.phone,
  133. .x-ie7 #phones div.phone,
  134. .x-ie8 #phones div.phone {
  135. border-top: none;
  136. padding: 3px 2px;
  137. margin: 2px;
  138. }
  139. #phones div.phone-hover {
  140. background-color: #eee;
  141. }
  142. #phones div{
  143. background-color: #D3E1F1 !important;
  144. }
  145. #phones div:hover{
  146. background-color: #D6B1F1 !important;
  147. }
  148. #phones .x-item-selected {
  149. background-color: #D6B1F1 !important;
  150. }
  151. #phones div.phone strong {
  152. color: #000;
  153. display: block;
  154. }
  155. #phones div.phone span {
  156. color: #999;
  157. }
  158. .process-lazy {
  159. color: red;
  160. }
  161. </style>
  162. <script type="text/javascript">
  163. Ext.Loader.setConfig({
  164. enabled: true
  165. });//开启动态加载
  166. Ext.application({
  167. name: 'erp',//为应用程序起一个名字,相当于命名空间
  168. appFolder: basePath+'app',//app文件夹所在路径
  169. controllers: [//声明所用到的控制层
  170. 'common.Main'
  171. ],
  172. launch: function() {
  173. Ext.create('erp.view.common.main.Viewport');
  174. }
  175. });
  176. var username = '<%=session.getAttribute("username")%>';
  177. var em_name = '<%=session.getAttribute("em_name")%>';
  178. var em_uu = '<%=session.getAttribute("em_uu")%>';
  179. var en_uu = '<%=session.getAttribute("en_uu")%>';
  180. var em_code = '<%=session.getAttribute("em_code")%>';
  181. var en_email ='<%=session.getAttribute("en_email")%>';
  182. var em_type = '<%=session.getAttribute("em_type")%>';
  183. var em_id ='<%=session.getAttribute("em_id")%>';
  184. var hascheckInitpwd ='<%=session.getAttribute("hascheckInitpwd")%>';
  185. function selectAll(){
  186. if($("#selectAll").attr("checked") == true){
  187. $(":checkbox").attr("checked","checked");
  188. }else{
  189. $(":checkbox").attr("checked","");
  190. }
  191. }
  192. function getSearchKeys(){
  193. var sf = Ext.getCmp('searchField');
  194. sf.setValue('');
  195. var condition = '';
  196. $.each($("input:checked"),function(){
  197. if(this.id != "selectAll"){
  198. if(this.name != "condition"){
  199. if(sf.value == '' || sf.value == null || sf.value == '快速查找'){
  200. sf.setValue($(this).next().text());
  201. } else if(! contains(sf.value, $(this).next().text(), true)){
  202. sf.setValue(sf.value + ';' + $(this).next().text());
  203. }
  204. } else {
  205. condition = this.value;
  206. }
  207. }
  208. });
  209. if(condition == 'and'){
  210. sf.setValue(sf.value.replace(/;/g, '&&'));
  211. } else {
  212. sf.setValue(sf.value.replace(/;/g, '##'));
  213. }
  214. $('#searchMenu').hide();
  215. sf.onTriggerClick(sf.value);
  216. }
  217. function deleteFromCookie(id, value){
  218. $("#"+id).remove();
  219. var searchKeys = Ext.util.Cookies.get('searchKeys');
  220. if(contains(searchKeys, '||' + value + '||')){
  221. searchKeys = searchKeys.replace('||' + value, '');
  222. } else if(contains(searchKeys, value + '||')){
  223. searchKeys = searchKeys.replace(value + '||', '');
  224. } else if(contains(searchKeys, '||' + value)){
  225. searchKeys = searchKeys.replace('||' + value, '');
  226. }
  227. Ext.util.Cookies.set('searchKeys', searchKeys);
  228. }
  229. function logout(){
  230. Ext.Msg.confirm('温馨提示',"确定退出吗?",
  231. ok);
  232. function ok(btn){
  233. if(btn == 'yes'){
  234. Ext.Ajax.request({
  235. url: basePath + "common/logout.action",
  236. method: 'GET',
  237. callback: function(opt, s, r) {
  238. document.location.href = basePath + "?_page=logout";
  239. }
  240. });
  241. } else {
  242. return;
  243. }
  244. };
  245. }
  246. function main_relogin(){
  247. showLoginDiv();
  248. }
  249. window.onload = function() {
  250. //禁用右键菜单
  251. Ext.getDoc().on("contextmenu", function(e){
  252. //e.stopEvent();
  253. });
  254. SetCookie('em_name', em_name);
  255. SetCookie('em_uu', em_uu);
  256. SetCookie('en_name', en_name);
  257. SetCookie('en_uu', en_uu);
  258. SetCookie('em_code', em_code);
  259. };
  260. </script>
  261. </head>
  262. <body>
  263. <textarea id="textarea_text" style="position:absolute;left:-1000px"></textarea>
  264. <script type="text/javascript" src="<%=basePath %>resource/ux/CheckColumn.js"></script>
  265. </body>
  266. <script>
  267. <%
  268. Object obj = session.getAttribute("employee");
  269. String sob = "";
  270. String sobText = "";
  271. String password="";
  272. if(obj != null) {
  273. Employee employee = (Employee)obj;
  274. sob = employee.getEm_master();
  275. sob = employee.getEm_master();
  276. Master master = employee.getCurrentMaster();
  277. password = employee.getEm_password();
  278. if(master != null)
  279. sobText = master.getMa_function();
  280. }
  281. Object is_saas = session.getAttribute("isSaas");
  282. boolean isSaas = is_saas != null && Boolean.valueOf(is_saas.toString());
  283. %>
  284. var sob = '<%=sob%>';
  285. var sobText = '<%=sobText%>';
  286. var isSaas = <%=isSaas%>;
  287. </script>
  288. </html>