SPAHA00110_결과상담시간선택.xrw 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SPAHA00110.xrw
  4. * 설 명 : 결과상담예약시간 선택
  5. * 설 계 자 : 손범성
  6. * 작 성 자 : 손범성
  7. * 작 성 일 : 2009.03.13
  8. * 기 타 :
  9. -->
  10. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  11. <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">
  12. <xhtml:head>
  13. <xhtml:title>결과상담시간선택</xhtml:title>
  14. <model id="model1">
  15. <instance id="instance1">
  16. <root xmlns="">
  17. <main>
  18. <rsrvtmlst>
  19. <rsrvpsnnocnt/>
  20. <rsrvtm/>
  21. <psnnocnt/>
  22. </rsrvtmlst>
  23. <rsltcnstinfo>
  24. <cnst>
  25. <rsltcnstrsrvstarttm/>
  26. <rsltcnstrsrvendtm/>
  27. <rsltcnstdd/>
  28. <rsltcnstdr/>
  29. <rsltcnstremcnts/>
  30. <outexamyn/>
  31. <rsltrsrvid/>
  32. <rsltrsrvnm/>
  33. <rsltrsrvsaveyn/>
  34. <rsltcnstflag/>
  35. <m/>
  36. <rsltcnstseqno/>
  37. <ownyn/>
  38. <visitor/>
  39. <visittm/>
  40. <rsltcnststarttm/>
  41. <rsltcnstendtm/>
  42. <rsltcnstendyn/>
  43. <rsltcnsthistcd/>
  44. <spcffact/>
  45. </cnst>
  46. </rsltcnstinfo>
  47. <dayblist>
  48. <remdd/>
  49. <remcnts/>
  50. <instcd/>
  51. </dayblist>
  52. </main>
  53. <send>
  54. <srchcond/>
  55. <srchhealexamflag/>
  56. <srchhealexamdetlflag/>
  57. <srchrsrvdd/>
  58. <srchrsrvmon/>
  59. <srchcnstdrid/>
  60. <srchinstcd/>
  61. <srchdateyn/>
  62. <srchstatfg/>
  63. <srchfromdd/>
  64. <srchtodd/>
  65. <srchrsltcnstrsrvdd/>
  66. <srchrsltcnstrsrvtm/>
  67. <srchrsrvflag/>
  68. <srchrsltremcnts/>
  69. <srchcnstdrnm/>
  70. </send>
  71. <init>
  72. <cnst>
  73. <drlst>
  74. <itemdr>
  75. <drid/>
  76. <drnm/>
  77. </itemdr>
  78. </drlst>
  79. </cnst>
  80. <cnstinfo>
  81. <rsltcnstremcnts/>
  82. </cnstinfo>
  83. </init>
  84. <hidden>
  85. <default>
  86. <sex>M</sex>
  87. </default>
  88. </hidden>
  89. <temp>
  90. <calendar>
  91. <year/>
  92. <month/>
  93. <weeklist>
  94. <list>
  95. <sun/>
  96. <mon/>
  97. <tue/>
  98. <wed/>
  99. <thu/>
  100. <fri/>
  101. <sat/>
  102. <sun_memo/>
  103. <mon_memo/>
  104. <tue_memo/>
  105. <wed_memo/>
  106. <thu_memo/>
  107. <fri_memo/>
  108. <sat_memo/>
  109. </list>
  110. </weeklist>
  111. </calendar>
  112. <templst/>
  113. </temp>
  114. </root>
  115. </instance>
  116. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  117. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  118. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  119. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  120. <script type="javascript" src="../../../ast/healexamweb/js/healexam.js"/>
  121. <script type="javascript" src="../../../ast/healexamweb/js/AHA001.js"/>
  122. <script type="javascript" ev:event="xforms-ready">
  123. <![CDATA[
  124. fInitCtrl();
  125. ]]>
  126. </script>
  127. <submission id="TRAHB01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/room/roomlst"/>
  128. <submission id="TRAHB01503" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/temp/templst"/>
  129. <submission id="TRAHB01504" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/cnst/drlst"/>
  130. <submission id="TRAHB01508" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/dayblist" resultref="/root/main/dayblist"/>
  131. </model>
  132. <script type="javascript">
  133. <![CDATA[
  134. var xDesPath = "";
  135. var xRsltPath = "";
  136. /** ==============================================================================================================================================================
  137. * 초기화 작업
  138. *SPAHA00100_PARAM1 : 건진구분
  139. *SPAHA00100_PARAM2 : 건진상세구분
  140. *SPAHA00100_PARAM3 : opener 선택노드 xPath
  141. *SPAHA00100_PARAM4 : opener 결과노드셋 xPath
  142. ==================================================================================================================================================================*/
  143. function fInitCtrl(){
  144. model.removeNodeset("/root/main/rsrvtmlst");
  145. model.removeNodeset("/root/main/rsrvpatlst");
  146. opener.model.makeValue("/root/hidden/okflag" , "");
  147. if( checkOpener() ){
  148. var sHealexamFlag = opener.javascript.getParameter("SPAHA00110_PARAM1");
  149. var sHealexamdetlFlag = opener.javascript.getParameter("SPAHA00110_PARAM2");
  150. var sRsltcnstremcnts = opener.javascript.getParameter("SPAHA00110_PARAM5");
  151. xDesPath = opener.javascript.getParameter("SPAHA00110_PARAM3");
  152. xRsltPath = opener.javascript.getParameter("SPAHA00110_PARAM4");
  153. model.setValue("/root/send/srchhealexamflag", sHealexamFlag); // 건진구분
  154. model.setValue("/root/send/srchhealexamdetlflag", sHealexamdetlFlag); // 건진상세구분
  155. model.setValue("/root/send/srchcond" , "C"); // 건진 의사조회 구분 (판정의: J 상담의: C)
  156. copyNodesetType("/root/init/cnstinfo" , xDesPath , "replace" , model, opener.model);
  157. if (sRsltcnstremcnts !='') {
  158. model.setValue("/root/init/cnstinfo/rsltcnstremcnts",sRsltcnstremcnts);
  159. }
  160. // 상담의 리스트 조회
  161. submit("TRAHB01504");
  162. var curDate = getCurrentDate().toDate();
  163. model.setValue("/root/temp/calendar/year", curDate.getDateFormat('YYYY'));
  164. model.setValue("/root/temp/calendar/month", curDate.getDateFormat('MM'));
  165. model.refresh();
  166. setCalendar(curDate);
  167. } else {
  168. initCalendar();
  169. }
  170. model.refresh();
  171. }
  172. /**==========================================================================================================================
  173. * 월별 일별 스케쥴내역 조회.
  174. * vMode : 1 : 일자별 시간대별 가능인원 조회( 시간대만 조회)
  175. 2 : 월별 일자별 가능 인원 조회(달력만 조회~)
  176. 0 : 1, 2 동시 조회
  177. *==========================================================================================================================*/
  178. function fGetRsrvSchList(vMode ){
  179. if(grd_calendar.row == 0) return false;
  180. if( !checkOpener() ) return ;
  181. model.removeNodeset("/root/temp/templst");
  182. model.removeNodeset("/root/main/rsrvddlst");
  183. model.removeNodeset("root/main/rsrvtmlst");
  184. model.removeNodeset(grd_rsrvtmlst.nodeset);
  185. var sRsrvMon = model.getValue("/root/temp/calendar/year") + model.getValue("/root/temp/calendar/month") ;
  186. model.setValue( "/root/send/srchrsrvmon" , sRsrvMon);
  187. if( vMode == 1 ) {
  188. model.setValue( "/root/send/srchrsrvmon" , "");
  189. model.setValue("/root/send/srchrsrvdd" , fGetCalendarDate(grd_calendar) );
  190. }
  191. else
  192. if( vMode == 2 ) {
  193. model.setValue("/root/send/srchrsrvdd" , "" );
  194. }
  195. model.removeNodeset("/root/temp/templst");
  196. model.removeNodeset("/root/main/rsrvddlst");
  197. submit("TRAHB01503");
  198. var sNode = null;
  199. if( (vMode == 0 ) || (vMode == 2) ) {
  200. sNode = instance1.selectSingleNode("/root/temp/templst/rsrvddlst");
  201. if( sNode != null ){
  202. var dd = null ;
  203. var iCol = null;
  204. var iRow = null;
  205. var firstDay = (sRsrvMon+ "01").toDate().getDay();
  206. sNode = instance1.selectNodes("/root/temp/templst/rsrvddlst");
  207. for( var i = 1 ; i <= sNode.length ; i++){
  208. dd = model.getValue("/root/temp/templst/rsrvddlst[" +i+ "]/rsrvdd" ) ;
  209. iCol = ( sRsrvMon + dd).toDate().getDay();
  210. iRow = Math.ceil( ( firstDay + Number(dd) ) / 7 );
  211. grd_calendar.valueMatrix(iRow , iCol + 7) = model.getValue("/root/temp/templst/rsrvddlst[" +i+ "]/psnnocnt" ) ;
  212. }
  213. }else {
  214. // 일자별 캐파 초기화
  215. var firstDay = Number( (sRsrvMon+ "01").toDate().getDay() );
  216. var lastDay = Number( fGetCalendarDate(grd_calendar).toDate().getMonthDay() );
  217. for( var i = firstDay ; i <= lastDay; i++) {
  218. iRow = Math.ceil( ( firstDay + i ) / 7 );
  219. iCol = ( sRsrvMon + i ).toDate().getDay();
  220. grd_calendar.valueMatrix(iRow , iCol + 7) = "" ;
  221. }
  222. }
  223. }
  224. if( (vMode == 0 ) || (vMode == 1) ) {
  225. model.removeNodeset("/root/main/rsrvddlst");
  226. sNode = instance1.selectSingleNode("/root/temp/templst/rsrvtmlst");
  227. if( sNode != null )
  228. {
  229. copyNodeListType("/root/main", "/root/temp/templst/rsrvtmlst", "after");
  230. grd_rsrvtmlst.rebuild();
  231. for(var i=0; i <= grd_rsrvtmlst.rows; i++) {
  232. var sRsrvCnt = grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  233. if( sRsrvCnt == "1") {
  234. grd_rsrvtmlst.isReadOnly( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = true;
  235. }else if(sRsrvCnt == "0") {
  236. grd_rsrvtmlst.isReadOnly( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = false;
  237. }
  238. }
  239. }
  240. }
  241. model.refresh();
  242. }
  243. /**==========================================================================================================================
  244. * 선택된 시간 얻기
  245. *==========================================================================================================================*/
  246. function fGetGrdTm(){
  247. var idx = grd_rsrvtmlst.row;
  248. if( idx < 1) {
  249. messageBox("시간을 선택하세요", "E999");
  250. return "";
  251. }
  252. if( (grd_rsrvtmlst.valueMatrix(idx, 2) == "0" ) ||(grd_rsrvtmlst.valueMatrix(idx, 2) == "" ) ) {
  253. messageBox( "예약정원을 초과하였습니다.", "E999");
  254. return "";
  255. }
  256. return grd_rsrvtmlst.valueMatrix(idx, 1);
  257. }
  258. /**==========================================================================================================================
  259. * 예약시간을 연속된 시간이 아닌 Interval이 있게 등록하였는지 체크
  260. *==========================================================================================================================*/
  261. function fChkInterVal() {
  262. var sOutExamYN = model.getValue("/root/init/cnstinfo/outexamyn");
  263. var sRsrvdd = fGetCalendarDate(grd_calendar) ;
  264. var sRsltCnstDr = model.getValue("/root/send/srchcnstdrid");
  265. var sel = false;
  266. var selCnt = 0;
  267. var topIdx = 0;
  268. var bottomIdx = 0;
  269. for( var i = 0; i < grd_rsrvtmlst.rows; i++) {
  270. // 읽기전용 상태는 이미 예약 된 결과상담신간
  271. // 읽기전용이 아닌 선택된 결과상담시간
  272. var sRsrvCnt = grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  273. if(!grd_rsrvtmlst.isReadOnly(i , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) && sRsrvCnt == "1") {
  274. // 선택된 행의 전과 뒤의 인텍스 셋팅
  275. topIdx = i - 1;
  276. bottomIdx = i + 1;
  277. // 선택된 행의 전과 뒤의 선택 값 초기화
  278. var top = "";
  279. var middle = grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  280. var bottom = "";
  281. // 맨처음 일 경우는 미선택
  282. // 전에 선택이 이미 선택된 경우에는 미선택으로 셋팅 그외에는 원래 선택 상태값을 가져온다.
  283. if(topIdx == 0) {
  284. top = "0"
  285. }else {
  286. if(grd_rsrvtmlst.isReadOnly(topIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"))) {
  287. top = "0"
  288. }else {
  289. top = grd_rsrvtmlst.valueMatrix( topIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  290. }
  291. }
  292. // 맨마지막 일 경우는 미선택
  293. //뒤에 선택이 이미 선택된 경우에는 미선택으로 셋팅 그외에는 원래 선택 상태값을 가져온다.
  294. if(bottomIdx == grd_rsrvtmlst.rows ) {
  295. bottom = "0";
  296. }else {
  297. if(grd_rsrvtmlst.isReadOnly(bottomIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"))) {
  298. bottom = "0"
  299. }else {
  300. bottom = grd_rsrvtmlst.valueMatrix( bottomIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  301. }
  302. }
  303. // 전에 선택 된 값이 미선택이고 현재이 선택이 되어 있으면 시작된 예약시간의 시작시간
  304. // 선택 행 값이 선택이고 다음 선택 값이 미선택이면 예약시간의 끝 시간
  305. if(top == "0" && middle == "1") {
  306. var dtRsrvdd = ( sRsrvdd + " " + grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvtm")) + "00" ).toDate("YYYYMMDD hhmmss");
  307. if( dtRsrvdd <= getCurrentDateTime().toDate("YYYYMMDD hhmmss") ) {
  308. messageBox("예약시간이 현재 시간 전입니다. ", "E999");
  309. return ;
  310. }
  311. }
  312. if(middle == "1" && bottom == "0") {
  313. selCnt++;
  314. if(selCnt > 1) {
  315. sel = false;
  316. }else if(selCnt <= 1 ){
  317. sel = true;
  318. }
  319. }
  320. }
  321. }
  322. return sel;
  323. }
  324. /**==========================================================================================================================
  325. * 부모창에 예약일자/시간 설정
  326. *==========================================================================================================================*/
  327. function fSetRsrvDT(){
  328. if ( checkOpener() ){
  329. var sOutExamYN = model.getValue("/root/init/cnstinfo/outexamyn");
  330. var sRsrvdd = fGetCalendarDate(grd_calendar) ;
  331. var sRsltCnstDr = model.getValue("/root/send/srchcnstdrid");
  332. var sel = false;
  333. var selCnt = 0;
  334. var topIdx = 0;
  335. var bottomIdx = 0;
  336. for( var i = 0; i < grd_rsrvtmlst.rows; i++) {
  337. // 읽기전용 상태는 이미 예약 된 결과상담신간
  338. // 읽기전용이 아닌 선택된 결과상담시간
  339. var sRsrvCnt = grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  340. if(!grd_rsrvtmlst.isReadOnly(i , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) && sRsrvCnt == "1") {
  341. // 선택된 행의 전과 뒤의 인텍스 셋팅
  342. topIdx = i - 1;
  343. bottomIdx = i + 1;
  344. // 선택된 행의 전과 뒤의 선택 값 초기화
  345. var top = "";
  346. var middle = grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  347. var bottom = "";
  348. // 맨처음 일 경우는 미선택
  349. // 전에 선택이 이미 선택된 경우에는 미선택으로 셋팅 그외에는 원래 선택 상태값을 가져온다.
  350. if(topIdx == 0) {
  351. top = "0"
  352. }else {
  353. if(grd_rsrvtmlst.isReadOnly(topIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"))) {
  354. top = "0"
  355. }else {
  356. top = grd_rsrvtmlst.valueMatrix( topIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  357. }
  358. }
  359. // 맨마지막 일 경우는 미선택
  360. //뒤에 선택이 이미 선택된 경우에는 미선택으로 셋팅 그외에는 원래 선택 상태값을 가져온다.
  361. if(bottomIdx == grd_rsrvtmlst.rows ) {
  362. bottom = "0";
  363. }else {
  364. if(grd_rsrvtmlst.isReadOnly(bottomIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"))) {
  365. bottom = "0"
  366. }else {
  367. bottom = grd_rsrvtmlst.valueMatrix( bottomIdx , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  368. }
  369. }
  370. // 전에 선택 된 값이 미선택이고 현재이 선택이 되어 있으면 시작된 예약시간의 시작시간
  371. // 선택 행 값이 선택이고 다음 선택 값이 미선택이면 예약시간의 끝 시간
  372. if(top == "0" && middle == "1") {
  373. var dtRsrvdd = ( sRsrvdd + " " + grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvtm")) + "00" ).toDate("YYYYMMDD hhmmss");
  374. if( dtRsrvdd <= getCurrentDateTime().toDate("YYYYMMDD hhmmss") ) {
  375. messageBox("예약시간이 현재 시간 전입니다. ", "E999");
  376. return ;
  377. }
  378. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvstarttm" , grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvtm")) );
  379. }
  380. if(middle == "1" && bottom == "0") {
  381. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvendtm" , grd_rsrvtmlst.valueMatrix( i , grd_rsrvtmlst.colRef("rsrvtm")) );
  382. sel = true;
  383. selCnt++;
  384. }
  385. // 선택된 구간을 구분하여 예약시간 리스트를 만든다.
  386. if(sel) {
  387. var sRsltCnstDr = model.getValue("/root/send/srchcnstdrid");
  388. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstdd" , sRsrvdd);
  389. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstdr" , sRsltCnstDr);
  390. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstremcnts" , model.getValue("/root/init/cnstinfo/rsltcnstremcnts"));
  391. model.setValue("/root/main/rsltcnstinfo/cnst/outexamyn" , sOutExamYN);
  392. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstflag" , model.getValue("/root/init/cnstinfo/rsltcnstflag"));
  393. model.setValue("/root/main/rsltcnstinfo/cnst/rsltrsrvid" , sRsrvdd
  394. + model.getValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvstarttm")
  395. + model.getValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvendtm") );
  396. model.setValue("/root/main/rsltcnstinfo/cnst/rsltrsrvnm" , sRsrvdd.toDate().getDateFormat('YYYY-MM-DD') + " "
  397. + model.getValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvstarttm") + " ~ "
  398. + model.getValue("/root/main/rsltcnstinfo/cnst/rsltcnstrsrvendtm") + " "
  399. + model.getValue("/root/send/srchcnstdrnm"));
  400. model.setValue("/root/main/rsltcnstinfo/cnst/rsltrsrvsaveyn" , "N");
  401. model.setValue("/root/main/rsltcnstinfo/cnst/rsltcnstendyn" , "N");
  402. model.setValue("/root/main/rsltcnstinfo/cnst/m" , "i");
  403. copyNodesetType(xRsltPath, "/root/main/rsltcnstinfo/cnst" , "after" , opener.model, model);
  404. opener.model.makeValue("/root/hidden/okflag" , "ok");
  405. sel = false;
  406. }
  407. }
  408. }
  409. window.close();
  410. }
  411. }
  412. /**==========================================================================================================================
  413. * 예약시간 선택 시 해당 일자 예약자 리스트 조회
  414. @author : 김다영
  415. @version : 2007-10-08
  416. *==========================================================================================================================*/
  417. function fGetRsrvPatList(){
  418. if(grd_calendar.row == 0) return false;
  419. //건진전체일정 , 검사실예약인원 리스트 조회
  420. model.removeNodeset("/root/main/schedule/rsrvacptlst");
  421. var sRsrvDate = fGetCalendarDate(grd_calendar);
  422. var sHealExamFlag = opener.javascript.getParameter("SPAHA00100_PARAM6");
  423. var sRsrvFlag = opener.javascript.getParameter("SPAHA00100_PARAM1");
  424. model.setValue("/root/send/srchhealexamflag" , opener.javascript.getParameter("SPAHA00100_PARAM6"));
  425. model.setValue("/root/send/srchfromdd" , fGetCalendarDate(grd_calendar) );
  426. model.setValue("/root/send/srchtodd" , fGetCalendarDate(grd_calendar) );
  427. model.setValue("/root/send/srchinstcd" , getUserInfo("dutplceinstcd") );
  428. model.removeNodeset(grd_rsrvpatlst.nodeset);
  429. // 예약,결과상담,검사실 일자 등록
  430. if(sRsrvFlag == "C") {
  431. model.setValue("/root/send/srchrsltcnstrsrvdd" , sRsrvDate);
  432. }else if(sRsrvFlag == "T") {
  433. model.setValue("/root/send/srchrsrvdd" , sRsrvDate);
  434. }else if(sRsrvFlag == "R") {
  435. }
  436. submit("TRAHA00901");
  437. }
  438. ]]>
  439. </script>
  440. </xhtml:head>
  441. <xhtml:body pagewidth="720" pageheight="530" guideline="1,701;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  442. <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:701px; height:490px; ">
  443. <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:121px; height:14px; ">결과상담시간선택</caption>
  444. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:697px; y2:25px; "/>
  445. <datagrid id="grd_rsrvtmlst" nodeset="/root/main/rsrvtmlst" caption="선택^예약시간^예약가능인원" colsep="^" colwidth="30, 109, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:530px; top:30px; width:167px; height:456px; ">
  446. <col checkvalue="1,0" ref="rsrvpsnnocnt" type="checkbox"/>
  447. <col ref="rsrvtm" format="hh:nn"/>
  448. <col ref="psnnocnt" visibility="hidden"/>
  449. <script type="javascript" ev:event="onmouseup">
  450. <![CDATA[
  451. if(isDataCell()) {
  452. for( var i = 0; i < grd_rsrvtmlst.selectedRows; i++) {
  453. var sRsrvCnt = grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt"));
  454. if(grd_rsrvtmlst.col == grd_rsrvtmlst.colRef("rsrvpsnnocnt")) {
  455. if( sRsrvCnt == "1" ) {
  456. if(!grd_rsrvtmlst.isReadOnly(grd_rsrvtmlst.selectedRow(i) ,grd_rsrvtmlst.colRef("rsrvpsnnocnt") )) {
  457. grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = "1"
  458. }
  459. }else if( sRsrvCnt == "0") {
  460. if(!grd_rsrvtmlst.isReadOnly(grd_rsrvtmlst.selectedRow(i) ,grd_rsrvtmlst.colRef("rsrvpsnnocnt") )) {
  461. grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = "0"
  462. }
  463. }
  464. }else {
  465. if( sRsrvCnt == "0" ) {
  466. if(!grd_rsrvtmlst.isReadOnly(grd_rsrvtmlst.selectedRow(i) ,grd_rsrvtmlst.colRef("rsrvpsnnocnt") )) {
  467. grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = "1"
  468. }
  469. }else if( sRsrvCnt == "1") {
  470. if(!grd_rsrvtmlst.isReadOnly(grd_rsrvtmlst.selectedRow(i) ,grd_rsrvtmlst.colRef("rsrvpsnnocnt") )) {
  471. grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = "0"
  472. }
  473. }
  474. }
  475. }
  476. if(!fChkInterVal()) {
  477. for( var i = 0; i < grd_rsrvtmlst.selectedRows; i++) {
  478. grd_rsrvtmlst.valueMatrix(grd_rsrvtmlst.selectedRow(i) , grd_rsrvtmlst.colRef("rsrvpsnnocnt")) = "0"
  479. }
  480. messageBox("예약시간은 분리","E001");
  481. return;
  482. }
  483. }
  484. ]]>
  485. </script>
  486. </datagrid>
  487. <group id="grp_calendar" style="left:0px; top:167px; width:528px; height:40px; ">
  488. <shape id="rectangle1" class="calendar_header" appearance="rectangle" style="left:0px; top:0px; width:527px; height:40px; "/>
  489. <button id="btn_preyear" class="icon_pre_year" style="left:165px; top:12px; width:16px; height:16px; ">
  490. <caption/>
  491. <script type="javascript" ev:event="DOMActivate">
  492. <![CDATA[
  493. fHRefreshCalender("Y", -1);
  494. fGetRsrvSchList(2);
  495. ]]>
  496. </script>
  497. </button>
  498. <button id="btn_nextyear" class="icon_next_year" style="left:340px; top:12px; width:16px; height:16px; ">
  499. <caption/>
  500. <script type="javascript" ev:event="DOMActivate">
  501. <![CDATA[
  502. fHRefreshCalender("Y", 1);
  503. fGetRsrvSchList(2);
  504. ]]>
  505. </script>
  506. </button>
  507. <button id="btn_premonth" class="icon_pre_month" style="left:184px; top:12px; width:16px; height:16px; ">
  508. <caption/>
  509. <script type="javascript" ev:event="DOMActivate">
  510. <![CDATA[
  511. fHRefreshCalender("M", -1);
  512. fGetRsrvSchList(2);
  513. ]]>
  514. </script>
  515. </button>
  516. <button id="btn_nextmonth" class="icon_next_month" style="left:321px; top:12px; width:16px; height:16px; ">
  517. <caption/>
  518. <script type="javascript" ev:event="DOMActivate">
  519. <![CDATA[
  520. fHRefreshCalender("M", 1);
  521. fGetRsrvSchList(2);
  522. ]]>
  523. </script>
  524. </button>
  525. <output id="opt_year" ref="/root/temp/calendar/year" class="calendar_output" style="left:210px; top:9px; width:30px; height:19px; "/>
  526. <output id="opt_month" ref="/root/temp/calendar/month" class="calendar_output" style="left:260px; top:9px; width:30px; height:19px; "/>
  527. <caption id="caption8" class="calendar_output" style="left:240px; top:9px; width:20px; height:19px; ">년</caption>
  528. <caption id="caption9" class="calendar_output" style="left:290px; top:9px; width:20px; height:19px; ">월</caption>
  529. </group>
  530. <multilinegrid id="grd_calendar" nodeset="/root/temp/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="75, 75, 75, 75, 75, 75, 75" extendlastcol="noscroll" focuscolor="transparent" rowsep="|" selectionmode="free" mergecellsfixedrows="bycolrec" style="left:0px; top:211px; width:527px; height:275px; ">
  531. <row>
  532. <col class="color_sun" ref="sun" style="border-bottom-width:0px; "/>
  533. <col ref="mon" style="border-bottom-width:0px; "/>
  534. <col ref="tue" style="border-bottom-width:0px; "/>
  535. <col ref="wed" style="border-bottom-width:0px; "/>
  536. <col ref="thu" style="border-bottom-width:0px; "/>
  537. <col ref="fri" style="border-bottom-width:0px; "/>
  538. <col class="color_sat" ref="sat" style="border-bottom-width:0px; "/>
  539. </row>
  540. <row>
  541. <col ref="sun_memo" style="border-top-width:0px; "/>
  542. <col ref="mon_memo" style="border-top-width:0px; "/>
  543. <col ref="tue_memo" style="border-top-width:0px; "/>
  544. <col ref="wed_memo" style="border-top-width:0px; "/>
  545. <col ref="thu_memo" style="border-top-width:0px; "/>
  546. <col ref="fri_memo" style="border-top-width:0px; "/>
  547. <col ref="sat_memo" style="border-top-width:0px; "/>
  548. </row>
  549. <script type="javascript" ev:event="onclick">
  550. <![CDATA[
  551. setCellColor(grd_calendar); //선택 셀의 컬러처리
  552. model.removeNodeset(grd_rsrvtmlst.nodeset);
  553. fGetRsrvSchList(1);
  554. //달력의 선택한 일자 일자비고일자에 셋팅.
  555. model.makeValue("/root/main/dayblist/remdd" , fGetCalendarDate(grd_calendar));
  556. ipt_remdd.refresh();
  557. btn_srch_dayb.dispatch("DOMActivate");
  558. model.refresh();
  559. ]]>
  560. </script>
  561. <script type="javascript" ev:event="onrowchanged">
  562. <![CDATA[
  563. setCellColor(grd_calendar);
  564. ]]>
  565. </script>
  566. <script type="javascript" ev:event="oncolchanged">
  567. <![CDATA[
  568. setCellColor(grd_calendar);
  569. ]]>
  570. </script>
  571. </multilinegrid>
  572. <datagrid id="grd_drlst" nodeset="/root/init/cnst/drlst/itemdr" caption="상담의ID^상담의명" colsep="^" colwidth="85, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:225px; height:132px; ">
  573. <col ref="drid"/>
  574. <col ref="drnm"/>
  575. <script type="javascript" ev:event="ondblclick">
  576. <![CDATA[
  577. if(isDataCell()) {
  578. model.setValue("/root/send/srchcnstdrid" , grd_drlst.valueMatrix(grd_drlst.row , grd_drlst.colRef("drid")) );
  579. model.setValue("/root/send/srchcnstdrnm" , grd_drlst.valueMatrix(grd_drlst.row , grd_drlst.colRef("drnm")) , true);
  580. fGetRsrvSchList(2);
  581. }
  582. ]]>
  583. </script>
  584. </datagrid>
  585. <textarea id="textarea1" ref="/root/init/cnstinfo/rsltcnstremcnts" style="left:229px; top:50px; width:298px; height:45px; "/>
  586. <caption id="caption2" class="tit_2" style="left:229px; top:30px; width:121px; height:13px; ">비고사항</caption>
  587. <line id="line3" class="line_1" style="x1:229px; y1:45px; x2:527px; y2:45px; "/>
  588. <caption id="caption3" class="tit_2" style="left:229px; top:97px; width:121px; height:14px; ">일자비고</caption>
  589. <textarea id="textarea2" ref="/root/main/dayblist/remcnts" style="left:229px; top:117px; width:298px; height:45px; "/>
  590. <line id="line2" class="line_1" style="x1:229px; y1:112px; x2:527px; y2:112px; "/>
  591. <input id="ipt_remdd" ref="/root/main/dayblist/remdd" visibility="hidden" inputtype="date" style="left:315px; top:90px; width:100px; height:19px; "/>
  592. <button id="btn_srch_dayb" class="btn2_letter2" visibility="hidden" style="left:415px; top:90px; width:42px; height:19px; ">
  593. <caption>조회</caption>
  594. <script type="javascript" ev:event="DOMActivate">
  595. <![CDATA[
  596. model.makeValue("/root/main/dayblist/instcd" , getUserInfo("dutplceinstcd"));
  597. submit("TRAHB01508",false);
  598. if(model.getValue("/root/main/dayblist/remdd") == ""){
  599. //해당 일자에 데이터가 없으므로 노드와 일자를 셋팅해줌
  600. model.makeNode("/root/main/dayblist/remcnts");
  601. model.makeValue("/root/main/dayblist/remdd" , fGetCalendarDate(grd_calendar));
  602. }
  603. textarea2.refresh();
  604. ipt_remdd.refresh();
  605. ]]>
  606. </script>
  607. </button>
  608. </group>
  609. <group id="grp_btn" scroll="auto" style="left:0px; top:490px; width:701px; height:27px; ">
  610. <button id="btn_cfm" class="btn4_letter2" style="left:585px; top:5px; width:56px; height:22px; ">
  611. <caption>확인</caption>
  612. <script type="javascript" ev:event="DOMActivate">
  613. <![CDATA[
  614. fSetRsrvDT();
  615. ]]>
  616. </script>
  617. </button>
  618. <button id="btn_cancel" class="btn4_letter2" style="left:644px; top:5px; width:56px; height:22px; ">
  619. <caption>취소</caption>
  620. <script type="javascript" ev:event="DOMActivate">
  621. <![CDATA[
  622. opener.model.makeValue("/root/hidden/okflag" , "");
  623. window.close();
  624. ]]>
  625. </script>
  626. </button>
  627. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:501px; y2:0px; "/>
  628. </group>
  629. </xhtml:body>
  630. </xhtml:html>