SMZTM00100_전환데이터로그관리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>전환데이터 로그관리</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <miglist>
  12. <list>
  13. <pat>
  14. <pid/>
  15. <hngnm/>
  16. <sexage/>
  17. <rrgstno/>
  18. <addr/>
  19. <copyfromdt/>
  20. <copyenddt/>
  21. <fstuser/>
  22. <remfact/>
  23. </pat>
  24. </list>
  25. </miglist>
  26. <list/>
  27. <patinfo>
  28. <patinfolist/>
  29. </patinfo>
  30. </main>
  31. <send>
  32. <gridpid/>
  33. <cond>
  34. <pid/>
  35. <fstrgstdt/>
  36. <todd/>
  37. </cond>
  38. <miglist/>
  39. <instcd>012</instcd>
  40. </send>
  41. <source>
  42. <autoflag/>
  43. </source>
  44. <isxlsload/>
  45. <result>
  46. <list>
  47. <name>
  48. <pid/>
  49. <hngnm/>
  50. <sexage/>
  51. </name>
  52. </list>
  53. </result>
  54. </root>
  55. </instance>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. fInitialize();
  59. ]]>
  60. </script>
  61. <submission id="TRZTM00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/cond" resultref="/root/main/miglist/list"/>
  62. <submission id="TXZTM00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/miglist" resultref="/root/main/list"/>
  63. <submission id="TRZTM00102" method="post" ref="/root/send" resultref="/root/result/list"/>
  64. <submission id="TXZTM00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send"/>
  65. </model>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  69. <script type="javascript">
  70. <![CDATA[
  71. /** ----------------------------------------------------------------------
  72. *
  73. * 날짜 계산(기준일자를 기준으로 입력일자만큼 이후 날짜를 찾아오기)
  74. *
  75. * ----------------------------------------------------------------------
  76. **/
  77. function getDateAddc(inputday,addend){
  78. var backDate ="";
  79. var rt = 0;
  80. var yyyy = inputday.substring(0,4) +"";
  81. var mm = inputday.substring(4,6) +"";
  82. var dd = inputday.substring(6,8) +"";
  83. var startDate = new Date(yyyy,(eval(mm)-1),dd);
  84. startDate.setTime(startDate.getTime()+(86400000*addend));
  85. NowYear = startDate.getYear();// 년
  86. NowMonth = startDate.getMonth()+1;// 월
  87. NowDay = startDate.getDate(); // 일
  88. backDate += NowYear ; //년도
  89. if (NowMonth < 10 ) backDate += "0" + NowMonth ;
  90. else backDate += (startDate.getMonth() + 1);
  91. if (NowDay < 10 ) backDate += "0" + NowDay ;
  92. else backDate += (startDate.getDate());
  93. return backDate ;
  94. }
  95. function fInitialize(){
  96. button2.disabled = false;
  97. var today = getCurrentDate();
  98. model.setValue("/root/send/cond/pid", "");
  99. model.setValue("/root/send/cond/fstrgstdt", today);
  100. model.setValue("/root/send/cond/todd", getDateAddc(today, -1));
  101. model.removeNodeset("/root/main/miglist/list/pat");
  102. model.refresh();
  103. }
  104. function checkGridUpdate(grid)
  105. {
  106. var iData = grid.getUpdateDataXml("insert");
  107. var uData = grid.getUpdateDataXml("update");
  108. var dData = grid.getUpdateDataXml("delete");
  109. if (iData=="" && uData=="" && dData=="") return false;
  110. else return true;
  111. }
  112. function fGetMigList(){
  113. model.removeNodeset("/root/main/miglist/list/pat");
  114. model.refresh();
  115. submit("TRZTM00101");
  116. //button2.disabled = true;
  117. }
  118. ]]>
  119. </script>
  120. </xhtml:head>
  121. <xhtml:body guideline="1,1195;2,782;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  122. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  123. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:196px; height:14px; ">전환 Backup자료 이관처리</caption>
  124. </group>
  125. <group id="group5" scroll="auto" style="left:0px; top:45px; width:1195px; height:730px; ">
  126. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  127. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  128. <line id="line18" class="line_4" style="x1:1016px; y1:7px; x2:1016px; y2:29px; border-left-style:solid; "/>
  129. <button id="button1" class="btn1_letter2" style="left:1035px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  130. <caption>조회</caption>
  131. <script type="javascript" ev:event="DOMActivate">
  132. <![CDATA[
  133. fGetMigList();
  134. ]]>
  135. </script>
  136. </button>
  137. <caption id="caption3" class="search_name" style="left:355px; top:8px; width:76px; height:17px; ">작업일자</caption>
  138. <input id="ipt_execdd" ref="/root/send/cond/fstrgstdt" class="input_default" inputtype="date" style="left:443px; top:8px; width:100px; height:19px; "/>
  139. <caption id="caption2" class="search_name" style="left:6px; top:8px; width:76px; height:17px; ">등록번호</caption>
  140. <input id="input2" ref="/root/send/cond/pid" class="input_search" style="left:95px; top:8px; width:100px; height:19px; ">
  141. <script type="javascript" ev:event="onkeypress">
  142. <![CDATA[
  143. if (event.keycode == 13)
  144. {
  145. input2.value = input2.currentText;
  146. fGetMigList();
  147. }
  148. ]]>
  149. </script>
  150. </input>
  151. <button id="btn_pid" class="icon_search" navindex="-1" style="left:200px; top:10px; width:16px; height:16px; ">
  152. <caption/>
  153. <script type="javascript" ev:event="DOMActivate">
  154. <![CDATA[
  155. //조회건수가 1건일 경우 팝업창을 바로 닫는다.
  156. model.setValue("/root/source/autoflag", "Y");
  157. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
  158. model.setValue("/root/send/cond/pid", model.getValue("/root/main/patinfo/patinfolist/pid"));
  159. model.refresh();
  160. //modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/source", "/root/send");
  161. ]]>
  162. </script>
  163. </button>
  164. <button id="button2" class="btn4_letter2" style="left:1125px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
  165. <caption>실행</caption>
  166. <script type="javascript" ev:event="DOMActivate">
  167. <![CDATA[
  168. if(!checkGridUpdate(grd_miglist))
  169. {
  170. alert("저장할 자료가 존재하지 않습니다.");
  171. return;
  172. }
  173. for(var i=1; i<grd_miglist.rows; i++) {
  174. var iStatus = grd_miglist.rowstatus(i);
  175. var pid = grd_miglist.textmatrix(i, 1);
  176. if(pid == "" && iStatus == 1){
  177. grd_miglist.removeStatus(i, "insert");
  178. }
  179. }
  180. model.setValue("/root/send/miglist",grd_miglist.getUpdateData());
  181. if ( submit("TXZTM00101") ) {
  182. grd_miglist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  183. model.setValue("/root/isxlsload",""); // 엑셀 로드 상태 제거 -> 이거 안 해주면 재앙이 닥친다. 무조건 insert로 지정한다.
  184. submit("TXZTM00102");
  185. fGetMigList();
  186. }
  187. ]]>
  188. </script>
  189. </button>
  190. </group>
  191. <line id="line20" class="line_1" style="x1:1px; y1:81px; x2:1194px; y2:81px; "/>
  192. <caption id="caption8" class="tit_2" style="left:5px; top:66px; width:223px; height:14px; ">전환 Backup자료 이관처리 리스트</caption>
  193. <group id="group2" style="left:560px; top:55px; width:633px; height:25px; ">
  194. <button id="button8" class="btn2_letter3" style="left:522px; top:6px; width:53px; height:19px; ">
  195. <caption>행추가</caption>
  196. <script type="javascript" ev:event="DOMActivate">
  197. <![CDATA[
  198. grd_miglist.addRow(); // 입력할 행 추가.
  199. var cur_row = grd_miglist.row; // 추가된 행 번호 가져오기
  200. var cnt_row = grd_miglist.rows; // 현재 행의 갯수 가져오기
  201. ]]>
  202. </script>
  203. </button>
  204. <button id="button9" class="btn2_letter3" style="left:578px; top:6px; width:53px; height:19px; ">
  205. <caption>행삭제</caption>
  206. <script type="javascript" ev:event="DOMActivate">
  207. <![CDATA[
  208. var cur_row = grd_miglist.row; // 행 번호 가져오기
  209. var iStatus = grd_miglist.rowstatus(cur_row);
  210. if(cur_row<0) {
  211. alert("삭제할 행을 선택해주세요.");
  212. return;
  213. }
  214. grd_miglist.deleteitem(cur_row);
  215. grd_miglist.addStatus(cur_row, "delete");
  216. ]]>
  217. </script>
  218. </button>
  219. <button id="button10" class="btn2_letter4" style="left:455px; top:6px; width:64px; height:19px; ">
  220. <caption>엑셀입력</caption>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. model.removeNodeset("/root/main/miglist/list/pat");
  224. var fileName = window.fileDialog("open", "", false);
  225. grd_miglist.loadExcel(fileName);
  226. if(fileName != ""){
  227. for (i=grd_miglist.fixedRows; i<grd_miglist.rows; i++)
  228. {
  229. grd_miglist.rowStatus(i) = 1;
  230. }
  231. }
  232. ]]>
  233. </script>
  234. </button>
  235. <button id="button4" class="btn2_letter6" style="left:235px; top:6px; width:86px; height:19px; ">
  236. <caption>환자진료정보</caption>
  237. <script type="javascript" ev:event="DOMActivate">
  238. <![CDATA[
  239. modal("SMMMO02500");
  240. ]]>
  241. </script>
  242. </button>
  243. <button id="button5" class="btn2_letter10" style="left:323px; top:6px; width:130px; height:19px; ">
  244. <caption>2006년 이전자료 copy</caption>
  245. <script type="javascript" ev:event="DOMActivate">
  246. <![CDATA[
  247. modal("SPZTM00200");
  248. ]]>
  249. </script>
  250. </button>
  251. </group>
  252. <datagrid id="grd_miglist" nodeset="/root/main/miglist/list/pat" caption="등록번호^환자명^Sex/Age^주민등록번호^주소^시작일시^종료일시^최초등록자^비고^seq" colsep="^" colwidth="90, 95, 70, 130, 330, 120, 120, 90, 100" dataheight="23" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:1px; top:85px; width:1194px; height:640px; ">
  253. <col ref="pid" type="input"/>
  254. <col ref="hngnm"/>
  255. <col ref="sexage"/>
  256. <col ref="rrgstno"/>
  257. <col ref="addr"/>
  258. <col ref="copyfromdt" format="yyyy-mm-dd 99:99:99"/>
  259. <col ref="copyenddt" format="yyyy-mm-dd 99:99:99"/>
  260. <col ref="fstuser"/>
  261. <col ref="remfact" format="yyyy-mm-dd"/>
  262. <script type="javascript" ev:event="onendedit">
  263. <![CDATA[
  264. var curRow = grd_miglist.row;
  265. var gridPid = model.getValue("/root/main/miglist/list/pat["+ curRow +"]/pid");
  266. model.setValue("/root/send/gridpid", gridPid);
  267. submit("TRZTM00102");
  268. model.refresh();
  269. if(model.getValue("/root/result/list/name/pid") == "0")
  270. {
  271. alert("환자 목록에 없습니다");
  272. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/pid", "");
  273. }else {
  274. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/pid", model.getValue("/root/result/list/name/pid"));
  275. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/hngnm", model.getValue("/root/result/list/name/hngnm"));
  276. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/sexage", model.getValue("/root/result/list/name/sexage"));
  277. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/rrgstno", model.getValue("/root/result/list/name/rrgstno"));
  278. model.setValue("/root/main/miglist/list/pat["+ curRow +"]/addr", model.getValue("/root/result/list/name/addr"));
  279. grd_miglist.addRow(); // 입력할 행 추가.
  280. }
  281. model.refresh();
  282. ]]>
  283. </script>
  284. </datagrid>
  285. </group>
  286. <group id="group3" style="left:0px; top:13px; width:1190px; height:27px; ">
  287. <button id="button7" class="btn4_letter3" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:1120px; top:2px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
  288. <caption>초기화</caption>
  289. <script type="javascript" ev:event="DOMActivate">
  290. <![CDATA[
  291. fInitialize();
  292. ]]>
  293. </script>
  294. </button>
  295. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1189px; y2:25px; "/>
  296. </group>
  297. </xhtml:body>
  298. </xhtml:html>