123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795 |
- /*
-
- ITEM전체조회(SPMNR05900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sDelItemCd = "";
- var sDelItemIdex = "";
- var sDelRow = "";
- var sDelCol = "";
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- var sSetItemInfo = "";
- var sSetItemInfoList = "";
- model.removenode("/root/main/totalitem");
- model.removenodeSet("/root/main/duplchoiitemlist/duplchoiitem");
- model.removenodeSet("/root/main/patsetitemlist/patsetitem");
-
- opener.javascript.getParameter("SPMNR05900_ParamPat");
- //sSetItemInfo = opener.javascript.getParameter("SPMNR05900_ParamItemInfo");
- //sSetItemInfoList = sSetItemInfo.split("▩");
-
- //환자별 세팅 Param 설정
- //model.setValue("/root/cond/pid", "19082270");
- //model.setValue("/root/cond/orddd", "20080323");
- //model.setValue("/root/cond/cretno", "800474049");
-
- model.setValue("/root/cond/pid" , getArrayData("SPMNR05900_ParamPat", 1, 0));
- model.setValue("/root/cond/orddd" , getArrayData("SPMNR05900_ParamPat", 1, 1));
- model.setValue("/root/cond/cretno" , getArrayData("SPMNR05900_ParamPat", 1, 2));
- model.copyNode("/root/send", "/root/cond");
- submit("TRMNR05901");
-
- //ITEM LIST 세팅 func 호출
- fSettingItemList();
- //환자별 세팅 화면의 설정 데이터 체크 func 호출
- fSettingPatItemChk();
- //ITEM LIST Style 적용 func 호출
- fSettingStyle();
- }
-
-
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ITEM LIST 세팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingItemList(){
- var j = 0;
- var i = 1;
- var k = 1;
- var sGridWith = 0;
- var sColWith = 0;
- for(var tRow = 1 ; tRow <= getNodesetCount("/root/main/totalitem/itemlist") ; tRow ++){
-
- /* 순서별 List 조회 *//*
- if(tRow <= 31*k ){
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
-
- i++;
-
- if(tRow == 31*k){
- j++;
- k++;
- i = 1;
- grd_itemlist.addColumn("ref:itemnm"+j, false);
- grd_itemlist.addColumn("ref:itemcd"+j+"; visibility:hidden", false);
- grd_itemlist.addColumn("ref:itemindex"+j+"; visibility:hidden", false);
- }
- }
- */
- /* 분류별 리스트 조회(행변환) *//*
- if(model.getValue("/root/main/totalitem/itemlist["+tRow+"]/supcd") == "*"){
- if(tRow != 1){
- i = 1;
- j++;
-
- grd_itemlist.addColumn("ref:itemnm"+j, false);
- grd_itemlist.addColumn("ref:itemcd"+j+"; visibility:hidden", false);
- grd_itemlist.addColumn("ref:itemindex"+j+"; visibility:hidden", false);
-
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
- i++;
- }else{
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
- i++;
- }
- }else{
- if(i <= 31){
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
-
- if(i == 31){
- j++;
- i = 1;
- grd_itemlist.addColumn("ref:itemnm"+j, false);
- grd_itemlist.addColumn("ref:itemcd"+j+"; visibility:hidden", false);
- grd_itemlist.addColumn("ref:itemindex"+j+"; visibility:hidden", false);
- }else{
- i++;
- }
- }
- }
- */
- /* 분류별 리스트 조회 (행변환없음) */
- if(model.getValue("/root/main/totalitem/itemlist["+tRow+"]/supcd") == "*"){
- if(tRow != 1){
- i = 1;
- j++;
- }
-
- grd_itemlist.addColumn("ref:itemnm"+j, false);
- //grd_itemlist.addColumn("ref:itemcd"+j+"; visibility:hidden", false);
- grd_itemlist.addColumn("ref:itemindex"+j+"; visibility:hidden", false);
- //데이터 검증
- //grd_itemlist.addColumn("ref:itemindex"+j, false);
-
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- //model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
- i++;
-
- /* }else{
- grd_itemlist.addColumn("ref:itemnm"+j, false);
- grd_itemlist.addColumn("ref:itemindex"+j, false);
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- //model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
- i++;
- }
- */
- }else{
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemnm"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemnm"));
- //model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemcd"+j, model.getValue("/root/main/totalitem/itemlist["+tRow+"]/itemcd"));
- model.makeValue("/root/main/itemtotallist/itemtotalinfo["+i+"]/itemindex"+j, tRow);
- i++;
- }
- }
-
- //sGridWith = eval(grd_itemlist.cols) * 40 + 2
- sColWith = (1190 - 8) / eval(grd_itemlist.cols) * 2 ;
- for(var icol = grd_itemlist.fixedcols ; icol < grd_itemlist.cols ; icol ++){
- grd_itemlist.colWidth(icol) = sColWith;
- }
-
- grd_itemlist.attribute("style") = "left:0px; top:0px; width:"+1190+"px; height:721px; font-size:9pt; ";
- //grd_itemlist.attribute("colwidth") = sColWith;
- grd_itemlist.refresh();
- }
- /**
- * @group :
- * @ver : 2008.07.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ITEM LIST Style 적용
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingStyle(){
- for(var iRow = 0 ; iRow < grd_itemlist.rows ; iRow++){
- for(var iCol = 0 ; iCol < (grd_itemlist.cols / 2) ; iCol++ ){
- var sItemIndex = grd_itemlist.valueMatrix( iRow, grd_itemlist.colRef("itemindex"+iCol));
- if(sItemIndex != ""){
- if(model.getValue("/root/main/totalitem/itemlist["+sItemIndex+"]/supcd") == "*"){
- grd_itemlist.cellStyle("background-color", iRow, grd_itemlist.colRef("itemnm"+iCol), iRow, grd_itemlist.colRef("itemnm"+iCol)) = "#b7daff";
- grd_itemlist.cellStyle("font-weight", iRow, grd_itemlist.colRef("itemnm"+iCol), iRow, grd_itemlist.colRef("itemnm"+iCol)) = "bold";
- }
- if(model.getValue("/root/main/totalitem/itemlist["+sItemIndex+"]/insyn") == "Y"){
- grd_itemlist.cellStyle("background-color", iRow, grd_itemlist.colRef("itemnm"+iCol), iRow, grd_itemlist.colRef("itemnm"+iCol)) = "#b7f9aa";
- }
- if(model.getValue("/root/main/totalitem/itemlist["+sItemIndex+"]/extyn") == "Y"){
- grd_itemlist.cellStyle("background-image", iRow, grd_itemlist.colRef("itemnm"+iCol)) = "../../../com/commonweb/images/input_essential.gif";
- grd_itemlist.cellStyle("background-position", iRow, grd_itemlist.colRef("itemnm"+iCol)) = "top right";
- }
- }
- }
- }
- grd_itemlist.frozenRows = 1;
- }
- /**
- * @group :
- * @ver : 2008.07.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 마우스 포커스 시점 Item Name 표시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingItemNm(obj){
- // model.setValue("/root/stay/itemnm" , "");
- iRow = obj.mouseRow - obj.fixedrows;
- iCol = obj.mouseCol;
-
- caption10.value = obj.valueMatrix(iRow, iCol);
- caption10.refresh();
- }
- /**
- * @group :
- * @ver : 2008.07.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 마우스 더블 클릭시 데이터 임시 설정
- * @param :null, search : item 검색후의 그리드에서 선택시 전체아이템 리스트의 컬럼과 로우를 찾아서 넘겨준다.
- * @return :
- * @---------------------------------------------------
- */
- function fSelectionItem(pFlag, pRow, pCol){
- iRow = 0;
- iCol = 0;
- iIndexCol = 0;
- if ( pFlag =="search" ){
- iRow = pRow;
- iCol = pCol;
- iIndexCol = (eval(pCol) + 1);
-
- }else {
- iRow = grd_itemlist.row;
- iCol = grd_itemlist.col;
- iIndexCol = eval(grd_itemlist.col) + 1;
-
- }
- var sColNm = grd_itemlist.colAttribute(iCol, "ref");
- var sIndexInfo = grd_itemlist.valueMatrix(iRow, iIndexCol);
- if(iRow < 1 || sIndexInfo == ""){
- return;
- }
- var sItemCd = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/itemcd");
- var sRtrnMsg = "";
-
- if(sItemCd == ""){
- return;
- }
-
- //기록구분, 확장항목여부, 저장여부, 중복선택여부
- var sMainRecFlag = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/mainrecflag");
- var sExtYn = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/extyn");
- var sInsYn = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/insyn");
- var sChoiYn = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/choiyn");
-
- //기 선택 및 환자세팅 항목일 경우
- if(sInsYn == "Y" || sChoiYn == "Y" ){
- //확장항목일 경우 (B: 경구 수액, A:수행 확장)
- if(sExtYn == "Y" && (sMainRecFlag == "B" || sMainRecFlag == "A") ){
- fSettingParam("duplextitem", sItemCd, sIndexInfo);
- //기구 및 삽관기록 주체일 경우
- }else if(sMainRecFlag == "D" || sMainRecFlag == "G" || (sMainRecFlag == "E" && sExtYn == "Y")){
- fSettingParam("dupllocitem", sItemCd, sIndexInfo);
- }else{
- messageBox("이미등록된 아이템","E008");
- return;
- }
- //기 선택 및 환자세팅 항목이 아닐 경우
- }else{
- //확장항목일 경우
- if(sExtYn == "Y" || sMainRecFlag == "D" || sMainRecFlag == "G"){
- var sParamFlag = "locitem";
- if( (sExtYn == "Y" && sMainRecFlag == "E") || sMainRecFlag == "D" || sMainRecFlag == "G" ){
- sParamFlag = "locitem";
- }else{
- sParamFlag = "extitem";
- }
-
- if(fSettingParam(sParamFlag, sItemCd, sIndexInfo) == true){
- model.setValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/choiyn", "Y");
- grd_itemlist.cellStyle("background-color", iRow, iCol, iRow, iCol) = "#f4a6ee";
- grd_itemlist.focusColor = "#f4a6ee";
- }else{
- fParamInit();
- }
- }else{
- model.setValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/choiyn", "Y");
- grd_itemlist.cellStyle("background-color", iRow, iCol, iRow, iCol) = "#f4a6ee";
- grd_itemlist.focusColor = "#f4a6ee";
- fSettingChoiItem(sItemCd, "", sIndexInfo);
- }
- }
- }
- /**
- * @group :
- * @ver : 2008.07.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 중복입력 Paramter 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingParam(pFlag, pItemCd, pIndex){
- var rtnVal = false;
- var sParamMsg = "";
- var sParamMsgFlag = "";
- var sParamMsgHeader ="";
- sParamMsgHeader = "itemcd▦itemnm▦chngitemnm▩";
- sParamMsg = "";
- sParamMsgFlag = "flag▦itemcd▩"+pFlag+"▦"+pItemCd+"▩";
-
- if(pFlag == "duplextitem" || pFlag == "dupllocitem"){
-
- for(var i = 1 ; i <= getNodesetCount("/root/main/patsetitemlist/patitemlist") ; i ++){
- if(model.getValue("/root/main/patsetitemlist/patitemlist["+i+"]/itemcd") == pItemCd){
- sParamMsg += pItemCd +"▦"
- + model.getValue("/root/main/patsetitemlist/patitemlist["+i+"]/itemnm") + "▦"
- + model.getValue("/root/main/patsetitemlist/patitemlist["+i+"]/chngitemnm") + "▩" ;
- }
- }
-
- for(var i = 1 ; i <= getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem") ; i ++){
- if(model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemcd") == pItemCd){
- sParamMsg += pItemCd +"▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemnm") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/chngitemnm") + "▩" ;
- }
- }
- }
- setParameter("SPMNR06000_ParamFlag", sParamMsgFlag);
- if(sParamMsg != ""){
- setParameter("SPMNR06000_Param", sParamMsgHeader+sParamMsg);
- }
- modal("SPMNR06000");
-
- sRtrnMsg = getParameter("SPMNR06000_RtrnParam");
-
- if(sRtrnMsg == ""){
- rtnVal = false;
- }else{
- if(sRtrnMsg == "&empty"){
- sRtrnMsg = "";
- }
- rtnVal = true;
- fSettingChoiItem(pItemCd, sRtrnMsg, pIndex);
- }
- return rtnVal;
- }
- /**
- * @group :
- * @ver : 2008.07.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 설정 Item Node에 반영
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingChoiItem(pItem, pName, pIndex){
- InsRow = eval(getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem"))+1;
- model.makeNode("/root/main/duplchoiitemlist/duplchoiitem["+InsRow+"]");
- model.copyNode("/root/main/duplchoiitemlist/duplchoiitem["+InsRow+"]", "/root/main/totalitem/itemlist["+pIndex+"]");
- model.setValue("/root/main/duplchoiitemlist/duplchoiitem["+InsRow+"]/chngitemnm", pName);
- fParamInit();
- }
- /**
- * @group :
- * @ver : 2008.07.30
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Parameter 초기화 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fParamInit(){
- clearParameter("SPMNR06000_Param");
- clearParameter("SPMNR06000_ParamFlag");
- clearParameter("SPMNR06000_RtrnParam");
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : item 선택 정보를 환자별 세팅 화면으로 보냄
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveChoiItem(){
- var sParamHader = "itemcd▦itemnm▦supcd▦supnm▦clincobs▦clincobsprcpyn▦intake▦output▦catheter▦cathprcpyn▦careexec▦careexecprcpyn▦mainrecflag▦chngitemnm▦itemorigincd▦instru▦instruprcpyn▦supsetno▩";
- var sParamValue = "";
-
- for(var i = 1 ; i <= getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem") ; i ++){
- var sSubCd = model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/supcd");
- var sItemOrigin = "00";
-
- if(model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/extyn") == "Y" &&
- model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/mainrecflag") != "D" &&
- model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/mainrecflag") != "E" &&
- model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/mainrecflag") != "G" ){//기구도 삽관과 같이 중복가능
- sItemOrigin = "04";
- }
-
- sParamValue += model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemcd") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemnm") + "▦"
- + sSubCd + "▦"
- + model.getValue("/root/main/totalitem/itemlist[itemcd ='"+sSubCd+"']/itemnm") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/clincobs") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/clincobsprcpyn") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/intake") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/output") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/catheter") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/cathprcpyn") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/careexec") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/careexecprcpyn") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/mainrecflag") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/chngitemnm") + "▦"
- + sItemOrigin + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/instru") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/instruprcpyn") + "▦"
- + model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/supsetno")+ "▩";
- }
- opener.javascript.setParameter("SPMNR05900_RtnRaram",sParamHader + sParamValue);
- window.close();
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자별 세팅 화면의 기 선택 데이터 체크
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingPatItemChk(){
- var ChkRow = getNodesetCount("/root/main/patsetitemlist/patitemlist");
- if(ChkRow < 1){
- return;
- }else{
- for(var i = 1 ; i <= ChkRow ; i++){
- sItemCd = model.getValue("/root/main/patsetitemlist/patitemlist["+i+"]/itemcd");
- if(model.getValue("/root/main/totalitem/itemlist[itemcd='"+sItemCd+"']/itemcd") != ""){
- model.setValue("/root/main/totalitem/itemlist[itemcd='"+sItemCd+"']/insyn", "Y");
- }
- }
- }
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 셀선택시 셀의 포커스 컬러 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangeFocusColor(){
- iRow = grd_itemlist.row;
- iCol = grd_itemlist.col;
- grd_itemlist.focusColor = grd_itemlist.cellStyle("background-color", iRow, iCol, iRow, iCol);
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Setting Item 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopupDelItem(){
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
-
- grd_itemlist.row = grd_itemlist.mouseRow;
- grd_itemlist.col = grd_itemlist.mouseCol;
-
- if( event.button == 3 ){
-
- sCnt = 0;
-
- sDelRow = grd_itemlist.row;
- sDelCol = grd_itemlist.col;
- iIndexCol = eval(sDelCol) + 1;
-
- // if(iRow < 1 || iIndexCol == ""){
- // return;
- // }
-
- // var sIndexInfo = grd_itemlist.valueMatrix(sDelRow, iIndexCol);
-
- // if(sIndexInfo == ""){
- // return;
- // }
-
- // sDelItemCd = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/itemcd");
- // var sDelItemNm = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/itemnm");
-
- if(grd_itemlist.isCell(event.target) && grd_itemlist.mouseRow >= 1 && sDelRow > 0 && iIndexCol != "" ){
- var sIndexInfo = grd_itemlist.valueMatrix(sDelRow, iIndexCol);
-
- if((grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) == "#f4a6ee" ||
- grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) == "#b7f9aa") && sIndexInfo != ""){
- sDelItemCd = model.getValue("/root/main/totalitem/itemlist["+sIndexInfo+"]/itemcd");
-
- //추가선택 중 여러개 등록 가능한 아이템 존재시
- for(var i =1 ; i <= getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem") ; i ++){
- if(model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemcd") == sDelItemCd ){
- sCnt ++;
- }
- }
-
- if(sCnt > 1 ){
- window.setPopupMenu(true, "/root/init/popmenu1/itemmenu", "name", "func", false);
- }else if(grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) == "#b7f9aa" && sCnt > 0){
- window.setPopupMenu(true, "/root/init/popmenu1/itemmenu", "name", "func", false);
- }else if(sCnt == 1){
- window.setPopupMenu(true, "/root/init/popmenu2/itemmenu", "name", "func", false);
- }else{
- window.setPopupMenu(false);
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
- }
-
- }else{
- window.setPopupMenu(false);
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
- }
- }else{
- window.setPopupMenu(false);
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
- }
- }
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Setting Item 삭제(다중 세팅 아이템)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelItemList(){
- var msg = messageBox("여러 개의 설정 아이템이 존재합니다.\n단 등록 및 기 선택된 아이템은 해제되지 않습니다.\n계속", "Q004");//실행 하시겠습니까? yes=6, no=7
- if(Number(msg) == 6){//예
- sCnt = 0 ;
- for(var i = getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem") ; i > 0 ; i --){
- if(model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemcd") == sDelItemCd ){
- model.removenodeSet("/root/main/duplchoiitemlist/duplchoiitem["+i+"]");
- }
- }
-
- if(grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) == "#f4a6ee"){
- model.setValue("/root/main/totalitem/itemlist[itemcd ='"+sDelItemCd+"']/choiyn", "N");
- grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) = "#ffffff";
- }
-
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
-
- grd_itemlist.col = sDelCol+1;
- //fChangeFocusColor();
- }
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Setting Item 삭제(싱글 세팅 아이템)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelItem(){
- sCnt = 0 ;
- for(var i = getNodesetCount("/root/main/duplchoiitemlist/duplchoiitem") ; i > 0 ; i --){
- if(model.getValue("/root/main/duplchoiitemlist/duplchoiitem["+i+"]/itemcd") == sDelItemCd ){
- model.removenodeSet("/root/main/duplchoiitemlist/duplchoiitem["+i+"]");
- grd_itemlist.cellStyle("background-color", sDelRow, sDelCol, sDelRow, sDelCol) = "#ffffff";
- }
- }
- model.setValue("/root/main/totalitem/itemlist[itemcd ='"+sDelItemCd+"']/choiyn", "N");
- sDelItemCd = "";
- sDelRow = "";
- sDelCol = "";
- grd_itemlist.col = sDelCol+1;
- //fChangeFocusColor();
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : item search
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearchItem(){
-
- var itemcd ="";
-
- model.setValue("/root/send/recflag", model.getValue("/root/cond/recflag"));
- model.setValue("/root/send/itemnm", model.getValue("/root/cond/itemnm"));
- model.setValue("/root/send/clscd", model.getValue("/root/cond/clscd"));
- model.setValue("/root/send/srchflag", "G");
-
- if ( isNull(model.getValue("/root/cond/itemnm")) || model.getValue("/root/cond/itemnm").length < 2) {
- messageBox("검색하고자 하는 아이템명을 2자 이상 ","C001");
- return;
- }
-
- if(submit("TRMNR05902")){
- for( var idx = 1 ; idx <= getNodesetCount("/root/main/searchinfo/itemlist") ; idx++ ){
- if ( model.getValue("/root/main/searchinfo/itemlist["+ idx +"]/depth") > "1" ){
- itemcd = model.getValue("/root/main/searchinfo/itemlist["+ idx +"]/itemcd");
- if ( isNull(model.getValue("/root/main/patsetitemlist/patitemlist[itemcd = '"+ itemcd +"']/itemcd")) ){
- grd_srchitem.cellStyle("background-color", (idx-1), 0, (idx-1),0) = "#FFFFFF";
- } else {
- grd_srchitem.cellStyle("background-color", (idx-1), 0, (idx-1),0) = "#B7F9AA";
- }
- } else {
- grd_srchitem.cellStyle("background-color", (idx-1), 0, (idx-1),0) = "#b7daff";
- }
-
- }
-
- }
-
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 검색한 아이템 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingItemSearch(){
-
- var supcd = model.getValue("/root/main/searchinfo/itemlist["+ (eval(grd_srchitem.mouseRow) + 1) +"]/supcd");
- var itemnm = model.getValue("/root/main/searchinfo/itemlist["+ (eval(grd_srchitem.mouseRow) + 1) +"]/itemnm");
- var supitemnm = model.getValue("/root/main/searchinfo/itemlist[ itemcd = '"+ supcd +"']/itemnm");
-
- var searchCol = 0;
- var searchRow = 0;
-
- for( var idx = 0 ; idx < grd_itemlist.cols ; idx++ ){
- if ( grd_itemlist.valueMatrix(0,idx) == supitemnm ){
- searchCol = idx;
- break;
- }
- }
- searchRow = grd_itemlist.findRow(itemnm, 1, searchCol);
- //fSelectionItem(pFlag, pRow, pCol)
-
- grd_itemlist.row = searchRow;
- grd_itemlist.col = searchCol;
-
- fSelectionItem("search", searchRow, searchCol );
- fCloseSearch();
- grd_itemlist.bottomRow = searchRow;
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : open search
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOpenSearch(){
- grp_search.visible = true;
-
- grp_biz.attribute("style")="left:0px; top:40px; width:1031px; height:722px; " ;
- grd_itemlist.attribute("style")="left:0px; top:0px; width:"+1030+"px; height:721px; font-size:9pt; " ;
- model.setFocus("ipt_searchnm");
- }
- /**
- * @group :
- * @ver : 2008.07.28
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : close search
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCloseSearch(){
-
- grp_search.visible = false;
-
- grp_biz.attribute("style")="left:0px; top:40px; width:1191px; height:722px;" ;
- grd_itemlist.attribute("style")="left:0px; top:0px; width:"+1190+"px; height:721px; font-size:9pt; " ;
- }
|