123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- /* ---------------------------------------------------------------------
-
- 입간판 전문의 진료일정수정
-
- - Version :
- 1) : Ver.1.00.01
- : Create By dhkim
- : 2009.09.16
- ----------------------------------------------------------------------*/
-
- var grdPath = "/root/main/signboardinfo/signboardinfolist";
- /**
- * @group :
- * @ver : 2009.09.16
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면초기화
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
-
-
- //센터인지 일반진료과인지 조회
- //입간판타이틀 조회
- if(!submit('TRMNV99901')){
- messageBox('문제가 발생하여 타이틀조회를 실패하였습니다.', 'E');
- return false;
- }
-
- }
- /**
- * @group :
- * @ver : 2009.09.16
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정조회
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- var ip;
- function fSearch(){
-
- ip = model.getValue('/root/cond/ipaddr');
- if(ip == null || ip == ''){
- messageBox('조회할 진료일정을 선택하세요.', 'E');
- return;
- }
-
- model.removenode('/root/send');
- model.makeValue('/root/send/ipaddr', ip);
-
- model.removenode('/root/main/signboardinfo');
- model.makeNode('/root/main/signboardinfo');
-
- //진료일정조회
- if(!submit('TRMNV99902')){
- messageBox('문제가 발생하여 진료일정조회를 실패하였습니다.', 'E');
- return false;
- }else{
-
- //선택진료 색 변경
- for(var i = 1; i <= grd_scheinfo.rows;i++){
- if(model.getValue(grdPath+"["+i+"]/choyn") == "Y"){
- grd_scheinfo.cellstyle("background-color", i, 0, i, 14) = '#ccffff';//선택진료
- }else{
- grd_scheinfo.cellstyle("background-color", i, 0, i, 14) = '#ffffff';
- }
- }
-
- }
-
- model.refresh();
- }
-
-
- /**
- * @group :
- * @ver : 2009.09.18
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정추가
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAdd(){
-
-
- grd_scheinfo.addRow();
-
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/stat", 'i');//-:조회, i:신규, u:수정, d:삭제
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/bgclr", '#FFFFFF');//기본배경색
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/ftface", '굴림체');//기본글씨체
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_supdeptnm", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_fieldnm", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_subdeptnm", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_drnm", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_amsche", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_pmsche", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_spclmednm", '10');//기본글씨크기
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/choyn", 'N');//기본선택진료여부
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/ipaddr", ip);
-
-
- //윗행의 과명, 세부분야, 진료과를 기본 세팅
-
- if(grd_scheinfo.row > 1){
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/supdeptnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/supdeptnm"));
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fieldnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/fieldnm"));
- model.setValue(grdPath + "[" + grd_scheinfo.row + "]/subdeptnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/subdeptnm"));
- }
-
- grd_scheinfo.addStatus(grd_scheinfo.row, 'insert');
-
- model.refresh();
- }
-
-
- /**
- * @group :
- * @ver : 2010.03.26
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정삽입
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInsert(){
-
- var curRow = grd_scheinfo.row;
- if(curRow < 0){
- messageBox("삽입할 행을 선택하세요.", "E");
- return;
- }else{
- grd_scheinfo.insertRow(curRow);
- model.setValue(grdPath+"[" + curRow + "]/stat", 'i');//-:조회, i:신규, u:수정, d:삭제
- grd_scheinfo.addStatus(curRow, 'insert');
- }
- model.refresh();
- grd_scheinfo.refresh();
- }
-
-
- /**
- * @group :
- * @ver : 2009.09.18
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정삭제
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelete(){
-
- //저장되어있는 행이면 D로 표시, 신규행이면 바로삭제
- var curRow = grd_scheinfo.row;
- if(curRow < 0){
- messageBox("삭제할 행을 선택하세요.", "E");
- return;
- }else{
-
- grd_scheinfo.deleteRow(curRow);
-
- /*
- var state = model.getValue(grdPath+"[" + curRow + "]/stat");
- if(state == "i"){
- grd_scheinfo.deleteRow(curRow);
- }else{
- model.setValue(grdPath+"[" + curRow + "]/stat", 'd');//-:조회, i:신규, u:수정, d:삭제
- grd_scheinfo.addStatus(curRow, 'delete');
- }
- */
- }
- model.refresh();
- grd_scheinfo.refresh();
- }
-
-
- /**
- * @group :
- * @ver : 2010.03.26
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정수정
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fModify(){
-
- model.setValue(grdPath+"[" + grd_scheinfo.row + "]/stat", 'u');//-:조회, i:신규, u:수정, d:삭제
- grd_scheinfo.addStatus(grd_scheinfo.row, 'update');
-
- }
-
-
- /**
- * @group :
- * @ver : 2009.09.18
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료일정수정내역 저장
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave(){
-
- var sortseq="";
- //저장전 sortseq 재정렬
- for(var i = 1; i < grd_scheinfo.rows; i++){
-
- if(i < 9){
- sortseq = "00";
- }else if(i>9 && i<99){
- sortseq = "0";
- }
-
-
- model.setValue(grdPath+"[" + (i) + "]/sortseq", sortseq+i);
- }
-
- model.removenode('/root/send');
- model.makeValue('/root/send/savedata', grd_scheinfo.getUpdateDataAll('i'));
-
- model.refresh();
-
- if(submit('TXMNV99801')){
- fSearch();
- }
- }
-
-
- /**
- * @group :
- * @ver : 2010.03.26
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택진료 색깔적용
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetChoiceYn(choyn){
-
- var cells = grd_scheinfo.selectedCells; //선택된 쎌의 배열
- var sRow, sCol, sColNm; //선택된 쎌의 row, col 값, 선택된 col의 필드명
-
- for(var i = 0; i < cells.length; i++){
-
- sRow = cells.item(i).row;
- sCol = cells.item(i).col;
- sColNm = grd_scheinfo.colAttribute(sCol, "ref");
-
- //선택진료여부값 세팅
- model.setValue(grdPath+"[" + sRow + "]/choyn", choyn);
-
- //선택된 쎌의 전체 행 색상 변경
- for(var j = 0; j <= 14; j++){
- if(choyn == "Y"){
- grd_scheinfo.cellStyle('background-color', sRow, j) = "#ccffff";
- }else{
- grd_scheinfo.cellStyle('background-color', sRow, j) = "#ffffff";
- }
- }
-
- }
-
- //색변경후 선택 해제
- grd_scheinfo.row = 0;
- grd_scheinfo.col = 0;
-
- model.refresh();
-
- }
-
-
-
- /**
- * @group :
- * @ver : 2010.04.01
- * @by : dhkim
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택된 쎌의 글씨크기변경
- * @param :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetFontSize(ftSize){
-
- if(ftSize > 0){
- var cells = grd_scheinfo.selectedCells; //선택된 쎌의 배열
- var sRow, sCol, sColNm; //선택된 쎌의 row, col 값, 선택된 col의 필드명
- for(var i = 0; i < cells.length; i++){
- sRow = cells.item(i).row;
- sCol = cells.item(i).col;
- sColNm = grd_scheinfo.colAttribute(sCol, "ref");
-
- //선택된 쎌의 글씨크기변경(show)
- grd_scheinfo.cellStyle('font-size', sRow, sCol) = ftSize;
-
- //변경된 글씨체 값을 노드에 세팅
- model.setValue(grdPath+"[" + sRow + "]/fs_"+sColNm, ftSize);
-
- }
-
- //글씨크기변경후 선택 해제
- grd_scheinfo.row = 0;
- grd_scheinfo.col = 0;
-
- //콤보 값 초기화
- model.setValue("/root/temp/fontinfo/size", "");
- model.refresh();
- grd_scheinfo.refresh();
-
- }else{
- messageBox("글씨크기를 선택하세요.", "E");
- }
-
-
- }
|