SMRSC05410_제한부서등록.xrw 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <limreq>
  12. <limreqdeptlist/>
  13. </limreq>
  14. </list>
  15. </main>
  16. <target>
  17. <defaultvalue>
  18. <instcd/>
  19. <instnm/>
  20. <goodcd/>
  21. <goodnm/>
  22. </defaultvalue>
  23. </target>
  24. <send>
  25. <instcd/>
  26. <goodcd/>
  27. <goodnm/>
  28. <instnm/>
  29. <save>
  30. <limreqdeptlist/>
  31. </save>
  32. </send>
  33. <init/>
  34. <hidden/>
  35. <temp/>
  36. </root>
  37. </instance>
  38. <script type="javascript" ev:event="xforms-ready">
  39. <![CDATA[
  40. //화면 Control을 초기화한다
  41. fCheckAuth();
  42. fInitialize();
  43. ]]>
  44. </script>
  45. <submission id="TRRSC05410" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/list/limreq"/>
  46. <submission id="TXRSC05410" ref="/root/send/save" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/hidden/temp"/>
  47. </model>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  50. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  51. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  52. <script type="javascript">
  53. <![CDATA[
  54. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  55. function fInitialize() {
  56. misfGridInit(grd_limdept);
  57. misfMsterDetailSet(grd_limdept,null, "TRRSC05410" ,"Y");
  58. model.setValue("/root/send/instcd", model.getValue(PURTARGET_NODE + "/instcd"));
  59. model.setValue("/root/send/instnm", model.getValue(PURTARGET_NODE + "/instnm"));
  60. model.setValue("/root/send/goodcd", model.getValue(PURTARGET_NODE + "/goodcd"));
  61. model.setValue("/root/send/goodnm", model.getValue(PURTARGET_NODE + "/goodnm"));
  62. btn_search.dispatch("DOMActivate");
  63. model.refresh();
  64. }
  65. function fCheckAuth() {
  66. btn_search.disabled = !checkAuth("R") ;
  67. btn_save.disabled = !checkAuth("X") ;
  68. }
  69. function fCheckSaveData()
  70. {
  71. if(model.getValue(opt_instcd.attribute("ref")).length== 0 )
  72. {
  73. messageBox("기관코드가 존재하지 않아 저장 " ,"E001");
  74. return false;
  75. }
  76. if(model.getValue(opt_goodcd.attribute("ref")).length== 0 )
  77. {
  78. messageBox("물품코드가 존재하지 않아 저장 " ,"E001");
  79. return false;
  80. }
  81. for(var currow = grd_limdept.fixedRows; currow < grd_limdept.rows ; currow++)
  82. {
  83. if(grd_limdept.valueMatrix(currow , grd_limdept.colRef("reqdeptcd")).length == 0)
  84. {
  85. messageBox(currow + " 번째 부서코드를 " ,"C001");
  86. grd_limdept.row = currow;
  87. grd_limdept.col= grd_limdept.colRef("reqdeptcd");
  88. grd_limdept.editCell();
  89. return false;
  90. }
  91. else
  92. {
  93. for(srcrow = currow + 1 ; srcrow < grd_limdept.rows ; srcrow++)
  94. {
  95. if(grd_limdept.valueMatrix(currow , grd_limdept.colRef("reqdeptcd")) == grd_limdept.valueMatrix(srcrow , grd_limdept.colRef("reqdeptcd")))
  96. {
  97. messageBox("동일 부서 코드가 [" + currow + "," +srcrow + "->" + grd_limdept.valueMatrix(currow , grd_limdept.colRef("reqdeptnm")) + "] 존재하여 저장 " ,"E001");
  98. return false;
  99. }
  100. }
  101. }
  102. }
  103. return true;
  104. }
  105. ]]>
  106. </script>
  107. </xhtml:head>
  108. <xhtml:body pagewidth="370" pageheight="690" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  109. <group id="group3" scroll="auto" style="left:0px; top:0px; width:335px; height:680px; ">
  110. <line id="line4" class="line_1" style="x1:0px; y1:101px; x2:333px; y2:101px; "/>
  111. <group id="grp_sea" style="left:0px; top:45px; width:334px; height:35px; vertical-align:top; ">
  112. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:334px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  113. <output id="opt_goodcd" ref="/root/send/goodcd" navindex="2" class="output_fix" visibility="hidden" style="left:165px; top:9px; width:125px; height:19px; text-align:right; "/>
  114. <output id="opt_instcd" ref="/root/send/instcd" navindex="2" class="output_fix" visibility="hidden" style="left:125px; top:9px; width:100px; height:19px; text-align:right; "/>
  115. <caption id="opt_instnm" ref="/root/send/instnm" navindex="2" class="input_fix" editable="false" style="left:5px; top:9px; width:100px; height:19px; text-decoration:underline; text-align:left; "/>
  116. <caption id="opt_goodnm" ref="/root/send/goodnm" navindex="2" class="input_fix" editable="false" style="left:105px; top:9px; width:228px; height:19px; text-decoration:underline; text-align:left; "/>
  117. </group>
  118. <caption id="caption9" class="tit_2" style="left:5px; top:84px; width:140px; height:13px; ">제한부서등록</caption>
  119. <button id="button4" class="btn2_letter3" style="left:280px; top:81px; width:53px; height:19px; ">
  120. <caption>행삭제</caption>
  121. <script type="javascript" ev:event="DOMActivate">
  122. <![CDATA[
  123. misfGridIUD(grd_limdept, "D");
  124. ]]>
  125. </script>
  126. </button>
  127. <button id="button5" class="btn2_letter3" style="left:226px; top:81px; width:53px; height:19px; ">
  128. <caption>행추가</caption>
  129. <script type="javascript" ev:event="DOMActivate">
  130. <![CDATA[
  131. misfGridIUD(grd_limdept, "A");
  132. model.setValue(grd_limdept.nodeset + "["+ grd_limdept.row + "]/instcd" , model.getValue("root/send/instcd"));
  133. model.setValue(grd_limdept.nodeset + "["+ grd_limdept.row + "]/goodcd" , model.getValue("root/send/goodcd"));
  134. ]]>
  135. </script>
  136. </button>
  137. <button id="button1" class="btn4_letter2" style="left:279px; top:655px; width:56px; height:22px; ">
  138. <caption>취소</caption>
  139. </button>
  140. <button id="button28" class="btn4_letter2" style="left:222px; top:655px; width:56px; height:22px; ">
  141. <caption>확인</caption>
  142. </button>
  143. <datagrid id="grd_limdept" nodeset="/root/main/list/limreq/limreqdeptlist" caption="부서^부서" colwidth="110, 200" dataheight="23" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" colsep="^" style="left:0px; top:106px; width:333px; height:548px; ">
  144. <col ref="reqdeptcd" type="inputbutton"/>
  145. <col ref="reqdeptnm"/>
  146. <col ref="goodcd" visibility="hidden"/>
  147. <col ref="instcd" visibility="hidden"/>
  148. <script type="javascript" ev:event="onbuttonclick">
  149. <![CDATA[
  150. if(grd_limdept.colRef("reqdeptcd") == grd_limdept.col)
  151. {
  152. var recv_list = "reqdeptcd,reqdeptnm";
  153. misfOpenPopUpList("02", grd_limdept,"", recv_list) ;
  154. model.refresh();
  155. // rszfOpenPopUpListByWndName(grd_limdept,"","reqdeptcd,reqdeptnm","SPRSD00160","","");
  156. // model.refresh();
  157. }
  158. ]]>
  159. </script>
  160. </datagrid>
  161. <group id="group4" style="left:5px; top:12px; width:329px; height:27px; ">
  162. <line id="line17" class="line_2" style="x1:0px; y1:25px; x2:329px; y2:25px; "/>
  163. <button id="btn_save" class="btn4_letter2" style="left:202px; top:3px; width:56px; height:22px; ">
  164. <caption>저장</caption>
  165. <script type="javascript" ev:event="DOMActivate">
  166. <![CDATA[
  167. if(fCheckSaveData() == false)return;
  168. misfSave("TXRSC05410");
  169. ]]>
  170. </script>
  171. </button>
  172. <button id="btn_clear" class="btn4_letter3" style="left:258px; top:3px; width:68px; height:22px; ">
  173. <caption>초기화</caption>
  174. <script type="javascript" ev:event="DOMActivate">
  175. <![CDATA[
  176. fInitialize();
  177. ]]>
  178. </script>
  179. </button>
  180. <button id="btn_search" navindex="4" class="btn1_letter2" style="left:145px; top:3px; width:56px; height:22px; text-align:left; ">
  181. <caption>조회</caption>
  182. <script type="javascript" ev:event="DOMActivate">
  183. <![CDATA[
  184. misfMsterDetailRetrieve();
  185. ]]>
  186. </script>
  187. </button>
  188. </group>
  189. </group>
  190. <script type="javascript" ev:event="onwindowdeactivate">
  191. <![CDATA[
  192. ]]>
  193. </script>
  194. <script type="javascript" ev:event="DOMFocusOut">
  195. <![CDATA[
  196. if ( checkOpener() ) {
  197. opener.javascript.setParameter("SPRSC00211_", grd_limdept.rows - grd_limdept.fixedRows);
  198. } else {
  199. var rtn = messageBox("상위화면을 찾을 수", "E001");
  200. }
  201. ]]>
  202. </script>
  203. </xhtml:body>
  204. </xhtml:html>