123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="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:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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="">
- <init/>
- <send>
- <winfromdd/>
- <wintodd/>
- <flag/>
- </send>
- <temp/>
- <main>
- <list>
- <winqtylist/>
- </list>
- </main>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- //화면 Control을 초기화한다
- fInitialize();
- ]]>
- </script>
- <submission id="TRRST03501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
- </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/miscommonweb/js/RSZ001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
- var RetrYn = "Y";
- function fInitialize() {
-
- misfGridInit(grd_winqty);
-
- grd_winqty.rowHeight(0) = "20";
- grd_winqty.rowHeight(1) = "20";
- var curdate = new Date();//getCurrentDate();
-
-
- ipt_wintodd.value = curdate.getDateFormat();
- ipt_winfromdd.value = curdate.getAddDate(-1, "M").getDateFormat();
-
- //grd_winqty.mergecells = "bycol";
- // grid sum
- //grd_winqty.subtotalposition = "after";
- makeReportPreview(0, 0,1160,600, "grp_biz");
-
- btn_month.selected = "true";
- model.setValue("/root/send/flag", "mnth");
- model.toggle("case_grid");
-
- model.refresh();
- }
-
- function fRetrieve() {
- if (!validCondition()) {
- return;
- }
- model.removenodeset(grd_winqty.nodeset);//.substring(0, grd_winqty.nodeset.lastIndexOf("/")));
- model.removeNodeset("/root/properties/report/mainreport/params");
- fClearGrid(grd_winqty);
- grd_winqty.rebuildStyle();
- grd_winqty.refresh();
- model.refresh();
-
- //if (ipt_winfromdd.value == "20120128")
- // return;
-
- if (submit("TRRST03501")) {
- if (model.getValue("/root/send/flag") == "mnth") {
- fAfterRetrieve();
- } else {
- if (document.all("ivr_grp_biz")) {
- grp_biz.removeChild("ivr_grp_biz");
- }
- makeReportPreview(0, 0,1160,600, "grp_biz");
- exeReportPreview("RPRST03501", "XMLSTR", "", "", "", "", "", "", "", "", "", "grp_biz");
- }
-
- }
- model.refresh();
-
- }
-
- //조회후 그리드 셋팅
- function fAfterRetrieve() {
- var iCnt = getNodesetCount(grd_winqty.nodeset);
-
- for (var i = 1; i <= iCnt; i++) {
- switch (model.getValue(grd_winqty.nodeset+"["+ i +"]/lvl1") + "" + model.getValue(grd_winqty.nodeset+"["+ i +"]/lvl2") +"" + model.getValue(grd_winqty.nodeset+"["+ i +"]/lvl3") ) {
- case "110":
- grd_winqty.cellstyle("background-color", i, 2, i, 2) = "#ccffff";
- //grd_winqty.cellstyle("font-weight", i, 0, i, 1) = "bold";
-
- model.setValue(grd_winqty.nodeset+"["+ i +"]/winmm", "제조사별 누계");
- break;
- case "111":
- grd_winqty.cellstyle("background-color", i, 2, i, 5) = "#ffff99";
- grd_winqty.cellstyle("font-weight", i, 2, i, 5) = "bold";
-
- model.setValue(grd_winqty.nodeset+"["+ i +"]/prodcmpycdnm", "총 합계");
- break;
- case "001":
- model.setValue(grd_winqty.nodeset+"["+ i +"]/prodcmpycdnm", model.getValue(grd_winqty.nodeset+"["+ i +"]/winmm")+" 소계");
- grd_winqty.cellstyle("background-color", i, 1, i, 5) = "#ffff99";
- grd_winqty.cellstyle("font-weight", i, 1, i, 5) = "bold";
- break;
- }
-
- }
- //grd_winqty.rebuildStyle();
- grd_winqty.refresh();
- /*
- grd_winqty.subtotal("clear", 0, 0);
-
- grd_winqty.subtotalPosition = "below";
- grd_winqty.multitotals = true;
-
- // 총합계 ( sub합계보다 먼저 선언되어야한다.)
- grd_winqty.subtotal("sum", -1, 4, "format:#,###.0; ", "text-align:center;background-color:#ffff99; font-weight:bold; ", 2, "TOTAL");
- grd_winqty.subtotal("sum", -1, 5, "format:#,###.0; ", "text-align:center;background-color:#ffff99; font-weight:bold; ", 2, "TOTAL");
-
- // 구분별 합계 ( total 합계가 먼저 선언되어야한다)
- grd_winqty.subtotal("sum", 2, 4, "format:#,###.0; ", "text-align:center;background-color:#ffff99; font-weight:bold; ", 3, "SUB합계");
- grd_winqty.subtotal("sum", 2, 5, "format:#,###.0; ", "text-align:center;background-color:#ffff99; font-weight:bold; ", 3, "SUB합계");
- */
- }
-
- function fClearGrid(o) {
- for (var i = o.fixedRows; i <= o.rows; i++) {
- o.deleteRow(i);
- }
- }
-
- function validCondition() {
- if(ipt_winfromdd.value.length== 0 ) {
- messageBox("입고시작일자를 " ,"C001");
- model.setFocus("ipt_winfromdd");
- return false;
- }
-
- if(ipt_wintodd.value.length== 0 ) {
- messageBox("입고종료일자를 " ,"C001");
- model.setFocus("ipt_wintodd");
- return false;
- }
- return true;
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">기간별 제조사별 구입량 현황</caption>
- </group>
- <group id="group5" scroll="auto" style="left:0px; top:38px; width:1195px; height:744px; ">
- <group id="group6" style="left:0px; top:10px; width:1195px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:13px; top:9px; width:86px; height:17px; ">입고일자 :</caption>
- <button id="btn_sea" class="btn1_letter2" navindex="3" style="left:1125px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- misfMsterDetailRetrieve();
-
- fRetrieve();
-
- ]]>
- </script>
- </button>
- <input id="ipt_winfromdd" ref="/root/send/winfromdd" class="input_s_essential" navindex="1" inputtype="date" style="left:100px; top:9px; width:114px; height:19px; "/>
- <input id="ipt_wintodd" ref="/root/send/wintodd" class="input_s_essential" navindex="2" inputtype="date" style="left:238px; top:9px; width:114px; height:19px; "/>
- <caption id="caption22" style="left:220px; top:9px; width:15px; height:20px; font-weight:bold; vertical-align:middle; ">~</caption>
- </group>
- <switch id="sw_flag" class="sw_box" style="left:0px; top:74px; width:1195px; height:660px; border-style:solid; ">
- <case id="case_grid">
- <line id="line15" class="line_1" style="x1:0px; y1:26px; x2:1195px; y2:26px; "/>
- <caption id="caption3" class="tit_2" style="left:5px; top:5px; width:215px; height:14px; ">기간별 제조사별 구입량 현황</caption>
- <datagrid id="grd_winqty" nodeset="/root/main/winqtylist" caption="입고년^입고년월^제조사^입고수량^입고금액" colsep="^" colwidth="0,120,400,250,250" dataheight="25" extendlastcol="scroll" mergecells="bycol" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" rowsep="|" style="left:0px; top:30px; width:1180px; height:610px; ">
- <col ref="winyy" visibility="hidden" format="####"/>
- <col ref="winmm" format="yyyy-mm" style="text-align:center; "/>
- <col ref="prodcmpycdnm" style="text-align:left; "/>
- <col ref="sumqty" format="###,###,###.##" style="text-align:right; "/>
- <col ref="sumamt" format="###,###,###.##" style="text-align:right; "/>
- </datagrid>
- <button id="button14" class="btn2_letter2" navindex="4" style="left:1145px; top:5px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSaveExcel(grd_winqty,"기간별제조사별구입량현황");
- ]]>
- </script>
- </button>
- </case>
- <case id="case_report" selected="true">
- <group id="grp_biz" scroll="auto" style="left:0px; top:10px; width:1175px; height:620px; "/>
- </case>
- </switch>
- <button id="btn_prod" class="btn_sw" group="tab" style="left:95px; top:49px; width:100px; height:22px; ">
- <caption>거래처 별</caption>
- <toggle case="case_report" ev:event="onclick"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/send/flag", "prod");
- btn_sea.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <button id="btn_month" class="btn_sw" group="tab" style="left:0px; top:49px; width:95px; height:22px; ">
- <caption>월별</caption>
- <toggle case="case_grid" ev:event="onclick"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/send/flag", "mnth");
- btn_sea.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:12; width:1195px; height:27px; ">
- <button id="button34" class="btn6_letter2" visibility="hidden" style="left:0; top:3px; width:56px; height:22px; ">
- <caption>출력</caption>
- </button>
- <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195; y2:25; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|