123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <?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>
- <mode/>
- <grid>
- <item>
- <comcd/>
- <comexcd/>
- <comnm/>
- <comlevel/>
- </item>
- </grid>
- <selectgrid>
- <item>
- <chk/>
- <comcd/>
- <comnm/>
- </item>
- </selectgrid>
- </main>
- <send>
- <srchcomcd/>
- <srchcomnm/>
- <data>
- <comcd/>
- <comexcd/>
- <comnm/>
- <dddunit/>
- <ddd/>
- <dddkg/>
- <dddchild/>
- <childdayno/>
- <childage/>
- </data>
- </send>
- <init>
- </init>
- <hidden>
- <temp/>
- <receiveref>
- <srchtype/>
- <comnm/>
- <comcd/>
- </receiveref>
- </hidden>
- </root>
- </instance>
- <submission id="TRADB61301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/grid"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- grd_temp.fixedcellcheckbox(0,0)=true; // 타이틀에 전체선택 체크박스 추가
- model.removeNodeset("/root/main/selectgrid"); // 그리드 내용 초기화
- model.refresh();
- /*
- * 부모창에서 넘겨받은 데이터 체크박스에 세팅
- */
- var comcd = model.getValue("/root/hidden/receiveref/comcd"); // 성분코드
- var comnm = model.getValue("/root/hidden/receiveref/comnm"); // 성분명칭
-
- comcd = comcd.setReplaceWord("'","");
- comcd = comcd.split(",");
-
- comnm = comnm.setReplaceWord("'","");
- comnm = comnm.split(",");
-
- // 데이터 유무 체크( 구분할 값이 없어도 length는 1이 리턴됨. )
- if(comnm[0] != "") {
- for(var i = 0; i < comcd.length; ++i) {
- grd_temp.addRow(false, false);
-
- grd_temp.valueMatrix(grd_temp.rows - grd_temp.fixedRows, grd_temp.colRef("chk")) = "true";
- grd_temp.valueMatrix(grd_temp.rows - grd_temp.fixedRows, grd_temp.colRef("comcd")) = comcd[i];
- grd_temp.valueMatrix(grd_temp.rows - grd_temp.fixedRows, grd_temp.colRef("comnm")) = comnm[i];
- }
- }
-
- grd_temp.refresh();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../../com/hismainweb/js/DocTitle.js"/>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="654" pageheight="586" guideline="1,1194;1,673;2,576;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:630px; height:550px; ">
- <group id="group2" ref="/root/send/srchcomflag" style="left:0px; top:0px; width:625px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:620px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line13" class="line_4" style="x1:555px; y1:6px; x2:555px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_sea" class="btn1_letter2" style="left:560px; top:5px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRADB61301");
- setTree(grd_com, grd_com.colRef("comlevel"),grd_com.colRef("comcd"), false );
-
- model.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption3" class="search_name" style="left:225px; top:8px; width:60px; height:17px; ">명칭</caption>
- <caption id="caption4" class="search_name" style="left:5px; top:8px; width:60px; height:17px; ">코드</caption>
- <input id="input1" ref="/root/send/srchcomnm" class="input_search" style="left:295px; top:8px; width:210px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- btn_sea.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </input>
- <input id="input2" ref="/root/send/srchcomcd" class="input_search" style="left:80px; top:8px; width:130px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- btn_sea.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </input>
- </group>
- <caption id="caption1" class="tit_2" style="left:5px; top:46px; width:95px; height:14px; ">성분조회</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:61px; x2:625px; y2:61px; "/>
- <datagrid id="grd_com" nodeset="/root/main/grid/item" caption="코드^확장^명칭^레벨" colsep="^" colwidth="153, 48, 373, 47" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:66px; width:625px; height:284px; ">
- <col ref="comcd"/>
- <col ref="comexcd"/>
- <col ref="comnm"/>
- <col ref="comlevel"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var comcd = model.getValue("/root/main/grid/item["+grd_com.row+"]/comcd"); // 성분코드
- var comnm = model.getValue("/root/main/grid/item["+grd_com.row+"]/comnm"); // 성분명칭
-
- // 1. 로우 추가
- grd_temp.addRow(false, false);
-
- // 2. 코드, 명칭 세팅
- grd_temp.valueMatrix(grd_temp.rows - 1, grd_temp.colRef("chk")) = "true";
- grd_temp.valueMatrix(grd_temp.rows - 1, grd_temp.colRef("comcd")) = comcd;
- grd_temp.valueMatrix(grd_temp.rows - 1, grd_temp.colRef("comnm")) = comnm;
-
- grd_temp.refresh();
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:5px; top:355px; width:115px; height:13px; ">추가 항목 선택</caption>
- <datagrid id="grd_temp" nodeset="/root/main/selectgrid/item" caption="선택^코드^명칭" colsep="^" colwidth="58, 153, 321" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:375px; width:625px; height:170px; ">
- <col ref="chk" type="checkbox"/>
- <col ref="comcd"/>
- <col ref="comnm"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- grd_temp.deleteRow(grd_temp.row, true);
- grd_temp.refresh();
- ]]>
- </script>
- </datagrid>
- <line id="line2" class="line_1" style="x1:0px; y1:370px; x2:625px; y2:370px; "/>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:550px; width:630px; height:27px; ">
- <button id="btn_cfm" class="btn4_letter2" style="left:511px; top:4px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var comcd = opener.window.javascript.getParameter("comcd"); // 성분코드
- var comexcd = opener.window.javascript.getParameter("comexcd"); //
- var comnm = opener.window.javascript.getParameter("comnm"); // 성분명칭
-
- /*
- * 체크박스에 선택된 값만 부모창으로 세팅
- */
- var gridRow = grd_temp.rows; // 데이터 로우 종 갯수
- var fixedRows = grd_temp.fixedRows; // 고정 데이터 로우 갯수
- var isFirst = true;
-
- for(var i = 0; i < gridRow; ++i) {
- if(grd_temp.valueMatrix(i + fixedRows, grd_temp.colRef("chk")) == "true") {
- // 체크박스에 첫번째 선택된 값
- if(isFirst) {
- // 체크박스에 선택된 값의 명칭이 없을 경우
- comcd = "'" + grd_temp.valueMatrix(i + fixedRows, grd_temp.colRef("comcd")) + "'";
- comnm = "'" + grd_temp.valueMatrix(i + fixedRows, grd_temp.colRef("comnm")) + "'";
-
- isFirst = false;
- }
- // 체크박스에 두번째 이상 선택된 값
- else {
- comcd += "," + "'" + grd_temp.valueMatrix(i + fixedRows, grd_temp.colRef("comcd")) + "'";
- comnm += "," + "'" + grd_temp.valueMatrix(i + fixedRows, grd_temp.colRef("comnm")) + "'";
- }
- }
- }
-
- // 체크박스에 선택된 값이 없을 경우
- if(isFirst) {
- comcd = "";
- comnm = "";
- }
-
- opener.window.javascript.setParameter("comcd" , comcd);
- opener.window.javascript.setParameter("comexcd" , comexcd);
- opener.window.javascript.setParameter("comnm" , comnm);
-
- opener.model.refresh();
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_cls" class="btn4_letter2" style="left:570px; top:4px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <close ev:event="DOMActivate"/>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|