232086684ba70c67dde940a5dc8a242a07ad311a.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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[炼钢作业 >> 板坯库管理 >> 板坯新增与明细查询(UIG020063)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <grid/>
  12. <formData>
  13. <SLAB_NO/>
  14. </formData>
  15. <resData/>
  16. <reqData/>
  17. <initResult/>
  18. <totalData>
  19. <slabCnt/>
  20. <slabWgt/>
  21. </totalData>
  22. <codeData/>
  23. <initData>
  24. <LG_CD>F01002,F01002,E01010,E01007,D01003,D01001,G04001,B01136,E01002,A01004,G03004,G03004</LG_CD>
  25. </initData>
  26. <combData/>
  27. <fwdData>
  28. <UID010031>
  29. <ORD_NO/>
  30. <ORD_SEQ/>
  31. <URL/>
  32. </UID010031>
  33. </fwdData>
  34. </root>
  35. </instance>
  36. <script type="javascript" ev:event="xforms-ready">
  37. <![CDATA[
  38. // initPage();
  39. ]]>
  40. </script>
  41. </model>
  42. <script type="javascript" src="../../js/boaCommon.js"/>
  43. <script type="javascript" src="../../js/boaMsg.js"/>
  44. <script type="javascript" src="../../js/mesCommon.js"/>
  45. <script type="javascript">
  46. <![CDATA[
  47. function excelExport(){
  48. return datagrid1;
  49. }
  50. // function initPage(){
  51. //
  52. // commSendReq("/root/initData");
  53. // commSubmit("UIGCOMMCODE-service","find","glueAction.do");
  54. // model.copyNode("/root/codeData","/root/resData");
  55. // commSendReq("root/reqData");
  56. //
  57. // commSubmit("UIG04COMBOX-service","stlSch","glueAction.do");
  58. // model.copyNode("/root/combData","/root/resData");
  59. // model.refresh();
  60. // }
  61. function find()
  62. {
  63. if(input1.value == "")
  64. {
  65. window.alert("请输入板坯号进行查询!" , "提示");
  66. return;
  67. }
  68. commSendReq("/root/formData");
  69. commSubmit("UIG020063-service","find","glueAction.do");
  70. commAppendData("/root/grid/SLAB_YARD_INFO_RESULT_VO","/root/resData/SLAB_YARD_INFO_RESULT_VO");
  71. var slabCnt = 0;
  72. var slabWgt = 0;
  73. datagrid1.refresh();
  74. for(var i = 1 ; i < datagrid1.rows-1 ; i++){
  75. slabCnt = slabCnt + 1;
  76. slabWgt = slabWgt + parseFloat(datagrid1.valueMatrix(i+1,datagrid1.colRef("SLAB_WGT")));
  77. }
  78. //model.setValue("/root/totalData/slabCnt",slabCnt);
  79. //model.setValue("/root/totalData/slabWgt",slabWgt/1000);
  80. //output1.refresh();
  81. //output2.refresh();
  82. datagrid1.rebuildStyle();
  83. datagrid1.refresh();
  84. model.setValue("/root/totalData/slabCnt",slabCnt);
  85. model.setValue("/root/totalData/slabWgt",slabWgt/1000);
  86. output1.refresh();
  87. output2.refresh();
  88. model.refresh();
  89. }
  90. function copyGrid(gridID)
  91. {
  92. var tg = gridID.substr(8,1)
  93. gridID = document.all(gridID);
  94. var nodeset = gridID.nodeset;
  95. var nodeCnt2 = parseInt(model.getXPathValue("count(" + nodeset + ")"));
  96. var rowcnt = nodeCnt2 - 1;
  97. var slabno = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_NO");
  98. //var planstlgrd = model.getValue(gridID.nodeset + "[" + rowcnt + "]/PLAN_STL_GRD");//PLAN_STL_GRD
  99. var stlgrd = model.getValue(gridID.nodeset + "[" + rowcnt + "]/STL_GRD");
  100. var slabthk = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_THK");
  101. var slabwth = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WTH");
  102. var slablen = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_LEN");
  103. var slabWgt = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WGT");
  104. var nslab = Number(slabno)+10;
  105. // 新增板坯
  106. if(nslab < 100) nslab = "0" + nslab;
  107. // 根据gridID区分表是 datagrid1 datagrid2
  108. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_NO",slabno);
  109. //model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/PLAN_STL_GRD",planstlgrd);
  110. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/STL_GRD",stlgrd);
  111. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_THK",slabthk);
  112. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_WTH",slabwth);
  113. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_LEN",slablen);
  114. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_WGT",slabWgt);
  115. //model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/HCR_CLF","C");
  116. model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/ORD_FL","2");
  117. //model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SURPLMATL_YN","S");
  118. model.refresh();
  119. }
  120. function save(){
  121. //整个表格提交,这里只提供保存数据的方法
  122. model1.removenode("/root/reqData");
  123. model1.makeNode("/root/reqData");
  124. // if(datagrid1.rows <= 1){
  125. // alert(" 请先选择库存区域! ");
  126. // return;
  127. // }
  128. // alert(" 请先选择库存区域! ");
  129. // var mark = null;
  130. // var nodeSet1 = datagrid1.nodeset;
  131. // for(var i=1;i<=datagrid1.rows;i++){
  132. // var chk = model.getValue(nodeSet1+"["+i+"]/CHK");
  133. //
  134. // if(chk == "Y"){
  135. // mark = 1;
  136. // }
  137. // }
  138. /*if(mark != null){*/
  139. //这里整体把datagrid2表格提交
  140. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  141. //这里加入登录用户名,会不会与已有的initData冲突
  142. //model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
  143. // commSubmit("UIH050400-service","save","glueAction.do");
  144. commSubmit("UIG020063-service","save","glueAction.do");
  145. model.refresh();
  146. // }
  147. //find();
  148. }
  149. // function fowardUID010031(gridID) {
  150. // if(gridID.col == gridID.colRef("INGR_YN")) {
  151. // model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
  152. // model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
  153. // model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
  154. // var java = window.parent.javaScript;
  155. // java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
  156. // }
  157. // }
  158. function commElearDate(ldate){
  159. ldate =(typeof ldate == 'string')? Number(ldate) : ldate;
  160. if(ldate == 0)ldate = 10000; //全部
  161. var curDate = "";
  162. var d = new Date;
  163. d.setDate(d.getDate( ) + ldate);
  164. var monString = (d.getMonth() + 1)+"";
  165. var dateString = d.getDate()+"";
  166. if(monString.length == 1){
  167. monString = "0" + monString;
  168. }
  169. if(dateString.length == 1){
  170. dateString = "0"+ dateString;
  171. }
  172. curDate += d.getYear();
  173. curDate += monString;
  174. curDate += dateString;
  175. return curDate;
  176. }
  177. ]]>
  178. </script>
  179. </xhtml:head>
  180. <xhtml:body guideline="1,960;2,620;2,619;2,619;">
  181. <caption id="caption2" class="cell" style="left:20px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; ">板 坯 号</caption>
  182. <input id="input1" ref="/root/formData/SLAB_NO" style="left:80px; top:10px; width:85px; height:20px; "/>
  183. <datagrid id="datagrid1" nodeset="/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row" visibility="visible" caption="选择^板坯号^钢种^厚^宽^长^重量^称重重量(吨)^堆垛位置^入库时间^在库时间^去向^物料进程^订单区分^余材原因^外观缺陷^综合判定^判定依据^成分等级^产地^切割时间^切割班次^切割组^切割人|选择^板坯号^钢种^厚^宽^长^重量^称重重量(吨)^堆垛位置^入库时间^在库时间^去向^物料进程^订单区分^余材原因^外观缺陷^综合判定^判定依据^成分等级^产地^切割时间^切割班次^切割组^切割人" colsep="^" colwidth="63, 100, 100, 30, 40, 40, 50, 100, 60, 100, 100, 35, 100, 35, 62, 100, 100, 60, 71, 47, 100, 37, 37, 65" explorerbar="sortshow" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:1px; top:70px; width:959px; height:470px; ">
  184. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  185. <col editable="true" ref="SLAB_NO" type="input"/>
  186. <col editable="true" ref="STL_GRD" type="input"/>
  187. <col editable="true" ref="SLAB_THK" type="input"/>
  188. <col editable="true" ref="SLAB_WTH" type="input"/>
  189. <col editable="true" ref="SLAB_LEN" type="input"/>
  190. <col editable="true" ref="SLAB_WGT" type="input"/>
  191. <col editable="false" ref="WEIGHT_WGT" type="input"/>
  192. <col editable="false" ref="CUR_LOAD_LOC" type="input"/>
  193. <col editable="false" ref="SLAB_STOCK_ENT_DTIME" type="input" format="yyyy-mm-dd hh:nn"/>
  194. <col ref="ZKSJ" visibility="hidden"/>
  195. <col disabled="true" ref="SLAB_RT" type="combo">
  196. <choices>
  197. <item>
  198. <label>热轧厂</label>
  199. <value>热轧厂</value>
  200. </item>
  201. <item>
  202. <label>中板厂</label>
  203. <value>中板厂</value>
  204. </item>
  205. <item>
  206. <label>厚板厂</label>
  207. <value>厚板厂</value>
  208. </item>
  209. </choices>
  210. </col>
  211. <col ref="CUR_PROG_CD"/>
  212. <col disabled="true" ref="ORD_FL"/>
  213. <col disabled="true" ref="NONORD_CAUSE_CD"/>
  214. <col ref="CRK_CD1" type="input"/>
  215. <col ref="SLAB_TOT_DEC_GRD" style="left:926px; top:41px; width:100px; height:21px; "/>
  216. <col ref="SLAB_INGR_DEC_KIND"/>
  217. <col disabled="true" ref="SLAB_INGR_DEC_GRD"/>
  218. <col ref="CHANDI"/>
  219. <col editable="false" ref="SLAB_CUT_DTIME" type="input" format="yyyy-mm-dd hh:nn"/>
  220. <col disabled="true" ref="CUT_WKSHIFT"/>
  221. <col disabled="true" ref="CUT_WKGROUP"/>
  222. <col ref="CUT_EMP_ID"/>
  223. <script type="javascript" ev:event="onclick">
  224. <![CDATA[
  225. // fowardUID010031(datagrid1);
  226. // ]]>
  227. </script>
  228. </datagrid>
  229. <caption id="caption9" class="cell" style="left:180px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">块数合计</caption>
  230. <caption id="caption10" class="cell" style="left:315px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">重量合计</caption>
  231. <output id="output1" ref="/root/totalData/slabCnt" style="left:250px; top:10px; width:40px; height:20px; text-align:center; "/>
  232. <output id="output2" ref="/root/totalData/slabWgt" style="left:380px; top:10px; width:65px; height:20px; text-align:center; "/>
  233. <caption id="caption11" style="left:290px; top:10px; width:20px; height:20px; font-weight:bold; ">块</caption>
  234. <caption id="caption12" style="left:455px; top:10px; width:20px; height:20px; font-weight:bold; ">吨</caption>
  235. <line id="line2" style="x1:240px; y1:30px; x2:290px; y2:30px; "/>
  236. <line id="line3" style="x1:375px; y1:30px; x2:455px; y2:30px; "/>
  237. <script type="javascript" ev:event="onkeypress">
  238. <![CDATA[
  239. if(event.keyCode == 13){
  240. find();
  241. }
  242. ]]>
  243. </script>
  244. <line id="line5" style="x1:973px; y1:0px; x2:978px; y2:0px; "/>
  245. <caption id="caption26" class="cell" visibility="hidden" style="left:495px; top:195px; width:82px; height:20px; font-weight:bold; border-color:#000000; ">判定滞后时间</caption>
  246. <input id="input6" ref="/root/formData/IGR_LAG_FROM_DTIME" visibility="hidden" style="left:575px; top:195px; width:63px; height:20px; "/>
  247. <caption id="caption27" class="cell" visibility="hidden" style="left:495px; top:220px; width:86px; height:20px; font-weight:bold; border-color:#000000; ">切割滞后时间</caption>
  248. <input id="input7" ref="/root/formData/CUT_LAG_FROM_DTIME" visibility="hidden" style="left:580px; top:220px; width:63px; height:20px; "/>
  249. <input id="input8" ref="/root/formData/IGR_LAG_TO_DTIME" visibility="hidden" style="left:640px; top:195px; width:63px; height:20px; "/>
  250. <input id="input9" ref="/root/formData/CUT_LAG_TO_DTIME" visibility="hidden" style="left:645px; top:220px; width:58px; height:20px; "/>
  251. <select1 id="combo22" ref="/root/formData/PRD_TY" visibility="hidden" appearance="minimal" style="left:710px; top:210px; width:85px; height:20px; ">
  252. <choices>
  253. <itemset nodeset="/root/codeData/COMM_CODE_RESULT_VO/COMM_CODE_RESULT_Row[LG_CD = 'A01004' or LG_CD ='A']">
  254. <label ref="SM_CFNM"/>
  255. <value ref="SM_CD"/>
  256. </itemset>
  257. </choices>
  258. <script type="javascript" ev:event="xforms-value-changed">
  259. <![CDATA[
  260. model.setValue("/root/formData/CMT_DLIV_DEVLMT_DATE",commElearDate(model.getValue("/root/formData/CMT_DLIV_DEVLMT_DATE_temp")));
  261. ]]>
  262. </script>
  263. </select1>
  264. <button id="button1" visibility="visible" style="left:575px; top:10px; width:70px; height:20px; background-color:#ff9900; ">
  265. <caption>查询</caption>
  266. <script type="javascript" ev:event="onclick">
  267. <![CDATA[
  268. find();
  269. ]]>
  270. </script>
  271. </button>
  272. <button id="button2" visibility="hidden" style="left:655px; top:10px; width:65px; height:20px; background-color:#ff9900; ">
  273. <caption>添加</caption>
  274. <script type="javascript" ev:event="onclick">
  275. <![CDATA[
  276. save();
  277. ]]>
  278. </script>
  279. </button>
  280. <button id="button3" visibility="visible" style="left:490px; top:10px; width:60px; height:20px; color:#000000; background-color:#c0c0c0; ">
  281. <caption>行增加</caption>
  282. <script type="javascript" ev:event="onclick">
  283. <![CDATA[
  284. //点击按钮,在表格的选中位置增加行
  285. var rw;
  286. for(var i=0;i<=datagrid1.selectedRows;i++){
  287. rw = datagrid1.selectedRow(i);
  288. if(Number(rw) == Number(datagrid1.Rows-1)){
  289. //如果选中的是最后一行,在后面新加一行
  290. datagrid1.addRow();
  291. copyGrid("datagrid1");
  292. }else{
  293. //如果不是最后一行的话,在选中行的下面加入一行
  294. datagrid1.insertRow(Number(rw+1));
  295. }
  296. }
  297. ]]>
  298. </script>
  299. </button>
  300. </xhtml:body>
  301. </xhtml:html>