123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559 |
- <?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>
- <racmcust>
- <entrregno/>
- <custnm/>
- <cmpynm/>
- <fromdd/>
- <todd>99991231</todd>
- <prsdnm/>
- <rrgstno/>
- <custstat>1</custstat>
- <bizcont/>
- <item/>
- <mainbizitem/>
- <oldentrregno/>
- <custflag>4</custflag>
- <instflag/>
- <zipcd/>
- <zipcd1/>
- <zipcd2/>
- <zipcdseqno/>
- <supaddr/>
- <infaddr/>
- <cntctel/>
- <faxno/>
- <emailaddr/>
- <homepgaddr/>
- <bankcd/>
- <banknm/>
- <depor/>
- <paycond/>
- <aactno/>
- <cmt/>
- <acntchrgnm/>
- <acntchrgtelno/>
- <acntchrgmpphonno/>
- <acntchrgemailaddr/>
- <statflag/>
- </racmcust>
- <racdcustlist/>
- </main>
- <send>
- <save>
- <racmcust/>
- <racdcustlist/>
- </save>
- <custlist>
- <entrregno/>
- <todd>99991231</todd>
- </custlist>
- <data2>
- <instcd/>
- <mngtcd>acntdept</mngtcd>
- </data2>
- </send>
- <init>
- <init_R0015list>
- <item>
- <label>법인사업자</label>
- <value>1</value>
- </item>
- <item>
- <label>일반과세자</label>
- <value>2</value>
- </item>
- <item>
- <label>간이과세자</label>
- <value>3</value>
- </item>
- <item>
- <label>과세특례자</label>
- <value>4</value>
- </item>
- </init_R0015list>
- <code>
- <codelist/>
- </code>
- </init>
- <hidden>
- <racmcust/>
- </hidden>
- <temp>
- <racdcustlist/>
- </temp>
- <target/>
- </root>
- </instance>
- <submission id="TRRAC00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/custlist" resultref="/root/main/racmcust"/>
- <submission id="TXRAC00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRRAZ00001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data2" resultref="/root/init/code/codelist"/>
- </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="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../mis/acntcommonweb/js/RAD001.js"/>
- <script type="javascript">
- <![CDATA[
- //========================================================================================
- //초기화
- //========================================================================================
- function fInitialize()
- {
- misfMsterDetailSet(grd_racdcustlist, null, "TRRAC00602", "Y");
- model.removeNodeset(grd_racdcustlist.nodeset);
- if(checkOpener() && ipt_entrregno.value != "")
- {
- ipt_entrregno.dispatch("xforms-value-changed");
- }
- else
- {
- model.makeValue("/root/main/racmcust/statflag","i");
- model.setValue("/root/main/racmcust/fromdd", getCurrentDate().toString());
- model.setValue("/root/main/racmcust/todd", '99991231');
- model.copyNode("/root/hidden/racmcust", "/root/main/racmcust");
- model.setValue("/root/properties/uid/opener", model.getValue("/root/target/opener"));
- model.refresh();
- }
- misfGridComboComCdList("R0025", grd_racdcustlist, "goodflag")
-
- var instcd = getUserInfo("dutplceinstcd");
- model.setValue("/root/send/data2/instcd", instcd);
- submit("TRRAZ00001");
-
- model.setFocus("ipt_entrregno");
- }
- //========================================================================================
- //우편번호 Help Open
- //========================================================================================
- function fOpenPopupZipHelp(pControl, pInstance)
- {
- //04 우편번호 Helper
- misfOpenPopUpList("04", pControl, "", pInstance);
- var sZipcd = model.getValue("/root/main/racmcust/zipcd1") + '-' + model.getValue("/root/main/racmcust/zipcd2");
- model.setValue("/root/main/racmcust/zipcd", sZipcd);
- model.refresh();
- }
-
- //========================================================================================
- //저장 click
- //========================================================================================
- function fSaveClick() {
-
- if(!fnotNullCheck())
- {
- return false;
- }
- if(model.getValue("/root/main/racmcust/statflag") == "u" && model.getValue("/root/init/code/code/codelist/cdid") != getUserInfo("dutplcecd"))
- {
- messageBox("수정 권한이 없습니다.\n" + model.getValue("/root/init/code/code/codelist/cdnm") +"에 문의하세요" ,"I000");
- return false;
- }
-
- //model.resetInstanceNode("/root/send/save/racmcust");
- model.copyNode("/root/send/save/racmcust", "/root/main/racmcust");
- model.setValue("/root/send/save/racdcustlist", grd_racdcustlist.getUpdateData());
-
- ret = messageBox("저장하시겠습니까?","Q999");
- if (ret == "6")
- {
- misfSave("TXRAC00601");
- //model.setValue("/root/main/racmcust/statflag","u");
- messageBox("저장되었습니다.","I000");
- btn_save.disabled = "true";
- model.refresh();
- }
-
- var receiveref = model.getValue("/root/target/recvref");
- var node = instance1.selectNodes("root/target/recvitem/*");
- var retlist = "entrregno,custnm";
- var recv_list = retlist.split(",");
- var mainViewer = getMainViewer();
- //
- // if(mainViewer.javascript.getScreenID() == "SMRAD00100" || mainViewer.javascript.getScreenID() == "SMRAT00100")
- // {
- // for (var i = 0; i < node.length; i++)
- // {
- // //mainViewer.model.setValue(receiveref + "/" + node.item(i).nodeName, model.getValue("/root/main/racmcust/"+recv_list[i]));
- // }
- if(mainViewer.javascript.getScreenID() == "SMRAT00100")
- {
- mainViewer.javascript.racfCustValidCheck("entrregno,custnm,custprsd,dummy,custaddr,custbizcond,custitem", "code");
- }
- // }
- // else
- // {
- // messageBox("상위화면이 변경되어 데이터를 전달할 수 ", "I004");
- // }
-
- // if ( checkOpener() ) {
- // for (var i = 0; i < node.length; i++) {
- // alert(receiveref + "/" + node.item(i).nodeName);
- // opener.model.setValue(receiveref + "/" + node.item(i).nodeName, model.getValue("/root/main/racmcust/"+recv_list[i]));
- // }
- // } else {
- // messageBox("상위화면이 변경되어 데이터를 전달할 수 ", "I004");
- // }
- }
-
- //========================================================================================
- // NOT NULL CHECK
- //========================================================================================
-
- function fnotNullCheck()
- {
- if(!isValidDateTime(ipt_todd.value, "YYYYMMDD"))
- {
- messageBox("날짜형식이 잘못되었습니다.", "I000");
- return false;
- }
-
- if(model.getValue(ipt_entrregno.attribute("ref")).length== 0)
- {
- messageBox("사업자등록번호는", "I003");
- return false;
- }
-
- if(model.getValue(ipt_custnm.attribute("ref")).length== 0)
- {
- messageBox("상호는", "I003");
- return false;
- }
-
- return true;
- }
-
-
- //========================================================================================
- //삭제 click
- //========================================================================================
- function fDeleteClick() {
- model.makeValue("/root/main/racmcust/statflag", "d");
- fSaveClick();
- model.removenode("/root/main/racmcust");
- model.makeNode("/root/main/racmcust");
- model.copyNode("/root/main/racmcust","/root/hidden/racmcust");
- model.makeValue("/root/main/racmcust/statflag","i");
- model.refresh();
- }
-
- //========================================================================================
- //조회
- //========================================================================================
- function fSearch() {
- var entrregno = model.getValue("/root/main/racmcust/entrregno");
-
- model.setValue("/root/send/custlist/entrregno",entrregno);
- model.refresh();
-
- if (entrregno != "")
- {
- submit("TRRAC00602");
-
- if(model.getValue("/root/main/racmcust/entrregno") == "")
- {
- model.makeNode("/root/main/racmcust");
- model.copyNode("/root/main/racmcust", "/root/hidden/racmcust");
- model.setValue("/root/main/racmcust/entrregno", model.getValue("/root/send/custlist/entrregno"));
- model.setValue("/root/main/racmcust/todd", "99991231");
- model.setValue("/root/main/racmcust/statflag","i");
-
-
- }
- else
- {
- model.makeValue("/root/main/racmcust/statflag","u");
-
- }
-
- btn_save.disabled = false;
- model.refresh();
- }
- else
- {
- model.makeValue("/root/main/racmcust/statflag","i");
- btn_save.disabled = false;
- model.refresh();
- }
-
- if(model.getValue("/root/main/racmcust/validflag") == "UNVALID")
- {
- messageBox("전표 거래상태가 유효하지 않습니다.\n거래가 종료된 거래처입니다.\n입력중인 전표의 증빙은 기타로 저장하시고 재무팀에 연락바랍니다.", "I000");
- model.setValue("/root/main/racmcust/validflag", "");
- //btn_save.disabled = true;
- return false;
- }
- else
- {
- //btn_save.disabled = false;
- return true;
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="560" pageheight="520" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group1" style="left:0px; top:0px; width:544; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:190px; height:14px; ">거래처 관리</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:12px; width:543px; height:263px; ">
- <line id="line7" class="line_2" style="x1:0px; y1:161px; x2:543px; y2:161px; "/>
- <line id="line6" class="line_2" style="x1:0px; y1:136px; x2:543px; y2:136px; "/>
- <line id="line4" class="line_2" style="x1:0px; y1:60px; x2:543px; y2:60px; "/>
- <line id="line3" class="line_2" style="x1:0px; y1:36px; x2:543px; y2:36px; "/>
- <line id="line9" class="line_3" style="x1:0px; y1:261px; x2:543px; y2:261px; "/>
- <line id="line8" class="line_2" style="x1:0px; y1:211px; x2:543px; y2:211px; "/>
- <caption id="caption47" class="cell_1" style="left:0px; top:14px; width:100px; height:23px; vertical-align:middle; ">사업자등록번호</caption>
- <line id="line2" class="line_1" style="x1:0px; y1:9px; x2:543px; y2:9px; "/>
- <caption id="caption2" class="cell_1" style="left:0px; top:38px; width:100px; height:23px; vertical-align:middle; ">상호</caption>
- <caption id="caption3" class="cell_1" style="left:0px; top:62px; width:100px; height:23px; vertical-align:middle; ">대표자</caption>
- <caption id="caption4" class="cell_1" style="left:0px; top:112px; width:100px; height:23px; vertical-align:middle; ">우편번호</caption>
- <caption id="caption5" class="cell_1" style="left:0px; top:137px; width:100px; height:23px; vertical-align:middle; ">주소</caption>
- <caption id="caption7" class="cell_1" style="left:0px; top:237px; width:100px; height:23px; vertical-align:middle; ">비고</caption>
- <caption id="caption10" class="cell_1" style="left:0px; top:162px; width:100px; height:23px; vertical-align:middle; ">상세주소</caption>
- <input id="ipt_entrregno" ref="/root/main/racmcust/entrregno" class="input_essential" navindex="1" format="999-99-99999" showmask="true" style="left:103px; top:15px; width:150px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_custnm");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_custnm" ref="/root/main/racmcust/custnm" class="input_essential" navindex="2" style="left:103px; top:39px; width:252px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/main/racmcust/cmpynm",model.getValue("/root/main/racmcust/custnm"));
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_prsdnm");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_prsdnm" ref="/root/main/racmcust/prsdnm" class="input_default" navindex="3" style="left:103px; top:64px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_rrgstno");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_cmt" ref="/root/main/racmcust/cmt" class="input_default" navindex="9" style="left:103px; top:239px; width:440px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("btn_save");
- }
- ]]>
- </script>
- </input>
- <line id="line10" class="line_2" style="x1:0px; y1:211px; x2:543px; y2:211px; "/>
- <caption id="caption1" class="cell_1" style="left:0px; top:212px; width:100px; height:23px; vertical-align:middle; ">전화번호</caption>
- <input id="ipt_cntctel" ref="/root/main/racmcust/cntctel" class="input_default" navindex="8" style="left:103px; top:214px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_cmt");
- }
- ]]>
- </script>
- </input>
- <line id="line11" class="line_2" style="x1:0px; y1:86px; x2:543px; y2:86px; "/>
- <line id="line12" class="line_2" style="x1:0px; y1:111px; x2:543px; y2:111px; "/>
- <caption id="caption8" class="cell_1" style="left:0px; top:87px; width:100px; height:23px; vertical-align:middle; ">주민등록번호</caption>
- <input id="ipt_rrgstno" ref="/root/main/racmcust/rrgstno" class="input_default" navindex="4" format="999999-9999999" style="left:103px; top:90px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("btn_zipcode");
- }
- ]]>
- </script>
- </input>
- <button id="btn_zipcode" class="icon_search" style="left:222px; top:115px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fOpenPopupZipHelp(opt_zipcd1,"zipcd1,zipcd2,supaddr,zipcdseqno");
-
- ]]>
- </script>
- </button>
- <output id="opt_zipcd1" ref="/root/main/racmcust/zipcd1" visibility="hidden" style="left:266px; top:114px; width:35px; height:19px; text-align:left; "/>
- <output id="opt_zipcd2" ref="/root/main/racmcust/zipcd2" visibility="hidden" style="left:301px; top:114px; width:30px; height:19px; text-align:left; "/>
- <input id="ipt_supaddr" ref="/root/main/racmcust/supaddr" class="input_default" navindex="6" style="left:103px; top:140px; width:440px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_infaddr");
- }
- ]]>
- </script>
- </input>
- <input id="ipt_zipcd" ref="/root/main/racmcust/zipcd" class="input_default" navindex="5" editable="false" style="left:103px; top:115px; width:115px; height:19px; "/>
- <output id="opt_zipcdseqno" ref="/root/main/racmcust/zipcdseqno" visibility="hidden" style="left:331px; top:114px; width:25px; height:19px; text-align:left; "/>
- <input id="ipt_infaddr" ref="/root/main/racmcust/infaddr" class="input_default" navindex="7" style="left:103px; top:165px; width:340px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_cntctel");
- }
- ]]>
- </script>
- </input>
- <line id="line5" class="line_2" style="x1:0px; y1:186px; x2:543px; y2:186px; "/>
- <caption id="caption9" class="cell_1" style="left:0px; top:187px; width:100px; height:23px; vertical-align:middle; ">업태</caption>
- <input id="input1" ref="/root/main/racmcust/bizcont" class="input_default" navindex="8" style="left:103px; top:189px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_cmt");
- }
- ]]>
- </script>
- </input>
- <input id="input2" ref="/root/main/racmcust/item" class="input_default" navindex="8" style="left:365px; top:189px; width:150px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if (event.keyCode == "13") {
- model.setFocus("ipt_cmt");
- }
- ]]>
- </script>
- </input>
- <caption id="caption11" class="cell_1" style="left:262px; top:187px; width:100px; height:23px; vertical-align:middle; ">종목</caption>
- <line id="line13" class="line_2" style="x1:0px; y1:236px; x2:543px; y2:236px; "/>
- <caption id="caption12" class="cell_1" style="left:262px; top:14px; width:135px; height:23px; text-align:left; vertical-align:middle; ">종료일자</caption>
- <input id="ipt_todd" ref="/root/main/racmcust/todd" class="input_essential" disabled="true" navindex="24" inputtype="date" style="left:399px; top:15px; width:135px; height:19px; "/>
- <select1 id="cmb_instflag" ref="/root/main/racmcust/instflag" class="combo_essential" navindex="33" visibility="hidden" appearance="minimal" style="left:399px; top:64px; width:135px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/init_R0015list/item">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </select1>
- <caption id="cap_instflag" class="cell_1" visibility="hidden" style="left:262px; top:62px; width:135px; height:23px; text-align:left; vertical-align:middle; ">법인구분</caption>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:460px; width:544px; height:27px; ">
- <button id="btn_close" class="btn4_letter2" style="left:488px; top:2; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <line id="line1" class="line_6" visibility="hidden" style="x1:0; y1:0; x2:543; y2:0; "/>
- <button id="btn_delete" class="btn4_letter2" visibility="hidden" style="left:305px; top:2px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDeleteClick();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:432px; top:2px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
-
- sEntrregno = model.getValue(ipt_entrregno.attribute("ref"));
- if(!radfBizCheck(sEntrregno))
- {
- messageBox("틀린 사업자 번호 입니다.\n다시 확인하세요 ", "I000");
- return false;
- }
-
- fSaveClick();
- ]]>
- </script>
- </button>
- </group>
- <button id="but_grddel" class="btn2_letter3" navindex="55" style="left:489px; top:278px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_racdcustlist, "D");
- ]]>
- </script>
- </button>
- <button id="but_grdinst" class="btn2_letter3" navindex="54" style="left:433px; top:278px; width:53px; height:19px; ">
- <caption>행삽입</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(ipt_entrregno.value.replace(" ", "") == "")
- {
- messageBox("사업자등록번호가 ", "I004");
- return;
- }
- misfGridIUD(grd_racdcustlist, "I");
- grd_racdcustlist.valueMatrix(grd_racdcustlist.row, grd_racdcustlist.colRef("entrregno")) = ipt_entrregno.value;
- model.refresh();
- ]]>
- </script>
- </button>
- <datagrid id="grd_racdcustlist" nodeset="/root/main/racdcustlist" caption="사업자등록번호^종료일자^물품 구분^담당종료^담당자명^담당자 전화번호^담당자 휴대폰^담당자 이메일주소^담당직위^담당업무^담당순번^비고" colsep="^" colwidth="0, 0, 118, 55, 73, 97, 110, 126, 63, 87, 0, 122" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="56" style="left:0px; top:300px; width:543px; height:155px; ">
- <col ref="entrregno"/>
- <col ref="todd"/>
- <col ref="goodflag" type="combo" _key="true" style="left:20px; top:23px; width:118px; height:23px; ">
- <choices>
- <itemset nodeset="/root/init/R0025list/R0025">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col checkvalue="Y,N" ref="chrgtoyn" type="checkbox"/>
- <col ref="chrgnm" type="input"/>
- <col ref="chrgtel" type="input"/>
- <col ref="chrgmpphon" type="input"/>
- <col ref="chrgemailaddr" type="input"/>
- <col ref="chrgplce" type="input"/>
- <col ref="chrgbiz" type="input"/>
- <col ref="chrgseq"/>
- <col ref="cmt" type="input"/>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|