1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>약국입고관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <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[
- fInitialize();
- ]]>
- </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() {
-
- misfGridInit(grd_goodwin);
- misfGridInit(grd_nonwin);
-
- var curdate = getCurrentDate();
- var cvtdate = curdate.toDate("YYYYMMDD");
-
- model.setValue(ipt_windd.attribute("ref") ,curdate);
-
- var bfdd = ((getCurrentDate()).toDate()).getAddDate(-1, "M");
- model.setValue(ipt_reqfrdd.attribute("ref") ,bfdd.getDateFormat());
- model.setValue(ipt_reqtodd.attribute("ref") ,curdate);
- model.setValue(ipt_sumwinqty.attribute("ref"),0);
- model.setValue(opt_sumwinamt.attribute("ref"),0);
-
- rszfComboStockArthDeptcdList(cmb_windeptcd,getUserInfo("dutplceinstcd"),"PH" );
- model.setValue("/root/send/goodwin/windeptcd",getUserInfo("dutplcecd"))
-
- model.setValue(ipt_instcd.attribute("ref") , getUserInfo("dutplceinstcd"));
-
- grd_nonwin.selectionmode = "free";
- grd_goodwin.selectionmode = "free";
-
- for(licol = 0; licol < grd_nonwin.cols ; licol++){
- if(grd_nonwin.colRef("reqdeptnm") != licol){
- grd_nonwin.mergecol(licol) = false;
- }
- }
- for(licol = 0; licol < grd_goodwin.cols ; licol++){
- if(grd_goodwin.colRef("windeptnm") != licol){
- grd_goodwin.mergecol(licol) = false;
- }
- }
- grd_nonwin.mergecells = "bycol";
- grd_goodwin.mergecells = "bycol";
- model.refresh();
- }
- 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" ,"PH");
- 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(grd_setting.nodeset+"["+prow+"]/reqdeptcd"));
- model.setValue(grd_setting.nodeset+"["+prow+"]/paycond" ,"1");
- model.setValue(grd_setting.nodeset+"["+prow+"]/calcdocukind",model.getValue(opt_calcdocukind.attribute("ref")));;
- model.setValue(grd_setting.nodeset+"["+prow+"]/winseqno" ,fGetMaxWinSeqNo());
-
- }
- function fGetMaxWinSeqNo()
- {
- var maxwinseqno = "";
- for(var currow = grd_goodwin.rows -1 ; currow > 0;currow--){
-
- if(currow == 1){
- maxwinseqno = 0;
- }else{
- maxwinseqno = parseFloat(grd_goodwin.valueMatrix(currow-1 , grd_goodwin.colRef("winseqno")));
- }
- maxwinseqno = maxwinseqno + 1;
- break;
- }
- 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()
- {
- 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")));
- }
- }
-
- 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 fCheckSaveData()
- {
- 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;
- }
-
-
- }
- }
- 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;
- }
-
- 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();
- }
- /**
- * @ver :
- * @desc : 총입고건수 및 총입고 금액 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fWinqtyTotal(flag)
- {
- var amt = 0;
- var cnt = 0;
- if(flag==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;
- }else{
- for(var r = grd_goodwin.fixedRows; r < grd_goodwin.rows; r++)
- {
- amt += parseInt( grd_goodwin.valueMatrix(r, grd_goodwin.colRef("winamt")) );
- cnt ++;
-
- }
- ipt_sumwinqty.value = cnt;
- opt_sumwinamt.value = amt;
- }
-
- }
- /**
- * @ver :
- * @desc : 입고수량 및 입고금액 계산 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCalcWinamt(flag,prow)
- {
- if(flag==0){
- var pWinPackQty = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("winpackqty"))) ;
- var pGoodPurcCost = parseInt(grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("goodunitcost"))) ;
- var ReqPackCntPerUnit = grd_nonwin.valueMatrix(prow, grd_nonwin.colRef("reqpackcntperunit"));
- var pWinAmt = parseInt(pWinPackQty * pGoodPurcCost);
- var pWinQty = parseInt(pWinPackQty * ReqPackCntPerUnit);
- model.setValue(grd_nonwin.nodeset + "[" + prow + "]/winamt" , pWinAmt);
- model.setValue(grd_nonwin.nodeset + "[" + prow + "]/winqty" , pWinQty);
- grd_nonwin.refresh();
- }else{
- var pWinPackQty = parseInt(grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winpackqty"))) ;
- var pWinunitcost = parseInt(grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winunitcost"))) ;
- var pWinpackcntperunit = grd_goodwin.valueMatrix(prow, grd_goodwin.colRef("winpackcntperunit"));
- var pWinAmt = parseInt(pWinPackQty * pWinunitcost);
- var pWinQty = parseInt(pWinPackQty * pWinpackcntperunit);
- model.setValue(grd_goodwin.nodeset + "[" + prow + "]/winamt" , pWinAmt);
- model.setValue(grd_goodwin.nodeset + "[" + prow + "]/winqty" , pWinQty);
- grd_goodwin.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.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" visibility="hidden" style="left:640px; top:25px; width:57px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
-
- 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>
- <input id="ipt_windd" ref="/root/send/goodwin/windd" class="input_s_essential" inputtype="date" style="left:105px; top:28px; width:105px; height:19px; "/>
- <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[
- model.setValue("/root/send/goodwin/goodflag","PH");
- if(sch_select.selectedIndex == 0){
- if(submit("TRRSI00102")){
-
- fAfterRetrieve();
- fGridSetting(); //-- 수작업 입고에 따른 조건 추가 [20090408]YYJ
- for(var currow = grd_nonwin.fixedRows ; currow < grd_nonwin.rows ; currow++)
- {
- grd_nonwin.cellstyle("background-color", currow, grd_nonwin.colRef("winpackqty"), currow, grd_nonwin.colRef("winpackqty") ) = "yellow";
- }
- grd_nonwin.col = grd_nonwin.colRef("winpackqty");
- model.setFocus("grd_nonwin");
- grd_nonwin.editCell();
- }
- }else{
- if(submit("TRRSI00101")){
-
- var winqty = 0;
- var winamt = 0;
- for(var currow = grd_goodwin.fixedRows ; currow < grd_goodwin.rows ; currow++)
- {
- grd_goodwin.cellstyle("background-color", currow, grd_goodwin.colRef("winpackqty"), currow, grd_goodwin.colRef("winpackqty") ) = "yellow";
- winqty = winqty + parseFloat( grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winqty")));
- winamt = winamt + parseFloat(grd_goodwin.valueMatrix(currow , grd_goodwin.colRef("winamt")));
- }
-
- model.setValue(ipt_sumwinqty.attribute("ref"),grd_goodwin.rows-1);
- model.setValue(opt_sumwinamt.attribute("ref"),winamt);
- ipt_sumwinqty.refresh();
- opt_sumwinamt.refresh();
- }
- }
-
- ]]>
- </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" class="datagrid2" caption="선택^입고유형^구매일자^요구부서^구매년월^차수^약품코드^약품명^함량^모델^제조회사^발주수량^발주수량^포장^포장^포장^단가^단가^금액^기입고량^기입고량^입고수량^입고수량^입고금액^진행상태^승인^미승인사유" colsep="^" colwidth="30, 6, 5, 76, 64, 37, 88, 243, 65, 0, 0, 45, 45, 38, 36, 31, 69, 69, 81, 56, 55, 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, 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" visibility="hidden" style="text-align:left; "/>
- <col ref="purcdmnddd" visibility="hidden" format="yyyy-mm-dd"/>
- <col ref="reqdeptnm" style="text-align:center; "/>
- <col ref="purcdmndmm" format="yyyy-mm" style="text-align:center; "/>
- <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="prewinpackqty" format="#,###" style="left:1096px; top:23px; width:65px; height:23px; text-align:right; "/>
- <col ref="prewinqty" visibility="hidden" format="#,###" style="left:1096px; top:23px; width:65px; height:23px; text-align:right; "/>
- <col ref="winpackqty" type="input" format="#,###.##" style="text-align:right; "/>
- <col ref="winqty" type="output" 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("winpackqty"))
- {
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/select" , "Y");
- fCalcWinamt(sch_select.selectedIndex,grd_nonwin.row - grd_nonwin.fixedRows + 1);
- fWinqtyTotal(sch_select.selectedIndex);
- }
- 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);
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winpackqty" , 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")) ));
- model.setValue(grd_nonwin.nodeset + "[" + (grd_nonwin.row - grd_nonwin.fixedRows + 1) + "]/winpackqty" ,grd_nonwin.valueMatrix(grd_nonwin.row,grd_nonwin.colRef("reqpackcnt")));
- grd_nonwin.rowStatus(grd_nonwin.row) = "2";
- }
-
- fCalcWinamt(sch_select.selectedIndex,grd_nonwin.row - grd_nonwin.fixedRows + 1);
- fWinqtyTotal(sch_select.selectedIndex);
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_nonwin.gridToInstance();
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- if(grd_nonwin.col == grd_nonwin.colRef("winpackqty")){
- if(grd_nonwin.row < grd_nonwin.rows - grd_nonwin.fixedRows){
- grd_nonwin.row = grd_nonwin.row + 1;
- grd_nonwin.select(grd_nonwin.row, grd_nonwin.colRef("winpackqty")) = 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);
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winpackqty" ,0);
- model.setValue(grd_nonwin.nodeset + "[" + (liRow - grd_nonwin.fixedRows + 1) + "]/winamt" ,0);
- grd_nonwin.rowStatus(liRow) = "0";
- }
- else
- {
- var CaleWinAmt = ( grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqpackcnt"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinpackqty")))*grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("goodunitcost"))
- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("select"))="Y";
- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winpackqty"))=(grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqpackcnt"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinpackqty")));
- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winqty"))=( grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("reqqty"))- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("prewinqty")) );
- grd_nonwin.valueMatrix(liRow,grd_nonwin.colRef("winamt"))= CaleWinAmt;
- grd_nonwin.rowStatus(liRow) = "2";
- }
- //fCalcWinamt(liRow);
- }
- fWinqtyTotal(sch_select.selectedIndex);
- 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>
- <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; "/>
- </case>
- <case id="cse_win" style="left:0px; top:0px; width:1193px; height:638; ">
- <datagrid id="grd_goodwin" nodeset="/root/main/list/goodwin/goodwinlist" class="datagrid2" caption="입고부서명^순번^발주번호^약품코드*^약품명^구매년월/차수^구매년월/차수^함량^포장수량^모델^제조회사^낱개수량^포장^포장^포장^단가^입고금액^출고수량^잔량^기관코드^물품구분^입고일자^입고자^입고부서^장소^계산구분^가납여부^전자계산방법^전자계산유무^입출력^부서^요구일자^요구번호^요구순번^출고번호^출고순번^보나에스코드^calcdocudd^profno^계정코드^청구일자^청구번호^청구순번^valiterm^재고유무^체크일자^체크자^체크유무^슬립일자^슬립번호^공급처코드^비고^이전입고량^caption1^caption2^caption3^caption4" colsep="^" colwidth="89, 52, 0, 116, 273, 66, 36, 78, 62, 0, 0, 71, 60, 63, 63, 86, 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, 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="windeptnm" style="text-align:center; "/>
- <col ref="winseqno" visibility="hidden" style="text-align:center; "/>
- <col ref="winno" visibility="hidden"/>
- <col ref="goodcd" _key="true"/>
- <col ref="goodnm"/>
- <col ref="purcdmndmm" format="yyyy-mm" style="text-align:center; "/>
- <col ref="purcdmndno" style="text-align:center; "/>
- <col ref="goodspec"/>
- <col ref="winpackqty" type="input" format="#,###" maxlength="9" style="text-align:right; "/>
- <col ref="goodmodel" visibility="hidden"/>
- <col ref="prodcmpynm" visibility="hidden"/>
- <col ref="winqty" type="output" 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"/>
- <col ref="purccondd" visibility="hidden"/>
- <col ref="purcconno" visibility="hidden"/>
- <col ref="purcconseq" 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");
- }
- }
- if(grd_goodwin.col == grd_goodwin.colRef("winpackqty")){
- fCalcWinamt(sch_select.selectedIndex,grd_goodwin.row - grd_goodwin.fixedRows + 1);
- fWinqtyTotal(sch_select.selectedIndex);
- }
- ]]>
- </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>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- if(grd_goodwin.col == grd_goodwin.colRef("winpackqty")){
- if(grd_goodwin.row < grd_goodwin.rows - grd_goodwin.fixedRows){
- grd_goodwin.row = grd_goodwin.row + 1;
- grd_goodwin.select(grd_goodwin.row, grd_goodwin.colRef("winpackqty")) = true;
- }
- }
- ]]>
- </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="caption11" class="search_name" style="left:20px; top:29px; width:86px; height:17px; ">입고일자 :</caption>
- <caption id="caption12" class="search_name" visibility="hidden" style="left:378px; top:29px; width:86px; 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" disabled="true" visibility="hidden" appearance="minimal" style="left:468px; top:30px; width:160px; height:19px; text-align:center; ">
- <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>
- <output id="opt_calcdocukind" ref="/root/send/goodwin/calcdocukind" visibility="hidden" style="left:1050px; top:45px; width:15px; height:19px; "/>
- </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));
-
- model.setValue("/root/send/save/goodwinlist", grd_goodwin.getUpdateData());
- submit("TXRSI00101");
- if (model.getValue(gvErrorMsgPath + "/type") != "error")btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|