UIH050201.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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[热轧作业>>钢卷库管理>>钢卷库现况查询(UIH050201)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <FROM_ADDR1/>
  13. <YARD_AREA_1/>
  14. </formData>
  15. <resData/>
  16. <reqData/>
  17. <comboxData>
  18. <YARD_AREA_1/>
  19. </comboxData>
  20. <searchData/>
  21. <tempData/>
  22. <childPagesYardArr/>
  23. <childPages50200/>
  24. </root>
  25. </instance>
  26. </model>
  27. <script type="javascript" src="../../js/boaCommon.js"/>
  28. <script type="javascript" src="../../js/boaMsg.js"/>
  29. <script type="javascript">
  30. <![CDATA[
  31. //字符串补空格
  32. function unRightTrim(str,length){
  33. var strlen = str.length;
  34. if(strlen <= length)
  35. {
  36. for(var i = 0;i < length - strlen;i++)
  37. {
  38. str += " ";
  39. }
  40. }
  41. else
  42. {
  43. str = str.substr(0,length);
  44. }
  45. return str;
  46. }
  47. //查询方法
  48. function find(){
  49. model.removenode("/root/reqData");
  50. model.makeNode("/root/reqData");
  51. model.removenode("/root/resData");
  52. model.makeNode("/root/resData");
  53. if(model.getValue("/root/formData/FROM_ADDR1") == "" || model.getValue("/root/formData/YARD_AREA_1") == ""){
  54. alert(" 库区跨不能为空,请选择相应的跨! ");
  55. return;
  56. }
  57. model.duplicate("/root/reqData","/root/formData/FROM_ADDR1");
  58. model.duplicate("/root/reqData","/root/formData/YARD_AREA_1");
  59. commSubmit("UIH050201-service","find","glueAction.do");
  60. commAppendData("/root/searchData/YardCoilCnt_VO","/root/resData/YardCoilCnt_VO");
  61. var testnode = instance1.selectSingleNode("/root/resData/YardResult_VO");
  62. if(testnode == null || testnode.childNodes.length == 0)
  63. {
  64. return;
  65. }
  66. if(document.controls("group1") != null)
  67. {
  68. body.removeChild("group1");
  69. }
  70. var groupObj = body.createChild("xforms:group","id:group1;left:0px; top:57px; width:975px; height:548px; scroll:auto;" );
  71. //获取钢卷库地址,以及每个地址所存钢卷块数,并跟界面中的datagrid绑定
  72. var YardAreaNodeset = instance1.selectSingleNode("/root/resData/YardResult_VO").childNodes.length;
  73. var row,col,layer,columnHead = 0, rowHead = 0;
  74. var yard = "",coilNo = "",flag = 0,imgSrc = "../../images/yard/coil1.gif";
  75. for(var i = 1;i<=YardAreaNodeset;i++)
  76. {
  77. //行
  78. row = parseInt(model.getValue("/root/resData/YardResult_VO/YardResult_Row[" + i + "]/SROW"),10);
  79. //列
  80. col = parseInt(model.getValue("/root/resData/YardResult_VO/YardResult_Row[" + i + "]/SCOL"),10);
  81. //层
  82. layer = parseInt(model.getValue("/root/resData/YardResult_VO/YardResult_Row[" + i + "]/SLAYER"),10);
  83. if (row > rowHead)
  84. {
  85. rowHead++;
  86. document.controls("group1").createChild("xforms:output", "id:row"+rowHead+";left:10px;top:"+ ((rowHead * 85) + 30) +"px;width:"+ 20 +"px; height:"+ 20 +"px; text:" + rowHead + ";background-color:#ffffff");
  87. }
  88. if (col > columnHead)
  89. {
  90. columnHead++;
  91. document.controls("group1").createChild("xforms:output", "id:col"+columnHead+";left:"+((columnHead * 50)+20)+"px;top:20px;width:30px; height:20px; text:" + columnHead + ";background-color:#ffffff");
  92. //(columnHead * 60 - (columnHead % 2 == 1 ? 0 : 20))
  93. }
  94. if (layer == 1)
  95. {
  96. document.controls("group1").createChild("xforms:img", "id:yard|" + row + "-" + col + ";src:../../images/yard/yard.gif;navindex:-1;left:"+ (col * 50) +"px;top:"+ (row * 85 + 5) +"px;width:"+ 50 +"px; height:"+ 50 +"px;background-stretch:stretch;");
  97. //(col * 60 - (1-col%2)*20 + 8)
  98. }
  99. }
  100. testnode = instance1.selectSingleNode("/root/resData/CoilResult_VO");
  101. if(testnode == null || testnode.childNodes.length == 0)
  102. {
  103. return;
  104. }
  105. var coilNodeset = instance1.selectSingleNode("/root/resData/CoilResult_VO").childNodes.length;
  106. for(var i = 1;i<=coilNodeset;i++)
  107. {
  108. //行
  109. row = parseInt(model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/SROW"),10);
  110. //列
  111. col = parseInt(model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/SCOL"),10);
  112. //层
  113. layer = parseInt(model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/SLAYER"),10);
  114. // 垛位
  115. yard = model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/YARD");
  116. //钢卷号
  117. coilNo = model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/COIL_NO");
  118. //钢卷状态标识
  119. flag = model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/FLAG");
  120. if (coilNo != null && coilNo != "")
  121. {
  122. var text = unRightTrim("钢卷详细信息\r\n");
  123. text += unRightTrim("钢卷号 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/COIL_NO"),30) + "\r\n";
  124. text += unRightTrim("垛 位 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/YARD"),30) + "\r\n";
  125. text += unRightTrim("牌 号 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/SPEC_STL_GRD"),30) + "\r\n";
  126. text += unRightTrim("厚 度 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/COIL_THK"),30) + "\r\n";
  127. text += unRightTrim("宽 度 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/COIL_WTH"),30) + "\r\n";
  128. text += unRightTrim("重 量 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/ACT_WGT"),30) + "\r\n";
  129. text += unRightTrim("合同号 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/ORD_NO"),30) + "\r\n";
  130. text += unRightTrim("订单号 : " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/ORD_SEQ"),30) + "\r\n";
  131. text += unRightTrim("入库日期: " + model.getValue("/root/resData/CoilResult_VO/CoilResult_Row[" + i + "]/YARD_ENTRY_DTIME"),30) + "\r\n";
  132. //alert(text.length);
  133. if(flag == '1'){
  134. imgSrc = "../../images/yard/coil1.gif";
  135. }
  136. else if(flag == '2'){
  137. imgSrc = "../../images/yard/coil2.gif";
  138. }
  139. else if(flag == '3'){
  140. imgSrc = "../../images/yard/coil4.gif";
  141. }
  142. else if(flag == '4'){
  143. imgSrc = "../../images/yard/coil3.gif";
  144. }
  145. ///钢卷悬空时自动下降,如不需要自动下降时屏蔽此代码
  146. ///begin
  147. while(layer > 1)
  148. {
  149. if(!document.controls(row + "-" + col + "-" + (layer - 1)) && document.controls("yard|"+ row + "-" + col))
  150. {
  151. layer -= 1;
  152. continue;
  153. }
  154. else if(!document.controls(row + "-" + (col + 1) + "-" + (layer - 1)))
  155. {
  156. layer -= 1;
  157. col += 1;
  158. continue;
  159. }
  160. else
  161. {
  162. break;
  163. }
  164. }
  165. var coilObj = document.controls("group1").createChild("xforms:img", "id:" + row + "-"+ col + "-" + layer +";src:"+imgSrc+";left:"+ (col * 50 + (layer - 1) * 25) +"px;top:"+ (row * 85 - (layer - 1) * 20) +"px;width:"+ 50 +"px; height:"+ 50 +"px;background-stretch:stretch;text-align:left;");
  166. ///end
  167. //var coilObj = document.controls("group1").createChild("xforms:img", "id:" + coilNo + "-" + layer +";src:"+imgSrc+";left:"+ (col * 50 + (layer - 1) * 25) +"px;top:"+ (row * 85 - (layer - 1) * 20) +"px;width:"+ 50 +"px; height:"+ 50 +"px;background-stretch:stretch;text-align:left;");
  168. //(col * 60 - (1-col%2)*20 - (layer - 1) * 5)
  169. coilObj.hint = text;
  170. }
  171. }
  172. model.refresh();
  173. }
  174. //清除节点下内容,包括子节点 或 值
  175. function clearNode(xPath){
  176. model1.removenode(xPath);
  177. model1.makeNode(xPath);
  178. }
  179. ]]>
  180. </script>
  181. </xhtml:head>
  182. <xhtml:body>
  183. <output id="output4" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/SPM_YN_T_CNT" style="left:921px; top:5px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  184. <output id="output5" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/YARD_CLF_SPM_CNT" style="left:921px; top:30px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  185. <output id="output6" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/YARD_CLF_GRD_CNT" style="left:758px; top:30px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  186. <caption id="caption1" class="cell" style="left:494px; top:5px; width:100px; height:20px; border-color:#000000; ">钢卷总个数</caption>
  187. <select1 id="combo1" ref="/root/formData/FROM_ADDR1" appearance="minimal" style="left:102px; top:5px; width:83px; height:20px; border-color:#000000; ">
  188. <choices>
  189. <item>
  190. <label>C1跨</label>
  191. <value>C1</value>
  192. </item>
  193. <item>
  194. <label>C2跨</label>
  195. <value>C2</value>
  196. </item>
  197. <item>
  198. <label>C3跨</label>
  199. <value>C3</value>
  200. </item>
  201. <item>
  202. <label>临时跨</label>
  203. <value>C4</value>
  204. </item>
  205. </choices>
  206. <script type="javascript" ev:event="xforms-value-changed">
  207. <![CDATA[
  208. //alert(document.controls("combo2").attribute("id"));
  209. //具体仓库位置的情况
  210. clearNode("/root/reqData");
  211. clearNode("/root/comboxData/YARD_AREA_1");
  212. model.duplicate("/root/reqData","/root/formData/FROM_ADDR1");
  213. commSubmit("UIH050020-service","selectC2","glueAction.do");
  214. commAppendData("/root/comboxData/YARD_AREA_1/FROMADDR2_VO","/root/resData/FROMADDR2_VO");
  215. //document.controls("combo2").navindex = 1;
  216. model.refresh();
  217. ]]>
  218. </script>
  219. </select1>
  220. <caption id="caption2" class="cell" style="left:0px; top:5px; width:100px; height:20px; font-size:14pt; font-weight:bold; border-color:#000000; ">库区跨</caption>
  221. <caption id="caption4" class="cell" style="left:494px; top:30px; width:100px; height:20px; border-color:#000000; ">跨内个数</caption>
  222. <caption id="caption5" class="cell" style="left:655px; top:5px; width:100px; height:20px; border-color:#000000; ">综合判定总个数</caption>
  223. <caption id="caption6" class="cell" style="left:819px; top:5px; width:100px; height:20px; border-color:#000000; ">平整分卷个数</caption>
  224. <caption id="caption7" class="cell" style="left:655px; top:31px; width:100px; height:20px; border-color:#000000; ">跨内判定个数</caption>
  225. <caption id="caption8" class="cell" style="left:819px; top:30px; width:100px; height:20px; border-color:#000000; ">跨内分卷个数</caption>
  226. <output id="output1" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/ALL_T_CNT" style="left:596px; top:5px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  227. <output id="output2" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/YARD_CLF_CNT" style="left:596px; top:30px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  228. <output id="output3" ref="/root/searchData/YardCoilCnt_VO/YardCoilCnt_Row/ALL_GRD_T_CNT" style="left:758px; top:5px; width:55px; height:20px; background-color:#dddddd; border-color:#000000; "/>
  229. <line id="line1" style="x1:0px; y1:55px; x2:980px; y2:55px; "/>
  230. <select1 id="combo2" ref="/root/formData/YARD_AREA_1" appearance="minimal" style="left:190px; top:5px; width:80px; height:20px; border-color:#000000; ">
  231. <choices>
  232. <itemset nodeset="/root/comboxData/YARD_AREA_1/FROMADDR2_VO/FROMADDR2_Row">
  233. <label ref="LABEL"/>
  234. <value ref="VALUE"/>
  235. </itemset>
  236. </choices>
  237. </select1>
  238. <group id="group1" scroll="auto" style="left:0px; top:57px; width:975px; height:548px; "/>
  239. <script type="javascript" ev:event="onkeypress">
  240. <![CDATA[
  241. //find();
  242. ]]>
  243. </script>
  244. <caption id="caption3" class="cell" style="left:65px; top:30px; width:60px; height:20px; font-size:14pt; font-weight:bold; background-color:#87B787; ">移送板加</caption>
  245. <caption id="caption9" class="cell" style="left:130px; top:30px; width:60px; height:20px; font-size:14pt; font-weight:bold; background-color:#8797B7; ">移送冷轧</caption>
  246. <caption id="caption10" class="cell" style="left:195px; top:30px; width:60px; height:20px; font-size:14pt; font-weight:bold; background-color:#B7A787; ">余材</caption>
  247. <caption id="caption11" class="cell" style="left:0px; top:30px; width:60px; height:20px; font-size:14pt; font-weight:bold; background-color:#A3A4A5; ">热轧销售</caption>
  248. </xhtml:body>
  249. </xhtml:html>