123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113 |
- <?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>
- <reptdd/>
- <deptcd/>
- <deptnm/>
- <tempyn/>
- <popflag/>
- <confirmflag/>
- </condition>
- <matrlist>
- <reptdd/>
- <reptseq/>
- <matrcd/>
- <deptcd/>
- <workflag/>
- <appdd/>
- <usge/>
- <useqtym/>
- <useqtyy/>
- <trethrd/>
- <workdcntm/>
- <tretmcnt/>
- <ctnryn/>
- <ctnrsignyn/>
- <msdsyn/>
- <matrnm/>
- <prodcmpynm/>
- <maincustlastsuplplcenm/>
- <fstname/>
- <fstid/>
- <orguseqtym/>
- <orguseqtyy/>
- <orgusge/>
- <orgtrethrd/>
- <orgworkdcntm/>
- <orgtretmcnt/>
- <orgctnryn/>
- <orgctnrsignyn/>
- <orgmsdsyn/>
- </matrlist>
- </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[
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- 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();
- //ipt_reptdd.value = getCurrentDate() ; //기간 설정
-
- misfGridInit(grd_matrlist);
-
- //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_cancel.disabled = false;
- }
- }
- //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;
-
- fGetMatrList();// 조회
- } else { //전달 받은 parameter없이 그냥 여는 경우
-
- ipt_ym.value = getCurrentDate().substr(0,6); //기간 설정
-
- }
- */
- //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);
-
- ipt_deptcd.value = ipt_deptcd.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;
- //}
-
-
- model.copyNode("/root/send", "/root/main/condition");
- if (submit("TRRSM01001")) {
- //임시저장 자료를 조회시 보고일자를 찾아 setting
- if(cbx_temp.value == "Y") {
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- if(grd_matrlist.valueMatrix(i, grd_matrlist.colRef("reptdd")) != "") {
- ipt_reptdd.value = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("reptdd"));
- break;
- }
- }
- }
-
- //작성자 본인만이 기존 자료에 추가 또는 수정이 가능하다. 이에 따른 저장버튼과 전송버튼 처리
- var sFstid = ""; //최초작성자
- if(grd_matrlist.rows > grd_matrlist.fixedRows) {
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- if(grd_matrlist.valueMatrix(i, grd_matrlist.colRef("fstid")) != "") {
- sFstid = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("fstid"));
- break;
- }
- }
- }
-
- if ( sFstid == "" || sFstid == getUserInfo("userid") ) {
- btn_save.disabled = false;
- //2017.07.07 본인이 아니어도 전송 가능토록 comment처리
- //btn_send.disabled = false;
- } else {
- btn_save.disabled = true;
- //2017.07.07 본인이 아니어도 전송 가능토록 comment처리
- //btn_send.disabled = true;
- messageBox("본인이 등록한 자료가 아닌 경우, 조회만 가능합니다.", "E999", "");
- }
-
- //임시저장 자료를 조회하고, 본인이 작성한 자료의 경우에만 임시저장 자료 삭제가 가능하도록 button control
- if(cbx_temp.value == "Y" && sFstid == getUserInfo("userid") ) {
- btn_saveDelete.disabled = false;
- } else {
- btn_saveDelete.disabled = true;
- }
-
- //2017.07.07 임시저장 자료 조회시에 전송 enable
- if(cbx_temp.value == "Y" ) {
- btn_send.disabled = false;
- } else {
- btn_send.disabled = true;
- }
- 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);
- }
- }
-
- /*
-
- if(flag == "" || flag == "C" || flag == "S") {
- //grd_matrlist.cellAttribute("disabled", i, grd_matrlist.colRef("matrcd")) = "true";
- misfSetReadOnlyCol(grd_matrlist, "matrcd", true, i);
-
- 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 fClickSaveBtn() {
- /*
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- */
-
- if(ipt_reptdd.value.length < 8) {
- messageBox("보고일자가 정확하게 입력되지 않았습니다. ", "E999", "");
- model.setFocus("ipt_reptdd");
- return;
- }
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- var flag = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("workflag"));
- if (flag != "") {
- if ( grd_matrlist.valueMatrix(i, grd_matrlist.colRef("appdd")).length < 8 ) {
- messageBox("적용시작일자가 정확하게 입력되지 않았습니다. \n" + (i -1) + "번째 행을 확인하십시요. ", "E999", "");
- return;
- }
- if ( grd_matrlist.valueMatrix(i, grd_matrlist.colRef("matrcd")) == "" ) {
- messageBox("물질코드가 선택되지 않았습니다. \n" + (i -1) + "번째 행을 확인하십시요. ", "E999", "");
- return;
- }
- }
- /*
- //구분값을 기준으로 실제 추가, 변경, 중단된 row에만 status 를 표시한다.
- if(flag == "") {
- grd_matrlist.rowStatus(i) = 0;
- } else {
- grd_matrlist.rowStatus(i) = 1; //1:insert
- grd_matrlist.valueMatrix(i, grd_matrlist.colRef("reptdd")) = ipt_reptdd.value; //보고일자
- }
- */
- grd_matrlist.valueMatrix(i, grd_matrlist.colRef("reptdd")) = ipt_reptdd.value; //보고일자
-
- }
-
- /*
- //그리드에 변경된 자료가 있는지 확인
- var updtdata = getGridUpdateData(grd_matrlist);
- if (updtdata == "") {
- messageBox("변경된 데이터가", "I004");
- return;
- }
- */
-
-
- model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/condition");
- model.copyNode("/root/send", "/root/main/condition");
-
- model.makeValue("/root/send/matrlist", grd_matrlist.getUpdateDataAll("i") );
-
- //return;
-
-
- if(submit("TXRSM01001")) {
- //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;
-
- return true;
- } else {
- return false;
- }
- }
-
- //========================================================================================
- // 임시저장자료 삭제버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveDeleteBtn() {
- /*
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- */
-
- /*
- if(ipt_reptdd.value.length < 8) {
- messageBox("보고일자가 정확하게 입력되지 않았습니다. ", "E999", "");
- model.setFocus("ipt_reptdd");
- return;
- }
- */
-
- model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/condition");
- model.copyNode("/root/send", "/root/main/condition");
-
- //model.makeValue("/root/send/matrlist", grd_matrlist.getUpdateDataAll("i") );
-
- //return;
-
-
- if(submit("TXRSM01003")) {
- //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;
-
- return true;
- } else {
- return false;
- }
- }
-
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- 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 fClickSendBtn() {
- /*
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- */
-
- /*
- var iChangedRowCnt = 0;
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- //신규, 변경, 중단 작업을 하지 않은 row는 status를 초기화 한다.
- if(grd_matrlist.valueMatrix(i, grd_matrlist.colRef("workflag")) == "") {
- grd_matrlist.rowStatus(i) = 0; //0: new
- } else {
- iChangedRowCnt++;
- }
- }
-
- if(iChangedRowCnt == 0) {
- messageBox("전송할 \n먼저 저장 후에 다시 전송 버튼을 눌러주세요 ", "I999", "");
- return;
- }
-
- var updateData = getGridUpdateData(grd_matrlist);
- alert(updateData);
- if(updateData == "") {
- messageBox("작업하신 내용이 저장되지 않았습니다. \n먼저 저장 후에 다시 전송 버튼을 눌러주세요 ", "I999", "");
- 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;
-
- */
-
-
- if(submit("TXRSM01002")) {
- //임시저장 자료를 조회하여 보여준다.
- cbx_temp.value = "Y";
- 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;
-
- //messageBox("전송이 완료되었습니다. ", "I999", "");
- }
- }
- //========================================================================================
- //엑셀입력(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();
- }
-
- //컬럼(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:중단)
- }
-
- }
- ]]>
- </script>
- <!--submission id="TRRSM00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrinfo"/-->
- <submission id="TRRSM00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/prntist"/>
- <submission id="TRRSM00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/prvg"/>
- <submission id="TXRSM01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TXRSM01002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TXRSM01003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRRSM01001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrlist"/>
- </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:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <line id="line5" class="line_4" style="x1:475px; y1:7px; x2:475px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="7" style="left:490px; top:7px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fGetMatrList();
- ]]>
- </script>
- </button>
- <output id="opt_deptnm" ref="/root/main/condition/deptnm" class="output_fix" appearance="output" style="left:265px; top:8px; width:190px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:85px; top:9px; width:76px; height:17px; ">부서코드</caption>
- <input id="ipt_deptcd" ref="/root/main/condition/deptcd" class="input_default" navindex="1" style="left:166px; top:8px; 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="2" style="left:245px; top:9px; 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" style="left:823px; top:9px; width:67px; height:17px; font-weight:bold; color:#993300; ">보고일자 :</caption>
- <input id="ipt_reptdd" ref="/root/main/condition/reptdd" class="input_default" navindex="5" inputtype="date" format="yyyy-mm-dd" style="left:890px; top:8px; width:90px; height:19px; text-align:center; "/>
- <select id="cbx_temp" ref="/root/main/condition/tempyn" overflow="visible" appearance="full" style="left:559px; top:11px; width:106px; height:20px; vertical-align:middle; border-style:none; ">
- <choices>
- <item>
- <label>임시저장 자료</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfGridInit(grd_matrlist); //그리드 지움
-
- if(cbx_temp.value != "Y") {
- ipt_reptdd.value = "";
- btn_send.disabled = true;
- } else {
- btn_send.disabled = false;
- }
-
-
- ]]>
- </script>
- </select>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:1193px; y2:75px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:60px; width:80px; height:14px; ">조사표</caption>
- <button id="btn_insert" class="btn2_letter7" style="left:840px; top:55px; width:97px; height:19px; text-align:left; ">
- <caption>신규물질 추가</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- ipt_deptcd.value = ipt_deptcd.value.getTrim();
-
- if(ipt_deptcd.value == "") {
- messageBox("부서코드가 선택되지 않았습니다. \n먼저 부서코드를 선택하십시요.", "E999", "");
- model.setFocus("ipt_deptcd");
- return;
- }
-
- misfGridIUD(grd_matrlist, "A");
- var irow = grd_matrlist.row;
-
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("deptcd")) = ipt_deptcd.value;
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")) = "N"; // 작업구분 - N:신규, C:변경, S:중단
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("workflag")) = "true";
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnryn")) = "N";
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnrsignyn")) = "N";
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("msdsyn")) = "N";
-
- /*
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("usge")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("useqtym")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("useqtyy")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("trethrd")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("workdcntm")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("tretmcnt")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("ctnryn")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("ctnrsignyn")) = "false";
- grd_matrlist.cellAttribute("disabled", irow, grd_matrlist.colRef("msdsyn")) = "false";
- */
-
- //misfSetReadOnlyCol(grd_etcproflist, "pumno,incmflag,name,rrgstno,paydd,getdd,paytotamt", true, irow);
- //grd_matrlist.rowStyle(irow, "all", "background-color") = "#ff99cc";
-
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn2_letter6" style="left:1040px; top:55px; width:86px; height:19px; text-align:left; ">
- <caption>취소 및 삭제</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_matrlist.Rows <= grd_matrlist.fixedRows) return;
-
- var irow = grd_matrlist.row;
- var flag = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")); //작업구분(N:신규 C:변경 S:중단)
- if(flag == "") {
- messageBox("취소처리할 작업 내용이 없습니다. 물질을 확인하십시요. ", "E999", "");
- return;
-
- } else if(flag == "C") {
- //초기화
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")) = "";
- //grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "";
- grd_matrlist.rowStyle(irow, "all", "color") = "";
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("appdd")) = "";
- //조회시의 값으로 setting
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("usge")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgusge"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("useqtym")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orguseqtym"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("useqtyy")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orguseqtyy"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("trethrd")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgtrethrd"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workdcntm")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgworkdcntm"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("tretmcnt")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgtretmcnt"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnryn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgctnryn"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnrsignyn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgctnrsignyn"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("msdsyn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgmsdsyn"));
-
- } else if(flag == "N") {
- //삭제
- grd_matrlist.deleteRow(irow);
-
- } else if(flag == "S") {
- //초기화
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")) = "";
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "";
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("appdd")) = "";
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", false, irow);
-
- }
- ]]>
- </script>
- </button>
- <caption id="caption2" style="left:16px; top:720px; width:520px; height:20px; ">2. 임시저장한 자료는 수정 및 삭제가 가능하나, 전송 이후에는 수정이 불가합니다.</caption>
- <caption id="caption3" style="left:0px; top:700px; width:472px; height:20px; ">※ 1. 작성자 본인의 자료는 수정이 가능하나, 타인이 작성한 자료는 조회만 가능합니다.</caption>
- <button id="btn_excel" class="btn2_letter4" navindex="6" style="left:1129px; top:55px; 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_matrlist" nodeset="/root/main/matrlist" caption="구분^적용시작일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^보고일자^순번^부서코드^작성자ID^orguseqtym^orguseqtyy^orgusge^orgtrethrd^orgworkdcntm^orgtretmcnt^orgctnryn^orgctnrsignyn^orgmsdsyn|구분^적용시작일자^물질
코드^물질명^제조사^공급처^용도^월
사용량^연간
사용량^1일
취급시간^월
작업일수^취급자
수^소분용기
유무^원용기
경고표지^MSDS
유무^작성자^보고일자^순번^부서코드^작성자ID^orguseqtym^orguseqtyy^orgusge^orgtrethrd^orgworkdcntm^orgtretmcnt^orgctnryn^orgctnrsignyn^orgmsdsyn" colsep="^" colwidth="46, 92, 52, 140, 111, 111, 111, 55, 55, 55, 55, 55, 55, 55, 55, 53, 64, 32, 57, 54, 77, 72, 63, 65, 83, 74, 64, 89, 72" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" style="left:0px; top:80px; width:1193px; 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" type="inputdate" format="yyyy-mm-dd" style="color:#ff0000; text-align:center; "/>
- <col editable="false" ref="matrcd" type="inputbutton" style="text-align:center; "/>
- <col ref="matrnm"/>
- <col ref="prodcmpynm"/>
- <col ref="maincustlastsuplplcenm"/>
- <col ref="usge" type="input"/>
- <col ref="useqtym" type="input" style="text-align:center; "/>
- <col ref="useqtyy" type="input" style="text-align:center; "/>
- <col ref="trethrd" type="input" style="text-align:center; "/>
- <col ref="workdcntm" type="input" style="text-align:center; "/>
- <col ref="tretmcnt" type="input" style="text-align:center; "/>
- <col 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 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 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="reptdd" visibility="hidden"/>
- <col ref="reptseq" visibility="hidden"/>
- <col ref="deptcd" visibility="hidden"/>
- <col ref="fstid" visibility="hidden"/>
- <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"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if(grd_matrlist.col == grd_matrlist.colRef("matrcd")){
- var irow = grd_matrlist.row;
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popmatr/returntype", "3"); //prodcmpynm, maincustlastsuplplcenm도 함께 return 받고자 할때, returntype을 "3" 로 설정.
-
- //workFlag 작업구분 - N:신규, C:변경, S:중단
- var workFlag = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag"));
- if(workFlag == "N") {
- model.setValue("/root/popmatr/deptcd", "");
- } else {
- 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했는지 아닌지를 나타내는 구분값
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("matrcd")) = model.getValue("/root/popmatr/matrcd");
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("matrnm")) = model.getValue("/root/popmatr/matrnm");
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("prodcmpynm")) = model.getValue("/root/popmatr/prodcmpynm");
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("maincustlastsuplplcenm")) = model.getValue("/root/popmatr/maincustlastsuplplcenm");
- }
-
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //컬럼값 변경시 해당 Cell의 색상 변경
- // - 용도, 월사용량, 연간사용량, 1일취급시간, 월작업일수, 취급자수, 소분용기유무, 원용기경고표지, MSDS유무
- //var iCol = grd_matrlist.col;
- var iRow = grd_matrlist.row;
- var iFlagCol = grd_matrlist.colRef("workflag");
- var flag = grd_matrlist.valueMatrix(iRow, iFlagCol); //작업구분(N:신규 C:변경 S:중단)
- if(flag == "" || flag == "C") {
-
- grd_matrlist.valueMatrix(iRow, iFlagCol) = ""; //우선 workflag를 초기화하고 시작한다.
- grd_matrlist.cellStyle("color", iRow, iFlagCol) = ""; //workflag의 Font Color 초기화
-
- 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);
-
- }
-
- ]]>
- </script>
- </datagrid>
- <button id="btn_insertstop" class="btn2_letter7" style="left:940px; top:55px; width:97px; height:19px; text-align:left; ">
- <caption>사용중단 처리</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_matrlist.Rows <= grd_matrlist.fixedRows) return;
-
- var irow = grd_matrlist.row;
- var flag = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")); //작업구분(N:신규 C:변경 S:중단)
- if(flag == "") {
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")) = "S";
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
-
- } else if(flag == "C") {
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workflag")) = "S";
- grd_matrlist.rowStyle(irow, "all", "color") = "";
- grd_matrlist.cellStyle("color", irow, grd_matrlist.colRef("workflag")) = "#ff0000";
- misfSetReadOnlyCol(grd_matrlist, "usge,useqtym,useqtyy,trethrd,workdcntm,tretmcnt,ctnryn,ctnrsignyn,msdsyn", true, irow);
- //조회시의 값으로 setting
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("usge")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgusge"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("useqtym")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orguseqtym"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("useqtyy")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orguseqtyy"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("trethrd")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgtrethrd"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("workdcntm")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgworkdcntm"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("tretmcnt")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgtretmcnt"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnryn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgctnryn"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("ctnrsignyn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgctnrsignyn"));
- grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("msdsyn")) = grd_matrlist.valueMatrix(irow, grd_matrlist.colRef("orgmsdsyn"));
-
- } else if(flag == "N") {
- messageBox("신규추가 물질을 바로 사용중단 처리할 수 없습니다. ", "E999", "");
- return;
- } else if(flag == "S") {
- messageBox("이미 사용중단 처리되었습니다. ", "E999", "");
- return;
- }
- ]]>
- </script>
- </button>
- </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_letter4" style="left:912px; top:3px; width:80px; height:22px; ">
- <caption>임시저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.rows == grd_matrlist.fixedRows) return;
-
- if( fClickSaveBtn() ) {
- //임시저장 자료를 조회하여 보여준다.
- cbx_temp.value = "Y";
- fGetMatrList();//코드 목록 재조회
- }
-
- ]]>
- </script>
- </button>
- <button id="btn_send" class="btn4_letter2" disabled="true" style="left:1138px; 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;
- /* 2017.07.07 부서장이 전송처리를 하게 되면서 저장 기능을 제외하고, 아래에 구현
- if( fClickSaveBtn() ) {
-
- submit("TXRSM01002")
-
- //임시저장 자료를 조회하여 보여준다. submit 성공여부와 무관하게.
- cbx_temp.value = "Y";
- ipt_reptdd.value = ""; //보고일자 초기화
- fGetMatrList();//코드 목록 재조회
- }
- */
- if( submit("TXRSM01002")) {
-
- //임시저장 자료를 조회하여 보여준다.
- cbx_temp.value = "Y";
- ipt_reptdd.value = ""; //보고일자 초기화
- fGetMatrList();//코드 목록 재조회
- }
- ]]>
- </script>
- </button>
- <button id="btn_saveDelete" class="btn4_letter9" disabled="true" style="left:995px; top:3px; width:140px; height:22px; ">
- <caption>임시저장 자료 삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(cbx_temp.value != "Y" || grd_matrlist.rows == grd_matrlist.fixedRows) {
- messageBox("먼저 임시저장 자료를 조회한 후, 삭제 작업을 하십시요.", "I999", "");
- return;
- }
-
- //작성자 본인만이 기존 자료에 추가 또는 수정이 가능하다. 이에 따른 저장버튼과 전송버튼 처리
- var sFstid = ""; //최초작성자
- if(grd_matrlist.rows > grd_matrlist.fixedRows) {
- for(var i = grd_matrlist.fixedRows; i < grd_matrlist.rows; i++) {
- if(grd_matrlist.valueMatrix(i, grd_matrlist.colRef("fstid")) != "") {
- sFstid = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("fstid"));
- break;
- }
- }
- }
-
- //본인이 작성한 자료의 경우에만 임시저장 자료 삭제가 가능하다.
- if(sFstid != getUserInfo("userid") ) {
- messageBox("본인이 등록한 자료만 삭제가 가능합니다.", "E999", "");
- return;
- }
-
- if (messageBox("임시저장된 부서 조사표 자료를 삭제하시겠습니까?", "Q999") != 6) return;
-
- if( fClickSaveDeleteBtn() ) {
- //임시저장 자료를 조회하여 보여준다.
-
- fGetMatrList();//코드 목록 재조회
- }
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|