4f28b677b48eea3a93bf09019789fab75eec8da7.svn-base 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>
  6. <![CDATA[报表模块>>热轧报表>>全厂产出存报表(UIG100001)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <startTime/>
  13. <endTime/>
  14. </formData>
  15. <datagrid1/>
  16. </root>
  17. </instance>
  18. <script type="javascript" ev:event="xforms-ready">
  19. <![CDATA[
  20. if(window.parent==null) Init();
  21. ]]>
  22. </script>
  23. </model>
  24. <script type="javascript" src="../../js/boaCommon.js"/>
  25. <script type="javascript" src="../../js/b01.js"/>
  26. <script type="javascript" src="../../js/mesCommon.js"/>
  27. <script type="javascript" src="../../js/bCommon.js"/>
  28. <script type="javascript">
  29. <![CDATA[
  30. function Init(node)
  31. {
  32. InitParams(node);
  33. }
  34. function _validate(_start,_end){
  35. if(_start == '' || _end == ''){
  36. window.alert("请输入发货时间!", "警告");
  37. return false;
  38. }else if(_start.substr(1,4) != _end.substr(1,4) || _start.substr(4,2) != _end.substr(4,2) ){
  39. window.alert("输入的时间区间不在同一月份中,请重新输入!", "警告");
  40. return false;
  41. }else if(parseInt(_start )>parseInt(_end )){
  42. window.alert("开始时间不能大于结束时间,请重新输入!", "警告");
  43. return false;
  44. }else{
  45. return true;
  46. }
  47. }
  48. function find()
  49. {
  50. if(!_validate(input1.value,input2.value)){
  51. return;
  52. }
  53. showProgressBar();
  54. model.removenode("/root/reqData");
  55. model.copyNode("/root/reqData" , "/root/formData");//保存查询时间,查询明细时根据它判定
  56. commSendReq("/root/formData");
  57. commSubmit("UIG100001-service" , "find" , "glueAction.do");
  58. model.copyNode("/root/datagrid1" , "/root/resData/WgtList_VO");
  59. model.refresh();
  60. removeProgressBar();
  61. }
  62. ]]>
  63. </script>
  64. </xhtml:head>
  65. <xhtml:body pagewidth="980" pageheight="620">
  66. <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; ">
  67. <col editable="false" ref="NAME" style="text-align:center; background-color:#ffffff; "/>
  68. <col editable="false" ref="SUM_DAY_WGT" style="text-align:center; background-color:#ffffff; "/>
  69. <col editable="false" ref="SUM_MONTH_WGT" style="text-align:center; background-color:#ffffff; "/>
  70. <script type="javascript" ev:event="ondblclick">
  71. <![CDATA[
  72. if(datagrid1.selectedRow(0) < 0){
  73. return;
  74. }
  75. if(datagrid1.colRef("NAME")==datagrid1.col){
  76. return;
  77. }
  78. window.load("./_UIG100001.xrw", "modal", "", "left:430; top:240; width:400; height:420; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  79. ]]>
  80. </script>
  81. </datagrid>
  82. <caption id="caption1" class="cell" style="left:0px; top:5px; width:95px; height:20px; border-color:#000000; border-style:solid; ">发货时间</caption>
  83. <input id="input1" ref="/root/formData/startTime" inputtype="date" style="left:99px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  84. <caption id="caption2" style="left:200px; top:10px; width:19px; height:20px; ">~</caption>
  85. <input id="input2" ref="/root/formData/endTime" inputtype="date" style="left:210px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  86. <input id="input_outType" visibility="hidden" style="left:540px; top:5px; width:100px; height:20px; "/>
  87. <button id="button1" style="left:360px; top:5px; width:65px; height:20px; background-color:#e4ecf5; border-color:#000000; border-style:solid; ">
  88. <caption>查询</caption>
  89. <script type="javascript" ev:event="onclick">
  90. <![CDATA[
  91. find();
  92. ]]>
  93. </script>
  94. </button>
  95. <button id="button3" style="left:435px; top:5px; width:65px; height:20px; background-color:#e4ecf5; border-color:#000000; border-style:solid; ">
  96. <caption>导出</caption>
  97. <script type="javascript" ev:event="onclick">
  98. <![CDATA[
  99. if(datagrid1.rows<=1){
  100. window.alert("无数据源,请先查询.", "提示");
  101. return;
  102. }
  103. window.load("./_out.xrw", "modal", "", "left:350; top:240; width:400; height:220; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  104. var _cnt = datagrid1.selectedRows;
  105. if(_cnt <=0){
  106. commonOutExcel('UIG100001',datagrid1.caption,'/root/datagrid1','UIG100001-service','',input_outType.value);
  107. }else{
  108. var colRef = getVoColrefs("/root/datagrid1");
  109. var refs = colRef.split("^");
  110. var jsonDatas = "[";
  111. var _v ="";
  112. for(var i=0;i<_cnt;i++){
  113. jsonDatas +="{";
  114. for(var j=0;j<refs.length;j++){
  115. _v =model.getValue("/root/datagrid1/WgtList_Row["+datagrid1.selectedRow(i)+"]/"+refs[j]);
  116. jsonDatas +="'"+refs[j]+"':'"+_v+"',";
  117. }
  118. jsonDatas = jsonDatas.substring(0,jsonDatas.length-1);
  119. jsonDatas += "},";
  120. }
  121. jsonDatas=jsonDatas.substring(0,jsonDatas.length-1);
  122. jsonDatas += "]";
  123. commonOuterExcel('UIG100001',datagrid1.caption,colRef,jsonDatas,'UIG100001-service','',input_outType.value);
  124. }
  125. ]]>
  126. </script>
  127. </button>
  128. </xhtml:body>
  129. </xhtml:html>