123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988 |
- <?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>
- <reptddfrom/>
- <reptddto/>
- <deptcd/>
- <deptnm/>
- <prcsstat/>
- <matrcd/>
- <matrnm/>
- <popflag/>
- <confirmflag/>
- </condition>
- <reptlist>
- <reptdd/>
- <reptseq/>
- <deptcd/>
- <deptnm/>
- </reptlist>
- <matrlist>
- <reptdd/>
- <reptseq/>
- <matrcd/>
- <workflag/>
- <appdd/>
- <usge/>
- <useqtym/>
- <useqtyy/>
- <trethrd/>
- <workdcntm/>
- <tretmcnt/>
- <ctnryn/>
- <ctnrsignyn/>
- <msdsyn/>
- <matrnm/>
- <prodcmpynm/>
- <maincustlastsuplplcenm/>
- <fstname/>
- <orguseqtym/>
- <orguseqtyy/>
- <orgusge/>
- <orgtrethrd/>
- <orgworkdcntm/>
- <orgtretmcnt/>
- <orgctnryn/>
- <orgctnrsignyn/>
- <orgmsdsyn/>
- <trnsname/>
- </matrlist>
- <excellist/>
- </main>
- <send/>
- <init>
- <prvg/>
- </init>
- <hidden>
- </hidden>
- <temp>
- </temp>
- <popdata->
- <matrcd-/>
- </popdata->
- <popmatr>
- <matrcd/>
- <matrnm/>
- <deptcd/>
- <prodcmpynm/>
- <maincustlastsuplplcenm/>
- <returntype/>
- <selectyn/>
- </popmatr>
- </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/dateHelper.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[
- //컬럼(pColname) 의 값이 원래의 값(org + 컬럼명인 컬럼)과 다른 경우 해당 컬럼의 font색상을 변경하고 구분을 "C" 로 변경한다.
- //pColname : 컬럼명
- //pRow : Row index
- //pFlagCol : 구분(workflag)을 나타내는 컬럼의 index
- function fSetStyleAndFlag(pColname, pRow, pFlagCol)
- {
-
- var pCol = grd_matrlist.colRef(pColname);
-
- if(grd_matrlist.valueMatrix(pRow, pCol) == grd_matrlist.valueMatrix(pRow, grd_matrlist.colRef("org" + pColname)) ) {
- grd_matrlist.cellStyle("color", pRow, pCol) = ""; //Font Color
-
- //구분 컬럼
- //grd_matrlist.cellStyle("color", pRow, pFlagCol) = ""; //Font Color
- } else {
- grd_matrlist.cellStyle("color", pRow, pCol) = "#ff0000";
- //구분 컬럼
- grd_matrlist.cellStyle("color", pRow, pFlagCol) = "#ff0000";
-
- //grd_matrlist.valueMatrix(pRow, pFlagCol) = "C"; //작업구분(N:신규 C:변경 S:중단)
- }
-
- }
-
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm() {
- //model.removenode("/root/main/matrlist");
- //model.removenode("/root/main/deptlist");
- //model.refresh();
-
- //model.setValue("/root/main/condition/fromdd" , getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat("YYYYMMDD") ); //기간 설정 //getCurrentDate() //.substr(0,6)); //.toDate().getAddDate(-1, "D").getDateFormat("YYYYMMDD")
- //model.setValue("/root/main/condition/todd" , getCurrentDate() ); //기간 설정 //.substr(0,6));
- //model.setValue("/root/main/condition/ym" , getCurrentDate().substr(0,6) ); //기간 설정 //.substr(0,6));
- //ipt_fromdd.refresh();
- //ipt_todd.refresh();
- //ipt_ym.refresh();
- //조회기간 default 설정 : 해당월 1일~말일
- var cur_yymm = getCurrentDate().substring(0, 6); //년월
- var month_day = getCurrentDate().toDate().getMonthDay(); //해당월의 일자
- ipt_reptddfrom.value = cur_yymm + '01' ; //기간 설정
- ipt_reptddto.value = cur_yymm + month_day; //기간 설정
-
- rdo_prcsstat.value = "T"; //진행상태 (S:임시저장, T:근로복지과 전송완료, C:확정)
- misfGridInit(grd_reptlist);
- misfGridInit(grd_matrlist);
- misfGridInit(grd_excellist);
-
- //model.copyNode("/root/send", "/root/main/condition");
-
- //화학물질 관리권한 확인 : 관리권한이 있는 자만 확정 및 전송취소 가능
- if (submit("TRRSM00403")) {
-
- //alert(model.getValue("/root/init/prvg/cnt"));
-
- if(model.getValue("/root/init/prvg/cnt") == "1") {
- btn_save.visible = true;
- btn_send.visible = true;
- }
- }
- /*
- //model.refresh();
-
- if (model.getValue("/root/main/condition/popflag") == "Y") { //popup으로 호출된 경우
- //ipt_deptcd.disabled = true;
- //btn_deptcd.disabled = true;
- //ipt_matrcd.disabled = true;
- //btn_matrcd.disabled = true;
-
- //btn_cnfm.visible = false;
- //btn_cancel.visible = false;
-
- fGetReptList();// 조회
- } else { //전달 받은 parameter없이 그냥 여는 경우
-
- ipt_ym.value = getCurrentDate().substr(0,6); //기간 설정
-
- }
- */
- //fGetReptList();//코드 목록 조회
- // 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 fGetReptList() {
- //model.removenode("/root/main/matrlist");//조회시 기존 데이터 삭제
- //misfGridInit(grd_matrlist);
-
- if( ipt_reptddfrom.value.length != 8 ) {
- messageBox("보고일자를 정확하게 입력하십시요. ", "E999", "");
- model.setFocus("ipt_reptddfrom");
- return;
- }
- if( ipt_reptddto.value.length != 8 ) {
- messageBox("보고일자를 정확하게 입력하십시요. ", "E999", "");
- model.setFocus("ipt_reptddto");
- return;
- }
-
- ipt_deptcd.value = ipt_deptcd.value.getTrim();
- ipt_matrcd.value = ipt_matrcd.value.getTrim();
-
- /*
- if(ipt_deptcd.value == "") {
- messageBox("부서코드가 선택되지 않았습니다. \n먼저 부서코드를 선택하십시요.", "E999", "");
- model.setFocus("ipt_deptcd");
- return;
- }
- */
-
- //if(ipt_matrcd.value == "") {
- // messageBox("물질코드가 선택되지 않았습니다. \n먼저 물질코드를 선택하십시요.", "E999", "");
- // model.setFocus("ipt_matrcd");
- // return;
- //}
-
- misfGridInit(grd_reptlist);
- misfGridInit(grd_matrlist);
- misfGridInit(grd_excellist);
-
- model.copyNode("/root/send", "/root/main/condition");
- if (submit("TRRSM01101")) {
- /*
- //작성자 본인만이 기존 자료에 추가 또는 수정이 가능하다. 이에 따른 저장버튼과 전송버튼 처리
- if(grd_matrlist.rows > grd_matrlist.fixedRows) {
- if ( grd_matrlist.valueMatrix(grd_matrlist.fixedRows, grd_matrlist.colRef("fstid")) != getUserInfo("userid") ) {
- btn_save.disabled = true;
- btn_send.disabled = true;
- messageBox("본인이 등록한 자료가 아닌 경우, 조회만 가능합니다.", "E999", "");
- } else {
- if(rdo_prcsstat.value == "S") { //진행상태 S: 임시저장
- btn_save.disabled = false;
- btn_send.disabled = false;
- } else {
- btn_save.disabled = true;
- btn_send.disabled = true;
- }
- }
- }
-
- grd_matrlist.colDisabled(grd_matrlist.colRef("workflag")) = true;
- //grd_matrlist.colDisabled(grd_matrlist.colRef("prcsstat")) = true;
-
-
- if(rdo_prcsstat.value == "T") { //진행상태 T: 근로복지과 전송완료
- grd_matrlist.colDisabled(grd_matrlist.colRef("reptdd")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("matrcd")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("appdd")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("usge")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("useqtym")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("useqtyy")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("trethrd")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("workdcntm")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("tretmcnt")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("ctnryn")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("ctnrsignyn")) = true;
- grd_matrlist.colDisabled(grd_matrlist.colRef("msdsyn")) = true;
-
- } else { //진행상태 S : 임시저장
- grd_matrlist.colDisabled(grd_matrlist.colRef("reptdd")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("matrcd")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("appdd")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("usge")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("useqtym")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("useqtyy")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("trethrd")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("workdcntm")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("tretmcnt")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("ctnryn")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("ctnrsignyn")) = false;
- grd_matrlist.colDisabled(grd_matrlist.colRef("msdsyn")) = false;
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- var stat = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("workflag")); //작업구분(N:신규 C:변경 S:중단)
- if(stat == "S") {
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("usge")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("useqtym")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("useqtyy")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("trethrd")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("workdcntm")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("tretmcnt")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("ctnryn")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("ctnrsignyn")) = "false";
- grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("msdsyn")) = "false";
- }
-
- }
- }
- */
- 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 fClickSendBtn() {
- /*
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- */
- /*
- model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/condition");
- model.copyNode("/root/send", "/root/main/condition");
-
- model.makeValue("/root/send/matrlist", grd_matrlist.getUpdateData());
- */
-
- //return;
-
- model.resetInstanceNode("/root/send");
- model.makeValue("/root/send/reptdd", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptdd")) );
- model.makeValue("/root/send/reptseq", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptseq")) );
-
-
- if(submit("TXRSM01101")) {
- fGetReptList();//보고 목록 재조회
- //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 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;
- }
- }
-
- //========================================================================================
- // 확정 버튼 클릭시 수행 함수
- //========================================================================================
- function fClickSaveBtn() {
- /*
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- var updateData = getGridUpdateData(grd_matrlist);
- if(updateData != "") {
- messageBox("작업하신 내용이 저장되지 않았습니다. \n먼저 저장 후에 다시 전송 버튼을 눌러주세요 ", "I999", "");
- return;
- }
- */
-
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- grd_matrlist.rowStatus(i) = 2; //2: update
- }
-
- model.resetInstanceNode("/root/send");
- model.makeValue("/root/send/reptdd", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptdd")) );
- model.makeValue("/root/send/reptseq", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptseq")) );
- //model.makeNode("root/send/condition");
- //model.copyNode("/root/send", "/root/main/condition");
-
- model.makeValue("/root/send/matrlist", grd_matrlist.getUpdateData());
-
- //return;
-
- if(submit("TXRSM01102")) {
- fGetReptList();//코드 목록 재조회
- //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;
- }
- }
- //========================================================================================
- //엑셀입력(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="TRRSM00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrinfo"/-->
- <submission id="TRRSM00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/prvg"/>
- <submission id="TXRSM01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRRSM01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/reptlist"/>
- <submission id="TRRSM01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrlist"/>
- <submission id="TXRSM01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1193;" 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:1194px; height:60px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line5" class="line_4" style="x1:840px; y1:8px; x2:840px; y2:50px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="8" style="left:855px; top:10px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetReptList();
- ]]>
- </script>
- </button>
- <output id="opt_deptnm" ref="/root/main/condition/deptnm" class="output_fix" appearance="output" style="left:216px; top:32px; width:190px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:35px; top:33px; width:76px; height:17px; ">부서코드</caption>
- <input id="ipt_deptcd" ref="/root/main/condition/deptcd" class="input_default" navindex="4" style="left:117px; top:32px; width:75px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfGridInit(grd_matrlist); //그리드 지움
-
- //2013.02.26 박준범 : 부서코드 변경시 부서코드명을 먼저 지워준다.
- opt_deptnm.value = "";
-
- misfValidationCheck("02", "", "deptcd,deptnm" );
-
- ]]>
- </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_deptcd", "xforms-value-changed");
- //}
- ]]>
- </script>
- </input>
- <button id="btn_deptcd" class="icon_search" navindex="5" style="left:196px; top:33px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var vOrigDeptcd = ipt_deptcd.value; //popup을 열기전 부서 저장
-
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ipt_deptcd,"", recv_list) ;
- ipt_deptcd.refresh();
- opt_deptnm.refresh();
-
- if(vOrigDeptcd != ipt_deptcd.value) { //부서코드가 변경되었다면
- //조회조건 변경시 초기화 및 check
- //fSearchCondChanged("ipt_delivedeptcd");
- misfGridInit(grd_matrlist); //그리드 지움
-
- }
- ]]>
- </script>
- </button>
- <caption id="caption9" class="search_name" style="left:35px; top:9px; width:81px; height:17px; ">보고일자</caption>
- <input id="ipt_reptddfrom" ref="/root/main/condition/reptddfrom" class="input_default" navindex="1" inputtype="date" format="yyyy-mm-dd" style="left:117px; top:8px; width:90px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfGridInit(grd_matrlist); //그리드 지움
-
- ]]>
- </script>
- </input>
- <caption id="caption7" style="left:210px; top:8px; width:12px; height:20px; font-weight:bold; ">~</caption>
- <input id="ipt_reptddto" ref="/root/main/condition/reptddto" class="input_default" navindex="2" inputtype="date" format="yyyy-mm-dd" style="left:225px; top:8px; width:90px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfGridInit(grd_matrlist); //그리드 지움
-
- ]]>
- </script>
- </input>
- <output id="opt_matrnm" ref="/root/main/condition/matrnm" class="output_fix" appearance="output" style="left:575px; top:32px; width:242px; height:19px; "/>
- <input id="ipt_matrcd" ref="/root/main/condition/matrcd" class="input_default" navindex="6" maxlength="12" style="left:507px; top:32px; width:45px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //조회조건 변경시 Grid 초기화
- //fSearchCondChanged();
- misfGridInit(grd_matrlist); //그리드 지움
-
- if(ipt_matrcd.value == ""){
- model.setValue("/root/main/condition/matrnm", "");
- opt_matrnm.refresh();
- }
- ]]>
- </script>
- </input>
- <button id="btn_matrcd" class="icon_search" navindex="7" style="left:556px; top:33px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //popup 에 전달할 parameter를 setting한다.
- //model.setValue("/root/popmatr/returntype", "2"); //matrnm도 함께 return 받고자 할때, returntype을 "2" 로 설정.
- model.setValue("/root/popmatr/deptcd", ipt_deptcd.value);
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popmatr/selectyn", "");
-
- //popup 프로그램 호출
- window.load("SPRSM00100.xrw", "modal","", "", "/root/popmatr","/root/popdata");
- //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
- if(model.getValue("/root/popmatr/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- //조회조건 변경시 Grid 초기화
- //fSearchCondChanged();
- misfGridInit(grd_matrlist); //그리드 지움
-
- model.setValue("/root/main/condition/matrcd", model.getValue("/root/popmatr/matrcd"));
- model.setValue("/root/main/condition/matrnm", model.getValue("/root/popmatr/matrnm"));
- ipt_matrcd.refresh();
- opt_matrnm.refresh();
-
- }
-
- ]]>
- </script>
- </button>
- <caption id="caption8" class="search_name" style="left:426px; top:33px; width:76px; height:17px; ">물질코드</caption>
- <select1 id="rdo_prcsstat" ref="/root/main/condition/prcsstat" navindex="3" appearance="full" cellspacing="2" cols="4" overflow="visible" style="left:509px; top:10px; width:277px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>임시저장</label>
- <value>S</value>
- </item>
- <item>
- <label>전송완료</label>
- <value>T</value>
- </item>
- <item>
- <label>확정완료</label>
- <value>C</value>
- </item>
- <item>
- <label>전 체</label>
- <value>%</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- if(model.getValue("/root/init/prvg/cnt") == "1" ) {//화학물질 관리권한 확인 : 관리권한이 있는 자만 확정 및 전송취소 가능
- // 전송완료된 자료만 확정 및 전송취소 처리 대상임
- if(rdo_prcsstat.value == "T" ) { //진행상태 (S:임시저장, T:근로복지과 전송완료, C:확정)
- btn_save.disabled = false;
- btn_send.disabled = false;
- } else {
- btn_save.disabled = true;
- btn_send.disabled = true;
- }
- }
-
- misfGridInit(grd_reptlist);
- misfGridInit(grd_matrlist);
-
- ]]>
- </script>
- </select1>
- <caption id="caption2" class="search_name" style="left:426px; top:9px; width:81px; height:17px; ">진행상태</caption>
- <button id="btn_excelAll" class="btn1_letter9" navindex="8" style="left:915px; top:10px; width:111px; height:22px; text-align:left; ">
- <caption>전체 내용 엑셀출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //radfSaveExcel(grd_matrlist);
- misfSaveExcel(grd_excellist, "화학물질 취급관리 조사 내역 전체");
- //var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- //grd_matrlist.saveExcel(fileName,"sheetname:savetype");
- ]]>
- </script>
- </button>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:95px; x2:230px; y2:95px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:80px; width:80px; height:14px; ">보고 목록</caption>
- <button id="btn_excel" class="btn2_letter4" style="left:1129px; top:75px; width:64px; height:19px; text-align:left; ">
- <caption>엑셀출력</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //radfSaveExcel(grd_matrlist);
- misfSaveExcel(grd_matrlist, "화학물질 취급관리 조사 내역");
- //var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- //grd_matrlist.saveExcel(fileName,"sheetname:savetype");
- ]]>
- </script>
- </button>
- <datagrid id="grd_reptlist" nodeset="/root/main/reptlist" caption="보고일자^순번^부서명^부서코드|보고일자^순번^부서명^부서코드" colsep="^" colwidth="73, 26, 114, 100" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="16" rowsep="|" style="left:0px; top:100px; width:230px; height:610px; ">
- <col ref="reptdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reptseq" style="text-align:center; "/>
- <col ref="deptnm"/>
- <col ref="deptcd" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_reptlist.rows <= grd_reptlist.fixedRows) return;
-
- misfGridInit(grd_matrlist);
-
- model.resetInstanceNode("/root/send");
- model.makeValue("/root/send/reptdd", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptdd")) );
- model.makeValue("/root/send/reptseq", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("reptseq")) );
- model.makeValue("/root/send/deptcd", grd_reptlist.valueMatrix(grd_reptlist.row, grd_reptlist.colRef("deptcd")) );
-
- if(submit("TRRSM01102")) {
-
- for(var irow = grd_matrlist.fixedRows; irow < grd_matrlist.rows; irow++) {
- var flag = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")); //작업구분(N:신규 C:변경 S:중단)
- if(flag == "") {
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "";
- //misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
-
- } else if(flag == "N") {
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
-
- } else if(flag == "C") {
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
- //misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
-
- //var iCol = grd_matrlist.col;
- //var iRow =grd_matrlist.row;
- var iFlagCol = grd_matrlist.colRef("workflag");
-
- fSetStyleAndFlag("usge", irow, iFlagCol);
- fSetStyleAndFlag("useqtym", irow, iFlagCol);
- fSetStyleAndFlag("useqtyy", irow, iFlagCol);
- fSetStyleAndFlag("trethrd", irow, iFlagCol);
- fSetStyleAndFlag("workdcntm", irow, iFlagCol);
- fSetStyleAndFlag("tretmcnt", irow, iFlagCol);
- fSetStyleAndFlag("ctnryn", irow, iFlagCol);
- fSetStyleAndFlag("ctnrsignyn", irow, iFlagCol);
- fSetStyleAndFlag("msdsyn", irow, iFlagCol);
-
- } else if(flag == "S") {
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
- //misfSetReadOnlyCol(grd_matrlist, "matrcd", true, irow);
- //misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
- }
- }
-
- model.refresh();
- }
-
- //화살표키를 사용하여 Row가 변경되지 못하도록 focus를 다른 control로 강제로 옮긴다.
- model.setFocus("grd_matrlist");
-
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_matrlist" nodeset="/root/main/matrlist" caption="구분^적용시작
일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^전송자^보고일자^순번^orguseqtym^orguseqtyy^orgusge^orgtrethrd^orgworkdcntm^orgtretmcnt^orgctnryn^orgctnrsignyn^orgmsdsyn|구분^적용시작
일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^전송자^보고일자^순번^orguseqtym^orguseqtyy^orgusge^orgtrethrd^orgworkdcntm^orgtretmcnt^orgctnryn^orgctnrsignyn^orgmsdsyn" colsep="^" colwidth="35, 73, 34, 126, 93, 93, 83, 55, 55, 55, 55, 45, 55, 55, 43, 49, 49, 77, 32, 73, 86, 63, 71, 81, 66, 71, 86, 81" mergecellsfixedrows="bycolrec" rowheight="16" rowsep="|" style="left:235px; top:100px; width:958px; height:610px; ">
- <col disabled="true" ref="workflag" type="combo" style="font-weight:bold; text-align:center; ">
- <choices>
- <item>
- <label>-</label>
- <value/>
- </item>
- <item>
- <label>신규</label>
- <value>N</value>
- </item>
- <item>
- <label>변경</label>
- <value>C</value>
- </item>
- <item>
- <label>중단</label>
- <value>S</value>
- </item>
- </choices>
- </col>
- <col ref="appdd" format="yyyy-mm-dd" style="color:#ff0000; text-align:center; "/>
- <col editable="false" ref="matrcd" style="text-align:center; "/>
- <col ref="matrnm"/>
- <col ref="prodcmpynm"/>
- <col ref="maincustlastsuplplcenm"/>
- <col ref="usge"/>
- <col ref="useqtym" style="text-align:center; "/>
- <col ref="useqtyy" style="text-align:center; "/>
- <col ref="trethrd" style="text-align:center; "/>
- <col ref="workdcntm" style="text-align:center; "/>
- <col ref="tretmcnt" style="text-align:center; "/>
- <col disabled="true" ref="ctnryn" type="combo" style="text-align:center; ">
- <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 disabled="true" ref="ctnrsignyn" type="combo" style="text-align:center; ">
- <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 disabled="true" ref="msdsyn" type="combo" style="text-align:center; ">
- <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="fstname" style="text-align:center; "/>
- <col ref="trnsname" style="text-align:center; "/>
- <col ref="reptdd" visibility="hidden" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reptseq" visibility="hidden" style="text-align:center; "/>
- <col ref="orguseqtym" visibility="hidden"/>
- <col ref="orguseqtyy" visibility="hidden"/>
- <col ref="orgusge" visibility="hidden"/>
- <col ref="orgtrethrd" visibility="hidden"/>
- <col ref="orgworkdcntm" visibility="hidden"/>
- <col ref="orgtretmcnt" visibility="hidden"/>
- <col ref="orgctnryn" visibility="hidden"/>
- <col ref="orgctnrsignyn" visibility="hidden"/>
- <col ref="orgmsdsyn" visibility="hidden"/>
- </datagrid>
- <line id="line1" class="line_1" style="x1:235px; y1:95px; x2:1193px; y2:95px; "/>
- <caption id="caption3" class="tit_2" style="left:235px; top:80px; width:80px; height:13px; ">조사 내역</caption>
- <datagrid id="grd_excellist" nodeset="/root/main/excellist" visibility="hidden" caption="보고일자^순번^부서명^구분^적용시작
일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^전송자|보고일자^순번^부서명^구분^적용시작
일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^전송자" colsep="^" colwidth="83, 34, 135, 35, 73, 34, 126, 93, 93, 83, 55, 55, 55, 55, 45, 55, 55, 43, 49, 49" mergecellsfixedrows="bycolrec" rowheight="16" rowsep="|" style="left:280px; top:190px; width:688px; height:185px; ">
- <col ref="reptdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reptseq" style="text-align:center; "/>
- <col ref="deptnm"/>
- <col disabled="true" ref="workflag" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>-</label>
- <value/>
- </item>
- <item>
- <label>신규</label>
- <value>N</value>
- </item>
- <item>
- <label>변경</label>
- <value>C</value>
- </item>
- <item>
- <label>중단</label>
- <value>S</value>
- </item>
- </choices>
- </col>
- <col ref="appdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col editable="false" ref="matrcd" style="text-align:center; "/>
- <col ref="matrnm"/>
- <col ref="prodcmpynm"/>
- <col ref="maincustlastsuplplcenm"/>
- <col ref="usge"/>
- <col ref="useqtym" style="text-align:center; "/>
- <col ref="useqtyy" style="text-align:center; "/>
- <col ref="trethrd" style="text-align:center; "/>
- <col ref="workdcntm" style="text-align:center; "/>
- <col ref="tretmcnt" style="text-align:center; "/>
- <col disabled="true" ref="ctnryn" type="combo" style="text-align:center; ">
- <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 disabled="true" ref="ctnrsignyn" type="combo" style="text-align:center; ">
- <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 disabled="true" ref="msdsyn" type="combo" style="text-align:center; ">
- <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="fstname" style="text-align:center; "/>
- <col ref="trnsname" style="text-align:center; "/>
- </datagrid>
- </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" visibility="hidden" style="left:1137px; top:3px; width:56px; height:22px; ">
- <caption>확정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.rows == grd_matrlist.fixedRows) return;
-
- if (messageBox( "해당 조사 내역을 확정처리 하시겠습니까? ", "Q999", "") != 6 ) return;
-
- fClickSaveBtn();
- ]]>
- </script>
- </button>
- <button id="btn_send" class="btn4_letter4" visibility="hidden" style="left:1054px; top:3px; width:80px; height:22px; ">
- <caption>전송취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.rows == grd_matrlist.fixedRows) return;
- if (messageBox( "해당 조사내역을 전송취소 하시겠습니까? ", "Q999", "") != 6 ) return;
-
- fClickSendBtn();
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|