123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet ype="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>출고등록(부서재고)</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <cond>
- <instcd/>
- <delivedd/>
- <outkind/>
- <reqdeptcd/>
- <reqdeptnm/>
- <delivedeptcd/>
- <delivedeptnm/>
- <winkind/>
- </cond>
- <main>
- <list>
- <deptoutinfo>
- <deptoutlist/>
- </deptoutinfo>
- </list>
- <good>
- <gooddetail/>
- </good>
- <dupcheck>
- <dupyn/>
- </dupcheck>
- </main>
- <send>
- </send>
- <init>
- </init>
- <hidden/>
- <temp>
- </temp>
- <popdata>
- <srchdd/>
- </popdata>
- <popdelive>
- <instcd/>
- <delivedd/>
- <delivedeptcd/>
- <delivedeptnm/>
- <opener/>
- </popdelive>
- <popreq>
- <count/>
- </popreq>
- <popsubdata/>
- <popgood>
- <instcd/>
- <wareflag/>
- <delivedd/>
- <basedd/>
- <selectyn/>
- <goodcd/>
- <goodlist>
- <goodcd/>
- </goodlist>
- </popgood>
- <magam/>
- <magamsearch>
- <instcd/>
- <dd/>
- <deptcd/>
- </magamsearch>
- <distrimagam/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //화면 Control을 초기화한다
- misfGridInit(grd_deptoutlist);
- misfGetAndSetUserInfo(); //접속자기본정보
-
- // misfComboComCdList("Z0007",cmb_instcd);
- // misfComboComCdList("030R0020",cmb_outkind);
- misfComboComCdListMulti("Z0007,030R0020,030R0019,030R0019","cmb_instcd,cmb_outkind,grd_deptoutlist.winkind,cmb_winkind");
-
- addComboItem( "cmb_winkind", "전체", "", "above");
- model.setValue(cmb_winkind.attribute("ref"), "");
- addComboItem( "cmb_outkind", "전체", "", "above");
- model.setValue(cmb_outkind.attribute("ref"), "");
-
- model.setValue("/root/cond/reqdeptcd", DUT_PLCEDEPT_CD);
- model.setValue("/root/cond/reqdeptnm", DUT_PLCEDEPT_NM);
- model.setValue("/root/cond/delivedeptcd", DUT_PLCEDEPT_CD);
- model.setValue("/root/cond/delivedeptnm", DUT_PLCEDEPT_NM);
-
- model.setValue("/root/cond/instcd", getUserInfo("dutplceinstcd")); //기관 설정
- model.setValue("/root/cond/delivedd" , getCurrentDate()); //출고일자 설정
- //model.setValue("/root/cond/outkind", ""); //출고유형 설정 (03:구매청구)
- model.refresh();
- ]]>
- </script>
- <submission id="TRRSO21401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/list"/>
- <submission id="TXRSO21401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
- <submission id="TRRSO20104" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/popgood" resultref="/root/main/good"/>
- <submission id="TRRSO21002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/magamsearch" resultref="/root/magam"/>
- <submission id="TRRSO21003" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/magamsearch" resultref="/root/distrimagam"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript">
- <![CDATA[
- /**
- * @ver : 2011-10-10
- * @desc : Popup창에서 해당정보 받기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetGoodInfo(getRCVS){
-
- var params = getRCVS.split("▩");
-
- for(var i = 1; i <(params.length-1); i++){
-
- var sGoodcd = params[i].split("▦")[0]; //물품코드
- var sEdicd = params[i].split("▦")[1] ; //edicd
- var sGoodnm = params[i].split("▦")[2]; //물품명
- var sGoodspec = params[i].split("▦")[3]; //물품규격
- var sDeliveunit = params[i].split("▦")[4]; //슈불단위
- var sPurcunit = params[i].split("▦")[5]; //구매단위
- var sAcntcd = params[i].split("▦")[6]; //계정코드
- var sAcntnm = params[i].split("▦")[7]; //계정명
- var compGoodcd;
- var k;
-
- for( k =grd_deptoutlist.fixedRows;k <grd_deptoutlist.rows;k++){
- compGoodcd = grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("goodcd"));
-
- if(sGoodcd ==compGoodcd){
- duplFlag = true;
- break;
- }else{
- duplFlag = false;
- }
- }
- if(duplFlag == true){
- messageBox(sGoodcd+"은(는) 이미 등록하신 코드","I009");
- }else{
- //grd_deptoutlist.addRow(false);
- model.makeValue("/root/main/list/deptoutinfo/deptoutlist["+grd_deptoutlist.row+"]/goodcd" ,sGoodcd);
- model.makeValue("/root/main/list/deptoutinfo/deptoutlist["+grd_deptoutlist.row+"]/goodnm" ,sGoodnm);
- model.makeValue("/root/main/list/deptoutinfo/deptoutlist["+grd_deptoutlist.row+"]/deliveunit" ,sDeliveunit);
- model.makeValue("/root/main/list/deptoutinfo/deptoutlist["+grd_deptoutlist.row+"]/goodspec" ,sGoodspec);
-
- }
- }
- grd_deptoutlist.refresh();
- }
- function fGetGoodDetail() {
-
- for(var k = 1; k <= instance1.selectNodes("/root/popgood/goodlist").length; k++) {
-
- var bDup = false; //물품코드가 중복되었는지를 확인하기 위한 변수
-
- //popup에서 선택한 물품코드가 이미 grid에 존재하고 있는지를 check하여 이미 존재하면 message를 보여주고 return한다.
- // for(var i = 1; i < grd_deptoutlist.rows; i++) {
- // if( grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
- // messageBox("물품코드가 중복되었습니다. [" + grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("goodcd")) + "] ", "E999", ""); //E: 경고
- // bDup = true;
- // continue;
- // }
- // }
-
- if( bDup == false ) {
- // node 삭제
- //model.removenode("/root/main/gooddetail");
-
- //TRRSO20104를 위해 물품코드를 goodcd에 넣는다.
- model.setValue( "/root/popgood/goodcd", model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") );
-
- if( submit("TRRSO20104") ) {
- /* model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/instcd", model.getValue("/root/send/search/instcd"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedd", model.getValue("/root/send/search/delivedd"));
- //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveno", model.getValue("/root/send/search/deliveno"));
- //model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/deliveseq", model.getValue("/root/send/search/deliveseq"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/wareflag", model.getValue("/root/send/search/wareflag"));
- model.setValue(grd_delive.nodeset + "[" + grd_delive.row + "]/delivedeptcd", model.getValue("/root/send/search/delivedeptcd"));
- */
- //마직막 행에 물품코드가 등록되어 있으면 그 행에 바로 적용하고, 물품코드가 없으면 한 행을 추가한 뒤 적용한다.
- if( grd_deptoutlist.valueMatrix(grd_deptoutlist.rows-1, grd_deptoutlist.colRef("goodcd")) != "" ) {
- btn_rowinsert.dispatch("DOMActivate");
- }
-
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/goodnm", model.getValue("/root/main/good/gooddetail/goodnm"));
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/goodspec", model.getValue("/root/main/good/gooddetail/goodspec"));
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/deliveunit", model.getValue("/root/main/good/gooddetail/deliveunit"));
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/wareflag", model.getValue("/root/main/good/gooddetail/wareflag"));
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/exchqty", model.getValue("/root/main/good/gooddetail/exchqty"));
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/siqty", model.getValue("/root/main/good/gooddetail/siqty"));
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/hunqty", model.getValue("/root/main/good/gooddetail/hunqty"));
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/origsiqty", model.getValue("/root/main/good/gooddetail/siqty")); //hunqty의 처음 값을 저장하기 위함.
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/orighunqty", model.getValue("/root/main/good/gooddetail/hunqty")); //hunqty의 처음 값을 저장하기 위함.
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/deliveqty", "");
- // model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/deliveamt", "");
- model.setValue(grd_deptoutlist.nodeset + "[" + (grd_deptoutlist.rows-1) + "]/deliveqty", "0"); //입고수량
- }
-
- } // if( bDup ...) end
-
- } // for(var k ...) end
-
- grd_deptoutlist.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="group1" style="left:0px; top:12; width:1195px; height:27px; ">
- <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
- <button id="btn_save" class="btn4_letter2" navindex="8" style="left:1138px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_deptoutlist.rows != 1){
- var instcd = grd_deptoutlist.valueMatrix(1, grd_deptoutlist.colRef("instcd"));
- var dd = grd_deptoutlist.valueMatrix(1, grd_deptoutlist.colRef("delivedd"));
- var deptcd = grd_deptoutlist.valueMatrix(1, grd_deptoutlist.colRef("delivedeptcd"));
-
- if(instcd == ""){
- model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
- model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/delivedd"));
- model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/delivedeptcd"));
- }else{
- model.setValue("/root/magamsearch/instcd", instcd);
- model.setValue("/root/magamsearch/dd", dd);
- model.setValue("/root/magamsearch/deptcd", deptcd);
- }
-
- cap_magam.value = "";
- if(submit("TRRSO21003")){
- var endyn = model.getValue("/root/distrimagam/endyn");
- if(endyn == "Y"){
- cap_magam.value = "물류마감이 되어있습니다.";
- messageBox("물류마감이 되어 저장이 불가능합니다.", "E999", "");
- return;
- }else{
- cap_magam.value = "";
- if(submit("TRRSO21002")){
- var magamyn = model.getValue("/root/magam/magamyn");
- if(magamyn == "Y"){
- cap_magam.value = "해당부서는 현재 마감되어있습니다.";
- messageBox("해당부서는 마감이 되어 저장이 불가능합니다.", "E999", "");
- return;
- }else{
- cap_magam.value = "";
- }
- }else{
- return;
- }//if(submit("TRRSO21002")){
- }//if(endyn == "Y"){
- }else{
- return;
- }//if(submit("TRRSO21003")){
- }else{
- return;
- }//if(grd_deptoutlist.r
-
- //당일출고수량이 0일경우 저장 및 수정대상에서 제외
- //변경재고량이 빈칸일 경우에도 저장 및 수정대상에서 제외
- for(var j = grd_deptoutlist.rows ; j >= 0 ; j-- ){
- var deliveqty = grd_deptoutlist.valueMatrix(j, grd_deptoutlist.colRef("deliveqty"));
- var realjaego = grd_deptoutlist.valueMatrix(j, grd_deptoutlist.colRef("realjaego"));
- var deliveno = grd_deptoutlist.valueMatrix(j, grd_deptoutlist.colRef("deliveno"));
- if((deliveqty == "" || deliveqty == 0) && deliveno == ""){
- grd_deptoutlist.deleteRow(j, false);
- }else if(realjaego == "" && deliveno == ""){
- grd_deptoutlist.deleteRow(j, false);
- }
- }
- grd_deptoutlist.refresh();
-
- if(cmb_outkind.value == ""){ //출고유형이 전체일경우 무작정 사용으로 변경
- cmb_outkind.value = "01";
- }
-
- if(cmb_outkind.value == "10"){ //출고유형이 보정일경우
- for(var j = grd_deptoutlist.rows ; j >= 0 ; j-- ){
- var reason = grd_deptoutlist.valueMatrix(j, grd_deptoutlist.colRef("reason"));
- var deliveno = grd_deptoutlist.valueMatrix(j, grd_deptoutlist.colRef("deliveno"));
- if(reason == "" && deliveno == ""){
- grd_deptoutlist.deleteRow(j, false);
- }
- }
- }
-
- for(var k =grd_deptoutlist.fixedRows;k < grd_deptoutlist.rows;k++ ){
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("instcd")) = model.getValue("/root/cond/instcd"); //입고등록내역(기관코드)
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("delivedd")) = model.getValue("/root/cond/delivedd"); //입고등록내역(입고일자)
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("outkind")) = model.getValue("/root/cond/outkind"); //출고유형
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("reqdeptcd")) = model.getValue("/root/cond/reqdeptcd"); //입고등록내역(입고부서)
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("delivedeptcd")) = model.getValue("/root/cond/delivedeptcd");
-
- //2012.03.07 박준범 - 저장시 모든 행의 컬럼값이 null인 경우에는 행을 삭제한 후 저장한다.
- if( grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("goodcd")) == "" &&
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("goodnm")) == "" &&
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("deliveqty")) == "" ) {
-
- grd_deptoutlist.deleteRow(k); //행삭제
- k--; //삭제 후 총건수가 줄어들므로
- };
- }
- //2012.03.07 박준범 - 물품코드와 출고수량이 정상적으로 입력되었는지 확인한다.
- for(var k =grd_deptoutlist.fixedRows;k < grd_deptoutlist.rows;k++ ){
- if ( grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("goodcd")) == "" ||
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("goodnm")) == "" ||
- grd_deptoutlist.valueMatrix(k,grd_deptoutlist.colRef("deliveqty")) == "" ) {
-
- messageBox("내역이 정상적으로 입력되지 않았습니다. \n\n입력한 값을 확인하십시요. ", "E999", "");
- model.setFocus("grd_deptoutlist");
- grd_deptoutlist.row = k;
- return;
- };
- }
- var minuscnt = 0;
- //출고수량이 (-)인 경우는 저장하지않고 출고유형을 '보정'으로 변경후에 다시 저장을 유도한다.
- if(cmb_outkind.value != "10"){ //출고유형이 보정이 아닐경우
- for(var i = 1 ; i < grd_deptoutlist.rows ; i++ ){
- var deliveqty = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveqty"));
- var deliveno = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveno"));
- if(parseFloat(deliveqty) < 0 && deliveno == ""){
- grd_deptoutlist.rowStatus(i) = 0;
- minuscnt++;
- }
- }
- }
-
- //Flag가 deptwin일경우 입고등록내역 업데이트를 한다.
- model.makeValue("/root/send/savedata/deptoutlist",grd_deptoutlist.getUpdateData())
- if(minuscnt == 0){
- if( submit("TXRSO21401") ) {
- model.removeNodeset("/root/send/savedata");
- btn_search.dispatch("DOMActivate");
- }
- }else{
- if( submit("TXRSO21401") ) {
- for(var i = grd_deptoutlist.rows ; i >= 0 ; i-- ){
- var rowStatus = grd_deptoutlist.rowStatus(i);
- var deliveno = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveno"));
- var realjaego = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("realjaego"));
- if(rowStatus == 0 &&realjaego != ""){
- if(deliveno == ""){
- grd_deptoutlist.rowStatus(i) = 1;
- }else{
- grd_deptoutlist.rowStatus(i) = 2;
- }
-
-
- }else{
- if(deliveno == ""){
- grd_deptoutlist.deleteRow(i, false);
- }
- }
- }
- grd_deptoutlist.refresh();
- }
- cmb_outkind.value = "10"; //출고유형을 보정으로 변경
- grd_deptoutlist.colHidden(grd_deptoutlist.colRef("reason")) = false;
- messageBox("출고수량이 (-)인 물품들은 출고유형을 보정으로 저장하시기 바랍니다.", "I999", "");
- }
- ]]>
- </script>
- </button>
- <button id="btn_help" class="btn4_letter3" navindex="12" style="left:1070px; top:3px; width:68px; height:22px; ">
- <caption>도움말</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.load("SMRSO21401.xrw", "modeless","", "", "","");
- ]]>
- </script>
- </button>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
- <group id="grp_search" style="left:0px; top:9px; width:1195px; height:66px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="btn_search" class="btn1_letter2" navindex="7" style="left:1121px; top:19px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- if(ipt_delivedeptcd.value == "") {
- messageBox("출고부서가 선택되지 않았습니다. \n\n먼저 출고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- };
- if(submit("TRRSO21401")){
- if(cmb_outkind.value == "10"){ //출고유형-보정 선택시 사유를 보여준다.
- grd_deptoutlist.colHidden(grd_deptoutlist.colRef("reason")) = false;
- }else{
- grd_deptoutlist.colHidden(grd_deptoutlist.colRef("reason")) = true;
- }
-
- model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
- model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/delivedd"));
- model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/delivedeptcd"));
-
- cap_magam.visible = "";
- if(submit("TRRSO21003")){
- var endyn = model.getValue("/root/distrimagam/endyn");
- if(endyn == "Y"){
- cap_magam.value = "물류마감이 되어있습니다.";
- }else{
- cap_magam.value = "";
-
- if(submit("TRRSO21002")){
- var magamyn = model.getValue("/root/magam/magamyn");
- if(magamyn == "Y"){
- cap_magam.value = "해당부서는 현재 마감되어있습니다.";
- }else{
- cap_magam.value = "";
- }
- }else{
- return;
- }
- }
- }else{
- return;
- }
- }
- ]]>
- </script>
- </button>
- <select1 id="cmb_instcd" ref="/root/cond/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:117px; top:10px; width:136px; height:19px; text-align:center; ">
- <choices>
- <itemset nodeset="/root/main/init">
- <label ref="cnstnm"/>
- <value ref="cnstcd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="cap_instcd" class="search_name" style="left:33px; top:10px; width:86px; height:17px; ">기관코드:</caption>
- <input id="ipt_delivedd" ref="/root/cond/delivedd" inputtype="date" format="yyyy-mm-dd" style="left:422px; top:10px; width:139px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptoutlist.rows > grd_deptoutlist.fixedRows) {
- misfGridInit(grd_deptoutlist);
- }
- ]]>
- </script>
- </input>
- <caption id="caption20" class="search_name" style="left:661px; top:10px; width:81px; height:17px; vertical-align:middle; ">요구부서:</caption>
- <line id="line30" class="line_4" style="x1:1100px; y1:15px; x2:1100px; y2:47px; "/>
- <button id="btn_delivedeptcd" class="icon_search" navindex="3" style="left:853px; top:10px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var vOrigDeptcd = ipt_reqdeptcd.value; //popup을 열기전 부서 저장
-
- var recv_list = "reqdeptcd,reqdeptnm";
- misfOpenPopUpList("02", ipt_reqdeptcd,"", recv_list) ;
-
- model.setValue("/root/cond/delivedeptcd", model.getValue("/root/cond/reqdeptcd"));
- model.setValue("/root/cond/delivedeptnm", model.getValue("/root/cond/reqdeptnm"));
-
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_delivedeptcd.refresh();
- opt_delivedeptnm.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_reqdeptcd" ref="/root/cond/reqdeptcd" class="input_default" navindex="2" style="left:746px; top:10px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
-
- model.setValue("/root/cond/delivedeptcd", model.getValue("/root/cond/reqdeptcd"));
- model.setValue("/root/cond/delivedeptnm", model.getValue("/root/cond/reqdeptnm"));
-
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptoutlist.rows > grd_deptoutlist.fixedRows) {
- misfGridInit(grd_deptoutlist);
- }
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_delivedeptcd.refresh();
- opt_delivedeptnm.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //2012.04.05 박준범 추가
- inputEnterKey("ipt_reqdeptcd", "xforms-value-changed");
- ]]>
- </script>
- </input>
- <output id="opt_reqdeptnm" ref="/root/cond/reqdeptnm" class="output_fix" appearance="output" style="left:871px; top:10px; width:156px; height:19px; "/>
- <caption id="caption9" class="search_name" style="left:336px; top:10px; width:86px; height:17px; ">출고일자:</caption>
- <caption id="caption3" class="search_name" style="left:33px; top:35px; width:132px; height:17px; vertical-align:middle; ">출고유형:</caption>
- <select1 id="cmb_outkind" ref="/root/cond/outkind" class="combo_default" appearance="minimal" style="left:117px; top:35px; width:136px; height:19px; text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptoutlist.rows > grd_deptoutlist.fixedRows) {
- misfGridInit(grd_deptoutlist);
- }
- if(cmb_outkind.value == "10"){ //출고유형-보정 선택시 사유를 보여준다.
- grd_deptoutlist.colHidden(grd_deptoutlist.colRef("reason")) = false;
- }else{
- grd_deptoutlist.colHidden(grd_deptoutlist.colRef("reason")) = true;
- }
- ]]>
- </script>
- </select1>
- <input id="ipt_delivedeptcd" ref="/root/cond/delivedeptcd" class="input_default" navindex="2" style="left:745px; top:35px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfValidationCheck("02", "", "delivedeptcd,delivedeptnm" );
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptoutlist.rows > grd_deptoutlist.fixedRows) {
- misfGridInit(grd_deptoutlist);
- }
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_delivedeptcd.refresh();
- opt_delivedeptnm.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //2012.04.05 박준범 추가
- inputEnterKey("ipt_delivedeptcd", "xforms-value-changed");
-
- ]]>
- </script>
- </input>
- <button id="button1" class="icon_search" navindex="3" style="left:852px; top:35px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var recv_list = "delivedeptcd,delivedeptnm";
- misfOpenPopUpList("02", ipt_delivedeptcd,"", recv_list) ;
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_delivedeptcd.refresh();
- opt_delivedeptnm.refresh();
- ]]>
- </script>
- </button>
- <output id="opt_delivedeptnm" ref="/root/cond/delivedeptnm" class="output_fix" appearance="output" style="left:870px; top:35px; width:156px; height:19px; "/>
- <caption id="caption2" class="search_name" style="left:661px; top:35px; width:81px; height:17px; vertical-align:middle; ">출고부서:</caption>
- <select1 id="cmb_winkind" ref="/root/cond/winkind" class="combo_default" navindex="3" appearance="minimal" style="left:422px; top:35px; width:139px; height:19px; text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- </select1>
- <caption id="caption4" class="search_name" style="left:336px; top:35px; width:80px; height:17px; vertical-align:middle; ">입고유형:</caption>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:108px; x2:1195px; y2:108px; "/>
- <caption id="caption1" class="tit_2" style="left:0px; top:93px; width:180px; height:14px; ">출고내역</caption>
- <button id="btn_rowinsert" class="btn2_letter3" navindex="20" style="left:1084px; top:87px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- if(ipt_delivedeptcd.value == "") {
- messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_delivedeptcd");
- return;
- };
-
- misfGridIUD(grd_deptoutlist, "A");
- grd_deptoutlist.cellAttribute("disabled", grd_deptoutlist.row, grd_deptoutlist.colRef("winkind"), grd_deptoutlist.row, grd_deptoutlist.colRef("winkind")) = "true";
- ]]>
- </script>
- </button>
- <datagrid id="grd_deptoutlist" nodeset="/root/main/list/deptoutinfo/deptoutlist" class="datagrid2" caption="순번^출고번호^출고유형^입고유형^품목코드^품목명^규격^단위^당일
출고수량^현재고량^변경재고량^사유^기관코드^요구부서^출고부서^마감여부^출고일자^출고유형" colsep="^" colwidth="46, 56, 70, 84, 103, 206, 174, 69, 70, 70, 70, 235, 61, 52, 53, 54, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:0px; top:113px; width:1195px; height:612px; ">
- <col ref="row_num" style="text-align:center; "/>
- <col disabled="true" ref="deliveno" style="text-align:center; "/>
- <col ref="outkindnm" type="output" style="text-align:center; "/>
- <col disabled="true" ref="winkind" type="combo" style="text-align:center; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </col>
- <col ref="goodcd" type="inputbutton" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="deliveunit" style="text-align:center; "/>
- <col ref="deliveqty" type="input" format="(-)#,###" style="text-align:right; "/>
- <col ref="hun_jaego" format="(-)#,##0" style="text-align:right; "/>
- <col ref="realjaego" type="input" format="(-)#,###" style="text-align:right; "/>
- <col ref="reason" type="input" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="delivedeptcd" visibility="hidden"/>
- <col ref="endyn" visibility="hidden"/>
- <col ref="delivedd" visibility="hidden"/>
- <col ref="outkind" visibility="hidden"/>
- <col ref="wareflag" visibility="hidden"/>
- <col ref="flag" visibility="hidden"/>
- <col ref="freeflag" visibility="hidden"/>
- <col ref="windd" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- //조회된 data 의 경우에는 물품코드를 변경할 수 없다.
- if(grd_deptoutlist.rowStatus(grd_deptoutlist.row) == 0 || grd_deptoutlist.rowStatus(grd_deptoutlist.row) == 2) { //0:read, 1:insert, 2:update, 3:update after insert
- //alert("onentercell");
- return;
- }
- //2012.04.05 박준범 - 출고일자를 popup 에 넘겨주도록 수정
- //modal("SPRSO20600");
- // model.setValue("/root/popdata/srchdd", ipt_delivedd.value);
- // window.load("SPRSO20600.xrw", "modal","", "", "/root/popdata","/root/popdata");
-
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popgood/instcd", cmb_instcd.value);
- model.setValue("/root/popgood/delivedd", ipt_delivedd.value ); //향후 시점재고 조회를 위해 출고일자를 set
- //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
- model.setValue("/root/popgood/basedd", ipt_delivedd.value ); //물품코드 popup 에서 출고일자 기준으로 물품 Master 조회하기 위해서
-
- //selectyn(popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값) 을 초기화함
- model.setValue("/root/popgood/selectyn", "");
-
- //popup 프로그램 호출
- //window.load("SPRSO20300.xrw", "modal","", "", "/root/popgood","/root/popdata"); //단일선택창
- window.load("SPRSO20700.xrw", "modal","", "", "/root/popgood","/root/popdata"); //다중선택창
-
- //popup에서 특정 물품코드를 선택한 경우, 해당 물품코드에 대한 상세 사항을 조회해서 그리드에 보여준다.
- if(model.getValue("/root/popgood/selectyn") == "Y") { //popup 창에서 선택버튼을 click했는지 아닌지를 나타내는 구분값
- fGetGoodDetail(); //물품코드의 상세내역과 현재고를 조회하여 Grid에 보여줌
-
- //출고량을 입력하도록 focus이동
- grd_deptoutlist.col = grd_deptoutlist.colRef("deliveqty");
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /* 2012.03.06 박준범 추가 */
- if( grd_deptoutlist.col == grd_deptoutlist.colRef("deliveqty") ){
- if( grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) == "" ||
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) == "." ||
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) == "-" ||
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) == "-." ){
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) = "0";
- } else {
- /* DB의 컬럼이 소수점 2자리 이므로, 이와 통일하기 위해 화면에서 소수 2자리까지만 입력 받도록 처리 */
- var sBef = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty"));
- var iIndex = sBef.indexOf(".");
- if (iIndex >= 0 ) { // 소수점이 있으면~
- var sAft = sBef.substring(0, iIndex + 3); //소수점 2자리까지 잘라내기 위해 소수점 포함 3자리를 더함
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) = sAft;
- }
- }
-
- var hun_jaego = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("hun_jaego"));
- if(hun_jaego == "") return;
- var deliveqty = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty"));
- var realjaego = parseFloat(hun_jaego) - parseFloat(deliveqty);
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("realjaego")) = realjaego;
-
- }else if( grd_deptoutlist.col == grd_deptoutlist.colRef("realjaego") ){
- var hun_jaego = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("hun_jaego"));
- if(hun_jaego == "") return;
- var realjaego = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("realjaego"));
- var deliveqty_bf = grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty"));
- if(deliveqty_bf == "") deliveqty_bf = 0;
- if(realjaego == "") realjaego = 0;
-
- if(grd_deptoutlist.rowStatus(grd_deptoutlist.row) == "1" || grd_deptoutlist.rowStatus(grd_deptoutlist.row) == "3"){
- var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego);
- }else{
- var deliveqty = parseFloat(hun_jaego) - parseFloat(realjaego) + parseFloat(deliveqty_bf);
- }
-
- grd_deptoutlist.valueMatrix(grd_deptoutlist.row, grd_deptoutlist.colRef("deliveqty")) = deliveqty;
- }
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(grd_deptoutlist.row == "0"){
- if(grd_deptoutlist.col == grd_deptoutlist.colRef("hun_jaego")){
- for(var i = 1 ; i < grd_deptoutlist.rows ; i++){
- grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("deliveqty")) = grd_deptoutlist.valueMatrix(i, grd_deptoutlist.colRef("hun_jaego"));
- if(!(grd_deptoutlist.rowStatus(i) == 1 || grd_deptoutlist.rowStatus(i) == 3)){
- grd_deptoutlist.rowStatus(i) = 2;
- }
- }
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //Grid 에서 엔터 입력시 다음행 수정
- misfNextRow(grd_deptoutlist);
- ]]>
- </script>
- </datagrid>
- <button id="btn_chulpop" class="btn2_letter6" navindex="10" visibility="hidden" style="left:740px; top:80px; width:86px; height:19px; ">
- <caption>입고내역조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "out");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21050.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- var cnt = model.getValue("/root/popreq/count");
- var mrows = grd_deptoutlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptoutlist, "A");
-
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodcd", model.getValue("/root/popsubdata/copylist["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodnm", model.getValue("/root/popsubdata/copylist["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/copylist["+j+"]/deliveunit")); //단위
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodspec", model.getValue("/root/popsubdata/copylist["+j+"]/goodspec")); //규격
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/wareflag", model.getValue("/root/popsubdata/copylist["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveqty", model.getValue("/root/popsubdata/copylist["+j+"]/deliveqty")); //출고수량
- j++;
- }
- grd_deptoutlist.refresh();
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter4" navindex="11" visibility="visible" style="left:889px; top:87px; width:64px; height:19px; ">
- <caption>전체삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var req = messageBox("출고내역이 전체삭제됩니다.", "Q003");
- if(req == 6){
- if(grd_deptoutlist.rows == "1") return;
-
-
- //misfGridIUD(grd_deptoutlist, "D");
-
- //2012.03.07 박준범 - 위의 1줄 comment처리하고 아래와 같이 변경
- /*
- - 0 : read : 조회시
- - 1 : insert : 행추가시
- - 2 : update : 조회한 것을 수정시
- - 3 : insert & new : 행추가한 것을 수정시
- - 4 : delete
- - 5 : delete & insert
- - 6 : delete & update
- */
- // var status = grd_deptoutlist.rowStatus(grd_deptoutlist.row) ;
- //
- // if(status == 0) {
- // grd_deptoutlist.addStatus(grd_deptoutlist.row, "delete");
- // }else if(status == 1) {
- // grd_deptoutlist.deleteRow(grd_deptoutlist.row);
- // }else if(status == 2) {
- // grd_deptoutlist.addStatus(grd_deptoutlist.row, "delete");
- // }else if(status == 3) {
- // grd_deptoutlist.deleteRow(grd_deptoutlist.row);
- // }else if(status == 4) {
- // grd_deptoutlist.removeStatus(grd_deptoutlist.row, "delete");
- // }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
- // grd_deptoutlist.removeStatus(grd_deptoutlist.row, "delete");
- // }else if(status == 6) {
- // grd_deptoutlist.removeStatus(grd_deptoutlist.row, "delete");
- // }
- for(i = 1 ; i < grd_deptoutlist.rows ; i++){
- grd_deptoutlist.row = i;
- misfGridIUD(grd_deptoutlist, "D");
- }
-
- btn_save.dispatch("DOMActivate");
-
- }else{
- return;
- }
- ]]>
- </script>
- </button>
- <button id="btn_choidel" class="btn2_letter3" navindex="21" style="left:1138px; top:87px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_deptoutlist, "D");
- ]]>
- </script>
- </button>
- <button id="btn_jaego" class="btn2_letter4" navindex="10" visibility="visible" style="left:954px; top:87px; width:64px; height:19px; ">
- <caption>부서재고</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "jaego");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21450.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- var cnt = model.getValue("/root/popreq/count");
- var mrows = grd_deptoutlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptoutlist, "A");
-
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodcd", model.getValue("/root/popsubdata/stocklist["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodnm", model.getValue("/root/popsubdata/stocklist["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/stocklist["+j+"]/purcunit")); //단위
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodspec", model.getValue("/root/popsubdata/stocklist["+j+"]/goodspec")); //규격
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/wareflag", model.getValue("/root/popsubdata/stocklist["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/hun_jaego", model.getValue("/root/popsubdata/stocklist["+j+"]/hun_jaego")); //현재고수량
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winkind", model.getValue("/root/popsubdata/stocklist["+j+"]/winkind")); //입고유형
- grd_deptoutlist.cellAttribute("disabled", j, grd_deptoutlist.colRef("winkind"), j, grd_deptoutlist.colRef("winkind")) = "true";
- j++;
- }
- grd_deptoutlist.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_prcpsum" class="btn2_letter4" navindex="10" visibility="hidden" style="left:825px; top:75px; width:64px; height:19px; ">
- <caption>처방집계</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "jaego");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21460.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- var cnt = model.getValue("/root/popreq/count");
- var mrows = grd_deptoutlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptoutlist, "A");
-
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodcd", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodnm", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/prcpsum["+j+"]/purcunit")); //단위
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodspec", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodspec")); //규격
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/wareflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/hun_jaego", model.getValue("/root/popsubdata/prcpsum["+j+"]/deliveqty")); //현재고수량
- j++;
- }
- grd_deptoutlist.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_deptwin" class="btn2_letter4" navindex="10" visibility="visible" style="left:1019px; top:87px; width:64px; height:19px; ">
- <caption>처방출고</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(ipt_reqdeptcd.value == "") {
- messageBox("요구부서가 선택되지 않았습니다. \n\n먼저 요구부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_reqdeptcd");
- return;
- };
- //popup 에 전달할 parameter를 setting한다.
- model.setValue("/root/popdelive/instcd", cmb_instcd.value);
- model.setValue("/root/popdelive/delivedd", ipt_delivedd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "out");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21470.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- var cnt = model.getValue("/root/popreq/count");
- var mrows = grd_deptoutlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptoutlist, "A");
-
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodcd", model.getValue("/root/popsubdata/copylist["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodnm", model.getValue("/root/popsubdata/copylist["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/copylist["+j+"]/deliveunit")); //단위
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/goodspec", model.getValue("/root/popsubdata/copylist["+j+"]/goodspec")); //규격
- //model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/wareflag", model.getValue("/root/popsubdata/copylist["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/deliveqty", model.getValue("/root/popsubdata/copylist["+j+"]/deliveqty")); //출고수량
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/realjaego", model.getValue("/root/popsubdata/copylist["+j+"]/deliveqty")); //변경재고량
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/flag", model.getValue("/root/popsubdata/copylist["+j+"]/flag")); //구분값
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/winkind", model.getValue("/root/popsubdata/copylist["+j+"]/winkind")); //입고유형
- model.setValue("/root/main/list/deptoutinfo/deptoutlist["+i+"]/windd", model.getValue("/root/popsubdata/copylist["+j+"]/windd")); //입고일자
- grd_deptoutlist.cellAttribute("disabled", j, grd_deptoutlist.colRef("winkind"), j, grd_deptoutlist.colRef("winkind")) = "true";
- j++;
- }
- grd_deptoutlist.refresh();
- ]]>
- </script>
- </button>
- <caption id="cap_magam" style="left:240px; top:80px; width:395px; height:20px; font-size:12pt; font-weight:bold; color:#ff0000; text-align:center; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|