SMRAD00350_반제관리부서.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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. <deptlist>
  12. </deptlist>
  13. </dept>
  14. <gent>
  15. <gentdeptlist>
  16. </gentdeptlist>
  17. </gent>
  18. </main>
  19. <send>
  20. <condition>
  21. <deptcd/>
  22. <depthngnm/>
  23. <instcd/>
  24. </condition>
  25. <gentdeptlist/>
  26. </send>
  27. <init/>
  28. <hidden/>
  29. <temp/>
  30. </root>
  31. </instance>
  32. <submission id="TRRBC00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/main/dept/deptlist"/>
  33. <submission id="TXRAD00351" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gentdeptlist" resultref="/root/temp"/>
  34. <submission id="TRRAD00351" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/gent/gentdeptlist"/>
  35. </model>
  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="../../../mis/miscommonweb/js/MIS.js"/>
  39. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  40. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  41. <script type="javascript" ev:event="xforms-ready">
  42. <![CDATA[
  43. // fCheckAuth();
  44. fOpenForm();
  45. ]]>
  46. </script>
  47. <script type="javascript">
  48. <![CDATA[
  49. //========================================================================================
  50. //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
  51. //========================================================================================
  52. function fCheckAuth() {
  53. btn_search.disabled = !checkAuth("R");
  54. btn_save.disabled = !checkAuth("X");
  55. btn_grdadd.disabled = !checkAuth("X");
  56. btn_grddel.disabled = !checkAuth("X");
  57. btn_prt.disabled = !checkAuth("P");
  58. }
  59. //========================================================================================
  60. //화면 로드시 초기화 함수
  61. //========================================================================================
  62. function fOpenForm() {
  63. misfComboComCdList("Z0007", cmb_instcd, "N");
  64. model.setValue("/root/send/condition/instcd", getUserInfo("dutplceinstcd"));
  65. btn_search.dispatch("DOMActivate");
  66. }
  67. //========================================================================================
  68. //부서코드 조회
  69. //========================================================================================
  70. function fGetDeptList()
  71. {
  72. //기존 데이터 삭제
  73. model.removeNodeset("/root/main/dept/deptlist");
  74. model.refresh();
  75. submit("TRRBC00201");
  76. }
  77. //========================================================================================
  78. //예산관리부서 조회
  79. //========================================================================================
  80. function fGetGentMngtList()
  81. {
  82. model.removeNodeset(grd_gentdeptlist.nodeset);
  83. model.refresh();
  84. submit("TRRAD00351");
  85. }
  86. //========================================================================================
  87. // 저장버튼 클릭시 저장 수행 함수
  88. //========================================================================================
  89. function fClickSaveBtn()
  90. {
  91. if(!fIsValidForSave())//저장전 유효성 검사
  92. return;
  93. model.setValue("/root/send/gentdeptlist", grd_gentdeptlist.getUpdateData());
  94. submit("TXRAD00351");
  95. btn_search.dispatch("DOMActivate");
  96. }
  97. //========================================================================================
  98. //저장전 유효성 검사
  99. //========================================================================================
  100. function fIsValidForSave()
  101. {
  102. var sGentList = getGridUpdateData(grd_gentdeptlist);
  103. if(sGentList == "")
  104. {
  105. messageBox("변경된 데이터가","I004");
  106. return false;
  107. }
  108. else if(sGentList != "" )
  109. {
  110. return true;
  111. }
  112. }
  113. //========================================================================================
  114. //그리드 행 추가
  115. //========================================================================================
  116. function fAddGrid(pGrid)
  117. {
  118. var dept_row = grd_deptlist.row;
  119. if ( dept_row > 0 ) {
  120. var sInstCd = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("instcd"));
  121. var sDeptCd = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("deptcd"));
  122. var sDeptNm = grd_deptlist.valueMatrix(dept_row, grd_deptlist.colRef("depthngnm"));
  123. for(i = pGrid.fixedRows ; i < pGrid.rows; i++)
  124. {
  125. if(pGrid.valueMatrix(i, pGrid.colRef("deptcd")) == sDeptCd)
  126. {
  127. messageBox("이미 등록된 부서 ","E008");
  128. return;
  129. }
  130. }
  131. pGrid.addRow();
  132. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/instcd", sInstCd);
  133. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/deptcd", sDeptCd);
  134. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/depthngnm", sDeptNm);
  135. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/fromdd", "19000101");
  136. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/todd", "99991231");
  137. model.setValue(pGrid.nodeset + "["+ pGrid.row + "]/gentmngtyn", "Y");
  138. pGrid.editCell();
  139. model.refresh();
  140. pGrid.col = grd_deptlist.colRef("depthngnm");
  141. }else {
  142. messageBox("부서목록을 선택하지 ","E007");
  143. }
  144. }
  145. //========================================================================================
  146. //그리드 행 삭제
  147. //========================================================================================
  148. function fDelGrid(pGrid)
  149. {
  150. var cur_row = pGrid.row;
  151. if(cur_row > -1)
  152. {
  153. deleteSelectedRows(pGrid, true); //true : 바로삭제, false : 상태만 삭제로 변경
  154. model.refresh();
  155. }
  156. else if(cur_row == -1)
  157. {
  158. messageBox("삭제하려는 행을", "C002");
  159. }
  160. }
  161. //========================================================================================
  162. //부서코드 Help Open
  163. //========================================================================================
  164. function fOpenPopupDeptHelp(pControl, pInstance) {
  165. //02 부서코드Helper
  166. misfOpenPopUpList("02", pControl, "", pInstance);
  167. model.refresh();
  168. }
  169. ]]>
  170. </script>
  171. </xhtml:head>
  172. <xhtml:body guideline="1,1193;1,471;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  173. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  174. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">반제관리부서</caption>
  175. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  176. </group>
  177. <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  178. <line id="line2" class="line_1" style="x1:0px; y1:70px; x2:471; y2:70px; "/>
  179. <caption id="caption9" class="tit_2" style="left:5px; top:55px; width:117px; height:14px; ">부서목록</caption>
  180. <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
  181. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35; background-color:#fffbf2; border-color:#ffd799; "/>
  182. <line id="line3" class="line_4" style="x1:1108; y1:8px; x2:1108; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  183. <caption id="caption5" class="search_name" style="left:11px; top:9px; width:74px; height:17px; ">부 서 :</caption>
  184. <input id="ipt_deptcd" ref="/root/send/condition/deptcd" class="input_s_essential" navindex="3" style="left:85px; top:8px; width:80px; height:19px; ">
  185. <script type="javascript" ev:event="onkeypress">
  186. <![CDATA[
  187. if(event.keyCode == 13)
  188. {
  189. racfDeptValidCheck("deptcd,depthngnm");
  190. }
  191. ]]>
  192. </script>
  193. <script type="javascript" ev:event="xforms-value-changed">
  194. <![CDATA[
  195. racfDeptValidCheck("deptcd,depthngnm");
  196. ]]>
  197. </script>
  198. </input>
  199. <input id="ipt_depthngnm" ref="/root/send/condition/depthngnm" class="input_s_essential" navindex="3" style="left:190px; top:8px; width:180px; height:19px; ">
  200. <script type="javascript" ev:event="onkeypress">
  201. <![CDATA[
  202. if(event.keyCode == 13)
  203. {
  204. racfDeptValidCheck("deptcd,depthngnm");
  205. }
  206. ]]>
  207. </script>
  208. <script type="javascript" ev:event="xforms-value-changed">
  209. <![CDATA[
  210. racfDeptValidCheck("deptcd,depthngnm");
  211. ]]>
  212. </script>
  213. </input>
  214. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123; top:8px; width:56px; height:22px; text-align:left; ">
  215. <caption>조회</caption>
  216. <script type="javascript" ev:event="DOMActivate">
  217. <![CDATA[
  218. fGetDeptList();
  219. fGetGentMngtList();
  220. ]]>
  221. </script>
  222. </button>
  223. <button id="btn_help" class="icon_search" style="left:170px; top:9px; width:16px; height:16px; ">
  224. <caption/>
  225. <script type="javascript" ev:event="DOMActivate">
  226. <![CDATA[
  227. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  228. ]]>
  229. </script>
  230. </button>
  231. <select1 id="cmb_instcd" ref="/root/send/condition/instcd" class="combo_s_essential" navindex="1" visibility="hidden" appearance="minimal" style="left:489px; top:8px; width:175px; height:19px; ">
  232. <choices>
  233. <itemset>
  234. <label/>
  235. <value/>
  236. </itemset>
  237. </choices>
  238. </select1>
  239. <caption id="caption7" class="search_name" visibility="hidden" style="left:400px; top:9px; width:86px; height:17px; ">기 관 :</caption>
  240. </group>
  241. <button id="button2" class="btn2_letter2" style="left:1040px; top:50px; width:42px; height:19px; text-align:left; ">
  242. <caption>엑셀</caption>
  243. <script type="javascript" ev:event="DOMActivate">
  244. <![CDATA[
  245. radfSaveExcel(grd_excelload);
  246. ]]>
  247. </script>
  248. </button>
  249. <line id="line1" class="line_1" style="x1:476px; y1:70px; x2:1194; y2:70px; "/>
  250. <caption id="caption3" class="tit_2" style="left:481px; top:55px; width:131px; height:13px; ">반제관리부서 목록</caption>
  251. <datagrid id="grd_deptlist" nodeset="/root/main/dept/deptlist" caption="기관코드^부서코드^부서명" colsep="^" colwidth="0, 100, 279" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:0px; top:75px; width:471px; height:663px; ">
  252. <col ref="instcd"/>
  253. <col ref="deptcd"/>
  254. <col ref="depthngnm"/>
  255. <script type="javascript" ev:event="ondblclick">
  256. <![CDATA[
  257. fAddGrid(grd_gentdeptlist);
  258. ]]>
  259. </script>
  260. </datagrid>
  261. <datagrid id="grd_gentdeptlist" nodeset="/root/main/gent/gentdeptlist" caption="기관코드^부서코드^부서명^시작일자*^종료일자*^사용여부^출력순서" colsep="^" colwidth="0, 80, 330, 35, 35, 110, 0" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:476px; top:75px; width:717px; height:663px; ">
  262. <col ref="instcd"/>
  263. <col ref="deptcd"/>
  264. <col ref="depthngnm"/>
  265. <col ref="fromdd" type="inputdate" visibility="hidden"/>
  266. <col ref="todd" type="inputdate" visibility="hidden"/>
  267. <col checkvalue="Y,N" ref="gentmngtyn" type="checkbox"/>
  268. <col ref="prntseq" type="input"/>
  269. </datagrid>
  270. <button id="btn_grdadd" 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. fAddGrid(grd_gentdeptlist);
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="btn_grddel" class="btn2_letter3" style="left:1139px; top:50px; width:53px; height:19px; ">
  279. <caption>행삭제</caption>
  280. <script type="javascript" ev:event="DOMActivate">
  281. <![CDATA[
  282. fDelGrid(grd_gentdeptlist);
  283. //misfGridIUD(grd_gentdeptlist, "D");
  284. ]]>
  285. </script>
  286. </button>
  287. </group>
  288. <group id="group2" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  289. <line id="line4" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  290. <button id="btn_save" class="btn4_letter2" style="left:1138px; top:3px; width:56px; height:22px; ">
  291. <caption>저장</caption>
  292. <script type="javascript" ev:event="DOMActivate">
  293. <![CDATA[
  294. fClickSaveBtn();
  295. ]]>
  296. </script>
  297. </button>
  298. <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
  299. <caption>출력</caption>
  300. </button>
  301. <caption id="caption1" style="left:60px; top:5px; width:1075px; height:20px; font-weight:bold; color:#ff0000; ">주의 : 반제관리 부서에 저장된 부서가 없을 경우 모든부서의 부채가 관리되며 하나이상의 부서가 저장되어 있을 시 저장되어 있는 부서의 부채만 관리됨 [부서관리를 정확히 해야함]</caption>
  302. </group>
  303. </xhtml:body>
  304. </xhtml:html>