123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 안내문관리 ( SMMRC02500_안내문관리.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - Author : 이은영
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- var xGuideDocuInfoPath = "/root/main/guidedocuinfo/guidedocu";
- var xGuideDocuHistInfoPath = "/root/main/guidedocuhistinfo/guidedocuhistlist";
- /**
- * @ver : 2008-02-29
- * @desc : 화면초기화
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fInitialize(){
- fSrchGuideDocuHist();
- fDisabled(true);
- btn_update.disabled = true;
- btn_delete.disabled = true;
- btn_save.disabled =true;
- model.refresh();
- }
- /**
- * @ver : 2008-02-29
- * @desc : 이력조회
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchGuideDocuHist(){
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.copyNode("/root/send", "/root/main/cond");
- submit("TRMRC02501");
- }
- /**
- * @ver : 2008-02-29
- * @desc : 파일 추가
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUploadGuideDocuFile(){
- var file = window.fileDialog("open","","false","","","RTF Files(*.rtf)|*.rtf");
- if (file == "") {
- return;
- }
- // 선택한 파일을 RTF viewer로 보여준다.
- rtfviewer.OpenRtfFile(file);
- rtfviewer.ReadOnly = "true";
-
- model.setValue(xGuideDocuInfoPath+"/guidedocunm",fGetFileName(file));
- model.setValue(xGuideDocuInfoPath+"/guidedocudata",rtfviewer.TextRtf);
- model.refresh();
- }
- /**
- * @ver : 2008-02-29
- * @desc : 파일명 가져오기
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetFileName(path) {
- var lastIdx = path.lastIndexOf("\\");
- if (lastIdx >= 0) {
- return path.substr(lastIdx+1);
- } else {
- return path;
- }
- }
- /**
- * @ver : 2008-02-29
- * @desc : 신규 안내문
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fNewGuideDocu(){
- alert("안내문 구분 추가에 관련된 업무협의 중으로 신규작성 제한 중.");
- return ;
-
- model.resetInstanceNode(xGuideDocuInfoPath);
- rtfviewer.clear();
- fDisabled(false);
- btn_update.disabled = true;
- btn_delete.disabled = true;
- btn_save.disabled =false;
- model.setValue(xGuideDocuInfoPath+"/status","i");
- model.refresh();
- }
- /**
- * @ver : 2008-02-29
- * @desc : 안내문 수정
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdateGuideDocu(){
- var status = model.getValue(xGuideDocuInfoPath +"/status");
- if(status == "i" || status == ""){
- messageBox("해당 안내문을","C002");
- return;
- }
- fDisabled(false);
- btn_update.disabled = true;
- btn_delete.disabled = false;
- btn_save.disabled =false;
- model.refresh();
- }
- /**
- * @ver : 2008-02-29
- * @desc : 안내문 삭제
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelGuideDocu(){
-
- alert("권한이 있는 자만 삭제가 가능합니다. ");
- return ;
-
- var status = model.getValue(xGuideDocuInfoPath +"/status");
- if(status == "i" || status == ""){
- messageBox("해당 안내문을","C002");
- return;
- }
- model.setValue(xGuideDocuInfoPath +"/status","d");
- fSave();
- }
- /**
- * @ver : 2008-02-29
- * @desc : 비활성화 여부
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDisabled(pFlag){
- cmb_guidedocuflag.disabled=pFlag;
- ipt_guidedocunm.disabled = pFlag;
- btn_addfile.disabled = pFlag;
- }
- /**
- * @ver : 2008-02-29
- * @desc : 저장
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
- if(model.getValue(xGuideDocuInfoPath+"/guidedocuflag") == ""){
- messageBox("안내문 구분을","C001");
- return;
- }
- if(model.getValue(xGuideDocuInfoPath+"/guidedocunm") == ""){
- messageBox("안내문명을","C001");
- return;
- }
- if(model.getValue(xGuideDocuInfoPath+"/guidedocudata") == ""){
- messageBox("파일을 추가","I008");
- return;
- }
-
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.copyNode("/root/send", xGuideDocuInfoPath);
- model.makeValue("/root/send/srchflag", model.getValue("/root/main/cond/srchflag"));
- model.removenodeset("/root/main/guidedocuhistinfo");
- if(submit("TXMRC02501")){
- model.resetInstanceNode(xGuideDocuInfoPath);
- rtfviewer.clear();
- fDisabled(true);
- btn_update.disabled = true;
- btn_delete.disabled = true;
- btn_save.disabled =true;
- model.refresh();
- }
- }
- /**
- * @ver : 2008-02-29
- * @desc : 안내문 정보를 조회
- * @
- * @by : 이은영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchGuideDocuInfo(){
- if(grd_guidedoculist.isCell(event.target)){
- var iRow = grd_guidedoculist.row;
- if(iRow < 1) return;
- model.removenode("/root/send");
- model.makeValue("/root/send/guidedocucd", model.getValue(xGuideDocuHistInfoPath+"["+iRow+"]/guidedocucd"));
- if(submit("TRMRC02502")){
- rtfviewer.TextRtf = model.getValue(xGuideDocuInfoPath+"/guidedocudata");
- rtfviewer.ReadOnly = "true";
- fDisabled(true);
- btn_update.disabled = false;
- btn_delete.disabled = false;
- btn_save.disabled =true;
- model.refresh();
- }
- }
- }
- /**
- * @ver : 2008-02-29
- * @desc : 조회
- * @
- * @by :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- alert("안내문 구분 추가에 관련된 업무협의 중입니다.");
- }
|