SPMNR08500_IO기준시간관리.xrw 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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>I/O 기준시간변경</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <timeinfo>
  11. <dfromtm/>
  12. <dtotm/>
  13. <efromtm/>
  14. <etotm/>
  15. <nfromtm/>
  16. <ntotm/>
  17. <lastupdtdt/>
  18. <lastupdtrid/>
  19. <valifromdd/>
  20. <valitodd/>
  21. <endyn/>
  22. <seqno/>
  23. <cncldt/>
  24. <srchflag/>
  25. <srchcd/>
  26. </timeinfo>
  27. </main>
  28. <send>
  29. </send>
  30. <temp>
  31. <mypatsettinginfo>
  32. <wardcdgrup>
  33. <wardcdgruplist>
  34. <wardcd/>
  35. <wardnm/>
  36. </wardcdgruplist>
  37. </wardcdgrup>
  38. </mypatsettinginfo>
  39. <srchflaginfo_pid>
  40. <itemlist>
  41. <label>공통</label>
  42. <value>C</value>
  43. </itemlist>
  44. <itemlist>
  45. <label>부서</label>
  46. <value>D</value>
  47. </itemlist>
  48. <itemlist>
  49. <label>환자</label>
  50. <value>P</value>
  51. </itemlist>
  52. </srchflaginfo_pid>
  53. <srchflaginfo_master>
  54. <itemlist>
  55. <label>공통</label>
  56. <value>C</value>
  57. </itemlist>
  58. <itemlist>
  59. <label>부서</label>
  60. <value>D</value>
  61. </itemlist>
  62. </srchflaginfo_master>
  63. </temp>
  64. <cond>
  65. <srchflag>C</srchflag>
  66. <pid/>
  67. <srchcd/>
  68. <roomcd/>
  69. <hngnm/>
  70. <age/>
  71. <workdd/>
  72. <paramflag/>
  73. <wardcd/>
  74. </cond>
  75. <hidden>
  76. <timeinfo/>
  77. </hidden>
  78. </root>
  79. </instance>
  80. <script type="javascript" ev:event="xforms-ready">
  81. <![CDATA[
  82. fInitialize();
  83. ]]>
  84. </script>
  85. <submission id="TRMNR01002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/mypatsettinginfo/wardcdgrup"/>
  86. <submission id="TRMNR08501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/hidden"/>
  87. <submission id="TXMNR08501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/hidden"/>
  88. <script type="javascript">
  89. <![CDATA[
  90. var menuParam = "";
  91. function fInitialize(){
  92. fGetCareComWardList();
  93. var param_workdd = opener.javascript.getParameter("SMMNR05800_Param");
  94. if ( !isNull(param_workdd) ){//IO조회
  95. model.setValue("/root/cond/roomcd", getPatientInfoDetail("roomcd"));
  96. model.setValue("/root/cond/wardcd", getPatientInfoDetail("wardcd"));
  97. model.setValue("/root/cond/pid", getPatientId());
  98. model.setValue("/root/cond/hngnm", getPatientName());
  99. model.setValue("/root/cond/age", getPatientInfo("age"));
  100. model.setValue("/root/cond/paramflag", "Y");//환자만 저장삭제가능
  101. model.setValue("/root/cond/srchflag", "P");
  102. model.setValue("/root/cond/srchcd", getPatientId());
  103. model.setValue("/root/cond/workdd", param_workdd );
  104. model.setValue("/root/main/timeinfo/valifromdd", param_workdd);
  105. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  106. rdo_srchflag.choices.itemset.attribute("nodeset") = "/root/temp/srchflaginfo_pid/itemlist" ;
  107. }else{
  108. menuParam = getScreenMenuParameter();
  109. if ( menuParam != "D" ){//superusers용
  110. //병동코드 조회
  111. fGetCareComWardList();
  112. model.setValue("/root/cond/paramflag", "N");//공통, 부서가 저장삭제가능
  113. model.setValue("/root/cond/srchflag", "C");
  114. model.setValue("/root/cond/srchcd", "COMM");
  115. model.setValue("/root/cond/wardcd", getUserInfo("dutplcecd"));
  116. model.setValue("/root/cond/workdd", getCurrentDate());
  117. model.setValue("/root/main/timeinfo/valifromdd", getCurrentDate());
  118. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  119. }else{//간호부서장용
  120. //병동코드 조회
  121. fGetCareComWardList();
  122. model.setValue("/root/cond/paramflag", "D");//간호부서장용으로 들어오면 공통이 저장삭제되면 안됨.
  123. model.setValue("/root/cond/srchflag", "D");
  124. model.setValue("/root/cond/srchcd", getUserInfo("dutplcecd"));
  125. model.setValue("/root/cond/wardcd", getUserInfo("dutplcecd"));
  126. model.setValue("/root/cond/workdd", getCurrentDate());
  127. model.setValue("/root/main/timeinfo/valifromdd", getCurrentDate());
  128. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  129. }
  130. }
  131. fSrchTimeInfo();
  132. }
  133. function fSrchTimeInfo(){
  134. model.makeNode("/root/send/reqdata");
  135. model.resetInstanceNode("/root/main/timeinfo");
  136. model.copyNode("/root/send/reqdata","/root/cond");
  137. if (submit("TRMNR08501") ){
  138. if ( getNodesetCnt(model, "/root/hidden/timeinfo") > 0 ){
  139. model.copyNode("/root/main/timeinfo","/root/hidden/timeinfo");
  140. model.setValue("/root/cond/srchflag", model.getValue("/root/main/timeinfo/srchflag"));
  141. model.setValue("/root/cond/srchcd", model.getValue("/root/main/timeinfo/srchcd"));
  142. }else{
  143. model.setValue("/root/main/timeinfo/valifromdd", model.getValue("/root/cond/workdd"));
  144. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  145. }
  146. }
  147. if ( model.getValue("/root/main/timeinfo/endyn") == "true" ){//종료
  148. ipt_valitodd.disabled = "true";
  149. }else{
  150. ipt_valitodd.disabled = "false";
  151. }
  152. fChngSrchFlag(model.getValue("/root/cond/srchflag"));
  153. model.refresh();
  154. }
  155. function fSetTimeInfo(pFlag){
  156. if ((model.getValue("/root/main/timeinfo/dfromtm")).length < 4){
  157. messageBox("Day 시작시간을 입력","I008");
  158. return;
  159. }
  160. if ((model.getValue("/root/main/timeinfo/dtotm")).length < 4){
  161. messageBox("Day 종료시간을 입력","I008");
  162. return;
  163. }
  164. if ((model.getValue("/root/main/timeinfo/etotm")).length < 4){
  165. messageBox("Evening 종료시간을 입력","I008");
  166. return;
  167. }
  168. if ((model.getValue("/root/main/timeinfo/valifromdd")).length < 4){
  169. messageBox("적용시작일을 입력","I008");
  170. return;
  171. }
  172. model.removenode("/root/send/reqdata");
  173. model.makeNode("/root/send/reqdata");
  174. model.copyNode("/root/send/reqdata","/root/main/timeinfo");
  175. model.makeValue("/root/send/reqdata/srchflag", model.getValue("/root/cond/srchflag"));
  176. model.makeValue("/root/send/reqdata/srchcd", model.getValue("/root/cond/srchcd"));
  177. model.makeValue("/root/send/reqdata/wardcd", model.getValue("/root/cond/wardcd"));
  178. model.makeValue("/root/send/reqdata/workdd", model.getValue("/root/cond/workdd"));
  179. if ( model.getValue("/root/main/timeinfo/endyn") == "true" ){//종료
  180. model.setValue("/root/send/reqdata/valitodd", model.getValue("/root/main/timeinfo/valitodd"));
  181. model.setValue("/root/send/reqdata/cncldt","");
  182. } else if ( pFlag == "D" ){//삭제인경우
  183. model.setValue("/root/send/reqdata/cncldt", getCurrentDate()+getCurrentTime());
  184. }else {
  185. model.setValue("/root/send/reqdata/cncldt","");
  186. if( model.getValue("/root/main/timeinfo/valifromdd") <= model.getValue("/root/main/timeinfo/valifromdd_back") ){
  187. model.makeValue("/root/send/reqdata/updtyn", "Y");
  188. }
  189. }
  190. if ( submit("TXMNR08501") ){
  191. model.resetInstanceNode("/root/main/timeinfo");
  192. if ( getNodesetCnt(model, "/root/hidden/timeinfo") > 0 ){
  193. model.copyNode("/root/main/timeinfo","/root/hidden/timeinfo");
  194. model.setValue("/root/cond/srchflag", model.getValue("/root/main/timeinfo/srchflag"));
  195. model.setValue("/root/cond/srchcd", model.getValue("/root/main/timeinfo/srchcd"));
  196. }
  197. }
  198. if ( model.getValue("/root/main/timeinfo/endyn") == "true" ){//종료
  199. ipt_valitodd.disabled = "true";
  200. }else{
  201. ipt_valitodd.disabled = "false";
  202. }
  203. fChngSrchFlag(model.getValue("/root/cond/srchflag"));
  204. model.refresh();
  205. }
  206. function fChngSrchFlag(pFlag){
  207. if ( pFlag == "C"){
  208. cmb_ward.disabled = "true";
  209. ipt_condpid.visible = false;
  210. grp_pid.visible = false;
  211. if ( model.getValue("/root/cond/paramflag") == "Y" || model.getValue("/root/cond/paramflag") == "D"){
  212. //D간호부서장용으로 들어오면 공통이 저장삭제되면 안됨.
  213. //Y IO조회화면에서 들어오면 환자만 수정가능
  214. btn_save.disabled = true;
  215. btn_del.disabled = true;
  216. } else {
  217. btn_save.disabled = false;
  218. btn_del.disabled = false;
  219. }
  220. }else if ( pFlag == "D"){
  221. cmb_ward.disabled = "false";
  222. ipt_condpid.visible = false;
  223. grp_pid.visible = false;
  224. if ( model.getValue("/root/cond/paramflag") == "Y"){
  225. btn_save.disabled = true;
  226. btn_del.disabled = true;
  227. } else {
  228. btn_save.disabled = false;
  229. btn_del.disabled = false;
  230. }
  231. }else if ( pFlag == "P"){
  232. btn_save.disabled = false;
  233. btn_del.disabled = false;
  234. cmb_ward.disabled = "true";
  235. ipt_condpid.visible =true;
  236. grp_pid.visible = true;
  237. }
  238. var flagNm = model.getValue("/root/temp/srchflaginfo_pid/itemlist[value = '"+ pFlag +"']/label");
  239. var flagNmSub = (pFlag == "P" ? "별" : "");
  240. var workdd = model.getValue("/root/cond/workdd").toDate("YYYYMMDD").getDateFormat("YYYY/MM/DD");
  241. if ( !isNull(model.getValue("/root/main/timeinfo/seqno")) ){
  242. opt_message.value = workdd + "일 현재 " + flagNm+flagNmSub +"\n I/O 기준시간으로 적용받고 있습니다.";
  243. }
  244. }
  245. ]]>
  246. </script>
  247. <bind id="bind_input1" ref="/root/main/timeinfo/valitodd" readonly="&quot;99991231&quot;"/>
  248. </model>
  249. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  250. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  251. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  252. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  253. <script type="javascript" src="../../../emr/carerecweb/js/CareRec.js"/>
  254. </xhtml:head>
  255. <xhtml:body pagewidth="321" pageheight="310" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  256. <group id="grp_deptcd" style="left:0px; top:25px; width:305px; height:25px; ">
  257. <shape id="roundrect1" appearance="roundrect" ellipsewidth="20" ellipseheight="20" style="left:0px; top:0px; width:305px; height:25px; "/>
  258. <caption id="caption13" class="search_name" style="left:2px; top:3px; width:60px; height:17px; ">구분 :</caption>
  259. <select1 id="rdo_srchflag" ref="/root/cond/srchflag" appearance="full" cols="3" overflow="visible" style="left:60px; top:5px; width:135px; height:15px; border-style:none; ">
  260. <choices>
  261. <itemset nodeset="/root/temp/srchflaginfo_master/itemlist">
  262. <label ref="label"/>
  263. <value ref="value"/>
  264. </itemset>
  265. </choices>
  266. <script type="javascript" ev:event="xforms-value-changed">
  267. <![CDATA[
  268. if ( model.getValue("/root/cond/srchflag") == "C"){
  269. model.setValue("/root/cond/srchcd", "COMM");
  270. }else if ( model.getValue("/root/cond/srchflag") == "D"){
  271. model.setValue("/root/cond/srchcd", model.getValue("/root/cond/wardcd"));
  272. }else if ( model.getValue("/root/cond/srchflag") == "P"){
  273. model.setValue("/root/cond/srchcd", model.getValue("/root/cond/pid"));
  274. }
  275. model.resetInstanceNode("/root/main/timeinfo");
  276. model.setValue("/root/main/timeinfo/valifromdd", model.getValue("/root/cond/workdd"));
  277. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  278. fChngSrchFlag(model.getValue("/root/cond/srchflag"));
  279. model.refresh();
  280. // fSrchTimeInfo();
  281. ]]>
  282. </script>
  283. </select1>
  284. <select1 id="cmb_ward" ref="/root/cond/srchcd" class="combo_search" appearance="minimal" style="left:195px; top:3px; width:106px; height:19px; ">
  285. <choices>
  286. <itemset nodeset="/root/temp/mypatsettinginfo/wardcdgrup/wardcdgruplist">
  287. <label ref="wardnm"/>
  288. <value ref="wardcd"/>
  289. </itemset>
  290. </choices>
  291. </select1>
  292. <input id="ipt_condpid" ref="/root/cond/srchcd" visibility="hidden" style="left:195px; top:3px; width:105px; height:19px; "/>
  293. </group>
  294. <group id="grp_pid" style="left:0px; top:51px; width:305px; height:21px; ">
  295. <output id="opt_pid" ref="/root/cond/pid" style="left:85px; top:1px; width:89px; height:19px; font-weight:bold; text-align:center; border-color:#99ccff; border-left-style:solid; border-right-style:solid; "/>
  296. <caption id="cap_roomcd" ref="/root/cond/roomcd" class="cell_1" style="left:0px; top:0px; width:84px; height:20px; font-weight:bold; text-align:center; border-color:#99ccff; border-left-style:solid; "/>
  297. <caption id="cap_hngnm" ref="/root/cond/hngnm" class="cell_1" style="left:175px; top:0px; width:65px; height:20px; font-weight:bold; text-align:center; "/>
  298. <line id="line2" class="line_3" style="x1:0px; y1:0px; x2:300px; y2:0px; "/>
  299. <line id="line3" class="line_3" style="x1:0px; y1:20px; x2:300px; y2:20px; "/>
  300. <output id="opt_age" ref="/root/cond/age" style="left:241px; top:1px; width:60px; height:19px; font-weight:bold; text-align:center; border-color:#99ccff; border-left-style:solid; border-right-style:solid; "/>
  301. </group>
  302. <caption id="caption4" class="tit_2" style="left:5px; top:9px; width:121px; height:14px; ">I/O 기준시간변경</caption>
  303. <line id="line1" class="line_1" style="x1:24px; y1:95px; x2:274px; y2:95px; "/>
  304. <caption id="caption3" style="left:34px; top:79px; width:135px; height:15px; ">적용기준시간</caption>
  305. <caption id="caption5" class="cell_1" style="left:24px; top:100px; width:81px; height:20px; ">Day</caption>
  306. <line id="line4" class="line_3" style="x1:24px; y1:121px; x2:274px; y2:121px; "/>
  307. <caption id="caption6" class="cell_1" style="left:24px; top:123px; width:81px; height:20px; ">Evening</caption>
  308. <line id="line5" class="line_3" style="x1:24px; y1:144px; x2:274px; y2:144px; "/>
  309. <caption id="caption7" class="cell_1" style="left:24px; top:146px; width:81px; height:20px; ">Night</caption>
  310. <line id="line6" class="line_3" style="x1:24px; y1:190px; x2:274px; y2:190px; "/>
  311. <caption id="caption8" style="left:184px; top:104px; width:17px; height:15px; text-align:center; ">~</caption>
  312. <caption id="caption9" style="left:184px; top:127px; width:17px; height:15px; text-align:center; ">~</caption>
  313. <input id="opt_dfromtm" ref="/root/main/timeinfo/dfromtm" autonext="true" format="hh:nn" appearance="input" style="left:107px; top:101px; width:74px; height:19px; ">
  314. <!--script type="javascript" ev:event="DOMFocusOut">
  315. <![CDATA[
  316. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm");
  317. if ( (model.getValue("/root/main/timeinfo/dfromtm")).length >= 4 ){
  318. model.setValue("/root/main/timeinfo/dtotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(7,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10) +"59");
  319. model.setValue("/root/main/timeinfo/efromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(8,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  320. model.setValue("/root/main/timeinfo/etotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(15,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  321. model.setValue("/root/main/timeinfo/nfromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(16,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  322. model.setValue("/root/main/timeinfo/ntotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  323. model.refresh();
  324. }
  325. ]]>
  326. </script-->
  327. <script type="javascript" ev:event="xforms-value-changed">
  328. <![CDATA[
  329. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm");
  330. if ( (model.getValue("/root/main/timeinfo/dfromtm")).length >= 4 ){
  331. /* 2010-02-28 JA
  332. model.setValue("/root/main/timeinfo/dtotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(7,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10) +"59");
  333. model.setValue("/root/main/timeinfo/efromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(8,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  334. model.setValue("/root/main/timeinfo/etotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(15,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  335. model.setValue("/root/main/timeinfo/nfromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(16,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  336. model.setValue("/root/main/timeinfo/ntotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  337. */
  338. // 분단위 조정안되는 오류수정_2010-02-28 JA
  339. var efromtm = (sDate.toDate("YYYYMMDDhhmmss").getAddDate(8,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12);
  340. var nfromtm = (sDate.toDate("YYYYMMDDhhmmss").getAddDate(16,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,12);
  341. model.makeValue("/root/main/timeinfo/dtotm", ((getCurrentDate()+efromtm).toDate("YYYYMMDDhhmmss").getAddDate(-1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12));
  342. model.makeValue("/root/main/timeinfo/efromtm", efromtm);
  343. model.makeValue("/root/main/timeinfo/etotm", ((getCurrentDate()+nfromtm).toDate("YYYYMMDDhhmmss").getAddDate(-1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12));
  344. model.makeValue("/root/main/timeinfo/nfromtm", nfromtm);
  345. model.makeValue("/root/main/timeinfo/ntotm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(-1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12));
  346. model.refresh();
  347. }
  348. ]]>
  349. </script>
  350. </input>
  351. <input id="output2" ref="/root/main/timeinfo/dtotm" autonext="true" format="hh:nn" appearance="input" style="left:202px; top:101px; width:72px; height:19px; ">
  352. <!--script type="javascript" ev:event="DOMFocusOut">
  353. <![CDATA[
  354. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/dtotm");
  355. if ( (model.getValue("/root/main/timeinfo/dtotm")).length >= 4 ){
  356. model.setValue("/root/main/timeinfo/efromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  357. model.setValue("/root/main/timeinfo/etotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/efromtm")).toDate("YYYYMMDDhhmmss").getAddDate(7,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  358. model.setValue("/root/main/timeinfo/nfromtm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/etotm")).toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  359. model.setValue("/root/main/timeinfo/ntotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm")).toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  360. model.refresh();
  361. }
  362. ]]>
  363. </script-->
  364. <script type="javascript" ev:event="xforms-value-changed">
  365. <![CDATA[
  366. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/dtotm");
  367. if ( (model.getValue("/root/main/timeinfo/dtotm")).length >= 4 ){
  368. model.setValue("/root/main/timeinfo/efromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  369. model.setValue("/root/main/timeinfo/etotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/efromtm")).toDate("YYYYMMDDhhmmss").getAddDate(7,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  370. model.setValue("/root/main/timeinfo/nfromtm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/etotm")).toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  371. model.setValue("/root/main/timeinfo/ntotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm")).toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  372. model.refresh();
  373. }
  374. ]]>
  375. </script>
  376. </input>
  377. <input id="output3" ref="/root/main/timeinfo/efromtm" disabled="true" autonext="true" format="hh:nn" appearance="input" style="left:107px; top:124px; width:74px; height:19px; "/>
  378. <input id="output4" ref="/root/main/timeinfo/etotm" autonext="true" format="hh:nn" appearance="input" style="left:202px; top:124px; width:72px; height:19px; ">
  379. <!--script type="javascript" ev:event="DOMFocusOut">
  380. <![CDATA[
  381. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/etotm");
  382. if ( (model.getValue("/root/main/timeinfo/dtotm")).length >= 4 ){
  383. model.setValue("/root/main/timeinfo/nfromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  384. model.setValue("/root/main/timeinfo/ntotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm")).toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  385. model.refresh();
  386. }
  387. ]]>
  388. </script-->
  389. <script type="javascript" ev:event="xforms-value-changed">
  390. <![CDATA[
  391. var sDate =getCurrentDate()+model.getValue("/root/main/timeinfo/etotm");
  392. if ( (model.getValue("/root/main/timeinfo/dtotm")).length >= 4 ){
  393. model.setValue("/root/main/timeinfo/nfromtm", (sDate.toDate("YYYYMMDDhhmmss").getAddDate(1,"m").getDateFormat("YYYYMMDDhhmmss")).substring(8,12) );
  394. model.setValue("/root/main/timeinfo/ntotm", ( (getCurrentDate()+model.getValue("/root/main/timeinfo/dfromtm")).toDate("YYYYMMDDhhmmss").getAddDate(23,"h").getDateFormat("YYYYMMDDhhmmss")).substring(8,10)+"59" );
  395. model.refresh();
  396. }
  397. ]]>
  398. </script>
  399. </input>
  400. <input id="output6" ref="/root/main/timeinfo/nfromtm" disabled="true" autonext="true" format="hh:nn" appearance="input" style="left:107px; top:147px; width:74px; height:19px; "/>
  401. <input id="output5" ref="/root/main/timeinfo/ntotm" disabled="true" format="hh:nn" appearance="input" style="left:202px; top:147px; width:72px; height:19px; "/>
  402. <caption id="caption10" style="left:184px; top:150px; width:17px; height:15px; text-align:center; ">~</caption>
  403. <line id="line7" class="line_1" style="x1:24px; y1:217px; x2:274px; y2:217px; "/>
  404. <caption id="caption11" class="cell_1" style="left:24px; top:222px; width:81px; height:20px; ">최종수정일시</caption>
  405. <output id="output7" ref="/root/main/timeinfo/lastupdtdt" class="output_fix" format="yyyy-mm-dd hh:nn" style="left:107px; top:222px; width:166px; height:19px; "/>
  406. <line id="line8" class="line_3" style="x1:24px; y1:243px; x2:274px; y2:243px; "/>
  407. <output id="output8" ref="/root/main/timeinfo/lastupdtrid" class="output_fix" style="left:107px; top:245px; width:166px; height:19px; text-align:center; "/>
  408. <caption id="caption12" class="cell_1" style="left:24px; top:245px; width:81px; height:20px; text-align:center; ">최종수정자</caption>
  409. <line id="line9" class="line_1" style="x1:24px; y1:266px; x2:274px; y2:266px; "/>
  410. <button id="button1" class="btn4_letter2" style="left:249px; top:3px; width:56px; height:22px; ">
  411. <caption>닫기</caption>
  412. <close ev:event="DOMActivate"/>
  413. </button>
  414. <button id="btn_save" class="btn5_letter2" style="left:189px; top:74px; width:42px; height:19px; ">
  415. <caption>저장</caption>
  416. <script type="javascript" ev:event="DOMActivate">
  417. <![CDATA[
  418. fSetTimeInfo();
  419. ]]>
  420. </script>
  421. </button>
  422. <button id="btn_del" class="btn2_letter2" style="left:232px; top:74px; width:42px; height:19px; ">
  423. <caption>삭제</caption>
  424. <script type="javascript" ev:event="DOMActivate">
  425. <![CDATA[
  426. fSetTimeInfo("D");
  427. ]]>
  428. </script>
  429. </button>
  430. <button id="button4" class="btn2_letter2" style="left:146px; top:74px; width:42px; height:19px; ">
  431. <caption>조회</caption>
  432. <script type="javascript" ev:event="DOMActivate">
  433. <![CDATA[
  434. fSrchTimeInfo();
  435. ]]>
  436. </script>
  437. </button>
  438. <input id="output9" ref="/root/main/timeinfo/valifromdd" inputtype="date" format="yyyy-mm-dd" appearance="input" style="left:107px; top:170px; width:115px; height:19px; ">
  439. <script type="javascript" ev:event="xforms-value-changed">
  440. <![CDATA[
  441. // if ( model.getValue("/root/main/timeinfo/valifromdd") < getCurrentDate() ){
  442. // messageBox("적용시작일은 현재일자 이후만 입력","I006");//가능합니다
  443. // }
  444. ]]>
  445. </script>
  446. </input>
  447. <caption id="caption15" class="cell_1" style="left:24px; top:169px; width:81px; height:20px; ">적용시작일</caption>
  448. <line id="line10" class="line_3" style="x1:24px; y1:167px; x2:274px; y2:167px; "/>
  449. <caption id="caption2" class="cell_1" style="left:24px; top:192px; width:81px; height:20px; ">적용종료일</caption>
  450. <bool id="bool1" ref="/root/main/timeinfo/endyn" style="left:102px; top:194px; width:25px; height:15px; ">
  451. <script type="javascript" ev:event="xforms-value-changed">
  452. <![CDATA[
  453. if ( model.getValue("/root/main/timeinfo/endyn") == "true" ){//종료
  454. model.setValue("/root/main/timeinfo/valitodd", ( model.getValue("/root/main/timeinfo/valifromdd") > getCurrentDate()
  455. ? model.getValue("/root/main/timeinfo/valifromdd")
  456. : getCurrentDate()) );
  457. }else{
  458. model.setValue("/root/main/timeinfo/valitodd", "99991231");
  459. ipt_valitodd.disabled = "false";
  460. }
  461. model.refresh();
  462. ]]>
  463. </script>
  464. </bool>
  465. <line id="line11" class="line_3" style="x1:24px; y1:213px; x2:274px; y2:213px; "/>
  466. <input id="ipt_valitodd" ref="/root/main/timeinfo/valitodd" inputtype="date" format="yyyy-mm-dd" appearance="input" style="left:124px; top:193px; width:97px; height:19px; ">
  467. <script type="javascript" ev:event="xforms-value-changed">
  468. <![CDATA[
  469. // model.setValue("/root/main/timeinfo/valitodd", ( model.getValue("/root/main/timeinfo/valifromdd") > getCurrentDate()
  470. // ? model.getValue("/root/main/timeinfo/valifromdd")
  471. // : getCurrentDate()) );
  472. if ( model.getValue("/root/main/timeinfo/valifromdd") > model.getValue("/root/main/timeinfo/valitodd") ){
  473. messageBox("적용종료일은 적용시작일 이후만 입력","I006");//가능합니다
  474. model.setValue("/root/main/timeinfo/valitodd", model.getValue("/root/main/timeinfo/valifromdd") );
  475. }
  476. ipt_valitodd.refresh();
  477. ]]>
  478. </script>
  479. </input>
  480. <caption id="opt_message" class="hand" appearance="caption" style="left:18px; top:275px; width:281px; height:35px; "/>
  481. </xhtml:body>
  482. </xhtml:html>