8cab0f250bcfdc4fd6b421c4bd49d6276f4baa2e.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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. <![CDATA[>]]>
  10. <instance id="instance1">
  11. <root xmlns="">
  12. <formData>
  13. <SPECABBSYM/>
  14. <SPECSTLGRD/>
  15. </formData>
  16. <comboData>
  17. <ABBSYM/>
  18. </comboData>
  19. <datagrid1/>
  20. <datagrid3/>
  21. <resData/>
  22. <initStlData>
  23. <SpecStlGrd_Row>
  24. <LABEL/>
  25. <VALUE/>
  26. </SpecStlGrd_Row>
  27. </initStlData>
  28. </root>
  29. </instance>
  30. <script type="javascript" ev:event="xforms-ready">
  31. <![CDATA[
  32. if(window.parent==null) Init();
  33. ]]>
  34. </script>
  35. </model>
  36. <script type="javascript" src="../../js/boaCommon.js"/>
  37. <script type="javascript" src="../../js/b01.js"/>
  38. <script type="javascript">
  39. <![CDATA[
  40. var currentRow = 0;
  41. function Init(node)
  42. {
  43. InitParams(node);
  44. model.removenode("/root/reqData");
  45. model.makeNode("/root/reqData");
  46. //对下拉框中的信息进行初始化
  47. commSubmit("UIB010302-service", "findS", "glueAction.do");
  48. model.copyNode("/root/initStlData" , "/root/resData/SpecStlGrd_VO");//标准钢号
  49. model.copyNode("/root/comboData/ABBSYM" , "/root/resData/ListResult_2_VO");//标准号
  50. model.refresh();
  51. }
  52. function find()
  53. {
  54. //根据标准号查询datagrid1中的内容
  55. model.removenode("/root/reqData");
  56. model.makeNode("/root/reqData");
  57. commSendReq("/root/formData");
  58. commSubmit("UIB010302-service", "findI", "glueAction.do");
  59. model.copyNode("/root/datagrid1","/root/resData/SpecInfoResult_VO");
  60. removeGridData();
  61. clearGridStatus();
  62. model.refresh();
  63. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  64. }
  65. function findTechCD()
  66. {
  67. model.removenode("/root/reqData");
  68. model.makeNode("/root/reqData");
  69. commSubmit("UIB010302-service", "findTechCD", "glueAction.do");
  70. model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
  71. model.refresh();
  72. }
  73. function save()
  74. {
  75. if(currentRow == 0) {window.alert("非法操作" , "提示");return;}
  76. if(commComfirmBox("确认保存?","提示")=="0") return;
  77. model.removenode("/root/reqData");
  78. model.makeNode("/root/reqData");
  79. model.removenode("/root/tempData3");
  80. model.makeNode("/root/tempData3");
  81. b01MultiUpdate(datagrid3,"/root/tempData3" ,"A" ,true, "rowStatus2" );
  82. commSendReq("/root/tempData3");
  83. model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
  84. model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
  85. model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
  86. getLoggingInInfo();
  87. commSubmit("UIB010302-service", "save", "glueAction.do");
  88. clearGridStatus();
  89. currentRow = 0;
  90. }
  91. function clearGridStatus()
  92. {
  93. datagrid1.clearStatus();
  94. datagrid3.clearStatus();
  95. }
  96. function removeGridData()
  97. {
  98. model.removenode("/root/datagrid3");
  99. model.makeNode("/root/datagrid3");
  100. model.refresh();
  101. }
  102. ]]>
  103. </script>
  104. </xhtml:head>
  105. <xhtml:body pagewidth="980" pageheight="620" style="font-family:宋体; font-size:14pt; ">
  106. <caption id="caption2" class="cell" style="left:0px; top:5px; width:85px; height:20px; text-align:center; border-style:solid; ">标准号</caption>
  107. <select1 id="combo1" ref="/root/formData/SPECABBSYM" appearance="minimal" editmode="inputsearch" showvalue="false" style="left:85px; top:5px; width:250px; height:20px; border-style:solid; ">
  108. <choices>
  109. <itemset nodeset="/root/comboData/ABBSYM/ListResult_2_Row">
  110. <label ref="LABEL"/>
  111. <value ref="VALUE"/>
  112. </itemset>
  113. </choices>
  114. <script type="javascript" ev:event="xforms-select">
  115. <![CDATA[
  116. find();
  117. ]]>
  118. </script>
  119. </select1>
  120. <datagrid id="datagrid1" nodeset="/root/datagrid1/SpecInfoResult_Row" caption="交货状态^标准号^标准钢号^查询" colsep="^" colwidth="40, 190, 125, 37" defaultrows="40" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:53px; width:415px; height:562px; border-style:solid; ">
  121. <col editmode="inputsearch" ref="PRDNM_CD" type="input" maxlength="2" style="text-align:left; background-color:#ffff99; "/>
  122. <col editmode="search" ref="SPEC_ABBSYM" type="combo" style="text-align:left; background-color:#ffff99; ">
  123. <choices>
  124. <itemset nodeset="/root/comboData/ABBSYM/ListResult_2_Row">
  125. <label ref="LABEL"/>
  126. <value ref="VALUE"/>
  127. </itemset>
  128. </choices>
  129. </col>
  130. <col editmode="search" ref="SPEC_STL_GRD" type="combo" style="text-align:left; background-color:#ffff99; ">
  131. <choices>
  132. <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
  133. <label ref="LABEL"/>
  134. <value ref="VALUE"/>
  135. </itemset>
  136. </choices>
  137. </col>
  138. <col ref="QUERY" style="cursor:hand; "/>
  139. <script type="javascript" ev:event="onentercell">
  140. <![CDATA[
  141. datagrid1.editCell();
  142. ]]>
  143. </script>
  144. <script type="javascript" ev:event="onclick">
  145. <![CDATA[
  146. if(datagrid1.row >= datagrid1.fixedRows && datagrid1.col == datagrid1.colRef("QUERY"))
  147. {
  148. if(datagrid1.rowStatus(datagrid1.rows-1) == 1)
  149. {
  150. window.alert("增加状态下不允许该操作!" , "警告");
  151. datagrid1.row = datagrid1.rows-1;
  152. return;
  153. }
  154. if(beGridChanged(datagrid1,datagrid3) == "1" && currentRow != 0)
  155. {
  156. if(commComfirmBox("数据已修改,是否保存被修改的数据?","提示")=="0")
  157. {
  158. clearGridStatus();
  159. }
  160. else
  161. {
  162. save();
  163. }
  164. }
  165. currentRow = datagrid1.row;
  166. model.removenode("/root/reqData");
  167. model.makeNode("/root/reqData");
  168. //commSendReq("/root/datagrid1/SpecInfoResult_Row["+datagrid1.row+"]");
  169. model.makeValue("/root/reqData/PRDNM_CD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD")));
  170. model.makeValue("/root/reqData/SPEC_ABBSYM" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM")));
  171. model.makeValue("/root/reqData/SPEC_STL_GRD" , datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_STL_GRD")));
  172. commSubmit("UIB010302-service", "findDetails", "glueAction.do");
  173. model.copyNode("/root/datagrid3" , "/root/resData/TECHResult_VO");
  174. model.refresh();
  175. //setDatagrid();
  176. currentRow = datagrid1.row;
  177. datagrid1.col = 1;//预防滚动条拖动时做查询操作
  178. }
  179. ]]>
  180. </script>
  181. <script type="javascript" ev:event="onkeydown">
  182. <![CDATA[
  183. onkeydownmove(datagrid1);
  184. ]]>
  185. </script>
  186. </datagrid>
  187. <datagrid id="datagrid3" nodeset="/root/datagrid3/TECHResult_Row" caption="生产规范代码^中文名称^代码类型^判定符号^值要求^备注^EXP1^EXP2^EXP3" colsep="^" colwidth="110, 111, 65, 65, 65, 100, 50, 50,50" defaultrows="40" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" selectionmode="free" tooltip="label" style="left:418px; top:30px; width:559px; height:585px; border-style:solid; ">
  188. <col editable="false" ref="PROD_CD" style="text-align:left; background-color:#ffffff; "/>
  189. <col editable="false" ref="PROD_CD_CFNM" style="text-align:left; background-color:#ffffff; "/>
  190. <col editable="false" ref="PROD_TYPE" style="text-align:left; background-color:#ffffff; "/>
  191. <col editable="false" ref="DCS_SYM" style="text-align:left; background-color:#ffffff; "/>
  192. <col ref="PROD_VAL" type="input" style="text-align:right; background-color:#ffff99; "/>
  193. <col ref="MEMO" type="input" style="text-align:left; background-color:#ffff99; "/>
  194. <col ref="PROD_VAL_EXP1" visibility="hidden"/>
  195. <col ref="PROD_VAL_EXP2" visibility="hidden"/>
  196. <col ref="PROD_VAL_EXP3" visibility="hidden"/>
  197. <script type="javascript" ev:event="onentercell">
  198. <![CDATA[
  199. datagrid3.editCell();
  200. ]]>
  201. </script>
  202. <script type="javascript" ev:event="onkeydown">
  203. <![CDATA[
  204. onkeydownmove(datagrid3);
  205. ]]>
  206. </script>
  207. </datagrid>
  208. <button id="button3" visibility="hidden" style="left:290px; top:33px; width:80px; height:20px; background-image:../../images/btn_add.gif; ">
  209. <caption>添加</caption>
  210. <script type="javascript" ev:event="onclick">
  211. <![CDATA[
  212. if(beGridChanged(datagrid1,datagrid3) == "1")
  213. {
  214. window.alert("数据已修改,请保存或初始化!" , "警告");
  215. return;
  216. }
  217. if(datagrid3.rows > datagrid3.fixedRows )//是否存在数据
  218. {
  219. if(commComfirmBox("是否保留表中规范数据值要求?","提示")=="0")
  220. {
  221. findTechCD();
  222. clearGridStatus();
  223. }
  224. else
  225. {
  226. for(var i =1;i< datagrid3.rows;i++)
  227. {
  228. if(datagrid3.valueMatrix(i,datagrid3.colRef("PROD_VAL")) != "")
  229. {
  230. datagrid3.addStatus(i,"update");
  231. }
  232. }//for end
  233. }//else end
  234. }//if end ,else start
  235. else
  236. {
  237. findTechCD();
  238. }
  239. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  240. datagrid1.addRow(false);
  241. currentRow = datagrid1.row;
  242. datagrid1.valueMatrix(currentRow , datagrid1.colRef("PRDNM_CD") ) = "AR";
  243. datagrid1.valueMatrix(currentRow , datagrid1.colRef("SPEC_ABBSYM"))= model.getValue("/root/formData/SPECABBSYM");
  244. model.refresh();
  245. //setDatagrid();
  246. ]]>
  247. </script>
  248. </button>
  249. <button id="button4" visibility="hidden" style="left:355px; top:33px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
  250. <caption>删除</caption>
  251. <script type="javascript" ev:event="onclick">
  252. <![CDATA[
  253. //删除datagrid2中的数据
  254. if(beGridChanged(datagrid1 ,datagrid3) == "1")
  255. {
  256. window.alert("数据已修改,请保存或初始化!" , "警告");
  257. return;
  258. }
  259. if(commComfirmBox("确认删除?","提示")=="0") return;
  260. model.removenode("/root/reqData");
  261. model.makeNode("/root/reqData");
  262. datagrid1.deleteRow(datagrid1.row);
  263. commMultiUpdate(datagrid1,"/root/reqData" ,"A", true, "rowStatus0")
  264. getLoggingInInfo();
  265. commSubmit("UIB010302-service", "save", "glueAction.do");
  266. removeGridData();
  267. //清空表单的状态
  268. datagrid1.clearStatus();
  269. datagrid3.clearStatus();
  270. ]]>
  271. </script>
  272. </button>
  273. <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  274. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  275. <caption id="caption1" class="cell" style="left:345px; top:5px; width:85px; height:20px; ">标准钢号</caption>
  276. <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="inputsearch" style="left:429px; top:5px; width:131px; height:20px; ">
  277. <choices>
  278. <itemset nodeset="/root/initStlData/SpecStlGrd_Row">
  279. <label ref="LABEL"/>
  280. <value ref="VALUE"/>
  281. </itemset>
  282. </choices>
  283. </select1>
  284. <button id="button1" visibility="hidden" style="left:620px; top:5px; width:100px; height:20px; ">
  285. <caption>初始化</caption>
  286. <script type="javascript" ev:event="onclick">
  287. <![CDATA[
  288. Init();
  289. ]]>
  290. </script>
  291. </button>
  292. <button id="button2" visibility="hidden" style="left:730px; top:5px; width:100px; height:20px; ">
  293. <caption>查询</caption>
  294. <script type="javascript" ev:event="onclick">
  295. <![CDATA[
  296. find();
  297. ]]>
  298. </script>
  299. </button>
  300. <button id="button5" visibility="hidden" style="left:845px; top:5px; width:100px; height:20px; ">
  301. <caption>保存</caption>
  302. <script type="javascript" ev:event="onclick">
  303. <![CDATA[
  304. save();
  305. ]]>
  306. </script>
  307. </button>
  308. </xhtml:body>
  309. </xhtml:html>