123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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>MSDS 정보 수정(물류)</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <condition>
- <goodcd/>
- <goodnm/>
- </condition>
- <goodlist>
- <fromdd/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- <prodcmpycd/>
- <prodcmpynm/>
- <maincustlastsuplplce/>
- <maincustlastsuplplcenm/>
- <frgstdd/>
- <lastpurcdd/>
- <mainusedeptnm/>
- <msdsflag/>
- <msdsflag_old/>
- </goodlist>
- <goodinfo>
- <fromdd/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- <prodcmpycd/>
- <prodcmpynm/>
- <maincustlastsuplplce/>
- <maincustlastsuplplcenm/>
- <frgstdd/>
- <lastpurcdd/>
- <mainusedeptnm/>
- <msdsflag/>
- </goodinfo>
- </main>
- <send/>
- <init/>
- <hidden>
- </hidden>
- <temp>
- </temp>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.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/goodlist");
- //model.removenode("/root/main/deptlist");
- //model.refresh();
-
- misfGridInit(grd_goodlist);
- //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.refresh();
- //2014.07.09 박준범 - 화면 open시 지연되는 것 방지위해 조회는 comment처리
- //fGetGoodList();//코드 목록 조회
-
-
-
-
-
-
-
- // if(model.getValue("/root/main/goodlist[1]/matrcd") != "") {
- // grd_goodlist.isSelected(1) = true;
- // fGetGoodInfo(1);
- // }else {
- // fCopyInstance();
- // }
- }
- //========================================================================================
- //인스턴스 Copy 함수
- //========================================================================================
- function fCopyInstance() {
- //----model.copyNode("/root/hidden/goodinfo", "/root/main/goodinfo");
-
- model.refresh();
- }
- //========================================================================================
- //코드 목록 조회 함수
- //========================================================================================
- function fGetGoodList() {
-
- misfGridInit(grd_goodlist);
- model.resetInstanceNode("/root/main/goodinfo");//조회시 기존 데이터 삭제
-
- model.copyNode("/root/send", "/root/main/condition");
- submit("TRRSM01201");
- model.refresh();
- }
-
- //========================================================================================
- //목록 -> 상세내역
- //========================================================================================
- function fGetGoodInfo(pRow) {
- if ( pRow > 0 ) {
-
- model.copyNode("/root/main/goodinfo", "/root/main/goodlist[" + pRow + "]");
- //model.refresh();
-
- opt_goodcd.refresh();
- opt_goodnm.refresh();
- opt_goodspec.refresh();
- opt_prodcmpycd.refresh();
- opt_prodcmpynm.refresh();
- opt_maincustlastsuplplce.refresh();
- opt_maincustlastsuplplcenm.refresh();
- opt_frgstdd.refresh();
- opt_lastpurcdd.refresh();
- opt_mainusedeptnm.refresh();
- rdo_msdsflag.refresh();
-
-
- }
- }
-
- //========================================================================================
- //상세내역 -> 목록
- //========================================================================================
- function fPutGoodInfo() {
- if ( true ) {
-
- var iRow = grd_goodlist.findRow(opt_goodcd.value, 1, grd_goodlist.colRef("goodcd"), true, true);
-
- //alert(iRow);
-
- model.setValue(grd_goodlist.nodeset + "[" + iRow + "]/msdsflag", rdo_msdsflag.value);
-
- if(model.getValue(grd_goodlist.nodeset + "[" + iRow + "]/msdsflag") !=
- model.getValue(grd_goodlist.nodeset + "[" + iRow + "]/msdsflag_old") ) {
- grd_goodlist.rowStatus(iRow) = 2; //0:new, 2:upadte
- } else {
- grd_goodlist.rowStatus(iRow) = 0;
- }
-
-
- //model.refresh();
- grd_goodlist.refresh();
- }
- }
- //========================================================================================
- //신규 버턴 클릭시 인스턴스 초기화
- //========================================================================================
- function fSetMatrInfo() {
- ipt_matrcd.disabled = false;
- // 아래 두줄로 변경
- //model.resetInstanceNode("/root/main/goodinfo");
- model.resetInstanceNode("/root/main/goodinfo");
- //model.resetInstanceNode("/root/main/goodinfo/deptlist");
- misfGridInit(grd_deptlist);
-
- //return;
-
- model.setFocus("ipt_matrcd");
- model.setValue("/root/main/goodinfo/status", "i");
- model.setValue("/root/main/goodinfo/msdsflag", "Y");
- // 서식에서 징수의무자 상호(법인명)으로 쓰임. 기본값으로 경북대학교병원장 셋팅.
- //model.setValue("/root/main/goodinfo/prntnm1" , "경북대학교병원장");
- fCopyInstance();
- }
-
- //========================================================================================
- // 저장버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveBtn() {
- /*
- var iCheckCount = 0;
- for(var i = 1; i < grd_goodlist.rows; i++) {
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("checkflag")) == "Y") {
- iCheckCount = 1;
- break;
- }
- }
- if(iCheckCount == 0) {
- messageBox("선택된 물품이 없습니다. 먼저 코드 등록할 물품을 선택하십시요. ", "E999", "");
- return false;
- }
- */
-
- if(opt_goodcd.value != "") {
- fPutGoodInfo();
- }
-
-
- //if(!fIsValidForSave())//저장전 유효성 검사
- // return;
-
-
- //model.resetInstanceNode("/root/send");
-
- //model.makeNode("root/send/detail");
- //model.copyNode("/root/send", "/root/main/goodinfo");
-
- model.makeValue("/root/send/goodlist", grd_goodlist.getUpdateData());
-
- //return;
-
- if(submit("TXRSM01201")) {
- btn_search.dispatch("DOMActivate");
- //fGetGoodList();//코드 목록 재조회
- //model.copyNode("/root/send", "/root/main/goodinfo");
- //submit("TRRSM00102"); //상세내역 및 조사표 재조회
- //model.setValue("/root/main/goodinfo/status", "-");
- //grd_deptlist.clearStatus();
- //--model.makeNode("/root/hidden/goodinfo");
- //model.makeNode("/root/hidden/goodinfo");
- //fCopyInstance();
-
- //ipt_matrcd.disabled = true;
- messageBox("정상적으로 처리되었습니다. .", "I999", "");
-
- }
- }
-
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- function fIsValidForSave() {
- //필수 입력 항목 체크(공통 ftHelper.js)
- //if(!isRequiredControls("ipt_matrcd","ipt_matrnm")) { //,"ipt_prodcmpycd"
- // return false;
- //}
-
- //var sStatus = model.getValue("/root/main/goodinfo/status");
- //var sNewData = fGetNodeText("/root/main/goodinfo");
- //var sOldData = fGetNodeText("/root/hidden/goodinfo");
-
- for(var i = 1; i < grd_goodlist.rows; i++) {
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("checkflag")) == "N") continue;
-
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("matrnm")) == "" ){
- messageBox("물품코드 " + grd_goodlist.valueMatrix(i, grd_goodlist.colRef("goodcd")) + " 의 물질명이 등록되지 않았습니다. ", "E999", "");
- return false;
- }
- /*
- if(grd_goodlist.valueMatrix(i, grd_goodlist.colRef("prodcmpycd")) == "" ){
- messageBox("물품코드 " + grd_goodlist.valueMatrix(i, grd_goodlist.colRef("goodcd")) + " 의 제조회사가 등록되지 않았습니다. ", "E999", "");
- return false;
- }
- */
- }
-
- return true;
-
-
-
-
-
-
- /*
- //상세내역에 변경된 정보가 있는지 확인
- if(sNewData != sOldData && sStatus == "-") { // 데이터 수정일 경우
- model.setValue("/root/main/goodinfo/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="TRRSM01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/goodlist"/>
- <submission id="TXRSM01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- </model>
- </xhtml:head>
- <xhtml:body guideline="1,1193;1,1406;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:331px; height:14px; ">MSDS 정보 수정(물류)</caption>
- <caption id="caption4" class="patient_text_black" style="left:922px; top:0px; width:272px; "/>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
- <group id="grp_sea" style="left:0px; top:10px; width:1194; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption7" class="search_name" style="left:56px; top:9px; width:79px; height:17px; ">물품코드</caption>
- <line id="line5" class="line_4" style="x1:510px; y1:6px; x2:510px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" navindex="4" style="left:528px; top:7px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_goodcd.value == "" && ipt_goodnm.value == "") {
- messageBox("조회조건을 입력하십시요. ", "E999", "");
- model.setFocus("ipt_goodcd");
- return;
- }
-
- fGetGoodList();
- ]]>
- </script>
- </button>
- <input id="ipt_goodcd" ref="/root/main/condition/goodcd" class="input_default" navindex="1" style="left:134px; top:8px; width:91px; height:19px; "/>
- <caption id="caption1" class="search_name" style="left:256px; top:9px; width:64px; height:17px; ">물품명</caption>
- <input id="ipt_goodnm" ref="/root/main/condition/goodnm" class="input_default" navindex="1" style="left:321px; top:8px; width:154px; height:19px; "/>
- </group>
- <line id="line3" class="line_1" style="x1:0px; y1:75px; x2:765px; y2:75px; "/>
- <line id="line1" class="line_1" style="x1:770px; y1:75px; x2:1190px; y2:75px; "/>
- <caption id="caption21" class="tit_2" style="left:5px; top:60px; width:214px; height:14px; ">물품 목록</caption>
- <caption id="caption20" class="tit_2" style="left:774px; top:60px; width:84px; height:13px; ">상세내역</caption>
- <datagrid id="grd_goodlist" nodeset="/root/main/goodlist" caption="물품코드^물품명^규격^제조회사^주거래처^MSDS여부^MSDS여부_old^제조회사코드^주거래처코드^최초등록일^최종구매일^사용부서^적용일자" colsep="^" colwidth="77, 188, 86, 94, 94, 72, 100, 87, 84, 77, 82, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="16" rowsep="|" navindex="5" style="left:0px; top:80px; width:765px; height:630px; ">
- <col class="text_center" ref="goodcd" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="prodcmpynm"/>
- <col ref="maincustlastsuplplcenm"/>
- <col ref="msdsflag" style="text-align:center; "/>
- <col ref="msdsflag_old" visibility="hidden"/>
- <col ref="prodcmpycd" visibility="hidden"/>
- <col ref="maincustlastsuplplce" visibility="hidden"/>
- <col ref="frgstdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="lastpurcdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="mainusedeptnm"/>
- <col ref="fromdd"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(grd_goodlist.row == 0 || grd_goodlist.col < 1) return;
-
- if(opt_goodcd.value != "") {
- fPutGoodInfo();
- }
-
- var cur_row = grd_goodlist.row;
- fGetGoodInfo(cur_row);
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_goodlist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <line id="line17" class="line_2" style="x1:770px; y1:241px; x2:1190px; y2:241px; "/>
- <caption id="caption25" class="cell_1" style="left:770px; top:81px; width:108px; height:25px; text-align:center; vertical-align:middle; ">물품코드</caption>
- <caption id="caption29" class="cell_1" style="left:770px; top:216px; width:108px; height:25px; text-align:center; vertical-align:middle; ">최초등록일</caption>
- <line id="line19" class="line_2" style="x1:770px; y1:106px; x2:1190px; y2:106px; "/>
- <caption id="caption2" class="cell_1" style="left:770px; top:108px; width:108px; height:25px; text-align:center; vertical-align:middle; ">물품명</caption>
- <line id="line7" class="line_2" style="x1:770px; y1:133px; x2:1191px; y2:133px; "/>
- <line id="line20" class="line_2" style="x1:770px; y1:160px; x2:1191px; y2:160px; "/>
- <caption id="caption11" class="cell_1" style="left:770px; top:135px; width:108px; height:25px; text-align:center; vertical-align:middle; ">규 격</caption>
- <line id="line9" class="line_2" style="x1:770px; y1:187px; x2:1191px; y2:187px; "/>
- <caption id="caption8" class="cell_1" style="left:770px; top:162px; width:108px; height:25px; text-align:center; vertical-align:middle; ">제조회사</caption>
- <line id="line10" class="line_2" style="x1:770px; y1:214px; x2:1191px; y2:214px; "/>
- <caption id="caption12" class="cell_1" style="left:770px; top:189px; width:108px; height:25px; text-align:center; vertical-align:middle; ">주거래처</caption>
- <output id="opt_maincustlastsuplplcenm" ref="/root/main/goodinfo/maincustlastsuplplcenm" class="output_fix" appearance="output" style="left:930px; top:192px; width:255px; height:19px; "/>
- <output id="opt_goodcd" ref="/root/main/goodinfo/goodcd" class="output_fix" appearance="output" style="left:881px; top:84px; width:93px; height:19px; "/>
- <output id="opt_goodnm" ref="/root/main/goodinfo/goodnm" class="output_fix" appearance="output" style="left:881px; top:111px; width:305px; height:19px; "/>
- <output id="opt_goodspec" ref="/root/main/goodinfo/goodspec" class="output_fix" appearance="output" style="left:881px; top:137px; width:305px; height:19px; "/>
- <line id="line6" class="line_2" style="x1:770px; y1:268px; x2:1190px; y2:268px; "/>
- <caption id="caption5" class="cell_1" style="left:770px; top:243px; width:108px; height:25px; text-align:center; vertical-align:middle; ">최종구매일</caption>
- <caption id="caption9" class="cell_1" style="left:770px; top:270px; width:108px; height:25px; text-align:center; vertical-align:middle; ">사용부서</caption>
- <line id="line4" class="line_2" style="x1:770px; y1:295px; x2:1190px; y2:295px; "/>
- <line id="line8" class="line_2" style="x1:769px; y1:322px; x2:1189px; y2:322px; "/>
- <caption id="caption10" class="cell_1" style="left:770px; top:297px; width:108px; height:25px; text-align:center; vertical-align:middle; ">MSDS여부</caption>
- <output id="opt_maincustlastsuplplce" ref="/root/main/goodinfo/maincustlastsuplplce" class="output_fix" appearance="output" style="left:881px; top:192px; width:44px; height:19px; "/>
- <output id="opt_prodcmpycd" ref="/root/main/goodinfo/prodcmpycd" class="output_fix" appearance="output" style="left:881px; top:165px; width:44px; height:19px; "/>
- <output id="opt_prodcmpynm" ref="/root/main/goodinfo/prodcmpynm" class="output_fix" appearance="output" style="left:930px; top:165px; width:255px; height:19px; "/>
- <output id="opt_frgstdd" ref="/root/main/goodinfo/frgstdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:881px; top:219px; width:93px; height:19px; "/>
- <output id="opt_lastpurcdd" ref="/root/main/goodinfo/lastpurcdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:881px; top:246px; width:93px; height:19px; "/>
- <output id="opt_mainusedeptnm" ref="/root/main/goodinfo/mainusedeptnm" class="output_fix" appearance="output" style="left:881px; top:273px; width:255px; height:19px; "/>
- <select1 id="rdo_msdsflag" ref="/root/main/goodinfo/msdsflag" navindex="-1" appearance="full" cellspacing="4" cols="2" overflow="visible" style="left:885px; top:300px; width:95px; height:20px; background-color:transparent; border-style:none; ">
- <choices>
- <item>
- <label>Yes</label>
- <value>Y</value>
- </item>
- <item>
- <label>No</label>
- <value>N</value>
- </item>
- </choices>
- </select1>
- <caption id="caption3" style="left:5px; top:715px; width:1050px; height:20px; color:#ff0000; ">※ 물류 물품마스터의 MSDS여부를 수정합니다.</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_letter4" style="left:1113px; top:3px; width:80px; height:22px; ">
- <caption>일괄저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClickSaveBtn();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|