123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- /*
-
- 간호Item 시간Setting(SPMNR04900.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xPrcpInfoPath = "/root/main/prcpinfo";
- var xClsListPath = "/root/main/clsinfo/clslist";
- var xTimeListPath = "/root/main/timeinfo/timelist";
- var sTimeColor = "#fcd2c1";
- /**
- * @group :
- * @ver : 2007.08.08
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- var sParamMsg = "";
- var sApntTMSpecList=""; // 기준시간setting
- var sRemainder = 0; // 나머지
- var sCareItemCD = "";
- var sFlag = "";
- var iRow = 0;
- if(checkOpener()){
- sParamMsg = opener.javascript.getParameter("SPMNR04900_Param");
- sFlag = getArrayData(sParamMsg,1,5);
- model.setValue( xPrcpInfoPath+"/prcpnm", getArrayData(sParamMsg,1,0));
- model.setValue( xPrcpInfoPath+"/prcpcd", getArrayData(sParamMsg,1,1));
- model.setValue( xPrcpInfoPath+"/careitemnm", getArrayData(sParamMsg,1,2));
- model.setValue( xPrcpInfoPath+"/careitemcd", getArrayData(sParamMsg,1,3));
- model.setValue( xPrcpInfoPath+"/apnttmspec", getArrayData(sParamMsg,1,4));
- model.setValue( xPrcpInfoPath+"/flag", sFlag);
-
- }
- // 분류명 리스트 조회
- if(submit("TRMNR04901")){
- if(sFlag == "all"){
- sCareItemCD = model.getValue(xPrcpInfoPath+"/careitemcd");
- if(sCareItemCD != ""){
- iRow = grd_clslist.findRow(sCareItemCD,1,3,false,true);
- if(iRow > 0) model.setValue(xClsListPath+"["+iRow+"]/check","true");
- }
- }else{
- for(var iRow=grd_clslist.fixedrows;iRow<=grd_clslist.rows-grd_clslist.fixedrows;iRow++){
- grd_clslist.isReadOnly(iRow,1) = true;
- }
- }
- }
-
- // 시간 세팅
- model.removenodeset(xTimeListPath);
- var i = 1;
- for(iRow=1; iRow<=4; iRow++){
- grd_timelist.addRow(false);
- for(var iCol=1; iCol<=6; iCol++){
- if(i == 24){
- i=0;
- }
- model.setValue(xTimeListPath+"["+iRow+"]/time"+iCol,i);
- i++;
- }
- }
- grd_timelist.rebuild();
-
- sApntTMSpecList = model.getValue(xPrcpInfoPath+"/apnttmspec");
- if( sApntTMSpecList != ""){
- var sApntTMSpec = sApntTMSpecList.split(",");
- for(i=0; i<sApntTMSpec.length; i++){
- sRemainder = eval(sApntTMSpec[i]) % 6;
- if(sRemainder == 0) sRemainder += 6;
-
- setCellStyle("grd_timelist","0",sApntTMSpec[i],"time"+sRemainder , "equal");
- }
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.08
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 클릭시
- * @param : pFlag ( time : 시간setting, item : 간호 Item)
- * @return :
- * @---------------------------------------------------
- */
- function fClinckGridRow(pFlag){
- var iRow = 0;
- var iCol = 0;
- switch(pFlag){
- case "time" :
- iRow = grd_timelist.row;
- iCol = grd_timelist.col;
- if(iRow < 1 || iCol < 0) return;
- if(grd_timelist.cellStyle("background-color", iRow, iCol) == sTimeColor){
- grd_timelist.cellStyle("background-color", iRow, iCol) = "#ffffff";
- }else{
- grd_timelist.cellStyle("background-color", iRow, iCol) = sTimeColor;
- }
- grd_timelist.row = 0;
- grd_timelist.col = -1;
- break;
- case "item":
- iRow = grd_clslist.row;
- iCol = grd_clslist.col;
- if(model.getValue(xPrcpInfoPath+"/flag") == "dept") return;
-
- if(iCol > 1){
- model.setValue(xClsListPath+"["+iRow+"]/check","true");
- }
- for(i=grd_clslist.fixedrows; i<= grd_clslist.rows-grd_clslist.fixedrows; i++){
- if(i != iRow && model.getValue(xClsListPath+"["+iRow+"]/check") == "true"){
- model.setValue(xClsListPath+"["+i+"]/check","false");
- }
- }
- break;
- }
- }
- /**
- * @group :
- * @ver : 2007.08.08
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 간호Item 또는 시간 setting 초기화
- * @param : pFlag ( time : 시간setting, item : 간호 Item)
- * @return :
- * @---------------------------------------------------
- */
-
- function fClearGrid(pFlag){
- switch(pFlag){
- case "time":
- grd_timelist.allstyle( "all", "background-color" ) = "#FFFFFF";
- grd_timelist.rebuild();
- break;
- case "item":
- var iRow = grd_clslist.findRow("true",1,1,false,true);
- if(iRow < 0 ){
- return;
- }
- model.setValue(xClsListPath+"["+iRow+"]/check","false");
- grd_clslist.row = 0;
- }
- }
- /**
- * @group :
- * @ver : 2007.08.08
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 간호Item 시간 Setting 전송
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSend(){
- var sApntTMSpec = "";
- sReturnMsg = "careitemnm▦careitemcd▦apnttmspec▩";
- var iRowCnt = grd_timelist.rows-grd_timelist.fixedrows;
- var iColCnt = grd_timelist.cols-grd_timelist.fixedcols-1;
- for(var iRow=grd_timelist.fixedrows;iRow<=iRowCnt; iRow++){
- for(var iCol=grd_timelist.fixedcols; iCol<=iColCnt; iCol++){
- if(grd_timelist.cellStyle("background-color", iRow, iCol) == sTimeColor){
- if(iRow == iRowCnt && iCol == iColCnt){
- if(sApntTMSpec != ""){
- sApntTMSpec = grd_timelist.labelmatrix(iRow,iCol)+","+sApntTMSpec;
- }else{
- sApntTMSpec += grd_timelist.labelmatrix(iRow,iCol);
- }
- }else{
- if(sApntTMSpec != ""){
- sApntTMSpec += ",";
- }
- sApntTMSpec += grd_timelist.labelmatrix(iRow,iCol);
- }
- }
- }
- }
- var iRow = grd_clslist.findRow("true",1,1,false,true);
- sReturnMsg += model.getValue(xClsListPath+"["+iRow+"]/itemnm")+"▦"
- + model.getValue(xClsListPath+"["+iRow+"]/itemcd")+"▦"
- + sApntTMSpec+"▩";
- opener.javascript.setParameter("SPMNR04900_Return",sReturnMsg);
- window.close();
- }
|