12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>
- <list>
- <goodwin>
- <goodwinlist/>
- <goodmaxwinno/>
- </goodwin>
- <gooddmndreq>
- <gooddmndreqlist/>
- </gooddmndreq>
- <goodnonwin>
- <goodnonwinlist/>
- <goodmaxwinno/>
- </goodnonwin>
- <wincompare>
- <windetail>
- <goodcd/>
- <winunit/>
- <winunitcost/>
- <winpackqty/>
- <winamt/>
- <bnscd/>
- <edicd/>
- </windetail>
- <biwindetail>
- <bi_goodcd/>
- <bi_winunit/>
- <bi_winunitcost/>
- <bi_winpackqty/>
- <bi_winamt/>
- <bi_bnscd/>
- <bi_edicd/>
- </biwindetail>
- </wincompare>
- </list>
- <item/>
- </main>
- <send>
- <save>
- <goodwinlist/>
- <goodnonwinlist/>
- <interfacecustcdlist>
- <purc_main_suplplcecd/>
- <drg_main_suplplcecd/>
- </interfacecustcdlist>
- </save>
- <goodwin>
- <instcd/>
- <goodflag/>
- <windd/>
- <winno/>
- <windeptcd/>
- <windeptnm/>
- <winpsn/>
- <winpsnnm/>
- <paycond/>
- <suplplcecd/>
- <suplplcenm/>
- <calcdocukind/>
- <calcdocudd/>
- <purcdmndfrdd/>
- <purcdmndtodd/>
- <addtax/>
- <retrmaxwinnoyn/>
- <iokind/>
- <interfacegubn/>
- <bideliveno/>
- </goodwin>
- <gooddmndreq>
- <instcd/>
- <goodflag/>
- <purcdmnddd/>
- <purcdmndno/>
- <purcdmndseq/>
- </gooddmndreq>
- <savenonwin>
- <goodnonwinlist/>
- <interfacecustcdlist>
- <purc_main_suplplcecd/>
- <drg_main_suplplcecd/>
- </interfacecustcdlist>
- </savenonwin>
- <gooddelive>
- <gooddelivelist/>
- </gooddelive>
- <nonautowinyn/>
- </send>
- <init>
- <winqty/>
- <winamt/>
- <reqcnt/>
- <reqamt/>
- <winqtytotal>0</winqtytotal>
- <winqtycnt>0</winqtycnt>
- </init>
- <hidden/>
- <temp/>
- <copynode/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //화면 Control을 초기화한다
- fCheckAuth();
- fInitialize();
- //hbh <bind id="winqty" ref="/root/main/list/goodwin/goodwinlist/winqty" calculate="../winpackqty *../winpackcntperunit"/>
-
- ]]>
- </script>
- <submission id="TRRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodwin"/>
- <submission id="TRRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
- <submission id="TRRSI00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/goodwin" resultref="/root/main/list/goodnonwin"/>
- <submission id="TRRSD00403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddmndreq" resultref="/root/main/list/gooddmndreq"/>
- <submission id="TXRSI00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/hidden/temp">"</submission>
- <submission id="TXRSO00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/gooddelive" resultref="/root/hidden/temp">"</submission>
- <submission id="TXRSI00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savenonwin" resultref="/root/hidden/temp">"</submission>
- </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" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fInitialize() {
- model.resetInstanceNode("/root/send");
- rszfUserGoodFlagList(cmb_goodflag,getUserInfo("userid"));
- // misfComboComCdListMulti("R0109","cmb_calcdocukind");
- misfGridInit(grd_goodwin);
- misfGridInit(grd_nonwin);
-
- // rszfComboAppendBlankChild("cmb_calcdocukind");
- misfMsterDetailSet(grd_goodwin,null, "TRRSI00101" ,"Y");
- // misfMsterDetailSet(grd_goodreq,grd_goodwin, "TRRSD00403" ,"N");
-
- var curdate = getCurrentDate();
- var cvtdate = curdate.toDate("YYYYMMDD");
-
- model.setValue(ipt_windd.attribute("ref") ,curdate);
- model.setValue(ipt_calcdocudd.attribute("ref") ,curdate);
-
- // 약국 담당자의 요청으로
- //model.setValue(ipt_reqfrdd.attribute("ref") , cvtdate.getAddDate(-10,"D").getDateFormat("YYYYMMDD"));
- model.setValue(ipt_reqfrdd.attribute("ref") , curdate);
- model.setValue(ipt_reqtodd.attribute("ref") ,curdate);
- model.setValue(ipt_sumwinqty.attribute("ref"),0);
- model.setValue(opt_sumwinamt.attribute("ref"),0);
- model.setValue(ipt_winpsn.attribute("ref") , getUserInfo("userid"));
- // [2010.08.26]AS-IS 코드 TO_BE 코드 전환을 위한 물품구분 변경 (goodflag= P) => (goodflag= PH)
- rszfComboStockArthDeptcdList(cmb_windeptcd,getUserInfo("dutplceinstcd"),"PH" );
-
- //fLoadBnsDeliveno('N');
-
- // hidden column ( 물품구분 -> 약)
- model.setValue(cmb_goodflag.attribute("ref"),"PH");
- // model.setValue(ipt_iokind.attribute("ref"),'1A'); // 입출유형. [20081110] 발주에 대한 유형을 조회 하여 가져온다.
- model.setValue(ipt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
- model.setValue(opt_interfacegubn.attribute("ref"),'B'); // 'B' 보나에스
- model.setValue(opt_calcdocukind.attribute("ref"),'1'); // '1': 세금계산서
-
- //rszfGetMainCust(purc_main_suplplcecd);
-
- grd_goodwin.explorerbar = "sortshow";
- // grd_goodreq.explorerbar = "sortshow";
- grd_nonwin.explorerbar = "sortshow";
-
- grd_goodwin.frozenCols = grd_goodwin.colRef("winunit");
-
- // 공급처에 보나에스 setting
- // 혹시 코드가 변경될지 모르니 xforms-value-chage를 발생시킨다.
- // CMC 전체병원의 약국거래처가 보나에스 임으로 하드코딩합니다.. ㅋ HBH
- //model.setValue(ipt_suplplcecd.attribute("ref") , "2158155746");
- //model.setValue(ipt_suplplcecd.attribute("ref") , rszfGetMainCust(drg_main_suplplcecd));
- //model.setFocus("ipt_suplplcecd");
- //ipt_suplplcecd.dispatch("xforms-value-changed");
- model.setFocus("cmb_windeptcd");
-
- swt_map.visible = false;
- grd_nonwin.frozenCols = grd_nonwin.colRef("goodnm");
- model.refresh();
- }
-
- function fCheckAuth() {
- btn_search.disabled = !checkAuth("R") ;
- btn_save.disabled = !checkAuth("X") ;
- }
- // 보나에스 출고번호
- function fLoadBnsDeliveno(pwinyn) {
-
- cmb_bideliveno.value = '';
- cmb_bideliveno.disabled=true;
- if(sch_select.selectedIndex == 0)
- {
- if (model.getValue(ipt_instcd.attribute("ref")).length== 0 ) return;
- if (model.getValue(ipt_windd.attribute("ref")).length== 0 ) return;
- if (model.getValue(cmb_windeptcd.attribute("ref")).length== 0 ) return;
-
- if (ipt_suplplcecd.value == rszfGetMainCust(drg_main_suplplcecd)
- && model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' ) {
- cmb_bideliveno.disabled=false;
- rszfComboBiDeliveNoList(cmb_bideliveno,
- model.getValue(ipt_instcd.attribute("ref")),
- model.getValue(ipt_windd.attribute("ref")),
- model.getValue(cmb_windeptcd.attribute("ref")),
- "N" );
- model.refresh();
- } else {
- cmb_bideliveno.disabled=true;
- btn_search.dispatch("DOMActivate");
- }
- }
-
- }
-
- // 미입고 데이타 load
- function fDataLoadNoWin()
- {
- if (model.getValue(cmb_bideliveno.attribute("ref")).length== 0 )
- {
- //messageBox("보나에스 출고번호를 " ,"C002");
- messageBox("보나에스 출고번호를 " ,"I007");
- return;
- }
-
- submit("TRRSI00103");
- model.makeNode("/root/send/savenonwin/goodnowintype");
- model.setValue("/root/send/savenonwin/goodnowintype", "B"); // 보나에스 전송받은 경우
- // app 단에서 입고 금액을 계산하지 않고
- // 화면에서 입고 금액을 넘기기 위한 구분값
-
- for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
- {
- fSetGridColor( currow );
- model.setValue(grd_nonwin.nodeset + "[" + (currow - grd_nonwin.fixedRows + 1)+ "]/select","Y");
- grd_nonwin.rowStatus(currow) = "2";
- }
- }
-
- function fSetGridColor( currow ) {
- if ( grd_nonwin.valueMatrix(currow, grd_nonwin.colRef("comparevalue")) != "0" )
- grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("select"), currow, grd_nonwin.colRef("unaprvresn") ) = "yellow";
- else
- grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("select"), currow, grd_nonwin.colRef("unaprvresn") ) = "white";
- }
-
- function fCheckRetrieveData(pmsg)
- {
- if(model.getValue(ipt_instcd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("기관코드를 " ,"C002");
- model.setFocus("ipt_instcd");
- }
- return false;
- }
- if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("물품구분을 " ,"C002");
- model.setFocus("cmb_goodflag");
- }
- return false;
- }
- /*
- if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("공급처를 " ,"C001");
- model.setFocus("ipt_suplplcecd");
- }
- return false;
- }*/
-
-
- if(model.getValue(cmb_windeptcd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("입고부서를 " ,"C001");
- model.setFocus("cmb_windeptcd");
- }
- return false;
- }
- if(sch_select.selectedIndex == 0)
- {
- if(model.getValue(ipt_reqfrdd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("발주시작일자 " ,"C001");
- model.setFocus("ipt_reqfrdd");
- }
- return false;
- }
- if(model.getValue(ipt_reqtodd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("발주종료일자 " ,"C001");
- model.setFocus("ipt_reqtodd");
- }
- return false;
- }
- return true;
- }
- else
- {
- if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
- {
- if(pmsg == true)
- {
- messageBox("입고일자를 " ,"C001");
- model.setFocus("ipt_windd");
- }
- return false;
- }
- }
- return true;
- }
- function fDefaultSetting(prow)
- {
- var grd_setting;
- if(sch_select.selectedIndex == 0)grd_setting = grd_nonwin;
- else grd_setting = grd_goodwin;
- model.setValue(grd_setting.nodeset+"["+prow+"]/instcd",model.getValue(ipt_instcd.attribute("ref")));
- model.setValue(grd_setting.nodeset+"["+prow+"]/goodflag",model.getValue(cmb_goodflag.attribute("ref")));
- model.setValue(grd_setting.nodeset+"["+prow+"]/windd",model.getValue(ipt_windd.attribute("ref")));
- model.setValue(grd_setting.nodeset+"["+prow+"]/winpsn",model.getValue(ipt_winpsn.attribute("ref")));
- model.setValue(grd_setting.nodeset+"["+prow+"]/windeptcd",model.getValue(cmb_windeptcd.attribute("ref")));
- //model.setValue(grd_setting.nodeset+"["+prow+"]/installplcecd",model.getValue("/root/send/goodwin/installplcecd"));
- model.setValue(grd_setting.nodeset+"["+prow+"]/paycond","1");
- //model.setValue(grd_setting.nodeset+"["+prow+"]/temppay",model.getValue("/root/send/goodwin/temppay"));
- model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocukind",model.getValue(opt_calcdocukind.attribute("ref")));;
- model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocudd",model.getValue(ipt_calcdocudd.attribute("ref")));
- //model.setValue(grd_setting.nodeset+"["+prow+"]/suplplcecd",model.getValue(ipt_suplplcecd.attribute("ref")));
- model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno",fGetMaxWinSeqNo());
- model.setValue(grd_setting.nodeset+"["+prow+"]/delivedeptqty",0);
- model.setValue(grd_setting.nodeset+"["+prow+"]/deliveno",0);
- model.setValue(grd_setting.nodeset+"["+prow+"]/stocqty",0);
- // 2008.11.10 YYJ
- // 입출 유형을 '1A' 정상입고로 지정해서 받고 있다.
- // 발주 내역 / 보나에스 내역을 읽어서 유형을 지정처리 한다.
- // model.setValue(grd_setting.nodeset+"["+prow+"]/iokind",model.getValue(ipt_iokind.attribute("ref")));
- }
- function fGetMaxWinSeqNo()
- {
- var maxwinseqno = "";
- for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows; currow++)
- {
- if(maxwinseqno < grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno")))
- maxwinseqno = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winseqno"));
- }
-
- if(maxwinseqno.length == 0)maxwinseqno = "001";
- else maxwinseqno = parseInt(maxwinseqno) + 1;
-
- maxwinseqno = "" + maxwinseqno;
- return maxwinseqno.getLeftPad(3,"0");
- }
- function fSettingGoodList(pnode, nodename, userqtynm){
-
- var codynode = instance1.selectNodes(pnode + "/*");
- var addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
-
- if(model.getValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd").length > 0)addRow = addRow + 1;
- for (var j = 1; j <= codynode.length ; j++) {
- if(addRow > grd_goodwin.rows - grd_goodwin.fixedRows)
- {
- misfGridIUD(grd_goodwin,"A");
- addRow = grd_goodwin.rows - grd_goodwin.fixedRows;
- fDefaultSetting(addRow );
- }
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodcd" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodcd"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodnm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodnm"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodspec" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodspec"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/goodmodel" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodmodel"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/prodcmpynm" , model.getValue(pnode +"/" + nodename + "[" + j + "]/prodcmpynm"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackqty" , model.getValue(pnode +"/" + nodename + "[" + j + "]/" + userqtynm));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/purcunit"));
- if(model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty") != "0" && model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty").length>0)
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" , model.getValue(pnode +"/" + nodename + "[" + j + "]/exchqty"));
- else
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winpackcntperunit" ,"1");
- model.setValue(grd_goodwin.nodeset + "[" + addRow + "]/winunitcost" , model.getValue(pnode +"/" + nodename + "[" + j + "]/goodunitcost"));
-
- addRow = addRow + 1;
- }
- model.recalculate();
- model.refresh();
- }
-
- function fSettingSaveInData()
- {
- var vTmp = fGridCheck();
- if ( vTmp != -1 ) {
- if (model.getValue(ipt_suplplcecd.attribute("ref")) == rszfGetMainCust(drg_main_suplplcecd) ) {
- pvalue = messageBox( vTmp + " 번째 보나에스와 일치 하지 않는 건이 있습니다. 입고를 ","Q009");
- } else {
- pvalue = messageBox("입고를 ","Q009");
- }
-
- //
- if ( pvalue == 6 ) {
- for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
- {
- fDefaultSetting(liRow);
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/windeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/delivedeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
- }
- } else
- return false;
- } else {
- for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
- {
- fDefaultSetting(liRow);
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/windeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/delivedeptcd" , model.getValue(cmb_windeptcd.attribute("ref")));
- }
- }
- }
-
- // pvalue = messageBox("수정된 입고 금액으로","Q009");
- // if ( pvalue == 6 )
-
- function fGridCheck()
- {
- var vReturn = -1;
-
- for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
- {
- if ( grd_nonwin.valueMatrix( liRow, grd_nonwin.colRef("comparevalue") ) != "0" )
- return vReturn = liRow;
- }
- return vReturn;
- }
- // function fSettingSaveOutData()
- // {
- // for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
- // {
- // //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
- // if((grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("delivedd")).length == 0 ||
- // grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveno")).length == 0 ||
- // grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveseqno")).length == 0) &&
- // grd_goodreq.rowStatus(liRow) == "2")
- // {
- // grd_goodreq.rowStatus(liRow) = "1";
- // model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/deliveunit" , grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("requnit")));
- // model.setValue(grd_goodreq.nodeset + "[" + (liRow - grd_goodreq.fixedRows + 1) + "]/delivedeptcd" , model.getValue(ipt_windeptcd.attribute("ref")));
- // }
- // }
- //
- // model.setValue("/root/send/gooddelive/gooddelivelist", grd_goodreq.getUpdateData());
- // submit("TXRSO00101");
- //
- // if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
- // else
- // {
- // for(var liRow = grd_goodreq.fixedRows ; liRow < grd_goodreq.rows ; liRow++)
- // {
- // //출고생성되지 않은 데이타라면 출고시 입력을 위해 insert logic으로 구현한다
- // if((grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("delivedd")).length == 0 ||
- // grd_goodreq.valueMatrix(liRow ,grd_goodreq.colRef("deliveno")).length == 0 ||
- // grd_goodreq.valueMatrix(liRow , grd_goodreq.colRef("deliveseqno")).length == 0) &&
- // grd_goodreq.rowStatus(liRow) == "1")grd_goodreq.rowStatus(liRow) = "2";
- // }
- // }
- //
- // }
- function fCheckSaveData()
- {
- if(model.getValue(ipt_instcd.attribute("ref")).length== 0 )
- {
- messageBox("기관코드를 " ,"C002");
- model.setFocus("ipt_instcd");
- return false;
- }
- if(model.getValue(cmb_goodflag.attribute("ref")).length== 0 )
- {
- messageBox("물품구분을 " ,"C002");
- model.setFocus("cmb_goodflag");
- return false;
- }
- if(model.getValue(ipt_windd.attribute("ref")).length== 0 )
- {
- messageBox("입고일자를 " ,"C001");
- model.setFocus("ipt_windd");
- return false;
- }
- if(model.getValue(cmb_windeptcd.attribute("ref")).length== 0 )
- {
- messageBox("입고부서를 " ,"C001");
- model.setFocus("cmb_windeptcd");
- return false;
- }
-
- if(sch_select.selectedIndex == 0)
- {
- for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
- {
- if((grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("select")) == "Y") &&
- (grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")).length == 0 ||grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("winqty")) == 0))
- {
- messageBox(currow + " 번째 입고량을 " ,"C001");
- grd_nonwin.endEditCell();
- grd_nonwin.row = currow;
- grd_nonwin.col= grd_nonwin.colRef("goodcd");
- grd_nonwin.editCell();
- return false;
- }
- /*if((grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("select")) == "Y") &&
- (grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("goodunitcost")).length == 0 ||grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("goodunitcost")) == 0))
- {
- messageBox(currow + " 번째 입고단가를 " ,"C001");
- grd_nonwin.endEditCell();
- grd_nonwin.row = currow;
- grd_nonwin.col= grd_nonwin.colRef("goodcd");
- grd_nonwin.editCell();
- return false;
- }*/
-
- }
- }
- else
- {
- if(model.getValue(ipt_suplplcecd.attribute("ref")).length== 0 )
- {
- messageBox("공급처를 " ,"C001");
- model.setFocus("ipt_suplplcecd");
- return false;
- }
-
- var winqty = 0;
- var delivedeptqty = 0;
- var stocqty = 0;
-
- for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
- {
- if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")).length == 0)
- {
- messageBox(currow + " 번째 물품코드를 " ,"C001");
- grd_goodwin.row = currow;
- grd_goodwin.col= grd_goodwin.colRef("goodcd");
- grd_goodwin.editCell();
- return false;
- }
- /*
- else
- {
- for(srcrow = currow + 1 ; srcrow < grd_goodwin.rows ; srcrow++)
- {
- if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) == grd_goodwin.valueMatrix(srcrow , grd_goodwin.colRef("goodcd")))
- {
- messageBox("동일 물품코드가 [" + (currow - grd_goodwin.fixedRows + 1)+ "," + (srcrow - grd_goodwin.fixedRows + 1)+ "->" + grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("goodcd")) + "] 존재하여 저장 " ,"E001");
- return false;
- }
- }
- }
- */
- if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")).length == 0)
- {
- messageBox((currow)+ " 번째 요구량을 " ,"C001");
- grd_goodwin.row = currow;
- grd_goodwin.col= grd_goodwin.colRef("winqty");
- grd_goodwin.editCell();
- return false;
- }
- if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winunitcost")) == 0)
- {
- messageBox((currow)+ " 번째 단가를 " ,"C001");
- grd_goodwin.row = currow;
- grd_goodwin.col= grd_goodwin.colRef("winunitcost");
- grd_goodwin.editCell();
- return false;
- }
- if(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")) == 0)
- {
- messageBox((currow -1)+ " 번째 금액을 " ,"C001");
- grd_goodwin.row = currow;
- grd_goodwin.col= grd_goodwin.colRef("winamt");
- grd_goodwin.editCell();
- return false;
- }
-
- winqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty"));
- delivedeptqty = grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("delivedeptqty"));
- stocqty = winqty - delivedeptqty;
- model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocqty" , stocqty);
- if(stocqty > 0)model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "Y");
- else model.setValue(grd_goodwin.nodeset + "[" + (currow - grd_goodwin.fixedRows + 1) + "]/stocynindx" , "N");
-
- }
- }
- return true;
- }
-
- function fAfterRetrieve()
- {
- if(sch_select.selectedIndex == 0)
- {
- var nonwinqty = 0;
- var nonwinamt = 0;
- for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
- {
- nonwinamt = nonwinamt + 0 + parseFloat(grd_nonwin.valueMatrix(currow , grd_nonwin.colRef("reqfla")));
- }
-
- model.setValue(opt_sumreqqty.attribute("ref"),grd_nonwin.rows - grd_nonwin.fixedRows);
- model.setValue(opt_sumreqfla.attribute("ref"),nonwinamt);
-
- /* 입고건수,금액 초기화 */
- model.setValue(opt_winqtycnt.attribute("ref"),"0");
- model.setValue(opt_winqtytotal.attribute("ref"),"0");
- }else{
- var winqty = 0;
- var winamt = 0;
- for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
- {
- winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
- winamt = winamt + 0 + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
- }
-
- model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows - grd_goodwin.fixedRows);
- model.setValue(opt_sumwinamt.attribute("ref"),winamt);
- }
-
- if(sch_select.selectedIndex == 0)
- {
- if(model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno").length > 0)
- model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodnonwin/goodmaxwinno/winno"));
- }
- else
- {
- if(model.getValue("/root/main/list/goodwin/goodmaxwinno/winno").length > 0)
- model.setValue(ipt_winno.attribute("ref"),model.getValue("/root/main/list/goodwin/goodmaxwinno/winno"));
- }
- /* [2007.12.10 HBH] : 왜 하는지를 몰라 막음.*/
- //fArrangeControl("true");
- model.refresh();
- }
-
- function fArrangeControl(pDisabled)
- {
- ipt_instcd.disabled = pDisabled;
- cmb_goodflag.disabled =pDisabled;
- cmb_windeptcd.disabled =pDisabled;
- ipt_winpsn.disabled =pDisabled;
-
- if(pDisabled == "true")ipt_winno.attribute("editable") = "false";
- else
- {
- model.removeNodeset(grd_goodwin.nodeset);
- model.removeNodeset(grd_nonwin.nodeset);
- // model.removeNodeset(grd_goodreq.nodeset);
- ipt_winno.attribute("editable") = "true";
- }
- model.setFocus("ipt_winno");
- model.refresh();
- }
-
- function fWinqtyTotal()
- {
- var amt = 0;
- var cnt = 0;
-
-
- for(var r = grd_nonwin.fixedRows; r < grd_nonwin.rows; r++)
- {
- if( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("select")) == 'Y' )
- {
- amt += parseInt( grd_nonwin.valueMatrix(r, grd_nonwin.colRef("winamt")) );
- cnt ++;
- }
- }
-
- opt_winqtytotal.value = amt;
- opt_winqtycnt.value = cnt;
- }
-
- function fCalcWinamt(prow)
- {
- var pwinqty = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("winqty"))) ;
- var preqpackcntperunit = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("reqpackcntperunit"))) ;
- var pgoodpurccost = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("goodpurccost"))) ;
- if (preqpackcntperunit == 0) preqpackcntperunit = 1;
- var pgoodamt = parseInt((pwinqty/preqpackcntperunit) * pgoodpurccost);
- model.setValue(grd_nonwin.nodeset + "[" + prow + "]/winamt" , pgoodamt);
-
- //model.refresh();
- }
- function fCompareDataSetting( ) {
- model.setValue( opt_goodcd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("goodcd" ) ) );
- model.setValue( opt_winunit.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winunit" ) ) );
- model.setValue( opt_winunitcost.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winunitcost") ) );
- model.setValue( opt_winpackqty.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winpackqty") ) );
- model.setValue( ipt_winamt.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("winamt" ) ) );
- model.setValue( opt_bnscd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bnscd" ) ) );
- model.setValue( opt_edicd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("edicd" ) ) );
- model.setValue( opt_bigoodcd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bigoodcd" ) ) );
- model.setValue( opt_biwinunit.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinunit" ) ) );
- model.setValue( opt_biwinunitcost.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinunitcost") ) );
- model.setValue( opt_biwinpackqty.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinpackqty") ) );
- model.setValue( opt_biwinamt.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biwinamt" ) ) );
- model.setValue( opt_bibnscd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("bibnscd" ) ) );
- model.setValue( opt_biedicd.attribute("ref") , grd_nonwin.valueMatrix( grd_nonwin.row, grd_nonwin.colRef("biedicd" ) ) );
- fOldNewCompare("/root/main/list/wincompare/biwindetail", "/root/main/list/wincompare/windetail" )
- swt_map.refresh();
- }
- /*
- * old & new 결과값을 비교 한다.
- * pDefault : "Y" 일 경우 componets 초기화 ( 폰트 색상을 초기화 한다. )
- */
- function fOldNewCompare(pOriData_node, pNewData_node, pDefault) {
- // var child = window.document.body.group3.swt_select.cse_costlist.grp_disp.swt_map.children; // switch 안에 포함된 Case 묶음을 가지고 있는 객체
- var node1 = instance1.selectNodes(pOriData_node + "/*"); // Ori Master Data
- var node2 = instance1.selectNodes(pNewData_node + "/*"); // New Master Data
- var nodeName;
- var tempControl;
-
- if ( pDefault == "Y" ) {
- //. Grid Componets 초기화
- fComponetInit();
- return;
- }
-
- for (var i = 0; i < node1.length ; i++) {
- nodeName = node1.item(i).nodeName.split("_"); // -> old_good 이런 형태의 노드이기때문에 new 코드와 mapping 하기 위해서 "_" split 처리함
- // nodeName[1] 으로 비교 처리
- for (var j = 0; j < node2.length; j++) {
- if (nodeName[1] == node2.item(j).nodeName) {
- if (node1.item(i).value != node2.item(j).value ){
- fComponetSearch( pNewData_node + "/" + node2.item(j).nodeName,"Y");
- } else {
- fComponetSearch( pNewData_node + "/" + node2.item(j).nodeName);
- }
- break;
- }
- }
- }
- }
- /* ========================================
- * 신구 데이터 비교를 후 색상 변화를 처리하는 함수
- */
- function fComponetSearch(pNode, pCls) {
- var child = window.document.body.grp_biz.sch_select.cse_nonwin.swt_map.cse_basic.children;
- for (ii = 0; ii < child.length; ii++) {
- if( child.item(ii).attribute("ref").length <= 0 ) continue;
- if( child.item(ii).attribute("ref") == pNode) {
- if (pCls == "Y") {
- if (child.item(ii).elementName == "xforms:input" || child.item(ii).elementName == "xforms:ouput") {
- child.item(ii).attribute("color") = "red";
- }else {
- child.item(ii).attribute("background-color") = "#ccffcc";
- }
- return;
- } else {
- if (child.item(ii).elementName == "xforms:input" || child.item(ii).elementName == "xforms:ouput") {
- child.item(ii).initStyle("color");
- }else {
- child.item(ii).initStyle("background-color");
- }
- }
- continue;
- }
- } // end for
- }
- /*
- * 콤포넌트 초기화
- */
-
- function fComponetInit() {
- var child = window.document.body.grp_biz.sch_select.cse_nonwin.swt_map.cse_basic.children;
- var ii = 0;
- for (ii = 0; ii < child.length; ii++) {
- child2 = child.item(ii).children ;
- for (jj = 0; jj < child2.length; jj++) {
- if (child2.item(jj).elementName == "xforms:input" ) {
- child2.item(jj).initStyle("color");
- } else {
- child2.item(jj).initStyle("background-color");
- }
- }
- }
- }
-
- function fSetPosition ( pview ) {
- swt_map.visible = pview;
- if(pview == true) {
- grd_nonwin.attribute("width") = String(1193 - parseInt( swt_map.attribute("width") ) ) ; //848 //
- } else
- {
- grd_nonwin.attribute("width") = "1193";
- }
- // swt_map" class="sw_box" visibility="hidden"
- grd_nonwin.refresh();
- }
-
- function fGridSetting ( pGubun ) {
- if (ipt_suplplcecd.value == rszfGetMainCust(drg_main_suplplcecd)
- && model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' )
- {
- grd_nonwin.colHidden( grd_nonwin.colRef("goodunitcost") ) = true;
- grd_nonwin.colHidden( grd_nonwin.colRef("winqty") ) = true;
- grd_nonwin.colHidden( grd_nonwin.colRef("winunitcost") ) = false;
- grd_nonwin.colHidden( grd_nonwin.colRef("winpackqty") ) = false;
- } else {
- grd_nonwin.colHidden( grd_nonwin.colRef("goodunitcost") ) = false;
- grd_nonwin.colHidden( grd_nonwin.colRef("winqty") ) = false;
- grd_nonwin.colHidden( grd_nonwin.colRef("winunitcost") ) = true;
- grd_nonwin.colHidden( grd_nonwin.colRef("winpackqty") ) = true;
- }
- grd_nonwin.refresh();
- }
- ]]>
- </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:243px; height:14px; ">약품 입고관리</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:38px; width:1195; height:744; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:1195; height:61px; background-color:#fffbf2; border-color:#ffd799; "/>
- <!-- <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" editable="false" style="left:207px; top:18px; width:57px; height:19px; ">-->
- <input id="ipt_winno" ref="/root/send/goodwin/winno" class="input_default" style="left:207px; top:18px; width:57px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- // inputEnterKey("btn_search", "DOMActivate");
- if(event.keyCode == 13)
- {
- model.setValue(ipt_winno.attribute("ref"),ipt_winno.currentText);
- model.refresh();
- if(fCheckRetrieveData(false) == false)return;
- if(sch_select.selectedIndex == 0)
- {
- misfGridInit(grd_nonwin);
- submit("TRRSI00102");
- }
- else
- {
- misfMsterDetailRetrieve();
- }
- fAfterRetrieve();
- }
- ]]>
- </script>
- </input>
- <button id="bnt_suplplcecd" class="icon_search" style="left:186px; top:46px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- rszfOpenPopUpListByWndName(ipt_suplplcecd,"","suplplcecd,suplplcenm","SPRSD00220","instcd","ipt_instcd");
- model.refresh();
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <input id="ipt_suplplcecd" ref="/root/send/goodwin/suplplcecd" class="input_essential" maxlength="10" style="left:100px; top:44px; width:81px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(ipt_suplplcecd.value.length == 0)
- ipt_suplplcenm.value = "";
- else
- rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
- model.getValue(ipt_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcecd.attribute("ref")),"","suplplcecd,suplplcenm" ,
- ipt_suplplcecd,"SPRSD00220","instcd","ipt_instcd");
-
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_suplplcenm" ref="/root/send/goodwin/suplplcenm" class="input_fix" appearance="input" style="left:207px; top:44px; width:183px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(ipt_suplplcenm.value.length == 0)
- ipt_suplplcecd.value = "";
- else
- rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
- model.getValue(ipt_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
- ipt_suplplcenm,"SPRSD00220","instcd","cmb_instcd");
- ]]>
- </script>
- </input>
- <input id="ipt_calcdocudd" ref="/root/send/goodwin/calcdocudd" class="input_default" visibility="hidden" inputtype="date" style="left:853px; top:19px; width:144px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <select1 id="cmb_goodflag" ref="/root/send/goodwin/goodflag" class="combo_s_essential" visibility="hidden" appearance="minimal" style="left:1025px; top:15px; width:8px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/goodflag">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:100px; top:18px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /* 입고일자와 계산서일자가 동일하다고 한다 . sync */
- ipt_calcdocudd.value = ipt_windd.value;
-
- // 보나에스번호 조회
- fLoadBnsDeliveno("N");
- model.refresh();
-
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_winpsn" ref="/root/send/goodwin/winpsn" class="input_fix" visibility="hidden" maxlength="10" appearance="input" style="left:1040px; top:15px; width:25px; height:19px; "/>
- <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1124px; top:30px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckRetrieveData(false) == false)return;
- model.setValue("/root/send/goodwin/retrmaxwinnoyn","Y");
- model.setValue("/root/send/goodwin/winno","");
- if(sch_select.selectedIndex == 0)
- {
- misfGridInit(grd_nonwin);
- if (ipt_suplplcecd.value==rszfGetMainCust(drg_main_suplplcecd) &&
- model.getValue(chk_nonautowinyn.attribute("ref"))!='Y' ) {
- btn_trans.dispatch("DOMActivate");
- fSetPosition(false);
- }
- else submit("TRRSI00102");
- }
- else
- {
- // misfGridInit(grd_goodwin);
- // misfGridInit(grd_goodreq);
- misfMsterDetailRetrieve();
- }
- fAfterRetrieve();
- fGridSetting(); //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- ]]>
- </script>
- </button>
- <switch id="sch_select" style="left:0px; top:105px; width:1195px; height:638px; ">
- <case id="cse_nonwin" selected="true" style="left:0px; top:0px; width:1193px; height:638; ">
- <datagrid id="grd_nonwin" nodeset="/root/main/list/goodnonwin/goodnonwinlist" caption="선택^입고유형^발주일자^순번^약품코드^약품명^함량^모델^제조회사^발주수량^발주수량^포장^포장^포장^단가^단가^금액^기입고량^입고수량^입고수량^입고금액^진행상태^승인^미승인사유" colsep="^" colwidth="32, 60, 72, 37, 88, 243, 117, 0, 0, 51, 52, 38, 36, 31, 69, 69, 81, 65, 67, 67, 89, 59, 30, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="23" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1193px; height:598px; ">
- <col checkvalue="Y,N" ref="select" type="checkbox"/>
- <col ref="iokindnm" style="text-align:left; "/>
- <col ref="purcdmnddd" format="yyyy-mm-dd"/>
- <col ref="purcdmndno" style="text-align:center; "/>
- <col ref="goodcd"/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="goodmodel" visibility="hidden"/>
- <col ref="prodcmpynm" visibility="hidden"/>
- <col ref="reqpackcnt" format="#,###" style="text-align:right; "/>
- <col ref="reqqty" format="#,###" style="text-align:right; "/>
- <col ref="reqpackcntperunit"/>
- <col ref="requnit"/>
- <col ref="reqpackunit"/>
- <col ref="winunitcost" format="#,###.##" style="text-align:right; "/>
- <col ref="goodunitcost" visibility="hidden" format="#,###" style="text-align:right; "/>
- <!--// -->
- <col ref="reqfla" format="#,###" style="text-align:right; "/>
- <col ref="prewinqty" format="#,###" style="left:1096px; top:23px; width:65px; height:23px; text-align:right; "/>
- <col ref="winpackqty" format="#,###.##" style="text-align:right; "/>
- <col ref="winqty" type="input" visibility="hidden" format="#,###" style="text-align:right; "/>
- <!--// -->
- <col ref="winamt" format="#,###.#" style="text-align:right; "/>
- <col ref="prcsflagnm" visibility="hidden"/>
- <col ref="aprvnm" visibility="hidden" style="text-align:center; "/>
- <col ref="unaprvresn" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="goodflag" visibility="hidden"/>
- <col ref="windd" visibility="hidden"/>
- <col ref="winpsn" visibility="hidden"/>
- <col ref="windeptcd" visibility="hidden"/>
- <col ref="suplplcecd" visibility="hidden"/>
- <col ref="paycond" visibility="hidden"/>
- <col ref="temppay" visibility="hidden"/>
- <col ref="calcdocukind" visibility="hidden"/>
- <col ref="calcdocudd" visibility="hidden"/>
- <col ref="iokind" visibility="hidden"/>
- <col ref="delivedeptqty" visibility="hidden"/>
- <col ref="deliveno" visibility="hidden"/>
- <col ref="stocqty" visibility="hidden"/>
- <col ref="winseqno" visibility="hidden"/>
- <col ref="purcdmndseq" visibility="hidden"/>
- <col ref="winpackcntperunit" visibility="hidden"/>
- <col ref="prewinqty" visibility="hidden"/>
- <col ref="winpackunit" visibility="hidden"/>
- <col ref="reqflag" visibility="hidden"/>
- <col ref="reqdd" visibility="hidden"/>
- <col ref="reqno" visibility="hidden"/>
- <col ref="reqseqno" visibility="hidden"/>
- <col ref="delivedeptcd" visibility="hidden"/>
- <col ref="delivedd" visibility="hidden"/>
- <col ref="deliveno" visibility="hidden"/>
- <col ref="deliveseqno" visibility="hidden"/>
- <col ref="valiterm" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="prewinqty" visibility="hidden"/>
- <col ref="allsizespecid" visibility="hidden"/>
- <col ref="allsizespecidnm" visibility="hidden"/>
- <col ref="stdysubno" visibility="hidden"/>
- <col ref="ifgubn" visibility="hidden"/>
- <col ref="ifid" visibility="hidden"/>
- <col ref="suplplcecd" visibility="hidden"/>
- <col ref="winqty" visibility="hidden"/>
- <col ref="goodunitcost" visibility="hidden"/>
- <col ref="goodpurccost" visibility="hidden"/>
- <col ref="bnscd" visibility="hidden"/>
- <col ref="winunit" visibility="hidden"/>
- <col ref="bnswinstatus" visibility="hidden"/>
- <col ref="edicd" visibility="hidden"/>
- <col ref="bigoodcd" visibility="hidden"/>
- <col ref="biwinunit" visibility="hidden"/>
- <col ref="biwinunitcost" visibility="hidden"/>
- <col ref="biwinpackqty" visibility="hidden"/>
- <col ref="biwinamt" visibility="hidden"/>
- <col ref="bibnscd" visibility="hidden"/>
- <col ref="biedicd" visibility="hidden"/>
- <col ref="comparevalue" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(grd_nonwin.col == grd_nonwin.colRef("winqty"))
- {
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
- fCalcWinamt(grd_nonwin.row - grd_nonwin.fixedRows + 1);
- fWinqtyTotal();
- }
- else if(grd_nonwin.col == grd_nonwin.colRef("select"))
- {
- if(grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("select")) == "N")
- {
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winqty" , 0);
- grd_nonwin.rowStatus(grd_nonwin.row) = "0";
- }
- else
- {
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winqty" , ( grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("reqqty"))- grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("prewinqty")) ));
- grd_nonwin.rowStatus(grd_nonwin.row) = "2";
- }
-
- fCalcWinamt(grd_nonwin.row - grd_nonwin.fixedRows + 1);
- fWinqtyTotal();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_nonwin.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(ipt_suplplcecd.value == rszfGetMainCust(drg_main_suplplcecd) //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- && model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- && grd_nonwin.rows - grd_nonwin.fixedRows > 0
- && grd_nonwin.fixedRows <= grd_nonwin.row ) {
- fCompareDataSetting( grd_nonwin );
- fSetPosition(true);
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if( ipt_suplplcecd.value == rszfGetMainCust(drg_main_suplplcecd) //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- && model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- && grd_nonwin.rows - grd_nonwin.fixedRows > 0
- && grd_nonwin.fixedRows <= grd_nonwin.row
- && swt_map.visible == true ) {
- grd_nonwin.dispatch("ondblclick");
- // fCompareDataSetting( grd_nonwin );
- // fSetPosition(true);
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption23" style="left:178px; top:5px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
- <input id="ipt_reqfrdd" ref="/root/send/goodwin/purcdmndfrdd" class="input_s_essential" inputtype="date" style="left:74px; top:5px; width:100px; height:19px; "/>
- <input id="ipt_reqtodd" ref="/root/send/goodwin/purcdmndtodd" class="input_s_essential" inputtype="date" style="left:194px; top:5px; width:100px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </input>
- <button id="btnselect" class="btn2_letter9" style="left:1074px; top:4px; width:119px; height:19px; ">
- <caption>전체/전체선택 취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for(var liRow = grd_nonwin.fixedRows; liRow < grd_nonwin.rows ; liRow++)
- {
- if(grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("select")) == "Y")
- {
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/select" , "N");
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqty" , 0);
- grd_nonwin.rowStatus(liRow) = "0";
- }
- else
- {
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winqty" , ( grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqqty"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinqty")) ));
- grd_nonwin.rowStatus(liRow) = "2";
- }
- fCalcWinamt(liRow);
- }
- fWinqtyTotal();
- model.refresh();
- ]]>
- </script>
- </button>
- <line id="line2" class="line_1" style="x1:0px; y1:25; x2:1193; y2:25; "/>
- <caption id="caption8" style="left:15px; top:5px; width:80px; height:23px; font-weight:bold; vertical-align:middle; ">발주일자 :</caption>
- <button id="btn_trans" class="btn2_letter11" visibility="hidden" style="left:930px; top:4px; width:141px; height:19px; ">
- <caption>도매상 미입고 가져오기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(fCheckRetrieveData(true) == false)return;
- fDataLoadNoWin();
- fWinqtyTotal();
- fSetPosition(false);
- ]]>
- </script>
- </button>
- <output id="opt_sumreqqty" ref="/root/init/reqcnt" class="output_default" format="#,###" style="left:363px; top:4px; width:56px; height:19px; font-weight:bold; "/>
- <caption id="caption4" style="left:430px; top:4px; width:67px; height:23px; font-weight:bold; vertical-align:middle; ">발주금액 :</caption>
- <caption id="caption5" style="left:299px; top:4px; width:67px; height:23px; font-weight:bold; vertical-align:middle; ">발주건수 :</caption>
- <output id="opt_sumreqfla" ref="/root/init/reqamt" class="output_default" format="#,###" style="left:494px; top:4px; width:85px; height:19px; font-weight:bold; "/>
- <caption id="cap_winqtytotal" style="left:717px; top:4px; width:67px; height:23px; vertical-align:middle; ">입고금액 :</caption>
- <output id="opt_winqtycnt" ref="/root/init/winqtycnt" class="output_default" format="#,###" style="left:647px; top:4px; width:56px; height:19px; font-weight:bold; text-align:right; "/>
- <caption id="caption10" style="left:588px; top:4px; width:67px; height:23px; vertical-align:middle; ">입고건수 :</caption>
- <output id="opt_winqtytotal" ref="/root/init/winqtytotal" class="output_default" format="#,###" style="left:776px; top:4px; width:85px; height:19px; font-weight:bold; text-align:right; "/>
- <switch id="swt_map" class="sw_box" visibility="hidden" style="left:920px; top:35px; width:270px; height:250px; border-color:#fffbf2; border-style:hidden; ">
- <case id="cse_basic" selected="true" style="left:0px; top:0px; width:270px; height:250px; background-color:#fffbf2; ">
- <!-- title start -->
- <caption id="caption9" class="cell_2" style="left:80px; top:10px; width:85px; height:23px; font-weight:bold; color:#ffff00; text-align:center; vertical-align:middle; ">병원 정보</caption>
- <caption id="caption21" class="cell_2" style="left:175px; top:10px; width:85px; height:23px; font-weight:bold; color:#ffff00; text-align:center; vertical-align:middle; ">보나에스</caption>
- <!-- title end -->
- <!-- caption start -->
- <caption id="caption14" class="cell_1" style="left:10px; top:39px; width:65px; height:23px; vertical-align:middle; ">약품 코드</caption>
- <caption id="caption16" class="cell_1" style="left:10px; top:65px; width:65px; height:23px; vertical-align:middle; ">입고 단위</caption>
- <caption id="caption17" class="cell_1" style="left:10px; top:91px; width:65px; height:23px; vertical-align:middle; ">입고 단가</caption>
- <caption id="caption18" class="cell_1" style="left:10px; top:117px; width:65px; height:23px; vertical-align:middle; ">입고 수량</caption>
- <caption id="caption19" class="cell_1" style="left:10px; top:143px; width:65px; height:23px; vertical-align:middle; ">입고 금액</caption>
- <caption id="caption20" class="cell_1" style="left:10px; top:169px; width:65px; height:23px; vertical-align:middle; ">보나 코드</caption>
- <caption id="caption22" class="cell_1" style="left:10px; top:195px; width:65px; height:23px; vertical-align:middle; ">EDI코드</caption>
- <!-- caption end -->
- <!-- new item start -->
- <input id="opt_goodcd" ref="/root/main/list/wincompare/windetail/goodcd" class="output_fix" style="left:80px; top:39px; width:85px; height:19px; "/>
- <input id="opt_winunit" ref="/root/main/list/wincompare/windetail/winunit" class="output_fix" style="left:80px; top:65px; width:85px; height:19px; "/>
- <input id="opt_winunitcost" ref="/root/main/list/wincompare/windetail/winunitcost" class="output_fix" format="#,###.##" style="left:80px; top:91px; width:85px; height:19px; text-align:right; "/>
- <input id="opt_winpackqty" ref="/root/main/list/wincompare/windetail/winpackqty" class="output_fix" format="#,###" style="left:80px; top:117px; width:85px; height:19px; text-align:right; "/>
- <input id="ipt_winamt" ref="/root/main/list/wincompare/windetail/winamt" class="input_default" format="#,###" style="left:80px; top:143px; width:85px; height:19px; text-align:right; "/>
- <input id="opt_bnscd" ref="/root/main/list/wincompare/windetail/bnscd" class="output_fix" style="left:80px; top:169px; width:85px; height:19px; "/>
- <input id="opt_edicd" ref="/root/main/list/wincompare/windetail/edicd" class="output_fix" style="left:80px; top:195px; width:85px; height:19px; "/>
- <!-- new item end -->
- <!-- old item start -->
- <output id="opt_bigoodcd" ref="/root/main/list/wincompare/biwindetail/bi_goodcd" class="output_fix" style="left:175px; top:39px; width:85px; height:19px; "/>
- <output id="opt_biwinunit" ref="/root/main/list/wincompare/biwindetail/bi_winunit" class="output_fix" style="left:175px; top:65px; width:85px; height:19px; "/>
- <output id="opt_biwinunitcost" ref="/root/main/list/wincompare/biwindetail/bi_winunitcost" class="output_fix" format="#,###.##" style="left:175px; top:91px; width:85px; height:19px; text-align:right; "/>
- <output id="opt_biwinpackqty" ref="/root/main/list/wincompare/biwindetail/bi_winpackqty" class="output_fix" format="#,###" style="left:175px; top:117px; width:85px; height:19px; text-align:right; "/>
- <output id="opt_biwinamt" ref="/root/main/list/wincompare/biwindetail/bi_winamt" class="output_fix" format="#,###" style="left:175px; top:143px; width:85px; height:19px; text-align:right; "/>
- <output id="opt_bibnscd" ref="/root/main/list/wincompare/biwindetail/bi_bnscd" class="output_fix" style="left:175px; top:169px; width:85px; height:19px; "/>
- <output id="opt_biedicd" ref="/root/main/list/wincompare/biwindetail/bi_edicd" class="output_fix" style="left:175px; top:195px; width:85px; height:19px; "/>
- <!-- end item start -->
- <button id="button1" class="btn2_letter3" style="left:202px; top:220px; width:53px; height:19px; ">
- <caption>닫 기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSetPosition(false);
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter3" style="left:140px; top:220px; width:53px; height:19px; ">
- <caption>확 인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if( grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("winamt")) != model.getValue(ipt_winamt.attribute("ref")) ) {
- var pvalue = messageBox("수정된 입고 금액으로","Q009");
- if ( pvalue == 6 ) {
- grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("winamt")) = model.getValue(ipt_winamt.attribute("ref"));
- grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("comparevalue")) = "0";
- fSetGridColor( grd_nonwin.row );
- fWinqtyTotal();
- }
- else
- model.setValue( ipt_winamt.attribute("ref"), grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("winamt")) );
- } else {
- var pvalue = messageBox("병원 기준으로 입고를","Q009");
- if ( pvalue == 6 ) {
- grd_nonwin.valueMatrix(grd_nonwin.row, grd_nonwin.colRef("comparevalue")) = "0";
- fSetGridColor( grd_nonwin.row );
- }
- }
-
- fSetPosition(false);
- ]]>
- </script>
- </button>
- </case>
- </switch>
- </case>
- <case id="cse_win" style="left:0px; top:0px; width:1193px; height:638; ">
- <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" caption="순번^발주번호^약품코드*^약품명^함량^포장수량^모델^제조회사^낱개수량^포장^포장^포장^단가^입고금액^출고수량^잔량^기관코드^물품구분^입고일자^입고자^입고부서^장소^계산구분^가납여부^전자계산방법^전자계산유무^입출력^부서^요구일자^요구번호^요구순번^출고번호^출고순번^보나에스코드^calcdocudd^profno^계정코드^청구일자^청구번호^청구순번^valiterm^재고유무^체크일자^체크자^체크유무^슬립일자^슬립번호^공급처코드^비고^이전입고량^caption1" colsep="^" colwidth="52, 0, 116, 287, 129, 71, 0, 0, 71, 78, 71, 75, 118, 100, 59, 52, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="25" ellipsis="true" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" tooltip="true" style="left:0px; top:30px; width:1193px; height:598px; ">
- <col ref="winseqno" style="text-align:center; "/>
- <col ref="winno" visibility="hidden"/>
- <col ref="goodcd" _key="true"/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="winpackqty" format="#,###" maxlength="9" style="text-align:right; "/>
- <col ref="goodmodel" visibility="hidden"/>
- <col ref="prodcmpynm" visibility="hidden"/>
- <col ref="winqty" format="#,###" maxlength="9" style="text-align:right; "/>
- <col ref="winpackcntperunit" format="#,###" maxlength="9" style="text-align:right; "/>
- <col ref="winpackunit" style="text-align:center; "/>
- <col ref="winunit" style="text-align:center; "/>
- <col ref="winunitcost" format="#,###.##" maxlength="14" style="text-align:right; "/>
- <col ref="winamt" format="#,###.##" maxlength="14" style="text-align:right; "/>
- <col ref="predelivedeptqty" visibility="hidden" format="#,###" maxlength="14" style="text-align:right; "/>
- <col ref="stocqty" visibility="hidden" format="#,###" maxlength="14" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="goodflag" visibility="hidden"/>
- <col ref="windd" visibility="hidden"/>
- <col ref="winpsn" visibility="hidden"/>
- <col ref="windeptcd" visibility="hidden"/>
- <col ref="installplcecd" visibility="hidden"/>
- <col ref="paycond" visibility="hidden"/>
- <col ref="temppay" visibility="hidden"/>
- <col ref="calcdocukind" visibility="hidden"/>
- <col ref="elctstmntyn" visibility="hidden"/>
- <col ref="iokind" visibility="hidden"/>
- <col ref="suplplcecd" visibility="hidden"/>
- <col ref="purcdmnddd" visibility="hidden"/>
- <col ref="purcdmndno" visibility="hidden"/>
- <col ref="purcdmndseq" visibility="hidden"/>
- <col ref="deliveno" visibility="hidden"/>
- <col ref="deliveseqno" visibility="hidden"/>
- <col ref="bnscd" visibility="hidden"/>
- <col ref="calcdocudd" visibility="hidden"/>
- <col ref="profno" visibility="hidden"/>
- <col ref="acntcd" visibility="hidden"/>
- <col ref="reqdd" visibility="hidden"/>
- <col ref="reqno" visibility="hidden"/>
- <col ref="reqseqno" visibility="hidden"/>
- <col ref="valiterm" visibility="hidden"/>
- <col ref="stocynindx" visibility="hidden"/>
- <col ref="chkdd" visibility="hidden"/>
- <col ref="chkpsn" visibility="hidden"/>
- <col ref="chkyn" visibility="hidden"/>
- <col ref="slipdd" visibility="hidden"/>
- <col ref="slipno" visibility="hidden"/>
- <col ref="suppcustcd" visibility="hidden"/>
- <col ref="cmt" visibility="hidden"/>
- <col ref="prewinqty" visibility="hidden"/>
- <col ref="minexch" visibility="hidden"/>
- <col ref="reqqty" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- if (grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.rowStatus(grd_goodwin.row) == "1" ) {//구성물품코드를 눌렀을 경우
-
- model.removenode("/root/copynode");
- model.removenode(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- model.makeNode("/root/copynode");
-
- rszfOpenPopUpListByWndName(grd_goodwin,"","goodcd,goodnm","SPRSD00190","instcd,goodflag","ipt_instcd,cmb_goodflag");
-
- var cur_row = grd_goodwin.row;
- var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
- setCSVToNode("/root/copynode", CSV, "goodwinlist");
-
- fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
- // ipt_cmt.value = model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/cmt");
- // //misfGridInit(grd_goodreq);
- //
- // if(grd_goodwin.rowStatus(grd_goodwin.row) != "1" && model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/purcdmnddd").length > 0)
- // {
- // misfMsterDetailRetrieve();
- // }
- // else misfGridInit(grd_goodreq);
- // ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- if(grd_goodwin.col == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.colRef("goodcd")).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(ipt_instcd.attribute("ref")) + "," +model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag") + "," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd") + ",,,," ,"","goodcd,goodnm,goodspec,goodmodel,prodcmpynm,exchqty,goodunitcost",grd_goodwin,"SPRSD00190","instcd,goodflag","ipt_instcd," + model.getValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodflag"),"Y");
- model.refresh();
-
- if( grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length> 0)
- {
- if(model.getValue("/root/init/main/goodlist/exchqty") > 0) model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit",model.getValue("/root/init/main/goodlist/exchqty") );
- else model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/winpackcntperunit","1");
-
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" ,model.getValue("/root/init/main/goodlist/purcunit"));
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , model.getValue("/root/init/main/goodlist/purcunit"));
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" ,1);
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , model.getValue("/root/init/main/goodlist/goodunitcost"));
- }
- model.recalculate();
- model.refresh();
-
- var cur_row = grd_goodwin.row;
- var status = grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("m"));
-
- var CSV = model.getValue(gvParamPath +"/SMRSD00400_/SMRSD00400_value");
-
- if(CSV.length == 0 && grd_goodwin.valueMatrix(cur_row, grd_goodwin.colRef("goodnm")).length == 0)
- {
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodcd" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodnm" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodspec" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/goodmodel" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/prodcmpynm" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackqty" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackunit" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunit" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winqty" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winpackcntperunit" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winunitcost" , "");
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1) + "]/winamt" , "");
- grd_goodwin.col = grd_goodwin.colRef("goodcd");
- grd_goodwin.editCell();
- }
- if(CSV.length > 0)
- {
- model.setValue(grd_goodwin.nodeset + "[" + (grd_goodwin.row - grd_goodwin.fixedRows + 1)+ "]/goodcd","");
- setCSVToNode("/root/copynode", CSV, "goodwinlist");
- fSettingGoodList("/root/copynode", "goodwinlist" , "userqty");
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == 9)
- {
- if(event.shiftKey)
- {
- if(grd_goodwin.colAttribute(grd_goodwin.col + 1, "type").indexOf ("input") > -1)
- {
- for(curcol = grd_goodwin.col -1 ; curcol > -1 ; curcol--)
- {
- if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
- {
- grd_goodwin.col = curcol;
- grd_goodwin.editCell();
- return;
- }
- }
- }
- }
- else
- {
- if(grd_goodwin.colAttribute(grd_goodwin.col, "type").indexOf ("input") == -1)
- {
- if(grd_goodwin.col - 1 == grd_goodwin.colRef("goodcd") && grd_goodwin.valueMatrix(grd_goodwin.row, grd_goodwin.col - 1).length == 0)
- {
- grd_goodwin.col = grd_goodwin.colRef("goodcd");
- grd_goodwin.editCell();
- return;
- }
- for(curcol = grd_goodwin.col ; curcol <grd_goodwin.cols ; curcol++)
- {
- if(grd_goodwin.colAttribute(curcol, "type").indexOf ("input") > -1)
- {
- grd_goodwin.col = curcol;
- grd_goodwin.editCell();
- return;
- }
- }
- }
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_goodwin.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <caption id="caption3" class="tit_2" style="left:5px; top:10px; width:118px; height:13px; ">입고내역</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:1193; y2:25px; "/>
- <button id="btn_choidel" class="btn2_letter3" style="left:1140px; top:4px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_goodwin, "D");
- ]]>
- </script>
- </button>
- <output id="ipt_sumwinqty" ref="/root/init/winqty" class="output_default" style="left:757px; top:4px; width:70px; height:19px; font-weight:bold; "/>
- <output id="opt_sumwinamt" ref="/root/init/winamt" class="output_default" format="#,###" style="left:911px; top:4px; width:125px; height:19px; font-weight:bold; "/>
- <button id="btn_insert" class="btn2_letter3" visibility="hidden" style="left:1085px; top:4px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(fCheckRetrieveData(true) == false)return;
- misfGridIUD(grd_goodwin, "A");
- grd_goodwin.row = grd_goodwin.rows -grd_goodwin.fixedRows ;
- // ipt_cmt.value = "";
- fDefaultSetting(grd_goodwin.row );
- grd_goodwin.col = grd_goodwin.colRef("goodcd");
- grd_goodwin.editCell();
- ]]>
- </script>
- </button>
- <caption id="caption1" style="left:690px; top:4px; width:70px; height:23px; font-weight:bold; vertical-align:middle; ">입고건수 :</caption>
- <caption id="caption2" style="left:844px; top:4px; width:70px; height:23px; font-weight:bold; vertical-align:middle; ">입고합계 :</caption>
- </case>
- </switch>
- <button id="button2" class="btn_sw" group="tab" style="left:124px; top:75px; width:144px; height:22px; ">
- <caption>입고관리</caption>
- <toggle case="cse_win" ev:event="DOMActivate">fSetPosition(false);</toggle>
- </button>
- <button id="button6" class="btn_sw" group="tab" selected="true" style="left:0px; top:75px; width:125px; height:22px; ">
- <caption>미입고조회/입고</caption>
- <toggle case="cse_nonwin" ev:event="DOMActivate"/>
- </button>
- <input id="ipt_iokind" ref="/root/send/goodwin/iokind" visibility="hidden" style="left:1095px; top:45px; width:10px; height:19px; "/>
- <line id="line5" class="line_4" style="x1:1109px; y1:18px; x2:1109px; y2:61px; border-color:#ffe4bb; border-left-style:solid; "/>
- <caption id="caption15" class="search_name" style="left:18px; top:45px; width:88px; height:17px; ">공 급 처 :</caption>
- <caption id="caption11" class="search_name" style="left:15; top:19px; width:86px; height:17px; ">입고일자 :</caption>
- <caption id="caption12" class="search_name" style="left:473px; top:19px; width:86px; height:17px; ">입고부서 :</caption>
- <caption id="caption13" class="search_name" visibility="hidden" style="left:755px; top:19px; width:99px; height:17px; ">계산서일자 :</caption>
- <input id="ipt_instcd" ref="/root/send/goodwin/instcd" visibility="hidden" style="left:1070px; top:15px; width:30px; height:19px; "/>
- <select1 id="cmb_windeptcd" ref="/root/send/goodwin/windeptcd" class="combo_s_essential" appearance="minimal" style="left:563px; top:20px; width:160px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // if (model.getValue(chk_nonautowinyn.attribute("ref")) !='Y' ) {
- misfGridInit(grd_nonwin);
- // 보나에스번호 조회
- ///fLoadBnsDeliveno("N");
- model.refresh();
- // }
-
- ]]>
- </script>
- </select1>
- <output id="opt_interfacegubn" ref="/root/send/goodwin/interfacegubn" visibility="hidden" style="left:1070px; top:45px; width:20px; height:19px; "/>
- <script type="javascript" ev:event="xforms-valid">
- <![CDATA[
- if(ipt_suplplcenm.value.length == 0)
- ipt_suplplcecd.value = "";
- else
- rszfValidationCheck("TRRSD00221", "reqcustomlist", "instcd,refcond,retrnm",
- model.getValue(cmb_instcd.attribute("ref")) +",," + model.getValue(ipt_suplplcenm.attribute("ref")),"","suplplcecd,suplplcenm" ,
- ipt_suplplcenm,"SPRSD00220","instcd","cmb_instcd");
- model.refresh();
- ]]>
- </script>
- <select1 id="cmb_bideliveno" ref="/root/send/goodwin/bideliveno" disabled="true" visibility="hidden" appearance="minimal" style="left:583px; top:44px; width:140px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_trans.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <caption id="caption7" class="search_name" visibility="hidden" style="left:473px; top:45px; width:112px; height:17px; ">도매상 파일 :</caption>
- <output id="opt_calcdocukind" ref="/root/send/goodwin/calcdocukind" visibility="hidden" style="left:1050px; top:45px; width:15px; height:19px; "/>
- <select id="chk_nonautowinyn" ref="/root/send/nonautowinyn" visibility="hidden" overflow="visible" appearance="full" style="left:795px; top:45px; width:90px; height:15px; font-weight:bold; border-style:none; ">
- <choices>
- <item>
- <label>수작업입고</label>
- <value>Y</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.removenode("/root/send/savenonwin/goodnowintype"); // 보나에스 입고 파일로 저장할 경우 지정되는 노드.. 저장후 초기화 한다.
- cmb_windeptcd.dispatch("xforms-value-changed");
- ]]>
- </script>
- </select>
- </group>
- <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
- <button id="button3" class="btn6_letter2" visibility="hidden" style="left:0px; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- <button id="btn_init" class="btn4_letter3" style="left:1127px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <line id="line17" class="line_6" style="x1:0px; y1:25px; x2:1195px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" style="left:1070px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(sch_select.selectedIndex == 0)
- {
- if(fCheckSaveData() == false)return;
-
- if(fSettingSaveInData()== false) return;
- model.setValue("/root/send/savenonwin/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
- model.setValue("/root/send/savenonwin/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
-
- model.setValue("/root/send/savenonwin/goodnonwinlist", grd_nonwin.getUpdateData());
- submit("TXRSI00102");
- if (model.getValue(gvErrorMsgPath + "/type") != "error")
- {
- //if (ipt_suplplcecd.value==rszfGetMainCust(drg_main_suplplcecd)) fLoadBnsDeliveno("N");
- //model.removenode("/root/send/savenonwin/goodnowintype"); // 보나에스 입고 파일로 저장할 경우 지정되는 노드.. 저장후 초기화 한다.
- btn_search.dispatch("DOMActivate");
- }
- }
- else
- {
- model.setValue("/root/send/save/interfacecustcdlist/purc_main_suplplcecd",rszfGetMainCust(purc_main_suplplcecd));
- model.setValue("/root/send/save/interfacecustcdlist/drg_main_suplplcecd",rszfGetMainCust(drg_main_suplplcecd));
- misfSave("TXRSI00101");
- if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|