SMRBQ00300_추경예산신청.xrw 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410
  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. <revacntlist/>
  12. </acntlist>
  13. <bugtlist>
  14. <revbugtapplist/>
  15. </bugtlist>
  16. <revbgdtlist>
  17. <revbugtdetaillist/>
  18. </revbgdtlist>
  19. <acntprntlist>
  20. <orgacntprntlist/>
  21. </acntprntlist>
  22. </main>
  23. <send>
  24. <retrparam>
  25. <instcd/>
  26. <acntyy/>
  27. <deptcd/>
  28. <depthngnm/>
  29. <bugtflag>2</bugtflag>
  30. </retrparam>
  31. <retrparam2>
  32. <instcd/>
  33. <acntyy/>
  34. <deptcd/>
  35. <acntcd/>
  36. <bugtflag/>
  37. </retrparam2>
  38. <retrparam3>
  39. <instcd/>
  40. <acntyy/>
  41. <deptcd/>
  42. <acntcd/>
  43. <bugtflag/>
  44. <assgym/>
  45. </retrparam3>
  46. <retrparam4>
  47. <instcd/>
  48. <mngtcd>bugtdept</mngtcd>
  49. </retrparam4>
  50. <appcancelparams>
  51. <instcd/>
  52. <acntyy/>
  53. <deptcd/>
  54. <bugtflag/>
  55. <flag/>
  56. </appcancelparams>
  57. <revbugtapplist/>
  58. <revbugtdetaillist/>
  59. </send>
  60. <init>
  61. <code>
  62. <codelist/>
  63. </code>
  64. </init>
  65. <temp>
  66. </temp>
  67. <hidden>
  68. <updateflag>Y</updateflag>
  69. <bugtaddflag>N</bugtaddflag>
  70. </hidden>
  71. <contextmenu>
  72. <assgym>
  73. <item>
  74. <label>년간</label>
  75. <value>-</value>
  76. </item>
  77. <item>
  78. <label>3월</label>
  79. <value>03</value>
  80. </item>
  81. <item>
  82. <label>4월</label>
  83. <value>04</value>
  84. </item>
  85. <item>
  86. <label>5월</label>
  87. <value>05</value>
  88. </item>
  89. <item>
  90. <label>6월</label>
  91. <value>06</value>
  92. </item>
  93. <item>
  94. <label>7월</label>
  95. <value>07</value>
  96. </item>
  97. <item>
  98. <label>8월</label>
  99. <value>08</value>
  100. </item>
  101. <item>
  102. <label>9월</label>
  103. <value>09</value>
  104. </item>
  105. <item>
  106. <label>10월</label>
  107. <value>10</value>
  108. </item>
  109. <item>
  110. <label>11월</label>
  111. <value>11</value>
  112. </item>
  113. <item>
  114. <label>12월</label>
  115. <value>12</value>
  116. </item>
  117. <item>
  118. <label>1월</label>
  119. <value>01</value>
  120. </item>
  121. <item>
  122. <label>2월</label>
  123. <value>02</value>
  124. </item>
  125. </assgym>
  126. </contextmenu>
  127. <source>
  128. <slipinfo/>
  129. </source>
  130. </root>
  131. </instance>
  132. <submission id="TRRBQ00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" resultref="/root/main/acntlist"/>
  133. <submission id="TRRBQ00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam2" resultref="/root/main/bugtlist"/>
  134. <submission id="TRRBQ00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam3" resultref="/root/main/revbgdtlist"/>
  135. <submission id="TXRBQ00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  136. <submission id="TRRBQ00305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" resultref="/root/main/bugtexcel"/>
  137. <submission id="TRRAZ00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam4" resultref="/root/init/code"/>
  138. <submission id="TXRBQ00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  139. <submission id="TXRBQ00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/appcancelparams" resultref="/root/temp"/>
  140. <submission id="TXRBQ00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparam" resultref="/root/temp"/>
  141. <submission id="TRRBQ00306" mediatype="application/x-www-form-urlencoded" method="get" ref="/root/send/retrparam" replace="instance" resultref="/root/main/acntprntlist"/>
  142. </model>
  143. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  144. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  145. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  146. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  147. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  148. <script type="javascript" src="../../../mis/bugtcommonweb/js/RBC001.js"/>
  149. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  150. <script type="javascript" ev:event="xforms-ready">
  151. <![CDATA[
  152. fCheckAuth();
  153. fResetForm();
  154. ]]>
  155. </script>
  156. <script type="javascript">
  157. <![CDATA[
  158. var Instcd = getUserInfo("dutplceinstcd");
  159. var Deptcd = getUserInfo("dutplcecd");
  160. var Deptnm = getUserInfo("dutplcenm");
  161. var Emplno = getUserInfo("userid");
  162. var DeptAcnt = "";
  163. //========================================================================================
  164. //화면 권한 체크
  165. //========================================================================================
  166. function fCheckAuth()
  167. {
  168. btn_search.disabled = !checkAuth("R");
  169. btn_save.disabled = !checkAuth("X");
  170. }
  171. //========================================================================================
  172. //화면 로드시 초기화 함수
  173. //========================================================================================
  174. function fResetForm()
  175. {
  176. grd_revbugtlist.rowHeight(0) = 35;
  177. if(radfCheckInstMngt(getUserInfo("dutplceinstcd"), 'condition4') == "Y")
  178. {
  179. DeptAcnt = "Y";
  180. btn_acntaddrow.visible = false;
  181. }
  182. else
  183. {
  184. DeptAcnt = "N";
  185. btn_acntaddrow.visible = true;
  186. }
  187. model.setValue("/root/send/retrparam/instcd", Instcd);
  188. model.setValue("/root/send/retrparam/deptcd", Deptcd);
  189. model.setValue("/root/send/retrparam/depthngnm", Deptnm);
  190. ipt_acntyy.value = rbcfgetAppAcntyy(Instcd);
  191. model.setValue("/root/send/retrparam4/instcd", Instcd);
  192. submit("TRRAZ00001");
  193. // if(Deptcd == model.getValue("/root/init/code/codelist/cdid"))
  194. // {
  195. // ipt_deptcd.disabled = false;
  196. // btn_depthelp.disabled = false;
  197. // ipt_depthngnm.disabled = false;
  198. // }
  199. btn_search.dispatch("DOMActivate");
  200. }
  201. //========================================================================================
  202. //예산 신청 가능 여부 조회 (기간 조회)
  203. //========================================================================================
  204. //========================================================================================
  205. //부서코드 Help Open
  206. //========================================================================================
  207. function fOpenPopupDeptHelp(pControl, pInstance)
  208. {
  209. misfOpenPopUpList("11", pControl, "", pInstance);
  210. model.refresh();
  211. }
  212. //========================================================================================
  213. // 예산 조회 및 권한 예외 처리
  214. //========================================================================================
  215. function fRetrieve()
  216. {
  217. model.removeNodeset(grd_revbugtlist.nodeset);
  218. model.removeNodeset(grd_revbugtapplist.nodeset);
  219. model.removeNodeset(grd_revbugtdetaillist.nodeset);
  220. model.refresh();
  221. var bugtsearchyn = "";
  222. var bugtinputyn = "";
  223. var bugtreqyn = "";
  224. var bugtdeptcd = model.getValue("/root/init/code/codelist/cdid");
  225. var vAppCheck = rbcfgetAppPossibleDeptCheck(getUserInfo("dutplceinstcd"), ipt_acntyy.value, ipt_deptcd.value);
  226. // alert(bugtdeptcd);
  227. var vDeptcd = model.getValue(ipt_deptcd.attribute("ref"));
  228. if(vDeptcd == Deptcd || bugtdeptcd == Deptcd)
  229. {
  230. bugtsearchyn = "Y";
  231. bugtinputyn = "Y";
  232. bugtreqyn = "Y";
  233. }
  234. else
  235. {
  236. bugtsearchyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTSEARCHYN');
  237. bugtinputyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTINPUTYN');
  238. bugtreqyn = radfCheckBugtAuth(Instcd, Emplno, vDeptcd, 'BUGTREQYN');
  239. }
  240. if(bugtsearchyn == 'Y') { btn_save.disabled = false;
  241. btn_app.disabled = false;
  242. btn_alldel.disabled = false;
  243. submit("TRRBQ00301");
  244. if(grd_revbugtlist.valueMatrix(grd_revbugtlist.fixedRows, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  245. {
  246. bugtinputyn = 'N';
  247. } }
  248. else { btn_save.disabled = true;
  249. btn_app.disabled = true;
  250. btn_alldel.disabled = true;
  251. return false; };
  252. if(bugtinputyn == 'Y' && vAppCheck == 'Y')
  253. { btn_save.disabled = false;
  254. btn_excelupload.disabled = false;
  255. btn_acntaddrow.disabled = false;
  256. btn_addrow.disabled = false;
  257. btn_delrow.disabled = false;
  258. btn_detailaddrow.disabled = false;
  259. btn_detaildelrow.disabled = false; }
  260. else { btn_save.disabled = true;
  261. btn_excelupload.disabled = true;
  262. btn_acntaddrow.disabled = true;
  263. btn_addrow.disabled = true;
  264. btn_delrow.disabled = true;
  265. btn_detailaddrow.disabled = true;
  266. btn_detaildelrow.disabled = true; };
  267. if(bugtreqyn == 'Y') { btn_app.disabled = false;
  268. btn_alldel.disabled = false;
  269. btn_cancel.disabled = false; }
  270. else { btn_app.disabled = true;
  271. btn_alldel.disabled = true;
  272. btn_cancel.disabled = true; };
  273. fSetRowColor(grd_revbugtlist);
  274. }
  275. function fSetRowColor(pGrid)
  276. {
  277. var iCnt = 0;
  278. for(var i=0; i<pGrid.rows;i++)
  279. {
  280. if(pGrid.valueMatrix(i, pGrid.colRef("acntcd")) == "99999999")
  281. {
  282. pGrid.rowStyle(i, "all", "background-color") = "#dddddd";
  283. }
  284. else
  285. {
  286. pGrid.rowStyle(i, "all", "background-color") = "#ffffff";
  287. }
  288. }
  289. pGrid.frozenBottomRows = 1;
  290. pGrid.backColorFrozen = "#dddddd";
  291. }
  292. function fSetGridDefaultValue()
  293. {
  294. for(var i=0; i<grd_revbugtapplist.rows; i++)
  295. {
  296. if(grd_revbugtapplist.rowStatus(i) == 1)
  297. {
  298. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntyy")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntyy"));
  299. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("deptcd")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("deptcd"));
  300. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntcd"));
  301. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntnm")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntnm4"));
  302. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtcd")) = "01";
  303. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtnm")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntnm"));
  304. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtflag")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("bugtflag"));
  305. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("appamt")) = 0;
  306. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("assgym"));
  307. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("projectid")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("projectid"));
  308. }
  309. }
  310. model.refresh();
  311. }
  312. function fCheckDupData()
  313. {
  314. var iInsCnt = 0;
  315. var iDupCnt = 0;
  316. var bDel = false;
  317. for(var i=0; i<grd_revbugtapplist.rows; i++)
  318. {
  319. if(i == grd_revbugtapplist.row) continue;
  320. if((grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("assgym")) == grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym"))))
  321. {
  322. messageBox("같은 예산코드에 동일 배정 [년/월]을 지정할 수", "I004");
  323. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = "";
  324. return;
  325. }
  326. if(grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("assgym")) == "-" && grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) != "-")
  327. {
  328. messageBox("년간 배정이 있어 월간 배정을 할 수", "I004");
  329. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = "";
  330. return;
  331. }
  332. if(grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("assgym")) != "-" && grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) == "-")
  333. {
  334. messageBox("월간 배정이 있어 년간 배정을 할 수", "I004");
  335. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = "";
  336. return;
  337. }
  338. }
  339. }
  340. function fSave()
  341. {
  342. if(grd_revbugtapplist.rows == 1) return;
  343. for(var i=0; i<grd_revbugtapplist.rows; i++)
  344. {
  345. if(grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("assgym")) == "")
  346. {
  347. messageBox("배정월에 공백을 삽입할 수", "I004");
  348. return;
  349. }
  350. }
  351. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  352. {
  353. if(grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("appresn")) == "")
  354. {
  355. messageBox("산출 내역에 공백을 삽입할 수", "I004");
  356. return;
  357. }
  358. }
  359. var updtdata_bugtapplist = getGridUpdateData(grd_revbugtapplist);
  360. var updtdata_bugtdetaillist = getGridUpdateData(grd_revbugtdetaillist);
  361. if(updtdata_bugtapplist == "" && updtdata_bugtdetaillist == "")
  362. {
  363. messageBox("변경된 내역이", "I004");
  364. return;
  365. }
  366. if(grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("status")) == "1")
  367. {
  368. grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) = 1;
  369. }
  370. if(updtdata_bugtapplist != "")
  371. {
  372. vRowStatus = grd_revbugtapplist.rowStatus(grd_revbugtapplist.row);
  373. model.setValue("/root/send/revbugtapplist", grd_revbugtapplist.getUpdateData());
  374. submit("TXRBQ00301");
  375. if(vRowStatus == 4 || vRowStatus == 5 || vRowStatus == 6)
  376. {
  377. submit("TRRBQ00302");
  378. if(grd_revbugtapplist.rows > 1)
  379. {
  380. grd_revbugtapplist.row = 1;
  381. grd_revbugtapplist.dispatch("onrowchanged");
  382. }
  383. }
  384. else
  385. {
  386. grd_revbugtapplist.removeStatus(grd_revbugtapplist.row, "insert");
  387. grd_revbugtapplist.removeStatus(grd_revbugtapplist.row, "update");
  388. }
  389. }
  390. model.setValue("/root/send/revbugtdetaillist", grd_revbugtdetaillist.getUpdateData());
  391. submit("TXRBQ00302");
  392. grd_revbugtapplist.dispatch("onrowchanged");
  393. model.setValue("/root/hidden/updateflag", "N");
  394. }
  395. function fSetRevAmt()
  396. {
  397. var iSumAppAmt = 0;
  398. for(var i=1; i<grd_revbugtapplist.rows; i++)
  399. {
  400. iSumAppAmt += parseInt(grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("revapptotalamt")) == "" ? 0 : grd_revbugtapplist.valueMatrix(i, grd_revbugtapplist.colRef("revapptotalamt")));
  401. }
  402. grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("bugtappsumamt")) = iSumAppAmt;
  403. grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("revsupmappamt"))
  404. = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("bugtappsumamt")) - grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("orgbugtamt"));
  405. }
  406. function fSetRevAmtAppCancel()
  407. {
  408. // 본예산에서 변동사항이 없어도 신청할 수 있다.
  409. // var vSumAmtflag = false;
  410. //
  411. // for(var i = grd_revbugtlist.fixedRows ; i < grd_revbugtlist.rows ; i++)
  412. // {
  413. // if(grd_revbugtlist.valueMatrix(i, grd_revbugtlist.colRef("revsupmappamt")) != 0)
  414. // {
  415. // vSumAmtflag = true;
  416. // }
  417. // }
  418. //
  419. // if(vSumAmtflag == false)
  420. // {
  421. // messageBox("신청할 예산이 없습니다.", "I000");
  422. // return;
  423. // }
  424. //
  425. // if(grd_revbugtlist.rows == 1) return;
  426. if(ipt_acntyy.value.length != 4 || (ipt_deptcd.value == "" && ipt_depthngnm.value == ""))
  427. {
  428. messageBox("회계년도 또는 부서코드가", "I004");
  429. return;
  430. }
  431. var sName = document.controls(event.currentTarget).attribute("id");
  432. var iRet;
  433. var sYn;
  434. if(sName == "btn_app")
  435. {
  436. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  437. {
  438. messageBox("이미 신청된 예산", "E008");
  439. return;
  440. }
  441. iRet = messageBox("추경예산 신청 하시겠습니까", "Q999");
  442. }
  443. else if(sName == "btn_cancel")
  444. {
  445. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "N")
  446. {
  447. messageBox("신청되지 않은 예산", "E008");
  448. return;
  449. }
  450. iRet = messageBox("추경예산 신청 취소 하시겠습니까", "Q999");
  451. }
  452. if(iRet == 6)
  453. {
  454. if(sName == "btn_app")
  455. {
  456. model.setValue("/root/send/appcancelparams/flag", "revapp");
  457. sYn = "Y";
  458. }
  459. else if(sName == "btn_cancel")
  460. {
  461. model.setValue("/root/send/appcancelparams/flag", "revcancel");
  462. sYn = "N";
  463. }
  464. model.setValue("/root/send/appcancelparams/instcd", model.getValue("/root/send/retrparam/instcd"));
  465. model.setValue("/root/send/appcancelparams/acntyy", model.getValue("/root/send/retrparam/acntyy"));
  466. model.setValue("/root/send/appcancelparams/deptcd", model.getValue("/root/send/retrparam/deptcd"));
  467. model.setValue("/root/send/appcancelparams/bugtflag", model.getValue("/root/send/retrparam/bugtflag"));
  468. if(submit("TXRBQ00103"))
  469. {
  470. for(var i=1; i<grd_revbugtlist.rows; i++)
  471. {
  472. grd_revbugtlist.valueMatrix(i, grd_revbugtlist.colRef("revsupmbugtappyn")) = sYn;
  473. }
  474. }
  475. }
  476. btn_search.dispatch("DOMActivate");
  477. }
  478. function fSetDetailListOrgAmt()
  479. {
  480. var iSumAppAmt = 0;
  481. var iSumTotAmt = 0;
  482. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  483. {
  484. if(grd_revbugtdetaillist.rowStatus(i) != 4 && grd_revbugtdetaillist.rowStatus(i) != 5 && grd_revbugtdetaillist.rowStatus(i) != 6)
  485. {
  486. var sAppAmt = (grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("appamt")) == "") ? 0 : grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("appamt"));
  487. iSumAppAmt += parseInt(sAppAmt);
  488. var sTotAmt = (grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("sumamt")) == "") ? 0 : grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("sumamt"));
  489. iSumTotAmt += parseInt(sTotAmt);
  490. }
  491. }
  492. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revsupmbugtappamt")) = iSumAppAmt;
  493. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revapptotalamt")) = iSumTotAmt;
  494. if(grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 1 && grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 3)
  495. {
  496. grd_revbugtapplist.addStatus(grd_revbugtapplist.row, "update");
  497. }
  498. }
  499. //====================================
  500. // 추경예산 산출내역 변동사항을 체크한다.
  501. //====================================
  502. function fRevbugtdetaillistChangeCheck()
  503. {
  504. var ChangeCheck = true;
  505. for(var i = grd_revbugtdetaillist.fixedRows ; i < grd_revbugtdetaillist.rows ; i++)
  506. {
  507. if(grd_revbugtdetaillist.rowStatus(i) != 0)
  508. {
  509. ChangeCheck = false;
  510. break;
  511. }
  512. }
  513. return ChangeCheck;
  514. }
  515. //======================================================
  516. // 2011.07.26 CYW 출력기능추가
  517. //======================================================
  518. function fPrint()
  519. {
  520. model.removeNodeset("/root/main/acntprntlist/orgacntprntlist");
  521. if( submit("TRRBQ00306") ){
  522. exeReportPreview("RPRBQ00300", "XMLSTR");
  523. model.refresh();
  524. }
  525. }
  526. ]]>
  527. </script>
  528. </xhtml:head>
  529. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  530. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  531. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:230px; height:14px; ">추경예산 신청</caption>
  532. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  533. </group>
  534. <group id="group5" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
  535. <line id="line7" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  536. <button id="btn_excelupload" class="btn4_letter4" visibility="visible" style="left:990px; top:3px; width:80px; height:22px; ">
  537. <caption>엑셀저장</caption>
  538. <script type="javascript" ev:event="DOMActivate">
  539. <![CDATA[
  540. model.makeValue("/root/source/slipinfo/acntyy", model.getValue(ipt_acntyy.attribute("ref")));
  541. model.makeValue("/root/source/slipinfo/deptcd", model.getValue(ipt_deptcd.attribute("ref")));
  542. model.makeValue("/root/source/slipinfo/depthngnm", model.getValue(ipt_depthngnm.attribute("ref")));
  543. model.makeValue("/root/source/slipinfo/workflag", "2");
  544. modal("SMRBQ00500","","","","","/root/source", "/root/target");
  545. btn_search.dispatch("DOMActivate");
  546. ]]>
  547. </script>
  548. </button>
  549. <button id="btn_cancel" class="btn4_letter4" visibility="hidden" style="left:820px; top:3px; width:80px; height:22px; ">
  550. <caption>신청취소</caption>
  551. <script type="javascript" ev:event="DOMActivate">
  552. <![CDATA[
  553. fSetRevAmtAppCancel();
  554. ]]>
  555. </script>
  556. </button>
  557. <button id="btn_alldel" class="btn4_letter4" visibility="visible" style="left:905px; top:3px; width:80px; height:22px; ">
  558. <caption>전체삭제</caption>
  559. <script type="javascript" ev:event="DOMActivate">
  560. <![CDATA[
  561. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  562. {
  563. messageBox("이미 신청된 예산", "E008");
  564. return;
  565. }
  566. if (messageBox("추경 [" + rdo_bugtflag.label + "] 전체 내역을", "Q001") == "6")
  567. {
  568. submit("TXRBQ00303");
  569. btn_search.dispatch("DOMActivate");
  570. }
  571. ]]>
  572. </script>
  573. </button>
  574. <button id="btn_save" class="btn4_letter2" disabled="true" style="left:1075px; top:3px; width:56px; height:22px; ">
  575. <caption>저장</caption>
  576. <script type="javascript" ev:event="DOMActivate">
  577. <![CDATA[
  578. fSave();
  579. misfSetReadOnlyCol(grd_revbugtapplist, "acntcd,acntnm,assgym", true);
  580. fSetRevAmt()
  581. if(model.getValue("/root/hidden/bugtaddflag") == "Y")
  582. {
  583. btn_search.dispatch("DOMActivate");
  584. model.setValue("/root/hidden/bugtaddflag", "N");
  585. }
  586. ]]>
  587. </script>
  588. </button>
  589. <button id="btn_app" class="btn4_letter2" disabled="true" style="left:1135px; top:3px; width:56px; height:22px; ">
  590. <caption>신청</caption>
  591. <script type="javascript" ev:event="DOMActivate">
  592. <![CDATA[
  593. fSetRevAmtAppCancel();
  594. ]]>
  595. </script>
  596. </button>
  597. </group>
  598. <group id="group2" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  599. <group id="group4" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
  600. <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  601. <caption id="caption7" class="search_name" style="left:16px; top:9px; width:86px; height:17px; ">예산년도 :</caption>
  602. <caption id="caption8" class="search_name" style="left:286px; top:9px; width:107px; height:17px; ">부서 :</caption>
  603. <line id="line4" class="line_4" style="x1:1107px; y1:8px; x2:1107px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  604. <input id="ipt_depthngnm" ref="/root/send/retrparam/depthngnm" class="input_s_essential" navindex="3" imemode="hangul" style="left:455px; top:8px; width:150px; height:19px; ">
  605. <script type="javascript" ev:event="onkeypress">
  606. <![CDATA[
  607. if(event.keyCode == 13)
  608. {
  609. racfDeptValidCheck("deptcd,depthngnm", "name");
  610. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  611. {
  612. btn_search.dispatch("DOMActivate");
  613. }
  614. }
  615. ]]>
  616. </script>
  617. <script type="javascript" ev:event="xforms-value-changed">
  618. <![CDATA[
  619. racfDeptValidCheck("deptcd,depthngnm", "name");
  620. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  621. {
  622. btn_search.dispatch("DOMActivate");
  623. }
  624. ]]>
  625. </script>
  626. </input>
  627. <button id="btn_depthelp" class="icon_search" style="left:434px; top:8px; width:16px; height:16px; ">
  628. <caption/>
  629. <script type="javascript" ev:event="DOMActivate">
  630. <![CDATA[
  631. fOpenPopupDeptHelp(ipt_deptcd, "deptcd,depthngnm");
  632. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  633. {
  634. btn_search.dispatch("DOMActivate");
  635. }
  636. ]]>
  637. </script>
  638. </button>
  639. <input id="ipt_deptcd" ref="/root/send/retrparam/deptcd" class="input_s_essential" navindex="2" maxlength="10" style="left:350px; top:8px; width:80px; height:19px; ">
  640. <script type="javascript" ev:event="onkeypress">
  641. <![CDATA[
  642. if(event.keyCode == 13)
  643. {
  644. racfDeptValidCheck("deptcd,depthngnm", "code");
  645. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  646. {
  647. btn_search.dispatch("DOMActivate");
  648. }
  649. }
  650. ]]>
  651. </script>
  652. <script type="javascript" ev:event="xforms-value-changed">
  653. <![CDATA[
  654. racfDeptValidCheck("deptcd,depthngnm", "code");
  655. if(ipt_deptcd.value != "" &&ipt_depthngnm.value != "")
  656. {
  657. btn_search.dispatch("DOMActivate");
  658. }
  659. ]]>
  660. </script>
  661. </input>
  662. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1124px; top:7px; width:56px; height:22px; text-align:left; ">
  663. <caption>조회</caption>
  664. <script type="javascript" ev:event="DOMActivate">
  665. <![CDATA[
  666. if(ipt_deptcd.value == "")
  667. {
  668. messageBox("부서를 선택하세요", "I000");
  669. return;
  670. }
  671. if(ipt_deptcd.value == "")
  672. {
  673. messageBox("예산년도를 입력하세요", "I000");
  674. return;
  675. }
  676. fRetrieve();
  677. ]]>
  678. </script>
  679. </button>
  680. <caption id="caption5" class="search_name" style="left:655px; top:9px; width:87px; height:17px; ">예산구분 :</caption>
  681. <select1 id="rdo_bugtflag" ref="/root/send/retrparam/bugtflag" navindex="27" appearance="full" cellspacing="20" cols="4" overflow="visible" style="left:744px; top:9px; width:301px; height:20px; border-style:none; ">
  682. <choices>
  683. <item>
  684. <label>수입</label>
  685. <value>1</value>
  686. </item>
  687. <item>
  688. <label>비용</label>
  689. <value>2</value>
  690. </item>
  691. <item>
  692. <label>구매</label>
  693. <value>3</value>
  694. </item>
  695. <item>
  696. <label>자본</label>
  697. <value>4</value>
  698. </item>
  699. </choices>
  700. <script type="javascript" ev:event="xforms-value-changed">
  701. <![CDATA[
  702. btn_search.dispatch("DOMActivate");
  703. ]]>
  704. </script>
  705. </select1>
  706. <button id="button5" class="icon_next" navindex="-1" style="left:195px; top:9px; width:13px; height:15px; ">
  707. <caption/>
  708. <script type="javascript" ev:event="DOMActivate">
  709. <![CDATA[
  710. var vYYYY = model.getValue(ipt_acntyy.attribute("ref"));
  711. var vNum = parseInt(vYYYY, 10);
  712. if (vNum != 1)
  713. {
  714. vNum++;
  715. }
  716. else
  717. {
  718. return;
  719. }
  720. model.setValue(ipt_acntyy.attribute("ref"), vNum);
  721. ipt_acntyy.refresh();
  722. fRetrieve();
  723. ]]>
  724. </script>
  725. </button>
  726. <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; ">
  727. <script type="javascript" ev:event="xforms-value-changed">
  728. <![CDATA[
  729. fRetrieve();
  730. ]]>
  731. </script>
  732. </input>
  733. <button id="btn_pre" class="icon_pre" navindex="-1" style="left:110px; top:9px; width:13px; height:15px; ">
  734. <caption/>
  735. <script type="javascript" ev:event="DOMActivate">
  736. <![CDATA[
  737. var vYYYY = model.getValue(ipt_acntyy.attribute("ref"));
  738. var vNum = parseInt(vYYYY, 10);
  739. if (vNum != 1)
  740. {
  741. vNum--;
  742. }
  743. else
  744. {
  745. return;
  746. }
  747. model.setValue(ipt_acntyy.attribute("ref"), vNum);
  748. ipt_acntyy.refresh();
  749. fRetrieve();
  750. ]]>
  751. </script>
  752. </button>
  753. </group>
  754. <caption id="caption10" class="tit_2" style="left:5px; top:414px; width:126px; height:13px; ">추경예산 신청현황</caption>
  755. <datagrid id="grd_revbugtapplist" nodeset="/root/main/bugtlist/revbugtapplist" caption="기관코드^회계년도^부서코드^항 계정코드^항^목 계정코드^목^계정과목^계정명^예산구분^배정월^본예산액 (A)^추경신청액^증감액^적요^계산근거^삭제가능여부^UID상태" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 0, 90, 190, 0, 55, 100, 100, 0, 0, 0, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:434px; width:585px; height:304px; ">
  756. <col ref="instcd" visibility="hidden"/>
  757. <col ref="acntyy" visibility="hidden"/>
  758. <col ref="deptcd" visibility="hidden"/>
  759. <col ref="supacntcd3" visibility="hidden"/>
  760. <col ref="supacntnm3" visibility="hidden"/>
  761. <col ref="supacntcd4" visibility="hidden"/>
  762. <col ref="supacntnm4" visibility="hidden"/>
  763. <col editable="false" ref="acntcd" type="inputbutton"/>
  764. <col ref="acntnm"/>
  765. <col ref="bugtflag" type="combo" style="text-align:center; ">
  766. <choices>
  767. <item>
  768. <label>수입</label>
  769. <value>1</value>
  770. </item>
  771. <item>
  772. <label>비용</label>
  773. <value>2</value>
  774. </item>
  775. <item>
  776. <label>구매</label>
  777. <value>3</value>
  778. </item>
  779. <item>
  780. <label>자본</label>
  781. <value>4</value>
  782. </item>
  783. </choices>
  784. </col>
  785. <col ref="assgym" type="combo" style="text-align:center; ">
  786. <choices>
  787. <itemset nodeset="/root/contextmenu/assgym/item">
  788. <label ref="label"/>
  789. <value ref="value"/>
  790. </itemset>
  791. </choices>
  792. </col>
  793. <col ref="orgbugtamt" format="(-)#,###" style="text-align:right; "/>
  794. <col ref="revapptotalamt" format="(-)#,###" style="text-align:right; "/>
  795. <col ref="revsupmbugtappamt" format="(-)#,###" style="text-align:right; "/>
  796. <col ref="mainrec" type="input" visibility="hidden"/>
  797. <col ref="calcbase" type="input" visibility="hidden"/>
  798. <col ref="delflag" type="input"/>
  799. <col ref="status" type="input"/>
  800. <script type="javascript" ev:event="onbuttonclick">
  801. <![CDATA[
  802. if(grd_revbugtapplist.col == grd_revbugtapplist.colRef("acntcd"))
  803. {
  804. misfOpenPopUpList("10", grd_revbugtapplist, "", "supacntcd3,supacntnm3,supacntcd4,supacntnm4,acntcd,acntnm", rdo_bugtflag.value, "bugtflag");
  805. model.refresh();
  806. }
  807. ]]>
  808. </script>
  809. <script type="javascript" ev:event="xforms-value-changed">
  810. <![CDATA[
  811. if(grd_revbugtapplist.col == grd_revbugtapplist.colRef("acntcd"))
  812. {
  813. var Vacntcd = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd"));
  814. for(var i = grd_revbugtdetaillist.fixedRows ; i < grd_revbugtdetaillist.rows ; i++)
  815. {
  816. grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("acntcd")) = Vacntcd;
  817. grd_revbugtdetaillist.addStatus(i, "update");
  818. }
  819. }
  820. else if(grd_revbugtapplist.col == grd_revbugtapplist.colRef("assgym"))
  821. {
  822. fCheckDupData();
  823. var Vassgym = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym"));
  824. for(var i = grd_revbugtdetaillist.fixedRows ; i < grd_revbugtdetaillist.rows ; i++)
  825. {
  826. grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("assgym")) = Vassgym;
  827. grd_revbugtdetaillist.addStatus(i, "update");
  828. }
  829. }
  830. ]]>
  831. </script>
  832. <script type="javascript" ev:event="onclick">
  833. <![CDATA[
  834. if(grd_revbugtapplist.row == 0)
  835. {
  836. grd_revbugtlist.dispatch("onrowchanged");
  837. }
  838. ]]>
  839. </script>
  840. <script type="javascript" ev:event="onrowchanged">
  841. <![CDATA[
  842. if(model.getValue("/root/hidden/updateflag") == "Y")
  843. {
  844. grd_revbugtlist.dispatch("onrowchanged");
  845. return;
  846. }
  847. model.removeNodeset("/root/main/orgbgdtlist/orgbugtdetaillist");
  848. model.setValue("/root/send/retrparam3/instcd", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("instcd")) );
  849. model.setValue("/root/send/retrparam3/acntyy", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntyy")) );
  850. model.setValue("/root/send/retrparam3/deptcd", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("deptcd")) );
  851. model.setValue("/root/send/retrparam3/acntcd", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd")) );
  852. model.setValue("/root/send/retrparam3/assgym", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) );
  853. model.setValue("/root/send/retrparam3/bugtflag", grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtflag")) );
  854. submit("TRRBQ00303");
  855. if(grd_revbugtlist.valueMatrix(grd_revbugtlist.fixedRows, grd_revbugtlist.colRef("orgbugtappyn")) == "Y")
  856. {
  857. // misfSetReadOnlyCol(grd_revbugtdetaillist, "appresn,appbase,sumamt", true);
  858. }
  859. else
  860. {
  861. //cyw misfSetReadOnlyCol(grd_revbugtdetaillist, "appresn", true);
  862. }
  863. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  864. {
  865. if(grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("status")) == "1")
  866. {
  867. grd_revbugtdetaillist.rowStatus(i) = 1;
  868. }
  869. else if(grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("status")) == "0")
  870. {
  871. grd_revbugtdetaillist.rowStatus(i) = 0;
  872. }
  873. }
  874. grd_revbugtapplist.dispatch("onmouseup");
  875. ]]>
  876. </script>
  877. </datagrid>
  878. <line id="line9" class="line_1" style="x1:0px; y1:70; x2:1194px; y2:70; "/>
  879. <caption id="caption11" class="tit_2" style="left:5px; top:55px; width:117px; height:14px; ">추경예산 신청</caption>
  880. <line id="line10" class="line_1" style="x1:0px; y1:431px; x2:1195px; y2:430px; "/>
  881. <datagrid id="grd_revbugtlist" nodeset="/root/main/acntlist/revacntlist" caption="기관코드^회계년도^부서코드^예산구분^관^항^목^계정과목^계정^본예산 (A)^실적 (B)^집행율 (B/A)^추경후예산액 (C)^추경예산^추경조정^증감액(신청-조정)^증감액(C-A)^가용액^추산액^조정예산^이월조정예산^계정대체^예산신청여부" colsep="^" colwidth="0, 0, 0, 0, 120, 120, 150, 0, 230, 105, 105, 105, 105, 0, 0, 0, 105, 0, 0, 105, 105, 105, 0" mergecells="byrestriccol" rowheader="seq" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:75px; width:1195px; height:322px; ">
  882. <col ref="instcd" visibility="hidden"/>
  883. <col ref="acntyy" visibility="hidden"/>
  884. <col ref="deptcd" visibility="hidden"/>
  885. <col ref="bugtflag" visibility="hidden"/>
  886. <col ref="supacntnm2"/>
  887. <col ref="supacntnm3"/>
  888. <col ref="supacntnm4"/>
  889. <col ref="acntcd" visibility="hidden"/>
  890. <col ref="acntnm"/>
  891. <col ref="orgbugtamt" format="(-)#,###" style="text-align:right; "/>
  892. <col ref="bugtexecamt" format="(-)#,###" style="text-align:right; "/>
  893. <col ref="exerate" format="#.#%" style="left:599px; top:23px; width:110px; height:23px; text-align:right; "/>
  894. <col ref="bugtappsumamt" format="(-)#,###" style="text-align:right; "/>
  895. <col ref="bugtsumamt" format="(-)#,###" style="text-align:right; "/>
  896. <col ref="revsupmadjtamt" format="(-)#,###" style="text-align:right; "/>
  897. <col ref="bugtupdownamt" format="(-)#,###" style="text-align:right; "/>
  898. <col ref="revsupmappamt" format="(-)#,###" style="text-align:right; "/>
  899. <col ref="availableamt" format="(-)#,###" style="text-align:right; "/>
  900. <col ref="bugtexpcamt" format="(-)#,###" style="text-align:right; "/>
  901. <col ref="cntramt" format="(-)#,###" style="text-align:right; "/>
  902. <col ref="transamt" format="(-)#,###" style="text-align:right; "/>
  903. <col ref="interchangeamt" format="(-)#,###" style="text-align:right; "/>
  904. <col ref="revsupmbugtappyn" visibility="hidden"/>
  905. <script type="javascript" ev:event="onrowchanged">
  906. <![CDATA[
  907. model.removeNodeset(grd_revbugtapplist.nodeset);
  908. model.removeNodeset(grd_revbugtdetaillist.nodeset);
  909. model.setValue("/root/send/retrparam2/instcd", grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("instcd")) );
  910. model.setValue("/root/send/retrparam2/acntyy", grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntyy")) );
  911. model.setValue("/root/send/retrparam2/deptcd", grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("deptcd")) );
  912. model.setValue("/root/send/retrparam2/acntcd", grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntcd")) );
  913. model.setValue("/root/send/retrparam2/bugtflag", grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("bugtflag")) );
  914. submit("TRRBQ00302");
  915. model.setValue("/root/hidden/updateflag", "N");
  916. misfSetReadOnlyCol(grd_revbugtapplist, "acntcd,acntnm,assgym", true);
  917. if(grd_revbugtapplist.rows > 1)
  918. {
  919. grd_revbugtapplist.row = 1;
  920. grd_revbugtapplist.dispatch("onrowchanged");
  921. }
  922. if(DeptAcnt == "Y")
  923. {
  924. var vDeptAcnt = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("deptacnt"));
  925. if(vDeptAcnt == "Y")
  926. {
  927. btn_addrow.disabled = false;
  928. }
  929. else
  930. {
  931. btn_addrow.disabled = true;
  932. }
  933. }
  934. grd_revbugtlist.dispatch("onmouseup");
  935. ]]>
  936. </script>
  937. </datagrid>
  938. <button id="btn_excel" class="btn2_letter4" style="left:1080px; top:49px; width:64px; height:19px; ">
  939. <caption>엑셀저장</caption>
  940. <script type="javascript" ev:event="DOMActivate">
  941. <![CDATA[
  942. misfSaveExcel(grd_revbugtlist);
  943. ]]>
  944. </script>
  945. </button>
  946. <button id="btn_delrow" class="btn2_letter3" style="left:530px; top:409px; width:53px; height:19px; ">
  947. <caption>행삭제</caption>
  948. <script type="javascript" ev:event="DOMActivate">
  949. <![CDATA[
  950. if(grd_revbugtapplist.valueMatrix(1, grd_revbugtapplist.colRef("delflag")) == "N")
  951. {
  952. messageBox("본예산 신청내역은 삭제 할 수", "I004");
  953. return;
  954. }
  955. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  956. {
  957. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  958. return;
  959. }
  960. for(var i = 1 ; i < grd_revbugtapplist.rows ; i++)
  961. {
  962. grd_revbugtapplist.select(i, grd_revbugtapplist.colRef("acntcd"), i, grd_revbugtapplist.colRef("mainrec")) = false;
  963. }
  964. var iRowStatus = grd_revbugtapplist.rowStatus(grd_revbugtapplist.row);
  965. if (iRowStatus == 4 || iRowStatus == 5 || iRowStatus == 6) //delete
  966. {
  967. grd_revbugtapplist.removeStatus(grd_revbugtapplist.row, "delete");
  968. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  969. {
  970. grd_revbugtdetaillist.removeStatus(i, "delete");
  971. }
  972. }
  973. else if(iRowStatus == 1 || iRowStatus == 3) //insert
  974. {
  975. grd_revbugtapplist.deleteRow(grd_revbugtapplist.row, false);
  976. grd_revbugtlist.dispatch("onrowchanged");
  977. }
  978. else if(iRowStatus == 0 || iRowStatus == 2) //update
  979. {
  980. grd_revbugtapplist.addStatus(grd_revbugtapplist.row,"delete");
  981. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  982. {
  983. grd_revbugtdetaillist.addStatus(i, "delete");
  984. }
  985. }
  986. fSetRevAmt();
  987. ]]>
  988. </script>
  989. </button>
  990. <button id="btn_addrow" class="btn2_letter3" style="left:475px; top:409px; width:53px; height:19px; ">
  991. <caption>행추가</caption>
  992. <script type="javascript" ev:event="DOMActivate">
  993. <![CDATA[
  994. if(model.getValue("/root/hidden/updateflag") == "Y")
  995. {
  996. grd_revbugtlist.dispatch("onrowchanged");
  997. }
  998. if(grd_revbugtlist.row >= grd_revbugtlist.fixedRows)
  999. {
  1000. if(grd_revbugtapplist.rows == grd_revbugtapplist.fixedRows + 1)
  1001. {
  1002. if(grd_revbugtapplist.valueMatrix(grd_revbugtapplist.fixedRows, grd_revbugtapplist.colRef("assgym")) == "-")
  1003. {
  1004. messageBox("년간 배정이 있어 추가 배정이 불가능 합니다.", "I000");
  1005. return false;
  1006. }
  1007. }
  1008. if(grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntcd")) == "99999999") return;
  1009. if(grd_revbugtlist.valueMatrix(grd_revbugtlist.fixedRows, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  1010. {
  1011. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1012. return;
  1013. }
  1014. model.removeNodeset(grd_revbugtdetaillist.nodeset);
  1015. misfGridIUD(grd_revbugtapplist, "A");
  1016. misfSetReadOnlyCol(grd_revbugtapplist, "acntcd,acntnm,assgym", false, grd_revbugtapplist.row);
  1017. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("instcd")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("instcd"));
  1018. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntyy")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntyy"));
  1019. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("deptcd")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("deptcd"));
  1020. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntcd"));
  1021. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntnm")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntnm"));
  1022. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtflag")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("bugtflag"));
  1023. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("mainrec")) = grd_revbugtlist.valueMatrix(grd_revbugtlist.row, grd_revbugtlist.colRef("acntnm"));
  1024. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("orgbugtamt")) = 0;
  1025. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revapptotalamt")) = 0;
  1026. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revsupmbugtappamt")) = 0;
  1027. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("status")) = 1;
  1028. model.setValue("/root/hidden/updateflag", "Y");
  1029. if(grd_revbugtapplist.rows == grd_revbugtapplist.fixedRows + 1) grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = "-";
  1030. model.refresh();
  1031. }
  1032. ]]>
  1033. </script>
  1034. </button>
  1035. <datagrid id="grd_revbugtdetaillist" nodeset="/root/main/revbgdtlist/revbugtdetaillist" autoresize="false" caption="기관코드^회계년도^부서코드^계정코드^예산구분^배정월^산출내역^본예산액^추경근거^본추경차액(입력값)^추경신청액^삭제가능여부^입력상태" colsep="^" colwidth="0, 0, 0, 0, 0, 0, 180, 100, 170, 0, 100, 0, 0" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:589px; top:434px; width:605px; height:304px; ">
  1036. <col ref="instcd" visibility="hidden"/>
  1037. <col ref="acntyy" visibility="hidden"/>
  1038. <col ref="deptcd" visibility="hidden"/>
  1039. <col ref="acntcd" visibility="hidden"/>
  1040. <col ref="bugtflag" visibility="hidden" style="text-align:center; "/>
  1041. <col ref="assgym" visibility="hidden" style="text-align:center; "/>
  1042. <col ref="appresn" type="input"/>
  1043. <col ref="orgappamt" format="(-)#,###" style="text-align:right; "/>
  1044. <col ref="appbase" type="input" style="text-align:left; "/>
  1045. <col ref="appamt" format="(-)#,###" style="text-align:right; "/>
  1046. <col ref="sumamt" type="input" format="(-)#,###" style="text-align:right; "/>
  1047. <col ref="delflag"/>
  1048. <col ref="status"/>
  1049. <script type="javascript" ev:event="onendedit">
  1050. <![CDATA[
  1051. var vCol = grd_revbugtdetaillist.col;
  1052. var vRow = grd_revbugtdetaillist.row;
  1053. var iInsCnt = 0;
  1054. var iDupCnt = 0;
  1055. var bDel = false;
  1056. if(vCol == grd_revbugtdetaillist.colRef("appresn"))
  1057. {
  1058. for(var i=0; i<grd_revbugtdetaillist.rows; i++)
  1059. {
  1060. if(i == grd_revbugtdetaillist.row) continue;
  1061. if(grd_revbugtdetaillist.valueMatrix(i, grd_revbugtdetaillist.colRef("appresn")) == grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("appresn")))
  1062. {
  1063. messageBox("신청 내역이 있습니다. 신청 내역을 수정하세요.", "I999");
  1064. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("appresn")) = "";
  1065. return false;
  1066. }
  1067. }
  1068. }
  1069. if(vCol == grd_revbugtdetaillist.colRef("sumamt"))
  1070. {
  1071. if(grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("sumamt")) == ""){grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("sumamt")) = "0"};
  1072. grd_revbugtdetaillist.valueMatrix(vRow, grd_revbugtdetaillist.colRef("appamt")) =
  1073. parseInt(grd_revbugtdetaillist.valueMatrix(vRow, grd_revbugtdetaillist.colRef("sumamt"))) - parseInt(grd_revbugtdetaillist.valueMatrix(vRow, grd_revbugtdetaillist.colRef("orgappamt")));
  1074. fSetDetailListOrgAmt();
  1075. model.setValue("/root/hidden/updateflag", "Y");
  1076. }
  1077. model.refresh();
  1078. ]]>
  1079. </script>
  1080. </datagrid>
  1081. <button id="btn_detaildelrow" class="btn2_letter3" style="left:1140px; top:409px; width:53px; height:19px; ">
  1082. <caption>행삭제</caption>
  1083. <script type="javascript" ev:event="DOMActivate">
  1084. <![CDATA[
  1085. if(grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("delflag")) == "N")
  1086. {
  1087. messageBox("본예산 신청내역은 삭제 할 수", "I004");
  1088. return;
  1089. }
  1090. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  1091. {
  1092. messageBox("신청된 예산이므로 삭제 할 수", "I004");
  1093. return;
  1094. }
  1095. var iRowStatus = grd_revbugtdetaillist.rowStatus(grd_revbugtdetaillist.row);
  1096. if (iRowStatus == 4 || iRowStatus == 5 || iRowStatus == 6) //delete
  1097. {
  1098. grd_revbugtdetaillist.removeStatus(grd_revbugtdetaillist.row, "delete");
  1099. }
  1100. else if(iRowStatus == 1 || iRowStatus == 3) //insert
  1101. {
  1102. grd_revbugtdetaillist.deleteRow(grd_revbugtdetaillist.row, false);
  1103. }
  1104. else if(iRowStatus == 0 || iRowStatus == 2) //update
  1105. {
  1106. grd_revbugtdetaillist.addStatus(grd_revbugtdetaillist.row, "delete");
  1107. }
  1108. fSetDetailListOrgAmt();
  1109. var iCnt = 0;
  1110. for(var i=1; i<grd_revbugtdetaillist.rows; i++)
  1111. {
  1112. if(grd_revbugtdetaillist.rowStatus(i) == 4 || grd_revbugtdetaillist.rowStatus(i) == 5 || grd_revbugtdetaillist.rowStatus(i) == 6)
  1113. {
  1114. iCnt ++ ;
  1115. }
  1116. }
  1117. if(grd_revbugtdetaillist.rows - grd_revbugtdetaillist.fixedRows == iCnt)
  1118. {
  1119. if(grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 1 && grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 3)
  1120. {
  1121. grd_revbugtapplist.addStatus(grd_revbugtapplist.row, "delete");
  1122. }
  1123. else
  1124. {
  1125. grd_revbugtapplist.deleteRow(grd_revbugtapplist.row, false);
  1126. }
  1127. }
  1128. else
  1129. {
  1130. if(grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 1 && grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) != 3)
  1131. {
  1132. grd_revbugtapplist.rowStatus(grd_revbugtapplist.row) = 2;
  1133. }
  1134. }
  1135. model.refresh();
  1136. ]]>
  1137. </script>
  1138. </button>
  1139. <caption id="caption1" class="tit_2" style="left:593px; top:414px; width:126px; height:13px; ">추경예산 산출내역</caption>
  1140. <button id="btn_detailaddrow" class="btn2_letter3" style="left:1085px; top:409px; width:53px; height:19px; ">
  1141. <caption>행추가</caption>
  1142. <script type="javascript" ev:event="DOMActivate">
  1143. <![CDATA[
  1144. if(grd_revbugtapplist.rows > 1 && grd_revbugtapplist.row > 0)
  1145. {
  1146. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  1147. {
  1148. messageBox("신청된 예산이므로 추가 할 수", "I004");
  1149. return;
  1150. }
  1151. if(grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd")) == "")
  1152. {
  1153. messageBox("본예산 신청할 계정을 선택하세요", "I999");
  1154. return;
  1155. }
  1156. misfGridIUD(grd_revbugtdetaillist, "A");
  1157. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("instcd")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("instcd"));
  1158. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("acntyy")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntyy"));
  1159. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("deptcd")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("deptcd"));
  1160. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("acntcd")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd"));
  1161. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("bugtflag")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtflag"));
  1162. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("assgym")) = grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym"));
  1163. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("appamt")) = 0;
  1164. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("sumamt")) = 0;
  1165. grd_revbugtdetaillist.valueMatrix(grd_revbugtdetaillist.row, grd_revbugtdetaillist.colRef("orgappamt")) = 0;
  1166. grd_revbugtdetaillist.row = grd_revbugtdetaillist.rows - 1;
  1167. grd_revbugtdetaillist.col = grd_revbugtdetaillist.colRef("appresn");
  1168. grd_revbugtdetaillist.editCell();
  1169. }
  1170. ]]>
  1171. </script>
  1172. </button>
  1173. <button id="btn_acntaddrow" class="btn2_letter4" style="left:403px; top:409px; width:64px; height:19px; ">
  1174. <caption>항목추가</caption>
  1175. <script type="javascript" ev:event="DOMActivate">
  1176. <![CDATA[
  1177. if(grd_revbugtlist.valueMatrix(1, grd_revbugtlist.colRef("revsupmbugtappyn")) == "Y")
  1178. {
  1179. messageBox("신청된 예산이므로 추가 또는 삭제를 할 수", "I004");
  1180. return;
  1181. }
  1182. model.removeNodeset(grd_revbugtapplist.nodeset);
  1183. model.removeNodeset(grd_revbugtdetaillist.nodeset);
  1184. model.refresh();
  1185. misfGridIUD(grd_revbugtapplist, "A");
  1186. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("instcd")) = model.getValue("/root/send/retrparam/instcd");
  1187. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntyy")) = model.getValue("/root/send/retrparam/acntyy");
  1188. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("deptcd")) = model.getValue("/root/send/retrparam/deptcd");
  1189. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntcd")) = "";
  1190. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("acntnm")) = "";
  1191. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("bugtflag")) = model.getValue("/root/send/retrparam/bugtflag");
  1192. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("assgym")) = "-";
  1193. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("orgbugtamt")) = 0;
  1194. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revapptotalamt")) = 0;
  1195. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("revsupmbugtappamt")) = 0;
  1196. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("mainrec")) = "";
  1197. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("calcbase")) = "";
  1198. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("delflag")) = "Y";
  1199. grd_revbugtapplist.valueMatrix(grd_revbugtapplist.row, grd_revbugtapplist.colRef("status")) = "1";
  1200. grd_revbugtapplist.col = grd_revbugtapplist.colRef("acntcd");
  1201. grd_revbugtapplist.dispatch("onbuttonclick");
  1202. model.setValue("/root/hidden/bugtaddflag", "Y");
  1203. ]]>
  1204. </script>
  1205. </button>
  1206. <line id="line1" class="line_1" style="x1:586px; y1:430px; x2:586px; y2:735px; "/>
  1207. <button id="button1" class="btn2_letter2" style="left:1147px; top:49px; width:42px; height:19px; ">
  1208. <caption>출력</caption>
  1209. <script type="javascript" ev:event="DOMActivate">
  1210. <![CDATA[
  1211. //2011.08.22 cyw
  1212. fPrint();
  1213. ]]>
  1214. </script>
  1215. </button>
  1216. </group>
  1217. </xhtml:body>
  1218. </xhtml:html>