123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- <?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>SET 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <goodset>
- <goodsetlist/>
- </goodset>
- </list>
- </main>
- <target>
- <defaultvalue>
- <instcd/>
- <setplceordflag/>
- <goodcd/>
- <goodnm/>
- <goodflag/>
- </defaultvalue>
- </target>
- <send>
- <instcd/>
- <proddrugsetflag/>
- <goodcd/>
- <goodnm/>
- <save>
- <goodsetlist/>
- </save>
- <goodflag/>
- </send>
- <init/>
- <hidden/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //화면 Control을 초기화한다
- fCheckAuth();
- fInitialize();
- ]]>
- </script>
- <submission id="TRRSC00210" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list/goodset"/>
- <submission id="TXRSC00210" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- misfGridInit(grd_setlist);
-
- misfMsterDetailSet(grd_setlist,null, "TRRSC00210" ,"Y");
- misfGridComboComCdList("R0034",grd_setlist,"compsgoodunit");
- misfComboComCdListMulti("Z0007,R0068", "cmb_instcd,cmb_proddrugsetflag"); //기관코드,set 제제약 구분
- model.refresh();
- model.setValue("/root/send/instcd", model.getValue(PURTARGET_NODE + "/instcd"));
- model.setValue("/root/send/proddrugsetflag", model.getValue(PURTARGET_NODE + "/proddrugsetflag"));
- model.setValue("/root/send/goodcd", model.getValue(PURTARGET_NODE + "/goodcd"));
- model.setValue("/root/send/goodnm", model.getValue(PURTARGET_NODE + "/goodnm"));
- model.setValue("/root/send/goodflag", model.getValue(PURTARGET_NODE + "/goodflag"));
-
- btn_search.dispatch("DOMActivate");
- model.refresh();
-
- }
- function fCheckAuth() {
- btn_search.disabled = !checkAuth("R") ;
- btn_save.disabled = !checkAuth("X") ;
- }
-
- function fDefaultSetting(prow)
- {
- model.setValue(grd_setlist.nodeset + "["+ prow + "]/instcd" , model.getValue("root/send/instcd"));
- model.setValue(grd_setlist.nodeset + "["+ prow+ "]/proddrugsetflag" , model.getValue("root/send/proddrugsetflag"));
- model.setValue(grd_setlist.nodeset + "["+ prow + "]/goodcd" , model.getValue("root/send/goodcd"));
- }
-
- function fSettingGoodList(pnode, nodename){
-
- var codynode = instance1.selectNodes(pnode + "/*");
- var addRow = grd_setlist.rows - grd_setlist.fixedRows;
- if(model.getValue(grd_setlist.nodeset + "/goodsetlist[" + addRow + "]/comdrugtoolcd").length > 0)addRow = addRow + 1;
-
- for (var j = 1; j <= codynode.length ; j++) {
- if(addRow > grd_setlist.rows - grd_setlist.fixedRows)
- {
- misfGridIUD(grd_setlist,"A");
- addRow = grd_setlist.rows - grd_setlist.fixedRows;
- fDefaultSetting(addRow );
- }
- model.setValue(grd_setlist.nodeset + "[" + addRow + "]/comdrugtoolcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
- model.setValue(grd_setlist.nodeset + "[" + addRow + "]/consitemnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
- model.setValue(grd_setlist.nodeset + "[" + addRow + "]/compsgoodunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
- model.setValue(grd_setlist.nodeset + "[" + addRow + "]/consqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/userqty"));
- addRow = addRow + 1;
- }
-
- //model.removenode(pnode);
- model.refresh();
- }
- function fCheckRetrieveData(pmsg)
- {
- if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("기관코드는" ,"I003");
- model.setFocus("cmb_instcd");
- }
- return false;
- }
- if(model.getValue(cmb_proddrugsetflag.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("SET구분은" ,"I003");
- model.setFocus("cmb_instcd");
- }
- return false;
- }
- if(model.getValue(opt_goodcd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("물품구분" ,"I003");
- model.setFocus("cmb_instcd");
- }
- return false;
- }
- return true;
- }
- function fCheckSaveData()
- {
- if(model.getValue(cmb_instcd.attribute("ref")).length== 0 )
- {
- messageBox("기관코드는" ,"I003");
- model.setFocus("cmb_instcd");
- return false;
- }
- if(model.getValue(cmb_proddrugsetflag.attribute("ref")).length== 0 )
- {
- messageBox("SET구분은" ,"I003");
- model.setFocus("cmb_instcd");
- return false;
- }
- if(model.getValue(opt_goodcd.attribute("ref")).length== 0 )
- {
- messageBox("물품구분" ,"I003");
- model.setFocus("cmb_instcd");
- return false;
- }
-
- for(var currow = 1 ; currow < grd_setlist.rows ; currow++)
- {
- if(grd_setlist.valueMatrix(currow , grd_setlist.colRef("comdrugtoolcd")).length == 0)
- {
- messageBox(currow + " 번째 물품코드를" ,"C001");
- grd_setlist.row = currow;
- grd_setlist.col= grd_setlist.colRef("comdrugtoolcd");
- grd_setlist.editCell();
- return false;
- }
- if(grd_setlist.valueMatrix(currow , grd_setlist.colRef("consqty")) == 0)
- {
- messageBox(currow + " 번째 수량을" ,"C001");
- grd_setlist.row = currow;
- grd_setlist.col= grd_setlist.colRef("consqty");
- grd_setlist.editCell();
- return false;
- }
- if(grd_setlist.valueMatrix(currow , grd_setlist.colRef("compsgoodunit")) == 0)
- {
- messageBox(currow + " 번째 단위를" ,"C001");
- grd_setlist.row = currow;
- grd_setlist.col= grd_setlist.colRef("compsgoodunit");
- return false;
- }
- }
- return true;
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1000" pageheight="530" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:945px; height:475px; ">
- <group id="grp_sea" style="left:0px; top:30px; width:940px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:940px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:242px; top:9px; width:86px; height:17px; ">SET구분 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:874px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckRetrieveData(false) == false)return;
- misfGridInit(grd_setlist);
- misfMsterDetailRetrieve();
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:859px; y1:7px; x2:859px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption62" class="search_name" style="left:10px; top:9px; width:86px; height:17px; ">기관코드 :</caption>
- <caption id="caption1" class="search_name" style="left:451px; top:10px; width:86px; height:17px; ">물품코드 :</caption>
- <output id="opt_goodcd" ref="/root/send/goodcd" navindex="2" style="left:538px; top:8px; width:90px; height:19px; text-align:right; "/>
- <output id="opt_goodnm" ref="/root/send/goodnm" navindex="2" style="left:629px; top:8px; width:219px; height:19px; text-align:right; "/>
- <select1 id="cmb_proddrugsetflag" ref="/root/send/proddrugsetflag" class="combo_essential" appearance="minimal" style="left:329px; top:8px; width:116px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/proddrugsetflag">
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <select1 id="cmb_instcd" ref="/root/send/instcd" class="combo_essential" appearance="minimal" style="left:97px; top:8px; width:138px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/instcd">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <output id="opt_goodflag" ref="/root/send/goodflag" visibility="hidden" style="left:435px; top:0px; width:100px; height:19px; "/>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:86px; x2:940px; y2:86px; "/>
- <datagrid id="grd_setlist" nodeset="/root/main/list/goodset/goodsetlist" caption="기관코드^제제약, SET구분^물품코드^순번^구성물품코드^구성품명^구성수량^단위^비고" colsep="^" colwidth="0, 0, 0, 39, 111, 380, 72, 85, 230" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:91px; width:940px; height:382px; ">
- <col ref="instcd" visibility="hidden"/>
- <col ref="proddrugsetflag" visibility="hidden"/>
- <col ref="goodcd" visibility="hidden"/>
- <col ref="proddrugseqno"/>
- <col ref="comdrugtoolcd" type="inputbutton"/>
- <col ref="consitemnm"/>
- <col ref="consqty" type="input" format="#,###" style="text-align:right; "/>
- <col ref="compsgoodunit" type="combo">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </col>
- <col ref="cmt" type="input"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (grd_setlist.col == grd_setlist.colRef("comdrugtoolcd")) {//구성물품코드를 눌렀을 경우
- model.removenode("/root/copynode");
- model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- model.makeNode("/root/copynode");
-
- rszfOpenPopUpListByWndName(grd_setlist,"","comdrugtoolcd,consitemnm","SPRSD00190","instcd,goodflag","cmb_instcd,opt_goodflag");
-
- var cur_row = grd_setlist.row;
- var status = grd_setlist.valueMatrix(cur_row, grd_setlist.colRef("m"));
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- setCSVToNode("/root/copynode", CSV, "goodsetlist");
-
- fSettingGoodList("/root/copynode", "goodsetlist");
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(grd_setlist.col == grd_setlist.colRef("comdrugtoolcd") && grd_setlist.valueMatrix(grd_setlist.row, grd_setlist.colRef("consitemnm")).length> 0 ) {
- model.removenode("/root/copynode");
- model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- model.makeNode("/root/copynode");
-
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,goodnm,indexgb,indexnm","goodcd," + model.getValue(cmb_instcd.attribute("ref")) + "," +model.getValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/comdrugtoolcd") + ",,,," ,"","minexch",grd_setlist,"SPRSD00190","instcd,goodflag","cmb_instcd," + model.getValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/goodflag"),"Y");
- model.refresh();
-
- if( grd_setlist.valueMatrix(cur_row, grd_setlist.colRef("consitemnm")).length> 0)
- {
- if(model.getValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/minexch") > 0) model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/consqty",model.getValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/minexch") );
- else model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/consqty","1");
-
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/comdrugtoolcd" , model.getValue("/root/init/main/goodlist/goodcd"));
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/consitemnm" , model.getValue("/root/init/main/goodlist/goodnm"));
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/compsgoodunit" , model.getValue("/root/init/main/goodlist/purcunit"));
- }
-
- model.refresh();
-
- var cur_row = grd_setlist.row;
- var status = grd_setlist.valueMatrix(cur_row, grd_setlist.colRef("m"));
-
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
-
- if(CSV.length == 0 && grd_setlist.valueMatrix(cur_row, grd_setlist.colRef("consitemnm")).length == 0)
- {
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/comdrugtoolcd" , "");
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/consitemnm" , "");
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/compsgoodunit" , "");
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1) + "]/consqty" , "");
- grd_setlist.col = grd_setlist.colRef("comdrugtoolcd");
- grd_setlist.editCell();
- }
- if(CSV.length > 0)
- {
- model.setValue(grd_setlist.nodeset + "[" + (grd_setlist.row - grd_setlist.fixedRows + 1)+ "]/comdrugtoolcd","");
- setCSVToNode("/root/copynode", CSV, "goodsetlist");
- fSettingGoodList("/root/copynode", "goodsetlist");
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == 9)
- {
- if(event.shiftKey)
- {
- if(grd_setlist.colAttribute(grd_setlist.col + 1, "type").indexOf ("input") > -1)
- {
- for(curcol = grd_setlist.col -1 ; curcol > -1 ; curcol--)
- {
- if(grd_setlist.colAttribute(curcol, "type").indexOf ("input") > -1)
- {
- grd_setlist.col = curcol;
- grd_setlist.editCell();
- return;
- }
- }
- }
- }
- else
- {
- if(grd_setlist.colAttribute(grd_setlist.col, "type").indexOf ("input") == -1)
- {
- if(grd_setlist.col - 1 == grd_setlist.colRef("comdrugtoolcd") && grd_setlist.valueMatrix(grd_setlist.row, grd_setlist.col - 1).length == 0)
- {
- grd_setlist.col = grd_setlist.colRef("comdrugtoolcd");
- grd_setlist.editCell();
- return;
- }
- for(curcol = grd_setlist.col ; curcol <grd_setlist.cols ; curcol++)
- {
- if(grd_setlist.colAttribute(curcol, "type").indexOf ("input") > -1)
- {
- grd_setlist.col = curcol;
- grd_setlist.editCell();
- return;
- }
- }
- }
- }
- }
- ]]>
- </script>
- </datagrid>
- <button id="button2" class="btn2_letter3" style="left:887px; top:66px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_setlist, "D");
- ]]>
- </script>
- </button>
- <button id="button6" class="btn2_letter3" style="left:832px; top:66px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckRetrieveData(true) == false)return;
- misfGridIUD(grd_setlist, "A");
- grd_setlist.row = grd_setlist.rows -grd_setlist.fixedRows ;
- fDefaultSetting(grd_setlist.row);
- grd_setlist.col = grd_setlist.colRef("comdrugtoolcd");
- grd_setlist.editCell();
- ]]>
- </script>
- </button>
- <caption id="caption4" class="tit_2" style="left:5px; top:71px; width:100px; height:13px; ">Set 제원내역</caption>
- <button id="btn_excel" class="btn2_letter2" style="left:788px; top:66px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_setlist);
- ]]>
- </script>
- </button>
- <group id="group4" style="left:2px; top:3px; width:938px; height:27px; ">
- <line id="line17" class="line_2" style="x1:0px; y1:25px; x2:933px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:814px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckSaveData() == false)return;
- misfSave("TXRSC00210");
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <button id="btn_clear" class="btn4_letter3" style="left:870px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <button id="btn_scrnmove" class="btn3_letter4" visibility="hidden" style="left:56px; top:3px; width:80px; height:22px; ">
- <caption>화면이동</caption>
- </button>
- <button id="btn_prt" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- </group>
- </group>
- </xhtml:body>
- </xhtml:html>
|