| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- <%@ page language="java" contentType="text/html; charset=utf-8"
- pageEncoding="utf-8"%>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" type="text/css"
- href="<%=basePath %>resource/ext/resources/css/ext-all-gray.css" />
- <link rel="stylesheet" href="<%=basePath %>resource/css/main.css"
- type="text/css"></link>
- <style type="text/css">
- .lock {
- background: url('../../resource/images/16/lock.png') center center no-repeat;
- }
- .lockopen {
- background: url('../../resource/images/16/lock_open.png') center center no-repeat no-repeat;
- }
- font {
- font-size: 14px;
- }
- ul li a {
- font-size: 13.5px;
- text-decoration: none;
- }
- .x-panel-body-default {
- background: #f1f2f5;
- border-left: none !important;
- border-top: none !important;
- border-bottom: none !important;
- }
- .bench {
- background: url('<%=basePath %>resource/images/background_1.jpg');
- }
- .mydiv {
- height: 100%;
- background: #f1f1f1;
- }
- .home-div {
- height: 100%;
- background: url('<%=basePath %>resource/images/background_2.jpg');
- }
- .home-img {
- cursor: pointer;
- }
- .home-img:hover {
- background: url('<%=basePath %>resource/images/background_2.jpg');
- }
- .home-img span {
- font-size: 1;
- color: red;
- }
- .news,.notify {
- height: 100%;
- background: url('<%=basePath %>resource/images/background_1.jpg');
- }
- #bench_news,#bench_notify {
- width: 100%;
- }
- .schedule {
- background: url('<%=basePath %>resource/images/background_1.jpg');
- }
- .news ul {
- list-style: none;
- }
- .div-more a {
- color: #CD9B9B;
- }
- .subscription {
- height: 100%;
- background: url('<%=basePath %>resource/images/background_1.jpg');
- }
- .div-link {
- padding-left: 10px;
- margin-top: 3px;
- }
- a:hover {
- color: #8B8B00;
- }
- .btn-title {
- font-size: 13px;
- color: blue;
- margin-bottom: 0px;
- }
- .btn-title:hover {
- color: red;
- }
- .news-img {
- cursor: pointer;
- margin-left: 5px;
- }
- .news-img:hover {
- background: transparent;
- background-color: #D6BEF9;
- height: 38px;
- width: 38px;
- }
- .div-left {
- display: inline;
- float: left;
- color: green
- }
- .div-right {
- display: inline;
- float: right;
- font-family: sans-serif;
- }
- .div-right a {
- color: blue;
- text-decoration: none;
- font-size: 13px;
- }
- .div-right a:hover {
- color: red;
- cursor: pointer;
- font-weight: bold;
- }
- .div-left font {
- float: left;
- color: green;
- font-size: 13px;
- display: inline;
- }
- .x-panel-header-text {
- font-size: 13px;
- color: #09a471;
- font-weight: normal;
- }
- .x-panel-header-text-default-framed {
- font-size: 13px;
- color: #09a471;
- font-weight: normal;
- }
- #bench .x-panel-header .x-box-inner .x-box-item {
- display: inline;
- height: 18px;
- }
- .number {
- height: 24px;
- width: 24px;
- background: url('<%=basePath %>resource/images/number/number.png');
- margin-top: -30px;
- }
- .custom-grid .x-grid-row .x-grid-row-alt {
- height: 20px;
- }
- .custom-grid .x-grid-row .x-grid-cell {
- height: 20px;
- line-height: 20px;
- vertical-align: top;
- }
- .custom-grid .x-grid-row .x-grid-cell-inner {
- height: 20px;
- line-height: 20px;
- vertical-align: top;
- }
- .custom-grid .x-grid-row .x-grid-cell:hover {
- height: 26px;
- line-height: 26px;
- }
- .custom-grid a {
- text-decoration: none;
- }
- .custom-grid a:hover {
- font-weight: 800;
- }
- .custom-grid .x-action-col-icon {
- margin: 0px 5px 0px 5px;
- cursor: pointer;
- }
- .task-grid .x-grid-row .x-grid-row-alt {
- background-color: red !important;
- }
- .x-grid-cell-topic b {
- display: block;
- }
- .x-grid-cell-topic .x-grid-cell-inner {
- white-space: normal;
- height: auto !important;
- background-color:#FAFAFA;
- border-color: #ededed;
- border-style: solid;
- border-width: 1px 0;
- border-top-color: #F5F5F5;
- border-bottom: none;
- line-height: 26 px;
- white-space: nowrap
- }
- .x-grid-cell-topic1 .x-grid-cell-inner {
- white-space: normal;
- height: auto !important;
- background-color:#FAFAFA;
- border-color: #ededed;
- border-style: solid;
- border-width: 1px 0;
- border-top-color: #F5F5F5;
- border-bottom: none;
- line-height: 26 px;
- white-space: nowrap
- }
- .x-grid-cell-topic a {
- text-decoration: none;
- }
- .x-grid-cell-topic a:hover {
- text-decoration: underline;
- }
- .x-grid-cell-topic .x-grid-cell-innerf {
- padding: 5px;
- }
- .list-default>li {
- padding: 2px 5px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .custom-framed{
- padding:0px 0px 5px 0px;
- }
- .more-tool .x-tool-more {
- width: 47px;
- height: 16px;
- background-image: url('<%=basePath %>resource/images/mainpage/more.gif');
- }
- .x-grid-header-simple{
- border:none!important
- }
- .set-tool .x-tool-set {
- width: 16px;
- height: 16px;
- margin-right:5px;
- background-image: url('<%=basePath %>resource/images/mainpage/setting.png');
- }
- #app-header {
- color: #596F8F;
- font-size: 22px;
- font-weight: 200;
- padding: 8px 15px;
- text-shadow: 0 1px 0 #fff;
- }
- #app-msg {
- background: #D1DDEF;
- border: 1px solid #ACC3E4;
- padding: 3px 15px;
- font-weight: bold;
- font-size: 13px;
- position: absolute;
- right: 0;
- top: 0;
- }
- .x-panel-ghost {
- z-index: 1;
- }
- .x-border-layout-ct {
- background: #DFE8F6;
- }
- .x-portal-body {
- padding: 0 0 0 8px;
- overflow-y:auto;
- overflow-x:hidden !important;
- }
- .x-portal .x-portal-column {
- padding: 8px 8px 0 0;
- }
- .x-portal .x-panel-dd-spacer {
- border: 2px dashed #99bbe8;
- background: #f6f6f6;
- border-radius: 4px;
- -moz-border-radius: 4px;
- margin-bottom: 10px;
- }
- .x-portlet {
- margin-bottom:10px;
- padding: 1px;
- border-width: 1px;
- border-style: solid;
- }
- .x-portlet .x-panel-body {
- background: #fff;
- }
- .portlet-content {
- padding: 10px;
- font-size: 11px;
- }
- #app-options .portlet-content {
- padding: 5px;
- font-size: 12px;
- }
- .settings {
- background-image:url(../shared/icons/fam/folder_wrench.png);
- }
- .nav {
- background-image:url(../shared/icons/fam/folder_go.png);
- }
- .info {
- background-image:url(../shared/icons/fam/information.png);
- }
- .x-grid-cell-topic b {
- display: block;
- }
- .x-grid-cell-topic .x-grid-cell-inner {
- white-space: normal;
- }
- .x-grid-row .x-grid-cell a {
- // color: #385F95;
- text-decoration: none;
- }
- .x-grid-row .x-grid-cell a:hover {
- text-decoration: none;
- }
- .x-grid-cell-topic .x-grid-cell-innerf {
- padding: 5px;
- }
- .x-grid-row .x-grid-cell{
- background-color:#FAFAFA!important;
- }
- </style>
- <script type="text/javascript"
- src="<%=basePath %>resource/ext/ext-all.js"></script>
- <script type="text/javascript" src="<%=basePath %>resource/ux/PreviewPlugin.js"></script>
- <script type="text/javascript" src="<%=basePath %>resource/i18n/i18n.js"></script>
- <script type="text/javascript">
- var hasReminded ='<%=session.getAttribute("hasReminded")%>';
- var WHeight=window.innerHeight;
- Ext.Loader.setConfig({
- enabled: true
- });//开启动态加载
- Ext.application({
- name: 'erp',//为应用程序起一个名字,相当于命名空间
- appFolder: basePath+'app',//app文件夹所在路径
- controllers: [//声明所用到的控制层
- 'common.DeskTop'
- ],
- launch: function() {
- Ext.create('erp.view.common.DeskTop.ViewPort');
- }
- });
- var em_id ='<%=session.getAttribute("em_id")%>';
- function openTable(id, caller, title, link, key, detailKey, condition,relateMaster,limit){
-
- var main = parent.Ext.getCmp("content-panel");
- var item=main.items.items[0];
- var panel = Ext.getCmp('' + id);
- var url = parseUrl(link);
- if(id){
- if(caller){
- panel = Ext.getCmp(caller + id);
- if(url.indexOf('?')>0) {
- url = link + '&whoami=' + caller;
- }
- else url = link + '?whoami=' + caller;
- url = url + '&formCondition=' + key + '=' + id + '&gridCondition=' + detailKey + '=' + id;
- }
- } else {
- if(condition != null){
- url += '&urlcondition=' + parseUrl(condition);
- }
- }
- if(!limit){
- if(url.indexOf('?') > 0)
- url += '&_noc=1';
- else
- url += '?_noc=1';
- }
- if(relateMaster && relateMaster!='null'){
- url+='&newMaster='+relateMaster;
- }
- if( relateMaster && relateMaster!='null' ){
- var currentMaster = parent.window.sob;
- if ( currentMaster/* && currentMaster != relateMaster */) {// 无论账套是否一致都创建临时会话
- if (parent.Ext) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: relateMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- url+='&_center=1';
- var win = parent.Ext.create('Ext.Window', {
- width: '100%',
- height: '100%',
- draggable: false,
- closable: false,
- modal: true,
- title: '创建到账套' + relateMaster + '的临时会话',
- id:'modalwindow',
- historyMaster:currentMaster,
- relateMaster:currentMaster,
- html : '<iframe src="' + url + '" height="100%" width="100%" frameborder="0" style="border-width: 0px;padding: 0px;" scrolling="auto"></iframe>',
- buttonAlign: 'center',
- buttons: [{
- text: $I18N.common.button.erpCloseButton,
- cls: 'x-btn-blue',
- id: 'close',
- handler: function(b) {
- Ext.Ajax.request({
- url: basePath + 'common/changeMaster.action',
- params: {
- to: currentMaster
- },
- callback: function(opt, s, r) {
- if (s) {
- b.up('window').close();
- } else {
- alert('切换到原账套失败!');
- }
- }
- });
- }
- }]
- });
- win.show();
- } else {
- alert('无法创建到账套' + relateMaster + '的临时会话!');
- }
- }
- });
- }
- return;
- }
- }
- if(!panel){
- panel = {
- title : title.substring(0, title.toString().length > 5 ? 5 : title.toString().length),
- tag : 'iframe',
- tabConfig:{tooltip: title},
- border : false,
- layout : 'fit',
- iconCls : 'x-tree-icon-tab-tab',
- html : '<iframe id="iframe" src="' + basePath + url + '" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>',
- closable : true,
- listeners : {
- close : function(){
- main.setActiveTab(main.getActiveTab().id);
- }
- }
- };
- openTab(panel, panel.id);
- }else{
- main.setActiveTab(panel);
- }
- }
- function parseUrl(url) {
- var id = url.substring(url.lastIndexOf('?')+1);
- if (id == null) {
- id = url.substring(0,url.lastIndexOf('.'));
- }
- if(contains(url, 'session:em_uu', true)){
- url = url.replace(/session:em_uu/,em_uu);
- }
- if(contains(url, 'session:em_code', true)){
- url = url.replace(/session:em_code/, "'" + em_code + "'");
- }
- if(contains(url, 'sysdate', true)){
- url = url.replace(/sysdate/, "to_date('" + Ext.Date.toString(new Date()) + "','yyyy-mm-dd')");
- }
- if(contains(url, 'session:em_name', true)){
- url = url.replace(/session:em_name/,"'"+em_name+"'" );
- }
- if(contains(url, 'session:em_id', true)){
- url = url.replace(/session:em_id/,"'"+em_id+"'" );
- }
- return url;
- }
- function openTab(panel, id){
- var o = (typeof panel == "string" ? panel : id || panel.id);
- var main = parent.Ext.getCmp("content-panel");
- var tab = main.getComponent(o);
- if (tab) {
- main.setActiveTab(tab);
- } else if(typeof panel!="string"){
- panel.id = o;
- var p = main.add(panel);
- main.setActiveTab(p);
- }
- }
- function showWin(numId,mainId,insId,title,id){
- var url='common/charts/mobileCharts.action?numId='+numId+'&mainId='+mainId+'&insId='+insId+'&title='+title;
- if (Ext.getCmp('chwin')) {
- Ext.getCmp('chwin').setTitle(title);
- Ext.getCmp('chwin').insId=insId;
- Ext.getCmp('chwin').body.update('<iframe id="iframech" src="'+basePath+url+'" height="100%" width="100%" frameborder="0" scrolling="auto" ></iframe>');
- }
- else {var chwin = new Ext.window.Window({
- id : 'chwin',
- title: title,
- height: "100%",
- width: "80%",
- insId:insId,
- //maximizable : true,
- resizable:false,
- modal:true,
- buttonAlign : 'center',
- layout : 'anchor',
- items: [{
- tag : 'iframe',
- frame : true,
- anchor : '100% 100%',
- layout : 'fit',
- html : '<iframe id="iframech" src="'+basePath+url+'" height="100%" width="100%" frameborder="0" scrolling="auto" ></iframe>'
- }],
- buttons : [{
- text : '上一条',
- cls: 'x-btn-gray',
- handler : function(btn){
- prev(btn,id,btn.ownerCt.ownerCt.insId);
- }
- },{
- text : '下一条',
- cls: 'x-btn-gray',
- handler : function(btn){
- next(btn,id,btn.ownerCt.ownerCt.insId);
- }
- },{
- text : '关 闭',
- iconCls: 'x-button-icon-close',
- cls: 'x-btn-gray',
- handler : function(){
- Ext.getCmp('chwin').close();
- var panelObj = Ext.getCmp("detailPanel");
- panelObj.getStore().load();
-
- }
-
- }]
- });
- chwin.on('close',function(btn){
- var panelObj = Ext.getCmp("detailPanel");
- if(panelObj){
- panelObj.getStore().load();
- }
- });
-
- chwin.show();}}
- function prev(btn,tabId,insId,index){
- //递归查找下一条,并取到数据
- var grid=Ext.getCmp(tabId);
- var record =index?grid.store.getAt(index):grid.store.findRecord('ID_', insId, 0, false, false, true);
- var fIndex=index||record.index;
- if(fIndex-1 >=0){
- var d = grid.store.getAt(fIndex - 1);
- if(d){
- if(d.data['ID_']==insId){
- prev(btn,tabId,insId,d.index);//过滤因合计数据重复显示的记录
- }
- else {showWin(d.data['NUM_ID_'],d.data['INSTANCE_ID_'],d.data['ID_'],d.data['TITLE_'],tabId);}
- }}
- else alert('暂无上一条数据');//btn.setDisabled(true);
- }
- function next(btn,tabId,insId,index){
- //递归查找下一条,并取到数据
- var grid=Ext.getCmp(tabId);
- var record =index?grid.store.getAt(index):grid.store.findRecord('ID_', insId, 0, false, false, true);
- var fIndex=index||record.index;
- if(fIndex+1 < grid.store.data.items.length){
- var d = grid.store.getAt(fIndex + 1);
- if(d){
- if(d.data['ID_']==insId){
- next(btn,tabId,insId,d.index);
- }
- else {showWin(d.data['NUM_ID_'],d.data['INSTANCE_ID_'],d.data['ID_'],d.data['TITLE_'],tabId);}
- }}
- else alert('暂无下一条数据');//btn.setDisabled(true);
- }
- //
- function getRemind(){
- if(hasReminded=='null'){
- Ext.Ajax.request({
- url : basePath + 'oa/note/getRemindItem.action',
- method : 'post',
- callback : function(opt, s, res){
- var r = new Ext.decode(res.responseText);
- if(r.exceptionInfo){
- showError(r.exceptionInfo);return;
- } else if(r.success && r.data){
- var remindtype=r.data.no_remindtype;
- var title=r.data.no_title;
- var content=r.data.no_content;
- var isrepeat=r.data.no_isrepeat;
- var approver=r.data.no_approver;
- var apptime=r.data.no_apptime;
- apptime=apptime.substr(0,10);
- if(isrepeat==-1){
- Ext.create('erp.view.core.window.MajorItemWarn',{title:title,itemContent:content,approver:approver,apptime:apptime,titlevalue:title});
- }else{
- if(r.data!="readed"){
- Ext.create('erp.view.core.window.MajorItemWarn',{title:title,itemContent:content,approver:approver,apptime:apptime,titlevalue:title});
- }
- }
- }
- }
- });
- }
- }
- </script>
- </head>
- <body >
- </body>
- </html>
|