SPPMC03000_신체감정일정관리.xfdl 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPMC03000" position="absolute 0 0 1100 700" titletext="병원달력" onload="SPPMC03000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="Div00" taborder="1" position="absolute 1 1 1100 30" class="div_SA2"/>
  8. <Button id="button31" class="icon_pre_year" position="absolute 433 9 449 25" style="" text="" onclick="button31_onclick"/>
  9. <Button id="button32" class="icon_next_year" position="absolute 608 9 624 25" style="" text="" onclick="button32_onclick"/>
  10. <Button id="btn_premonth" class="icon_pre_month" position="absolute 452 9 468 25" style="" text="" onclick="btn_premonth_onclick"/>
  11. <Button id="button34" class="icon_next_month" position="absolute 589 9 605 25" style="" text="" onclick="button34_onclick"/>
  12. <Edit id="opt_year" position="absolute 472 7 515 26" anchor="default" readonly="true" style="background:transparent stretch 5,5;align:center middle;font:Dotum,9,bold;"/>
  13. <Edit id="opt_month" position="absolute 530 7 564 26" anchor="default" readonly="true" style="background:transparent stretch 5,5;align:center middle;font:Dotum,9,bold;"/>
  14. <Static id="caption1" class="calendar_output" position="absolute 517 7 529 26" style="color:black;" text="년"/>
  15. <Static id="caption2" class="calendar_output" position="absolute 558 7 578 26" style="color:black;" text="월"/>
  16. <Grid id="grd_calendar" binddataset="ds_hidden_calendar_weeklist_list" class="gridcalendar" position="absolute 0 54 1100 692" style="border:1 solid #1771beff ;font:Dotum,9;" oncellclick="grd_calendar_oncellclick" autofittype="col" selecttype="cell">
  17. <Formats>
  18. <Format id="default">
  19. <Columns>
  20. <Column size="135"/>
  21. <Column size="160"/>
  22. <Column size="160"/>
  23. <Column size="160"/>
  24. <Column size="160"/>
  25. <Column size="160"/>
  26. <Column size="160"/>
  27. </Columns>
  28. <Rows>
  29. <Row size="22" band="head"/>
  30. <Row size="60"/>
  31. <Row size="60"/>
  32. </Rows>
  33. <Band id="head">
  34. <Cell text="일"/>
  35. <Cell col="1" text="월"/>
  36. <Cell col="2" text="화"/>
  37. <Cell col="3" text="수"/>
  38. <Cell col="4" text="목"/>
  39. <Cell col="5" text="금"/>
  40. <Cell col="6" text="토"/>
  41. </Band>
  42. <Band id="body">
  43. <Cell style="color:red;color2:red;" text="bind:sun"/>
  44. <Cell col="1" style="color:EXPR(mon_dutflag == '8' ? 'red' : 'black');color2:EXPR(mon_dutflag == '8' ? 'red' : 'black');" text="bind:mon"/>
  45. <Cell col="2" style="color:EXPR(tue_dutflag == '8' ? 'red' : 'black');color2:EXPR(tue_dutflag == '8' ? 'red' : 'black');" text="bind:tue"/>
  46. <Cell col="3" style="color:EXPR(wed_dutflag == '8' ? 'red' : 'black');color2:EXPR(wed_dutflag == '8' ? 'red' : 'black');" text="bind:wed"/>
  47. <Cell col="4" style="color:EXPR(thu_dutflag == '8' ? 'red' : 'black');color2:EXPR(thu_dutflag == '8' ? 'red' : 'black');" text="bind:thu"/>
  48. <Cell col="5" style="color:EXPR(fri_dutflag == '8' ? 'red' : 'black');color2:EXPR(fri_dutflag == '8' ? 'red' : 'black');" text="bind:fri"/>
  49. <Cell col="6" style="color:EXPR(sat_dutflag == '8' ? 'red' : 'blue');color2:EXPR(sat_dutflag == '8' ? 'red' : 'blue');" text="bind:sat"/>
  50. <Cell row="1" text="bind:sun_memo"/>
  51. <Cell row="1" col="1" text="bind:mon_memo"/>
  52. <Cell row="1" col="2" text="bind:tue_memo"/>
  53. <Cell row="1" col="3" text="bind:wed_memo"/>
  54. <Cell row="1" col="4" text="bind:thu_memo"/>
  55. <Cell row="1" col="5" text="bind:fri_memo"/>
  56. <Cell row="1" col="6" text="bind:sat_memo"/>
  57. </Band>
  58. </Format>
  59. </Formats>
  60. </Grid>
  61. <Button id="button1" class="btn2" position="absolute 280 33 322 52" style="" text="1월" onclick="button1_onclick"/>
  62. <Button id="button2" class="btn2" position="absolute 324 33 366 52" style="" text="2월" onclick="button2_onclick"/>
  63. <Button id="button3" class="btn2" position="absolute 368 33 410 52" style="" text="3월" onclick="button3_onclick"/>
  64. <Button id="button4" class="btn2" position="absolute 412 33 454 52" style="" text="4월" onclick="button4_onclick"/>
  65. <Button id="button5" class="btn2" position="absolute 456 33 498 52" style="" text="5월" onclick="button5_onclick"/>
  66. <Button id="button6" class="btn2" position="absolute 500 33 542 52" style="" text="6월" onclick="button6_onclick"/>
  67. <Button id="button7" class="btn2" position="absolute 544 33 586 52" style="" text="7월" onclick="button7_onclick"/>
  68. <Button id="button8" class="btn2" position="absolute 587 33 629 52" style="" text="8월" onclick="button8_onclick"/>
  69. <Button id="button9" class="btn2" position="absolute 630 33 672 52" style="" text="9월" onclick="button9_onclick"/>
  70. <Button id="button10" class="btn2" position="absolute 673 33 715 52" style="" text="10월" onclick="button10_onclick"/>
  71. <Button id="button11" class="btn2" position="absolute 716 33 758 52" style="" text="11월" onclick="button11_onclick"/>
  72. <Button id="button12" class="btn2" position="absolute 759 33 801 52" style="" text="12월" onclick="button12_onclick"/>
  73. </Layout>
  74. </Layouts>
  75. <Objects>
  76. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  77. <ColumnInfo/>
  78. </Dataset>
  79. <Dataset id="ds_main_list_grdschedule" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  80. <ColumnInfo/>
  81. </Dataset>
  82. <Dataset id="ds_hidden_calendar_weeklist_list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  83. <ColumnInfo>
  84. <Column id="sun" type="STRING" size="256"/>
  85. <Column id="mon" type="STRING" size="256"/>
  86. <Column id="tue" type="STRING" size="256"/>
  87. <Column id="wed" type="STRING" size="256"/>
  88. <Column id="thu" type="STRING" size="256"/>
  89. <Column id="fri" type="STRING" size="256"/>
  90. <Column id="sat" type="STRING" size="256"/>
  91. <Column id="sun_memo" type="STRING" size="256"/>
  92. <Column id="mon_memo" type="STRING" size="256"/>
  93. <Column id="tue_memo" type="STRING" size="256"/>
  94. <Column id="wed_memo" type="STRING" size="256"/>
  95. <Column id="thu_memo" type="STRING" size="256"/>
  96. <Column id="fri_memo" type="STRING" size="256"/>
  97. <Column id="sat_memo" type="STRING" size="256"/>
  98. </ColumnInfo>
  99. <Rows>
  100. <Row>
  101. <Col id="sun"/>
  102. <Col id="mon"/>
  103. <Col id="tue"/>
  104. <Col id="wed"/>
  105. <Col id="thu"/>
  106. <Col id="fri"/>
  107. <Col id="sat"/>
  108. <Col id="sun_memo"/>
  109. <Col id="mon_memo"/>
  110. <Col id="tue_memo"/>
  111. <Col id="wed_memo"/>
  112. <Col id="thu_memo"/>
  113. <Col id="fri_memo"/>
  114. <Col id="sat_memo"/>
  115. </Row>
  116. </Rows>
  117. </Dataset>
  118. <Dataset id="ds_hidden_calendar" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  119. <ColumnInfo>
  120. <Column id="year" type="STRING" size="256"/>
  121. <Column id="month" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. <Rows>
  124. <Row>
  125. <Col id="year"/>
  126. <Col id="month"/>
  127. </Row>
  128. </Rows>
  129. </Dataset>
  130. <Dataset id="ds_hidden_calendarinfo_calendarinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  131. <Dataset id="ds_main_list_rcvmemo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  132. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  133. </Objects>
  134. <Bind>
  135. <BindItem id="item0" compid="opt_year" propid="value" datasetid="ds_hidden_calendar" columnid="year"/>
  136. <BindItem id="item1" compid="opt_month" propid="value" datasetid="ds_hidden_calendar" columnid="month"/>
  137. </Bind>
  138. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  139. var arErrorCode = new HashArray();
  140. function SPPMC03000_onload(obj:Form, e:LoadEventInfo) {
  141. frmf_initForm(obj);
  142. grdf_initGrid(this.grd_calendar);
  143. //grdf_setGridSort(grd_XXX);
  144. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  145. initCalendar();
  146. }
  147. function initCalendar() {
  148. var curDate = utlf_getCurrentDate().toDate();
  149. ds_hidden_calendar.setColumn( 0, "year", curDate.getDateFormat('YYYY'));
  150. ds_hidden_calendar.setColumn( 0, "month", curDate.getDateFormat('MM'));
  151. //model.refresh();
  152. setCalendar(curDate);
  153. }
  154. function fGetHospitalCalendar(){
  155. // ds_hidden_result.clearData();
  156. var dd = (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month"));
  157. //submit("TRPMC03000");
  158. var oParam = {};
  159. oParam.id = "TRPMC03000";
  160. oParam.service = "patinfomngtapp.OrgnJudgPat";
  161. oParam.method = "reqGetOJSchedule";
  162. oParam.inds = "req=ds_hidden_calendar";
  163. oParam.outds = "ds_main_list_grdschedule=grdschedule";
  164. oParam.async = false;
  165. tranf_submit(oParam);
  166. var index = 0;
  167. for(var i = 0 ; !utlf_isNull(ds_main_list_grdschedule.getColumn(i, "rsltworkdd")) ; i++){
  168. var tmp = String(ds_main_list_grdschedule.getColumn(i, "rsltworkdd"));
  169. tmp = tmp.substring(0, 6);
  170. if(tmp == dd){
  171. ds_main_list_rcvmemo.setColumn( index, "pid", ds_main_list_grdschedule.getColumn(i, "pid") );
  172. ds_main_list_rcvmemo.setColumn( index, "hngnm", ds_main_list_grdschedule.getColumn(i, "hngnm") );
  173. ds_main_list_rcvmemo.setColumn( index, "patnm", ds_main_list_grdschedule.getColumn(i, "patnm") );
  174. ds_main_list_rcvmemo.setColumn( index, "rsltworkdd", ds_main_list_grdschedule.getColumn(i, "rsltworkdd") );
  175. // 20100201 JHP 예약일, 진료일, 진료시, 과, 의사 추가
  176. ds_main_list_rcvmemo.setColumn( index, "rsrvdd", ds_main_list_grdschedule.getColumn(i, "rsrvdd") );
  177. ds_main_list_rcvmemo.setColumn( index, "orddd", ds_main_list_grdschedule.getColumn(i, "orddd") );
  178. ds_main_list_rcvmemo.setColumn( index, "ordtm", ds_main_list_grdschedule.getColumn(i, "ordtm") );
  179. ds_main_list_rcvmemo.setColumn( index, "orddeptcd", ds_main_list_grdschedule.getColumn(i, "orddeptcd") );
  180. ds_main_list_rcvmemo.setColumn( index, "atdoctid", ds_main_list_grdschedule.getColumn(i, "atdoctid") );
  181. index++ ;
  182. //alert(instance1.selectSingleNode("ds_main_rcv_rcvmemo").xml );
  183. }
  184. }
  185. dsf_makeValue( ds_send, "date", "string", "" );
  186. ds_send.setColumn( 0, "date",dd);
  187. //if (submit("TRPMB01001") == true) {
  188. var oParam = {};
  189. oParam.id = "TRPMB01001";
  190. oParam.service = "pambaseinfomngtapp.OrdSche";
  191. oParam.method = "reqGetHospitalCalendar";
  192. oParam.inds = "req=ds_send";
  193. oParam.outds = "ds_hidden_calendarinfo_calendarinfolist=caldata";
  194. oParam.async = false;
  195. oParam.callback = "cf_TRPMB01001";
  196. tranf_submit(oParam);
  197. if(arErrorCode.pop("TRPMB01001") > -1) {
  198. return true;
  199. } else {
  200. return false;
  201. }
  202. //model.refresh();
  203. }
  204. function cf_TRPMB01001(sSvcId, nErrorCode, sErrorMsg) {
  205. arErrorCode.push(sSvcId, nErrorCode);
  206. }
  207. function setCalendar(dateObj) {
  208. //서버로 자료 요청
  209. if ( fGetHospitalCalendar() != true ){
  210. sysf_messageBox("병원일정 데이터를 가져올 수", "I004");
  211. }
  212. // 그리드 초기화
  213. dsf_makeValue(ds_hidden_calendar_weeklist_list, "sun_dutflag", "string", "");
  214. dsf_makeValue(ds_hidden_calendar_weeklist_list, "mon_dutflag", "string", "");
  215. dsf_makeValue(ds_hidden_calendar_weeklist_list, "tue_dutflag", "string", "");
  216. dsf_makeValue(ds_hidden_calendar_weeklist_list, "wed_dutflag", "string", "");
  217. dsf_makeValue(ds_hidden_calendar_weeklist_list, "thu_dutflag", "string", "");
  218. dsf_makeValue(ds_hidden_calendar_weeklist_list, "fri_dutflag", "string", "");
  219. dsf_makeValue(ds_hidden_calendar_weeklist_list, "sat_dutflag", "string", "");
  220. ds_hidden_calendar_weeklist_list.clearData();
  221. //grd_calendar.rebuild()
  222. dateObj.setDate(1);
  223. var startDay = dateObj.getDay();
  224. var days = dateObj.getMonthDay();
  225. var rows = Math.ceil( ( startDay + days ) / 7 );
  226. for( var i = 0; i < rows; i++ ) {
  227. //grd_calendar.addRow(false);
  228. ds_hidden_calendar_weeklist_list.addRow();
  229. }
  230. // grd_calendar.rebuild();
  231. // grd_calendar.rebuildStyle();
  232. var rowIndex = 0;
  233. var colIndex = startDay;
  234. var dutflag = '';
  235. for( var i = 0; i < days; i++ ) {
  236. //write date
  237. //grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  238. ds_hidden_calendar_weeklist_list.setColumn(rowIndex, colIndex, i + 1);
  239. //write memo
  240. //grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo( i );
  241. ds_hidden_calendar_weeklist_list.setColumn(rowIndex, colIndex + 7, fGetCalendarMemo( i ));
  242. //grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCallenderSchedule(i);
  243. // dutflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag");
  244. // if( dutflag == '8' ){ //'0' 평일, '4' 토요일, '8' 휴일
  245. // fSetTextColor(rowIndex, colIndex, '#ff0000');
  246. // }
  247. if(colIndex == 0) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sun_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  248. if(colIndex == 1) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "mon_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  249. if(colIndex == 2) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "tue_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  250. if(colIndex == 3) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "wed_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  251. if(colIndex == 4) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "thu_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  252. if(colIndex == 5) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "fri_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  253. if(colIndex == 6) ds_hidden_calendar_weeklist_list.setColumn(rowIndex, "sat_dutflag", ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag"));
  254. colIndex++;
  255. if( colIndex == 7 ) {
  256. colIndex = 0;
  257. rowIndex++;
  258. }
  259. }
  260. //grd_calendar.resizeCells();
  261. }
  262. //2017.02.20 kimdo3 사용되지 않아서 수정없이 코멘트 처리함.
  263. // function setCalendar2(dateObj) {
  264. //
  265. // // 그리드 초기화
  266. // ds_hidden_calendar_weeklist_list.clearData();
  267. // //grd_calendar.rebuild()
  268. //
  269. // dateObj.setDate(1);
  270. // var startDay = dateObj.getDay();
  271. // var days = dateObj.getMonthDay();
  272. //
  273. // var rows = Math.ceil( ( startDay + days ) / 7 );
  274. // for( var i = 0; i < rows; i++ )
  275. // grd_calendar.addRow(false);
  276. //
  277. // grd_calendar.rebuild();
  278. // grd_calendar.rebuildStyle();
  279. //
  280. // var rowIndex = grd_calendar.fixedRows;
  281. // var colIndex = startDay;
  282. // var ampmflag = '';
  283. // var dutflag = '';
  284. //
  285. // for( var i = 1; i <= days; i++ ) {
  286. // //write date
  287. // grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  288. // //write memo
  289. // grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo2( i );
  290. //
  291. // ampmflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ampmflag");
  292. // dutflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "dutflag");
  293. //
  294. // if( ampmflag == '1' ){
  295. // fSetBGColor(rowIndex, colIndex, '#ffff99');
  296. // }else if( ampmflag == '10' ){
  297. // fSetBGColor(rowIndex, colIndex, '#ccffff');
  298. // }else if( ampmflag == '100' ) {
  299. // fSetBGColor(rowIndex, colIndex, '#ff99cc');
  300. // }else if( ampmflag == '11' || ampmflag == '110' || ampmflag == '101' || ampmflag == '111' ){
  301. // fSetBGColor(rowIndex, colIndex, '#ffcc99');
  302. // }
  303. //
  304. // if( dutflag == '8' ){
  305. // fSetTextColor(rowIndex, colIndex, '#ff0000');
  306. // }
  307. //
  308. // colIndex++;
  309. // if( colIndex == 7 ) {
  310. // colIndex = 0;
  311. // rowIndex++;
  312. // }
  313. // }
  314. //
  315. // grd_calendar.resizeCells();
  316. // }
  317. //그리드의 배경색상을 변경한다.
  318. // 2017.02.20 kimdo3 사용되지 않아서 코멘트 처리함.
  319. // function fSetBGColor(calRow, calCol, bgColor) {
  320. //
  321. // //var calRow = gridObj.row;
  322. // //var calCol = gridObj.col;
  323. //
  324. // if( calCol < 7 ){
  325. // //calCol = calCol + 7;
  326. // grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  327. // grd_calendar.cellStyle("background-color", calRow, calCol + 7) = bgColor;
  328. // }else{
  329. // //calCol = calCol - 7;
  330. // grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  331. // grd_calendar.cellStyle("background-color", calRow, calCol - 7) = bgColor;
  332. // }
  333. // grd_calendar.rebuildStyle();
  334. //
  335. // //grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  336. // }
  337. //그리드의 폰트 색상을 변경한다.
  338. // 2017.02.20 kimdo3 사용되지 않아서 코멘트 처리함.
  339. // expr로 대체함.
  340. // function fSetTextColor(calRow, calCol, bgColor) {
  341. //
  342. // if( calCol < 7 ){
  343. // //calCol = calCol + 7;
  344. // grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  345. // grd_calendar.cellStyle("color", calRow, calCol + 7) = bgColor;
  346. // }else{
  347. // //calCol = calCol - 7;
  348. // grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  349. // grd_calendar.cellStyle("color", calRow, calCol - 7) = bgColor;
  350. // }
  351. // grd_calendar.rebuildStyle();
  352. // }
  353. // 2017.02.20 kimdo3 사용되지 않아서 추가 수정 없이 코멘트 처리함.
  354. // function setCellColor(calRow, calCol) {
  355. //
  356. // var isMonth = ds_hidden_calendar.getColumn(0, "month");
  357. // var isYear = ds_hidden_calendar.getColumn(0, "year");
  358. // var isDate = (isYear+isMonth+1).toDate();
  359. //
  360. // //fGetCalendarData();
  361. // setCalendar2(isDate);
  362. //
  363. // if( calCol < 7 ){
  364. // //calCol = calCol + 7;
  365. // grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  366. // grd_calendar.cellStyle("background-color", calRow, calCol + 7) = "#daa7d9";
  367. // }else{
  368. // //calCol = calCol - 7;
  369. // grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  370. // grd_calendar.cellStyle("background-color", calRow, calCol - 7) = "#daa7d9";
  371. // }
  372. // //gridObj.rebuildStyle();
  373. //
  374. // //gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  375. // }
  376. //해당 일자의 병원 일정 정보를 얻어 온다
  377. function fGetCalendarMemo( i )
  378. {
  379. var holiflag = "";
  380. var holinm = "";
  381. var yearmonth = (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month"));
  382. holiflag = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holiflag");
  383. holinm = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holinm");
  384. for(var index = 0 ; !utlf_isNull(ds_main_list_rcvmemo.getColumn(index, "rsltworkdd")) ; index++)
  385. {
  386. tmp = ds_main_list_rcvmemo.getColumn(index, "rsltworkdd").substring(6, 8);
  387. if(i== tmp){
  388. //holinm ="";
  389. //holinm += "신체감정 예약";
  390. holinm = ds_main_list_rcvmemo.getColumn(index, "pid");
  391. holinm += " "+ ds_main_list_rcvmemo.getColumn(index, "hngnm")+"\n";
  392. // 20100201 JHP 수정추가 과, 의사 정보 추가함.
  393. holinm += " "+ ds_main_list_rcvmemo.getColumn(index, "orddeptcd");
  394. holinm += " "+ ds_main_list_rcvmemo.getColumn(index, "atdoctid")+" ";
  395. //holinm += "test";
  396. holinm += ds_main_list_rcvmemo.getColumn(index, "ordtm")+"\n\n";
  397. }
  398. }
  399. return holinm;
  400. }
  401. //2017.02.20 kimdo3 사용되지 않아서 수정없이 코멘트 처리함.
  402. // function fGetCalendarMemo2( i )
  403. // {
  404. // //var holiflag = "";
  405. // //var dutflag = "";
  406. // var holinm = "";
  407. // var ordendresn = "";
  408. // var fstexamcnt = 0;
  409. // var reexamcnt = 0;
  410. // var totalexamcnt = 0;
  411. // //var fstexamcap = 0;
  412. // //var reexamcap = 0;
  413. // var totalexamcap = 0;
  414. // var totalrsrvcnt = 0;
  415. // var telrsrvcnt = 0;
  416. //
  417. // var retValue = " " ;
  418. // holinm = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "holinm");
  419. // ordendresn = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "ordendresn");
  420. //
  421. // for(var index = 1 ; !utlf_isNull(ds_main_list_rcvmemo.getColumn(index, "rsrvdd")) ; index++)
  422. // {
  423. // tmp = ds_main_list_rcvmemo.getColumn(index, "rsrvdd").substring(6, 8);
  424. //
  425. // if(i== tmp){
  426. // retValue = ds_main_list_rcvmemo.getColumn(index, "deptnm")
  427. // + " " +ds_main_list_rcvmemo.getColumn(index, "doctnm")
  428. // + "\n환자 " +ds_main_list_rcvmemo.getColumn(index, "patnm") ;
  429. //
  430. // }
  431. // }
  432. //
  433. // //예약 현황
  434. // /*
  435. // if( caloption == '2' ){
  436. // totalrsrvcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalrsrvcnt");
  437. // telrsrvcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "telrsrvcnt");
  438. //
  439. // if( ordendresn == "" || ordendresn == null || ordendresn == "0"){
  440. //
  441. // retValue = holinm + "\n" + telrsrvcnt + "/" + totalrsrvcnt;
  442. // }else{
  443. // retValue = ordendresn + "\n" + telrsrvcnt + "/" + totalrsrvcnt;
  444. // }
  445. //
  446. // //예약가능 인원
  447. // }else{
  448. // fstexamcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "fstexamcnt");
  449. // reexamcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "reexamcnt");
  450. // totalexamcnt = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalexamcnt");
  451. // totalexamcap = ds_hidden_calendarinfo_calendarinfolist.getColumn(i, "totalexamcap");
  452. //
  453. // if( ordendresn == "" || ordendresn == null || ordendresn == "0"){
  454. // if( totalexamcap == '0' || totalexamcap == ''){
  455. // retValue = holinm + "\n" + fstexamcnt + "/" + reexamcnt;
  456. // }else{
  457. // retValue = holinm + "\n" + totalexamcnt;
  458. // }
  459. // }else{
  460. // if( totalexamcap == '0' ){
  461. // retValue = ordendresn + "\n" + fstexamcnt + "/" + reexamcnt;
  462. // }else{
  463. // retValue = ordendresn + "\n" + totalexamcnt;
  464. // }
  465. //
  466. // }
  467. // }
  468. // */
  469. // return retValue;
  470. // }
  471. /* */
  472. //달력을 클릭(선택) 했을 때
  473. // 2017.02.20 kimdo3 사용되지 않아서 코멘트 처리함.
  474. // function fClickOnCalendar(){
  475. // var calRow = grd_calendar.row;
  476. // var calCol = grd_calendar.col;
  477. //
  478. // calCol = calCol % 7;
  479. //
  480. // var isDay = grd_calendar.valueMatrix(calRow, calCol);
  481. // if( isDay != "" ){
  482. // if( isDay.length == 1 ) isDay = "0" + isDay;
  483. //
  484. // var dd = ( (ds_hidden_calendar.getColumn(0, "year")).concat(ds_hidden_calendar.getColumn(0, "month")) ).concat(isDay);
  485. // ds_main_reservation.setColumn( 0, "orddd", dd);
  486. //
  487. // fGetOutRsgt();
  488. // }
  489. // }
  490. function fGetCalendarData() {
  491. }
  492. function fSetMonth(newMonth){
  493. ds_hidden_calendar.setColumn( 0, "month", newMonth);
  494. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  495. var isYear = ds_hidden_calendar.getColumn(0, "year");
  496. var isDate = (isYear+isMonth+1).toDate();
  497. setCalendar(isDate);
  498. //fGetCalendarData();
  499. }
  500. function fSetYear(newYear){
  501. ds_hidden_calendar.setColumn( 0, "year", newYear);
  502. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  503. var isYear = ds_hidden_calendar.getColumn(0, "year");
  504. var isDate = (isYear+isMonth+1).toDate();
  505. setCalendar(isDate);
  506. //fGetCalendarData();
  507. }
  508. function button31_onclick(obj:Button, e:ClickEventInfo) {
  509. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  510. var isYear = ds_hidden_calendar.getColumn(0, "year");
  511. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  512. ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
  513. ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
  514. //model.refresh();
  515. ds_hidden_calendarinfo_calendarinfolist.clearData();
  516. fGetCalendarData();
  517. fSetYear(ds_hidden_calendar.getColumn(0, "year"));
  518. }
  519. function button32_onclick(obj:Button, e:ClickEventInfo) {
  520. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  521. var isYear = ds_hidden_calendar.getColumn(0, "year");
  522. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  523. ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
  524. ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
  525. //model.refresh();
  526. ds_hidden_calendarinfo_calendarinfolist.clearData();
  527. fGetCalendarData();
  528. fSetYear(ds_hidden_calendar.getColumn(0, "year"));
  529. }
  530. function btn_premonth_onclick(obj:Button, e:ClickEventInfo) {
  531. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  532. var isYear = ds_hidden_calendar.getColumn(0, "year");
  533. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  534. ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
  535. ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
  536. //model.refresh();
  537. ds_hidden_calendarinfo_calendarinfolist.clearData();
  538. //fGetCalendarData();
  539. fSetMonth(ds_hidden_calendar.getColumn(0, "month"));
  540. }
  541. function button34_onclick(obj:Button, e:ClickEventInfo) {
  542. var isMonth = ds_hidden_calendar.getColumn(0, "month");
  543. var isYear = ds_hidden_calendar.getColumn(0, "year");
  544. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  545. ds_hidden_calendar.setColumn( 0, "year", isDate.getDateFormat('YYYY'));
  546. ds_hidden_calendar.setColumn( 0, "month", isDate.getDateFormat('MM'));
  547. //model.refresh();
  548. ds_hidden_calendarinfo_calendarinfolist.clearData();
  549. //fGetCalendarData();
  550. fSetMonth(ds_hidden_calendar.getColumn(0, "month"));
  551. }
  552. function grd_calendar_oncellclick(obj:Grid, e:GridClickEventInfo) {
  553. //fClickOnCalendar();
  554. //var row = grd_calendar.row;
  555. //var col = grd_calendar.col;
  556. //setCellColor( row ,col);
  557. }
  558. function button1_onclick(obj:Button, e:ClickEventInfo) {
  559. fSetMonth("01");
  560. }
  561. function button2_onclick(obj:Button, e:ClickEventInfo) {
  562. fSetMonth("02");
  563. }
  564. function button3_onclick(obj:Button, e:ClickEventInfo) {
  565. fSetMonth("03");
  566. }
  567. function button4_onclick(obj:Button, e:ClickEventInfo) {
  568. fSetMonth("04");
  569. }
  570. function button5_onclick(obj:Button, e:ClickEventInfo) {
  571. fSetMonth("05");
  572. }
  573. function button6_onclick(obj:Button, e:ClickEventInfo) {
  574. fSetMonth("06");
  575. }
  576. function button7_onclick(obj:Button, e:ClickEventInfo) {
  577. fSetMonth("07");
  578. }
  579. function button8_onclick(obj:Button, e:ClickEventInfo) {
  580. fSetMonth("08");
  581. }
  582. function button9_onclick(obj:Button, e:ClickEventInfo) {
  583. fSetMonth("09");
  584. }
  585. function button10_onclick(obj:Button, e:ClickEventInfo) {
  586. fSetMonth("10");
  587. }
  588. function button11_onclick(obj:Button, e:ClickEventInfo) {
  589. fSetMonth("11");
  590. }
  591. function button12_onclick(obj:Button, e:ClickEventInfo) {
  592. fSetMonth("12");
  593. }
  594. ]]></Script>
  595. </Form>
  596. </FDL>