123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SMAHB02700.xrw
- * 설 명 : 유해물질관리
- * 설 계 자 : 이성인
- * 작 성 자 : 이성인
- * 작 성 일 : 2007.12.10
- * 수정이력 :
- * 기 타 :
- -->
- <?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>
- <MatrList>
- <matrcd/>
- <matrnm/>
- <lastupdtrid/>
- <lastupdtdt/>
- </MatrList>
- </main>
- <send>
- <choiflag/>
- <matrnm/>
- <matrcd/>
- <updatedata/>
- </send>
- <init/>
- <properties>
- <error>
- <msg/>
- </error>
- </properties>
- </root>
- </instance>
- <submission id="TRAHB02701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/MatrList"/>
- <submission id="TXAHB02702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" replace="instance" resultref="/root/main/MatrList"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript">
- <![CDATA[
- function fChoiValue(choiflag){
- //전체/유해물질명/유해물질코드
- if (choiflag == '1' ) {
- ipt_matrnm.visible = false;
- ipt_matrcd.visible = false;
- model.setValue("/root/send/matrnm", "");
- model.setValue("/root/send/matrcd", "");
- } else if (choiflag == '2') {
- ipt_matrnm.attribute("left") = "265px";
- ipt_matrnm.visible = true;
- ipt_matrcd.visible = false;
- model.setValue("/root/send/matrcd", "");
- model.setFocus("ipt_matrnm");
- } else if (choiflag == '3') {
- ipt_matrcd.attribute("left") = "265px";
- ipt_matrcd.visible = true;
- ipt_matrnm.visible = false;
- model.setValue("/root/send/matrnm", "");
- model.setFocus("ipt_matrcd");
- }
- }//fChoiValue() end
-
- function fInit(){
- model.removeNodeset("/root/main/MatrList");
- model.resetInstanceNode("/root/main/MatrList");
- model.resetInstanceNode("/root/send");
- model.refresh();
- }//fInit() end
-
- function fsave(){
- var rows = grd_matrlist.rows - grd_matrlist.fixedRows;
- for( i = rows; i > 0 ; i--){
- var tempmatrcd = model.getValue("/root/main/MatrList["+i+"]/matrcd");
- var bbb = tempmatrcd.length;
- if(tempmatrcd ==""||tempmatrcd.length < 1){
- messageBox("값을","C001");
- return false;
- }//if end
- }//for end
- return true;
- }//fsave() end
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,799;2,49;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:800px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:254px; height:14px; ">유해물질관리</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:800px; height:662px; ">
- <group id="group4" style="left:0px; top:10px; width:800px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:800px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:8px; width:91px; height:17px; ">검색조건 :</caption>
- <select1 id="cmb_choiflag" ref="/root/send/choiflag" class="combo_s_essential" navindex="1" appearance="minimal" style="left:105px; top:7px; width:150px; height:19px; ">
- <choices>
- <item>
- <label>전체</label>
- <value>1</value>
- </item>
- <item>
- <label>유해물질명</label>
- <value>2</value>
- </item>
- <item>
- <label>유해물질코드</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- var choiflag = model.getValue("/root/send/choiflag");
- //검색조건
- fChoiValue(choiflag);
- ]]>
- </script>
- </select1>
- <input id="ipt_matrnm" ref="/root/send/matrnm" navindex="2" visibility="hidden" style="left:265px; top:7px; width:198px; height:19px; "/>
- <input id="ipt_matrcd" ref="/root/send/matrcd" navindex="3" visibility="hidden" imemode="disabled" maxlength="6" style="left:300px; top:7px; width:198px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var tempmatrcd = model.getValue("/root/send/matrcd");
- model.resetInstanceNode("/root/send/matrcd");
- model.setValue("/root/send/matrcd", tempmatrcd.toUpperCase());
- ]]>
- </script>
- </input>
- <line id="line2" class="line_4" style="x1:716px; y1:7px; x2:716px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="4" style="left:732px; top:7px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn1_letter2.gif; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(cmb_choiflag.value == ""){
- messageBox("조회항목을","C002");
- return false;
- }//end if
- else if (cmb_choiflag.value =="2" && ipt_matrnm.value ==""){
- messageBox("조회항목을","C002");
- return false;
- }//end if
- else if(cmb_choiflag.value =="3" && ipt_matrcd.value ==""){
- messageBox("조회항목을","C002");
- return false;
- }//end if
- else {
- submit("TRAHB02701");
- }// else if
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption4" class="tit_2" style="left:6px; top:55px; width:139px; height:14px; ">유해물질코드내역</caption>
- <line id="line3" class="line_1" style="x1:0px; y1:70px; x2:800px; y2:70px; "/>
- <datagrid id="grd_matrlist" nodeset="/root/main/MatrList" caption="유해물질코드^유해물질 명^최종수정자^최종수정일자" colsep="^" colwidth="101, 493,85, 98" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:75px; width:800px; height:581px; vertical-align:middle; ">
- <col autonext="false" ref="matrcd" type="input" maxlength="6" style="text-align:left; vertical-align:middle; "/>
- <col ref="matrnm" type="input" style="text-align:left; vertical-align:middle; "/>
- <col ref="lastupdtrid" type="output" style="text-align:center; vertical-align:middle; "/>
- <col ref="lastupdtdt" type="output" format="yyyy-mm-dd" style="text-align:center; vertical-align:middle; "/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var col = grd_matrlist.col;
- var row = grd_matrlist.row;
- var title = grd_matrlist.labelMatrix(0,col);
- //유해물질코드, 유해물질 명 대문자로 변환
- if(title == "유해물질코드" || title == "유해물질 명"){
- var tempmatrcd = model.getValue("/root/main/MatrList["+row+"]/matrcd");
- for( i = 0 ; i < tempmatrcd.length; i ++){
- if( tempmatrcd.charAt(i) == ' '){
- messageBox("코드입력시 공백을 사용","E001");
- model.setValue("/root/main/MatrList["+row+"]/matrcd", "");
- return false;
- }//if end
- }//for end
- // var tempmatrcd = getTrim()
- model.resetInstanceNode("/root/main/MatrList["+row+"]/matrcd");
- model.setValue("/root/main/MatrList["+row+"]/matrcd", tempmatrcd.toUpperCase());
-
- var tempmatrnm = model.getValue("/root/main/MatrList["+row+"]/matrnm");
- model.resetInstanceNode("/root/main/MatrList["+row+"]/matrnm");
- model.setValue("/root/main/MatrList["+row+"]/matrnm", tempmatrnm.toUpperCase());
-
- grd_matrlist.refresh();
- }// if end
- ]]>
- </script>
- <script type="javascript" ev:event="onstartedit">
- <![CDATA[
- if ( grd_matrlist.rowStatus(grd_matrlist.row) == 0 || grd_matrlist.rowStatus(grd_matrlist.row) == 2 ){
- if(grd_matrlist.col == 1){
- event.preventDefault();
- }//inner if end
- }//if end
- ]]>
- </script>
- </datagrid>
- <button id="button4" class="btn2_letter3" navindex="7" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:635px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>행복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_matrlist.row;
- var rows = grd_matrlist.rows;
- if (row < 1 ){
- messageBox("복사할 행을 다시", "C002");
- }else{
- grd_matrlist.addItem();
- model.copyNode("/root/main/MatrList["+ rows +"]","/root/main/MatrList["+ row +"]");
- grd_matrlist.refresh();
- grd_matrlist.addStatus(rows,"insert");
- }//else end
- ]]>
- </script>
- </button>
- <button id="button52" class="btn2_letter3" navindex="8" disable.background-image="../../../com/commonweb/images/dis_btn2_letter3.gif" style="left:690px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn2_letter3.gif; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_matrlist.addRow();
- ]]>
- </script>
- </button>
- <button id="button53" accesskey="f1" class="btn5_letter3" navindex="9" disable.background-image="../../../com/commonweb/images/dis_btn5_letter3.gif" style="left:745px; top:50px; width:53px; height:19px; background-image:../../../com/commonweb/images/btn5_letter3.gif; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_matrlist.row;
- if(row < 0){
- messageBox("선택된 행이", "I004");
- }else{
- if( grd_matrlist.rowStatus(row) == 1){
- grd_matrlist.deleteRow(row);
- } else {
- grd_matrlist.addStatus(row, "delete");
- messageBox("삭제하시겠습니까?", "Q999");
- //삭제할 행의 정보를 send에 넣는다.
- model.setValue("/root/send/updatedata", grd_matrlist.getUpdateData("delete"));
- if ( submit("TXAHB02702") ) {
- // grd_matrlist.clearStatus(); // submit() 성공하면 그리드의 d상태 제거
- model.refresh();
- var submitchk = model.getValue("/root/properties/error/msg");
- alert(submitchk );
- fInit();
- }//if end
- }// inner else end
- }//else end
- ]]>
- </script>
- </button>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:675px; width:800px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:800px; y2:0px; "/>
- </group>
- <button id="btn_update" class="btn4_letter2" navindex="5" disable.background-image="../../../com/commonweb/images/dis_btn4_letter2.gif" style="left:676px; top:680px; width:56px; height:22px; background-image:../../../com/commonweb/images/btn4_letter2.gif; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fsave() == true){
- model.setValue("/root/send/updatedata", grd_matrlist.getUpdateData());
- if ( submit("TXAHB02702") ) {
- grd_matrlist.clearStatus(); // submit() 성공하면 그리드의 i,u 상태 제거
- model.refresh();
- var submitchk = model.getValue("/root/properties/error/msg");
- alert(submitchk );
- }//if end
- }//if end
- fInit();
- ]]>
- </script>
- </button>
- <button id="btn_clear" class="btn4_letter3" navindex="6" disable.background-image="../../../com/commonweb/images/dis_btn4_letter3.gif" style="left:734px; top:680px; width:68px; height:22px; background-image:../../../com/commonweb/images/btn4_letter3.gif; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //화면 초기화
- fInit();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|