SPPMB01001_병원달력.xrw 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>병원달력</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <hidden>
  10. <calendar>
  11. <year/>
  12. <month/>
  13. <weeklist>
  14. <list>
  15. <sun/>
  16. <mon/>
  17. <tue/>
  18. <wed/>
  19. <thu/>
  20. <fri/>
  21. <sat/>
  22. <sun_memo/>
  23. <mon_memo/>
  24. <tue_memo/>
  25. <wed_memo/>
  26. <thu_memo/>
  27. <fri_memo/>
  28. <sat_memo/>
  29. </list>
  30. </weeklist>
  31. </calendar>
  32. </hidden>
  33. </root>
  34. </instance>
  35. <submission id="TRPMB01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/calendarinfo"/>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. initCalendar();
  39. //2008-10-04 이동식 추가
  40. fChangeButtonColor();
  41. //END..
  42. ]]>
  43. </script>
  44. </model>
  45. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  46. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  48. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  49. <script type="javascript">
  50. <![CDATA[
  51. var beforeId = "";
  52. //2007-10-04 이동식 추가
  53. function fChangeButtonColor(){
  54. var curMonth = model.getValue("/root/hidden/calendar/month");
  55. //alert( curMonth );
  56. switch( curMonth ){
  57. case '01' : //button1.attribute("class") = "btn5_letter2";
  58. btn_jan.disabled = true;
  59. beforeId = 'btn_jan';
  60. break;
  61. case '02' : //button2.attribute("class") = "btn5_letter2";
  62. btn_feb.disabled = true;
  63. beforeId = 'btn_feb';
  64. break;
  65. case '03' : //button3.attribute("class") = "btn5_letter2";
  66. btn_mar.disabled = true;
  67. beforeId = 'btn_mar';
  68. break;
  69. case '04' : //button4.attribute("class") = "btn5_letter2";
  70. btn_apr.disabled = true;
  71. beforeId = 'btn_apr';
  72. break;
  73. case '05' : //button5.attribute("class") = "btn5_letter2";
  74. btn_may.disabled = true;
  75. beforeId = 'btn_may';
  76. break;
  77. case '06' : //button6.attribute("class") = "btn5_letter2";
  78. btn_jun.disabled = true;
  79. beforeId = 'btn_jun';
  80. break;
  81. case '07' : //button7.attribute("class") = "btn5_letter2";
  82. btn_jul.disabled = true;
  83. beforeId = 'btn_jul';
  84. break;
  85. case '08' : //button8.attribute("class") = "btn5_letter2";
  86. btn_aug.disabled = true;
  87. beforeId = 'btn_aug';
  88. break;
  89. case '09' : //button9.attribute("class") = "btn5_letter2";
  90. btn_sep.disabled = true;
  91. beforeId = 'btn_sep';
  92. break;
  93. case '10' : //button10.attribute("class") = "btn5_letter2";
  94. btn_oct.disabled = true;
  95. beforeId = 'btn_oct';
  96. break;
  97. case '11' : //button11.attribute("class") = "btn5_letter2";
  98. btn_nov.disabled = true;
  99. beforeId = 'btn_nov';
  100. break;
  101. case '12' : //button12.attribute("class") = "btn5_letter2";
  102. btn_dec.disabled = true;
  103. beforeId = 'btn_dec';
  104. break;
  105. }
  106. }
  107. function initCalendar() {
  108. if( model.getValue("/root/hidden/calendar/year") == "" || model.getValue("/root/hidden/calendar/month") == "" ){
  109. var curDate = getCurrentDate().toDate();
  110. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  111. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  112. model.refresh();
  113. setCalendar(curDate);
  114. }
  115. }
  116. function fGetHospitalCalendar(){
  117. var dd = (model.getValue("/root/hidden/calendar/year")).concat(model.getValue("/root/hidden/calendar/month"));
  118. model.makeNode("/root/send/date");
  119. model.setValue("/root/send/date",dd);
  120. if (submit("TRPMB01001") == true) return true;
  121. else return false;
  122. }
  123. function setCalendar(dateObj) {
  124. //서버로 자료 요청
  125. if ( fGetHospitalCalendar() != true ){
  126. messageBox("병원일정 데이터를 가져올 수", "I004");
  127. }
  128. // 그리드 초기화
  129. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  130. //grd_calendar.rebuild()
  131. dateObj.setDate(1);
  132. var startDay = dateObj.getDay();
  133. var days = dateObj.getMonthDay();
  134. var rows = Math.ceil( ( startDay + days ) / 7 );
  135. for( var i = 0; i < rows; i++ )
  136. grd_calendar.addRow(false);
  137. grd_calendar.rebuild();
  138. grd_calendar.rebuildStyle();
  139. var rowIndex = grd_calendar.fixedRows;
  140. var colIndex = startDay;
  141. var dutflag = '';
  142. for( var i = 1; i <= days; i++ ) {
  143. //write date
  144. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  145. grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
  146. //write memo
  147. grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo( i );
  148. dutflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/dutflag");
  149. if( dutflag == '8' ){ //'0' 평일, '4' 토요일, '8' 휴일
  150. fSetTextColor(rowIndex, colIndex, '#ff0000');
  151. }
  152. colIndex++;
  153. if( colIndex == 7 ) {
  154. colIndex = 0;
  155. rowIndex++;
  156. }
  157. }
  158. grd_calendar.resizeCells();
  159. }
  160. function setCalendar2(dateObj) {
  161. // 그리드 초기화
  162. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  163. //grd_calendar.rebuild()
  164. dateObj.setDate(1);
  165. var startDay = dateObj.getDay();
  166. var days = dateObj.getMonthDay();
  167. var rows = Math.ceil( ( startDay + days ) / 7 );
  168. for( var i = 0; i < rows; i++ )
  169. grd_calendar.addRow(false);
  170. grd_calendar.rebuild();
  171. grd_calendar.rebuildStyle();
  172. var rowIndex = grd_calendar.fixedRows;
  173. var colIndex = startDay;
  174. var ampmflag = '';
  175. var dutflag = '';
  176. var ordendresn = '';
  177. //var holiflag = '';
  178. var reglscheflag = '';
  179. for( var i = 1; i <= days; i++ ) {
  180. //write date
  181. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  182. grd_calendar.cellStyle("font-weight", rowIndex, colIndex) = "bold";
  183. ampmflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ampmflag");
  184. dutflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/dutflag");
  185. ordendresn = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ordendresn");
  186. ordendresnmin = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ordendresnmin"); //휴진구분
  187. reglscheflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/reglscheflag");
  188. //write memo
  189. if((reglscheflag != 'X') || (ordendresnmin != 'H' && ordendresnmin != 'T')){ //검사일정이고, 마감이 아닐경우 정원표시 안함.!
  190. //if((reglscheflag != 'X') || (ordendresnmin != "-")){ //검사일정이고, 마감일 경우 정원표시 안함.!
  191. grd_calendar.valueMatrix(rowIndex , colIndex + 7) = fGetCalendarMemo2( i );
  192. grd_calendar.tooltipText(rowIndex, colIndex) = ordendresn;
  193. grd_calendar.tooltipText(rowIndex, colIndex + 7) = ordendresn;
  194. }
  195. // if( ordendresnmin == '' ){
  196. // ordendresnmin = ordendresn;
  197. // }
  198. if( ordendresnmin != 'H' && ordendresnmin != 'T'){
  199. //if( ordendresnmin == '-' ){
  200. if( ampmflag == '1' ){ //오전
  201. if( reglscheflag == 'Y' ){ //정규일정
  202. fSetBGColor(rowIndex, colIndex, '#ffff99');
  203. }else if( reglscheflag == 'N' ){ //임시일정
  204. fSetBGColor(rowIndex, colIndex, '#c9c299');
  205. grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
  206. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
  207. }else if( reglscheflag == 'Z' ){ //대진
  208. fSetBGColor(rowIndex, colIndex, '#c9c299');
  209. grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
  210. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
  211. }
  212. }else if( ampmflag == '10' ){ //오후
  213. if( reglscheflag == 'Y' ){ //정규일정
  214. fSetBGColor(rowIndex, colIndex, '#ccffff');
  215. }else if( reglscheflag == 'N' ){ //임시일정
  216. fSetBGColor(rowIndex, colIndex, '#ffccff');
  217. grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
  218. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
  219. }else if( reglscheflag == 'Z' ){ //대진
  220. fSetBGColor(rowIndex, colIndex, '#ffccff');
  221. grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
  222. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
  223. }
  224. // }else if( ampmflag == '100' ) { //야간
  225. // fSetBGColor(rowIndex, colIndex, '#ff99cc');
  226. }else if( ampmflag == '11' || ampmflag == '110' || ampmflag == '101' || ampmflag == '111' || ampmflag == '100'){ //전일, 야간포함
  227. if( reglscheflag == 'Y' ){ //정규일정
  228. fSetBGColor(rowIndex, colIndex, '#ffcc99');
  229. }else if( reglscheflag == 'N' ){ //임시일정
  230. fSetBGColor(rowIndex, colIndex, '#ffcc99');
  231. grd_calendar.tooltipText(rowIndex, colIndex) = '임시';
  232. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '임시';
  233. }else if( reglscheflag == 'Z' ){ //대진
  234. fSetBGColor(rowIndex, colIndex, '#ffcc99');
  235. grd_calendar.tooltipText(rowIndex, colIndex) = '대진';
  236. grd_calendar.tooltipText(rowIndex, colIndex + 7) = '대진';
  237. }
  238. }
  239. }else{
  240. //if( ordendresn == ordendresnmin ){
  241. if( ordendresnmin == 'H' ){
  242. fSetBGColor(rowIndex, colIndex, '#ffffff'); //휴진마감
  243. }else if( ordendresnmin == 'T' ){
  244. fSetBGColor(rowIndex, colIndex, '#999999'); //부분마감
  245. /*
  246. if( model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiampmflag") == 'A' ){ //오전
  247. fSetBGColor(rowIndex, colIndex, '#999999'); //부분마감
  248. }else if( model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiampmflag") == 'P' ){ //오후
  249. fSetBGColor(rowIndex, colIndex, '#999999'); //부분마감
  250. }else if( model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiampmflag") == 'D' ){ //전일
  251. fSetBGColor(rowIndex, colIndex, '#999999'); //부분마감
  252. }
  253. */
  254. }
  255. }
  256. if( dutflag == '8' ){
  257. fSetTextColor(rowIndex, colIndex, '#ff0000');
  258. }
  259. colIndex++;
  260. if( colIndex == 7 ) {
  261. colIndex = 0;
  262. rowIndex++;
  263. }
  264. }
  265. grd_calendar.resizeCells();
  266. }
  267. //그리드의 배경색상을 변경한다.
  268. function fSetBGColor(calRow, calCol, bgColor) {
  269. //var calRow = gridObj.row;
  270. //var calCol = gridObj.col;
  271. if( calCol < 7 ){
  272. //calCol = calCol + 7;
  273. grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  274. grd_calendar.cellStyle("background-color", calRow, calCol + 7) = bgColor;
  275. }else{
  276. //calCol = calCol - 7;
  277. grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  278. grd_calendar.cellStyle("background-color", calRow, calCol - 7) = bgColor;
  279. }
  280. //grd_calendar.rebuildStyle();
  281. //grd_calendar.cellStyle("background-color", calRow, calCol) = bgColor;
  282. }
  283. //그리드의 폰트 색상을 변경한다.
  284. function fSetTextColor(calRow, calCol, bgColor) {
  285. if( calCol < 7 ){
  286. //calCol = calCol + 7;
  287. grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  288. grd_calendar.cellStyle("color", calRow, calCol + 7) = bgColor;
  289. }else{
  290. //calCol = calCol - 7;
  291. grd_calendar.cellStyle("color", calRow, calCol) = bgColor;
  292. grd_calendar.cellStyle("color", calRow, calCol - 7) = bgColor;
  293. }
  294. //grd_calendar.rebuildStyle();
  295. }
  296. function setCellColor(calRow, calCol) {
  297. var isMonth = model.getValue("/root/hidden/calendar/month");
  298. var isYear = model.getValue("/root/hidden/calendar/year");
  299. var isDate = (isYear+isMonth+1).toDate();
  300. //fGetCalendarData();
  301. setCalendar2(isDate);
  302. if( calCol < 7 ){
  303. //calCol = calCol + 7;
  304. grd_calendar.cellStyle("background-color", calRow, calCol) = "#c0c0c0";
  305. grd_calendar.cellStyle("background-color", calRow, calCol + 7) = "#c0c0c0";
  306. }else{
  307. //calCol = calCol - 7;
  308. grd_calendar.cellStyle("background-color", calRow, calCol) = "#c0c0c0";
  309. grd_calendar.cellStyle("background-color", calRow, calCol - 7) = "#c0c0c0";
  310. }
  311. //gridObj.rebuildStyle();
  312. //gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  313. }
  314. //해당 일자의 병원 일정 정보를 얻어 온다
  315. function fGetCalendarMemo( i )
  316. {
  317. var holiflag = "";
  318. var holinm = "";
  319. holiflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiflag");
  320. holinm = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holinm");
  321. if( holinm == '-' ){
  322. holinm = "";
  323. }
  324. return holinm;
  325. }
  326. //달력에 예약인원 및 예약현황 메모
  327. function fGetCalendarMemo2( i )
  328. {
  329. //var holiflag = "";
  330. //var dutflag = "";
  331. var holinm = "";
  332. var ordendresn = "";
  333. var fstexamcnt = 0;
  334. var reexamcnt = 0;
  335. var totalexamcnt = 0;
  336. //var fstexamcap = 0;
  337. //var reexamcap = 0;
  338. var totalexamcap = 0;
  339. var totalrsrvcnt = 0;
  340. var telrsrvcnt = 0;
  341. var reglscheflag = '';
  342. //holiflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holiflag");
  343. //dutflag = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/dutflag");
  344. holinm = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/holinm");
  345. if( holinm == '-' ){
  346. holinm = "";
  347. }
  348. ordendresn = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ordendresn");
  349. ordendresnmin = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/ordendresnmin");
  350. var caloption = model.getValue("/root/main/caloption");
  351. var retValue = "";
  352. var memo = "";
  353. var checkSche = '';
  354. //예약 현황
  355. if( caloption == '2' ){
  356. totalrsrvcnt = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/totalrsrvcnt");
  357. telrsrvcnt = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/telrsrvcnt");
  358. totalexamcap = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/totalexamcap");
  359. //의사일정이 있을 경우
  360. if( ordendresn == "" || ordendresn == null || ordendresn == "0" || ordendresn == "00" || ordendresn == "-"){
  361. memo = telrsrvcnt + "/" + totalrsrvcnt;
  362. checkSche = totalexamcap + totalrsrvcnt;
  363. if( memo.getTrim() == '/' || checkSche.getTrim() == '0'){
  364. memo = '';
  365. }
  366. retValue = holinm + "\n" + memo;
  367. }else{ //의사진료일정이 없을 경우
  368. memo = telrsrvcnt + "/" + totalrsrvcnt;
  369. checkSche = totalexamcap + totalrsrvcnt;
  370. if( memo.getTrim() == '/' || checkSche.getTrim() == '0'){
  371. memo = '';
  372. }
  373. if(ordendresnmin == 'H'){
  374. retValue = "휴진" + "\n" + memo;
  375. }else if(ordendresnmin == 'T'){
  376. retValue = "당일" + "\n" + memo;
  377. }else{
  378. retValue = "\n" + memo;
  379. }
  380. }
  381. //예약가능 인원
  382. }else{
  383. fstexamcnt = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/fstexamcnt");
  384. reexamcnt = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/reexamcnt");
  385. totalexamcnt = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/totalexamcnt");
  386. fstexamcap = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/fstexamcap");
  387. reexamcap = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/reexamcap");
  388. totalexamcap = model.getValue("/root/hidden/calendarinfo/calendarinfolist[" + i +"]/totalexamcap");
  389. if( ordendresn == "" || ordendresn == null || ordendresn == "0" || ordendresn == "00" || ordendresn == "-"){
  390. if( totalexamcap == '0' || totalexamcap == ''){
  391. memo = fstexamcnt + "/" + reexamcnt;
  392. if( memo.getTrim() == '/' || memo.getTrim() == '0/0'){
  393. memo = '';
  394. }
  395. retValue = holinm + "\n" + memo;
  396. //전일마감
  397. if( ordendresn == ordendresnmin ){
  398. //retValue = holinm + "\n" + fstexamcnt + "/" + reexamcnt;
  399. }else { //부분마감
  400. retValue = holinm + "\n" + memo;
  401. }
  402. }else{
  403. retValue = holinm + "\n" + (parseInt(totalexamcnt) + parseInt(fstexamcap) + parseInt(reexamcap) - parseInt(totalrsrvcnt));
  404. }
  405. }else{
  406. if( totalexamcap == '0' || totalexamcap == ''){
  407. memo = fstexamcnt + "/" + reexamcnt;
  408. if( memo.getTrim() == '/' || memo.getTrim() == '0/0'){
  409. memo = '';
  410. }
  411. //retValue = ordendresn + "\n" //+ memo;
  412. //전일마감
  413. if( ordendresn == ordendresnmin ){
  414. //retValue = holinm + "\n" + fstexamcnt + "/" + reexamcnt;
  415. }else { //부분마감
  416. if(ordendresnmin == 'H'){
  417. retValue = "휴진" + "\n" + memo;
  418. }else if(ordendresnmin == 'T'){
  419. // model.alert("8");
  420. retValue = "당일" + "\n" + memo;
  421. }else{
  422. retValue = "\n" + memo;
  423. }
  424. }
  425. }else{
  426. //retValue = ordendresn + "\n" //+ totalexamcnt;
  427. retValue = totalexamcnt;
  428. }
  429. }
  430. }
  431. return retValue;
  432. }
  433. /*
  434. //달력을 클릭(선택) 했을 때
  435. function fClickOnCalendar(){
  436. var calRow = grd_calendar.row;
  437. var calCol = grd_calendar.col;
  438. calCol = calCol % 7;
  439. var isDay = grd_calendar.valueMatrix(calRow, calCol);
  440. if( isDay != "" ){
  441. if( isDay.length == 1 ) isDay = "0" + isDay;
  442. var dd = ( (model.getValue("/root/hidden/calendar/year")).concat(model.getValue("/root/hidden/calendar/month")) ).concat(isDay);
  443. model.setValue("/root/main/reservation/orddd", dd);
  444. fGetOutRsgt();
  445. }
  446. }
  447. */
  448. function fSetMonth(newMonth){
  449. model.setValue("/root/hidden/calendar/month", newMonth);
  450. var isMonth = model.getValue("/root/hidden/calendar/month");
  451. var isYear = model.getValue("/root/hidden/calendar/year");
  452. var isDate = (isYear+isMonth+1).toDate();
  453. //setCalendar(isDate);
  454. fGetCalendarData();
  455. }
  456. ]]>
  457. </script>
  458. </xhtml:head>
  459. <xhtml:body overflow="hidden" pagewidth="387" pageheight="462">
  460. <shape id="rectangle1" class="calendar_header" appearance="rectangle" style="left:0px; top:1px; width:387px; height:30px; "/>
  461. <button id="button31" class="icon_pre_year" style="left:140px; top:9px; width:16px; height:16px; ">
  462. <caption/>
  463. <script type="javascript" ev:event="DOMActivate">
  464. <![CDATA[
  465. var isMonth = model.getValue("/root/hidden/calendar/month");
  466. var isYear = model.getValue("/root/hidden/calendar/year");
  467. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  468. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  469. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  470. model.refresh();
  471. model.resetInstanceNode("/root/hidden/calendarinfo")
  472. fGetCalendarData();
  473. ]]>
  474. </script>
  475. </button>
  476. <button id="button32" class="icon_next_year" style="left:231px; top:9px; width:16px; height:16px; ">
  477. <caption/>
  478. <script type="javascript" ev:event="DOMActivate">
  479. <![CDATA[
  480. var isMonth = model.getValue("/root/hidden/calendar/month");
  481. var isYear = model.getValue("/root/hidden/calendar/year");
  482. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  483. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  484. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  485. model.refresh();
  486. model.resetInstanceNode("/root/hidden/calendarinfo")
  487. fGetCalendarData();
  488. ]]>
  489. </script>
  490. </button>
  491. <button id="btn_premonth" class="icon_pre_month" visibility="hidden" style="left:117px; top:9px; width:16px; height:16px; ">
  492. <caption/>
  493. <script type="javascript" ev:event="DOMActivate">
  494. <![CDATA[
  495. var isMonth = model.getValue("/root/hidden/calendar/month");
  496. var isYear = model.getValue("/root/hidden/calendar/year");
  497. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  498. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  499. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  500. model.refresh();
  501. model.resetInstanceNode("/root/hidden/calendarinfo")
  502. fGetCalendarData();
  503. ]]>
  504. </script>
  505. </button>
  506. <button id="button34" class="icon_next_month" visibility="hidden" style="left:254px; top:9px; width:16px; height:16px; ">
  507. <caption/>
  508. <script type="javascript" ev:event="DOMActivate">
  509. <![CDATA[
  510. var isMonth = model.getValue("/root/hidden/calendar/month");
  511. var isYear = model.getValue("/root/hidden/calendar/year");
  512. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  513. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  514. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  515. model.refresh();
  516. model.resetInstanceNode("/root/hidden/calendarinfo")
  517. fGetCalendarData();
  518. ]]>
  519. </script>
  520. </button>
  521. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:158px; top:7px; width:50px; height:19px; "/>
  522. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" visibility="hidden" style="left:310px; top:5px; width:30px; height:19px; "/>
  523. <caption id="caption1" class="calendar_output" style="left:208px; top:7px; width:20px; height:19px; ">년</caption>
  524. <caption id="caption2" class="calendar_output" visibility="hidden" style="left:340px; top:5px; width:20px; height:19px; ">월</caption>
  525. <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" backcoloralternate="transparent" caption="일^월^화^수^목^금^토" colsep="^" colwidth="55, 55, 55, 55, 55, 55, 55" ellipsis="true" focuscolor="transparent" rowsep="|" tooltip="true" selectionmode="free" mergecellsfixedrows="bycolrec" style="left:0px; top:75px; width:387px; height:364px; font-size:10pt; ">
  526. <row>
  527. <col class="color_sun" ref="sun"/>
  528. <col ref="mon"/>
  529. <col ref="tue"/>
  530. <col ref="wed"/>
  531. <col ref="thu"/>
  532. <col ref="fri"/>
  533. <col class="color_sat" ref="sat"/>
  534. </row>
  535. <row>
  536. <col ref="sun_memo"/>
  537. <col ref="mon_memo"/>
  538. <col ref="tue_memo"/>
  539. <col ref="wed_memo"/>
  540. <col ref="thu_memo"/>
  541. <col ref="fri_memo" style="height:46; "/>
  542. <col ref="sat_memo"/>
  543. </row>
  544. <script type="javascript" ev:event="onclick">
  545. <![CDATA[
  546. fClickOnCalendar();
  547. ]]>
  548. </script>
  549. </multilinegrid>
  550. <caption id="caption3" style="left:0px; top:442px; width:35px; height:20px; text-align:center; background-color:#ffff99; ">오전</caption>
  551. <caption id="caption4" style="left:31px; top:442px; width:35px; height:20px; text-align:center; background-color:#ccffff; ">오후</caption>
  552. <caption id="caption6" style="left:67px; top:442px; width:35px; height:20px; text-align:center; background-color:#ffcc99; ">전일</caption>
  553. <group id="group1" style="left:15px; top:38px; width:360px; height:30px; ">
  554. <button id="btn_jan" class="icon_month" style="left:0px; top:3px; width:27px; height:27px; ">
  555. <caption>1</caption>
  556. </button>
  557. <button id="btn_feb" class="icon_month" style="left:30px; top:3px; width:27px; height:27px; ">
  558. <caption>2</caption>
  559. </button>
  560. <button id="btn_mar" class="icon_month" style="left:60px; top:3px; width:27px; height:27px; ">
  561. <caption>3</caption>
  562. </button>
  563. <button id="btn_apr" class="icon_month" style="left:90px; top:3px; width:27px; height:27px; ">
  564. <caption>4</caption>
  565. </button>
  566. <button id="btn_may" class="icon_month" style="left:120px; top:3px; width:27px; height:27px; ">
  567. <caption>5</caption>
  568. </button>
  569. <button id="btn_jun" class="icon_month" style="left:150px; top:3px; width:27px; height:27px; ">
  570. <caption>6</caption>
  571. </button>
  572. <button id="btn_jul" class="icon_month" style="left:180px; top:3px; width:27px; height:27px; ">
  573. <caption>7</caption>
  574. </button>
  575. <button id="btn_aug" class="icon_month" style="left:210px; top:3px; width:27px; height:27px; ">
  576. <caption>8</caption>
  577. </button>
  578. <button id="btn_sep" class="icon_month" style="left:240px; top:3px; width:27px; height:27px; ">
  579. <caption>9</caption>
  580. </button>
  581. <button id="btn_oct" class="icon_month" style="left:270px; top:3px; width:27px; height:27px; ">
  582. <caption>10</caption>
  583. </button>
  584. <button id="btn_nov" class="icon_month" style="left:300px; top:3px; width:27px; height:27px; ">
  585. <caption>11</caption>
  586. </button>
  587. <button id="btn_dec" class="icon_month" style="left:330px; top:3px; width:27px; height:27px; ">
  588. <caption>12</caption>
  589. </button>
  590. <script type="javascript" ev:event="onclick">
  591. <![CDATA[
  592. var trgObj = document.controls.item(event.target);
  593. if( trgObj.elementName == "xforms:button" ) {
  594. var btnMark = trgObj.label;
  595. if(beforeId != ""){
  596. beforeObj = document.controls(beforeId);
  597. if(beforeObj != null) beforeObj.disabled = "false";
  598. }
  599. trgObj.disabled = "true";
  600. beforeId = trgObj.attribute("id");
  601. //달력 변경
  602. if( btnMark.length == 1 ){
  603. btnMark = '0' + btnMark;
  604. }
  605. fSetMonth(btnMark);
  606. }
  607. ]]>
  608. </script>
  609. </group>
  610. <caption id="caption8" style="left:103px; top:442px; width:55px; height:20px; text-align:center; background-color:#c9c299; ">임시오전</caption>
  611. <caption id="caption10" style="left:159px; top:442px; width:55px; height:20px; text-align:center; background-color:#ffccff; ">임시오후</caption>
  612. <caption id="caption16" style="left:215px; top:443px; width:55px; height:20px; text-align:center; background-color:#999999; ">당일마감</caption>
  613. </xhtml:body>
  614. </xhtml:html>