SPAEA00300_Angio일정조회.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>Angio 일정조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <send>
  10. <opdd/>
  11. <globalinstance>
  12. <instance1/>
  13. </globalinstance>
  14. </send>
  15. <init>
  16. <curerprescondlist>
  17. <opcalendar>
  18. <opdd/>
  19. <count/>
  20. </opcalendar>
  21. </curerprescondlist>
  22. </init>
  23. <hidden>
  24. <calendar>
  25. <year/>
  26. <month/>
  27. <weeklist>
  28. <list>
  29. <sun/>
  30. <mon/>
  31. <tue/>
  32. <wed/>
  33. <thu/>
  34. <fri/>
  35. <sat/>
  36. <sun_memo/>
  37. <mon_memo/>
  38. <tue_memo/>
  39. <wed_memo/>
  40. <thu_memo/>
  41. <fri_memo/>
  42. <sat_memo/>
  43. </list>
  44. </weeklist>
  45. <dd/>
  46. </calendar>
  47. <grdcellcolor>
  48. <calrow/>
  49. <calcol/>
  50. </grdcellcolor>
  51. <count/>
  52. </hidden>
  53. </root>
  54. </instance>
  55. <script type="javascript" ev:event="xforms-ready">
  56. <![CDATA[
  57. initCalendar();
  58. setCurrentDate();
  59. //20101011 해당근무지에 따라 타이틀 변경 - 박재영
  60. var dutplcenm = getUserInfo("dutplcenm");
  61. document.title = dutplcenm + " 수술일정조회";
  62. caption1.text = dutplcenm + " 수술일정조회";
  63. ]]>
  64. </script>
  65. <!--예약가용인원 조회-->
  66. <submission id="TRAEA02404" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/curerprescondlist"/>
  67. </model>
  68. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  72. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  73. <script type="javascript">
  74. <![CDATA[
  75. // 달력 초기화
  76. function initCalendar() {
  77. aezfSetSuppDeptcd();
  78. var curDate = getCurrentDate().toDate();
  79. model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY'));
  80. model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM'));
  81. model.refresh();
  82. setCalendar(curDate);
  83. }
  84. // 달력 setting
  85. function setCalendar(dateObj) {
  86. // 그리드 초기화
  87. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  88. //model.removeNodeset("/root/init/curerprescondlist/rsrvcalendar");
  89. //grd_calendar.rebuild();
  90. dateObj.setDate(1);
  91. var startDay = dateObj.getDay();
  92. var days = dateObj.getMonthDay();
  93. var rows = Math.ceil( ( startDay + days ) / 7 );
  94. for( var i = 0; i < rows; i++ )
  95. grd_calendar.addRow(false);
  96. grd_calendar.rebuild();
  97. var rowIndex = grd_calendar.fixedRows;
  98. var colIndex = startDay;
  99. for( var i = 1; i <= days; i++ ) {
  100. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  101. //grd_calendar.valueMatrix(rowIndex, colIndex + 7) = "일정: 0";
  102. colIndex++;
  103. if( colIndex == 7 ) {
  104. colIndex = 0;
  105. rowIndex++;
  106. }
  107. }
  108. //model.setValue("/root/send/rsrvdd",model.getValue("/root/hidden/calendar/year")+model.getValue("/root/hidden/calendar/month")+"01");
  109. setRsrvPresCondByMonth();
  110. }
  111. /* @group : 접수관리(기능검사)
  112. * @ver : 2007.08.10
  113. * @by : 임헤정
  114. * @-----------------------------------
  115. * @type : function
  116. * @access : public
  117. * @desc : 오늘날짜 달력에 표시
  118. */
  119. function setCurrentDate() {
  120. var curDate = getCurrentDate().substr(6,2); //오늘날짜
  121. var curWeek = getCurrentDate().toDate().getDayOfWeek("E").toLowerCase(); //오늘요일
  122. if(curDate <10) {
  123. curDate= curDate.substr(1,1);
  124. }
  125. if(curWeek == "sun")
  126. model.setValue("/root/hidden/grdcellcolor/calcol",0);
  127. if(curWeek == "mon")
  128. model.setValue("/root/hidden/grdcellcolor/calcol",1);
  129. if(curWeek == "tue")
  130. model.setValue("/root/hidden/grdcellcolor/calcol",2);
  131. if(curWeek == "wed")
  132. model.setValue("/root/hidden/grdcellcolor/calcol",3);
  133. if(curWeek == "thu")
  134. model.setValue("/root/hidden/grdcellcolor/calcol",4);
  135. if(curWeek == "fri")
  136. model.setValue("/root/hidden/grdcellcolor/calcol",5);
  137. if(curWeek == "sat")
  138. model.setValue("/root/hidden/grdcellcolor/calcol",6);
  139. for(var i = 0 ; i <grd_calendar.rows; i++ ) {
  140. if(model.getValue("/root/hidden/calendar/weeklist/list["+i+"]/"+curWeek) == curDate ) {
  141. model.setValue("/root/hidden/grdcellcolor/calrow",i);
  142. }
  143. }
  144. setCellColor(grd_calendar)
  145. }
  146. function setCellColor(gridObj) {
  147. var calRow = 0;
  148. var calCol = 0;
  149. calRow = Number(model.getValue("/root/hidden/grdcellcolor/calrow"));
  150. calCol = Number(model.getValue("/root/hidden/grdcellcolor/calcol"));
  151. gridObj.rebuildStyle();
  152. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  153. if( calCol < 7 )
  154. calCol += 7;
  155. else
  156. calCol -= 7;
  157. gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9";
  158. }
  159. /* @group : 치료예약(재활)
  160. * @ver : 2007.05.18
  161. * @by : 이선경
  162. * @-----------------------------------
  163. * @type : function
  164. * @access : public
  165. * @desc : 달력에 일자별로 일정현황을 보여준다.
  166. */
  167. function setRsrvPresCondByMonth() {
  168. submit("TRAEA02404");
  169. var isMonth = model.getValue("/root/hidden/calendar/month");
  170. var isYear = model.getValue("/root/hidden/calendar/year");
  171. var isDate = (isYear+isMonth+1).toDate();
  172. var startDay = isDate.getDay();
  173. for (var i = 1; i < grd_temp.rows; i++) {
  174. var dd = model.getValue("/root/init/curerprescondlist/opcalendar[" + i + "]/opdd");
  175. var _year = dd.substr(0, 4);
  176. var _month = dd.substr(4, 2);
  177. if ( _year != isYear || _month != isMonth)
  178. continue;
  179. var colidx = dd.toDate().getDay();
  180. var rowidx = Math.ceil( ( startDay + Number(dd.substr(6,2)) ) / 7 );
  181. grd_calendar.valueMatrix(rowidx, colidx+7) = "일정: " + model.getValue("/root/init/curerprescondlist/opcalendar[" + i + "]/count");
  182. }
  183. }
  184. /* @group : Angio일정조회
  185. * @ver : 2007.09.27
  186. * @by : 조원영
  187. * @-----------------------------------
  188. * @type : function
  189. * @access : public
  190. * @desc : 달력에서 선택한 날짜에 대한 Angio 검사현황 조회
  191. */
  192. function getAngioSche(gridObj) {
  193. var calRow = model.getValue("/root/hidden/grdcellcolor/calrow");
  194. var calCol = model.getValue("/root/hidden/grdcellcolor/calcol");
  195. if( calCol >= 7 )
  196. calCol -= 7;
  197. var yyyy = model.getValue("/root/hidden/calendar/year");
  198. var mm = model.getValue("/root/hidden/calendar/month");
  199. var dd = model.getValue("/root/hidden/calendar/weeklist/list[" + calRow + "]/" + gridObj.colAttribute(calCol, "ref"));
  200. if (getStringLength(dd) == 1) {
  201. dd = "0" + dd;
  202. }
  203. model.setValue("/root/send/opdd", yyyy + mm + dd);
  204. open("SMAEA02400", "", "50", "50", "SMAEA02400", "/root/send/opdd", "/root/send/frdt");
  205. }
  206. /* @group : Angio일정조회
  207. * @ver : 2007.09.27
  208. * @by : 조원영
  209. * @-----------------------------------
  210. * @type : function
  211. * @access : public
  212. * @desc : 달력에서 선택한 날짜에 대한 Angio 일정 등록
  213. */
  214. function insAngioSche(gridObj) {
  215. var calRow = model.getValue("/root/hidden/grdcellcolor/calrow");
  216. var calCol = model.getValue("/root/hidden/grdcellcolor/calcol");
  217. if( calCol >= 7 )
  218. calCol -= 7;
  219. var yyyy = model.getValue("/root/hidden/calendar/year");
  220. var mm = model.getValue("/root/hidden/calendar/month");
  221. var dd = model.getValue("/root/hidden/calendar/weeklist/list[" + calRow + "]/" + gridObj.colAttribute(calCol, "ref"));
  222. if (getStringLength(dd) == 1) {
  223. dd = "0" + dd;
  224. }
  225. model.setValue("/root/send/opdd", yyyy + mm + dd);
  226. modal("SPAEA00400", "","300","250", "SPAEA00400", "/root/send/opdd","/root/send/data/opdd");
  227. }
  228. ]]>
  229. </script>
  230. </xhtml:head>
  231. <xhtml:body pagewidth="405" pageheight="370" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  232. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:375px; height:13px; ">Angio일정조회</caption>
  233. <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:387px; y2:26px; "/>
  234. <group id="grp_calendar" scroll="auto" style="left:0px; top:31px; width:387px; height:291px; ">
  235. <shape id="rectangle2" class="calendar_header" appearance="rectangle" style="left:0px; top:0px; width:387px; height:25px; "/>
  236. <button id="btn_preyear" class="icon_pre_year" style="left:48px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_y.gif; ">
  237. <caption/>
  238. <script type="javascript" ev:event="DOMActivate">
  239. <![CDATA[
  240. var isMonth = model.getValue("/root/hidden/calendar/month");
  241. var isYear = model.getValue("/root/hidden/calendar/year");
  242. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  243. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  244. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  245. model.refresh();
  246. setCalendar(isDate);
  247. ]]>
  248. </script>
  249. </button>
  250. <button id="btn_premonth" class="icon_pre_month" style="left:66px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_pre_m.gif; ">
  251. <caption/>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. var isMonth = model.getValue("/root/hidden/calendar/month");
  255. var isYear = model.getValue("/root/hidden/calendar/year");
  256. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  257. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  258. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  259. model.refresh();
  260. setCalendar(isDate);
  261. ]]>
  262. </script>
  263. </button>
  264. <button id="btn_nextmonth" class="icon_next_month" style="left:304px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_m.gif; ">
  265. <caption/>
  266. <script type="javascript" ev:event="DOMActivate">
  267. <![CDATA[
  268. var isMonth = model.getValue("/root/hidden/calendar/month");
  269. var isYear = model.getValue("/root/hidden/calendar/year");
  270. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  271. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  272. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  273. model.refresh();
  274. setCalendar(isDate);
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="btn_nextyear" class="icon_next_year" style="left:322px; top:5px; width:16px; height:16px; background-image:../../../com/commonweb/images/cal_next_y.gif; ">
  279. <caption/>
  280. <script type="javascript" ev:event="DOMActivate">
  281. <![CDATA[
  282. var isMonth = model.getValue("/root/hidden/calendar/month");
  283. var isYear = model.getValue("/root/hidden/calendar/year");
  284. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  285. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  286. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  287. model.refresh();
  288. setCalendar(isDate);
  289. ]]>
  290. </script>
  291. </button>
  292. <output id="opt_year" ref="/root/hidden/calendar/year" class="calendar_output" style="left:130px; top:3px; width:30px; height:19px; "/>
  293. <output id="opt_month" ref="/root/hidden/calendar/month" class="calendar_output" style="left:203px; top:3px; width:30px; height:19px; "/>
  294. <caption id="caption15" class="calendar_output" style="left:163px; top:3px; width:20px; height:19px; ">년</caption>
  295. <caption id="caption18" class="calendar_output" style="left:236px; top:3px; width:20px; height:19px; ">월</caption>
  296. <multilinegrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="55, 55, 55, 55, 55, 55, 55" dataheight="20" focuscolor="transparent" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" mergecellsfixedrows="bycolrec" style="left:0px; top:26px; width:387px; height:265px; ">
  297. <row>
  298. <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
  299. <col ref="mon" style="border-bottom-width:0px; "/>
  300. <col ref="tue" style="border-bottom-width:0px; "/>
  301. <col ref="wed" style="border-bottom-width:0px; "/>
  302. <col ref="thu" style="border-bottom-width:0px; "/>
  303. <col ref="fri" style="border-bottom-width:0px; "/>
  304. <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
  305. </row>
  306. <row>
  307. <col ref="sun_memo" style="border-top-width:0px; "/>
  308. <col ref="mon_memo" style="border-top-width:0px; "/>
  309. <col ref="tue_memo" style="border-top-width:0px; "/>
  310. <col ref="wed_memo" style="border-top-width:0px; "/>
  311. <col ref="thu_memo" style="border-top-width:0px; "/>
  312. <col ref="fri_memo" style="border-top-width:0px; "/>
  313. <col ref="sat_memo" style="border-top-width:0px; "/>
  314. </row>
  315. <script type="javascript" ev:event="onclick">
  316. <![CDATA[
  317. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  318. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  319. setCellColor(grd_calendar);
  320. getAngioSche(grd_calendar);
  321. model.refresh();
  322. ]]>
  323. </script>
  324. <script type="javascript" ev:event="onrowchanged">
  325. <![CDATA[
  326. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  327. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  328. setCellColor(grd_calendar);
  329. ]]>
  330. </script>
  331. <script type="javascript" ev:event="oncolchanged">
  332. <![CDATA[
  333. model.setValue("/root/hidden/grdcellcolor/calrow",grd_calendar.row);
  334. model.setValue("/root/hidden/grdcellcolor/calcol",grd_calendar.col);
  335. setCellColor(grd_calendar);
  336. ]]>
  337. </script>
  338. </multilinegrid>
  339. <datagrid id="grd_temp" nodeset="/root/init/curerprescondlist/opcalendar" visibility="hidden" caption="일자(dd)^인원현황" colsep="^" colwidth="76, 62" mergecellsfixedrows="bycolrec" rowsep="|" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:115px; top:100px; width:145px; height:170px; ">
  340. <col ref="opdd"/>
  341. <col ref="count"/>
  342. </datagrid>
  343. </group>
  344. <!--line id="line2" class="line_3" style="x1:0px; y1:323px; x2:352px; y2:323px; "/-->
  345. <group id="grp_btn" scroll="auto" style="left:0px; top:327px; width:387px; height:23px; ">
  346. <button id="button91" class="btn6_letter4" style="left:0px; top:0px; width:80px; height:22px; ">
  347. <caption>일정등록</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. insAngioSche(grd_calendar);
  351. model.refresh();
  352. ]]>
  353. </script>
  354. </button>
  355. <button id="button2" class="btn4_letter2" style="left:330px; top:0px; width:56px; height:22px; ">
  356. <caption>닫기</caption>
  357. <script type="javascript" ev:event="DOMActivate">
  358. <![CDATA[
  359. window.close();
  360. ]]>
  361. </script>
  362. </button>
  363. </group>
  364. </xhtml:body>
  365. </xhtml:html>