123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" 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">
- <xhtml:head>
- <xhtml:title>안전재고관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <lnsfinfo>
- <lnsflist>
- </lnsflist>
- <csrdeptlist/>
- </lnsfinfo>
- <cond>
- <deptcd/>
- <srchflag/>
- <workdd/>
- </cond>
- <csrdeptlist/>
- </main>
- <send>
- <deptcd/>
- <instcdnm/>
- <gubuncd>01</gubuncd>
- <srchflag/>
- <workdd/>
- <safestocflag>3</safestocflag>
- </send>
- <init>
- <csrdeptinfo/>
- </init>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- rdo_srch.value = "D";
- fInitialize();
- ]]>
- </script>
- <submission id="TRMNG02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/lnsfinfo"/>
- <submission id="TXMNG02102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
- <submission id="TRMNG00402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/csrdeptlist"/>
- <submission id="TRMNV00001" mediatype="application/x-www-form-urlencoded" method="post"/>
- </model>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- var predept = "";
-
- function fInitialize()
- {
- fGetHardCodeInfo("/root/send/grupid", "/root/init/csrdeptinfo", "018"); // 안전재고관리구분
-
- model.setValue(opt_instcdnm.attribute("ref"), getUserInfo("dutplceinstnm")); //기관코드
- model.setValue(ipt_workdd.attribute("ref"), getCurrentDate());
-
- model.makeValue("/root/send/reqdata/instcd", getUserInfo("dutplceinstcd"));
- model.makeValue("/root/send/reqdata/useyn", "Y");
-
-
-
- var csrdept = model.getValue("/root/init/csrdeptinfo/codelist[cdgrupid='018' and cdid='" + getUserInfo("dutplcecd") + "']/cdid");
- var csryn = "N";
-
- if(csrdept == null || csrdept == "") {
- rdo_srch.value = "D";
- rdo_srch.disabled = true;
- //cmb_deptcd.disabled = true;
- cmb_deptcd.value = getUserInfo("dutplcecd");
-
- } else {
- csryn = "Y";
- }
- model.makeValue("/root/send/reqdata/csryn", csryn);
- submit("TRMNG00402");
-
- fSearch();
- }
-
- function fSearch() {
-
- var deptcd = cmb_deptcd.value;
-
- model.setValue("/root/send/deptcd" , model.getValue(cmb_deptcd.attribute("ref")));
- model.setValue("/root/send/srchflag" , model.getValue(rdo_srch.attribute("ref"))); //마스터코드구분 01:물품마스터02:창고마스터
- model.setValue("/root/send/workdd" , model.getValue(ipt_workdd.attribute("ref")));
- model.setValue("/root/send/safestocflag", model.getValue(rdo_safestocflag.attribute("ref")));
-
- submit("TRMNG02102");
-
- if(deptcd == "01" || deptcd == "02" || deptcd == "03") {
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("deptlnsfcnt")) = false;
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnsfcnt")) = false;
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnrlcnt")) = false;
- btn_sav.visible =true;
- button1.visible = true;
- button2.visible = true;
- } else {
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("deptlnsfcnt")) = true;
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnsfcnt")) = true;
- grd_lnsflist.colDisabled(grd_lnsflist.colRef("lnrlcnt")) = true;
- btn_sav.visible =false;
- button1.visible = false;
- button2.visible = false;
- }
-
- }
-
- function fSettingGoodList(pnode) {
-
- var codynode = instance1.selectNodes(pnode + "/*");
-
- var addRow = grd_lnsflist.rows - grd_lnsflist.fixedRows;
-
- for (var j = 1; j <= codynode.length; j++) {
- for (var i = grd_lnsflist.fixedRows; i < grd_lnsflist.rows; i++) {
- var goodnew = model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcd");
- var goodseqnew = model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcdseq");
- var goodold = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodcd"));
- var goodseqold = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodcdseq"));
- var goodoldnm = grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("goodnm"));
- if (goodnew == goodold && goodseqnew == goodseqold) {
- alert("<"+ goodoldnm + ">" + "은 이미 등록된 물품입니다.");
- return;
- }
- }
- if(addRow > grd_lnsflist.rows - grd_lnsflist.fixedRows)
- {
- misfGridIUD(grd_lnsflist,"A");
- addRow = grd_lnsflist.rows - grd_lnsflist.fixedRows;
- }
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcd"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodcdseq" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodcdseq"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/lngoodnm" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/lngoodnm"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodmodel"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/goodunit" , model.getValue(pnode +"/" + "grd_lnsflist" + "[" + j + "]/goodunit"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/deptcd" , model.getValue("/root/main/cond/deptcd"));
- model.setValue(grd_lnsflist.nodeset + "[" + addRow + "]/fromdd" , getCurrentDate());
-
- addRow = addRow + 1;
- }
-
- model.recalculate();
- model.refresh();
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1196" pageheight="786" guideline="1,1196;2,786;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; font-family:돋움체; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:186px; height:14px; ">안전재고 관리</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:60px; width:1195px; height:705px; font-family:돋움체; ">
- <caption id="caption12" class="tit_2" style="left:5px; top:9px; width:121px; height:14px; font-family:돋움체; ">안전재고관리</caption>
- <button id="btn_sav" class="btn5_letter2" visibility="hidden" style="left:1141px; top:3px; width:42px; height:19px; font-family:돋움체; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.makeValue("/root/send/savedata/lnsflist", getGridUpdateData(grd_lnsflist) );
-
- //alert(instance1.selectNodesXml("/root/send"));
- submit("TXMNG02102");
-
- fSearch();
- ]]>
- </script>
- </button>
- <datagrid id="grd_lnsflist" nodeset="/root/main/lnsfinfo/lnsflist" caption="구분^물품코드^상세코드^물품명^상세규격^단위^운용
안전재고^물품보관실^물품보관실^물품보관실^물품보관실^부서코드^관리자^비고|구분^물품코드^상세코드^물품명^상세규격^단위^운용
안전재고^변경전수량^최종요청수량^안전재고수량^실재고수량^부서코드^관리자^비고" colsep="^" colwidth="75, 86, 65, 130, 100, 70, 73, 80, 0, 81, 80, 100, 100, 130, 100, 100, 100, 100, 100" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="26" rowsep="|" style="left:2px; top:29px; width:1190px; height:670px; font-family:돋움체; ">
- <col ref="safestocflag" type="combo">
- <choices>
- <item>
- <label>기구</label>
- <value>1</value>
- </item>
- <item>
- <label>진료재료</label>
- <value>2</value>
- </item>
- <item>
- <label>멸균방포</label>
- <value>4</value>
- </item>
- <item>
- <label>기타</label>
- <value>9</value>
- </item>
- <item>
- <label>린넨</label>
- <value>3</value>
- </item>
- </choices>
- </col>
- <col ref="goodcd" type="inputbutton"/>
- <col ref="goodcdseq"/>
- <col ref="lngoodnm"/>
- <col ref="goodmodel"/>
- <col ref="goodunit"/>
- <col ref="deptlnsfcnt" type="input"/>
- <col ref="bflnsfcnt"/>
- <col ref="bfreqcnt"/>
- <col ref="lnsfcnt" type="input"/>
- <col ref="lnrlcnt" type="input"/>
- <col disabled="true" ref="deptcd" type="combo">
- <choices>
- <itemset nodeset="/root/main/csrdeptlist">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="lastupdtrnm" visibility="visible" ype="output"/>
- <col ref="remark" type="input" visibility="visible"/>
- <col ref="lastupdtrid" type="output" visibility="hidden"/>
- <col ref="oldlnsfcnt" visibility="hidden"/>
- <col ref="nextfromdd" visibility="hidden"/>
- <col ref="fromdd" visibility="hidden"/>
- <col ref="todd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- model.removeNodeset(gvParamPath +"/SPMNG02801_/SPMNG02801_value");
- model.property("flag") = "req";
- if (grd_lnsflist.col == grd_lnsflist.colRef("goodcd")) {//물품코드 버튼을 눌렀을 때
- model.removeNodeset("/root/copynode");
- model.makeNode("/root/copynode");
- model.refresh();
- rszfOpenPopUpListByWndName(grd_lnsflist,"","goodcd,goodcdseq,lngoodnm,goodmodel,goodunit","SPMNG02801","","", "Y");
-
- var CSV = model.getValue(gvParamPath +"/SPMNG02801_/SPMNG02801_value");
-
- setCSVToNode("/root/copynode", CSV, "grd_lnsflist");
-
- fSettingGoodList("/root/copynode");
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if ( grd_lnsflist.col == grd_lnsflist.colRef("lnsfcnt") ) {
- var oldlnsfcnt = grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("oldlnsfcnt"));
- var deptlnsfcnt = grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("deptlnsfcnt"));
- var cnt = parseInt(grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("lnsfcnt")), 10) - parseInt(grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("oldlnsfcnt")), 10);
-
- grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("deptlnsfcnt")) = parseInt(deptlnsfcnt, 10) + parseInt(cnt, 10);
- var date = getCurrentDate().toDate("YYYYMMDD");
- var nextday = (date.getAddDate(1, "D")).getDateFormat("YYYYMMDD");
- grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("nextfromdd")) = nextday;
- grd_lnsflist.valueMatrix(grd_lnsflist.row, grd_lnsflist.colRef("todd")) = getCurrentDate();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_lnsflist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <line id="line5" class="line_1" style="x1:1px; y1:26px; x2:1194px; y2:25px; font-family:돋움체; "/>
- <select1 id="rdo_gubuncd" ref="/root/send/gubuncd" disabled="true" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:770px; top:5px; width:170px; height:15px; font-family:돋움체; border-style:none; ">
- <choices>
- <item>
- <label>물품마스터</label>
- <value>01</value>
- </item>
- <item>
- <label>창고마스터</label>
- <value>02</value>
- </item>
- </choices>
- </select1>
- <button id="button1" class="btn2_letter2" visibility="hidden" style="left:1050px; top:3px; width:42px; height:19px; font-family:돋움체; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if ( cmb_deptcd.value == null || cmb_deptcd.value == "") {
- alert("부서를 선택하세요!");
- return;
- } else {
- grd_lnsflist.addRow();
- }
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter2" visibility="hidden" style="left:1095px; top:3px; width:42px; height:19px; font-family:돋움체; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_lnsflist.row > -1 && grd_lnsflist.row >= grd_lnsflist.fixedrows){
-
- var firstRow = grd_lnsflist.selectedRow(0);
- var lastRow = grd_lnsflist.selectedRow(grd_lnsflist.selectedRows-1);
-
- for(var i = firstRow; i <= lastRow; i++) {
- grd_lnsflist.rowStatus(i) = "4";
- grd_lnsflist.valueMatrix(i, grd_lnsflist.colRef("todd")) = getCurrentDate();
- }
- }
- ]]>
- </script>
- </button>
- <select1 id="rdo_safestocflag" ref="/root/send/safestocflag" appearance="full" cellspacing="5" cols="6" overflow="visible" style="left:115px; top:8px; width:375px; height:13px; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value/>
- </item>
- <item>
- <label>기구</label>
- <value>1</value>
- </item>
- <item>
- <label>진료재료</label>
- <value>2</value>
- </item>
- <item>
- <label>멸균방포</label>
- <value>4</value>
- </item>
- <item>
- <label>기타</label>
- <value>9</value>
- </item>
- <item>
- <label>린넨</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </select1>
- </group>
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:20px; width:1195px; height:35px; font-family:돋움체; background-color:#fffbf2; border-color:#ffd799; ">.,m</shape>
- <caption id="caption2" class="search_name" style="left:485px; top:30px; width:88px; height:17px; font-family:돋움체; ">부 서 명:</caption>
- <button id="btn_search" class="btn1_letter2" navindex="2" style="left:994px; top:27px; width:56px; height:22px; font-family:돋움체; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </button>
- <select1 id="cmb_deptcd" ref="/root/main/cond/deptcd" appearance="minimal" style="left:570px; top:28px; width:100px; height:19px; font-family:돋움체; ">
- <choices>
- <itemset nodeset="/root/main/csrdeptlist">
- <label ref="deptnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </select1>
- <line id="line2" class="line_4" style="x1:985px; y1:25px; x2:985px; y2:50px; font-family:돋움체; "/>
- <caption id="cap_instcd" class="search_name" style="left:10px; top:30px; width:86px; height:17px; font-family:돋움체; ">기관코드:</caption>
- <output id="opt_instcdnm" ref="/root/send/instcdnm" class="output_fix" style="left:100px; top:29px; width:160px; height:19px; font-family:돋움체; text-align:center; "/>
- <caption id="caption1" class="search_name" style="left:275px; top:30px; width:88px; height:17px; font-family:돋움체; ">부서구분:</caption>
- <select1 id="rdo_srch" ref="/root/main/cond/srchflag" appearance="full" cols="2" overflow="visible" style="left:370px; top:30px; width:110px; height:15px; font-family:돋움체; border-style:none; ">
- <choices>
- <item>
- <label>전체</label>
- <value>A</value>
- </item>
- <item>
- <label>부서별</label>
- <value>D</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if ( rdo_srch.value == "A") {
- caption2.visible = false;
- cmb_deptcd.visible = false;
- predept = cmb_deptcd.value;
- cmb_deptcd.value = "";
- grd_lnsflist.colHidden(grd_lnsflist.colRef("deptcd")) = true;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("remark")) = true;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("lastupdtrnm")) = true;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("bfreqcnt")) = true;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("bflnsfcnt")) = true;
- btn_sav.visible = false;
- button1.visible = false;
- button2.visible = false;
- fSearch();
- } else {
- caption2.visible = true;
- cmb_deptcd.visible = true;
- cmb_deptcd.value = predept;
-
- grd_lnsflist.colHidden(grd_lnsflist.colRef("deptcd")) = false;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("remark")) = false;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("lastupdtrnm")) = false;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("bfreqcnt")) = false;
- grd_lnsflist.colHidden(grd_lnsflist.colRef("bflnsfcnt")) = false;
- // btn_sav.visible = true;
- // button1.visible = true;
- // button2.visible = true;
- fSearch();
- }
- ]]>
- </script>
- </select1>
- <button id="button3" class="btn1_letter2" navindex="2" style="left:1055px; top:27px; width:56px; height:22px; font-family:돋움체; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- exeReportPreview("RPMNG02100", "XMLSTR");
- ]]>
- </script>
- </button>
- <caption id="caption3" class="search_name" style="left:685px; top:30px; width:88px; height:17px; font-family:돋움체; ">업무일자:</caption>
- <input id="ipt_workdd" ref="/root/main/cond/workdd" inputtype="date" style="left:770px; top:28px; width:90px; height:19px; font-family:돋움체; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </input>
- <button id="button4" class="btn1_letter2" navindex="2" style="left:1115px; top:27px; width:56px; height:22px; font-family:돋움체; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fileName = window.fileDialog("save", ",", false, "세탁물 안전재고관리", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
-
- if (fileName != "")
- {
- grd_lnsflist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|