123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368 |
- var sETCPRMSPRCPSETLIST = "/root/main/etcprmsprcpsetinfo/etcprmsprcpsetlist";
- var sETCPRMSPRCPSETDETLLIST = "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist";
- var sETCPRMSPRCPSETLIST_TMP = "/root/hidden/etcprmsprcpsettmp/etcprmsprcpsetlist";
- var sETCPRMSPRCPSETLIST_HIDDEN = "/root/hidden/etcprmsprcpsetinfo/etcprmsprcpsetlist";
- var sDIAGHISTINFO = "/root/hidden/diaghistinfo/diaghist";
- /**
- * @desc : 화면 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- model.removeNodeset(sETCPRMSPRCPSETDETLLIST);
-
- group1.attribute("height") = 0;
- model.makeNode("/root/send/reqdata/settypecd");
- model.setValue("/root/send/reqdata/settypecd", "D");
- model.refresh();
- if(submit("TRMMB00601")){
- copyNodeSet(sETCPRMSPRCPSETLIST_TMP, sETCPRMSPRCPSETLIST);
- }
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMouseRghtBtnPopup(){
-
- if(event.button == 3){
- if(trv_etcprmsprcpsetlist.isCell(event.target)){
- window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); //팝업창 셋팅
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- /**
- * @desc : 마우스 오른쪽 버튼 팝업창
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMouseRghtBtnPopupDetlCD(){
-
- if(event.button == 3){
- if(grd_etcprmsprcpdetl.isCell(event.target)){
- window.setPopupMenu(true, "/root/hidden/menu2/menu", "label", "func", false); //팝업창 셋팅
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- /**
- * @desc : 새폴더 추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddPrmsDiagSet(){
-
- var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex);
- var rowPos = item.index + 1;
-
- fSetPrmsDiagInfo(rowPos, "i");
-
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/status", "i");
- model.refresh();
- //alert(setno + "," + supsetno + "," + setkindcd + "," + setclscd + "," + settrgtcd + "," + settypecd + "," + setnm);
-
- fShowWndIptBox();
- }
- /**
- * @desc : 폴더 삭제
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelPrmsDiagSet(){
-
- var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex);
- var rowPos = item.index + 1;
-
- if(fSetPrmsDiagInfo(rowPos, "d")!= -1){
- fSavePrmsDiagSet();
- }
- //alert(setno + "," + supsetno + "," + setkindcd + "," + setclscd + "," + settrgtcd + "," + settypecd + "," + setnm);*/
- }
- /**
- * @desc : 폴더 수정
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpdtPrmsDiagSet(){
- var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex);
- var rowPos = item.index + 1;
-
- if(fSetPrmsDiagInfo(rowPos, "u")!=-1){
- fShowWndIptBox();
- }
-
- }
- /**
- * @desc : 약속진단 SET저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSavePrmsDiagSet(){
-
- var setnm = model.getValue("/root/hidden/inputbox/setnm");
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setnm", setnm);
- model.refresh();
-
- model.copyNode("/root/send/savedata", sETCPRMSPRCPSETLIST_HIDDEN);
- if(submit("TXMMB00601")){
- copyNodeSet(sETCPRMSPRCPSETLIST_TMP, sETCPRMSPRCPSETLIST);
- }
-
- }
- /**
- * @desc : 약속진단관리 폴더명을 입력할 InputBox를 보여줌.
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fShowWndIptBox(){
-
- group1.attribute("top") = event.clientY;
- group1.attribute("left") = event.clientX;
- group1.attribute("height") = 32;
- model.setFocus("ipt_setnm");
- model.refresh();
- }
- /**
- * @desc : 약속진단 SET정보 SETTING
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetPrmsDiagInfo(rowpos, status){
-
- var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno");
- if(status == "u" && setno == 1){
- messageBox("선택한 폴더는 수정", "E001");
- return -1;
- }else if(status == "d" && setno == 1){
- messageBox("선택한 폴더는 삭제", "E001");
- return -1;
- }
-
- var levl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl");
- var supsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/supsetno");
- var setkindcd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setkindcd");
- var setclscd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setclscd");
- var settrgtcd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settrgtcd");
- var settypecd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settypecd");
- var setnm = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setnm");
-
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/levl" , levl);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setno" , setno);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setkindcd", setkindcd);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setclscd" , setclscd);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/settrgtcd", settrgtcd);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/settypecd", settypecd);
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/status" , status);
- if(status == "i"){
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , setno);
- }else{
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , supsetno);
- }
- model.refresh();
-
- }
- /**
- * @desc : 약속진단SET Drag
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPrmsDiagSetDrag(){
-
- var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex);
- var rowpos = item.index + 1;
- fSetPrmsDiagInfo(rowpos, "u");
- var setnm = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setnm");
- model.setValue("/root/hidden/inputbox/setnm", setnm);
- model.refresh();
-
- fSavePrmsDiagSet();
-
- }
- /**
- * @desc : 약속진단SET Drop
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPrmsDiagSetDrop(){
-
- var rowpos = trv_etcprmsprcpsetlist.mouseRow + 1;
- var levl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl");
- var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno");
- var supsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/supsetno");
- var cmplevl = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/levl");
- var cmpsetno = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setno");
- var cmpsupsetno = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno");
- if(setno == cmpsetno){
- messageBox("동일한 위치로 이동", "E001");
- return;
- }else if(setno == cmpsupsetno){
- messageBox("지정된 위치로 이동", "E001");
- return;
- }
-
- //이동하는 SET폴더의 depth가 도착하는 곳보다 낮은 레벨일 경우,
- //자신의 child node 아래로 이동하는 것을 방지함.
- if(cmplevl < levl){
- var rootlevl;
- var rootsetno;
-
- while(cmplevl != rootlevl){
- rootlevl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl");
- rootsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno");
- rowpos--;
- }
- if(rootsetno == cmpsetno){
- messageBox("지정된 위치로 이동", "E001");
- return;
- }
- }
-
- model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , setno);
- model.refresh();
-
- fSavePrmsDiagSet();
-
- }
- /**
- * @desc : 약속진단SET에 진단추가
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddPrmsDiagDetl(){
-
- var setno = model.getValue("/root/hidden/etcprmsprcpsetdetl/setno");
- var settypecd = model.getValue("/root/hidden/etcprmsprcpsetdetl/settypecd");
-
- if(setno.length < 1){
- messageBox("진단을 등록할 폴더를", "C002");
- return;
- }
-
- modal("SPMMB00600", "", "", "", "SPMMB00600");
- totRow = grd_etcprmsprcpdetl.rows - 1;
- var useyn = getParameter("useYN");
- if(useyn == "Y"){
- var iTotNode = getNodeSetCnt("/root/hidden/diaghistinfo/diaghist");
- for(var i = 1; i <= iTotNode ; i++){
- var diagcd = model.getValue(sDIAGHISTINFO + "[" + i + "]/diagcd");
- var diagnm = model.getValue(sDIAGHISTINFO + "[" + i + "]/icd10engnm");
- iChkRow = grd_etcprmsprcpdetl.findRow(diagcd, 1, 4, "true", "true");
- if(iChkRow > 0){
- messageBox("[" + diagnm + "]은 진단명은 이미", "E005");
- continue;
- }else{
- totRow++;
-
- grd_etcprmsprcpdetl.addRow(false);
- model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/detlsetcd", diagcd);
- model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/termengnm", diagnm);
- model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/setno", setno);
- model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/settypecd", settypecd);
- }
-
- }
- model.refresh();
- }
-
- }
- /**
- * @desc : 약속진단SET상세 조회
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqPrmsDetlDiagSet(){
-
- var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex);
- var rowpos = item.index + 1;
- var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno");
- var settypecd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settypecd");
- model.setValue("/root/hidden/etcprmsprcpsetdetl/setno", setno);
- model.setValue("/root/hidden/etcprmsprcpsetdetl/settypecd", settypecd);
- model.refresh();
-
- model.makeValue("/root/send/reqdata/setno", setno);
- model.makeValue("/root/send/reqdata/settypecd", settypecd);
- submit("TRMMB00602");
-
- }
- /**
- * @desc : 약속진단SET상세 복사
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCopyDiagCD(){
- totRow = grd_etcprmsprcpdetl.rows;
-
- for(var i = 1 ; i < totRow; i++){
- if(grd_etcprmsprcpdetl.isSelected(i)==true){
- addCopyNode("/root/init/today", "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + i + "]");
- }
- }
- }
- /**
- * @desc : 약속진단SET상세 붙여넣기
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPasteDiagCD(){
-
- }
|