123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPPMB01001" position="absolute 0 0 389 474" titletext="병원달력" oninit="SPPMB01001_oninit" onload="SPPMB01001_onload">
- <Layouts>
- <Layout>
- <Div id="group2" taborder="9" position="absolute 0 0 384 40" class="div_SA2"/>
- <Button position="absolute 140 11 156 27" id="button31" class="icon_pre_year" text="" onclick="button31_onclick" taborder="6"/>
- <Button position="absolute 231 11 247 27" id="button32" class="icon_next_year" text="" onclick="button32_onclick" taborder="5"/>
- <Button position="absolute 117 11 133 27" id="btn_premonth" class="icon_pre_month" visible="false" text="" onclick="btn_premonth_onclick" taborder="4"/>
- <Button position="absolute 254 11 270 27" id="button34" class="icon_next_month" visible="false" text="" onclick="button34_onclick" taborder="3"/>
- <Edit readonly="true" position="absolute 162 6 212 33" id="opt_year" class="calendar_output" taborder="2" style="background:transparent;border:1 none #3576aeff ;padding:0 0 0 0;align:center middle;font:Dotum,9,bold;"/>
- <Edit readonly="true" position="absolute 310 7 340 26" id="opt_month" class="calendar_output" visible="false" taborder="1" style="background:transparent;border:1 none #3576aeff ;"/>
- <Static text="년" position="absolute 211 10 231 29" id="caption1" class="calendar_output" style="color:black;font:Dotum,9,bold;"/>
- <Static text="월" position="absolute 340 7 360 26" id="caption2" class="calendar_output" visible="false" style="color:black;font:Dotum,9,bold;"/>
- <Grid position="absolute 0 79 384 442" id="grd_calendar" binddataset="ds_hidden_calendar_weeklist_list" oncellclick="grd_calendar_oncellclick" selecttype="cell" taborder="7" tooltiptype="hover" autoenter="select" autofittype="col" cellsizingtype="both" extendsizetype="row" autosizingtype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="55"/>
- </Columns>
- <Rows>
- <Row size="27" band="head"/>
- <Row size="22"/>
- <Row size="40"/>
- </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 displaytype="normal" style="align:center middle;padding:0 0 0 0;background:BIND(sun_background);background2:BIND(sun_background);color:EXPR(sun_dutflag == '8' ? 'red' : 'black');color2:EXPR(sun_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;controlbackground:transparent;" text="bind:sun" wordwrap="both" taborder="undefined" tooltiptext="bind:sun"/>
- <Cell col="1" style="align:center middle;padding:2 2 2 2;background:BIND(mon_background);background2:BIND(mon_background);color:EXPR(mon_dutflag == '8' ? 'red' : 'black');color2:EXPR(mon_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;selectgradation:EXPR(fSetProperty_tooltip(currow,"mon",0));" text="bind:mon" wordwrap="both" tooltiptext="bind:mon"/>
- <Cell col="2" style="align:center middle;padding:2 2 2 2;background:BIND(tue_background);background2:BIND(tue_background);color:EXPR(tue_dutflag == '8' ? 'red' : 'black');color2:EXPR(tue_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;selectgradation:EXPR(fSetProperty_tooltip(currow,"tue",0));" text="bind:tue" wordwrap="both" tooltiptext="bind:tue"/>
- <Cell col="3" displaytype="normal" style="align:center middle;padding:2 2 2 2;background:BIND(wed_background);background2:BIND(wed_background);color:EXPR(wed_dutflag == '8' ? 'red' : 'black');color2:EXPR(wed_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;selectgradation:EXPR(fSetProperty_tooltip(currow,"wed",0));" text="bind:wed" wordwrap="both" tooltiptext="bind:wed"/>
- <Cell col="4" style="align:center middle;padding:2 2 2 2;background:BIND(thu_background);background2:BIND(thu_background);color:EXPR(thu_dutflag == '8' ? 'red' : 'black');color2:EXPR(thu_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;" text="bind:thu" wordwrap="both" tooltiptext="bind:thu"/>
- <Cell col="5" style="align:center middle;padding:2 2 2 2;background:BIND(fri_background);background2:BIND(fri_background);color:EXPR(fri_dutflag == '8' ? 'red' : 'black');color2:EXPR(fri_dutflag == '8' ? 'red' : 'black');font:arial,9,bold;selectbackground:transparent;selectgradation:EXPR(fSetProperty_tooltip(currow,"fri",0));" text="bind:fri" wordwrap="both" tooltiptext="bind:fri"/>
- <Cell col="6" style="align:center middle;padding:2 2 2 2;background:BIND(sat_background);background2:BIND(sat_background);color:EXPR(sat_dutflag == '8' ? 'red' : 'blue');color2:EXPR(sat_dutflag == '8' ? 'red' : 'blue');font:arial,9,bold;selectbackground:transparent;" text="bind:sat" wordwrap="both" tooltiptext="bind:sat"/>
- <Cell row="1" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(sun_background);background2:BIND(sun_background);color:EXPR(sun_dutflag == '8' ? 'red' : 'black');color2:EXPR(sun_dutflag == '8' ? 'red' : 'black');font:굴림,9,bold;selectbackground:transparent;selectfont:돋움체,11,bold;controlbackground:transparent;controlborder:EXPR(sun == currentData ? '2 solid red' : '');" text="bind:sun_memo" wordwrap="word" taborder="undefined" tooltiptext="expr:utlf_isNull(sun_tooltip) ? getColumn(currow, 'sun_memo') : getColumn(currow, 'sun_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="1" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(mon_background);background2:BIND(mon_background);color:EXPR(mon_dutflag == '8' ? 'red' : 'black');color2:EXPR(mon_dutflag == '8' ? 'red' : 'black');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(mon == currentData ? '2 solid red' : '');" text="bind:mon_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(mon_tooltip) ? getColumn(currow, 'mon_memo') : getColumn(currow, 'mon_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="2" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(tue_background);background2:BIND(tue_background);color:EXPR(tue_dutflag == '8' ? 'red' : 'black');color2:EXPR(tue_dutflag == '8' ? 'red' : 'black');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(tue == currentData ? '2 solid red' : '');" text="bind:tue_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(tue_tooltip) ? getColumn(currow, 'tue_memo') : getColumn(currow, 'tue_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="3" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(wed_background);background2:BIND(wed_background);color:EXPR(wed_dutflag == '8' ? 'red' : 'black');color2:EXPR(wed_dutflag == '8' ? 'red' : 'black');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(wed == currentData ? '2 solid red' : '');" text="bind:wed_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(wed_tooltip) ? getColumn(currow, 'wed_memo') : getColumn(currow, 'wed_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="4" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(thu_background);background2:BIND(thu_background);color:EXPR(thu_dutflag == '8' ? 'red' : 'black');color2:EXPR(thu_dutflag == '8' ? 'red' : 'black');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(thu == currentData ? '2 solid red' : '');" text="bind:thu_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(thu_tooltip) ? getColumn(currow, 'thu_memo') : getColumn(currow, 'thu_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="5" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(fri_background);background2:BIND(fri_background);color:EXPR(fri_dutflag == '8' ? 'red' : 'black');color2:EXPR(fri_dutflag == '8' ? 'red' : 'black');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(fri == currentData ? '2 solid red' : '');" text="bind:fri_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(fri_tooltip) ? getColumn(currow, 'fri_memo') : getColumn(currow, 'fri_tooltip')" autosizerow="limitmin"/>
- <Cell row="1" col="6" displaytype="button" style="align:center middle;padding:0 0 0 0;background:BIND(sat_background);background2:BIND(sat_background);color:EXPR(sat_dutflag == '8' ? 'red' : 'blue');color2:EXPR(sat_dutflag == '8' ? 'red' : 'blue');selectbackground:transparent;controlbackground:transparent;controlborder:EXPR(sat == currentData ? '2 solid red' : '');" text="bind:sat_memo" wordwrap="word" tooltiptext="expr:utlf_isNull(sat_tooltip) ? getColumn(currow, 'sat_memo') : getColumn(currow, 'sat_tooltip')" autosizerow="limitmin"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="오후" position="absolute 37 448 68 466" align="align:center middle;" id="caption4" onclick="caption4_onclick" style="background:#ccffffff;align:center middle;"/>
- <Static text="전일" position="absolute 69 447 107 467" align="align:center middle;" id="caption6" style="background:#ffcc99ff;align:center middle;"/>
- <Static text="임시오전" position="absolute 108 447 161 467" align="align:center middle;" id="caption8" style="background:#c9c299ff;align:center middle;"/>
- <Static text="임시오후" position="absolute 163 447 213 467" align="align:center middle;" id="caption10" style="background:#ffccffff;align:center middle;" onclick="caption10_onclick"/>
- <Static text="당일마감" position="absolute 215 447 270 467" align="align:center middle;" id="caption16" style="background:#999999ff;align:center middle;"/>
- <Div id="caption3" taborder="8" text="오전" position="absolute 0 448 35 465" style="background:#ffff99ff;"/>
- <Button id="btn_jan" taborder="10" text="1" position="absolute 13 45 40 72" class="icon_month" onclick="btn_click"/>
- <Button id="btn_feb" taborder="11" text="2" onclick="btn_click" position="absolute 43 45 70 72"/>
- <Button id="btn_mar" taborder="12" text="3" onclick="btn_click" position="absolute 73 45 100 72"/>
- <Button id="btn_apr" taborder="13" text="4" onclick="btn_click" position="absolute 103 45 130 72"/>
- <Button id="btn_may" taborder="14" text="5" onclick="btn_click" position="absolute 133 45 160 72"/>
- <Button id="btn_jun" taborder="15" text="6" onclick="btn_click" position="absolute 163 45 190 72"/>
- <Button id="btn_jul" taborder="16" text="7" onclick="btn_click" position="absolute 193 45 220 72"/>
- <Button id="btn_aug" taborder="17" text="8" onclick="btn_click" position="absolute 223 45 250 72"/>
- <Button id="btn_sep" taborder="18" text="9" onclick="btn_click" position="absolute 253 45 280 72"/>
- <Button id="btn_oct" taborder="19" text="10" onclick="btn_click" position="absolute 283 45 310 72"/>
- <Button id="btn_nov" taborder="20" text="11" onclick="btn_click" position="absolute 313 45 340 72"/>
- <Button id="btn_dec" taborder="21" text="12" onclick="btn_click" position="absolute 343 45 370 72"/>
- <Static id="caption00" text="오늘" position="absolute 271 447 302 467" style="background:transparent;border:2 solid red ;align:center middle;" align="align:center middle;"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_hidden_calendar" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="year" type="STRING" size="256"/>
- <Column id="month" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_calendar_weeklist_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <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"/>
- <Column id="sun_dutflag" type="STRING" size="256"/>
- <Column id="mon_dutflag" type="STRING" size="256"/>
- <Column id="tue_dutflag" type="STRING" size="256"/>
- <Column id="wed_dutflag" type="STRING" size="256"/>
- <Column id="thu_dutflag" type="STRING" size="256"/>
- <Column id="fri_dutflag" type="STRING" size="256"/>
- <Column id="sat_dutflag" type="STRING" size="256"/>
- <Column id="sun_tooltip" type="STRING" size="256"/>
- <Column id="mon_tooltip" type="STRING" size="256"/>
- <Column id="tue_tooltip" type="STRING" size="256"/>
- <Column id="wed_tooltip" type="STRING" size="256"/>
- <Column id="thu_tooltip" type="STRING" size="256"/>
- <Column id="fri_tooltip" type="STRING" size="256"/>
- <Column id="sat_tooltip" type="STRING" size="256"/>
- <Column id="sun_background" type="STRING" size="256"/>
- <Column id="mon_background" type="STRING" size="256"/>
- <Column id="tue_background" type="STRING" size="256"/>
- <Column id="wed_background" type="STRING" size="256"/>
- <Column id="thu_background" type="STRING" size="256"/>
- <Column id="fri_background" type="STRING" size="256"/>
- <Column id="sat_background" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="sun"/>
- <Col id="mon"/>
- <Col id="tue"/>
- <Col id="wed"/>
- <Col id="thu"/>
- <Col id="fri"/>
- <Col id="sat"/>
- <Col id="sun_memo"/>
- <Col id="mon_memo"/>
- <Col id="tue_memo"/>
- <Col id="wed_memo"/>
- <Col id="thu_memo"/>
- <Col id="fri_memo"/>
- <Col id="sat_memo"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_calendarinfo_calendarinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="basedd" type="STRING" size="256" sumtext="날짜"/>
- <Column id="holinm" type="STRING" size="256" sumtext="휴일명칭"/>
- <Column id="holiflag" type="STRING" size="256" sumtext="휴일구분"/>
- <Column id="dutflag" type="STRING" size="256" sumtext="근무구분"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden_calendar_btnid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256"/>
- <Column id="cdnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cdid">01</Col>
- <Col id="cdnm">btn_jan</Col>
- </Row>
- <Row>
- <Col id="cdid">02</Col>
- <Col id="cdnm">btn_feb</Col>
- </Row>
- <Row>
- <Col id="cdid">03</Col>
- <Col id="cdnm">btn_mar</Col>
- </Row>
- <Row>
- <Col id="cdid">04</Col>
- <Col id="cdnm">btn_apr</Col>
- </Row>
- <Row>
- <Col id="cdid">05</Col>
- <Col id="cdnm">btn_may</Col>
- </Row>
- <Row>
- <Col id="cdid">06</Col>
- <Col id="cdnm">btn_jun</Col>
- </Row>
- <Row>
- <Col id="cdid">07</Col>
- <Col id="cdnm">btn_jul</Col>
- </Row>
- <Row>
- <Col id="cdid">08</Col>
- <Col id="cdnm">btn_aug</Col>
- </Row>
- <Row>
- <Col id="cdid">09</Col>
- <Col id="cdnm">btn_sep</Col>
- </Row>
- <Row>
- <Col id="cdid">10</Col>
- <Col id="cdnm">btn_oct</Col>
- </Row>
- <Row>
- <Col id="cdid">11</Col>
- <Col id="cdnm">btn_nov</Col>
- </Row>
- <Row>
- <Col id="cdid">12</Col>
- <Col id="cdnm">btn_dec</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="opt_year" propid="value" datasetid="ds_hidden_calendar" columnid="year"/>
- <BindItem id="item1" compid="opt_month" propid="value" datasetid="ds_hidden_calendar" columnid="month"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2016-05-24
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2016-05-24 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs"
- var arErrorCode = new HashArray();
- var beforeId = "";
- var currentData = "";
- function SPPMB01001_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- currentData = fGetCurDate();
- }
- function SPPMB01001_onload(obj:Form, e:LoadEventInfo)
- {
- initCalendar();
- //2008-10-04 이동식 추가
- fChangeButtonColor();
- }
- function initCalendar()
- {
- if( utlf_isNull(ds_hidden_calendar.getColumn(0, "year")) || utlf_isNull(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'));
- setCalendar(curDate);
- }
- }
- function setCalendar(dateObj)
- {
- //서버로 자료 요청
- if ( fGetHospitalCalendar() != true )
- {
- sysf_messageBox("병원일정 데이터를 가져올 수", "I004");
- }
-
- // 그리드 초기화
- ds_hidden_calendar_weeklist_list.clearData();
-
- 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();
- }
-
- var rowIndex = 0;
- var colIndex = startDay;
- var dutflag = '';
-
- for( var i = 1; i <= days; i++ )
- {
- //write date
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex, colIndex, i);
- //write memo
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex , colIndex + 7 , fGetCalendarMemo( parseInt(i-1) ));
-
- if(colIndex == 0) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sun_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 1) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "mon_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 2) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "tue_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 3) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "wed_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 4) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "thu_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 5) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "fri_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- if(colIndex == 6) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sat_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
-
- colIndex++;
- if( colIndex == 7 )
- {
- colIndex = 0;
- rowIndex++;
- }
- }
-
- ds_hidden_calendar_weeklist_list.clearSelect();
- ds_hidden_calendar_weeklist_list.rowposition = -1;
- }
- function fGetHospitalCalendar()
- {
- var dd = (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month"));
-
- dsf_makeValue(ds_send, "date", "string",dd);
-
- 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);
- if(nErrorCode < 0) return;
- }
- 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;
- }
- function fChangeButtonColor()
- {
- var curMonth = ds_hidden_calendar.getColumn(0, "month");
-
- switch( curMonth )
- {
- case '01' : //button1.attribute("class") = "btn5_letter2";
- btn_jan.enable = false;
- beforeId = 'btn_jan';
- break;
- case '02' : //button2.attribute("class") = "btn5_letter2";
- btn_feb.enable = false;
- beforeId = 'btn_feb';
- break;
- case '03' : //button3.attribute("class") = "btn5_letter2";
- btn_mar.enable = false;
- beforeId = 'btn_mar';
- break;
- case '04' : //button4.attribute("class") = "btn5_letter2";
- btn_apr.enable = false;
- beforeId = 'btn_apr';
- break;
- case '05' : //button5.attribute("class") = "btn5_letter2";
- btn_may.enable = false;
- beforeId = 'btn_may';
- break;
- case '06' : //button6.attribute("class") = "btn5_letter2";
- btn_jun.enable = false;
- beforeId = 'btn_jun';
- break;
- case '07' : //button7.attribute("class") = "btn5_letter2";
- btn_jul.enable = false;
- beforeId = 'btn_jul';
- break;
- case '08' : //button8.attribute("class") = "btn5_letter2";
- btn_aug.enable = false;
- beforeId = 'btn_aug';
- break;
- case '09' : //button9.attribute("class") = "btn5_letter2";
- btn_sep.enable = false;
- beforeId = 'btn_sep';
- break;
- case '10' : //button10.attribute("class") = "btn5_letter2";
- btn_oct.enable = false;
- beforeId = 'btn_oct';
- break;
- case '11' : //button11.attribute("class") = "btn5_letter2";
- btn_nov.enable = false;
- beforeId = 'btn_nov';
- break;
- case '12' : //button12.attribute("class") = "btn5_letter2";
- btn_dec.enable = false;
- beforeId = 'btn_dec';
- break;
- }
- }
-
- function 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');
-
- if(isDate.toFormatString("%Y%m") == utlf_getCurrentDate().substr(0, 6)){
- currentData = fGetCurDate();
- }else{
- currentData = "";
- }
- ds_hidden_calendar.setColumn(0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn(0, "month", isDate.getDateFormat('MM'));
- ds_hidden_calendarinfo_calendarinfolist.clearData();
- fGetCalendarData();
-
- fClickMonth(ds_hidden_calendar.getColumn(0, "month"));
- }
- function 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');
-
- if(isDate.toFormatString("%Y%m") == utlf_getCurrentDate().substr(0, 6)){
- currentData = fGetCurDate();
- }else{
- currentData = "";
- }
- ds_hidden_calendar.setColumn(0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn(0, "month", isDate.getDateFormat('MM'));
-
- ds_hidden_calendarinfo_calendarinfolist.clearData();
-
- fGetCalendarData();
- }
- function 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');
-
- if(isDate.toFormatString("%Y%m") == utlf_getCurrentDate().substr(0, 6)){
- currentData = fGetCurDate();
- }else{
- currentData = "";
- }
- ds_hidden_calendar.setColumn(0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn(0, "month", isDate.getDateFormat('MM'));
-
- ds_hidden_calendarinfo_calendarinfolist.clearData();
- fGetCalendarData();
- }
- function 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');
-
- if(isDate.toFormatString("%Y%m") == utlf_getCurrentDate().substr(0, 6)){
- currentData = fGetCurDate();
- }else{
- currentData = "";
- }
- ds_hidden_calendar.setColumn(0, "year", isDate.getDateFormat('YYYY'));
- ds_hidden_calendar.setColumn(0, "month", isDate.getDateFormat('MM'));
-
- ds_hidden_calendarinfo_calendarinfolist.clearData();
- fGetCalendarData();
-
- fClickMonth(ds_hidden_calendar.getColumn(0, "month"));
- }
- function btn_click(obj)
- {
- var trgObj = obj;
-
- if( sysf_getObjType(trgObj) == "Button" )
- {
- var btnMark = trgObj.text;
-
- if(!utlf_isNull(beforeId) || beforeId != "")
- {
- beforeObj = frmf_getComponents(beforeId);
- if(!utlf_isNull(beforeObj)) frmf_getComponents(beforeId).enable = true;
- }
- trgObj.enable = false;
- grd_calendar.setFocus();
- beforeId = trgObj.name;
-
- //달력 변경
- if( btnMark.length == 1 )
- {
- btnMark = '0' + btnMark;
- }
- fSetMonth(btnMark);
- }
- ds_hidden_calendar_weeklist_list.rowposition = -1;
- ds_hidden_calendar_weeklist_list.clearSelect();
- }
- 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();
-
- fGetCalendarData();
- }
- var oOpener = null;
- function grd_calendar_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- var oOpener = frmf_getoOpener();
- oOpener.fClickOnCalendar();
- }
- function setCalendar2(dateObj)
- {
- // 그리드 초기화
- ds_hidden_calendar_weeklist_list.clearData();
-
- 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();
- }
-
- var rowIndex = 0;
- var colIndex = startDay;
- var ampmflag = '';
- var dutflag = '';
- var ordendresn = '';
- var reglscheflag = '';
-
- for( var i = 1; i <= days; i++ )
- {
- //write date
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex, colIndex, i);
-
- ampmflag = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "ampmflag"));
- dutflag = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "dutflag"));
- ordendresn = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "ordendresn"));
- ordendresnmin = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "ordendresnmin"));
- reglscheflag = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(parseInt(i-1), "reglscheflag"));
-
- //write memo
- if((reglscheflag != 'X') || (ordendresnmin != 'H' && ordendresnmin != 'T'))
- {
- //검사일정이고, 마감이 아닐경우 정원표시 안함.!
- ds_hidden_calendar_weeklist_list.setColumn(rowIndex , colIndex + 7, fGetCalendarMemo2( parseInt(i-1) ));
-
- if(colIndex == 0) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sun_tooltip", ordendresn);}
- if(colIndex == 1) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "mon_tooltip", ordendresn);}
- if(colIndex == 2) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "tue_tooltip", ordendresn);}
- if(colIndex == 3) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "wed_tooltip", ordendresn);}
- if(colIndex == 4) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "thu_tooltip", ordendresn);}
- if(colIndex == 5) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "fri_tooltip", ordendresn);}
- if(colIndex == 6) {ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sat_tooltip", ordendresn);}
- }
-
- var tooltiptext = ""; //tooltip text input
-
- if( ordendresnmin != 'H' && ordendresnmin != 'T')
- {
- if( ampmflag == '1' )
- { //오전
- if( reglscheflag == 'Y' )
- { //정규일정
- fSetBGColor(rowIndex, colIndex, '#ffff99');
- }
- else if( reglscheflag == 'N' )
- { //임시일정
- fSetBGColor(rowIndex, colIndex, '#c9c299');
- tooltiptext = "임시";
- // grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
- }
- else if( reglscheflag == 'Z' )
- { //대진
- fSetBGColor(rowIndex, colIndex, '#c9c299');
- tooltiptext = "대진"
- // grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
- }
- }
- else if( ampmflag == '10' )
- { //오후
- if( reglscheflag == 'Y' )
- { //정규일정
- fSetBGColor(rowIndex, colIndex, '#ccffff');
- }
- else if( reglscheflag == 'N' )
- { //임시일정
- fSetBGColor(rowIndex, colIndex, '#ffccff');
- tooltiptext = "임시";
- // grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
- }
- else if( reglscheflag == 'Z' )
- { //대진
- fSetBGColor(rowIndex, colIndex, '#ffccff');
- tooltiptext = "대진";
- // grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
- }
- }
- else if( ampmflag == '11' || ampmflag == '110' || ampmflag == '101' || ampmflag == '111' || ampmflag == '100')
- { //전일, 야간포함
- if( reglscheflag == 'Y' )
- { //정규일정
- fSetBGColor(rowIndex, colIndex, '#ffcc99');
- }
- else if( reglscheflag == 'N' )
- { //임시일정
- fSetBGColor(rowIndex, colIndex, '#ffcc99');
- tooltiptext = "임시";
- // grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
- }
- else if( reglscheflag == 'Z' )
- { //대진
- fSetBGColor(rowIndex, colIndex, '#ffcc99');
- tooltiptext = "대진";
- // grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
- // grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
- }
- }
-
- if(!utlf_isNull(tooltiptext) || tooltiptext != "")
- {
- if(colIndex == 0) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sun_tooltip", tooltiptext);
- if(colIndex == 1) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "mon_tooltip", tooltiptext);
- if(colIndex == 2) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "tue_tooltip", tooltiptext);
- if(colIndex == 3) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "wed_tooltip", tooltiptext);
- if(colIndex == 4) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "thu_tooltip", tooltiptext);
- if(colIndex == 5) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "fri_tooltip", tooltiptext);
- if(colIndex == 6) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sat_tooltip", tooltiptext);
- }
- }
- else
- {
- if( ordendresnmin == 'H' )
- {
- fSetBGColor(rowIndex, colIndex, '#ffffff'); //휴진마감
- }
- else if( ordendresnmin == 'T' )
- {
- fSetBGColor(rowIndex, colIndex, '#999999'); //부분마감
- }
- }
-
- if( dutflag == '8' )
- {
- if(colIndex == 0) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sun_dutflag", dutflag);
- if(colIndex == 1) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "mon_dutflag", dutflag);
- if(colIndex == 2) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "tue_dutflag", dutflag);
- if(colIndex == 3) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "wed_dutflag", dutflag);
- if(colIndex == 4) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "thu_dutflag", dutflag);
- if(colIndex == 5) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "fri_dutflag", dutflag);
- if(colIndex == 6) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sat_dutflag", dutflag);
- }
-
- colIndex++;
- if( colIndex == 7 )
- {
- colIndex = 0;
- rowIndex++;
- }
- }
- }
- function fGetCalendarMemo2( i )
- {
- var holinm = "";
- var ordendresn = "";
- var fstexamcnt = 0;
- var reexamcnt = 0;
- var totalexamcnt = 0;
- var totalexamcap = 0;
- var totalrsrvcnt = 0;
- var telrsrvcnt = 0;
- var reglscheflag = '';
-
- holinm = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holinm"));
-
- if( holinm == '-' )
- {
- holinm = "";
- }
- ordendresn = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ordendresn"));
- ordendresnmin = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ordendresnmin"));
-
- var caloption = ds_main.getColumn(0, "caloption");
-
- var retValue = "";
- var memo = "";
- var checkSche = '';
- //예약 현황
-
- if( caloption == "2" )
- {
- totalrsrvcnt = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalrsrvcnt"));
- telrsrvcnt = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "telrsrvcnt"));
- totalexamcap = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalexamcap"));
- //의사일정이 있을 경우
-
- if( ordendresn == "" || ordendresn == "0" || ordendresn == "00" || ordendresn == "-")
- {
- memo = telrsrvcnt + "/" + totalrsrvcnt;
- checkSche = String(totalexamcap)+ String(totalrsrvcnt);
-
- if( memo == '/' || checkSche == '0')
- {
- memo = "";
- }
-
- retValue = holinm + "\n" + memo;
- }
- else
- { //의사진료일정이 없을 경우
- memo = telrsrvcnt + "/" + totalrsrvcnt;
- checkSche = String(totalexamcap) + String(totalrsrvcnt);
- if( memo == '/' || checkSche == '0')
- {
- memo = '';
- }
-
- if(ordendresnmin == 'H')
- {
- retValue = "휴진" + "\n" + memo;
- }
- else if(ordendresnmin == 'T')
- {
- retValue = "당일" + "\n" + memo;
- }
- else
- {
- retValue = "\n" + memo;
- }
- }
- //예약가능 인원
- }
- else
- {
- fstexamcnt = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "fstexamcnt"));
- reexamcnt = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "reexamcnt"));
- totalexamcnt = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalexamcnt"));
- fstexamcap = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "fstexamcap"));
- reexamcap = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "reexamcap"));
- totalexamcap = utlf_transNullToEmpty(ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalexamcap"));
-
- if( ordendresn == "" || ordendresn == "0" || ordendresn == "00" || ordendresn == "-")
- {
- if( totalexamcap == '0' || totalexamcap == '')
- {
- memo = fstexamcnt + "/" + reexamcnt;
- if( memo == "/" || memo == "0/0")
- {
- memo = "";
- }
-
- retValue = holinm + "\n" + memo;
-
- //전일마감
- if( ordendresn == ordendresnmin )
- {
- }
- else
- { //부분마감
- retValue = holinm + "\n" + memo;
- }
- }
- else
- {
- retValue = holinm + "\n" + (parseInt(totalexamcnt) + parseInt(fstexamcap) + parseInt(reexamcap) - parseInt(totalrsrvcnt));
- }
- }
- else
- {
- if( totalexamcap == '0' || totalexamcap == '')
- {
- memo = fstexamcnt + "/" + reexamcnt;
- if( memo == '/' || memo == '0/0')
- {
- memo = '';
- }
- //전일마감
- if( ordendresn == ordendresnmin )
- {
- }
- else
- { //부분마감
- if(ordendresnmin == 'H')
- {
- retValue = "휴진" + "\n" + memo;
- }
- else if(ordendresnmin == 'T')
- {
- retValue = "당일" + "\n" + memo;
- }
- else
- {
- retValue = "\n" + memo;
- }
- }
- }
- else
- {
- retValue = totalexamcnt;
- }
- }
- }
-
- return retValue;
- }
- function fSetBGColor(calRow, calCol, bgColor)
- {
- if( calCol < 7 )
- {
- if(calCol == 0) ds_hidden_calendar_weeklist_list.setColumn(calRow, "sun_background", bgColor);
- if(calCol == 1) ds_hidden_calendar_weeklist_list.setColumn(calRow, "mon_background", bgColor);
- if(calCol == 2) ds_hidden_calendar_weeklist_list.setColumn(calRow, "tue_background", bgColor);
- if(calCol == 3) ds_hidden_calendar_weeklist_list.setColumn(calRow, "wed_background", bgColor);
- if(calCol == 4) ds_hidden_calendar_weeklist_list.setColumn(calRow, "thu_background", bgColor);
- if(calCol == 5) ds_hidden_calendar_weeklist_list.setColumn(calRow, "fri_background", bgColor);
- if(calCol == 6) ds_hidden_calendar_weeklist_list.setColumn(calRow, "sat_background", bgColor);
- }
- }
- function setCellColor(calRow, calCol)
- {
- var isMonth = ds_hidden_calendar.getColumn(0, "month");
- var isYear = ds_hidden_calendar.getColumn(0, "year");
- var isDate = (isYear+isMonth+1).toDate();
-
- setCalendar2(isDate);
- var backgroundcolor = "#c0c0c0";
- if( calCol < 7 )
- {
- if(calCol == 0) ds_hidden_calendar_weeklist_list.setColumn(calRow, "sun_background", backgroundcolor);
- if(calCol == 1) ds_hidden_calendar_weeklist_list.setColumn(calRow, "mon_background", backgroundcolor);
- if(calCol == 2) ds_hidden_calendar_weeklist_list.setColumn(calRow, "tue_background", backgroundcolor);
- if(calCol == 3) ds_hidden_calendar_weeklist_list.setColumn(calRow, "wed_background", backgroundcolor);
- if(calCol == 4) ds_hidden_calendar_weeklist_list.setColumn(calRow, "thu_background", backgroundcolor);
- if(calCol == 5) ds_hidden_calendar_weeklist_list.setColumn(calRow, "fri_background", backgroundcolor);
- if(calCol == 6) ds_hidden_calendar_weeklist_list.setColumn(calRow, "sat_background", backgroundcolor);
- }
- else
- {
- // grd_calendar.cellStyle("background-color", calRow, calCol) = "#c0c0c0";
- // grd_calendar.cellStyle("background-color", calRow, calCol - 7) = "#c0c0c0";
- }
- }
- function fClickMonth(month){
- var btnId = ds_hidden_calendar_btnid.getColumn(ds_hidden_calendar_btnid.findRow("cdid", month), "cdnm");
- btnId = eval(btnId);
- btnId.onclick.fireEvent(btnId, new ClickEventInfo());
- }
- function fGetCurDate(){
- return (utlf_getCurrentDate().substr(6, 2).charAt(0) == "0") ? utlf_getCurrentDate().substr(7, 1) : utlf_getCurrentDate().substr(6, 2);
- }
- ]]></Script>
- </Form>
- </FDL>
|