| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>
- <![CDATA[炼钢作业 >> 板坯库管理 >> 板坯新增与明细查询(UIG020063)]]>
- </xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <grid/>
- <formData>
- <SLAB_NO/>
- </formData>
- <resData/>
- <reqData/>
- <initResult/>
- <totalData>
- <slabCnt/>
- <slabWgt/>
- </totalData>
- <codeData/>
- <initData>
- <LG_CD>F01002,F01002,E01010,E01007,D01003,D01001,G04001,B01136,E01002,A01004,G03004,G03004</LG_CD>
- </initData>
- <combData/>
- <fwdData>
- <UID010031>
- <ORD_NO/>
- <ORD_SEQ/>
- <URL/>
- </UID010031>
- </fwdData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // initPage();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/mesCommon.js"/>
- <script type="javascript">
- <![CDATA[
- function excelExport(){
- return datagrid1;
- }
- // function initPage(){
- //
- // commSendReq("/root/initData");
- // commSubmit("UIGCOMMCODE-service","find","glueAction.do");
- // model.copyNode("/root/codeData","/root/resData");
- // commSendReq("root/reqData");
- //
- // commSubmit("UIG04COMBOX-service","stlSch","glueAction.do");
- // model.copyNode("/root/combData","/root/resData");
- // model.refresh();
- // }
- function find()
- {
- if(input1.value == "")
- {
- window.alert("请输入板坯号进行查询!" , "提示");
- return;
- }
-
- commSendReq("/root/formData");
-
- commSubmit("UIG020063-service","find","glueAction.do");
-
-
- commAppendData("/root/grid/SLAB_YARD_INFO_RESULT_VO","/root/resData/SLAB_YARD_INFO_RESULT_VO");
-
- var slabCnt = 0;
- var slabWgt = 0;
- datagrid1.refresh();
- for(var i = 1 ; i < datagrid1.rows-1 ; i++){
- slabCnt = slabCnt + 1;
- slabWgt = slabWgt + parseFloat(datagrid1.valueMatrix(i+1,datagrid1.colRef("SLAB_WGT")));
-
- }
-
- //model.setValue("/root/totalData/slabCnt",slabCnt);
- //model.setValue("/root/totalData/slabWgt",slabWgt/1000);
- //output1.refresh();
- //output2.refresh();
-
- datagrid1.rebuildStyle();
-
- datagrid1.refresh();
-
-
- model.setValue("/root/totalData/slabCnt",slabCnt);
- model.setValue("/root/totalData/slabWgt",slabWgt/1000);
- output1.refresh();
- output2.refresh();
- model.refresh();
- }
- function copyGrid(gridID)
- {
- var tg = gridID.substr(8,1)
- gridID = document.all(gridID);
- var nodeset = gridID.nodeset;
- var nodeCnt2 = parseInt(model.getXPathValue("count(" + nodeset + ")"));
- var rowcnt = nodeCnt2 - 1;
- var slabno = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_NO");
- //var planstlgrd = model.getValue(gridID.nodeset + "[" + rowcnt + "]/PLAN_STL_GRD");//PLAN_STL_GRD
- var stlgrd = model.getValue(gridID.nodeset + "[" + rowcnt + "]/STL_GRD");
- var slabthk = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_THK");
- var slabwth = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WTH");
- var slablen = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_LEN");
- var slabWgt = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WGT");
- var nslab = Number(slabno)+10;
-
- // 新增板坯
- if(nslab < 100) nslab = "0" + nslab;
-
- // 根据gridID区分表是 datagrid1 datagrid2
-
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_NO",slabno);
- //model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/PLAN_STL_GRD",planstlgrd);
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/STL_GRD",stlgrd);
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_THK",slabthk);
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_WTH",slabwth);
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_LEN",slablen);
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/SLAB_WGT",slabWgt);
- //model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/HCR_CLF","C");
- model.setValue("/root/grid/SLAB_YARD_INFO_RESULT_VO/SLAB_YARD_INFO_RESULT_Row["+nodeCnt2+"]/ORD_FL","2");
- //model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SURPLMATL_YN","S");
-
- model.refresh();
-
- }
- function save(){
- //整个表格提交,这里只提供保存数据的方法
- model1.removenode("/root/reqData");
- model1.makeNode("/root/reqData");
-
- // if(datagrid1.rows <= 1){
- // alert(" 请先选择库存区域! ");
- // return;
- // }
- // alert(" 请先选择库存区域! ");
- // var mark = null;
- // var nodeSet1 = datagrid1.nodeset;
- // for(var i=1;i<=datagrid1.rows;i++){
- // var chk = model.getValue(nodeSet1+"["+i+"]/CHK");
- //
- // if(chk == "Y"){
- // mark = 1;
- // }
- // }
- /*if(mark != null){*/
- //这里整体把datagrid2表格提交
- commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
-
- //这里加入登录用户名,会不会与已有的initData冲突
- //model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
-
- // commSubmit("UIH050400-service","save","glueAction.do");
- commSubmit("UIG020063-service","save","glueAction.do");
- model.refresh();
-
- // }
- //find();
- }
- // function fowardUID010031(gridID) {
- // if(gridID.col == gridID.colRef("INGR_YN")) {
- // model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
- // model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
- // model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
- // var java = window.parent.javaScript;
- // java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
- // }
- // }
-
- function commElearDate(ldate){
-
- ldate =(typeof ldate == 'string')? Number(ldate) : ldate;
- if(ldate == 0)ldate = 10000; //全部
- var curDate = "";
- var d = new Date;
- d.setDate(d.getDate( ) + ldate);
- var monString = (d.getMonth() + 1)+"";
- var dateString = d.getDate()+"";
- if(monString.length == 1){
- monString = "0" + monString;
- }
- if(dateString.length == 1){
- dateString = "0"+ dateString;
- }
- curDate += d.getYear();
- curDate += monString;
- curDate += dateString;
-
- return curDate;
- }
-
-
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,960;2,620;2,619;2,619;">
- <caption id="caption2" class="cell" style="left:20px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; ">板 坯 号</caption>
- <input id="input1" ref="/root/formData/SLAB_NO" style="left:80px; top:10px; width:85px; height:20px; "/>
- <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; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col editable="true" ref="SLAB_NO" type="input"/>
- <col editable="true" ref="STL_GRD" type="input"/>
- <col editable="true" ref="SLAB_THK" type="input"/>
- <col editable="true" ref="SLAB_WTH" type="input"/>
- <col editable="true" ref="SLAB_LEN" type="input"/>
- <col editable="true" ref="SLAB_WGT" type="input"/>
- <col editable="false" ref="WEIGHT_WGT" type="input"/>
- <col editable="false" ref="CUR_LOAD_LOC" type="input"/>
- <col editable="false" ref="SLAB_STOCK_ENT_DTIME" type="input" format="yyyy-mm-dd hh:nn"/>
- <col ref="ZKSJ" visibility="hidden"/>
- <col disabled="true" ref="SLAB_RT" type="combo">
- <choices>
- <item>
- <label>热轧厂</label>
- <value>热轧厂</value>
- </item>
- <item>
- <label>中板厂</label>
- <value>中板厂</value>
- </item>
- <item>
- <label>厚板厂</label>
- <value>厚板厂</value>
- </item>
- </choices>
- </col>
- <col ref="CUR_PROG_CD"/>
- <col disabled="true" ref="ORD_FL"/>
- <col disabled="true" ref="NONORD_CAUSE_CD"/>
- <col ref="CRK_CD1" type="input"/>
- <col ref="SLAB_TOT_DEC_GRD" style="left:926px; top:41px; width:100px; height:21px; "/>
- <col ref="SLAB_INGR_DEC_KIND"/>
- <col disabled="true" ref="SLAB_INGR_DEC_GRD"/>
- <col ref="CHANDI"/>
- <col editable="false" ref="SLAB_CUT_DTIME" type="input" format="yyyy-mm-dd hh:nn"/>
- <col disabled="true" ref="CUT_WKSHIFT"/>
- <col disabled="true" ref="CUT_WKGROUP"/>
- <col ref="CUT_EMP_ID"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- // fowardUID010031(datagrid1);
- // ]]>
- </script>
- </datagrid>
- <caption id="caption9" class="cell" style="left:180px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">块数合计</caption>
- <caption id="caption10" class="cell" style="left:315px; top:10px; width:60px; height:20px; font-weight:bold; background-color:#c0c0c0; border-color:#000000; ">重量合计</caption>
- <output id="output1" ref="/root/totalData/slabCnt" style="left:250px; top:10px; width:40px; height:20px; text-align:center; "/>
- <output id="output2" ref="/root/totalData/slabWgt" style="left:380px; top:10px; width:65px; height:20px; text-align:center; "/>
- <caption id="caption11" style="left:290px; top:10px; width:20px; height:20px; font-weight:bold; ">块</caption>
- <caption id="caption12" style="left:455px; top:10px; width:20px; height:20px; font-weight:bold; ">吨</caption>
- <line id="line2" style="x1:240px; y1:30px; x2:290px; y2:30px; "/>
- <line id="line3" style="x1:375px; y1:30px; x2:455px; y2:30px; "/>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == 13){
- find();
- }
- ]]>
- </script>
- <line id="line5" style="x1:973px; y1:0px; x2:978px; y2:0px; "/>
- <caption id="caption26" class="cell" visibility="hidden" style="left:495px; top:195px; width:82px; height:20px; font-weight:bold; border-color:#000000; ">判定滞后时间</caption>
- <input id="input6" ref="/root/formData/IGR_LAG_FROM_DTIME" visibility="hidden" style="left:575px; top:195px; width:63px; height:20px; "/>
- <caption id="caption27" class="cell" visibility="hidden" style="left:495px; top:220px; width:86px; height:20px; font-weight:bold; border-color:#000000; ">切割滞后时间</caption>
- <input id="input7" ref="/root/formData/CUT_LAG_FROM_DTIME" visibility="hidden" style="left:580px; top:220px; width:63px; height:20px; "/>
- <input id="input8" ref="/root/formData/IGR_LAG_TO_DTIME" visibility="hidden" style="left:640px; top:195px; width:63px; height:20px; "/>
- <input id="input9" ref="/root/formData/CUT_LAG_TO_DTIME" visibility="hidden" style="left:645px; top:220px; width:58px; height:20px; "/>
- <select1 id="combo22" ref="/root/formData/PRD_TY" visibility="hidden" appearance="minimal" style="left:710px; top:210px; width:85px; height:20px; ">
- <choices>
- <itemset nodeset="/root/codeData/COMM_CODE_RESULT_VO/COMM_CODE_RESULT_Row[LG_CD = 'A01004' or LG_CD ='A']">
- <label ref="SM_CFNM"/>
- <value ref="SM_CD"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- model.setValue("/root/formData/CMT_DLIV_DEVLMT_DATE",commElearDate(model.getValue("/root/formData/CMT_DLIV_DEVLMT_DATE_temp")));
- ]]>
- </script>
- </select1>
- <button id="button1" visibility="visible" style="left:575px; top:10px; width:70px; height:20px; background-color:#ff9900; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button2" visibility="hidden" style="left:655px; top:10px; width:65px; height:20px; background-color:#ff9900; ">
- <caption>添加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <button id="button3" visibility="visible" style="left:490px; top:10px; width:60px; height:20px; color:#000000; background-color:#c0c0c0; ">
- <caption>行增加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //点击按钮,在表格的选中位置增加行
- var rw;
- for(var i=0;i<=datagrid1.selectedRows;i++){
- rw = datagrid1.selectedRow(i);
-
- if(Number(rw) == Number(datagrid1.Rows-1)){
- //如果选中的是最后一行,在后面新加一行
- datagrid1.addRow();
- copyGrid("datagrid1");
- }else{
- //如果不是最后一行的话,在选中行的下面加入一行
- datagrid1.insertRow(Number(rw+1));
- }
- }
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|