/** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸é ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fInit(){ fSearch(); } /** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : À̹ÌÁö Á¤º¸ Á¶È¸ * @param : * @return : * @--------------------------------------------------- */ function fSearch(){ model.removenodeset("/root/main/list"); if(model.getValue("/root/main/cond/imgnm") != "") model.makeValue("/root/send/imgnm", model.getValue("/root/main/cond/imgnm")); else model.makeValue("/root/send/imgnm", "%"); submit("TRMRF00401"); model.removenodeset("/root/send/imgnm"); } /** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : À̹ÌÁö Á¤º¸ ÃʱâÈ­ * @param : * @return : * @--------------------------------------------------- */ function fClearImgInfo(){ var xPath ="/root/main/imginfo"; model.setValue(xPath+"/imgcd",""); model.setValue(xPath+"/ioflag",""); model.setValue(xPath+"/orddeptcd",""); model.setValue(xPath+"/anotoindxcd",""); model.setValue(xPath+"/imgnm",""); model.setValue(xPath+"/imgfilenm",""); model.setValue(xPath+"/userimgfilenm",""); model.setValue(xPath+"/imgdesc",""); model.setValue(xPath+"/usdt",getDate()); model.setValue(xPath+"/uedt","29991231"); model.setValue(xPath+"/valiflag",""); model.setValue(xPath+"/updtuser",""); model.setValue(xPath+"/updtdt",""); model.setValue(xPath+"/updtrsn",""); model.setValue(xPath+"/rem",""); model.setValue(xPath+"/imgdata",""); model.setValue(xPath+"/imgno",""); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : À̹ÌÁö Á¤º¸ ÀúÀå * @param : * @return : * @--------------------------------------------------- */ function fSave(){ var xPath = "/root/main/imginfo"; model.setValue("/root/main/cond/imgnm",""); model.makeValue("/root/send/imginfo",""); model.copyNode("/root/send/imginfo","/root/main/imginfo"); model.removenodeset("/root/main/list"); submit("TXMRF00401"); fClearImgInfo(); model.removenodeset("/root/send/imginfo"); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ±×¸®µå ´õºí Ŭ¸¯½Ã.. * @param : * @return : * @--------------------------------------------------- */ function fGridDlClick(){ var sRow = grd_imglist.row; var xImglistPath = "/root/main/list/imglist"; var xImgInfoPath = "/root/main/imginfo"; model.setValue(xImgInfoPath+"/imgcd",model.getValue(xImglistPath+"["+sRow+"]/imgcd")); model.setValue(xImgInfoPath+"/ioflag",model.getValue(xImglistPath+"["+sRow+"]/ioflag")); model.setValue(xImgInfoPath+"/orddeptcd",model.getValue(xImglistPath+"["+sRow+"]/orddeptcd")); model.setValue(xImgInfoPath+"/anotoindxcd",model.getValue(xImglistPath+"["+sRow+"]/anotoindxcd")); model.setValue(xImgInfoPath+"/imgnm",model.getValue(xImglistPath+"["+sRow+"]/imgnm")); model.setValue(xImgInfoPath+"/imgfilenm",model.getValue(xImglistPath+"["+sRow+"]/imgfilenm")); model.setValue(xImgInfoPath+"/userimgfilenm",model.getValue(xImglistPath+"["+sRow+"]/userimgfilenm")); model.setValue(xImgInfoPath+"/imgdesc",model.getValue(xImglistPath+"["+sRow+"]/imgdesc")); model.setValue(xImgInfoPath+"/usdt",model.getValue(xImglistPath+"["+sRow+"]/usdt")); model.setValue(xImgInfoPath+"/uedt",model.getValue(xImglistPath+"["+sRow+"]/uedt")); model.setValue(xImgInfoPath+"/valiflag",model.getValue(xImglistPath+"["+sRow+"]/valiflag")); model.setValue(xImgInfoPath+"/imgdata",model.getValue(xImglistPath+"["+sRow+"]/imgdata")); setImageRefInstance(xImgInfoPath+"/imgdata"); model.setValue(xImgInfoPath+"/imgno",model.getValue(xImglistPath+"["+sRow+"]/imgno")); model.refresh(); } /** * @group : * @ver : 2007.02.27 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : ÆÄÀÏ ¿­±â * @param : * @return : * @--------------------------------------------------- */ function fOpenFile(){ var file =openImageFileDialog(32768); // image ÆÄÀÏÀÌ ³Ê¹« Å©¸é submit ½Ã°£ÀÌ ¸Å¿ì ¿À·¡(5ºÐÀÌ»ó) °É¸®¹Ç·Î °¡±ÞÀû »çÀÌÁ ÀÛ°Ô Á¦ÇÑÇÑ´Ù. if (file == "") { return; } img_hidden.src=file; // ÆÄÀÏ¿¡¼­ ÀÐÀº À̹ÌÁöÀÇ base64 encoding °ªÀ» °¡Á®¿À±â À§ÇÑ À̹ÌÁö ÄÁÆ®·Ñ var data = img_hidden.getbase64data(); // base64 encoding ¹®ÀÚ¿­À» °¡Á®¿Â´Ù. model.setValue("/root/main/imginfo/imgdata",data,true); // À̹ÌÁö¸¦ º¸¿©ÁÖ±â À§ÇÏ¿© view¿ë À̹ÌÁöÄÁÆ®·ÑÀÇ ref instance¿¡ °ªÀ» ÀúÀå setImageRefInstance("/root/main/imginfo/imgdata"); model.refresh(); }