c2e9c4a749231f545ad943d755d3e517ba3881ea.svn-base 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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. <searchInfo/>
  11. <CHGCNT_CHK_YN>Y</CHGCNT_CHK_YN>
  12. <CHGCNT_CHK_TP>1</CHGCNT_CHK_TP>
  13. <USE_YN>Y</USE_YN>
  14. </formData>
  15. <reqData/>
  16. <resData/>
  17. <gridData>
  18. <EmpListResult_VO>
  19. </EmpListResult_VO>
  20. <sendInfo/>
  21. </gridData>
  22. <codeData>
  23. <CAST_STL_GRD>
  24. <item>
  25. <label/>
  26. <value/>
  27. </item>
  28. </CAST_STL_GRD>
  29. </codeData>
  30. </root>
  31. </instance>
  32. <script type="javascript" ev:event="xforms-ready">
  33. <![CDATA[
  34. datagrid1.fixedcellcheckbox(0,datagrid1.colRef("CHK"))=true;
  35. datagrid1.colStatus(0)=false;
  36. ]]>
  37. </script>
  38. <script type="javascript">
  39. <![CDATA[
  40. //1、获取用户登录信息,只能在页面初始化函数中调用
  41. function InitParams(node)
  42. {
  43. if (typeof node == "undefined" && typeof node != "object") return;
  44. model.removenode("/root/initData/rcvInfo");
  45. model.makeNode("/root/initData/rcvInfo");
  46. var nodeList = node.childNodes;
  47. for (var i = 0; i < nodeList.length; i++)
  48. model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
  49. }
  50. //2. 页面初始化函数(必须)
  51. function Init(node)
  52. {
  53. InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  54. // 在程序中会重建该节点,最好不要重名
  55. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  56. //...
  57. }
  58. //3、页面标题
  59. function setTitle()
  60. {
  61. return "工序计划 >> 板坯设计 >> 厂内牌号组标准录入"; // 如:return "进程管理>>订单进程现况查询";
  62. }
  63. function find()
  64. {
  65. model.removenode("/root/reqData");
  66. model.makeNode("/root/reqData");
  67. var chgcntChkYN = model.getValue("/root/formData/CHGCNT_CHK_YN");
  68. var chgcntChkTP = model.getValue("/root/formData/CHGCNT_CHK_TP");
  69. var useYN = model.getValue("/root/formData/USE_YN");
  70. model.makeValue("/root/reqData/chgcntChkYN",chgcntChkYN);
  71. model.makeValue("/root/reqData/chgcntChkTP",chgcntChkTP);
  72. model.makeValue("/root/reqData/useYN",useYN);
  73. commSubmit("UID010130-service","findTbStlGrdGrp","glueAction.do");
  74. errorMessage();
  75. model.copyNode("/root/gridData/EmpListResult_VO","/root/resData/EmpListResult_VO");
  76. model.refresh();
  77. }
  78. // 保存按键
  79. function save()
  80. {
  81. model.removenode("/root/reqData");
  82. model.makeNode("/root/reqData");
  83. model.removenode("/root/gridData/sendInfo");
  84. model.makeNode("/root/gridData/sendInfo");
  85. var REG_ID = model.getValue("/root/initData/rcvInfo/REG_ID");
  86. //var REG_NM = model.getValue("/root/initData/rcvInfo/REG_NM");
  87. var count = model.getXPathValue("count(/root/gridData/EmpListResult_VO/EmpListResult_Row)");
  88. var j = 0;
  89. for(var i = 1; i<=count; i++)
  90. {
  91. var CHK = model.getValue("/root/gridData/EmpListResult_VO/EmpListResult_Row["+i+"]/CHK");
  92. model.makeValue("/root/gridData/EmpListResult_VO/EmpListResult_Row["+i+"]/regId",REG_ID);
  93. if(CHK == 'true')
  94. {
  95. model.duplicate("/root/gridData/sendInfo","/root/gridData/EmpListResult_VO/EmpListResult_Row["+i+"]");
  96. var FAC_STL_GRP = model.getValue("/root/gridData/EmpListResult_VO/EmpListResult_Row["+i+"]/FAC_STL_GRP");
  97. if(FAC_STL_GRP == null || FAC_STL_GRP == "")
  98. {
  99. window.alert(" 厂内牌号组不能为空! "," 提示信息 ");
  100. return;
  101. }
  102. }
  103. else
  104. {
  105. j++;
  106. }
  107. }
  108. if(model.getXPathValue("count(/root/gridData/EmpListResult_VO/EmpListResult_Row[CHK='true'])") == 0)
  109. {
  110. window.alert(" 请选择厂内牌号组信息进行保存! "," 提示信息 ");
  111. return;
  112. }
  113. commSendReq("/root/gridData/sendInfo");
  114. commSubmit("UID010130-service","saveTbStlGrdGrp","glueAction.do");
  115. errorMessage();
  116. find();
  117. //model.copyNode("/root/gridData2/EmpListResult_VO","/root/resData/EmpListResult_VO");
  118. model.refresh();
  119. }
  120. // 新增按键
  121. function create()
  122. {
  123. datagrid1.addRow();
  124. model.setValue("/root/gridData/EmpListResult_VO/EmpListResult_Row[" + (datagrid1.row-1) + "]/CHGCNT_CHK_YN", "Y");
  125. model.setValue("/root/gridData/EmpListResult_VO/EmpListResult_Row[" + (datagrid1.row-1) + "]/CHGCNT_CHK_TP", "3");
  126. model.setValue("/root/gridData/EmpListResult_VO/EmpListResult_Row[" + (datagrid1.row-1) + "]/USE_YN", "Y");
  127. }
  128. // 删除按键
  129. function remove()
  130. {
  131. model.removenode("/root/reqData");
  132. model.makeNode("/root/reqData");
  133. if(commComfirmBox(" 确认删除厂内牌号信息? "," 提示信息 ")=='0') return;
  134. model.removenode("/root/gridData/sendInfo");
  135. model.makeNode("/root/gridData/sendInfo");
  136. var count = model.getXPathValue("count(/root/gridData/EmpListResult_VO/EmpListResult_Row)");
  137. var j = 1;
  138. for(var i = 1; i<=count; i++)
  139. {
  140. var CHK = model.getValue("/root/gridData/EmpListResult_VO/EmpListResult_Row["+j+"]/CHK");
  141. if(CHK == 'true')
  142. {
  143. model.duplicate("/root/gridData/sendInfo","/root/gridData/EmpListResult_VO/EmpListResult_Row["+j+"]");
  144. model.removenode("/root/gridData/EmpListResult_VO/EmpListResult_Row["+j+"]");
  145. }
  146. else
  147. {
  148. j++;
  149. }
  150. }
  151. commSendReq("/root/gridData/sendInfo");
  152. commSubmit("UID010130-service","deleteTbStlGrdGrp","glueAction.do");
  153. errorMessage();
  154. //model.copyNode("/root/gridData2/EmpListResult_VO","/root/resData/EmpListResult_VO");
  155. model.refresh();
  156. }
  157. ]]>
  158. </script>
  159. </model>
  160. <script type="javascript" src="../../js/boaMsg.js"/>
  161. <script type="javascript" src="../../js/boaCommon.js"/>
  162. <script type="javascript" src="../../js/dCommon.js"/>
  163. </xhtml:head>
  164. <xhtml:body guideline="2,620;1,980;">
  165. <line id="line1" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  166. <datagrid id="datagrid1" nodeset="/root/gridData/EmpListResult_VO/EmpListResult_Row" caption="选择^厂内牌号组ID^厂内牌号组名称^最小编制炉次数^最大编制炉次数^是否检查炉次编制数量^检查炉次编制数量后处理区分^使用与否^录入人^录入时间^修改人^修改时间|选择^厂内牌号组ID^厂内牌号组名称^最小编制炉次数^最大编制炉次数^是否检查炉次编制数量^检查炉次编制数量后处理区分^使用与否^录入人^录入时间^修改人^修改时间" colsep="^" colwidth="60, 90, 91, 60, 65, 79, 75, 59, 60, 142, 60, 138" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:35px; width:980px; height:585px; ">
  167. <col ref="CHK" type="checkbox"/>
  168. <col ref="FAC_STL_GRP" type="input" style="text-align:left; padding-left:2; background-color:#ffff99; "/>
  169. <col ref="FAC_STL_GRPNM" type="input" style="text-align:left; padding-left:2; background-color:#ffff99; "/>
  170. <col ref="CHGCNT_MIN" type="input" style="text-align:right; background-color:#ffff99; "/>
  171. <col ref="CHGCNT_MAX" type="input" style="text-align:right; background-color:#ffff99; "/>
  172. <col ref="CHGCNT_CHK_YN" type="combo" style="background-color:#ffff99; ">
  173. <choices>
  174. <item>
  175. <label>Y</label>
  176. <value>Y</value>
  177. </item>
  178. <item>
  179. <label>N</label>
  180. <value>N</value>
  181. </item>
  182. </choices>
  183. </col>
  184. <col ref="CHGCNT_CHK_TP" type="combo" visibility="hidden" style="background-color:#ffff99; ">
  185. <choices>
  186. <item>
  187. <label>1</label>
  188. <value>1</value>
  189. </item>
  190. <item>
  191. <label>2</label>
  192. <value>2</value>
  193. </item>
  194. <item>
  195. <label>3</label>
  196. <value>3</value>
  197. </item>
  198. </choices>
  199. </col>
  200. <col ref="USE_YN" type="combo" style="background-color:#ffff99; ">
  201. <choices>
  202. <item>
  203. <label>Y</label>
  204. <value>Y</value>
  205. </item>
  206. <item>
  207. <label>N</label>
  208. <value>N</value>
  209. </item>
  210. </choices>
  211. </col>
  212. <col ref="REG_ID" type="output" style="text-align:left; padding:2; "/>
  213. <col ref="REG_DTIME" type="output"/>
  214. <col ref="MOD_ID" type="output" style="text-align:left; padding:2; "/>
  215. <col ref="MOD_DTIME"/>
  216. </datagrid>
  217. <line id="line2" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  218. <caption id="caption3" class="cell" style="left:0px; top:5px; width:100px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">检查炉次数量</caption>
  219. <select1 id="combo1" ref="/root/formData/CHGCNT_CHK_YN" appearance="minimal" style="left:92px; top:5px; width:100px; height:20px; ">
  220. <choices>
  221. <item>
  222. <label>Y</label>
  223. <value>Y</value>
  224. </item>
  225. <item>
  226. <label>N</label>
  227. <value>N</value>
  228. </item>
  229. </choices>
  230. </select1>
  231. <select1 id="combo2" ref="/root/formData/USE_YN" appearance="minimal" style="left:295px; top:5px; width:100px; height:20px; ">
  232. <choices>
  233. <item>
  234. <label>Y</label>
  235. <value>Y</value>
  236. </item>
  237. <item>
  238. <label>N</label>
  239. <value>N</value>
  240. </item>
  241. </choices>
  242. </select1>
  243. <caption id="caption1" class="cell" style="left:203px; top:5px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">使用与否</caption>
  244. </xhtml:body>
  245. </xhtml:html>