123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>청구요구 data</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <req>
- <reqlist/>
- </req>
- <reqdetail>
- <reqdetaillist>
- <goodcd/>
- <goodnm/>
- <reqqty/>
- <deliveqty/>
- <instcd/>
- <reqflag/>
- <wareflag/>
- <reqdeptcd/>
- <reqdd/>
- <reqno/>
- <reqseqno/>
- <delivedd/>
- <deliveno/>
- <deliveseq/>
- <deliveflag/>
- </reqdetaillist>
- </reqdetail>
- </main>
- <send>
- <search>
- <instcd/>
- <reqdd/>
- <reqdeptcd/>
- <wareflag/>
- <reqno/>
- <openflag/>
- <searchgubun/>
- <reqfromdd/>
- <reqtodd/>
- </search>
- </send>
- <init/>
- <hidden/>
- <temp>
- <deliveinfo>
- <deliveno/>
- </deliveinfo>
- </temp>
- <popdata>
- <instcd/>
- <wareflag/>
- <wareflagnm/>
- <delivedd/>
- <reqdeptcd/>
- <reqdeptnm/>
- <openflag/>
- <reqddbarcode/>
- <reqnobarcode/>
- </popdata>
- <reqdd>
- <reqtodd/>
- <reqfromdd/>
- </reqdd>
- <chk_preyn/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- misfGridInit(grd_req);
- misfGridInit(grd_reqdetail);
- misfMsterDetailSet(grd_req, null, "TRRSO20201" ,"N");
- misfMsterDetailSet(grd_reqdetail, grd_req, "TRRSO20202" ,"Y");
- //Master 조회를 위한 parameter setting
- model.setValue("/root/send/search/instcd", model.getValue("/root/popdata/instcd"));
- model.setValue("/root/send/search/wareflag", model.getValue("/root/popdata/wareflag"));
- model.setValue("/root/send/search/reqdeptcd", model.getValue("/root/popdata/reqdeptcd"));
-
- /*2013.11.22 박준범 - 정대룡씨가 아래 if문 안에 각각 일자 setting부분을 중복으로 넣어두었기에 이부분은 comment처리함
- //2013.07.18 박준범 - 초기 기간을 6개월로 setting
- //model.setValue("/root/send/search/reqfromdd", getCurrentDate().toDate().getAddDate(-3, "M").getDateFormat("YYYYMMDD"));
- model.setValue("/root/send/search/reqfromdd", getCurrentDate().toDate().getAddDate(-6, "M").getDateFormat("YYYYMMDD"));
- model.setValue("/root/send/search/reqtodd", getCurrentDate().substr(0,8) );
- //2013.07.18 박준범 - 초기 기간을 6개월로 setting
- //model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-3, "M").getDateFormat("YYYYMMDD"));
- //발주관리에서 호출했을경우 사용할 FLAG
- */
-
- //2013.11.22 박준범 - 창고출고등록 프로그램에서 청구출급증 바코드를 통해 본 화면이 호출된 경우와 아닌 경우로 나눔
- var reqddBar = model.getValue("/root/popdata/reqddbarcode");
- if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
- btn_save.attribute("text") = "확인";
- model.setValue("/root/send/search/searchgubun", "order");
- model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat("YYYYMMDD")); //발주관리에서 조회할경우 청구일자 한달전으로 설정
- model.setValue("/root/reqdd/reqtodd", getCurrentDate().substr(0,8) );
- model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
- model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
- chk_preyn.visible = false;
- model.refresh();
- misfMsterDetailRetrieve();
-
-
- }else if( reqddBar != "" ) { //2013.11.22 박준범 - 창고출고등록 프로그램에서 청구출급증 바코드를 사용해 본 화면이 호출된 경우
- model.setValue("/root/reqdd/reqfromdd", reqddBar);
- model.setValue("/root/reqdd/reqtodd", reqddBar);
- model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
- model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
- model.refresh();
- if(submit("TRRSO20201")) {
- if(grd_req.rows > 1) {
- var reqnoBar = model.getValue("/root/popdata/reqnobarcode"); //parent에서 넘어온 바코드리더로 인식된 청구번호
- for(var i = 1; i < grd_req.rows; i++) {
- if(reqnoBar == grd_req.valueMatrix(i, grd_req.colRef("reqno"))) {
- grd_req.row = i;
- grd_req.topRow = i;
-
- var bReqnoExist = true; //청구번호가 일치하는 행이 있는지 여부
- break;
- }
- }
-
- if(bReqnoExist == true) {
- grd_req.dispatch("onrowchanged"); //상세내역 조회
- } else {
- messageBox("해당 청구건이 이미 출고등록 되었거나, 혹은 삭제되었습니다.", "I999", "");
- }
-
- } else {
- messageBox("해당 청구건이 이미 출고등록 되었거나, 혹은 삭제되었습니다.", "I999", "");
- }
-
- }
-
- }else{
- model.setValue("/root/reqdd/reqfromdd", getCurrentDate().toDate().getAddDate(-6, "M").getDateFormat("YYYYMMDD"));
- model.setValue("/root/reqdd/reqtodd", getCurrentDate().substr(0,8) );
- model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
- model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
- model.refresh();
- misfMsterDetailRetrieve();
- //조회된 자료가 없는 경우 message를 주고 창을 닫는다.
- if(grd_req.rows == 1) {
- messageBox("해당 창고, 부서에 출고되지 않은 청구data가 존재하지 않습니다..", "I999", "");
- opener.model.setFocus("ipt_delivedeptcd");
- //btn_cancel.dispatch("onclick");
- }
- }
- ]]>
- </script>
- <submission id="TRRSO20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/req"/>
- <submission id="TRRSO20202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/reqdetail"/>
- <submission id="TXRSO20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/reqdetail" resultref="/root/temp/deliveinfo"/>
- </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/humtrafactmngtweb/js/RPB001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="794" pageheight="600">
- <line id="line8" class="line_1" style="x1:10px; y1:92px; x2:780px; y2:92px; "/>
- <caption id="caption20" class="tit_2" style="left:11px; top:77px; width:184px; height:13px; ">청구요구 data</caption>
- <shape id="roundrect2" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:10px; top:10px; width:770px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption12" class="search_name" style="left:270px; top:19px; width:76px; height:17px; ">청구부서</caption>
- <button id="btn_cancel" class="btn4_letter2" style="left:725px; top:565px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //저장버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
- opener.model.setValue("/root/popreq/saveyn", "N");
-
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:665px; top:565px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
- //청구내역이 없는 경우 return;
- if(grd_reqdetail.rows == 1) window.close();
-
- //물품코드나 출고량을 입력하지 않은 Row가 있는지 확인한다.
- for(var i = 1; i < grd_reqdetail.rows; i++) {
- if( grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == "" ||
- grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == ".") {
- messageBox("출고량이 입력되지 않았습니다. \n\n먼저 출고량을 입력하십시요.", "E999", ""); //E: 경고
- model.setFocus("grd_reqdetail");
- grd_reqdetail.row = i;
- return;
- }
- }
-
- for(var i = 1; i < grd_reqdetail.rows; i++) {
- opener.model.setValue("/root/popreq/count", grd_reqdetail.rows-1);
- model.copyNode(opener.root.popsubdata, "/root/main/reqdetail");
-
- // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/goodcd", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/goodcd")); //물품코드
- // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/goodhngnm", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/goodnm")); //물품명
- // opener.model.setValue("/root/main/plceord/plceordlist["+i+"]/orderqty", model.getValue("/root/main/reqdetail/reqdetaillist["+i+"]/deliveqty")); //발주수량
- }
-
- window.close();
- }else{
-
-
-
- //청구내역이 없는 경우 return;
- if(grd_reqdetail.rows == 1) return;
-
- //물품코드나 출고량을 입력하지 않은 Row가 있는지 확인한다.
- for(var i = 1; i < grd_reqdetail.rows; i++) {
- if( grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == "" ||
- grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("deliveqty")) == ".") {
- messageBox("출고량이 입력되지 않았습니다. \n\n먼저 출고량을 입력하십시요.", "E999", ""); //E: 경고
- model.setFocus("grd_reqdetail");
- grd_reqdetail.row = i;
- return;
- }
- }
-
- //출고테이블에 저장을 위해 opener에서 받아온 출고일자(delivedd) 를 setting한다.
- for(var i = 1; i < grd_reqdetail.rows; i++) {
- model.setValue(grd_reqdetail.nodeset + "[" + i + "]/delivedd", model.getValue("/root/popdata/delivedd"));
- var sDeliveSeq = i + "";
- model.setValue(grd_reqdetail.nodeset + "[" + i + "]/deliveseq", sDeliveSeq.getLeftPad(3,"0"));
- model.setValue(grd_reqdetail.nodeset + "[" + i + "]/deliveflag", "01"); //출고구분 (01:전산청구)
- }
-
- //alert(grd_reqdetail.getUpdateDataAll("u"));
- //return;
-
- if(chk_preyn.value == "Y"){
- for(var i = 1; i < grd_reqdetail.rows; i++) {
- grd_reqdetail.valueMatrix(i, grd_reqdetail.colRef("preyn")) = "Y";
- }
- }
-
- //저장처리
- if(submit("TXRSO20201")) {
-
- //저장버튼을 click했는지 아닌지를 나타내는 구분값을 opener에 전달한다.
- opener.model.setValue("/root/popreq/saveyn", "Y");
-
-
- //alert(model.getValue("/root/temp/deliveinfo/deliveno")+"");
- //return;
-
- //선택한 출고내역을 opener의 조회조건에 setting한다.
- opener.model.setValue("/root/send/search/deliveno", model.getValue("/root/temp/deliveinfo/deliveno"));
- //opener.model.setValue("/root/send/search/delivedd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/delivedd"));
- opener.model.setValue("/root/send/search/deliveflag", "01"); //출고유형 설정 (01:전산청구)
- opener.model.refreshpart("/root/send/search/deliveno");
- //opener.model.refreshpart("/root/send/search/delivedd");
- opener.model.refreshpart("/root/send/search/deliveflag");
-
- window.close();
- }
- }
- ]]>
- </script>
- </button>
- <caption id="caption3" class="search_name" style="left:55px; top:19px; width:80px; height:17px; ">창고</caption>
- <output id="opt_wareflagnm" ref="/root/popdata/wareflagnm" class="output_fix" style="left:110px; top:18px; width:120px; height:19px; text-align:center; padding-left:5; "/>
- <output id="opt_reqdeptcd" ref="/root/popdata/reqdeptcd" class="output_fix" style="left:352px; top:18px; width:78px; height:19px; padding-left:5; "/>
- <output id="opt_reqdeptnm" ref="/root/popdata/reqdeptnm" class="output_fix" style="left:430px; top:18px; width:225px; height:19px; padding-left:5; "/>
- <datagrid id="grd_req" nodeset="/root/main/req/reqlist" visibility="visible" caption="청구일자^번호^창고^청구부서^기관코드^" colwidth="77, 42, 29, 42, 58" mergecellsfixedrows="bycolrec" style="left:10px; top:95px; width:140px; height:465px; ">
- <col ref="reqdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="reqno" style="text-align:center; "/>
- <col ref="wareflag" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="searchgubun" visibility="hidden"/>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
-
- //Detail 조회를 위한 parameter setting
- model.setValue("/root/send/search/instcd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/instcd"));
- model.setValue("/root/send/search/reqdd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqdd"));
- model.setValue("/root/send/search/reqno", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqno"));
- model.setValue("/root/send/search/wareflag", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/wareflag"));
- model.setValue("/root/send/search/reqdeptcd", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/reqdeptcd"));
- model.setValue("/root/send/search/searchgubun", model.getValue(grd_req.nodeset + "[" + grd_req.row + "]/searchgubun"));
-
- misfMsterDetailRetrieve();
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_reqdetail" nodeset="/root/main/reqdetail/reqdetaillist" visibility="visible" caption="물품코드^물품명^규격^청구량^출고량^기관코드^물품구분(reqflag)^창고^청구부서^청구일자^청구번호^청구일련번호^출고일자^출고번호^출고순번^출고구분^" colwidth="89, 213, 138, 60, 60, 100, 100, 100, 100, 100, 100, 100, 81, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" style="left:150px; top:95px; width:630px; height:465px; ">
- <col ref="goodcd" style="text-align:center; "/>
- <col ref="goodnm"/>
- <col ref="goodspec"/>
- <col ref="reqqty" format="(-)#,###.##" style="left:341px; top:23px; width:76px; height:23px; text-align:right; "/>
- <col ref="deliveqty" type="input" format="(-)#,###.##" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="reqflag" visibility="hidden"/>
- <col ref="wareflag" visibility="hidden"/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="reqdd" visibility="hidden"/>
- <col ref="reqno" visibility="hidden"/>
- <col ref="reqseqno" visibility="hidden"/>
- <col ref="delivedd" visibility="hidden"/>
- <col ref="deliveno" visibility="hidden"/>
- <col ref="deliveseq" visibility="hidden"/>
- <col ref="deliveflag" visibility="hidden"/>
- <col ref="custcode" visibility="hidden"/>
- <col ref="custnm" visibility="hidden"/>
- <col ref="allsizespecid" visibility="hidden"/>
- <col ref="acntcd" visibility="hidden"/>
- <col ref="acntnm" visibility="hidden"/>
- <col ref="preyn" visibility="hidden"/>
- <col ref="deliveunit" visibility="hidden"/>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- //Grid 에서 엔터 입력시 다음행 수정
- misfNextRow(grd_reqdetail);
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" style="left:229px; top:44px; width:11px; height:20px; ">~</caption>
- <caption id="caption1" class="search_name" style="left:55px; top:45px; width:80px; height:17px; ">청구일자</caption>
- <input id="ipt_reqtodd" ref="/root/reqdd/reqtodd" inputtype="date" format="yyyy-mm-dd" style="left:243px; top:44px; width:90px; height:19px; text-align:center; "/>
- <input id="ipt_reqfromdd" ref="/root/reqdd/reqfromdd" inputtype="date" format="yyyy-mm-dd" style="left:136px; top:44px; width:90px; height:19px; text-align:center; "/>
- <button id="btn_search" class="btn1_letter2" style="left:693px; top:30px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridInit(grd_req);
- misfGridInit(grd_reqdetail);
-
- model.setValue("/root/send/search/reqfromdd", model.getValue("/root/reqdd/reqfromdd"));
- model.setValue("/root/send/search/reqtodd", model.getValue("/root/reqdd/reqtodd"));
-
- //발주관리에서 호출했을경우 사용할 FLAG
- if(model.getValue("/root/popdata/openflag") == "SMRSD07600"){
- btn_save.attribute("text") = "확인";
- model.setValue("/root/send/search/searchgubun", "order");
- }
-
- misfMsterDetailRetrieve();
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:680px; y1:20px; x2:680px; y2:62px; "/>
- <select id="chk_preyn" ref="/root/chk_preyn" visibility="visible" overflow="visible" appearance="full" style="left:592px; top:568px; width:75px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>선납출고</label>
- <value>Y</value>
- </item>
- </choices>
- </select>
- </xhtml:body>
- </xhtml:html>
|