/** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @desc : ???? ?????? * @ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ model.setValue("/root/main/imginfo/imgefromdt", getCurrentDate()); model.setValue("/root/main/imginfo/imgetodt","99991231"); model.refresh(); } function fremoveBlank(str){ str = str.replace(/\s/g,''); return str; } /** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @type : function * @access : public * @desc : ?????? ???? ???? * @param : * @return : * @--------------------------------------------------- */ function fSearch(){ // ¿ÂÀüÇÑ´Ü¾î °Ë»ö var cond = model.getValue("/root/main/cond"); // ÇѱÛÀº 1±ÛÀÚ,¿µ¾î´Â2±ÛÀÚ ÀÌ»ó Á¶È¸ var reqdata = model.getValue("/root/main/cond/reqdata"); if(cond !="word") { if(ipt_srchnm.currentText.length < 2) { if(reqdata.charCodeAt(0) > 255) { } else { messageBox(radio1.label +" 2ÀÚ¸® ÀÌ»ó", "C001"); return; } } } /* var tmpStr = model.getValue("/root/main/cond/reqdata"); var tmpStr2 = model.getValue("/root/main/cond/reqdata"); tmpStr = fremoveBlank(tmpStr); model.makeValue("/root/main/cond/reqdata", tmpStr); model.copyNode("/root/send/reqdata", "/root/main/cond"); */ model.removenodeset("/root/main/list"); //if(model.getValue("/root/main/cond/imgenm") != ""){ var reqflag = model.getValue("/root/main/cond/reqflag") if(reqflag == "imgcd") { var sCode = model.getValue("/root/main/cond/reqdata"); var sTmp = ""; var iTmp = 0; // À̹ÌÁöÄÚµå ÀԷ½à ÀÚ¸´¼ö ä¿öÁØ´Ù var iCodeLength = sCode.length; if(iCodeLength ==0){ return; }else if(iCodeLength > 10){ return; } //var temp = 10 - iCodeLength // 2009-08-10 À̰æÈñ // µÞÀÚ¸® 3ÀÚ¸®(ÀÌ·ÂÄÚµå)¸¦ »©°í °Ë»öÇÔ. var temp = 7 - iCodeLength; for(var i = 1; i <= temp; i++){ sTmp += "0"; } sTmp = sTmp + sCode; model.setValue("/root/main/cond/reqdata",sTmp); } else { if(model.getValue("/root/main/cond/reqdata") == "") { model.makeValue("/root/main/cond/reqdata", "%"); } } /* if(model.getValue("/root/main/cond/reqflag/imgenm") != ""){ model.makeValue("/root/send/imgenm", model.getValue("/root/main/cond/imgenm")); }else{ model.makeValue("/root/send/imgenm", "%"); } model.makeValue("/root/send/reqstatus",model.getValue("/root/main/cond/reqstatus")); submit("TRMRF00401"); model.removenodeset("/root/send/imgenm"); */ ///////////////////////////// //debugger; var imgnm = model.getValue("/root/main/cond/reqdata"); model.setValue("/root/main/cond/reqdata", imgnm); //model.setValue("/root/main/cond/reqdata", imgnm.toUpperCase()); copyNode(model, model, "/root/send", "/root/main/cond"); submit("TRMRF00401"); model.removenodeset("/root/send"); if(reqflag == "imgnm") { //model.setValue("/root/main/cond/reqdata", ""); model.refresh(); } } /** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @type : function * @access : public * @desc : ?????? ???? ?????? * @param : * @return : * @--------------------------------------------------- */ function fClearImgInfo(){ var xPath ="/root/main/imginfo"; model.setValue(xPath+"/imgecd",""); model.setValue(xPath+"/imgenm",""); model.setValue(xPath+"/anatclsseq",""); model.setValue(xPath+"/imgefromdt",getCurrentDate()); model.setValue(xPath+"/imgetodt","99991231"); model.setValue(xPath+"/fstrgstrnm",""); model.setValue(xPath+"/fstrgstdt",""); model.setValue(xPath+"/updtresncnts",""); model.setValue(xPath+"/rem",""); model.setValue(xPath+"/imgedata",""); model.setValue(xPath+"/deptcd",""); model.refresh(); } function fClearInfo() { var xPath ="/root/main/imginfo"; model.setValue(xPath+"/status","i"); model.setValue(xPath+"/imgecd",""); model.setValue(xPath+"/deptcd",""); model.setValue(xPath+"/imgecnts",""); model.setValue(xPath+"/imgenm",""); model.setValue(xPath+"/updtresncnts",""); model.setValue(xPath+"/anatclsseq",""); model.setValue(xPath+"/imgefromdt", ""); model.setValue(xPath+"/imgetodt",""); //model.setValue(xPath+"/fstrgstrnm",getUserName()); model.setValue(xPath+"/rem",""); model.setValue(xPath+"/imgedata",""); model.setValue(xPath+"/fstrgstdt",""); model.setValue(xPath+"/fstrgstrid", ""); model.setValue(xPath+"/fstrgstrnm", ""); //model.setValue(xPath+"/instcd", model.getValue("/root/main/userinfo/dutplcd")); model.setValue(xPath+"/lastupdtrid", ""); model.setValue(xPath+"/lastupdtrnm", ""); model.setValue(xPath+"/lastupdtdt", ""); model.setValue(xPath+"/idximgenm",""); model.setValue(xPath+"/imgeclscd", ""); model.setValue(xPath+"/depthnm1", ""); model.setValue(xPath+"/depthnm2", ""); model.setValue(xPath+"/depthnm3", ""); model.setValue(xPath+"/deptnm", ""); model.setValue(xPath+"/anatclsseq", ""); model.setValue(xPath+"/imgeclscd", ""); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : * @--------------------------------------------------- * @type : function * @access : public * @desc : ?????? ???? ???? * @param : * @return : * @--------------------------------------------------- */ function fSetImgelist(){ fSetCtrlDisabled(false); model.makeValue("/root/main/imginfo/status" , "u"); model.setValue("/root/main/imginfo/lastupdtrid", model.getValue("/root/main/userinfo/userid")); model.setValue("/root/main/imginfo/lastupdtrnm", model.getValue("/root/main/userinfo/usernm")); model.setValue("/root/main/imginfo/lastupdtdt",getCurrentDate()); iRow = grd_imglist.row; if(iRow < 1){ return; } grd_imglist.rowStatus(iRow) = 2; fSetCtrlDisabled(false); model.setFocus("ipt_unitnm"); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @type : function * @access : public * @desc : ?????? ???? ???? * @param : * @return : * @--------------------------------------------------- */ function fSave(){ var imgenm = model.getValue("/root/main/imginfo/imgenm"); if(imgenm == "" || imgenm== null){ return; } var status = model.getValue("/root/main/imginfo/status"); if(status == "u"){ //2009.01.22 °­ÁöÈÆ ¼öÁ¤ //º¯°æÀÌ·ÂÀ» ³²±âÁö ¾Ê°í Update. var ret = messageBox("º¯°æ ÀÌ·ÂÀ» ÀúÀå", "S001"); if(ret == "6"){ model.makeValue("/root/main/imginfo/histsaveyn", "Y"); } else if(ret == "7"){ model.makeValue("/root/main/imginfo/histsaveyn", "N"); } else{ return; } } // ´ë¹®ÀÚ º¯°æ var tmpStr = fremoveBlank(imgenm); var idximgenm = tmpStr.toUpperCase(); model.setValue("/root/main/imginfo/idximgenm", idximgenm); var xPath = "/root/main/imginfo"; model.setValue("/root/main/cond/reqdata",""); model.makeValue("/root/send/imginfo",""); // Int?? data?? Null?? ???? ???? 0???? ???? if(model.getValue("/root/main/imginfo/imgeclscd") == ""){ model.setValue("/root/main/imginfo/imgeclscd", 0); } if(model.getValue("/root/main/imginfo/partlrgclscd") == ""){ model.setValue("/root/main/imginfo/partlrgclscd", 0); } if(model.getValue("/root/main/imginfo/partmdlclscd") == ""){ model.setValue("/root/main/imginfo/partmdlclscd", 0); } if(model.getValue("/root/main/imginfo/partsmlclscd") == ""){ model.setValue("/root/main/imginfo/partsmlclscd", 0); } model.copyNode("/root/send/imginfo","/root/main/imginfo"); submit("TXMRF00401"); /* model.removenodeset("/root/main/list"); */ messageBox("ÀúÀåÀÌ", "I002"); fClearInfo(); model.removenodeset("/root/send/imginfo"); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @type : function * @access : public * @desc : ?????? ???? ???? * @param : * @return : * @--------------------------------------------------- */ function fSave_Old(){ var imgenm = model.getValue("/root/main/imginfo/imgenm"); if(imgenm == "" || imgenm== null){ return; } // ´ë¹®ÀÚ º¯°æ var idximgenm = imgenm.toUpperCase(); model.setValue("/root/main/imginfo/idximgenm", idximgenm); var xPath = "/root/main/imginfo"; model.setValue("/root/main/cond/reqdata",""); model.makeValue("/root/send/imginfo",""); // Int?? data?? Null?? ???? ???? 0???? ???? if(model.getValue("/root/main/imginfo/imgeclscd") == ""){ model.setValue("/root/main/imginfo/imgeclscd", 0); } if(model.getValue("/root/main/imginfo/partlrgclscd") == ""){ model.setValue("/root/main/imginfo/partlrgclscd", 0); } if(model.getValue("/root/main/imginfo/partmdlclscd") == ""){ model.setValue("/root/main/imginfo/partmdlclscd", 0); } if(model.getValue("/root/main/imginfo/partsmlclscd") == ""){ model.setValue("/root/main/imginfo/partsmlclscd", 0); } model.copyNode("/root/send/imginfo","/root/main/imginfo"); submit("TXMRF00401"); model.removenodeset("/root/main/list"); fClearImgInfo(); model.removenodeset("/root/send/imginfo"); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ?????? * @--------------------------------------------------- * @type : function * @access : public * @desc : ???? ???? * @param : * @return : * @--------------------------------------------------- */ function fOpenFile(){ var file =openImageFileDialog(1048576); // image ?????? ???? ???? submit ?????? ???? ????(5??????) ???????? ?????? ???????? ???? ????????. if (file == "") { return; } img_hidden.src=file; // ???????? ???? ???????? base64 encoding ???? ???????? ???? ?????? ?????? var data = img_hidden.getbase64data(); // base64 encoding ???????? ????????. model.setValue("/root/main/imginfo/imgedata",data,true); // ???????? ???????? ?????? view?? ?????????????? ref instance?? ???? ???? setImageRefInstance("/root/main/imginfo/imgedata"); model.refresh(); } function fAppImgToPltte(destGrdID, srcGrdID, curRow) { var destModel = null; var destGrd = null; var srcGrd = null; if(isPopup()) { destModel = opener.model; destGrd = opener.document.controls(destGrdID); } else { destModel = model; destGrd = document.controls(destGrdID); } srcGrd = document.controls(srcGrdID); if(destGrd == null || srcGrd == null) return; if(curRow == null) { curRow = srcGrd.row - srcGrd.fixedRows + 1; } if(curRow < 1){ return; } var cnt = destModel.instances(0).selectNodes(destGrd.attribute("nodeset")).length + 1; var destPath = destGrd.attribute("nodeset") + "[" + cnt + "]"; var srcPath = srcGrd.attribute("nodeset") + "[" + curRow + "]"; //var degnitemseqno = destModel.getXPathValue("max(" + destPath + "/degnitemseqno)"); var formdegnseqno = destModel.getValue("/root/main/FormDegnInfo/FormDegn/formdegnseqno"); var degnitemseqno = destModel.getXPathValue("max(" + destGrd.attribute("nodeset") + "/degnitemseqno)"); if(degnitemseqno == "NaN") degnitemseqno = 1; else degnitemseqno = parseInt(degnitemseqno) + 1; var degnitemrowno = destModel.getXPathValue("max(" + destGrd.attribute("nodeset") + "/degnitemrowno)"); if(degnitemrowno == "NaN") degnitemrowno = 1; else degnitemrowno = parseInt(degnitemrowno) + 1; destModel.makeValue(destPath + "/degnitemcd", model.getValue(srcPath + "/imgcd")); destModel.makeValue(destPath + "/termcd", ""); destModel.makeValue(destPath + "/degnitemtype", "IMG"); destModel.makeValue(destPath + "/degntermnm", model.getValue(srcPath + "/imgenm")); destModel.makeValue(destPath + "/degnvallistno", ""); destModel.makeValue(destPath + "/formdegnseqno", formdegnseqno); destModel.makeValue(destPath + "/chk", ""); destModel.makeValue(destPath + "/degnitemseqno", degnitemseqno); destModel.makeValue(destPath + "/supdegnitemcd", ""); destModel.makeValue(destPath + "/degnitemlevlcd", model.getValue(srcPath + "/imgcd")); destModel.makeValue(destPath + "/xpos", "0"); destModel.makeValue(destPath + "/ypos", "0"); destModel.makeValue(destPath + "/degnviewyn", "Y"); destModel.makeValue(destPath + "/degnlblviewyn", "Y"); destModel.makeValue(destPath + "/degnessnyn", ""); destModel.makeValue(destPath + "/essnrecyn", ""); destModel.makeValue(destPath + "/userdegnyn", ""); destModel.makeValue(destPath + "/degnunitcd", ""); destModel.makeValue(destPath + "/seq", destGrd.rows); destModel.makeValue(destPath + "/fstrgstdt", ""); destModel.makeValue(destPath + "/fstrgstrid", ""); destModel.makeValue(destPath + "/lastupdtdt", ""); destModel.makeValue(destPath + "/lastupdtid", ""); destModel.makeValue(destPath + "/rowstatus", ""); destModel.makeValue(destPath + "/cntrtype", "IMG"); destModel.makeValue(destPath + "/degnitemlevlno", "1"); destModel.makeValue(destPath + "/degnitemrowno", degnitemrowno); destGrd.rebuild(); setTree(destGrd, destGrd.colref("degnitemlevlno"), 1, true); } /** * @desc : ???????????? ???????? * @ * @param : * @return : * @--------------------------------------------------- */ function fShowImgInfo(){ if(grd_imglist.isCell(event.target) && grd_imglist.row >= grd_imglist.fixedRows ){ fSetCtrlDisabled(true); var sRow = grd_imglist.row; var xImglistPath = "/root/main/list/imglist"; var xImgInfoPath = "/root/main/imginfo"; var currDT = getCurrentDate() + getCurrentTime(); model.setValue(xImgInfoPath+"/imgecd",model.getValue(xImglistPath+"["+sRow+"]/imgecd")); model.setValue(xImgInfoPath+"/imgebasecd",model.getValue(xImglistPath+"["+sRow+"]/imgebasecd")); model.setValue(xImgInfoPath+"/imgefromdt",model.getValue(xImglistPath+"["+sRow+"]/imgefromdt")); model.setValue(xImgInfoPath+"/imgetodt",model.getValue(xImglistPath+"["+sRow+"]/imgetodt")); model.setValue(xImgInfoPath+"/deptcd",model.getValue(xImglistPath+"["+sRow+"]/deptcd")); model.setValue(xImgInfoPath+"/deptnm",model.getValue(xImglistPath+"["+sRow+"]/deptnm")); model.setValue(xImgInfoPath+"/partlrgclscd", model.getValue(xImglistPath+"["+sRow+"]/partlrgclscd")); model.setValue(xImgInfoPath+"/partmdlclscd", model.getValue(xImglistPath+"["+sRow+"]/partmdlclscd")); model.setValue(xImgInfoPath+"/partsmlclscd", model.getValue(xImglistPath+"["+sRow+"]/partsmlclscd")); model.setValue(xImgInfoPath+"/depthnm1", model.getValue(xImglistPath+"["+sRow+"]/partlrgclsnm")); model.setValue(xImgInfoPath+"/depthnm2", model.getValue(xImglistPath+"["+sRow+"]/partmdlclsnm")); model.setValue(xImgInfoPath+"/depthnm3", model.getValue(xImglistPath+"["+sRow+"]/partsmlclsnm")); model.setValue(xImgInfoPath+"/imgenm",model.getValue(xImglistPath+"["+sRow+"]/imgenm")); model.setValue(xImgInfoPath+"/imgecnts",model.getValue(xImglistPath+"["+sRow+"]/imgecnts")); model.setValue(xImgInfoPath+"/imgeclscd",model.getValue(xImglistPath+"["+sRow+"]/imgeclscd")); model.setValue(xImgInfoPath+"/anatclsseq",model.getValue(xImglistPath+"["+sRow+"]/anatclsseq")); model.setValue(xImgInfoPath+"/updtresncnts",model.getValue(xImglistPath+"["+sRow+"]/updtresncnts")); model.setValue(xImgInfoPath+"/rem",model.getValue(xImglistPath+"["+sRow+"]/rem")); //model.setValue(xImgInfoPath+"/imgedata",model.getValue(xImglistPath+"["+sRow+"]/imgedata")); model.setValue(xImgInfoPath+"/instcd",model.getValue(xImglistPath+"["+sRow+"]/instcd")); model.setValue(xImgInfoPath+"/instnm",model.getValue(xImglistPath+"["+sRow+"]/instnm")); model.setValue(xImgInfoPath+"/fstrgstrid",model.getValue(xImglistPath+"["+sRow+"]/fstrgstrid")); model.setValue(xImgInfoPath+"/fstrgstrnm",model.getValue(xImglistPath+"["+sRow+"]/fstrgstrnm")); model.setValue(xImgInfoPath+"/fstrgstdt",model.getValue(xImglistPath+"["+sRow+"]/fstrgstdt")); model.setValue(xImgInfoPath+"/lastupdtrid",model.getValue(xImglistPath+"["+sRow+"]/lastupdtrid")); model.setValue(xImgInfoPath+"/lastupdtrnm",model.getValue(xImglistPath+"["+sRow+"]/lastupdtrnm")); model.setValue(xImgInfoPath+"/lastupdtdt",model.getValue(xImglistPath+"["+sRow+"]/lastupdtdt")); if((model.getValue(xImgInfoPath+"/imgefromdt") <= (getCurrentDate()+getCurrentTime())) && (model.getValue(xImgInfoPath+"/imgetodt") > (getCurrentDate()+getCurrentTime()))){ model.setValue("/root/temp/valiyn", "Y"); } else { model.setValue("/root/temp/valiyn", "N"); } //alert(xImgInfoPath+"/imgdata"); //var src = "http://160.1.102.140/Img/0000" + model.getValue(xImglistPath+"["+sRow+"]/imgecd").substr(1, 6) + ".jpg"; //img_imgView.attribute("src") = src; model.makeNode("/root/send/imgecd"); model.setValue("/root/send/imgecd", model.getValue(xImgInfoPath + "/imgecd")); submit("TRMRF00402"); setImageRefInstance(xImgInfoPath + "/imgedata"); model.refresh(); //alert("3 : " + model.getValue(xImgInfoPath+"/imgecd")); } } /** * @desc : ???????????? ???? * @ * @param : * @return : * @--------------------------------------------------- */ function fAddImgelist(){ fSetCtrlDisabled(false); var xPath ="/root/main/imginfo"; model.setValue(xPath+"/status","i"); model.setValue(xPath+"/imgecd",""); model.setValue(xPath+"/deptcd",""); model.setValue(xPath+"/imgecnts",""); model.setValue(xPath+"/imgenm",""); model.setValue(xPath+"/updtresncnts",""); model.setValue(xPath+"/anatclsseq",""); model.setValue(xPath+"/imgefromdt",getCurrentDate()); model.setValue(xPath+"/imgetodt","99991231"); //model.setValue(xPath+"/fstrgstrnm",getUserName()); model.setValue(xPath+"/rem",""); model.setValue(xPath+"/imgedata",""); model.setValue(xPath+"/fstrgstdt",getCurrentDate()); model.setValue(xPath+"/fstrgstrid", model.getValue("/root/main/userinfo/userid")); model.setValue(xPath+"/fstrgstrnm", model.getValue("/root/main/userinfo/usernm")); //model.setValue(xPath+"/instcd", model.getValue("/root/main/userinfo/dutplcd")); model.setValue(xPath+"/lastupdtrid", model.getValue("/root/main/userinfo/userid")); model.setValue(xPath+"/lastupdtrnm", model.getValue("/root/main/userinfo/usernm")); model.setValue(xPath+"/lastupdtdt",getCurrentDate()); model.setValue(xPath+"/idximgenm",""); model.refresh(); } /** * @desc : ???????????? ???? disabled * @ * @param : * @return : * @--------------------------------------------------- */ function fSetCtrlDisabled(bool){ btn_searchdept.disabled = bool; btn_searchcls.disabled = bool; ipt_imgenm.disabled = bool; ipt_imgecnts.disabled = bool; ipt_updtresncnts.disabled = bool; ipt_imgefromdt.disabled = bool; ipt_imgetodt.disabled = bool; cmb_anatclss.disabled = bool; ipt_rem.disabled = bool; ipt_updtresncnts.disabled = bool; cmb_imgeclscd.disabled = bool; btn_save.disabled = bool; cmb_valiyn.disabled = bool; } function fCallDeptInfo(){ var search_condition = "deptcd"; var search_term = ""; var receive_deptcd_path = "/root/main/imginfo/deptcd"; var receive_deptnm_path = "/root/main/imginfo/deptnm"; var standard_yn = ""; var ord_deptflag = ""; // Edited by nj 2007-06-25 // Standard ??? ?? ??? ?? //zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, standard_yn, ord_deptflag, new Array("deptcd", "depthngnm")); zbcfOpenInstDeptCodeList(search_condition, search_term, receive_deptcd_path, receive_deptnm_path, 'orduseyn', ord_deptflag, new Array("deptcd", "depthngnm")); }