| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <?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[热轧管制>>热轧管制标准>>轧制厚度标准录入]]>
- </xhtml:title>
- <model id="model1">
- <![CDATA[>]]>
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <SPECSTLGRD/>
- </formData>
- <comboData>
- <ABBSYM/>
- </comboData>
- <datagrid1/>
- <datagrid3/>
- <resData/>
- <initStlData>
- <SpecStlGrd_Row>
- <LABEL/>
- <VALUE/>
- </SpecStlGrd_Row>
- </initStlData>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- if(window.parent==null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/b01.js"/>
- <script type="javascript">
- <![CDATA[
- var currentRow = 0;
- function Init(node)
- {
- InitParams(node);
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- //对下拉框中的信息进行初始化
- commSubmit("UIF026010-service", "findS", "glueAction.do");
- model.copyNode("/root/initStlData" , "/root/resData/SpecStlGrd_VO");//标准钢号
- model.copyNode("/root/comboData/ABBSYM" , "/root/resData/ListResult_2_VO");//标准号
- model.refresh();
- }
-
- function find()
- {
- //根据标准号查询datagrid1中的内容
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSendReq("/root/formData");
- commSubmit("UIF026010-service", "findI", "glueAction.do");
- model.copyNode("/root/datagrid1","/root/resData/SpecInfoResult_VO");
- removeGridData();
- clearGridStatus();
- model.refresh();
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
-
- }
-
- function findTechCD()
- {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- commSubmit("UIB010302-service", "findTechCD", "glueAction.do");
- model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
- model.refresh();
- }
-
- function save()
- {
- if(currentRow == 0) {window.alert("非法操作" , "提示");return;}
- if(commComfirmBox("确认保存?","提示")=="0") return;
-
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.removenode("/root/tempData3");
- model.makeNode("/root/tempData3");
-
- b01MultiUpdate(datagrid3,"/root/tempData3" ,"A" ,true, "rowStatus2" );
- commSendReq("/root/tempData3");
- //model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
- //model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
- model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
- getLoggingInInfo();
- commSubmit("UIF026010-service", "save", "glueAction.do");
- var returnInfoMsg = model.getValue("/root/resData/returnInfoMsg_VO/returnInfoMsg_Row");
- if(returnInfoMsg != null && returnInfoMsg != "")
- window.alert(returnInfoMsg, "操作信息");
- clearGridStatus();
- currentRow = 0;
- }
-
- function clearGridStatus()
- {
- datagrid1.clearStatus();
- datagrid3.clearStatus();
- }
- function removeGridData()
- {
- model.removenode("/root/datagrid3");
- model.makeNode("/root/datagrid3");
- model.refresh();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; font-size:14pt; ">
- <datagrid id="datagrid1" nodeset="/root/datagrid1/SpecInfoResult_Row" caption="标准钢号^查询" colsep="^" colwidth="125, 140" defaultrows="40" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:53px; width:415px; height:562px; border-style:solid; ">
- <col editmode="search" ref="SPEC_STL_GRD" type="combo" style="text-align:left; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </col>
- <col ref="QUERY" style="cursor:hand; "/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid1.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(datagrid1.row >= datagrid1.fixedRows && datagrid1.col == datagrid1.colRef("QUERY"))
- {
- if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
- {
- window.alert("增加状态下不允许该操作!" , "警告");
- datagrid1.row = datagrid1.rows-1;
- return;
- }
- if(beGridChanged(datagrid1,datagrid3) == "1" && currentRow != 0)
- {
- if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
- {
- clearGridStatus();
- }
- else
- {
- save();
- }
- }
- currentRow = datagrid1.row;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
- //alert()
- commSubmit("UIF026010-service", "findDetails", "glueAction.do");
- model.copyNode("/root/datagrid3" , "/root/resData/SMPResult_VO");
- model.refresh();
- //setDatagrid();
- currentRow = datagrid1.row;
- datagrid1.col = 1;//预防滚动条拖动时做查询操作
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid1);
- ]]>
- </script>
- </datagrid>
- <datagrid id="datagrid3" nodeset="/root/datagrid3/SMPResult_Row" caption="订单厚度规格最小值(<)^订单厚度规格最大值(>=)^轧制厚度下限(%)^轧制厚度上限(%)^顺序代码" colsep="^" colwidth="83, 83, 106, 145, 77" defaultrows="40" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" selectionmode="free" tooltip="label" style="left:418px; top:55px; width:559px; height:555px; border-style:solid; ">
- <col editable="true" ref="ORD_THK_MIN" type="input" style="color:#ffff00; text-align:left; background-color:#ffffff; "/>
- <col editable="true" ref="ORD_THK_MAX" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="true" ref="THK_MIN" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="true" ref="THK_MAX" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SEQ_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- datagrid3.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- onkeydownmove(datagrid3);
- ]]>
- </script>
- </datagrid>
- <button id="button3" visibility="visible" style="left:290px; top:33px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>添加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- if(beGridChanged(datagrid1,datagrid3) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
- //
- // if(datagrid3.rows > datagrid3.fixedRows )//是否存在数据
- // {
- // if(commComfirmBox("是否保留表中规范数据值要求?","提示")=="0")
- // {
- // findTechCD();
- // clearGridStatus();
- // }
- // else
- // {
- // for(var i =1;i< datagrid3.rows;i++)
- // {
- // if(datagrid3.valueMatrix(i,datagrid3.colRef("THK_MIN")) != "")
- // {
- // datagrid3.addStatus(i,"update");
- // }
- // }//for end
- //
- // }//else end
- // }//if end ,else start
- // else
- // {
- // findTechCD();
- // }
- datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
- datagrid1.addRow(false);
- currentRow = datagrid1.row;
-
- //datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD") ) = "AR";
- datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD"))= model.getValue("/root/formData/SPECSTLGRD");
- model.refresh();
- //setDatagrid();
- ]]>
- </script>
- </button>
- <button id="button4" visibility="visible" style="left:355px; top:33px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
- <caption>删除</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //删除datagrid2中的数据
- if(beGridChanged(datagrid1 ,datagrid3) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
-
- if(commComfirmBox("确认删除?","提示")=="0") return;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- datagrid1.deleteRow(datagrid1.row);
- commMultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatus0")
- getLoggingInInfo();
- commSubmit("UIF026010-service", "save", "glueAction.do");
-
- removeGridData();
- //清空表单的状态
- datagrid1.clearStatus();
- datagrid3.clearStatus();
-
- ]]>
- </script>
- </button>
- <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
- <caption id="caption1" class="cell" style="left:20px; top:5px; width:85px; height:20px; ">标准钢号</caption>
- <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="inputsearch" style="left:104px; top:5px; width:131px; height:20px; ">
- <choices>
- <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </select1>
- <button id="button1" visibility="hidden" style="left:620px; top:5px; width:100px; height:20px; ">
- <caption>初始化</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- Init();
- ]]>
- </script>
- </button>
- <button id="button2" visibility="hidden" style="left:730px; top:5px; width:100px; height:20px; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button5" visibility="hidden" style="left:845px; top:5px; width:100px; height:20px; ">
- <caption>保存</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <button id="button6" visibility="visible" style="left:895px; top:35px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
- <caption>添加</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- datagrid3.cellAttribute("disabled",datagrid3.fixedRows , datagrid3.fixedCols , datagrid3.rows - 1 , datagrid3.cols - 1) = "true";
- datagrid3.addRow(false);
- //currentRow = datagrid3.row;
- //datagrid3.valueMatrix(currentRow , datagrid3.colRef("SPEC_STL_GRD"))= model.getValue("/root/formData/SPECSTLGRD");
- //model.refresh();
- //setDatagrid();
- ]]>
- </script>
- </button>
- <button id="button7" visibility="visible" style="left:820px; top:35px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
- <caption>删除</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- //删除datagrid2中的数据
- if(beGridChanged(datagrid1 ,datagrid3) == "1")
- {
- window.alert("数据已修改,请保存或初始化!" , "警告");
- return;
- }
-
- if(commComfirmBox("确认删除?","提示")=="0") return;
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
- datagrid3.deleteRow(datagrid3.row);
-
- commMultiUpdate(datagrid3,"/root/reqData" ,"A", true, "rowStatus2")
- getLoggingInInfo();
- commSubmit("UIF026010-service", "save", "glueAction.do");
-
- removeGridData();
- //清空表单的状态
- datagrid1.clearStatus();
- datagrid3.clearStatus();
-
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|