SMLLF01400_사유코드관리.xrw 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLLF01400_사유코드관리.xrw
  4. * 설 명 : 사유코드관리
  5. * 설 계 자 : (주)에이씨케이 - 박정은
  6. * 작 성 자 : (주)에이씨케이 - 박정은
  7. * 작 성 일 : 2007.05.09
  8. * 수정이력 : 2007-08-01 박정은 코드인스펙션
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>사유코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <resnlist>
  20. <resncdkind/>
  21. <resncd/>
  22. <resndesc/>
  23. <resndispseq/>
  24. <resnuseyn/>
  25. </resnlist>
  26. </main>
  27. <send>
  28. <resncdkind/>
  29. <resndata/>
  30. <codeflag/>
  31. </send>
  32. <init>
  33. </init>
  34. <hidden>
  35. <ref>
  36. <refgbn>01</refgbn>
  37. </ref>
  38. </hidden>
  39. </root>
  40. </instance>
  41. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  43. <submission id="TRLLF01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/resnlist"/>
  44. <submission id="TXLLF01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/resnlist"/>
  45. <script type="javascript" ev:event="xforms-ready">
  46. <![CDATA[
  47. // 사유코드 그리드 초기화
  48. //grd_rsn.deleteRow(1);
  49. model.removeNodeset("/root/main/resnlist");
  50. grd_rsn.refresh();
  51. // 사유코드목록 초기값 조회
  52. fGetResnCd();
  53. //input1.attribute("imemode") = "hangul";
  54. ]]>
  55. </script>
  56. <submission id="TRLZZ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/LB0117"/>
  57. </model>
  58. <script type="javascript">
  59. <![CDATA[
  60. // 사유코드목록 초기값 조회
  61. function fGetResnCd(){
  62. model.setValue("/root/send/codeflag", "0117|"); // 0117 사유코드관리
  63. submit("TRLZZ00101");
  64. fOnclick_btnRef();
  65. }
  66. // 행추가
  67. function fInsRowAdd() {
  68. grd_rsn.addRow();
  69. if(grd_rsn.rows <3){
  70. model.setValue("/root/main/resnlist["+(grd_rsn.rows-1)+"]/resndispseq", "1");
  71. }else{
  72. model.setValue("/root/main/resnlist["+(grd_rsn.rows-1)+"]/resndispseq", parseInt(model.getValue("/root/main/resnlist["+(grd_rsn.rows-2)+"]/resndispseq")) + 1);
  73. }
  74. model.setValue("/root/main/resnlist["+(grd_rsn.rows-1)+"]/resncdkind", model.getValue("/root/hidden/ref/refgbn"));
  75. model.setValue("/root/main/resnlist["+(grd_rsn.rows-1)+"]/resnuseyn", "Y");
  76. }
  77. function fExeCancel() {
  78. //model.reset();
  79. model.removeNodeset("/root/main/resnlist");
  80. model.refresh();
  81. }
  82. function fOnclick_btnRef(){
  83. model.setvalue("/root/send/resncdkind" , cmb_RefFlag.value);
  84. submit("TRLLF01401");
  85. model.setvalue("/root/send/resncdkind" , "00");
  86. }
  87. // 사유코드유형 설정
  88. function fSetResnkind(){
  89. var rCol = grd_rsn.col;
  90. if(model.getValue("/root/main/resnlist["+grd_rsn.row+"]/resncdkind")== ""){
  91. if(rCol == "2"){
  92. model.setValue("/root/main/resnlist["+grd_rsn.row+"]/resncdkind", model.getValue("/root/main/resnlist["+grd_rsn.row+"]/resncd").substr(0,2));
  93. }
  94. }
  95. }
  96. // 사유코드 수정, 등록
  97. function fExeResn(){
  98. var grdResn = getGridUpdateData(grd_rsn);
  99. if(grdResn == ""){
  100. messageBox("저장 할 내용이 없습니다. \n사유코드를 저장 ", "E001"); // 할 수 없습니다.
  101. return;
  102. }
  103. for(i = 1; i <= grd_rsn.rows; i++){
  104. if((grd_rsn.rowStatus(i) == 1 || grd_rsn.rowStatus(i) == 3)
  105. && ( model.getValue("/root/main/resnlist[" + i + "]/resncdkind") == ""
  106. || model.getValue("/root/main/resnlist[" + i + "]/resncd") == ""
  107. || model.getValue("/root/main/resnlist[" + i + "]/resndesc") == ""
  108. || model.getValue("/root/main/resnlist[" + i + "]/resndispseq") == "")){
  109. messageBox("저장할 내역 중 빈값은 존재할 수 없습니다. ", "E");
  110. grd_rsn.row = i;
  111. return;
  112. }
  113. }
  114. var rtn = messageBox("저장된 내역은 수정하실 수 없습니다.\n이대로 저장", "Q002");
  115. if(rtn == 7){
  116. return;
  117. }
  118. model.setValue("/root/send/resndata", grdResn);
  119. submit("TXLLF01401");
  120. //model.reset();
  121. model.removeNodeset("/root/init");
  122. model.removeNodeset("/root/main/resnlist");
  123. fGetResnCd();
  124. }
  125. ]]>
  126. </script>
  127. </xhtml:head>
  128. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  129. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744; ">
  130. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  131. <caption id="caption1" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">사유코드상세내역</caption>
  132. <datagrid id="grd_rsn" nodeset="/root/main/resnlist" caption="사유코드유형^사유코드^사유^사용여부^표시순서^숨길꺼seq" colwidth="100, 130, 800, 60, 80, 0" dataheight="25" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:1194px; height:669px; ">
  133. <col disabled="true" ref="resncdkind" type="input" maxlength="2"/>
  134. <col disabled="true" ref="resncd" type="input" maxlength="5"/>
  135. <col disabled="true" ref="resndesc" type="input" maxlength="200"/>
  136. <col checkvalue="Y,N" ref="resnuseyn" type="checkbox"/>
  137. <col ref="resndispseq" type="input" format="99999" maxlength="5"/>
  138. <col ref="resndispseq"/>
  139. <script type="javascript" ev:event="DOMFocusOut">
  140. <![CDATA[
  141. // 사유코드유형 설정
  142. fSetResnkind();
  143. ]]>
  144. </script>
  145. <script type="javascript" ev:event="onaftersort">
  146. <![CDATA[
  147. grd_rsn.gridToInstance();
  148. ]]>
  149. </script>
  150. </datagrid>
  151. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  152. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  153. <line id="line3" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  154. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">조회구분 :</caption>
  155. <button id="btn_Ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  156. <caption>조회</caption>
  157. <script type="javascript" ev:event="DOMActivate">
  158. <![CDATA[
  159. fOnclick_btnRef();
  160. ]]>
  161. </script>
  162. </button>
  163. <select1 id="cmb_RefFlag" ref="/root/hidden/ref/refgbn" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:530px; top:5px; width:150px; height:19px; ">
  164. <choices>
  165. <item>
  166. <label>-전체-</label>
  167. <value>00</value>
  168. </item>
  169. <item>
  170. <label>[1]검체채혈취소사유</label>
  171. <value>01</value>
  172. </item>
  173. <item>
  174. <label>[2]검체접수취소사유</label>
  175. <value>02</value>
  176. </item>
  177. <item>
  178. <label>[3]검체채혈접수취소사유</label>
  179. <value>03</value>
  180. </item>
  181. <item>
  182. <label>[4]검체검사취소사유</label>
  183. <value>04</value>
  184. </item>
  185. <item>
  186. <label>[5]현장검사취소사유</label>
  187. <value>05</value>
  188. </item>
  189. <item>
  190. <label>[6]검체부적격사유</label>
  191. <value>06</value>
  192. </item>
  193. <item>
  194. <label>[7]혈액반납사유</label>
  195. <value>07</value>
  196. </item>
  197. <item>
  198. <label>[8]혈액폐기사유</label>
  199. <value>08</value>
  200. </item>
  201. </choices>
  202. </select1>
  203. <select1 id="cmb_resn" ref="/root/hidden/ref/refgbn" class="combo_s_essential" appearance="minimal" style="left:106px; top:8px; width:180px; height:19px; ">
  204. <choices>
  205. <itemset nodeset="/root/init/LB0117">
  206. <label ref="nm"/>
  207. <value ref="cd"/>
  208. </itemset>
  209. </choices>
  210. <script type="javascript" ev:event="xforms-select">
  211. <![CDATA[
  212. fOnclick_btnRef();
  213. ]]>
  214. </script>
  215. </select1>
  216. </group>
  217. <button id="btn_addrow" class="btn2_letter3" style="left:1142px; top:49px; width:53px; height:19px; ">
  218. <caption>행추가</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. fInsRowAdd();
  222. ]]>
  223. </script>
  224. </button>
  225. <input id="input1" visibility="hidden" appearance="input" style="left:305px; top:50px; width:100px; height:19px; "/>
  226. </group>
  227. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  228. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  229. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  230. <caption>저장</caption>
  231. <script type="javascript" ev:event="DOMActivate">
  232. <![CDATA[
  233. fExeResn();
  234. ]]>
  235. </script>
  236. </button>
  237. <button id="btn_clear" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  238. <caption>초기화</caption>
  239. <script type="javascript" ev:event="DOMActivate">
  240. <![CDATA[
  241. fExeCancel();
  242. ]]>
  243. </script>
  244. </button>
  245. </group>
  246. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  247. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">사유코드관리</caption>
  248. </group>
  249. </xhtml:body>
  250. </xhtml:html>