UIG010020.xrw 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.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[炼钢作业 >> 炼钢标准 >> 连铸操作标准录入与查询(UIG010020)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <STL_GRD/>
  13. <PRODNM_CD/>
  14. </formData>
  15. <gridData>
  16. <grid1/>
  17. <grid2/>
  18. </gridData>
  19. <resData/>
  20. <reqData/>
  21. </root>
  22. </instance>
  23. </model>
  24. <script type="javascript">
  25. <![CDATA[
  26. // 动态展示成分
  27. function dynamicChemGridDisplay()
  28. {
  29. // 删除已经生成的列
  30. while(datagrid2.cols > 1)
  31. {
  32. datagrid2.deleteColumn(1,false);
  33. }
  34. model1.removenode("/root/gridData/grid2");
  35. model1.makeNode("/root/gridData/grid2");
  36. model1.removenode("/root/reqData");
  37. model1.makeNode("/root/reqData");
  38. model1.makeNode("/root/reqData/STL_GRD");
  39. model1.setValue("/root/reqData/STL_GRD",datagrid1.valueMatrix(datagrid1.row,datagrid1.colRef("STL_GRD")));
  40. commSubmit("UIG010010-service","find2","glueAction.do");
  41. // 判断是否有值
  42. var nodeLen = instance1.selectSingleNode("/root/resData/SearchChemResult_VO").childNodes.length;
  43. if(nodeLen == 0)
  44. {
  45. alert(" 化学成份为空! ");
  46. return;
  47. }
  48. var rowLoc = new Array();
  49. rowLoc[0] = new Array(); //datagrid1.fixedRows 表格的第一行 ;CAPTION
  50. rowLoc[1] = new Array(); //AMI
  51. rowLoc[2] = new Array(); //MIN
  52. rowLoc[3] = new Array(); //MAX
  53. rowLoc[0][0] = "DESC"
  54. rowLoc[1][0] = "目标值"
  55. rowLoc[2][0] = "最大值"
  56. rowLoc[3][0] = "最小值"
  57. for(var i = 1 ; i <= nodeLen ; i++)
  58. {
  59. rowLoc[0][i] = model1.getValue("root/resData/SearchChemResult_VO/SearchChemResult_Row[" + i + "]/CHEM_CD");
  60. rowLoc[1][i] = model1.getValue("root/resData/SearchChemResult_VO/SearchChemResult_Row[" + i + "]/CHEM_AIM");
  61. rowLoc[2][i] = model1.getValue("root/resData/SearchChemResult_VO/SearchChemResult_Row[" + i + "]/CHEM_MAX");
  62. rowLoc[3][i] = model1.getValue("root/resData/SearchChemResult_VO/SearchChemResult_Row[" + i + "]/CHEM_MIN");
  63. }
  64. // 动态生成表格,
  65. for(var j = 1 ; j < rowLoc[0].length ; j++)
  66. {
  67. datagrid2.addColumn("ref:" + rowLoc[0][j] + "; type:input;");
  68. datagrid2.caption = datagrid2.caption + "^" + rowLoc[0][j];
  69. }
  70. // 给表格赋值
  71. for(var j = 0 ; j< rowLoc[0].length ; j++)
  72. {
  73. model1.makeValue("/root/gridData/grid2/SearchChemResult_VO/SearchChemResult_Row[1]/" + rowLoc[0][j],rowLoc[1][j]);
  74. model1.makeValue("/root/gridData/grid2/SearchChemResult_VO/SearchChemResult_Row[2]/" + rowLoc[0][j],rowLoc[2][j]);
  75. model1.makeValue("/root/gridData/grid2/SearchChemResult_VO/SearchChemResult_Row[3]/" + rowLoc[0][j],rowLoc[3][j]);
  76. }
  77. }
  78. /*
  79. *查询操作
  80. */
  81. function find()
  82. {
  83. commSendReq("/root/formData");
  84. commSubmit("UIG010020-service","find1","glueAction.do");
  85. var resnode = instance1.selectSingleNode("/root/resData/stlgrdList_VO");
  86. if(resnode.childNodes.length == 0)
  87. {
  88. alert(" 空数据 ");
  89. return;
  90. }
  91. commAppendData("/root/gridData/grid1/stlgrdList_VO","/root/resData/stlgrdList_VO");
  92. model.refresh();
  93. }
  94. // 修改一个牌号所对应的相应的炼钢操作标准
  95. function save()
  96. {
  97. model1.removenode("/root/reqData");
  98. model1.makeNode("/root/reqData");
  99. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  100. commSubmit("UIG010020-service","save","glueAction.do");
  101. model.refresh();
  102. }
  103. // function update()
  104. // {
  105. // model1.removenode("/root/reqData");
  106. // model1.makeNode("/root/reqData");
  107. // commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  108. // commSubmit("UIG010020-service","update","glueAction.do");
  109. //
  110. // commAppendData("/root/gridData/grid1/stlgrdList_VO","/root/resData/stlgrdList_VO");
  111. // model.refresh();
  112. // }
  113. //
  114. // function insert()
  115. // {
  116. // model1.removenode("/root/reqData");
  117. // model1.makeNode("/root/reqData");
  118. // commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  119. // model1.setValue("/root/reqData/stlgrdList_Row[1]/rowStatus","i");
  120. // commSubmit("UIG010020-service","insert","glueAction.do");
  121. //
  122. // commAppendData("/root/gridData/grid1/stlgrdList_VO","/root/resData/stlgrdList_VO");
  123. // model.refresh();
  124. // }
  125. ]]>
  126. </script>
  127. <script type="javascript" src="../../js/boaCommon.js"/>
  128. </xhtml:head>
  129. <xhtml:body guideline="1,980;2,615;" style="font-family:宋体; ">
  130. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; vertical-align:middle; border-color:#000000; ">牌号</caption>
  131. <input id="input1" ref="/root/formData/STL_GRD" style="left:102px; top:5px; width:110px; height:20px; background-color:#ffff99; border-color:#000000; "/>
  132. <datagrid id="datagrid1" nodeset="/root/gridData/grid1/stlgrdList_VO/stlgrdList_Row" allowuserresize="true" backcoloralternate="#f7f9f9" caption="选择^牌号^浇铸速度^浇铸速度^浇铸速度^钢包到达温度^凝固温度^凝固温度^中包温度^中包温度^中包温度^结晶器1宽度^结晶器1宽度^结晶器2宽度^结晶器2宽度^结晶器1^结晶器1^结晶器2^结晶器2^比水量|选择^牌号^最小^最大^目标值^钢包到达温度^温度1^温度2^最小^最大^目标值^最小^最大^最小^最大^振频^振幅^振频^振幅^比水量" colsep="^" colwidth="30, 78, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 42, 42, 42, 42, 40" defaultrows="30" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:35px; width:980px; height:490px; border-color:#000000; ">
  133. <col checkvalue="Y,N" key="CHK" ref="CHK" type="radio"/>
  134. <col editable="false" ref="STL_GRD" type="input" style="text-align:left; "/>
  135. <col editable="false" ref="CCM_SPEED_MIN" type="input"/>
  136. <col editable="false" ref="CCM_SPEED_MAX" type="input"/>
  137. <col editable="false" ref="CCM_SPEED_AVG" type="input"/>
  138. <col editable="false" ref="LT_ARRV_TEMP" type="input"/>
  139. <col editable="false" ref="SOLIDE_TEMP1" type="input"/>
  140. <col editable="false" ref="SOLIDE_TEMP2" type="input"/>
  141. <col editable="false" ref="TD_TEMP_MIN" type="input"/>
  142. <col editable="false" ref="TD_TEMP_MAX" type="input"/>
  143. <col editable="false" ref="TD_TEMP_AVG" type="input"/>
  144. <col editable="false" ref="MD1_WTH_MIN" type="input"/>
  145. <col editable="false" ref="MD1_WTH_MAX" type="input"/>
  146. <col editable="false" ref="MD2_WTH_MIN" type="input"/>
  147. <col editable="false" ref="MD2_WTH_MAX" type="input"/>
  148. <col editable="false" ref="MD1_OSCILL_CNT" type="input"/>
  149. <col editable="false" ref="MD1_OSCILL_WTH" type="input"/>
  150. <col editable="false" ref="MD2_OSCILL_CNT" type="input"/>
  151. <col editable="false" ref="MD2_OSCILL_WTH" type="input"/>
  152. <col editable="false" ref="COOL_WATER" type="input"/>
  153. <script type="javascript" ev:event="xforms-select">
  154. <![CDATA[
  155. // 如果选择列值变化,同时不是新插入的行,则需重新刷新成分展示表格,清除上一次选择行的行状态
  156. if(datagrid1.col == datagrid1.colRef("CHK"))
  157. {
  158. // datagrid1.row.disabled = false;
  159. datagrid1.cellAttribute("editable",datagrid1.row,datagrid1.colRef("CCM_SPEED_MIN"),datagrid1.row,datagrid1.colRef("COOL_WATER")) = true;
  160. dynamicChemGridDisplay();
  161. datagrid1.clearStatus();
  162. datagrid1.rowStatus(datagrid1.row) = 2;
  163. }
  164. ]]>
  165. </script>
  166. </datagrid>
  167. <datagrid id="datagrid2" nodeset="/root/gridData/grid2/SearchChemResult_VO/SearchChemResult_Row" caption="成分" colsep="^" colwidth="100" defaultrows="4" fixedcols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:530px; width:980px; height:85px; border-color:#000000; ">
  168. <col ref="DESC"/>
  169. </datagrid>
  170. <line id="line3" style="x1:0px; y1:30px; x2:979px; y2:30px; "/>
  171. <line id="line1" style="x1:1px; y1:0px; x2:980px; y2:0px; "/>
  172. </xhtml:body>
  173. </xhtml:html>