123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>
- <search>
- <maindatalist>
- <line/>
- <gubun/>
- <rmrk/>
- <gaamt/>
- <gadate/>
- <aactcd/>
- <sangflag/>
- <instcd/>
- <seqline/>
- <unslno/>
- <sanctslipno/>
- <sangcnt/>
- </maindatalist>
- <gaamtsum>
- <gaamtsum/>
- </gaamtsum>
- </search>
- </main>
- <search>
- <gadate/>
- <instcd/>
- <aactno/>
- <aactcd/>
- <seqline/>
- <janamt/>
- <chulamt/>
- <unslno/>
- <sanctslipno/>
- </search>
- <send>
- <gadate/>
- <instcd/>
- <aactno/>
- <aactcd/>
- <seqline/>
- <janamt/>
- <chulamt/>
- <unslno/>
- <sanctslipno/>
- </send>
- <hidden>
- <search>
- <code/>
- <prntnm/>
- </search>
- <save/>
- <apsl>
- <sumgaamt/>
- </apsl>
- </hidden>
- <init>
- <bankinfo>
- <acctno/>
- <acctcd/>
- </bankinfo>
- <etcinfo>
- <seqline/>
- <janamt/>
- <chulamt/>
- </etcinfo>
- </init>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var fdate = getCurrentDate();
- model.removenode( "/root/main/search/maindatalist");
- model.setValue("/root/search/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/search/gadate", fdate);
- submit("TRRAR00101"); //기관코드 send. / 예금계좌번호,코드 return.
- addComboItem("cmb_aactno","--전체--","","");
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //조회
- function fGetMainDataList() {
-
- if (cmb_aactno.value == ""){
- messageBox("예금계좌를 ","C002");
- return false;
- }
- if (ipt_gadate.value == ""){
- messageBox("가수금일자 ","C002");
- return false;
- }
- if (opt_seqline.value == ""){
- messageBox("일자별 SEQ ","C001");
- return false;
- }
- return true;
- }
-
- //정렬 순서로 sort함.
- function fGetSortSeq(){
- var num = grd_main.rows- 1;
- if(rdo_seq.value == 1){
- grd_main.sort(1, 2, num, 2) = "asc";
- }else{
- grd_main.sort(1, 3, num, 3) = "asc";
- }
- model.refresh();
- }
-
- //출력물순서 저장
-
- //엑셀 입력
- 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();
- }
- }
-
- //최종예금잔액계산
- function fn_janamtaccount(){
- //JANAMT <= 최종예금잔액before - (예금출고금액-예금출고금액before) + (가수금합계-가수금합계before)
- }
-
- //저장시 입력data checking logic..
- function fSetChackValue()
- {
- var updtdata = getGridUpdateData(grd_main);
- if (updtdata == ""){
- messageBox("변경된 데이터가","I004");
- return false;
- }
- var row = grd_main.row;
- for ( var i = grd_main.fixedRows; i <= grd_main.rows; i++ ) {
- //rowStatus=1:insert, 2:update, 4:delete
- if ( grd_main.rowStatus(i)=='1' || grd_main.rowStatus(i)=='2' || grd_main.rowStatus(i)=='4' ) {
- if ( grd_main.valueMatrix(i, grd_main.colRef("sangcnt")) > 0 ){
- alert("상계건수가 있는 Data는 수정 또는 삭제 할 수 없습니다.");
- grd_main.row = i;
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("line")).length==0 ){
- alert("NO 가 없는 Data는 입력할 수 없습니다. 입력해 주세요");
- grd_main.row = i;
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("gaamt")).length==0 ){
- alert("가수금이 없는 Data는 입력할 수 없습니다. 입력해 주세요");
- grd_main.row = i;
- grd_main.col = grd_main.colRef("gaamt");
- grd_main.editCell();
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("gadate")).length==0 ){
- alert("가수금일자가 없는 Data는 입력할 수 없습니다. 입력해 주세요");
- grd_main.row = i;
- return false;
- }
- if ( grd_main.valueMatrix(i, grd_main.colRef("gadate")).length!=8 ){
- alert("가수금일자는 8자리여야 됩니다. 다시 입력해 주세요");
- grd_main.row = i;
- return false;
- }
- }
- }
- //rtn = messageBox("", "Q002");
- //if(rtn != "6" ) return false;
- return true;
- }
-
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <submission id="TRRAR00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/search" resultref="/root/init/bankinfo"/>
- <submission id="TRRAR00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/etcinfo"/>
- <submission id="TRRAR00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/search" validate="false"/>
- <submission id="TXRAR00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
- <submission id="TXRAR00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/save" resultref="/root/temp"/>
- <submission id="TXRAR00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <bind id="bind_cpt_gaamtsum" ref="/root/hidden/apsl/sumgaamt" calculate="sum(/root/main/search/maindatalist/gaamt)"/>
- <bind id="bind_cpt_janamt" ref="/root/search/janamt" calculate="/root/init/etcinfo/janamt - ( /root/search/chulamt - /root/init/etcinfo/chulamt ) + /root/hidden/apsl/sumgaamt - /root/main/search/gaamtsum/gaamtsum" type="xsd:int"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1194;" 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:40; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1195px; height:38px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:38; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption3" class="search_name" style="left:11px; top:9px; width:104px; height:17px; ">예금계좌 :</caption>
- <select1 id="cmb_aactno" ref="/root/search/aactcd" class="combo_s_essential" navindex="1" appearance="minimal" style="left:100px; top:9px; width:130px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/bankinfo">
- <label ref="aactno"/>
- <value ref="aactcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- model.setValue("/root/search/aactno",cmb_aactno.label);
- //seqline, janamt, chulamt 가져오기위한 sql..
- model.copyNode ("/root/send", "/root/search");
- if ( submit("TRRAR00102") ) {
- model.setValue("/root/search/seqline", model.getValue("/root/init/etcinfo/seqline"));
- model.setValue("/root/search/janamt", model.getValue("/root/init/etcinfo/janamt"));
- model.setValue("/root/search/chulamt", model.getValue("/root/init/etcinfo/chulamt"));
- //alert("seqline ==> "+model.getValue("/root/init/etcinfo/seqline")+"\n janamt ==> "+model.getValue("/root/init/etcinfo/janamt")+"\n chulamt ==> "+model.getValue("/root/init/etcinfo/chulamt")+"\n" );
- ipt_chulamt.disabled = false;
- model.refresh();
-
- button2.dispatch("DOMActivate");
- }
-
- ]]>
- </script>
- </select1>
- <output id="opt_aactcd" ref="/root/search/aactcd" class="output_fix" appearance="output" style="left:232px; top:9px; width:40px; height:19px; "/>
- <caption id="cap_codeflag" class="search_name" style="left:280px; top:9px; width:110px; height:17px; ">가수금일자 :</caption>
- <input id="ipt_gadate" ref="/root/search/gadate" class="input_s_essential" inputtype="date" format="yyyy-mm-dd" style="left:383px; top:9px; width:95px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //seqline, janamt, chulamt 가져오기위한 sql..
- model.copyNode ("/root/send", "/root/search");
- if ( submit("TRRAR00102") ) {
- model.setValue("/root/search/seqline", model.getValue("/root/init/etcinfo/seqline"));
- model.setValue("/root/search/janamt", model.getValue("/root/init/etcinfo/janamt"));
- model.setValue("/root/search/chulamt", model.getValue("/root/init/etcinfo/chulamt"));
- //alert("seqline ==> "+model.getValue("/root/init/etcinfo/seqline")+"\n janamt ==> "+model.getValue("/root/init/etcinfo/janamt")+"\n chulamt ==> "+model.getValue("/root/init/etcinfo/chulamt")+"\n" );
- ipt_chulamt.disabled = false;
- model.refresh();
-
- button2.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </input>
- <input id="opt_seqline" ref="/root/search/seqline" class="input_s_essential" appearance="input" style="left:480px; top:9px; width:30px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if ( opt_seqline.value != 1){
- ipt_chulamt.value = 0;
- ipt_chulamt.disabled = true;
- }else{
- ipt_chulamt.disabled = false;
- }
- button2.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption7" class="search_name" style="left:515px; top:9px; width:120px; height:17px; ">최종예금잔액 :</caption>
- <output id="ipt_janamt" ref="/root/search/janamt" class="output_fix" format="(-)#,###" appearance="output" style="left:630px; top:9px; width:95px; height:19px; "/>
- <input id="ipt_janamtup" ref="/root/send/janamt" class="input_s_essential" format="(-)#,###" appearance="input" style="left:727px; top:9px; width:95px; height:19px; "/>
- <button id="btn_janamtsave" class="btn2_letter4" style="left:824px; top:9px; width:64px; height:19px; ">
- <caption>잔액수정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //alert( ipt_janamt.value );
- //model.copyNode ("/root/send", "/root/search");
- setAlertOn();
- submit("TXRAR00101")
- ]]>
- </script>
- </button>
- <caption id="caption8" class="search_name" style="left:890px; top:9px; width:115px; height:17px; ">예금출고금액 :</caption>
- <input id="ipt_chulamt" ref="/root/search/chulamt" class="input_s_essential" format="(-)#,###" appearance="input" style="left:1010px; top:9px; width:100px; height:19px; ">
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- if (model.getValue("/root/search/seqline") != 1){
- alert("SEQ NO가 1일 경우에만 출금액을 사용할 수 있습니다.");
- ipt_chulamt.value = 0;
- ipt_chulamt.disabled = true;
- }else{
- ipt_chulamt.disabled = false;
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //최종예금잔액계산
- fn_janamtaccount();
- ]]>
- </script>
- </input>
- <line id="line5" class="line_4" style="x1:1122px; y1:8px; x2:1122px; y2:30px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="button2" class="btn1_letter2" navindex="4" style="left:1133px; top:10px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fGetMainDataList() ) {
- //setAlertOn();
- model.copyNode ("/root/send", "/root/search");
- submit("TRRAR00103");
- model.setValue("/root/search/unslno", grd_main.valueMatrix(1, grd_main.colRef("unslno")) );
- model.setValue("/root/search/sanctslipno", grd_main.valueMatrix(1, grd_main.colRef("sanctslipno")) );
- model.refresh();
- }
- ]]>
- </script>
- </button>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1194px; y2:75px; "/>
- <button id="button18" class="btn2_letter3" style="left:1137px; top:52px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_main, "D");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_addrow" class="btn2_letter3" style="left:1080px; top:52px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fGetMainDataList() ) {
- misfGridIUD(grd_main, "A");
-
- if(grd_main.row == '1'){
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("line")) = 1;
- }else{
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("line")) = parseInt(grd_main.valueMatrix(grd_main.row-1, grd_main.colRef("line"))) + 1;
- }
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("gadate")) = ipt_gadate.value;
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("aactcd")) = opt_aactcd.value;
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("sangflag")) = "N";
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("instcd")) = getUserInfo("dutplceinstcd");
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("seqline")) = opt_seqline.value;
- grd_main.valueMatrix(grd_main.row, grd_main.colRef("sangcnt")) = 0;
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_main" nodeset="/root/main/search/maindatalist" caption="NO^구분^가수금^적요^가수금일자^미결전표번호^승인전표번호^상계건수^계좌코드^sangflag^instcd^seqline^상계여부" colsep="^" colwidth="80, 153, 150, 350, 100, 90, 90, 79, 0, 0, 0, 0" ellipsis="true" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" tooltip="true" style="left:0px; top:80px; width:1194px; height:635px; ">
- <col ref="line" style="text-align:right; "/>
- <col ref="gubun" type="input" style="left:106px; top:23px; width:128px; height:23px; "/>
- <col ref="gaamt" type="input" format="(-)#,###" maxlength="10" style="text-align:right; "/>
- <col ref="rmrk" type="input"/>
- <col ref="gadate" format="yyyy-mm-dd" style="left:904px; top:23px; width:100px; height:23px; text-align:center; "/>
- <col ref="unslno" style="text-align:center; "/>
- <col ref="sanctslipno" style="text-align:center; "/>
- <col ref="sangcnt" style="text-align:center; "/>
- <col ref="aactcd"/>
- <col ref="sangflag"/>
- <col ref="instcd"/>
- <col ref="seqline"/>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_main.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="ipt_excsave" class="btn2_letter4" style="left:1012px; top:52px; width:64px; height:19px; ">
- <caption>엑셀저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- misfSaveExcel(grd_main);
-
- ]]>
- </script>
- </button>
- <caption id="caption21" class="tit_2" style="left:5px; top:57px; width:131px; height:13px; ">출력 목록</caption>
- <button id="ipt_excadd" class="btn2_letter4" style="left:944px; top:52px; width:64px; height:19px; ">
- <caption>엑셀입력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fGetMainDataList() ) {
-
- fInputExcel(grd_main);
-
- grd_main.gridToInstance();
-
- for(var i = 1 ; i <= model.instance1.selectNodes(grd_main.nodeset).length ; i++)
- {
- model.setValue(grd_main.nodeset + "[" + i + "]/gadate", ipt_gadate.value);
- model.setValue(grd_main.nodeset + "[" + i + "]/aactcd", opt_aactcd.value);
- model.setValue(grd_main.nodeset + "[" + i + "]/sangflag", "N");
- model.setValue(grd_main.nodeset + "[" + i + "]/instcd", getUserInfo("dutplceinstcd"));
- model.setValue(grd_main.nodeset + "[" + i + "]/seqline", opt_seqline.value);
- model.setValue(grd_main.nodeset + "[" + i + "]/sangcnt", 0);
- }
- }
- ]]>
- </script>
- </button>
- <output id="ipt_unslno" ref="/root/search/unslno" class="output_fix" visibility="hidden" appearance="output" style="left:770px; top:50px; width:50px; height:19px; "/>
- <output id="ipt_sanctslipno" ref="/root/search/sanctslipno" class="output_fix" visibility="hidden" appearance="output" style="left:825px; top:50px; width:50px; height:19px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
- <button id="button39" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fSetChackValue() ) { //저장시 입력data checking logic..
- //중복체크에 대한 부부이 빠져있음.
- model.setValue("/root/hidden/save",grd_main.getUpdateData());
- //rtn = messageBox("", "Q002");
- //if(rtn != "6" ) return false;
- //RADMSUSA 테이블에 저장
- if(submit("TXRAR00102")) {
- //전표처리 하기위한 프로시저 실행..
- model.copyNode ("/root/send", "/root/search");
- if(submit("TXRAR00103")) {
- button2.dispatch("DOMActivate");
- }
- }
- }
- ]]>
- </script>
- </button>
- <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- </group>
- <caption id="caption1" class="cell_1" style="left:134px; top:757px; width:120px; height:23px; text-align:center; vertical-align:middle; ">가수금합계</caption>
- <caption id="cpt_gaamtsum" ref="/root/hidden/apsl/sumgaamt" format="(-)#,###" style="left:255px; top:757px; width:151px; height:23px; text-align:right; vertical-align:middle; background-color:#ffcccc; "/>
- </xhtml:body>
- </xhtml:html>
|