f78bc2fe6d68c691ee832e1209df922dd4263a79.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.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>
  6. <![CDATA[品质设计>>生产规范录入>>非取样牌号维护]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <delSpec/>
  13. <NeedGrd/>
  14. </formData>
  15. <datagrid1/>
  16. <datagrid2/>
  17. <reqData/>
  18. <resData/>
  19. <tempData1/>
  20. <tempData2/>
  21. <initData>
  22. <InitSpecResult_VO>
  23. <InitSpecResult_Row>
  24. <LABEL>---全部---</LABEL>
  25. <VALUE/>
  26. </InitSpecResult_Row>
  27. </InitSpecResult_VO>
  28. </initData>
  29. <tolerance>
  30. <Tolerance_Row>
  31. <LABEL/>
  32. <VALUE/>
  33. </Tolerance_Row>
  34. </tolerance>
  35. <initDengData>
  36. <DengJi_Row>
  37. <LABEL/>
  38. <VALUE/>
  39. </DengJi_Row>
  40. </initDengData>
  41. <SpecResult>
  42. <InitSpecResult_Row>
  43. <LABEL/>
  44. <VALUE/>
  45. </InitSpecResult_Row>
  46. </SpecResult>
  47. </root>
  48. </instance>
  49. <script type="javascript" ev:event="xforms-ready">
  50. <![CDATA[
  51. if(window.parent==null) Init();
  52. ]]>
  53. </script>
  54. </model>
  55. <script type="javascript" src="../../js/boaCommon.js"/>
  56. <script type="javascript" src="../../js/b01.js"/>
  57. <script type="javascript">
  58. <![CDATA[
  59. function Init(node)
  60. {
  61. InitParams(node);
  62. model.duplicate("/root/formData", "/root/initData/rcvInfo/REG_ID");
  63. commSubmit("UIB010273-service", "success", "glueAction.do");
  64. model.duplicate("/root/initData" , "/root/resData/InitSpecResult_VO");//交付条件标准号初始化
  65. model.copyNode("/root/tolerance" , "/root/resData/Tolerance_VO");//公差(名)初始化
  66. model.copyNode("/root/initDengData" , "/root/resData/DengJi_VO");//等级代码
  67. model.copyNode("/root/SpecResult" , "/root/resData/InitSpecResult_VO");
  68. model.copyNode("/root/InitCopyDel" , "/root/resData/CopyDel_VO");
  69. model.refresh();
  70. }
  71. function find()
  72. {
  73. model.removenode("/root/reqData");
  74. model.makeNode("/root/reqData");
  75. commSendReq("/root/formData");
  76. commSubmit("UIB010273-service", "find", "glueAction.do");
  77. model.copyNode("/root/datagrid1" , "/root/resData/DelSpecResult_VO");
  78. currentRow = 0;
  79. datagrid1.clearStatus();
  80. model.refresh();
  81. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  82. }
  83. function save()
  84. {
  85. if(currentRow==0){window.alert("非法操作" , "提示"); return;}
  86. if(commComfirmBox("确认保存?","提示")=="0") return;
  87. model.removenode("/root/reqData");
  88. model.makeNode("/root/reqData");
  89. model.removenode("/root/tempData1");
  90. model.makeNode("/root/tempData1");
  91. b01MultiUpdate(datagrid1 , "/root/tempData1" , "A" , true , "rowStuts1");
  92. commSendReq("/root/formData","/root/datagrid1/DelSpecResult_Row["+currentRow+"]" , "/root/tempData1");
  93. getLoggingInInfo();
  94. commSubmit("UIB010273-service", "saveqy", "glueAction.do");
  95. datagrid1.clearStatus();
  96. currentRow = 0;//防止保存误操作
  97. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  98. }
  99. var currentRow = 0;
  100. ]]>
  101. </script>
  102. </xhtml:head>
  103. <xhtml:body pagewidth="980" pageheight="620">
  104. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; vertical-align:middle; border-style:solid; ">标准牌号</caption>
  105. <button id="button8" style="left:815px; top:5px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
  106. <caption>增加</caption>
  107. <script type="javascript" ev:event="onclick">
  108. <![CDATA[
  109. if(beGridChanged(datagrid1) == "1")
  110. {
  111. window.alert("数据已更新,请保存!" , "警告");
  112. return;
  113. }
  114. //只有最后一行允许编辑
  115. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  116. datagrid1.addRow();
  117. currentRow = datagrid1.row;
  118. model.removenode("/root/datagrid2");
  119. model.makeNode("/root/datagrid2");
  120. datagrid1.vscroll.attribute("pos") = datagrid1.rows*20;//滚动条到最后
  121. model.refresh();
  122. ]]>
  123. </script>
  124. </button>
  125. <button id="button9" style="left:890px; top:5px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
  126. <caption>删除</caption>
  127. <script type="javascript" ev:event="onclick">
  128. <![CDATA[
  129. if(beGridChanged(datagrid1) == "1")
  130. {
  131. window.alert("数据已修改,请保存或初始化!" , "警告");
  132. return;
  133. }
  134. if(commComfirmBox("确定删除?","提示")=="0") return;
  135. model.removenode("/root/reqData");
  136. model.makeNode("/root/reqData");
  137. datagrid1.deleteRow(datagrid1.row );
  138. b01MultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatusD");
  139. getLoggingInInfo();
  140. commSubmit("UIB010273-service", "saveqy", "glueAction.do");
  141. datagrid1.clearStatus();
  142. model.removenode("/root/datagrid2");
  143. model.makeNode("/root/datagrid2");
  144. model.refresh();
  145. ]]>
  146. </script>
  147. </button>
  148. <select1 id="combo1" ref="/root/formData/delSpec" appearance="minimal" style="left:97px; top:5px; width:236px; height:20px; border-style:solid; ">
  149. <choices>
  150. <itemset nodeset="/root/initData/InitSpecResult_VO/InitSpecResult_Row">
  151. <label ref="LABEL"/>
  152. <value ref="VALUE"/>
  153. </itemset>
  154. </choices>
  155. </select1>
  156. <line id="line2" style="x1:0px; y1:0px; x2:975px; y2:0px; "/>
  157. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  158. <datagrid id="datagrid1" nodeset="/root/datagrid1/DelSpecResult_Row" caption="标准牌号^录入时间^录入人" colsep="^" colwidth="759, 100, 100" defaultrows="46" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="30" rowsep="|" tooltip="label" style="left:0px; top:57px; width:975px; height:563px; ">
  159. <col editmode="search" ref="DEV_SPEC_CD" type="combo" style="text-align:left; background-color:#ffff99; ">
  160. <choices>
  161. <itemset nodeset="/root/SpecResult/InitSpecResult_Row">
  162. <label ref="LABEL"/>
  163. <value ref="VALUE"/>
  164. </itemset>
  165. </choices>
  166. </col>
  167. <col ref="MOD_DTIME" style="text-align:left; "/>
  168. <col ref="MOD_ID" style="text-align:left; "/>
  169. <script type="javascript" ev:event="onclick">
  170. <![CDATA[
  171. if(datagrid1.col == datagrid1.colRef("QUERY") && datagrid1.row >= datagrid1.fixedRows)
  172. {
  173. if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
  174. {
  175. window.alert("增加状态下不允许该操作!" , "警告");
  176. datagrid1.row = datagrid1.rows-1;
  177. return;
  178. }
  179. if(beGridChanged(datagrid1 , datagrid2) == "1" && currentRow != 0)
  180. {
  181. if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
  182. {
  183. datagrid1.clearStatus();
  184. datagrid2.clearStatus();
  185. }
  186. else
  187. {
  188. save();
  189. }
  190. }
  191. model.removenode("/root/reqData");
  192. model.makeNode("/root/reqData");
  193. commSendReq("/root/datagrid1/DelSpecResult_Row["+datagrid1.row+"]");
  194. commSubmit("UIB010271-service", "onclick", "glueAction.do");
  195. model.copyNode("/root/datagrid2" , "/root/resData/ToleranceResult_VO");
  196. model.refresh();
  197. currentRow = datagrid1.row;
  198. datagrid1.col = 1;//焦点变化,以免拖动滚动条时做了查询操作
  199. datagrid1.clearStatus();
  200. datagrid2.clearStatus();
  201. datagrid2.rebuildStyle();
  202. datagrid2.cellAttribute("disabled",datagrid2.fixedRows , datagrid2.fixedCols+1 , datagrid2.rows - 1 , datagrid2.cols - 1) = "true";
  203. }
  204. ]]>
  205. </script>
  206. <script type="javascript" ev:event="onentercell">
  207. <![CDATA[
  208. datagrid1.editCell();
  209. ]]>
  210. </script>
  211. <script type="javascript" ev:event="onkeydown">
  212. <![CDATA[
  213. onkeydownmove(datagrid1);
  214. ]]>
  215. </script>
  216. </datagrid>
  217. <button id="button2" visibility="hidden" style="left:430px; top:5px; width:100px; height:20px; ">
  218. <caption>FIND</caption>
  219. <script type="javascript" ev:event="DOMActivate">
  220. <![CDATA[
  221. find();
  222. ]]>
  223. </script>
  224. </button>
  225. <button id="button4" visibility="hidden" style="left:500px; top:5px; width:100px; height:20px; ">
  226. <caption>SAVE</caption>
  227. <script type="javascript" ev:event="DOMActivate">
  228. <![CDATA[
  229. save();
  230. ]]>
  231. </script>
  232. </button>
  233. <button id="button1" style="left:735px; top:5px; width:60px; height:20px; background-image:../../images/btn_add.gif; ">
  234. <caption>复制</caption>
  235. <script type="javascript" ev:event="DOMActivate">
  236. <![CDATA[
  237. if(commComfirmBox("确定复制?","提示")=="0") return;
  238. var checkCol = datagrid1.colRef("DEV_SPEC_CD");
  239. var i = datagrid1.fixedRows;
  240. datagrid1.addRow();
  241. datagrid1.cellStyle("background-color",datagrid1.row, datagrid1.colRef("DEV_SPEC_CD") , datagrid1.row , datagrid1.cols-1) = "#99cc00";
  242. //alert(checkCol+i);
  243. //datagrid2.valueMatrix(datagrid1.row , checkCol) = "Y";
  244. datagrid1.valueMatrix(datagrid1.row , checkCol) = datagrid1.valueMatrix(i , checkCol);
  245. model.refresh();
  246. //datagrid2.vscroll.attribute("pos") = datagrid2.rows*20;
  247. ]]>
  248. </script>
  249. </button>
  250. </xhtml:body>
  251. </xhtml:html>