123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- /**
- * @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();
- }
|