UIB010274.xrw 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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("UIB010274-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("UIB010274-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("UIB010274-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("UIB010274-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="298, 218, 168" 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 editmode="search" ref="SPEC_ABBSYM" type="combo" style="text-align:left; background-color:#ffff99; ">
  168. <choices>
  169. <itemset nodeset="/root/tolerance/Tolerance_Row">
  170. <label ref="LABEL"/>
  171. <value ref="VALUE"/>
  172. </itemset>
  173. </choices>
  174. </col>
  175. <col editmode="search" ref="ORD_USE_TP" type="combo" style="text-align:left; background-color:#ffff99; ">
  176. <choices>
  177. <itemset nodeset="/root/initDengData/DengJi_Row">
  178. <label ref="SM_CFNM"/>
  179. <value ref="SM_CD"/>
  180. </itemset>
  181. </choices>
  182. </col>
  183. <script type="javascript" ev:event="onclick">
  184. <![CDATA[
  185. if(datagrid1.col == datagrid1.colRef("QUERY") && datagrid1.row >= datagrid1.fixedRows)
  186. {
  187. if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
  188. {
  189. window.alert("增加状态下不允许该操作!" , "警告");
  190. datagrid1.row = datagrid1.rows-1;
  191. return;
  192. }
  193. if(beGridChanged(datagrid1 , datagrid2) == "1" && currentRow != 0)
  194. {
  195. if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
  196. {
  197. datagrid1.clearStatus();
  198. datagrid2.clearStatus();
  199. }
  200. else
  201. {
  202. save();
  203. }
  204. }
  205. model.removenode("/root/reqData");
  206. model.makeNode("/root/reqData");
  207. commSendReq("/root/datagrid1/DelSpecResult_Row["+datagrid1.row+"]");
  208. commSubmit("UIB010271-service", "onclick", "glueAction.do");
  209. model.copyNode("/root/datagrid2" , "/root/resData/ToleranceResult_VO");
  210. model.refresh();
  211. currentRow = datagrid1.row;
  212. datagrid1.col = 1;//焦点变化,以免拖动滚动条时做了查询操作
  213. datagrid1.clearStatus();
  214. datagrid2.clearStatus();
  215. datagrid2.rebuildStyle();
  216. datagrid2.cellAttribute("disabled",datagrid2.fixedRows , datagrid2.fixedCols+1 , datagrid2.rows - 1 , datagrid2.cols - 1) = "true";
  217. }
  218. ]]>
  219. </script>
  220. <script type="javascript" ev:event="onentercell">
  221. <![CDATA[
  222. datagrid1.editCell();
  223. ]]>
  224. </script>
  225. <script type="javascript" ev:event="onkeydown">
  226. <![CDATA[
  227. onkeydownmove(datagrid1);
  228. ]]>
  229. </script>
  230. </datagrid>
  231. <button id="button2" visibility="visible" style="left:430px; top:5px; width:100px; height:20px; ">
  232. <caption>FIND</caption>
  233. <script type="javascript" ev:event="DOMActivate">
  234. <![CDATA[
  235. find();
  236. ]]>
  237. </script>
  238. </button>
  239. <button id="button4" visibility="visible" style="left:500px; top:5px; width:100px; height:20px; ">
  240. <caption>SAVE</caption>
  241. <script type="javascript" ev:event="DOMActivate">
  242. <![CDATA[
  243. save();
  244. ]]>
  245. </script>
  246. </button>
  247. <button id="button1" style="left:735px; top:5px; width:60px; height:20px; background-image:../../images/btn_add.gif; ">
  248. <caption>复制</caption>
  249. <script type="javascript" ev:event="DOMActivate">
  250. <![CDATA[
  251. if(commComfirmBox("确定复制?","提示")=="0") return;
  252. var checkCol = datagrid1.colRef("DEV_SPEC_CD");
  253. var i = datagrid1.fixedRows;
  254. datagrid1.addRow();
  255. datagrid1.cellStyle("background-color",datagrid1.row, datagrid1.colRef("DEV_SPEC_CD") , datagrid1.row , datagrid1.cols-1) = "#99cc00";
  256. //alert(checkCol+i);
  257. //datagrid2.valueMatrix(datagrid1.row , checkCol) = "Y";
  258. datagrid1.valueMatrix(datagrid1.row , checkCol) = datagrid1.valueMatrix(i , checkCol);
  259. model.refresh();
  260. //datagrid2.vscroll.attribute("pos") = datagrid2.rows*20;
  261. ]]>
  262. </script>
  263. </button>
  264. </xhtml:body>
  265. </xhtml:html>