UID010110.xrw 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <formData>
  10. <FacStlGroupCode/>
  11. <FacStlGradeCode/>
  12. <LoginUserID/>
  13. </formData>
  14. <gridData>
  15. </gridData>
  16. <reqData/>
  17. <resData/>
  18. <codeData>
  19. </codeData>
  20. <initData/>
  21. </root>
  22. </instance>
  23. <script type="javascript" ev:event="xforms-ready">
  24. <![CDATA[
  25. // Populate value "FacStlGroupCode"
  26. commSubmit("UID010110-service" ,"combo" ,"glueAction.do" );
  27. commAppendData("/root/codeData/GroupCode" ,"/root/resData/ListResult_1_VO");
  28. errorMessage();
  29. // The first added "ALL"
  30. model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row[1]/FAC_STL_GRP" , "%" );
  31. model.makeValue("/root/formData/FacStlGroupCode/ListResult_1_Row[1]/FAC_STL_GRPNM" , "ALL" );
  32. var iRows = model.getXPathValue("count(/root/codeData/ListResult_1_VO/ListResult_1_Row)");
  33. for( var i = 1; i <= iRows; i++ ) {
  34. 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") );
  35. 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") );
  36. }
  37. model.refresh();
  38. FacStlGroupCode.refresh();
  39. FacStlGroupCode.select(0);
  40. ]]>
  41. </script>
  42. <script type="javascript">
  43. <![CDATA[
  44. //1、获取用户登录信息,只能在页面初始化函数中调用
  45. function InitParams(node) {
  46. if (typeof node == "undefined" && typeof node != "object") return;
  47. model.removenode("/root/initData/rcvInfo");
  48. model.makeNode("/root/initData/rcvInfo");
  49. var nodeList = node.childNodes;
  50. node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
  51. for (var i = 0; i < nodeList.length; i++) {
  52. node.appendChild(nodeList.item(i));
  53. }
  54. // "/root/initData/rcvInfo/REG_ID" = "USER_CD"
  55. }
  56. //2. 页面初始化函数(必须)
  57. function Init(node)
  58. {
  59. InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  60. // 在程序中会重建该节点,最好不要重名
  61. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  62. //...
  63. }
  64. //3、页面标题
  65. function setTitle()
  66. {
  67. return "工序计划 >> 板坯设计 >> 厂内牌号标准录入"; // 如:return "进程管理>>订单进程现况查询";
  68. }
  69. function find()
  70. {
  71. dg1.clearStatus();
  72. model.removenode("/root/reqData");
  73. model.makeNode("/root/reqData");
  74. model.makeValue("/root/reqData/FacStlGroupCode" ,FacStlGroupCode.value );
  75. model.makeValue("/root/reqData/FacStlGradeCode" ,FacStlGradeCode.value );
  76. commSubmit("UID010110-service","find","glueAction.do");
  77. errorMessage();
  78. commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  79. model.refresh();
  80. }
  81. // 保存按键
  82. function save() {
  83. model.removenode("/root/reqData");
  84. model.makeNode("/root/reqData");
  85. model.makeValue("/root/reqData/FacStlGroupCode" ,FacStlGroupCode.value );
  86. model.makeValue("/root/reqData/FacStlGradeCode" ,FacStlGradeCode.value );
  87. commMultiUpdate(dg1,"/root/reqData","A",true,"rowStatus1");
  88. commSubmit("UID010110-service" ,"save" ,"glueAction.do" );
  89. errorMessage();
  90. commAppendData("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  91. dg1.clearStatus();
  92. model.refresh();
  93. }
  94. // 新增按键
  95. function create() {
  96. var node = instance1.selectSingleNode("/root/gridData/ListResult_1_VO/ListResult_1_Row");
  97. // Validation for NULL
  98. if( node == null ) {
  99. alert("Node does not exist.");
  100. return;
  101. }
  102. if( dg1.row < dg1.fixedRows ) {
  103. alert("dg1.row = ["+ dg1.row +"] < dg1.fixedRows = ["+ dg1.fixedRows +"]");
  104. return;
  105. }
  106. dg1.insertRow(dg1.row, "below", true, true);
  107. dg1.valueMatrix(dg1.row, dg1.colRef("FAC_STL_GRP") ) = dg1.valueMatrix(dg1.row - 1, dg1.colRef("FAC_STL_GRP") );
  108. dg1.valueMatrix(dg1.row, dg1.colRef("CHK") ) = "true";
  109. dg1.valueMatrix(dg1.row, dg1.colRef("REG_ID") ) = model.getValue("/root/initData/rcvInfo/REG_ID");
  110. dg1.valueMatrix(dg1.row, dg1.colRef("MOD_ID") ) = model.getValue("/root/initData/rcvInfo/REG_ID");
  111. dg1.valueMatrix(dg1.row, dg1.colRef("CAST_SEQ") ) = "0";
  112. model.refresh();
  113. }
  114. // 删除按键
  115. function remove() {
  116. dg1.deleteRow(dg1.row,"true");
  117. }
  118. ]]>
  119. </script>
  120. </model>
  121. <script type="javascript" src="../../js/boaMsg.js"/>
  122. <script type="javascript" src="../../js/boaCommon.js"/>
  123. <script type="javascript" src="../../js/dCommon.js"/>
  124. </xhtml:head>
  125. <xhtml:body guideline="2,620;1,980;">
  126. <line id="line3" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  127. <caption id="caption1" class="cell" style="left:0px; top:5px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">厂内牌号组</caption>
  128. <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  129. <caption id="caption3" class="cell" style="left:254px; top:5px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">厂内牌号</caption>
  130. <input id="FacStlGradeCode" ref="/root/formData/FacStlGradeCode" style="left:346px; top:5px; width:150px; height:20px; "/>
  131. <select1 id="FacStlGroupCode" ref="/root/formData/FacStlGroupCode" appearance="minimal" style="left:92px; top:5px; width:150px; height:20px; background-color:#ffffff; border-color:#000000; ">
  132. <choices>
  133. <itemset nodeset="/root/formData/FacStlGroupCode/ListResult_1_Row">
  134. <label ref="FAC_STL_GRPNM"/>
  135. <value ref="FAC_STL_GRP"/>
  136. </itemset>
  137. </choices>
  138. </select1>
  139. <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; ">
  140. <col ref="SEQ" type="output"/>
  141. <col ref="FAC_STL_GRD" type="input" style="text-align:left; padding-left:2; background-color:#ffff99; "/>
  142. <col ref="FAC_STL_GRP" type="combo" style="text-align:left; padding-left:2; background-color:#ffff99; ">
  143. <choices>
  144. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
  145. <label ref="FAC_STL_GRPNM"/>
  146. <value ref="FAC_STL_GRP"/>
  147. </itemset>
  148. </choices>
  149. </col>
  150. <col ref="REG_ID" type="output" style="text-align:left; "/>
  151. <col ref="REG_DTIME" type="output"/>
  152. <col ref="MOD_ID" type="output" style="text-align:left; "/>
  153. <col ref="MOD_DTIME"/>
  154. <col ref="FAC_STL_GRDNM" type="output" visibility="hidden"/>
  155. <col ref="CHK" type="output" visibility="hidden"/>
  156. <col editable="false" ref="CAST_SEQ" type="input" visibility="hidden" format="#,###" style="text-align:right; padding-left:2; background-color:#ffff99; "/>
  157. </datagrid>
  158. </xhtml:body>
  159. </xhtml:html>