dc660a158be61cd36da1d910c3a4c508d50bfea3.svn-base 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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[炼钢作业 >> 板坯库管理 >> 板坯新增与明细查询(UIG020063)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <grid/>
  12. <formData>
  13. <SLAB_NO/>
  14. </formData>
  15. <resData/>
  16. <reqData/>
  17. <initResult/>
  18. <totalData>
  19. <slabCnt/>
  20. <slabWgt/>
  21. </totalData>
  22. <codeData/>
  23. <initData>
  24. <LG_CD>F01002,F01002,E01010,E01007,D01003,D01001,G04001,B01136,E01002,A01004,G03004,G03004</LG_CD>
  25. </initData>
  26. <combData/>
  27. <fwdData>
  28. <UID010031>
  29. <ORD_NO/>
  30. <ORD_SEQ/>
  31. <URL/>
  32. </UID010031>
  33. </fwdData>
  34. </root>
  35. </instance>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. // initPage();
  39. ]]>
  40. </script>
  41. </model>
  42. <script type="javascript" src="../../js/boaCommon.js"/>
  43. <script type="javascript" src="../../js/boaMsg.js"/>
  44. <script type="javascript" src="../../js/mesCommon.js"/>
  45. <script type="javascript">
  46. <![CDATA[
  47. function excelExport(){
  48. return datagrid1;
  49. }
  50. // function initPage(){
  51. //
  52. // commSendReq("/root/initData");
  53. // commSubmit("UIGCOMMCODE-service","find","glueAction.do");
  54. // model.copyNode("/root/codeData","/root/resData");
  55. // commSendReq("root/reqData");
  56. //
  57. // commSubmit("UIG04COMBOX-service","stlSch","glueAction.do");
  58. // model.copyNode("/root/combData","/root/resData");
  59. // model.refresh();
  60. // }
  61. function find()
  62. {
  63. // if(input1.value == "")
  64. // {
  65. // window.alert("请输入板坯号进行查询!" , "提示");
  66. // return;
  67. // }
  68. commSendReq("/root/formData");
  69. commSubmit("UIG050022-service","find","glueAction.do");
  70. commAppendData("/root/grid/SLAB_YARD_INFO_RESULT_VO","/root/resData/SLAB_YARD_INFO_RESULT_VO");
  71. // var slabCnt = 0;
  72. // var slabWgt = 0;
  73. // datagrid1.refresh();
  74. // for(var i = 1 ; i < datagrid1.rows-1 ; i++){
  75. // slabCnt = slabCnt + 1;
  76. // slabWgt = slabWgt + parseFloat(datagrid1.valueMatrix(i+1,datagrid1.colRef("SLAB_WGT")));
  77. //
  78. // }
  79. //model.setValue("/root/totalData/slabCnt",slabCnt);
  80. //model.setValue("/root/totalData/slabWgt",slabWgt/1000);
  81. //output1.refresh();
  82. //output2.refresh();
  83. datagrid1.rebuildStyle();
  84. datagrid1.refresh();
  85. // model.setValue("/root/totalData/slabCnt",slabCnt);
  86. // model.setValue("/root/totalData/slabWgt",slabWgt/1000);
  87. // output1.refresh();
  88. // output2.refresh();
  89. // model.refresh();
  90. }
  91. function save(){
  92. //整个表格提交,这里只提供保存数据的方法
  93. model1.removenode("/root/reqData");
  94. model1.makeNode("/root/reqData");
  95. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  96. commSubmit("UIG050022-service","save","glueAction.do");
  97. model.refresh();
  98. // }
  99. //find();
  100. }
  101. // function fowardUID010031(gridID) {
  102. // if(gridID.col == gridID.colRef("INGR_YN")) {
  103. // model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
  104. // model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
  105. // model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
  106. // var java = window.parent.javaScript;
  107. // java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
  108. // }
  109. // }
  110. function commElearDate(ldate){
  111. ldate =(typeof ldate == 'string')? Number(ldate) : ldate;
  112. if(ldate == 0)ldate = 10000; //全部
  113. var curDate = "";
  114. var d = new Date;
  115. d.setDate(d.getDate( ) + ldate);
  116. var monString = (d.getMonth() + 1)+"";
  117. var dateString = d.getDate()+"";
  118. if(monString.length == 1){
  119. monString = "0" + monString;
  120. }
  121. if(dateString.length == 1){
  122. dateString = "0"+ dateString;
  123. }
  124. curDate += d.getYear();
  125. curDate += monString;
  126. curDate += dateString;
  127. return curDate;
  128. }
  129. ]]>
  130. </script>
  131. </xhtml:head>
  132. <xhtml:body guideline="1,960;2,620;2,619;2,619;">
  133. <caption id="caption2" class="cell" style="left:20px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; ">板 坯 号</caption>
  134. <input id="input1" ref="/root/formData/SLAB_NO" style="left:80px; top:10px; width:85px; height:20px; "/>
  135. <datagrid id="datagrid1" nodeset="/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row" visibility="visible" caption="选择^称重序号^板坯号^厚^宽^长^重量^理论重量|选择^称重序号^板坯号^厚^宽^长^重量^理论重量" colsep="^" colwidth="63, 100, 100, 68, 73, 69, 84, 100" explorerbar="sortshow" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:1px; top:70px; width:959px; height:470px; ">
  136. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  137. <col editable="true" ref="SEQ_NO" type="input"/>
  138. <col editable="true" ref="BILLETNO" type="input"/>
  139. <col editable="true" ref="THICKNESS" type="input"/>
  140. <col editable="true" ref="WIDTH" type="input"/>
  141. <col editable="true" ref="LENGTH" type="input"/>
  142. <col editable="true" ref="WIGHT" type="input"/>
  143. <col editable="false" ref="THEORY_WEIGHT" type="input"/>
  144. <script type="javascript" ev:event="onclick">
  145. <![CDATA[
  146. // fowardUID010031(datagrid1);
  147. // ]]>
  148. </script>
  149. </datagrid>
  150. <caption id="caption9" class="cell" style="left:180px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">块数合计</caption>
  151. <caption id="caption10" class="cell" style="left:315px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">重量合计</caption>
  152. <output id="output1" ref="/root/totalData/slabCnt" style="left:250px; top:10px; width:40px; height:20px; text-align:center; "/>
  153. <output id="output2" ref="/root/totalData/slabWgt" style="left:380px; top:10px; width:65px; height:20px; text-align:center; "/>
  154. <caption id="caption11" style="left:290px; top:10px; width:20px; height:20px; font-weight:bold; ">块</caption>
  155. <caption id="caption12" style="left:455px; top:10px; width:20px; height:20px; font-weight:bold; ">吨</caption>
  156. <line id="line2" style="x1:240px; y1:30px; x2:290px; y2:30px; "/>
  157. <line id="line3" style="x1:375px; y1:30px; x2:455px; y2:30px; "/>
  158. <script type="javascript" ev:event="onkeypress">
  159. <![CDATA[
  160. if(event.keyCode == 13){
  161. find();
  162. }
  163. ]]>
  164. </script>
  165. <line id="line5" style="x1:973px; y1:0px; x2:978px; y2:0px; "/>
  166. <caption id="caption26" class="cell" visibility="hidden" style="left:495px; top:195px; width:82px; height:20px; font-weight:bold; border-color:#000000; ">判定滞后时间</caption>
  167. <input id="input6" ref="/root/formData/IGR_LAG_FROM_DTIME" visibility="hidden" style="left:575px; top:195px; width:63px; height:20px; "/>
  168. <caption id="caption27" class="cell" visibility="hidden" style="left:495px; top:220px; width:86px; height:20px; font-weight:bold; border-color:#000000; ">切割滞后时间</caption>
  169. <input id="input7" ref="/root/formData/CUT_LAG_FROM_DTIME" visibility="hidden" style="left:580px; top:220px; width:63px; height:20px; "/>
  170. <input id="input8" ref="/root/formData/IGR_LAG_TO_DTIME" visibility="hidden" style="left:640px; top:195px; width:63px; height:20px; "/>
  171. <input id="input9" ref="/root/formData/CUT_LAG_TO_DTIME" visibility="hidden" style="left:645px; top:220px; width:58px; height:20px; "/>
  172. <select1 id="combo22" ref="/root/formData/PRD_TY" visibility="hidden" appearance="minimal" style="left:710px; top:210px; width:85px; height:20px; ">
  173. <choices>
  174. <itemset nodeset="/root/codeData/COMM_CODE_RESULT_VO/COMM_CODE_RESULT_Row[LG_CD = 'A01004' or LG_CD ='A']">
  175. <label ref="SM_CFNM"/>
  176. <value ref="SM_CD"/>
  177. </itemset>
  178. </choices>
  179. <script type="javascript" ev:event="xforms-value-changed">
  180. <![CDATA[
  181. model.setValue("/root/formData/CMT_DLIV_DEVLMT_DATE",commElearDate(model.getValue("/root/formData/CMT_DLIV_DEVLMT_DATE_temp")));
  182. ]]>
  183. </script>
  184. </select1>
  185. <button id="button1" visibility="visible" style="left:575px; top:10px; width:70px; height:20px; background-color:#ff9900; ">
  186. <caption>查询</caption>
  187. <script type="javascript" ev:event="onclick">
  188. <![CDATA[
  189. find();
  190. ]]>
  191. </script>
  192. </button>
  193. <button id="button2" visibility="visible" style="left:655px; top:10px; width:65px; height:20px; background-color:#ff9900; ">
  194. <caption>添加</caption>
  195. <script type="javascript" ev:event="onclick">
  196. <![CDATA[
  197. save();
  198. ]]>
  199. </script>
  200. </button>
  201. <button id="button3" visibility="visible" style="left:490px; top:10px; width:60px; height:20px; color:#000000; background-color:#c0c0c0; ">
  202. <caption>行增加</caption>
  203. <script type="javascript" ev:event="onclick">
  204. <![CDATA[
  205. //点击按钮,在表格的选中位置增加行
  206. var rw;
  207. for(var i=0;i<=datagrid1.selectedRows;i++){
  208. rw = datagrid1.selectedRow(i);
  209. if(Number(rw) == Number(datagrid1.Rows-1)){
  210. //如果选中的是最后一行,在后面新加一行
  211. datagrid1.addRow();
  212. copyGrid("datagrid1");
  213. }else{
  214. //如果不是最后一行的话,在选中行的下面加入一行
  215. datagrid1.insertRow(Number(rw+1));
  216. }
  217. }
  218. ]]>
  219. </script>
  220. </button>
  221. </xhtml:body>
  222. </xhtml:html>