SMADB00300_병용금기관리.xrw 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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>병용금기 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <item>
  12. <comcd1/>
  13. <comexcd1/>
  14. <comnm1/>
  15. <comcd2/>
  16. <comexcd2/>
  17. <comnm2/>
  18. <fromdd/>
  19. <todd/>
  20. <tboocnts/>
  21. </item>
  22. </list>
  23. </main>
  24. <send>
  25. <comcd/>
  26. <comnm/>
  27. <req>
  28. <data1/>
  29. </req>
  30. </send>
  31. <init/>
  32. <hidden>
  33. <item>
  34. <comcd1/>
  35. <comnm1/>
  36. <comcd2/>
  37. <comnm2/>
  38. <fromdd/>
  39. <todd/>
  40. <tboocnts/>
  41. </item>
  42. <receiveref>
  43. <srchtype>B</srchtype>
  44. </receiveref>
  45. </hidden>
  46. <temp>
  47. <item>
  48. <count/>
  49. </item>
  50. </temp>
  51. </root>
  52. </instance>
  53. <submission id="TRADB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/list"/>
  54. <submission id="TXADB00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/temp"/>
  55. <script type="javascript">
  56. <![CDATA[
  57. function rownullchk(){
  58. for(var i = 1; i < datagrid1.rows; i++){
  59. if(datagrid1.rowStatus(i) !=0 && datagrid1.rowStatus(i) !=5){
  60. // alert(datagrid1.rowStatus(i));
  61. if(model.getValue("/root/main/list/item["+i+"]/comcd1").getTrim() == "") {
  62. messageBox("성분코드는","I003");
  63. return false;
  64. }
  65. else if(model.getValue("/root/main/list/item["+i+"]/comexcd1").getTrim() == ""){
  66. messageBox("확장코드","I003");
  67. return false;
  68. }
  69. else if(model.getValue("/root/main/list/item["+i+"]/comcd2").getTrim() == ""){
  70. messageBox("성분코드는","I003");
  71. return false;
  72. }
  73. else if(model.getValue("/root/main/list/item["+i+"]/comexcd2").getTrim() == ""){
  74. messageBox("확장코드는","I003");
  75. return false;
  76. }
  77. else if(model.getValue("/root/main/list/item["+i+"]/todd").getTrim() == ""){
  78. messageBox("종료일자는","I003");
  79. return false;
  80. }
  81. }
  82. }
  83. return true;
  84. }
  85. ]]>
  86. </script>
  87. </model>
  88. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  89. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  90. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  91. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  92. <script type="javascript" ev:event="xforms-ready">
  93. <![CDATA[
  94. // 권한 관리
  95. btn_save.disabled =! checkAuth("X"); // 저장
  96. ]]>
  97. </script>
  98. </xhtml:head>
  99. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  100. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  101. <caption id="caption19" class="tit_1" style="left:0px; top:0px; width:145px; height:14px; ">병용금기 관리</caption>
  102. </group>
  103. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  104. <group id="group2" style="left:0px; top:0px; width:1194px; height:45px; ">
  105. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:3px; width:1194px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  106. <button id="button3" class="btn1_letter2" style="left:1110px; top:10px; width:80px; height:22px; ">
  107. <caption>조회</caption>
  108. <script type="javascript" ev:event="DOMActivate">
  109. <![CDATA[
  110. var comnm = model.getValue("/root/send/comnm");
  111. var comcd = model.getValue("/root/send/comcd");
  112. if(comcd != ""){
  113. model.setValue("/root/send/comcd", comcd +"%");
  114. }
  115. if(comnm != ""){
  116. model.setValue("/root/send/comnm", comnm +"%");
  117. }
  118. submit("TRADB00301");
  119. model.setValue("/root/send/comcd",comcd);
  120. model.setValue("/root/send/comnm",comnm);
  121. model.refresh();
  122. ]]>
  123. </script>
  124. </button>
  125. <caption id="caption1" class="search_name" style="left:235px; top:13px; width:86px; height:17px; ">성분명칭</caption>
  126. <line id="line13" class="line_4" style="x1:1095px; y1:10px; x2:1095px; y2:32px; border-color:#ffe4bb; border-left-style:solid; "/>
  127. <caption id="caption3" class="search_name" style="left:5px; top:13px; width:86px; height:17px; ">성분코드</caption>
  128. <input id="input1" ref="/root/send/comnm" class="input_search" maxlength="66" style="left:325px; top:13px; width:365px; height:19px; ">
  129. <script type="javascript" ev:event="onkeydown">
  130. <![CDATA[
  131. inputEnterKey("button3","DOMActivate");
  132. ]]>
  133. </script>
  134. </input>
  135. <input id="input2" ref="/root/send/comcd" class="input_search" maxlength="7" style="left:90px; top:13px; width:130px; height:19px; ">
  136. <script type="javascript" ev:event="onkeydown">
  137. <![CDATA[
  138. inputEnterKey("button3","DOMActivate");
  139. ]]>
  140. </script>
  141. </input>
  142. </group>
  143. <button id="button50" class="btn2_letter3" style="left:1086px; top:46px; width:53px; height:19px; ">
  144. <caption>행복사</caption>
  145. <script type="javascript" ev:event="DOMActivate">
  146. <![CDATA[
  147. var grdrow = datagrid1.row;
  148. model.copyNode("/root/hidden/item","/root/main/list/item["+ grdrow +"]");
  149. datagrid1.insertItem(grdrow);
  150. model.copyNode("/root/main/list/item["+ grdrow +"]","/root/hidden/item");
  151. model.refresh();
  152. ]]>
  153. </script>
  154. </button>
  155. <datagrid id="datagrid1" nodeset="/root/main/list/item" backcoloralternate="#f0f0f0" caption="성분코드^확장코드^성분명칭^성분코드^확장코드^성분명칭^시작일자^종료일자^설명" colwidth="100, 62, 145, 100, 60, 145, 93, 93, 310" explorerbar="sortshow" extendlastcol="scroll" rowheader="update" style="left:0px; top:65px; width:1194px; height:675px; ">
  156. <col autonext="false" ref="comcd1" type="inputbutton" maxlength="7"/>
  157. <col ref="comexcd1"/>
  158. <col ref="comnm1"/>
  159. <col autonext="false" ref="comcd2" type="inputbutton" maxlength="7"/>
  160. <col ref="comexcd2"/>
  161. <col ref="comnm2"/>
  162. <col autonext="false" ref="fromdd" type="inputdate" format="yyyy-mm-dd" maxlength="8"/>
  163. <col autonext="false" ref="todd" type="inputdate" format="yyyy-mm-dd" maxlength="8"/>
  164. <col autonext="false" ref="tboocnts" type="input" maxlength="66"/>
  165. <script type="javascript" ev:event="onbuttonclick">
  166. <![CDATA[
  167. if (datagrid1.col== datagrid1.colRef("comcd1")){
  168. modal("SPADB61300",0,100,150,"SPADB61300","/root/hidden/receiveref","/root/hidden/receiveref");
  169. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comcd1", getParameter("comcd"));
  170. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comexcd1", getParameter("comexcd"));
  171. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comnm1", getParameter("comnm"));
  172. model.refresh();
  173. }
  174. if (datagrid1.col== datagrid1.colRef("comcd2")){
  175. modal("SPADB61300",0,100,150,"SPADB61300","/root/hidden/receiveref","/root/hidden/receiveref");
  176. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comcd2", getParameter("comcd"));
  177. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comexcd2", getParameter("comexcd"));
  178. model.setValue("/root/main/list/item["+(datagrid1.row)+"]/comnm2", getParameter("comnm"));
  179. model.refresh();
  180. }
  181. ]]>
  182. </script>
  183. </datagrid>
  184. <button id="btn_grdadd" class="btn2_letter3" style="left:1031px; top:46px; width:53px; height:19px; ">
  185. <caption>행추가</caption>
  186. <script type="javascript" ev:event="DOMActivate">
  187. <![CDATA[
  188. // 그리드 추가 시 행 값 가지고 오기
  189. datagrid1.addItem();
  190. var grdrows = datagrid1.row;
  191. // alert("grdrows = " +grdrows);
  192. model.setValue("/root/main/list/item["+grdrows+"]/todd","99991231")
  193. // datagrid1.colRef("/root/main/list/item["+grdrows+"]/todd");
  194. // datagrid1.
  195. datagrid1.refresh();
  196. ]]>
  197. </script>
  198. </button>
  199. <button id="btn_grddel" class="btn2_letter3" style="left:1141px; top:46px; width:53px; height:19px; ">
  200. <caption>행삭제</caption>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. datagrid1.addStatus(datagrid1.row,"delete");
  204. ]]>
  205. </script>
  206. </button>
  207. </group>
  208. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  209. <button id="btn_save" class="btn4_letter2" style="left:1133px; top:5px; width:56px; height:22px; ">
  210. <caption>저장</caption>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. if ( messageBox("병용금기","Q002")==6 ) {
  214. if(rownullchk()){
  215. model.setValue("/root/send/req/data1", datagrid1.getUpdateData());
  216. submit("TXADB00301");
  217. model.setValue("/root/send/comcd","");
  218. submit("TRADB00301");
  219. }
  220. }
  221. ]]>
  222. </script>
  223. </button>
  224. </group>
  225. </xhtml:body>
  226. </xhtml:html>