123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <?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>
- <purcconinfo>
- <purcconlist/>
- </purcconinfo>
- <purcconnoinfo>
- <maxpurcconno>
- <purcconno/>
- </maxpurcconno>
- </purcconnoinfo>
- </list>
- </main>
- <target/>
- <init>
- </init>
- <send>
- <search>
- <instcd/>
- <teamflag/>
- <acntcd/>
- <purccondd/>
- <purcconno/>
- <bizflag>C</bizflag>
- </search>
- <nosearch>
- <instcd/>
- <purccondd/>
- </nosearch>
- </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("parainfo_acntcd");
- var csv_teamflag = opener.window.javascript.getParameter("parainfo_teamflag");
- misfGridComboComCdList("030M0011",grd_coninfo,"chkflag");
-
- model.removenode("/root/main/list/purcconinfo/purcconlist");
- model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); // 기관코드
-
- model.setValue(ipt_acntcd.attribute("ref") , csv_acntcd); // 계정코드
- model.setValue(ipt_teamflag.attribute("ref") , csv_teamflag); // 계정코드
-
- model.setValue(cal_purccondd.attribute("ref") , curdate); // 계약일자
- cal_purccondd.dispatch("xforms-value-changed");
- btn_search.dispatch("DOMActivate");
- model.refresh();
-
- }
-
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRRSP00102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/nosearch" resultref="/root/main/list/purcconnoinfo"/>
- <submission id="TRRSP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/list/purcconinfo"/>
- </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="caption6" 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[
- model.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/purcconinfo/purcconlist");
- if (submit("TRRSP00101")){
- for (var i = grd_coninfo.fixedRows;i<grd_coninfo.rows;i++){
- var chkqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkqty" )));
- var conqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("conqty" )));
- var spreqty = parseFloat(grd_coninfo.valueMatrix(i, grd_coninfo.colRef("spreqty")));
- if (spreqty <= 0){
- grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "";
- }else if ((conqty - chkqty) > spreqty){
- grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "M";
- }else if ((conqty - chkqty) == spreqty){
- grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "Y";
- }else{
- grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")) = "";
- }
- }
- }
- ]]>
- </script>
- </button>
- <input id="cal_purccondd" ref="/root/send/search/purccondd" inputtype="date" style="left:101px; top:10px; width:105px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/send/nosearch/instcd" , model.getValue(ipt_instcd.attribute("ref")));
- model.setValue("/root/send/nosearch/purccondd" , model.getValue(cal_purccondd.attribute("ref")));
- if (submit("TRRSP00102")){
- var purcconno = model.getValue("/root/main/list/purcconnoinfo/maxpurcconno/purcconno");
- model.setValue(ipt_purcconno.attribute("ref"), purcconno);
- }
- model.setValue("/root/send/nosearch/instcd" , "");
- model.setValue("/root/send/nosearch/purccondd" , "");
- model.setFocus("ipt_purcconno");
-
- model.refresh();
- ]]>
- </script>
- </input>
- <caption id="caption20" class="search_name" style="left:10px; top:10px; width:96px; height:17px; vertical-align:middle; ">계약일자 :</caption>
- <input id="ipt_purcconno" ref="/root/send/search/purcconno" class="input_default" style="left:215px; top:10px; width:75px; height:19px; text-align:center; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
-
- inputEnterKey("btn_search", "DOMActivate");
-
- ]]>
- </script>
- </input>
- <input id="ipt_instcd" ref="/root/send/search/instcd" class="input_default" disabled="true" visibility="hidden" style="left:315px; top:10px; width:75px; height:19px; text-align:center; "/>
- <input id="ipt_acntcd" ref="/root/send/search/acntcd" class="input_default" disabled="true" visibility="hidden" style="left:405px; top:10px; width:75px; height:19px; text-align:center; "/>
- <input id="ipt_teamflag" ref="/root/send/search/teamflag" class="input_default" disabled="true" visibility="hidden" style="left:490px; top:10px; width:75px; height:19px; text-align:center; "/>
- </group>
- <caption id="caption4" class="tit_2" style="left:10px; top:79px; width:131px; height:13px; ">구매계약 내역</caption>
- <line id="line2" class="line_1" style="x1:1px; y1:99px; x2:1072px; y2:99px; "/>
- <button id="button1" class="btn4_letter2" style="left:945px; top:440px; width:56px; height:22px; ">
- <caption>적용</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iParam = model.getValue(grd_coninfo.nodeset);
- var nodelist = instance1.selectNodes(grd_coninfo.nodeset);
- var rCVS = getNodeListCSV(nodelist);
- for (var i=grd_coninfo.fixedRows;i<grd_coninfo.rows;i++){
- if (grd_coninfo.valueMatrix(i, grd_coninfo.colRef("chkflag")).getTrim() == ""){
- messageBox(i +"번째에 검수구분이 입력되지 ", "E007");
- return;
- }
- }
- if ( checkOpener() ) {
- opener.javascript.setParameter("SMRSD00400_", rCVS);
-
- } else {
- var rtn = messageBox("상위화면을 찾을 수", "E001");
- }
- model.close();
- ]]>
- </script>
- </button>
- <datagrid id="grd_coninfo" nodeset="/root/main/list/purcconinfo/purcconsublist" caption="순번^품명코드/명칭^품명코드/명칭^품명코드/명칭^규격^단위^BOX수^계약량^검수량^잔여량^요구부서코드^요구부서^검수구분^단가^계약일자^계약번호^팀구분^계정코드" colsep="^" colwidth="54, 84, 26, 128, 135, 50, 54, 63, 56, 59, 18, 100, 100, 80, 25, 21, 33, 26" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="24" rowsep="|" style="left:1px; top:105px; width:1070px; height:320px; font-weight:normal; text-align:center; ">
- <col ref="purcconseq" 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" type="output" style="text-align:left; padding-left:10; "/>
- <col ref="goodspec" type="output" style="text-align:left; padding-left:10; "/>
- <col ref="conunit" type="output" style="text-align:left; padding-left:10; "/>
- <col ref="reqpackcntperunit" format="#,###" style="text-align:right; "/>
- <col ref="conqty" format="#,###" style="text-align:right; "/>
- <col ref="chkqty" format="#,###" style="text-align:right; "/>
- <col ref="spreqty" type="input" format="#,###" style="text-align:right; "/>
- <col ref="reqdeptcd" visibility="hidden"/>
- <col ref="reqdeptnm" style="text-align:left; padding-left:10; "/>
- <col disabled="true" ref="chkflag" type="combo">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- </col>
- <col ref="congoodunitcost" format="#,###" style="text-align:right; "/>
- <col ref="purccondd" visibility="hidden"/>
- <col ref="purcconno" visibility="hidden"/>
- <col ref="teamflag" visibility="hidden"/>
- <col ref="acntcd" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if( grd_coninfo.col == grd_coninfo.colRef("spreqty")){
- var chkqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkqty" )));
- var conqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("conqty" )));
- var spreqty = parseFloat(grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("spreqty")));
- /*if (chkqty < spreqty){
- messageBox("잔여량이 검수량을 초과할수 ","I004");
- grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("spreqty")) = "0";
- }*/
- if (spreqty <= 0){
- grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "";
- }else if ((conqty - chkqty) > spreqty){
- grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "M";
- }else if ((conqty - chkqty) == spreqty){
- grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "Y";
- }else{
- grd_coninfo.valueMatrix(grd_coninfo.row, grd_coninfo.colRef("chkflag")) = "";
- }
-
- }
- ]]>
- </script>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|