SMAVB00100_기본코드관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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>Untitle</xhtml:title>
  15. <model id="model1">
  16. <instance id="instance1">
  17. <root xmlns="">
  18. <main>
  19. <bscdlstmst>
  20. <item>
  21. <clscd/>
  22. <etccd/>
  23. <etccdkey/>
  24. <etcdetlnm/>
  25. <useyn/>
  26. </item>
  27. </bscdlstmst>
  28. <bscdlstdtl>
  29. <item>
  30. <clscd/>
  31. <etccd/>
  32. <etcdetlcd/>
  33. <etcdetlcdkey/>
  34. <etcdetlnm/>
  35. <etcitemcnts/>
  36. <etcitemcnts2/>
  37. <useyn/>
  38. </item>
  39. </bscdlstdtl>
  40. </main>
  41. <send>
  42. <clscd/>
  43. <etccd/>
  44. <req>
  45. <savedata/>
  46. <clscd/>
  47. <etccd/>
  48. <etcdetlcd/>
  49. </req>
  50. <useyn/>
  51. </send>
  52. <init>
  53. <selectinput>
  54. <item>
  55. <etcdetlnm/>
  56. <etcdetlcd/>
  57. </item>
  58. </selectinput>
  59. <combobscdlst/>
  60. </init>
  61. <hidden>
  62. <item/>
  63. </hidden>
  64. </root>
  65. </instance>
  66. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  67. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  68. <script type="javascript" src="../../../ast/tissuebankbaseweb/js/tissuebankcombolist.js"/>
  69. <script type="javascript" ev:event="xforms-ready">
  70. <![CDATA[
  71. fGetPtcdInputInit();
  72. fGetSelInputInit();
  73. ]]>
  74. </script>
  75. <submission id="TRAVB00001"/>
  76. <submission id="TRAVB00101" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/init/selectinput"/>
  77. <submission id="TRAVB00102" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bscdlstmst"/>
  78. <submission id="TRAVB00103" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bscdlstdtl"/>
  79. <submission id="TXAVB00101" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  80. <submission id="TXAVB00102" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
  81. </model>
  82. <script type="javascript">
  83. <![CDATA[
  84. /**
  85. * 콤보 초기화
  86. */
  87. function fGetPtcdInputInit(){
  88. tbGetBscdList( new Array("C06", "C07"), new Array("/root/init/combobscdlst", "/root/init/combobscdlst") );
  89. }
  90. /**
  91. * 분류구분 초기화
  92. */
  93. function fGetSelInputInit(){
  94. model.setValue("root/send/clscd", "00");
  95. model.setValue("root/send/etccd", "00");
  96. var ret = submit("TRAVB00101");
  97. cmb_clscd.select(0);
  98. bool_pastdata.selected = false;
  99. return ret;
  100. }
  101. /**
  102. * 분류코드 리스트 조회
  103. */
  104. function fGetBsCdListMst(){
  105. // 분류구분에 따라 상세코드 타이틀 변경 및 콤보변경
  106. if (cmb_clscd.value== "M") {
  107. bool_pastdata.visible = false;
  108. caption5.visible = false;
  109. grd_detlcodelst.colhidden(3) = true;
  110. grd_detlcodelst.colhidden(4) = false;
  111. grd_detlcodelst.colhidden(5) = true;
  112. } else if (cmb_clscd.value== "P") {
  113. bool_pastdata.visible = true;
  114. caption5.visible = true;
  115. bool_pastdata.selected = false;
  116. grd_detlcodelst.colhidden(3) = true;
  117. grd_detlcodelst.colhidden(4) = true;
  118. grd_detlcodelst.colhidden(5) = false;
  119. } else {
  120. bool_pastdata.visible = false;
  121. caption5.visible = false;
  122. grd_detlcodelst.colhidden(3) = false;
  123. grd_detlcodelst.colhidden(4) = true;
  124. grd_detlcodelst.colhidden(5) = true;
  125. }
  126. model.removeNodeset("/root/main/bscdlstmst/item");
  127. model.removeNodeset("/root/main/bscdlstdtl/item");
  128. model.refresh();
  129. model.setValue("root/send/etccd", "");
  130. var ret = submit("TRAVB00102");
  131. return ret;
  132. }
  133. /**
  134. * 상세코드 리스트 조회
  135. */
  136. function fGetBsCdListDtl(){
  137. var idx = grd_etclst.row;
  138. if( idx < 1) return ;
  139. model.removeNodeset("/root/main/bscdlstdtl/item");
  140. model.refresh();
  141. model.setValue("root/send/etccd", model.getValue(grd_etclst.nodeset + "[" + idx + "]/etccd" ) );
  142. var ret = submit("TRAVB00103");
  143. return ret;
  144. }
  145. /**
  146. * 초기화
  147. */
  148. function fBscdmstclear(){
  149. model.removeNodeset("/root/main/bscdlstmst/item");
  150. model.removeNodeset("/root/main/bscdlstdtl/item");
  151. model.refresh();
  152. }
  153. function fBscddtlclear(){
  154. model.removeNodeset("/root/main/bscdlstdtl/item");
  155. model.refresh();
  156. }
  157. /**
  158. * 분류코드 저장
  159. */
  160. function fSaveBsCdMst(){
  161. if( ! getGridUpdateData(grd_etclst) )
  162. {
  163. alert("저장할 내역이 없습니다.");
  164. return ;
  165. }
  166. var rsv_cnt = grd_etclst.rows ;
  167. var sNode = grd_etclst.nodeset+ "[";
  168. for( var i = 1; i < rsv_cnt ; i++){
  169. if( model.getValue(sNode + i + "]/etccd" ) == "") {
  170. alert("분류코드의 코드값이 비어있습니다.");
  171. return ;
  172. }
  173. }
  174. var ret = false;
  175. if ( messageBox("분류코드정보를","Q002")==6 ) {
  176. model.setValue("/root/send/req/savedata", grd_etclst.getUpdateData());
  177. model.setValue("/root/send/req/clscd", model.getValue("/root/send/clscd") );
  178. model.setValue("/root/send/req/etcdetlcd", "-" );
  179. ret = submit("TXAVB00101");
  180. }
  181. return ret;
  182. }
  183. /**
  184. * 상세코드 저장
  185. */
  186. function fSaveDetlCode(){
  187. var idx = grd_etclst.row;
  188. if( idx < 1) return ;
  189. if( ! getGridUpdateData(grd_detlcodelst) )
  190. {
  191. alert("저장할 내역이 없습니다.");
  192. return ;
  193. }
  194. var rsv_cnt = grd_detlcodelst.rows ;
  195. var sNode = grd_detlcodelst.nodeset+ "[";
  196. for( var i = 1; i < rsv_cnt ; i++){
  197. if( model.getValue(sNode + i + "]/etcdetlcd" ) == "") {
  198. alert("상세코드의 코드값이 비어있습니다.");
  199. return ;
  200. }
  201. }
  202. var ret = false;
  203. if ( messageBox("상세코드정보를","Q002")==6 ) {
  204. model.setValue("/root/send/req/savedata", grd_detlcodelst.getUpdateData());
  205. model.setValue("/root/send/req/clscd", model.getValue("/root/send/clscd") );
  206. model.setValue("root/send/req/etccd", model.getValue(grd_etclst.nodeset + "[" + idx + "]/etccd" ) );
  207. ret = submit("TXAVB00102");
  208. }
  209. return ret;
  210. }
  211. ]]>
  212. </script>
  213. </xhtml:head>
  214. <xhtml:body style="font-family:굴림체; ">
  215. <group id="grp_title" style="left:0px; top:0px; width:1195px; height:13px; ">
  216. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; ">조직은행 기본코드관리</caption>
  217. </group>
  218. <group id="group1" style="left:0px; top:13px; width:1195px; height:744px; ">
  219. <group id="grp_sea" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  220. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  221. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">분류구분 :</caption>
  222. <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
  223. <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  224. <caption>조회</caption>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. fGetBsCdListMst();
  228. ]]>
  229. </script>
  230. </button>
  231. <select1 id="cmb_clscd" ref="/root/send/clscd" class="combo_s_essential" appearance="minimal" style="left:105px; top:8px; width:150px; height:19px; ">
  232. <choices>
  233. <itemset nodeset="/root/init/selectinput/item">
  234. <label ref="etcdetlnm"/>
  235. <value ref="etcdetlcd"/>
  236. </itemset>
  237. </choices>
  238. <script type="javascript" ev:event="xforms-select">
  239. <![CDATA[
  240. fGetBsCdListMst();
  241. ]]>
  242. </script>
  243. </select1>
  244. </group>
  245. <caption id="caption3" class="tit_2" style="left:5px; top:55px; width:78px; height:14px; ">분류코드</caption>
  246. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:594px; y2:70px; "/>
  247. <datagrid id="grd_etclst" nodeset="/root/main/bscdlstmst/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; ">
  248. <col disabled="false" imemode="alpha" ref="etccd" type="input" maxlength="10"/>
  249. <col imemode="hangul" ref="etcdetlnm" type="input" maxlength="50"/>
  250. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  251. <script type="javascript" ev:event="ondblclick">
  252. <![CDATA[
  253. fGetBsCdListDtl();
  254. ]]>
  255. </script>
  256. </datagrid>
  257. <caption id="caption4" class="tit_2" style="left:606px; top:55px; width:78px; height:14px; ">상세코드</caption>
  258. <datagrid id="grd_detlcodelst" nodeset="/root/main/bscdlstdtl/item" caption="코드^상세코드명^내용^구분^참고치^비고^적용여부" colsep="^" colwidth="60, 250, 90, 90, 90, 90, 60" explorerbar="sortmove" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:601px; top:75px; width:594px; height:663px; ">
  259. <col ref="etcdetlcd" type="input" maxlength="50"/>
  260. <col imemode="hangul" ref="etcdetlnm" type="input" maxlength="50"/>
  261. <col ref="etcitemcnts" type="input" maxlength="50" style="left:360px; top:23px; width:77px; height:23px; "/>
  262. <col ref="etcitemcnts" type="combo" maxlength="70" style="left:360px; top:23px; width:77px; height:23px; ">
  263. <choices>
  264. <itemset nodeset="/root/init/combobscdlst/C06">
  265. <label ref="cdnm"/>
  266. <value ref="cdid"/>
  267. </itemset>
  268. </choices>
  269. </col>
  270. <col ref="etcitemcnts" type="combo" maxlength="70" style="left:360px; top:23px; width:77px; height:23px; ">
  271. <choices>
  272. <itemset nodeset="/root/init/combobscdlst/C07">
  273. <label ref="cdnm"/>
  274. <value ref="cdid"/>
  275. </itemset>
  276. </choices>
  277. </col>
  278. <col ref="etcitemcnts2" type="input" maxlength="50"/>
  279. <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
  280. <script type="javascript" ev:event="onentercell">
  281. <![CDATA[
  282. if( grd_detlcodelst.colType(grd_detlcodelst.col) == "input" ){
  283. grd_detlcodelst.editCell();
  284. }
  285. ]]>
  286. </script>
  287. <script type="javascript" ev:event="onkeypress">
  288. <![CDATA[
  289. if( event.keyCode == 13 ) {
  290. if( grd_detlcodelst.col == 1 ){
  291. grd_detlcodelst.col = 2 ;
  292. grd_detlcodelst.editCell();
  293. }
  294. else
  295. if( grd_detlcodelst.col == 2 ){
  296. grd_detlcodelst.addRow();
  297. grd_detlcodelst.col = 1 ;
  298. grd_detlcodelst.editCell();
  299. }
  300. }
  301. ]]>
  302. </script>
  303. <script type="javascript" ev:event="onaftersort">
  304. <![CDATA[
  305. grd_detlcodelst.gridToInstance();
  306. ]]>
  307. </script>
  308. </datagrid>
  309. <line id="line2" class="line_1" style="x1:601px; y1:70px; x2:1195px; y2:70px; "/>
  310. <button id="button2" class="btn2_letter3" style="left:484px; top:50px; width:53px; height:19px; ">
  311. <caption>행추가</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. grd_etclst.addItem();
  315. grd_etclst.col = 1;
  316. grd_etclst.editCell();
  317. ]]>
  318. </script>
  319. </button>
  320. <button id="btn_grddel" class="btn2_letter3" style="left:540px; top:50px; width:53px; height:19px; ">
  321. <caption>행삭제</caption>
  322. <script type="javascript" ev:event="DOMActivate">
  323. <![CDATA[
  324. deleteSelectedRows(grd_etclst,true);
  325. ]]>
  326. </script>
  327. </button>
  328. <button id="button1" class="btn2_letter3" style="left:1060px; top:50px; width:53px; height:19px; ">
  329. <caption>행삭제</caption>
  330. <script type="javascript" ev:event="DOMActivate">
  331. <![CDATA[
  332. deleteSelectedRows(grd_detlcodelst,true);
  333. ]]>
  334. </script>
  335. </button>
  336. <button id="btn_grdadd" class="btn2_letter3" style="left:1005px; top:50px; width:53px; height:19px; ">
  337. <caption>행추가</caption>
  338. <script type="javascript" ev:event="DOMActivate">
  339. <![CDATA[
  340. grd_detlcodelst.addRow();
  341. grd_detlcodelst.col = 1;
  342. grd_detlcodelst.editCell();
  343. ]]>
  344. </script>
  345. </button>
  346. <button id="btn_fileupload" class="btn2_letter5" style="left:1115px; top:50px; width:75px; height:19px; ">
  347. <caption>파일업로드</caption>
  348. <script type="javascript" ev:event="DOMActivate">
  349. <![CDATA[
  350. fExcelUpload(grd_detlcodelst);
  351. ]]>
  352. </script>
  353. </button>
  354. <bool id="bool_pastdata" ref="/root/send/useyn" style="left:914px; top:50px; width:20px; height:20px; "/>
  355. <caption id="caption5" style="left:934px; top:52px; width:65px; height:15px; ">과거DATA</caption>
  356. </group>
  357. <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
  358. <button id="btn_clear2" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
  359. <caption>초기화</caption>
  360. <script type="javascript" ev:event="DOMActivate">
  361. <![CDATA[
  362. fBscddtlclear();
  363. ]]>
  364. </script>
  365. </button>
  366. <button id="btn_save2" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
  367. <caption>저장</caption>
  368. <script type="javascript" ev:event="DOMActivate">
  369. <![CDATA[
  370. if( fSaveDetlCode() == true ){
  371. fGetBsCdListDtl();
  372. }
  373. ]]>
  374. </script>
  375. </button>
  376. <button id="btn_save1" class="btn4_letter2" style="left:537px; top:5px; width:56px; height:22px; ">
  377. <caption>저장</caption>
  378. <script type="javascript" ev:event="DOMActivate">
  379. <![CDATA[
  380. if( fSaveBsCdMst() == true ){
  381. fGetBsCdListMst();
  382. }
  383. ]]>
  384. </script>
  385. </button>
  386. <button id="btn_clear1" class="btn4_letter3" style="left:466px; top:5px; width:68px; height:22px; ">
  387. <caption>초기화</caption>
  388. <script type="javascript" ev:event="DOMActivate">
  389. <![CDATA[
  390. fBscdmstclear();
  391. ]]>
  392. </script>
  393. </button>
  394. </group>
  395. </xhtml:body>
  396. </xhtml:html>