123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515 |
- <?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>거래처Excel입력</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <custlist/>
- </list>
- </main>
- <send>
- <list>
- <custlist/>
- </list>
- <condition>
- <instcd/>
- <entrregno/>
- <custnm/>
- <insertfromdd>20080301</insertfromdd>
- <inserttodd/>
- <insertinstcd/>
- </condition>
- </send>
- <hidden>
- <list>
- <custchecklist/>
- </list>
- </hidden>
- <init>
- </init>
- <temp>
- </temp>
- </root>
- </instance>
- <submission id="TRZBC00101" method="urlencoded-post" replace="instance"/>
- <bind id="bind_totamt" ref="/root/hidden/totamt" calculate="(/root/main/orch_one/paytotamt) - (/root/main/orch_one/incmtax) -(/root/main/orch_one/resdntax)"/>
- <bind id="bind_amt" ref="/root/hidden/orchreturn/amt" calculate="sum(/root/main/list/orchlist/paytotamt)"/>
- <bind id="bind_incmtax" ref="/root/hidden/orchreturn/incmtax" calculate="sum(/root/main/list/orchlist/incmtax)"/>
- <bind id="bind_resdntax" ref="/root/hidden/orchreturn/resdntax" calculate="sum(/root/main/list/orchlist/resdntax)"/>
- <submission id="TXRAC00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list" resultref="/root/temp"/>
- <submission id="TRRAC00603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/condition" resultref="/root/hidden/list/custchecklist"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.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[
- fInitialize();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- model.removenode("/root/hidden/list/custchecklist");
- model.removenode("/root/main/list/custlist");
-
- misfComboComCdList("Z0007", cmb_instcd, "N");
- model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
- misfComboComCdList("Z0007", cmb_insertinstcd, "N");
- model.setValue(cmb_insertinstcd.attribute("ref"), getUserInfo("dutplceinstcd"));
-
- model.setValue(ipt_inserttodd.attribute("ref"), getCurrentDate().toString());
-
- model.refresh();
-
- model.setFocus("ipt_name");
- }
-
-
- function fSave()
- {
- var updtdata = getGridUpdateData(grd_custlist);
-
- if (updtdata == "")
- {
- return false;
- }
-
- model.copyNode("/root/send/list", "/root/main/list");
-
- submit("TXRAC00601");
-
- grd_custchecklist.clearStatus();
- grd_custlist.clearStatus();
-
- }
-
- //========================================================================================
- //not null check
- //========================================================================================
- function fDataCheck()
- {
- if(grd_custlist.fixedRows == grd_custlist.rows) return;
-
- var bDataValidFlag = true;
- var bflag = true;
- for(var i = grd_custlist.fixedRows ; i < grd_custlist.rows ; i++)
- {
- bflag = true;
-
- sCustNm = grd_custlist.valueMatrix(i, grd_custlist.colRef("custnm"));
- if(sCustNm == "")
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("custnm")) = "#ff0000";
- bflag = false;
- }
- else
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("custnm")) = "#ffff00";
- }
-
- sFromdd = grd_custlist.valueMatrix(i, grd_custlist.colRef("fromdd"));
- if(!isValidDateTime(sFromdd, "YYYYMMDD"))
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("fromdd")) = "#ff0000";
- bflag = false;
- }
- else
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("fromdd")) = "#ffff00";
- }
-
- sTodd = grd_custlist.valueMatrix(i, grd_custlist.colRef("todd"));
- if(!isValidDateTime(sFromdd, "YYYYMMDD"))
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("todd")) = "#ff0000";
- bflag = false;
- }
- else
- {
- grd_custlist.cellStyle("background-color", i, grd_custlist.colRef("todd")) = "#ffff00";
- }
-
- if(bflag == false)
- {
- grd_custlist.valueMatrix(i, grd_custlist.colRef("validyn")) = "N";
- bDataValidFlag = false;
- }
- else
- {
- grd_custlist.valueMatrix(i, grd_custlist.colRef("validyn")) = "Y";
- }
- }
- if(bDataValidFlag == true)
- {
- btn_save.disabled = false;
- for(var i = grd_custlist.fixedRows ; i < grd_custlist.rows ; i++)
- {
- grd_custlist.rowStatus(i) = 1;
- }
- }
- }
-
- //엑셀 입력
- 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>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group1" style="left:0px; top:0px; width:1042px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">거래처 Excel 입력</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:12px; width:1195px; height:753px; ">
- <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:14px; width:815px; height:45px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line2" class="line_1" style="x1:0px; y1:9px; x2:1195px; y2:9px; "/>
- <datagrid id="grd_custchecklist" nodeset="/root/hidden/list/custchecklist" caption="사업자등록번호^거래처명^시작일자^종료일자^대표자명^주민등록번호^업태^종목^주거래종목^매입/매출처^법인구분^우편번호1^우편번호2^우편번호일련번호^상위주소^하위주소^전화번호^팩스번호^은행코드^예금주^계좌번호^이메일주소^홈페이지주소^승계구사업자등록번호^지불조건^회계담당자명^회계담당자전화번호^회계담당자휴대폰번호^회계담당자이메일주소^거래상태^비고^법인명^출력순서^압류여부^유효여부" colwidth="100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100" dataheight="25" ellipsis="true" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:59px; width:1195px; height:240px; ">
- <col ref="entrregno"/>
- <col ref="custnm"/>
- <col ref="fromdd"/>
- <col ref="todd"/>
- <col ref="prsdnm"/>
- <col ref="rrgstno"/>
- <col ref="bizcont"/>
- <col ref="item"/>
- <col ref="mainbizitem"/>
- <col ref="custflag"/>
- <col ref="instflag"/>
- <col ref="zipcd1"/>
- <col ref="zipcd2"/>
- <col ref="zipcdseqno"/>
- <col ref="supaddr"/>
- <col ref="infaddr"/>
- <col ref="cntctel"/>
- <col ref="faxno"/>
- <col ref="bankcd"/>
- <col ref="depor"/>
- <col ref="aactno"/>
- <col ref="emailaddr"/>
- <col ref="homepgaddr"/>
- <col ref="oldentrregno"/>
- <col ref="paycond"/>
- <col ref="acntchrgnm"/>
- <col ref="acntchrgtelno"/>
- <col ref="acntchrgmpphonno"/>
- <col ref="acntchrgemailaddr"/>
- <col ref="custstat"/>
- <col ref="cmt"/>
- <col ref="cmpynm"/>
- <col ref="prntseqno"/>
- <col ref="seizureyn"/>
- <col ref="validyn" type="checkbox"/>
- </datagrid>
- <button id="btn_excel" class="btn2_letter2" navindex="-1" style="left:965px; top:37px; width:42px; height:19px; ">
- <caption>검사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDataCheck();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter7" navindex="-1" style="left:965px; top:15px; width:97px; height:19px; ">
- <caption>Excel 불러오기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- model.removeNodeset("/root/hidden/list/custchecklist");
- model.removeNodeset("/root/main/list/custlist");
- grd_custchecklist.refresh();
- grd_custlist.refresh();
-
- fInputExcel(grd_custchecklist);
-
- btn_save.disabled = true;
-
- var instcd = getUserInfo("dutplceinstcd")
-
- var bflag = false;
- var vRowNumber = 1;
-
- for(var i = grd_custchecklist.fixedRows ; i < grd_custchecklist.rows ; i++)
- {
- bflag = true;
-
- sValidYN = grd_custchecklist.valueMatrix(i, grd_custchecklist.colRef("validyn"));
- if(sValidYN != "Y") continue;
- if(bflag && sValidYN != "Y")
- {
- grd_custchecklist.rowStyle(i, "data", "background-color") = "#333333";
- bflag = false;
- }
-
- sEntrregno = grd_custchecklist.valueMatrix(i, grd_custchecklist.colRef("entrregno"));
- if(bflag && !radfBizCheck(sEntrregno))
- {
- grd_custchecklist.cellStyle("background-color", i, grd_custchecklist.colRef("entrregno")) = "#ff0000";
- model.setValue(grd_custchecklist.nodeset + "[" + i + "]/validyn", "ERROR");
- bflag = false;
- }
-
- if(bflag && (radfcheckCustExist(instcd, sEntrregno, "N") != ""))
- {
- grd_custchecklist.cellStyle("background-color", i, grd_custchecklist.colRef("entrregno")) = "#00ff00";
- model.setValue(grd_custchecklist.nodeset + "[" + i + "]/validyn", "EXIST");
- bflag = false;
- }
-
- if(bflag == true)
- {
- model.makeNode(grd_custlist.nodeset + "[" + vRowNumber + "]");
- model.copyNode(grd_custlist.nodeset + "[" + vRowNumber + "]", grd_custchecklist.nodeset + "[" + i + "]");
- model.makeValue(grd_custlist.nodeset + "[" + vRowNumber + "]/statflag", "i");
- vRowNumber++;
- }
-
-
- for(var j = i+1 ; j < grd_custchecklist.rows ; j++)
- {
- if(sEntrregno == grd_custchecklist.valueMatrix(j, grd_custchecklist.colRef("entrregno")))
- {
- grd_custchecklist.valueMatrix(j, grd_custchecklist.colRef("validyn")) = "D";
- grd_custchecklist.rowStyle(j, "data", "background-color") = "#800080";
- }
- }
-
- }
-
- grd_custchecklist.refresh();
- grd_custlist.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" disabled="true" navindex="-1" style="left:1135px; top:14px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fSave();
- btn_save.disabled = true;
-
- ]]>
- </script>
- </button>
- <datagrid id="grd_custlist" nodeset="/root/main/list/custlist" caption="사업자등록번호^거래처명^시작일자^종료일자^대표자명^주민등록번호^업태^종목^주거래종목^매입/매출처^법인구분^우편번호1^우편번호2^우편번호일련번호^상위주소^하위주소^전화번호^팩스번호^은행코드^예금주^계좌번호^이메일주소^홈페이지주소^승계구사업자등록번호^지불조건^회계담당자명^회계담당자전화번호^회계담당자휴대폰번호^회계담당자이메일주소^거래상태^비고^법인명^출력순서^압류여부^유효여부" colwidth="100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100" dataheight="25" ellipsis="true" extendlastcol="scroll" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:305px; width:1195px; height:445px; ">
- <col ref="entrregno"/>
- <col ref="custnm"/>
- <col ref="fromdd"/>
- <col ref="todd"/>
- <col ref="prsdnm"/>
- <col ref="rrgstno"/>
- <col ref="bizcont"/>
- <col ref="item"/>
- <col ref="mainbizitem"/>
- <col ref="custflag"/>
- <col ref="instflag"/>
- <col ref="zipcd1"/>
- <col ref="zipcd2"/>
- <col ref="zipcdseqno"/>
- <col ref="supaddr"/>
- <col ref="infaddr"/>
- <col ref="cntctel"/>
- <col ref="faxno"/>
- <col ref="bankcd"/>
- <col ref="depor"/>
- <col ref="aactno"/>
- <col ref="emailaddr"/>
- <col ref="homepgaddr"/>
- <col ref="oldentrregno"/>
- <col ref="paycond"/>
- <col ref="acntchrgnm"/>
- <col ref="acntchrgtelno"/>
- <col ref="acntchrgmpphonno"/>
- <col ref="acntchrgemailaddr"/>
- <col ref="custstat"/>
- <col ref="cmt"/>
- <col ref="cmpynm"/>
- <col ref="prntseqno"/>
- <col ref="seizureyn"/>
- <col ref="statflag"/>
- </datagrid>
- <line id="line1" class="line_1" style="x1:0px; y1:300px; x2:1195px; y2:300px; "/>
- <button id="button2" class="btn2_letter9" navindex="-1" style="left:840px; top:15px; width:119px; height:19px; ">
- <caption>Excel 출력(오류분)</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_custchecklist);
- ]]>
- </script>
- </button>
- <button id="button3" class="btn2_letter9" navindex="-1" style="left:840px; top:37px; width:119px; height:19px; ">
- <caption>Excel 출력(입력분)</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_custlist);
- ]]>
- </script>
- </button>
- <button id="btn_regnohelp" class="icon_search" navindex="11" style="left:520px; top:17px; width:16px; height:16px; text-align:center; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- misfOpenPopUpList("14", ipt_entrregno, "", "entrregno,custnm", "cmb_custstat,cmb_instcd", "custuseyn,instcd");
- model.refresh();
-
- ]]>
- </script>
- </button>
- <input id="ipt_custnm" ref="/root/send/condition/custnm" class="input_s_essential" navindex="12" style="left:540px; top:15px; width:145px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13)
- {
- // racfCustValidCheck("entrregno,custnm", "name");
- ipt_custnm.value = ipt_custnm.currentText;
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // racfCustValidCheck("entrregno,custnm", "name");
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption12" class="search_name" style="left:280px; top:37px; width:134px; height:17px; ">최초입력일자 :</caption>
- <caption id="caption13" style="left:522px; top:43px; width:20px; height:15px; ">~</caption>
- <caption id="caption5" class="search_name" style="left:280px; top:16px; width:125px; height:17px; ">사업자등록번호 :</caption>
- <input id="ipt_inserttodd" ref="/root/send/condition/inserttodd" class="input_s_essential" inputtype="date" style="left:540px; top:38px; width:105px; height:19px; "/>
- <input id="ipt_entrregno" ref="/root/send/condition/entrregno" class="input_s_essential" navindex="10" format="999-99-99999" style="left:409px; top:15px; width:105px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13)
- {
- // racfCustValidCheck("entrregno,custnm", "code");
- ipt_entrregno.value = ipt_entrregno.currentText;
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // racfCustValidCheck("entrregno,custnm", "code");
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_insertfromdd" ref="/root/send/condition/insertfromdd" class="input_s_essential" inputtype="date" style="left:409px; top:38px; width:105px; height:19px; "/>
- <select1 id="cmb_instcd" ref="/root/send/condition/instcd" class="combo_s_essential" navindex="1" appearance="minimal" style="left:95px; top:14px; width:175px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption14" class="search_name" style="left:6px; top:14px; width:86px; height:17px; ">복사기관 :</caption>
- <button id="btn_search" class="btn1_letter2" navindex="15" style="left:695px; top:25px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removeNodeset("/root/hidden/list/custchecklist");
- model.removeNodeset("/root/main/list/custlist");
- grd_custchecklist.refresh();
- grd_custlist.refresh();
- submit("TRRAC00603");
- ]]>
- </script>
- </button>
- <select1 id="cmb_insertinstcd" ref="/root/send/condition/insertinstcd" class="combo_s_essential" disabled="true" navindex="1" appearance="minimal" style="left:95px; top:36px; width:175px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption1" class="search_name" style="left:6px; top:36px; width:86px; height:17px; ">기 관 :</caption>
- <button id="button4" class="btn4_letter2" navindex="-1" style="left:755px; top:25px; width:56px; height:22px; ">
- <caption>복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- model.removeNodeset("/root/main/list/custlist");
- grd_custlist.refresh();
-
- btn_save.disabled = true;
-
- var vRowNumber = 1;
- var bflag = true;
-
- for(var i = grd_custchecklist.fixedRows ; i < grd_custchecklist.rows ; i++)
- {
- bflag = true;
-
- sValidYN = grd_custchecklist.valueMatrix(i, grd_custchecklist.colRef("validyn"));
- //alert(sValidYN);
- if(!sValidYN)
- {
- grd_custchecklist.rowStyle(i, "data", "background-color") = "#333333";
- bflag = false;
- }
-
- sEntrregno = grd_custchecklist.valueMatrix(i, grd_custchecklist.colRef("entrregno"));
- if(bflag && !radfBizCheck(sEntrregno))
- {
- grd_custchecklist.cellStyle("background-color", i, grd_custchecklist.colRef("entrregno")) = "#ff0000";
- model.setValue(grd_custchecklist.nodeset + "[" + i + "]/validyn", "E");
- bflag = false;
- }
- if(bflag)
- {
- model.makeNode(grd_custlist.nodeset + "[" + vRowNumber + "]");
- model.copyNode(grd_custlist.nodeset + "[" + vRowNumber + "]", grd_custchecklist.nodeset + "[" + i + "]");
- model.makeValue(grd_custlist.nodeset + "[" + vRowNumber + "]/statflag", "i");
- vRowNumber++;
- }
- }
- model.refresh();
-
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|