f1668c8168e71bbe8ba6836a7f838f90afaa0023.svn-base 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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[品质设计>>成分参数录入>>替代刚号录入]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <Radio/>
  13. <STL_GRD/>
  14. </formData>
  15. <datagrid1/>
  16. <test>
  17. <updateData/>
  18. </test>
  19. <tempData>
  20. <cellStatus/>
  21. <MOD_SEQ/>
  22. <STL_GRD/>
  23. <MOD_STL_GRD/>
  24. </tempData>
  25. <datagrid2/>
  26. <reqData/>
  27. <initData>
  28. <StlGrdResult_Row>
  29. <LABEL/>
  30. <VALUE/>
  31. </StlGrdResult_Row>
  32. </initData>
  33. </root>
  34. </instance>
  35. <script type="javascript" ev:event="xforms-ready">
  36. <![CDATA[
  37. if(window.parent==null) Init();
  38. ]]>
  39. </script>
  40. </model>
  41. <script type="javascript" src="../../js/boaCommon.js"/>
  42. <script type="javascript" src="../../js/b01.js"/>
  43. <script type="javascript">
  44. <![CDATA[
  45. function Init(node)
  46. {
  47. InitParams(node);
  48. datagrid1.colStatus(1)=false;//忽略第一列值变化(即getUpdatedata方法等不检查第一列的值变化)
  49. // model.makeNode("/root/reqData/STL_GRD");//使其不空,能做初始化操作
  50. // commSubmit("UIB010060-service", "success", "glueAction.do");//页面初始化
  51. //注意使用duplicate和copyNode时,节点的方式的区别
  52. // model.duplicate("/root/initData" , "/root/resData/StlGrdResult_VO");//对下拉列表
  53. // model.copyNode("/root/datagrid1","/root/resData/ModStlGrdResult_VO");//对表格1
  54. radio1.select(0);
  55. }
  56. function find()
  57. {
  58. if(radio1.value=="")
  59. {
  60. window.alert("请选择厂内钢号或标准钢号" , "提示");
  61. return;
  62. }
  63. //按计划钢号进行查询(条件可选)
  64. model.removenode("/root/reqData");
  65. model.makeValue("/root/reqData/STL_GRD_YN",radio1.value);//传递下拉框中的计划钢号
  66. commSubmit("UIB010060-service", "find", "glueAction.do");//按计划刚号查询
  67. model.copyNode("/root/datagrid1","/root/resData/ModStlGrdResult_VO");
  68. model.refresh();
  69. }
  70. function save()
  71. {
  72. if(beGridChanged(datagrid1)=="0")//判断表格是否被修改,若无修改则直接返回,不做任何操作
  73. return;
  74. model.removenode("/root/reqData");
  75. model.makeNode("/root/reqData");
  76. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  77. model.makeValue("/root/reqData/STL_GRD_YN" , radio1.value);
  78. commSubmit("UIB010060-service", "save", "glueAction.do");
  79. errMSG = model.getValue("/root/resData/errorData");
  80. if(errMSG != "")
  81. {
  82. window.alert(errMSG," 警告 ");
  83. return;
  84. }
  85. datagrid1.clearStatus();
  86. window.alert("保存成功"," 提示 ");
  87. }
  88. ]]>
  89. </script>
  90. </xhtml:head>
  91. <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; ">
  92. <datagrid id="datagrid1" nodeset="/root/datagrid1/ModStlGrdResult_Row" caption="选择^计划钢号^替代钢号1^替代钢号2^替代钢号3^替代钢号4^替代钢号5^替代钢号6^替代钢号7^替代钢号8^替代钢号9^替代钢号10^H计划钢号" colsep="^" colwidth="32, 133, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 52" defaultrows="28" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" tooltip="label" style="left:0px; top:35px; width:980px; height:585px; border-color:#000000; border-style:solid; ">
  93. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  94. <col editmode="search" ref="STL_GRD" type="combo" style="left:0px; top:42px; width:90px; height:21px; text-align:left; background-color:#ffff99; ">
  95. <choices>
  96. <itemset nodeset="/root/initData/StlGrdResult_Row">
  97. <label ref="LABEL"/>
  98. <value ref="VALUE"/>
  99. </itemset>
  100. </choices>
  101. </col>
  102. <col editmode="search" ref="MOD_STL_GRD1" type="combo" style="background-color:#ffff99; ">
  103. <choices>
  104. <itemset nodeset="/root/initData/StlGrdResult_Row">
  105. <label ref="LABEL"/>
  106. <value ref="VALUE"/>
  107. </itemset>
  108. </choices>
  109. </col>
  110. <col editmode="search" ref="MOD_STL_GRD2" type="combo" style="background-color:#ffff99; ">
  111. <choices>
  112. <itemset nodeset="/root/initData/StlGrdResult_Row">
  113. <label ref="LABEL"/>
  114. <value ref="VALUE"/>
  115. </itemset>
  116. </choices>
  117. </col>
  118. <col editmode="search" ref="MOD_STL_GRD3" type="combo" style="background-color:#ffff99; ">
  119. <choices>
  120. <itemset nodeset="/root/initData/StlGrdResult_Row">
  121. <label ref="LABEL"/>
  122. <value ref="VALUE"/>
  123. </itemset>
  124. </choices>
  125. </col>
  126. <col editmode="search" ref="MOD_STL_GRD4" type="combo" style="background-color:#ffff99; ">
  127. <choices>
  128. <itemset nodeset="/root/initData/StlGrdResult_Row">
  129. <label ref="LABEL"/>
  130. <value ref="VALUE"/>
  131. </itemset>
  132. </choices>
  133. </col>
  134. <col editmode="search" ref="MOD_STL_GRD5" type="combo" style="background-color:#ffff99; ">
  135. <choices>
  136. <itemset nodeset="/root/initData/StlGrdResult_Row">
  137. <label ref="LABEL"/>
  138. <value ref="VALUE"/>
  139. </itemset>
  140. </choices>
  141. </col>
  142. <col editmode="search" ref="MOD_STL_GRD6" type="combo" style="background-color:#ffff99; ">
  143. <choices>
  144. <itemset nodeset="/root/initData/StlGrdResult_Row">
  145. <label ref="LABEL"/>
  146. <value ref="VALUE"/>
  147. </itemset>
  148. </choices>
  149. </col>
  150. <col editmode="search" ref="MOD_STL_GRD7" type="combo" style="background-color:#ffff99; ">
  151. <choices>
  152. <itemset nodeset="/root/initData/StlGrdResult_Row">
  153. <label ref="LABEL"/>
  154. <value ref="VALUE"/>
  155. </itemset>
  156. </choices>
  157. </col>
  158. <col editmode="search" ref="MOD_STL_GRD8" type="combo" style="background-color:#ffff99; ">
  159. <choices>
  160. <itemset nodeset="/root/initData/StlGrdResult_Row">
  161. <label ref="LABEL"/>
  162. <value ref="VALUE"/>
  163. </itemset>
  164. </choices>
  165. </col>
  166. <col editmode="search" ref="MOD_STL_GRD9" type="combo" style="background-color:#ffff99; ">
  167. <choices>
  168. <itemset nodeset="/root/initData/StlGrdResult_Row">
  169. <label ref="LABEL"/>
  170. <value ref="VALUE"/>
  171. </itemset>
  172. </choices>
  173. </col>
  174. <col editmode="search" ref="MOD_STL_GRD10" type="combo" style="background-color:#ffff99; ">
  175. <choices>
  176. <itemset nodeset="/root/initData/StlGrdResult_Row">
  177. <label ref="LABEL"/>
  178. <value ref="VALUE"/>
  179. </itemset>
  180. </choices>
  181. </col>
  182. <col ref="STL_GRD1" visibility="hidden"/>
  183. <script type="javascript" ev:event="onclick">
  184. <![CDATA[
  185. datagrid1.editCell();
  186. ]]>
  187. </script>
  188. </datagrid>
  189. <caption id="caption1" class="cell" style="left:0px; top:5px; width:220px; height:20px; text-align:left; border-color:#000000; border-style:solid; ">钢号区分:</caption>
  190. <button id="button1" style="left:825px; top:5px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
  191. <caption>增加</caption>
  192. <script type="javascript" ev:event="DOMActivate">
  193. <![CDATA[
  194. if(radio1.value=="")
  195. {
  196. window.alert("请选择厂内钢号或标准钢号" , "提示");
  197. return;
  198. }
  199. datagrid1.addRow();
  200. ]]>
  201. </script>
  202. </button>
  203. <button id="button2" style="left:900px; top:5px; width:60px; height:20px; background-image:../../images/btn_move.gif; ">
  204. <caption>删除</caption>
  205. <script type="javascript" ev:event="DOMActivate">
  206. <![CDATA[
  207. for(var i=datagrid1.rows; i >= 1 ; i--)
  208. {
  209. if(datagrid1.valueMatrix(i , 1)=="Y")
  210. {
  211. datagrid1.deleteRow(i , false);
  212. }
  213. }
  214. save();
  215. ]]>
  216. </script>
  217. </button>
  218. <select1 id="radio1" ref="/root/formData/Radio" appearance="full" cols="2" overflow="visible" style="left:70px; top:5px; width:145px; height:20px; border-style:none; ">
  219. <choices>
  220. <item>
  221. <label>厂内钢号</label>
  222. <value>F</value>
  223. </item>
  224. <item>
  225. <label>标准钢号</label>
  226. <value>S</value>
  227. </item>
  228. </choices>
  229. <script type="javascript" ev:event="xforms-value-changed">
  230. <![CDATA[
  231. //若按厂内钢号查询
  232. for(var i=datagrid1.rows; i>1; i--)
  233. {
  234. model.destroy("/root/datagrid1/ModStlGrdResult_Row["+i+"]");
  235. datagrid1.removeRow(false);
  236. }
  237. if(radio1.value=="F")
  238. {
  239. model.removenode("/root/reqData");
  240. commSubmit("UIB010060-service", "findFac", "glueAction.do");//页面初始化
  241. }
  242. else//按标准钢号查询
  243. {
  244. model.removenode("/root/reqData");
  245. commSubmit("UIB010060-service", "findSpec", "glueAction.do");//页面初始化
  246. }
  247. model.copyNode("/root/initData" , "/root/resData/StlGrdResult_VO");
  248. model.refresh();
  249. ]]>
  250. </script>
  251. </select1>
  252. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  253. <line id="line1" style="x1:5px; y1:30px; x2:985px; y2:30px; "/>
  254. </xhtml:body>
  255. </xhtml:html>