UIB020310.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. <StDate/>
  14. <EndDate/>
  15. <StlGrd/>
  16. <STCharge/>
  17. <ENDCharge/>
  18. </formData>
  19. <reqData/>
  20. <resData/>
  21. <datagrid1/>
  22. <comboData>
  23. <Charge/>
  24. <StlGrd/>
  25. </comboData>
  26. <headLine>
  27. <SlabResult_VO>
  28. <SlabResult_Row>
  29. <ROWNUM>热连轧厂生产检验班报表</ROWNUM>
  30. <SLAB_NO/>
  31. <SLAB_THK/>
  32. <SLAB_WTH/>
  33. <SLAB_LEN/>
  34. <SLAB_WGT/>
  35. <STL_GRD/>
  36. <CRK_CD1/>
  37. <EXTSHAPE_DEC_DTIME/>
  38. <EXTSHAPE_DEC_EMP_ID/>
  39. <GR_SHIFT/>
  40. <GR_GROUP/>
  41. </SlabResult_Row>
  42. <SlabResult_Row>
  43. <ROWNUM>日期</ROWNUM>
  44. <SLAB_NO/>
  45. <SLAB_THK/>
  46. <SLAB_WTH/>
  47. <SLAB_LEN/>
  48. <SLAB_WGT/>
  49. <STL_GRD/>
  50. <CRK_CD1/>
  51. <EXTSHAPE_DEC_DTIME/>
  52. <EXTSHAPE_DEC_EMP_ID/>
  53. <GR_SHIFT/>
  54. <GR_GROUP>班组 &amp; 班次</GR_GROUP>
  55. </SlabResult_Row>
  56. </SlabResult_VO>
  57. </headLine>
  58. <subTitle>
  59. <SlabResult_VO>
  60. <SlabResult_Row>
  61. <ROWNUM>序号</ROWNUM>
  62. <SLAB_NO>板坯号</SLAB_NO>
  63. <SLAB_THK>厚度</SLAB_THK>
  64. <SLAB_WTH>宽度</SLAB_WTH>
  65. <SLAB_LEN>长度</SLAB_LEN>
  66. <SLAB_WGT>重量(吨)</SLAB_WGT>
  67. <STL_GRD>钢号</STL_GRD>
  68. <CRK_CD1>不合格类别</CRK_CD1>
  69. <EXTSHAPE_DEC_DTIME>板坯判定日</EXTSHAPE_DEC_DTIME>
  70. <EXTSHAPE_DEC_EMP_ID>板坯判定人</EXTSHAPE_DEC_EMP_ID>
  71. <GR_SHIFT>检验班次</GR_SHIFT>
  72. <GR_GROUP>检验班组</GR_GROUP>
  73. </SlabResult_Row>
  74. </SlabResult_VO>
  75. </subTitle>
  76. </root>
  77. </instance>
  78. <script type="javascript" ev:event="xforms-ready">
  79. <![CDATA[
  80. if(window.parent==null) Init();
  81. ]]>
  82. </script>
  83. </model>
  84. <script type="javascript" src="../../js/boaCommon.js"/>
  85. <script type="javascript" src="../../js/b01.js"/>
  86. <script type="javascript">
  87. <![CDATA[
  88. function Init(node)
  89. {
  90. model.removenode("/root/reqData");
  91. model.makeNode("/root/reqData");
  92. commSubmit("UIB020310-service", "findC", "glueAction.do");
  93. model.copyNode("/root/comboData/Charge","/root/resData/ChargeResult_VO");
  94. model.copyNode("/root/comboData/StlGrd","/root/resData/StlGrdResult_VO");
  95. model.makeValue("/root/formData/StDate",model.getValue("/root/resData/DateResult_VO/DateResult_Row/F_DATE"));
  96. model.makeValue("/root/formData/EndDate",model.getValue("/root/resData/DateResult_VO/DateResult_Row/T_DATE"));
  97. model.refresh();
  98. }
  99. function find()
  100. {
  101. model.removenode("/root/reqData");
  102. model.makeNode("/root/reqData");
  103. commSendReq("/root/formData");
  104. commSubmit("UIB020310-service", "find", "glueAction.do");
  105. commAppendData("/root/datagrid1/SlabResult_VO" ,"/root/headLine/SlabResult_VO" );
  106. var iSubTitRows = Number(model.getXPathValue("count(/root/subTitle)") );
  107. for(var i = 1; i <= iSubTitRows ; i++) {
  108. model.duplicate("/root/datagrid1/SlabResult_VO" ,"/root/subTitle/SlabResult_VO/SlabResult_Row["+ i +"]" );
  109. }
  110. var iQueryRows = Number(model.getXPathValue("count(/root/resData/SlabResult_VO/SlabResult_Row)" ));
  111. for(var i = 1; i <= iQueryRows ; i++) {
  112. model.duplicate("/root/datagrid1/SlabResult_VO" ,"/root/resData/SlabResult_VO/SlabResult_Row["+ i +"]" );
  113. }
  114. model.refresh();
  115. var iHiddenRows = Number(model.getXPathValue("count(/root/headLine/SlabResult_VO/SlabResult_Row)")) + iSubTitRows + (datagrid1.fixedRows - 1);
  116. for(var i = datagrid1.fixedRows; i <= iHiddenRows ; i++) {
  117. datagrid1.rowHidden(i) = true;
  118. }
  119. datagrid1.isSelected(iHiddenRows + 1) = true;
  120. }
  121. function excelExport()
  122. {
  123. saveExcelScript(datagrid1, "Sheet1");
  124. }
  125. function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
  126. var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
  127. if ( sExcelName == "" ) {
  128. return;
  129. }
  130. // var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
  131. var sCSVName = sExcelName +".csv";
  132. // alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
  133. eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true);
  134. ObjTFExcel.launchNewInstance(0); //Execute EXCEL
  135. ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
  136. ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
  137. //Setting up EXCEL Layout.
  138. var nRows = sDGridName.rows - 1;
  139. var nCols = sDGridName.cols;
  140. //All of the range
  141. ObjTFExcel.fontcolor( 01, 01, nRows, nCols ) = "#000000" ;
  142. ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
  143. //Header
  144. //Line 1 : Sheet Title
  145. ObjTFExcel.rowheight( 01 ) = 30 ;
  146. ObjTFExcel.bold ( 01, 01, 01, nCols ) = true ;
  147. ObjTFExcel.fontsize ( 01, 01, 01, nCols ) = 14 ;
  148. ObjTFExcel.underline( 01, 01, 01, nCols ) = 3 ;
  149. ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
  150. ObjTFExcel.valign ( 01, 01, 01, nCols ) ="top" ;
  151. ObjTFExcel.mergeCell( 01, 01, 01, nCols ) ;
  152. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  153. //Line 2 : Date
  154. ObjTFExcel.rowheight( 02 ) = 18 ;
  155. ObjTFExcel.bold ( 02, 01, 02, 01 ) = true ;
  156. ObjTFExcel.fontsize ( 02, 01, 02, 01 ) = 9 ;
  157. ObjTFExcel.underline( 02, 01, 02, 01 ) = 0 ;
  158. ObjTFExcel.halign ( 02, 01, 02, 01 ) ="left" ;
  159. ObjTFExcel.valign ( 02, 01, 02, 01 ) ="middle" ;
  160. ObjTFExcel.mergeCell( 02, 01, 02, 03 ) ;
  161. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  162. //Line 2 : Work-Group & Work-Part
  163. ObjTFExcel.rowHeight( 02 ) = 18 ;
  164. ObjTFExcel.bold ( 02, nCols - 2, 02, nCols ) = true ;
  165. ObjTFExcel.fontsize ( 02, nCols - 2, 02, nCols ) = 9 ;
  166. ObjTFExcel.underline( 02, nCols - 2, 02, nCols ) = 0 ;
  167. ObjTFExcel.halign ( 02, nCols - 2, 02, nCols ) ="right" ;
  168. ObjTFExcel.valign ( 02, nCols - 2, 02, nCols ) ="middle" ;
  169. ObjTFExcel.mergeCell( 02, nCols - 2, 02, nCols ) ;
  170. // ObjTFExcel.colwidth ( 01 ) = 100 ;
  171. //Query-Results Data
  172. var iRow = 3; // Header Line + 1;
  173. // ObjTFExcel.cellBgColor (iRow, 01, iRow , nCols ) = "#EEEEEE"; // Undefined...
  174. ObjTFExcel.setBorderColor(iRow, 01, nRows, nCols, "#000000");
  175. for(var i = 3; i <= nRows; i++ ) {
  176. ObjTFExcel.rowHeight( i ) = 18;
  177. }
  178. ObjTFExcel.bold (iRow, 01, nRows, nCols ) = false ;
  179. ObjTFExcel.fontsize (iRow, 01, nRows, nCols ) = 9 ;
  180. ObjTFExcel.underline(iRow, 01, nRows, nCols ) = 0 ;
  181. ObjTFExcel.valign (iRow, 01, nRows, nCols ) ="middle" ;
  182. ObjTFExcel.halign (iRow, 01, nRows, 01 ) ="center" ; //序号
  183. ObjTFExcel.colwidth ( 01 ) = 8 ;
  184. ObjTFExcel.halign (iRow, 02, nRows, 02 ) ="left" ; //板坯号
  185. ObjTFExcel.colwidth ( 02 ) = 20 ;
  186. ObjTFExcel.halign (iRow, 03, nRows, 03 ) ="left" ; //厚度
  187. ObjTFExcel.colwidth ( 03 ) = 20 ;
  188. ObjTFExcel.halign (iRow, 04, nRows, 04 ) ="left" ; //宽度
  189. ObjTFExcel.colwidth ( 04 ) = 20 ;
  190. ObjTFExcel.halign (iRow, 05, nRows, 05 ) ="left" ; //长度
  191. ObjTFExcel.colwidth ( 05 ) = 20 ;
  192. ObjTFExcel.halign (iRow, 06, nRows, 06 ) ="left" ; //重量(吨)
  193. ObjTFExcel.colwidth ( 06 ) = 20 ;
  194. ObjTFExcel.halign (iRow, 07, nRows, 07 ) ="left" ; //钢号
  195. ObjTFExcel.colwidth ( 07 ) = 20 ;
  196. ObjTFExcel.halign (iRow, 08, nRows, 08 ) ="center" ; //不合格类别
  197. ObjTFExcel.colwidth ( 08 ) = 12 ;
  198. ObjTFExcel.halign (iRow, 09, nRows, 09 ) ="right" ; //板坯判定日
  199. ObjTFExcel.colwidth ( 09 ) = 20 ;
  200. ObjTFExcel.setFormat(iRow, 09, nRows, 09, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  201. ObjTFExcel.halign (iRow, 10, nRows, 10 ) ="center" ; //板坯判定人
  202. ObjTFExcel.colwidth ( 10 ) = 10 ;
  203. ObjTFExcel.halign (iRow, 11, nRows, 11 ) ="left" ; //检验班次
  204. ObjTFExcel.colwidth ( 11 ) = 8 ;
  205. ObjTFExcel.halign (iRow, 12, nRows, 12 ) ="right" ; //检验班组
  206. ObjTFExcel.colwidth ( 12 ) = 8 ;
  207. /*ObjTFExcel.halign (iRow, 13, nRows, 13 ) ="left" ; //最终修改人
  208. ObjTFExcel.colwidth ( 13 ) = 12 ;
  209. ObjTFExcel.halign (iRow, 14, nRows, 14 ) ="center" ; //最终修改时间
  210. ObjTFExcel.colwidth ( 14 ) = 20 ;
  211. ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  212. */
  213. ObjTFExcel.sheetName(1) = sExcelSheetName;
  214. ObjTFExcel.save(sExcelName); //Saving EXCEL
  215. ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
  216. window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
  217. }
  218. ]]>
  219. </script>
  220. </xhtml:head>
  221. <xhtml:body pagewidth="980" pageheight="620">
  222. <caption id="caption13" style="left:0px; top:600px; width:980px; height:20px; background-color:#ccccff; border-top-color:#ffffff; border-style:solid; "/>
  223. <caption id="caption2" class="cell" style="left:0px; top:5px; width:100px; height:20px; background-color:#ccffcc; border-color:#000000; border-style:solid; ">板坯判定日</caption>
  224. <input id="input2" ref="/root/formData/StDate" inputtype="date" style="left:105px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  225. <input id="input1" ref="/root/formData/EndDate" inputtype="date" style="left:215px; top:5px; width:100px; height:20px; border-color:#000000; border-style:solid; "/>
  226. <caption id="caption1" style="left:203px; top:10px; width:20px; height:15px; ">~</caption>
  227. <caption id="caption3" class="cell" style="left:330px; top:5px; width:80px; height:20px; background-color:#ccffcc; border-color:#000000; border-style:solid; ">钢号</caption>
  228. <select1 id="combo2" ref="/root/formData/StlGrd" appearance="minimal" editmode="inputsearch" style="left:415px; top:5px; width:95px; height:20px; border-color:#000000; border-style:solid; ">
  229. <choices>
  230. <itemset nodeset="/root/comboData/StlGrd/StlGrdResult_Row">
  231. <label ref="STL_GRD"/>
  232. <value ref="STL_GRD"/>
  233. </itemset>
  234. </choices>
  235. </select1>
  236. <caption id="caption4" class="cell" style="left:525px; top:5px; width:80px; height:20px; background-color:#ccffcc; border-color:#000000; border-style:solid; ">炉次号</caption>
  237. <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  238. <line id="line3" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  239. <datagrid id="datagrid1" nodeset="/root/datagrid1/SlabResult_VO/SlabResult_Row" allowuserresize="true" caption="序号^板坯号^厚度^宽度^长度^重量(吨)^钢号^不合格类别^板坯判定日^板坯判定人^检验班次^检验班组|序号^板坯号^厚度^宽度^长度^重量(吨)^钢号^不合格类别^板坯判定日^板坯判定人^检验班次^检验班组" colsep="^" colwidth="30, 134, 60, 60, 60, 68, 100, 85, 105, 85, 90, 100" defaultrows="30" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="free" style="left:0px; top:40px; width:980px; height:580px; border-color:#000000; border-style:solid; ">
  240. <col ref="ROWNUM"/>
  241. <col ref="SLAB_NO"/>
  242. <col ref="SLAB_THK"/>
  243. <col ref="SLAB_WTH"/>
  244. <col ref="SLAB_LEN"/>
  245. <col ref="SLAB_WGT"/>
  246. <col ref="STL_GRD"/>
  247. <col ref="CRK_CD1"/>
  248. <col ref="EXTSHAPE_DEC_DTIME"/>
  249. <col ref="EXTSHAPE_DEC_EMP_ID"/>
  250. <col ref="GR_SHIFT"/>
  251. <col ref="GR_GROUP"/>
  252. </datagrid>
  253. <button id="button1" visibility="hidden" style="left:765px; top:5px; width:100px; height:20px; ">
  254. <caption>find</caption>
  255. <script type="javascript" ev:event="onclick">
  256. <![CDATA[
  257. find();
  258. ]]>
  259. </script>
  260. </button>
  261. <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:820px; top:5px; width:1px; height:1px; "/>
  262. <button id="button3" visibility="hidden" style="left:870px; top:5px; width:90px; height:21px; background-color:#c0c0c0; ">
  263. <caption>EXCEL</caption>
  264. <script type="javascript" ev:event="DOMActivate">
  265. <![CDATA[
  266. saveExcelScript(datagrid1, "Sheet1");
  267. ]]>
  268. </script>
  269. </button>
  270. <input id="input4" ref="/root/formData/STCharge" style="left:610px; top:5px; width:70px; height:20px; ">
  271. <script type="javascript" ev:event="onkeydown">
  272. <![CDATA[
  273. if(event.keyCode == 13)
  274. {
  275. model.setFocus("" , true);
  276. model.setFocus("input4" , true);
  277. find();
  278. }
  279. ]]>
  280. </script>
  281. </input>
  282. <input id="input3" ref="/root/formData/ENDCharge" style="left:690px; top:5px; width:70px; height:20px; ">
  283. <script type="javascript" ev:event="onkeydown">
  284. <![CDATA[
  285. if(event.keyCode == 13)
  286. {
  287. model.setFocus("" , true);
  288. model.setFocus("input4" , true);
  289. find();
  290. }
  291. ]]>
  292. </script>
  293. </input>
  294. <caption id="caption5" style="left:678px; top:10px; width:20px; height:15px; ">~</caption>
  295. </xhtml:body>
  296. </xhtml:html>