123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SPAHB00500.xrw
- * 설 명 : 기본코드선택
- * 설 계 자 : 손주연
- * 작 성 자 : 손주연
- * 작 성 일 : 2007.07.01
- * 수정이력 :
- * 기 타 :
- -->
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>기본코드선택</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <detlcodelst>
- <item>
- <sel/>
- <etcdetlcd/>
- <etcdetlnm/>
- <etccd/>
- <etcdetlcdkey/>
- <etcitemcnts/>
- <etcitemcnts2/>
- <useyn/>
- </item>
- </detlcodelst>
- <allyn/>
- </main>
- <send>
- <clscd/>
- <etccd/>
- </send>
- <init>
- <etclst>
- <item>
- <etccd/>
- <etcdetlnm/>
- <etccdkey/>
- <useyn/>
- </item>
- </etclst>
- <selectinput>
- <item>
- <etcdetlnm/>
- <etcdetlcd/>
- </item>
- </selectinput>
- </init>
- <hidden>
- </hidden>
- <temp>
- <sellst/>
- <okflag/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRAHB00601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/etclst"/>
- <submission id="TRAHB00602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/detlcodelst"/>
- <submission id="TRAHB00603" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/selectinput"/>
- </model>
- <script type="javascript">
- <![CDATA[
-
- /**
- * SPAHB00500_PARAM1 : 대분류코드
- * SPAHB00500_PARAM2 : 중분류코드
- * SPAHB00500_PARAM3 : multiyn => Y이면 소분류코드 다중선택입력모드
- * SPAHB00500_PARAM4 : 목적노드셋
- * SPAHB00500_PARAM5 : 중분류코드 setting여부(Y/N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
- */
-
- var sMultyYN = opener.javascript.getParameter("SPAHB00500_PARAM3");
- var midFlag = opener.javascript.getParameter("SPAHB00500_PARAM5");
- function fInit(){
- fGetLargeClassCdList() ;
- model.removeNodeset(grd_etcdetllst.nodeset);
- model.removeNodeset(grd_etclst.nodeset);
- if( sMultyYN == "N" ) {
- grd_etcdetllst.colHidden(1) = true;
- chk_allyn.visible = false;
- }else if(sMultyYN == "Y") {
- grd_etcdetllst.colHidden(1) = false;
- chk_allyn.visible = true;
- }
- if( checkOpener() || (midFlag =='Y')){
- sMultyYN = opener.javascript.getParameter("SPAHB00500_PARAM3");
- model.setValue("/root/send/clscd" , opener.javascript.getParameter("SPAHB00500_PARAM1"));
- model.setValue("/root/send/etccd" , opener.javascript.getParameter("SPAHB00500_PARAM2"));
- fGetEtcList();
-
- model.makeValue("/root/send/clscd" , opener.javascript.getParameter("SPAHB00500_PARAM1"));
- model.makeValue("/root/send/etccd" , opener.javascript.getParameter("SPAHB00500_PARAM2"));
- fGetDetlCodeList(true);
- opener.model.makeNode("/root/temp/okflag");
- opener.model.setValue("/root/temp/okflag" , "");
-
- }
- model.refresh();
- }
- /**==================================================================================================================================
- * 대분류 초기화
- ==================================================================================================================================*/
- function fGetLargeClassCdList(){
- var ret = submit("TRAHB00603");
- return ret;
- }
-
- /**==================================================================================================================================
- * 중분류 초기화
- ==================================================================================================================================*/
- function fGetEtcList(){
- var sClscd = model.getValue("/root/send/clscd");
- if( sClscd == "" ) return ;
-
- model.removeNodeset("/root/init/etclst/item");
- model.removeNodeset("/root/main/detlcodelst/item");
- var ret = submit("TRAHB00601");
- return ret;
- }
- /**==================================================================================================================================
- * 분류별 상세코드내역 조회
- *==================================================================================================================================*/
- function fGetDetlCodeList(vFlag){
- if (vFlag==false) {
- var idx = grd_etclst.row;
- if( idx < 1 ) return ;
- model.setValue("/root/send/etccd", grd_etclst.valueMatrix(idx, 1) );
- }
- var sClscd = model.getValue("/root/send/clscd");
- if( sClscd == "" ) return ;
- sClscd = model.getValue("/root/send/etccd");
- if( sClscd == "" ) return ;
- model.removeNodeset(grd_etcdetllst.nodeset);
- var ret = submit("TRAHB00602");
- }
-
- /***==================================================================================================================================
- *소분류코드 선택항목 setting
- *==================================================================================================================================*/
- function fDclSetData(){
- if( checkOpener() ){
- var sDestXPath = opener.javascript.getParameter("SPAHB00500_PARAM4");
- var idx = 0 ;
-
- idx = grd_etcdetllst.row;
- if( idx < 1) {
- messageBox("항목을 " , "C002");
- return -1;
- }
- grd_etcdetllst.valueMatrix(idx,grd_etcdetllst.colRef("sel")) = "Y";
-
- if(sMultyYN == "Y") {
- sDestXPath = sDestXPath + "/item";
- }
-
- opener.model.resetInstanceNode(sDestXPath);
-
- copyNodeType( sDestXPath , grd_etcdetllst.nodeset + "[sel='Y']","replace", opener.model, model );
-
- opener.model.setValue("/root/temp/okflag" , "ok");
-
- return 1;
- }
- }
-
- function fSetData() {
- var sDestXPath = opener.javascript.getParameter("SPAHB00500_PARAM4");
-
- if(sMultyYN == "Y") {
- opener.model.resetInstanceNode(sDestXPath);
- var vNdList = instance1.selectNodes(grd_etcdetllst.nodeset + "[sel='Y']");
- var vCsv = getNodeListCSV(vNdList);
- setCSVToNode("/root/temp/sellst", vCsv ,"item");
-
- copyNodeType( sDestXPath , "/root/temp/sellst", "replace", opener.model, model );
-
- opener.model.setValue("/root/temp/okflag" , "ok");
- }else {
- var idx = 0 ;
-
- idx = grd_etcdetllst.row;
- if( idx < 1) {
- messageBox("항목을 " , "C002");
- return -1;
- }
- grd_etcdetllst.valueMatrix(idx,grd_etcdetllst.colRef("sel")) = "Y";
-
- opener.model.resetInstanceNode(sDestXPath);
-
- copyNodeType( sDestXPath , grd_etcdetllst.nodeset + "[sel='Y']","replace", opener.model, model );
-
- opener.model.setValue("/root/temp/okflag" , "ok");
- }
- return 1;
- }
- /***==================================================================================================================================
- *소분류코드 선택항목 setting
- *==================================================================================================================================*/
- function fSetDataEtc(){
- var ret = -1;
- if( checkOpener() ){
- var sDestXPath = opener.javascript.getParameter("SPAHB00500_PARAM4");
- var idx = 0 ;
- idx = grd_etclst.row;
- if( idx < 1) {
- messageBox("항목을 " , "C002");
- return -1;
- }
-
- var sAllYN = opener.javascript.getParameter("SPAHB00500_PARAM5"); //중분류코드 setting여부(Y/N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
-
- if( sAllYN == "Y" ) {
- copyNodesetType( sDestXPath , grd_etcdetllst.nodeset , "replace", opener.model, model );
- }
- ret = 1;
- opener.model.setValue("/root/temp/okflag" , "ok");
- }
- return ret ;
- }
- /***==================================================================================================================================
- * 전체선택
- *==================================================================================================================================*/
- function fSetChkSel(vAllYN) {
- for( var i = 1 ; i < grd_etcdetllst.rows ; i ++){
- grd_etcdetllst.valueMatrix( i, 1) = vAllYN;
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="534" pageheight="543" guideline="1,1194;1,517;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:518px; height:515px; ">
- <datagrid id="grd_etcdetllst" nodeset="/root/main/detlcodelst/item" caption="^코드^명칭^etccd" colsep="^" colwidth="28, 104, 362, 100" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:215px; width:517px; height:298px; ">
- <col checkvalue="Y,N" ref="sel" type="checkbox"/>
- <col ref="etcdetlcd"/>
- <col ref="etcdetlnm"/>
- <col ref="etccd" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if( fDclSetData() == 1){
- window.close();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_etcdetllst.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <group id="group2" style="left:0px; top:0px; width:517px; height:40px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:517px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:16px; top:12px; width:86px; height:17px; ">대분류 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:445px; top:12px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetDetlCodeList(false);
- ]]>
- </script>
- </button>
- <line id="line13" style="x1:429px; y1:11px; x2:429px; y2:32px; border-color:#ffe4bb; border-left-style:solid; "/>
- <select1 id="cmb_clscd" ref="/root/send/clscd" class="combo_s_essential" appearance="minimal" style="left:90px; top:10px; width:120px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/selectinput/item">
- <label ref="etcdetlnm"/>
- <value ref="etcdetlcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fGetEtcList();
- ]]>
- </script>
- </select1>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:46px; x2:517px; y2:46px; "/>
- <select id="chk_allyn" ref="/root/main/allyn" overflow="visible" appearance="full" style="left:26px; top:220px; width:25px; height:20px; text-align:center; vertical-align:middle; border-style:none; ">
- <choices>
- <item>
- <label/>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- fSetChkSel(chk_allyn.value);
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-deselect">
- <![CDATA[
- fSetChkSel(chk_allyn.value);
- ]]>
- </script>
- </select>
- <datagrid id="grd_etclst" nodeset="/root/init/etclst/item" caption="코드^명칭" colsep="^" colwidth="104, 362" dataheight="25" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:50px; width:517px; height:158px; ">
- <col ref="etccd"/>
- <col ref="etcdetlnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- /*
- if( fSetDataEtc() == 1){
- window.close();
- }*/
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fGetDetlCodeList(false);
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_etclst.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <line id="line2" class="line_1" style="x1:0px; y1:210px; x2:517px; y2:210px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:515px; width:517px; height:28px; ">
- <button id="btn_cncl" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_cfm" class="btn4_letter2" style="left:402px; top:3px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fSetData() == 1){
- window.close();
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|