SPRSI10200_구매계약조회(경북대).xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. <list>
  11. <purcconinfo>
  12. <purcconlist/>
  13. </purcconinfo>
  14. <purcconnoinfo>
  15. <maxpurcconno>
  16. <purcconno/>
  17. </maxpurcconno>
  18. </purcconnoinfo>
  19. </list>
  20. </main>
  21. <target/>
  22. <init>
  23. </init>
  24. <send>
  25. <search>
  26. <instcd/>
  27. <teamflag/>
  28. <acntcd/>
  29. <purccondd/>
  30. <purcconno/>
  31. <bizflag>C</bizflag>
  32. </search>
  33. <nosearch>
  34. <instcd/>
  35. <purccondd/>
  36. </nosearch>
  37. </send>
  38. <temp/>
  39. </root>
  40. </instance>
  41. <script type="javascript">
  42. <![CDATA[
  43. function fInitialize()
  44. {
  45. // 금일 날자 설정
  46. var curdate = getCurrentDate();
  47. var cvtdate = curdate.toDate("YYYYMMDD");
  48. var csv_acntcd = opener.window.javascript.getParameter("parainfo_acntcd");
  49. var csv_teamflag = opener.window.javascript.getParameter("parainfo_teamflag");
  50. misfGridComboComCdList("030M0011",grd_coninfo,"chkflag");
  51. model.removenode("/root/main/list/purcconinfo/purcconlist");
  52. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); // 기관코드
  53. model.setValue(ipt_acntcd.attribute("ref") , csv_acntcd); // 계정코드
  54. model.setValue(ipt_teamflag.attribute("ref") , csv_teamflag); // 계정코드
  55. model.setValue(cal_purccondd.attribute("ref") , curdate); // 계약일자
  56. cal_purccondd.dispatch("xforms-value-changed");
  57. btn_search.dispatch("DOMActivate");
  58. model.refresh();
  59. }
  60. ]]>
  61. </script>
  62. <script type="javascript" ev:event="xforms-ready">
  63. <![CDATA[
  64. fInitialize();
  65. ]]>
  66. </script>
  67. <submission id="TRRSP00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nosearch" resultref="/root/main/list/purcconnoinfo"/>
  68. <submission id="TRRSP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list/purcconinfo"/>
  69. </model>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  76. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  77. <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
  78. </xhtml:head>
  79. <xhtml:body pagewidth="1100" pageheight="480" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  80. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:600px; height:14px; ">구매계약 조회</caption>
  81. <button id="btn_confirm" class="btn4_letter2" style="left:1015px; top:440px; width:56px; height:22px; ">
  82. <caption>닫기</caption>
  83. <script type="javascript" ev:event="DOMActivate">
  84. <![CDATA[
  85. model.close();
  86. ]]>
  87. </script>
  88. </button>
  89. <group id="grp_search" style="left:0px; top:22px; width:1080px; height:48px; vertical-align:top; ">
  90. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1075px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  91. <button id="btn_search" class="btn1_letter2" style="left:1005px; top:7px; width:56px; height:22px; ">
  92. <caption>조회</caption>
  93. <script type="javascript" ev:event="DOMActivate">
  94. <![CDATA[
  95. model.removeNodeset("/root/main/list/purcconinfo/purcconlist");
  96. if (submit("TRRSP00101")){
  97. for (var i = grd_coninfo.fixedRows;i<grd_coninfo.rows;i++){
  98. var chkqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkqty" )));
  99. var conqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("conqty" )));
  100. var spreqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("spreqty")));
  101. if (spreqty <= 0){
  102. grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "";
  103. }else if ((conqty - chkqty) > spreqty){
  104. grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "M";
  105. }else if ((conqty - chkqty) == spreqty){
  106. grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "Y";
  107. }else{
  108. grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "";
  109. }
  110. }
  111. }
  112. ]]>
  113. </script>
  114. </button>
  115. <input id="cal_purccondd" ref="/root/send/search/purccondd" inputtype="date" style="left:101px; top:10px; width:105px; height:19px; ">
  116. <script type="javascript" ev:event="xforms-value-changed">
  117. <![CDATA[
  118. model.setValue("/root/send/nosearch/instcd" , model.getValue(ipt_instcd.attribute("ref")));
  119. model.setValue("/root/send/nosearch/purccondd" , model.getValue(cal_purccondd.attribute("ref")));
  120. if (submit("TRRSP00102")){
  121. var purcconno = model.getValue("/root/main/list/purcconnoinfo/maxpurcconno/purcconno");
  122. model.setValue(ipt_purcconno.attribute("ref"), purcconno);
  123. }
  124. model.setValue("/root/send/nosearch/instcd" , "");
  125. model.setValue("/root/send/nosearch/purccondd" , "");
  126. model.setFocus("ipt_purcconno");
  127. model.refresh();
  128. ]]>
  129. </script>
  130. </input>
  131. <caption id="caption20" class="search_name" style="left:10px; top:10px; width:96px; height:17px; vertical-align:middle; ">계약일자 :</caption>
  132. <input id="ipt_purcconno" ref="/root/send/search/purcconno" class="input_default" style="left:215px; top:10px; width:75px; height:19px; text-align:center; ">
  133. <script type="javascript" ev:event="onkeyup">
  134. <![CDATA[
  135. inputEnterKey("btn_search", "DOMActivate");
  136. ]]>
  137. </script>
  138. </input>
  139. <input id="ipt_instcd" ref="/root/send/search/instcd" class="input_default" disabled="true" visibility="hidden" style="left:315px; top:10px; width:75px; height:19px; text-align:center; "/>
  140. <input id="ipt_acntcd" ref="/root/send/search/acntcd" class="input_default" disabled="true" visibility="hidden" style="left:405px; top:10px; width:75px; height:19px; text-align:center; "/>
  141. <input id="ipt_teamflag" ref="/root/send/search/teamflag" class="input_default" disabled="true" visibility="hidden" style="left:490px; top:10px; width:75px; height:19px; text-align:center; "/>
  142. </group>
  143. <caption id="caption4" class="tit_2" style="left:10px; top:79px; width:131px; height:13px; ">구매계약 내역</caption>
  144. <line id="line2" class="line_1" style="x1:1px; y1:99px; x2:1072px; y2:99px; "/>
  145. <button id="button1" class="btn4_letter2" style="left:945px; top:440px; width:56px; height:22px; ">
  146. <caption>적용</caption>
  147. <script type="javascript" ev:event="DOMActivate">
  148. <![CDATA[
  149. var iParam = model.getValue(grd_coninfo.nodeset);
  150. var nodelist = instance1.selectNodes(grd_coninfo.nodeset);
  151. var rCVS = getNodeListCSV(nodelist);
  152. for (var i=grd_coninfo.fixedRows;i<grd_coninfo.rows;i++){
  153. if (grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")).getTrim() == ""){
  154. messageBox(i +"번째에 검수구분이 입력되지 ", "E007");
  155. return;
  156. }
  157. }
  158. if ( checkOpener() ) {
  159. opener.javascript.setParameter("SMRSD00400_", rCVS);
  160. } else {
  161. var rtn = messageBox("상위화면을 찾을 수", "E001");
  162. }
  163. model.close();
  164. ]]>
  165. </script>
  166. </button>
  167. <datagrid id="grd_coninfo" nodeset="/root/main/list/purcconinfo/purcconsublist" caption="순번^품명코드/명칭^품명코드/명칭^품명코드/명칭^규격^단위^BOX수^계약량^검수량^잔여량^요구부서코드^요구부서^검수구분^단가^계약일자^계약번호^팀구분^계정코드" colsep="^" colwidth="54, 84, 26, 128, 135, 50, 54, 63, 56, 59, 18, 100, 100, 80, 25, 21, 33, 26" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="24" rowsep="|" style="left:1px; top:105px; width:1070px; height:320px; font-weight:normal; text-align:center; ">
  168. <col ref="purcconseq" type="output" _key="true" style="text-align:center; "/>
  169. <col ref="goodcd" type="output" _key="true" style="text-align:center; "/>
  170. <col ref="allsizespecid" type="output" _key="true" style="text-align:center; "/>
  171. <col ref="goodnm" type="output" style="text-align:left; padding-left:10; "/>
  172. <col ref="goodspec" type="output" style="text-align:left; padding-left:10; "/>
  173. <col ref="conunit" type="output" style="text-align:left; padding-left:10; "/>
  174. <col ref="reqpackcntperunit" format="#,###" style="text-align:right; "/>
  175. <col ref="conqty" format="#,###" style="text-align:right; "/>
  176. <col ref="chkqty" format="#,###" style="text-align:right; "/>
  177. <col ref="spreqty" type="input" format="#,###" style="text-align:right; "/>
  178. <col ref="reqdeptcd" visibility="hidden"/>
  179. <col ref="reqdeptnm" style="text-align:left; padding-left:10; "/>
  180. <col disabled="true" ref="chkflag" type="combo">
  181. <choices>
  182. <itemset>
  183. <label/>
  184. <value/>
  185. </itemset>
  186. </choices>
  187. </col>
  188. <col ref="congoodunitcost" format="#,###" style="text-align:right; "/>
  189. <col ref="purccondd" visibility="hidden"/>
  190. <col ref="purcconno" visibility="hidden"/>
  191. <col ref="teamflag" visibility="hidden"/>
  192. <col ref="acntcd" visibility="hidden"/>
  193. <script type="javascript" ev:event="xforms-value-changed">
  194. <![CDATA[
  195. if( grd_coninfo.col == grd_coninfo.colRef("spreqty")){
  196. var chkqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkqty" )));
  197. var conqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("conqty" )));
  198. var spreqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("spreqty")));
  199. /*if (chkqty < spreqty){
  200. messageBox("잔여량이 검수량을 초과할수 ","I004");
  201. grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("spreqty")) = "0";
  202. }*/
  203. if (spreqty <= 0){
  204. grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "";
  205. }else if ((conqty - chkqty) > spreqty){
  206. grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "M";
  207. }else if ((conqty - chkqty) == spreqty){
  208. grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "Y";
  209. }else{
  210. grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "";
  211. }
  212. }
  213. ]]>
  214. </script>
  215. </datagrid>
  216. </xhtml:body>
  217. </xhtml:html>