/*-------------------------------------------------------*/ /* DEJTLS Ver 2.00 ( ICSC ERP DE System ) */ /*-------------------------------------------------------*/ /* author : I20306(葉育材)、I20496(鄧世雄) */ /* system : I20306(葉育材) */ /* version: $Id: dejtls.js,v 1.2 2008/07/17 10:09:39 I23938 Exp $ */ /* target : List JavaScript */ /* create : 2001/11/20 */ /* update : 2001/11/29 */ /*-------------------------------------------------------*/ /* 命名原則: * 若為常用之提示清單,則可以考慮獨立出一個新 * function 若其他程式呼叫,提高使用率與維護性 * 而 function 命名方式以呼叫之 JSP 其程式代碼 * 第四碼改為 t ,表示為 JavaScript(標準) ,亦 * 可清楚看出運作之程式為何。 * * 範例命名: * 呼叫之程式為 dsjsd01.jsp 則 function 命名為 * function dsjtd01() */ var dejtls_MaxWidth = screen.availWidth; var dejtls_MaxHeight = screen.availHeight; function dejtFormatHtml(sys, uri) { var url = "" ; if(sys == null || sys == '') { url = "/erp/html" + uri; } else { try { url = "/erp/" + sys + "/html" + uri; if (isNewServerModel) url = "/erp/html/" + sys + uri; } catch (e) {} } afterPopup_dejtFormatHtml() ; return url ; } // 萬用清單(其他不常用之清單使用) listMenu function dejtls(url, obj, width, height) { var rtnData = window.showModalDialog(url, obj, "dialogWidth:" + width + "; dialogHeight:" + height + "; status:no; help:no"); if (rtnData != null) { obj.value = rtnData; } } // 萬用視窗(其他不常用之清單使用) listMenu function dejtlsWinOpen(url, obj, winWidth, winHeight) { if (winWidth == null) winWidth = dejtls_MaxWidth * 0.6; if (winHeight == null) winHeight = dejtls_MaxHeight * 0.6; var winTop = (screen.availHeight - winHeight) / 2; var winLeft = (screen.availWidth - winWidth) / 2; var rtnData = window.open(url, obj, "top=" + winTop + ",left=" + winLeft + ",width=" + winWidth + ",height=" + winHeight + ",status=0,scrollBars=1,help=0,resizable=1"); rtnData.focus(); } // 訊息清單 2003.07.03 function dejtWinMsg(title, message) { var config = 'toolbar=no,location=no,status=no,menubar=no'; config += 'width=800,height=600,scrollbars=no,resizable=yes'; var deMsg = window.open ("","deWelcome", config) deMsg.document.write('' + title + '\r\n'); deMsg.document.write('\r\n'); deMsg.document.write('
\r\n'); deMsg.document.write('
(The window will automaticallyclose:15sec)
\r\n'); deMsg.document.write('
');
    deMsg.document.write(message);
    deMsg.document.write('
'); deMsg.document.write('
'); deMsg.document.write('\r\n'); deMsg.moveTo(30,30); deMsg.resizeTo(deMsg.popupMsg.offsetWidth,deMsg.popupMsg.offsetHeight); deMsg.setTimeout("self.close();",15000); } /*-------------------------------------------------------*/ /* 公用副程式 */ /*-------------------------------------------------------*/ // 寄信功能 function dejtmail(to, cc, subject, content) { // content.value = "
" + content.value + "
"; // return umjtWebMail(to.id, null, subject.id, content.id, 'Y'); var mailTo = "mailto:" + to.value + "?"; if (subject != null) mailTo += "Subject=" + subject.value; if (cc != null) mailTo += "&Cc=" + cc.value; if (content != null) { if (content.value.length > 2000) { alert("To Lager Content"); } else { mailTo += "&Body=" + content.value; } } location.href = mailTo; } function dejtimage(inputObj) { var url = "/erp/jsp/dzjjimg.jsp"; var rtnData = window.showModalDialog(url, inputObj, "dialogWidth:40; dialogHeight:25; status:no; help:no"); } // 網頁編輯器 輸入'文字欄位ID' function dejthtml(htmlCode) { var url = "/erp/de/jsp/dejjhtml.jsp?HtmlCode=" + htmlCode ; var editWidth = eval(htmlCode + ".offsetWidth"); var htmlWin = window.open(url, htmlCode.value, "Width=" + editWidth + ",Height=" + (dejtls_MaxHeight/2) + ",status=no,help=no,scrollBars=yes"); var rtnDatas = htmlWin.returnValue; if (rtnDatas != null) { if(htmlCode.value) { htmlCode.value = rtnDatas[0]; } else { htmlCode.innerText = rtnDatas[0]; } } } // 選郵遞區號 function dejt322(obj) { obj.value = window.showModalDialog("dejt3222.jsp",obj,"dialogWidth:17; dialogHeight:15; status:no; help:no"); } function deShowPostNo(postNo, postName, postGroup) { // var url = dejtFormatHtml("de", "/dewhPostNo.html"); var url = "/erp/de/jsp/dejjPostNo.jsp?postNo=" + postNo.value; var rtnDatas = window.showModalDialog(url, postNo, "dialogWidth:17; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { if(postNo.value) { postNo.value = rtnDatas[0]; } else { postNo.innerText = rtnDatas[0]; } if(postName != null) { if(postName.value) { postName.value = rtnDatas[1]; } else { postName.innerText = rtnDatas[1]; } } if(postGroup != null) { if(postGroup.value) { postGroup.value = rtnDatas[2]; } else { postGroup.innerText = rtnDatas[2]; } } } } // 幣別代號 function dejt303(obj) { var url = "/erp/de/jsp/dejj3031.jsp?Crcy=" + obj.value; var rtnDatas = window.showModalDialog(url,obj,"dialogWidth:17; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { obj.value = rtnDatas[0]; } } //幣別代號 function dejt303New(obj) { var url = "/erp/de/jsp/dejj3031New.jsp?Crcy=" + $('#'+obj).val(); $.showModalDialog({ url: url, resizeable: true, scrolling: 'yes', height: '300px', width: '600px', dialogArguments: null, onClose: rtnSearchData, rtnField:obj, title:'Currency' }); } function rtnSearchData(){ if(!this.returnValue) { return null; } if(this.rtnField) { if($('#'+this.rtnField).is('span')){ $('#'+this.rtnField).text(this.returnValue[0]); }else{ $('#'+this.rtnField).val(this.returnValue[0]); } } } // 多檔上傳小視窗 Applet 版 function deUpLoad(num, fileNo, fileName, formName) { if(num == null || fileNo==null || fileName==null || num=='' || fileNo=='' || fileName=='') { alert(MSG.LS_1); return false; } var url = "/erp/de/jsp/dejjMassUM.jsp?MaxNo="+num+"&InputId="+fileNo+"&SpanId="+fileName+"&FormId="+formName; leftPosition=(screen.width) ? (screen.width-560)/2 : 100; topPosition=(screen.height) ? (screen.height-275)/2 : 100; var upLoad = window.open(url, "um_03_de328", "left="+leftPosition+",top="+topPosition+",width=560, height=275, scrollBars=0"); upLoad.focus(); } /* 上傳小視窗 * num 至多上傳檔案數, 0代表無限 (必填) * fileNo 從小視窗返回母視窗的 input 欄位的名稱 (必填) * fileName 從小視窗返回母視窗的 span 欄位的名稱 (必填) * formName 按'完成'鈕後, 母視窗欲submit的form name (空白則不submit) */ function dejt328(num, fileNo, fileName, formName) { if(num == null || fileNo==null || fileName==null || num=='' || fileNo=='' || fileName=='') { alert(MSG.LS_1); return false; } var url = "/erp/de/jsp/dejj328.jsp?MaxNo="+num+"&InputId="+fileNo+"&SpanId="+fileName+"&FormId="+formName; leftPosition=(screen.width) ? (screen.width-560)/2 : 100; topPosition=(screen.height) ? (screen.height-275)/2 : 100; var upLoad = window.open(url, "um_03_de328", "left="+leftPosition+",top="+topPosition+",width=560, height=275, scrollBars=0"); upLoad.focus(); } /* 大量上傳小視窗 * num 至多上傳檔案數, 0代表無限 (必填) * fileNo 從小視窗返回母視窗的 input 欄位的名稱 (必填) * fileName 從小視窗返回母視窗的 span 欄位的名稱 (必填) * formName 按'完成'鈕後, 母視窗欲submit的form name (空白則不submit) */ function dejtMassUL(num, fileNo, fileName, formName) { if(num == null || fileNo==null || fileName==null || num=='' || fileNo=='' || fileName=='') { alert(MSG.LS_1); return false; } var url = "/erp/de/jsp/dejjMassUL.jsp?MaxNo="+num+"&InputId="+fileNo+"&SpanId="+fileName+"&FormId="+formName; leftPosition=(screen.width) ? (screen.width-560)/2 : 100; topPosition=(screen.height) ? (screen.height-275)/2 : 100; var upLoad = window.open(url, "um_03_de328", "left="+leftPosition+",top="+topPosition+",width=560, height=275, scrollBars=0"); upLoad.focus(); } /* 下傳小視窗 * fileString 欲下傳的程式(必填) */ function dejtMassDL(fileString) { if(fileString == null || fileString=='') { alert(MSG.LS_2); return false; } var url = "/erp/de/jsp/dejjMassDL.jsp?fileString="+fileString; width = 400; height = 260; leftPosition=(screen.width) ? (screen.width-width)/2 : 100; topPosition=(screen.height) ? (screen.height-height)/2 : 100; var downLoad = window.open(url, "dejjMassDL", "left="+leftPosition+",top="+topPosition+",width="+width+", height="+height+", scrollBars=0"); downLoad.focus(); } // 日期提示 function dejt308(obj, type) { showCalendar(obj, type); } // 請改用 dejt308() function dejtdate(obj, type){ dejt308(obj, type); } // 西洋曆轉農曆(測試中) // 資料來源:中央研究院 http://www.sinica.edu.tw/ftms/luso.htm function dejtluso(yy, mm, dd) { date = new Date; if(yy); else yy = date.getFullYear(); if(mm); else mm = date.getMonth() + 1; if(dd); else dd = date.getDate(); var url = "http://www.sinica.edu.tw/ftms-bin/kiwi1/luso.sh?lstype=1&yy=" + yy + "&mm=" + mm + "&dd=" + dd; var luso = window.open(url, "sinica", "width=330, height=400, scrollBars=0"); luso.focus(); } // 調色盤選單 function dewheel(obj, backObj){ var url = dejtFormatHtml("de", "/dewheel.html"); var bgColor; if(backObj != null) bgColor = backObj.bgColor; rtnData = window.showModalDialog(url,backObj,"dialogWidth:17; dialogHeight:18; status:no; help:no"); if (rtnData != null) { obj.value = rtnData; return rtnData; } return bgColor; } // 電子時鐘 function dewhour(){ var url = dejtFormatHtml("de", "/dewhour.html"); rtnData = window.showModelessDialog(url,"", "dialogWidth:10; dialogHeight:2; status:no; help:no"); if (rtnData != null) return rtnData; } // 翻譯網頁 function dewhtran() { var url = dejtFormatHtml("de", "/dewhtran.html"); var luso = window.open(url, "dewhtran", "width=330, height=400, scrollBars=0"); luso.focus(); } // 說明文件 function appHelp(url) { window.showHelp(url); } /*-------------------------------------------------------*/ /* 資訊供給系統 */ /*-------------------------------------------------------*/ // 名片清單 function dsjtpd0(owner, type, value) { var url = "/erp/ds/jsp/dsjjpd0.jsp?Button=LIST&inqOwner=" + owner + "&SelectLike=" if(type == 0) url += "CardName1&LikeValue=" + value; else if(type == 1) url += "CorpName&LikeValue=" + value; var cardWin = window.open(url, owner, 'top=0, left=0, height=' + document.body.clientHeight + ', width=' + document.body.offsetWidth + ', scrollBars=1'); cardWin.focus(); } // 名片匣 // 單群組樹 function dsjtalp(groupNo){ var url = "/erp/ds/jsp/dsjjalp.jsp?GroupID=" + groupNo; // var groupWin = window.open(url, groupWin, 'top=0, left=0, height=280, width=500, scrollBars=0'); // groupWin.focus(); var rtnDatas = window.showModelessDialog(url, groupNo, "dialogWidth:24; dialogHeight:15; status:no; help:no"); } // 單部門樹 // deptNo 部門代號 function dujt053t(deptNo) { var url = "/erp/du/jsp/dujj053t.jsp?DepNo=" + deptNo; var rtnDatas = window.showModelessDialog(url,deptNo,"dialogWidth:24; dialogHeight:15; status:no; help:no"); } // 單職位樹 // postNo 職位代號 function dujt054t(postNo) { var url = "/erp/du/jsp/dujj054t.jsp?PostNo=" + postNo; var rtnDatas = window.showModelessDialog(url, postNo, "dialogWidth:24; dialogHeight:15; status:no; help:no"); } /* 群組代碼清單 * groupNo 欲回傳群組代號之欄位別 * groupName 欲回傳群組名稱之欄位別 * * 範例: * 1. * * * 2. * */ function dsjtagp(groupNo, groupName){ var url = "/erp/ds/jsp/dsjjal2.jsp?GroupId=" + groupNo.value; var rtnDatas = window.showModalDialog(url, groupNo, "dialogWidth:24; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { if(groupNo.value) { groupNo.value = rtnDatas[0]; groupNo.title = rtnDatas[1]; } else { groupNo.innerText = rtnDatas[0]; } if(groupName != null) { if(groupName.value) { groupName.value = rtnDatas[1]; } else { groupName.innerText = rtnDatas[1]; } } } } /* 複選群組代碼清單 * groupNos 欲回傳群組代號之欄位別 * groupNames 欲回傳群組名稱之欄位別 * * 範例: * 1. * * * 2. * */ function dsjtal1(groupNos, groupNames){ var url = "/erp/ds/jsp/dsjjal1.jsp?Groups=" + groupNos.value; rtnDatas = window.showModalDialog(url,groupNos,"dialogWidth:24; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { groupNos.value = rtnDatas[0]; if(groupNos.deTips) { groupNos.deTips = rtnDatas[1]; } else { groupNos.title = rtnDatas[1]; } if (groupNames != null) { if(groupNames.value) groupNames.value = rtnDatas[1]; else groupNames.innerText = rtnDatas[1]; } } } /* 授權群組代碼清單 * agcNo 欲回傳授權群組之欄位別 * agcName 欲回傳授權群組名稱之欄位別 * * 範例: * 1. * * * 2. * */ function dsjtagc(agcNo, agcName){ var url = "/erp/ds/jsp/dsjjal0.jsp?AuthorityId=" + agcNo.value; rtnDatas = window.showModalDialog(url,agcNo,"dialogWidth:35; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { agcNo.value = rtnDatas[0]; if(agcNo.deTips) { agcNo.deTips = rtnDatas[1]; } else { agcNo.title = rtnDatas[1]; } if (agcName != null) { if(agcName.value) agcName.value = rtnDatas[1]; else agcName.innerText = rtnDatas[1]; } } } function dsjtagc_Msg(owner, userID, authorityGroup, title, content){ var url = "/erp/ds/jsp/dsjjagcNew.jsp?AuthorityId=" + authorityGroup +"%26Button=DSJJAGC%26MemberType=E%26Access=Y%26Member=" + userID; dwjt009(owner, title, content, url); } // function dsjtInfoTree(beginSeq, endPath) { var url = "/erp/ds/dsjsInfoTree?execution=INQUIRE&jspSource=dsjjInfoTree.jsp&target=_main"; if (beginSeq != null && beginSeq != '') { url += "&beginSeq=" + beginSeq; } else { url += "&beginSeq=A"; } if (endPath != null) { url += "&endPath=" + endPath; } // rtnData = window.showHelp(url,beginSeq,"dialogWidth:30; dialogHeight:15; status:no;"); rtnData = window.open(url,"_search"); } /*-------------------------------------------------------*/ /* 使用者 */ /*-------------------------------------------------------*/ /* 複選使用者清單 * empNos 輸入使用者代號之物件欄位 * orgType 輸出組織名稱(行政組織則填 null) * empNames 輸出使用者名稱之物件欄位 * ex: onClick="dujt051(userNos, null, userNames)" */ function dujt051(empNos, orgType, empNames){ var url = "/erp/du/jsp/dujj051.jsp?users="+empNos.value; if (orgType != null) { url += "&orgType=" + orgType; } var rtnData = window.showModalDialog(url,empNos,"dialogWidth:31; dialogHeight:15; status:no; help:no"); if (rtnData != null) { empNos.value = rtnData[0]; if (empNames != null) { empNames.value = rtnData[1]; } if (empNos.deTips) { empNos.deTips = rtnData[1]; } } after_dujt051() ; } function dejtValue(objname, objvalue) { if (objname != null) { if (objname.value) { objname.value = objvalue; } else if (objname.innerText) { objname.innerText = objvalue; } if (objname.deTips) { objname.deTips = objvalue; } } } /* 單選使用者清單 * empNo 輸入使用者代號之物件欄位 * empName 輸出使用者名稱之物件欄位 * deptNo 輸出部門代碼之物件欄位 * deptName 輸出部門名稱之物件欄位 * defaultDept 預設部門代號 * empEName 輸出使用者英文名之物件欄位 * deptEName 輸出部門英文名之物件欄位 */ function dujt052(empNo, empName, deptNo, deptName, defaultDept, orgType, empEName, deptEName) { event.srcElement.className = event.srcElement.className + ' mouse-hand'; if(defaultDept == null) defaultDept = ""; var url = "/erp/du/jsp/dujj052.jsp?depNo="+defaultDept; if (orgType != null) { url += "&orgType=" + orgType; } var rtnDatas = window.showModalDialog(url,empNo,"dialogWidth:540px; dialogHeight:215px; status:no; help:no"); if (rtnDatas == null) return; switch (rtnDatas.length) { case 6: // 部門英文名 if (deptEName != null) { if (deptEName.value) { deptEName.value = rtnDatas[5]; } else { deptEName.innerText = rtnDatas[5]; } } case 5: // 使用者英文名 if (empEName != null) { if (empEName.value) { empEName.value = rtnDatas[4]; } else { empEName.innerText = rtnDatas[4]; } } case 4: // 部門名稱 if (deptName != null) { if (deptName.value) { deptName.value = rtnDatas[3]; } else { deptName.innerText = rtnDatas[3]; } } case 3: // 部門代碼 if(deptNo != null) { if(deptNo.value) { deptNo.value = rtnDatas[2]; } else { deptNo.innerText = rtnDatas[2]; } } case 2: // 使用者名稱 if (empName != null) { if(empName.value) { empName.value = rtnDatas[1]; } else { empName.innerText = rtnDatas[1]; } } case 1: // 使用者代號 if(empNo!=null) { if(empNo.value) { empNo.value = rtnDatas[0]; empNo.title = rtnDatas[1]; } else { empNo.innerText = rtnDatas[0]; } } } after_dujt052() ; } // 單選部門清單 // deptNo 部門代號, deptName 部門名稱 function dujt053(deptNo, deptName, orgType){ var url = "/erp/du/jsp/dujj053.jsp?depNo="+deptNo.value; if (orgType != null) { url += "&orgType=" + orgType; } var rtnDatas = window.showModalDialog(url,deptNo,"dialogWidth:24; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { if(deptNo.value) { deptNo.value = rtnDatas[0]; deptNo.title = rtnDatas[1]; } else { deptNo.innerText = rtnDatas[0]; } if(deptName != null) { if(deptName.value) { deptName.value = rtnDatas[1]; } else { deptName.innerText = rtnDatas[1]; } } } after_dujt053() ; } // 單選職位清單 // postNo 職位代號, postName 職位名稱 function dujt054(postNo, postName, orgType){ var url = "/erp/du/jsp/dujj054.jsp?postNo="+postNo.value; if (orgType != null) { url += "&orgType=" + orgType; } var rtnDatas = window.showModalDialog(url, postNo, "dialogWidth:24; dialogHeight:15; status:no; help:no"); if (rtnDatas != null) { if (postNo.value) { postNo.value = rtnDatas[0]; postNo.title = rtnDatas[1]; } else { postNo.innerText = rtnDatas[0]; } if (postName != null) { if(postName.value) { postName.value = rtnDatas[1]; } else { postName.innerText = rtnDatas[1]; } } } } /* 以下兩個不提供使用 * 單選使用者清單 (回傳工號、名字) * 請用 dujt052(empNo, empName) function dujt055(empNo, empName){ dujt052(empNo, empName); } * 單選使用者清單 * (回傳單位號、單位名、工號、名字) !!順序不同請注意!! * 請用 dujt052(empNo, empName, deptNo, deptName) function dujt056(deptNo, deptName, empNo, empName){ dujt052(empNo, empName, deptNo, deptName); } */ /*-------------------------------------------------------*/ /* 流程訊息 */ /*-------------------------------------------------------*/ // 訊息通告 function dwjt009(userID, title, content, url){ if(userID == null) userID = ""; if(title == null) title = ""; if(content == null) content = ""; if(url == null) url ="" var url = "/erp/dw/jsp/dwjj0091.jsp?toUser=" + encodeURIComponent(userID) + "&title=" + encodeURIComponent(title) + "&content=" + encodeURIComponent(content) + "&programUrl=" + encodeURIComponent(url); var winTop = (screen.availHeight - 330) / 2; var winLeft = (screen.availWidth - 500) / 2; var sendMsg = window.open(url, 'Message', 'top=' + winTop + ', left=' + winLeft + ', height=330, width=500, scrollBars=1,status=1'); sendMsg.focus(); } /*-------------------------------------------------------*/ /* 電子郵件 */ /*-------------------------------------------------------*/ function umjtWebMail(to, cc, subject, content, ishtml) { if(to == null) to = ""; if(cc == null) cc = ""; if(subject == null) subject = ""; if(content == null) content = ""; if(ishtml == null) ishtml = "N"; var url = "/erp/um/jsp/umjjm14.jsp?IsFromAp=Y&To=" + to +"&Cc=" + cc + "&Subject=" + subject + "&Content=" + content + "&IsHtml=" + ishtml; var Email = window.open(url, "umjjm14", "width=750, height=550, scrollBars=0"); Email.focus(); } // 挑選收信人 function umjtCardBook(to, cc) { if(to == null) to = ""; if(cc == null) cc = ""; if (to =='' && cc =='') return false; var url = "/erp/um/jsp/umjjm13.jsp?IsFromAp=Y&ApTo=" + to +"&ApCc=" + cc ; var ss = window.open(url, "umjjm13", "width=400, height=334, scrollBars=0,resizable=1"); ss.focus(); } /*-------------------------------------------------------*/ /* 公文管理系統 */ /*-------------------------------------------------------*/ //挑選群組 function udjtGroup(groupID, groupName) { var url = "/erp/ud/jsp/udjjGroupMain.jsp"; var rtnData = window.showModalDialog(url, null, "dialogWidth:30; dialogHeight:15; status:no; help:no"); if (rtnData != null) { if(groupID != null) if(groupID.value) groupID.value = rtnData[0]; else groupID.innerText = rtnData[0]; if(groupName != null) if(groupName.value) groupName.value = rtnData[1]; else groupName.innerText = rtnData[1]; } } function udjtInst(instID, instName, contactMan, telNo, defaultDept) { var url = "/erp/ud/jsp/udjjChooseInst.jsp?defaultDept="+defaultDept ; // window.open(url) ;return ; var rtnDatas = window.showModalDialog(url, null, "dialogWidth:35; dialogHeight:15; status:no; help:no"); if (rtnDatas == null) return false; if (rtnDatas[0]=="") return false; for(var i=0;i0) para+="&" ; para+="deListData"+i+"="+myData[i] ; } if ( startIndex!="" ) { para+="&_deList_multiStartIndex="+startIndex ; } var w=screen.width*80/100 ; var h=screen.height*80/100 ; if (width != null) w=screen.width*width/100 ; if (height != null) h=screen.height*height/100 ; var le=parseInt((screen.width-w)/2) ; var myTop=parseInt((screen.height-h)/2) ; dejtList_win=window.open(url+para, "man", "left="+le+",top="+myTop+",width="+w+",height="+h); dejtList_win.focus() ; } function dejtList_mouseover() { var tr=dejtList_getTr(event.srcElement) ; deList_oldClass=tr.className ; tr.className="dejcListItemOver" ; dejtList_OverItem = tr ; } function dejtList_dblclick() { return deList_returnValue() ; } function dejtList_click() { var tr=dejtList_getTr(event.srcElement) ; tr.cells[0].children[0].checked=true ; deList_markChkValue(tr.cells[0].children[0]) ; if (dejtList_Checked_Item != null) { dejtList_Checked_Item.className = dejtList_Checked_Item.getAttribute("oldClass") ; } dejtList_Checked_Item = tr ; dejtList_Checked_Item_class = tr.className ; tr.setAttribute("oldClass",deList_oldClass) ; tr.className="dejcListItemOver" ; } function dejtList_mouseout() { if (dejtList_Checked_Item == null) { if (dejtList_OverItem != null) { dejtList_OverItem.className=deList_oldClass ; return ; } } var tr=dejtList_getTr(event.srcElement) ; if (tr != dejtList_Checked_Item) { if (dejtList_OverItem != null) dejtList_OverItem.className=deList_oldClass ; } } function dejtList_getTr(obj) { while (obj.tagName.toLowerCase()!="tr") { obj=obj.parentElement ; } return obj ; } function deListAction() { } /* 行事曆─一般事件維護畫面 20030910 I20967 */ function gaEvent(dateStr, compId, calendarCategory, calendarId, eventBDate, eventEDate, eventBTime, eventETime, func) { var dateVar = new Date(); var beginYear = dateVar.getFullYear(); var beginMonth = dateVar.getMonth() + 1; var beginDate = dateVar.getDate(); var dateStr = ""; if(beginMonth.toString().length==1) dateStr = beginYear.toString() + "0" + beginMonth.toString(); else dateStr = beginYear.toString() + beginMonth.toString(); if(beginDate.toString().length==1) dateStr = dateStr + "0" + beginDate.toString(); else dateStr = dateStr + beginDate.toString(); if(func==1) { var showItem = dateStr + ";" + compId + ";" + calendarCategory + ";" + calendarId + ";" + eventBDate + ";" + eventEDate + ";" + eventBTime + ";" + eventETime + ";"; window.open("/erp/ga/gajsControl?hidBtn=calendarUpdate&compIdQry=" + compId + "&calendarCategoryQry=" + calendarCategory + "&calendarIdQry=" + calendarId + "&viewQry=3&beginYearQry=" + beginYear + "&beginMonthQry=" + beginMonth + "&beginDateQry=" + beginDate + "&subscribeQry=&preBeginKey=" + dateStr + "&nextBeginKey=" + dateStr + "&checkedCount=1&funcType=&showItem=" + showItem + "&srcPage=PORTAL&detailPath=gajjmCalendar3.jsp", "gajjmCalendar3", "width=550, height=400, top=0, left=0, resizable=no"); } } function afterPopup_dejtFormatHtml() { } function after_dujt051() {} function after_dujt052() {} function after_dujt053() {} function deShowPostNoNew(postNo, postName, postGroup) { // var url = dejtFormatHtml("de", "/dewhPostNo.html"); var url = "/erp/de/jsp/dejjPostNoNew.jsp?postNo=" + postNo.value; //var rtnDatas = window.showModalDialog(url, postNo, "dialogWidth:17; dialogHeight:15; status:no; help:no"); $.showModalDialog({ url: url, height: '400px', //高度 width: '400px', //寬度 onClose: postNoReturnedData, //關閉之後呼叫的方法 postNo:postNo, //自訂參數 postName:postName, //自訂參數 postGroup:postGroup, title:'郵遞區號挑選視窗' //視窗標題 }); } function postNoReturnedData(){ if(!this.returnValue) { return null; } if(this.postNo.id) { if($('#'+this.postNo.id).is('span')){ $('#'+this.postNo.id).text(this.returnValue[0]); }else{ $('#'+this.postNo.id).val(this.returnValue[0]); } } if(this.postName) { if($('#'+this.postName).is('span')){ $('#'+this.postName).text(this.returnValue[1]); }else{ $('#'+this.postName).val(this.returnValue[1]) } } if(this.postGroup) { if($('#'+this.postGroup).is('span')){ $('#'+this.postGroup).text(this.returnValue[2]); }else{ $('#'+this.postGroup).val(this.returnValue[2]) } } }