12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet ype="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: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>
- <delive>
- <delivelist>
- <instcd/>
- <delivedd/>
- <deliveno/>
- <deliveseq/>
- <wareflag/>
- <goodcd/>
- <goodnm/>
- <goodspec/>
- <deliveunit/>
- <deliveamt/>
- <deliveqty/>
- <exchqty/>
- <delivedeptcd/>
- <siqty/>
- <hunqty/>
- <deliveunitcost/>
- <reqqty/>
- <deliveflag/>
- <origsiqty/>
- <orighunqty/>
- <origdeliveqty/>
- </delivelist>
- </delive>
- <good>
- <gooddetail/>
- </good>
- <dupcheck>
- <dupyn/>
- </dupcheck>
- </main>
- <send>
- <search>
- <instcd/>
- <wareflag/>
- <delivedd/>
- <deliveno/>
- <delivedeptcd/>
- <delivedeptnm/>
- <deliveflag/>
- <barcode/>
- </search>
- <save/>
- </send>
- <init>
- </init>
- <hidden/>
- <temp>
- <deliveinfo>
- <deliveno/>
- </deliveinfo>
- </temp>
- <popdelive>
- <instcd/>
- <wareflag/>
- <wareflagnm/>
- <delivedd/>
- <selectyn/>
- </popdelive>
- <popgood>
- <instcd/>
- <wareflag/>
- <delivedd/>
- <basedd/>
- <selectyn/>
- <goodcd/>
- <goodlist>
- <goodcd/>
- </goodlist>
- </popgood>
- <popreq>
- <instcd/>
- <wareflag/>
- <wareflagnm/>
- <delivedd/>
- <reqdeptcd/>
- <reqdeptnm/>
- <saveyn/>
- <openflag/>
- <reqddbarcode/>
- <reqnobarcode/>
- </popreq>
- <chk_preyn/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //화면 Control을 초기화한다
-
- misfGridInit(grd_delive);
- misfMsterDetailSet(grd_delive, null, "TRRSO20103" ,"Y");
- //misfComboComCdListMulti("Z0007","cmb_instcd"); //기관코드
- misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
- misfComboComCdList("030M0001",cmb_wareflag); //창고
- misfComboComCdList("R0430",cmb_deliveflag); //출고유형
-
- model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
- if(model.getValue("/root/send/search/instcd") == "032")
- {
- btn_prcp.visible = true;
- }
-
- model.setValue("/root/send/search/delivedd" , getCurrentDate()); //출고일자 설정
- model.setValue("/root/send/search/deliveflag", "03"); //출고유형 설정 (03:구매청구)
-
- //test -> 향후 삭제할 것
- //model.setValue("/root/send/search/delivedd", "20110816");
- //model.setValue("/root/send/search/wareflag", "1");
-
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
- model.refresh();
-
- model.setFocus("ipt_barcode");
- ]]>
- </script>
- <submission id="TRRSO20103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/delive"/>
- <submission id="TRRSO20104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/popgood" resultref="/root/main/good"/>
- <submission id="TRRSO20105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/dupcheck"/>
- <submission id="TXRSO20101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save/send" resultref="/root/temp/deliveinfo">"</submission>
- <submission id="TXRSO20102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp/deliveinfo"/>
- <submission id="TRRSO20106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/delive"/>
- </model>
- <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/numericHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- //2012.02.28 박준범 추가
- //출고유형에 따라 Grid이 출고량컬럼, 행추가/삭제 버튼을 enable, disable 한다.
- function fEnableDisableGridInput() {
-
- //출고유형 02:처방 인 경우에는 data를 수정할 수 없도록 한다.
- if( model.getValue("/root/send/search/deliveflag") == "02" ) {
- grd_delive.colDisabled(grd_delive.colRef("deliveqty")) = true;
- btn_rowinsert.disabled = true;
- btn_rowdel.disabled = true;
- } else {
- grd_delive.colDisabled(grd_delive.colRef("deliveqty")) = false;
- btn_rowinsert.disabled = false;
- btn_rowdel.disabled = false;
- }
-
- }
-
-
- //조회조건 변경시 초기화 및 check
- function fSearchCondChanged(control_id){
- model.removeNodeset(grd_delive.nodeset); // 그리드 초기화
- model.setValue("/root/send/search/deliveno", ""); //출고번호 설정
-
- //2012.02.28 박준범 - 출고유형이 03, 04 가 아닌 경우에만 03으로 초기화하도록 변경 (03:구매청구, 04:출고조정)
- if( model.getValue("/root/send/search/deliveflag") != "03" && model.getValue("/root/send/search/deliveflag") != "04" ) {
- model.setValue("/root/send/search/deliveflag", "03"); //출고유형 설정 (03:구매청구)
-
- fEnableDisableGridInput();
- }
-
- if( cmb_wareflag.value != "" && ipt_delivedd.value != "" && ipt_delivedeptcd.value != "" ) {
- //같은날 같은 부서로 이미 불출한적이 있는지 확인
- if( submit("TRRSO20105") ) {
- if( model.getValue("/root/main/dupcheck/dupyn") == "Y" ) {
- messageBox("같은 날, 같은 부서로 이미 불출한 적이 있습니다.", "I999", "");
- model.setFocus(control_id); //function parameter
- }
- }
- }
-
- model.refresh();
- }
-
- //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
- function fGetGoodDetail() {
-
- for(var k = 1; k <= instance1.selectNodes("/root/popgood/goodlist").length; k++) {
-
- var bDup = false; //물품코드가 중복되었는지를 확인하기 위한 변수
-
- //popup에서 선택한 물품코드가 이미 grid에 존재하고 있는지를 check하여 이미 존재하면 message를 보여주고 return한다.
- for(var i = 1; i < grd_delive.rows; i++) {
- if( grd_delive.valueMatrix(i, grd_delive.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
- messageBox("물품코드가 중복되었습니다. [" + grd_delive.valueMatrix(i, grd_delive.colRef("goodcd")) + "] ", "E999", ""); //E: 경고
- bDup = true;
- continue;
- }
- }
-
- if( bDup == false ) {
- // node 삭제
- //model.removenode("/root/main/gooddetail");
-
- //TRRSO20104를 위해 물품코드를 goodcd에 넣는다.
- model.setValue( "/root/popgood/goodcd", model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") );
-
- if( submit("TRRSO20104") ) {
- /* model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/instcd", model.getValue("/root/send/search/instcd"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedd", model.getValue("/root/send/search/delivedd"));
- //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveno", model.getValue("/root/send/search/deliveno"));
- //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveseq", model.getValue("/root/send/search/deliveseq"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/wareflag", model.getValue("/root/send/search/wareflag"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedeptcd", model.getValue("/root/send/search/delivedeptcd"));
- */
- //마직막 행에 물품코드가 등록되어 있으면 그 행에 바로 적용하고, 물품코드가 없으면 한 행을 추가한 뒤 적용한다.
- if( grd_delive.valueMatrix(grd_delive.rows-1, grd_delive.colRef("goodcd")) != "" ) {
- btn_rowinsert.dispatch("DOMActivate");
- }
-
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/goodnm", model.getValue("/root/main/good/gooddetail/goodnm"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/goodspec", model.getValue("/root/main/good/gooddetail/goodspec"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/deliveunit", model.getValue("/root/main/good/gooddetail/deliveunit"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/exchqty", model.getValue("/root/main/good/gooddetail/exchqty"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/siqty", model.getValue("/root/main/good/gooddetail/siqty"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/hunqty", model.getValue("/root/main/good/gooddetail/hunqty"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/deliveunitcost", model.getValue("/root/main/good/gooddetail/goodunitcost"));
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/origsiqty", model.getValue("/root/main/good/gooddetail/siqty")); //hunqty의 처음 값을 저장하기 위함.
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/orighunqty", model.getValue("/root/main/good/gooddetail/hunqty")); //hunqty의 처음 값을 저장하기 위함.
-
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/deliveqty", "");
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/deliveamt", "");
- model.setValue(grd_delive.nodeset + "[" + (grd_delive.rows-1) + "]/origdeliveqty", "0");
-
- }
-
- } // if( bDup ...) end
-
- } // for(var k ...) end
-
- grd_delive.refresh();
-
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1220px" pageheight="770px" 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:243px; height:14px; ">창고 출고등록</caption>
- </group>
- <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
- <button id="btn_init" class="btn4_letter3" style="left:984px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //misfGridInit : model.removeNodeset(grd_delive.nodeset); grid.refresh();
- misfGridInit(grd_delive);
- model.resetInstanceNode("/root/send/search");
-
- model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
- model.setValue("/root/send/search/delivedd" , getCurrentDate()); //출고일자 설정
- model.setValue("/root/send/search/deliveflag", "03"); //출고유형 설정 (03:구매청구)
-
- fEnableDisableGridInput();
-
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
-
- model.refresh();
-
- ]]>
- </script>
- </button>
- <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" navindex="8" style="left:1138px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_delive.rows == 1) return;
-
- //alert(grd_delive.getUpdateData());
-
- //물품코드나 출고량을 입력하지 않은 Row가 있는지 확인한다.
- for(var i = 1; i < grd_delive.rows; i++) {
- if( grd_delive.valueMatrix(i, grd_delive.colRef("goodcd")).getTrim() == "" ) {
- messageBox("물품코드가 선택되지 않았습니다. \n\n먼저 물품코드를 선택하십시요.", "E999", ""); //E: 경고
- model.setFocus("grd_delive");
- grd_delive.row = i;
- return;
- }
-
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : update & insert : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- var status = grd_delive.rowStatus(i) ;
- if( status < 4 ) {
- if( grd_delive.valueMatrix(i, grd_delive.colRef("deliveqty")) == "" ) {
- messageBox("출고량이 입력되지 않았습니다. \n\n먼저 출고량을 입력하십시요.", "E999", ""); //E: 경고
- model.setFocus("grd_delive");
- grd_delive.row = i;
- return;
- }
- }
- }
- //진료재료파트일경우 선납출고 여부 확인
- // if(model.getValue("/root/send/search/delivedeptcd") == "3080000000"){ //진료재료파트 3080000000
- // var req = messageBox("예를 누를 경우 선납출고로만 처리합니다. ", "Q003");
- // if(req == 6){
- // grd_delive.valueMatrix(1, grd_delive.colRef("predeliveyn")) = "Y";
- // }else{
- // }
- // }
- if(chk_preyn.value == "Y"){
- for(var i = 1; i < grd_delive.rows; i++) {
- grd_delive.valueMatrix(i, grd_delive.colRef("preyn")) = "Y";
- }
- }
-
- // misfSave : submit 후, grid.clearStatus() 함
- if( misfSave("TXRSO20101") ) {
- //신규추가의 경우 출고번호를 setting한 후 다시 조회한다.
- if( ipt_deliveno.value.length == 0 ) {
- model.setValue(ipt_deliveno.attribute("ref"), model.getValue("/root/temp/deliveinfo/deliveno"));
- model.refreshpart(ipt_deliveno.attribute("ref"));
-
- //2012.03.14 신규추가 뿐 아니라 수정때도 다시 조회할 수 있도록 if 문 밖으로 뺌 - 여기는 comment처리
- //btn_search.dispatch("DOMActivate");
- }
- //2012.03.14 신규추가 뿐 아니라 수정때도 다시 조회할 수 있도록 if 문 밖으로 뺌
- chk_preyn.value = "";
- btn_search.dispatch("DOMActivate");
- messageBox("저장되었습니다.", "I999", "");
-
- }
- ]]>
- </script>
- </button>
- <button id="btn_delivedtl" class="btn3_letter6" style="left:675px; top:3px; width:104px; height:22px; ">
- <caption>출고내역조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- if(cmb_wareflag.value == "") {
- messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- model.setFocus("cmb_wareflag");
- return;
- }
-
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- model.setValue("/root/popdelive/wareflag", cmb_wareflag.value);
- model.setValue("/root/popdelive/wareflagnm", cmb_wareflag.label);
- model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
-
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popdelive/selectyn", "");
-
- //popup 프로그램 호출
- window.load("SPRSO20100.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- //popup에서 특정 출고내역을 선택한 경우, 다시 조회한다.
- if(model.getValue("/root/popdelive/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- btn_search.dispatch("DOMActivate");
- }
-
- ]]>
- </script>
- </button>
- <button id="btn_req" class="btn3_letter5" style="left:782px; top:3px; width:92px; height:22px; ">
- <caption>청구 data</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- if(cmb_wareflag.value == "") {
- messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- model.setFocus("cmb_wareflag");
- return;
- }
-
- //출고일자에 선택된 값이 없으면, 출고일자를 선택하라고 alert함
- if(ipt_delivedd.value.length < 8) {
- messageBox("출고일자가 올바로 선택되지 않았습니다. \n\n먼저 출고일자를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedd");
- return;
- }
-
- //출고부서에 선택된 값이 없으면, 출고부서를 선택하라고 alert함
- if(ipt_delivedeptcd.value == "") {
- messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
-
- //출고부서명에 값이 없으면, 출고부서를 선택하라고 alert함 - 2013.02.26 박준범
- if(opt_delivedeptnm.value == "") {
- messageBox("출고부서가 정확하게 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popreq/instcd", cmb_instcd.value);
- model.setValue("/root/popreq/wareflag", cmb_wareflag.value);
- model.setValue("/root/popreq/wareflagnm", cmb_wareflag.label);
- model.setValue("/root/popreq/delivedd", ipt_delivedd.value);
- model.setValue("/root/popreq/reqdeptcd", ipt_delivedeptcd.value);
- model.setValue("/root/popreq/reqdeptnm", opt_delivedeptnm.value);
-
- //saveyn(popup 창에서 저장버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popreq/saveyn", "");
-
- //popup 프로그램 호출
- window.load("SPRSO20200.xrw", "modal","", "", "/root/popreq","/root/popdata");
-
- //popup에서 저장버튼을 누른 경우, 다시 조회한다.
- if(model.getValue("/root/popreq/saveyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- btn_search.dispatch("DOMActivate");
- messageBox("출고처리되었습니다..", "I999", "");
-
- }
-
- ]]>
- </script>
- </button>
- <button id="btn_del_all" class="btn4_letter4" navindex="8" style="left:1055px; top:3px; width:80px; height:22px; ">
- <caption>전체삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/send/search/deliveno") == "") {
- messageBox("삭제할 자료가 없습니다.", "I999", "");
- return;
- }
- //2012.02.28 박준범 추가
- //출고유형 02:처방 인 경우에는 data를 삭제할 수 없도록 한다.
- if( model.getValue("/root/send/search/deliveflag") == "02" ) {
- messageBox("출고유형이 '처방'인 자료는 삭제할 수 없습니다. ", "I999", "");
- return;
- }
- if (messageBox("현재 출고건을 ", "Q001") == 6){
- if(misfSave("TXRSO20102")) {
- btn_init.dispatch("DOMActivate");
- messageBox("삭제되었습니다.", "I999", "");
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
- }
- };
-
- ]]>
- </script>
- </button>
- <button id="btn_adj" class="btn4_letter6" style="left:877px; top:3px; width:104px; height:22px; ">
- <caption>처방출고등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //-------------------- 2012.02.28 박준범 : 처방출고등록 기능 추가 -------------------
- // 이는 처방집계된 data(02:처방)와 직접 출고등록하는 것(04:처방출고)과 구분하기 위한 것임
-
- //misfGridInit : model.removeNodeset(grd_delive.nodeset); grid.refresh();
- misfGridInit(grd_delive);
- model.resetInstanceNode("/root/send/search");
-
- model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
- model.setValue("/root/send/search/delivedd" , getCurrentDate()); //출고일자 설정
- model.setValue("/root/send/search/deliveflag", "04"); //출고유형 설정 (04:처방출고)
-
- fEnableDisableGridInput();
-
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
-
- model.refresh();
-
- ]]>
- </script>
- </button>
- <button id="btn_prcp" class="btn1_letter4" visibility="hidden" style="left:0px; top:3px; width:104px; height:22px; ">
- <caption>처방집계</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(cmb_instcd.value == "031") {
- messageBox("본 기능은 칠곡병원을 위한 기능입니다. 본원에는 해당 사항이 없습니다. ", "E999", "");
- return;
- }
- //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- if(cmb_wareflag.value == "") {
- messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- model.setFocus("cmb_wareflag");
- return;
- }
-
- //출고일자에 선택된 값이 없으면, 출고일자를 선택하라고 alert함
- if(ipt_delivedd.value.length < 8) {
- messageBox("출고일자가 올바로 선택되지 않았습니다. \n\n먼저 출고일자를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedd");
- return;
- }
-
- //출고부서에 선택된 값이 없으면, 출고부서를 선택하라고 alert함
- if(ipt_delivedeptcd.value == "") {
- messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
-
- //출고부서명에 값이 없으면, 출고부서를 선택하라고 alert함 - 2013.02.26 박준범
- if(opt_delivedeptnm.value == "") {
- messageBox("출고부서가 정확하게 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
-
- //진행중이던 작업을 중단하고 처방집계를 실시할 것인지 confirm
- var dd = model.getValue("/root/send/search/delivedd");
- if (messageBox( dd.substr(0,4) + " 년 " + dd.substr(4,2) + " 월 처방을 대상으로 집계를 실시하시겠습니까? ", "Q999","") != 6){
- return;
- }
-
- //misfGridInit : model.removeNodeset(grd_delive.nodeset); grid.refresh();
- misfGridInit(grd_delive);
- model.setValue("/root/send/search/deliveno" , ""); //출고번호 null
- model.setValue("/root/send/search/deliveflag", "04"); //출고유형 설정 (04:처방출고)
-
- if(submit("TRRSO20106")) {
- for(var i = 1; i < grd_delive.rows; i++) {
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : update & insert : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- grd_delive.rowStatus(i) = 1;
- }
-
- }
-
- fEnableDisableGridInput();
-
- model.refresh();
-
- ]]>
- </script>
- </button>
- <button id="button1" class="btn3_letter6" style="left:569px; top:3px; width:104px; height:22px; ">
- <caption>부서입고확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //
- // //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- // if(cmb_wareflag.value == "") {
- // messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- // model.setFocus("cmb_wareflag");
- // return;
- // }
- //
- // //popup 에 전달할 parameter를 setting한다.
- // model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- // model.setValue("/root/popdelive/wareflag", cmb_wareflag.value);
- // model.setValue("/root/popdelive/wareflagnm", cmb_wareflag.label);
- // model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
- //
- // //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popdelive/selectyn", "");
-
- //popup 프로그램 호출
- window.load("SMRSO23300.xrw", "modal","", "");//,"/root/popdelive","/root/popdata");
-
- //popup에서 특정 출고내역을 선택한 경우, 다시 조회한다.
- if(model.getValue("/root/popdelive/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- btn_search.dispatch("DOMActivate");
- }
-
- ]]>
- </script>
- </button>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:710px; ">
- <group id="grp_search" style="left:0px; top:9px; width:1195px; height:48px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1129px; top:9px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
- //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- if(cmb_wareflag.value == "") {
- messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- model.setFocus("cmb_wareflag");
- return;
- }
- //2012.03.16 박준범 - 입력모드에서 다시 조회버튼 click 시 Grid초기화 먼저 실행토록 추가
- misfGridInit(grd_delive);
-
- misfMsterDetailRetrieve();
- fEnableDisableGridInput();
-
- if(grd_delive.valueMatrix(2, grd_delive.colRef("predd")) != ""){
- chk_preyn.value = "Y";
- chk_preyn.disabled = true;
- }else{
- chk_preyn.value = "N";
- chk_preyn.disabled = false;
- }
-
- ]]>
- </script>
- </button>
- <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:87px; top:10px; width:136px; height:19px; ">
- <choices>
- <itemset nodeset="/root/main/init">
- <label ref="cnstnm"/>
- <value ref="cnstcd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="cap_instcd" class="search_name" style="left:8px; top:10px; width:82px; height:17px; ">기관코드</caption>
- <input id="ipt_delivedd" ref="/root/send/search/delivedd" navindex="5" inputtype="date" style="left:481px; top:10px; width:89px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //조회조건 변경시 초기화 및 check
- fSearchCondChanged("ipt_delivedd");
- ]]>
- </script>
- </input>
- <caption id="caption20" class="search_name" style="left:612px; top:10px; width:102px; height:17px; vertical-align:middle; ">물품받는부서</caption>
- <line id="line30" class="line_4" style="x1:1115px; y1:3px; x2:1115px; y2:35px; "/>
- <caption id="caption2" class="search_name" style="left:235px; top:10px; width:55px; height:17px; ">창고</caption>
- <select1 id="cmb_wareflag" ref="/root/send/search/wareflag" class="combo_default" navindex="4" appearance="minimal" style="left:289px; top:10px; width:99px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/wareflag">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //조회조건 변경시 초기화 및 check
- fSearchCondChanged("cmb_wareflag");
- ]]>
- </script>
- </select1>
- <input id="ipt_deliveno" ref="/root/send/search/deliveno" class="input_default" disabled="true" navindex="6" maxbyte="4" style="left:571px; top:10px; width:32px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /* 출고번호를 disabled 했기 때문에 아래 script 수행되지 않기에 모두 comment처리
-
- var vDeliveno = model.getValue("/root/send/search/deliveno");
-
- //입력된 값이 없으면 return
- if( vDeliveno.length == 0 ) return;
-
- if (!vDeliveno.isNumber()) {
- messageBox("번호(숫자)를 " ,"C001");
- model.setFocus("ipt_deliveno");
- return;
- }
-
-
- //입력된 값이 숫자인 경우만 아래 실행
- //setInputNodeCurText(); //input의 ref 노드에 현재 label setValue (tfHelper.js)
- vDeliveno = model.getValue("/root/send/search/deliveno").getLeftPad(4,"0");
- model.setValue("/root/send/search/deliveno", vDeliveno);
- model.refreshpart("/root/send/search/deliveno");
-
- */
- ]]>
- </script>
- </input>
- <button id="btn_delivedeptcd" class="icon_search" navindex="3" style="left:788px; top:10px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var vOrigDeptcd = ipt_delivedeptcd.value; //popup을 열기전 부서 저장
-
- var recv_list = "delivedeptcd,delivedeptnm";
- misfOpenPopUpList("02", ipt_delivedeptcd,"", recv_list) ;
- ipt_delivedeptcd.refresh();
- opt_delivedeptnm.refresh();
-
- if(vOrigDeptcd != ipt_delivedeptcd.value) { //부서코드가 변경되었다면
- //조회조건 변경시 초기화 및 check
- fSearchCondChanged("ipt_delivedeptcd");
- }
- ]]>
- </script>
- </button>
- <input id="ipt_delivedeptcd" ref="/root/send/search/delivedeptcd" class="input_default" navindex="2" style="left:716px; top:10px; width:70px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //2013.02.26 박준범 : 부서코드 변경시 부서코드명을 먼저 지워준다.
- opt_delivedeptnm.value = "";
-
- misfValidationCheck("02", "", "delivedeptcd,delivedeptnm" );
-
- //조회조건 변경시 초기화 및 check
- fSearchCondChanged("ipt_delivedeptcd");
- ]]>
- </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_delivedeptcd", "xforms-value-changed");
- //}
- ]]>
- </script>
- </input>
- <output id="opt_delivedeptnm" ref="/root/send/search/delivedeptnm" class="output_fix" appearance="output" style="left:806px; top:10px; width:126px; height:19px; "/>
- <caption id="caption9" class="search_name" style="left:401px; top:10px; width:79px; height:17px; ">출고일자</caption>
- <caption id="caption3" class="search_name" style="left:940px; top:10px; width:80px; height:17px; vertical-align:middle; ">출고유형</caption>
- <select1 id="cmb_deliveflag" ref="/root/send/search/deliveflag" class="combo_default" disabled="true" appearance="minimal" style="left:1020px; top:10px; width:77px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/deliveflag">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:78px; x2:1195px; y2:78px; "/>
- <caption id="caption1" class="tit_2" style="left:0px; top:63px; width:180px; height:13px; ">출고내역</caption>
- <button id="btn_rowinsert" class="btn2_letter3" navindex="20" style="left:1072px; top:57px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
- if(cmb_wareflag.value == "") {
- messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
- model.setFocus("cmb_wareflag");
- return;
- }
- //출고부서에 선택된 값이 없으면, 출고부서를 선택하라고 alert함
- if(ipt_delivedeptcd.value == "") {
- messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
-
- //출고부서명에 값이 없으면, 출고부서를 선택하라고 alert함 - 2013.02.26 박준범
- if(opt_delivedeptnm.value == "") {
- messageBox("출고부서가 정확하게 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- }
-
- // if (fDataValiChk() == false) return;
-
- //misfGridIUD : grd_delive.addRow() 한 후, 조회조건을 grd_delive 의 해당 컬럼에 setting하고, pGrid_id.refresh() 한다.
- misfGridIUD(grd_delive, "A");
-
- //추가한 행에 출고순번 부여
- if(grd_delive.rows == 2) {
- grd_delive.valueMatrix(grd_delive.rows-1, grd_delive.colRef("deliveseq")) = "001";
- }else{
- var vSeq = parseFloat( grd_delive.valueMatrix(grd_delive.rows-2, grd_delive.colRef("deliveseq")) ) + 1;
- vSeq = vSeq + "";
-
- grd_delive.valueMatrix(grd_delive.rows-1, grd_delive.colRef("deliveseq")) = vSeq.getLeftPad(3,"0");
- }
- ]]>
- </script>
- </button>
- <button id="btn_rowdel" class="btn2_letter3" navindex="21" style="left:1128px; top:57px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : insert & new : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- var status = grd_delive.rowStatus(grd_delive.row) ;
-
- if(status == 0) {
- grd_delive.addStatus(grd_delive.row, "delete");
- }else if(status == 1) {
- grd_delive.deleteRow(grd_delive.row);
- }else if(status == 2) {
- grd_delive.addStatus(grd_delive.row, "delete");
- }else if(status == 3) {
- grd_delive.deleteRow(grd_delive.row);
- }else if(status == 4) {
- grd_delive.removeStatus(grd_delive.row, "delete");
- }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
- grd_delive.removeStatus(grd_delive.row, "delete");
- }else if(status == 6) {
- grd_delive.removeStatus(grd_delive.row, "delete");
- }
-
-
- //misfGridIUD(grd_delive, "D");
- //grd_delive.deleteRow(grd_delive.row);
-
- /*
- //fDelSetting(grd_delive);
- if (grd_delive.selectedRows > 0) {
- var selectedRows = Array(grd_delive.selectedRows);
- for(i=0;i< grd_delive.selectedRows;i++) {
- selectedRows[i] = grd_delive.selectedRow(i);
- }
- }
- for ( var i= selectedRows.length; i >= 0; i--){
- rowIdx = selectedRows[i];
-
- if (grd_delive.rowstatus(rowIdx) == 0)
- {
- if (grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("purccnsttnno")) != ""){
- messageBox(grd_delive.row+"번째는 품의 처리된 건", "I009");
- }else{
- grd_delive.rowStatus(rowIdx) = "4";
- }
-
- }else{
- grd_delive.deleteRow(rowIdx);
- }
- }
- grd_delive.refresh();
-
- var nodelist = instance1.selectNodes("/root/main/list/purcdmndinfo/purcdmndsublist").length;
- if(nodelist > 0){
- cmb_wareflag.disabled = true;
- }else{
- cmb_wareflag.disabled = false;
- }
- */
- ]]>
- </script>
- </button>
- <datagrid id="grd_delive" nodeset="/root/main/delive/delivelist" caption="순번^물품코드^물품명^규격^단위^BOX수량^시점재고^현재고^출고량^단가^금액^기관코드^출고일자^출고번호^창고구분^출고부서^출고유형^orig시점재고^orig현재고^orig출고량" colsep="^" colwidth="43, 103, 283, 130, 71, 72, 80, 80, 80, 100, 112, 61, 59, 56, 57, 55, 67, 68, 65, 69" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:83px; width:1195px; height:622px; ">
- <col ref="deliveseq" style="text-align:center; "/>
- <col ref="goodcd" type="inputbutton" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="deliveunit" style="text-align:center; "/>
- <col ref="exchqty" format="#,###.##" style="text-align:right; "/>
- <col ref="siqty" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="hunqty" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="deliveqty" type="input" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="deliveunitcost" format="#,###.##" style="left:855px; top:23px; width:100px; height:23px; text-align:right; "/>
- <col ref="deliveamt" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden" style="left:1160px; top:23px; width:61px; height:23px; "/>
- <col ref="delivedd" visibility="hidden"/>
- <col ref="deliveno" visibility="hidden"/>
- <col ref="wareflag" visibility="hidden"/>
- <col ref="delivedeptcd" visibility="hidden"/>
- <col ref="deliveflag" visibility="hidden"/>
- <col ref="origsiqty" visibility="hidden"/>
- <col ref="orighunqty" visibility="hidden"/>
- <col ref="origdeliveqty" visibility="hidden"/>
- <col ref="predeliveyn" visibility="hidden"/>
- <col ref="preyn" visibility="hidden"/>
- <col ref="predd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- //조회된 data 의 경우에는 물품코드를 변경할 수 없다.
- if(grd_delive.rowStatus(grd_delive.row) == 0 || grd_delive.rowStatus(grd_delive.row) == 2) { //0:read, 1:insert, 2:update, 3:update after insert
- //alert("onentercell");
- return;
- }
-
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popgood/instcd", cmb_instcd.value);
- model.setValue("/root/popgood/wareflag", cmb_wareflag.value);
- model.setValue("/root/popgood/delivedd", ipt_delivedd.value ); //향후 시점재고 조회를 위해 출고일자를 set
- //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
- model.setValue("/root/popgood/basedd", ipt_delivedd.value ); //물품코드 popup 에서 출고일자 기준으로 물품 Master 조회하기 위해서
-
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popgood/selectyn", "");
-
- //popup 프로그램 호출
- //window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata"); //단일선택창
- window.load("SPRSO20700.xrw", "modal","", "", "/root/popgood","/root/popdata"); //다중선택창
-
- //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
- if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- fGetGoodDetail(); //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
-
- //출고량을 입력하도록 focus이동
- grd_delive.col = grd_delive.colRef("deliveqty");
-
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (grd_delive.colAttribute(grd_delive.col,"ref") == "deliveqty" ) { //출고량 컬럼
-
- //출고량 컬럼의 입력값을 확인하여 적절히 변경한다.
- // ("." 만 입력한 경우 계산 오류 방지를 위해 null 로 변경한다.)
- if( grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveqty")) == "." ) {
- grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveqty")) = "";
- }
-
- grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("siqty")) = //시점재고량
- parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("origsiqty")).getLeftPad(1,"0"))
- - parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveqty")).getLeftPad(1,"0"))
- + parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("origdeliveqty")).getLeftPad(1,"0"));
- grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("hunqty")) = //현재고량
- parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("orighunqty")).getLeftPad(1,"0"))
- - parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveqty")).getLeftPad(1,"0"))
- + parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("origdeliveqty")).getLeftPad(1,"0"));
-
- /* var fHunqty = parseFloat(model.getValue(grd_delive.nodeset + "[" + grd_delive.row + "]/orighunqty").getLeftPad(1,"0"))
- - parseFloat(model.getValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveqty").getLeftPad(1,"0"))
- + parseFloat(model.getValue(grd_delive.nodeset + "[" + grd_delive.row + "]/origdeliveqty").getLeftPad(1,"0"));
-
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row+ "]/hunty", fHunqty);
- */
- if(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveunitcost")) == "") { //단가
- grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveamt")) = ""; //금액
- }else{
- grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveamt")) = //금액
- parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveunitcost")).getLeftPad(1,"0"))
- * parseFloat(grd_delive.valueMatrix(grd_delive.row, grd_delive.colRef("deliveqty")).getLeftPad(1,"0"));
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- //조회된 data 의 경우에는 물품코드를 변경할 수 없다.
- if(grd_delive.colAttribute(grd_delive.col,"ref") == "goodcd") { //물품코드
- /* 2012.03.20 박준범 - 물품코드를 popup에서만 등록토록 하기 위해서 아래 comment처리하고 무조건 return처리함
- if(grd_delive.rowStatus(grd_delive.row) == 0 || grd_delive.rowStatus(grd_delive.row) == 2) { //0:read, 1:insert, 2:update, 3:update after insert
- grd_delive.col = 1; //focus를 강제로 옮김
- return;
- }
- */
- grd_delive.col = 1; //focus를 강제로 옮김
- return;
- }
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //조회한 data 의 경우에는 물품코드를 변경할 수 없도록 한다.
- if(grd_delive.colAttribute(grd_delive.col,"ref") == "goodcd") { //물품코드
- /* 2012.03.20 박준범 - 물품코드를 popup에서만 등록토록 하기 위해서 아래 comment처리하고 무조건 return처리함
- if(grd_delive.rowStatus(grd_delive.row) == 0 || grd_delive.rowStatus(grd_delive.row) == 2) { //0:read, 1:insert, 2:update, 3:update after insert
- grd_delive.col = 1; //focus를 강제로 옮김
- return;
- }
- */
- grd_delive.col = 1; //focus를 강제로 옮김
- return;
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //Grid 에서 엔터 입력시 다음행 수정
- misfNextRow(grd_delive);
- ]]>
- </script>
- </datagrid>
- <select id="chk_preyn" ref="/root/chk_preyn" overflow="visible" appearance="full" style="left:1000px; top:59px; width:75px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>선납출고</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- <caption id="caption4" style="left:659px; top:57px; width:102px; height:20px; ">청구출급증 바코드</caption>
- <input id="ipt_barcode" ref="/root/send/search/barcode" class="input_default" style="left:765px; top:57px; width:190px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /* 2013.11.22 박준범 - 최동익샘 요청
- - 청구출급증의 바코드를 읽어 청구data를 출고하는 업무에 편의 제공키 위한 코딩
- - 바코드의 구성: 기관코드(3자리) + 창고코드(2) + 청구부서(=물품받는부서)(10)
- + 청구일자(8) + 청구번호(4)
- - 여기서 창고코드는 무조건 2자리로 넘어오는 것에 유의할 것.
- */
-
- if(ipt_barcode.value == "") return;
-
- var allData = ipt_barcode.value;
- //var cellData = allData.split("|");
-
- if(cmb_instcd.value != allData.substr(0,3)) { //기관코드
- messageBox("청구출급증의 기관코드가 일치하지 않아 처리할 수 없습니다. ", "I999", "");
- return;
- }
-
- cmb_wareflag.value = parseInt(allData.substr(3,2), 10); //창고코드: 2자리 형식으로 바코드에 포함되어 있으므로 변경해야 함.
- ipt_delivedeptcd.value = allData.substr(5,10); //청구부서(=물품받는부서)
- ipt_delivedeptcd.dispatch("xforms-value-changed");
-
-
- //청구 data popup 에 전달할 parameter를 미리 setting한다.
- model.setValue("/root/popreq/reqddbarcode", allData.substr(15,8)); //청구일자
- model.setValue("/root/popreq/reqnobarcode", allData.substr(23,4)); //청구번호
- btn_req.dispatch("DOMActivate");
-
- model.setValue("/root/popreq/reqddbarcode", ""); //청구일자 지우기
- model.setValue("/root/popreq/reqnobarcode", ""); //청구번호 지우기
- model.setFocus("ipt_barcode");
-
-
- /*
- var kyymd = model.getValue("/root/send/retrparam/barcode").substr(0, 8);
- var kyseq = model.getValue("/root/send/retrparam/barcode").substr(8, 5);
- for(barcnt = 1; barcnt < datagrid1.rows; barcnt++) {
- if(model.getValue("/root/main/evidenceinfo/evidencelist["+ barcnt +"]/kygubun") == 'Y' &&
- model.getValue("/root/main/evidenceinfo/evidencelist["+ barcnt +"]/kyymd") == kyymd &&
- parseFloat(model.getValue("/root/main/evidenceinfo/evidencelist["+ barcnt +"]/kyseq")) == parseFloat(kyseq)){
- datagrid1.topRow = barcnt;
- datagrid1.select(barcnt+1, 0, barcnt+1, 0) = true;
- if(model.getValue("/root/main/evidenceinfo/evidencelist["+ barcnt +"]/flag") == "Y"){
- alert("이전에 등록된 자료입니다.");
- model.setFocus("input4");
- return;
- }
-
- }
- }
- alert("등록된 자료가 없습니다.");
- model.setFocus("input4");
-
- */
- ]]>
- </script>
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("ipt_barcode", "xforms-value-changed");
- ]]>
- </script>
- </input>
- </group>
- </xhtml:body>
- </xhtml:html>
|