SMRBC00300_예산사용부서관리.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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. <mngt>
  11. <bugtlist>
  12. <deptcd/>
  13. <depthngnm/>
  14. <todd/>
  15. </bugtlist>
  16. </mngt>
  17. <use>
  18. <bugtuselist>
  19. <deptcd/>
  20. <todd/>
  21. <bugtusedeptcd/>
  22. <depthngnm/>
  23. <bugtuseyn/>
  24. <bugtprntseq/>
  25. <orgbugtusedeptcd/>
  26. </bugtuselist>
  27. </use>
  28. </main>
  29. <send>
  30. <condition>
  31. <deptcd/>
  32. <depthngnm/>
  33. <instcd/>
  34. </condition>
  35. <bugtlist/>
  36. <bugtuselist/>
  37. </send>
  38. <init/>
  39. <hidden/>
  40. <temp/>
  41. </root>
  42. </instance>
  43. <submission id="TRRBC00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/main/mngt/bugtlist"/>
  44. <submission id="TRRBC00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/bugtlist" resultref="/root/main/use/bugtuselist"/>
  45. <submission id="TXRBC00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  46. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  47. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  48. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. // fCheckAuth();
  52. fOpenForm();
  53. misfMsterDetailSet(grd_bugtmngt, null, "TRRBC00301", "N");
  54. misfMsterDetailSet(grd_bugtuse, grd_bugtmngt, "TRRBC00302", "Y");
  55. ]]>
  56. </script>
  57. <script type="javascript">
  58. <![CDATA[
  59. //========================================================================================
  60. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  61. //========================================================================================
  62. function fCheckAuth() {
  63. btn_search.disabled = !checkAuth("R");
  64. btn_save.disabled = !checkAuth("X");
  65. btn_grdadd.disabled = !checkAuth("X");
  66. btn_grddel.disabled = !checkAuth("X");
  67. }
  68. //========================================================================================
  69. //화면 로드시 초기화 함수
  70. //========================================================================================
  71. function fOpenForm() {
  72. model.removenode("/root/main/mngt/bugtlist");
  73. model.removenode("/root/main/use/bugtuselist");
  74. model.setValue("/root/send/condition/instcd", getUserInfo("dutplceinstcd"));
  75. model.refresh();
  76. }
  77. //========================================================================================
  78. //예산관리부서 조회
  79. //========================================================================================
  80. function fGetBugtMngtList() {
  81. //기존 데이터 삭제
  82. model.removenode("/root/main/mngt/bugtlist");
  83. misfMsterDetailRetrieve();
  84. }
  85. //========================================================================================
  86. //예산 사용부서 조회
  87. //========================================================================================
  88. function fGetBugtUsetList(pRow) {
  89. if ( pRow > 0 ) {
  90. var sDeptCd = grd_bugtmngt.valueMatrix(pRow, grd_bugtmngt.colRef("deptcd"));
  91. var sToDD = grd_bugtmngt.valueMatrix(pRow, grd_bugtmngt.colRef("todd"));
  92. //기존 데이터 삭제
  93. model.removenode("/root/main/use/bugtuselist");
  94. model.resetInstanceNode("/root/send/bugtuselist");
  95. model.makeNode("/root/send/bugtlist/deptcd");
  96. model.makeNode("/root/send/bugtlist/todd");
  97. model.setValue("/root/send/bugtlist/deptcd", sDeptCd);
  98. model.setValue("/root/send/bugtlist/todd", sToDD);
  99. misfMsterDetailRetrieve();
  100. }
  101. }
  102. //========================================================================================
  103. // 저장버튼 클릭시 저장 수행 함수
  104. //========================================================================================
  105. function fClickSaveBtn() {
  106. if(!fIsValidForSave())//저장전 유효성 검사
  107. return;
  108. misfSave("TXRBC00301");
  109. }
  110. //========================================================================================
  111. //저장전 유효성 검사
  112. //========================================================================================
  113. function fIsValidForSave() {
  114. var sBugtList = getGridUpdateData(grd_bugtuse);
  115. if(sBugtList == "") {
  116. messageBox("변경된 데이터가","I004");
  117. return false;
  118. }else if(sBugtList != "" ) {
  119. model.copyNode("/root/send/bugtuselist", sBugtList);
  120. return true;
  121. }
  122. }
  123. //========================================================================================
  124. //그리드 행 추가
  125. //========================================================================================
  126. function fAddGrid(pGrid) {
  127. var mngt_row = grd_bugtmngt.row;
  128. if ( mngt_row > 0 ) {
  129. pGrid.addRow();
  130. var sDeptCd = grd_bugtmngt.valueMatrix(mngt_row, grd_bugtmngt.colRef("deptcd"));
  131. var sToDD = grd_bugtmngt.valueMatrix(mngt_row, grd_bugtmngt.colRef("todd"));
  132. model.setValue("/root/main/use/bugtuselist["+ pGrid.row + "]/deptcd", sDeptCd);
  133. model.setValue("/root/main/use/bugtuselist["+ pGrid.row + "]/todd", sToDD);
  134. model.setValue("/root/main/use/bugtuselist["+ pGrid.row + "]/bugtuseyn", "Y");
  135. pGrid.editCell();
  136. model.refresh();
  137. }else {
  138. messageBox("예산관리부서를 선택하지 ","E007");
  139. }
  140. }
  141. //========================================================================================
  142. //그리드 행 삭제
  143. //========================================================================================
  144. function fDelGrid(pGrid) {
  145. var cur_row = pGrid.row;
  146. if(cur_row > -1) {
  147. deleteSelectedRows(pGrid, false); //true : 바로삭제, false : 상태만 삭제로 변경
  148. pGrid.refresh();
  149. }else if(cur_row == -1) {
  150. messageBox("삭제하려는 행을", "C002");
  151. }
  152. }
  153. //========================================================================================
  154. //부서코드 Help Open
  155. //========================================================================================
  156. function fOpenPopupDeptHelp(pControl, pInstance) {
  157. //02 부서코드Helper
  158. misfOpenPopUpList("08", pControl, "", pInstance);
  159. model.refresh();
  160. }
  161. ]]>
  162. </script>
  163. </model>
  164. </xhtml:head>
  165. <xhtml:body guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  166. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  167. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">예산사용부서 관리</caption>
  168. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  169. </group>
  170. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  171. <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
  172. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  173. <line id="line5" class="line_4" style="x1:1107px; y1:8px; x2:1107px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  174. <input id="ipt_deptcd" ref="/root/send/condition/deptcd" class="input_s_essential" navindex="3" style="left:85px; top:8px; width:80px; height:19px; ">
  175. <script type="javascript" ev:event="onkeypress">
  176. <![CDATA[
  177. if(event.keyCode == 13)
  178. {
  179. ipt_deptcd.value = ipt_deptcd.currentText;
  180. misfValidationCheck("02", "", "deptcd,depthngnm");
  181. model.refresh();
  182. }
  183. ]]>
  184. </script>
  185. </input>
  186. <input id="ipt_depthngnm" ref="/root/send/condition/depthngnm" class="input_s_essential" navindex="3" style="left:190px; top:8px; width:180px; height:19px; ">
  187. <script type="javascript" ev:event="onkeypress">
  188. <![CDATA[
  189. if(event.keyCode == 13)
  190. {
  191. ipt_depthngnm.value = ipt_depthngnm.currentText;
  192. misfValidationCheck("02", "", "deptcd,depthngnm");
  193. model.refresh();
  194. }
  195. ]]>
  196. </script>
  197. </input>
  198. <caption id="caption5" class="search_name" style="left:11px; top:9px; width:74px; height:17px; ">부 서 :</caption>
  199. <button id="btn_help" class="icon_search" style="left:170px; top:9px; width:16px; height:16px; ">
  200. <caption/>
  201. <script type="javascript" ev:event="DOMActivate">
  202. <![CDATA[
  203. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  204. ]]>
  205. </script>
  206. </button>
  207. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123; top:8px; width:56px; height:22px; text-align:left; ">
  208. <caption>조회</caption>
  209. <script type="javascript" ev:event="DOMActivate">
  210. <![CDATA[
  211. fGetBugtMngtList();
  212. ]]>
  213. </script>
  214. </button>
  215. </group>
  216. <button id="button5" class="btn2_letter3" style="left:1080px; top:408px; width:53px; height:19px; ">
  217. <caption>줄추가</caption>
  218. </button>
  219. <button id="button6" class="btn2_letter3" style="left:1135px; top:408px; width:53px; height:19px; ">
  220. <caption>줄삭제</caption>
  221. </button>
  222. <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:495; y2:70px; "/>
  223. <caption id="caption9" class="tit_2" style="left:5px; top:55px; width:117px; height:14px; ">예산 관리부서</caption>
  224. <line id="line1" class="line_1" style="x1:500; y1:70px; x2:1195; y2:70px; "/>
  225. <caption id="caption1" class="tit_2" style="left:505; top:55px; width:117px; height:14px; ">예산 사용부서</caption>
  226. <datagrid id="grd_bugtmngt" nodeset="/root/main/mngt/bugtlist" caption="관리부서^관리부서명^종료일자" colsep="^" colwidth="100, 356, 0" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:495px; height:664px; ">
  227. <col ref="deptcd"/>
  228. <col ref="depthngnm"/>
  229. <col ref="todd"/>
  230. <script type="javascript" ev:event="onrowchanged">
  231. <![CDATA[
  232. var cur_row = grd_bugtmngt.row;
  233. fGetBugtUsetList(cur_row);
  234. ]]>
  235. </script>
  236. </datagrid>
  237. <datagrid id="grd_bugtuse" nodeset="/root/main/use/bugtuselist" caption="관리부서^종료일자^사용부서^사용부서명^예산사용^예산출력순서^dummy" colsep="^" colwidth="0, 0, 106, 350, 80, 120, 41" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:500px; top:75px; width:695px; height:664px; ">
  238. <col ref="deptcd"/>
  239. <col ref="todd"/>
  240. <col ref="bugtusedeptcd" type="inputbutton"/>
  241. <col ref="depthngnm" type="input"/>
  242. <col checkvalue="Y,N" ref="bugtuseyn" type="checkbox"/>
  243. <col ref="bugtprntseq" type="input"/>
  244. <col ref="dummy" visibility="hidden"/>
  245. <script type="javascript" ev:event="onbuttonclick">
  246. <![CDATA[
  247. if (grd_bugtuse.col == grd_bugtuse.colRef("bugtusedeptcd")) {//사용부서 버튼 클릭시
  248. fOpenPopupDeptHelp(grd_bugtuse, "dummy,bugtusedeptcd,depthngnm");
  249. for(var i=1; i<grd_bugtuse.rows; i++)
  250. {
  251. if(grd_bugtuse.rowStatus(i) == 1)
  252. {
  253. model.setValue("/root/main/use/bugtuselist["+ i + "]/deptcd", grd_bugtmngt.valueMatrix(grd_bugtmngt.row, grd_bugtmngt.colRef("deptcd")));
  254. model.setValue("/root/main/use/bugtuselist["+ i + "]/todd", grd_bugtmngt.valueMatrix(grd_bugtmngt.row, grd_bugtmngt.colRef("todd")));
  255. model.setValue("/root/main/use/bugtuselist["+ i + "]/bugtuseyn", "Y");
  256. }
  257. }
  258. }
  259. ]]>
  260. </script>
  261. <script type="javascript" ev:event="onendedit">
  262. <![CDATA[
  263. if(grd_bugtuse.col == grd_bugtuse.colRef("bugtusedeptcd") || grd_bugtuse.col == grd_bugtuse.colRef("depthngnm"))
  264. {
  265. misfValidationCheck("02", "", "bugtusedeptcd,depthngnm");
  266. model.refresh();
  267. }
  268. ]]>
  269. </script>
  270. </datagrid>
  271. <button id="btn_grddel" class="btn2_letter3" style="left:1139px; top:50px; width:53px; height:19px; ">
  272. <caption>행삭제</caption>
  273. <script type="javascript" ev:event="DOMActivate">
  274. <![CDATA[
  275. //fDelGrid(grd_bugtuse);
  276. misfGridIUD(grd_bugtuse, "D");
  277. ]]>
  278. </script>
  279. </button>
  280. <button id="btn_grdadd" class="btn2_letter3" style="left:1084px; top:50px; width:58px; height:19px; ">
  281. <caption>행추가</caption>
  282. <script type="javascript" ev:event="DOMActivate">
  283. <![CDATA[
  284. fAddGrid(grd_bugtuse);
  285. ]]>
  286. </script>
  287. </button>
  288. </group>
  289. <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  290. <line id="line2" 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. fClickSaveBtn();
  296. ]]>
  297. </script>
  298. </button>
  299. </group>
  300. </xhtml:body>
  301. </xhtml:html>