123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <?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>구매요구 내역</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list>
- <purcdmndmaininfo>
- <purcdmndmainlist>
- </purcdmndmainlist>
- </purcdmndmaininfo>
- <purcdmndsubinfo>
- <purcdmndsublist/>
- </purcdmndsubinfo>
- </list>
- </main>
- <target/>
- <init>
- </init>
- <send>
- <mainsearch>
- <instcd/>
- <acntcd/>
- <purcdmndddfr/>
- <purcdmndddto/>
- <reqdeptcd/>
- <reqdeptnm/>
- <goodcd/>
- <purcpgmgubn/>
- <purcdmndmmfr/>
- <purcdmndmmto/>
- </mainsearch>
- <subsearch>
- <instcd/>
- <purcpgmgubn/>
- <purcdmnddd/>
- <purcdmndno/>
- </subsearch>
- </send>
- <temp/>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- // 금일 날자 설정
- var curdate = getCurrentDate();
- var cvtdate = curdate.toDate("YYYYMMDD");
- var csv_acntcd = opener.window.javascript.getParameter("para_acntcd");
- var csv_purcpgmgubn = opener.window.javascript.getParameter("para_purcpgmgubn");
- var csv_bizflag = opener.window.javascript.getParameter("para_bizflag");
- var csv_purcdmnddd = opener.window.javascript.getParameter("para_purcdmnddd");
- var csv_unitcostconyn = opener.window.javascript.getParameter("para_unitcostconyn"); //단가계약 버튼FLAG
-
- model.removenode("/root/main/list/purcdmndmaininfo/purcdmndmainlist");
- model.removenode("/root/main/list/purcdmndsubinfo/purcdmndsublist");
- if (csv_purcpgmgubn == "3"){ //자산구분이 약품일 경우
- if(csv_unitcostconyn=="Y"){ //약품단가계약 일경우
- document.title="단가계약 내역";
- cap_tit.value = "단가계약 내역";
- cap_tit1.value = "단가계약 정보";
- cap_tit2.value = "단가계약 상세정보";
- model.makeValue("/root/send/mainsearch/unitcostconyn",csv_unitcostconyn);
- }
-
- cap_purcdmndmm.visible = true;
- cal_purcdmndmmfr.visible = true;
- cal_purcdmndmmto.visible = true;
-
- cap_purcdmnddd.visible = false;
- cal_purcdmndddfr.visible = false;
- cal_purcdmndddto.visible = false;
-
- }else{
- cap_purcdmndmm.visible = false;
- cal_purcdmndmmfr.visible = false;
- cal_purcdmndmmto.visible = false;
-
- cap_purcdmnddd.visible = true;
- cal_purcdmndddfr.visible = true;
- cal_purcdmndddto.visible = true;
-
- }
- model.setValue(ipt_acntcd.attribute("ref") , csv_acntcd);
- model.setValue(ipt_purcpgmgubn.attribute("ref") , csv_purcpgmgubn);
- if (csv_bizflag == "SMRSK01000"){ //단가납품지시에서 호출했을 경우
- model.setValue(cal_purcdmndddfr.attribute("ref") , csv_purcdmnddd);
- model.setValue(cal_purcdmndddto.attribute("ref") , csv_purcdmnddd);
- model.setValue(ipt_reqdeptcd.attribute("ref") , "");
- model.setValue(opt_reqdeptnm.attribute("ref") , "");
-
- }else{
- model.setValue(cal_purcdmndddfr.attribute("ref") , curdate);
- model.setValue(cal_purcdmndddto.attribute("ref") , curdate);
- //model.setValue(ipt_reqdeptcd.attribute("ref") , getUserInfo("dutplcecd"));
- //model.setValue(opt_reqdeptnm.attribute("ref") , getUserInfo("dutplcenm"));
- }
-
-
- model.setValue(cal_purcdmndmmfr.attribute("ref") , curdate);
- model.setValue(cal_purcdmndmmto.attribute("ref") , curdate);
- // misfComboComCdList("030M0001",cmb_wareflag);
- // misfComboComCdListMulti("Z0007","cmb_instcd");
- model.setValue("/root/send/mainsearch/instcd", getUserInfo("dutplceinstcd")); // 기관 설정
- //model.setValue(ipt_windtfrom.attribute("ref") ,cvtdate.getAddDate(-10,"D").getDateFormat("YYYYMMDD"));
- btn_search.dispatch("DOMActivate");
- model.refresh();
-
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRRSK00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/mainsearch" resultref="/root/main/list/purcdmndmaininfo"/>
- <submission id="TRRSK00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/subsearch" resultref="/root/main/list/purcdmndsubinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.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/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../mis/humtrafactmngtweb/js/RPB001.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="1100" pageheight="480" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <caption id="cap_tit1" class="tit_2" style="left:5px; top:79px; width:105px; height:13px; ">구매요구 정보</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:99px; x2:310px; y2:99px; "/>
- <caption id="cap_tit" class="tit_1" style="left:0px; top:0px; width:600px; height:14px; ">구매요구 내역</caption>
- <button id="btn_confirm" class="btn4_letter2" style="left:1015px; top:440px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <group id="grp_search" style="left:0px; top:22px; width:1080px; height:48px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1075px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
- <button id="btn_search" class="btn1_letter2" style="left:1005px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removeNodeset("/root/main/list/purcdmndmaininfo/purcdmndmainlist");
- submit("TRRSK00201");
- ]]>
- </script>
- </button>
- <line id="line30" class="line_4" style="x1:995px; y1:3px; x2:995px; y2:35px; "/>
- <input id="cal_purcdmndddfr" ref="/root/send/mainsearch/purcdmndddfr" inputtype="date" style="left:101px; top:10px; width:105px; height:19px; text-align:center; "/>
- <caption id="cap_purcdmnddd" class="search_name" style="left:10px; top:10px; width:96px; height:17px; vertical-align:middle; ">요구일자 :</caption>
- <input id="cal_purcdmndddto" ref="/root/send/mainsearch/purcdmndddto" inputtype="date" style="left:235px; top:10px; width:105px; height:19px; text-align:center; "/>
- <caption id="caption2" style="left:214px; top:13px; width:20px; height:17px; font-weight:bold; vertical-align:middle; ">~</caption>
- <caption id="caption3" class="search_name" style="left:365px; top:10px; width:96px; height:17px; vertical-align:middle; ">요구부서 :</caption>
- <button id="btn_reqdeptcd" class="icon_search" style="left:549px; top:12px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var recv_list = "reqdeptcd,reqdeptnm";
- misfOpenPopUpList("02", ipt_reqdeptcd,"", recv_list) ;
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_reqdeptcd" ref="/root/send/mainsearch/reqdeptcd" class="input_essential" style="left:460px; top:10px; width:85px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- misfValidationCheck("02", "", "reqdeptcd,reqdeptnm" );
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == 9)
- {
- if(event.shiftKey)model.setFocus("ipt_fromdd");
- else model.setFocus("ipt_reqflag");
- }
- //event.preventDefault();
- ]]>
- </script>
- </input>
- <output id="opt_reqdeptnm" ref="/root/send/mainsearch/reqdeptnm" class="output_fix" appearance="output" style="left:572px; top:10px; width:124px; height:19px; "/>
- <caption id="cap_goodcd" class="search_name" style="left:715px; top:10px; width:86px; height:17px; ">물품코드 :</caption>
- <input id="ipt_goodcd" ref="/root/send/mainsearch/goodcd" class="input_search" maxlength="10" appearance="input" style="left:811px; top:10px; width:89px; height:19px; "/>
- <input id="ipt_instcd" ref="/root/send/mainsearch/instcd" class="input_search" visibility="hidden" appearance="input" style="left:905px; top:6px; width:45px; height:19px; "/>
- <input id="ipt_acntcd" ref="/root/send/mainsearch/acntcd" class="input_search" visibility="hidden" appearance="input" style="left:950px; top:6px; width:45px; height:19px; "/>
- <input id="ipt_purcpgmgubn" ref="/root/send/mainsearch/purcpgmgubn" class="input_search" visibility="hidden" appearance="input" style="left:905px; top:25px; width:45px; height:19px; "/>
- <input id="cal_purcdmndmmfr" ref="/root/send/mainsearch/purcdmndmmfr" inputtype="date" format="yyyy-mm" style="left:101px; top:10px; width:105px; height:19px; text-align:center; "/>
- <input id="cal_purcdmndmmto" ref="/root/send/mainsearch/purcdmndmmto" inputtype="date" format="yyyy-mm" style="left:235px; top:10px; width:105px; height:19px; text-align:center; "/>
- <caption id="cap_purcdmndmm" class="search_name" style="left:10px; top:10px; width:96px; height:17px; vertical-align:middle; ">요구년월 :</caption>
- </group>
- <caption id="cap_tit2" class="tit_2" style="left:330px; top:79px; width:131px; height:13px; ">구매요구 상세 정보</caption>
- <line id="line2" class="line_1" style="x1:325px; y1:99px; x2:1080px; y2:99px; "/>
- <button id="button1" class="btn4_letter2" style="left:950px; top:440px; width:56px; height:22px; ">
- <caption>적용</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iParam = model.getValue(grd_gooddmndsub.nodeset);
- var nodelist = instance1.selectNodes(grd_gooddmndsub.nodeset);
-
- var CVS = getNodeListCSV(nodelist);
- if ( checkOpener() ) {
- opener.javascript.setParameter("SMRSD00400_", CVS);
-
- } else {
- var rtn = messageBox("상위화면을 찾을 수", "E001");
- }
- model.close();
- ]]>
- </script>
- </button>
- <button id="btn_insert" class="btn2_letter2" style="left:1025px; top:75px; width:42px; height:19px; ">
- <caption>수정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for(i=grd_gooddmndsub.fixedRows;i<grd_gooddmndsub.rows;i++){
- grd_gooddmndsub.cellAttribute("disabled", i , grd_gooddmndsub.colRef("cnsttnqty" )) = "false";
- grd_gooddmndsub.cellAttribute("disabled", i , grd_gooddmndsub.colRef("goodunitcost" )) = "false";
- }
- ]]>
- </script>
- </button>
- <datagrid id="grd_gooddmndmain" nodeset="/root/main/list/purcdmndmaininfo/purcdmndmainlist" caption="기관코드^요구일자/NO^요구일자/NO^부서" colsep="^" colwidth="23, 81, 49, 136" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" rowsep="|" style="left:0px; top:105px; width:310px; height:320px; ">
- <col ref="instcd" type="output" visibility="hidden" style="text-align:center; "/>
- <col ref="purcdmnddd" type="output" style="text-align:center; "/>
- <col ref="purcdmndno" style="text-align:center; "/>
- <col ref="reqdeptnm" style="text-align:left; padding-left:10; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var spath = "/root/send/subsearch";
- model.setValue(spath+"/instcd" , grd_gooddmndmain.valueMatrix(grd_gooddmndmain.row, grd_gooddmndmain.colRef("instcd")));
- model.setValue(spath+"/purcpgmgubn", model.getValue(ipt_purcpgmgubn.attribute("ref")));
- model.setValue(spath+"/purcdmnddd" , grd_gooddmndmain.valueMatrix(grd_gooddmndmain.row, grd_gooddmndmain.colRef("purcdmnddd")));
- model.setValue(spath+"/purcdmndno" , grd_gooddmndmain.valueMatrix(grd_gooddmndmain.row, grd_gooddmndmain.colRef("purcdmndno")));
- submit("TRRSK00202");
- model.resetInstanceNode(spath);
- for(i=grd_gooddmndsub.fixedRows;i<grd_gooddmndsub.rows;i++){
- grd_gooddmndsub.cellAttribute("disabled", i , grd_gooddmndsub.colRef("cnsttnqty" )) = "true";
- grd_gooddmndsub.cellAttribute("disabled", i , grd_gooddmndsub.colRef("goodunitcost" )) = "true";
- }
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_gooddmndsub" nodeset="/root/main/list/purcdmndsubinfo/purcdmndsublist" caption="SEQ^물품코드^물품코드^물품명^요구량^잔존량^품의량^단위^BOX 단위^조정단가^기관코드^구매요구일자^구매요구번호^구매요구일련번호^계정과목^규격^모델^요구포장단위당갯수^제조사코드^제조사명^요구부서 코드^요구부서명" colsep="^" colwidth="50, 105, 32, 173, 52, 57, 56, 53, 22, 66, 23, 17, 24, 17, 24, 23, 17, 19, 24, 17, 100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:325px; top:105px; width:755px; height:320px; ">
- <col ref="purcdmndseq" type="output" _key="true" style="text-align:center; "/>
- <col ref="goodcd" type="output" _key="true" style="text-align:center; "/>
- <col ref="allsizespecid" type="output" _key="true" style="text-align:center; "/>
- <col ref="goodnm" style="text-align:left; padding-left:10; "/>
- <col ref="reqqty" format="#,###" style="text-align:right; "/>
- <col ref="spreqty" format="#,###" style="text-align:right; "/>
- <col ref="cnsttnqty" type="input" format="#,###" style="text-align:right; "/>
- <col ref="requnit" type="output" style="text-align:left; padding-left:10; "/>
- <col ref="fullpurcunit" type="output" visibility="hidden" style="text-align:left; padding-left:10; "/>
- <col ref="goodunitcost" type="input" format="#,###" style="text-align:right; "/>
- <col ref="instcd" visibility="hidden" style="text-align:center; "/>
- <col ref="purcdmnddd" visibility="hidden" style="text-align:center; "/>
- <col ref="purcdmndno" visibility="hidden" style="text-align:center; "/>
- <col ref="purcdmndseq" visibility="hidden" style="text-align:center; "/>
- <col ref="acntcd" visibility="hidden" style="text-align:center; "/>
- <col ref="goodspec" visibility="hidden" style="text-align:left; padding-left:10; "/>
- <col ref="goodmodel" visibility="hidden" style="text-align:left; padding-left:10; "/>
- <col ref="reqpackcntperunit" visibility="hidden" style="text-align:center; "/>
- <col ref="prodcmpycd" visibility="hidden" style="text-align:center; "/>
- <col ref="prodcmpynm" visibility="hidden" style="text-align:center; "/>
- <col ref="reqdeptcd"/>
- <col ref="reqdeptnm"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if(grd_gooddmndsub.col == grd_gooddmndsub.colRef("cnsttnqty")){
- grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("spreqty")) = parseFloat(grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("reqqty"))) - parseFloat(grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("cnsttnqty")));
- grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("reqpackcnt")) = (parseFloat(grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("cnsttnqty"))) / parseFloat(grd_gooddmndsub.valueMatrix(grd_gooddmndsub.row, grd_gooddmndsub.colRef("reqpackcntperunit")))).toString().getRound(-1,"UP");
- }
- ]]>
- </script>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|