SPRSO20300_창고별물품코드조회(경북대).xrw 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>창고별 물품코드 조회</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <good>
  11. <goodlist/>
  12. </good>
  13. </main>
  14. <send>
  15. <instcd/>
  16. <wareflag/>
  17. <basedd/>
  18. <goodcd/>
  19. <goodnm/>
  20. </send>
  21. <init>
  22. <searchcond/>
  23. <searchtext/>
  24. </init>
  25. <hidden/>
  26. <temp/>
  27. <popdata>
  28. <instcd/>
  29. <wareflag/>
  30. <basedd/>
  31. <returntype/>
  32. </popdata>
  33. </root>
  34. </instance>
  35. <script type="javascript" ev:event="xforms-ready">
  36. <![CDATA[
  37. misfGridInit(grd_good);
  38. misfMsterDetailSet(grd_good, null, "TRRSO20301" ,"N");
  39. //화면 초기값 setting
  40. rdo_cond.value = "코드";
  41. //Opener로부터 받은 parameter값을 조회조건으로 setting함
  42. model.setValue("/root/send/instcd", model.getValue("/root/popdata/instcd"));
  43. model.setValue("/root/send/wareflag", model.getValue("/root/popdata/wareflag"));
  44. //2012.09.17 박준범 - 물품마스터 조회 기준일자 추가
  45. model.setValue("/root/send/basedd", model.getValue("/root/popdata/basedd"));
  46. model.setFocus("ipt_search");
  47. ]]>
  48. </script>
  49. <submission id="TRRSO20301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/good"/>
  50. </model>
  51. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  54. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  55. </xhtml:head>
  56. <xhtml:body pagewidth="616" pageheight="400">
  57. <line id="line8" class="line_1" style="x1:10px; y1:72px; x2:605px; y2:72px; "/>
  58. <caption id="caption20" class="tit_2" style="left:11px; top:57px; width:184px; height:14px; ">물품코드</caption>
  59. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:10px; top:10px; width:595px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  60. <button id="btn_cancel" class="btn4_letter2" style="left:540px; top:365px; width:56px; height:22px; ">
  61. <caption>취소</caption>
  62. <script type="javascript" ev:event="DOMActivate">
  63. <![CDATA[
  64. //선택버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
  65. opener.model.setValue("/root/popgood/selectyn", "N");
  66. window.close();
  67. ]]>
  68. </script>
  69. </button>
  70. <button id="btn_select" class="btn4_letter2" style="left:480px; top:365px; width:56px; height:22px; ">
  71. <caption>선택</caption>
  72. <script type="javascript" ev:event="DOMActivate">
  73. <![CDATA[
  74. //조회 결과가 no rows 일 때
  75. if(grd_good.rows == 1) {
  76. return;
  77. }
  78. //선택버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
  79. opener.model.setValue("/root/popgood/selectyn", "Y");
  80. //선택한 물품코드를 opener에 setting한다.
  81. opener.model.setValue("/root/popgood/goodcd", model.getValue(grd_good.nodeset + "[" + grd_good.row + "]/goodcd"));
  82. //opener에서 goodnm 도 함께 return 받고자 하는 경우에, opener에서 returntype을 2로 설정하여 본 화면을 call 하면 됨.(SMRSO21100 참조)
  83. if( model.getValue("/root/popdata/returntype") == "2" ) {
  84. opener.model.setValue("/root/popgood/goodnm", model.getValue(grd_good.nodeset + "[" + grd_good.row + "]/goodnm"));
  85. }
  86. window.close();
  87. ]]>
  88. </script>
  89. </button>
  90. <select1 id="rdo_cond" ref="/root/init/searchcond" appearance="full" cols="2" overflow="visible" style="left:30px; top:20px; width:95px; height:20px; border-style:none; ">
  91. <choices>
  92. <item>
  93. <label>코드</label>
  94. <value>코드</value>
  95. </item>
  96. <item>
  97. <label>명칭</label>
  98. <value>명칭</value>
  99. </item>
  100. </choices>
  101. <script type="javascript" ev:event="onclick">
  102. <![CDATA[
  103. //검색어 부분으로 focus 옮김
  104. model.setFocus("ipt_search");
  105. //ipt_search.selBegin = 0;
  106. ]]>
  107. </script>
  108. </select1>
  109. <input id="ipt_search" ref="/root/init/searchtext" class="input1" navindex="1" style="left:124px; top:18px; width:136px; height:19px; ">
  110. <script type="javascript" ev:event="onkeypress">
  111. <![CDATA[
  112. if( event.keyCode == 13 ) {
  113. //btn_search.dispatch("DOMActivate");
  114. // --> 위의 코드를 사용하면 input에 입력된 값이 인식이 안됨. TrustForm bug 같습니다.
  115. // --> 대신, 아래 코드 사용하면 input의 값이 인식이 됨
  116. //input 에서 EnterKey 이벤트 인식시 아래 function을 사용하세요!!
  117. inputEnterKey("btn_search", "DOMActivate");
  118. }
  119. ]]>
  120. </script>
  121. </input>
  122. <line id="line13" class="line_4" style="x1:279px; y1:17px; x2:279px; y2:39px; "/>
  123. <button id="btn_search" class="btn1_letter2" style="left:295px; top:17px; width:56px; height:22px; ">
  124. <caption>조회</caption>
  125. <script type="javascript" ev:event="DOMActivate">
  126. <![CDATA[
  127. //검색어를 입력하지 않았을 경우
  128. if( ipt_search.value == "" ) {
  129. messageBox("검색어를 입력하십시요", "I999", "");
  130. model.setFocus("ipt_search");
  131. return;
  132. }
  133. //조회조건 setting함
  134. if(rdo_cond.value == "코드") {
  135. model.setValue("/root/send/goodcd", model.getValue("/root/init/searchtext"));
  136. model.setValue("/root/send/goodnm", "");
  137. }else{
  138. model.setValue("/root/send/goodcd", "");
  139. model.setValue("/root/send/goodnm", model.getValue("/root/init/searchtext"));
  140. }
  141. misfMsterDetailRetrieve();
  142. //조회 결과가 없는 경우
  143. if(grd_good.rows == 1) {
  144. model.setFocus("ipt_search");
  145. }
  146. ]]>
  147. </script>
  148. </button>
  149. <datagrid id="grd_good" nodeset="/root/main/good/goodlist" visibility="visible" caption="물품코드^물품명^규격^단위^BOX수량^" colwidth="77, 236, 153, 49, 60" mergecellsfixedrows="bycolrec" style="left:10px; top:77px; width:595px; height:278px; ">
  150. <col ref="goodcd" style="text-align:center; "/>
  151. <col ref="goodnm"/>
  152. <col ref="goodspec"/>
  153. <col ref="deliveunit" style="text-align:center; "/>
  154. <col ref="exchqty" format="#,###.##" style="text-align:right; "/>
  155. <script type="javascript" ev:event="ondblclick">
  156. <![CDATA[
  157. btn_select.dispatch("DOMActivate");
  158. ]]>
  159. </script>
  160. <script type="javascript" ev:event="onkeypress">
  161. <![CDATA[
  162. if(event.keyCode == 13) {
  163. btn_select.dispatch("DOMActivate");
  164. }
  165. ]]>
  166. </script>
  167. </datagrid>
  168. </xhtml:body>
  169. </xhtml:html>