d5441aa59a8b14d51704ac1ce1a75dd74922b887.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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. <![CDATA[>]]>
  10. <instance id="instance1">
  11. <root xmlns="">
  12. <formData>
  13. <SPECSTLGRD/>
  14. </formData>
  15. <comboData>
  16. <ABBSYM/>
  17. </comboData>
  18. <datagrid1/>
  19. <datagrid3/>
  20. <resData/>
  21. <initStlData>
  22. <SpecStlGrd_Row>
  23. <LABEL/>
  24. <VALUE/>
  25. </SpecStlGrd_Row>
  26. </initStlData>
  27. </root>
  28. </instance>
  29. <script type="javascript" ev:event="xforms-ready">
  30. <![CDATA[
  31. if(window.parent==null) Init();
  32. ]]>
  33. </script>
  34. </model>
  35. <script type="javascript" src="../../js/boaCommon.js"/>
  36. <script type="javascript" src="../../js/b01.js"/>
  37. <script type="javascript">
  38. <![CDATA[
  39. var currentRow = 0;
  40. function Init(node)
  41. {
  42. InitParams(node);
  43. model.removenode("/root/reqData");
  44. model.makeNode("/root/reqData");
  45. //对下拉框中的信息进行初始化
  46. commSubmit("UIF026010-service", "findS", "glueAction.do");
  47. model.copyNode("/root/initStlData" , "/root/resData/SpecStlGrd_VO");//标准钢号
  48. model.copyNode("/root/comboData/ABBSYM" , "/root/resData/ListResult_2_VO");//标准号
  49. model.refresh();
  50. }
  51. function find()
  52. {
  53. //根据标准号查询datagrid1中的内容
  54. model.removenode("/root/reqData");
  55. model.makeNode("/root/reqData");
  56. commSendReq("/root/formData");
  57. commSubmit("UIF026010-service", "findI", "glueAction.do");
  58. model.copyNode("/root/datagrid1","/root/resData/SpecInfoResult_VO");
  59. removeGridData();
  60. clearGridStatus();
  61. model.refresh();
  62. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  63. }
  64. function findTechCD()
  65. {
  66. model.removenode("/root/reqData");
  67. model.makeNode("/root/reqData");
  68. commSubmit("UIB010302-service", "findTechCD", "glueAction.do");
  69. model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
  70. model.refresh();
  71. }
  72. function save()
  73. {
  74. if(currentRow == 0) {window.alert("非法操作" , "提示");return;}
  75. if(commComfirmBox("确认保存?","提示")=="0") return;
  76. model.removenode("/root/reqData");
  77. model.makeNode("/root/reqData");
  78. model.removenode("/root/tempData3");
  79. model.makeNode("/root/tempData3");
  80. b01MultiUpdate(datagrid3,"/root/tempData3" ,"A" ,true, "rowStatus2" );
  81. commSendReq("/root/tempData3");
  82. //model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
  83. //model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
  84. model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
  85. getLoggingInInfo();
  86. commSubmit("UIF026010-service", "save", "glueAction.do");
  87. var returnInfoMsg = model.getValue("/root/resData/returnInfoMsg_VO/returnInfoMsg_Row");
  88. if(returnInfoMsg != null && returnInfoMsg != "")
  89. window.alert(returnInfoMsg, "操作信息");
  90. clearGridStatus();
  91. currentRow = 0;
  92. }
  93. function clearGridStatus()
  94. {
  95. datagrid1.clearStatus();
  96. datagrid3.clearStatus();
  97. }
  98. function removeGridData()
  99. {
  100. model.removenode("/root/datagrid3");
  101. model.makeNode("/root/datagrid3");
  102. model.refresh();
  103. }
  104. ]]>
  105. </script>
  106. </xhtml:head>
  107. <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; font-size:14pt; ">
  108. <datagrid id="datagrid1" nodeset="/root/datagrid1/SpecInfoResult_Row" caption="标准钢号^查询" colsep="^" colwidth="125, 140" defaultrows="40" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:53px; width:415px; height:562px; border-style:solid; ">
  109. <col editmode="search" ref="SPEC_STL_GRD" type="combo" style="text-align:left; background-color:#ffff99; ">
  110. <choices>
  111. <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
  112. <label ref="LABEL"/>
  113. <value ref="VALUE"/>
  114. </itemset>
  115. </choices>
  116. </col>
  117. <col ref="QUERY" style="cursor:hand; "/>
  118. <script type="javascript" ev:event="onentercell">
  119. <![CDATA[
  120. datagrid1.editCell();
  121. ]]>
  122. </script>
  123. <script type="javascript" ev:event="onclick">
  124. <![CDATA[
  125. if(datagrid1.row >= datagrid1.fixedRows && datagrid1.col == datagrid1.colRef("QUERY"))
  126. {
  127. if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
  128. {
  129. window.alert("增加状态下不允许该操作!" , "警告");
  130. datagrid1.row = datagrid1.rows-1;
  131. return;
  132. }
  133. if(beGridChanged(datagrid1,datagrid3) == "1" && currentRow != 0)
  134. {
  135. if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
  136. {
  137. clearGridStatus();
  138. }
  139. else
  140. {
  141. save();
  142. }
  143. }
  144. currentRow = datagrid1.row;
  145. model.removenode("/root/reqData");
  146. model.makeNode("/root/reqData");
  147. model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
  148. //alert()
  149. commSubmit("UIF026010-service", "findDetails", "glueAction.do");
  150. model.copyNode("/root/datagrid3" , "/root/resData/SMPResult_VO");
  151. model.refresh();
  152. //setDatagrid();
  153. currentRow = datagrid1.row;
  154. datagrid1.col = 1;//预防滚动条拖动时做查询操作
  155. }
  156. ]]>
  157. </script>
  158. <script type="javascript" ev:event="onkeydown">
  159. <![CDATA[
  160. onkeydownmove(datagrid1);
  161. ]]>
  162. </script>
  163. </datagrid>
  164. <datagrid id="datagrid3" nodeset="/root/datagrid3/SMPResult_Row" caption="订单厚度规格最小值(&lt;)^订单厚度规格最大值(&gt;=)^轧制厚度下限(%)^轧制厚度上限(%)^顺序代码" colsep="^" colwidth="83, 83, 106, 145, 77" defaultrows="40" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" selectionmode="free" tooltip="label" style="left:418px; top:55px; width:559px; height:555px; border-style:solid; ">
  165. <col editable="true" ref="ORD_THK_MIN" type="input" style="color:#ffff00; text-align:left; background-color:#ffffff; "/>
  166. <col editable="true" ref="ORD_THK_MAX" type="input" style="text-align:left; background-color:#ffffff; "/>
  167. <col editable="true" ref="THK_MIN" type="input" style="text-align:left; background-color:#ffffff; "/>
  168. <col editable="true" ref="THK_MAX" type="input" style="text-align:left; background-color:#ffffff; "/>
  169. <col editable="false" ref="SEQ_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
  170. <script type="javascript" ev:event="onentercell">
  171. <![CDATA[
  172. datagrid3.editCell();
  173. ]]>
  174. </script>
  175. <script type="javascript" ev:event="onkeydown">
  176. <![CDATA[
  177. onkeydownmove(datagrid3);
  178. ]]>
  179. </script>
  180. </datagrid>
  181. <button id="button3" visibility="visible" style="left:290px; top:33px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
  182. <caption>添加</caption>
  183. <script type="javascript" ev:event="onclick">
  184. <![CDATA[
  185. if(beGridChanged(datagrid1,datagrid3) == "1")
  186. {
  187. window.alert("数据已修改,请保存或初始化!" , "警告");
  188. return;
  189. }
  190. //
  191. // if(datagrid3.rows > datagrid3.fixedRows )//是否存在数据
  192. // {
  193. // if(commComfirmBox("是否保留表中规范数据值要求?","提示")=="0")
  194. // {
  195. // findTechCD();
  196. // clearGridStatus();
  197. // }
  198. // else
  199. // {
  200. // for(var i =1;i< datagrid3.rows;i++)
  201. // {
  202. // if(datagrid3.valueMatrix(i,datagrid3.colRef("THK_MIN")) != "")
  203. // {
  204. // datagrid3.addStatus(i,"update");
  205. // }
  206. // }//for end
  207. //
  208. // }//else end
  209. // }//if end ,else start
  210. // else
  211. // {
  212. // findTechCD();
  213. // }
  214. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  215. datagrid1.addRow(false);
  216. currentRow = datagrid1.row;
  217. //datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD") ) = "AR";
  218. datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD"))= model.getValue("/root/formData/SPECSTLGRD");
  219. model.refresh();
  220. //setDatagrid();
  221. ]]>
  222. </script>
  223. </button>
  224. <button id="button4" visibility="visible" style="left:355px; top:33px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
  225. <caption>删除</caption>
  226. <script type="javascript" ev:event="onclick">
  227. <![CDATA[
  228. //删除datagrid2中的数据
  229. if(beGridChanged(datagrid1 ,datagrid3) == "1")
  230. {
  231. window.alert("数据已修改,请保存或初始化!" , "警告");
  232. return;
  233. }
  234. if(commComfirmBox("确认删除?","提示")=="0") return;
  235. model.removenode("/root/reqData");
  236. model.makeNode("/root/reqData");
  237. datagrid1.deleteRow(datagrid1.row);
  238. commMultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatus0")
  239. getLoggingInInfo();
  240. commSubmit("UIF026010-service", "save", "glueAction.do");
  241. removeGridData();
  242. //清空表单的状态
  243. datagrid1.clearStatus();
  244. datagrid3.clearStatus();
  245. ]]>
  246. </script>
  247. </button>
  248. <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  249. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  250. <caption id="caption1" class="cell" style="left:20px; top:5px; width:85px; height:20px; ">标准钢号</caption>
  251. <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="inputsearch" style="left:104px; top:5px; width:131px; height:20px; ">
  252. <choices>
  253. <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
  254. <label ref="LABEL"/>
  255. <value ref="VALUE"/>
  256. </itemset>
  257. </choices>
  258. </select1>
  259. <button id="button1" visibility="hidden" style="left:620px; top:5px; width:100px; height:20px; ">
  260. <caption>初始化</caption>
  261. <script type="javascript" ev:event="onclick">
  262. <![CDATA[
  263. Init();
  264. ]]>
  265. </script>
  266. </button>
  267. <button id="button2" visibility="hidden" style="left:730px; top:5px; width:100px; height:20px; ">
  268. <caption>查询</caption>
  269. <script type="javascript" ev:event="onclick">
  270. <![CDATA[
  271. find();
  272. ]]>
  273. </script>
  274. </button>
  275. <button id="button5" visibility="hidden" style="left:845px; top:5px; width:100px; height:20px; ">
  276. <caption>保存</caption>
  277. <script type="javascript" ev:event="onclick">
  278. <![CDATA[
  279. save();
  280. ]]>
  281. </script>
  282. </button>
  283. <button id="button6" visibility="visible" style="left:895px; top:35px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
  284. <caption>添加</caption>
  285. <script type="javascript" ev:event="onclick">
  286. <![CDATA[
  287. datagrid3.cellAttribute("disabled",datagrid3.fixedRows , datagrid3.fixedCols , datagrid3.rows - 1 , datagrid3.cols - 1) = "true";
  288. datagrid3.addRow(false);
  289. //currentRow = datagrid3.row;
  290. //datagrid3.valueMatrix(currentRow , datagrid3.colRef("SPEC_STL_GRD"))= model.getValue("/root/formData/SPECSTLGRD");
  291. //model.refresh();
  292. //setDatagrid();
  293. ]]>
  294. </script>
  295. </button>
  296. <button id="button7" visibility="visible" style="left:820px; top:35px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
  297. <caption>删除</caption>
  298. <script type="javascript" ev:event="onclick">
  299. <![CDATA[
  300. //删除datagrid2中的数据
  301. if(beGridChanged(datagrid1 ,datagrid3) == "1")
  302. {
  303. window.alert("数据已修改,请保存或初始化!" , "警告");
  304. return;
  305. }
  306. if(commComfirmBox("确认删除?","提示")=="0") return;
  307. model.removenode("/root/reqData");
  308. model.makeNode("/root/reqData");
  309. model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
  310. datagrid3.deleteRow(datagrid3.row);
  311. commMultiUpdate(datagrid3,"/root/reqData" ,"A", true, "rowStatus2")
  312. getLoggingInInfo();
  313. commSubmit("UIF026010-service", "save", "glueAction.do");
  314. removeGridData();
  315. //清空表单的状态
  316. datagrid1.clearStatus();
  317. datagrid3.clearStatus();
  318. ]]>
  319. </script>
  320. </button>
  321. </xhtml:body>
  322. </xhtml:html>