123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMAVB00100.xrw
- * 설 명 : 조직은행 기본코드관리
- * 설 계 자 : 손승현
- * 작 성 자 : 손승현
- * 작 성 일 : 2010.06.29
- * 수정이력 : 2010.06.29 손승현 신규
- * 기 타 :
- -->
- <?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>
- <bdcdlstmst>
- <item>
- <bdlcd/>
- <bdlnm/>
- <useyn/>
- </item>
- </bdcdlstmst>
- <bdcdlstdtl>
- <item>
- <bandcd/>
- <bandmcd/>
- <banddcd/>
- <banddnm/>
- <gbmcd/>
- <gbdcd/>
- <qty/>
- <useyn/>
- </item>
- </bdcdlstdtl>
- </main>
- <send>
- <srchbdlcd/>
- <srchbdlnm/>
- <bdlcd/>
- <bandcd/>
- <req>
- <savedata/>
- <bdlcd/>
- <bandcd/>
- </req>
- </send>
- <init>
- <combobscdlst/>
- </init>
- <hidden>
- <item/>
- </hidden>
- <temp>
- <templst/>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../ast/tissuebankbaseweb/js/tissuebankcombolist.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fGetPtcdInputInit();
- fGetBdCdListMst();
- ]]>
- </script>
- <submission id="TRAVB00001"/>
- <submission id="TRAVB00401" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bdcdlstmst"/>
- <submission id="TRAVB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" replace="instance" resultref="root/main/bdcdlstdtl"/>
- <submission id="TXAVB00401" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hidden"/>
- <submission id="TXAVB00402" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send/req" replace="instance" resultref="root/hiden"/>
- </model>
- <script type="javascript">
- <![CDATA[
- /**
- * 콤보 초기화
- */
- function fGetPtcdInputInit(){
- tbGetBscdList( new Array("C04", "C06"), new Array("/root/init/combobscdlst", "/root/init/combobscdlst") );
- }
-
- /**
- * 묶음코드 리스트 조회
- */
- function fGetBdCdListMst(){
- model.removeNodeset("/root/main/bdcdlstmst/item");
- model.removeNodeset("/root/main/bdcdlstdtl/item");
- model.refresh();
- model.setValue("root/send/bandcd", "-");
- var ret = submit("TRAVB00401");
- return ret;
- }
-
- /**
- * 상세코드 리스트 조회
- */
- function fGetBdCdListDtl(){
- var idx = grd_bdllst.row;
- if( idx < 1) return ;
- model.removeNodeset("/root/main/bdcdlstdtl/item");
- model.refresh();
- model.setValue("root/send/bdlcd", model.getValue(grd_bdllst.nodeset + "[" + idx + "]/bdlcd" ) );
- model.setValue("root/send/bandcd", "" );
- var ret = submit("TRAVB00402");
- return ret;
- }
-
- /**
- * 초기화
- */
- function fBdcdmstclear(){
- model.removeNodeset("/root/main/bdcdlstmst/item");
- model.removeNodeset("/root/main/bdcdlstdtl/item");
- model.refresh();
- }
-
- function fBdcddtlclear(){
- model.removeNodeset("/root/main/bdcdlstdtl/item");
- model.refresh();
- }
-
- /**
- * 분류코드 저장
- */
- function fSaveBdCdMst(){
- if( ! getGridUpdateData(grd_bdllst) )
- {
- alert("저장할 내역이 없습니다.");
- return ;
- }
-
- var rsv_cnt = grd_bdllst.rows ;
- var sNode = grd_bdllst.nodeset+ "[";
- for( var i = 1; i < rsv_cnt ; i++){
- if( model.getValue(sNode + i + "]/bdlcd" ) == "") {
- alert("묶음코드의 코드값이 비어있습니다.");
- return ;
- }
- }
-
- var ret = false;
- if ( messageBox("묶음코드정보를","Q002")==6 ) {
- model.setValue("/root/send/req/savedata", grd_bdllst.getUpdateData());
- model.setValue("/root/send/req/bandcd", "-");
- ret = submit("TXAVB00401");
- }
- return ret;
- }
-
- /**
- * 상세코드 저장
- */
- function fSaveDetlCode(){
- // 저장할 건이 존재하는지 체크
- var idx = grd_bdllst.row;
- if( idx < 1) return ;
-
- if( ! getGridUpdateData(grd_detlcodelst) )
- {
- alert("저장할 내역이 없습니다.");
- return ;
- }
- // 저장할지 확인후 저장
- var ret = false;
- if ( messageBox("상세코드정보를","Q002")==6 ) {
- model.setValue("/root/send/req/savedata", grd_detlcodelst.getUpdateData());
- model.setValue("/root/send/req/bdlcd", model.getValue(grd_bdllst.nodeset + "[" + idx + "]/bdlcd" ) );
- ret = submit("TXAVB00402");
- }
- return ret;
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <group id="grp_title" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:150px; height:14px; ">조직은행 묶음코드관리</caption>
- </group>
- <group id="group1" style="left:0px; top:13px; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
- <line id="line13" class="line_4" style="x1:1107px; y1:7px; x2:1107px; y2:29px; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetBdCdListMst();
- ]]>
- </script>
- </button>
- <caption id="caption2" class="search_name" style="left:15px; top:9px; width:90px; height:17px; ">묶음코드 :</caption>
- <caption id="caption5" class="search_name" style="left:195px; top:9px; width:90px; height:17px; ">묶 음 명 :</caption>
- <input id="ipt_partnm" ref="/root/send/srchbdlnm" class="input_search" style="left:280px; top:8px; width:200px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search","DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_partcd" ref="/root/send/srchbdlcd" class="input_search" style="left:103px; top:8px; width:70px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search","DOMActivate");
- ]]>
- </script>
- </input>
- </group>
- <caption id="caption3" class="tit_2" style="left:5px; top:55px; width:78px; height:14px; ">묶음코드</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:594px; y2:70px; "/>
- <datagrid id="grd_bdllst" nodeset="/root/main/bdcdlstmst/item" caption="묶음코드^묶음코드명^적용여부" colsep="^" colwidth="100, 373, 99" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:594px; height:663px; ">
- <col disabled="false" imemode="alpha" ref="bdlcd" type="input" maxlength="10"/>
- <col imemode="hangul" ref="bdlnm" type="input" maxlength="50"/>
- <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- fGetBdCdListDtl();
- ]]>
- </script>
- </datagrid>
- <caption id="caption4" class="tit_2" style="left:606px; top:55px; width:78px; height:14px; ">상세코드</caption>
- <datagrid id="grd_detlcodelst" nodeset="/root/main/bdcdlstdtl/item" caption="밴드M^밴드^상세코드^상세코드명^구분M^구분^수량^적용여부" colsep="^" colwidth="50, 80, 60, 280, 60, 77, 40, 80" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:600px; top:75px; width:594px; height:663px; ">
- <col ref="bandcd" visibility="hidden"/>
- <col disabled="true" ref="bandmcd" type="combo" maxlength="50">
- <choices>
- <itemset nodeset="/root/init/combobscdlst/C04">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="banddcd" visibility="hidden"/>
- <col imemode="hangul" ref="banddnm" type="output" maxlength="50"/>
- <col ref="gbmcd" visibility="hidden"/>
- <col disabled="true" ref="gbdcd" type="combo" maxlength="50">
- <choices>
- <itemset nodeset="/root/init/combobscdlst/C06">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="qty" type="input" format="(+,-)#,###.##" maxlength="6" style="text-align:right; "/>
- <col checkvalue="Y,N" ref="useyn" type="checkbox"/>
- </datagrid>
- <line id="line2" class="line_1" style="x1:601px; y1:70px; x2:1195px; y2:70px; "/>
- <button id="button2" class="btn2_letter3" style="left:484px; top:50px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_bdllst.addItem();
- grd_bdllst.col = 1;
- grd_bdllst.editCell();
- ]]>
- </script>
- </button>
- <button id="btn_grddel" class="btn2_letter3" style="left:540px; top:50px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- deleteSelectedRows(grd_bdllst, true);
- ]]>
- </script>
- </button>
- <button id="button1" class="btn2_letter3" style="left:1140px; top:50px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- deleteSelectedRows(grd_detlcodelst, true);
- ]]>
- </script>
- </button>
- <button id="btn_grdadd" class="btn2_letter3" style="left:1085px; top:50px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- clearParameter("SPAVBA00100_PARAM1");
- setParameter ("SPAVBA00100_PARAM1", "F");
-
- // 선택화면 Call
- modal("SPAVB00100");
-
- // 정상인 경우 가져온값 setting
- if (model.getValue("/root/temp/okflag") == "ok") {
- // 가져온값 건수 반복
- var idx = instance1.selectNodes("/root/temp/templst/list").length;
- var maxrow = grd_detlcodelst.rows;
- for (var i=1; i<=idx; i++) {
- // 동일한 값이 없는 경우 추가
- var srcEtcdetlnm = model.getValue("/root/temp/templst/list[" + i + "]/etcdetlnm");
- if (instance1.selectNodes(grd_detlcodelst.nodeset + "[banddnm='" + srcEtcdetlnm + "']").length == 0) {
- grd_detlcodelst.addRow();
-
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/bandcd", "C04"); // 밴드코드
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/bandmcd", model.getValue("/root/temp/templst/list[" + i + "]/etccd") ); // 밴드M코드
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/banddcd", model.getValue("/root/temp/templst/list[" + i + "]/etcdetlcd") ); // 밴드D코드
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/banddnm", model.getValue("/root/temp/templst/list[" + i + "]/etcdetlnm") ); // 밴드D명
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/gbmcd", "C06" ); // 구분M코드
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/gbdcd", model.getValue("/root/temp/templst/list[" + i + "]/etcitemcnts") ); // 구분D코드
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/qty", 1 ); // 수량
- model.makeValue(grd_detlcodelst.nodeset + "[" + maxrow + "]/useyn", "Y" ); // 사용여부
-
- maxrow++;
- }
- }
- }
-
- // 불필요 Node 삭제
- model.removenode("/root/temp/okflag");
- model.removenodeset("/root/temp/templst/list");
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_clear2" class="btn4_letter3" style="left:1067px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fBdcddtlclear();
- ]]>
- </script>
- </button>
- <button id="btn_save2" class="btn4_letter2" style="left:1138px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fSaveDetlCode() == true ){
- fGetBdCdListDtl();
- }
- ]]>
- </script>
- </button>
- <button id="btn_save1" class="btn4_letter2" style="left:537px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( fSaveBdCdMst() == true ){
- fGetBdCdListMst();
- }
- ]]>
- </script>
- </button>
- <button id="btn_clear1" class="btn4_letter3" style="left:466px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fBdcdmstclear();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|