SMMMO14100_AJCC관리.xrw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  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>AJCC 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <docutitlnm/>
  12. <useyn/>
  13. </cond>
  14. <info>
  15. <AJCCspecinfo>
  16. <docutitlnm/>
  17. <attfilenm/>
  18. <useyn/>
  19. <genrdd/>
  20. <genrno/>
  21. <status/>
  22. </AJCCspecinfo>
  23. </info>
  24. <AJCCspeclist>
  25. <AJCCspeclist>
  26. <docutitlnm/>
  27. <attfilenm/>
  28. <useyn/>
  29. <genrdd/>
  30. <genrno/>
  31. </AJCCspeclist>
  32. </AJCCspeclist>
  33. <keyinfo>
  34. <keylist/>
  35. </keyinfo>
  36. </main>
  37. <send>
  38. <reqdata/>
  39. <savedata/>
  40. <file>
  41. <filename/>
  42. <genrdd/>
  43. <genrno/>
  44. <status/>
  45. <useyn/>
  46. </file>
  47. </send>
  48. <hidden/>
  49. <init>
  50. </init>
  51. </root>
  52. </instance>
  53. <submission id="TRMMO14101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/AJCCspeclist"/>
  54. <submission id="TXMMO14101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/AJCCspeclist"/>
  55. <submission id="TXMMO14102" mediatype="multipart/form-data" method="form-data-post" ref="/root/send/file" resultref="/root/main/AJCCspeclist"/>
  56. <submission id="TXMMO14103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/AJCCspeclist"/>
  57. <script type="javascript" ev:event="xforms-ready">
  58. <![CDATA[
  59. //그리드 초기화
  60. model.removeNodeset("/root/main/AJCCspeclist/AJCCspeclist");
  61. model.removeNodeset("/root/main/keyinfo/keylist");
  62. model.refresh();
  63. //조건초기화
  64. ipt_docutitl.value = '';
  65. cmb_use.select(0);
  66. //내역 초기화
  67. ipt_docutitlnm.value = '';
  68. ipt_attfilenm.value = '';
  69. cmb_useYN.select(0);
  70. //질환병기AJCC테이블에 있는 데이타 조회
  71. model.copyNode("/root/send/reqdata","/root/main/cond");
  72. submit("TRMMO14101");
  73. //파일삭제버튼을 누르지 않았다는 상태값
  74. model.setValue("/root/send/file/status", 'N');
  75. //현재 상태값을 초기화
  76. model.setValue("/root/main/info/AJCCspecinfo/status",'u');
  77. model.refresh();
  78. ]]>
  79. </script>
  80. </model>
  81. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  82. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  83. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  84. <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  86. </xhtml:head>
  87. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  88. <caption id="caption1" class="tit_1" style="left:10px; top:10px; width:140px; height:13px; ">AJCC 관리</caption>
  89. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:21px; width:1193px; height:39px; background-color:#fffbf2; border-color:#ffd799; "/>
  90. <caption id="caption2" class="search_name" style="left:30px; top:32px; width:105px; height:17px; ">문서제목 :</caption>
  91. <input id="ipt_docutitl" ref="/root/main/cond/docutitlnm" class="input_search" navindex="1" maxlength="300" style="left:125px; top:31px; width:375px; height:19px; ">
  92. <hint>
  93. <![CDATA[문서제목을 입력하세요.]]>
  94. </hint>
  95. <script type="javascript" ev:event="onkeyup">
  96. <![CDATA[
  97. //조건을 적고 enter를 치면 바로 조회 버튼을 누르지 않고 조회
  98. inputEnterKey("btn_req","DOMActivate");
  99. ]]>
  100. </script>
  101. </input>
  102. <caption id="caption3" class="search_name" style="left:530px; top:32px; width:105px; height:17px; ">사용구분 :</caption>
  103. <select1 id="cmb_use" ref="/root/main/cond/useyn" navindex="2" appearance="minimal" style="left:625px; top:31px; width:100px; height:19px; ">
  104. <choices>
  105. <item>
  106. <label>사용</label>
  107. <value>Y</value>
  108. </item>
  109. <item>
  110. <label>미사용</label>
  111. <value>N</value>
  112. </item>
  113. </choices>
  114. <script type="javascript" ev:event="xforms-select">
  115. <![CDATA[
  116. ]]>
  117. </script>
  118. <script type="javascript" ev:event="xforms-value-changed">
  119. <![CDATA[
  120. //값이 변경되면 바로 조회
  121. btn_req.dispatch("DOMActivate");
  122. ]]>
  123. </script>
  124. </select1>
  125. <line id="line3" style="x1:1100px; y1:25px; x2:1100px; y2:55px; border-color:#ffe4bb; border-left-style:solid; "/>
  126. <button id="btn_req" class="btn1_letter2" navindex="3" style="left:1112px; top:30px; width:56px; height:22px; ">
  127. <caption>조회</caption>
  128. <script type="javascript" ev:event="DOMActivate">
  129. <![CDATA[
  130. //질환병기AJCC테이블에 있는 데이타 조회
  131. model.copyNode("/root/send/reqdata","/root/main/cond");
  132. submit("TRMMO14101");
  133. //정보화면 초기화
  134. //내역 초기화
  135. ipt_docutitlnm.value = '';
  136. ipt_attfilenm.value = '';
  137. cmb_useYN.select(0);
  138. ipt_attfilenm.disabled = 'true';
  139. ipt_docutitlnm.disabled = 'true';
  140. cmb_useYN.disabled = 'true';
  141. ]]>
  142. </script>
  143. </button>
  144. <caption id="caption4" class="tit_2" style="left:0px; top:65px; width:126px; height:14px; vertical-align:middle; ">AJCC 내역</caption>
  145. <line id="line1" class="line_1" style="x1:0px; y1:80px; x2:1193px; y2:80px; "/>
  146. <caption id="caption5" class="cell_1" style="left:0px; top:85px; width:101px; height:23px; vertical-align:middle; ">문서제목</caption>
  147. <caption id="caption6" class="cell_1" style="left:0px; top:109px; width:101px; height:23px; vertical-align:middle; ">파일명</caption>
  148. <input id="ipt_docutitlnm" ref="/root/main/info/AJCCspecinfo/docutitlnm" class="input_search" disabled="true" navindex="5" maxlength="300" style="left:102px; top:87px; width:383px; height:19px; ">
  149. <hint>
  150. <![CDATA[문서제목을 입력하세요.]]>
  151. </hint>
  152. </input>
  153. <input id="ipt_attfilenm" ref="/root/main/info/AJCCspecinfo/attfilenm" class="input_search" disabled="true" navindex="7" maxlength="300" style="left:102px; top:111px; width:383px; height:19px; "/>
  154. <caption id="caption10" class="cell_1" style="left:487px; top:85px; width:101px; height:23px; vertical-align:middle; ">사용구분</caption>
  155. <select1 id="cmb_useYN" ref="/root/main/info/AJCCspecinfo/useyn" disabled="true" navindex="6" appearance="minimal" style="left:590px; top:87px; width:110px; height:19px; ">
  156. <choices>
  157. <item>
  158. <label>사용</label>
  159. <value>Y</value>
  160. </item>
  161. <item>
  162. <label>미사용</label>
  163. <value>N</value>
  164. </item>
  165. </choices>
  166. </select1>
  167. <line id="line6" class="line_3" style="x1:0px; y1:132px; x2:1194px; y2:132px; "/>
  168. <button id="btn_save" class="btn4_letter2" navindex="11" style="left:1082px; top:134px; width:56px; height:22px; ">
  169. <caption>저장</caption>
  170. <script type="javascript" ev:event="DOMActivate">
  171. <![CDATA[
  172. //파일을 삭제 여부를 확인
  173. var status = model.getValue("/root/send/file/status");
  174. if(status == 'Y'){
  175. //파일을 삭제할 것인 지 확인 하여 하는 경우 만 삭제
  176. //선택된 로우
  177. var row = grd_AJCClist.row;
  178. //선택된 로우의 파일명
  179. var name = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/attfilenm");
  180. //파일을 삭제할 것인지 확인 메세지를 띄워줌
  181. var delfile = messageBox(name + " 파일 삭제를" , "Q001");
  182. if(delfile == '6'){
  183. //등록된 파일을 삭제하기 위해 상태값을 삭제로 만든다.
  184. model.setValue("/root/main/info/AJCCspecinfo/status",'d');
  185. //파일 삭제
  186. //조건을 data를 가지고 등록된 파일을 삭제하러 간다.
  187. model.copyNode("/root/send/savedata", "/root/main/info/AJCCspecinfo");
  188. submit("TXMMO14103");
  189. //기존 상태값으로 변경한다.
  190. model.setValue("/root/main/info/AJCCspecinfo/status",'u');
  191. model.refresh();
  192. }else if(delfile == '7'){
  193. }
  194. //첨부파일이 있는지 확인
  195. var filenm = model.getValue("/root/main/info/AJCCspecinfo/attfilenm");
  196. //파일이 없는경우 메세지
  197. if(filenm == ''){
  198. messageBox("파일이 첨부 되지 " , "E007");
  199. }else{
  200. //테이블에 저장
  201. model.copyNode("/root/send/savedata","/root/main/info/AJCCspecinfo");
  202. submit("TXMMO14101");
  203. var status = model.getValue("/root/main/info/AJCCspecinfo/status");
  204. if(status == 'i'){
  205. //등록을 하고 거기에서 받아온 키값들을 저장해 둔다.
  206. var getDD = model.getValue("/root/main/keyinfo/keylist/genrdd");
  207. var getNO = model.getValue("/root/main/keyinfo/keylist/genrno");
  208. model.setValue("/root/main/info/AJCCspecinfo/genrdd", getDD);
  209. model.setValue("/root/main/info/AJCCspecinfo/genrno", getNO);
  210. }
  211. //**********첨부파일을 BLOB 형태로 DB에 올림
  212. //선택한 파일의 첨부파일을 선택하기 위해 키를 가지고 간다.
  213. var getno = model.getValue("/root/main/info/AJCCspecinfo/genrno");
  214. var getdd = model.getValue("/root/main/info/AJCCspecinfo/genrdd");
  215. var useyn = model.getValue("/root/main/info/AJCCspecinfo/useyn");
  216. model.setValue("/root/send/file/genrno", getno);
  217. model.setValue("/root/send/file/genrdd", getdd);
  218. model.setValue("/root/send/file/useyn", useyn);
  219. // 파일을 DB에 올린다.
  220. submit("TXMMO14102");
  221. }
  222. model.setValue("/root/send/file/status",'N');
  223. }else{
  224. //첨부파일이 있는지 확인
  225. var filenm = model.getValue("/root/main/info/AJCCspecinfo/attfilenm");
  226. //파일이 첨부되지 않은 경우 메세지
  227. if(filenm == ''){
  228. messageBox("파일이 첨부 되지 " , "E007");
  229. }else{
  230. //테이블에 저장
  231. model.copyNode("/root/send/savedata","/root/main/info/AJCCspecinfo");
  232. submit("TXMMO14101");
  233. //그리드의 총개수를 알아내서 마지막으로 추가된 로우의 키값을 알아냄
  234. var rows = grd_AJCClist.rows - grd_AJCClist.fixedRows;
  235. var status = model.getValue("/root/main/info/AJCCspecinfo/status");
  236. if(status == 'i'){
  237. //등록을 하고 거기에서 받아온 키값들을 저장해 둔다.
  238. var getDD = model.getValue("/root/main/keyinfo/keylist/genrdd");
  239. var getNO = model.getValue("/root/main/keyinfo/keylist/genrno");
  240. model.setValue("/root/main/info/AJCCspecinfo/genrdd", getDD);
  241. model.setValue("/root/main/info/AJCCspecinfo/genrno", getNO);
  242. }
  243. //**********첨부파일을 BLOB 형태로 DB에 올림
  244. //선택한 파일의 첨부파일을 선택하기 위해 키를 가지고 간다.
  245. var getno = model.getValue("/root/main/info/AJCCspecinfo/genrno");
  246. var getdd = model.getValue("/root/main/info/AJCCspecinfo/genrdd");
  247. var useyn = model.getValue("/root/main/info/AJCCspecinfo/useyn");
  248. model.setValue("/root/send/file/genrno", getno);
  249. model.setValue("/root/send/file/genrdd", getdd);
  250. model.setValue("/root/send/file/useyn", useyn);
  251. // 파일을 DB에 올린다.
  252. submit("TXMMO14102");
  253. }
  254. model.setValue("/root/send/file/status",'N');
  255. }
  256. ]]>
  257. </script>
  258. </button>
  259. <button id="btn_delete" class="btn4_letter2" navindex="12" style="left:1139px; top:134px; width:56px; height:22px; ">
  260. <caption>삭제</caption>
  261. <script type="javascript" ev:event="DOMActivate">
  262. <![CDATA[
  263. //상태를 삭제상태로 변경
  264. model.setValue("/root/main/info/AJCCspecinfo/status",'d');
  265. //파일을 삭제하러 간다
  266. model.copyNode("/root/send/savedata","/root/main/info/AJCCspecinfo");
  267. submit("TXMMO14101");
  268. //내역 초기화
  269. ipt_docutitlnm.value = '';
  270. ipt_attfilenm.value = '';
  271. cmb_useYN.select(0);
  272. //입력불가상태를 입력가능하게 변경해줌
  273. ipt_docutitlnm.disabled = 'true';
  274. ipt_attfilenm.disabled = 'true';
  275. cmb_useYN.disabled = 'true';
  276. //상태를 신규등록 상태로 만들어준다
  277. model.setValue("/root/main/info/AJCCspecinfo/status",'');
  278. ]]>
  279. </script>
  280. </button>
  281. <button id="btn_reset" class="btn4_letter3" navindex="10" style="left:1013px; top:134px; width:68px; height:22px; ">
  282. <caption>초기화</caption>
  283. <script type="javascript" ev:event="DOMActivate">
  284. <![CDATA[
  285. //내역 초기화
  286. ipt_docutitlnm.value = '';
  287. ipt_attfilenm.value = '';
  288. cmb_useYN.select(0);
  289. //입력불가상태를 입력가능하게 변경해줌
  290. ipt_docutitlnm.disabled = 'false';
  291. ipt_attfilenm.disabled = 'true';
  292. cmb_useYN.disabled = 'false';
  293. //상태를 신규등록 상태로 만들어준다
  294. model.setValue("/root/main/info/AJCCspecinfo/status",'i');
  295. model.setValue("/root/main/info/AJCCspecinfo/genrdd",'');
  296. model.setValue("/root/main/info/AJCCspecinfo/genrno",'');
  297. model.removeNodeset("/root/main/keyinfo/keylist");
  298. ]]>
  299. </script>
  300. </button>
  301. <button id="button2" class="btn2_letter4" navindex="8" style="left:489px; top:110px; width:64px; height:19px; ">
  302. <caption>파일첨부</caption>
  303. <script type="javascript" ev:event="DOMActivate">
  304. <![CDATA[
  305. //파일 사이즈를 받아옴
  306. var maxsize = upload1.attribute("filesize");
  307. //현재 저장할 파일 명을 받아옴
  308. var name = model.getValue("/root/main/info/AJCCspecinfo/attfilenm");
  309. //파일 명이 존재하면 저장된 파일이 있는 것이므로 먼저 파일을 삭제하라는 메세지를 띄워줌
  310. if((name != '')){
  311. var fileupdata = messageBox(name + " 파일 삭제 후 " , "C002");
  312. }else{
  313. //파일을 받아오기 위해 파일열기 팝업창을 띄운다.
  314. var fileopen = window.fileDialog("open","|","false");
  315. //파일 경로가 아닌 이름만 input박스에 넣기 위한 처리
  316. model.setValue("/root/main/info/AJCCspecinfo/attfilenm", fileopen);
  317. var name = model.getValue("/root/main/info/AJCCspecinfo/attfilenm");
  318. //lastIndexOf함수는 \\이것을 뒤어세 검색하여 나오면 앞에 것은 지운다.
  319. var filename = name.lastIndexOf("\\");
  320. //open 파일명를 input박스에 넣는다.
  321. ipt_attfilenm.value = fileopen.substring(filename + 1);
  322. //선택한 파일이 저장버튼을 눌렀을때 저장이 되게 하기 위해 파일 저장 인스턴스에 파일주소를 저장해 둔다.
  323. model.setValue("/root/send/file/filename", name);
  324. model.refresh();
  325. //파일 크기가 너무 큰경우 메세지를 띄운다.
  326. if (!checkFileSize(upload1)){
  327. ipt_attfilenm.value = "";
  328. messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  329. }
  330. }
  331. model.refresh();
  332. ]]>
  333. </script>
  334. </button>
  335. <button id="button3" class="btn2_letter4" navindex="9" style="left:555px; top:110px; width:64px; height:19px; ">
  336. <caption>파일삭제</caption>
  337. <script type="javascript" ev:event="DOMActivate">
  338. <![CDATA[
  339. //파일 삭제 상태값을 저장으로 넘겨줌
  340. model.setValue("/root/send/file/status",'Y');
  341. //input박스에 나타난 명을 제거
  342. ipt_attfilenm.value = "";
  343. ]]>
  344. </script>
  345. </button>
  346. <upload id="upload1" nodeset="/root/send/file/filename" ext="zip" filecount="5" filesize="5242880" validate="true" style="left:630px; top:110px; width:15px; height:20px; "/>
  347. <datagrid id="grd_AJCClist" nodeset="/root/main/AJCCspeclist/AJCCspeclist" scroll="vertical" autoresize="true" caption="문서제목^파일명^발생일자^발생번호^사용구분" colsep="^" colwidth="540, 540, 0, 0, 70" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" navindex="4" style="left:0px; top:170px; width:1193px; height:565px; ">
  348. <col ref="docutitlnm"/>
  349. <col ref="attfilenm"/>
  350. <col ref="genrdd"/>
  351. <col ref="genrno"/>
  352. <col ref="useyn" type="combo" style="text-align:center; ">
  353. <choices>
  354. <item>
  355. <label>사용</label>
  356. <value>Y</value>
  357. </item>
  358. <item>
  359. <label>미사용</label>
  360. <value>N</value>
  361. </item>
  362. </choices>
  363. </col>
  364. <script type="javascript" ev:event="ondblclick">
  365. <![CDATA[
  366. //선택한 것을 더블클릭하면 내역에 표시되게 한다.
  367. var row = grd_AJCClist.row;
  368. var docutitl = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/docutitlnm");
  369. var attfile = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/attfilenm");
  370. var useyn = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/useyn");
  371. var genrdd = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/genrdd");
  372. var genrno = model.getValue("/root/main/AJCCspeclist/AJCCspeclist[" + row + "]/genrno");
  373. model.setValue("/root/main/info/AJCCspecinfo/docutitlnm", docutitl);
  374. model.setValue("/root/main/info/AJCCspecinfo/attfilenm", attfile);
  375. model.setValue("/root/main/info/AJCCspecinfo/useyn", useyn);
  376. model.setValue("/root/main/info/AJCCspecinfo/genrdd", genrdd);
  377. model.setValue("/root/main/info/AJCCspecinfo/genrno", genrno);
  378. //더블클릭하는 것은 수정하는 경우이기 때문에 상태를 수정으로 만든다
  379. model.setValue("/root/main/info/AJCCspecinfo/status", 'u');
  380. //입력불가상태를 입력가능하게 변경해줌
  381. ipt_docutitlnm.disabled = 'false';
  382. ipt_attfilenm.disabled = 'true';
  383. cmb_useYN.disabled = 'false';
  384. //사용구분이 사용인 문서제목이 조회되는 팝업을 띄워줌
  385. open("SPMMO13900","1","150","150","SPMMO13900");
  386. model.refresh();
  387. ]]>
  388. </script>
  389. </datagrid>
  390. <caption id="caption18" class="tit_2" style="left:0px; top:150px; width:139px; height:13px; vertical-align:middle; ">AJCC 내역리스트</caption>
  391. <line id="line2" class="line_1" style="x1:0px; y1:165px; x2:1193px; y2:165px; "/>
  392. </xhtml:body>
  393. </xhtml:html>