123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890 |
- <?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/>
- <windd/>
- <winkind/>
- <reqdeptcd/>
- <reqdeptnm/>
- <windeptcd/>
- <windeptnm/>
- </cond>
- <main>
- <list>
- <deptwininfo>
- <deptwinlist/>
- </deptwininfo>
- </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_deptwinlist);
- misfGetAndSetUserInfo(); //접속자기본정보
- //misfComboComCdList("Z0007",cmb_instcd);
-
- //misfComboComCdList("030R0019",cmb_winkind);
-
- misfComboComCdListMulti("Z0007,030R0019,030R0019","cmb_instcd,cmb_winkind,grd_deptwinlist.winkind");
-
- addComboItem( "cmb_winkind", "전체", "", "above");
- model.setValue(cmb_winkind.attribute("ref"), "");
- model.setValue("/root/cond/reqdeptcd", DUT_PLCEDEPT_CD);
- model.setValue("/root/cond/reqdeptnm", DUT_PLCEDEPT_NM);
- model.setValue("/root/cond/windeptcd", DUT_PLCEDEPT_CD);
- model.setValue("/root/cond/windeptnm", DUT_PLCEDEPT_NM);
-
- model.setValue("/root/cond/instcd", getUserInfo("dutplceinstcd")); //기관 설정
- model.setValue("/root/cond/windd" , getCurrentDate()); //출고일자 설정
- //model.setValue("/root/cond/winkind", "01"); //출고유형 설정 (03:구매청구)
- cap_magam.value = "";
- distriyn = "N";
- model.refresh();
- ]]>
- </script>
- <submission id="TRRSO21001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/cond" resultref="/root/main/list"/>
- <submission id="TXRSO21001" 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 sWinunitcost = params[i].split("▦")[8]; //단가. 2012.04.05 박준범 추가
- var compGoodcd;
- var k;
-
- for( k =grd_deptwinlist.fixedRows;k <grd_deptwinlist.rows;k++){
- compGoodcd = grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd"));
-
- if(sGoodcd ==compGoodcd){
- duplFlag = true;
- break;
- }else{
- duplFlag = false;
- }
- }
- if(duplFlag == true){
- messageBox(sGoodcd+"은(는) 이미 등록하신 코드","I009");
- }else{
- //grd_deptwinlist.addRow(false);
- model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodcd" ,sGoodcd);
- model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodnm" ,sGoodnm);
- model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/purcunit" ,sPurcunit);
- model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/goodspec" ,sGoodspec);
- model.makeValue("/root/main/list/deptwininfo/deptwinlist["+grd_deptwinlist.row+"]/winunitcost" ,sWinunitcost);
-
- }
- }
- grd_deptwinlist.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_deptwinlist.rows; i++) {
- // if( grd_deptwinlist.valueMatrix(i, grd_deptwinlist.colRef("goodcd")) == model.getValue("/root/popgood/goodlist[" + k + "]/goodcd") ) {
- // messageBox("물품코드가 중복되었습니다. [" + grd_deptwinlist.valueMatrix(i, grd_deptwinlist.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_deptwinlist.valueMatrix(grd_deptwinlist.rows-1, grd_deptwinlist.colRef("goodcd")) != "" ) {
- btn_rowinsert.dispatch("DOMActivate");
- }
-
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodcd", model.getValue("/root/main/good/gooddetail/goodcd"));
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodnm", model.getValue("/root/main/good/gooddetail/goodnm"));
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/goodspec", model.getValue("/root/main/good/gooddetail/goodspec"));
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/purcunit", model.getValue("/root/main/good/gooddetail/deliveunit"));
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/wareflag", model.getValue("/root/main/good/gooddetail/wareflag"));
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/exchqty", model.getValue("/root/main/good/gooddetail/exchqty"));
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/siqty", model.getValue("/root/main/good/gooddetail/siqty"));
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/hunqty", model.getValue("/root/main/good/gooddetail/hunqty"));
- if(model.getValue("/root/main/good/gooddetail/goodunitcost") == ""){
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winunitcost", 0);
- }else{
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winunitcost", model.getValue("/root/main/good/gooddetail/goodunitcost"));
- }
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/origsiqty", model.getValue("/root/main/good/gooddetail/siqty")); //hunqty의 처음 값을 저장하기 위함.
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/orighunqty", model.getValue("/root/main/good/gooddetail/hunqty")); //hunqty의 처음 값을 저장하기 위함.
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/deliveqty", "");
- // model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/deliveamt", "");
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winqty", "0"); //입고수량
- model.setValue(grd_deptwinlist.nodeset + "[" + (grd_deptwinlist.rows-1) + "]/winamt", "0");
- }
-
- } // if( bDup ...) end
-
- } // for(var k ...) end
-
- grd_deptwinlist.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="12" style="left:1138px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(grd_deptwinlist.rows != 1){
- var instcd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("instcd"));
- var dd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("windd"));
- var deptcd = grd_deptwinlist.valueMatrix(1, grd_deptwinlist.colRef("windeptcd"));
-
- if(instcd == ""){
- model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
- model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/windd"));
- model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/windeptcd"));
- }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_deptwinlist.rows != 1){
-
- for(var k =grd_deptwinlist.fixedRows;k < grd_deptwinlist.rows;k++ ){
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("instcd")) = model.getValue("/root/cond/instcd");
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("windd")) = model.getValue("/root/cond/windd");
- //grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winkind")) = model.getValue("/root/cond/winkind");
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("reqdeptcd")) = model.getValue("/root/cond/reqdeptcd");
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("windeptcd")) = model.getValue("/root/cond/windeptcd");
- //2012.03.07 박준범 - 저장시 모든 행의 컬럼값이 null인 경우에는 행을 삭제한 후 저장한다.
- if( grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd")) == "" &&
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodnm")) == "" &&
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winqty")) == "" &&
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winunitcost")) == "" ) {
-
- grd_deptwinlist.deleteRow(k); //행삭제
- k--; //삭제 후 총건수가 줄어들므로
- };
- }
-
- //2012.03.07 박준범 - 물품코드와 출고수량이 정상적으로 입력되었는지 확인한다.
- for(var k =grd_deptwinlist.fixedRows;k < grd_deptwinlist.rows;k++ ){
- if ( grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodcd")) == "" ||
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("goodnm")) == "" ||
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winqty")) == "" ||
- grd_deptwinlist.valueMatrix(k,grd_deptwinlist.colRef("winunitcost")) == "" ) {
-
- messageBox("내역이 정상적으로 입력되지 않았습니다. \n\n입력한 값을 확인하십시요. ", "E999", "");
- model.setFocus("grd_deptwinlist");
- grd_deptwinlist.row = k;
- return;
- };
- }
-
- model.makeValue("/root/send/savedata/deptwinlist",grd_deptwinlist.getUpdateData())
- if( submit("TXRSO21001") ) {
- model.removeNodeset("/root/send/savedata");
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </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("SMRSO21001.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="8" style="left:1114px; 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_windeptcd.value == "") {
- messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_windeptcd");
- return;
- };
- misfGridInit(grd_deptwinlist);
- if(submit("TRRSO21001")){
-
- model.setValue("/root/magamsearch/instcd", model.getValue("/root/cond/instcd"));
- model.setValue("/root/magamsearch/dd", model.getValue("/root/cond/windd"));
- model.setValue("/root/magamsearch/deptcd", model.getValue("/root/cond/windeptcd"));
-
- 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;
- }
- }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_windd" ref="/root/cond/windd" navindex="2" 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_deptwinlist.rows > grd_deptwinlist.fixedRows) {
- misfGridInit(grd_deptwinlist);
- }
- ]]>
- </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:13px; x2:1100px; y2:45px; "/>
- <button id="btn_delivedeptcd" class="icon_search" navindex="5" 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/windeptcd", model.getValue("/root/cond/reqdeptcd"));
- model.setValue("/root/cond/windeptnm", model.getValue("/root/cond/reqdeptnm"));
-
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_windeptcd.refresh();
- opt_windeptnm.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_reqdeptcd" ref="/root/cond/reqdeptcd" class="input_default" navindex="4" 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/windeptcd", model.getValue("/root/cond/reqdeptcd"));
- model.setValue("/root/cond/windeptnm", model.getValue("/root/cond/reqdeptnm"));
-
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
- misfGridInit(grd_deptwinlist);
- }
-
- ipt_reqdeptcd.refresh();
- opt_reqdeptnm.refresh();
- ipt_windeptcd.refresh();
- opt_windeptnm.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:336px; top:35px; width:80px; 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[
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
- misfGridInit(grd_deptwinlist);
- }
- ]]>
- </script>
- </select1>
- <input id="ipt_windeptcd" ref="/root/cond/windeptcd" class="input_default" navindex="6" style="left:745px; top:35px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfValidationCheck("02", "", "windeptcd,windeptnm" );
-
- //2012.04.05 박준범 : 조회조건 변경시 Grid를 지워준다.
- if(grd_deptwinlist.rows > grd_deptwinlist.fixedRows) {
- misfGridInit(grd_deptwinlist);
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //2012.04.05 박준범 추가
- inputEnterKey("ipt_windeptcd", "xforms-value-changed");
- ]]>
- </script>
- </input>
- <button id="button1" class="icon_search" navindex="7" style="left:852px; top:35px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var recv_list = "windeptcd,windeptnm";
- misfOpenPopUpList("02", ipt_windeptcd,"", recv_list) ;
- ipt_windeptcd.refresh();
- opt_windeptnm.refresh();
-
-
- ]]>
- </script>
- </button>
- <output id="opt_windeptnm" ref="/root/cond/windeptnm" 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>
- </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:13px; ">입고내역</caption>
- <button id="btn_rowinsert" class="btn2_letter3" navindex="10" 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_windeptcd.value == "") {
- messageBox("입고부서가 선택되지 않았습니다. \n\n먼저 입고부서를 선택하십시요.", "E999", "");
- model.setFocus("ipt_windeptcd");
- return;
- };
-
- misfGridIUD(grd_deptwinlist, "A");
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("gubun")) = "_";
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winkind")) = cmb_winkind.value;
-
- ]]>
- </script>
- </button>
- <button id="btn_choidel" class="btn2_letter4" navindex="11" visibility="visible" style="left:932px; top:87px; width:64px; height:19px; ">
- <caption>전체삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var req = messageBox("입고내역이 전체삭제됩니다.", "Q003");
- if(req == 6){
- if(grd_deptwinlist.rows == "1") return;
-
-
- //misfGridIUD(grd_deptwinlist, "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_deptwinlist.rowStatus(grd_deptwinlist.row) ;
- //
- // if(status == 0) {
- // grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
- // }else if(status == 1) {
- // grd_deptwinlist.deleteRow(grd_deptwinlist.row);
- // }else if(status == 2) {
- // grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
- // }else if(status == 3) {
- // grd_deptwinlist.deleteRow(grd_deptwinlist.row);
- // }else if(status == 4) {
- // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- // }else if(status == 5) { // insert된 data는 삭제시 위에서 addStatus("delete")하지 않고, 바로 deleteRow했기 때문에 5의 경우는 발생하지 않음.
- // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- // }else if(status == 6) {
- // grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- // }
- for(i = 1 ; i < grd_deptwinlist.rows ; i++){
- grd_deptwinlist.row = i;
- misfGridIUD(grd_deptwinlist, "D");
- }
-
- btn_save.dispatch("DOMActivate");
-
- }else{
- return;
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_deptwinlist" nodeset="/root/main/list/deptwininfo/deptwinlist" class="datagrid2" caption="순서^입고번호^입고유형^품목코드^품목명^단위^규격^입고수량^입고단가^입고금액^기관코드^요구부서^입고부서^마감여부^입고일자^입고유형^caption1^caption2^caption3^caption4" colsep="^" colwidth="43, 59, 100, 103, 303, 89, 166, 80, 100, 112, 61, 52, 53, 54, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" navindex="9" style="left:0px; top:113px; width:1195px; height:612px; ">
- <col ref="row_num" style="text-align:center; "/>
- <col disabled="true" ref="winno" style="text-align:center; "/>
- <col 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="purcunit" style="text-align:center; "/>
- <col ref="goodspec"/>
- <col ref="winqty" type="input" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="winunitcost" type="input" format="#,###" style="left:855px; top:23px; width:100px; height:23px; text-align:right; "/>
- <col ref="winamt" format="(-)#,###" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="windeptcd" visibility="hidden"/>
- <col ref="endyn" visibility="hidden"/>
- <col ref="windd" visibility="hidden"/>
- <col ref="wareflag" visibility="hidden"/>
- <col ref="genrno" visibility="hidden"/>
- <col ref="genrdd" visibility="hidden"/>
- <col ref="genrseq" visibility="hidden"/>
- <col ref="gubun" visibility="hidden"/>
- <col ref="deliveyn" visibility="hidden"/>
- <col ref="instid" visibility="hidden"/>
- <col ref="ccdflag" visibility="hidden"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- //조회된 data 의 경우에는 물품코드를 변경할 수 없다.
- if(grd_deptwinlist.rowStatus(grd_deptwinlist.row) == 0 || grd_deptwinlist.rowStatus(grd_deptwinlist.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_windd.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_windd.value ); //향후 시점재고 조회를 위해 출고일자를 set
- //2012.09.17 박준범 - SPRSO20700.xrw 에서 사용하기 위해 basedd를 추가 함
- model.setValue("/root/popgood/basedd", ipt_windd.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_deptwinlist.col = grd_deptwinlist.colRef("winqty");
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /* 2012.03.06 박준범 - 아래 전체 comment처리하고, 하단에 다시 구현
- var pRow = grd_deptwinlist.row - grd_deptwinlist.fixedRows + 1;
- var winqty = grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winqty"));
- var winunitcost = grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winunitcost"));
- if((grd_deptwinlist.col== grd_deptwinlist.colRef("winqty"))||(grd_deptwinlist.col== grd_deptwinlist.colRef("winunitcost"))){
- grd_deptwinlist.valueMatrix(pRow,grd_deptwinlist.colRef("winamt")) = (winqty*winunitcost);
- }
-
- grd_deptwinlist.refresh();
- */
-
- if( grd_deptwinlist.col == grd_deptwinlist.colRef("winqty") || grd_deptwinlist.col == grd_deptwinlist.colRef("winunitcost") ){
- if( grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "" ||
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "." ||
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "-" ||
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) == "-." ){
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) = "0";
- } else {
- /* DB의 컬럼이 소수점 2자리 이므로, 이와 통일하기 위해 화면에서 소수 2자리까지만 입력 받도록 처리 */
- var sBef = grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty"));
- var iIndex = sBef.indexOf(".");
- if (iIndex >= 0 ) { // 소수점이 있으면~
- var sAft = sBef.substring(0, iIndex + 3); //소수점 2자리까지 잘라내기 위해 소수점 포함 3자리를 더함
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) = sAft;
- }
- }
- if( grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) == "" ){
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) = "0";
- }
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winamt")) =
- //입고금액은 반올림처리
- Math.round(grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winqty")) *
- grd_deptwinlist.valueMatrix(grd_deptwinlist.row, grd_deptwinlist.colRef("winunitcost")) );
- }
-
- grd_deptwinlist.refresh();
-
- ]]>
- </script>
- </datagrid>
- <button id="btn_chulpop" class="btn2_letter6" navindex="10" visibility="visible" style="left:997px; top:87px; 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_windd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "in");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21050.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
-
- var cnt = model.getValue("/root/popreq/count");
- if(cnt == 0){
- return;
- }
-
- //그리드초기화
- misfGridInit(grd_deptwinlist);
- grd_deptwinlist.refresh();
-
- var mrows = grd_deptwinlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptwinlist, "A");
-
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/purcunit", model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveunit")); //단위
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodspec", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodspec")); //규격
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost")); //입고단가
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/wareflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winqty", model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty")); //입고수량
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instid", model.getValue("/root/popsubdata/delivedtllist["+j+"]/instid")); //삭제키
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winamt",
- Math.round(model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty") * model.getValue("/root/popsubdata/delivedtllist["+j+"]/goodunitcost"))); //입고금액 계산
-
- //선불출 적용을 위한 키값
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instcd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/instcd")); //기관
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrdd", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrdd")); //발생일자
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrno", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrno")); //발생번호
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrseq", model.getValue("/root/popsubdata/delivedtllist["+j+"]/genrseq")); //발생순번
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/gubun", model.getValue("/root/popsubdata/delivedtllist["+j+"]/gubun")); //발생순번
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/ccdflag", model.getValue("/root/popsubdata/delivedtllist["+j+"]/ccdflag")); //CCD 분류
-
-
- var gubun = model.getValue("/root/popsubdata/delivedtllist["+j+"]/gubun");
- if(gubun == "1"){
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winkind", "01"); //입고유형
- }else if(gubun=="2"||gubun=="3"){
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winkind", "04"); //입고유형
- }
- grd_deptwinlist.cellAttribute("disabled", i, grd_deptwinlist.colRef("winqty"), i, grd_deptwinlist.colRef("winqty")) = "true";
- j++;
- }
- // if(j > 1){
- // btn_chulpop.disabled = true;
- // }
- grd_deptwinlist.refresh();
- ipt_windd.refresh();
- ]]>
- </script>
- </button>
- <button id="button2" class="btn2_letter3" navindex="11" style="left:1138px; top:87px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // misfGridIUD(grd_deptwinlist, "D");
- var status = grd_deptwinlist.rowStatus(grd_deptwinlist.row) ;
-
- if(status == 0) {
- grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
- }else if(status == 1) {
- grd_deptwinlist.deleteRow(grd_deptwinlist.row);
- }else if(status == 2) {
- grd_deptwinlist.addStatus(grd_deptwinlist.row, "delete");
- }else if(status == 3) {
- grd_deptwinlist.deleteRow(grd_deptwinlist.row);
- }else if(status == 4) {
- grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- }else if(status == 5) {
- grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- }else if(status == 6) {
- grd_deptwinlist.removeStatus(grd_deptwinlist.row, "delete");
- }
- ]]>
- </script>
- </button>
- <button id="btn_bfdelive" class="btn2_letter5" navindex="10" visibility="hidden" style="left:921px; top:77px; width:75px; 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_windd.value);
- model.setValue("/root/popdelive/delivedeptcd", ipt_reqdeptcd.value);
- model.setValue("/root/popdelive/delivedeptnm", opt_reqdeptnm.value);
- model.setValue("/root/popdelive/opener", "in");
-
- //갯수초기화
- model.setValue("/root/popreq/count", 0);
-
- //popup 프로그램 호출
- window.load("SMRSO21060.xrw", "modal","", "", "/root/popdelive","/root/popdata");
-
- var cnt = model.getValue("/root/popreq/count");
- var mrows = grd_deptwinlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptwinlist, "A");
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/purcunit", model.getValue("/root/popsubdata/bfdelive["+j+"]/purcunit")); //단위
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodspec", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodspec")); //규격
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winunitcost", model.getValue("/root/popsubdata/bfdelive["+j+"]/goodunitcost")); //입고단가
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/wareflag", model.getValue("/root/popsubdata/bfdelive["+j+"]/wareflag")); //창고구분
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winqty", model.getValue("/root/popsubdata/bfdelive["+j+"]/beforqty")); //입고수량
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/winamt",
- Math.round(model.getValue("/root/popsubdata/delivedtllist["+j+"]/deliveqty") * model.getValue("/root/popsubdata/bfdelive["+j+"]/goodunitcost"))); //입고금액 계산
- //선불출 적용을 위한 키값
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/instcd", model.getValue("/root/popsubdata/bfdelive["+j+"]/instcd")); //기관
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrdd", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrdd")); //발생일자
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrno", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrno")); //발생번호
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/genrseq", model.getValue("/root/popsubdata/bfdelive["+j+"]/genrseq")); //발생순번
- j++;
- }
- grd_deptwinlist.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_prcpsum" class="btn2_letter4" navindex="10" visibility="hidden" style="left:856px; top:77px; 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_windd.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_deptwinlist.rows;
- var mcnt = parseInt(mrows)+parseInt(cnt);
- var j = 1;
- for(i = mrows ; i <= mcnt-1 ; i++){
- misfGridIUD(grd_deptwinlist, "A");
-
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodcd", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodcd")); //물품코드
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/goodnm", model.getValue("/root/popsubdata/prcpsum["+j+"]/goodnm")); //물품명
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+i+"]/deliveunit", model.getValue("/root/popsubdata/prcpsum["+j+"]/purcunit")); //단위
- model.setValue("/root/main/list/deptwininfo/deptwinlist["+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/deptwininfo/deptwinlist["+i+"]/hun_jaego", model.getValue("/root/popsubdata/prcpsum["+j+"]/deliveqty")); //현재고수량
- j++;
- }
- grd_deptwinlist.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>
|