UIB020060.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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[品质判定>>成分判定>>钢卷号成分实绩录入]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <COILNO/>
  13. </formData>
  14. <initData>
  15. <CombCoil_VO>
  16. <CombCoil_Row>
  17. </CombCoil_Row>
  18. </CombCoil_VO>
  19. </initData>
  20. <SlabInfo>
  21. <CoilComm_Row>
  22. <SLAB_NO/>
  23. <ORD_NO/>
  24. <SPEC_ABBSYM/>
  25. <ORD_USE_CD/>
  26. </CoilComm_Row>
  27. </SlabInfo>
  28. <datagrid1/>
  29. <datagrid2/>
  30. <datagrid3/>
  31. <datagrid4/>
  32. <datagrid5/>
  33. <tempData>
  34. <tempData1/>
  35. <tempData2/>
  36. <tempData3/>
  37. <tempData4/>
  38. <tempData5/>
  39. </tempData>
  40. </root>
  41. </instance>
  42. <script type="javascript" ev:event="xforms-ready">
  43. <![CDATA[
  44. if (window.parent == null) Init();
  45. ]]>
  46. </script>
  47. </model>
  48. <script type="javascript" src="../../js/boaCommon.js"/>
  49. <script type="javascript" src="../../js/b01.js"/>
  50. <script type="javascript">
  51. <![CDATA[
  52. //页面初始化函数(必须)
  53. function Init(node)
  54. {
  55. InitParams(node);
  56. datagrid1.colStatus(0)=false; //初始化时为非全选
  57. //钢卷号初始化
  58. commSubmit("UIB020060-service" , "success" , "glueAction.do");
  59. model.duplicate("/root/initData" , "/root/resData/CombCoil_VO");
  60. model.refresh();
  61. combo1.select(0);
  62. }
  63. function find()
  64. {
  65. model.removenode("/root/reqData");
  66. //板坯号、订单号、标准号、钢卷号等信息查询
  67. model.makeValue("/root/reqData/COILNO" , combo1.value.Trim() );
  68. commSubmit("UIB020060-service" , "findOrder" , "glueAction.do");
  69. model.copyNode("/root/SlabInfo" , "/root/resData/CoilComm_VO" );
  70. model.copyNode("/root/datagrid1" , "/root/resData/CoilInfo_VO");
  71. model.refresh();
  72. }
  73. function save()
  74. {
  75. model.removenode("/root/reqData");
  76. model.makeNode("/root/reqData");
  77. model.removenode("/root/tempData");
  78. model.makeNode("/root/tempData/tempData1");
  79. model.makeNode("/root/tempData/tempData2");
  80. model.makeNode("/root/tempData/tempData3");
  81. model.makeNode("/root/tempData/tempData4");
  82. model.makeNode("/root/tempData/tempData5");
  83. ///生成请求参数
  84. b01MultiUpdate(datagrid1,"/root/tempData/tempData1" ,"A", true, "rowStuts1");//获得表1中增加的记录
  85. b01MultiUpdate(datagrid2,"/root/tempData/tempData2" ,"A", true, "rowStuts2");//表2
  86. b01MultiUpdate(datagrid3,"/root/tempData/tempData3" ,"A", true, "rowStuts2");//表3
  87. b01MultiUpdate(datagrid4,"/root/tempData/tempData4" ,"A", true, "rowStuts2");//表4
  88. b01MultiUpdate(datagrid5,"/root/tempData/tempData5" ,"A", true, "rowStuts2");//表5
  89. commSendReq("/root/tempData/tempData1","/root/tempData/tempData2","/root/tempData/tempData3","/root/tempData/tempData4","/root/tempData/tempData5");
  90. //仅在表2、3、4、5被更新时其作用
  91. model.makeValue("/root/reqData/COILNO" , datagrid1.valueMatrix(selectRow , 1));//钢卷号
  92. model.makeValue("/root/reqData/SEQ" , datagrid1.valueMatrix(selectRow , 2));//次数
  93. getLoggingInInfo();
  94. commSubmit("UIB020060-service", "save", "glueAction.do");
  95. model.refresh();
  96. exceptionReport();
  97. datagrid1.clearStatus();
  98. datagrid2.clearStatus();
  99. datagrid3.clearStatus();
  100. datagrid4.clearStatus();
  101. datagrid5.clearStatus();
  102. }
  103. function setGridValue(grid)
  104. {
  105. for(var i = 1; i < grid.rows; i++)
  106. {
  107. grid.valueMatrix(i , grid.colRef("CHEM_VAL")) = "";
  108. grid.valueMatrix(i , grid.colRef("EX")) = "Y";
  109. }
  110. model.refresh();
  111. }
  112. ]]>
  113. </script>
  114. </xhtml:head>
  115. <xhtml:body accesskey="f2" pagewidth="980" pageheight="620" guideline="1,980;2,620;">
  116. <caption id="caption1" class="cell" style="left:215px; top:35px; width:90px; height:20px; ">订单序号</caption>
  117. <caption id="caption2" class="cell" style="left:430px; top:35px; width:90px; height:20px; ">标准号</caption>
  118. <caption id="caption3" class="cell" style="left:725px; top:35px; width:90px; height:20px; ">订单用途</caption>
  119. <button id="button6" style="left:70px; top:65px; width:95px; height:20px; text-align:center; background-image:..\..\images\create.GIF; ">
  120. <caption>增加</caption>
  121. <script type="javascript" ev:event="onclick">
  122. <![CDATA[
  123. if(beGridChanged(datagrid1 ,datagrid2 , datagrid3 , datagrid4 ,datagrid5)=="1")
  124. {
  125. window.alert("请先保存被修改的记录!", "警告");
  126. return;
  127. }
  128. model.removenode("/root/reqData");
  129. var addRow = 0;//保存增加行
  130. if(datagrid1.rows==1)
  131. {
  132. datagrid1.addRow();
  133. addRow = datagrid1.row;//增加后的为当前行
  134. datagrid1.valueMatrix(addRow , 1) = combo1.value.Trim();
  135. datagrid1.valueMatrix(addRow , 2) = "01" ;
  136. }
  137. else
  138. {
  139. datagrid1.addRow();
  140. addRow = datagrid1.row;//增加后的为当前行
  141. var coilNo = datagrid1.valueMatrix(addRow-1 , 1);//钢卷号
  142. var seq = parseInt(datagrid1.valueMatrix(addRow-1 , 2))+1;//次数
  143. datagrid1.valueMatrix(addRow , 1) = coilNo;
  144. datagrid1.valueMatrix(addRow , 2) = "0"+seq;
  145. //清除以前查询的实绩的值
  146. setGridValue(datagrid2);
  147. setGridValue(datagrid3);
  148. setGridValue(datagrid4);
  149. setGridValue(datagrid5);
  150. //清楚以前修改的状态
  151. datagrid2.clearStatus();
  152. datagrid3.clearStatus();
  153. datagrid4.clearStatus();
  154. datagrid5.clearStatus();
  155. }
  156. selectRow = datagrid1.row;
  157. model.refresh();
  158. ]]>
  159. </script>
  160. </button>
  161. <button id="button7" style="left:145px; top:65px; width:95px; height:20px; background-image:..\..\images\delete.GIF; ">
  162. <caption>删除</caption>
  163. <script type="javascript" ev:event="onclick">
  164. <![CDATA[
  165. if(commComfirmBox("确认删除?","提示")=="0") return;
  166. for(var i = datagrid1.rows; i >= 1; i--)
  167. {
  168. if(datagrid1.valueMatrix(i , 0)=="Y")
  169. {
  170. datagrid1.deleteRow(i , false);
  171. }
  172. }
  173. model.removenode("/root/reqData");
  174. model.makeNode("/root/reqData");
  175. b01MultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatus");
  176. commSubmit("UIB020060-service", "delete", "glueAction.do");
  177. model.refresh();
  178. datagrid1.clearStatus();
  179. ]]>
  180. </script>
  181. </button>
  182. <datagrid id="datagrid1" nodeset="/root/datagrid1/CoilInfo_Row" caption="选择^钢卷号^次数" colsep="^" colwidth="40, 120, 50" defaultrows="25" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:92px; width:215px; height:505px; ">
  183. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  184. <col ref="COIL_NO"/>
  185. <col ref="CHEM_SEQ"/>
  186. <script type="javascript" ev:event="ondblclick">
  187. <![CDATA[
  188. selectRow = datagrid1.row;
  189. model.removenode("/root/reqData");
  190. commSendReq("/root/datagrid1/CoilInfo_Row["+datagrid1.row+"]");
  191. model.makeValue("/root/reqData/ORDNO" , output1.value);//订单号
  192. commSubmit("UIB020060-service" , "onClick" , "glueAction.do");
  193. //调用b01.js文件中的copyFixNode方法,执行拷贝
  194. copyFixNode("/root/datagrid2","/root/resData/SingleChem_VO/SingleChem_Row",1,13);
  195. copyFixNode("/root/datagrid3","/root/resData/SingleChem_VO/SingleChem_Row",14,26);
  196. copyFixNode("/root/datagrid4","/root/resData/SingleChem_VO/SingleChem_Row",27,50);
  197. model.copyNode("/root/datagrid5" , "/root/resData/CompChem_VO");
  198. model.refresh();
  199. datagrid1.clearStatus();
  200. ]]>
  201. </script>
  202. </datagrid>
  203. <datagrid id="datagrid2" nodeset="/root/datagrid2/SingleChem_Row" caption="成分^最小^最大^实绩^EX" colsep="^" colwidth="55, 60, 60, 60, 42" defaultrows="15" mergecellsfixedrows="bycolrec" rowsep="|" style="left:225px; top:65px; width:240px; height:296px; ">
  204. <col ref="CHEM_CD" style="left:0px; top:21px; width:55px; height:21px; "/>
  205. <col ref="CHEM_MIN" style="left:55px; top:21px; width:60px; height:21px; "/>
  206. <col ref="CHEM_MAX"/>
  207. <col ref="CHEM_VAL" type="input" style="background-color:#ffff99; "/>
  208. <col ref="EX" visibility="hidden"/>
  209. <script type="javascript" ev:event="onclick">
  210. <![CDATA[
  211. datagrid2.editCell();
  212. ]]>
  213. </script>
  214. </datagrid>
  215. <datagrid id="datagrid3" nodeset="/root/datagrid3/SingleChem_Row" caption="成分^最小^最大^实绩^EX" colsep="^" colwidth="55, 60, 60, 60, 47" defaultrows="15" mergecellsfixedrows="bycolrec" rowsep="|" style="left:475px; top:65px; width:240px; height:296px; ">
  216. <col ref="CHEM_CD"/>
  217. <col ref="CHEM_MIN" style="left:55px; top:21px; width:60px; height:21px; "/>
  218. <col ref="CHEM_MAX"/>
  219. <col ref="CHEM_VAL" type="input" style="background-color:#ffff99; "/>
  220. <col ref="EX" visibility="hidden"/>
  221. <script type="javascript" ev:event="onclick">
  222. <![CDATA[
  223. datagrid3.editCell();
  224. ]]>
  225. </script>
  226. </datagrid>
  227. <datagrid id="datagrid4" nodeset="/root/datagrid4/SingleChem_Row" caption="成分^最小^最大^实绩^EX" colsep="^" colwidth="55, 60, 60, 60, 43" defaultrows="15" mergecellsfixedrows="bycolrec" rowsep="|" style="left:725px; top:65px; width:240px; height:296px; ">
  228. <col ref="CHEM_CD"/>
  229. <col ref="CHEM_MIN" style="left:55px; top:21px; width:60px; height:21px; "/>
  230. <col ref="CHEM_MAX"/>
  231. <col ref="CHEM_VAL" type="input" style="background-color:#ffff99; "/>
  232. <col ref="EX"/>
  233. <script type="javascript" ev:event="onclick">
  234. <![CDATA[
  235. datagrid4.editCell();
  236. ]]>
  237. </script>
  238. </datagrid>
  239. <datagrid id="datagrid5" nodeset="/root/datagrid5/CompChem_Row" caption="成分编码^复合元素计算式^最小^最大^实绩^EX^成分" colsep="^" colwidth="115, 440, 60, 60, 60, 35, 43" defaultrows="13" mergecellsfixedrows="bycolrec" rowsep="|" style="left:225px; top:365px; width:740px; height:232px; ">
  240. <col ref="COMP_DETAIL"/>
  241. <col ref="COMP_CAL"/>
  242. <col ref="CHEM_MIN"/>
  243. <col ref="CHEM_MAX"/>
  244. <col ref="CHEM_VAL" type="input" style="background-color:#ffff99; "/>
  245. <col ref="EX" visibility="hidden"/>
  246. <col ref="CHEM_CD" visibility="hidden"/>
  247. <script type="javascript" ev:event="onclick">
  248. <![CDATA[
  249. datagrid5.editCell();
  250. ]]>
  251. </script>
  252. </datagrid>
  253. <caption id="caption4" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">钢卷号</caption>
  254. <output id="output1" ref="/root/SlabInfo/CoilComm_Row/ORD_NO" style="left:304px; top:35px; width:110px; height:20px; text-align:center; background-color:#ffffff; border-color:#6b8a9a; border-style:solid; "/>
  255. <output id="output2" ref="/root/SlabInfo/CoilComm_Row/SPEC_ABBSYM" style="left:519px; top:35px; width:196px; height:20px; text-align:left; background-color:#ffffff; border-color:#6b8a9a; border-style:solid; "/>
  256. <output id="output3" ref="/root/SlabInfo/CoilComm_Row/ORD_USE_CD" style="left:814px; top:35px; width:110px; height:20px; text-align:center; background-color:#ffffff; border-color:#6b8a9a; border-style:solid; "/>
  257. <caption id="caption5" class="cell" style="left:0px; top:35px; width:90px; height:20px; ">板坯号</caption>
  258. <output id="output4" ref="/root/SlabInfo/CoilComm_Row/SLAB_NO" style="left:89px; top:35px; width:114px; height:20px; text-align:center; background-color:#ffffff; border-color:#6b8a9a; border-style:solid; "/>
  259. <select1 id="combo1" ref="/root/formData/COILNO" appearance="minimal" style="left:90px; top:5px; width:135px; height:20px; ">
  260. <choices>
  261. <itemset nodeset="/root/initData/CombCoil_VO/CombCoil_Row">
  262. <label ref="LABEL"/>
  263. <value ref="VALUE"/>
  264. </itemset>
  265. </choices>
  266. </select1>
  267. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  268. <line id="line2" style="x1:0px; y1:60px; x2:980px; y2:60px; "/>
  269. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  270. <script type="javascript" ev:event="onaccesskey">
  271. <![CDATA[
  272. openWindow("UIB020060");
  273. ]]>
  274. </script>
  275. </xhtml:body>
  276. </xhtml:html>