123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 |
- <?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>
- <goodbaseqtylist/>
- <codelist>
- <allsizespecid/>
- <goodspec/>
- </codelist>
- </main>
- <send>
- <retvcond>
- <instcd/>
- <goodflag/>
- <reqdeptcd/>
- <reqdeptnm/>
- <instcdnm/>
- <reqmthd/>
- <purcflag/>
- </retvcond>
- <goodbaseqtylist/>
- <allsize>
- <goodcd/>
- <instcd/>
- <goodspec/>
- </allsize>
- </send>
- <init>
- <goodflag>
- <label>의료소모품</label>
- <value>Y</value>
- <label>일반소모품</label>
- <value>Z</value>
- <label>의료비품</label>
- <value>U</value>
- <label>약품</label>
- <value>P</value>
- </goodflag>
- <reqmthd>
- <label>전체</label>
- <value/>
- <label>처방집계</label>
- <value>1</value>
- <label>일반청구</label>
- <value>3</value>
- </reqmthd>
- </init>
- <hidden/>
- <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="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- misfGridInit(grd_goodbaseqtylist);
-
- misfMsterDetailSet(grd_goodbaseqtylist,null,"TRRSD00102","Y");
-
-
- //화면 권한 설정
- btn_save.disabled = !(checkAuth("X"));
- // btn_prt.disabled= !(checkAuth("P"));
- model.refresh();
- ]]>
- </script>
- <submission id="TRRSD00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/retvcond" resultref="/root/main/goodbaseqtylist"/>
- <submission id="TRRSD00281" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/allsize" resultref="/root/main/codelist"/>
- <submission id="TXRSD00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- </model>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
-
- // misfComboComCdListMulti("R0111", "cmb_purcflag"); //구매구분
- misfComboComCdList('R0111', cmb_purcflag, "Y"); //구매구분
-
- model.removeNodeset("/root/main/goodbaseqtylist");
- model.resetInstanceNode("/root/send");
-
- model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
- model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm"));
- model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
- model.setValue(ipt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
-
- cmb_goodflag.select(0); //물품구분
- cmb_reqmthd.select(0); //청구방법
-
-
- model.refresh();
- }
-
- function fCheckKey()
- {
- var bool = false;
- //기관코드 및 물품청구 구분값 체크
- if( opt_instcd.value =="") {
- messageBox("기관코드를","C002");
- bool = true;
- } else if(cmb_goodflag.value=="") {
- messageBox("물품청구 구분","C002");
- bool = true;
- } else if(ipt_reqdeptcd.value=="") {
- messageBox("부서 코드를","C002");
- bool = true;
- }
-
- return bool
- }
-
- function fSettingGoodList(pnode, nodename, userqtynm){
-
- var codynode = instance1.selectNodes(pnode + "/*");
- var addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
-
- if(model.getValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
- for (var j = 1; j <= codynode.length ; j++) {
- if((grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows == 0) || (addRow > grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows))
- {
- misfGridIUD(grd_goodbaseqtylist,"A");
- addRow = grd_goodbaseqtylist.rows - grd_goodbaseqtylist.fixedRows;
- }
-
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/purcunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/exchqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/deliveunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/deliveunit" ));
- model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/reqmthd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" ));
- var sReqmThd = model.getValue(pnode +"/" + nodename + "[" + j + "]/reqmthd" );
- if(sReqmThd=="1"){
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/prepargodqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
- }else if(sReqmThd=="3"){
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/basevol" , model.getValue(pnode +"/" + nodename + "[" + j + "]/safestocqty" ));
- }
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/ddavguseqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/ddavguseqty" ));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizespecid", model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizespecid"));
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/allsizeyn" , model.getValue(pnode +"/" + nodename + "[" + j + "]/allsizeyn" ));
-
- model.makeValue(grd_goodbaseqtylist.nodeset + "[" + addRow + "]/tmpreqflag" , model.getValue(pnode +"/" + nodename + "[" + j + "]/tmpreqflag" ));
- addRow = addRow + 1;
-
- }
- // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
- // 2009.12.29 수정 tmpreqflag 임의청구 가능여부 삭제
- for(var k =1;k<=grd_goodbaseqtylist.rows;k++){
- var Reqmthd = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/reqmthd");
- var Tmpreqflag = model.getValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/tmpreqflag");
-
- if(Reqmthd=="1"){ //처방집계시
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/basevol" , "0" );
-
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
- }else if(Reqmthd=="3"){ //일반청구시
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + k + "]/prepargodqty" , "0");
-
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
- }
- }
- //model.removenode(pnode);
- model.refresh();
- }
- // --------------------------------------------------
- // All Size 읽어오는 함수
- // --------------------------------------------------
- var vAllSizeCol = 0;
- var vAllSizeRow = 0;
- var vAllSizePath = "/root/main/codelist";
- var vGoodReqPath = "/root/main/goodbaseqtylist";
-
- function fAllSizeRead(pRow, pCol, pPos) {
-
- var iClickY = pPos - 100;
-
- vAllSizeCol = pCol;
- vAllSizeRow = pRow;
-
- if (iClickY > 375) iClickY = iClickY - 319;
-
- grp_allsize.attribute("top") = iClickY+ "px";
-
- grp_allsize.attribute("visibility") = "visible" ;
-
- model.setValue("/root/send/allsize/instcd", model.getValue(opt_instcd.attribute("ref" )));
- model.setValue("/root/send/allsize/goodcd", grd_goodbaseqtylist.valueMatrix(pRow, pCol-3) );
-
-
- submit("TRRSD00281");
-
- grp_allsize.refresh();
- }
- // All Size 선택
- function fAllSizeSelect(pGrid) {
- grp_allsize.attribute("visibility") = "hidden" ;
-
- var vQty = "0";
- var vSize = "";
- var vSpec = "";
- var vModel = "";
- var vCheck = "";
- var vPath = "";
- var vTarget = "";
- var vSource = "";
-
- var vGoodcd = model.getValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodcd");
-
-
- for (var i = 1; i < grd_codelist.rows; i++) {
-
- if (model.getValue(vAllSizePath+"["+i+"]/chk") == "true") {
- vSize = model.getValue(vAllSizePath+"["+ i +"]/allsizespecid");
- vSpec = model.getValue(vAllSizePath+"["+ i +"]/goodspec" );
- vModel = model.getValue(vAllSizePath+"["+ i +"]/goodmodel" );
- vQty = model.getValue(vAllSizePath+"["+ i +"]/qty" );
-
- if (model.getValue(vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']" +"/goodcd") == "") {
- if (vCheck == "") {
- vCheck = "Y";
- vTarget = vGoodReqPath+"["+(vAllSizeRow)+"]" ;
- if (pGrid.rowStatus(vAllSizeRow) == 0)
- pGrid.rowStatus(vAllSizeRow) = 2 ;
-
- } else {
-
- misfGridIUD(pGrid,"A");
-
- addRow = pGrid.rows - pGrid.fixedRows;
-
- //fDefaultSetting(addRow);
-
- vTarget = pGrid.nodeset + "[" + addRow + "]/";
- vSource = vGoodReqPath + "[" + vAllSizeRow + "]/";
-
- fSettingGoodData(vTarget, vSource);
-
- pGrid.cellstyle("background-color" , addRow, 9) = "#FFFF00";
- }
- } else {
- vPath = vGoodReqPath+"["+"[goodcd='"+ vGoodcd+"' and allsizespecid='"+vSize+"']";
- }
-
- //
- if (vQty == "") {
- vQty = "1";
- }
-
- model.setValue(vTarget + "/allsizeyn" , "Y" );
- model.setValue(vTarget + "/allsizespecid" , vSize );
- model.setValue(vTarget + "/goodspec" , vSpec );
- model.setValue(vTarget + "/goodmodel" , vModel);
-
- if (model.getValue(cmb_reqmthd.attribute("ref"))=="1") {
- model.setValue(vTarget + "/basevol" , "0" );
- model.setValue(vTarget + "/prepargodqty", vQty );
- } else {
- model.setValue(vTarget + "/basevol" , vQty );
- model.setValue(vTarget + "/prepargodqty", "0" );
- }
- }
- }
-
- pGrid.refresh();
- }
-
- //
- function fSettingGoodData(pTarget, pSource) {
- model.setValue(pTarget + "goodcd" , model.getValue(pSource + "goodcd" ));
- model.setValue(pTarget + "allsizespecid" , model.getValue(pSource + "allsizespecid" ));
- model.setValue(pTarget + "goodnm" , model.getValue(pSource + "goodnm" ));
- model.setValue(pTarget + "goodspec" , model.getValue(pSource + "goodspec" ));
- model.setValue(pTarget + "goodmodel" , model.getValue(pSource + "goodmodel" ));
- model.setValue(pTarget + "prodcmpynm" , model.getValue(pSource + "prodcmpynm" ));
- model.setValue(pTarget + "purcunit" , model.getValue(pSource + "purcunit" ));
- model.setValue(pTarget + "exchqty" , model.getValue(pSource + "exchqty" ));
- model.setValue(pTarget + "deliveunit" , model.getValue(pSource + "deliveunit" ));
- model.setValue(pTarget + "basevol" , model.getValue(pSource + "basevol" ));
- model.setValue(pTarget + "prepargodqty" , model.getValue(pSource + "prepargodqty" ));
- model.setValue(pTarget + "cmt" , model.getValue(pSource + "cmt" ));
- model.setValue(pTarget + "ddavguseqty" , model.getValue(pSource + "ddavguseqty" ));
- model.setValue(pTarget + "instcd" , model.getValue(pSource + "instcd" ));
- model.setValue(pTarget + "goodflag" , model.getValue(pSource + "goodflag" ));
- model.setValue(pTarget + "reqdeptcd" , model.getValue(pSource + "reqdeptcd" ));
- model.setValue(pTarget + "lrgcd" , model.getValue(pSource + "lrgcd" ));
- model.setValue(pTarget + "allsizeyn" , model.getValue(pSource + "allsizeyn" ));
-
- // model.setValue(pTarget + "oallsizespecid", model.getValue(pSource + "oallsizespecid"));
- }
-
- function fAllSizeSelect_2(pRow) {
-
- grp_allsize.attribute("visibility") = "hidden" ;
-
- if (pRow < 1) return;
-
- model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/allsizespecid", model.getValue(vAllSizePath+"["+(pRow)+"]/allsizespecid"));
- model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodspec" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodspec" ));
- model.setValue(vGoodReqPath+"["+(vAllSizeRow)+"]/goodmodel" , model.getValue(vAllSizePath+"["+(pRow)+"]/goodmodel" ));
-
- if(grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "0") grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) = "2";
-
- grd_goodbaseqtylist.refresh();
-
- }
-
- function fGridChange ( pValue ) {
- if( pValue == "1" ) // 처방 집계 물품 상비품량 항목 활성화 / 안전재고 항목 비활성화
- {
- cap_titlist.value = "부서 상비품 List";
- //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("prepargodqty")) = false;
- //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("basevol")) = true;
- }
- else // 일반청구 물품.. 상비품량 항목 비활성화 / 안전재고 항목 활성화
- {
- cap_titlist.value = "부서 안전재고 List";
- //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("prepargodqty")) = true;
- //grd_goodbaseqtylist.colHidden(grd_goodbaseqtylist.colRef("basevol")) = false;
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body 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; ">
- <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:15px; width:1195px; height:767px; ">
- <group id="grp_sea" style="left:0px; top:15px; width:1195px; height:55px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:7px; width:89px; height:17px; ">기관코드 :</caption>
- <caption id="caption3" class="search_name" style="left:605px; top:30px; width:86px; height:17px; ">부 서 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:1125px; top:20px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_goodbaseqtylist);
-
- if ( updtdata != "") {
- var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
-
- if(fCheckKey())
- {
- return;
- }
-
- misfMsterDetailRetrieve();
- // 2009.11.09 수정 처방집계일때 상비품량, 일반청구일때 안전재고량만 입력가능
- for(var k =grd_goodbaseqtylist.fixedRows;k< grd_goodbaseqtylist.rows;k++){
- var Reqmthd = model.getValue("/root/main/goodbaseqtylist["+k+"]/reqmthd");
- var Tmpreqflag = model.getValue("/root/main/goodbaseqtylist["+k+"]/tmpreqflag");
- if(Reqmthd=="1"){ //처방집계
-
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = true;
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
-
- }else if(Reqmthd=="3"){//일반청구
-
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("basevol")) = false;
- grd_goodbaseqtylist.isReadOnly(k,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
- }
- }
-
-
- ]]>
- </script>
- </button>
- <select1 id="cmb_goodflag" ref="/root/send/retvcond/goodflag" class="combo_s_essential" appearance="minimal" style="left:440px; top:7px; width:110px; height:19px; text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/goodflag">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <input id="ipt_reqdeptcd" ref="/root/send/retvcond/reqdeptcd" class="input_s_essential" style="left:690px; top:30px; width:120px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(ipt_reqdeptcd.value.length == 0)
- ipt_reqdeptnm.value = "";
- else
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
- // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptcd",
- // "deptcd," + ipt_reqdeptcd.value, "", "reqdeptcd,reqdeptnm",
- // ipt_reqdeptcd, "SPRPZ00200", "","","Y");
- model.refresh();
- ]]>
- </script>
- </input>
- <button id="btn_reqdeptcd" class="icon_search" style="left:815px; top:30px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recv_list = "reqdeptcd,reqdeptnm";
- misfOpenPopUpList("02", ipt_reqdeptcd,"",recv_list);
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_reqdeptnm" ref="/root/send/retvcond/reqdeptnm" class="input_fix" appearance="input" style="left:835px; top:30px; width:165px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(ipt_reqdeptnm.value.length == 0)
- ipt_reqdeptcd.value = "";
- else
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
-
- // rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm",
- // "deptnm," + ipt_reqdeptnm.value, "", "reqdeptcd,reqdeptnm",
- // ipt_reqdeptnm, "SPRPZ00200", "","","Y");
- model.refresh();
- ]]>
- </script>
- </input>
- <caption id="caption7" class="search_name" style="left:355px; top:7px; width:94px; height:17px; ">물품구분 :</caption>
- <line id="line3" class="line_4" style="x1:1110px; y1:9px; x2:1110px; y2:48px; border-color:#ffe4bb; border-left-style:solid; "/>
- <output id="opt_instcd" ref="/root/send/retvcond/instcd" class="output_fix" visibility="hidden" style="left:274px; top:7px; width:30px; height:19px; "/>
- <output id="opt_instcdnm" ref="/root/send/retvcond/instcdnm" class="output_search" style="left:100px; top:7px; width:165px; height:19px; text-align:center; "/>
- <select1 id="cmb_reqmthd" ref="/root/send/retvcond/reqmthd" class="combo_s_essential" appearance="minimal" style="left:690px; top:7px; width:120px; height:19px; text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/reqmthd">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fGridChange(model.getValue(cmb_reqmthd.attribute("ref") ) );
- //btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <caption id="caption1" class="search_name" style="left:605px; top:7px; width:94px; height:17px; ">청구방법 :</caption>
- <select1 id="cmb_purcflag" ref="/root/send/retvcond/purcflag" class="combo_default" appearance="minimal" style="left:440px; top:30px; width:110px; height:19px; text-align:center; ">
- <choices>
- <itemset nodeset="/root/init/purcflag">
- <label ref="label"/>
- <value ref="value"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <caption id="caption18" class="search_name" style="left:355px; top:30px; width:86px; height:17px; ">구매구분 :</caption>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:105px; x2:1195px; y2:105px; "/>
- <caption id="cap_titlist" class="tit_2" style="left:3px; top:90px; width:190px; height:13px; "/>
- <button id="btn_grdadd" class="btn2_letter3" style="left:1011px; top:83px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckKey())
- {
- return;
- }
-
- misfGridIUD(grd_goodbaseqtylist, "A");
- //행추가를 누를시 기간코드,청구구분,청구부서 값을 자동으로 Detail 그리드에 저장한다.
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("rnum")) = grd_goodbaseqtylist.rows -1;
-
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("instcd")) = opt_instcd.value;
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodflag")) = cmb_goodflag.value;
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqdeptcd")) = ipt_reqdeptcd.value;
- ]]>
- </script>
- </button>
- <button id="btn_grddel" class="btn2_letter3" style="left:1066px; top:83px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_goodbaseqtylist,"D");
- model.refresh();
- ]]>
- </script>
- </button>
- <datagrid id="grd_goodbaseqtylist" nodeset="/root/main/goodbaseqtylist" allowuserresize="false" caption="No^물품코드^물품코드^물품명^규격^모델^제조회사^포장단위^환산수량^청구단위^안전재고량^상비품량^비고^reqmthd^tmpreqflag" colsep="^" colwidth="40, 96, 29, 231, 163, 127, 73, 66, 63, 63, 70, 70, 171, 100, 100, 0, 0, 0, 0, 0, 0, 0" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:110px; width:1195px; height:655px; ">
- <col ref="rnum" style="text-align:center; "/>
- <col class="input_essential" ref="goodcd" type="inputbutton" _key="true"/>
- <col ref="allsizespecid" style="text-align:center; "/>
- <col disabled="true" ref="goodnm"/>
- <col ref="goodspec" type="inputbutton"/>
- <col disabled="true" ref="goodmodel"/>
- <col disabled="true" ref="prodcmpynm" style="left:925px; top:23px; width:140px; height:23px; "/>
- <col disabled="true" ref="purcunit"/>
- <col disabled="true" ref="exchqty" format="#,###"/>
- <col disabled="true" ref="deliveunit"/>
- <col class="input_essential" ref="basevol" type="input" format="#,##9" style="text-align:right; background-color:#ccffcc; "/>
- <col class="input_essential" ref="prepargodqty" type="input" format="#,##9" style="text-align:right; background-color:#ffcc99; "/>
- <col ref="cmt" type="input"/>
- <col ref="reqmthd" visibility="hidden"/>
- <col ref="tmpreqflag" visibility="hidden"/>
- <col ref="ddavguseqty" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="goodflag" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="lrgcd" visibility="hidden"/>
- <col ref="allsizeyn" visibility="hidden"/>
- <col ref="oallsizespecid" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.rowStatus(grd_goodbaseqtylist.row) == "1" )
- {//구성물품코드를 눌렀을 경우
-
- var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty";
-
- model.removenode("/root/copynode");
- model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- model.makeNode("/root/copynode");
-
- if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
- rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
- }
- else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
- rszfOpenPopUpListByWndName(grd_goodbaseqtylist,"",recv_list,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
- }
-
- var cur_row = grd_goodbaseqtylist.row;
- var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
-
- fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
-
- model.refresh();
- }
-
- //alert(grd_goodbaseqtylist.col +"=="+ grd_goodbaseqtylist.colRef("goodspec") +"&&"+ grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) +"== Y" );
-
- if (grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodspec") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row , grd_goodbaseqtylist.colRef("allsizeyn")) == "Y" )
- {
- fAllSizeRead(grd_goodbaseqtylist.row ,grd_goodbaseqtylist.col, event.clientY);
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(grd_goodbaseqtylist.col == grd_goodbaseqtylist.colRef("goodcd") && grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("goodcd")).length> 0)
- {
-
- var recv_list = "goodcd,goodnm,goodmodel,goodspec,prodcmpynm,purcunit,exchqty,deliveunit,basevol,ddavguseqty,allsizeyn,allsizespecid";
-
- model.removenode("/root/copynode");
- model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- model.makeNode("/root/copynode");
-
-
- if ( model.getValue("/root/send/retvcond/reqmthd") == '3' ){ //청구방법이 일반청구이면 팝업에 인자값을 던지고(reqcheck)
- //alert("일반 청구일 경우 임.");
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd,reqcheck","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd")+",N","", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag,reqcheck","opt_instcd,cmb_goodflag,N", "Y");
- }
- else{ //청구방법이 처방집계이면 인자값없이 팝업을 호출
- rszfValidationCheck("TRRSD00191", "goodlist" , "refcond,instcd,goodflag,goodcd","goodcd," + opt_instcd.value + "," + cmb_goodflag.value + "," + model.getValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd"),"", recv_list, grd_goodbaseqtylist,"SPRSD00190","instcd,goodflag","opt_instcd,cmb_goodflag", "Y");
- }
-
- var sReqmThd = model.getValue("/root/init/main/goodlist/reqmthd");
- if(sReqmThd=="1"){
-
- grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = true;
- grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = false;
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("prepargodqty")) = model.getValue("/root/init/main/goodlist/safestocqty");
-
- }else if(sReqmThd=="3"){
-
- grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("basevol")) = false;
- grd_goodbaseqtylist.isReadOnly(grd_goodbaseqtylist.row,grd_goodbaseqtylist.colRef("prepargodqty")) = true;
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("basevol")) = model.getValue("/root/init/main/goodlist/safestocqty");
- }
- grd_goodbaseqtylist.valueMatrix(grd_goodbaseqtylist.row, grd_goodbaseqtylist.colRef("reqmthd")) = model.getValue("/root/init/main/goodlist/reqmthd");
- model.refresh();
-
- var cur_row = grd_goodbaseqtylist.row;
- var status = grd_goodbaseqtylist.valueMatrix(cur_row, grd_goodbaseqtylist.colRef("m"));
-
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
-
- if (CSV.length > 0)
- {
- model.setValue(grd_goodbaseqtylist.nodeset + "[" + (grd_goodbaseqtylist.row - grd_goodbaseqtylist.fixedRows + 1)+ "]/goodcd","");
- setCSVToNode("/root/copynode", CSV, "goodbaseqtylist");
-
- fSettingGoodList("/root/copynode", "goodbaseqtylist" , "userqty");
- }
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_goodbaseqtylist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption4" style="left:770px; top:90px; width:40px; height:13px; background-color:#ccffcc; border-color:#000000; "/>
- <caption id="caption5" style="left:895px; top:90px; width:40px; height:13px; background-color:#ffcc99; border-color:#000000; "/>
- <caption id="caption8" style="left:815px; top:90px; width:70px; height:13px; ">안전재고량</caption>
- <caption id="caption9" style="left:940px; top:90px; width:55px; height:13px; ">상비품량</caption>
- <group id="grp_allsize" visibility="hidden" showeffect="slidepositive 500" style="left:205px; top:140px; width:364px; height:300px; ">
- <shape id="rectangle1" appearance="rectangle" style="left:0px; top:0px; width:362px; height:300px; border-color:#339966; border-width:2px; "/>
- <datagrid id="grd_codelist" nodeset="/root/main/codelist" class="grd_prodcmpylist" caption="C^ID^명칭^모델^수량" colsep="^" colwidth="30, 40, 140, 76, 51" dataheight="23" defaultrows="0" ellipsis="true" extendlastcol="false" rowheight="23" rowsep="|" selectionmode="free" tooltip="true" style="left:2px; top:40px; width:357px; height:257px; ">
- <col ref="chk" type="checkbox"/>
- <col ref="allsizespecid" style="text-align:center; "/>
- <col ref="goodspec"/>
- <col ref="goodmodel"/>
- <col ref="qty" type="input"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //if (grd_codelist.isCell(event.target ) && grd_codelist.row >= grd_codelist.fixedRows ) {
- // fAllSizeSelect(grd_codelist.row) ;
- // btn_confirm.dispatch("DOMActivate");
- //}
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_codelist.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_confirm" class="btn4_letter2" style="left:285px; top:10px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fAllSizeSelect(grd_goodbaseqtylist) ;
- ]]>
- </script>
- </button>
- </group>
- <button id="btn_save" class="btn4_letter2" style="left:1130px; top:81px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_goodbaseqtylist);
-
- if (updtdata == "" ) {
- messageBox("변경된 데이터가","I004");
- return;
- }
-
- var sReqmThd = "";
- var null_chech1 = "";
- var null_chech2 = "";
-
- for (var i=1;i<=grd_goodbaseqtylist.rows-1;i++)
- {
- sReqmThd = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/reqmthd");
- null_check1 = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/prepargodqty");
- null_check2 = model.getValue(grd_goodbaseqtylist.nodeset+"["+i+"]/basevol" );
-
- if (sReqmThd=="1"){
- sReqmThd = "";
- } else if(sReqmThd=="3"){
- sReqmThd = "";
- } else {
- null_chech1 = "0";
- null_chech2 = "0";
- }
-
- //
- if ((null_check2 == "")&&(null_check1=="")) {
- messageBox(i+ "번째 기준량은","I003");
- return;
- }
- }
-
- misfSave("TXRSD00101");
- //misfMsterDetailRetrieve();
- model.refresh();
- ]]>
- </script>
- </button>
- </group>
- <button id="btn_clear" class="btn4_letter3" style="left:1125px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_goodbaseqtylist);
-
- if (updtdata != "") {
- var ret = messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
- fInitialize();
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|