123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593 |
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize() {
- //btn_deptindx.selected = "true";
- model.removeNodeset("/root/main/selectdiaglist/selectdiaglist");
- fInitializeDone_Switch("deptcd");
- model.refresh();
- }
- /**
- * @desc : switch화면 변경
- * @
- * @param : caseID - switch case화면ID
- * @return :
- * @---------------------------------------------------
- */
- function fInitializeDone_Switch(caseID){
-
- model.removeNodeset("/root/send/reqdata");
- model.removeNodeset("/root/main/cccdinfo");
- model.toggle(caseID);
- model.refresh();
- if(caseID == "ccindx")
- { //전체보기
- button3.attribute("visibility") = "hidden";
- var currentTime = getCurrentTime();
- model.setValue("/root/init/today", getCurrentDate());
- model.setValue("/root/init/curruntTime", currentTime.substr(0,4));
- model.setValue("/root/hidden/condition/selctedmode", "C");
- model.setValue("/root/init/userinfo/userid", getUserId());
- model.setValue("/root/init/userinfo/usernm", getUserName());
- model.setValue("/root/init/userinfo/instcd", getUserInfo("posinstcd"));
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- if(submit("TRMRF04201"))
- {
- btn_icd10.selected = "true";
- btn_deptindx.selected = "false";
- btn_indset.selected = "false";
- trv_ccindx.refresh();
- }
- }
- else if(caseID == "deptcd")
- { //과색인코드
- button3.attribute("visibility") = "hidden";
- model.makeValue("/root/send/reqdata/deptindxflag", "2");
- model.makeValue("/root/send/reqdata/deptcd", getUserInfo("dutplcecd"));
- model.makeValue("/root/send/reqdata/deptnm", getUserInfo("dutplcenm"));
- // model.makeValue("/root/send/reqdata/deptcd", "2060000000");
- // model.makeValue("/root/send/reqdata/deptnm", "신경외과");
- if(submit("TRMRF04205")) //과색인코드 조회
- {
- btn_icd10.selected = "false";
- btn_deptindx.selected = "true";
- btn_indset.selected = "false";
- trv_deptindxcdlist.refresh();
-
- var instance = document.models(0).instances(0);
- var ccDeptsetList = instance.selectNodes("/root/main/deptindxcdlist/deptindxcdlist");
-
- if (ccDeptsetList.length > 0)
- {
- fSelectTree("deptcd", "N");
- }
- }
- }
- else if(caseID == "prms")
- { //개인SET
- button3.attribute("visibility") = "visible";
- if(submit("TRMRF04207"))
- {
- btn_icd10.selected = "false";
- btn_deptindx.selected = "false";
- btn_indset.selected = "true";
- var instance = document.models(0).instances(0);
- var ccsetList = instance.selectNodes("/root/main/cclist/ccset");
- if (ccsetList.length <= 0)
- {
- //fInitializeDone_Switch("deptcd");
- }
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : ??????
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ?????? Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelectTree(caseID, selyn) {
- model.removeNodeset("/root/send");
- if(caseID == "ccindx"){ //전체보기
- var iIndx = trv_ccindx.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- model.makeValue("/root/send/indxcd", selIndxCd);
- if(model.getValue("/root/hidden/condition/selctedmode") == "C"){
- model.setValue("/root/hidden/condition/selectedIndx", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.setValue("/root/hidden/condition/selectedIndxDepth", model.getValue("/root/main/indxlist/item[" + iIndx + "]/depth"));
- model.setValue("/root/hidden/condition/selectedIndxPath", model.getValue("/root/main/indxlist/item[" + iIndx + "]/pathcd"));
- submit("TRMRF04202"); //인덱스 트리를 가지고 온다
- grd_cccd.rebuild();
- }else{
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
- submit("TRMRF04203");
- }
- }else if(caseID == "deptcd"){ //과색인코드
- if(selyn == "N")
- {
- var iRow = 1;
- }
- else
- {
- var iRow = trv_deptindxcdlist.focusIndex + 1;
- }
-
- var deptindxcd = model.getValue("/root/main/deptindxcdlist/deptindxcdlist[" + iRow + "]/deptindxcd");
- var deptcd = model.getValue("/root/main/deptindxcdlist/deptindxcdlist[" + iRow + "]/deptcd");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/deptindxflag", "2");
- model.makeValue("/root/send/reqdata/deptindxcd", deptindxcd);
- model.makeValue("/root/send/reqdata/deptcd", deptcd);
- submit("TRMRF04206");
- }
- }
- /**
- * @desc : 단일 주호소코드 선택, 그리드 클릭
- * @
- * @param : iRow - 현재 클릭한 그리드의 row 위치
- * @return :이창록 수정(주호소 한글명 추가)2008.6.16
- * @---------------------------------------------------
- */
- function fAddDiag(iRow, iCol){
- var sUmlscd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/umlscd");
- var sTermcd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termcd");
- var sTermhngnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termhngnm");
- var sTermengnm = "";
- if (iCol == "6")
- {
- sTermengnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termhngnm");
- }
- else
- {
- sTermengnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termengnm");
- }
- var iFndRow = grd_selectdiag.findRow(sTermengnm, 1, 1, "true", "true");
- if(iFndRow < 0 && sTermengnm !=""){
- grd_selectdiag.addRow(false);
- iCurRow = grd_selectdiag.row;
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/umlscd" , sUmlscd);
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termcd" , sTermcd);
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termengnm", sTermengnm);
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termhngnm", sTermhngnm);
- }
- model.refresh();
- }
- /**
- * @desc : 다수의 주호소코드 선택, 주호소추가버튼 클릭
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAppendDiag(){
- var iTotRow = grd_cccd.rows;
- for(var iRow = 1; iRow < iTotRow; iRow++){
- var bFlag = grd_cccd.valueMatrix(iRow,0);
- if(bFlag == "true"){
- fAddDiag(iRow);
- }
- }
- grd_selectdiag.rebuild();
- }
- /**
- * @desc : 주호소코드 전달
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendDiagCD(){
- if(!fVailCheck())
- {
- messageBox("주호소는", "I003");
- return;
- }
- if(checkOpener()){
- var nodepath = opener.javascript.getParameter("SPMRF04200_param_nodepath");
- if(nodepath == ""){
- var selectNode = opener.instance1.selectSingleNode("/root/temp/selectdiaglist");
- if(selectNode == null){
- opener.model.makeNode("/root/temp/selectdiaglist");
- }
- model.copyNode(opener.root.temp, root.main.selectdiaglist);
- }else{
- var selectnode = opener.instance1.selectSingleNode(nodepath);
- if(selectnode == null){
- opener.model.makeNode(nodepath);
- }
- opener.model.copyNode(nodepath, root.main.selectdiaglist);
- }
- }else{
- messageBox("상위화면이 변경되어 데이터를 전달", "E001");
- }
- opener.javascript.setParameter("MRF04200_DataYn", "Y");
- window.close();
- }
- /**
- * @desc : 주호소 입력 여부 체크
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fVailCheck(){
- var instance = document.models(0).instances(0);
- var rtn = true;
- var sTmpdiagengnm = "";
- var nodelistMain = instance.selectNodes("/root/main/selectdiaglist/selectdiaglist");
- for (var i = 1; i <= nodelistMain.length; i++)
- {
- sTmpdiagengnm = model.getValue("/root/main/selectdiaglist/selectdiaglist[" + i + "]/termengnm");
- if (sTmpdiagengnm == "")
- {
- rtn = false;
- }
- }
- return rtn;
- }
- /**
- * @desc : 주호소 조회(검색 조건)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fReqDiagSrchCond(){
- model.removeNodeset("/root/send/reqdata");
- var reqdata = model.getValue("/root/main/cond/reqdata");
- if(reqdata.charCodeAt(0) > 255){
- model.setValue("/root/main/cond/wordflag", "hng");
- }else{
- model.setValue("/root/main/cond/wordflag", "eng");
- }
- model.setValue("/root/main/cond/reqdata", reqdata.toUpperCase());
- model.makeValue("/root/send/reqdata/reqdata" , model.getValue("/root/main/cond/reqdata"));
- model.makeValue("/root/send/reqdata/srchflag", model.getValue("/root/main/cond/srchflag"));
- model.makeValue("/root/send/reqdata/wordflag", model.getValue("/root/main/cond/wordflag"));
- submit("TRMRF04204");
- grd_cccd.rebuild();
- }
- /**
- * @desc : tremcd 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEndEditSelcc(){
- var iRow = grd_selectdiag.row;
- var iCol = grd_selectdiag.col;
- if (iCol == "1")
- {
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iRow + "]/termcd", "");
- model.refresh();
- }
- }
- /**
- * @desc : 개인주호소 추가(조회)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCCfavor()
- {
- model.setValue("/root/main/cccdinfo/cccd[" + grd_cccd.Row + "]/boolflag", "true");
- grd_cccd.addStatus(grd_cccd.row, "update");
- model.refresh();
- var iTotRow = grd_cccd.rows;
- var cnt = 0;
- for(var iRow = 1; iRow < iTotRow; iRow++){
- var bFlag = grd_cccd.valueMatrix(iRow,0);
- var multiTermnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termengnm");
-
- if(bFlag == "true"){
- model.makeValue("/root/main/cccdinfo/cccd[" + iRow + "]/charflag", "E");
- model.makeValue("/root/main/cccdinfo/cccd[" + iRow + "]/cctermnm", multiTermnm);
- cnt++;
- }
- }
- model.removeNodeset("/root/send");
- model.refresh();
- if (cnt > 1)
- {
- model.makeValue("/root/send/ccset", grd_cccd.getUpdateData());
- }
- else if (cnt == 1)
- {
- var iRow = grd_cccd.Row;
- var iCol = grd_cccd.Col;
- var charflag = "";
- var sTermnm = "";
- if (iCol == "5")
- {
- sTermnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termhngnm");
- charflag = "H";
- }
- else
- {
- sTermnm = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termengnm");
- charflag = "E";
- }
- if (sTermnm == "")
- {
- var msg = "한글 주호소가";
- if (charflag == "E")
- {
- msg = "영문 주호소가";
- }
- messageBox(msg, "I004");
- return;
- }
- model.makeValue("/root/main/cccdinfo/cccd[" + grd_cccd.Row + "]/cctermnm", sTermnm);
- model.makeValue("/root/main/cccdinfo/cccd[" + grd_cccd.Row + "]/charflag", charflag);
- model.refresh();
- model.makeValue("/root/send/ccset", grd_cccd.getUpdateData());
- model.setValue("/root/main/cccdinfo/cccd[" + grd_cccd.Row + "]/boolflag", "false");
- grd_cccd.removeStatus(grd_cccd.row, "update");
- }
- model.makeValue("/root/send/flag", "insert");
- submit("TXMRF04201");
- model.refresh();
- }
- /**
- * @desc : 개인주호소 추가(선택)
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSelCCfavor()
- {
- var sTermcd = model.getValue("/root/main/selectdiaglist/selectdiaglist[" + grd_selectdiag.Row + "]/termcd");
- var sTermnm = model.getValue("/root/main/selectdiaglist/selectdiaglist[" + grd_selectdiag.Row + "]/termengnm");
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/hidden/tmpsend");
- model.refresh();
- if (sTermcd != "") //용어코드가 있을 경우 한/영구분
- {
- var charflag = "E";
- for(var i = 0; i <= sTermnm.length; i++)
- {
- if(sTermnm.charCodeAt(i) > 255)
- {
- charflag = "H";
- break;
- }
- }
- model.makeValue("/root/hidden/tmpsend/m", "u");
- model.makeValue("/root/hidden/tmpsend/termcd", sTermcd);
- model.makeValue("/root/hidden/tmpsend/cctermnm", sTermnm);
- model.makeValue("/root/hidden/tmpsend/charflag", charflag);
- }
- else
- {
- model.makeValue("/root/hidden/tmpsend/m", "u");
- model.makeValue("/root/hidden/tmpsend/termcd", "-");
- model.makeValue("/root/hidden/tmpsend/cctermnm", sTermnm);
- model.makeValue("/root/hidden/tmpsend/charflag", "");
- }
- var nodelist = model.instances(0).selectNodes("/root/hidden/tmpsend");
- var cccinfo = getNodeListCSV(nodelist);
- model.makeValue("/root/send/ccset", cccinfo);
- model.makeValue("/root/send/flag", "insert");
- submit("TXMRF04201");
- }
- /**
- * @desc : 체크 해제시 상태 초기화
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCheckChange()
- {
- if ((grd_cccd.valueMatrix ( grd_cccd.row, 0) == "false" || (grd_cccd.valueMatrix ( grd_cccd.row, 0) == "")) && grd_cccd.col == "0" ) {
- grd_cccd.removeStatus(grd_cccd.row, "update");
- }
- }
- /**
- * @desc : 개인주호소 더블클릭
- * @
- * @param :이창록 수정(주호소 한글명 추가)2008.6.16
- * @return :
- * @---------------------------------------------------
- */
- function fCcsetdbClick(iRow)
- {
- var sTermcd = model.getValue("/root/main/cclist/ccset[" + iRow + "]/cctermcd");
- var sTermengnm = model.getValue("/root/main/cclist/ccset[" + iRow + "]/cctermnm");
- //var sTermhngnm = model.getValue("/root/main/cclist/ccset[" + iRow + "]/cctermnm");
- var iFndRow = grd_selectdiag.findRow(sTermengnm, 1, 1, "true", "true");
- if(iFndRow < 0 && sTermengnm !=""){
- grd_selectdiag.addRow(false);
- iCurRow = grd_selectdiag.row;
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termcd" , sTermcd);
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termengnm", sTermengnm);
- model.makeValue("/root/main/selectdiaglist/selectdiaglist[" + iCurRow + "]/termhngnm", sTermengnm);
- }
- model.refresh();
- }
- /**
- * @desc : 순서이동
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMoveUp()
- {
- var iRow = grd_ccset.row;
- if (iRow != 1){
- model.makeValue("root/hidden/temp", "");
- model.makeValue("root/hidden/seq", "");
- var oldseq = model.getValue("/root/main/cclist/ccset[" + iRow + "]/sortno");
- var newseq = model.getValue("/root/main/cclist/ccset[" + (iRow - 1) + "]/sortno");
- model.copyNode("root/hidden/temp", "/root/main/cclist/ccset[" + iRow + "]");
- model.copyNode("/root/main/cclist/ccset[" + iRow + "]", "/root/main/cclist/ccset[" + (iRow - 1) + "]");
- model.copyNode("/root/main/cclist/ccset[" + (iRow - 1) + "]", "root/hidden/temp");
- model.setValue("/root/main/cclist/ccset[" + iRow + "]/sortno", oldseq);
- model.setValue("/root/main/cclist/ccset[" + (iRow - 1) + "]/sortno", newseq);
- model.removeNodeset("root/hidden/temp");
- grd_ccset.row = (iRow - 1);
- grd_ccset.col = 1;
- grd_ccset.addStatus(grd_ccset.row, "update");
- grd_ccset.addStatus(grd_ccset.row + 1, "update");
- model.refresh();
- }
- }
- /**
- * @desc : 순서이동
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fMoveDown()
- {
- var iRow = grd_ccset.row;
- var iRows = grd_ccset.rows;
- if (iRow != (iRows - 1)){
- model.makeValue("root/hidden/temp", "");
- model.makeValue("root/hidden/seq", "");
- var oldseq = model.getValue("/root/main/cclist/ccset[" + iRow + "]/sortno");
- var newseq = model.getValue("/root/main/cclist/ccset[" + (iRow + 1) + "]/sortno");
- model.copyNode("root/hidden/temp", "/root/main/cclist/ccset[" + iRow + "]");
- model.copyNode("/root/main/cclist/ccset[" + iRow + "]", "/root/main/cclist/ccset[" + (iRow + 1) + "]");
- model.copyNode("/root/main/cclist/ccset[" + (iRow + 1) + "]", "root/hidden/temp");
- model.setValue("/root/main/cclist/ccset[" + iRow + "]/sortno", oldseq);
- model.setValue("/root/main/cclist/ccset[" + (iRow + 1) + "]/sortno", newseq);
- model.removeNodeset("root/hidden/temp");
- grd_ccset.row = (iRow + 1);
- grd_ccset.col = 1;
- grd_ccset.addStatus(grd_ccset.row, "update");
- grd_ccset.addStatus(grd_ccset.row - 1, "update");
- model.refresh();
- }
- }
- /**
- * @desc : 개인주호소 삭제
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelCcset()
- {
- //var iRow = grd_ccset.row;
- //grd_ccset.addStatus(grd_ccset.row, "delete");
-
- var iRow = grd_ccset.selectedRows;
-
- for (var i = 0; i < iRow; i++)
- {
- grd_ccset.addStatus(grd_ccset.selectedRow(i), "delete");
- }
-
- }
- /**
- * @desc : 개인주호소 수정사항 저장
- * @
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave()
- {
- model.makeValue("/root/send/ccset", grd_ccset.getUpdateData());
- model.makeValue("/root/send/flag", "update");
- if(submit("TXMRF04201"))
- {
- grd_ccset.clearStatus();
- }
- }
|