123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899 |
- <?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>
- <group>
- <grouplist/>
- </group>
- <list2>
- <groupdetaillist>
- </groupdetaillist>
- <returnlist/>
- </list2>
- <list>
- <transacntinfo>
- <acntflagcd/>
- <acntflagnm/>
- <rcipntacntno/>
- <bankcd/>
- <banknm/>
- <depor/>
- </transacntinfo>
- </list>
- </main>
- <send>
- <transacnt/>
- <retrparams>
- <instcd/>
- <acntsetnm/>
- </retrparams>
- <retrparams2/>
- <data1>
- <instcd/>
- <acntflagcd/>
- <acntflagnm/>
- <acntflag/>
- <getcond/>
- </data1>
- </send>
- <init>
- <acntflaglist>
- <acntflag>
- <cd>1</cd>
- <nm>거래처</nm>
- </acntflag>
- <acntflag>
- <cd>4</cd>
- <nm>교직원</nm>
- </acntflag>
- <acntflag>
- <cd>5</cd>
- <nm>개인</nm>
- </acntflag>
- </acntflaglist>
- <R0001list>
- <R0001>
- <cdnm/>
- <cdid/>
- </R0001>
- </R0001list>
- </init>
- <temp>
- <flag>Y</flag>
- </temp>
- <target/>
- <hidden>
- <excelupload/>
- </hidden>
- </root>
- </instance>
- <submission id="TRRAD00121" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/group"/>
- <submission id="TRRAD00122" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retrparams" resultref="/root/main/list2"/>
- <submission id="TXRAD00121" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRZBC00101" method="urlencoded-post" replace="instance"/>
- <submission id="TRRAD00110" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/list"/>
- </model>
- <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/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fCheckAuth();//화면 권한체크
- fOpenForm();
- //공통함수 호출(help명)
- misfMsterDetailSet(grd_groupdetaillist, null, "TRRAD00121", "Y");
- misfMsterDetailSet(grd_groupacnt, null, "TRRAD00122", "Y");
- btn_search.dispatch("DOMActivate");
-
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //========================================================================================
- //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
- //========================================================================================
- function fCheckAuth()
- {
- btn_search.disabled = !checkAuth("R") ;
- btn_save.disabled = !checkAuth("X") ;
- }
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm()
- {
- if(checkOpener())
- {
- btn_save.visible = true;
- btn_cancel.visible = true;
- }
-
- var instcd = getUserInfo("dutplceinstcd");
-
- var expsacntsum = model.getValue("/root/target/slipinfo/expsacntsum");
- model.removenode("/root/main/group/grouplist");
- model.removenode("/root/main/list2/groupdetaillist");
-
- model.setValue("/root/send/retrparams/instcd", instcd);
- model.refresh()
- //공통코드 조회
- zbcfGetCodeList(new Array("R0001"), new Array("/root/init/R0001list"));
- model.refresh();
- }
-
- //========================================================================================
- // 저장버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveBtn()
- {
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
-
- model.resetInstanceNode("/root/send");
- model.makeNode("/root/send/transacnt");
- model.setValue("/root/send/transacnt", grd_groupdetaillist.getUpdateData());
- misfSave("TXRAD00121");
- }
-
- //========================================================================================
- // 행추가버튼 클릭시
- //========================================================================================
- function fGrdAdd(pGrid)
- {
- pGrid.addRow();
- //pGrid.editCell();
- var row = pGrid.row;
- model.setValue("/root/main/list2/groupdetaillist[" + row + "]/instcd", model.getValue("/root/send/retrparams/instcd"));
- model.refresh();
- }
-
- function fSetDefaulValue()
- {
- var acntflag = model.getValue("/root/main/list2/groupdetaillist[1]/acntflag");
-
- for(var i=1; i<grd_groupdetaillist.rows; i++)
- {
- if(grd_groupdetaillist.rowStatus(i) == 1)
- {
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("instcd")) = model.getValue("/root/hidden/condition/instcd");
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflag")) = acntflag;
- }
- }
- }
- //========================================================================================
- // 행삭제버튼 클릭시
- //========================================================================================
- function fGrdDel(pGrid)
- {
- var cur_row = pGrid.row;
- if(cur_row > -1)
- {
- deleteSelectedRows(pGrid, false); //true : 바로삭제, false : 상태만 삭제로 변경
- pGrid.refresh();
- }
- else if(cur_row == -1)
- {
- messageBox("삭제하려는 행을", "C002");
- }
- }
-
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- function fIsValidForSave()
- {
- //필수 입력 항목 체크(공통 ftHelper.js)
- /* if(!isRequiredControls("ipt_acntcdi", "ipt_acntnmi", "rdo_drcustflag", "rdo_crcustflag",
- "cmb_balflag", "rdo_acntuseyn", "com_acntflag", "com_acntclsflag")) {
- return false;
- }
- */
- var stransacnt = getGridUpdateData(grd_groupdetaillist);
- if(stransacnt == "") {
- messageBox("변경된 데이터가","I004");
- return false;
- }else if(stransacnt != "") {
- return true;
- }
- }
-
- //========================================================================================
- //엑셀입력(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();
- }
- }
-
- //========================================================================================
- //입력 선택
- //========================================================================================
- function fSelected()
- {
- if(!checkOpener() || grd_groupacnt.rows == grd_groupacnt.fixedRows)
- {
- return;
- }
-
- if(fCheckStatus() == false) return;
-
- if(getUserInfo("dutplceinstcd") == '103')
- {
- fCheckAmt();
- }
-
- if(grd_groupacnt.row >= grd_groupacnt.fixedRows)
- {
- var bEdit = false;
-
- for(var i=1; i<grd_groupdetaillist.rows; i++)
- {
- var iRowStatus = grd_groupdetaillist.rowStatus(i);
- if(iRowStatus != 0)
- {
- bEdit = true;
- }
-
- if(grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) == "")
- {
- grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) = 0;
- }
- }
-
- if(bEdit)
- {
- messageBox("수정중이거나 입력중인 데이터가 있어\n\n집합계좌를 이체계좌로 등록 할 수", "I004");
- return;
- }
-
- misfPopUpCheckedListReturn(grd_returnlist, grd_returnlist.colRef("chk"));
- }
- }
-
- //========================================================================================
- //금액 체크 (0 원은 제외함)
- //========================================================================================
-
- function fCheckAmt()
- {
- var grd_rows = grd_returnlist.rows;
- var grd_fixedRows = grd_returnlist.fixedRows;
-
- for(var i = grd_fixedRows ; i < grd_rows ; i ++)
- {
- if(parseInt(grd_returnlist.valueMatrix(i, grd_returnlist.colRef("amt"))) == 0)
- {
- grd_returnlist.valueMatrix(i, grd_returnlist.colRef("chk")) = 'N';
- }
- }
- }
-
- //========================================================================================
- //금액 체크 (0 원은 제외함)
- //========================================================================================
- function fAllCheckCancel(YN)
- {
- var grd_rows = grd_groupdetaillist.rows
- var grd_fixedRows = grd_groupdetaillist.fixedRows;
-
- for(var i = grd_fixedRows ; i < grd_rows ; i++)
- {
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("chk")) = YN;
- grd_returnlist.valueMatrix(i, grd_returnlist.colRef("chk")) = YN;
- }
- }
-
- //========================================================================================
- //진행중인 작업 여부 Check
- //========================================================================================
- function fCheckStatus()
- {
- var grd_rows = grd_groupdetaillist.rows;
- var grd_fixedRows = grd_groupdetaillist.fixedRows;
-
- for(var i = grd_fixedRows ; i <= grd_rows ; i++)
- {
- if(grd_groupdetaillist.rowStatus(i) != 0)
- {
- messageBox("진행중인 작업 완료/취소 후 실행하십시요" ,"");
- return false;
- }
- }
- return true;
- }
-
- //========================================================================================
- //엑셀입력(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.rebuild();
- //pGrid.refresh();
- return true;
-
- }
- else
- {
- return false;
- }
- }
-
- //========================================================================================
- //상대처코드 유효값 체크
- //========================================================================================
-
- //facntflagcdCheck(model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag"),acntflagcd, grd_excelupload.nodeset, i, returnlist);
-
- function facntflagcdCheck(acntflag, acntflagcd, gridnodeset, gridrow, returnlist)
- {
- var valflag = false;
- if(acntflag == '1') { return radfcheckCustExist(getUserInfo("dutplceinstcd"), acntflagcd, gridnodeset, gridrow, returnlist) }
- else if(acntflag == '4') { return radfcheckEmplExist(acntflagcd, gridnodeset, gridrow, returnlist) }
- else if(acntflag == '5') { return radfcheckIcpnExist(getUserInfo("dutplceinstcd"),acntflagcd, gridnodeset, gridrow, returnlist) }
-
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1100" pageheight="580" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group4" scroll="auto" style="left:0px; top:42px; width:1079px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1075px; height:35px; "/>
- <button id="btn_search" class="btn1_letter2" navindex="4" visibility="visible" style="left:1014px; top:7px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRRAD00121");
- misfSetReadOnlyCol(grd_groupdetaillist, "acntflag,acntflagcd,acntflagnm", true);
- model.removenode("/root/main/list2");
- //model.makeNode("/root/main/list2/groupdetaillist");
-
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line5" class="line_4" style="x1:1007px; y1:7px; x2:1007px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption7" class="search_name" visibility="visible" style="left:27px; top:9px; width:99px; height:17px; ">집합계좌명 :</caption>
- <input id="input1" ref="/root/send/retrparams/acntsetnm" style="left:130px; top:8px; width:300px; height:19px; "/>
- </group>
- <group id="group1" style="left:0px; top:0px; width:1079px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">집합계좌 등록 및 선택</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:77px; width:1079px; height:446px; ">
- <line id="line3" class="line_1" style="x1:0px; y1:25px; x2:1075px; y2:25px; "/>
- <caption id="caption1" class="tit_2" style="left:5px; top:9px; width:95px; height:14px; ">집합계좌목록</caption>
- <datagrid id="grd_groupacnt" nodeset="/root/main/group/grouplist" caption="기관코드^집합계좌명" colsep="^" colwidth="50, 165" dataheight="25" ellipsis="true" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:210px; height:415px; ">
- <col ref="instcd" visibility="hidden"/>
- <col ref="acntsetnm" type="input"/>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
- model.setValue("/root/send/retrparams/instcd", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")));
- model.setValue("/root/send/retrparams/acntsetnm", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("acntsetnm")));
- submit("TRRAD00122");
- misfSetReadOnlyCol(grd_groupdetaillist, "acntflag,acntflagcd", true);
-
- grd_groupacnt.dispatch("onmouseup");
-
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
-
- var vStatus = grd_groupacnt.rowStatus(grd_groupacnt.row);
-
- if(vStatus == 1 || vStatus == 3)
- {
- return;
- }
- fSelected();
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:220px; top:10px; width:110px; height:13px; ">이체계좌목록</caption>
- <line id="line1" class="line_1" style="x1:211px; y1:29px; x2:211px; y2:445px; "/>
- <button id="btn_grupgrdadd" class="btn2_letter3" style="left:104px; top:5px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- misfGridIUD(grd_groupacnt, "I");
- grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")) = getUserInfo("dutplceinstcd");
- ]]>
- </script>
- </button>
- <button id="btn_grddel" class="btn2_letter3" style="left:1021px; top:4px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- misfGridIUD(grd_groupdetaillist, "D");
- model.recalculate();
- ]]>
- </script>
- </button>
- <button id="btn_grdadd" class="btn2_letter3" style="left:966px; top:4px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_groupacnt.row == 0 || model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm") == "")
- {
- messageBox("집합계좌명을 추가하시거나 입력하세요", "I999");
- return;
- }
- misfGridIUD(grd_groupdetaillist, "A");
- grd_groupdetaillist.col = 4;
-
- model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/instcd", model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/instcd"));
- model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/acntsetnm", model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm"));
- model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/amt", 0);
- if (model.getValue("/root/main/list2/groupdetaillist[1]/acntflag") != "")
- {
- model.setValue("/root/main/list2/groupdetaillist[" + grd_groupdetaillist.row + "]/acntflag", model.getValue("/root/main/list2/groupdetaillist[1]/acntflag"));
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <button id="btn_grupgrddel" class="btn2_letter3" style="left:158px; top:5px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- misfGridIUD(grd_groupacnt, "D");
- ]]>
- </script>
- </button>
- <datagrid id="grd_groupdetaillist" nodeset="/root/main/list2/groupdetaillist" autoresize="false" caption="선택^집합계좌명^상대처구분^dummy^dummy1^상대처코드^상대처명^dummy2^dummy3^계좌번호^은행명^은행명1^예금주^금액^입금명^비고^기관코드" colsep="^" colwidth="30, 110, 70, 0, 0, 100, 100, 0,0,120, 140, 110, 100, 91, 105, 75, 158, 0" dataheight="25" ellipsis="false" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:216px; top:30px; width:859px; height:415px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="acntsetnm"/>
- <col ref="acntflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/acntflaglist/acntflag">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="dummy"/>
- <col ref="dummy1"/>
- <col ref="acntflagcd" type="inputbutton"/>
- <col ref="acntflagnm" type="input"/>
- <col ref="dummy2"/>
- <col ref="dummy3"/>
- <col ref="rcipntacntno" type="input" style="text-align:left; padding-right:5; "/>
- <col ref="bankcd" type="combo" showvalue="true">
- <choices>
- <itemset nodeset="/root/init/R0001list/R0001">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="banknm" type="input" visibility="hidden"/>
- <col ref="depor" type="input"/>
- <col ref="amt" type="input" format="#,###" style="text-align:right; padding-right:1; "/>
- <col ref="deponm" type="input" style="text-align:right; "/>
- <col ref="cmt" type="input"/>
- <col ref="instcd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var cur_row = grd_groupdetaillist.row;
- var row_cnt = grd_groupdetaillist.rows;
- var instcd = model.getValue("/root/send/retrparams/instcd");
- var acntflag = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflag");
- var acntflagcd = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagcd");
- var acntflagnm = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagnm");
- var pVal;
- if (acntflag == "")
- {
- messageBox("상대처구분을", "C002");
- grd_groupdetaillist.col = 4;
- model.setFocus("grd_groupdetaillist");
- return;
- }
- if(grd_groupdetaillist.col == grd_groupdetaillist.colRef("acntflagcd") && acntflag != "9")
- {
- pVal = instcd + "," + acntflag + "," + acntflagcd + "," + acntflagnm;
- misfOpenPopUpList("24", grd_groupdetaillist, "", "dummy,dummy1,acntflagcd,acntflagnm,dummy2,dummy3,bankcd,banknm,rcipntacntno,depor", pVal, "instcd,acntflag,acntflagcd,acntflagnm");
- if (row_cnt < grd_groupdetaillist.rows)
- {
- fSetDefaulValue();
- model.refresh();
- }
- }
- for(var i=1; i<grd_groupdetaillist.rows; i++)
- {
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("instcd")) = model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row + "]/instcd");
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntsetnm")) = model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row + "]/acntsetnm");
-
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("amt")) == "")
- {
- grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("amt")) = 0;
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- if(grd_groupdetaillist.colRef("acntflag") == grd_groupdetaillist.col)
- {
- var vInstanceRow = grd_groupdetaillist.row - grd_groupdetaillist.fixedRows + 1;
-
- if(model.getValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagcd") != "")
- {
- model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagcd", "");
- model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/acntflagnm", "");
- model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/rcipntacntno", "");
- model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/bankcd", "");
- model.setValue(grd_groupdetaillist.nodeset + "[" + vInstanceRow + "]/depor", "");
- grd_groupdetaillist.refresh();
- }
- }
- else if(grd_groupdetaillist.colRef("acntflagcd") == grd_groupdetaillist.col || grd_groupdetaillist.colRef("acntflagnm") == grd_groupdetaillist.col)
- {
- var cur_col = grd_groupdetaillist.col;
- var cur_row = grd_groupdetaillist.row;
- var row_cnt = grd_groupdetaillist.rows;
-
- var instcd = model.getValue("/root/send/retrparams/instcd");
- var acntflag = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflag");
- var acntflagcd = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagcd");
- var acntflagnm = model.getValue("/root/main/list2/groupdetaillist[" + cur_row + "]/acntflagnm");
- var pVal;
-
- if (acntflag == "")
- {
- messageBox("상대처구분을 선택하세요.","I000");
- grd_groupdetaillist.col= 4;
- model.setFocus("grd_groupdetaillist");
- return;
- }
-
- if (cur_col == grd_groupdetaillist.colRef("acntflagnm") && acntflag != "9")
- {
- pVal = instcd + "," + acntflag + "," + acntflagcd + "," + acntflagnm;
- misfOpenPopUpList("24", grd_groupdetaillist, "", "dummy1,acntflagcd,acntflagnm,dummy2,dummy3,bankcd,banknm,rcipntacntno,depor", pVal, "instcd,acntflag,acntflagcd,acntflagnm");
-
- if (row_cnt < grd_groupdetaillist.rows)
- {
- fSetDefaulValue();
- model.refresh();
- }
- }
- }
- else if(grd_groupdetaillist.colRef("chk") == grd_groupdetaillist.col)
- {
- if(grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) != 1 && grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) != 3)
- {
- grd_groupdetaillist.rowStatus(grd_groupdetaillist.row) = 0;
- }
- grd_returnlist.valueMatrix(grd_groupdetaillist.row, grd_returnlist.colRef("chk")) = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk"));
- }
- else if(grd_groupdetaillist.colRef("amt") == grd_groupdetaillist.col)
- {
- var vAmt = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt"));
-
- if(vAmt == 0 || vAmt == "")
- {
- grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk")) = "N";
- }
- else
- {
- grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("chk")) = "Y";
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- if(grd_groupdetaillist.col == grd_groupdetaillist.colRef("amt"))
- {
- var sAmt = grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt"));
-
- if(sAmt == "" || parseFloat(sAmt) < 0)
- {
- grd_groupdetaillist.valueMatrix(grd_groupdetaillist.row, grd_groupdetaillist.colRef("amt")) = 0;
- }
- }
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_returnlist" nodeset="/root/main/list2/returnlist" visibility="hidden" caption="C^상대처구분^상대처코드^상대처명^계좌번호^은행명^은행명1^예금주^금액^입금명^비고^기관코드" colsep="^" colwidth="20, 70, 70, 70, 150, 60, 0, 90, 80, 75, 57, 30" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:225px; top:315px; width:810px; height:115px; ">
- <col ref="chk"/>
- <col ref="acntflag"/>
- <col ref="acntflagcd"/>
- <col ref="acntflagnm"/>
- <col ref="rcipntacntno"/>
- <col ref="bankcd"/>
- <col ref="banknm"/>
- <col ref="depor"/>
- <col ref="amt"/>
- <col ref="deponm"/>
- <col ref="cmt"/>
- <col ref="instcd"/>
- </datagrid>
- <button id="button2" class="btn2_letter4" style="left:385px; top:5px; width:64px; height:19px; ">
- <caption>전체취소</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fAllCheckCancel("N");
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter4" style="left:319px; top:5px; width:64px; height:19px; ">
- <caption>전체선택</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fAllCheckCancel("Y");
- ]]>
- </script>
- </button>
- <datagrid id="grd_excelupload" nodeset="/root/hidden/excelupload" visibility="hidden" caption="상대처구분^상대처코드^상대처명^계좌번호^은행코드^예금주^금액^입금명^비고" colsep="^" colwidth="80, 80, 80, 80, 80, 80, 80, 80, 80" dataheight="25" ellipsis="true" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:225px; top:200px; width:810px; height:105px; ">
- <col ref="acntflag"/>
- <col ref="acntflagcd"/>
- <col ref="acntflagnm"/>
- <col ref="rcipntacntno" style="text-align:left; padding-right:5; "/>
- <col ref="bankcd"/>
- <col ref="depor"/>
- <col ref="amt" format="#,###" style="text-align:right; padding-right:1; "/>
- <col ref="deponm" format="#,###" style="text-align:right; "/>
- <col ref="cmt"/>
- </datagrid>
- <button id="btn_excelupload" class="btn2_letter4" style="left:895px; top:4px; width:64px; height:19px; ">
- <caption>액셀입력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
-
- if(grd_groupacnt.row == 0 || model.getValue("/root/main/group/grouplist[" + grd_groupacnt.row +"]/acntsetnm") == "")
- {
- messageBox("집합계좌명을 추가하시거나 입력하세요", "I999");
- return;
- }
-
- if(fCheckStatus() == false) return;
-
- if(fInputExcel(grd_excelupload) == false)return;
-
- var grd_fixedRows = grd_excelupload.fixedRows;
- var grd_rows = grd_excelupload.rows;
-
- var acntflag = '';
- var acntflagcd = '';
- var acntflagnm = '';
- var rcipntacntno = '';
- var bankcd = '';
- var banknm = '';
- var depor = '';
- var amt = '';
- var vAcntflag = '';
-
- for(var i = grd_fixedRows ; i < grd_rows ; i++)
- {
- acntflag = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag");
- acntflagcd = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd");
- acntflagnm = model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm");
- rcipntacntno = model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno");
- bankcd = model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd");
- banknm = '';
- depor = model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor");
- amt = model.getValue(grd_excelupload.nodeset + "[" + i + "]/amt");
-
- if(acntflag == '거래처') {vAcntflag = "1";}
- else if(acntflag == '교직원') {vAcntflag = "4";}
- else if(acntflag == '개인') {vAcntflag = "5";}
- else {messageBox(i + " 번째줄 상대처가 잘못되었습니다." ,""); return;}
-
- model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflag", vAcntflag);
-
- model.setValue("/root/send/data1/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/data1/acntflagcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd"));
- model.setValue("/root/send/data1/acntflagnm", "");
- model.setValue("/root/send/data1/acntflag", vAcntflag);
- model.setValue("/root/send/data1/getcond", "code");
-
- submit("TRRAD00110");
-
- if(model.getValue("/root/main/list/transacntinfo/acntflagnm") == "")
- {
- messageBox(i + " 번째줄 " + acntflag + "코드가 잘못되었습니다." ,""); return;
- }
-
- if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd") != "") // 은행코드를 입력했을 시 데이터 검사
- {
- banknm = radfGetBankcd(bankcd);
- if(banknm != "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/bankcd", banknm);}
- // else {messageBox(i + " 번째줄 은행명이 잘못되었습니다." ,""); return;}
- }
-
- model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd", model.getValue("/root/main/list/transacntinfo/acntflagcd"));
- model.setValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm", model.getValue("/root/main/list/transacntinfo/acntflagnm"));
-
- if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/bankcd", model.getValue("/root/main/list/transacntinfo/bankcd")); }
- if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno", model.getValue("/root/main/list/transacntinfo/rcipntacntno")); }
- if(model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor") == "") {model.setValue(grd_excelupload.nodeset + "[" + i + "]/depor", model.getValue("/root/main/list/transacntinfo/depor")); }
-
- }
-
- var grd_rows = grd_excelupload.rows;
- var grd_fixedRows = grd_excelupload.fixedRows;
- var Instance_row = grd_groupdetaillist.rows - grd_groupdetaillist.fixedRows + 1;
- var status_row = grd_groupdetaillist.rows - grd_groupdetaillist.fixedRows + 1;
-
- for(var i = grd_fixedRows ; i < grd_rows ; i++)
- {
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/chk", "N");
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntsetnm", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("acntsetnm")));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflag", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflag"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflagcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagcd"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/acntflagnm", model.getValue(grd_excelupload.nodeset + "[" + i + "]/acntflagnm"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/rcipntacntno", model.getValue(grd_excelupload.nodeset + "[" + i + "]/rcipntacntno"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/bankcd", model.getValue(grd_excelupload.nodeset + "[" + i + "]/bankcd"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/depor", model.getValue(grd_excelupload.nodeset + "[" + i + "]/depor"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/amt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/amt"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/deponm", model.getValue(grd_excelupload.nodeset + "[" + i + "]/deponm"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/cmt", model.getValue(grd_excelupload.nodeset + "[" + i + "]/cmt"));
- model.makeValue(grd_groupdetaillist.nodeset + "[" + Instance_row + "]/instcd", grd_groupacnt.valueMatrix(grd_groupacnt.row, grd_groupacnt.colRef("instcd")));
- Instance_row++;
- }
-
- model.refresh(); // 그리드 반영
-
- for(var i = grd_fixedRows ; i < grd_rows ; i++)
- {
- grd_groupdetaillist.rowStatus(status_row) = 3;
- status_row++;
- }
-
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter4" visibility="visible" style="left:825px; top:4px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀양식</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- radfSaveExcel(grd_excelupload);
- ]]>
- </script>
- </button>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:524px; width:1079px; height:27px; ">
- <button id="btn_cancel" class="btn4_letter2" visibility="hidden" style="left:1017px; top:2px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1074px; y2:0px; "/>
- <button id="btn_save" class="btn4_letter2" visibility="hidden" style="left:153px; top:2px; width:56px; height:22px; ">
- <caption>선택</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fSelected();
- ]]>
- </script>
- </button>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:12px; width:1075px; height:33px; ">
- <line id="line75" class="line_6" style="x1:0px; y1:25px; x2:1074px; y2:25px; "/>
- <button id="button1" class="btn4_letter2" style="left:1014px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for(var i=1; i<grd_groupdetaillist.rows; i++)
- {
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflag")) == "")
- {
- messageBox("상대처구분은", "I003");
- return;
- }
-
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("acntflagcd")) == "" )
- {
- messageBox("상대처코드는", "I003");
- return;
- }
-
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("rcipntacntno")) == "" )
- {
- messageBox("계좌번호는", "I003");
- return;
- }
-
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("bankcd")) == "" )
- {
- messageBox("은행코드는", "I003");
- return;
- }
-
- if(grd_groupdetaillist.valueMatrix(i, grd_groupdetaillist.colRef("depor")) == "" )
- {
- messageBox("예금주는", "I003");
- return;
- }
- }
- misfSave("TXRAD00121");
-
- model.setValue("/root/send/retrparams/acntsetnm", "");
-
- btn_search.dispatch("DOMActivate");
-
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|