SMAVB00400_묶음코드관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMAVB00100.xrw
  4. * 설 명 : 조직은행 기본코드관리
  5. * 설 계 자 : 손승현
  6. * 작 성 자 : 손승현
  7. * 작 성 일 : 2010.06.29
  8. * 수정이력 : 2010.06.29 손승현 신규
  9. * 기 타 :
  10. -->
  11. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  12. <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">
  13. <xhtml:head>
  14. <xhtml:title>조직은행 묶음코드관리</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <bdcdlstmst>
  20. <item>
  21. <bdlcd/>
  22. <bdlnm/>
  23. <useyn/>
  24. </item>
  25. </bdcdlstmst>
  26. <bdcdlstdtl>
  27. <item>
  28. <bandcd/>
  29. <bandmcd/>
  30. <banddcd/>
  31. <banddnm/>
  32. <gbmcd/>
  33. <gbdcd/>
  34. <qty/>
  35. <useyn/>
  36. </item>
  37. </bdcdlstdtl>
  38. </main>
  39. <send>
  40. <srchbdlcd/>
  41. <srchbdlnm/>
  42. <bdlcd/>
  43. <bandcd/>
  44. <req>
  45. <savedata/>
  46. <bdlcd/>
  47. <bandcd/>
  48. </req>
  49. </send>
  50. <init>
  51. <combobscdlst/>
  52. </init>
  53. <hidden>
  54. <item/>
  55. </hidden>
  56. <temp>
  57. <templst/>
  58. </temp>
  59. </root>
  60. </instance>
  61. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  62. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  63. <script type="javascript" src="../../../ast/tissuebankbaseweb/js/tissuebankcombolist.js"/>
  64. <script type="javascript" ev:event="xforms-ready">
  65. <![CDATA[
  66. fGetPtcdInputInit();
  67. fGetBdCdListMst();
  68. ]]>
  69. </script>
  70. <submission id="TRAVB00001"/>
  71. <submission id="TRAVB00401" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bdcdlstmst"/>
  72. <submission id="TRAVB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bdcdlstdtl"/>
  73. <submission id="TXAVB00401" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  74. <submission id="TXAVB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hiden"/>
  75. </model>
  76. <script type="javascript">
  77. <![CDATA[
  78. /**
  79. * 콤보 초기화
  80. */
  81. function fGetPtcdInputInit(){
  82. tbGetBscdList( new Array("C04", "C06"), new Array("/root/init/combobscdlst", "/root/init/combobscdlst") );
  83. }
  84. /**
  85. * 묶음코드 리스트 조회
  86. */
  87. function fGetBdCdListMst(){
  88. model.removeNodeset("/root/main/bdcdlstmst/item");
  89. model.removeNodeset("/root/main/bdcdlstdtl/item");
  90. model.refresh();
  91. model.setValue("root/send/bandcd", "-");
  92. var ret = submit("TRAVB00401");
  93. return ret;
  94. }
  95. /**
  96. * 상세코드 리스트 조회
  97. */
  98. function fGetBdCdListDtl(){
  99. var idx = grd_bdllst.row;
  100. if( idx < 1) return ;
  101. model.removeNodeset("/root/main/bdcdlstdtl/item");
  102. model.refresh();
  103. model.setValue("root/send/bdlcd", model.getValue(grd_bdllst.nodeset + "[" + idx + "]/bdlcd" ) );
  104. model.setValue("root/send/bandcd", "" );
  105. var ret = submit("TRAVB00402");
  106. return ret;
  107. }
  108. /**
  109. * 초기화
  110. */
  111. function fBdcdmstclear(){
  112. model.removeNodeset("/root/main/bdcdlstmst/item");
  113. model.removeNodeset("/root/main/bdcdlstdtl/item");
  114. model.refresh();
  115. }
  116. function fBdcddtlclear(){
  117. model.removeNodeset("/root/main/bdcdlstdtl/item");
  118. model.refresh();
  119. }
  120. /**
  121. * 분류코드 저장
  122. */
  123. function fSaveBdCdMst(){
  124. if( ! getGridUpdateData(grd_bdllst) )
  125. {
  126. alert("저장할 내역이 없습니다.");
  127. return ;
  128. }
  129. var rsv_cnt = grd_bdllst.rows ;
  130. var sNode = grd_bdllst.nodeset+ "[";
  131. for( var i = 1; i < rsv_cnt ; i++){
  132. if( model.getValue(sNode + i + "]/bdlcd" ) == "") {
  133. alert("묶음코드의 코드값이 비어있습니다.");
  134. return ;
  135. }
  136. }
  137. var ret = false;
  138. if ( messageBox("묶음코드정보를","Q002")==6 ) {
  139. model.setValue("/root/send/req/savedata", grd_bdllst.getUpdateData());
  140. model.setValue("/root/send/req/bandcd", "-");
  141. ret = submit("TXAVB00401");
  142. }
  143. return ret;
  144. }
  145. /**
  146. * 상세코드 저장
  147. */
  148. function fSaveDetlCode(){
  149. // 저장할 건이 존재하는지 체크
  150. var idx = grd_bdllst.row;
  151. if( idx < 1) return ;
  152. if( ! getGridUpdateData(grd_detlcodelst) )
  153. {
  154. alert("저장할 내역이 없습니다.");
  155. return ;
  156. }
  157. // 저장할지 확인후 저장
  158. var ret = false;
  159. if ( messageBox("상세코드정보를","Q002")==6 ) {
  160. model.setValue("/root/send/req/savedata", grd_detlcodelst.getUpdateData());
  161. model.setValue("/root/send/req/bdlcd", model.getValue(grd_bdllst.nodeset + "[" + idx + "]/bdlcd" ) );
  162. ret = submit("TXAVB00402");
  163. }
  164. return ret;
  165. }
  166. ]]>
  167. </script>
  168. </xhtml:head>
  169. <xhtml:body>
  170. <group id="grp_title" style="left:0px; top:0px; width:1195px; height:13px; ">
  171. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; ">조직은행 묶음코드관리</caption>
  172. </group>
  173. <group id="group1" style="left:0px; top:13px; width:1195px; height:744px; ">
  174. <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  175. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  176. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  177. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  178. <caption>조회</caption>
  179. <script type="javascript" ev:event="DOMActivate">
  180. <![CDATA[
  181. fGetBdCdListMst();
  182. ]]>
  183. </script>
  184. </button>
  185. <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">묶음코드 :</caption>
  186. <caption id="caption5" class="search_name" style="left:195px; top:9px; width:90px; height:17px; ">묶 음 명 :</caption>
  187. <input id="ipt_partnm" ref="/root/send/srchbdlnm" class="input_search" style="left:280px; top:8px; width:200px; height:19px; ">
  188. <script type="javascript" ev:event="onkeydown">
  189. <![CDATA[
  190. inputEnterKey("btn_search","DOMActivate");
  191. ]]>
  192. </script>
  193. </input>
  194. <input id="ipt_partcd" ref="/root/send/srchbdlcd" class="input_search" style="left:103px; top:8px; width:70px; height:19px; ">
  195. <script type="javascript" ev:event="onkeydown">
  196. <![CDATA[
  197. inputEnterKey("btn_search","DOMActivate");
  198. ]]>
  199. </script>
  200. </input>
  201. </group>
  202. <caption id="caption3" class="tit_2" style="left:5px; top:55px; width:78px; height:14px; ">묶음코드</caption>
  203. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:594px; y2:70px; "/>
  204. <datagrid id="grd_bdllst" nodeset="/root/main/bdcdlstmst/item" caption="묶음코드^묶음코드명^적용여부" colsep="^" colwidth="100, 373, 99" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:594px; height:663px; ">
  205. <col disabled="false" imemode="alpha" ref="bdlcd" type="input" maxlength="10"/>
  206. <col imemode="hangul" ref="bdlnm" type="input" maxlength="50"/>
  207. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  208. <script type="javascript" ev:event="ondblclick">
  209. <![CDATA[
  210. fGetBdCdListDtl();
  211. ]]>
  212. </script>
  213. </datagrid>
  214. <caption id="caption4" class="tit_2" style="left:606px; top:55px; width:78px; height:14px; ">상세코드</caption>
  215. <datagrid id="grd_detlcodelst" nodeset="/root/main/bdcdlstdtl/item" caption="밴드M^밴드^상세코드^상세코드명^구분M^구분^수량^적용여부" colsep="^" colwidth="50, 80, 60, 280, 60, 77, 40, 80" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:600px; top:75px; width:594px; height:663px; ">
  216. <col ref="bandcd" visibility="hidden"/>
  217. <col disabled="true" ref="bandmcd" type="combo" maxlength="50">
  218. <choices>
  219. <itemset nodeset="/root/init/combobscdlst/C04">
  220. <label ref="cdnm"/>
  221. <value ref="cdid"/>
  222. </itemset>
  223. </choices>
  224. </col>
  225. <col ref="banddcd" visibility="hidden"/>
  226. <col imemode="hangul" ref="banddnm" type="output" maxlength="50"/>
  227. <col ref="gbmcd" visibility="hidden"/>
  228. <col disabled="true" ref="gbdcd" type="combo" maxlength="50">
  229. <choices>
  230. <itemset nodeset="/root/init/combobscdlst/C06">
  231. <label ref="cdnm"/>
  232. <value ref="cdid"/>
  233. </itemset>
  234. </choices>
  235. </col>
  236. <col ref="qty" type="input" format="(+,-)#,###.##" maxlength="6" style="text-align:right; "/>
  237. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  238. </datagrid>
  239. <line id="line2" class="line_1" style="x1:601px; y1:70px; x2:1195px; y2:70px; "/>
  240. <button id="button2" class="btn2_letter3" style="left:484px; top:50px; width:53px; height:19px; ">
  241. <caption>행추가</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. grd_bdllst.addItem();
  245. grd_bdllst.col = 1;
  246. grd_bdllst.editCell();
  247. ]]>
  248. </script>
  249. </button>
  250. <button id="btn_grddel" class="btn2_letter3" style="left:540px; top:50px; width:53px; height:19px; ">
  251. <caption>행삭제</caption>
  252. <script type="javascript" ev:event="DOMActivate">
  253. <![CDATA[
  254. deleteSelectedRows(grd_bdllst, true);
  255. ]]>
  256. </script>
  257. </button>
  258. <button id="button1" class="btn2_letter3" style="left:1140px; top:50px; width:53px; height:19px; ">
  259. <caption>행삭제</caption>
  260. <script type="javascript" ev:event="DOMActivate">
  261. <![CDATA[
  262. deleteSelectedRows(grd_detlcodelst, true);
  263. ]]>
  264. </script>
  265. </button>
  266. <button id="btn_grdadd" class="btn2_letter3" style="left:1085px; top:50px; width:53px; height:19px; ">
  267. <caption>행추가</caption>
  268. <script type="javascript" ev:event="DOMActivate">
  269. <![CDATA[
  270. clearParameter("SPAVBA00100_PARAM1");
  271. setParameter ("SPAVBA00100_PARAM1", "F");
  272. // 선택화면 Call
  273. modal("SPAVB00100");
  274. // 정상인 경우 가져온값 setting
  275. if (model.getValue("/root/temp/okflag") == "ok") {
  276. // 가져온값 건수 반복
  277. var idx = instance1.selectNodes("/root/temp/templst/list").length;
  278. var maxrow = grd_detlcodelst.rows;
  279. for (var i=1; i<=idx; i++) {
  280. // 동일한 값이 없는 경우 추가
  281. var srcEtcdetlnm = model.getValue("/root/temp/templst/list[" + i + "]/etcdetlnm");
  282. if (instance1.selectNodes(grd_detlcodelst.nodeset + "[banddnm='" + srcEtcdetlnm + "']").length == 0) {
  283. grd_detlcodelst.addRow();
  284. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/bandcd", "C04"); // 밴드코드
  285. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/bandmcd", model.getValue("/root/temp/templst/list[" + i + "]/etccd") ); // 밴드M코드
  286. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/banddcd", model.getValue("/root/temp/templst/list[" + i + "]/etcdetlcd") ); // 밴드D코드
  287. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/banddnm", model.getValue("/root/temp/templst/list[" + i + "]/etcdetlnm") ); // 밴드D명
  288. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/gbmcd", "C06" ); // 구분M코드
  289. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/gbdcd", model.getValue("/root/temp/templst/list[" + i + "]/etcitemcnts") ); // 구분D코드
  290. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/qty", 1 ); // 수량
  291. model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/useyn", "Y" ); // 사용여부
  292. maxrow++;
  293. }
  294. }
  295. }
  296. // 불필요 Node 삭제
  297. model.removenode("/root/temp/okflag");
  298. model.removenodeset("/root/temp/templst/list");
  299. ]]>
  300. </script>
  301. </button>
  302. </group>
  303. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  304. <button id="btn_clear2" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
  305. <caption>초기화</caption>
  306. <script type="javascript" ev:event="DOMActivate">
  307. <![CDATA[
  308. fBdcddtlclear();
  309. ]]>
  310. </script>
  311. </button>
  312. <button id="btn_save2" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
  313. <caption>저장</caption>
  314. <script type="javascript" ev:event="DOMActivate">
  315. <![CDATA[
  316. if( fSaveDetlCode() == true ){
  317. fGetBdCdListDtl();
  318. }
  319. ]]>
  320. </script>
  321. </button>
  322. <button id="btn_save1" class="btn4_letter2" style="left:537px; top:5px; width:56px; height:22px; ">
  323. <caption>저장</caption>
  324. <script type="javascript" ev:event="DOMActivate">
  325. <![CDATA[
  326. if( fSaveBdCdMst() == true ){
  327. fGetBdCdListMst();
  328. }
  329. ]]>
  330. </script>
  331. </button>
  332. <button id="btn_clear1" class="btn4_letter3" style="left:466px; top:5px; width:68px; height:22px; ">
  333. <caption>초기화</caption>
  334. <script type="javascript" ev:event="DOMActivate">
  335. <![CDATA[
  336. fBdcdmstclear();
  337. ]]>
  338. </script>
  339. </button>
  340. </group>
  341. </xhtml:body>
  342. </xhtml:html>