main.jsp 8.9 KB

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