SMRBQ00100_본예산신청.xrw 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811
  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. <acntlist>
  11. <orgacntlist/>
  12. </acntlist>
  13. <bugtlist>
  14. <orgbugtapplist/>
  15. </bugtlist>
  16. <orgbgdtlist>
  17. <orgbugtdetaillist/>
  18. </orgbgdtlist>
  19. <dept/>
  20. <exist>
  21. <dummy/>
  22. </exist>
  23. <acntprntlist>
  24. <orgacntprntlist/>
  25. </acntprntlist>
  26. </main>
  27. <send>
  28. <retrparam>
  29. <instcd/>
  30. <acntyy/>
  31. <deptcd/>
  32. <depthngnm/>
  33. <bugtflag>2</bugtflag>
  34. </retrparam>
  35. <retrparam2>
  36. <instcd/>
  37. <acntyy/>
  38. <deptcd/>
  39. <acntcd/>
  40. <bugtflag/>
  41. </retrparam2>
  42. <retrparam3>
  43. <instcd/>
  44. <acntyy/>
  45. <deptcd/>
  46. <acntcd/>
  47. <bugtflag/>
  48. <assgym/>
  49. </retrparam3>
  50. <retrparam4>
  51. <instcd/>
  52. <mngtcd>bugtdept</mngtcd>
  53. </retrparam4>
  54. <orgbugtapplist/>
  55. <orgbugtdetaillist/>
  56. <date/>
  57. <appcancelparams>
  58. <instcd/>
  59. <acntyy/>
  60. <deptcd/>
  61. <bugtflag/>
  62. <flag/>
  63. </appcancelparams>
  64. <deptcode>
  65. <instcd/>
  66. <deptcd/>
  67. <emplno/>
  68. <fromdd/>
  69. <todd/>
  70. </deptcode>
  71. </send>
  72. <init>
  73. <code>
  74. <codelist/>
  75. </code>
  76. <srchinit>
  77. <item/>
  78. </srchinit>
  79. </init>
  80. <temp/>
  81. <temp1>
  82. <authusinfo>
  83. <bugtinputyn/>
  84. <bugtreqyn/>
  85. <bugtsearchyn/>
  86. </authusinfo>
  87. </temp1>
  88. <hidden>
  89. <bugtaddflag>N</bugtaddflag>
  90. </hidden>
  91. <contextmenu>
  92. <grd_orgbugtapplist>
  93. <item>
  94. <name>행 추가</name>
  95. <value>fBugtAppListAddRow</value>
  96. </item>
  97. <item>
  98. <name>행 삭제</name>
  99. <value>fBugtAppListDelRow</value>
  100. </item>
  101. </grd_orgbugtapplist>
  102. <bugtflag>
  103. <item>
  104. <label>년간</label>
  105. <value>-</value>
  106. </item>
  107. <item>
  108. <label>3월</label>
  109. <value>03</value>
  110. </item>
  111. <item>
  112. <label>4월</label>
  113. <value>04</value>
  114. </item>
  115. <item>
  116. <label>5월</label>
  117. <value>05</value>
  118. </item>
  119. <item>
  120. <label>6월</label>
  121. <value>06</value>
  122. </item>
  123. <item>
  124. <label>7월</label>
  125. <value>07</value>
  126. </item>
  127. <item>
  128. <label>8월</label>
  129. <value>08</value>
  130. </item>
  131. <item>
  132. <label>9월</label>
  133. <value>09</value>
  134. </item>
  135. <item>
  136. <label>10월</label>
  137. <value>10</value>
  138. </item>
  139. <item>
  140. <label>11월</label>
  141. <value>11</value>
  142. </item>
  143. <item>
  144. <label>12월</label>
  145. <value>12</value>
  146. </item>
  147. <item>
  148. <label>1월</label>
  149. <value>01</value>
  150. </item>
  151. <item>
  152. <label>2월</label>
  153. <value>02</value>
  154. </item>
  155. </bugtflag>
  156. </contextmenu>
  157. <target/>
  158. <source>
  159. <slipinfo/>
  160. </source>
  161. <rexprnt/>
  162. </root>
  163. </instance>
  164. <submission id="TRRBQ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" resultref="/root/main/acntlist"/>
  165. <submission id="TRRBQ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam2" resultref="/root/main/bugtlist"/>
  166. <submission id="TRRBQ00105" mediatype="application/x-www-form-urlencoded" method="get" ref="/root/send/retrparam" replace="instance" resultref="/root/main/acntprntlist"/>
  167. <submission id="TXRBQ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/orgbugtapplist" resultref="/root/temp"/>
  168. <submission id="TXRBQ00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/orgbugtdetaillist" resultref="/root/temp"/>
  169. <submission id="TRRBQ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam3" resultref="/root/main/orgbgdtlist"/>
  170. <submission id="TRRAZ00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam4" resultref="/root/init/code"/>
  171. <submission id="TXRBQ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/appcancelparams" resultref="/root/temp"/>
  172. <submission id="TRRBQ00104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" resultref="/root/copytable"/>
  173. <submission id="TRRBQ00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" replace="instance" resultref="/root/init/srchinit"/>
  174. <submission id="TRRBC00501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/deptcode" resultref="/root/main/dept"/>
  175. </model>
  176. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  177. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  178. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  179. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  180. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  181. <script type="javascript" src="../../../mis/bugtcommonweb/js/RBC001.js"/>
  182. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  183. <script type="javascript" ev:event="xforms-ready">
  184. <![CDATA[
  185. //fCheckAuth();
  186. fResetForm();
  187. ]]>
  188. </script>
  189. <script type="javascript">
  190. <![CDATA[
  191. var Instcd = getUserInfo("dutplceinstcd");
  192. var Deptcd = getUserInfo("dutplcecd");
  193. var Deptnm = getUserInfo("dutplcenm");
  194. var Emplno = getUserInfo("userid");
  195. var DeptAcnt = "";
  196. //========================================================================================
  197. //화면 권한 체크 -- 사용안함.
  198. //========================================================================================
  199. function fCheckAuth()
  200. {
  201. btn_search.disabled = !checkAuth("R");
  202. btn_save.disabled = !checkAuth("X");
  203. }
  204. //========================================================================================
  205. //화면 로드시 초기화 함수
  206. //========================================================================================
  207. function fResetForm()
  208. {
  209. grd_orgbugtlist.rowHeight(0) = 23;
  210. grd_orgbugtlist.rowHeight(1) = 23;
  211. if(radfCheckInstMngt(getUserInfo("dutplceinstcd"), 'condition4') == "Y")
  212. {
  213. DeptAcnt = "Y";
  214. btn_acntaddrow.visible = false;
  215. }
  216. else
  217. {
  218. DeptAcnt = "N";
  219. btn_acntaddrow.visible = true;
  220. }
  221. model.setValue("/root/send/retrparam/instcd", Instcd);
  222. model.setValue("/root/send/retrparam/deptcd", Deptcd);
  223. model.setValue("/root/send/retrparam/depthngnm", Deptnm);
  224. ipt_acntyy.value = rbcfgetAppAcntyy(Instcd);
  225. model.setValue("/root/send/retrparam4/instcd", Instcd);
  226. submit("TRRAZ00001");
  227. // if(Deptcd == model.getValue("/root/init/code/codelist/cdid"))
  228. // {
  229. // ipt_deptcd.disabled = false;
  230. // btn_depthelp.disabled = false;
  231. // ipt_depthngnm.disabled = false;
  232. // }
  233. fauthddchck();
  234. btn_search.dispatch("DOMActivate");
  235. }
  236. function fauthddchck(){
  237. // 2011.07.20 cyw 현재일자가 포함되는 예산신청기간 조회.
  238. submit("TRRBQ00106");
  239. // 2011.07.21 cyw 부서별 사용자권한 조회.
  240. var sToday = getCurrentDate().toString();
  241. model.setValue("/root/send/deptcode/todd", "99991231" );
  242. model.setValue("/root/send/deptcode/fromdd", sToday );
  243. model.setValue("/root/send/deptcode/instcd", getUserInfo("dutplceinstcd"));
  244. submit("TRRBC00501");
  245. // 2011.07.21 cyw 권한체크
  246. fauthchck();
  247. }
  248. //=======================================================================================
  249. //그리드 타이틀셋팅
  250. //=======================================================================================
  251. function fSetGridTitle(){
  252. var sCaption = datagrid1.caption;
  253. var Caption = sCaption.split("|");
  254. var leftCaption = Caption[0];
  255. var rightCaption = Caption[1];
  256. var arrCaption = leftCaption.split("^");
  257. sCaption="기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^";
  258. sCaption3="금년도^금년도^";
  259. // sCaption1= ipt_acntyy.value + " 년도^";
  260. sCaption1= model.getValue("/root/send/retrparam/acntyy") + "년도^";
  261. sCaption2= parseInt(model.getValue("/root/send/retrparam/acntyy"))-1 + "년도^";
  262. // sCaption2= parseInt(ipt_acntyy.value)-1 + " 년도^";
  263. sCaption = sCaption + sCaption2 + sCaption3 + sCaption1 + sCaption1 + "조정액^부서계정여부^신청|기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^예산(A)^실적(B)^집행율(B/A)^신청액(B)^증감액(B-A)^조정액^부서계정여부^신청";
  264. datagrid1.caption = sCaption;
  265. datagrid1.cellformat(0, 12) = "";
  266. datagrid1.cellformat(0, 13) = "";
  267. datagrid1.cellformat(0, 14) = "";
  268. datagrid1.cellformat(0, 15) = "";
  269. datagrid1.cellformat(0, 16) = "";
  270. model.refresh();
  271. /*
  272. for(var i = 0; i < arrCaption.length ; i++)
  273. //기관코드^회계년도^부서코드^항코드^항^목코드^목^계정과목^계정과목^예산구분^분기^금년도^금년도^금년도^차년도^차년도^차년도^차년도|기관코드^회계년도^부서코드^항코드^항^목코드^목^계정과목^계정과목^예산구분^분기^예산(A)^실적(B)^집행율(B/A)^신청액(C)^조정예산(D)^조정액(D-C)^증감액(C-A)
  274. {
  275. if(i == 13 || i == 14 || i == 15 || i == 16){
  276. sCaption = sCaption + ipt_acntyy.value + " 년도";
  277. }else{
  278. sCaption = sCaption + arrCaption[i];
  279. }
  280. if(i+1 != arrCaption.length){
  281. sCaption = sCaption + "^";
  282. }
  283. }
  284. */
  285. // grd_orgbugtlist.caption = sCaption;
  286. //grd_orgbugtlist.caption = sCaption + "|" + rightCaption;
  287. }
  288. //========================================================================================
  289. //부서코드 Help Open
  290. //========================================================================================
  291. function fOpenPopupDeptHelp(pControl, pInstance)
  292. {
  293. misfOpenPopUpList("11", pControl, "", pInstance);
  294. model.refresh();
  295. }
  296. //========================================================================================
  297. // 예산 조회 및 권한 예외 처리
  298. //========================================================================================
  299. function fRetrieve()
  300. {
  301. model.removeNodeset(grd_orgbugtlist.nodeset);
  302. model.removeNodeset(grd_orgbugtapplist.nodeset);
  303. model.removeNodeset(grd_orgbugtdetaillist.nodeset);
  304. model.refresh();
  305. fauthddchck();
  306. var bugtsearchyn = "";
  307. var bugtinputyn = "";
  308. var bugtreqyn = "";
  309. var bugtdeptcd = model.getValue("/root/init/code/codelist/cdid");
  310. var vAppCheck = rbcfgetAppPossibleDeptCheck(getUserInfo("dutplceinstcd"), ipt_acntyy.value, ipt_deptcd.value);
  311. var vDeptcd = model.getValue(ipt_deptcd.attribute("ref"));
  312. if(vDeptcd == Deptcd || bugtdeptcd == Deptcd)
  313. {
  314. bugtsearchyn = "Y";
  315. bugtinputyn = "Y";
  316. bugtreqyn = "Y";
  317. }
  318. else
  319. {
  320. bugtsearchyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTSEARCHYN');
  321. bugtinputyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTINPUTYN');
  322. bugtreqyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTREQYN');
  323. }
  324. submit("TRRBQ00101");
  325. /* if(bugtsearchyn == 'Y')
  326. {
  327. btn_save.disabled = false;
  328. btn_app.disabled = false;
  329. btn_alldel.disabled = false;
  330. submit("TRRBQ00101");
  331. if(grd_orgbugtlist.valueMatrix(grd_orgbugtlist.fixedRows, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  332. {
  333. bugtinputyn = 'N';
  334. }
  335. }else{
  336. btn_save.disabled = true;
  337. btn_app.disabled = true;
  338. btn_alldel.disabled = true;
  339. return false;
  340. }
  341. if(bugtinputyn == 'Y' && vAppCheck == 'Y'){
  342. btn_save.disabled = false;
  343. btn_excelupload.disabled = false;
  344. btn_acntaddrow.disabled = false;
  345. btn_addrow.disabled = false;
  346. btn_delrow.disabled = false;
  347. btn_detailaddrow.disabled = false;
  348. btn_detaildelrow.disabled = false;
  349. }else{
  350. btn_save.disabled = true;
  351. btn_excelupload.disabled = true;
  352. btn_acntaddrow.disabled = true;
  353. btn_addrow.disabled = true;
  354. btn_delrow.disabled = true;
  355. btn_detailaddrow.disabled = true;
  356. btn_detaildelrow.disabled = true;
  357. }
  358. if(bugtreqyn == 'Y'){
  359. btn_app.disabled = false;
  360. btn_alldel.disabled = false;
  361. btn_cancel.disabled = false;
  362. }else{
  363. btn_app.disabled = true;
  364. btn_alldel.disabled = true;
  365. btn_cancel.disabled = true;
  366. }
  367. */
  368. fSetRowColor(grd_orgbugtlist);
  369. fSetGridTitle();
  370. }
  371. function fSave()
  372. {
  373. if(grd_orgbugtapplist.rows == 1) return;
  374. for(var i=0; i<grd_orgbugtapplist.rows; i++)
  375. {
  376. if(grd_orgbugtapplist.valueMatrix(i, grd_orgbugtapplist.colRef("assgym")) == "")
  377. {
  378. messageBox("배정월에 공백을 삽입할 수", "I004");
  379. return;
  380. }
  381. }
  382. for(var i=1; i<grd_orgbugtdetaillist.rows; i++)
  383. {
  384. if(grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("appresn")) == "")
  385. {
  386. messageBox("산출 내역에 공백을 삽입할 수", "I004");
  387. return;
  388. }
  389. }
  390. var updtdata_bugtapplist = getGridUpdateData(grd_orgbugtapplist);
  391. var updtdata_bugtdetaillist = getGridUpdateData(grd_orgbugtdetaillist);
  392. if(updtdata_bugtapplist == "" && updtdata_bugtdetaillist == "")
  393. {
  394. messageBox("변경된 내역이", "I004");
  395. return;
  396. }
  397. if(updtdata_bugtapplist != "")
  398. {
  399. vRowStatus = grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row);
  400. model.setValue("/root/send/orgbugtapplist", grd_orgbugtapplist.getUpdateData());
  401. if(submit("TXRBQ00101"))
  402. {
  403. if(vRowStatus == 4 || vRowStatus == 5 || vRowStatus == 6)
  404. {
  405. submit("TRRBQ00102");
  406. if(grd_orgbugtapplist.rows > 1)
  407. {
  408. grd_orgbugtapplist.row = 1;
  409. grd_orgbugtapplist.dispatch("onrowchanged");
  410. }
  411. }
  412. else
  413. {
  414. grd_orgbugtapplist.removeStatus(grd_orgbugtapplist.row, "insert");
  415. grd_orgbugtapplist.removeStatus(grd_orgbugtapplist.row, "update");
  416. }
  417. }else{
  418. return;
  419. }
  420. }
  421. model.setValue("/root/send/orgbugtdetaillist", grd_orgbugtdetaillist.getUpdateData());
  422. if(submit("TXRBQ00102")){
  423. grd_orgbugtapplist.dispatch("onrowchanged");
  424. }else{
  425. return;
  426. }
  427. //submit("TRRBQ00103");
  428. //fRetrieve();
  429. }
  430. function fSetGridDefaultValue()
  431. {
  432. for(var i=0; i<grd_orgbugtapplist.rows; i++)
  433. {
  434. if(grd_orgbugtapplist.rowStatus(i) == 1)
  435. {
  436. if(grd_orgbugtlist.rows > 2)
  437. {
  438. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntyy"));
  439. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("deptcd"));
  440. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntcd"));
  441. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntnm")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntnm"));
  442. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtcd")) = "01";
  443. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("projectid")) = "-";
  444. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("bugtflag"));
  445. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtnm")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntnm"));
  446. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("mainrec")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntnm"));
  447. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("appamt")) = 0;
  448. if(grd_orgbugtapplist.rows > 2)
  449. {
  450. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "";
  451. }
  452. else
  453. {
  454. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "-";
  455. }
  456. }
  457. else if(grd_orgbugtlist.rows == 2)
  458. {
  459. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy")) = ipt_acntyy.value;
  460. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd")) = ipt_deptcd.value;
  461. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) = "";
  462. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntnm")) = "";
  463. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtcd")) = "01";
  464. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("projectid")) = "-";
  465. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) = rdo_bugtflag.value;
  466. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtnm")) = "";
  467. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("mainrec")) = "";
  468. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("appamt")) = 0;
  469. if(grd_orgbugtapplist.rows > 2)
  470. {
  471. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "";
  472. }
  473. else
  474. {
  475. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "-";
  476. }
  477. }
  478. }
  479. }
  480. model.refresh();
  481. }
  482. function fSetRetrParams()
  483. {
  484. model.setValue("/root/send/retrparam2/acntyy", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntyy")));
  485. model.setValue("/root/send/retrparam2/deptcd", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("deptcd")));
  486. model.setValue("/root/send/retrparam2/acntcd", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntcd")));
  487. model.setValue("/root/send/retrparam2/bugtflag", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("bugtflag")));
  488. }
  489. function fShowContextMenu()
  490. {
  491. if(event.button == 3)
  492. {
  493. if(event.target == "grd_orgbugtapplist" || grd_orgbugtapplist.isCell(event.target))
  494. {
  495. window.setPopupMenu(true, "/root/contextmenu/grd_orgbugtapplist/item", "name", "value", false);
  496. }
  497. else
  498. {
  499. window.setPopupMenu(false);
  500. }
  501. }
  502. }
  503. //===================================
  504. // 배정월 중복을 체크한다.
  505. //===================================
  506. function fCheckDupData()
  507. {
  508. for(var i = grd_orgbugtapplist.fixedRows ; i < grd_orgbugtapplist.rows ; i++)
  509. {
  510. if(i == grd_orgbugtapplist.row) continue;
  511. if((grd_orgbugtapplist.valueMatrix(i, grd_orgbugtapplist.colRef("assgym")) == grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym"))))
  512. {
  513. messageBox("같은 예산코드에 동일 배정 [년/월]을 지정할 수", "I004");
  514. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "";
  515. false;
  516. }
  517. if(grd_orgbugtapplist.valueMatrix(i, grd_orgbugtapplist.colRef("assgym")) == "-" && grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) != "-")
  518. {
  519. messageBox("년간 배정이 있어 월간 배정을 할 수", "I004");
  520. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "";
  521. false;
  522. }
  523. if(grd_orgbugtapplist.valueMatrix(i, grd_orgbugtapplist.colRef("assgym")) != "-" && grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) == "-")
  524. {
  525. messageBox("월간 배정이 있어 년간 배정을 할 수", "I004");
  526. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "";
  527. false;
  528. }
  529. }
  530. return true;
  531. }
  532. function fSetOrgAmt()
  533. {
  534. var iSumOrgAmt = 0;
  535. for(var i=1; i<grd_orgbugtapplist.rows; i++)
  536. {
  537. iSumOrgAmt += parseInt(grd_orgbugtapplist.valueMatrix(i, grd_orgbugtapplist.colRef("appamt")), 10);
  538. }
  539. grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("nextappamt")) = iSumOrgAmt;
  540. grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("nextupdownamt"))
  541. = parseInt(iSumOrgAmt, 10) - parseInt(grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("curorgbugtamt")), 10);
  542. }
  543. function fSetDetailListOrgAmnt()
  544. {
  545. var iSumOrgAmt = 0;
  546. for(var i=1; i<grd_orgbugtdetaillist.rows; i++)
  547. {
  548. if(grd_orgbugtdetaillist.rowStatus(i) != 4 && grd_orgbugtdetaillist.rowStatus(i) != 5 && grd_orgbugtdetaillist.rowStatus(i) != 6)
  549. {
  550. var sAppAmt = (grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("appamt")) == "") ? 0 : grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("appamt"));
  551. iSumOrgAmt += parseInt(sAppAmt);
  552. }
  553. }
  554. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("appamt")) = iSumOrgAmt;
  555. if(grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 1 && grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 3)
  556. {
  557. grd_orgbugtapplist.addStatus(grd_orgbugtapplist.row, "update");
  558. }
  559. }
  560. function fSetOrgAmtAppCancel()
  561. {
  562. if(ipt_acntyy.value.length != 4 || (ipt_deptcd.value == "" && ipt_depthngnm.value == ""))
  563. {
  564. messageBox("회계년도 또는 부서코드가", "I004");
  565. return false;
  566. }
  567. var sName = document.controls(event.currentTarget).attribute("id");
  568. var iRet;
  569. var sYn;
  570. if(sName == "btn_app")
  571. {
  572. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  573. {
  574. messageBox("이미 신청된 예산", "E008");
  575. return false;
  576. }
  577. if(rbcfgetAppPossibleCheck(getUserInfo("dutplceinstcd"), ipt_acntyy.value, 'org') == 'N')
  578. {
  579. messageBox("예산신청기간이 아닙니다. 기획팀에 문의하시기 바랍니다.", "I000");
  580. return false;
  581. }
  582. iRet = messageBox("신청한 후에는 변경이 불가능합니다. 본예산 신청 하시겠습니까", "Q999");
  583. }
  584. else if(sName == "btn_cancel")
  585. {
  586. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "N")
  587. {
  588. messageBox("신청되지 않은 예산", "E008");
  589. return;
  590. }
  591. iRet = messageBox("본예산 신청 취소 하시겠습니까", "Q999");
  592. }
  593. if(iRet == 6)
  594. {
  595. if(sName == "btn_app")
  596. {
  597. model.setValue("/root/send/appcancelparams/flag", "orgapp");
  598. sYn = "Y";
  599. }
  600. else if(sName == "btn_cancel")
  601. {
  602. model.setValue("/root/send/appcancelparams/flag", "orgcancel");
  603. sYn = "N";
  604. }
  605. model.setValue("/root/send/appcancelparams/instcd", model.getValue("/root/send/retrparam/instcd"));
  606. model.setValue("/root/send/appcancelparams/acntyy", model.getValue("/root/send/retrparam/acntyy"));
  607. model.setValue("/root/send/appcancelparams/deptcd", model.getValue("/root/send/retrparam/deptcd"));
  608. model.setValue("/root/send/appcancelparams/bugtflag", model.getValue("/root/send/retrparam/bugtflag"));
  609. if(submit("TXRBQ00103"))
  610. {
  611. for(var i = grd_orgbugtlist.fixedRows ; i < grd_orgbugtlist.rows ; i++)
  612. {
  613. grd_orgbugtlist.valueMatrix(i, grd_orgbugtlist.colRef("orgbugtappyn")) = sYn;
  614. }
  615. }
  616. fRetrieve();
  617. }
  618. }
  619. /*function fSetGridTitle()
  620. {
  621. var sCaption = grd_orgbugtlist.caption;
  622. var arrCaption = sCaption.split("^");
  623. sCaption = "";
  624. for(var i=0; i<arrCaption.length; i++)
  625. {
  626. if(i == 11 || i == 12 || i == 13 || i == 14)
  627. {
  628. sCaption = sCaption + "금년도 (" + (parseInt(ipt_acntyy.value) - 1).toString() + ")";
  629. }
  630. else if(i == 15 || i== 16)
  631. {
  632. sCaption = sCaption + "차년도 (" + ipt_acntyy.value + ")";
  633. }
  634. else
  635. {
  636. sCaption = sCaption + arrCaption[i];
  637. }
  638. if(i+1 != arrCaption.length)
  639. {
  640. sCaption = sCaption + "^";
  641. }
  642. }
  643. grd_orgbugtlist.caption = sCaption;
  644. }*/
  645. //====================================
  646. // 본예산 신청내역 변동사항을 체크한다.
  647. //====================================
  648. function fOrgbugtapplistChangeCheck()
  649. {
  650. var ChangeCheck = true;
  651. for(var i = grd_orgbugtapplist.fixedRows ; i < grd_orgbugtapplist.rows ; i++)
  652. {
  653. if(grd_orgbugtapplist.rowStatus(i) != 0)
  654. {
  655. ChangeCheck = false;
  656. break;
  657. }
  658. }
  659. return ChangeCheck;
  660. }
  661. //====================================
  662. // 본예산 산출내역 변동사항을 체크한다.
  663. //====================================
  664. function fOrgbugtdetaillistChangeCheck()
  665. {
  666. var ChangeCheck = true;
  667. for(var i = grd_orgbugtdetaillist.fixedRows ; i < grd_orgbugtdetaillist.rows ; i++)
  668. {
  669. if(grd_orgbugtdetaillist.rowStatus(i) != 0)
  670. {
  671. ChangeCheck = false;
  672. break;
  673. }
  674. }
  675. return ChangeCheck;
  676. }
  677. //====================================
  678. // 행추가 시 예외처리
  679. //====================================
  680. function fCheckSave()
  681. {
  682. //if(!fOrgbugtapplistChangeCheck() || !fOrgbugtdetaillistChangeCheck())
  683. if(!fOrgbugtdetaillistChangeCheck())
  684. {
  685. messageBox("변경된 데이터가 있습니다. 저장이나 취소(조회) 후 작업하세요", "I000");
  686. return false;
  687. }
  688. return true;
  689. }
  690. function fSetRowColor(pGrid)
  691. {
  692. var iCnt = 0;
  693. for(var i=0; i<pGrid.rows;i++)
  694. {
  695. if(pGrid.valueMatrix(i, pGrid.colRef("acntcd")) == "99999999")
  696. {
  697. pGrid.rowStyle(i, "all", "background-color") = "#dddddd";
  698. }
  699. else
  700. {
  701. pGrid.rowStyle(i, "all", "background-color") = "#ffffff";
  702. }
  703. }
  704. pGrid.frozenBottomRows = 1;
  705. pGrid.backColorFrozen = "#dddddd";
  706. }
  707. function fprojectidcopy()
  708. {
  709. if(grd_orgbugtapplist.rows == 2)
  710. {
  711. var sProjectid = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("projectid"));
  712. for(var i = 1 ; i < grd_orgbugtdetaillist.rows ; i++)
  713. {
  714. grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("projectid")) = sProjectid;
  715. grd_orgbugtdetaillist.addStatus(i, "update");
  716. }
  717. }
  718. }
  719. function fPrint()
  720. {
  721. model.removeNodeset("/root/main/acntprntlist/orgacntprntlist");
  722. if( submit("TRRBQ00105") ){
  723. exeReportPreview("RPRBQ00100", "XMLSTR");
  724. model.refresh();
  725. }
  726. }
  727. // 권한 여부 확인 2011.07.21 CYW
  728. // 부서별 사용자권한관리 화면에 등록된 사용자만 취소, 삭제, 저장, 신청 가능함
  729. function fauthchck(){
  730. model.resetInstanceNode("/root/temp1/authusinfo");
  731. var usid = getUserId();
  732. var depcnt = getNodesetCount("/root/main/dept/deptauth");
  733. var idx = 0;
  734. for(var i = 1; i <= depcnt ; i++){
  735. if( usid == model.getValue("/root/main/dept/deptauth[" + i + "]/emplno") ){
  736. model.setValue("/root/temp1/authusinfo/bugtinputyn", model.getValue("/root/main/dept/deptauth[" + i + "]/bugtinputyn"));
  737. model.setValue("/root/temp1/authusinfo/bugtreqyn", model.getValue("/root/main/dept/deptauth[" + i + "]/bugtreqyn"));
  738. model.setValue("/root/temp1/authusinfo/bugtsearchyn", model.getValue("/root/main/dept/deptauth[" + i + "]/bugtsearchyn"));
  739. idx++;
  740. }
  741. }
  742. if( idx > 0 ){
  743. btn_cancel.disabled = false;
  744. btn_alldel.disabled = false;
  745. btn_excelupload.disabled = false;
  746. btn_save.disabled = false;
  747. btn_app.disabled = false;
  748. btn_search.disabled = false;
  749. btn_acntaddrow.disabled = false;
  750. btn_addrow.disabled = false;
  751. btn_delrow.disabled = false;
  752. btn_detailaddrow.disabled = false;
  753. btn_detaildelrow.disabled = false;
  754. return true;
  755. }else{
  756. btn_cancel.disabled = true;
  757. btn_alldel.disabled = true;
  758. btn_excelupload.disabled = true;
  759. btn_save.disabled = true;
  760. btn_app.disabled = true;
  761. btn_search.disabled = true;
  762. btn_acntaddrow.disabled = true;
  763. btn_addrow.disabled = true;
  764. btn_delrow.disabled = true;
  765. btn_detailaddrow.disabled = true;
  766. btn_detaildelrow.disabled = true;
  767. return false;
  768. }
  769. model.refresh();
  770. }
  771. ]]>
  772. </script>
  773. </xhtml:head>
  774. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1196;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  775. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  776. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">본예산 신청</caption>
  777. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  778. </group>
  779. <group id="group3" scroll="auto" style="left:0px; top:45px; width:1195px; height:734px; ">
  780. <datagrid id="grd_orgbugtlist" nodeset="/root/main/acntlist/orgacntlist" caption="기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^금년도^금년도^금년도^차년도^차년도^조정액^부서계정여부^신청|기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^예산(A)^실적(B)^집행율(B/A)^신청액(C)^증감액(C-A)^조정액^부서계정여부^신청" colsep="^" colwidth="0, 0, 0, 0, 120, 0, 120, 0, 140, 0, 188, 0, 105, 105, 105, 105, 105, 0, 0, 66" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="16" rowsep="|" style="left:0px; top:75px; width:1195px; height:322px; ">
  781. <col ref="instcd" visibility="hidden"/>
  782. <col ref="acntyy" visibility="hidden"/>
  783. <col ref="deptcd" visibility="hidden"/>
  784. <col ref="supacntcd2"/>
  785. <col ref="supacntnm2"/>
  786. <col ref="supacntcd3" visibility="hidden"/>
  787. <col ref="supacntnm3"/>
  788. <col ref="supacntcd4" visibility="hidden"/>
  789. <col ref="supacntnm4"/>
  790. <col ref="acntcd" visibility="hidden"/>
  791. <col ref="acntnm"/>
  792. <col ref="bugtflag" type="combo" visibility="hidden" style="text-align:center; ">
  793. <choices>
  794. <item>
  795. <label>수입</label>
  796. <value>1</value>
  797. </item>
  798. <item>
  799. <label>비용</label>
  800. <value>2</value>
  801. </item>
  802. <item>
  803. <label>구매</label>
  804. <value>3</value>
  805. </item>
  806. <item>
  807. <label>자본</label>
  808. <value>4</value>
  809. </item>
  810. </choices>
  811. </col>
  812. <col ref="curorgbugtamt" format="(-)#,###" style="text-align:right; "/>
  813. <col ref="curresult" format="(-)#,###" style="text-align:right; "/>
  814. <col ref="curexerate" format="#.#%" style="text-align:right; "/>
  815. <col ref="nextappamt" format="(-)#,###" style="text-align:right; "/>
  816. <col ref="nextupdownamt" format="(-)#,###" style="text-align:right; "/>
  817. <col ref="nextadjtamt" visibility="hidden" format="(-)#,###" style="text-align:right; "/>
  818. <col ref="deptacnt"/>
  819. <col ref="orgbugtappyn"/>
  820. <script type="javascript" ev:event="onrowchanged">
  821. <![CDATA[
  822. model.removeNodeset(grd_orgbugtapplist.nodeset);
  823. model.removeNodeset(grd_orgbugtdetaillist.nodeset);
  824. model.setValue("/root/send/retrparam2/instcd", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("instcd")) );
  825. model.setValue("/root/send/retrparam2/acntyy", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntyy")) );
  826. model.setValue("/root/send/retrparam2/deptcd", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("deptcd")) );
  827. model.setValue("/root/send/retrparam2/acntcd", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntcd")) );
  828. model.setValue("/root/send/retrparam2/bugtflag", grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("bugtflag")) );
  829. submit("TRRBQ00102");
  830. if( model.getValue("/root/main/acntlist/orgacntlist[1]/orgbugtappyn") == "Y" ){
  831. misfSetReadOnlyCol( grd_orgbugtapplist, "acntcd,acntnm,assgym", true );
  832. misfSetReadOnlyCol(grd_orgbugtdetaillist, "appresn,appbase,appamt", true);
  833. }else{
  834. misfSetReadOnlyCol( grd_orgbugtapplist, "acntcd,acntnm,assgym", false );
  835. misfSetReadOnlyCol(grd_orgbugtdetaillist, "appresn,appbase,appamt", false);
  836. }
  837. // for(var i = grd_orgbugtapplist.fixedRows ; i < grd_orgbugtapplist.rows ; i++)
  838. // {
  839. // misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,acntnm,assgym", true, i);
  840. // }
  841. if(grd_orgbugtapplist.rows > 1)
  842. {
  843. grd_orgbugtapplist.row = 1;
  844. grd_orgbugtapplist.dispatch("onrowchanged");
  845. }
  846. /* if(DeptAcnt == "Y")
  847. {
  848. var vDeptAcnt = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("deptacnt"));
  849. if(vDeptAcnt == "Y")
  850. {
  851. btn_addrow.disabled = false;
  852. }
  853. else
  854. {
  855. btn_addrow.disabled = true;
  856. }
  857. }
  858. */
  859. grd_orgbugtlist.dispatch("onmouseup");
  860. model.refresh();
  861. ]]>
  862. </script>
  863. </datagrid>
  864. <line id="line1" class="line_1" style="x1:0px; y1:424px; x2:1195px; y2:424px; "/>
  865. <group id="grp_sea" style="left:0px; top:5px; width:1194px; height:35px; vertical-align:top; ">
  866. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  867. <caption id="caption2" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">예산년도 :</caption>
  868. <caption id="caption3" class="search_name" style="left:266px; top:9px; width:107px; height:17px; ">부서 :</caption>
  869. <line id="line13" class="line_4" style="x1:1107; y1:5px; x2:1107; y2:27px; "/>
  870. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1123px; top:7px; width:56px; height:22px; ">
  871. <caption>조회</caption>
  872. <script type="javascript" ev:event="DOMActivate">
  873. <![CDATA[
  874. // 2011.07.21 cyw 권한체크
  875. if( model.getValue("/root/temp1/authusinfo/bugtsearchyn") !="Y" ){
  876. messageBox("예산조회", "E002");
  877. return;
  878. }
  879. if(ipt_deptcd.value == "")
  880. {
  881. messageBox("부서를 선택하세요", "I000");
  882. return;
  883. }
  884. if(ipt_deptcd.value == "")
  885. {
  886. messageBox("예산년도를 입력하세요", "I000");
  887. return;
  888. }
  889. fRetrieve();
  890. ]]>
  891. </script>
  892. </button>
  893. <input id="ipt_deptcd" ref="/root/send/retrparam/deptcd" class="input_s_essential" disabled="false" navindex="2" maxlength="10" style="left:330px; top:8px; width:80px; height:19px; ">
  894. <script type="javascript" ev:event="onkeypress">
  895. <![CDATA[
  896. if(event.keyCode == 13)
  897. {
  898. model.setFocus("ipt_depthngnm");
  899. }
  900. ]]>
  901. </script>
  902. <script type="javascript" ev:event="xforms-value-changed">
  903. <![CDATA[
  904. racfBugtDeptValidCheck("deptcd,depthngnm", "code");
  905. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  906. {
  907. btn_search.dispatch("DOMActivate");
  908. }
  909. ]]>
  910. </script>
  911. </input>
  912. <input id="ipt_depthngnm" ref="/root/send/retrparam/depthngnm" class="input_s_essential" disabled="false" navindex="3" imemode="hangul" style="left:435px; top:8px; width:150px; height:19px; ">
  913. <script type="javascript" ev:event="onkeypress">
  914. <![CDATA[
  915. racfBugtDeptValidCheck("deptcd,depthngnm", "name");
  916. if(event.keyCode == 13)
  917. {
  918. btn_search.dispatch("DOMActivate");
  919. }
  920. ]]>
  921. </script>
  922. <script type="javascript" ev:event="xforms-value-changed">
  923. <![CDATA[
  924. racfBugtDeptValidCheck("deptcd,depthngnm", "name");
  925. if(ipt_deptcd.value != "" && ipt_depthngnm.value != "")
  926. {
  927. btn_search.dispatch("DOMActivate");
  928. }
  929. ]]>
  930. </script>
  931. </input>
  932. <button id="btn_depthelp" class="icon_search" disabled="false" style="left:414px; top:8px; width:16px; height:16px; ">
  933. <caption/>
  934. <script type="javascript" ev:event="DOMActivate">
  935. <![CDATA[
  936. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  937. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  938. {
  939. btn_search.dispatch("DOMActivate");
  940. }
  941. ]]>
  942. </script>
  943. </button>
  944. <caption id="caption5" class="search_name" visibility="hidden" style="left:615px; top:9px; width:87px; height:17px; ">예산구분 :</caption>
  945. <select1 id="rdo_bugtflag" ref="/root/send/retrparam/bugtflag" navindex="27" appearance="full" cellspacing="20" cols="4" overflow="visible" style="left:704px; top:9px; width:296px; height:20px; border-style:none; ">
  946. <choices>
  947. <item>
  948. <label>수입</label>
  949. <value>1</value>
  950. </item>
  951. <item>
  952. <label>비용</label>
  953. <value>2</value>
  954. </item>
  955. <item>
  956. <label>구매</label>
  957. <value>3</value>
  958. </item>
  959. <item>
  960. <label>자본</label>
  961. <value>4</value>
  962. </item>
  963. </choices>
  964. <script type="javascript" ev:event="xforms-value-changed">
  965. <![CDATA[
  966. btn_search.dispatch("DOMActivate");
  967. ]]>
  968. </script>
  969. </select1>
  970. <button id="button1" class="icon_next" navindex="-1" style="left:195px; top:9px; width:13px; height:15px; ">
  971. <caption/>
  972. <script type="javascript" ev:event="DOMActivate">
  973. <![CDATA[
  974. var vYYYY = model.getValue(ipt_acntyy.attribute("ref"));
  975. var vNum = parseInt(vYYYY, 10);
  976. if (vNum != 1)
  977. {
  978. vNum++;
  979. }
  980. else
  981. {
  982. return;
  983. }
  984. model.setValue(ipt_acntyy.attribute("ref"), vNum);
  985. ipt_acntyy.refresh();
  986. fRetrieve();
  987. ]]>
  988. </script>
  989. </button>
  990. <input id="ipt_acntyy" ref="/root/send/retrparam/acntyy" class="input_s_essential" navindex="1" maxlength="4" style="left:125px; top:8px; width:68px; height:19px; text-align:center; ">
  991. <script type="javascript" ev:event="xforms-value-changed">
  992. <![CDATA[
  993. // 2011.07.20 cyw 현재일자가 포함되는 예산신청기간 조회.
  994. model.resetInstanceNode("/root/init/srchinit/item");
  995. submit("TRRBQ00106");
  996. fRetrieve();
  997. ]]>
  998. </script>
  999. </input>
  1000. <button id="btn_pre" class="icon_pre" navindex="-1" style="left:110px; top:9px; width:13px; height:15px; ">
  1001. <caption/>
  1002. <script type="javascript" ev:event="DOMActivate">
  1003. <![CDATA[
  1004. var vYYYY = model.getValue(ipt_acntyy.attribute("ref"));
  1005. var vNum = parseInt(vYYYY, 10);
  1006. if (vNum != 1)
  1007. {
  1008. vNum--;
  1009. }
  1010. else
  1011. {
  1012. return;
  1013. }
  1014. model.setValue(ipt_acntyy.attribute("ref"), vNum);
  1015. ipt_acntyy.refresh();
  1016. fRetrieve();
  1017. ]]>
  1018. </script>
  1019. </button>
  1020. </group>
  1021. <caption id="caption9" class="tit_2" style="left:5px; top:55px; width:117px; height:13px; ">본예산 신청현황</caption>
  1022. <caption id="caption1" class="tit_2" style="left:5px; top:409px; width:117px; height:13px; ">본예산 신청내역</caption>
  1023. <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:1195px; y2:70px; "/>
  1024. <datagrid id="grd_orgbugtapplist" nodeset="/root/main/bugtlist/orgbugtapplist" autoresize="false" caption="기관코드^회계년도^부서^항계정코드^항^목 계정코드^목^계정과목^계정명^예산구분^배정월^신청액^적요^계산근거^원계정코드^원프로젝트ID" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 0, 100, 230, 0, 60, 104, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:429px; width:540px; height:304px; ">
  1025. <col ref="instcd"/>
  1026. <col ref="acntyy"/>
  1027. <col ref="deptcd"/>
  1028. <col ref="supacntcd3" visibility="hidden"/>
  1029. <col ref="supacntnm3" visibility="hidden"/>
  1030. <col ref="supacntcd4" visibility="hidden"/>
  1031. <col ref="supacntnm4" visibility="hidden"/>
  1032. <col editable="false" ref="acntcd" type="inputbutton"/>
  1033. <col ref="acntnm" style="text-align:left; "/>
  1034. <col ref="bugtflag" type="combo" style="text-align:center; ">
  1035. <choices>
  1036. <item>
  1037. <label>수입</label>
  1038. <value>1</value>
  1039. </item>
  1040. <item>
  1041. <label>비용</label>
  1042. <value>2</value>
  1043. </item>
  1044. <item>
  1045. <label>구매</label>
  1046. <value>3</value>
  1047. </item>
  1048. <item>
  1049. <label>자본</label>
  1050. <value>4</value>
  1051. </item>
  1052. </choices>
  1053. </col>
  1054. <col ref="assgym" type="combo" style="text-align:center; ">
  1055. <choices>
  1056. <itemset nodeset="/root/contextmenu/bugtflag/item">
  1057. <label ref="label"/>
  1058. <value ref="value"/>
  1059. </itemset>
  1060. </choices>
  1061. </col>
  1062. <col ref="appamt" format="(-)#,###" style="text-align:right; "/>
  1063. <col ref="mainrec" type="input" visibility="hidden"/>
  1064. <col ref="calcbase" type="input" visibility="hidden"/>
  1065. <script type="javascript" ev:event="onbuttonclick">
  1066. <![CDATA[
  1067. if(grd_orgbugtapplist.col == grd_orgbugtapplist.colRef("acntcd"))
  1068. {
  1069. misfOpenPopUpList("10", grd_orgbugtapplist, "", "supacntcd3,supacntnm3,supacntcd4,supacntnm4,acntcd,acntnm", rdo_bugtflag.value, "bugtflag");
  1070. model.refresh();
  1071. }
  1072. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) = model.getValue(rdo_bugtflag.attribute("ref"));
  1073. ]]>
  1074. </script>
  1075. <script type="javascript" ev:event="xforms-value-changed">
  1076. <![CDATA[
  1077. if(grd_orgbugtapplist.col == grd_orgbugtapplist.colRef("acntcd"))
  1078. {
  1079. var Vacntcd = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd"));
  1080. for(var i = grd_orgbugtdetaillist.fixedRows ; i < grd_orgbugtdetaillist.rows ; i++)
  1081. {
  1082. grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("acntcd")) = Vacntcd;
  1083. grd_orgbugtdetaillist.addStatus(i, "update");
  1084. }
  1085. }
  1086. else if(grd_orgbugtapplist.col == grd_orgbugtapplist.colRef("assgym"))
  1087. {
  1088. fCheckDupData();
  1089. var Vassgym = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym"));
  1090. for(var i = grd_orgbugtdetaillist.fixedRows ; i < grd_orgbugtdetaillist.rows ; i++)
  1091. {
  1092. grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("assgym")) = Vassgym;
  1093. grd_orgbugtdetaillist.addStatus(i, "update");
  1094. }
  1095. }
  1096. ]]>
  1097. </script>
  1098. <script type="javascript" ev:event="onclick">
  1099. <![CDATA[
  1100. if(grd_orgbugtapplist.row == 0)
  1101. {
  1102. grd_orgbugtlist.dispatch("onrowchanged");
  1103. }
  1104. ]]>
  1105. </script>
  1106. <script type="javascript" ev:event="onrowchanged">
  1107. <![CDATA[
  1108. for(var i = grd_orgbugtapplist.fixedRows-1 ; i < grd_orgbugtapplist.rows ; i++)
  1109. {
  1110. if(grd_orgbugtapplist.rowStatus(i) != 0)
  1111. {
  1112. grd_orgbugtlist.dispatch("onrowchanged");
  1113. return;
  1114. }
  1115. }
  1116. model.removeNodeset("/root/main/orgbgdtlist/orgbugtdetaillist");
  1117. model.setValue("/root/send/retrparam3/instcd", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("instcd")) );
  1118. model.setValue("/root/send/retrparam3/acntyy", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy")) );
  1119. model.setValue("/root/send/retrparam3/deptcd", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd")) );
  1120. model.setValue("/root/send/retrparam3/acntcd", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) );
  1121. model.setValue("/root/send/retrparam3/assgym", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) );
  1122. model.setValue("/root/send/retrparam3/bugtflag", grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) );
  1123. submit("TRRBQ00103");
  1124. if(grd_orgbugtlist.valueMatrix(grd_orgbugtlist.fixedRows, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1125. {
  1126. misfSetReadOnlyCol(grd_orgbugtdetaillist, "appresn,appbase,appamt", true);
  1127. }
  1128. else
  1129. {
  1130. misfSetReadOnlyCol(grd_orgbugtdetaillist, "appresn,appbase,appamt", false);
  1131. }
  1132. grd_orgbugtapplist.dispatch("onmouseup");
  1133. ]]>
  1134. </script>
  1135. </datagrid>
  1136. <button id="btn_excel" class="btn2_letter4" style="left:1127px; top:49px; width:64px; height:19px; ">
  1137. <caption>엑셀저장</caption>
  1138. <script type="javascript" ev:event="DOMActivate">
  1139. <![CDATA[
  1140. misfSaveExcel(grd_orgbugtlist);
  1141. ]]>
  1142. </script>
  1143. </button>
  1144. <button id="btn_addrow" class="btn2_letter3" style="left:431px; top:404px; width:53px; height:19px; ">
  1145. <caption>행추가</caption>
  1146. <script type="javascript" ev:event="DOMActivate">
  1147. <![CDATA[
  1148. if(grd_orgbugtlist.row >= grd_orgbugtlist.fixedRows)
  1149. {
  1150. if(grd_orgbugtapplist.rows == grd_orgbugtapplist.fixedRows + 1)
  1151. {
  1152. if(grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.fixedRows, grd_orgbugtapplist.colRef("assgym")) == "-")
  1153. {
  1154. messageBox("년간 배정이 있어 추가 배정이 불가능 합니다.", "I000");
  1155. return false;
  1156. }
  1157. }
  1158. if(grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntcd")) == "99999999") return;
  1159. if(grd_orgbugtlist.valueMatrix(grd_orgbugtlist.fixedRows, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1160. {
  1161. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1162. return;
  1163. }
  1164. if(!fCheckSave()) return false;
  1165. model.removeNodeset(grd_orgbugtdetaillist.nodeset);
  1166. misfGridIUD(grd_orgbugtapplist, "A");
  1167. misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,acntnm,assgym", false, grd_orgbugtapplist.row);
  1168. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("instcd")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("instcd"));
  1169. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntyy"));
  1170. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("deptcd"));
  1171. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntcd"));
  1172. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntnm")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntnm"));
  1173. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("bugtflag"));
  1174. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("mainrec")) = grd_orgbugtlist.valueMatrix(grd_orgbugtlist.row, grd_orgbugtlist.colRef("acntnm"));
  1175. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("appamt")) = 0;
  1176. if(grd_orgbugtapplist.rows == grd_orgbugtapplist.fixedRows + 1) grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "-";
  1177. model.refresh();
  1178. // fSetGridDefaultValue();
  1179. if(grd_orgbugtapplist.rows == grd_orgbugtapplist.fixedRows + 1)
  1180. {
  1181. btn_detailaddrow.dispatch("DOMActivate");
  1182. }
  1183. }
  1184. ]]>
  1185. </script>
  1186. </button>
  1187. <button id="btn_delrow" class="btn2_letter3" style="left:486px; top:404px; width:53px; height:19px; ">
  1188. <caption>행삭제</caption>
  1189. <script type="javascript" ev:event="DOMActivate">
  1190. <![CDATA[
  1191. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1192. {
  1193. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1194. return;
  1195. }
  1196. for(var i = 1 ; i < grd_orgbugtapplist.rows ; i++)
  1197. {
  1198. grd_orgbugtapplist.select(i, grd_orgbugtapplist.colRef("acntcd"), i, grd_orgbugtapplist.colRef("mainrec")) = false;
  1199. }
  1200. var iRowStatus = grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row);
  1201. if (iRowStatus == 4 || iRowStatus == 5 || iRowStatus == 6) //delete
  1202. {
  1203. grd_orgbugtapplist.removeStatus(grd_orgbugtapplist.row, "delete");
  1204. for(var i=1; i<grd_orgbugtdetaillist.rows; i++)
  1205. {
  1206. grd_orgbugtdetaillist.removeStatus(i, "delete");
  1207. }
  1208. }
  1209. else if(iRowStatus == 1 || iRowStatus == 3) //insert
  1210. {
  1211. grd_orgbugtapplist.deleteRow(grd_orgbugtapplist.row, false);
  1212. grd_orgbugtlist.dispatch("onrowchanged");
  1213. }
  1214. else if(iRowStatus == 0 || iRowStatus == 2) //update
  1215. {
  1216. grd_orgbugtapplist.addStatus(grd_orgbugtapplist.row,"delete");
  1217. for(var i=1; i<grd_orgbugtdetaillist.rows; i++)
  1218. {
  1219. grd_orgbugtdetaillist.addStatus(i, "delete");
  1220. }
  1221. }
  1222. fSetOrgAmt();
  1223. ]]>
  1224. </script>
  1225. </button>
  1226. <datagrid id="grd_orgbugtdetaillist" nodeset="/root/main/orgbgdtlist/orgbugtdetaillist" autoresize="true" caption="기관코드^회계년도^부서^계정과목^예산구분^배정월^적요^산출근거^신청액^조정산출내역^조정산출근거^조정액" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 240, 250, 110, 0, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:545px; top:429px; width:650px; height:304px; ">
  1227. <col ref="instcd"/>
  1228. <col ref="acntyy"/>
  1229. <col ref="deptcd"/>
  1230. <col ref="acntcd"/>
  1231. <col ref="bugtflag" style="text-align:center; "/>
  1232. <col ref="assgym" style="text-align:center; "/>
  1233. <col ref="appresn" type="input"/>
  1234. <col ref="appbase" type="input" style="text-align:left; "/>r
  1235. <col ref="appamt" type="input" format="(-)#,###" style="text-align:right; "/>
  1236. <col ref="adjtresn" visibility="hidden"/>
  1237. <col ref="adjtbase" visibility="hidden"/>
  1238. <col ref="adjtamt" visibility="hidden"/>
  1239. <script type="javascript" ev:event="onendedit">
  1240. <![CDATA[
  1241. if(grd_orgbugtdetaillist.col == grd_orgbugtdetaillist.colRef("appresn"))
  1242. {
  1243. for(var i=0; i<grd_orgbugtdetaillist.rows; i++)
  1244. {
  1245. if(i == grd_orgbugtdetaillist.row) continue;
  1246. if(grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("appresn")) == grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appresn")))
  1247. {
  1248. messageBox("신청 내역이 있습니다. 신청 내역을 수정하세요.", "I999");
  1249. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appresn")) = "";
  1250. return;
  1251. }
  1252. }
  1253. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("adjtresn")) = grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appresn"));
  1254. }
  1255. else if(grd_orgbugtdetaillist.col == grd_orgbugtdetaillist.colRef("appamt"))
  1256. {
  1257. if(grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appamt")) == ""){grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appamt")) = "0"}
  1258. fSetDetailListOrgAmnt();
  1259. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("adjtamt")) = grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appamt"));
  1260. }
  1261. else if(grd_orgbugtdetaillist.col == grd_orgbugtdetaillist.colRef("appbase"))
  1262. {
  1263. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("adjtbase")) = grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appbase"));
  1264. }
  1265. ]]>
  1266. </script>
  1267. </datagrid>
  1268. <line id="line4" class="line_1" style="x1:541px; y1:427px; x2:541px; y2:732px; "/>
  1269. <button id="btn_detaildelrow" class="btn2_letter3" style="left:1140px; top:404px; width:53px; height:19px; ">
  1270. <caption>행삭제</caption>
  1271. <script type="javascript" ev:event="DOMActivate">
  1272. <![CDATA[
  1273. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1274. {
  1275. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1276. return;
  1277. }
  1278. misfGridIUD(grd_orgbugtdetaillist, "D");
  1279. fSetDetailListOrgAmnt();
  1280. var iCnt = 0;
  1281. for(var i=1; i<grd_orgbugtdetaillist.rows; i++)
  1282. {
  1283. if(grd_orgbugtdetaillist.rowStatus(i) == 4 || grd_orgbugtdetaillist.rowStatus(i) == 5 || grd_orgbugtdetaillist.rowStatus(i) == 6)
  1284. {
  1285. iCnt ++ ;
  1286. }
  1287. }
  1288. if(grd_orgbugtdetaillist.rows - grd_orgbugtdetaillist.fixedRows == iCnt)
  1289. {
  1290. if(grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 1 && grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 3)
  1291. {
  1292. grd_orgbugtapplist.addStatus(grd_orgbugtapplist.row, "delete");
  1293. }
  1294. else
  1295. {
  1296. if(grd_orgbugtapplist.rows > 2)
  1297. {
  1298. misfGridIUD(grd_orgbugtapplist, "D");
  1299. }
  1300. }
  1301. }
  1302. else
  1303. {
  1304. if(grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 1 && grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) != 3)
  1305. {
  1306. grd_orgbugtapplist.rowStatus(grd_orgbugtapplist.row) = 2;
  1307. }
  1308. }
  1309. if(grd_orgbugtdetaillist.rows > 1)
  1310. {
  1311. misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,assgym", false, grd_orgbugtapplist.row);
  1312. }
  1313. ]]>
  1314. </script>
  1315. </button>
  1316. <button id="btn_detailaddrow" class="btn2_letter3" style="left:1085px; top:404px; width:53px; height:19px; ">
  1317. <caption>행추가</caption>
  1318. <script type="javascript" ev:event="DOMActivate">
  1319. <![CDATA[
  1320. if(grd_orgbugtapplist.rows > 1 && grd_orgbugtapplist.row > 0)
  1321. {
  1322. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1323. {
  1324. messageBox("신청된 예산이므로 추가를 할 수", "I004");
  1325. return;
  1326. }
  1327. if(grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) == "")
  1328. {
  1329. messageBox("본예산 신청할 계정을 선택하세요", "I999");
  1330. return;
  1331. }
  1332. if(grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) == "")
  1333. {
  1334. messageBox("배정월을 ", "C002");
  1335. return;
  1336. }
  1337. misfGridIUD(grd_orgbugtdetaillist, "A");
  1338. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("instcd")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("instcd"));
  1339. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("acntyy")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy"));
  1340. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("deptcd")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd"));
  1341. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("acntcd")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd"));
  1342. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("assgym")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym"));
  1343. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("bugtflag")) = grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag"));
  1344. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("appamt")) = 0;
  1345. grd_orgbugtdetaillist.valueMatrix(grd_orgbugtdetaillist.row, grd_orgbugtdetaillist.colRef("adjtamt")) = 0;
  1346. grd_orgbugtdetaillist.row = grd_orgbugtdetaillist.rows - 1;
  1347. grd_orgbugtdetaillist.col = grd_orgbugtdetaillist.colRef("appresn");
  1348. grd_orgbugtdetaillist.editCell();
  1349. // if(grd_orgbugtdetaillist.rows > 1)
  1350. // {
  1351. // misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,assgym", true, grd_orgbugtapplist.row);
  1352. // }
  1353. }
  1354. ]]>
  1355. </script>
  1356. </button>
  1357. <button id="btn_acntaddrow" class="btn2_letter4" style="left:360px; top:404px; width:64px; height:19px; ">
  1358. <caption>항목추가</caption>
  1359. <script type="javascript" ev:event="DOMActivate">
  1360. <![CDATA[
  1361. if(grd_orgbugtlist.valueMatrix(2, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1362. {
  1363. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1364. return;
  1365. }
  1366. model.removeNodeset(grd_orgbugtapplist.nodeset);
  1367. model.removeNodeset(grd_orgbugtdetaillist.nodeset);
  1368. model.refresh();
  1369. misfGridIUD(grd_orgbugtapplist, "A");
  1370. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("instcd")) = model.getValue("/root/send/retrparam/instcd");
  1371. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntyy")) = model.getValue("/root/send/retrparam/acntyy");
  1372. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("deptcd")) = model.getValue("/root/send/retrparam/deptcd");
  1373. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntcd")) = "";
  1374. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("acntnm")) = "";
  1375. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("bugtflag")) = model.getValue("/root/send/retrparam/bugtflag");
  1376. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("assgym")) = "-";
  1377. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("appamt")) = 0;
  1378. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("mainrec")) = "";
  1379. grd_orgbugtapplist.valueMatrix(grd_orgbugtapplist.row, grd_orgbugtapplist.colRef("calcbase")) = "";
  1380. grd_orgbugtapplist.col = grd_orgbugtapplist.colRef("acntcd");
  1381. grd_orgbugtapplist.dispatch("onbuttonclick");
  1382. model.setValue("/root/hidden/bugtaddflag", "Y");
  1383. ]]>
  1384. </script>
  1385. </button>
  1386. <caption id="caption10" class="tit_2" style="left:548px; top:409px; width:119px; height:13px; ">본예산 산출내역</caption>
  1387. <button id="button2" class="btn2_letter5" style="left:1006px; top:49px; width:75px; height:19px; ">
  1388. <caption>데이터복사</caption>
  1389. <script type="javascript" ev:event="DOMActivate">
  1390. <![CDATA[
  1391. if( messageBox("본예산데이터를 복사 합니다.", "Q003") != 6 ) return ;
  1392. if(submit("TRRBQ00104")){
  1393. messageBox("복사되었습니다.", "I999");
  1394. }
  1395. /*for(var i = 1; i <= datagrid1.rows; i++){
  1396. datagrid1.valueMatrix(i, datagrid1.colRef("status")) = "i"
  1397. datagrid1.rowStatus(i) = 1;
  1398. }
  1399. for(var i = 1; i <= datagrid2.rows; i++){
  1400. datagrid2.valueMatrix(i, datagrid2.colRef("status2")) = "i"
  1401. datagrid2.rowStatus(i) = 1;
  1402. }
  1403. submit("TXRBQ00604");*/
  1404. ]]>
  1405. </script>
  1406. </button>
  1407. <button id="button3" class="btn2_letter2" style="left:1083px; top:49px; width:42px; height:19px; ">
  1408. <caption>출력</caption>
  1409. <script type="javascript" ev:event="DOMActivate">
  1410. <![CDATA[
  1411. // 2011.06.24 cyw 출력기능추가
  1412. fPrint();
  1413. ]]>
  1414. </script>
  1415. </button>
  1416. <datagrid id="datagrid1" nodeset="/root/main/acntlist/orgacntlist" caption="기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^금년도^금년도^금년도^차년도^차년도^조정액^부서계정여부^신청|기관코드^회계년도^부서코드^관^관^항^항^목^목^계정과목^계정과목^예산구분^예산(A)^실적(B)^집행율(B/A)^신청액(B)^증감액(B-A)^조정액^부서계정여부^신청" colsep="^" colwidth="0, 0, 0, 65, 100, 65, 100, 65, 120, 65, 160, 0, 105, 105, 105, 120, 120, 0, 0, 66" ellipsis="true" mergecells="byrestriccol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="16" rowsep="|" tooltip="true" style="left:0px; top:75px; width:1195px; height:322px; ">
  1417. <col ref="instcd" visibility="hidden"/>
  1418. <col ref="acntyy" visibility="hidden"/>
  1419. <col ref="deptcd" visibility="hidden"/>
  1420. <col ref="supacntcd2" style="text-align:center; vertical-align:top; padding-top:3; "/>
  1421. <col ref="supacntnm2" style="vertical-align:top; padding-top:3; "/>
  1422. <col ref="supacntcd3" style="text-align:center; vertical-align:top; padding-top:3; "/>
  1423. <col ref="supacntnm3" style="vertical-align:top; padding-top:3; "/>
  1424. <col ref="supacntcd4" style="text-align:center; vertical-align:top; padding-top:3; "/>
  1425. <col ref="supacntnm4" style="vertical-align:top; padding-top:3; "/>
  1426. <col ref="acntcd" style="text-align:center; "/>
  1427. <col ref="acntnm" style="text-align:left; "/>
  1428. <col ref="bugtflag" type="combo" visibility="hidden" style="text-align:center; ">
  1429. <choices>
  1430. <item>
  1431. <label>수입</label>
  1432. <value>1</value>
  1433. </item>
  1434. <item>
  1435. <label>비용</label>
  1436. <value>2</value>
  1437. </item>
  1438. <item>
  1439. <label>구매</label>
  1440. <value>3</value>
  1441. </item>
  1442. <item>
  1443. <label>자본</label>
  1444. <value>4</value>
  1445. </item>
  1446. </choices>
  1447. </col>
  1448. <col ref="curorgbugtamt" format="(-)#,###" style="text-align:right; "/>
  1449. <col ref="curresult" visibility="hidden" format="(-)#,###" style="text-align:right; "/>
  1450. <col ref="curexerate" visibility="hidden" format="#.#%" style="text-align:right; "/>
  1451. <col ref="nextappamt" format="(-)#,###" style="text-align:right; "/>
  1452. <col ref="nextupdownamt" format="(-)#,###" style="text-align:right; "/>
  1453. <col ref="nextadjtamt" visibility="hidden" format="(-)#,###" style="text-align:right; "/>
  1454. <col ref="deptacnt"/>
  1455. <col ref="orgbugtappyn"/>
  1456. <script type="javascript" ev:event="onrowchanged">
  1457. <![CDATA[
  1458. grd_orgbugtlist.row = datagrid1.row;
  1459. grd_orgbugtlist.dispatch("onrowchanged");
  1460. ]]>
  1461. </script>
  1462. </datagrid>
  1463. </group>
  1464. <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  1465. <button id="btn_save" class="btn4_letter2" style="left:1075px; top:3px; width:56px; height:22px; ">
  1466. <caption>저장</caption>
  1467. <script type="javascript" ev:event="DOMActivate">
  1468. <![CDATA[
  1469. // 2011.07.21 cyw 권한체크
  1470. if( model.getValue("/root/temp1/authusinfo/bugtinputyn") !="Y" ){
  1471. messageBox("예산저장", "E002");
  1472. return;
  1473. }
  1474. for(var i=0; i<grd_orgbugtdetaillist.rows; i++)
  1475. {
  1476. if( grd_orgbugtdetaillist.valueMatrix(i, grd_orgbugtdetaillist.colRef("appresn")) == "" ||grd_orgbugtdetaillist.rows == grd_orgbugtdetaillist.fixedRows)
  1477. {
  1478. messageBox("산출내역은 ", "I003");
  1479. return;
  1480. }
  1481. }
  1482. fSave();
  1483. if( model.getValue("/root/main/acntlist/orgacntlist[1]/orgbugtappyn") == "Y" ){
  1484. misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,acntnm,assgym", true);
  1485. }else{
  1486. misfSetReadOnlyCol(grd_orgbugtapplist, "acntcd,acntnm,assgym", false);
  1487. }
  1488. fSetOrgAmt();
  1489. if(model.getValue("/root/hidden/bugtaddflag") == "Y")
  1490. {
  1491. btn_search.dispatch("DOMActivate");
  1492. model.setValue("/root/hidden/bugtaddflag", "N");
  1493. }
  1494. //grd_orgbugtlist.gridToInstance();
  1495. ]]>
  1496. </script>
  1497. </button>
  1498. <line id="line2" class="line_6" style="x1:0px; y1:26px; x2:1194px; y2:26px; "/>
  1499. <button id="btn_app" class="btn4_letter2" style="left:1135px; top:3px; width:56px; height:22px; ">
  1500. <caption>신청</caption>
  1501. <script type="javascript" ev:event="DOMActivate">
  1502. <![CDATA[
  1503. // 2011.07.21 cyw 권한체크
  1504. if( model.getValue("/root/temp1/authusinfo/bugtreqyn") !="Y" ){
  1505. messageBox("예산신청", "E002");
  1506. return;
  1507. }
  1508. var offerrcnt = getNodesetCount("/root/init/srchinit/item");
  1509. var idx = 0;
  1510. if( offerrcnt < 1 ){
  1511. messageBox("본예산 신청기간이 아닙니다. 신청기간 데이터를 확인해주십시오." ,"E000");
  1512. return;
  1513. }
  1514. for(var i = 1 ; i <= offerrcnt ; i++ ){
  1515. if( model.getValue("/root/send/retrparam/acntyy") == model.getValue("/root/init/srchinit/item[" + i + "]/acntyy") ){
  1516. idx++;
  1517. }
  1518. }
  1519. if( idx > 0 ){
  1520. fSetOrgAmtAppCancel();
  1521. }else{
  1522. messageBox("본예산 신청기간이 아닙니다. 신청기간 데이터를 확인해주십시오." ,"E000");
  1523. return;
  1524. }
  1525. model.refresh();
  1526. ]]>
  1527. </script>
  1528. </button>
  1529. <button id="btn_excelupload" class="btn4_letter4" visibility="visible" style="left:990px; top:3px; width:80px; height:22px; ">
  1530. <caption>엑셀저장</caption>
  1531. <script type="javascript" ev:event="DOMActivate">
  1532. <![CDATA[
  1533. model.makeValue("/root/source/slipinfo/acntyy", model.getValue(ipt_acntyy.attribute("ref")));
  1534. model.makeValue("/root/source/slipinfo/deptcd", model.getValue(ipt_deptcd.attribute("ref")));
  1535. model.makeValue("/root/source/slipinfo/depthngnm", model.getValue(ipt_depthngnm.attribute("ref")));
  1536. model.makeValue("/root/source/slipinfo/workflag", "1");
  1537. modal("SMRBQ00500","","","","","/root/source", "/root/target");
  1538. btn_search.dispatch("DOMActivate");
  1539. ]]>
  1540. </script>
  1541. </button>
  1542. <button id="btn_cancel" class="btn4_letter4" visibility="hidden" style="left:820px; top:3px; width:80px; height:22px; ">
  1543. <caption>신청취소</caption>
  1544. <script type="javascript" ev:event="DOMActivate">
  1545. <![CDATA[
  1546. // 2011.07.21 cyw 권한체크
  1547. if( model.getValue("/root/temp1/authusinfo/bugtreqyn") !="Y" ){
  1548. messageBox("신청을 취소할", "E002");
  1549. return;
  1550. }
  1551. fSetOrgAmtAppCancel();
  1552. ]]>
  1553. </script>
  1554. </button>
  1555. <button id="btn_alldel" class="btn4_letter4" visibility="visible" style="left:905px; top:3px; width:80px; height:22px; ">
  1556. <caption>전체삭제</caption>
  1557. <script type="javascript" ev:event="DOMActivate">
  1558. <![CDATA[
  1559. // 2011.07.22 cyw 권한체크
  1560. if( model.getValue("/root/temp1/authusinfo/bugtsearchyn") !="Y" && model.getValue("/root/temp1/authusinfo/bugtreqyn") !="Y" ){
  1561. messageBox("전체삭제", "E002");
  1562. return;
  1563. }
  1564. if(grd_orgbugtlist.valueMatrix(1, grd_orgbugtlist.colRef("orgbugtappyn")) == "Y")
  1565. {
  1566. messageBox("이미 신청된 예산", "E008");
  1567. return;
  1568. }
  1569. if (messageBox("본예산 [" + rdo_bugtflag.label + "] 전체 내역을", "Q001") == "6")
  1570. {
  1571. submit("TXRBQ00303");
  1572. btn_search.dispatch("DOMActivate");
  1573. }
  1574. ]]>
  1575. </script>
  1576. </button>
  1577. </group>
  1578. <script type="javascript" ev:event="onmousedown">
  1579. <![CDATA[
  1580. fShowContextMenu();
  1581. ]]>
  1582. </script>
  1583. </xhtml:body>
  1584. </xhtml:html>