SMRBC00500_부서별사용자권한관리.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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. <dept>
  11. <deptauth/>
  12. </dept>
  13. </main>
  14. <send>
  15. <deptcode>
  16. <instcd/>
  17. <deptcd/>
  18. <depthngnm/>
  19. <emplno/>
  20. <emplnm/>
  21. <fromdd/>
  22. <todd>99991231</todd>
  23. </deptcode>
  24. <deptauthlist>
  25. <deptauth/>
  26. </deptauthlist>
  27. </send>
  28. <init/>
  29. <hidden/>
  30. <source>
  31. <defaultvalue/>
  32. </source>
  33. <temp/>
  34. </root>
  35. </instance>
  36. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  37. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  38. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  39. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  40. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  41. <script type="javascript" ev:event="xforms-ready">
  42. <![CDATA[
  43. fResetForm();
  44. // misfMsterDetailSet(grd_deptauth, null, "TRRBC00501", "Y");
  45. // misfMsterDetailRetrieve();
  46. ]]>
  47. </script>
  48. <script type="javascript">
  49. <![CDATA[
  50. //========================================================================================
  51. //화면 로드시 초기화 함수
  52. //========================================================================================
  53. function fResetForm()
  54. {
  55. model.removenode("/root/main/dept");
  56. var sToday = getCurrentDate().toString();
  57. model.setValue(ipt_fromdd.attribute("ref"), sToday);
  58. model.setValue("/root/send/deptcode/instcd", getUserInfo("dutplceinstcd"));
  59. btn_search.dispatch("DOMActivate");
  60. model.refresh();
  61. }
  62. //========================================================================================
  63. //코드 Validation Check
  64. //========================================================================================
  65. function fValidationCheck(vgbn, recvlist, pcdgrupid, pNextIndex, pValueControl, pNodeName, pRetrKind)
  66. {
  67. if(event.keyCode == 13 || event.name == "xforms-value-changed")
  68. {
  69. document.controls(event.currentTarget).value = document.controls(event.currentTarget).currentText;
  70. misfValidationCheck(vgbn, pcdgrupid, recvlist, pValueControl, pNodeName, pRetrKind);
  71. model.refresh();
  72. if (pNextIndex != "") {
  73. model.setFocus(pNextIndex);
  74. }
  75. }
  76. }
  77. //========================================================================================
  78. //부서코드 Help Open
  79. //========================================================================================
  80. function fOpenPopupDeptHelp(pControl, pInstance)
  81. {
  82. misfOpenPopUpList("11", pControl, "TRRBC00501", pInstance);
  83. model.refresh();
  84. }
  85. function fOpenPopupUserHelp(pCtrl, pInstance)
  86. {
  87. misfOpenPopUpList("01", pCtrl, "", pInstance);
  88. model.refresh();
  89. }
  90. ]]>
  91. </script>
  92. <submission id="TRRBC00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptcode" resultref="/root/main/dept"/>
  93. <submission id="TXRBC00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptauthlist" resultref="/root/temp"/>
  94. </model>
  95. </xhtml:head>
  96. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  97. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  98. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">부서별 사용자권한관리</caption>
  99. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  100. </group>
  101. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  102. <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
  103. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  104. <caption id="caption7" class="search_name" style="left:16px; top:9px; width:85px; height:17px; ">부 서 :</caption>
  105. <line id="line5" class="line_4" style="x1:1107px; y1:8px; x2:1107px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  106. <input id="ipt_deptcd" ref="/root/send/deptcode/deptcd" class="input_s_essential" navindex="2" style="left:104px; top:8px; width:76px; height:19px; ">
  107. <script type="javascript" ev:event="onkeypress">
  108. <![CDATA[
  109. if(event.keyCode == 13)
  110. {
  111. model.setFocus("btn_search");
  112. }
  113. ]]>
  114. </script>
  115. <script type="javascript" ev:event="xforms-value-changed">
  116. <![CDATA[
  117. racfDeptValidCheck("deptcd,depthngnm");
  118. ]]>
  119. </script>
  120. </input>
  121. <input id="ipt_depthngnm" ref="/root/send/deptcode/depthngnm" class="input_s_essential" navindex="3" style="left:205px; top:8px; width:140px; height:19px; ">
  122. <script type="javascript" ev:event="onkeypress">
  123. <![CDATA[
  124. if(event.keyCode == 13)
  125. {
  126. model.setFocus("btn_search");
  127. }
  128. ]]>
  129. </script>
  130. <script type="javascript" ev:event="xforms-value-changed">
  131. <![CDATA[
  132. racfDeptValidCheck("deptcd,depthngnm");
  133. ]]>
  134. </script>
  135. </input>
  136. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123px; top:8px; width:56px; height:22px; text-align:left; ">
  137. <caption>조회</caption>
  138. <script type="javascript" ev:event="DOMActivate">
  139. <![CDATA[
  140. model.removeNodeset("/root/main/dept/deptauth");
  141. model.refresh();
  142. submit("TRRBC00501");
  143. misfSetReadOnlyCol(grd_deptauth, "deptcd,depthngnm,emplno", true);
  144. //misfMsterDetailRetrieve();
  145. // misfSetReadOnlyCol(grd_deptauth, "deptcd");
  146. // misfSetReadOnlyCol(grd_deptauth, "emplno");
  147. ]]>
  148. </script>
  149. </button>
  150. <button id="btn_help" class="icon_search" style="left:184px; top:11px; width:16px; height:16px; ">
  151. <caption/>
  152. <script type="javascript" ev:event="DOMActivate">
  153. <![CDATA[
  154. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  155. ]]>
  156. </script>
  157. </button>
  158. <caption id="caption10" class="search_name" style="left:365px; top:10px; width:91px; height:17px; ">관 리 자 :</caption>
  159. <input id="ipt_name" ref="/root/send/deptcode/emplnm" class="input_s_essential" navindex="2" style="left:553px; top:9px; width:140px; height:19px; ">
  160. <script type="javascript" ev:event="onkeypress">
  161. <![CDATA[
  162. if(event.keyCode == 13)
  163. {
  164. model.setFocus("btn_search");
  165. }
  166. ]]>
  167. </script>
  168. <script type="javascript" ev:event="xforms-value-changed">
  169. <![CDATA[
  170. fValidationCheck("12", "emplno,emplnm", "", "btn_search");
  171. ]]>
  172. </script>
  173. </input>
  174. <button id="btn_emplno" class="icon_search" style="left:534px; top:11px; width:16px; height:16px; ">
  175. <caption/>
  176. <script type="javascript" ev:event="DOMActivate">
  177. <![CDATA[
  178. fOpenPopupUserHelp(ipt_emplno, "emplno,emplnm");
  179. model.refresh();
  180. ]]>
  181. </script>
  182. </button>
  183. <input id="ipt_emplno" ref="/root/send/deptcode/emplno" class="input_s_essential" navindex="1" maxlength="8" style="left:455px; top:9px; width:76px; height:19px; text-align:center; ">
  184. <script type="javascript" ev:event="onkeypress">
  185. <![CDATA[
  186. if(event.keyCode == 13)
  187. {
  188. model.setFocus("btn_search");
  189. }
  190. ]]>
  191. </script>
  192. <script type="javascript" ev:event="xforms-value-changed">
  193. <![CDATA[
  194. fValidationCheck("12", "emplno,emplnm", "", "btn_search");
  195. ]]>
  196. </script>
  197. </input>
  198. <input id="ipt_fromdd" ref="/root/send/deptcode/fromdd" class="input_s_essential" inputtype="date" style="left:816px; top:9px; width:94px; height:19px; "/>
  199. <caption id="caption19" class="search_name" style="left:725px; top:10px; width:101px; height:17px; ">유효일자 :</caption>
  200. <input id="ipt_todd" ref="/root/send/deptcode/todd" class="input_s_essential" inputtype="date" style="left:930px; top:10px; width:94px; height:19px; "/>
  201. <caption id="caption38" style="left:915px; top:11px; width:15px; height:20px; ">~</caption>
  202. </group>
  203. <caption id="caption9" class="tit_2" style="left:5px; top:55px; width:117px; height:13px; ">사용자 권한</caption>
  204. <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  205. <line id="line4" class="line_3" style="x1:0px; y1:121px; x2:1194px; y2:121px; "/>
  206. <datagrid id="grd_deptauth" nodeset="/root/main/dept/deptauth" caption="기관코드^전체^관리부서^관리부서^사원번호^성명^근무부서^직책^전표 예산^부서 선택^예산 입력^예산 신청^예산 조회^종료일자" colsep="^" colwidth="0, 60, 85, 120, 100, 100, 120, 90, 90, 90, 90, 90, 90, 100" focuscolor="#ccffff" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" selectionmode="free" style="left:0px; top:75px; width:1194px; height:665px; ">
  207. <col ref="instcd"/>
  208. <col checkvalue="Y,N" ref="alldept" type="checkbox"/>
  209. <col class="text_center" ref="deptcd" type="inputbutton"/>
  210. <col ref="depthngnm" type="input"/>
  211. <col class="text_center" ref="emplno" type="inputbutton"/>
  212. <col class="text_center" ref="emplnm"/>
  213. <col ref="duplcedeptnm"/>
  214. <col ref="jobrespnm"/>
  215. <col checkvalue="Y,N" ref="slipsearchyn" type="checkbox"/>
  216. <col checkvalue="Y,N" ref="selectdeptyn" type="checkbox"/>
  217. <col checkvalue="Y,N" ref="bugtinputyn" type="checkbox"/>
  218. <col checkvalue="Y,N" ref="bugtreqyn" type="checkbox"/>
  219. <col checkvalue="Y,N" ref="bugtsearchyn" type="checkbox"/>
  220. <col class="text_center" ref="todd" type="inputdate" format="yyyy-mm-dd"/>
  221. <script type="javascript" ev:event="onbuttonclick">
  222. <![CDATA[
  223. if(grd_deptauth.col == grd_deptauth.colRef("deptcd"))
  224. {
  225. fOpenPopupDeptHelp(grd_deptauth, "deptcd,depthngnm");
  226. }
  227. else if(grd_deptauth.col == grd_deptauth.colRef("emplno"))
  228. {
  229. fOpenPopupUserHelp(grd_deptauth, "emplno,emplnm");
  230. }
  231. ]]>
  232. </script>
  233. <script type="javascript" ev:event="onendedit">
  234. <![CDATA[
  235. if(grd_deptauth.col == grd_deptauth.colRef("deptcd") || grd_deptauth.col == grd_deptauth.colRef("depthngnm"))
  236. {
  237. misfValidationCheck("02", "", "deptcd,depthngnm");
  238. model.refresh();
  239. }
  240. ]]>
  241. </script>
  242. <script type="javascript" ev:event="onclick">
  243. <![CDATA[
  244. if(grd_deptauth.col == grd_deptauth.colRef("alldept") && grd_deptauth.isCell(event.target))
  245. {
  246. if(grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("alldept")) == "Y")
  247. {
  248. grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("deptcd")) = "";
  249. grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("depthngnm")) = "";
  250. grd_deptauth.isReadOnly(grd_deptauth.row, grd_deptauth.colRef("deptcd")) = true;
  251. grd_deptauth.isReadOnly(grd_deptauth.row, grd_deptauth.colRef("depthngnm")) = true;
  252. }
  253. else
  254. {
  255. grd_deptauth.isReadOnly(grd_deptauth.row, grd_deptauth.colRef("deptcd")) = false;
  256. grd_deptauth.isReadOnly(grd_deptauth.row, grd_deptauth.colRef("depthngnm")) = false;
  257. }
  258. }
  259. ]]>
  260. </script>
  261. </datagrid>
  262. <button id="btn_excel" class="btn2_letter4" style="left:1015px; top:50px; width:64px; height:19px; text-align:left; ">
  263. <caption>엑셀출력</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. misfSaveExcel(grd_deptauth);
  267. ]]>
  268. </script>
  269. </button>
  270. <button id="btn_addrow" class="btn2_letter3" style="left:1084px; top:50px; width:58px; height:19px; ">
  271. <caption>행추가</caption>
  272. <script type="javascript" ev:event="DOMActivate">
  273. <![CDATA[
  274. misfGridIUD(grd_deptauth, "A");
  275. grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("instcd")) = getUserInfo("dutplceinstcd");
  276. grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("todd")) = "99991231";
  277. ]]>
  278. </script>
  279. </button>
  280. <button id="btn_delrow" class="btn2_letter3" style="left:1139px; top:50px; width:53px; height:19px; ">
  281. <caption>행삭제</caption>
  282. <script type="javascript" ev:event="DOMActivate">
  283. <![CDATA[
  284. misfGridIUD(grd_deptauth, "D");
  285. ]]>
  286. </script>
  287. </button>
  288. </group>
  289. <group id="group2" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  290. <line id="line1" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  291. <button id="btn_save" class="btn4_letter2" style="left:1138px; top:3px; width:56px; height:22px; ">
  292. <caption>저장</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. if(getGridUpdateData(grd_deptauth) == "")
  296. {
  297. messageBox("변경된 데이터가","I004");
  298. }
  299. else
  300. {
  301. for(var i = grd_deptauth.fixedRows ; i < grd_deptauth.rows ; i++)
  302. {
  303. if(grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("alldept")) != "Y")
  304. {
  305. if(grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("deptcd")) == "")
  306. {
  307. messageBox("부서를 입력하세요!","I000");
  308. return false;
  309. }
  310. if(grd_deptauth.valueMatrix(grd_deptauth.row, grd_deptauth.colRef("emplno")) == "")
  311. {
  312. messageBox("사번을 입력하세요!","I000");
  313. return false;
  314. }
  315. }
  316. }
  317. //alert("저장");
  318. //alert(grd_deptauth.getUpdateData());
  319. model.setValue("/root/send/deptauthlist/deptauth", grd_deptauth.getUpdateData());
  320. submit("TXRBC00501");
  321. btn_search.dispatch("DOMActivate");
  322. }
  323. ]]>
  324. </script>
  325. </button>
  326. <button id="btn_print" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  327. <caption>출력</caption>
  328. <script type="javascript" ev:event="DOMActivate">
  329. <![CDATA[
  330. ]]>
  331. </script>
  332. </button>
  333. </group>
  334. </xhtml:body>
  335. </xhtml:html>