UIH051300.xrw 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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>预装车</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <resData/>
  10. <reqData/>
  11. <datagrid1/>
  12. <searchData>
  13. <COIL_NO/>
  14. </searchData>
  15. <saveData>
  16. <CHK/>
  17. <OLD_SAMPL_NO/>
  18. <ACT_WGT/>
  19. <CUR_LOAD_LOC/>
  20. </saveData>
  21. <sumData>
  22. <SUM_COILRST_CNT/>
  23. <SUM_COILRST_WGT/>
  24. </sumData>
  25. </root>
  26. </instance>
  27. </model>
  28. <script type="javascript" src="../../js/boaMsg.js"/>
  29. <script type="javascript" src="../../js/boaCommon.js"/>
  30. <script type="javascript">
  31. <![CDATA[
  32. //页面初始化的时候需要获取登录的相关用户信息
  33. function Init(node) {
  34. InitParams(node);
  35. }
  36. //调用公共的初始化方法获得登录用户名
  37. function InitParams(node) {
  38. if (typeof node == "undefined" && typeof node != "object") return;
  39. model.removenode("/root/initData/rcvInfo");
  40. model.makeNode("/root/initData/rcvInfo");
  41. var nodeList = node.childNodes;
  42. node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
  43. for (var i = 0; i < nodeList.length; i++)
  44. node.appendChild(nodeList.item(i));
  45. }
  46. function find(){
  47. model.removenode("/root/reqData");
  48. model.makeNode("/root/reqData");
  49. model.duplicate("/root/reqData","/root/searchData/COIL_NO");
  50. commSubmit("UIH051300-service", "find", "glueAction.do");
  51. commAppendData("/root/datagrid1/coilResult_VO","/root/resData/coilResult_VO");
  52. model.setValue("/root/sumData/SUM_COILRST_CNT",model.getValue("/root/resData/SumCoil_VO/SumCoil_Row/COIL_CNT"));
  53. model.setValue("/root/sumData/SUM_COILRST_WGT",model.getValue("/root/resData/SumCoil_VO/SumCoil_Row/COIL_WGT"));
  54. model.refresh();
  55. }
  56. function findCoil(){
  57. model.removenode("/root/reqData");
  58. model.makeNode("/root/reqData");
  59. commSubmit("UIH051300-service", "findCoil", "glueAction.do");
  60. commAppendData("/root/datagrid1/coilResult_VO","/root/resData/coilResult_VO");
  61. model.setValue("/root/sumData/SUM_COILRST_CNT",model.getValue("/root/resData/SumCoil_VO/SumCoil_Row/COIL_CNT"));
  62. model.setValue("/root/sumData/SUM_COILRST_WGT",model.getValue("/root/resData/SumCoil_VO/SumCoil_Row/COIL_WGT"));
  63. model.refresh();
  64. }
  65. ]]>
  66. </script>
  67. </xhtml:head>
  68. <xhtml:body pagewidth="980" pageheight="620">
  69. <caption id="caption10" class="cell" style="left:555px; top:40px; width:80px; height:20px; "/>
  70. <caption id="caption8" class="cell" style="left:715px; top:40px; width:75px; height:20px; "/>
  71. <caption id="caption6" class="cell" style="left:635px; top:40px; width:80px; height:20px; "/>
  72. <caption id="caption7" class="cell" style="left:810px; top:40px; width:75px; height:20px; "/>
  73. <caption id="caption2" class="cell" style="left:885px; top:40px; width:75px; height:20px; "/>
  74. <datagrid id="datagrid1" nodeset="/root/datagrid1/coilResult_VO/coilResult_Row" caption="预装车标志^钢卷号^重量^实际规格^合同号^订单号^综合判定等级^进程状态^垛位^订单规格" colsep="^" colwidth="78, 100, 90, 100, 100, 90, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:60px; width:960px; height:515px; ">
  75. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  76. <col ref="OLD_SAMPL_NO" type="input" maxlength="13" style="background-color:#ffff99; "/>
  77. <col ref="ACT_WGT" type="input" format="#,###" style="background-color:#ffff99; "/>
  78. <col ref="T_W"/>
  79. <col ref="ORD_NO"/>
  80. <col ref="ORD_SEQ"/>
  81. <col ref="TOT_DEC_GRD"/>
  82. <col ref="CUR_PROG_CD"/>
  83. <col ref="CUR_LOAD_LOC" type="input" maxlength="9" style="background-color:#ffff99; "/>
  84. <col ref="IT_IW"/>
  85. </datagrid>
  86. <caption id="caption4" class="cell" style="left:0px; top:15px; width:60px; height:20px; ">钢卷号</caption>
  87. <input id="input3" ref="/root/searchData/COIL_NO" maxlength="20" style="left:60px; top:15px; width:125px; height:20px; background-color:#ffff99; ">
  88. <hint>
  89. <![CDATA[通过输入钢卷号查询需要预装的卷]]>
  90. </hint>
  91. </input>
  92. <button id="button2" style="left:885px; top:40px; width:75px; height:20px; ">
  93. <caption>增加行</caption>
  94. <script type="javascript" ev:event="onclick">
  95. <![CDATA[
  96. //点击按钮,在表格的选中位置增加行
  97. datagrid1.addRow();
  98. ]]>
  99. </script>
  100. </button>
  101. <button id="button4" style="left:810px; top:40px; width:75px; height:20px; ">
  102. <caption>取消行</caption>
  103. <script type="javascript" ev:event="onclick">
  104. <![CDATA[
  105. //点击按钮,在表格的选中位置增加行
  106. var nodeSet1 = datagrid1.nodeset;
  107. var row = null;
  108. for(var i=0;i<datagrid1.selectedRows;i++){
  109. row = datagrid1.selectedRow(i);
  110. }
  111. if(row != null){
  112. datagrid1.deleteRow(row);
  113. }
  114. datagrid1.refresh();
  115. ]]>
  116. </script>
  117. <hint>
  118. <![CDATA[删除鼠标选中的行]]>
  119. </hint>
  120. </button>
  121. <button id="button3" style="left:635px; top:40px; width:80px; height:20px; ">
  122. <caption>预装车卷选中</caption>
  123. <script type="javascript" ev:event="onclick">
  124. <![CDATA[
  125. model.removenode("/root/reqData");
  126. model.makeNode("/root/reqData");
  127. //这里加入登录用户名,会不会与已有的initData冲突
  128. model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
  129. // var nodeSet1 = datagrid1.nodeset;
  130. // var chk = null;
  131. // var OLD_SAMPL_NO = null;
  132. // var ACT_WGT = null;
  133. // var CUR_LOAD_LOC = null;
  134. // for(var i=1;i<datagrid1.rows;i++){
  135. // chk = model.getValue(nodeSet1+"["+i+"]/CHK");
  136. //
  137. // if(chk == "Y"){
  138. // model.setValue("/root/saveData/CHK",chk);
  139. // OLD_SAMPL_NO = model.getValue(nodeSet1+"["+i+"]/OLD_SAMPL_NO");
  140. // model.setValue("/root/saveData/OLD_SAMPL_NO",OLD_SAMPL_NO);
  141. // ACT_WGT = model.getValue(nodeSet1+"["+i+"]/ACT_WGT");
  142. // model.setValue("/root/saveData/ACT_WGT",ACT_WGT);
  143. // CUR_LOAD_LOC = model.getValue(nodeSet1+"["+i+"]/CUR_LOAD_LOC");
  144. // model.setValue("/root/saveData/CUR_LOAD_LOC",CUR_LOAD_LOC);
  145. //
  146. // model.duplicate("/root/reqData","/root/saveData/CHK");
  147. // model.duplicate("/root/reqData","/root/saveData/OLD_SAMPL_NO");
  148. // model.duplicate("/root/reqData","/root/saveData/ACT_WGT");
  149. // model.duplicate("/root/reqData","/root/saveData/CUR_LOAD_LOC");
  150. //
  151. // model.refresh();
  152. // }
  153. // }
  154. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  155. commSubmit("UIH051300-service", "saveCoil", "glueAction.do");
  156. alert("预装车成功!!!!");
  157. //查询预装车
  158. findCoil();
  159. model.refresh();
  160. ]]>
  161. </script>
  162. </button>
  163. <button id="button5" style="left:715px; top:40px; width:75px; height:20px; ">
  164. <caption>预装车查询</caption>
  165. <script type="javascript" ev:event="onclick">
  166. <![CDATA[
  167. findCoil();
  168. ]]>
  169. </script>
  170. </button>
  171. <button id="button6" style="left:555px; top:40px; width:80px; height:20px; ">
  172. <caption>预装车卷取消</caption>
  173. <script type="javascript" ev:event="onclick">
  174. <![CDATA[
  175. model.removenode("/root/reqData");
  176. model.makeNode("/root/reqData");
  177. //这里加入登录用户名,会不会与已有的initData冲突
  178. model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
  179. var nodeSet1 = datagrid1.nodeset;
  180. for(var i=1;i<datagrid1.rows;i++){
  181. var CHK = model.getValue(nodeSet1+"["+i+"]/CHK");
  182. if(CHK == "Y"){
  183. if(model.getValue(nodeSet1+"["+i+"]/CUR_LOAD_LOC") == ""){
  184. alert("第"+i+"行的垛位信息为空,不能进行预装车取消!!");
  185. return;
  186. }
  187. }
  188. }
  189. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  190. commSubmit("UIH051300-service", "CancelCoil", "glueAction.do");
  191. model.refresh();
  192. alert(" 预装车取消成功!!!!! ");
  193. if(model.getValue("/root/resData/rs_VO/rs_Row") == "ERROR"){
  194. alert(" 录入的垛位信息上面已经存在钢卷!! ");
  195. return;
  196. }
  197. findCoil();
  198. ]]>
  199. </script>
  200. </button>
  201. <output id="output5" ref="/root/sumData/SUM_COILRST_WGT" format="#,###" style="left:362px; top:586px; width:90px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; border-style:solid; "/>
  202. <output id="output6" ref="/root/sumData/SUM_COILRST_CNT" format="#,###" style="left:172px; top:586px; width:90px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; border-style:solid; "/>
  203. <caption id="caption1" class="cell" style="left:0px; top:585px; width:85px; height:20px; text-align:center; background-color:#ffcc99; border-color:#000000; border-style:solid; ">上表统计:</caption>
  204. <caption id="caption11" class="cell" style="left:90px; top:586px; width:80px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">钢卷总块数</caption>
  205. <caption id="caption12" class="cell" style="left:265px; top:586px; width:95px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">钢卷总重量(吨)</caption>
  206. </xhtml:body>
  207. </xhtml:html>