| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" 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">
- <xhtml:head>
- <xhtml:title>
- <![CDATA[报表模块>>热轧报表>>全厂产出存报表(UIG100001)]]>
- </xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <startTime/>
- <endTime/>
- </formData>
- <datagrid1/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- if(window.parent==null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/b01.js"/>
- <script type="javascript" src="../../js/mesCommon.js"/>
- <script type="javascript" src="../../js/bCommon.js"/>
- <script type="javascript">
- <![CDATA[
- function Init(node)
- {
- InitParams(node);
- }
-
- function _validate(_start,_end){
- if(_start == '' || _end == ''){
- window.alert("请输入发货时间!", "警告");
- return false;
- }else if(_start.substr(1,4) != _end.substr(1,4) || _start.substr(4,2) != _end.substr(4,2) ){
- window.alert("输入的时间区间不在同一月份中,请重新输入!", "警告");
- return false;
- }else if(parseInt(_start )>parseInt(_end )){
- window.alert("开始时间不能大于结束时间,请重新输入!", "警告");
- return false;
- }else{
- return true;
- }
- }
-
- function find()
- {
- if(!_validate(input1.value,input2.value)){
- return;
- }
- showProgressBar();
- model.removenode("/root/reqData");
- model.copyNode("/root/reqData" , "/root/formData");//保存查询时间,查询明细时根据它判定
- commSendReq("/root/formData");
- commSubmit("UIG100001-service" , "find" , "glueAction.do");
- model.copyNode("/root/datagrid1" , "/root/resData/WgtList_VO");
- model.refresh();
- removeProgressBar();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="980" pageheight="620">
- <datagrid id="datagrid1" nodeset="/root/datagrid1/WgtList_Row" caption="统计^当期(t)^月累(t)" colsep="^" colwidth="100, 200, 200" extendlastcol="false" mergecellsfixedrows="byrowrec" rowheight="30" rowsep="|" tooltip="label" style="left:0px; top:35px; width:975px; height:582px; border-color:#000000; border-style:solid; ">
- <col editable="false" ref="NAME" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="SUM_DAY_WGT" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="SUM_MONTH_WGT" style="text-align:center; background-color:#ffffff; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- if(datagrid1.selectedRow(0) < 0){
- return;
- }
- if(datagrid1.colRef("NAME")==datagrid1.col){
- return;
- }
- window.load("./_UIG100001.xrw", "modal", "", "left:430; top:240; width:400; height:420; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
- ]]>
- </script>
- </datagrid>
- <caption id="caption1" class="cell" style="left:0px; top:5px; width:95px; height:20px; border-color:#000000; border-style:solid; ">发货时间</caption>
- <input id="input1" ref="/root/formData/startTime" inputtype="date" style="left:99px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
- <caption id="caption2" style="left:200px; top:10px; width:19px; height:20px; ">~</caption>
- <input id="input2" ref="/root/formData/endTime" inputtype="date" style="left:210px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
- <input id="input_outType" visibility="hidden" style="left:540px; top:5px; width:100px; height:20px; "/>
- <button id="button1" style="left:360px; top:5px; width:65px; height:20px; background-color:#e4ecf5; border-color:#000000; border-style:solid; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button3" style="left:435px; top:5px; width:65px; height:20px; background-color:#e4ecf5; border-color:#000000; border-style:solid; ">
- <caption>导出</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.rows<=1){
- window.alert("无数据源,请先查询.", "提示");
- return;
- }
- window.load("./_out.xrw", "modal", "", "left:350; top:240; width:400; height:220; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
- var _cnt = datagrid1.selectedRows;
- if(_cnt <=0){
- commonOutExcel('UIG100001',datagrid1.caption,'/root/datagrid1','UIG100001-service','',input_outType.value);
- }else{
- var colRef = getVoColrefs("/root/datagrid1");
- var refs = colRef.split("^");
- var jsonDatas = "[";
- var _v ="";
- for(var i=0;i<_cnt;i++){
- jsonDatas +="{";
- for(var j=0;j<refs.length;j++){
- _v =model.getValue("/root/datagrid1/WgtList_Row["+datagrid1.selectedRow(i)+"]/"+refs[j]);
- jsonDatas +="'"+refs[j]+"':'"+_v+"',";
- }
- jsonDatas = jsonDatas.substring(0,jsonDatas.length-1);
- jsonDatas += "},";
- }
- jsonDatas=jsonDatas.substring(0,jsonDatas.length-1);
- jsonDatas += "]";
- commonOuterExcel('UIG100001',datagrid1.caption,colRef,jsonDatas,'UIG100001-service','',input_outType.value);
- }
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|