123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680 |
- <?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>
- <deptcd/>
- <deptnm/>
- <matrcd/>
- <matrnm/>
- <ym/>
- <popflag/>
- <confirmflag/>
- </condition>
- <matrlist>
- <deptcd/>
- <matrcd/>
- <usedd/>
- <winqty/>
- <useqty/>
- <stocqty/>
- <workcnts/>
- <writid/>
- <writnm/>
- <cnfmnm/>
- </matrlist>
- <prntlist>
- <deptcd/>
- <deptnm/>
- <matrcd/>
- <matrnm/>
- <usedd/>
- <winqty/>
- <useqty/>
- <stocqty/>
- <workcnts/>
- <writid/>
- <writnm/>
- <cnfmnm/>
- </prntlist>
- </main>
- <send/>
- <init>
- <prvg/>
- </init>
- <hidden>
- </hidden>
- <temp>
- </temp>
- <popdata>
- <matrcd/>
- </popdata>
- <popmatr>
- <matrcd/>
- <matrnm/>
- <deptcd/>
- <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();
- 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();
- 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;
- }
- if( ipt_ym.value.length != 6 ) {
- messageBox("입력년월을 정확하게 입력하십시요. ", "E999", "");
- model.setFocus("ipt_ym");
- return;
- }
-
-
- model.copyNode("/root/send", "/root/main/condition");
-
- if(submit("TRRSM00401")) {
- //2017.02.07 본인이 작성한 자료만 수정이 가능하다.
- for(var i = 1; i < grd_matrlist.rows; i++) {
- var writid = grd_matrlist.valueMatrix(i, grd_matrlist.colRef("writid"));
- if(writid != "" && writid != getUserInfo("userid") ) {
- misfSetReadOnlyCol(grd_matrlist, "winqty,useqty,stocqty,workcnts",true,i);
- }
- }
- }
-
-
- 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;
- */
-
- /* 20150413 - 조회결과를 달력형태로 보여주도록 수정함으로써 이 check로직 불필요하여 comment처리함
- for(var i = 1; i < grd_matrlist.rows; i++) {
- if ( grd_matrlist.valueMatrix(i, grd_matrlist.colRef("usedd")).length < 8 &&
- grd_matrlist.rowStatus(i) != 0 &&
- grd_matrlist.rowStatus(i) != 4 ) {
- messageBox("일자가 정확하게 입력되지 않았습니다. 일자를 확인하십시요. ", "E999", "");
- 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("TXRSM00401")) {
- 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 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="TRRSM00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrinfo"/-->
- <submission id="TRRSM00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/matrlist"/>
- <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="TXRSM00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TXRSM00402" 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: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; "/>
- <line id="line5" class="line_4" style="x1:1024px; y1:6px; x2:1024px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1040px; 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:230px; top:8px; width:180px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:50px; top:9px; width:76px; height:17px; ">부서코드</caption>
- <input id="ipt_deptcd" ref="/root/main/condition/deptcd" class="input_default" navindex="1" style="left:131px; 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:210px; 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" class="search_name" style="left:835px; top:9px; width:76px; height:17px; ">입력년월</caption>
- <input id="ipt_ym" ref="/root/main/condition/ym" class="input_default" navindex="5" inputtype="date" format="yyyy-mm" style="left:915px; top:8px; width:76px; 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:578px; top:8px; width:232px; height:19px; "/>
- <button id="btn_matrcd" class="icon_search" navindex="4" style="left:559px; top:9px; 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>
- <input id="ipt_matrcd" ref="/root/main/condition/matrcd" class="input_default" navindex="3" maxlength="12" style="left:510px; top:8px; 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();
- }
- */
- opt_matrnm.value = "";
- ]]>
- </script>
- </input>
- <caption id="caption7" class="search_name" style="left:432px; top:9px; width:76px; height:17px; ">물질코드</caption>
- </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:131px; height:14px; ">취급일지</caption>
- <datagrid id="grd_matrlist" nodeset="/root/main/matrlist" caption="부서코드^물질코드^일자^*입고량^*사용량^*재고량^*작업내용(취급용도)^작성자^확인자^작성자id" colsep="^" colwidth="75, 60, 110, 110, 110, 110, 270, 77, 77, 69" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" navindex="8" style="left:0px; top:80px; width:1193px; height:575px; ">
- <col class="text_center" ref="deptcd" visibility="hidden"/>
- <col class="text_center" ref="matrcd" visibility="hidden"/>
- <col class="text_center" ref="usedd" format="yyyy-mm-dd"/>
- <col class="text_center" ref="winqty" type="input"/>
- <col class="text_center" ref="useqty" type="input"/>
- <col class="text_center" ref="stocqty" type="input"/>
- <col class="text_left" ref="workcnts" type="input"/>
- <col class="text_center" ref="writnm"/>
- <col class="text_center" ref="cnfmnm"/>
- <col ref="writid" visibility="hidden"/>
- <!--script type="javascript" ev:event="onclick">
- <![CDATA[
- var cur_row = grd_matrlist.row;
- fGetMatrInfo(cur_row);
- ]]>
- </script-->
- </datagrid>
- <button id="btn_excel" class="btn2_letter4" style="left:1129px; top:55px; 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>
- <caption id="caption2" style="left:16px; top:680px; width:362px; height:20px; ">2. 출력은 확정처리 이후에 가능합니다.</caption>
- <caption id="caption3" style="left:0px; top:660px; width:372px; height:20px; ">※ 1. 화학물질별 월별 확정처리 이후에는 데이터 수정이 불가합니다.</caption>
- <caption id="caption5" style="left:16px; top:700px; width:616px; height:20px; ">3. 확정처리 이후 자료를 수정하기 위해 확정취소를 원하시는 경우에는 화학물질 담당자에게 연락주시기 바랍니다.</caption>
- <button id="btn_rowdelete" class="btn2_letter3" style="left:1073px; top:55px; width:53px; height:19px; text-align:left; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.row < 1) return;
-
- if(getUserInfo("userid") != grd_matrlist.valueMatrix(grd_matrlist.row, grd_matrlist.colRef("writid")) ) {
- messageBox("본인이 작성한 자료만 행삭제가 가능합니다. ", "E999", "");
- return;
- }
-
-
- //misfGridIUD(grd_matrlist, "D");
-
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : insert & new : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- var status = grd_matrlist.rowStatus(grd_matrlist.row) ;
-
- if(status == 0) {
- grd_matrlist.addStatus(grd_matrlist.row, "delete");
- }else if(status == 1) {
- grd_matrlist.deleteRow(grd_matrlist.row);
- }else if(status == 2) {
- grd_matrlist.addStatus(grd_matrlist.row, "delete");
- }else if(status == 3) {
- grd_matrlist.deleteRow(grd_matrlist.row);
- }else if(status == 4) {
- grd_matrlist.removeStatus(grd_matrlist.row, "delete");
- }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
- grd_matrlist.removeStatus(grd_matrlist.row, "delete");
- }else if(status == 6) {
- grd_matrlist.removeStatus(grd_matrlist.row, "delete");
- }
- ]]>
- </script>
- </button>
- <caption id="caption8" style="left:16px; top:720px; width:616px; height:20px; color:#ff0000; ">4. 본인이 작성한 자료에 한해 수정 및 삭제가 가능합니다.</caption>
- </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:972px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClickSaveBtn();
- ]]>
- </script>
- </button>
- <button id="btn_cnfm" class="btn4_letter4" style="left:1031px; top:3px; width:80px; height:22px; ">
- <caption>확정처리</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.rows == 1) {
- messageBox("조회된 자료가 없습니다. \n먼저 조회 후, 확정처리를 진행하시기 바랍니다. ", "I999", "");
- return;
- }
-
- if (messageBox("확정처리 후에는 데이터수정이 불가합니다. \n계속하시겠습니까?", "Q999", "") == 6){
-
- model.setValue("/root/main/condition/confirmflag", "Y");
- model.copyNode("/root/send", "/root/main/condition");
-
- if (submit("TXRSM00402")) {
- btn_search.dispatch("DOMActivate");
-
- }
-
- //model.setValue("/root/main/matrinfo/detail/status", "d");
-
- //model.reset();
-
- // model.refresh();
- }
-
- ]]>
- </script>
- </button>
- <button id="btn_prt" class="btn6_letter2" style="left:0px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- 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;
- }
- if( ipt_ym.value.length != 6 ) {
- messageBox("입력년월을 정확하게 입력하십시요. ", "E999", "");
- model.setFocus("ipt_ym");
- return;
- }
-
-
- model.removeNodeset("/root/main/prntlist");
- model.copyNode("/root/send", "/root/main/condition");
- if (submit("TRRSM00402")) {
- model.refresh();
- exeReportPreview("RPRSM00401", "XMLSTR");//, "/root/main/payamt");
- }
-
- //조회된 자료가 없으면 먼저 조회하라고 message
- //if(grd_matrlist.rows < 3) {
- //if( instance1.selectNodes("/root/main/prntlist").length < 1 ) {
- // messageBox("조회된 결과가 존재하지 않습니다. \n먼저 조회 후 출력하십시요.", "E999", "");
- // return;
- //}
-
- //model.removeNodeset("/root/main/harmlist");
- //submit("TRRSM00302");
-
- //창고명을 report 에 넘겨주기 위해 instance에 setting한다.
- //model.setValue("/root/send/search/wareflagnm", cmb_wareflag.label);
-
-
-
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter4" disabled="true" style="left:1114px; top:3px; width:80px; height:22px; ">
- <caption>확정취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_matrlist.rows == 1) {
- messageBox("조회된 자료가 없습니다. \n먼저 조회 후, 확정취소를 진행하시기 바랍니다. ", "I999", "");
- return;
- }
-
- if (messageBox("조회된 자료의 확정을 취소하시겠습니까?", "Q999", "") == 6){
-
- model.setValue("/root/main/condition/confirmflag", "N");
- model.copyNode("/root/send", "/root/main/condition");
-
- if (submit("TXRSM00402")) {
- btn_search.dispatch("DOMActivate");
-
- }
-
- // model.refresh();
- }
-
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|