SMRSC05700_공동물품관리마스터(약국).xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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>공동관리약품마스터</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <instcd/>
  12. <instnm/>
  13. <workflag/>
  14. <useyn>Y</useyn>
  15. </cond>
  16. <safestocinfo>
  17. <safestoclist/>
  18. </safestocinfo>
  19. </main>
  20. <send>
  21. <reqdata/>
  22. <savedata/>
  23. </send>
  24. <init>
  25. <main/>
  26. </init>
  27. <temp/>
  28. </root>
  29. </instance>
  30. <script type="javascript" ev:event="xforms-ready">
  31. <![CDATA[
  32. //화면 Control을 초기화한다
  33. fInitialize();
  34. ]]>
  35. </script>
  36. <submission id="TRRSD00192" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/init/main"/>
  37. <submission id="TRRSC05501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cond" resultref="/root/main/safestocinfo"/>
  38. <submission id="TXRSC05501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/init/main"/>
  39. </model>
  40. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  42. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  43. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  44. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  45. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  46. <script type="javascript">
  47. <![CDATA[
  48. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  49. function fInitialize() {
  50. misfGridInit(grd_safestoc);
  51. model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
  52. model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
  53. model.setValue("/root/main/cond/workflag", "01");
  54. model.refresh();
  55. }
  56. ]]>
  57. </script>
  58. </xhtml:head>
  59. <xhtml:body pagewidth="700" pageheight="740" guideline="1,701;2,740;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  60. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:670px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  61. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">공동관리약품마스터</caption>
  62. <button id="btn_delete" class="btn2_letter3" style="left:556px; top:60px; width:53px; height:19px; ">
  63. <caption>행삭제</caption>
  64. <script type="javascript" ev:event="DOMActivate">
  65. <![CDATA[
  66. misfGridIUD(grd_safestoc, "D");
  67. ]]>
  68. </script>
  69. </button>
  70. <line id="line13" class="line_4" style="x1:540px; y1:25px; x2:540px; y2:50px; "/>
  71. <caption id="caption3" class="tit_2" style="left:5px; top:65px; width:144px; height:14px; ">공동관리약품마스터</caption>
  72. <button id="btn_excel" class="btn1_letter2" style="left:605px; top:27px; width:56px; height:22px; ">
  73. <caption>엑셀</caption>
  74. <script type="javascript" ev:event="DOMActivate">
  75. <![CDATA[
  76. misfSaveExcel(grd_safestoc , "공동관리약품마스터");
  77. ]]>
  78. </script>
  79. </button>
  80. <line id="line1" class="line_1" style="x1:0px; y1:80px; x2:670px; y2:80px; "/>
  81. <caption id="cap_instcd" class="search_name" style="left:15px; top:29px; width:86px; height:17px; ">기관코드 :</caption>
  82. <button id="btn_search" class="btn1_letter2" style="left:545px; top:27px; width:56px; height:22px; ">
  83. <caption>조회</caption>
  84. <script type="javascript" ev:event="DOMActivate">
  85. <![CDATA[
  86. if (submit("TRRSC05501") == true) {
  87. }
  88. ]]>
  89. </script>
  90. </button>
  91. <datagrid id="grd_safestoc" nodeset="/root/main/safestocinfo/safestoclist" caption="사용^물품코드^품명^시작일자^종료일자^기관코드^구분" colsep="^" colwidth="34, 115, 300, 90, 91, 0, 0" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:85px; width:670px; height:634px; ">
  92. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  93. <col ref="goodcd" type="input" _chartype="upper" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:center; "/>
  94. <col ref="goodnm" type="output" style="text-align:center; "/>
  95. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd"/>
  96. <col ref="todd" type="inputdate" format="yyyy-mm-dd"/>
  97. <col ref="instcd" visibility="hidden"/>
  98. <col ref="workflag" visibility="hidden"/>
  99. <script type="javascript" ev:event="onendedit">
  100. <![CDATA[
  101. if (isDataCell() == true) {
  102. var sGoodcd = grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("goodcd"));
  103. var sGoodnm = grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("goodnm"));
  104. model.makeValue("/root/send/reqdata/instcd", model.getValue("/root/main/cond/instcd"));
  105. if (grd_safestoc.col == grd_safestoc.colRef("goodcd")) {
  106. model.makeValue("/root/send/reqdata/goodcd" , sGoodcd);
  107. model.makeValue("/root/send/reqdata/goodnm" , "");
  108. } else if (grd_safestoc.col == grd_safestoc.colRef("goodnm")){
  109. model.makeValue("/root/send/reqdata/goodnm" , sGoodnm);
  110. model.makeValue("/root/send/reqdata/goodcd" , "");
  111. }
  112. if (grd_safestoc.col == grd_safestoc.colRef("goodcd") || grd_safestoc.col == grd_safestoc.colRef("goodnm")) {
  113. if(sGoodcd!=""){
  114. if (submit("TRRSD00192") == true) {
  115. var nodecnts = getNodesetCount("/root/init/main/goodlist");
  116. if (nodecnts >= 2) {
  117. group1.visible = true;
  118. } else if (nodecnts == 1) {
  119. var goodcd = model.getValue("/root/init/main/goodlist/goodcd");
  120. var goodnm = model.getValue("/root/init/main/goodlist/goodnm");
  121. var row2 = grd_safestoc.row;
  122. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodcd" , goodcd)
  123. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodnm" , goodnm)
  124. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/instcd" , model.getValue("/root/main/cond/instcd"));
  125. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/workflag" , "01");
  126. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/useyn" , "Y")
  127. group1.visible = false;
  128. model.refresh();
  129. } else {
  130. messageBox("검색된 코드가 없습니다.", "I");
  131. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodcd" , "");
  132. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodnm" , "");
  133. }
  134. }
  135. }else{
  136. grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("goodcd"))="";
  137. grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("goodnm"))="";
  138. }
  139. }
  140. }
  141. grd_safestoc.refresh();
  142. ]]>
  143. </script>
  144. <script type="javascript" ev:event="xforms-value-changed">
  145. <![CDATA[
  146. if(grd_safestoc.col == grd_safestoc.colRef("useyn")){
  147. var chgUseyn = grd_safestoc.valueMatrix(grd_safestoc.row,grd_safestoc.colRef("useyn"));
  148. if(chgUseyn=="Y"){
  149. grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("todd"))="99991231";
  150. }else{
  151. grd_safestoc.valueMatrix(grd_safestoc.row, grd_safestoc.colRef("todd"))=getCurrentDate();
  152. }
  153. }
  154. grd_safestoc.refresh();
  155. ]]>
  156. </script>
  157. </datagrid>
  158. <button id="btn_insert" class="btn2_letter3" style="left:500px; top:60px; width:53px; height:19px; ">
  159. <caption>행추가</caption>
  160. <script type="javascript" ev:event="DOMActivate">
  161. <![CDATA[
  162. grd_safestoc.addRow();
  163. var row = grd_safestoc.row
  164. model.setValue("/root/main/safestocinfo/safestoclist[" + row + "]/fromdd" , getCurrentDate());
  165. model.setValue("/root/main/safestocinfo/safestoclist[" + row + "]/todd" , "99991231");
  166. ]]>
  167. </script>
  168. </button>
  169. <group id="group1" visibility="hidden" style="left:70px; top:170px; width:410px; height:170px; ">
  170. <datagrid id="grd_pharmcylist" nodeset="/root/init/main/goodlist" visibility="visible" caption="물품코드^품명" colsep="^" colwidth="102, 270" dataheight="25" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:20px; width:410px; height:150px; ">
  171. <col imemode="alpha" ref="goodcd" type="output" _chartype="upper" _key="true" style="left:161px; top:25px; width:115px; height:25px; text-align:left; "/>
  172. <col ref="goodnm" type="output" style="text-align:left; "/>
  173. <script type="javascript" ev:event="ondblclick">
  174. <![CDATA[
  175. if (isDataCell() == true) {
  176. var row = grd_pharmcylist.row;
  177. var goodcd = model.getValue("/root/init/main/goodlist[" + row + "]/goodcd");
  178. var goodnm = model.getValue("/root/init/main/goodlist[" + row + "]/goodnm");
  179. var row2 = grd_safestoc.row;
  180. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodcd" , goodcd)
  181. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/goodnm" , goodnm)
  182. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/instcd" , model.getValue("/root/main/cond/instcd"));
  183. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/workflag" , "01");
  184. model.setValue("/root/main/safestocinfo/safestoclist[" + row2 + "]/useyn" , "Y")
  185. group1.visible = false;
  186. model.refresh();
  187. }
  188. ]]>
  189. </script>
  190. </datagrid>
  191. <button id="button1" class="btn2_letter3" style="left:340px; top:0px; width:53px; height:19px; ">
  192. <caption>숨기기</caption>
  193. <script type="javascript" ev:event="DOMActivate">
  194. <![CDATA[
  195. model.setValue("/root/main/safestocinfo/safestoclist[" + grd_safestoc.row + "]/goodcd" , "");
  196. model.setValue("/root/main/safestocinfo/safestoclist[" + grd_safestoc.row + "]/goodnm" , "");
  197. group1.visible = false;
  198. model.refresh();
  199. ]]>
  200. </script>
  201. </button>
  202. </group>
  203. <button id="button2" class="btn4_letter2" style="left:614px; top:58px; width:56px; height:22px; ">
  204. <caption>저장</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. model.makeValue("/root/send/savedata/safestoc", grd_safestoc.getUpdateData());
  208. if(submit("TXRSC05501")){
  209. btn_search.dispatch("DOMActivate")
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. <output id="opt_instcdnm" ref="/root/main/cond/instnm" class="output_fix" style="left:105px; top:30px; width:150px; height:19px; text-align:center; "/>
  215. <output id="opt_instcd" ref="/root/main/cond/instcd" class="output_fix" visibility="hidden" style="left:145px; top:60px; width:20px; height:19px; "/>
  216. <select1 id="rdo_useyn" ref="/root/main/cond/useyn" appearance="full" cols="2" overflow="visible" style="left:373px; top:29px; width:100px; height:20px; border-style:none; ">
  217. <choices>
  218. <item>
  219. <label>사용</label>
  220. <value>Y</value>
  221. </item>
  222. <item>
  223. <label>미사용</label>
  224. <value>N</value>
  225. </item>
  226. </choices>
  227. </select1>
  228. <caption id="caption1" class="search_name" style="left:280px; top:29px; width:86px; height:17px; ">사용여부 :</caption>
  229. </xhtml:body>
  230. </xhtml:html>