| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <?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>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <FacStlGroupCode/>
- <FacStlGradeCode/>
- <LoginUserID/>
- </formData>
- <gridData>
- </gridData>
- <reqData/>
- <resData/>
- <codeData>
- </codeData>
- <initData/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- // Populate value "FacStlGroupCode"
- commSubmit("UID010110-service" ,"combo" ,"glueAction.do" );
- commAppendData("/root/codeData/GroupCode" ,"/root/resData/ListResult_1_VO");
- errorMessage();
- // The first added "ALL"
- model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row[1]/FAC_STL_GRP" , "%" );
- model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row[1]/FAC_STL_GRPNM" , "ALL" );
- var iRows = model.getXPathValue("count(/root/codeData/ListResult_1_VO/ListResult_1_Row)");
- for( var i = 1; i <= iRows; i++ ) {
- model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row["+ (i + 1) +"]/FAC_STL_GRP" , model.getValue("/root/codeData/ListResult_1_VO/ListResult_1_Row["+ i +"]/FAC_STL_GRP") );
- model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row["+ (i + 1) +"]/FAC_STL_GRPNM" , model.getValue("/root/codeData/ListResult_1_VO/ListResult_1_Row["+ i +"]/FAC_STL_GRPNM") );
- }
- model.refresh();
- FacStlGroupCode.refresh();
- FacStlGroupCode.select(0);
- ]]>
- </script>
- <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;
- node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
- for (var i = 0; i < nodeList.length; i++) {
- node.appendChild(nodeList.item(i));
- }
- // "/root/initData/rcvInfo/REG_ID" = "USER_CD"
- }
-
- //2. 页面初始化函数(必须)
- function Init(node)
- {
- InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
- // 在程序中会重建该节点,最好不要重名
- // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
- //...
- }
-
- //3、页面标题
- function setTitle()
- {
- return "工序计划 >> 板坯设计 >> 厂内牌号标准录入"; // 如:return "进程管理>>订单进程现况查询";
- }
-
- function find()
- {
- dg1.clearStatus();
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- model.makeValue("/root/reqData/FacStlGroupCode" ,FacStlGroupCode.value );
- model.makeValue("/root/reqData/FacStlGradeCode" ,FacStlGradeCode.value );
- commSubmit("UID010110-service","find","glueAction.do");
- errorMessage();
- commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- model.refresh();
- }
- // 保存按键
- function save() {
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.makeValue("/root/reqData/FacStlGroupCode" ,FacStlGroupCode.value );
- model.makeValue("/root/reqData/FacStlGradeCode" ,FacStlGradeCode.value );
- commMultiUpdate(dg1,"/root/reqData","A",true,"rowStatus1");
- commSubmit("UID010110-service" ,"save" ,"glueAction.do" );
- errorMessage();
- commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
-
- dg1.clearStatus();
- model.refresh();
- }
- // 新增按键
- function create() {
- var node = instance1.selectSingleNode("/root/gridData/ListResult_1_VO/ListResult_1_Row");
- // Validation for NULL
- if( node == null ) {
- alert("Node does not exist.");
- return;
- }
- if( dg1.row < dg1.fixedRows ) {
- alert("dg1.row = ["+ dg1.row +"] < dg1.fixedRows = ["+ dg1.fixedRows +"]");
- return;
- }
- dg1.insertRow(dg1.row, "below", true, true);
- dg1.valueMatrix(dg1.row, dg1.colRef("FAC_STL_GRP") ) = dg1.valueMatrix(dg1.row - 1, dg1.colRef("FAC_STL_GRP") );
- dg1.valueMatrix(dg1.row, dg1.colRef("CHK") ) = "true";
- dg1.valueMatrix(dg1.row, dg1.colRef("REG_ID") ) = model.getValue("/root/initData/rcvInfo/REG_ID");
- dg1.valueMatrix(dg1.row, dg1.colRef("MOD_ID") ) = model.getValue("/root/initData/rcvInfo/REG_ID");
- dg1.valueMatrix(dg1.row, dg1.colRef("CAST_SEQ") ) = "0";
- model.refresh();
- }
- // 删除按键
- function remove() {
-
- dg1.deleteRow(dg1.row,"true");
-
- }
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/dCommon.js"/>
- </xhtml:head>
- <xhtml:body guideline="2,620;1,980;">
- <line id="line3" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
- <caption id="caption1" class="cell" style="left:0px; top:5px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">厂内牌号组</caption>
- <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
- <caption id="caption3" class="cell" style="left:254px; top:5px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">厂内牌号</caption>
- <input id="FacStlGradeCode" ref="/root/formData/FacStlGradeCode" style="left:346px; top:5px; width:150px; height:20px; "/>
- <select1 id="FacStlGroupCode" ref="/root/formData/FacStlGroupCode" appearance="minimal" style="left:92px; top:5px; width:150px; height:20px; background-color:#ffffff; border-color:#000000; ">
- <choices>
- <itemset nodeset="/root/formData/FacStlGroupCode/ListResult_1_Row">
- <label ref="FAC_STL_GRPNM"/>
- <value ref="FAC_STL_GRP"/>
- </itemset>
- </choices>
- </select1>
- <datagrid id="dg1" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" scroll="autovscroll" caption="序号^厂内牌号^厂内牌号组^录入人^录入时间^修改人^修改时间^编制优先顺序" colsep="^" colwidth="60, 245, 245, 80, 125, 80, 125, 90, 100, 100" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:35px; width:980px; height:585px; ">
- <col ref="SEQ" type="output"/>
- <col ref="FAC_STL_GRD" type="input" style="text-align:left; padding-left:2; background-color:#ffff99; "/>
- <col ref="FAC_STL_GRP" type="combo" style="text-align:left; padding-left:2; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
- <label ref="FAC_STL_GRPNM"/>
- <value ref="FAC_STL_GRP"/>
- </itemset>
- </choices>
- </col>
- <col ref="REG_ID" type="output" style="text-align:left; "/>
- <col ref="REG_DTIME" type="output"/>
- <col ref="MOD_ID" type="output" style="text-align:left; "/>
- <col ref="MOD_DTIME"/>
- <col ref="FAC_STL_GRDNM" type="output" visibility="hidden"/>
- <col ref="CHK" type="output" visibility="hidden"/>
- <col editable="false" ref="CAST_SEQ" type="input" visibility="hidden" format="#,###" style="text-align:right; padding-left:2; background-color:#ffff99; "/>
- </datagrid>
- </xhtml:body>
- </xhtml:html>
|