SMRAS12000_자산거래처관리원장.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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. <condition>
  11. <notecd/>
  12. <notecdnm/>
  13. <frdt/>
  14. <todt/>
  15. <instcd/>
  16. <mngitem/>
  17. </condition>
  18. <list>
  19. <itemlist/>
  20. <detailist/>
  21. </list>
  22. </main>
  23. <send>
  24. </send>
  25. <init>
  26. <preamt/>
  27. <dramt/>
  28. <cramt/>
  29. <balanceamt/>
  30. </init>
  31. <temp/>
  32. <source>
  33. <slipinfo>
  34. <slipdt/>
  35. <slipno/>
  36. </slipinfo>
  37. </source>
  38. </root>
  39. </instance>
  40. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  41. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  42. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  43. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  44. <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
  45. <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
  46. <script type="javascript" ev:event="xforms-ready">
  47. <![CDATA[
  48. fOpenForm();
  49. //sCdGrupid = model.getValue("/root/init/comcode/cdgrupid");
  50. ]]>
  51. </script>
  52. <script type="javascript">
  53. <![CDATA[
  54. //========================================================================================
  55. //화면 로드시 초기화 함수
  56. //========================================================================================
  57. function fOpenForm() {
  58. model.removenode("/root/main/notelist");
  59. var sToday = getCurrentDate().toString();
  60. var sFrday = sToday.substring(0,4) + "0101";
  61. model.setValue("/root/main/condition/todt",sToday);
  62. model.setValue("/root/main/condition/frdt",sFrday);
  63. var instcd = getUserInfo("dutplceinstcd");
  64. model.setValue("/root/main/condition/instcd",instcd);
  65. model.refresh();
  66. }
  67. //========================================================================================
  68. //기재사항코드 조회
  69. //========================================================================================
  70. function fGetNoteList() {
  71. model.resetInstanceNode("/root/main/list/itemlist");
  72. model.removenode("/root/main/list/itemlist");//조회시 기존 데이터 삭제
  73. model.copyNode("/root/send", "/root/main/condition");
  74. model.refresh();
  75. submit("TRRAS00210");
  76. }
  77. //========================================================================================
  78. //기재사항코드 조회
  79. //========================================================================================
  80. function fGetNoteDetlList() {
  81. model.resetInstanceNode("/root/main/list/detailist");
  82. model.removenode("/root/main/list/detailist");//조회시 기존 데이터 삭제
  83. model.copyNode("/root/send", "/root/main/condition");
  84. model.refresh();
  85. submit("TRRAS00230");
  86. }
  87. //========================================================================================
  88. //기재사항코드 조회
  89. //========================================================================================
  90. function fGetNoteSumList() {
  91. var idx = ipt_detailist.rows;
  92. var janak = 0;
  93. var sum = 0;
  94. var sum1 = 0;
  95. var sum2 = 0;
  96. for (var i = 1; i < idx; i++){
  97. sum = sum + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/dramt"));
  98. sum1 = sum1 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/cramt"));
  99. sum2 = sum2 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/janak"));
  100. }
  101. model.setValue("/root/init/dramt", sum);
  102. model.setValue("/root/init/cramt", sum1);
  103. model.setValue("/root/init/balanceamt", sum2);
  104. model.refresh();
  105. }
  106. //========================================================================================
  107. //관리항목 상세정보 조회(그리드용)
  108. //========================================================================================
  109. function fGetMngItemInfo(pRow)
  110. {
  111. if ( pRow > 0 )
  112. {
  113. model.resetInstanceNode("/root/send");
  114. var strItem ;
  115. strItem = grd_notelist.valueMatrix(grd_notelist.row, grd_notelist.colRef("mngitem"));
  116. model.setValue("/root/main/condition/mngitem",strItem);
  117. model.resetInstanceNode("/root/main/list/detailist");
  118. model.removenode("/root/main/list/detailist");//조회시 기존 데이터 삭제
  119. model.copyNode("/root/send", "/root/main/condition");
  120. model.refresh();
  121. submit("TRRAS00220");
  122. fSetRowColor(ipt_detailist);
  123. fGetMoneySum();
  124. model.refresh();
  125. //fCopyInstance();
  126. }
  127. }
  128. //========================================================================================
  129. //차변, 대변, 잔액 구하기
  130. //========================================================================================
  131. function fGetMoneySum(){
  132. var idx = ipt_detailist.rows;
  133. var sum = 0;
  134. var sum1 = 0;
  135. var sum2 = 0;
  136. for (var i = 1; i < idx; i++){
  137. var j = 1;
  138. var gubn = model.getValue("/root/main/list/detailist["+ i +"]/gubn");
  139. if (gubn == "0"){
  140. sum = sum + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/dramt"));
  141. sum1 = sum1 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/cramt"));
  142. sum2 = sum - sum1
  143. }
  144. }
  145. model.setValue("/root/init/dramt", sum);
  146. model.setValue("/root/init/cramt", sum1);
  147. model.setValue("/root/init/balanceamt", sum2);
  148. model.refresh();
  149. }
  150. //========================================================================================
  151. //그리드 로우 색 바꾸기
  152. //========================================================================================
  153. function fSetRowColor(pGrid)
  154. {
  155. var iCnt = 0;
  156. for(var i=0; i<pGrid.rows;i++)
  157. {
  158. if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "1")
  159. {
  160. pGrid.rowStyle(i, "all", "background-color") = "#ccffff";
  161. }
  162. else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "2")
  163. {
  164. pGrid.rowStyle(i, "all", "background-color") = "#ffffff";
  165. }
  166. else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "3")
  167. {
  168. pGrid.rowStyle(i, "all", "background-color") = "#ffccff";
  169. }
  170. else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "4")
  171. {
  172. pGrid.rowStyle(i, "all", "background-color") = "#ffffcc";
  173. }
  174. }
  175. //pGrid.frozenRows = 1;
  176. // pGrid.frozenBottomRows = 1;
  177. // pGrid.backColorFrozen = "#dddddd";
  178. }
  179. //========================================================================================
  180. //엑셀입력(excel file을 그리드에 입력)
  181. //========================================================================================
  182. function fInputExcel(pGrid) {
  183. var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  184. if(fileName != "") {
  185. pGrid.loadExcel(fileName, 1, true);
  186. pGrid.deleteRow(1);
  187. for(i = 1; i < pGrid.rows; i++) {
  188. pGrid.rowStatus(i) = 1;
  189. }
  190. pGrid.refresh();
  191. }
  192. }
  193. ]]>
  194. </script>
  195. <submission id="TRRAS00210" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/itemlist"/>
  196. <submission id="TRRAS00220" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/detailist"/>
  197. <submission id="TRRAS00230" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/detailist"/>
  198. </model>
  199. </xhtml:head>
  200. <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  201. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  202. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">자산 거래처 관리원장</caption>
  203. <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
  204. </group>
  205. <group id="group3" scroll="auto" style="left:0px; top:20px; width:1195px; height:740px; ">
  206. <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
  207. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  208. <caption id="caption7" class="search_name" style="left:16px; top:9px; width:125px; height:17px; ">관리항목코드 :</caption>
  209. <line id="line5" class="line_4" style="x1:1087px; y1:8px; x2:1087px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
  210. <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1120px; top:10px; width:56px; height:22px; text-align:left; ">
  211. <caption>조회</caption>
  212. <script type="javascript" ev:event="DOMActivate">
  213. <![CDATA[
  214. fGetNoteList();
  215. fGetNoteDetlList();
  216. fGetNoteSumList();
  217. //fGetMoneySum();
  218. ]]>
  219. </script>
  220. </button>
  221. <input id="ipt_notecd" ref="/root/main/condition/notecd" class="input_s_essential" navindex="6" style="left:135px; top:8px; width:80px; height:19px; ">
  222. <script type="javascript" ev:event="onkeypress">
  223. <![CDATA[
  224. if(event.keyCode == 13)
  225. {
  226. model.setFocus("ipt_notecdnm");
  227. }
  228. ]]>
  229. </script>
  230. <script type="javascript" ev:event="xforms-value-changed">
  231. <![CDATA[
  232. racfNoteValidCheck("notecd,notecdnm");
  233. ]]>
  234. </script>
  235. </input>
  236. <input id="ipt_notecdnm" ref="/root/main/condition/notecdnm" class="input_s_essential" navindex="6" style="left:241px; top:8px; width:230px; height:19px; ">
  237. <script type="javascript" ev:event="onkeypress">
  238. <![CDATA[
  239. if(event.keyCode == 13)
  240. {
  241. model.setFocus("btn_search");
  242. }
  243. ]]>
  244. </script>
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. racfNoteValidCheck("notecd,notecdnm");
  248. ]]>
  249. </script>
  250. </input>
  251. <button id="btn_help" class="icon_search" style="left:221px; top:10px; width:16px; height:16px; ">
  252. <caption/>
  253. <script type="javascript" ev:event="DOMActivate">
  254. <![CDATA[
  255. misfOpenPopUpList("06", ipt_notecd, "", "notecd,notecdnm");
  256. model.refresh();
  257. ]]>
  258. </script>
  259. </button>
  260. <caption id="caption1" class="search_name" style="left:505px; top:8px; width:89px; height:17px; ">기 간 :</caption>
  261. <input id="input2" ref="/root/main/condition/frdt" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:595px; top:8px; width:100px; height:19px; "/>
  262. <input id="input3" ref="/root/main/condition/todt" class="input_s_essential" visibility="visible" inputtype="date" format="yyyy-mm-dd" style="left:712px; top:8px; width:100px; height:19px; "/>
  263. </group>
  264. <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  265. <caption id="caption21" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">관리항목</caption>
  266. <datagrid id="grd_notelist" nodeset="/root/main/list/itemlist" caption="기관코드^코드^관리항목" colsep="^" colwidth="0, 0, 165" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:75px; width:190px; height:660px; ">
  267. <col ref="instcd" visibility="hidden"/>
  268. <col ref="notecd" visibility="hidden"/>
  269. <col ref="mngitem" type="input" maxlength="3" style="text-align:left; "/>
  270. <script type="javascript" ev:event="onrowchanged">
  271. <![CDATA[
  272. var cur_row = grd_notelist.row;
  273. fGetMngItemInfo(cur_row);
  274. grd_notelist.dispatch("onmouseup");
  275. ]]>
  276. </script>
  277. </datagrid>
  278. <datagrid id="ipt_detailist" nodeset="/root/main/list/detailist" caption="날짜^전표일자^전표번호^거래처코드^거래처명^계정코드^계정과목^적요^차변^대변^잔액1^잔액^전월이월^구분" colsep="^" colwidth="72, 70, 60, 82, 118, 65, 93, 186, 115, 115, 115, 115, 80, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:195px; top:75px; width:1000px; height:635px; ">
  279. <col ref="sanctslipdd" format="yyyy-mm-dd" maxlength="3" style="text-align:center; "/>
  280. <col ref="unsldd" visibility="hidden" style="text-align:center; "/>
  281. <col ref="unslno" style="text-align:center; "/>
  282. <col ref="custcd" style="text-align:center; "/>
  283. <col ref="custnm" style="text-align:center; "/>
  284. <col ref="acntcd" style="text-align:center; "/>
  285. <col ref="acntnm" style="text-align:center; "/>
  286. <col ref="etcnotefact" style="text-align:left; "/>
  287. <col ref="dramt" format="(-)#,###" savetype="digit" style="text-align:right; "/>
  288. <col ref="cramt" format="(-)#,###" savetype="digit" style="text-align:right; "/>
  289. <col ref="balance" visibility="hidden" format="(-)#,###" savetype="digit" style="text-align:right; "/>
  290. <col ref="janak" format="(-)#,###" savetype="digit" style="text-align:right; "/>
  291. <col ref="preamt" visibility="hidden" format="(-)#,###" savetype="digit" style="text-align:right; "/>
  292. <col ref="gubn" visibility="hidden" style="text-align:center; "/>
  293. <script type="javascript" ev:event="ondblclick">
  294. <![CDATA[
  295. if (ipt_detailist.row > 0 && ipt_detailist.valueMatrix(ipt_detailist.row, ipt_detailist.colRef("gubn")) == "0")
  296. {
  297. model.makeValue("/root/source/slipinfo/instcd", getUserInfo("dutplceinstcd"));
  298. model.makeValue("/root/source/slipinfo/slipdt", model.getValue(ipt_detailist.nodeset + "[" + ipt_detailist.row + "]/unsldd"));
  299. model.makeValue("/root/source/slipinfo/slipno", model.getValue(ipt_detailist.nodeset + "[" + ipt_detailist.row + "]/unslno").substr(0, 4));
  300. model.refresh();
  301. modal("SMRAD00100","","","","","/root/source", "/root/target" );
  302. }
  303. ]]>
  304. </script>
  305. </datagrid>
  306. <button id="button1" class="btn2_letter4" style="left:1118px; top:50px; width:64px; height:19px; text-align:left; ">
  307. <caption>엑셀출력</caption>
  308. <script type="javascript" ev:event="onclick">
  309. <![CDATA[
  310. //radfSaveExcel(ipt_detailist);
  311. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  312. ipt_detailist.saveExcel(fileName,"SheetName:sheet1");
  313. ]]>
  314. </script>
  315. </button>
  316. <input id="ipt_dramt" ref="/root/init/dramt" format="(-)#,###" style="left:261px; top:714px; width:145px; height:19px; text-align:right; "/>
  317. <caption id="caption5" class="cell_1" style="left:197px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">차변</caption>
  318. <caption id="caption8" class="cell_1" style="left:413px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">대변</caption>
  319. <input id="ipt_cramt" ref="/root/init/cramt" format="(-)#,###" style="left:477px; top:714px; width:145px; height:19px; text-align:right; "/>
  320. <caption id="caption2" class="cell_1" style="left:629px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">잔액</caption>
  321. <input id="ipt_balanceamt" ref="/root/init/balanceamt" format="(-)#,###" style="left:693px; top:714px; width:145px; height:19px; text-align:right; "/>
  322. </group>
  323. <caption id="caption9" style="left:697px; top:40px; width:15px; height:20px; ">~</caption>
  324. </xhtml:body>
  325. </xhtml:html>