123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550 |
- var gvMyUIDPath = null;
- var gvOpUIDPath = null;
- var gvChUIDPath = null;
- var gvDate = null;
- var gvParamPath = null;
- var gvPropPath = null;
- var gvAuthPath = null;
- var gvTitlePath = null;
- var gvScnTypePath = null;
- var gvErrorMsgPath = null;
- var gvSystemPath = null;
- var gvMenuPath = null;
- var gvMenuGroupCdPath = null;
- var gvMenuPrestDeptCdPath = null;
- var gvMenuItemCdPath = null;
- var gvMenuParamPath = null;
- var gvSystemCd = null;
- var gvReportPath = null;
- var gvSubReportPath = null;
- var gvReportPropsPath = null;
- var gvReportParamsPath = null;
- var gvReportOptionsPath = null;
- var gvPatientInfoPath = null;
- var gvOperationInfoPath = null;
- var gvConsultInfoPath = null;
- var gvPatientInfoFlagPath = null;
- var gvOrderBasicInfoPath = null;
- var gvPopupMenuPath = null;
- var gvHelpPage = null;
- var gvTaskBarHeight = 34;
- var gvDefaultScrWidth = 1211;
- var gvDefaultScrHeight = 784;
- var gvSaveLoc = null;
- var fEssentialBackColor = "#ffe4b5";
- function xforms_model_construct() {
- gvPropPath="/root/properties";
- gvMyUIDPath=gvPropPath+"/uid/myself";
- gvOpUIDPath=gvPropPath+"/uid/opener";
- gvChUIDPath=gvPropPath+"/uid/children/";
- gvParamPath=gvPropPath+"/parameters";
- gvChildClosePath=gvPropPath+"/childclose";
- gvSystemPath=gvPropPath+"/domain";
- gvAuthPath=gvPropPath+"/auth";
- gvMenuPath=gvPropPath+"/menu";
- gvMenuGroupCdPath=gvMenuPath+"/menugroupcd";
- gvMenuPrestDeptCdPath=gvMenuPath+"/menuprestdeptcd";
- gvMenuItemCdPath=gvMenuPath+"/menuitemcd";
- gvMenuParamPath=gvMenuPath+"/menuparam";
- gvTitlePath=gvPropPath+"/title";
- gvScnTypePath=gvPropPath+"/stype";
- gvErrorMsgPath=gvPropPath+"/error";
- gvReportPath=gvPropPath+"/report/mainreport";
- gvSubReportPath=gvPropPath+"/report/subreport";
- gvReportPropsPath=gvReportPath+"/props";
- gvReportParamsPath=gvReportPath+"/params";
- gvReportOptionsPath=gvReportPath+"/options";
- gvPatientInfoPath=gvPropPath+"/patient";
- gvOperationInfoPath=gvPatientInfoPath+"/operationinfo";
- gvConsultInfoPath=gvPatientInfoPath+"/consultinfo";
- gvPatientInfoFlagPath=gvPatientInfoPath+"/patientflag";
- gvOrderBasicInfoPath=gvPropPath+"/orderbasicinfo";
- gvPopupMenuPath=gvPropPath+"/popupmenu";
-
- gvSaveLocPath = gvPropPath + "/saveloc";
- model.makeValue(gvSaveLocPath, "true");
-
-
- gvDate = new Date();
- var uid = gvDate.getTime();
- model.makeValue(gvMyUIDPath,uid);
- model.makeValue(gvOpUIDPath,"");
- model.makeValue(gvSystemPath,"");
- if (isPopup()) {
-
- model.setValue(gvOpUIDPath,opener.model.getValue(gvMyUIDPath));
-
-
- opener.model.makeValue(gvChUIDPath+"latest",uid);
-
-
- var spclauth = getGlobalVariable("spclscrnauth");
- setGlobalVariable("spclscrnauth", "");
- if (spclauth != "") {
- model.makeValue(gvAuthPath, spclauth);
- } else {
-
- model.makeValue(gvAuthPath, opener.model.getValue(gvAuthPath));
- }
-
- model.makeValue(gvMenuParamPath,opener.model.getValue(gvMenuParamPath));
-
- model.setValue(gvSystemPath,getGlobalVariable("systemcode"),true);
- setGlobalVariable("systemcode","");
-
- setWindowSize();
-
- initTitle();
-
- addOpenWindow();
- } else {
-
- initTitle();
-
-
- var spclauth = getGlobalVariable("spclscrnauth");
- setGlobalVariable("spclscrnauth", "");
- if (spclauth != "") {
-
- setGlobalVariable("scrnauth", spclauth);
- }
- setScreenAuth();
-
- setScreenMenuParameter();
- }
-
- setScreenMenuGroup();
-
- setScreenMenuItem();
-
- setScreenPrestDeptCd();
- m_event.stopPropagation();
- }
- function xforms_ready() {
-
- window.setPopupMenu(false);
-
-
- window.setIcon(htmlwindow.faviconURL);
-
-
-
-
-
- if(window.type != "iviewer") {
- body.setAttribute("accesskey", "f12");
- }
- }
- function xforms_close() {
-
- if( document.allElement.item(m_event.currentTarget).elementName == "xhtml:head" ) {
- m_event.stopPropagation();
- return;
- }
- if ( isPopup() ) {
-
- opener.model.removenode(gvChUIDPath+"child::*[text()=""+getMyUID()+""]");
-
- if(window.type == "modal"){
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetLastModal != undefined){
- var modalWindowNm = viewerObj.window.fGetLastModal(getMyUID());
- if(modalWindowNm != null && modalWindowNm != ""){
- messageBox("���� ���� ���ȭ���� ���� ��","C003","("+modalWindowNm.split('|')[3]+")");
- }
- }
- }
- }
-
- }
- function xforms_model_destruct() {
-
- if( document.allElement.item(m_event.currentTarget).elementName == "xhtml:head" ) {
- m_event.stopPropagation();
- return;
- }
-
- var mainClose = getGlobalVariable("mainclose");
- if ( mainClose != "Y")
- {
-
- if ( isPopup() ) {
-
- if (getSaveLoc() == "true") {
- setScreenLocation(getScreenID(),window.left,window.top);
- } else if (getSaveLoc == "false") {
-
- }
-
- removeOpenWindow();
-
-
-
- }
- }
-
- }
- function setSaveLoc(type) {
- model.setValue(gvSaveLocPath, type);
- }
- function getSaveLoc() {
- return model.getValue(gvSaveLocPath);
- }
- function onaccesskey(){
- if (m_event.keyCode == "123") {
- getHelpPage();
- m_event.stopPropagation();
- }
- }
-
- function initTitle() {
- var titleValue = null;
- var syscd = model.getValue(gvSystemPath);
- var msgViewer = getViewer("sysMessage");
-
- if( syscd == null || syscd == "") {
- titleValue = document.title;
- } else {
- titleValue = document.title + "(" + getGlobalVariable("sysname"+syscd) + ")";
- }
-
- model.makeValue(gvTitlePath,titleValue);
- if (!isPopup() && getGlobalVariable("userinfos") != "" && typeof(parent) == "undefined") {
- var scrnTitle = "" ;
- var tmpTitle = "";
- scrnTitle += htmlwindow.systemSymbol + " ";
-
- if (titleValue.indexOf(htmlwindow.systemSymbol) > -1) {
- scrnTitle += titleValue.substring(titleValue.indexOf("]")+2, titleValue.indexOf("��")); // titleValue.indexOf("��")���� ����� �ƴ� �� + ������ 1�� Ư��������
- } else {
- scrnTitle += titleValue;
- }
- scrnTitle += " ";
- scrnTitle += "[" +getUserInfo("systeminstnm") + "]";
- scrnTitle += "��������������������";
- scrnTitle += new String(htmlwindow.vision) + " ";
- scrnTitle += getUserInfo("dutplcenm") + " ";
- scrnTitle += getUserName() + " ";
- scrnTitle += getTitleLoginDate() + " ";
- scrnTitle += new String(htmlwindow.wasname);
-
- htmldocument.title = scrnTitle;
- }
-
- if (isPopup()) {
- var popupTitle = "";
- popupTitle += htmlwindow.systemSymbol + " ";
- popupTitle += titleValue;
- popupTitle += " ";
- popupTitle += "[" + getUserInfo("systeminstnm") + "]" + " ";
-
- document.title = popupTitle;
-
- }
- }
- function getTitle() {
- return model.getValue(gvTitlePath);
- }
- function getTitleLoginDate() {
- var weekarr = new Array("��", "��", "ȭ", "��", "��", "��", "��");
- var dt = getUserInfo("logindt");
- var dtyear = dt.substring(0,4);
- var dtmonth = dt.substring(4,6);
- var dtday = dt.substring(6,8);
- var dthour = dt.substring(8,10);
- var dtmin = dt.substring(10,12);
- var dtval = new Date(dtmonth+"/"+dtday+"/"+dtyear);
- var dtweek = weekarr[dtval.getDay()];
- var dtstr = dtyear + "��" + dtmonth + "��" + dtday + "�� (" + dtweek + ") " + dthour +"��" + dtmin +"��";
- return dtstr;
- }
- function getMISSystemCd() {
- var systemcd = getSystemCd();
- var systeminstcd = systemcd.substring(3,6);
- var missystemcd = "";
-
- if (systeminstcd == "011" || systeminstcd == "012" || systeminstcd == "013" || systeminstcd == "014") {
- missystemcd = "MIS001";
- } else {
- missystemcd = "MIS" + systeminstcd;
- }
- return missystemcd;
- }
- function getSystemCd() {
- if (gvSystemCd != null) {
- return gvSystemCd;
- }
- if (htmlwindow.systemcd == undefined) {
- gvSystemCd = "";
- } else {
- gvSystemCd = new String(htmlwindow.systemcd);
- }
- return gvSystemCd;
- }
- function getViewer(name) {
- return viewer.item(getSystemCd()+"_"+name);
- }
- function setScreenMenuGroup(){
- model.makeValue(gvMenuGroupCdPath, getGlobalVariable("menugroupcd"));
- }
- function setScreenMenuItem(){
- model.makeValue(gvMenuItemCdPath, getGlobalVariable("menuitemcd"));
- }
- function setScreenPrestDeptCd(){
- model.makeValue(gvMenuPrestDeptCdPath, getGlobalVariable("prestdeptcd"));
- }
- function getScreenPrestDeptCd(){
- return model.getValue(gvMenuPrestDeptCdPath);
- }
- function setScreenMenuParameter(){
- model.makeValue(gvMenuParamPath, getGlobalVariable("menuparam"));
- if(window.type != "iviewer") setGlobalVariable("menuparam","");
- }
- function getScreenMenuParameter(){
- return model.getValue(gvMenuParamPath);
- }
- function getScreenID(url) {
- if (url == null) {
- url = document.URL;
- }
- var sp = url.split("/");
- return sp[sp.length-1].split(".")[0].substr(0,10);
- }
- function setScreenAuth(auth){
- var viewerObj = getViewer("bizMain");
-
- if ( viewerObj == null ) {
- setGlobalVariable("scrnauth","11100000");
- }
- model.makeValue(gvAuthPath, getGlobalVariable("scrnauth"));
- if(window.type != "iviewer") setGlobalVariable("scrnauth","");
- }
- function setSpclScrnAuth(auth, flag) {
- model.makeValue(gvAuthPath, getAuthCode(auth));
- if (flag == null) {
- flag = true;
- }
- if (flag == true) {
- setScreenBtnDisabled();
- }
- }
- function checkAuth(auth) {
- var f = auth.charAt(0);
- var a = getAuth();
- var v = '0';
- switch(f) {
- case 'r':
- case 'R':
- v = a.charAt(0);
- break;
- case 'x':
- case 'X':
- v = a.charAt(1);
- break;
- case 'p':
- case 'P':
- v = a.charAt(2);
- break;
- }
- if (v == '1') {
- return true;
- } else {
- return false;
- }
- }
- function getAuth() {
- return model.getValue(gvAuthPath);
- }
- function setScreenBtnDisabled( documentObj ) {
- if (documentObj == null) {
- documentObj = document;
- }
- var childObjCnt = documentObj.controls.length;
- var childObj;
- for (var i=0; i < childObjCnt; i++) {
- childObj = documentObj.controls.item(i);
- if (childObj.elementName == "xforms:iviewer") {
- setScreenBtnDisabled( childObj.document );
- } else if (childObj.elementName == "xforms:button") {
- var btnAuth = childObj.attribute["_auth"];
- if(btnAuth.toUpperCase() == "R" || btnAuth.toUpperCase() == "X" || btnAuth.toUpperCase() == "P"){
- childObj.setDisabled(!checkAuth(btnAuth));
- }
- }
- }
- }
- function getMyUID() {
- return model.getValue(gvMyUIDPath);
- }
- function getOpenerUID() {
- return model.getValue(gvOpUIDPath);
- }
- function getChildUID(wid) {
- var cid = model.getValue(gvChUIDPath+wid);
- if (cid==null) { cid=""; }
- return cid;
- }
- function checkOpener() {
- if (isPopup()) {
- return (getOpenerUID()==opener.model.getValue(gvMyUIDPath));
- } else {
- return false;
- }
- }
- function getChildWindow(wid) {
- return findChildWindow(getChildUID(wid));
- }
- function findChildWindow(cid) {
- var child = null;
- for(i=0;i<window.children.length;i++) {
- child = window.children.item(i);
- if (child.model.getValue(gvMyUIDPath)==cid) return child;
- }
- return null;
- }
- function findChildWindowByScreenID(sid) {
- var child = null;
- for(i=0;i<window.children.length;i++) {
- child = window.children.item(i);
- if (child.getScreenID()==sid) return child;
- }
- return null;
- }
- function closeChildWindow() {
- if(model.getValue(gvChildClosePath) == "Y"){
- var childCnt = window.children.length;
- for( var i = childCnt; i > 0; i-- ) {
- window.children.item(i-1).close();
- }
- }
- }
- function setCloseChildWindow(){
- model.makeValue(gvChildClosePath,"Y");
- }
- function isPopup() {
- var stype = window.type;
- if (stype == "iviewer" || stype == "main") {
- return false;
- } else {
- return true;
- }
- }
- function activateChild(wid) {
- var cwnd = window.children.item(wid);
- if (cwnd != null) {
- cwnd.activate();
- }
- }
- function activateOpener() {
- if (isPopup()) {
- opener.activateMyWindow();
- }
- }
- function activateMyWindow() {
- if (isPopup()) {
- window.restore();
- window.activate();
- } else {
- htmlwindow.focus();
- }
- }
- function getScreenDisabled(){
- return body.disabled;
- }
- function setMenuDisabled(type){
- htmlwindow.setMenuDisabled(type);
- }
- function locateCenter(xPos, yPos, userProp, monNo) {
- var taskbarHeight = 0;
- if (monNo == "" || monNo == null) {
-
- monNo = getCurrentMonitorNumber();
- }
- monNo = parseInt(monNo)-1;
- if (monNo < 0) {
- monNo = 0;
- } else if (monNo == 0) {
-
- taskbarHeight = gvTaskBarHeight;
- }
- var monSize = getMonitorSize(monNo);
-
- var width = gvDefaultScrWidth, height = gvDefaultScrHeight;
-
-
- if (monSize[0] < width) {
- width = monSize[0];
- }
- if (monSize[1] < height + taskbarHeight) {
- height = monSize[1] - taskbarHeight;
- }
- if (userProp != null) {
- var wexp = new RegExp("(width:)([0-9]+)(px)", "gi");
- var hexp = new RegExp("(height:)([0-9]+)(px)", "gi");
- var w = userProp.match(wexp);
- var h = userProp.match(hexp);
-
- if (w != null && w.length == 1) {
- width = w[0].match(new RegExp("([0-9]+)", "gi"));
- }
- if (h != null && h.length == 1) {
- height = h[0].match(new RegExp("([0-9]+)", "gi"));
- }
- }
- if (xPos == "" || xPos == null) {
-
- if (width != "") {
- xPos = parseInt(monSize[0])/2 - width/2;
- if (xPos < 0) {
- xPos = 0;
- }
- } else {
- xPos = 0;
- }
- } else {
-
- if (parseInt(xPos) < 0) {
- xPos = 0;
- }
- }
- if (yPos == "" || yPos == null) {
-
- if (height != "") {
- yPos = monSize[1]/2 - height/2 - taskbarHeight;
- if (yPos < 0) {
- yPos = 0;
- }
- } else {
- yPos = 0;
- }
- } else {
-
- if (parseInt(yPos) < 0) {
- yPos = 0;
- }
- }
- loc = getAbsoluteLocation(monNo,xPos,yPos);
- return loc;
- }
- function openInternal(openType,id,idType,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos) {
- if (!checkTimeout()) {
-
- setGlobalVariable("last_submit", (new Date()).getTime());
- }
- var url = null;
- var sid = getScreenID(id);
- if (wid == null || wid == "") {
- wid = sid;
- }
- if (prevPos == null) {
- prevPos = true;
- }
- if ( idType == "url" ) { // idType == "url" �̸� ID�� �״�� URL�� open�Ѵ�.
- url = id;
- } else {
-
- url = getScreenURL(sid);
- }
-
- var prop = null;
- if (monNo == null && xPos == null && yPos == null) {
-
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fSetStatusMessage != undefined) {
-
-
-
- var loc = locateCenter(xPos, yPos, userProp);
- xPos = loc[0];
- yPos = loc[1];
- prop = "top:"+yPos+"px;left:"+xPos+"px;width:" + gvDefaultScrWidth + "px;height:" + gvDefaultScrHeight + "px;";
- } else {
-
- prop = "align:center;width:" + gvDefaultScrWidth + "px;height:" + gvDefaultScrHeight + "px;";
- }
- } else {
-
- var xyPos = getScreenLocation(sid);
- var loc = null;
- if ( prevPos && xyPos != "") {
-
- loc = xyPos.split("|");
- } else {
-
-
-
-
-
- loc = locateCenter(xPos, yPos, userProp,monNo);
- }
- xPos = loc[0];
- yPos = loc[1];
- prop="top:"+yPos+"px;left:"+xPos+"px;";
- }
-
- if (userProp != null) {
- prop = prop + userProp;
- }
-
-
-
-
-
-
- var viewerObj = getViewer("sysMessage");
- var wd = null;
- if (viewerObj != null && viewerObj.window.fGetOpenWindow != undefined) {
-
-
- wd = viewerObj.window.fGetOpenWindow(sid);
- } else {
- if (isPopup() && opener.getScreenID() == sid) {
- wd = opener;
- } else if (getScreenID() == sid) {
- wd = window;
- } else {
- wd = findChildWindowByScreenID(sid);
- }
- }
- var cid = "";
- if (wd != null && openType =="modeless") {
- cid = wd.getMyUID();
- wd.activateMyWindow();
- wd.body.dispatch("onActivate");
- } else {
- window.load(url,openType,wid,prop,ref,resultref);
- if (openType!="replace") {
-
-
- cid = model.getValue(gvChUIDPath+"latest");
- model.makeValue(gvChUIDPath+wid,cid);
- model.makeValue(gvChUIDPath+"latest","");
- }
- }
- return cid;
-
- }
- function open(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode, resizeType) {
- if (userProp == null) {
- userProp = "max:hidden;";
- } else {
- userProp = "max:hidden;" + userProp;
- }
-
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
- if (resizeType == null || resizeType == "" || resizeType == "none") {
- setGlobalVariable("resizetype", "none");
- } else if (resizeType == "notaskbar") {
- setGlobalVariable("resizetype", "notaskbar");
- } else if (resizeType == "free") {
- setGlobalVariable("resizetype", "free");
- }
- return openInternal("modeless",id,"scn",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
- }
- function navigate(id,monNo,xPos,yPos,wid,ref,resultref, authCode) {
-
- var scrnauth = model.getValue(gvAuthPath);
- setGlobalVariable("scrnauth", scrnauth);
-
- closeChildWindow();
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
-
- return openInternal("replace",id,"scn",monNo,xPos,yPos,wid,ref,resultref);
- }
- function modal(id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode, resizeType) {
- var rtn = "";
- body.setDisabled(true);
- if (userProp == null) {
- userProp = "min:hidden;max:hidden;";
- } else {
- userProp = "min:hidden;max:hidden;" + userProp;
- }
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
- if (resizeType == null || resizeType == "" || resizeType == "none") {
- setGlobalVariable("resizetype", "none");
- } else if (resizeType == "notaskbar") {
- setGlobalVariable("resizetype", "notaskbar");
- } else if (resizeType == "free") {
- setGlobalVariable("resizetype", "free");
- }
- rtn = openInternal("modal",id,"scn",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
- body.setDisabled(false);
- return rtn;
- }
- function getAuthCode(auth) {
- var authCode = "";
- switch (auth.toUpperCase()) {
- case 'R': authCode = "10000000"; break;
- case 'X': authCode = "11000000"; break;
- case 'P': authCode = "11100000"; break;
- default : authCode = "";
- }
- return authCode;
- }
- function openUrl(url,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode) {
- if (userProp == null) {
- userProp = "max:hidden;";
- } else {
- userProp = "max:hidden;" + userProp;
- }
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
- return openInternal("modeless",url,"url",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
- }
- function navigateUrl(url,monNo,xPos,yPos,wid,ref,resultref, authCode) {
-
- var scrnauth = model.getValue(gvAuthPath);
- setGlobalVariable("scrnauth", scrnauth);
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
- return openInternal("replace",url,"url",monNo,xPos,yPos,wid,ref,resultref);
- }
- function modalUrl(url,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos, authCode) {
- if (userProp == null) {
- userProp = "min:hidden;max:hidden;";
- } else {
- userProp = "min:hidden;max:hidden;" + userProp;
- }
- if (authCode == null) {
- setGlobalVariable("spclscrnauth", getAuthCode(""));
- } else {
- setGlobalVariable("spclscrnauth", getAuthCode(authCode));
- }
- return openInternal("modal",url,"url",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
- }
- function openExternal(syscd,id,monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos) {
- var url = getScreenURL(id,syscd);
- setGlobalVariable("systemcode", syscd.toUpperCase());
- var cid = openInternal("modeless",url,"url",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
- setGlobalVariable("systemcode", "");
- return cid;
- }
- function openHtml(url,wid,prop) {
- var rtn = null;
- if (prop == null) {
- rtn = htmlwindow.open(url,wid);
- } else {
- rtn = htmlwindow.open(url,wid,prop);
- }
- return rtn;
- }
- function setWindowSize(){
- var taskbarHeight = 0;
-
- var pageWidth = body.attribute["pagewidth"] == "" ? gvDefaultScrWidth : parseInt(body.attribute["pagewidth"]);
- var pageHeight = body.attribute["pageheight"] == "" ? gvDefaultScrHeight + 16 : parseInt(body.attribute["pageheight"]) + 16;
- var monNo = getCurrentMonitorNumber();
- monNo = parseInt(monNo)-1;
- if (monNo < 0) {
- monNo = 0;
- } else if (monNo == 0) {
- taskbarHeight = gvTaskBarHeight;
- }
-
-
- var captionSize = Math.abs(app.registry("HKEY_CURRENT_USER", "Control Panel\\Desktop\\WindowMetrics", "CaptionHeight" , "STRING"))/15;
-
- var paddedSize = Math.abs(app.registry("HKEY_CURRENT_USER", "Control Panel\\Desktop\\WindowMetrics", "PaddedBorderWidth" , "STRING"))/15;
- var marginWidth = 8 + (paddedSize * 2);
- var marginHeight = ((paddedSize * 2 )+captionSize)+9;
-
-
-
- body.setAttribute("margin-top", 8);
- body.setAttribute("margin-bottom", 8);
-
- var wWidth = pageWidth+marginWidth;
- var wHeight = pageHeight+marginHeight;
-
- var monSize = getMonitorSize(monNo);
- if (monSize[0] < wWidth) {
- wWidth = monSize[0];
- }
- var resizeType = getGlobalVariable("resizetype");
- if (resizeType == "notaskbar") {
-
- if (monSize[1] < wHeight) {
- wHeight = monSize[1];
- if (wWidth < monSize[0]) {
- wWidth += 16;
- }
- }
- } else if (resizeType == "none") {
-
- if (monSize[1] < wHeight + taskbarHeight) {
- wHeight = monSize[1] - taskbarHeight;
-
- if (wWidth < monSize[0]) {
- wWidth += 16;
- }
- }
- } else if (resizeType == "free") {
-
-
-
- }
-
- window.setSize(wWidth, wHeight);
- }
- function setSystemMessage(msg) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fSetStatusMessage != undefined) {
- viewerObj.window.fSetStatusMessage(msg);
- }
- }
- function setScreenLocation(sid,xpos,ypos) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fSetScreenLocation != undefined) {
- viewerObj.window.fSetScreenLocation(sid,xpos,ypos);
- }
- }
- function getScreenLocation(sid) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetScreenLocation != undefined) {
- return viewerObj.window.fGetScreenLocation(sid);
- } else {
- return "";
- }
- }
- function getAbsoluteLocation(mon,xpos,ypos) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetAbsoluteCoordinate != undefined) {
- return viewerObj.window.fGetAbsoluteCoordinate(mon,xpos,ypos);
- } else {
- var abspos = new Array(2);
- abspos[0] = xpos;
- abspos[1] = ypos;
- return abspos;
- }
- }
- function getRelativeCoordinate(xpos,ypos){
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetRelativeCoordinate != undefined) {
- var coord = viewerObj.window.fGetRelativeCoordinate(xpos,ypos);
- coord[0] = coord[0]+1;
- return coord;
- } else {
- var coord = new Array(3);
- coord[0] = 1;
- coord[1] = xpos;
- coord[2] = ypos;
- return coord;
- }
- }
- function getCurrentMonitorNumber() {
- return getRelativeCoordinate(window.left,window.top)[0];
- }
- function getMonitorSize(monNo) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetMonitorSize != undefined) {
- return viewerObj.window.fGetMonitorSize(monNo);
- } else {
- var monSize = new Array(2);
- monSize[0] = 1280;
- monSize[1] = 1024;
- return monSize;
- }
- }
- function addOpenWindow() {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fAddOpenWindow != undefined) {
- viewerObj.window.fAddOpenWindow(getScreenID()+"|"+getMyUID()+"|"+window.type+"|"+getTitle(),window);
- }
- }
- function removeOpenWindow() {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fRemoveOpenWindow != undefined) {
- viewerObj.window.fRemoveOpenWindow(getScreenID()+"|"+getMyUID()+"|"+window.type+"|"+getTitle());
- }
- }
- function getOpenWindow(sid) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj != null && viewerObj.window.fGetOpenWindow != undefined) {
- return viewerObj.window.fGetOpenWindow(sid);
- } else {
- return null;
- }
- }
- function getMainViewer(){
- var viewerObj = getViewer("bizMain");
-
- if ( viewerObj == null )
- {
- viewerObj = htmldocument.allElement.TFViewer1;
- }
- if ( viewerObj == null )
- {
- return null;
- } else{
- return viewerObj.window;
- }
- }
- function getParameterPath() {
- return gvParamPath;
- }
- function setParameter(name, value){
- var valueNode = instance1.selectSingleNode(gvParamPath+"/"+name+"/"+name+"value");
- model.makeValue(gvParamPath+"/"+name+"/"+name+"value", value);
- }
- function addParameter(name, value){
- var valueNode = instance1.selectSingleNode(gvParamPath+"/"+name+"/"+name+"value");
- if(valueNode==null){
- model.makeValue(gvParamPath+"/"+name+"/"+name+"value", value);
- }else{
- var nameNode = instance1.selectSingleNode(gvParamPath+"/"+name);
- valueNode = instance1.createNode("element", name+"value", "");
- valueNode.text = value;
- nameNode.appendChild(valueNode);
- }
- }
- function getParameter(name, index){
- if (index==null) { index = 1; }
- return model.getValue(gvParamPath+"/"+name+"/"+name+"value["+index+"]");
- }
- function getParameterCount(name){
- return new Number(instance1.selectnodes(gvParamPath+"/"+name+"/"+name+"value").length);
- }
- function removeParameter(name, index){
- if (index==null) { index = 1; }
- model.removeNode(gvParamPath+"/"+name+"/"+name+"value["+index+"]");
- }
- function clearParameter(name){
- model.removeNode(gvParamPath+"/"+name);
- }
- function getBizName(bizCode) {
- var firstChar = bizCode.charAt(2);
- var bizName = "";
- switch(firstChar) {
- case 'P':
- case 'p':
- bizName = "pam";
- break;
- case 'M':
- case 'm':
- bizName = "emr";
- break;
- case 'A':
- case 'a':
- bizName = "ast";
- break;
- case 'L':
- case 'l':
- bizName = "lis";
- break;
- case 'R':
- case 'r':
- bizName = "mis";
- break;
- case 'Z':
- case 'z':
- bizName = "com";
- break;
- case 'S':
- case 's':
- bizName = "sts";
- break;
- case 'C':
- case 'c':
- bizName = "crm";
- break;
- case 'I':
- case 'i':
- bizName = "crc";
- break;
- case 'D':
- case 'd':
- bizName = "crd";
- break;
- case 'T':
- case 't':
- bizName = "tmp";
- break;
- default:
- bizName = "";
- break;
- }
- return bizName;
- }
- function getMainDomain() {
- var domainStr = getGlobalVariable("domain");
- if (domainStr == "") {
- domainStr = "http://his999dev.knu.ac.kr:8088";
- }
- return domainStr;
- }
-
- function getDomain(syscd) {
- var domainStr = null;
- if (syscd == null || syscd == "") {
- syscd = model.getValue(gvSystemPath);
- }
- if (syscd == null || syscd == "") {
- domainStr = getMainDomain();
- } else {
- domainStr = getGlobalVariable("sysurl" + syscd.toUpperCase());
- }
- return domainStr;
- }
- function getScreenURL(sid,syscd) {
- return getDomain(syscd)+getScreenURI(sid);
- }
- function getScreenURI(sid) {
- return "/himed/webapps/hit/web/xrw/"+sid+".xrw";
- }
- function getActionURI(submitID) {
- var bizName = getBizName(submitID);
- var scrnID = getScreenID();
- return "/himed/webapps/hit/web/xrw/.live?submit_id="+submitID+"&business_id="+bizName+"&screen_id="+scrnID;
- }
- function getActionURL(submitID) {
- return getDomain()+getActionURI(submitID);
- }
- var gvOnSubmit = false;
- var gvShowAlert = false;
- var gvSuppressError = false;
- var gvForceSubmit = false;
- var gvHtmlRedirect = false;
- var gvSuppressErrorCheck = false;
- function setAlertOn() {
- gvShowAlert = true;
- }
- function setErrorOff(SuppressErrorCheck) {
- gvSuppressError = true;
- if(SuppressErrorCheck == true)
- {
- gvSuppressErrorCheck = true;
- }
- }
- function setErrorOn() {
- gvSuppressError = false;
- gvSuppressErrorCheck = false;
- }
- function setForceOn() {
- gvForceSubmit = true;
- }
- function setHtmlRedirect() {
- gvHtmlRedirect = true;
- }
- function checkTimeout() {
- var timeOut = parseInt(getGlobalVariable("session_timeout"));
- if (isNaN(timeOut) || timeOut <= 0) {
- return false;
- }
- var lastTime = getGlobalVariable("last_submit");
- var curTime = (new Date()).getTime();
- if (curTime - parseInt(lastTime) > (timeOut*60000)) {
- return true;
- } else {
- return false;
- }
- }
- function submit(submitID, refresh, ref, resultref, encoding) {
- var showAlert = gvShowAlert;
- var suppressError = gvSuppressError;
- gvShowAlert = false;
-
- if(gvSuppressErrorCheck == false)
- {
- gvSuppressError = false;
- }
- var islogout = false;
-
- if (!gvForceSubmit) {
- gvForceSubmit = false;
- if (checkTimeout()) {
-
- body.setDisabled(true);
- setParameter("type", "session");
-
- setParameter("islogout", "false");
- modal("SPZUM00400", "", "", "", "", "", "","width:279px;height:180px;align:center;sysmenu:hidden;");
- body.setDisabled(false);
- if (getParameter("islogout") == "true") {
-
- islogout = true;
- } else {
- if (checkTimeout()) {
- gvHtmlRedirect = false;
- return false;
- }
- }
- }
-
- setGlobalVariable("last_submit", (new Date()).getTime());
- }
-
- if (islogout) {
- var status = getViewer("sysMessage");
- status.window.fLogout("session");
- return;
- } else {
-
- if (gvOnSubmit) {
- gvHtmlRedirect = false;
- return false;
- } else {
- gvOnSubmit = true;
- }
-
- var actionURL = getActionURL(submitID)
- + getUserSessionString();
-
- if ( refresh == null ) {
- refresh = true;
- }
-
- var retvalue = false;
-
- try {
- var sid = document.allElement.item(submitID);
- if (!sid) {
- messageBox("Submit["+submitID+"]�� ���ǵ���","E007");
- gvOnSubmit = false;
- gvHtmlRedirect = false;
- return false;
- }
-
-
- if ( ref != null && ref != "" ) {
- sid.setAttribute("ref", ref);
- }
-
- if ( resultref != null && resultref != "" ) {
- sid.setAttribute("resultref", resultref);
- }
-
-
- sid.setAttribute("action", actionURL);
- if (encoding != null && encoding != "") {
- sid.setAttribute("encoding", encoding);
- } else {
- sid.setAttribute("encoding", "utf-8");
- }
-
-
-
- model.removeNode(gvErrorMsgPath);
-
-
- var ret = model.send(submitID, refresh, false, true);
-
- if ( ret == 200 ) {
-
- retvalue = showSystemMessage(showAlert,suppressError);
- } else {
- if (!suppressError) {
- messageBox("Submit["+submitID+"] ������","E009","[ret:"+ret+"]");
- }
- retvalue = false;
- }
- } catch (e) {
- if (!suppressError) {
- messageBox("Submit["+submitID+"] ������","E009","[exception:"+e+"]");
- }
- retvalue = false;
- }
-
- gvOnSubmit = false;
- gvHtmlRedirect = false;
- return retvalue;
- }
- }
- function xforms_submit_error() {
- if (error.errorcode == 3003) {
- messageBox("���� ������ �� ��ȿ���� ���� ���ڰ� �����Ͽ� ȭ�� �����","E009","[errorcode:"+error.errorcode+"]");
- m_event.stopPropagation();
- }
- }
- function showSystemMessage(showAlert,suppressError) {
- var type = model.getValue(gvErrorMsgPath+"/type");
- var code = model.getValue(gvErrorMsgPath+"/code");
- var msg = model.getValue(gvErrorMsgPath+"/msg");
- var desc = model.getValue(gvErrorMsgPath+"/description");
- if ( "error" == type ) {
- if (suppressError == null || !suppressError) {
- body.setDisabled(true);
- window.load("../../../com/commonweb/xrw/SPZZZ00100_�ý��ۿ���.xrw","modal","","width:514px;height:198px;align:center;",gvErrorMsgPath,"/root/main");
- body.setDisabled(false);
- }
- return false;
- } else {
- setSystemMessage(msg);
- if (showAlert != null && showAlert) {
- messageBox(msg,"I");
- }
- return true;
- }
- }
- function onredirecthtml() {
- if( document.allElement.item(m_event.target).elementName == "xforms:submission" && gvHtmlRedirect == false) {
- m_event.preventDefault();
- m_event.stopPropagation();
- }
- gvHtmlRedirect = false;
- }
- function onerror() {
- var msg = error.description;
- var svrtime = error.errorSource;
- var pctime = (new Date()).getTime();
-
- setGlobalVariable("timediff", svrtime - pctime);
- m_event.stopPropagation();
-
- handleSystemMessage(msg);
- }
- function handleSystemMessage(msg) {
-
- var msgItem = msg.split("|");
- model.makeValue(gvErrorMsgPath+"/type",msgItem[0]);
- model.makeValue(gvErrorMsgPath+"/code",msgItem[1]);
- model.makeValue(gvErrorMsgPath+"/msg",msgItem[2].replace(";","\n"),true);
- var description = "";
- if (msgItem[3] != null && msgItem[3] != "undefined") {
- description = msgItem[3];
- }
- if (msgItem[4] != null && msgItem[4] != "undefined") {
- description = description + "\n" + msgItem[4];
- }
- model.makeValue(gvErrorMsgPath+"/description",description);
- }
-
- function getUserSessionString() {
- var sessionStr = "&macaddr="+getUserInfo("macaddr");
- var isAnonymous = getGlobalVariable("anonymous");
- if (isAnonymous == "true") {
- sessionStr = sessionStr + "&anony_session="+encodeURI(getUserInfos());
- }
- return sessionStr;
- }
-
- function messageBox(pMessage, pCode, pOptMsg) {
- var alertMsg = null;
- var msgTitle = null;
- var msgType = null;
- var msgData = null;
- var msgRtn = "";
-
- switch( pCode.substr(0,1) ){
- case "I": msgTitle = "����";
- msgType = "64";
- break;
- case "C": msgTitle = "����";
- msgType = "16";
- break;
- case "E": msgTitle = "���";
- msgType = "48";
- break;
- case "Q": msgTitle = "Ȯ��";
- msgType = "36";
- break;
- case "S": msgTitle = "����";
- msgType = "35";
- break;
- default : msgTitle = "����";
- msgType = "16";
- }
-
- switch( pCode ){
- case "I000": alertMsg = ""; break;
- case "I001": alertMsg = " ó���Ǿ���ϴ�."; break;
- case "I002": alertMsg = " �Ϸ�Ǿ���ϴ�."; break;
- case "I003": alertMsg = " �ʼ��Է��Դϴ�."; break;
- case "I004": alertMsg = " ����ϴ�."; break;
- case "I005": alertMsg = " ȯ���Դϴ�."; break;
- case "I006": alertMsg = " �����մϴ�."; break;
- case "I007": alertMsg = " Ȯ���Ͻʽÿ�."; break;
- case "I008": alertMsg = " �Ͻʽÿ�."; break;
- case "I009": alertMsg = " �Դϴ�."; break;
- case "I010": alertMsg = " �ֽ��ϴ�."; break;
- case "I011": alertMsg = " �ʽ��ϴ�.";break;
- case "C000": alertMsg = ""; break;
- case "C001": alertMsg = " �Է��Ͻʽÿ�."; break;
- case "C002": alertMsg = " �����Ͻʽÿ�."; break;
- case "C003": alertMsg = " �����Ͻʽÿ�."; break;
- case "E000": alertMsg = ""; break;
- case "E001": alertMsg = " �� �� ����ϴ�."; break;
- case "E002": alertMsg = " ������ ����ϴ�."; break;
- case "E003": alertMsg = " �ʰ��Ͽ����ϴ�."; break;
- case "E004": alertMsg = " ��ġ���� �ʽ��ϴ�."; break;
- case "E005": alertMsg = " ���õǾ���ϴ�."; break;
- case "E006": alertMsg = " �ߺ��Ǿ���ϴ�."; break;
- case "E007": alertMsg = " �ʾҽ��ϴ�."; break;
- case "E008": alertMsg = " �Դϴ�."; break;
- case "E009": alertMsg = " �����Ͽ����ϴ�."; break;
- case "E010": alertMsg = " ��� �����մϴ�."; break;
- case "E011": alertMsg = " ���� �����մϴ�."; break;
- case "E012": alertMsg = " ���ĸ� �����մϴ�."; break;
- case "E013": alertMsg = " �����Ͱ� ����ϴ�."; break;
- case "E014": alertMsg = " �������� �ʽ��ϴ�."; break;
- case "E015": alertMsg = " �ڸ������� �����մϴ�."; break;
- case "E016": alertMsg = " ��ȿ���� �ʽ��ϴ�."; break;
- case "Q000": alertMsg = ""; break;
- case "Q001": alertMsg = " ���� �Ͻðڽ��ϱ�?"; break;
- case "Q002": alertMsg = " ���� �Ͻðڽ��ϱ�?"; break;
- case "Q003": alertMsg = " ��� �����Ͻðڽ��ϱ�?"; break;
- case "Q004": alertMsg = " ���� �Ͻðڽ��ϱ�?"; break;
- case "Q005": alertMsg = " ��ȸ �Ͻðڽ��ϱ�?"; break;
- case "Q006": alertMsg = " Ȯ�� �Ͻðڽ��ϱ�?"; break;
- case "Q007": alertMsg = " ��� �Ͻðڽ��ϱ�?"; break;
- case "Q008": alertMsg = " �߰� �Ͻðڽ��ϱ�?"; break;
- case "Q009": alertMsg = " ��� �Ͻðڽ��ϱ�?"; break;
- case "Q010": alertMsg = " �ʱ�ȭ �Ͻðڽ��ϱ�?"; break;
- case "Q011": alertMsg = " Ȯ�� �Ͻðڽ��ϱ�?"; break;
- case "Q012": alertMsg = " ���� �Ͻðڽ��ϱ�?"; break;
- case "Q013": alertMsg = " ���� �Ͻðڽ��ϱ�?";break;
- case "Q014": alertMsg = " ��� �Ͻðڽ��ϱ�?";break;
- case "Q015": alertMsg = " ���û �Ͻðڽ��ϱ�?";break;
- case "Q016": alertMsg = " ����� ������Դϴ�. ��ϳ����� �����Ͻðڽ��ϱ�?";break;
- case "S001": alertMsg = " �Ͻ÷��� ��(Yes)\n�ƴϸ� �ƴϿ�(No)�� �����Ͻʽÿ�."; break;
- case "S002": alertMsg = " �����Ͻ÷��� ��(Yes)\n�����Ͻ÷��� �ƴϿ�(No)�� �����Ͻʽÿ�"; break;
- case "S003": alertMsg = " �Ͻ÷��� ��(Yes)\n" + pOptMsg + " �Ͻ÷��� �ƴϿ�(No)�� �����Ͻʽÿ�.";break;
- case "S004": alertMsg = " �Ͻ÷��� ��(Yes)\n�ƴϸ� �ƴϿ�(No)\n�����Ͻ÷��� ��Ҹ� �����Ͻʽÿ�";break;
- case "S005": alertMsg = " ����� ������Դϴ�. �۾������� �����Ͻʽÿ�\n\n�� : ��ϼ��� / �ƴϿ� : �űԱ�ϻ�";break;
- case "S006": alertMsg = " �Ͻ÷��� ��(Yes)\n" + pOptMsg.split("|")[0] + " �Ͻ÷��� �ƴϿ�(No)\n" + pOptMsg.split("|")[1] + " �Ͻ÷��� ��Ҹ� �����Ͻʽÿ�";break;
- case "S007": alertMsg = " \n���� �Ͻ÷��� ��(Yes), " + pOptMsg.split("|")[0] + " �ƴϿ�(No), " + pOptMsg.split("|")[1] + " ��Ҹ� �����Ͻʽÿ�.";break;
- default : alertMsg = "";
- }
- if(pOptMsg == null || pOptMsg == ""){
- msgData = pMessage+alertMsg;
- } else {
- if (pCode == "S003" || pCode == "S006" || pCode == "S007") {
- msgData = pMessage+alertMsg;
- } else {
- msgData = pMessage+alertMsg + "\n" + pOptMsg;
- }
- }
- body.setDisabled(true);
- msgRtn = window.showMessageBox( msgData, msgTitle, msgType );
- body.setDisabled(false);
- return msgRtn;
- }
- function getUserId() {
- return getUserInfo("userid");
- }
- function getUserName() {
- return getUserInfo("usernm");
- }
- function getUserInfo(key) {
- if ( getGlobalVariable("userinfos") == "" ) {
- setDefaultUserInfo();
- }
- return getGlobalVariable(key);
- }
- function getUserInfos() {
- if ( getGlobalVariable("userinfos") == "" ) {
- setDefaultUserInfo();
- }
- return getGlobalVariable("userinfos");
- }
- function setDefaultUserInfo() {
- var userInfoKeyStr="userid|usernm|posinstcd|posinstnm|posdeptcd|posdeptnm|dutplceinstcd|dutplceinstnm|dutplcecd|dutplcenm|jobkindcd|jobkindnm|jobposcd|jobposnm|jobrespcd|jobrespnm|prfshipflagcd|prfshipflagnm|licnsno|specordyn|deptabbr|orddeptflag|wardflag|systemcd|systemnm|systeminstcd|systeminstnm|logindt|kmiip|kmiport|usergrp|ipaddr|dutinstcd|dutinstnm|dutunitcd|dutunitnm|mpphonno|orginstcd|orginstnm|orgdeptcd|orgdeptnm|userkindcd|ordsupdeptcd";
- var userInfoKeyArr = userInfoKeyStr.split("|");
- var userInfoStr = "";
- try {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var f = fso.GetFile("session.txt");
- var ts = f.OpenAsTextStream(1);
- userInfoStr = ts.ReadLine();
- ts.Close();
- } catch(e) {
- }
- var userInfoArr = userInfoStr.split("|");
- var len = userInfoKeyArr.length;
- setGlobalVariable("anonymous","true");
- for(i=0;i<len;i++) {
- setGlobalVariable(userInfoKeyArr[i],userInfoArr[i]);
- }
- setGlobalVariable("userinfos", userInfoStr);
- }
- function getPropertyName(key, bizCode){
- var bizName = "";
- var propertyName = "";
- if (bizCode == null || bizCode == "" || bizCode == "undefined")
- {
- bizName = "";
- }else{
- bizName = getBizName(bizCode)+"_";
- }
- return getSystemCd()+"_"+bizName+"gsv_"+key;
- }
- function setGlobalVariable(key, value, bizCode){
- model.setProperty(getPropertyName(key, bizCode), value);
- return true;
- }
- function getGlobalVariable(key, bizCode){
- return model.getProperty(getPropertyName(key, bizCode));
- }
- function getUserGroupList() {
- var usergrp = getUserInfo("usergrp");
- if (usergrp == null || usergrp == "") {
- return null;
- } else {
- return usergrp.split(",");
- }
- }
- function checkUserGroup(grpname) {
- var usergrplist = getUserGroupList();
- if (usergrplist == null) {
- return false;
- }
- for(var i=0;i<usergrplist.length;i++) {
- if (grpname == usergrplist[i]) {
- return true;
- }
- }
- return false;
- }
- function setPatientInfo(key, value) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- if ( key != "pid" && value.split("|")[0] == getPatientId()){
- return viewerObj.window.fSetPatientInfo(key, value.split("|")[1]);
- }else{
- return viewerObj.window.fSetPatientInfo(key, value);
- }
- }
- return false;
- }
- function setPatientInfos(values){
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fSetPatientInfos(values);
- }
- return false;
- }
- function delPatientInfos(){
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fDelPatientInfos();
- }
- return false;
- }
- function getPatientInfo(key) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fGetPatientInfo(key);
- }
- return "";
- }
- function getPatientInfos() {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fGetPatientInfos();
- }
- return "";
- }
- function getPatientId() {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fGetPatientId();
- }
- return "";
- }
- function getPatientName() {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fGetPatientName();
- }
- return "";
- }
- function setPatientFlag(value){
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- return viewerObj.window.fSetPatientFlag(value);
- }
- return false;
- }
- function setPatientInfoDetail(srcPath){
- var viewerObj = getViewer("patientInfo");
- var srcPath = instance1.selectSingleNode(srcPath);
- if ( viewerObj != null && srcPath != null){
- var destPath = viewerObj.window.fGetPatientInfoPath();
- if( destPath != ""){
- viewerObj.window.model.makeNode(destPath);
- viewerObj.window.model.copyNode(destPath, srcPath);
- return viewerObj.window.fCheckPatientId(destPath, "paminfo");
- }else{
- messageBox("ȯ�ڱ�����","E014");
- }
- }
- return false;
- }
- function setPatientInfoDetailByKey(key, value) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- if (key == "pid") {
- return viewerObj.window.fSetPatientInfoDetailByKey(key, value);
- } else {
- if (value.split("|")[0] == getPatientId()) {
- return viewerObj.window.fSetPatientInfoDetailByKey(key, value.split("|")[1]);
- }
- }
- }
- return false;
- }
- function getPatientInfoDetail(key) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null ){
- return viewerObj.window.fGetPatientInfoDetail(key);
- }
- return "";
- }
- function getPatientInfoDetails(destPath) {
- var viewerObj = getViewer("patientInfo");
- var destPath = instance1.selectSingleNode(destPath);
- if ( viewerObj != null && destPath != null){
- srcPath = viewerObj.window.fGetPatientInfoPath();
- if(srcPath != ""){
- srcPath = viewerObj.window.instance1.selectSingleNode(srcPath);
- if(srcPath != null){
- model.copyNode(destPath, srcPath);
- return true;
- }
- }
- }
- return false;
- }
- function setOperationInfo(srcPath){
- var viewerObj = getViewer("patientInfo");
- var srcPath = instance1.selectSingleNode(srcPath);
- if ( viewerObj != null && srcPath != null){
- viewerObj.window.model.makeNode(gvOperationInfoPath);
- viewerObj.window.model.copyNode(gvOperationInfoPath, srcPath);
- return viewerObj.window.fCheckPatientId(gvOperationInfoPath, "operation");
- }
- return false;
- }
- function setOperationInfoDetailByKey(key, value) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- if (key == "pid") {
- return viewerObj.window.fSetOperationInfoDetailByKey(key, value);
- } else {
- if (value.split("|")[0] == getPatientId()) {
- return viewerObj.window.fSetOperationInfoDetailByKey(key, value.split("|")[1]);
- }
- }
- }
- return false;
- }
- function getOperationInfo(key){
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- return viewerObj.window.fGetOperationInfo(key);
- }
- return "";
- }
- function getOperationInfos(destPath){
- var viewerObj = getViewer("patientInfo");
- var destPath = instance1.selectSingleNode(destPath);
- if ( viewerObj != null && destPath != null){
- var srcPath = viewerObj.window.instance1.selectSingleNode(gvOperationInfoPath);
- if(srcPath != null){
- model.copyNode(destPath, srcPath);
- return true;
- }
- }
- return false;
- }
- function setConsultInfo(srcPath){
- var viewerObj = getViewer("patientInfo");
- var srcPath = instance1.selectSingleNode(srcPath);
- if ( viewerObj != null && srcPath != null){
- viewerObj.window.model.makeNode(gvConsultInfoPath);
- viewerObj.window.model.copyNode(gvConsultInfoPath, srcPath);
- return viewerObj.window.fCheckPatientId(gvConsultInfoPath, "consult");
- }
- return false;
- }
- function setConsultInfoDetailByKey(key, value) {
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- if (key == "pid") {
- return viewerObj.window.fSetConsultInfoDetailByKey(key, value);
- } else {
- if (value.split("|")[0] == getPatientId()) {
- return viewerObj.window.fSetConsultInfoDetailByKey(key, value.split("|")[1]);
- }
- }
- }
- return false;
- }
- function getConsultInfo(key){
- var viewerObj = getViewer("patientInfo");
- if ( viewerObj != null){
- return viewerObj.window.fGetConsultInfo(key);
- }
- return "";
- }
- function getConsultInfos(destPath) {
- var viewerObj = getViewer("patientInfo");
- var destPath = instance1.selectSingleNode(destPath);
- if ( viewerObj != null && destPath != null){
- var srcPath = viewerObj.window.instance1.selectSingleNode(gvConsultInfoPath);
- if(srcPath != null){
- model.copyNode(destPath, srcPath);
- return true;
- }
- }
- return false;
- }
- function getOrderBasicInfo(destPath){
- var viewerObj = getViewer("sysMessage");
- var destPath = instance1.selectSingleNode(destPath);
- if ( viewerObj != null && destPath != null){
- var srcPath = viewerObj.window.instance1.selectSingleNode(gvOrderBasicInfoPath);
- if(srcPath != null){
- model.copyNode(destPath, srcPath);
- return true;
- }
- }
- return false;
- }
- function exeReportPreview(rid, dataType, paramsXPath, submitId, print, printDialog, fileType, fileName, fileDialog, closeYn, monNo, parentObjId, printPaperBin, userService, showButton, printCount, zoomRate, printOption, dataXPath, mainDataXPath, subDataXPath)
- {
- var reportNode = instance1.selectSingleNode(gvReportPath);
-
- var syscd = getSystemCd();
- syscd = syscd.substr(3,3);
-
- if(syscd == "") syscd = "001";
-
- if(reportNode != null){
- model.removeNodeset(gvReportPath);
- }
- model.makeNode(gvReportPath);
- model.makeNode(gvReportParamsPath);
- model.makeNode(gvReportPropsPath);
- model.makeNode(gvReportOptionsPath);
- paramsXPath = instance1.selectSingleNode(paramsXPath);
- if(paramsXPath != null){
- model.copyNode(gvReportParamsPath, paramsXPath);
- }
- model.makeValue(gvReportParamsPath+"/userid", getUserId());
- model.makeValue(gvReportParamsPath+"/logoimgurl", getImageURL("error_logo"+getLogoImageKey()));
- model.makeValue(gvReportParamsPath+"/url", rid);
- model.makeValue(gvReportPropsPath+"/rex_rptname", rid);
- model.makeValue(gvReportPropsPath+"/rex_datatype", dataType);
- model.makeValue(gvReportPropsPath+"/rex_submitid", submitId);
- model.makeValue(gvReportPropsPath+"/rex_userservice", userService);
- model.makeValue(gvReportPropsPath+"/rex_data_xpath", dataXPath);
- model.makeValue(gvReportPropsPath+"/rex_xpath", mainDataXPath);
- model.makeValue(gvReportPropsPath+"/rex_xpath1", subDataXPath);
- model.makeValue(gvReportOptionsPath+"/rex_print", print);
- model.makeValue(gvReportOptionsPath+"/rex_printdialog", printDialog);
- model.makeValue(gvReportOptionsPath+"/rex_printpaperbin", printPaperBin);
- model.makeValue(gvReportOptionsPath+"/rex_filetype", fileType);
- model.makeValue(gvReportOptionsPath+"/rex_filename", fileName);
- model.makeValue(gvReportOptionsPath+"/rex_filedialog", fileDialog);
- model.makeValue(gvReportOptionsPath+"/rex_close", closeYn);
- model.makeValue(gvReportOptionsPath+"/rex_showbutton", showButton);
- model.makeValue(gvReportOptionsPath+"/rex_printcount", printCount);
- model.makeValue(gvReportOptionsPath+"/rex_zoomrate", zoomRate);
- model.makeValue(gvReportOptionsPath+"/rex_printoption", printOption);
- if(parentObjId == null || parentObjId == ""){
- if(document.allElement.item("ivr_report") == null){
-
- setParameter("onready","true");
- modal("SPZUR00100", monNo);
- }else{
-
- ivr_report.window.fInitRexpert();
- }
- }else{
- var parentObj = document.allElement.item(parentObjId);
- if(parentObj != null){
- var childObj = document.allElement.item("ivr_"+parentObjId);
- if(childObj != null){
- childObj.window.fInitRexpert();
- }
- }
- }
- }
- function makeReportPreview(left, top, width, height, parentObjId){
- if(left==null || top==null || width==null || height==null){
- messageBox("�̸����� ũ��������", "I004");
- }else{
- if(parentObjId == null || parentObjId == ""){
- if(document.allElement.item("ivr_report") == null){
- if(document.allElement.item("grp_biz") == null){
- body.createChild("xforms:iviewer", "id:ivr_report; src:../../../com/commonweb/xrw/SPZUR00100_���?.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
- "px;");
- }else{
- grp_biz.createChild("xforms:iviewer", "id:ivr_report; src:../../../com/commonweb/xrw/SPZUR00100_���?.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
- "px;");
- }
- }
- }else{
- var parentObj = document.allElement.item(parentObjId);
- if(parentObj != null){
- parentObj.createChild("xforms:iviewer", "id:ivr_"+parentObjId+"; src:../../../com/commonweb/xrw/SPZUR00100_���?.xrw; left:"+left+"px; top:"+top+"px; width:"+width+"px; height:"+height+
- "px;");
- childObj = document.allElement.item("ivr_"+parentObjId);
- }
- }
- }
- }
- function resetReportPreview(parentObjId){
- if(parentObjId == null || parentObjId == ""){
- if(document.allElement.item("ivr_report") == null){
- var child = getChildWindow("SPZUR00100");
- if(child != null){
- child.fCloseReport();
- }
- }else{
- ivr_report.window.fCloseReport();
- }
- }else{
- var parentObj = document.allElement.item(parentObjId);
- if(parentObj != null){
- childObj = document.allElement.item("ivr_"+parentObjId);
- if(childObj != null){
- childObj.window.fCloseReport();
- }
- }
- }
- }
- function removeReportPreview(parentObjId){
- if(parentObjId == null || parentObjId == ""){
- if(document.allElement.item("ivr_report") != null){
- parentObjId = document.allElement.item("ivr_report").parent.attribute["id"];
- document.allElement.item(parentObjId).removeChild("ivr_report");
- }
- }else{
- var parentObj = document.allElement.item(parentObjId);
- if(parentObj != null){
- parentObj.removeChild("ivr_"+parentObjId);
- }
- }
- }
- function screenPrint(){
- modal("SPZUR00200");
- }
- function getImageURL(imgcd, type){
- if (type == null || type == "") {
- type = "gif";
- }
- return getDomain()+"/himed/webapps/com/commonweb/images/"+imgcd+"." + type;
- }
- function getLogoImageURL(syscd){
- return getImageURL("logo"+getLogoImageKey(syscd));
- }
- function getLogoEImageURL(syscd){
- return getImageURL("logo"+getLogoImageKey(syscd)+"e","jpg");
- }
- function getBigLogoImageURL(type, syscd) {
- if (type.toUpperCase() == "H") {
- type == "";
- } else if (type.toUpperCase() == "E") {
- type = "e";
- }
- return getImageURL("biglogo" + getLogoImageKey(syscd) + type, "jpg");
- }
- function getLogoImageKey(syscd){
- var imageKey = "";
- if(syscd == null || syscd == ""){
- syscd = getSystemCd();
- }
- if(syscd.toUpperCase() == "MIS001") {
- imageKey = getUserInfo("dutplceinstcd");
- }else{
- imageKey = syscd.substr(3,3);
- }
-
- return imageKey;
- }
- function openLoadingBar(msg){
- setParameter("msg", msg);
- open("SPZZZ00400", "", "", "", "", "", "","width:327px; height:121px; caption:hidden; resize:false;");
-
-
- }
- function closeLoadingBar(){
- var child = getChildWindow("SPZZZ00400");
- if(child != null) {
- child.close();
- }
- }
- function openPasswordValidate(titlemsg, helpMsg){
- setParameter("titlemsg", titlemsg);
- setParameter("helpmsg", helpMsg);
- modal("SPZUM00400", "", "", "", "", "", "","width:280px;height:270px;align:center;");
- return getParameter("pwdvalid");
- }
- var gvCommonCachePath="/root/hidden/common/cache";
- function copyFromCache(itemname,resultref) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj == null) {
- return false;
- }
-
- var srcPath = gvCommonCachePath+"/"+itemname;
- model.makeNode(resultref);
-
- var itemnode = viewerObj.window.instance1.selectSingleNode(srcPath);
- if (itemnode == null) {
- return false;
- } else {
-
- var dueDate = itemnode.getAttribute("duedate");
- var curDate = (new Date()).valueOf();
- if (dueDate < curDate) {
- return false;
- }
- }
-
- model.copyNode(resultref,itemnode);
- return true;
- }
- function storeIntoCache(itemname,resultref,duemin) {
- var viewerObj = getViewer("sysMessage");
- if (viewerObj == null) {
- return;
- }
- var destPath = gvCommonCachePath+"/"+itemname;
- viewerObj.window.model.makeNode(destPath);
-
- var itemnode = instance1.selectSingleNode(resultref);
- if (itemnode == null) {
- return;
- }
-
- viewerObj.window.model.copyNode(destPath,itemnode);
- itemnode = viewerObj.window.instance1.selectSingleNode(destPath);
- if (itemnode != null) {
- var dueDate = (new Date()).valueOf();
- if (duemin == null) {
- duemin = 600;
- }
- dueDate = dueDate + duemin*60*1000;
- itemnode.setAttribute("duedate",dueDate);
- }
- }
- function setHelp(width, height, scnID) {
- if (width == null || width == "" || width == "undefined") {
- width = "800";
- }
- if (height == null || height == "" || height == "undefined") {
- height = "600";
- }
- if (scnID == null || height == "" || scnID == "undefined") {
- scnID = getScreenID();
- }
- setParameter(scnID + "_help_width", width);
- setParameter(scnID + "_help_height", height);
- }
- function getHelpPage() {
-
- var scnID = getScreenID();
-
-
-
- if (getSystemCd().substring(0, 3).toUpperCase() == "DEV") {
- alert("�ش� ȯ�濡���� �¶��ε����� �������� �ʽ��ϴ�.\n\n�ڡ� ���� ȯ�� �ڡ�\n1. ���� HIS(his012dev)\n2. ���� MIS(mis001dev)\n3. ���� CRM(crm001dev)\n4. ���� HIS(his012edu)\n5. ���� MIS(mis001edu)\n6. � HIS(his012)\n7. � MIS(mis001)");
- return;
- }
-
- if (gvHelpPage == null || gvHelpPage.closed) {
- gvHelpPage = openHtml(getDomain() + "/docs/help/" + getBizName(scnID) + "/" + scnID + ".htm","Help","scrollbars=yes,toolbar=no,width=800,height=600");
- } else {
- gvHelpPage.focus();
- }
- }
- function openEmrScrn(scrnid){
- setParameter("SPMMB08400_scrnid", scrnid);
- modal("SPMMB08400", 1, 0, 0, "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- return true;
- }
- function download(submitid, param, localfile, showui) {
- if (showui == null) {
- showui = true;
- }
-
- model.download(encodeURI(getActionURL(submitid) + param), localfile, showui);
- }
- function DOMActivate(){
-
- if(checkOpener()){
- if(opener.getParameter("domactivate") == "true"){
- var btnobj = document.allElement.item(m_event.target);
- var btnid = btnobj.attribute["id"];
- if(btnid.substring(0, 4) == "btn_"){
- opener.addBtnID(btnid);
- }
- }
- }
- }
- function btnObj(btnID, btnTxt){
- this.btnID = btnID;
- this.btnTxt = btnTxt;
- }
- function getBtnCtrlInfo(){
- var cnt = 0;
- var ctrlID;
- var loopcnt = document.controls.length;
- var btnCtrlArr = new Array();
- for(var i = 0; i < loopcnt; i++){
- ctrlID = document.controls.item(i);
- if(ctrlID.attribute["class"].substring(0, 3)=="btn"){
- btnCtrlArr[cnt] = new btnObj(ctrlID.attribute["id"], ctrlID.attribute["text"]);
- cnt++;
- }
- }
-
- return btnCtrlArr;
- }
-
- function grdBaseColHidn(option, grd_obj, colnm_size, colnm_vol1, colnm_qty1, colnm_vol2, colnm_qty2, colnm_size_qty) {
- var hardcd = "";
- var sysMessageobj = getViewer("sysMessage");
- if (sysMessageobj != null) {
- hardcd = sysMessageobj.window.instance1.selectSingleNode("/root/properties/orderbasicinfo/hardcdlist/hardcd[hardcdno='230']/hardcd").text;
- }
-
- if (option == null || option == "" || option == "undefined") {
- option = hardcd;
- }
- if (colnm_size == null || colnm_size == "" || colnm_size == "undefined") {
- sColnm_size = 37;
- } else {
- sColnm_size = colnm_size;
- }
-
- if (grd_obj == null || grd_obj == "" || grd_obj == "undefined") {
- sGrd_objnm = "grd_prcplist";
- } else {
- sGrd_objnm = grd_obj;
- }
-
- if (colnm_vol1 == null || colnm_vol1 == "" || colnm_vol1 == "undefined") {
- sColnm_vol1 = "prcpvol";
- } else {
- sColnm_vol1 = colnm_vol1
- }
-
- if (colnm_qty1 == null || colnm_qty1 == "" || colnm_qty1 == "undefined") {
- sColnm_qty1 = "prcpqty";
- } else {
- sColnm_qty1 = colnm_qty1
- }
-
- if (colnm_vol2 == null || colnm_vol2 == "" || colnm_vol2 == "undefined") {
- sColnm_vol2 = "drprcpetc7";
- } else {
- sColnm_vol2 = colnm_vol2;
- }
-
- if (colnm_qty2 == null || colnm_qty2 == "" || colnm_qty2 == "undefined") {
- sColnm_qty2 = "drprcpetc8";
- } else {
- sColnm_qty2 = colnm_qty2;
- }
-
- if (colnm_size_qty == null || colnm_size_qty == "" || colnm_size_qty == "undefined") {
- sColnm_size_qty = sColnm_size;
- } else {
- sColnm_size_qty = colnm_size_qty;
- }
-
-
- if (option =="A") {
-
- if (grd_obj == null || grd_obj == "" || grd_obj == "undefined") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), false);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), sColnm_size_qty);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), sColnm_size_qty);
- }
-
- } else if (option =="B") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), true);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), sColnm_size_qty);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), 0);
-
- } else if (option =="C") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), false);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), sColnm_size_qty);
-
- } else if (option =="D") {
-
- return hardcd
- } else if (option =="E") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), true);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), 0);
- } else if (option =="F") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), false);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), sColnm_size);
- } else if (option =="G") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), true);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), sColnm_size_qty);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), 0);
- } else if (option =="H") {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), false);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), sColnm_size_qty);
- } else {
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), false);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), true);
- document.allElement.item(sGrd_objnm).setColHidden(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), true);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol1), sColnm_size);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty1), sColnm_size_qty);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_vol2), 0);
- document.allElement.item(sGrd_objnm).setColWidth(document.allElement.item(sGrd_objnm).colRef(sColnm_qty2), 0);
- }
- }
- function fPrintRexbar(rexnm, closeYn, printCount, dataXPath, paramsXPath, infoXPath){
- var posx = '';
- var posy = '';
- var printnm = '';
-
- if(infoXPath == "" || infoXPath == "undefined" || infoXPath == null) infoXPath = "/root/main/barcdprntsetup/prntsetupinfo";
- if(model.getValue(infoXPath + "/setupinfo/rexgbn") != "1") return false;
- try{
- if(model.getXpathValue("count(" + infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/barnm)") > "0"){
- posx = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/xpos");
- posy = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/ypos");
- printnm = model.getValue(infoXPath + "/setupinfo/pcl/pcllist[barnm='"+rexnm+"']/prtnm");
- }else{
- posx = model.getValue(infoXPath + "/setupinfo/blank/left");
- posy = model.getValue(infoXPath + "/setupinfo/blank/top");
- printnm = model.getValue(infoXPath + "/setupinfo/comm01/setupval");
- }
- if(posx == '') posx = "0";
- if(posy == '') posy = "0";
-
- if(closeYn == "true") printnm = "";
- exeReportPreview(rexnm, 'XMLSTR', paramsXPath, '', printnm,
- '', '', '', '', '',
- '', '', '', '', '',
- printCount, '', 'offsetx=' + posx + ';offsety=' + posy + ';', dataXPath, '',
- '');
- }
- catch(e){
- alert("��½� ���� ���Ͽ����ϴ�\n" + e);
- return true;
- }
-
- return true;
- }
|