SMZUM01500_직종별바로가기.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <jobkindlist>
  11. <rows>
  12. <jobkindcd/>
  13. <itemnm/>
  14. <scrncd/>
  15. <seq/>
  16. <icontype/>
  17. <icontext/>
  18. <menuparam/>
  19. <iconcd/>
  20. <oldscrncd/>
  21. </rows>
  22. </jobkindlist>
  23. </main>
  24. <send>
  25. <jobkindcd/>
  26. <scrncd/>
  27. <jobkindlist/>
  28. <icontype>A</icontype>
  29. </send>
  30. <init>
  31. <R0061list>
  32. </R0061list>
  33. <Z0014list>
  34. </Z0014list>
  35. <iconlist>
  36. <rows>
  37. <checkyn/>
  38. <iconnm/>
  39. <iconcd/>
  40. <iconurl/>
  41. </rows>
  42. </iconlist>
  43. </init>
  44. </root>
  45. </instance>
  46. <bind id="bind1" ref="/root/main/jobkindlist/icontext" readonly="../icontype = 'I'"/>
  47. <submission id="TRZBC00101"/>
  48. <submission id="TRZUM01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/jobkindlist"/>
  49. <submission id="TRZUM01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/iconlist"/>
  50. <submission id="TXZUM01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  51. <script type="javascript" ev:event="xforms-model-construct-done">
  52. <![CDATA[
  53. zbcfGetCodeList( new Array("R0061", "Z0014"), new Array("/root/init/R0061list", "/root/init/Z0014list") );
  54. addComboItem( "cmb_jobkindcd" , "전체", "");
  55. model.removeNodeset("/root/main/jobkindlist/rows");
  56. submit("TRZUM01502");
  57. ]]>
  58. </script>
  59. <script type="javascript" ev:event="xforms-ready">
  60. <![CDATA[
  61. fCheckAuth();
  62. fSetGridBackImage(grd_iconlist, 1);
  63. grd_jobkindlist.dataHeight = 30;
  64. ]]>
  65. </script>
  66. </model>
  67. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  69. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  70. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  71. <script type="javascript">
  72. <![CDATA[
  73. function fSetGridBackImage(gridObj, imgCell){
  74. gridObj.dataHeight = 30;
  75. var gridNode = gridObj.attribute("nodeset");
  76. for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
  77. var iconurl = "../../../com/hismainweb/images/" + model.getValue(gridNode+"["+i+"]/iconcd") + ".gif";
  78. gridObj.cellStyle("background-image", i, imgCell) = iconurl;
  79. gridObj.cellStyle("background-position", i, imgCell) = "center";
  80. }
  81. }
  82. function fCheckAuth(){
  83. var authX = !checkAuth('X');
  84. btn_addrow.disabled = authX;
  85. btn_delete.disabled = authX;
  86. btn_save.disabled = authX;
  87. }
  88. ]]>
  89. </script>
  90. </xhtml:head>
  91. <xhtml:body guideline="1,1195;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  92. <group id="group3" scroll="auto" style="left:0px; top:0px; width:705px; height:750px; ">
  93. <group id="group2" style="left:0px; top:0px; width:704px; height:35px; vertical-align:top; ">
  94. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:704px; height:35px; "/>
  95. <caption id="caption2" class="search_name" style="left:15px; top:8px; width:86px; height:17px; ">직종코드 :</caption>
  96. <button id="btn_search" class="btn1_letter2" style="left:626px; top:7px; width:56px; height:22px; ">
  97. <caption>조회</caption>
  98. <script type="javascript" ev:event="DOMActivate">
  99. <![CDATA[
  100. submit("TRZUM01501");
  101. fSetGridBackImage(grd_jobkindlist, 6);
  102. ]]>
  103. </script>
  104. </button>
  105. <line id="line13" class="line_4" style="x1:610px; y1:7px; x2:610px; y2:29px; "/>
  106. <select1 id="cmb_jobkindcd" ref="/root/send/jobkindcd" class="combo_search" appearance="minimal" style="left:101px; top:8px; width:115px; height:19px; ">
  107. <choices>
  108. <itemset nodeset="/root/init/R0061list/R0061">
  109. <label ref="cdnm"/>
  110. <value ref="cdid"/>
  111. </itemset>
  112. </choices>
  113. </select1>
  114. <input id="input3" ref="/root/send/scrncd" class="input_search" style="left:440px; top:8px; width:100px; height:19px; "/>
  115. <caption id="caption3" class="search_name" style="left:351px; top:10px; width:86px; height:17px; ">화면코드 :</caption>
  116. </group>
  117. <caption id="caption1" class="tit_2" style="left:5px; top:45px; width:113px; height:14px; ">직종별 바로가기</caption>
  118. <line id="line1" class="line_1" style="x1:0px; y1:60px; x2:704px; y2:60px; "/>
  119. <datagrid id="grd_jobkindlist" nodeset="/root/main/jobkindlist/rows" caption="직종코드^바로가기명^화면ID^순서^표시형태^^파라미터^iconcd" colsep="^" colwidth="100, 130, 90, 40, 60, 40, 100, 75, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:65px; width:598px; height:685px; ">
  120. <col disabled="true" ref="jobkindcd" type="combo" _key="true">
  121. <choices>
  122. <itemset nodeset="/root/init/R0061list/R0061">
  123. <label ref="cdnm"/>
  124. <value ref="cdid"/>
  125. </itemset>
  126. </choices>
  127. </col>
  128. <col autonext="false" imemode="hangul" ref="itemnm" type="input" maxlength="10"/>
  129. <col autonext="false" imemode="disabled" ref="scrncd" type="input" maxlength="10" _chartype="upper"/>
  130. <col ref="seq" type="input"/>
  131. <col class="text_center" ref="icontype" type="combo">
  132. <choices>
  133. <itemset nodeset="/root/init/Z0014list/Z0014">
  134. <label ref="cdnm"/>
  135. <value ref="cdid"/>
  136. </itemset>
  137. </choices>
  138. </col>
  139. <col imemode="hangul" ref="icontext" type="input" style="text-align:center; "/>
  140. <col ref="menuparam" type="input"/>
  141. <col ref="iconcd" visibility="hidden"/>
  142. <col ref="oldscrncd" visibility="hidden"/>
  143. <script type="javascript" ev:event="xforms-select">
  144. <![CDATA[
  145. if(grd_jobkindlist.col == 1){ // 직종선택
  146. grd_jobkindlist.col = 2;
  147. grd_jobkindlist.dispatch("onentercell");
  148. // 불필요한 코드 삭제 - 김기호
  149. //grd_jobkindlist.editCell();
  150. }else if(grd_jobkindlist.col == 5){ // 아이콘선택
  151. //표시형태 선택시 처리
  152. var icontype = model.getValue("/root/main/jobkindlist/rows["+grd_jobkindlist.row+"]/icontype");
  153. if(icontype == "I"){
  154. grd_iconlist.visible = true;
  155. model.setFocus("grd_iconlist");
  156. }else{
  157. grd_iconlist.visible = false;
  158. grd_jobkindlist.col = 6;
  159. grd_jobkindlist.dispatch("onentercell");
  160. // 불필요한 코드 삭제 - 김기호
  161. //grd_jobkindlist.editCell();
  162. }
  163. }
  164. ]]>
  165. </script>
  166. <script type="javascript" ev:event="onendedit">
  167. <![CDATA[
  168. //iconText 입력시
  169. if( grd_jobkindlist.col == 6 ){
  170. var row = grd_jobkindlist.row;
  171. var iconText = model.getValue("/root/main/jobkindlist/rows[" + row + "]/icontext");
  172. if (iconText.getByteLength() > 8) {
  173. messageBox("한글 4글자, 영문 8글자를 초과", "E001");
  174. grd_jobkindlist.editCell();
  175. return;
  176. }
  177. model.setValue("/root/main/jobkindlist/rows["+row+"]/iconcd", "IDZUM10000");
  178. grd_jobkindlist.cellStyle("background-image", row, 6) = "../../../com/hismainweb/images/IDZUM10000.gif";
  179. grd_jobkindlist.cellStyle("background-position", row, 6) = "center";
  180. }
  181. // 김기호 - 버그삭제
  182. //grd_jobkindlist.col = grd_jobkindlist.col + 1;
  183. //grd_jobkindlist.dispatch("onentercell");
  184. //grd_jobkindlist.editCell();
  185. ]]>
  186. </script>
  187. <script type="javascript" ev:event="onentercell">
  188. <![CDATA[
  189. //화면아이디 입력
  190. if( grd_jobkindlist.col == 3 ){
  191. modal("SPZSA20500");
  192. var row = grd_jobkindlist.row;
  193. model.setValue("/root/main/jobkindlist/rows["+row+"]/scrncd", getParameter("SPZSA20500_").split("|")[0]);
  194. grd_jobkindlist.addStatus(row, "update");
  195. model.refresh();
  196. }
  197. ]]>
  198. </script>
  199. <script type="javascript" ev:event="onkeypress">
  200. <![CDATA[
  201. // enter 를 통해서 입력을 마쳤을 경우만 화면ID 선택창 오픈 - 김기호
  202. if (grd_jobkindlist.col == 2 && event.keyCode == 13) {
  203. grd_jobkindlist.col = grd_jobkindlist.col + 1;
  204. grd_jobkindlist.dispatch("onentercell");
  205. }
  206. ]]>
  207. </script>
  208. </datagrid>
  209. <button id="btn_addrow" class="btn2_letter3" style="left:607px; top:40px; width:53px; height:19px; ">
  210. <caption>행추가</caption>
  211. <script type="javascript" ev:event="DOMActivate">
  212. <![CDATA[
  213. grd_jobkindlist.addRow();
  214. grd_jobkindlist.isReadOnly(grd_jobkindlist.row, 1) = false;
  215. grd_jobkindlist.col = 1;
  216. grd_jobkindlist.dispatch("onentercell");
  217. ]]>
  218. </script>
  219. </button>
  220. <datagrid id="grd_iconlist" nodeset="/root/init/iconlist/rows" visibility="hidden" caption="선택^아이콘^iconcd^iconurl^iconurl" colsep="^" colwidth="40, 45, 50, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:601px; top:65px; width:103px; height:685px; ">
  221. <col ref="checkyn" type="radio"/>
  222. <col ref="iconnm"/>
  223. <col ref="iconcd" visibility="hidden"/>
  224. <col ref="iconurl" visibility="hidden"/>
  225. <script type="javascript" ev:event="xforms-select">
  226. <![CDATA[
  227. if( grd_iconlist.col == 0){
  228. var row = grd_jobkindlist.row;
  229. var iconcd = model.getValue("/root/init/iconlist/rows[" +grd_iconlist.row+"]/iconcd");
  230. var iconurl = model.getValue("/root/init/iconlist/rows[" +grd_iconlist.row+"]/iconurl");
  231. model.setValue("/root/main/jobkindlist/rows["+row+"]/icontext", "");
  232. model.setValue("/root/main/jobkindlist/rows["+row+"]/iconcd", iconcd);
  233. grd_jobkindlist.cellStyle("background-image", row, 6) = "../../../"+ iconurl;
  234. grd_jobkindlist.cellStyle("background-position", row, 6) = "center";
  235. model.refresh();
  236. }
  237. ]]>
  238. </script>
  239. </datagrid>
  240. <button id="btn_delete" class="btn2_letter2" style="left:662px; top:40px; width:42px; height:19px; ">
  241. <caption>삭제</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. var row = grd_jobkindlist.row;
  245. grd_jobkindlist.deleteRow(row);
  246. ]]>
  247. </script>
  248. </button>
  249. </group>
  250. <group id="group1" scroll="auto" style="left:0px; top:750px; width:705px; height:27px; ">
  251. <button id="btn_save" class="btn4_letter2" style="left:648px; top:5px; width:56px; height:22px; ">
  252. <caption>저장</caption>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. var updtdata = getGridUpdateData(grd_jobkindlist);
  256. if (updtdata == "") {
  257. messageBox("변경된 데이터가","I004");
  258. return;
  259. }
  260. var jobKindCd = "";
  261. var itemNm = "";
  262. var scrnCd = "";
  263. var seq = "";
  264. var iconType = "";
  265. var iconText = "";
  266. var menuParam = "";
  267. var iconCd = "";
  268. for( i = grd_jobkindlist.fixedRows; i < grd_jobkindlist.rows ; i++ ) {
  269. var status = grd_jobkindlist.rowStatus(i);
  270. if(status != 0){
  271. jobKindCd = grd_jobkindlist.valueMatrix(i,1);
  272. itemNm = grd_jobkindlist.valueMatrix(i,2);
  273. scrnCd = grd_jobkindlist.valueMatrix(i,3);
  274. seq = grd_jobkindlist.valueMatrix(i,4);
  275. iconType = grd_jobkindlist.valueMatrix(i,5);
  276. iconText = grd_jobkindlist.valueMatrix(i,6);
  277. menuParam = grd_jobkindlist.valueMatrix(i,7);
  278. iconCd = grd_jobkindlist.valueMatrix(i,8);
  279. if(jobKindCd == ""){
  280. messageBox("직종코드를","C002");
  281. grd_jobkindlist.row = i;
  282. grd_jobkindlist.col = 1;
  283. grd_jobkindlist.dispatch("onentercell");
  284. return;
  285. }
  286. if(itemNm == ""){
  287. messageBox("바로가기명을","C001");
  288. grd_jobkindlist.row = i;
  289. grd_jobkindlist.col = 2;
  290. grd_jobkindlist.dispatch("onentercell");
  291. return;
  292. }
  293. if(scrnCd == ""){
  294. messageBox("연결할 화면을","C002");
  295. grd_jobkindlist.row = i;
  296. grd_jobkindlist.col = 3;
  297. grd_jobkindlist.dispatch("onentercell");
  298. return;
  299. }
  300. if(seq == ""){
  301. messageBox("표시순서를","C001");
  302. grd_jobkindlist.row = i;
  303. grd_jobkindlist.col = 4;
  304. grd_jobkindlist.dispatch("onentercell");
  305. return;
  306. }
  307. if(iconType == ""){
  308. messageBox("표시형태를","C002");
  309. grd_jobkindlist.row = i;
  310. grd_jobkindlist.col = 5;
  311. grd_jobkindlist.dispatch("onentercell");
  312. return;
  313. }
  314. if(iconType == "T" && iconText == "" ){
  315. messageBox("표시할 텍스트를","C001");
  316. grd_jobkindlist.row = i;
  317. grd_jobkindlist.col = 6;
  318. grd_jobkindlist.dispatch("onentercell");
  319. grd_jobkindlist.editCell();
  320. return;
  321. }
  322. if(iconType == "I" && (iconCd == "" || iconCd == "IDZUM10000")){
  323. messageBox("표시할 아이콘을","C002");
  324. grd_jobkindlist.row = i;
  325. grd_iconlist.visible = true;
  326. model.setFocus("grd_iconlist");
  327. return;
  328. }
  329. if(menuParam != ""){
  330. if((isSearchString(menuParam, "<")
  331. || isSearchString(menuParam, ">")
  332. || isSearchString(menuParam, "&")
  333. || isSearchString(menuParam, "'")
  334. || isSearchString(menuParam, '"') )
  335. || (menuParam.split("|").length >1 )){
  336. messageBox("파라미터로 사용", "E001", "(<, >, &, "+ "'"+", "+'"'+",|)");
  337. return;
  338. }
  339. }
  340. }
  341. //insert시
  342. if(status == 1){
  343. model.setValue("/root/main/jobkindlist/rows["+i+"]/oldscrncd", scrncd);
  344. }
  345. }
  346. // alert("grid update data = " + grd_shortcutlist.getUpdateData());
  347. model.setValue("/root/send/jobkindlist", updtdata);
  348. if ( submit("TXZUM01501") ) {
  349. grd_jobkindlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  350. }
  351. ]]>
  352. </script>
  353. </button>
  354. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:704px; y2:0px; "/>
  355. </group>
  356. </xhtml:body>
  357. </xhtml:html>