| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/css" href="../../css/body.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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <ORD_NO/>
- <ORD_SEQ/>
- <ASSEMBLE_CNT>2</ASSEMBLE_CNT>
- <slabthk1/>
- <slabthk2/>
- <slabwth1/>
- <slabwth2/>
- <coilthk1/>
- <coilthk2/>
- <coilwhk1/>
- <coilwth2/>
- </formData>
- <gridData>
- <slabDnRst/>
- </gridData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- datagrid1.fixedcellcheckbox(0,datagrid1.colRef("CHK"))=true;
- datagrid1.colStatus(0)=false;
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/dCommon.js"/>
- <script type="javascript">
- <![CDATA[
- //1、获取用户登录信息,只能在页面初始化函数中调用
- function InitParams(node)
- {
- if (typeof node == "undefined" && typeof node != "object") return;
- model.removenode("/root/initData/rcvInfo");
- model.makeNode("/root/initData/rcvInfo");
- var nodeList = node.childNodes;
- for (var i = 0; i < nodeList.length; i++)
- model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
- }
-
- //2. 页面初始化函数(必须)
- function Init(node)
- {
- InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
- // 在程序中会重建该节点,最好不要重名
- // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
- //...
- }
-
- //3、页面标题
- function setTitle()
- {
- return "工序计划 >> 板坯设计 >> 板坯组合设计2"; // 如:return "进程管理 >> 订单进程现况查询";
- }
-
- function pageInitTree()
- {
- for(var i=1; i<datagrid1.rows; i++)
- {
- if( datagrid1.valueMatrix(i,11) == "Y")
- {
- datagrid1.outlinelevel(i) = 1;
- }
- else
- {
- datagrid1.outlinelevel(i) = 2;
- }
- }
-
- datagrid1.outlinebar = 4;
- datagrid1.treecolor = "red";
- }
-
- //4. 页面按键动作
- // 查询按键
- function find()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
-
- commSendReq("/root/formData");
- commSubmit("UID010051-service","findSlabDnRst","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/slabDnRst/EmpListResult_VO","/root/resData/EmpListResult_VO");
- model.removenode("/root/resData/EmpListResult_VO");
- model.refresh();
- pageInitTree();
- model.refresh();
- }
- // 保存按键
- function save()
- {
- model.removenode("/root/gridData1/sendInfo");
- model.makeNode("/root/gridData1/sendInfo");
- var count = model.getXPathValue("count(/root/gridData1/EmpListResult_VO/EmpListResult_Row)");
- var j = 0;
- for(var i = 1; i<=count; i++)
- {
- var CHK = model.getValue("/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]/CHK");
- if(CHK == 'true')
- {
- model.duplicate("/root/gridData1/sendInfo","/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]");
- }
- else
- {
- j++;
- }
- }
- if(j == count)
- {
- window.alert(" 请选择组合板坏信息进行确认! "," 提示信息 ");
- return;
- }
- commSendReq("/root/gridData1/sendInfo");
- commSubmit("UID010050-service","saveSumSlabDnRes","glueAction.do");
- errorMessage();
- window.alert(" 保存成功! "," 提示信息 ");
- find();
- model.refresh();
- }
- // 新增按键
- function create()
- {
- }
-
- 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 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/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_NO",nslab);
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_THK",slabthk);
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_WTH",slabwth);
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_LEN",slablen);
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_WGT",slabWgt);
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/HCR_CLF","C");
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/ORD_FL","2");
- model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SURPLMATL_YN","S");
-
- model.refresh();
-
- }
- // 删除按键
- function remove()
- {
- if(commComfirmBox(" 确认分解板坏组合结果? "," 提示信息 ")=='0') return;
- model.removenode("/root/gridData1/sendInfo");
- model.makeNode("/root/gridData1/sendInfo");
- var count = model.getXPathValue("count(/root/gridData1/EmpListResult_VO/EmpListResult_Row)");
- var j = 1;
- for(var i = 1; i<=count; i++)
- {
- var CHK = model.getValue("/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]/CHK");
- if(CHK == 'true')
- {
- model.duplicate("/root/gridData1/sendInfo","/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]");
- }
- }
- commSendReq("/root/gridData1/sendInfo");
- commSubmit("UID010050-service","deleteSumSlabDnRes","glueAction.do");
- errorMessage();
- find();
- model.refresh();
- }
-
- //增加特殊要求 10.15 wxy
- 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"));
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body style="font-family:宋体; ">
- <switch id="switch1" style="left:0px; top:45px; width:970px; height:505px; ">
- <case id="case2"/>
- <case id="case1" selected="true">
- <datagrid id="datagrid1" nodeset="/root/gridData/slabDnRst/EmpListResult_VO/EmpListResult_Row" scroll="both" backcoloralternate="#f7f9f9" caption="选择^合同号^订单号^板坯号^厂内牌号^钢卷^钢卷^板坯^板坯^板坯^是否热送^组合区分^通过工序^特殊要求|选择^合同号^订单号^板坯号^厂内牌号^宽度^厚度^宽度^长度^单重^是否热送^组合区分^通过工序^特殊要求" colsep="^" colwidth="59, 90, 43, 104, 100, 52, 55, 59, 52, 57, 82, 79, 125, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" defaultrows="20" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:965px; height:465px; ">
- <col checkvalue="true,false" ref="CHK" type="checkbox"/>
- <col ref="ORD_NO" type="input"/>
- <col ref="ORD_SEQ" type="input"/>
- <col ref="DSN_SLAB_NO"/>
- <col ref="FAC_STL_GRD" type="input"/>
- <col ref="COIL_WTH" style="text-align:right; "/>
- <col ref="COIL_THK" style="text-align:right; "/>
- <col ref="SLAB_WTH" style="text-align:right; "/>
- <col ref="SLAB_LEN" type="input" style="text-align:right; "/>
- <col ref="SLAB_WGT" type="input" style="text-align:right; "/>
- <col ref="HCR_YN"/>
- <col ref="COMB_YN"/>
- <col ref="PROC_PATH"/>
- <col ref="INGR_YN" style="text-decoration:underline; "/>
- <col ref="P_DSN_SLAB_NO" visibility="hidden"/>
- <col ref="EMGMTR_YN" visibility="hidden"/>
- <col ref="SLAB_THK" visibility="hidden"/>
- <col ref="COIL_LEN" visibility="hidden"/>
- <col ref="COIL_WGT" visibility="hidden"/>
- <col ref="FAC_STL_GRP" visibility="hidden"/>
- <col ref="COIL_PACK_WGT_MIN" visibility="hidden"/>
- <col ref="COIL_PACK_WGT_MAX" visibility="hidden"/>
- <col ref="AUTODSN_YN" visibility="hidden"/>
- <col ref="GRAVITY" visibility="hidden"/>
- <col ref="SLAB_TRMTH_TP" visibility="hidden"/>
- </datagrid>
- <caption id="caption2" class="cell" style="left:0px; top:5px; width:70px; height:20px; ">组合坯料数</caption>
- <input id="input1" ref="/root/formData/ASSEMBLE_CNT" maxlength="1" format="999999-9999999" style="left:75px; top:5px; width:25px; height:20px; text-align:center; "/>
- </case>
- <script type="javascript" ev:event="case1">
- <![CDATA[
- model.toggle("case1");
- ]]>
- </script>
- <script type="javascript" ev:event="case2">
- <![CDATA[
- model.toggle("case2");
- ]]>
- </script>
- <case id="case3"/>
- </switch>
- <button id="button2" style="left:814px; top:5px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
- <caption>板坯组合</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- datagrid1.clearStatus();
- datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
- var V_ORDNO = "";
- var V_ORDSEQ ="";
- var numberFlag = 0;
- // for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
- // {
- // if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
- // {
- // numberFlag++;
- // V_ORDNO = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) ;
- // V_ORDSEQ = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") ) ;
- // }
- // if(numberFlag == 1 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" &&
- // V_ORDNO == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) &&
- // V_ORDSEQ == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") )
- // )
- // {
- // datagrid1.rowStatus(i)= "2";
- // }
- // }
- for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
- {
-
- if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
- {
- datagrid1.rowStatus(i)= "2";
- }
- //
- }
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
- model.makeValue("/root/reqData/ASSEMBLE_CNT",model.getValue("/root/formData/ASSEMBLE_CNT"));
-
- commSubmit("UID010051-service","saveSumSlabDnRes","glueAction.do");
- retrunMessage();
- find();
- ]]>
- </script>
- </button>
- <button id="button6" style="left:889px; top:5px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
- <caption>板坯分解</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- remove();
- ]]>
- </script>
- </button>
- <button id="button1" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:170px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
- <caption>单订单组合</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.dispatch("case1");
- ]]>
- </script>
- </button>
- <button id="button3" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:275px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
- <caption>双订单组合</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.dispatch("case2");
- ]]>
- </script>
- </button>
- <button id="button4" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:375px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
- <caption>生产保留指定</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- switch1.dispatch("case3");
- ]]>
- </script>
- </button>
- <input id="input2" ref="/root/formData/ORD_NO" style="left:40px; top:25px; width:85px; height:20px; "/>
- <caption id="caption3" class="cell" style="left:0px; top:25px; width:40px; height:20px; ">订单号</caption>
- <select1 id="combo1" ref="/root/formData/ORD_SEQ" appearance="minimal" style="left:125px; top:25px; width:45px; height:20px; ">
- <choices>
- <item>
- <label>combo1</label>
- <value>combo1</value>
- </item>
- </choices>
- </select1>
- <button id="button5" visibility="hidden" style="left:715px; top:55px; width:90px; height:15px; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
-
- commSendReq("/root/formData");
- commSubmit("UID010051-service","findSlabDnRst","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/slabDnRst/EmpListResult_VO","/root/resData/EmpListResult_VO");
- model.removenode("/root/resData/EmpListResult_VO");
- model.refresh();
- pageInitTree();
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="button7" class="butt_3" style="left:815px; top:50px; width:65px; height:19px; ">
- <caption>行增加</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
-
-
- for(var i=1; i<=datagrid1.rows; i++)
- {
-
- if( datagrid1.isSelected(i) == true )
- {
- var a=i-1;
- var node1 = instance1.selectSingleNode("/root/gridData/slabDnRst/EmpListResult_VO/EmpListResult_Row[" + a + "]");
- var copyedNode = node1.cloneNode(true);
- var copyTo = instance1.selectSingleNode("/root/gridData/slabDnRst/EmpListResult_VO").appendChild(copyedNode);
- datagrid1.rebuild();
- }
- }
-
-
- //datagrid1.addRow();
- //datagrid1.insertRow(1,"above", "true", "true");
- //copyGrid("datagrid1");
- // datagrid3.rebuild();
-
- ]]>
- </script>
- </button>
- <button id="button8" style="left:890px; top:50px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
- <caption>保存增加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- datagrid1.clearStatus();
- datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
- var V_ORDNO = "";
- var V_ORDSEQ ="";
- var numberFlag = 0;
- // for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
- // {
- // if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
- // {
- // numberFlag++;
- // V_ORDNO = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) ;
- // V_ORDSEQ = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") ) ;
- // }
- // if(numberFlag == 1 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" &&
- // V_ORDNO == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) &&
- // V_ORDSEQ == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") )
- // )
- // {
- // datagrid1.rowStatus(i)= "2";
- // }
- // }
- for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
- {
-
- if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
- {
- datagrid1.rowStatus(i)= "2";
- }
- //
- }
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
- model.makeValue("/root/reqData/ASSEMBLE_CNT",model.getValue("/root/formData/ASSEMBLE_CNT"));
-
- commSubmit("UID010051-service","addslab","glueAction.do");
- retrunMessage();
- find();
- ]]>
- </script>
- </button>
- <caption id="caption10" class="cell" style="left:172px; top:25px; width:55px; height:20px; text-align:center; vertical-align:middle; ">板坯宽度</caption>
- <input id="input3" ref="/root/formData/slabwth1" style="left:228px; top:25px; width:78px; height:20px; "/>
- <input id="input4" ref="/root/formData/slabwth2" style="left:305px; top:25px; width:78px; height:20px; "/>
- <caption id="caption1" class="cell" style="left:392px; top:25px; width:55px; height:20px; text-align:center; vertical-align:middle; ">板坯长度</caption>
- <input id="input5" ref="/root/formData/slabthk1" style="left:448px; top:25px; width:78px; height:20px; "/>
- <input id="input6" ref="/root/formData/slabthk2" style="left:525px; top:25px; width:78px; height:20px; "/>
- <caption id="caption4" class="cell" style="left:172px; top:50px; width:55px; height:20px; text-align:center; vertical-align:middle; ">钢卷宽度</caption>
- <caption id="caption5" class="cell" style="left:392px; top:50px; width:55px; height:20px; text-align:center; vertical-align:middle; ">钢卷厚度</caption>
- <input id="input7" ref="/root/formData/coilwhk1" style="left:228px; top:50px; width:78px; height:20px; "/>
- <input id="input8" ref="/root/formData/coilwth2" style="left:305px; top:50px; width:78px; height:20px; "/>
- <input id="input9" ref="/root/formData/coilthk1" style="left:448px; top:50px; width:78px; height:20px; "/>
- <input id="input10" ref="/root/formData/coilthk2" style="left:525px; top:50px; width:78px; height:20px; "/>
- </xhtml:body>
- </xhtml:html>
|