123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>관리항목원장</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <condition>
- <notecd/>
- <notecdnm/>
- <frdt/>
- <todt/>
- <instcd/>
- <mngitem/>
- </condition>
- <list>
- <itemlist/>
- <detailist/>
- </list>
- </main>
- <send>
- </send>
- <init>
- <preamt/>
- <dramt/>
- <cramt/>
- <balanceamt/>
- </init>
- <temp/>
- <source>
- <slipinfo>
- <slipdt/>
- <slipno/>
- </slipinfo>
- </source>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fOpenForm();
- //sCdGrupid = model.getValue("/root/init/comcode/cdgrupid");
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
-
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm() {
- model.removenode("/root/main/notelist");
-
- var sToday = getCurrentDate().toString();
- var sFrday = sToday.substring(0,4) + "0101";
-
-
- model.setValue("/root/main/condition/todt",sToday);
- model.setValue("/root/main/condition/frdt",sFrday);
- var instcd = getUserInfo("dutplceinstcd");
- model.setValue("/root/main/condition/instcd",instcd);
-
- model.refresh();
- }
-
- //========================================================================================
- //기재사항코드 조회
- //========================================================================================
- function fGetNoteList() {
- model.resetInstanceNode("/root/main/list/itemlist");
- model.removenode("/root/main/list/itemlist");//조회시 기존 데이터 삭제
- model.copyNode("/root/send", "/root/main/condition");
-
- model.refresh();
- submit("TRRAS00210");
- }
- //========================================================================================
- //기재사항코드 조회
- //========================================================================================
- function fGetNoteDetlList() {
- model.resetInstanceNode("/root/main/list/detailist");
- model.removenode("/root/main/list/detailist");//조회시 기존 데이터 삭제
- model.copyNode("/root/send", "/root/main/condition");
-
- model.refresh();
- submit("TRRAS00230");
- }
-
- //========================================================================================
- //기재사항코드 조회
- //========================================================================================
- function fGetNoteSumList() {
- var idx = ipt_detailist.rows;
- var janak = 0;
- var sum = 0;
- var sum1 = 0;
- var sum2 = 0;
- for (var i = 1; i < idx; i++){
- sum = sum + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/dramt"));
- sum1 = sum1 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/cramt"));
- sum2 = sum2 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/janak"));
- }
- model.setValue("/root/init/dramt", sum);
- model.setValue("/root/init/cramt", sum1);
- model.setValue("/root/init/balanceamt", sum2);
- model.refresh();
- }
-
- //========================================================================================
- //관리항목 상세정보 조회(그리드용)
- //========================================================================================
- function fGetMngItemInfo(pRow)
- {
-
- if ( pRow > 0 )
- {
- model.resetInstanceNode("/root/send");
-
- var strItem ;
- strItem = grd_notelist.valueMatrix(grd_notelist.row, grd_notelist.colRef("mngitem"));
- model.setValue("/root/main/condition/mngitem",strItem);
-
- model.resetInstanceNode("/root/main/list/detailist");
- model.removenode("/root/main/list/detailist");//조회시 기존 데이터 삭제
- model.copyNode("/root/send", "/root/main/condition");
-
- model.refresh();
- submit("TRRAS00220");
-
- fSetRowColor(ipt_detailist);
- fGetMoneySum();
- model.refresh();
-
- //fCopyInstance();
- }
- }
-
- //========================================================================================
- //차변, 대변, 잔액 구하기
- //========================================================================================
- function fGetMoneySum(){
- var idx = ipt_detailist.rows;
- var sum = 0;
- var sum1 = 0;
- var sum2 = 0;
- for (var i = 1; i < idx; i++){
- var j = 1;
- var gubn = model.getValue("/root/main/list/detailist["+ i +"]/gubn");
- if (gubn == "0"){
- sum = sum + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/dramt"));
- sum1 = sum1 + parseInt(model.getValue("/root/main/list/detailist["+ i +"]/cramt"));
- sum2 = sum - sum1
- }
- }
- model.setValue("/root/init/dramt", sum);
- model.setValue("/root/init/cramt", sum1);
- model.setValue("/root/init/balanceamt", sum2);
- model.refresh();
- }
-
- //========================================================================================
- //그리드 로우 색 바꾸기
- //========================================================================================
- function fSetRowColor(pGrid)
- {
- var iCnt = 0;
-
- for(var i=0; i<pGrid.rows;i++)
- {
- if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "1")
- {
- pGrid.rowStyle(i, "all", "background-color") = "#ccffff";
- }
- else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "2")
- {
- pGrid.rowStyle(i, "all", "background-color") = "#ffffff";
- }
- else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "3")
- {
- pGrid.rowStyle(i, "all", "background-color") = "#ffccff";
- }
- else if(pGrid.valueMatrix(i, pGrid.colRef("gubn")) == "4")
- {
- pGrid.rowStyle(i, "all", "background-color") = "#ffffcc";
- }
- }
-
- //pGrid.frozenRows = 1;
- // pGrid.frozenBottomRows = 1;
- // pGrid.backColorFrozen = "#dddddd";
- }
-
-
-
-
- //========================================================================================
- //엑셀입력(excel file을 그리드에 입력)
- //========================================================================================
- function fInputExcel(pGrid) {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != "") {
- pGrid.loadExcel(fileName, 1, true);
- pGrid.deleteRow(1);
-
- for(i = 1; i < pGrid.rows; i++) {
- pGrid.rowStatus(i) = 1;
- }
- pGrid.refresh();
- }
- }
- ]]>
- </script>
- <submission id="TRRAS00210" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/itemlist"/>
- <submission id="TRRAS00220" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/detailist"/>
- <submission id="TRRAS00230" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/detailist"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1195;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">자산 거래처 관리원장</caption>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:20px; width:1195px; height:740px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption7" class="search_name" style="left:16px; top:9px; width:125px; height:17px; ">관리항목코드 :</caption>
- <line id="line5" class="line_4" style="x1:1087px; y1:8px; x2:1087px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="4" style="left:1120px; top:10px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetNoteList();
- fGetNoteDetlList();
- fGetNoteSumList();
- //fGetMoneySum();
- ]]>
- </script>
- </button>
- <input id="ipt_notecd" ref="/root/main/condition/notecd" class="input_s_essential" navindex="6" style="left:135px; top:8px; width:80px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13)
- {
- model.setFocus("ipt_notecdnm");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- racfNoteValidCheck("notecd,notecdnm");
- ]]>
- </script>
- </input>
- <input id="ipt_notecdnm" ref="/root/main/condition/notecdnm" class="input_s_essential" navindex="6" style="left:241px; top:8px; width:230px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
-
- if(event.keyCode == 13)
- {
- model.setFocus("btn_search");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- racfNoteValidCheck("notecd,notecdnm");
- ]]>
- </script>
- </input>
- <button id="btn_help" class="icon_search" style="left:221px; top:10px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- misfOpenPopUpList("06", ipt_notecd, "", "notecd,notecdnm");
-
- model.refresh();
-
- ]]>
- </script>
- </button>
- <caption id="caption1" class="search_name" style="left:505px; top:8px; width:89px; height:17px; ">기 간 :</caption>
- <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; "/>
- <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; "/>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">관리항목</caption>
- <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; ">
- <col ref="instcd" visibility="hidden"/>
- <col ref="notecd" visibility="hidden"/>
- <col ref="mngitem" type="input" maxlength="3" style="text-align:left; "/>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
- var cur_row = grd_notelist.row;
- fGetMngItemInfo(cur_row);
-
- grd_notelist.dispatch("onmouseup");
- ]]>
- </script>
- </datagrid>
- <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; ">
- <col ref="sanctslipdd" format="yyyy-mm-dd" maxlength="3" style="text-align:center; "/>
- <col ref="unsldd" visibility="hidden" style="text-align:center; "/>
- <col ref="unslno" style="text-align:center; "/>
- <col ref="custcd" style="text-align:center; "/>
- <col ref="custnm" style="text-align:center; "/>
- <col ref="acntcd" style="text-align:center; "/>
- <col ref="acntnm" style="text-align:center; "/>
- <col ref="etcnotefact" style="text-align:left; "/>
- <col ref="dramt" format="(-)#,###" savetype="digit" style="text-align:right; "/>
- <col ref="cramt" format="(-)#,###" savetype="digit" style="text-align:right; "/>
- <col ref="balance" visibility="hidden" format="(-)#,###" savetype="digit" style="text-align:right; "/>
- <col ref="janak" format="(-)#,###" savetype="digit" style="text-align:right; "/>
- <col ref="preamt" visibility="hidden" format="(-)#,###" savetype="digit" style="text-align:right; "/>
- <col ref="gubn" visibility="hidden" style="text-align:center; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if (ipt_detailist.row > 0 && ipt_detailist.valueMatrix(ipt_detailist.row, ipt_detailist.colRef("gubn")) == "0")
- {
- model.makeValue("/root/source/slipinfo/instcd", getUserInfo("dutplceinstcd"));
- model.makeValue("/root/source/slipinfo/slipdt", model.getValue(ipt_detailist.nodeset + "[" + ipt_detailist.row + "]/unsldd"));
- model.makeValue("/root/source/slipinfo/slipno", model.getValue(ipt_detailist.nodeset + "[" + ipt_detailist.row + "]/unslno").substr(0, 4));
- model.refresh();
- modal("SMRAD00100","","","","","/root/source", "/root/target" );
- }
- ]]>
- </script>
- </datagrid>
- <button id="button1" class="btn2_letter4" style="left:1118px; top:50px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀출력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //radfSaveExcel(ipt_detailist);
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- ipt_detailist.saveExcel(fileName,"SheetName:sheet1");
- ]]>
- </script>
- </button>
- <input id="ipt_dramt" ref="/root/init/dramt" format="(-)#,###" style="left:261px; top:714px; width:145px; height:19px; text-align:right; "/>
- <caption id="caption5" class="cell_1" style="left:197px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">차변</caption>
- <caption id="caption8" class="cell_1" style="left:413px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">대변</caption>
- <input id="ipt_cramt" ref="/root/init/cramt" format="(-)#,###" style="left:477px; top:714px; width:145px; height:19px; text-align:right; "/>
- <caption id="caption2" class="cell_1" style="left:629px; top:712px; width:62px; height:23px; text-align:center; vertical-align:middle; ">잔액</caption>
- <input id="ipt_balanceamt" ref="/root/init/balanceamt" format="(-)#,###" style="left:693px; top:714px; width:145px; height:19px; text-align:right; "/>
- </group>
- <caption id="caption9" style="left:697px; top:40px; width:15px; height:20px; ">~</caption>
- </xhtml:body>
- </xhtml:html>
|