9d5e0735924a084b447d1f4c7b10cec96b4043d8.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.css" ?>
  3. <?xml-stylesheet type="text/css" href="../css/bCommon.css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>
  7. <![CDATA[统计管理>>现况分析>>热连轧统计月报]]>
  8. </xhtml:title>
  9. <model id="model1">
  10. <instance id="instance1">
  11. <root xmlns="">
  12. <formData>
  13. <DATE/>
  14. </formData>
  15. <reqData/>
  16. <resData/>
  17. <datagrid1/>
  18. <comboData>
  19. <Charge/>
  20. <StlGrd/>
  21. </comboData>
  22. <headLine>
  23. <SlabResult_VO>
  24. <SlabResult_Row>
  25. <ROWNUM>热连轧厂生产检验班报表</ROWNUM>
  26. <SLAB_NO/>
  27. <SLAB_THK/>
  28. <SLAB_WTH/>
  29. <SLAB_LEN/>
  30. <SLAB_WGT/>
  31. <STL_GRD/>
  32. <CRK_CD1/>
  33. <EXTSHAPE_DEC_DTIME/>
  34. <EXTSHAPE_DEC_EMP_ID/>
  35. <GR_SHIFT/>
  36. <GR_GROUP/>
  37. </SlabResult_Row>
  38. <SlabResult_Row>
  39. <ROWNUM>日期</ROWNUM>
  40. <SLAB_NO/>
  41. <SLAB_THK/>
  42. <SLAB_WTH/>
  43. <SLAB_LEN/>
  44. <SLAB_WGT/>
  45. <STL_GRD/>
  46. <CRK_CD1/>
  47. <EXTSHAPE_DEC_DTIME/>
  48. <EXTSHAPE_DEC_EMP_ID/>
  49. <GR_SHIFT/>
  50. <GR_GROUP>班组 &amp; 班次</GR_GROUP>
  51. </SlabResult_Row>
  52. </SlabResult_VO>
  53. </headLine>
  54. <subTitle>
  55. <SlabResult_VO>
  56. <SlabResult_Row>
  57. <ROWNUM>序号</ROWNUM>
  58. <SLAB_NO>板坯号</SLAB_NO>
  59. <SLAB_THK>厚度</SLAB_THK>
  60. <SLAB_WTH>宽度</SLAB_WTH>
  61. <SLAB_LEN>长度</SLAB_LEN>
  62. <SLAB_WGT>重量(吨)</SLAB_WGT>
  63. <STL_GRD>钢号</STL_GRD>
  64. <CRK_CD1>不合格类别</CRK_CD1>
  65. <EXTSHAPE_DEC_DTIME>板坯判定日</EXTSHAPE_DEC_DTIME>
  66. <EXTSHAPE_DEC_EMP_ID>板坯判定人</EXTSHAPE_DEC_EMP_ID>
  67. <GR_SHIFT>检验班次</GR_SHIFT>
  68. <GR_GROUP>检验班组</GR_GROUP>
  69. </SlabResult_Row>
  70. </SlabResult_VO>
  71. </subTitle>
  72. </root>
  73. </instance>
  74. <script type="javascript" ev:event="xforms-ready">
  75. <![CDATA[
  76. if(window.parent==null) Init();
  77. ]]>
  78. </script>
  79. </model>
  80. <script type="javascript" src="../../js/boaCommon.js"/>
  81. <script type="javascript" src="../../js/b01.js"/>
  82. <script type="javascript">
  83. <![CDATA[
  84. function Init(node)
  85. {
  86. input1.value = commCurDate();
  87. /*model.removenode("/root/reqData");
  88. model.makeNode("/root/reqData");
  89. commSubmit("UIB020310-service", "findC", "glueAction.do");
  90. model.copyNode("/root/comboData/Charge","/root/resData/ChargeResult_VO");
  91. model.copyNode("/root/comboData/StlGrd","/root/resData/StlGrdResult_VO");
  92. model.makeValue("/root/formData/StDate",model.getValue("/root/resData/DateResult_VO/DateResult_Row/F_DATE"));
  93. model.makeValue("/root/formData/EndDate",model.getValue("/root/resData/DateResult_VO/DateResult_Row/T_DATE"));
  94. model.refresh();*/
  95. }
  96. function find()
  97. {
  98. model.removenode("/root/reqData");
  99. model.makeNode("/root/reqData");
  100. commSendReq("/root/formData");
  101. commSubmit("UIB030040-service", "success", "glueAction.do");
  102. model.copyNode("/root/datagrid1" , "/root/resData/ListResult_0_VO");
  103. model.refresh();
  104. }
  105. function excelExport()
  106. {
  107. saveExcelScript(datagrid1, "Sheet1");
  108. }
  109. function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
  110. var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
  111. if ( sExcelName == "" ) {
  112. return;
  113. }
  114. // var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
  115. var sCSVName = sExcelName +".csv";
  116. // alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
  117. eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true);
  118. ObjTFExcel.launchNewInstance(0); //Execute EXCEL
  119. ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
  120. ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
  121. //Setting up EXCEL Layout.
  122. var nRows = sDGridName.rows - 1;
  123. var nCols = sDGridName.cols;
  124. //All of the range
  125. ObjTFExcel.fontcolor( 01, 01, nRows, nCols ) = "#000000" ;
  126. ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
  127. //Header
  128. //Line 1 : Sheet Title
  129. ObjTFExcel.rowheight( 01 ) = 30 ;
  130. ObjTFExcel.bold ( 01, 01, 01, nCols ) = true ;
  131. ObjTFExcel.fontsize ( 01, 01, 01, nCols ) = 14 ;
  132. ObjTFExcel.underline( 01, 01, 01, nCols ) = 3 ;
  133. ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
  134. ObjTFExcel.valign ( 01, 01, 01, nCols ) ="top" ;
  135. ObjTFExcel.mergeCell( 01, 01, 01, nCols ) ;
  136. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  137. //Line 2 : Date
  138. ObjTFExcel.rowheight( 02 ) = 18 ;
  139. ObjTFExcel.bold ( 02, 01, 02, 01 ) = true ;
  140. ObjTFExcel.fontsize ( 02, 01, 02, 01 ) = 9 ;
  141. ObjTFExcel.underline( 02, 01, 02, 01 ) = 0 ;
  142. ObjTFExcel.halign ( 02, 01, 02, 01 ) ="left" ;
  143. ObjTFExcel.valign ( 02, 01, 02, 01 ) ="middle" ;
  144. ObjTFExcel.mergeCell( 02, 01, 02, 03 ) ;
  145. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  146. //Line 2 : Work-Group & Work-Part
  147. ObjTFExcel.rowHeight( 02 ) = 18 ;
  148. ObjTFExcel.bold ( 02, nCols - 2, 02, nCols ) = true ;
  149. ObjTFExcel.fontsize ( 02, nCols - 2, 02, nCols ) = 9 ;
  150. ObjTFExcel.underline( 02, nCols - 2, 02, nCols ) = 0 ;
  151. ObjTFExcel.halign ( 02, nCols - 2, 02, nCols ) ="right" ;
  152. ObjTFExcel.valign ( 02, nCols - 2, 02, nCols ) ="middle" ;
  153. ObjTFExcel.mergeCell( 02, nCols - 2, 02, nCols ) ;
  154. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  155. //Query-Results Data
  156. var iRow = 3; // Header Line + 1;
  157. // ObjTFExcel.cellBgColor (iRow, 01, iRow , nCols ) = "#EEEEEE"; // Undefined...
  158. ObjTFExcel.setBorderColor(iRow, 01, nRows, nCols, "#000000");
  159. for(var i = 3; i <= nRows; i++ ) {
  160. ObjTFExcel.rowHeight( i ) = 18;
  161. }
  162. ObjTFExcel.bold (iRow, 01, nRows, nCols ) = false ;
  163. ObjTFExcel.fontsize (iRow, 01, nRows, nCols ) = 9 ;
  164. ObjTFExcel.underline(iRow, 01, nRows, nCols ) = 0 ;
  165. ObjTFExcel.valign (iRow, 01, nRows, nCols ) ="middle" ;
  166. ObjTFExcel.halign (iRow, 01, nRows, 01 ) ="center" ; //序号
  167. ObjTFExcel.colwidth ( 01 ) = 8 ;
  168. ObjTFExcel.halign (iRow, 02, nRows, 02 ) ="left" ; //板坯号
  169. ObjTFExcel.colwidth ( 02 ) = 20 ;
  170. ObjTFExcel.halign (iRow, 03, nRows, 03 ) ="left" ; //厚度
  171. ObjTFExcel.colwidth ( 03 ) = 20 ;
  172. ObjTFExcel.halign (iRow, 04, nRows, 04 ) ="left" ; //宽度
  173. ObjTFExcel.colwidth ( 04 ) = 20 ;
  174. ObjTFExcel.halign (iRow, 05, nRows, 05 ) ="left" ; //长度
  175. ObjTFExcel.colwidth ( 05 ) = 20 ;
  176. ObjTFExcel.halign (iRow, 06, nRows, 06 ) ="left" ; //重量(吨)
  177. ObjTFExcel.colwidth ( 06 ) = 20 ;
  178. ObjTFExcel.halign (iRow, 07, nRows, 07 ) ="left" ; //钢号
  179. ObjTFExcel.colwidth ( 07 ) = 20 ;
  180. ObjTFExcel.halign (iRow, 08, nRows, 08 ) ="center" ; //不合格类别
  181. ObjTFExcel.colwidth ( 08 ) = 12 ;
  182. ObjTFExcel.halign (iRow, 09, nRows, 09 ) ="right" ; //板坯判定日
  183. ObjTFExcel.colwidth ( 09 ) = 20 ;
  184. ObjTFExcel.setFormat(iRow, 09, nRows, 09, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  185. ObjTFExcel.halign (iRow, 10, nRows, 10 ) ="center" ; //板坯判定人
  186. ObjTFExcel.colwidth ( 10 ) = 10 ;
  187. ObjTFExcel.halign (iRow, 11, nRows, 11 ) ="left" ; //检验班次
  188. ObjTFExcel.colwidth ( 11 ) = 8 ;
  189. ObjTFExcel.halign (iRow, 12, nRows, 12 ) ="right" ; //检验班组
  190. ObjTFExcel.colwidth ( 12 ) = 8 ;
  191. /*ObjTFExcel.halign (iRow, 13, nRows, 13 ) ="left" ; //最终修改人
  192. ObjTFExcel.colwidth ( 13 ) = 12 ;
  193. ObjTFExcel.halign (iRow, 14, nRows, 14 ) ="center" ; //最终修改时间
  194. ObjTFExcel.colwidth ( 14 ) = 20 ;
  195. ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  196. */
  197. ObjTFExcel.sheetName(1) = sExcelSheetName;
  198. ObjTFExcel.save(sExcelName); //Saving EXCEL
  199. ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
  200. window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
  201. }
  202. ]]>
  203. </script>
  204. </xhtml:head>
  205. <xhtml:body pagewidth="980" pageheight="620">
  206. <caption id="caption4" class="cell" style="left:0px; top:5px; width:80px; height:20px; background-color:#ccffcc; border-color:#000000; border-style:solid; ">日期</caption>
  207. <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  208. <line id="line3" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  209. <datagrid id="datagrid1" nodeset="/root/datagrid1/ListResult_0_Row" allowuserresize="true" caption="产地^坯料^计划牌号^原料^检验量^复样量^成材率^合格量^品种量^工艺次^工艺次^工艺次^工艺次^工艺次^工艺次^工艺次^工艺次^工艺次^钢质次^钢质次^钢质次^钢质次^钢质次^钢质次^钢质改判^钢质改判^钢质改判^钢质改判^钢质改判^钢质改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判^工艺改判|产地^坯料^计划牌号^原料^检验量^复样量^成材率^合格量^品种量^划伤^麻点^瓢曲^折叠^废卷^厚度出格^性能次^其他^累计^夹杂^裂纹^分层^气泡^其它^累计^夹杂^裂纹^分层^气泡^其他^累计^长度^宽度^厚度^折叠^瓢曲^划伤^热轧降级^凹坑^其他^累计" colsep="^" colwidth="70, 50, 63, 60, 60, 60, 64, 100, 100, 50, 50, 50, 50, 50, 59, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50" defaultrows="30" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="free" style="left:0px; top:30px; width:980px; height:590px; border-color:#000000; border-style:solid; ">
  210. <col ref="CD"/>
  211. <col ref="SLAB_THK"/>
  212. <col ref="SPEC_STL_GRD"/>
  213. <col ref="SLAB_WGT"/>
  214. <col/>
  215. <col ref="FYL"/>
  216. <col ref="CCL"/>
  217. <col ref="HGL"/>
  218. <col ref="PZL"/>
  219. <col ref="GYC_HUASHANG"/>
  220. <col ref="GYC_MADIAN"/>
  221. <col/>
  222. <col ref="GYC_ZHEDIE"/>
  223. <col ref="GYC_FEIPIN"/>
  224. <col ref="GYC_HOUDU"/>
  225. <col ref="GYC_XINGNENG"/>
  226. <col ref="GYC_QITA"/>
  227. <col ref="GYC_LEIJI"/>
  228. <col ref="GZC_JIAZA"/>
  229. <col ref="GZC_LIEHEN"/>
  230. <col ref="GZC_FENCENG"/>
  231. <col ref="GZC_QIPAO"/>
  232. <col ref="GZC_QITA"/>
  233. <col ref="GZC_LEIJI"/>
  234. <col ref="GZGP_JIAZA"/>
  235. <col ref="GZGP_LIEHEN"/>
  236. <col ref="GZGP_FENCENG"/>
  237. <col ref="GZGP_QIPAO"/>
  238. <col ref="GZGP_QITA"/>
  239. <col/>
  240. <col ref="GYGP_CHANGDU"/>
  241. <col ref="GYGP_KUANGDU"/>
  242. <col ref="GYGP_HOUDU"/>
  243. <col ref="GYGP_ZHEDIE"/>
  244. <col/>
  245. <col ref="GYGP_HUASHANG"/>
  246. <col ref="GYGP_XINGNENG"/>
  247. <col ref="GYGP_AOKENG"/>
  248. <col/>
  249. <col/>
  250. </datagrid>
  251. <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:820px; top:5px; width:1px; height:1px; "/>
  252. <button id="button3" visibility="hidden" style="left:890px; top:5px; width:90px; height:21px; background-color:#c0c0c0; ">
  253. <caption>EXCEL</caption>
  254. <script type="javascript" ev:event="DOMActivate">
  255. <![CDATA[
  256. saveExcelScript(datagrid1, "Sheet1");
  257. ]]>
  258. </script>
  259. </button>
  260. <input id="input1" ref="/root/formData/DATE" inputtype="date" format="yyyy-mm" style="left:85px; top:5px; width:100px; height:20px; "/>
  261. </xhtml:body>
  262. </xhtml:html>