123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- /*
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 처방분류코드 ( SMMMB02100_처방분류코드.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- */
- var sPRCPCLSCDLIST_PATH = "/root/main/prcpclscdlist/prcpclscdlist";
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @event :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- submit("TRMMB02102");
- }
- /**
- * @desc : TreeView의 처방분류코드 선택시 opener에게 현재 처방분류코드 및 처방분류명 전달
- * @
- * @param :
- * @event :
- * @return :
- * @---------------------------------------------------
- */
- function fChoiPrcpClsCD(rowpos){
- var prcpclscd = model.getValue(sPRCPCLSCDLIST_PATH + "[" + rowpos + "]/prcpclscd");
- var prcpclsnm = model.getValue(sPRCPCLSCDLIST_PATH + "[" + rowpos + "]/path");
- var prcpclscd1 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + rowpos + "]/prcpclscd1");
- var prcpclscd2 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + rowpos + "]/prcpclscd2");
- var prcpclscd3 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + rowpos + "]/prcpclscd3");
- var useyn = "Y"; //사용구분
- var sPRCPCLSCDLIST_PARAM = useyn + "▩" + prcpclscd + "▩" + prcpclsnm + "▩" + prcpclscd1 + "▩" + prcpclscd2 + "▩" + prcpclscd3;
- //alert(prcpclscd + "," + prcpclsnm + "," + prcpclscd1 + "," + prcpclscd2 + "," + prcpclscd3);
- if(checkOpener()){
- opener.javascript.setParameter("param", sPRCPCLSCDLIST_PARAM);
- }else{
- messageBox("상위화면이 변경되어 데이터를 처리", "E001");
- }
- model.close();
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMouseRghtBtnPopup(){
- if(event.button == 3){
- if(trv_prcpclscdlist.isCell(event.target) && trv_prcpclscdlist.focusIndex > -1)
- window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); //팝업창 셋팅
- }else{
- window.setPopupMenu(false);
- }
- }
- /**
- * @desc : 처방분류 추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddPrcpCls(){
- var item = trv_prcpclscdlist.item(trv_prcpclscdlist.selectedIndex);
- var iRow = item.index + 1;
- var lvl = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/lvl");
- var prcpclscd1 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd1");
- var prcpclscd2 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd2");
- var prcpclscd3 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd3");
-
- fSetCasePrcpCls(lvl, prcpclscd1, prcpclscd2, prcpclscd3);
- }
- /**
- * @desc : 처방분류 수정
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdtPrcpCls(){
- var item = trv_prcpclscdlist.item(trv_prcpclscdlist.selectedIndex);
- var iRow = item.index + 1;
- var lvl = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/lvl");
- var prcpclscd1 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd1");
- var prcpclscd2 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd2");
- var prcpclscd3 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd3");
-
- model.setValue("/root/send/savedata/m", "u");
- model.setValue("/root/send/savedata/prcpclscd1", prcpclscd1);
- model.setValue("/root/send/savedata/prcpclscd2", prcpclscd2);
- model.setValue("/root/send/savedata/prcpclscd3", prcpclscd3);
- fShowIptBox();
- }
- /**
- * @desc : 처방분류 삭제
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelPrcpCls(){
- var item = trv_prcpclscdlist.item(trv_prcpclscdlist.selectedIndex);
- var iRow = item.index + 1;
- var lvl = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/lvl");
- var prcpclscd1 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd1");
- var prcpclscd2 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd2");
- var prcpclscd3 = model.getValue(sPRCPCLSCDLIST_PATH + "[" + iRow + "]/prcpclscd3");
- var clscdflag;
-
- switch(lvl){
- case "2" : clscdflag = "lrg"; break;
- case "3" : clscdflag = "mdl"; break;
- case "4" : clscdflag = "sml"; break;
- default : messageBox("신규 처방분류를 삭제 ", "E001"); return;
- }
- model.setValue("/root/send/savedata/m", "d");
- model.setValue("/root/send/savedata/clscdflag" , clscdflag);
- model.setValue("/root/send/savedata/prcpclscd1", prcpclscd1);
- model.setValue("/root/send/savedata/prcpclscd2", prcpclscd2);
- model.setValue("/root/send/savedata/prcpclscd3", prcpclscd3);
- submit("TXMMB02102");
- addCopyNodeset("/root/main/prcpclscdlist/prcpclscdlist", "/root/temp/prcpclscdlist", "before");
- model.refresh();
- }
- /**
- * @desc : 처방분류 추가시, 저장data 설정
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCasePrcpCls(lvl, prcpclscd1, prcpclscd2, prcpclscd3){
- switch(lvl){
- //depth level이 1인 경우
- case "1" : fSetReqPrcpClsData("i", "lrg", "", "00", "00");
- fShowIptBox();
- break;
- //depth level이 2인 경우
- case "2" : fSetReqPrcpClsData("i", "mdl", prcpclscd1, "", "00");
- fShowIptBox();
- break;
- //depth level이 3인 경우
- case "3" : fSetReqPrcpClsData("i", "sml", prcpclscd1, prcpclscd2, "");
- fShowIptBox();
- break;
-
- case "4" : messageBox("신규 처방분류를 생성 ", "E001");
- return;
- }
- }
- /**
- * @desc : 저장 데이터 설정
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetReqPrcpClsData(status, clscdflag, prcpclscd1, prcpclscd2, prcpclscd3){
- model.setValue("/root/send/savedata/m" , status);
- model.setValue("/root/send/savedata/clscdflag" , clscdflag);
- model.setValue("/root/send/savedata/prcpclscd1", prcpclscd1);
- model.setValue("/root/send/savedata/prcpclscd2", prcpclscd2);
- model.setValue("/root/send/savedata/prcpclscd3", prcpclscd3);
- model.setValue("/root/send/savedata/useflag" , "Y");
- model.setValue("/root/send/savedata/refseq" , "0");
- model.refresh();
- }
- /**
- * @desc : 입력창 Open
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fShowIptBox(){
- group1.attribute("top") = event.clientY;
- group1.attribute("height") = 55;
- model.setFocus("ipt_prcpclsnm");
- model.refresh();
- }
|