KUCPB00050_배부기준값등록.xrw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>원가 배부기준값 등록 ( w_won0e050 )</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <masterinfo>
  11. <masterlist/>
  12. </masterinfo>
  13. <detailinfo>
  14. <detaillist/>
  15. </detailinfo>
  16. </main>
  17. <init>
  18. </init>
  19. <send>
  20. <reqdata/>
  21. <savedata/>
  22. </send>
  23. <hidden>
  24. <commoninfo>
  25. <perchgrlist1>
  26. <cmb_data/>
  27. </perchgrlist1>
  28. <perchgrlist2>
  29. <cmb_data/>
  30. </perchgrlist2>
  31. <perchgrlist3>
  32. <cmb_data/>
  33. </perchgrlist3>
  34. <perchgrlist4>
  35. <cmb_data/>
  36. </perchgrlist4>
  37. <perchgrlist5>
  38. <cmb_data/>
  39. </perchgrlist5>
  40. <acntlist/>
  41. <perchgrlist6>
  42. <cmb_data/>
  43. </perchgrlist6>
  44. <perchgrlist7>
  45. <cmb_data/>
  46. </perchgrlist7>
  47. <perchgrlist8>
  48. <cmb_data/>
  49. </perchgrlist8>
  50. </commoninfo>
  51. </hidden>
  52. </root>
  53. </instance>
  54. <script type="javascript" ev:event="xforms-ready">
  55. <![CDATA[
  56. model.removeNodeset("/root/main/acntperchgrinfo/acntperchgrlist");
  57. //misfComboComCdList("030M0006" ,cmb_sanctflag);
  58. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  59. model.makeValue("/root/send/reqdata/SQLid", "d_won0e50_header_mis");
  60. model.makeValue("/root/send/reqdata/table_id", "masterlist");
  61. if(submit("TRRPB00052")){
  62. }
  63. model.refresh();
  64. ]]>
  65. </script>
  66. <submission id="TXRPB00051" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/detailinfo"/>
  67. <submission id="TRRPB00052" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/masterinfo"/>
  68. <submission id="TRRPB00053" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/detailinfo"/>
  69. <submission id="TRRPB01052" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/hidden/commoninfo/perchgrlist1"/>
  70. </model>
  71. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  73. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  74. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  75. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  76. </xhtml:head>
  77. <xhtml:body pagewidth="1200" pageheight="750" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  78. <group id="group3" scroll="auto" style="left:8px; top:0px; width:1197px; height:730px; ">
  79. <line id="line1" class="line_1" style="x1:0px; y1:41px; x2:1180px; y2:41px; "/>
  80. <datagrid id="grd_masterlist" nodeset="/root/main/masterinfo/masterlist" caption="배부코드^배부기준 명칭^비고^기관코드" colsep="^" colwidth="65, 206, 324, 100" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" tooltip="true" style="left:0px; top:50px; width:575px; height:650px; ">
  81. <col ref="baebu_code" type="input" style="text-align:center; "/>
  82. <col editmode="inputsearch" itemcount="20" ref="baebu_name" type="input" showmask="true" style="text-align:left; "/>
  83. <col ref="bigo" type="input"/>
  84. <col ref="instcd" type="input"/>
  85. <script type="javascript" ev:event="onrowchanged">
  86. <![CDATA[
  87. if (getGridUpdateData(grd_detaillist) != "") {
  88. var save_val = messageBox("변경된 자료가 존재 합니다. ", "Q002");
  89. if (save_val == "6") {
  90. btn_save.dispatch("DOMActivate");
  91. }
  92. }
  93. var cur_row = grd_masterlist.row;
  94. var bbcd = grd_masterlist.valueMatrix(cur_row, grd_masterlist.colRef("baebu_code"));
  95. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  96. model.makeValue("/root/send/reqdata/baebu_code", bbcd);
  97. model.makeValue("/root/send/reqdata/SQLid", "d_won0110_mis");
  98. model.makeValue("/root/send/reqdata/table_id", "detaillist");
  99. if(submit("TRRPB00053")){
  100. grd_detaillist.subtotal("sum", 1, 5, "#,##0.0", "background-color:#99ff99", 4, "기준값 합계");
  101. }
  102. model.refresh();
  103. if(grd_detaillist.rows>1) {
  104. grd_detaillist.row=1;
  105. }
  106. grd_detaillist.dispatch("onrowchanged");
  107. model.setFocus("grd_detaillist");
  108. //grd_masterlist.dispatch("onmouseup");
  109. ]]>
  110. </script>
  111. </datagrid>
  112. <group id="group2" style="left:0px; top:0px; width:465px; height:13px; ">
  113. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:255px; height:14px; color:#000000; ">원가 배부기준값 등록 ( w_won0e050 )</caption>
  114. </group>
  115. <button id="btn_chrtdeptdel" class="btn2_letter3" style="left:1062px; top:20px; width:53px; height:19px; ">
  116. <caption>행삭제</caption>
  117. <script type="javascript" ev:event="DOMActivate">
  118. <![CDATA[
  119. if((grd_detaillist.rowStatus(grd_detaillist.row)=="1")||(grd_detaillist.rowStatus(grd_detaillist.row)=="3")){
  120. grd_detaillist.deleteRow(grd_detaillist.row);
  121. }else{
  122. grd_detaillist.rowStatus(grd_detaillist.row) ="4";
  123. }
  124. ]]>
  125. </script>
  126. </button>
  127. <button id="btn_chrtdeptadd" class="btn2_letter3" style="left:1005px; top:20px; width:53px; height:19px; ">
  128. <caption>행추가</caption>
  129. <script type="javascript" ev:event="DOMActivate">
  130. <![CDATA[
  131. if ( grd_detaillist.rows > 0 ) grd_detaillist.removeRow();
  132. grd_detaillist.addRow();
  133. model.setValue("/root/main/detailinfo/detaillist["+grd_detaillist.row+"]/instcd",getUserInfo("dutplceinstcd"));
  134. var cur_row = grd_masterlist.row;
  135. var bbcd = grd_masterlist.valueMatrix(cur_row, grd_masterlist.colRef("baebu_code"));
  136. model.setValue("/root/main/detailinfo/detaillist["+grd_detaillist.row+"]/baebu_code",bbcd);
  137. model.setValue("/root/main/detailinfo/detaillist["+grd_detaillist.row+"]/dist_value",0);
  138. model.setValue("/root/main/detailinfo/detaillist["+grd_detaillist.row+"]/dist_value_tot",0);
  139. grd_detaillist.subtotal("sum", 1, 5, "#,##0.0", "background-color:#99ff99", 4, "기준값 합계");
  140. model.setFocus("grd_detaillist");
  141. grd_detaillist.col = grd_detaillist.colRef("bumon_code");
  142. grd_detaillist.editCell();
  143. ]]>
  144. </script>
  145. </button>
  146. <button id="btn_save" class="btn4_letter2" style="left:1120px; top:15px; width:56px; height:22px; ">
  147. <caption>저장</caption>
  148. <script type="javascript" ev:event="DOMActivate">
  149. <![CDATA[
  150. var ll_dist_value_tot = 0 , i ;
  151. for ( i = 1 ; i < grd_detaillist.rows-1; i++ )
  152. {
  153. if(grd_detaillist.rowStatus(i) != 4)
  154. {
  155. ll_dist_value_tot = ll_dist_value_tot + parseFloat( grd_detaillist.valueMatrix(i, grd_detaillist.colRef("dist_value") ) ) ;
  156. }
  157. }
  158. for ( i = 1 ; i < grd_detaillist.rows-1; i++ )
  159. {
  160. model.setValue("/root/main/detailinfo/detaillist["+ i +"]/dist_value_tot ", ll_dist_value_tot );
  161. if ( grd_detaillist.rowStatus(i) == 0) grd_detaillist.rowStatus(i) = 2 ;
  162. }
  163. model.refresh();
  164. model.makeValue("/root/send/savedata/DataGridList",grd_detaillist.getUpdateData());
  165. if(submit("TXRPB00051")){
  166. grd_masterlist.dispatch("onrowchanged");
  167. }
  168. ]]>
  169. </script>
  170. </button>
  171. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:520px; top:15px; width:56px; height:22px; text-align:left; ">
  172. <caption>조회</caption>
  173. <script type="javascript" ev:event="DOMActivate">
  174. <![CDATA[
  175. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  176. model.makeValue("/root/send/reqdata/SQLid", "d_won0e50_header_mis");
  177. model.makeValue("/root/send/reqdata/table_id", "masterlist");
  178. if(submit("TRRPB00052")){
  179. model.removeNodeset("/root/send/reqdata");
  180. }
  181. model.refresh();
  182. ]]>
  183. </script>
  184. </button>
  185. <select1 id="cmb_sanctflag" ref="/root/cond/sanctflag" class="combo_s_fix" visibility="hidden" appearance="minimal" style="left:620px; top:15px; width:135px; height:19px; text-align:center; ">
  186. <choices>
  187. <itemset nodeset="/root/init/sanctflag">
  188. <label ref="cdnm"/>
  189. <value ref="cdid"/>
  190. </itemset>
  191. </choices>
  192. </select1>
  193. <datagrid id="grd_detaillist" nodeset="/root/main/detailinfo/detaillist" caption="배부코드^부문코드^부문코드명^기준값 합계^기준값^기관코드" colsep="^" colwidth="60, 87, 204, 98, 115, 100" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" subtotalposition="below" tooltip="true" style="left:580px; top:45px; width:600px; height:650px; ">
  194. <col editable="false" ref="baebu_code" type="input" style="text-align:center; "/>
  195. <col class="input_essential" disabled="true" editmode="inputsearch" itemcount="20" ref="bumon_code" type="input" showmask="true" style="text-align:left; "/>
  196. <col editable="false" editmode="inputsearch" itemcount="20" ref="bumom_name" type="input"/>
  197. <col editable="false" editmode="inputsearch" itemcount="20" ref="dist_value_tot" type="input" format="#,##0.0" showmask="true" style="text-align:right; "/>
  198. <col ref="dist_value" type="input" format="#,##0.0" showmask="true" style="text-align:right; "/>
  199. <col editable="false" ref="instcd" type="input"/>
  200. <script type="javascript" ev:event="xforms-value-changed">
  201. <![CDATA[
  202. if (grd_detaillist.col == 2) {//부문코드가 변경
  203. var cur_row = grd_detaillist.row;
  204. var bmcd = grd_detaillist.valueMatrix(cur_row, grd_detaillist.colRef("bumon_code"));
  205. model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
  206. model.makeValue("/root/send/reqdata/bumon_code", bmcd);
  207. model.makeValue("/root/send/reqdata/SQLid", "get_bumom_name");
  208. model.makeValue("/root/send/reqdata/table_id", "cmb_data");
  209. if(submit("TRRPB01052")){
  210. model.setValue("/root/main/detailinfo/detaillist["+cur_row+"]/bumom_name",model.getValue("/root/hidden/commoninfo/perchgrlist1/cmb_data[1]/cdnm"));
  211. }
  212. }else if(grd_detaillist.col == 5) { //기준값이 변경 되었을 때
  213. grd_detaillist.removeRow();
  214. grd_detaillist.subtotal("sum", 1, 5, "#,##0.0", "background-color:#99ff99", 4, "기준값 합계");
  215. }
  216. ]]>
  217. </script>
  218. </datagrid>
  219. </group>
  220. </xhtml:body>
  221. </xhtml:html>