123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674 |
- <?xml version="1.0" encoding="utf-8" standalone="no"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPPMB01002" position="absolute 0 0 492 373" titletext="병원달력" onload="SPPMB01002_onload">
- <Layouts>
- <Layout>
- <Div id="grp_calendar" position="absolute 0 0 492 40" style="">
- <Layouts>
- <Layout>
- <Shape id="rectangle1" anchor="default" class="calendar_header" type="rectangle" position="absolute 0 0 492 40" style=""/>
- <Button id="button31" class="icon_pre_year" position="absolute 151 12 167 28" style="" text="" onclick="grp_calendar_button31_onclick"/>
- <Button id="button32" class="icon_next_year" position="absolute 326 12 342 28" style="" text="" onclick="grp_calendar_button32_onclick"/>
- <Button id="btn_premonth" class="icon_pre_month" position="absolute 170 12 186 28" style="" text="" onclick="grp_calendar_btn_premonth_onclick"/>
- <Button id="button34" class="icon_next_month" position="absolute 307 12 323 28" style="" text="" onclick="grp_calendar_button34_onclick"/>
- <Edit id="opt_year" class="calendar_output" position="absolute 200 10 230 29" style="" anchor="default" readonly="true"/>
- <Edit id="opt_month" class="calendar_output" position="absolute 250 10 280 29" style="" anchor="default" readonly="true"/>
- <Static id="caption1" class="calendar_output" position="absolute 230 10 250 29" style="color:black;" text="년"/>
- <Static id="caption2" class="calendar_output" position="absolute 280 10 300 29" style="color:black;" text="월"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid id="grd_calendar" binddataset="ds_hidden_calendar_weeklist_list" class="gridcalendar" position="absolute 0 85 492 350" style="border:1 solid #1771beff;" oncellclick="grd_calendar_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- </Columns>
- <Rows>
- <Row size="22" band="head"/>
- <Row size="24"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="일"/>
- <Cell col="1" text="월"/>
- <Cell col="2" text="화"/>
- <Cell col="3" text="수"/>
- <Cell col="4" text="목"/>
- <Cell col="5" text="금"/>
- <Cell col="6" text="토"/>
- </Band>
- <Band id="body">
- <Cell style="background:EXPR(fSetProperty(currow,"sun",0));background2:EXPR(fSetProperty(currow,"sun",0));color:EXPR(sun_dutflag=='8'?'red':'black');color2:EXPR(sun_dutflag=='8'?'red':'black');"/>
- <Cell col="1" style="background:EXPR(fSetProperty(currow,"mon",0));background2:EXPR(fSetProperty(currow,"mon",0));color:EXPR(mon_dutflag=='8'?'red':'black');color2:EXPR(mon_dutflag=='8'?'red':'black');"/>
- <Cell col="2" style="background:EXPR(fSetProperty(currow,"tue",0));background2:EXPR(fSetProperty(currow,"tue",0));color:EXPR(tue_dutflag=='8'?'red':'black');color2:EXPR(tue_dutflag=='8'?'red':'black');"/>
- <Cell col="3" style="background:EXPR(fSetProperty(currow,"wed",0));background2:EXPR(fSetProperty(currow,"wed",0));color:EXPR(wed_dutflag=='8'?'red':'black');color2:EXPR(wed_dutflag=='8'?'red':'black');"/>
- <Cell col="4" style="background:EXPR(fSetProperty(currow,"thu",0));background2:EXPR(fSetProperty(currow,"thu",0));color:EXPR(thu_dutflag=='8'?'red':'black');color2:EXPR(thu_dutflag=='8'?'red':'black');"/>
- <Cell col="5" style="background:EXPR(fSetProperty(currow,"fri",0));background2:EXPR(fSetProperty(currow,"fri",0));color:EXPR(fri_dutflag=='8'?'red':'black');color2:EXPR(fri_dutflag=='8'?'red':'black');"/>
- <Cell col="6" style="background:EXPR(fSetProperty(currow,"sat",0));background2:EXPR(fSetProperty(currow,"sat",0));color:EXPR(sat_dutflag=='8'?'red':'black');color2:EXPR(sat_dutflag=='8'?'red':'black');"/>
- <Cell row="1" style="background:EXPR(fSetProperty(currow,"sun",0));background2:EXPR(fSetProperty(currow,"sun",0));color:EXPR(sun_dutflag=='8'?'red':'black');color2:EXPR(sun_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="1" style="background:EXPR(fSetProperty(currow,"mon",0));background2:EXPR(fSetProperty(currow,"mon",0));color:EXPR(mon_dutflag=='8'?'red':'black');color2:EXPR(mon_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="2" style="background:EXPR(fSetProperty(currow,"tue",0));background2:EXPR(fSetProperty(currow,"tue",0));color:EXPR(tue_dutflag=='8'?'red':'black');color2:EXPR(tue_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="3" style="background:EXPR(fSetProperty(currow,"wed",0));background2:EXPR(fSetProperty(currow,"wed",0));color:EXPR(wed_dutflag=='8'?'red':'black');color2:EXPR(wed_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="4" style="background:EXPR(fSetProperty(currow,"thu",0));background2:EXPR(fSetProperty(currow,"thu",0));color:EXPR(thu_dutflag=='8'?'red':'black');color2:EXPR(thu_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="5" style="background:EXPR(fSetProperty(currow,"fri",0));background2:EXPR(fSetProperty(currow,"fri",0));color:EXPR(fri_dutflag=='8'?'red':'black');color2:EXPR(fri_dutflag=='8'?'red':'black');"/>
- <Cell row="1" col="6" style="background:EXPR(fSetProperty(currow,"sat",0));background2:EXPR(fSetProperty(currow,"sat",0));color:EXPR(sat_dutflag=='8'?'red':'black');color2:EXPR(sat_dutflag=='8'?'red':'black');"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption3" position="absolute 0 353 35 373" style="align:center ;background:#ffff99 ;" text="오전"/>
- <Static id="caption4" position="absolute 38 353 73 373" style="align:center ;background:#ccffff ;" text="오후"/>
- <Static id="caption5" position="absolute 75 353 110 373" style="align:center ;background:#ff99cc ;" text="야간"/>
- <Static id="caption6" position="absolute 112 353 147 373" style="align:center ;background:#ffcc99 ;" text="전일"/>
- <Static id="caption7" position="absolute 152 353 187 373" style="align:center ;" text="없음"/>
- <Div id="group1" position="absolute 67 48 427 78" style="">
- <Layouts>
- <Layout>
- <Button id="btn_jan" class="icon_month" position="absolute 0 3 27 30" style="" text="1" onclick="Button_onclick"/>
- <Button id="btn_feb" class="icon_month" position="absolute 30 3 57 30" style="" text="2" onclick="Button_onclick"/>
- <Button id="btn_mar" class="icon_month" position="absolute 60 3 87 30" style="" text="3" onclick="Button_onclick"/>
- <Button id="btn_apr" class="icon_month" position="absolute 90 3 117 30" style="" text="4" onclick="Button_onclick"/>
- <Button id="btn_may" class="icon_month" position="absolute 120 3 147 30" style="" text="5" onclick="Button_onclick"/>
- <Button id="btn_jun" class="icon_month" position="absolute 150 3 177 30" style="" text="6" onclick="Button_onclick"/>
- <Button id="btn_jul" class="icon_month" position="absolute 180 3 207 30" style="" text="7" onclick="Button_onclick"/>
- <Button id="btn_aug" class="icon_month" position="absolute 210 3 237 30" style="" text="8" onclick="Button_onclick"/>
- <Button id="btn_sep" class="icon_month" position="absolute 240 3 267 30" style="" text="9" onclick="Button_onclick"/>
- <Button id="btn_oct" class="icon_month" position="absolute 270 3 297 30" style="" text="10" onclick="Button_onclick"/>
- <Button id="btn_nov" class="icon_month" position="absolute 300 3 327 30" style="" text="11" onclick="Button_onclick"/>
- <Button id="btn_dec" class="icon_month" position="absolute 330 3 357 30" style="" text="12" onclick="Button_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_hidden_calendar_weeklist_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="sun" type="STRING" size="256"/>
- <Column id="mon" type="STRING" size="256"/>
- <Column id="tue" type="STRING" size="256"/>
- <Column id="wed" type="STRING" size="256"/>
- <Column id="thu" type="STRING" size="256"/>
- <Column id="fri" type="STRING" size="256"/>
- <Column id="sat" type="STRING" size="256"/>
- <Column id="sun_memo" type="STRING" size="256"/>
- <Column id="mon_memo" type="STRING" size="256"/>
- <Column id="tue_memo" type="STRING" size="256"/>
- <Column id="wed_memo" type="STRING" size="256"/>
- <Column id="thu_memo" type="STRING" size="256"/>
- <Column id="fri_memo" type="STRING" size="256"/>
- <Column id="sat_memo" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden_calendar" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="year" type="STRING" size="256"/>
- <Column id="month" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="year"/>
- <Col id="month"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_calendar_weeklist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo/>
- </Dataset>
- <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo/>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_calendar.opt_year" propid="value" datasetid="ds_hidden_calendar" columnid="year"/>
- <BindItem id="item1" compid="grp_calendar.opt_month" propid="value" datasetid="ds_hidden_calendar" columnid="month"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs"
- var beforeId = "";
- var dayArr = ["sun","mon","tue","wed","thu","fri","sat"];
- var dayMemoArr = ["sun_memo","mon_memo","tue_memo","wed_memo","thu_memo","fri_memo","sat_memo"];
- var arErrorCode = new HashArray();
- function SPPMB01002_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- grdf_initGrid(this.grd_calendar);
- //grdf_setGridSort(grd_XXX);
- //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
- initCalendar();
- //2008-10-04 이동식 추가
- fChangeButtonColor();
- //END..
- }
- //2007-10-04 이동식 추가
- function fChangeButtonColor(){
- var curMonth = ds_hidden_calendar.getColumn(0, "month");
- //alert( curMonth );
- switch( curMonth ){
- case '01' : //button1.attribute("class") = "btn5_letter2";
- group1.btn_jan.enable = false;
- beforeId = "group1.btn_jan";
- break;
- case '02' : //button2.attribute("class") = "btn5_letter2";
- group1.btn_feb.enable = false;
- beforeId = "group1.btn_feb";
- break;
- case '03' : //button3.attribute("class") = "btn5_letter2";
- group1.btn_mar.enable = false;
- beforeId = "group1.btn_mar";
- break;
- case '04' : //button4.attribute("class") = "btn5_letter2";
- group1.btn_apr.enable = false;
- beforeId = "group1.btn_apr";
- break;
- case '05' : //button5.attribute("class") = "btn5_letter2";
- group1.btn_may.enable = false;
- beforeId = "group1.btn_may";
- break;
- case '06' : //button6.attribute("class") = "btn5_letter2";
- group1.btn_jun.enable = false;
- beforeId = "group1.btn_jun";
- break;
- case '07' : //button7.attribute("class") = "btn5_letter2";
- group1.btn_jul.enable = false;
- beforeId = "group1.btn_jul";
- break;
- case '08' : //button8.attribute("class") = "btn5_letter2";
- group1.btn_aug.enable = false;
- beforeId = "group1.btn_aug";
- break;
- case '09' : //button9.attribute("class") = "btn5_letter2";
- group1.btn_sep.enable = false;
- beforeId = "group1.btn_sep";
- break;
- case '10' : //button10.attribute("class") = "btn5_letter2";
- group1.btn_oct.enable = false;
- beforeId = "group1.btn_oct";
- break;
- case '11' : //button11.attribute("class") = "btn5_letter2";
- group1.btn_nov.enable = false;
- beforeId = "group1.btn_nov";
- break;
- case '12' : //button12.attribute("class") = "btn5_letter2";
- group1.btn_dec.enable = false;
- beforeId = "group1.btn_dec";
- break;
- }
- }
- function initCalendar() {
- if( ds_hidden_calendar.getColumn(0, "year") == "" || ds_hidden_calendar.getColumn(0, "month") == "" ){
- var curDate = utlf_getCurrentDate().toDate();
- ds_hidden_calendar.setColumn( 0, "year", curDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn( 0, "month", curDate.getDateFormat('MM'));
- //model.refresh();
- setCalendar(curDate);
- }
- }
- function fGetHospitalCalendar(){
- var dd = (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month"));
- dsf_makeValue( ds_send, "date", "string", "" );
- ds_send.setColumn( 0, "date",dd);
- //if (submit("TRPMB01001") == true) return true;
- var oParam = {};
- oParam.id = "TRPMB01001";
- oParam.service = "pambaseinfomngtapp.OrdSche";
- oParam.method = "reqGetHospitalCalendar";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_hidden_calendarinfo_calendarinfolist=caldata";
- oParam.async = false;
- oParam.callback = "cf_TRPMB01001";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRPMB01001") > -1) return true
- else return false;
- }
- function cf_TRPMB01001(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function setCalendar(dateObj) {
- //서버로 자료 요청
- if ( fGetHospitalCalendar() != true ){
- sysf_messageBox("병원일정 데이터를 가져올 수", "I004");
- }
- // 그리드 초기화
- ds_hidden_calendar_weeklist_list.clearData();
- //grd_calendar.rebuild()
- dateObj.setDate(1);
- var startDay = dateObj.getDay();
- var days = dateObj.getMonthDay();
- var rows = Math.ceil( ( startDay + days ) / 7 );
- for( var i = 0; i < rows; i++ )
- ds_hidden_calendar_weeklist_list.addRow(); //.addRow(false);
- // grd_calendar.rebuild();
- // grd_calendar.rebuildStyle();
- var rowIndex = 0; //grd_calendar.fixedRows;
- var colIndex = startDay;
- var dutflag = '';
- for( var i = 0; i < days; i++ ) {
- //write date
- // grd_calendar.valueMatrix(rowIndex, colIndex) = i;
- // grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex,dayArr[colIndex%7], i + 1);
-
- if(i == parseInt(utlf_getCurrentDate().substr(6,2))) {
- toRIndex = rowIndex;
- toCIndex = colIndex;
- }
-
-
-
- //write memo
- // grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo( i );
- // dutflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag");
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex, dayMemoArr[colIndex%7], fGetCalendarMemo( i ));
-
- // if( dutflag == '8' ){ //'0' 평일, '4' 토요일, '8' 휴일
- // fSetTextColor(rowIndex, colIndex, '#ff0000');
- // }
- colIndex++;
- if( colIndex == 7 ) {
- colIndex = 0;
- rowIndex++;
- }
- }
- //grd_calendar.resizeCells();
- }
- function setCalendar2(dateObj) {
- // 그리드 초기화
- ds_hidden_calendar_weeklist_list.clearData();
- //grd_calendar.rebuild()
- dateObj.setDate(1);
- var startDay = dateObj.getDay();
- var days = dateObj.getMonthDay();
- var rows = Math.ceil( ( startDay + days ) / 7 );
- for( var i = 0; i < rows; i++ )
- ds_hidden_calendar_weeklist_list.addRow(); //grd_calendar.addRow(false);
- // grd_calendar.rebuild();
- // grd_calendar.rebuildStyle();
- var rowIndex = 0; //grd_calendar.fixedRows;
- var colIndex = startDay;
- var ampmflag = '';
- var dutflag = '';
- for( var i = 0; i < days; i++ ) {
- //write date
- // grd_calendar.valueMatrix(rowIndex, colIndex) = i;
- // grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex,dayArr[colIndex%7], i + 1);
-
- //write memo
- //grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo( i );
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex, dayMemoArr[colIndex%7], fGetCalendarMemo( i ));
- //expr로 처리함.
- // ampmflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ampmflag");
- // dutflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag");
- //
- // if( ampmflag == '1' ){
- // fSetBGColor(rowIndex, colIndex, '#ffff99');
- // }else if( ampmflag == '10' ){
- // fSetBGColor(rowIndex, colIndex, '#ccffff');
- // }else if( ampmflag == '100' ) {
- // fSetBGColor(rowIndex, colIndex, '#ff99cc');
- // }else if( ampmflag == '11' || ampmflag == '110' || ampmflag == '101' || ampmflag == '111' ){
- // fSetBGColor(rowIndex, colIndex, '#ffcc99');
- // }
- // expr로 처리함.
- // if( dutflag == '8' ){
- // fSetTextColor(rowIndex, colIndex, '#ff0000');
- // }
- colIndex++;
- if( colIndex == 7 ) {
- colIndex = 0;
- rowIndex++;
- }
- }
- //grd_calendar.resizeCells();
- }
- function fSetProperty(currow, week, flag){
- var color = "";
- var tooltip = "";
-
- var ampmflag = utlf_transNullToEmpty(this.ds_hidden_calendar_weeklist_list.getColumn(currow, week + "_ampmflag"));
- if( ampmflag == "1" ){ //오전
- color = "#ffff99";
- }else if( ampmflag == "10" ){ //오후
- color = "#ccffff";
- }else if( ampmflag == "100" ){ //오후
- color = "#ff99cc";
- }else if( ampmflag == "11" || ampmflag == "110" || ampmflag == "101" || ampmflag == "111" ){ //전일, 야간포함
- color = "#ffcc99";
- }
- if( flag == 0 )
- {
- return color;
- }
- else if (flag == 1)
- {
- return tooltip;
- }
- }
- //그리드의 배경색상을 변경한다.
- function fSetBGColor(calRow, calCol, bgColor) {
- //var calRow = gridObj.row;
- //var calCol = gridObj.col;
- if( calCol < 7 ){
- //calCol = calCol + 7;
- grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
- grd_calendar.cellStyle("background-color", calRow, calCol + 7) = bgColor;
- }else{
- //calCol = calCol - 7;
- grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
- grd_calendar.cellStyle("background-color", calRow, calCol - 7) = bgColor;
- }
- //grd_calendar.rebuildStyle();
- //grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
- }
- //그리드의 폰트 색상을 변경한다.
- function fSetTextColor(calRow, calCol, bgColor) {
- if( calCol < 7 ){
- //calCol = calCol + 7;
- grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
- grd_calendar.cellStyle("color", calRow, calCol + 7) = bgColor;
- }else{
- //calCol = calCol - 7;
- grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
- grd_calendar.cellStyle("color", calRow, calCol - 7) = bgColor;
- }
- //grd_calendar.rebuildStyle();
- }
- function setCellColor(calRow, calCol) {
- //var calRow = grdObj.row;
- //var calCol = grdObj.col;
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate();
- setCalendar2(isDate);
- if( calCol < 7 ){
- //calCol = calCol + 7;
- grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
- grd_calendar.cellStyle("background-color", calRow, calCol + 7) = "#daa7d9";
- }else{
- //calCol = calCol - 7;
- grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
- grd_calendar.cellStyle("background-color", calRow, calCol - 7) = "#daa7d9";
- }
- //gridObj.rebuildStyle();
- //gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
- }
- //해당 일자의 병원 일정 정보를 얻어 온다
- function fGetCalendarMemo( i )
- {
- var holiflag = "";
- var holinm = "";
- holiflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holiflag");
- holinm = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holinm");
- if( holinm == '-' ){
- holinm = "";
- }
- return holinm.substring(0,5);
- }
- function fGetCalendarMemo2( i )
- {
- var holiflag = "";
- var dutflag = "";
- var holinm = "";
- var ordendresn = "";
- var fstexamcnt = 0;
- var reexamcnt = 0;
- holiflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holiflag");
- dutflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag");
- holinm = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holinm");
- ordendresn = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ordendresn");
- fstexamcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "fstexamcnt");
- reexamcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "reexamcnt");
- if( holinm == '-' ){
- holinm = "";
- }
- return holinm + "/" + ordendresn + "\n" + fstexamcnt + "/" + reexamcnt;
- }
- /*
- //달력을 클릭(선택) 했을 때
- function fClickOnCalendar(){
- var calRow = grd_calendar.row;
- var calCol = grd_calendar.col;
- calCol = calCol % 7;
- var isDay = grd_calendar.valueMatrix(calRow, calCol);
- if( isDay != "" ){
- if( isDay.length == 1 ) isDay = "0" + isDay;
- var dd = ( (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month")) ).concat(isDay);
- dsf_makeValue( ds_main, "selecteddd", "string", "" );
- ds_main.setColumn( 0, "selecteddd", dd);
- }
- }
- */
- function fSetMonth( newMonth ){
- ds_hidden_calendar.setColumn( 0, "month", newMonth);
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate();
- //setCalendar(isDate);
- fGetCalendarData();
- }
- function grp_calendar_button31_onclick(obj:Button, e:ClickEventInfo) {
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
- ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
- //model.refresh();
- ds_hidden_calendarinfo.clearData(); ds_hidden_calendarinfo.addRow();
- //setCalendar(isDate);
- fGetCalendarData();
- }
- function grp_calendar_button32_onclick(obj:Button, e:ClickEventInfo) {
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
- ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
- //model.refresh();
- ds_hidden_calendarinfo.clearData(); ds_hidden_calendarinfo.addRow();
- //setCalendar(isDate);
- fGetCalendarData();
- }
- function grp_calendar_btn_premonth_onclick(obj:Button, e:ClickEventInfo) {
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
- ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
- //model.refresh();
- ds_hidden_calendarinfo.clearData(); ds_hidden_calendarinfo.addRow();
- //setCalendar(isDate);
- fGetCalendarData();
- }
- function grp_calendar_button34_onclick(obj:Button, e:ClickEventInfo) {
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
- ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
- //model.refresh();
- ds_hidden_calendarinfo.clearData(); ds_hidden_calendarinfo.addRow();
- //setCalendar(isDate);
- fGetCalendarData();
- }
- function grd_calendar_oncellclick(obj:Grid, e:GridClickEventInfo) {
- //setCellColor(grd_calendar);
- fClickOnCalendar();
- }
- function group1_onclick(obj:Div, e:ClickEventInfo) {
-
- var trgObj = document.controls.item(e.fromobject);
-
- for( var k in trgObj) {
- trace( k);
- }
- // if( trgObj.elementName == "xforms:button" ) {
- // var btnMark = trgObj.text;
- //
- // if(beforeId != ""){
- // beforeObj = document.controls(beforeId);
- // if(beforeObj != null) beforeObj.enable = "true";
- // }
- // trgObj.enable = "false";
- // beforeId = trgObj.id; //.attribute("id");
- //
- // //달력 변경
- // if( btnMark.length == 1 ){
- // btnMark = '0' + btnMark;
- // }
- // fSetMonth(btnMark);
- // }
- }
- function Button_onclick(obj:Button, e:ClickEventInfo)
- {
- var trgObj = obj; //document.controls.item(event.target);
- obj.style.backgroundColor = 'darkgray';
-
- var btnMark = String(trgObj.text);
-
- // group1.btn_jan.enable = true;
- // group1.btn_feb.enable = true;
- // group1.btn_mar.enable = true;
- // group1.btn_apr.enable = true;
- // group1.btn_may.enable = true;
- // group1.btn_jun.enable = true;
- // group1.btn_jul.enable = true;
- // group1.btn_aug.enable = true;
- // group1.btn_sep.enable = true;
- // group1.btn_oct.enable = true;
- // group1.btn_nov.enable = true;
- // group1.btn_dec.enable = true;
-
- if(beforeId != ""){
- beforeObj = eval(beforeId);
- if(beforeObj != null) {
- beforeObj.enable = true;
- beforeObj.style.backgroundColor = '@gradation';
- }
-
- }
-
-
- trgObj.enable = false;
- beforeId = "group1." + trgObj.name;
-
- //달력 변경
- if( btnMark.length == 1 ){
- btnMark = '0' + btnMark;
- }
- fSetMonth(btnMark);
-
- this.grd_calendar.setFocus();
- }]]></Script>
- </Form>
- </FDL>
|