123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>화학물질 코드 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <condition>
- <matrnm/>
- <goodcd/>
- <goodnm/>
- </condition>
- <matrlist>
- <matrcd/>
- <matrnm/>
- <prodcmpynm/>
- <mkdeptnm/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- </matrlist>
- <matrinfo>
- <detail>
- <status/>
- <matrcd/>
- <matrnm/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- <prodcmpycd/>
- <prodcmpynm/>
- <maincustlastsuplplce/>
- <maincustlastsuplplcenm/>
- <mkdeptcd/>
- <mkdeptnm/>
- <frgstdd/>
- <cmt/>
- <msdsflag/>
- </detail>
- <deptlist>
- <matrcd/>
- <deptcd/>
- <deptnm/>
- <tretopendd/>
- <tretclosdd/>
- <usge/>
- <useqtym/>
- <useqtyy/>
- <trethrd/>
- <workdcntm/>
- <tretmcnt/>
- <ctnryn/>
- <ctnrsignyn/>
- <old_deptcd/>
- <old_tretclosdd/>
- </deptlist>
- </matrinfo>
- </main>
- <send/>
- <init/>
- <hidden>
- <matrinfo>
- <detail/>
- <deptlist/>
- </matrinfo>
- </hidden>
- <temp>
- </temp>
- <popgood>
- <instcd/>
- <wareflag/>
- <goodcd/>
- <goodnm/>
- <returntype/>
- <selectyn/>
- </popgood>
- <popdata>
- <matrcd/>
- </popdata>
- </root>
- </instance>
- <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="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RAC001.js"/>
- <script type="javascript" src="../../../com/zipcodeweb/js/ZBP001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <!--script type="javascript" src="../../../mis/purcbaseweb/js/SMRSC05302.js"/-->
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fOpenForm();
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
-
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm() {
- //model.removenode("/root/main/matrlist");
- //model.removenode("/root/main/deptlist");
- //model.refresh();
-
- misfGridInit(grd_deptlist);
- fGetMatrList();//코드 목록 조회
- // if(model.getValue("/root/main/matrlist[1]/matrcd") != "") {
- // grd_matrlist.isSelected(1) = true;
- // fGetMatrInfo(1);
- // }else {
- // fCopyInstance();
- // }
- }
- //========================================================================================
- //인스턴스 Copy 함수
- //========================================================================================
- function fCopyInstance() {
- //----model.copyNode("/root/hidden/matrinfo/detail", "/root/main/matrinfo/detail");
- model.copyNode("/root/hidden/matrinfo", "/root/main/matrinfo");
- model.refresh();
- }
- //========================================================================================
- //코드 목록 조회 함수
- //========================================================================================
- function fGetMatrList() {
- //model.removenode("/root/main/matrlist");//조회시 기존 데이터 삭제
- misfGridInit(grd_matrlist);
-
- model.copyNode("/root/send", "/root/main/condition");
- submit("TRRSM00101");
- model.refresh();
- }
-
- //========================================================================================
- //화학물질 상세정보 및 조사표 조회
- //========================================================================================
- function fGetMatrInfo(pRow) {
- if ( pRow > 0 ) {
- model.resetInstanceNode("/root/send");
- model.copyNode("/root/send", "/root/main/matrlist["+ pRow + "]");
- submit("TRRSM00102");
- ipt_matrcd.disabled = true;
- fCopyInstance();
- }
- }
-
- //========================================================================================
- //신규 버턴 클릭시 인스턴스 초기화
- //========================================================================================
- function fSetMatrInfo() {
- ipt_matrcd.disabled = false;
- // 아래 두줄로 변경
- //model.resetInstanceNode("/root/main/matrinfo");
- model.resetInstanceNode("/root/main/matrinfo/detail");
- //model.resetInstanceNode("/root/main/matrinfo/deptlist");
- misfGridInit(grd_deptlist);
-
- //return;
-
- model.setFocus("ipt_matrcd");
- model.setValue("/root/main/matrinfo/detail/status", "i");
- model.setValue("/root/main/matrinfo/detail/msdsflag", "Y");
- // 서식에서 징수의무자 상호(법인명)으로 쓰임. 기본값으로 경북대학교병원장 셋팅.
- //model.setValue("/root/main/matrinfo/prntnm1" , "경북대학교병원장");
- fCopyInstance();
- }
-
- //========================================================================================
- // 저장버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveBtn() {
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
-
- for(var i = 2; i < grd_deptlist.rows; i++) {
- grd_deptlist.valueMatrix(i, grd_deptlist.colRef("matrcd")) = ipt_matrcd.value;
- }
-
- model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/detail");
- model.copyNode("/root/send", "/root/main/matrinfo/detail");
-
- model.makeValue("/root/send/deptlist", grd_deptlist.getUpdateData());
-
- //return;
-
- if(submit("TXRSM00101")) {
- fGetMatrList();//코드 목록 재조회
- model.copyNode("/root/send", "/root/main/matrinfo/detail");
- submit("TRRSM00102"); //상세내역 및 조사표 재조회
- //model.setValue("/root/main/matrinfo/detail/status", "-");
- //grd_deptlist.clearStatus();
- //--model.makeNode("/root/hidden/matrinfo/detail");
- model.makeNode("/root/hidden/matrinfo");
- fCopyInstance();
-
- ipt_matrcd.disabled = true;
- }
- }
-
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- function fIsValidForSave() {
- //필수 입력 항목 체크(공통 ftHelper.js)
- if(!isRequiredControls("ipt_matrcd","ipt_matrnm")) { //,"ipt_prodcmpycd"
- return false;
- }
-
- var tretopendd = "";
- var tretclosdd = "";
- for(var i = 2; i < grd_deptlist.rows; i++) {
- if(grd_deptlist.rowStatus(i) < 4) { //행삭제가 아닌 Record만 check한다.
- if(grd_deptlist.valueMatrix(i, grd_deptlist.colRef("deptcd")) == "") {
- messageBox("부서코드가 입력되지 않았습니다. \n조사표의 부서코드를 확인하십시요. ", "E999", "");
- return false;
- }
-
- tretopendd = grd_deptlist.valueMatrix(i, grd_deptlist.colRef("tretopendd"));
- if( tretopendd.length != 8 ) {
- messageBox("취급개시일이 정확하게 입력되지 않았습니다. \n취급개시일을 확인하십시요. ", "E999", "");
- return false;
- }
-
- tretclosdd = grd_deptlist.valueMatrix(i, grd_deptlist.colRef("tretclosdd"));
- if( tretclosdd.length != 8 ) {
- messageBox("취급종료일이 정확하게 입력되지 않았습니다. \n취급종료일을 확인하십시요. ", "E999", "");
- return false;
- }
-
- if( tretopendd > tretclosdd ) {
- messageBox("취급개시일이 취급종료일보다 큽니다. 취급일을 확인하십시요. ", "E999", "");
- return false;
- }
-
- }
- }
-
- var sStatus = model.getValue("/root/main/matrinfo/detail/status");
- var sNewData = fGetNodeText("/root/main/matrinfo/detail");
- var sOldData = fGetNodeText("/root/hidden/matrinfo/detail");
-
- //상세내역에 변경된 정보가 있는지 확인
- if(sNewData != sOldData && sStatus == "-") { // 데이터 수정일 경우
- model.setValue("/root/main/matrinfo/detail/status","u");
- return true;
- } else if(sNewData == sOldData && sStatus == "-" ) { //변경된 값이 없을경우
- //messageBox("변경된 정보가 ", "I004");
- //return false;
- return true;
- }else if(sStatus == "i") { //데이터 입력일 경우
- return true;
- }else if(sStatus = "d") { //데이터 삭제일 경우
- return true;
- }
- }
-
- //========================================================================================
- //엑셀입력(excel file을 그리드에 입력)
- //========================================================================================
- function fInputExcel(pGrid) {
- var fileName = window.fileDialog("open", ",", false, "", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if(fileName != "") {
- pGrid.loadExcel(fileName, 1, true);
- pGrid.deleteRow(1);
- pGrid.refresh();
- }
- }
-
- //========================================================================================
- //동일한 Depth의 인스턴스의 값을 스트링형으로 변환
- //========================================================================================
- function fGetNodeText(pNode) {
- var trgNdoe = instance1.selectSingleNode(pNode);
- var trgNdoeList = trgNdoe.childNodes;
- var childNode;
- var allText = "";
- while( childNode = trgNdoeList.nextNode() ) {
-
- allText += childNode.text;
- }
- return allText;
- }
-
- function fOpenPopupDeptHelp(pControl, pInstance)
- {
- misfOpenPopUpList("02", pControl, "", pInstance);
- model.refresh();
- }
-
-
- ]]>
- </script>
- <submission id="TRRSM00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrlist"/>
- <submission id="TRRSM00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrinfo"/>
- <submission id="TXRSM00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1193;1,1406;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:293px; height:14px; ">화학물질 코드 등록</caption>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption7" class="search_name" style="left:56px; top:9px; width:64px; height:17px; ">물질명</caption>
- <line id="line5" class="line_4" style="x1:704px; y1:6px; x2:704px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="5" style="left:720px; top:7px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetMatrList();
- ]]>
- </script>
- </button>
- <caption id="caption1" class="search_name" style="left:246px; top:9px; width:114px; height:17px; ">(물류)물품코드</caption>
- <input id="ipt_matrnm_search" ref="/root/main/condition/matrnm" class="input_default" navindex="2" style="left:124px; top:8px; width:100px; height:19px; "/>
- <input id="ipt_goodcd_search" ref="/root/main/condition/goodcd" class="input_default" navindex="3" maxlength="12" style="left:365px; top:8px; width:88px; height:19px; "/>
- <button id="btn_goodcd_search" class="icon_search" navindex="4" style="left:456px; top:8px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popgood/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/popgood/wareflag", ""); //창고별 물품인 경우에는 창고코드 넣어줌( cmb_wareflag.value )
- model.setValue("/root/popgood/returntype", "2"); //goodnm도 함께 return 받고자 할때, returntype을 "2" 로 설정.
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popgood/selectyn", "");
-
- //popup 프로그램 호출
- window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata");
- //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 보여준다.
- if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- ipt_goodcd_search.value = model.getValue("/root/popgood/goodcd");
- opt_goodnm_search.value = model.getValue("/root/popgood/goodnm");
- }
-
- ]]>
- </script>
- </button>
- <output id="opt_goodnm_search" ref="/root/main/condition/goodnm" class="output_fix" appearance="output" style="left:474px; top:8px; width:208px; height:19px; "/>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:450px; y2:75px; "/>
- <line id="line1" class="line_1" style="x1:455px; y1:75px; x2:1187px; y2:75px; "/>
- <line id="line13" class="line_2" style="x1:456px; y1:103px; x2:1078px; y2:103px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:60px; width:131px; height:13px; ">코드 목록</caption>
- <caption id="caption20" class="tit_2" style="left:459px; top:60px; width:131px; height:13px; ">상세내역</caption>
- <datagrid id="grd_matrlist" nodeset="/root/main/matrlist" caption="코드^물질명^제조회사^제작부서^(물류)물품코드^물품명^규격" colsep="^" colwidth="37, 198, 96, 102, 89, 145, 105" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="16" rowsep="|" navindex="6" style="left:0px; top:80px; width:450px; height:655px; ">
- <col class="text_center" ref="matrcd"/>
- <col class="text_left" ref="matrnm" style="text-align:left; "/>
- <col class="text_left" ref="prodcmpynm" style="text-align:left; "/>
- <col ref="mkdeptnm"/>
- <col class="text_center" ref="goodcd" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var cur_row = grd_matrlist.row;
- fGetMatrInfo(cur_row);
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_matrlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="cap_matrcd" class="cell_1" style="left:455px; top:80px; width:150px; height:23px; text-align:center; vertical-align:middle; ">물질코드</caption>
- <caption id="cap_matrnm" class="cell_1" style="left:455px; top:105px; width:150px; height:23px; text-align:center; vertical-align:middle; ">물 질 명</caption>
- <input id="ipt_matrnm" ref="/root/main/matrinfo/detail/matrnm" class="input_essential" navindex="8" style="left:608px; top:107px; width:400px; height:19px; "/>
- <line id="line4" class="line_2" style="x1:456px; y1:128px; x2:1078px; y2:128px; "/>
- <caption id="caption5" class="cell_1" style="left:793px; top:280px; width:115px; height:23px; text-align:center; vertical-align:middle; ">MSDS 유무</caption>
- <line id="line16" class="line_2" style="x1:455px; y1:278px; x2:1077px; y2:278px; "/>
- <line id="line17" class="line_2" style="x1:455px; y1:303px; x2:1077px; y2:303px; "/>
- <line id="line18" class="line_2" style="x1:455px; y1:361px; x2:1077px; y2:361px; "/>
- <caption id="caption24" class="cell_1" style="left:455px; top:255px; width:150px; height:23px; text-align:center; vertical-align:middle; ">제작부서</caption>
- <caption id="caption25" class="cell_1" style="left:455px; top:130px; width:150px; height:23px; text-align:center; vertical-align:middle; ">(물류)물품코드</caption>
- <caption id="caption27" class="cell_1" style="left:455px; top:305px; width:150px; height:56px; text-align:center; vertical-align:middle; ">비 고</caption>
- <caption id="caption29" class="cell_1" style="left:455px; top:280px; width:150px; height:23px; text-align:center; vertical-align:middle; ">최초등록일</caption>
- <input id="ipt_frgstdd" ref="/root/main/matrinfo/detail/frgstdd" class="input_default" navindex="20" inputtype="date" format="yyyy-mm-dd" style="left:608px; top:282px; width:90px; height:19px; "/>
- <line id="line19" class="line_2" style="x1:455px; y1:153px; x2:1077px; y2:153px; "/>
- <textarea id="txtea_reason" ref="/root/main/matrinfo/detail/cmt" navindex="22" style="left:608px; top:307px; width:400px; height:52px; padding-left:4; padding-top:4; padding-right:4; padding-bottom:4; "/>
- <input id="ipt_mkdeptcd" ref="/root/main/matrinfo/detail/mkdeptcd" class="input_default" navindex="18" style="left:608px; top:257px; width:75px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //2013.02.26 박준범 : 부서코드 변경시 부서코드명을 먼저 지워준다.
- opt_mkdeptnm.value = "";
-
- misfValidationCheck("02", "", "mkdeptcd,mkdeptnm" );
-
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //if( event.keyCode == 13 ) {
- //btn_search.dispatch("DOMActivate");
- // --> 위의 코드를 사용하면 input에 입력된 값이 인식이 안됨. TrustForm bug 같습니다.
- // --> 대신, 아래 코드 사용하면 input의 값이 인식이 됨
-
- //input 에서 EnterKey 이벤트 인식시 아래 function을 사용하세요!!
- inputEnterKey("ipt_mkdeptcd", "xforms-value-changed");
- //}
- ]]>
- </script>
- </input>
- <button id="btn_mkdeptcd" class="icon_search" navindex="19" style="left:687px; top:258px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var vOrigDeptcd = ipt_mkdeptcd.value; //popup을 열기전 부서 저장
-
- var recv_list = "mkdeptcd,mkdeptnm";
- misfOpenPopUpList("02", ipt_mkdeptcd,"", recv_list) ;
- ipt_mkdeptcd.refresh();
- opt_mkdeptnm.refresh();
-
- if(vOrigDeptcd != ipt_mkdeptcd.value) { //부서코드가 변경되었다면
- //조회조건 변경시 초기화 및 check
- //fSearchCondChanged("ipt_delivedeptcd");
- }
- ]]>
- </script>
- </button>
- <output id="opt_mkdeptnm" ref="/root/main/matrinfo/detail/mkdeptnm" class="output_fix" appearance="output" style="left:707px; top:257px; width:301px; height:19px; "/>
- <button id="btn_goodcd" class="icon_search" navindex="10" style="left:702px; top:133px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popgood/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/popgood/wareflag", ""); //창고별 물품인 경우에는 창고코드 넣어줌( cmb_wareflag.value )
- model.setValue("/root/popgood/returntype", "2"); //goodnm도 함께 return 받고자 할때, returntype을 "2" 로 설정.
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popgood/selectyn", "");
-
- //popup 프로그램 호출
- window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata");
- //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 보여준다.
- if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- ipt_goodcd.value = model.getValue("/root/popgood/goodcd");
- ipt_goodnm.value = model.getValue("/root/popgood/goodnm");
- }
-
- ]]>
- </script>
- </button>
- <input id="ipt_goodcd" ref="/root/main/matrinfo/detail/goodcd" class="input_default" navindex="9" style="left:608px; top:132px; width:90px; height:19px; "/>
- <caption id="caption2" class="cell_1" style="left:455px; top:155px; width:150px; height:23px; text-align:center; vertical-align:middle; ">(물류)물품명</caption>
- <line id="line7" class="line_2" style="x1:456px; y1:178px; x2:1078px; y2:178px; "/>
- <input id="ipt_goodspec" ref="/root/main/matrinfo/detail/goodspec" class="input_default" navindex="12" style="left:608px; top:182px; width:400px; height:19px; "/>
- <line id="line20" class="line_2" style="x1:456px; y1:203px; x2:1078px; y2:203px; "/>
- <caption id="caption11" class="cell_1" style="left:455px; top:180px; width:150px; height:23px; text-align:center; vertical-align:middle; ">규 격</caption>
- <line id="line9" class="line_2" style="x1:456px; y1:228px; x2:1078px; y2:228px; "/>
- <caption id="caption8" class="cell_1" style="left:455px; top:205px; width:150px; height:23px; text-align:center; vertical-align:middle; ">제조회사</caption>
- <line id="line10" class="line_2" style="x1:456px; y1:253px; x2:1078px; y2:253px; "/>
- <caption id="caption12" class="cell_1" style="left:455px; top:230px; width:150px; height:23px; text-align:center; vertical-align:middle; ">주거래처</caption>
- <button id="btn_prodcmpycd" class="icon_search" navindex="14" style="left:662px; top:208px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- rszfOpenPopUpListByWndName(ipt_prodcmpycd,"","prodcmpycd,prodcmpynm","SPRSD00160","","");
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_prodcmpycd" ref="/root/main/matrinfo/detail/prodcmpycd" class="input_default" navindex="13" style="left:608px; top:207px; width:50px; height:19px; ">
- <!--script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //if ( model.getValue(ipt_prodcmpycd.attribute("ref")).length == 0 ) model.setValue(opt_prodcmpynm.attribute("ref"),"");
- //else
- rszfValidationCheck("TRRSD00161", "prodcmpylist", "refcond,prodcmpycd,prodcmpynm","prodcmpycd," + model.getValue(ipt_prodcmpycd.attribute("ref"))+"," ,"","prodcmpycd,prodcmpynm" ,ipt_prodcmpycd,"SPRSD00160","","");
- model.refresh();
- ]]>
- </script-->
- <!--script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == 9)
- {
- if(event.shiftKey)model.setFocus("cmb_prodplce");
- else model.setFocus("ipt_goodmodel");
- }
- ]]>
- </script-->
- </input>
- <output id="opt_maincustlastsuplplcenm" ref="/root/main/matrinfo/detail/maincustlastsuplplcenm" class="output_fix" appearance="output" style="left:681px; top:232px; width:327px; height:19px; "/>
- <input id="ipt_maincustlastsuplplce" ref="/root/main/matrinfo/detail/maincustlastsuplplce" class="input_default" navindex="16" style="left:608px; top:232px; width:50px; height:19px; text-align:center; "/>
- <button id="btn_maincustlastsuplplce" class="icon_search" navindex="17" style="left:662px; top:233px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //rszfOpenPopUpListByWndName(ipt_maincustlastsuplplce,"","maincustlastsuplplce,maincustlastsuplplcenm","SPRSD00180","goodflag,prodcmpycd,prodcmpynm","cmb_goodflag,ipt_prodcmpycd,opt_prodcmpynm");
- rszfOpenPopUpListByWndName(ipt_maincustlastsuplplce,"","maincustlastsuplplce,maincustlastsuplplcenm","SPRSD00220"); // ,"instcd","opt_instcd");
- model.refresh();
- ]]>
- </script>
- </button>
- <select1 id="rdo_dentyn" ref="/root/main/matrinfo/detail/msdsflag" navindex="21" appearance="full" cols="2" overflow="visible" style="left:918px; top:283px; width:80px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>Yes</label>
- <value>Y</value>
- </item>
- <item>
- <label>No</label>
- <value>N</value>
- </item>
- </choices>
- </select1>
- <input id="ipt_goodnm" ref="/root/main/matrinfo/detail/goodnm" class="input_default" disabled="true" navindex="11" appearance="input" style="left:608px; top:157px; width:400px; height:19px; "/>
- <input id="ipt_matrcd" ref="/root/main/matrinfo/detail/matrcd" class="input_default" disabled="true" navindex="7" style="left:608px; top:82px; width:90px; height:19px; ">
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
-
- //var sMatrcd = model.getValue("/root/main/matrinfo/matrcd").getLeftPad(3,0);
- var sMatrcd = model.getValue("/root/main/matrinfo/detail/matrcd").getTrim();
- model.makeNode("/root/send/matrcd");
- model.setValue("/root/send/matrcd", sMatrcd);
- submit("TRRSM00102");
-
- if(model.getValue("/root/main/matrinfo/detail/matrcd") == "") {
- model.makeNode("/root/main/matrinfo");
- //--model.copyNode("/root/main/matrinfo/detail", "/root/hidden/matrinfo/detail");
- model.copyNode("/root/main/matrinfo", "/root/hidden/matrinfo");
- model.setValue("/root/main/matrinfo/detail/status", "i");
- model.setValue("/root/main/matrinfo/detail/matrcd", sMatrcd);
- model.setFocus("ipt_matrnm");
- model.refresh();
- }
- ]]>
- </script>
- </input>
- <caption id="caption3" class="tit_2" style="left:459px; top:400px; width:150px; height:13px; ">조사표</caption>
- <line id="line6" class="line_1" style="x1:455px; y1:415px; x2:1187px; y2:415px; "/>
- <datagrid id="grd_deptlist" nodeset="/root/main/matrinfo/deptlist" caption="부서명^취급개시일^취급종료일^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^부서코드^물질코드^old_부서코드^old_취급종료일|부서명^취급개시일^취급종료일^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^부서코드^물질코드^old_부서코드^old_취급종료일" colsep="^" colwidth="136, 86, 86, 108, 55, 55, 55, 55, 55, 55, 55, 53, 59, 77, 88" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:455px; top:420px; width:732px; height:315px; ">
- <col class="text_left" editable="false" ref="deptnm" type="inputbutton" style="text-align:left; "/>
- <col ref="tretopendd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="tretclosdd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="usge" type="input"/>
- <col class="text_center" ref="useqtym" type="input"/>
- <col class="text_center" ref="useqtyy" type="input"/>
- <col class="text_center" ref="trethrd" type="input"/>
- <col class="text_center" ref="workdcntm" type="input"/>
- <col class="text_center" ref="tretmcnt" type="input"/>
- <col class="text_center" ref="ctnryn" type="combo">
- <choices>
- <item>
- <label>-</label>
- <value/>
- </item>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col class="text_center" ref="ctnrsignyn" type="combo">
- <choices>
- <item>
- <label>-</label>
- <value/>
- </item>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="deptcd" visibility="hidden"/>
- <col ref="matrcd" visibility="hidden"/>
- <col ref="old_deptcd" visibility="hidden"/>
- <col ref="old_tretclosdd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- //if(grd_deptlist.col == grd_deptlist.colRef("deptcd")){
- // misfOpenPopUpList("02", grd_deptlist, "", "deptcd,deptnm");
- //}
- if(grd_deptlist.col == grd_deptlist.colRef("deptnm")){
- misfOpenPopUpList("02", grd_deptlist, "", "deptcd,deptnm");
- }
-
- ]]>
- </script>
- </datagrid>
- <button id="btn_deptexcel" class="btn2_letter4" style="left:1118px; top:395px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀출력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //radfSaveExcel(ipt_detailist);
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if(fileName != "") {
- grd_deptlist.saveExcel(fileName,"sheetname:savetype");
- }
- ]]>
- </script>
- </button>
- <button id="btn_insert" class="btn2_letter3" style="left:1008px; top:395px; width:53px; height:19px; text-align:left; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- misfGridIUD(grd_deptlist, "A");
-
- grd_deptlist.valueMatrix(grd_deptlist.row, grd_deptlist.colRef("tretclosdd")) = '99991231'; //취급종료일 setting
-
- //var irow = grd_deptlist.row;
- /*
- //2012.09.06 박준범 : 기관코드 combo를 추가함에 따라 instcd 코딩 추가
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("instcd")) = cmb_instcd.value;
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("taxbillflag")) = "1";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("taxbillkind")) = "4";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("kygubun")) = "N";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("ebillflag")) = "00";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("kyymd")) = getCurrentDate();
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("genrdd")) = getCurrentDate();
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("balsongymd")) = getCurrentDate();
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("flagcd")) = "1";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("iogubun")) = "I";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("sekeumgubun")) = "1";
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("gubun")) = "2";
-
- var flag = datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("genrdd")) ;
- if(flag.substr(4,4) >= '0101' && flag.substr(4,4) <= '0331'){
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("reptkind")) = "1";
- }else if(flag.substr(4,4) >= '0401' && flag.substr(4,4) <= '0630'){
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("reptkind")) = "2";
- }else if(flag.substr(4,4) >= '0701' && flag.substr(4,4) <= '0930'){
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("reptkind")) = "3";
- }else if(flag.substr(4,4) >= '1001' && flag.substr(4,4) <= '1231'){
- datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("reptkind")) = "4";
- }
- */
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn2_letter3" style="left:1063px; top:395px; width:53px; height:19px; text-align:left; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //2012.09.12 박준범 - 2줄 comment후, 아래에 행삭제 새로 구현
- //misfGridIUD(datagrid1, "D");
- //model.refresh();
-
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : insert & new : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- var status = grd_deptlist.rowStatus(grd_deptlist.row) ;
-
- if(status == 0) {
- grd_deptlist.addStatus(grd_deptlist.row, "delete");
- }else if(status == 1) {
- grd_deptlist.deleteRow(grd_deptlist.row);
- }else if(status == 2) {
- grd_deptlist.addStatus(grd_deptlist.row, "delete");
- }else if(status == 3) {
- grd_deptlist.deleteRow(grd_deptlist.row);
- }else if(status == 4) {
- grd_deptlist.removeStatus(grd_deptlist.row, "delete");
- }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
- grd_deptlist.removeStatus(grd_deptlist.row, "delete");
- }else if(status == 6) {
- grd_deptlist.removeStatus(grd_deptlist.row, "delete");
- }
-
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter4" style="left:383px; top:54px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀출력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //radfSaveExcel(ipt_detailist);
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != "") {
- grd_matrlist.saveExcel(fileName,"sheetname:savetype");
- }
- ]]>
- </script>
- </button>
- <button id="btn_gen" class="btn4_letter9" style="left:460px; top:366px; width:140px; height:22px; ">
- <caption>화학물질 종합관리</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(model.getValue("/root/main/matrinfo/detail/status") == "i") {
- messageBox("신규 코드를 등록 중입니다." + "\n" + "저장 후에 종합관리 내역을 등록할 수 있습니다. ", "I999", "");
- return;
- }
- else if(ipt_matrcd.value.length == 0) {
- messageBox("화학물질이 선택되지 않았습니다. ", "I999", "");
- return;
- }
-
- model.setValue("/root/popdata/matrcd", model.getValue("/root/main/matrinfo/detail/matrcd"));
- window.load("SMRSM00200.xrw", "modal","", "", "/root/popdata","/root/main/condition");
- ]]>
- </script>
- </button>
- <input id="ipt_prodcmpynm" ref="/root/main/matrinfo/detail/prodcmpynm" class="input_default" navindex="15" style="left:681px; top:207px; width:327px; height:19px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13; width:1195px; height:27px; ">
- <line id="line2" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:1137px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClickSaveBtn();
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" style="left:1079px; top:3px; width:56px; height:22px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/main/matrinfo/detail/matrcd") == "") {
- messageBox("삭제할 자료가 없습니다.", "I999", "");
- return;
- }
- if (messageBox("코드를", "Q001") == 6){
-
- model.setValue("/root/main/matrinfo/detail/status", "d");
- fClickSaveBtn();
- //model.reset();
- model.refresh();
- }
-
- ]]>
- </script>
- </button>
- <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- <button id="button2" class="btn4_letter2" style="left:1021px; top:3px; width:56px; height:22px; ">
- <caption>신규</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetMatrInfo();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|