SMLMF00900_배양균대표코드관리.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMLMF01000_항균제대표코드관리.xrw
  4. * 설 명 : 항균제대표코드관리
  5. * 설 계 자 : (주)에이씨케이 -
  6. * 작 성 자 : (주)에이씨케이 - 송요셉
  7. * 작 성 일 : 2008.03.14
  8. * 수정이력 :
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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/>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root>
  18. <main>
  19. <baclist>
  20. <baccd/>
  21. <bacnm/>
  22. <keybaccd/>
  23. </baclist>
  24. <keybaclist>
  25. <keybaccd/>
  26. <bacnm/>
  27. </keybaclist>
  28. <keybacdetilist>
  29. <chk/>
  30. <keyyn/>
  31. <baccd/>
  32. <bacnm/>
  33. </keybacdetilist>
  34. </main>
  35. <send>
  36. <data1/>
  37. <keybaccd/>
  38. </send>
  39. <init>
  40. </init>
  41. <hidden>
  42. <ref>
  43. <refgbn>1</refgbn>
  44. <searchgbn>1</searchgbn>
  45. <searchnm/>
  46. <btnflag/>
  47. </ref>
  48. <default/>
  49. </hidden>
  50. </root>
  51. </instance>
  52. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  54. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  55. <script type="javascript" ev:event="xforms-model-construct-done">
  56. <![CDATA[
  57. fSetInit();
  58. ]]>
  59. </script>
  60. <submission id="TRLMF00901" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/keybaclist"/>
  61. <submission id="TRLMF00902" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/keybacdetilist"/>
  62. <submission id="TRLMF00101" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance" resultref="/root/main/baclist"/>
  63. <submission id="TXLMF00901" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" replace="instance"/>
  64. </model>
  65. <script type="javascript">
  66. <![CDATA[
  67. /* @group : 항균제코드관리
  68. * @ver : 2007.04.09(CMCDEV-0001)
  69. * @by : 조철형
  70. *@-----------------------------------
  71. * @type : function
  72. * @access : public
  73. * @desc : 초기화버튼 클릭
  74. */
  75. function fSetInit() {
  76. model.removeNodeset("/root/main/keybaclist");
  77. model.removeNodeset("/root/main/keybacdetilist");
  78. model.removeNodeset("/root/main/baclist");
  79. submit("TRLMF00901");
  80. //fGetBaccd("2");
  81. }
  82. /* @group : 배양균코드관리
  83. * @ver : 2007.04.06(CMCDEV-0001)
  84. * @by : 조철형
  85. *@-----------------------------------
  86. * @type : function
  87. * @access : public
  88. * @desc : 조회 검색 버튼 클릭
  89. */
  90. function fGetBaccd(gbn){
  91. model.setvalue("/root/hidden/ref/btnflag",gbn);
  92. model.copyNode("/root/send/data1","/root/hidden/ref");
  93. submit("TRLMF00101");
  94. model.copyNode("/root/send/data1","/root/hidden/default");
  95. }
  96. function fClickkeybaclist(kRow){
  97. model.setValue("/root/send/keybaccd" , model.getValue("/root/main/keybaclist["+kRow+"]/keybaccd"));
  98. submit("TRLMF00902");
  99. }
  100. function fClickbacdetl(cRow){
  101. var baccd = model.getValue("/root/main/baclist["+cRow+"]/baccd");
  102. var bacnm = model.getValue("/root/main/baclist["+cRow+"]/bacnm");
  103. var keybaccd = model.getValue("/root/main/baclist["+cRow+"]/keybaccd");
  104. if(keybaccd != ""){
  105. alert("이미 " + keybaccd + "의 대표코드가 설정되어 있습니다.");
  106. return;
  107. }
  108. var n = getNodesetCount("/root/main/keybacdetilist[baccd = '" + baccd + "']");
  109. if(n < 1){
  110. keybacdetilist.addItem(false);
  111. var pRow = keybacdetilist.rows - 1;
  112. model.setValue("/root/main/keybacdetilist["+pRow+"]/keyyn" , "false");
  113. model.setValue("/root/main/keybacdetilist["+pRow+"]/baccd", baccd);
  114. model.setValue("/root/main/keybacdetilist["+pRow+"]/bacnm", bacnm);
  115. model.refresh();
  116. }else{
  117. alert(bacnm + " 배양균이 이미 설정되어 있습니다.");
  118. }
  119. }
  120. function fClickChkbox(cRow){
  121. var n = getNodesetCount("/root/main/keybacdetilist[keyyn = '" + "true" + "']");
  122. if(n > 1){
  123. alert("대표코드는 한개만 설정 가능합니다.");
  124. model.setValue("/root/main/keybacdetilist["+cRow+"]/keyyn", "false");
  125. model.refresh();
  126. }
  127. }
  128. function fdbClickdetilist(cRow){
  129. keybacdetilist.deleteItem(cRow);
  130. model.refresh();
  131. }
  132. function fExeBac(){
  133. model.setValue("/root/send/keybaccd" , model.getValue("/root/main/keybaclist["+keybaclist.row+"]/keybaccd"));
  134. model.setValue("/root/send/data1", keybacdetilist.getUpdateDataAll(i));
  135. if(keybacdetilist.rows == 1){
  136. }
  137. else{
  138. var n = getNodesetCount("/root/main/keybacdetilist[keyyn = '" + "true" + "']");
  139. if(n < 1){
  140. alert("대표코드 하나는 반드시 설정해야 합니다.");
  141. return;
  142. }
  143. }
  144. submit("TXLMF00901");
  145. model.removeNodeset("/root/main/keybacdetilist");
  146. submit("TRLMF00901");
  147. fGetBaccd("2");
  148. }
  149. function fNewkeybac(){
  150. keybaclist.row = -1;
  151. model.setValue("/root/send/keybaccd" , "");
  152. model.removeNodeset("/root/main/keybacdetilist");
  153. model.refresh();
  154. keybaclist.rebuild();
  155. }
  156. function fdelkeybacdetilist(){
  157. var kRows = keybacdetilist.rows;
  158. var i;
  159. for(i = 1 ; i < kRows ; i ++){
  160. if(model.getValue("/root/main/keybacdetilist["+i+"]/chk") == "true"){
  161. model.removenodeset("/root/main/keybacdetilist["+i+"]");
  162. i = i -1;
  163. kRows = kRows -1 ;
  164. }
  165. }
  166. model.refresh();
  167. }
  168. ]]>
  169. </script>
  170. </xhtml:head>
  171. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  172. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  173. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:260px; y2:70px; "/>
  174. <caption id="caption2" class="tit_2" style="left:0px; top:55px; width:144px; height:14px; ">배양균대표코드목록</caption>
  175. <datagrid id="grd_cddetl" nodeset="/root/main/baclist" caption="배양균코드^배양균명^배양균대표코드" colwidth="110, 200, 100" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:760px; top:75px; width:435px; height:669px; ">
  176. <col ref="baccd"/>
  177. <col ref="bacnm"/>
  178. <col ref="keybaccd"/>
  179. <script type="javascript" ev:event="onaftersort">
  180. <![CDATA[
  181. grd_cddetl.gridToInstance();
  182. ]]>
  183. </script>
  184. <script type="javascript" ev:event="ondblclick">
  185. <![CDATA[
  186. if(grd_cddetl.isCell(event.target) && grd_cddetl.row >= grd_cddetl.fixedRows ){
  187. fClickbacdetl(grd_cddetl.row);
  188. }
  189. ]]>
  190. </script>
  191. </datagrid>
  192. <group id="group1" style="left:0px; top:10px; width:1195px; height:35px; ">
  193. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  194. <line id="line3" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; "/>
  195. <caption id="caption4" class="search_name" style="left:737px; top:9px; width:90px; height:17px; ">검색구분 :</caption>
  196. <select1 id="cmb_search" ref="/root/hidden/ref/searchgbn" class="combo_search" appearance="minimal" style="left:830px; top:8px; width:100px; height:19px; ">
  197. <choices>
  198. <item>
  199. <label>코드</label>
  200. <value>1</value>
  201. </item>
  202. <item>
  203. <label>균명</label>
  204. <value>2</value>
  205. </item>
  206. </choices>
  207. </select1>
  208. <input id="ipt_searchtext" ref="/root/hidden/ref/searchnm" class="input_search" style="left:935px; top:8px; width:158px; height:19px; "/>
  209. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  210. <caption>검색</caption>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. fGetBaccd("2");
  214. ]]>
  215. </script>
  216. </button>
  217. </group>
  218. <caption id="caption1" class="tit_2" style="left:760px; top:55px; width:144px; height:14px; ">배양균목록</caption>
  219. <line id="line2" class="line_1" style="x1:760px; y1:70px; x2:1195px; y2:70px; "/>
  220. <datagrid id="keybaclist" nodeset="/root/main/keybaclist" caption="배양균대표코드^배양균명" colwidth="110, 125" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:0px; top:75px; width:260px; height:669px; ">
  221. <col ref="keybaccd"/>
  222. <col ref="bacnm"/>
  223. <script type="javascript" ev:event="onaftersort">
  224. <![CDATA[
  225. keybaclist.gridToInstance();
  226. ]]>
  227. </script>
  228. <script type="javascript" ev:event="onclick">
  229. <![CDATA[
  230. if(keybaclist.isCell(event.target) && keybaclist.row >= keybaclist.fixedRows ){
  231. fClickkeybaclist(keybaclist.row);
  232. }
  233. ]]>
  234. </script>
  235. </datagrid>
  236. <datagrid id="keybacdetilist" nodeset="/root/main/keybacdetilist" caption="선택^대표여부^배양균코드^배양균명" colwidth="30, 60, 230, 100" dataheight="23" defaultrows="1" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" colsep="^" fixed.background-image="../../../com/commonweb/images/grid_bg.gif" style="left:280px; top:75px; width:460px; height:669px; ">
  237. <col ref="chk" type="checkbox" checkvalue="true,false"/>
  238. <col ref="keyyn" type="checkbox" checkvalue="true,false"/>
  239. <col ref="baccd"/>
  240. <col ref="bacnm"/>
  241. <script type="javascript" ev:event="onaftersort">
  242. <![CDATA[
  243. keybacdetilist.gridToInstance();
  244. ]]>
  245. </script>
  246. <script type="javascript" ev:event="onclick">
  247. <![CDATA[
  248. if(keybacdetilist.isCell(event.target) && keybacdetilist.row >= keybacdetilist.fixedRows ){
  249. fClickChkbox(keybacdetilist.row);
  250. }
  251. ]]>
  252. </script>
  253. <script type="javascript" ev:event="ondblclick">
  254. <![CDATA[
  255. if(keybacdetilist.isCell(event.target) && keybacdetilist.row >= keybacdetilist.fixedRows ){
  256. fdbClickdetilist(keybacdetilist.row);
  257. }
  258. ]]>
  259. </script>
  260. </datagrid>
  261. <caption id="caption3" class="tit_2" style="left:280px; top:55px; width:160px; height:14px; ">배양균대표코드상세목록</caption>
  262. <line id="line4" class="line_1" style="x1:280px; y1:70px; x2:740px; y2:70px; "/>
  263. <button id="button12" class="btn2_letter4" style="left:676px; top:50px; width:64px; height:19px; ">
  264. <caption>신규등록</caption>
  265. <script type="javascript" ev:event="onclick">
  266. <![CDATA[
  267. fNewkeybac();
  268. ]]>
  269. </script>
  270. </button>
  271. <button id="button10" class="btn2_letter2" style="left:631px; top:50px; width:42px; height:19px; ">
  272. <caption>삭제</caption>
  273. <script type="javascript" ev:event="onclick">
  274. <![CDATA[
  275. fdelkeybacdetilist();
  276. ]]>
  277. </script>
  278. </button>
  279. </group>
  280. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  281. <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  282. <button id="btn_reset" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
  283. <caption>초기화</caption>
  284. <script type="javascript" ev:event="DOMActivate">
  285. <![CDATA[
  286. fSetInit();
  287. ]]>
  288. </script>
  289. </button>
  290. <button id="btn_save" class="btn4_letter2" style="left:1068px; top:3px; width:56px; height:22px; ">
  291. <caption>저장</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. fExeBac();
  295. ]]>
  296. </script>
  297. </button>
  298. </group>
  299. <group id="group2" style="left:0px; top:0px; width:1195px; height:13px; ">
  300. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:800px; height:14px; ">배양균대표코드관리</caption>
  301. </group>
  302. </xhtml:body>
  303. </xhtml:html>