799f990e7624317a274091dc02710aceda6ceb59.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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. <SMP/>
  13. <SEQ/>
  14. <PROGCD/>
  15. </formData>
  16. <datagrid1/>
  17. <datagrid2/>
  18. <initQlty>
  19. <QltyNMResult_Row>
  20. <LABEL/>
  21. <VALUE/>
  22. </QltyNMResult_Row>
  23. </initQlty>
  24. <tempData/>
  25. <initSmpData>
  26. <InitSmp_VO>
  27. <InitSmp_Row>
  28. <LABEL>---------</LABEL>
  29. <VALUE/>
  30. </InitSmp_Row>
  31. </InitSmp_VO>
  32. </initSmpData>
  33. <initSeqData>
  34. <InitSeq_VO>
  35. <InitSeq_Row>
  36. <LABEL>
  37. </LABEL>
  38. <VALUE/>
  39. </InitSeq_Row>
  40. </InitSeq_VO>
  41. </initSeqData>
  42. </root>
  43. </instance>
  44. <script type="javascript" ev:event="xforms-ready">
  45. <![CDATA[
  46. if(window.parent==null) Init();
  47. ]]>
  48. </script>
  49. </model>
  50. <script type="javascript" src="../../js/boaCommon.js"/>
  51. <script type="javascript" src="../../js/b01.js"/>
  52. <script type="javascript">
  53. <![CDATA[
  54. function Init(node)
  55. {
  56. InitParams(node);
  57. datagrid1.colStatus(0)=false;
  58. datagrid2.colStatus(0)=false;
  59. //材质代码名称初始化操作
  60. commSubmit("UIB020160-service" , "success" , "glueAction.do");
  61. model.copyNode("/root/initQlty" , "/root/resData/QltyNMResult_VO");
  62. model.duplicate("/root/initSmpData" , "/root/resData/InitSmp_VO");
  63. model.refresh();
  64. }
  65. function find()
  66. {
  67. model.removenode("/root/reqData");
  68. model.makeNode("/root/reqData");
  69. model.makeValue("/root/reqData/SMP" , combo1.value.Trim());//炉号
  70. model.makeValue("/root/reqData/SEQ" , combo2.value.Trim());//试样号
  71. model.makeValue("/root/reqData/PROG" , combo3.value);//进度代码
  72. // model.makeValue("/root/reqData/COILNO" , input2.value.Trim());//钢卷号
  73. commSubmit("UIB020160-service" , "find" , "glueAction.do");
  74. model.copyNode("/root/datagrid1" , "/root/resData/LotInfoResult_VO");
  75. model.copyNode("/root/datagrid2" , "/root/tempData");
  76. model.refresh();
  77. }
  78. function save()
  79. {
  80. model.removenode("/root/reqData");
  81. model.makeNode("/root/reqData");
  82. //delete and make temp node
  83. model.removenode("/root/tempData1");
  84. model.makeNode("/root/tempData1");
  85. model.removenode("/root/tempData2");
  86. model.makeNode("/root/tempData2");
  87. //get request data
  88. b01MultiUpdate(datagrid1,"/root/tempData1","A",true,"rowStatus1");
  89. b01MultiUpdate(datagrid2,"/root/tempData2","A",true,"rowStatus2");
  90. commSendReq("/root/tempData1" , "/root/tempData2");
  91. getLoggingInInfo();
  92. model.makeValue("/root/reqData/COIL_NO1" , datagrid1.valueMatrix(d1Row , 1));
  93. model.makeValue("/root/reqData/XX" , "UIB020160");//调用存储过程的标记
  94. //submit
  95. commSubmit("UIB020160-service" , "save" , "glueAction.do");
  96. //reflash
  97. model.refresh();
  98. datagrid1.clearStatus();
  99. datagrid2.clearStatus();
  100. d1Row = 0;//归零
  101. }
  102. function editFun()
  103. {
  104. var manTp = datagrid1.colRef("QLTY_MAN_INS_TP");
  105. if(datagrid1.valueMatrix(datagrid1.row , manTp) != "Y")
  106. {
  107. datagrid1.colAttribute(manTp , "disabled") = "true";
  108. }
  109. datagrid1.rebuild();
  110. }
  111. var d1Row = 0;//保存grid1中被选择的行
  112. ]]>
  113. </script>
  114. </xhtml:head>
  115. <xhtml:body pagewidth="980" pageheight="620">
  116. <datagrid id="datagrid1" nodeset="/root/datagrid1/LotInfoResult_Row" caption="选择^钢卷号^取样^试样号^位置^订单号^取样代码^检验机关^标准号^标准钢号^订单用途^厚度^原判定结果^手工判定^手工判定结果" colsep="^" colwidth="35, 93, 35, 100, 37, 100, 62, 70, 134, 90, 72, 38, 47, 35, 48" defaultrows="30" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" tooltip="label" style="left:0px; top:35px; width:980px; height:305px; ">
  117. <col checkvalue="Y,N" ref="CHK" type="radio"/>
  118. <col editable="false" ref="COIL_NO" type="input" style="background-color:#ffffff; "/>
  119. <col editable="false" ref="SMP_TIT_YN" style="background-color:#ffffff; "/>
  120. <col editable="false" ref="SMP_NO" type="input" style="background-color:#ffffff; "/>
  121. <col editable="false" ref="SMP_CUT_LOC" style="background-color:#ffffff; "/>
  122. <col editable="false" ref="ORD" style="background-color:#ffffff; "/>
  123. <col editable="false" ref="SAMPLINGCODE" style="background-color:#ffffff; "/>
  124. <col editable="false" ref="EXAMORG_CD" style="background-color:#ffffff; "/>
  125. <col editable="false" ref="SPEC_ABBSYM" type="input" style="background-color:#ffffff; "/>
  126. <col editable="false" ref="SPEC_STL_GRD" type="input" style="background-color:#ffffff; "/>
  127. <col editable="false" ref="ORD_USE_TP" style="background-color:#ffffff; "/>
  128. <col editable="false" ref="COIL_THK" style="background-color:#ffffff; "/>
  129. <col ref="MATLQLTY_DEC_GRD"/>
  130. <col editable="false" ref="QLTY_MAN_INS_TP" style="background-color:#ffffff; "/>
  131. <col ref="QLTY_MAN_DEC_GRD" type="input" style="background-color:#ffff99; "/>
  132. <script type="javascript" ev:event="onclick">
  133. <![CDATA[
  134. if(datagrid1.col == datagrid1.colRef("QLTY_MAN_DEC_GRD"))//若点击的是“手工判定结果”列
  135. {
  136. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("QLTY_MAN_INS_TP")) != "Y")
  137. {
  138. //“手工判定”值为Y才可进行编辑
  139. datagrid1.cellAttribute("editable" , datagrid1.row , datagrid1.col) = "false";
  140. datagrid2.colAttribute(datagrid2.colRef("QLTY_VAL_WK1") , "editable") = "false";
  141. datagrid2.colAttribute(datagrid2.colRef("QLTY_UNIT_WK1") , "editable") = "false";
  142. datagrid2.colAttribute(datagrid2.colRef("QLTY_DCS_RST") , "editable") = "false";
  143. }
  144. else
  145. {
  146. datagrid1.cellAttribute("editable" , datagrid1.row , datagrid1.col) = "true";
  147. datagrid2.colAttribute(datagrid2.colRef("QLTY_VAL_WK1") , "editable") = "true";
  148. datagrid2.colAttribute(datagrid2.colRef("QLTY_UNIT_WK1") , "editable") = "true";
  149. datagrid2.colAttribute(datagrid2.colRef("QLTY_DCS_RST") , "editable") = "true";
  150. }
  151. }
  152. if(datagrid1.col==0 && datagrid1.row >= datagrid1.fixedRows)//查询
  153. {
  154. //delete node
  155. model.removenode("/root/reqData");
  156. model.makeNode("/root/reqData");
  157. //get request data
  158. var currentRow = datagrid1.row;
  159. var currentCol = datagrid1.col;
  160. d1Row = currentRow;//为保存操作准备
  161. var smpNO = datagrid1.valueMatrix(currentRow , datagrid1.colRef("SMP_NO"));//试样号
  162. var cutLOC = datagrid1.valueMatrix(currentRow , datagrid1.colRef("SMP_CUT_LOC"));//位置
  163. var coilNO = datagrid1.valueMatrix(currentRow , datagrid1.colRef("COIL_NO"));//钢卷号
  164. model.makeValue("/root/reqData/SMPNO" , smpNO);
  165. model.makeValue("/root/reqData/CUTLOC", cutLOC);
  166. model.makeValue("/root/reqData/COILNO", coilNO);
  167. //submit
  168. // alert(cutLOC);
  169. if(cutLOC!="W")
  170. {
  171. datagrid2.colHidden(datagrid2.colRef("QLTY_VAL_WK2")) = true;
  172. datagrid2.colHidden(datagrid2.colRef("QLTY_UNIT_WK2")) = true;
  173. commSubmit("UIB020160-service" , "findQlty" , "glueAction.do");
  174. }
  175. if(cutLOC=="W")
  176. {
  177. datagrid2.colHidden(datagrid2.colRef("QLTY_VAL_WK2")) = false;
  178. datagrid2.colHidden(datagrid2.colRef("QLTY_UNIT_WK2")) = false;
  179. commSubmit("UIB020160-service" , "findQltyW" , "glueAction.do");
  180. }
  181. //copy
  182. model.copyNode("/root/datagrid2" , "/root/resData/QltyResult_VO");
  183. model.refresh();
  184. if(cutLOC=="W")
  185. {
  186. datagrid2.colHidden(datagrid2.colRef("QLTY_VAL_WK1")) = false;
  187. datagrid2.colHidden(datagrid2.colRef("QLTY_TYPE_WK1")) = false;
  188. }
  189. // datagrid1.row = 0;//将光标位置移动到表头,以免移动滚动条时做了查询操作
  190. }
  191. ]]>
  192. </script>
  193. </datagrid>
  194. <caption id="caption1" class="cell" style="left:230px; top:5px; width:100px; height:20px; ">试样编号</caption>
  195. <select1 id="combo1" ref="/root/formData/SMP" appearance="minimal" style="left:330px; top:5px; width:100px; height:20px; ">
  196. <choices>
  197. <itemset nodeset="/root/initSmpData/InitSmp_VO/InitSmp_Row">
  198. <label ref="LABEL"/>
  199. <value ref="VALUE"/>
  200. </itemset>
  201. </choices>
  202. <script type="javascript" ev:event="xforms-value-changed">
  203. <![CDATA[
  204. model.resetInstanceNode("/root/initSeqData/InitSeq_VO");//清除原来数据
  205. //获取序号
  206. model.removenode("/root/reqData");
  207. model.makeValue("/root/reqData/CHARGENO" , combo1.value.Trim());
  208. commSubmit("UIB020160-service" , "findSeq" , "glueAction.do");
  209. model.duplicate("/root/initSeqData" , "/root/resData/InitSeq_VO");
  210. model.refresh();
  211. ]]>
  212. </script>
  213. </select1>
  214. <line id="line1" style="x1:430px; y1:15px; x2:445px; y2:15px; "/>
  215. <caption id="caption2" class="cell" style="left:0px; top:5px; width:100px; height:20px; ">试样进程进度</caption>
  216. <datagrid id="datagrid2" nodeset="/root/datagrid2/QltyResult_Row" caption="选择^材质代码^实验次数^材质项目^材质要求范围&#xA;^材质要求范围&#xA;^材质要求范围&#xA;^实绩1^实绩1^实绩2^实绩2^材质结果^SMPNO^SMP_CUT_LOC^EX|选择^材质代码^实验次数^材质项目^最小^最大^单位^材质实绩^材质单位^材质实绩^材质单位^材质结果^SMPNO^SMP_CUT_LOC^EX" colsep="^" colwidth="45, 100, 38, 209, 60, 60, 60, 78, 78, 78, 78, 78, 41, 50, 35" defaultrows="30" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="label" style="left:0px; top:369px; width:980px; height:252px; ">
  217. <col checkvalue="Y,N" ref="CHK" type="radio"/>
  218. <col editable="false" ref="QLTY_CD" type="input" style="background-color:#ffffff; "/>
  219. <col editable="false" ref="QLTY_SEQ" type="input" style="background-color:#ffffff; "/>
  220. <col disabled="true" ref="QLTY_NM" type="combo">
  221. <choices>
  222. <itemset nodeset="/root/initQlty/QltyNMResult_Row">
  223. <label ref="LABEL"/>
  224. <value ref="VALUE"/>
  225. </itemset>
  226. </choices>
  227. </col>
  228. <col editable="false" ref="QLTY_MIN" type="input" style="background-color:#ffffff; "/>
  229. <col editable="false" ref="QLTY_MAX" type="input" style="background-color:#ffffff; "/>
  230. <col editable="false" ref="QLTY_UNIT" type="input" style="background-color:#ffffff; "/>
  231. <col ref="QLTY_VAL_WK1" type="input" style="background-color:#ffff99; "/>
  232. <col ref="QLTY_UNIT_WK1" type="input" style="background-color:#ffff99; "/>
  233. <col ref="QLTY_VAL_WK2" type="input" style="background-color:#ffff99; "/>
  234. <col ref="QLTY_UNIT_WK2" type="input" style="background-color:#ffff99; "/>
  235. <col ref="QLTY_DCS_RST" type="input" style="background-color:#ffff99; "/>
  236. <col ref="SMP_NO1" visibility="hidden"/>
  237. <col ref="SMP_CUT_LOC1" visibility="hidden"/>
  238. <col ref="EX" visibility="hidden"/>
  239. <script type="javascript" ev:event="onclick">
  240. <![CDATA[
  241. datagrid2.editCell();
  242. ]]>
  243. </script>
  244. </datagrid>
  245. <caption id="caption3" class="cell" style="left:0px; top:349px; width:100px; height:20px; ">判定实绩</caption>
  246. <button id="button1" style="left:825px; top:351px; width:75px; height:20px; background-image:..\..\images\create.GIF; ">
  247. <caption>增加</caption>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. //获得被选择的列
  251. var row = 0;
  252. for(var i = datagrid2.fixedRows; i <= datagrid2.rows; i++)
  253. {
  254. if(datagrid2.valueMatrix(i , 0)=="Y")
  255. {
  256. row = i;
  257. // datagrid2.valueMatrix(i , 0)="N";
  258. datagrid2.valueMatrix(i , datagrid2.colRef("QLTY_VAL_WK1")) = "";
  259. datagrid2.valueMatrix(i , datagrid2.colRef("QLTY_VAL_WK2")) = "";
  260. }
  261. }
  262. //若有被选择的列,则进行增加该列的材质代码
  263. var tempSEQ = 0;//存储循环中临时的实验次数,以便获得最大的实验次数
  264. if(row != 0)
  265. {
  266. datagrid2.addRow();
  267. for(var i = datagrid2.fixedRows; i <= datagrid2.rows; i++)
  268. {
  269. if(datagrid2.valueMatrix(i,1)==datagrid2.valueMatrix(row,1) && tempSEQ <datagrid2.valueMatrix(i,2))
  270. {
  271. tempSEQ = datagrid2.valueMatrix(i,2);
  272. }
  273. }
  274. var cRow = datagrid2.rows-1;
  275. datagrid2.valueMatrix(cRow , datagrid2.colRef("QLTY_CD")) = datagrid2.valueMatrix(row , datagrid2.colRef("QLTY_CD"))
  276. datagrid2.valueMatrix(cRow , datagrid2.colRef("QLTY_NM")) = datagrid2.valueMatrix(row , datagrid2.colRef("QLTY_NM"))
  277. datagrid2.valueMatrix(cRow , datagrid2.colRef("QLTY_SEQ"))= (parseInt(tempSEQ)+1);
  278. datagrid2.valueMatrix(cRow , datagrid2.colRef("COIL_NO1"))= datagrid2.valueMatrix(datagrid2.fixedRows , datagrid2.colRef("COIL_NO1"));
  279. datagrid2.valueMatrix(cRow , datagrid2.colRef("SMP_NO1")) = datagrid2.valueMatrix(datagrid2.fixedRows , datagrid2.colRef("SMP_NO1"));
  280. datagrid2.valueMatrix(cRow , datagrid2.colRef("SMP_CUT_LOC1"))= datagrid2.valueMatrix(datagrid2.fixedRows , datagrid2.colRef("SMP_CUT_LOC1"));
  281. //由于增加一行后,材质项目列变得可以选择,所以需要添加下面的代码
  282. datagrid2.colAttribute (datagrid2.colRef("QLTY_NM") , "disabled") = "true";
  283. datagrid2.rebuild();
  284. datagrid2.row = datagrid2.rows - 1;//重新将光标定位到最后一行
  285. }
  286. ]]>
  287. </script>
  288. </button>
  289. <button id="button2" style="left:910px; top:351px; width:75px; height:20px; background-image:..\..\images\delete.GIF; ">
  290. <caption>删除</caption>
  291. <script type="javascript" ev:event="DOMActivate">
  292. <![CDATA[
  293. for(var i = datagrid2.rows; i >= datagrid2.fixedRows; i--)
  294. {
  295. if(datagrid2.valueMatrix(i , 0)=="Y")
  296. {
  297. datagrid2.deleteRow(i , true);
  298. break;
  299. }
  300. }
  301. ]]>
  302. </script>
  303. </button>
  304. <select1 id="combo2" ref="/root/formData/SEQ" appearance="minimal" style="left:445px; top:5px; width:55px; height:20px; ">
  305. <choices>
  306. <itemset nodeset="/root/initSeqData/InitSeq_VO/InitSeq_Row">
  307. <label ref="LABEL"/>
  308. <value ref="VALUE"/>
  309. </itemset>
  310. </choices>
  311. </select1>
  312. <line id="line2" style="x1:0px; y1:30px; x2:975px; y2:30px; "/>
  313. <line id="line3" style="x1:0px; y1:0px; x2:975px; y2:0px; "/>
  314. <select1 id="combo3" ref="/root/formData/PROGCD" appearance="minimal" style="left:100px; top:5px; width:100px; height:20px; ">
  315. <choices>
  316. <item>
  317. <label>-----全部-------</label>
  318. <value/>
  319. </item>
  320. <item>
  321. <label>手工判定试样</label>
  322. <value>1</value>
  323. </item>
  324. <item>
  325. <label>不合格试样</label>
  326. <value>2</value>
  327. </item>
  328. </choices>
  329. </select1>
  330. <button id="button3" style="left:525px; top:5px; width:100px; height:20px; background-image:..\..\images\sw_select.gif; ">
  331. <caption>指定为手工判定</caption>
  332. <script type="javascript" ev:event="DOMActivate">
  333. <![CDATA[
  334. if(d1Row==0)
  335. return;//若grid1无选择时点击按钮则直接返回
  336. if(datagrid1.valueMatrix(d1Row , datagrid1.colRef("QLTY_MAN_INS_TP")) == "Y")
  337. return;//若被选择行的“手工判定”列值本身就是Y,则返回,不做任何操作
  338. //grid1中被选择行的“手工判定”列值为Y,表示为人工判定的
  339. datagrid1.valueMatrix(d1Row , datagrid1.colRef("QLTY_MAN_INS_TP")) = "Y";
  340. datagrid1.addStatus(d1Row , "update");
  341. ]]>
  342. </script>
  343. <hint>
  344. <![CDATA[被指定的试样号的判定结果由人工指定,非系统判定]]>
  345. </hint>
  346. </button>
  347. <button id="button99" visibility="hidden" style="left:925px; top:5px; width:50px; height:20px; ">
  348. <caption>FIND</caption>
  349. <script type="javascript" ev:event="DOMActivate">
  350. <![CDATA[
  351. find();
  352. ]]>
  353. </script>
  354. </button>
  355. </xhtml:body>
  356. </xhtml:html>