SMZBC00300_코드관리.xrw 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>코드 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cdgrup>
  11. <list>
  12. <cdgrup>
  13. <cdgrupid/>
  14. <cdgrupnm/>
  15. <cdlgth/>
  16. <detldesc/>
  17. <fstrgstdt/>
  18. <fstrgstrid/>
  19. <lastrgstdt/>
  20. <lastrgstrid/>
  21. <deptcd/>
  22. <valifromdd/>
  23. <valitodd/>
  24. <level/>
  25. </cdgrup>
  26. </list>
  27. </cdgrup>
  28. <code>
  29. <list>
  30. <code>
  31. <cdsid/>
  32. <cdgrupid/>
  33. <cdid/>
  34. <cdengabbrnm/>
  35. <cdnm/>
  36. <detldesc/>
  37. <cdval/>
  38. <minval/>
  39. <maxval/>
  40. <minopercd/>
  41. <maxopercd/>
  42. </code>
  43. </list>
  44. </code>
  45. <search>
  46. <supcdgrupid/>
  47. <supcdgrupnm/>
  48. </search>
  49. <data>
  50. <cdsid/>
  51. <cdgrupid/>
  52. <cdid/>
  53. <cdengabbrnm/>
  54. <cdnm/>
  55. <detldesc/>
  56. <cdval/>
  57. <minval/>
  58. <maxval/>
  59. <minopercd/>
  60. <maxopercd/>
  61. <valifromdd/>
  62. <valitodd/>
  63. <dispseq/>
  64. <fstrgstrid/>
  65. <lastrgstrid/>
  66. </data>
  67. <mode>
  68. <modestatus/>
  69. <modelabel/>
  70. </mode>
  71. </main>
  72. <send>
  73. <data>
  74. <cdgrupid/>
  75. <cdid/>
  76. <cdengabbrnm/>
  77. <cdnm/>
  78. <detldesc/>
  79. <cdval/>
  80. <minval/>
  81. <maxval/>
  82. <minopercd/>
  83. <maxopercd/>
  84. </data>
  85. </send>
  86. <hidden>
  87. <temp/>
  88. </hidden>
  89. </root>
  90. </instance>
  91. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  92. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  93. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  94. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  95. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC003.js"/>
  96. <script type="javascript" ev:event="xforms-ready">
  97. <![CDATA[
  98. fShiftCdListGridColumn();
  99. var menuParameter = getScreenMenuParameter();
  100. menuParameter = "administrator";
  101. if(menuParameter!="administrator"){
  102. img_convert_import_excel.visible = false;
  103. }
  104. ]]>
  105. </script>
  106. <submission id="TXZBC00108" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  107. <submission id="TRZBC00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  108. <submission id="TXZBC00109" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  109. <submission id="TXZBC00110" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  110. <submission id="TXZBC00111" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  111. <submission id="TRZBC00107" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/cdgrup/list"/>
  112. <submission id="TXZBC00119" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  113. <submission id="TXZBC00120" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  114. <submission id="TRZBC00124" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/main/code/list"/>
  115. <submission id="TRZBC00126" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" replace="instance" resultref="/root/hidden/temp"/>
  116. </model>
  117. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  118. <script type="javascript">
  119. <![CDATA[
  120. img_convert_general_process.visible = false;
  121. caption_cdgrup_list.attribute("left") = "0";
  122. grd_cdgruplist.visible = true;
  123. grd_cdlist.attribute("left") = "375px";
  124. grd_cdlist.attribute("width") = "820px";
  125. grd_cdlist.attribute("height") = "455px";
  126. img_convert_import_excel.visible = true;
  127. caption_cd_list.visible = true;
  128. grd_general_bottom.visible= true;
  129. ipt_search.disabled = false;
  130. img_cdgrup_search_popup.disabled = false;
  131. btn_search.disabled = false;
  132. grp_excel_process.visible = false;
  133. ]]>
  134. </script>
  135. </xhtml:head>
  136. <xhtml:body guideline="1,1199;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  137. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  138. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">코드 관리</caption>
  139. </group>
  140. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  141. <group id="grd_main" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  142. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  143. <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  144. <button id="btn_search" class="btn1_letter2" style="left:1120px; top:5px; width:56px; height:22px; ">
  145. <caption>조회</caption>
  146. <script type="javascript" ev:event="DOMActivate">
  147. <![CDATA[
  148. var supcdgrupid = model.getValue("/root/main/search/supcdgrupid");
  149. model.makeValue("/root/send/data/level", 3);
  150. model.makeValue("/root/send/data/supcdgrupid", supcdgrupid);
  151. var success = submit("TRZBC00107");
  152. if(success){
  153. setTree(grd_cdgruplist, grd_cdgruplist.colRef("level"), grd_cdgruplist.colRef("cdgrupid"), true);
  154. fInitMainData(true);
  155. }
  156. ]]>
  157. </script>
  158. </button>
  159. <img id="img_cdgrup_search_popup" class="icon_search" style="left:220px; top:10px; width:16px; height:16px; background-stretch:stretch; ">
  160. <script type="javascript" ev:event="onclick">
  161. <![CDATA[
  162. var searchcondition = "cdgrupnm";
  163. var searchterm = model.getValue("/root/main/search/supcdgrupid");
  164. var receivecdgrupidpath = '/root/main/search/supcdgrupid';
  165. var receivecdgrupnmpath = "/root/main/search/supcdgrupnm";
  166. zbcOpenCodeGroupList(searchcondition, searchterm, receivecdgrupidpath, receivecdgrupnmpath, true);
  167. ]]>
  168. </script>
  169. </img>
  170. <caption id="caption2" class="search_name" style="left:15px; top:8px; width:91px; height:17px; ">코드군 ID :</caption>
  171. <input id="ipt_search" ref="/root/main/search/supcdgrupid" class="input_search" inputtype="button" style="left:115px; top:8px; width:100px; height:19px; ">
  172. <script type="javascript" ev:event="onbuttonclick">
  173. <![CDATA[
  174. var supcdgrupid = model.getValue("/root/main/search/supcdgrupid");
  175. var selected = fFindGridTreeItem(grd_cdgruplist, supcdgrupid, grd_cdgruplist.colRef("cdgrupid"), grd_cdgruplist.colRef("level"));
  176. grd_cdgruplist.row = selected;
  177. fInitMainData(true);
  178. var cdgrupid = grd_cdgruplist.valueMatrix(selected, grd_cdgruplist.colRef("cdgrupid"));
  179. model.makeValue("/root/send/data/cdgrupid", cdgrupid);
  180. submit("TRZBC00124");
  181. model.refresh();
  182. ]]>
  183. </script>
  184. <script type="javascript" ev:event="onkeydown">
  185. <![CDATA[
  186. inputEnterKey( "btn_search", "DOMActivate");
  187. ]]>
  188. </script>
  189. </input>
  190. </group>
  191. <group id="grd_general_bottom" style="left:0px; top:545px; width:1194px; height:198px; ">
  192. <output id="opt_modellabel" ref="/root/main/mode/modelabel" class="tit_2" style="left:0px; top:10px; width:269px; height:13px; "/>
  193. <group id="grd_general_process" style="left:1058px; top:4px; width:131px; height:20px; ">
  194. <button id="btn_add" class="btn2_letter2" style="left:1px; top:1px; width:42px; height:19px; ">
  195. <caption>추가</caption>
  196. <script type="javascript" ev:event="DOMActivate">
  197. <![CDATA[
  198. var row = grd_cdgruplist.row;
  199. if(row==-1){
  200. messageBox('추가할 대상 코드군을', 'C002');
  201. return;
  202. }
  203. var authinstcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authinstcd"));
  204. var authdeptcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authdeptcd"));
  205. var authrized = fAuthorize(authinstcd, authdeptcd);
  206. if(authrized){
  207. var cdgrupid = grd_cdgruplist.valueMatrix(row, 1);
  208. fInitMainData(false);
  209. model.setValue("/root/main/mode", "insert");
  210. model.setValue("/root/main/mode/modelabel", "코드관리>코드추가");
  211. model.setValue("/root/main/mode/modestatus", "insert");
  212. model.setValue("/root/main/data/cdgrupid", cdgrupid);
  213. var cdlist_length = grd_cdlist.rows;
  214. model.setValue("/root/main/data/dispseq", cdlist_length);
  215. model.setValue("/root/main/data/valifromdd", getCurrentDate());
  216. model.setValue("/root/main/data/valitodd", "99991231");
  217. ipt_cdgrupid.disabled = true;
  218. model.refresh();
  219. }else{
  220. var userinfo = fGetUserInfo();
  221. messageBox(userinfo+" 는 추가할", "E002") ;
  222. return;
  223. }
  224. ]]>
  225. </script>
  226. </button>
  227. <button id="btn_update" class="btn2_letter2" style="left:44px; top:1px; width:42px; height:19px; ">
  228. <caption>수정</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. model.setValue("/root/main/mode/modelabel", "코드관리>코드수정");
  232. model.setValue("/root/main/mode/modestatus", "update");
  233. var row = grd_cdlist.row;
  234. if(row==-1){
  235. messageBox('수정할 대상 코드군을', 'C002');
  236. return;
  237. }
  238. var authinstcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authinstcd"));
  239. var authdeptcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authdeptcd"));
  240. var authrized = fAuthorize(authinstcd, authdeptcd);
  241. if(authrized){
  242. model.copyNode("/root/main/data", "/root/main/code/list/code["+row+"]");
  243. model.refresh();
  244. fInitMainDataControls(false);
  245. ipt_cdgrupid.disabled = true;
  246. ipt_cdid.disabled= true;
  247. }else{
  248. var userinfo = fGetUserInfo();
  249. messageBox(userinfo+" 는 수정할", "E002") ;
  250. return;
  251. }
  252. ]]>
  253. </script>
  254. </button>
  255. <button id="btn_delete" class="btn2_letter2" style="left:87px; top:1px; width:42px; height:19px; ">
  256. <caption>삭제</caption>
  257. <script type="javascript" ev:event="DOMActivate">
  258. <![CDATA[
  259. var row = grd_cdlist.row;
  260. if(row==-1){
  261. messageBox('삭제할 대상 코드군을', 'C002');
  262. return;
  263. }
  264. var authinstcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authinstcd"));
  265. var authdeptcd = grd_cdgruplist.valueMatrix(grd_cdgruplist.row, grd_cdgruplist.colRef("authdeptcd"));
  266. var authrized = fAuthorize(authinstcd, authdeptcd);
  267. if(authrized){
  268. model.copyNode("/root/main/data", "/root/main/code/list/code["+row+"]");
  269. model.setValue("/root/main/mode/modelabel", "코드관리>코드삭제");
  270. model.setValue("/root/main/mode/modestatus", "delete");
  271. model.refresh();
  272. fInitMainDataControls(true);
  273. }else{
  274. var userinfo = fGetUserInfo();
  275. messageBox(userinfo+" 는 수정할", "E002") ;
  276. return;
  277. }
  278. ]]>
  279. </script>
  280. </button>
  281. </group>
  282. <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  283. <caption id="caption24" class="cell_1" style="left:0px; top:30px; width:100px; height:23px; vertical-align:middle; ">코드군 ID</caption>
  284. <input id="ipt_cdgrupid" ref="/root/main/data/cdgrupid" class="input_essential" style="left:101px; top:32px; width:85px; height:19px; "/>
  285. <caption id="caption1" class="cell_1" style="left:187px; top:30px; width:100px; height:23px; vertical-align:middle; ">코드 ID</caption>
  286. <input id="ipt_cdid" ref="/root/main/data/cdid" class="input_essential" style="left:288px; top:32px; width:85px; height:19px; "/>
  287. <caption id="caption3" class="cell_1" style="left:374px; top:30px; width:100px; height:23px; vertical-align:middle; ">코드이름</caption>
  288. <input id="ipt_cdnm" ref="/root/main/data/cdnm" class="input_essential" style="left:475px; top:32px; width:90px; height:19px; "/>
  289. <caption id="caption4" class="cell_1" style="left:566px; top:30px; width:100px; height:23px; vertical-align:middle; ">코드영문약어명</caption>
  290. <input id="ipt_cdengabbrnm" ref="/root/main/data/cdengabbrnm" class="input_essential" style="left:667px; top:32px; width:90px; height:19px; "/>
  291. <caption id="caption13" class="cell_1" style="left:758px; top:30px; width:100px; height:23px; vertical-align:middle; ">출력순서</caption>
  292. <input id="ipt_dispseq" ref="/root/main/data/dispseq" class="input_essential" format="999999-9999999" style="left:859px; top:32px; width:75px; height:19px; "/>
  293. <caption id="caption5" class="cell_1" style="left:935px; top:30px; width:60px; height:23px; vertical-align:middle; ">코드값</caption>
  294. <input id="ipt_cdval" ref="/root/main/data/cdval" class="input_essential" style="left:996px; top:32px; width:60px; height:19px; "/>
  295. <line id="line5" class="line_2" style="x1:0px; y1:54px; x2:1194px; y2:55px; "/>
  296. <caption id="caption8" class="cell_1" style="left:0px; top:56px; width:100px; height:23px; vertical-align:middle; ">최소값</caption>
  297. <input id="ipt_minval" ref="/root/main/data/minval" class="input_essential" style="left:101px; top:57px; width:85px; height:19px; "/>
  298. <caption id="caption10" class="cell_1" style="left:187px; top:56px; width:100px; height:23px; vertical-align:middle; ">최대값</caption>
  299. <input id="ipt_maxval" ref="/root/main/data/maxval" class="input_essential" style="left:288px; top:57px; width:85px; height:19px; "/>
  300. <caption id="caption9" class="cell_1" style="left:374px; top:56px; width:100px; height:23px; vertical-align:middle; ">최소 연산자</caption>
  301. <select1 id="cmb_minopercd" ref="/root/main/data/minopercd" class="combo_essential" appearance="minimal" style="left:475px; top:57px; width:45px; height:19px; ">
  302. <choices>
  303. <item>
  304. <label>
  305. <![CDATA[<]]>
  306. </label>
  307. <value>0</value>
  308. </item>
  309. <item>
  310. <label>
  311. <![CDATA[<=]]>
  312. </label>
  313. <value>1</value>
  314. </item>
  315. </choices>
  316. </select1>
  317. <caption id="caption11" class="cell_1" style="left:521px; top:55px; width:100px; height:23px; vertical-align:middle; ">최대 연산자</caption>
  318. <select1 id="cmb_maxopercd" ref="/root/main/data/maxopercd" class="combo_essential" appearance="minimal" style="left:622px; top:57px; width:45px; height:19px; ">
  319. <choices>
  320. <item>
  321. <label>
  322. <![CDATA[<]]>
  323. </label>
  324. <value>0</value>
  325. </item>
  326. <item>
  327. <label>
  328. <![CDATA[<=]]>
  329. </label>
  330. <value>1</value>
  331. </item>
  332. </choices>
  333. </select1>
  334. <caption id="caption14" class="cell_1" style="left:668px; top:55px; width:80px; height:23px; vertical-align:middle; ">유효시작일시</caption>
  335. <input id="ipt_valifromdd" ref="/root/main/data/valifromdd" class="input_search" inputtype="date" style="left:749px; top:57px; width:95px; height:19px; "/>
  336. <caption id="caption15" class="cell_1" style="left:845px; top:55px; width:85px; height:23px; vertical-align:middle; ">유효종료일시</caption>
  337. <input id="ipt_valitodd" ref="/root/main/data/valitodd" class="input_search" inputtype="date" style="left:931px; top:57px; width:95px; height:19px; "/>
  338. <line id="line9" class="line_2" style="x1:0px; y1:80px; x2:1194px; y2:79px; "/>
  339. <caption id="caption22" class="cell_1" style="left:0px; top:82px; width:100px; height:100px; vertical-align:middle; ">코드 상세설명</caption>
  340. <textarea id="tar_detldesc" ref="/root/main/data/detldesc" style="left:101px; top:82px; width:1090px; height:100px; "/>
  341. </group>
  342. <caption id="caption_cdgrup_list" class="tit_2" style="left:29px; top:66px; width:118px; height:13px; ">코드군 목록</caption>
  343. <line id="line8" class="line_1" style="x1:0px; y1:82px; x2:1194px; y2:82px; "/>
  344. <line id="line10" class="line_3" style="x1:0px; y1:735px; x2:1194px; y2:735px; "/>
  345. <line id="line7" class="line_3" style="x1:0px; y1:741px; x2:1194px; y2:741px; "/>
  346. <datagrid id="grd_cdgruplist" nodeset="/root/main/cdgrup/list/cdgrup" caption="코드군ID^코드군명^코드길이^코드군설명^출력순서^유효시작일자^유효종료일자^권한기관코드^권한기관명^권한부서코드^권한부서명^최초등록자ID^최초등록자이름^최초등록일시^최종수정자ID^최종수정자이름^최종수정일시^레 벨" colwidth="150, 200, 60, 200, 60, 100, 100, 100, 100, 100, 100, 100, 100, 150, 100, 100, 150, 100" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" tooltip="true" style="left:0px; top:85px; width:340px; height:455px; border-color:#808080; ">
  347. <col ref="cdgrupid"/>
  348. <col ref="cdgrupnm"/>
  349. <col ref="cdlgth"/>
  350. <col ref="detldesc" visibility="hidden"/>
  351. <col ref="dispseq" visibility="hidden"/>
  352. <col ref="valifromdd" format="yyyy-mm-dd"/>
  353. <col ref="valitodd" format="yyyy-mm-dd"/>
  354. <col ref="authinstcd"/>
  355. <col ref="authinstnm"/>
  356. <col ref="authdeptcd"/>
  357. <col ref="authdeptnm"/>
  358. <col ref="fstrgstrid" visibility="hidden"/>
  359. <col ref="fstrgstrnm" visibility="hidden"/>
  360. <col ref="fstrgstdt" visibility="hidden" format="yyyy-mm-dd hh:nn:ss"/>
  361. <col ref="lastupdtrid" visibility="hidden"/>
  362. <col ref="lastupdtrnm" visibility="hidden"/>
  363. <col ref="lastupdtdt" visibility="hidden" format="yyyy-mm-dd hh:nn:ss"/>
  364. <col ref="level" visibility="hidden"/>
  365. <script type="javascript" ev:event="ondblclick">
  366. <![CDATA[
  367. fInitMainData(true);
  368. var row = grd_cdgruplist.row;
  369. var cdgrupid = grd_cdgruplist.valueMatrix(row, grd_cdgruplist.colRef("cdgrupid"));
  370. model.makeValue("/root/send/data/cdgrupid", cdgrupid);
  371. model.makeValue("/root/send/data/sortfield", "dispseq");
  372. model.makeValue("/root/send/data/cdid", "");
  373. model.makeValue("/root/send/data/cdengabbrnm", "");
  374. model.makeValue("/root/send/data/cdnm", "");
  375. model.makeValue("/root/send/data/detldesc", "");
  376. model.makeValue("/root/send/data/cdval", "");
  377. model.makeValue("/root/send/data/minval", "");
  378. model.makeValue("/root/send/data/maxval", "");
  379. model.makeValue("/root/send/data/minopercd", "");
  380. model.makeValue("/root/send/data/maxopercd", "");
  381. submit("TRZBC00124");
  382. model.refresh();
  383. ]]>
  384. </script>
  385. </datagrid>
  386. <datagrid id="grd_cdlist" nodeset="/root/main/code/list/code" caption="신청구분^대분류구분코드^코드SID^코드군ID^코드군명^코드ID^코드길이^코드이름^상세설명^출력순서^코드값^최소값^최대값^최소연산자^최대연산자^코드영문약어^유효시작일자^유효종료일자^최초등록자ID^최초등록자명^최초등록일시^최종수정자ID^최종수정자명^최종수정일시" colwidth="100, 100, 200, 100, 100, 100, 100, 100, 150, 68, 100, 100, 100, 68, 68, 100, 100, 100, 100, 100, 150, 100, 100, 150" dataheight="25" defaultrows="0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:375px; top:85px; width:820px; height:455px; border-color:#808080; ">
  387. <col ref="process"/>
  388. <col ref="class"/>
  389. <col ref="cdsid"/>
  390. <col ref="cdgrupid"/>
  391. <col ref="cdgrupnm"/>
  392. <col ref="cdid"/>
  393. <col ref="cdlgth"/>
  394. <col ref="cdnm"/>
  395. <col ref="detldesc"/>
  396. <col ref="dispseq"/>
  397. <col ref="cdval"/>
  398. <col ref="minval"/>
  399. <col ref="maxval"/>
  400. <col ref="minopercd"/>
  401. <col ref="maxopercd"/>
  402. <col ref="cdengabbrnm"/>
  403. <col ref="valifromdd" format="yyyy-mm-dd"/>
  404. <col ref="valitodd" format="yyyy-mm-dd"/>
  405. <col ref="fstrgstrid"/>
  406. <col ref="fstrgstrnm"/>
  407. <col ref="fstrgstdt" format="yyyy-mm-dd hh:nn:ss"/>
  408. <col ref="lastupdtrid"/>
  409. <col ref="lastupdtrnm"/>
  410. <col ref="lastupdtdt" format="yyyy-mm-dd hh:nn:ss"/>
  411. <script type="javascript" ev:event="ondblclick">
  412. <![CDATA[
  413. var modestatus = model.getValue("/root/main/mode/modestatus");
  414. if(modestatus!="importexcel"){
  415. fInitMainDataControls(false);
  416. var row = grd_cdlist.row;
  417. model.copyNode("/root/main/data", "/root/main/code/list/code["+row+"]");
  418. model.setValue("/root/main/mode/modelabel", "코드관리>코드상세보기");
  419. model.setValue("/root/main/mode/modestatus", "view");
  420. model.refresh();
  421. fInitMainDataControls(true);
  422. }
  423. ]]>
  424. </script>
  425. </datagrid>
  426. <caption id="caption_cd_list" class="tit_2" style="left:405px; top:65px; width:118px; height:13px; ">코드 목록</caption>
  427. <group id="grp_excel_process" style="left:999px; top:56px; width:188px; height:25px; ">
  428. <button id="button1" class="btn2_letter4" style="left:1px; top:3px; width:64px; height:19px; ">
  429. <caption>엑셀입력</caption>
  430. <script type="javascript" ev:event="DOMActivate">
  431. <![CDATA[
  432. var fileName = window.fileDialog("open", "", false);
  433. if(fileName==""){
  434. return;
  435. }
  436. grd_cdlist.loadExcel(fileName);
  437. fRearrangeExcelData();
  438. grd_cdlist.refresh();
  439. ]]>
  440. </script>
  441. </button>
  442. <button id="button2" class="btn2_letter4" style="left:66px; top:3px; width:64px; height:19px; ">
  443. <caption>엑셀출력</caption>
  444. <script type="javascript" ev:event="DOMActivate">
  445. <![CDATA[
  446. ]]>
  447. </script>
  448. </button>
  449. <button id="button3" class="btn2_letter3" style="left:131px; top:3px; width:64px; height:19px; ">
  450. <caption>행삭제</caption>
  451. <script type="javascript" ev:event="DOMActivate">
  452. <![CDATA[
  453. ]]>
  454. </script>
  455. </button>
  456. </group>
  457. <img id="img_convert_import_excel" class="icon_left" style="left:375px; top:61px; width:26px; height:19px; background-stretch:stretch; ">
  458. <script type="javascript" ev:event="onclick">
  459. <![CDATA[
  460. fShiftCdListGridColumn("excel");
  461. grd_cdgruplist.visible = false;
  462. ipt_search.disabled = true;
  463. img_cdgrup_search_popup.disabled = true;
  464. btn_search.disabled= true;
  465. img_convert_import_excel.visible = false;
  466. grp_excel_process.visible = true;
  467. grp_excel_save.visible = false;
  468. caption_cd_list.visible = false;
  469. grp_excel_process.visible = true;
  470. grd_cdlist.attribute("left") = "0"+"px";
  471. grd_cdlist.attribute("width") = "1194" + "px";
  472. grd_cdlist.attribute("height") = "647" + "px";
  473. grd_reorg_sequence.visible = false;
  474. grd_general_bottom.visible = false;
  475. img_convert_general_process.visible= true;
  476. caption_cdgrup_list.visible = true;
  477. caption_cdgrup_list.attribute("left") = "29px";
  478. model.removenode("/root/main/code/list");
  479. model.makeNode("/root/main/code/list");
  480. model.setValue("/root/main/mode/modestatus", "importexcel");
  481. model.refresh();
  482. ]]>
  483. </script>
  484. </img>
  485. <img id="img_convert_general_process" class="icon_right" style="left:0px; top:61px; width:26px; height:19px; background-stretch:stretch; ">
  486. <script type="javascript" ev:event="onclick">
  487. <![CDATA[
  488. model.removenode("/root/main/code/list");
  489. model.makeNode("/root/main/code/list");
  490. img_convert_general_process.visible = false;
  491. caption_cdgrup_list.attribute("left") = "0";
  492. grd_cdgruplist.visible = true;
  493. grd_cdlist.attribute("left") = "375px";
  494. grd_cdlist.attribute("width") = "820px";
  495. grd_cdlist.attribute("height") = "455px";
  496. img_convert_import_excel.visible = true;
  497. caption_cd_list.visible = true;
  498. grd_general_bottom.visible= true;
  499. ipt_search.disabled = false;
  500. img_cdgrup_search_popup.disabled = false;
  501. btn_search.disabled = false;
  502. grp_excel_process.visible = false;
  503. grp_excel_save.visible = true;
  504. grd_reorg_sequence.visible = true;
  505. model.setValue("/root/main/mode/modestatus", "");
  506. fShiftCdListGridColumn();
  507. model.refresh();
  508. ]]>
  509. </script>
  510. </img>
  511. <group id="grp_excel_save" style="left:1119px; top:56px; width:66px; height:25px; ">
  512. <button id="button4" class="btn2_letter4" style="left:1px; top:3px; width:64px; height:19px; ">
  513. <caption>엑셀출력</caption>
  514. <script type="javascript" ev:event="DOMActivate">
  515. <![CDATA[
  516. var row = grd_cdgruplist.row;
  517. var cdgrupid = grd_cdgruplist.valueMatrix(row, grd_cdgruplist.colRef("cdgrupid"));
  518. var cdgrupnm = grd_cdgruplist.valueMatrix(row, grd_cdgruplist.colRef("cdgrupnm"));
  519. var fileName = window.fileDialog("save", ",", false, cdgrupnm+"코드_"+cdgrupid, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  520. if (fileName != "")
  521. {
  522. grd_cdlist.saveExcel(fileName);
  523. }
  524. ]]>
  525. </script>
  526. </button>
  527. </group>
  528. </group>
  529. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  530. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  531. <caption>초기화</caption>
  532. <script type="javascript" ev:event="DOMActivate">
  533. <![CDATA[
  534. model.removenode("/root/main/cdgrup/list");
  535. model.makeNode("/root/main/cdgrup/list");
  536. model.removenode("/root/main/code/list");
  537. model.makeNode("/root/main/code/list");
  538. model.refresh();
  539. ]]>
  540. </script>
  541. </button>
  542. <button id="btn_save" class="btn4_letter2" style="left:1067px; top:3px; width:56px; height:22px; ">
  543. <caption>저장</caption>
  544. <script type="javascript" ev:event="DOMActivate">
  545. <![CDATA[
  546. var result;
  547. var modestatus = model.getValue("/root/main/mode/modestatus");
  548. var cdsid;
  549. if(modestatus=="view"){
  550. messageBox("조회중인 정보를 저장", 'E001') ;
  551. return;
  552. }else if(modestatus=="insert"){
  553. if(!fValidateMainData()) return false;
  554. var cdgrupid = model.getValue("/root/main/data/cdgrupid");
  555. var cdid = model.getValue("/root/main/data/cdid");
  556. var cdnm = model.getValue("/root/main/data/cdnm");
  557. var cdsid = cdgrupid+cdid;
  558. if(cdnm==""){
  559. model.setValue("/root/main/data/detldesc", cdnm);
  560. }
  561. result = messageBox( "[코드군 ID : "+cdgrupid+",코드 ID : "+cdid+", 코드 이름: "+cdnm+"]을 추가", "S001");
  562. model.makeValue("/root/main/data/cdsid", cdgrupid+cdid);
  563. if( result==7 || result == 2 ) return;
  564. model.copyNode("/root/send/data", "/root/main/data");
  565. // 코드이름 중복체크
  566. model.removenode("/root/hidden/temp/count");
  567. model.refresh();
  568. result = submit("TRZBC00126");
  569. var count = model.getValue("/root/hidden/temp/count/count");
  570. if (count > 0) {
  571. result = messageBox( "[코드군 ID : "+cdgrupid+"]에 동일한 코드 이름이 존재합니다. ["+cdnm+"]을 추가", "S001");
  572. if( result==7 || result == 2 ) return;
  573. }
  574. result = submit("TXZBC00109");
  575. }else if(modestatus=="update"){
  576. var cdgrupid = model.getValue("/root/main/data/cdgrupid");
  577. var cdid = model.getValue("/root/main/data/cdid");
  578. cdsid = cdgrupid+cdid;
  579. var cdnm = model.getValue("/root/main/data/cdnm");
  580. result = messageBox( "[코드군 ID : "+cdgrupid+",코드 ID : "+cdid+", 코드 이름 : "+cdnm+"]을 수정", "S001");
  581. if( result==7 || result == 2 ) return;
  582. model.copyNode("/root/send/data", "/root/main/data");
  583. result = submit("TXZBC00110");
  584. }else if(modestatus=="delete"){
  585. var cdgrupid = model.getValue("/root/main/data/cdgrupid");
  586. var cdid = model.getValue("/root/main/data/cdid");
  587. cdsid = cdgrupid+cdid;
  588. var cdnm = model.getValue("/root/main/data/cdnm");
  589. result = messageBox( "[코드군 ID : "+cdgrupid+",코드 ID : "+cdid+", 코드 이름 : "+cdnm+"]을 삭제", "S001");
  590. if( result==7 || result == 2 ) return;
  591. model.copyNode("/root/send/data", "/root/main/data");
  592. model.makeValue("/root/send/data/cdsid", cdsid);
  593. result = submit("TXZBC00111");
  594. }else if(modestatus=="importexcel"){
  595. var update_data = grd_cdlist.getUpdateData();
  596. model.removenode("/root/send/data");
  597. model.makeNode("/root/send/data");
  598. model.setValue("/root/send/data", update_data);
  599. //alert(update_data);
  600. success = submit("TXZBC00119");
  601. if(success){
  602. alert("["+(grd_cdlist.rows-1)+"]개의 코드군을 엑셀로 부터 추출하여 성공적으로 서버에 적용하였습니다.");
  603. for(var i=grd_cdlist.fixedRows; i<grd_cdlist.rows; i++){
  604. grd_cdlist.rowStatus(i) = 0;
  605. }
  606. }
  607. }else if(modestatus=="swapsequence"){
  608. var update_data = grd_cdlist.getUpdateData();
  609. //alert("update_data : "+update_data);
  610. model.removenode("/root/send/data");
  611. model.makeNode("/root/send/data");
  612. model.setValue("/root/send/data", update_data);
  613. submit("TXZBC00120");
  614. }else{
  615. messageBox('처리 모드를', 'C002');
  616. return;
  617. }
  618. if(modestatus!="importexcel"){
  619. fInitMainData(true);
  620. var row = grd_cdgruplist.row;
  621. var cdgrupid = grd_cdgruplist.valueMatrix(row, grd_cdgruplist.colRef("cdgrupid"));
  622. model.makeValue("root/send/data/sortfield", "dispseq");
  623. model.makeValue("/root/send/data/cdgrupid", cdgrupid);
  624. model.makeValue("/root/send/data/cdid", "");
  625. model.makeValue("/root/send/data/cdengabbrnm", "");
  626. model.makeValue("/root/send/data/cdnm", "");
  627. model.makeValue("/root/send/data/detldesc", "");
  628. model.makeValue("/root/send/data/cdval", "");
  629. model.makeValue("/root/send/data/minval", "");
  630. model.makeValue("/root/send/data/maxval", "");
  631. model.makeValue("/root/send/data/minopercd", "");
  632. model.makeValue("/root/send/data/maxopercd", "");
  633. submit("TRZBC00124");
  634. fInitMainDataControls(false);
  635. if(modestatus!="delete"&&modestatus!="swapsequence"){
  636. row = fFindGridItem(grd_cdlist, grd_cdlist.colRef("cdsid"), cdsid);
  637. model.copyNode("/root/main/data", "/root/main/code/list/code["+row+"]");
  638. model.setValue("/root/main/mode/modelabel", "코드관리>코드상세보기");
  639. model.setValue("/root/main/mode/modestatus", "view");
  640. model.refresh();
  641. }
  642. fInitMainDataControls(true);
  643. }
  644. ]]>
  645. </script>
  646. </button>
  647. </group>
  648. <group id="grd_reorg_sequence" style="left:343px; top:330px; width:28px; height:45px; ">
  649. <img id="img6" class="icon_top" style="left:1px; top:1px; width:26px; height:19px; background-stretch:stretch; ">
  650. <script type="javascript" ev:event="onclick">
  651. <![CDATA[
  652. var selected_row = grd_cdlist.row;
  653. var up_row = selected_row-1;
  654. //alert("selected_row : "+selected_row);
  655. //alert("up_row : "+up_row);
  656. if(selected_row>0){
  657. if(up_row>0){
  658. fSwapCodeSequence(selected_row, up_row);
  659. model.setValue("/root/main/mode/modestatus", "swapsequence");
  660. model.refresh();
  661. grd_cdlist.row = up_row;
  662. }else{
  663. messageBox("더이상 위로 이동할수 없습니다.", "C");
  664. }
  665. }else{
  666. messageBox("선택된 행이 없습니다.", "C");
  667. }
  668. ]]>
  669. </script>
  670. </img>
  671. <img id="img3" class="icon_bottom" style="left:1px; top:24px; width:26px; height:19px; background-stretch:stretch; ">
  672. <script type="javascript" ev:event="onclick">
  673. <![CDATA[
  674. var selected_row = grd_cdlist.row;
  675. var dn_row = selected_row +1;
  676. //alert("selected_row : "+selected_row+", dn_row : "+dn_row+", grd_cdlist.rows : "+grd_cdlist.rows);
  677. if(selected_row>0){
  678. if(dn_row<grd_cdlist.rows){
  679. fSwapCodeSequence(selected_row, dn_row);
  680. model.setValue("/root/main/mode/modestatus", "swapsequence");
  681. model.refresh();
  682. grd_cdlist.row = dn_row;
  683. }else{
  684. messageBox("더이상 아래로 이동할수 없습니다.", "C");
  685. }
  686. }else{
  687. messageBox("선택된 행이 없습니다.", "C");
  688. }
  689. ]]>
  690. </script>
  691. </img>
  692. </group>
  693. </xhtml:body>
  694. </xhtml:html>