a7cb3b20ef9fd5d354b14b72887a061449c9f7f9.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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>
  6. <![CDATA[品质判定>>材质判定>>送样实绩录入]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <serachinfo>
  13. <Pstove/>
  14. <Pseq/>
  15. <ProcCD/>
  16. <startTime/>
  17. <endTime/>
  18. <ROLLNO_1/>
  19. <ROLLNO_2/>
  20. <songyangdengji>3</songyangdengji>
  21. <S_TIMD/>
  22. <E_TIME/>
  23. </serachinfo>
  24. </formData>
  25. <initCharge>
  26. <ChargeResult_VO>
  27. <ChargeResult_Row>
  28. <LABEL>-------</LABEL>
  29. <VALUE/>
  30. </ChargeResult_Row>
  31. </ChargeResult_VO>
  32. </initCharge>
  33. <initSeqNo>
  34. <SeqNo_VO>
  35. <SeqNo_Row>
  36. <LABEL>-----</LABEL>
  37. <VALUE/>
  38. </SeqNo_Row>
  39. </SeqNo_VO>
  40. </initSeqNo>
  41. <datagrid1/>
  42. <initProc>
  43. <LotProcCD_Row>
  44. <LABEL/>
  45. <VALUE/>
  46. </LotProcCD_Row>
  47. </initProc>
  48. </root>
  49. </instance>
  50. <script type="javascript" ev:event="xforms-ready">
  51. <![CDATA[
  52. if(window.parent==null) Init();
  53. ]]>
  54. </script>
  55. </model>
  56. <script type="javascript" src="../../js/boaCommon.js"/>
  57. <script type="javascript" src="../../js/b01.js"/>
  58. <script type="javascript">
  59. <![CDATA[
  60. function Init(node)
  61. {
  62. InitParams(node);
  63. datagrid1.colStatus(0)=false;
  64. input1.value = document.readIniFile("session1" , "UIB020111_1" , "" , "c:\\WINDOWS\\xgmes3.ini");
  65. input4.value = document.readIniFile("session1" , "UIB020111_2" , "" , "c:\\WINDOWS\\xgmes3.ini");
  66. }
  67. function find()
  68. {
  69. queryData();
  70. commSubmit("UIB020111-service" , "find" , "glueAction.do");
  71. model.copyNode("/root/datagrid1" , "/root/resData/LotActualityResult_VO");
  72. var returnInfoMsg = model.getValue("/root/resData/returnInfoMsg_VO/returnInfoMsg_Row");
  73. if(returnInfoMsg != null && returnInfoMsg != "")
  74. window.alert(returnInfoMsg, "操作信息");
  75. model.refresh();
  76. colouration();
  77. exceptionReport();
  78. }
  79. function queryData()//入库保存后也需要用到该部分
  80. {
  81. model.removenode("/root/reqData");
  82. model.makeNode("/root/reqData");
  83. document.writeIniFile("session1" , "UIB020111_1" , input1.value.Trim() , "c:\\WINDOWS\\xgmes3.ini");
  84. document.writeIniFile("session1" , "UIB020111_2" , input4.value.Trim() , "c:\\WINDOWS\\xgmes3.ini");
  85. model.makeValue("/root/reqData/S_TIME" , input2.value.Trim());
  86. model.makeValue("/root/reqData/E_TIME" , input3.value.Trim());
  87. model.makeValue("/root/reqData/SFLAG" , combo1.value);//送样区分
  88. model.makeValue("/root/reqData/ROLLNO_1" , input1.value.Trim());//钢卷号
  89. if(input4.value.Trim()=="")
  90. {
  91. model.makeValue("/root/reqData/ROLLNO_2" , input1.value.Trim());//钢卷号
  92. }
  93. else
  94. {
  95. model.makeValue("/root/reqData/ROLLNO_2" , input4.value.Trim());//钢卷号
  96. }
  97. }
  98. function save()
  99. {
  100. //被选择行的样片号进入检验待机状态
  101. queryData();
  102. var count = 0;
  103. for(var i = datagrid1.fixedRows; i < datagrid1.rows; i++)
  104. {
  105. if(datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "Y")
  106. {
  107. datagrid1.addStatus(i , "update");
  108. count++;
  109. }
  110. }
  111. commMultiUpdate(datagrid1 , "/root/reqData" , "U" , true , "rowStatus");
  112. getLoggingInInfo();
  113. commSubmit("UIB020111-service" , "save" , "glueAction.do");
  114. model.copyNode("/root/datagrid1" , "/root/resData/LotActualityResult_VO");
  115. model.refresh();
  116. datagrid1.clearStatus();
  117. find();
  118. colouration();
  119. exceptionReport();
  120. }
  121. function colouration()//染色
  122. {
  123. //复样的在采集待机状态也可入库
  124. var progcd = datagrid1.colRef("SMP_PROG_CD");//试样进程代码所在的列
  125. var sTime = datagrid1.colRef("SMP_SEND_DTIME");
  126. var overTp = datagrid1.colRef("YESS");//可否被选中
  127. for(var i = 2; i < datagrid1.rows; i++)
  128. {
  129. // if(datagrid1.valueMatrix(i , progcd) != "A" && datagrid1.valueMatrix(i , sTime) == "")//可以被选择的
  130. // {
  131. // datagrid1.valueMatrix(i , overTp)="Y";
  132. // }
  133. //可以入库的变为红色
  134. if(datagrid1.valueMatrix(i , overTp)=="Y")
  135. {
  136. datagrid1.rowstyle(i, "data", "color") = "#0000ff";
  137. }
  138. else
  139. {
  140. datagrid1.rowstyle(i, "data", "color") = "#000000";
  141. }
  142. }
  143. }
  144. ]]>
  145. </script>
  146. </xhtml:head>
  147. <xhtml:body pagewidth="980" pageheight="620">
  148. <datagrid id="datagrid1" nodeset="/root/datagrid1/LotActualityResult_Row" caption="选择^交货状态^钢卷号^试样号^位置^试样进程代码^是否为复样^标准号^标准钢号^厚度^生产时间^试样进程日期^试样进程日期^试样进程日期^试样进程日期^送样人^规格更改^可否被选择入库|选择^交货状态^钢卷号^试样号^位置^试样进程代码^是否为复样^标准号^标准钢号^厚度^生产时间^采集^送样^入库^检验^送样人^规格更改^hidden" colsep="^" colwidth="37, 37, 100, 35, 37, 85, 40, 100, 100, 40, 100, 75, 79, 75, 75, 100, 100, 56" explorerbar="sortshow" frozencols="4" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="label" style="left:0px; top:35px; width:970px; height:580px; ">
  149. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  150. <col editable="false" ref="PRDNM_CD" type="input" style="background-color:#ffffff; "/>
  151. <col editable="false" ref="OLD_SAMPL_NO" type="input" style="background-color:#ffffff; "/>
  152. <col editable="false" ref="SMP_NO" type="input" style="background-color:#ffffff; "/>
  153. <col editable="false" ref="SMP_CUT_LOC" visibility="hidden" style="background-color:#ffffff; "/>
  154. <col disabled="true" ref="SMP_PROG_CD" type="combo">
  155. <choices>
  156. <item>
  157. <label>试样采集待机</label>
  158. <value>A</value>
  159. </item>
  160. <item>
  161. <label>试样入库待机</label>
  162. <value>B</value>
  163. </item>
  164. <item>
  165. <label>试样检验待机</label>
  166. <value>C</value>
  167. </item>
  168. <item>
  169. <label>试样判定待机</label>
  170. <value>D</value>
  171. </item>
  172. <item>
  173. <label>试样判定完成</label>
  174. <value>E</value>
  175. </item>
  176. </choices>
  177. </col>
  178. <col editable="false" ref="FUYANG" style="background-color:#ffffff; "/>
  179. <col editable="false" ref="SPEC_ABBSYM" type="input" visibility="visible" style="text-align:left; background-color:#ffffff; "/>
  180. <col editable="false" ref="SPEC_STL_GRD" type="input" style="text-align:left; background-color:#ffffff; "/>
  181. <col editable="false" ref="COIL_THK" type="input" style="background-color:#ffffff; "/>
  182. <col ref="MILL_DTIME" format="yyyy-mm-dd hh:nn:ss"/>
  183. <col editable="false" ref="SMP_GET_DTIME" format="yyyy-mm-dd hh:nn:ss" style="background-color:#ffffff; "/>
  184. <col ref="SMP_SEND_DTIME" format="yyyy-mm-dd hh:nn:ss"/>
  185. <col editable="false" ref="SMP_INTO_DTIME" format="yyyy-mm-dd hh:nn:ss" style="background-color:#ffffff; "/>
  186. <col editable="false" ref="SMP_WORK_DTIME" format="yyyy-mm-dd hh:nn:ss" style="background-color:#ffffff; "/>
  187. <col ref="SMP_SEND_ID"/>
  188. <col checkvalue="Y,N" ref="CONFIRM" type="radio"/>
  189. <col editable="false" ref="YESS" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  190. <script type="javascript" ev:event="xforms-value-changed">
  191. <![CDATA[
  192. if(datagrid1.col==0 && datagrid1.row >1)
  193. {
  194. //获得试样状态,只有为入库待机状态,或复样的才允许选择
  195. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("YESS")) != "Y")
  196. {
  197. //若非入库待机状态的列被选择,则不允许选择
  198. datagrid1.valueMatrix(datagrid1.row , 0) = "N";
  199. }
  200. }
  201. model.refresh();
  202. ]]>
  203. </script>
  204. <script type="javascript" ev:event="onclick">
  205. <![CDATA[
  206. if(datagrid1.colRef("CONFIRM") == datagrid1.col
  207. && datagrid1.valueMatrix(datagrid1.row , datagrid1.col) == "Y")
  208. {
  209. if(commComfirmBox("确认更改规格?","提示")=="0") return;
  210. model.removenode("/root/reqData");
  211. model.makeNode("/root/reqData");
  212. model.makeValue("/root/reqData/SMP_NO" , datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("SMP_NO") ));
  213. commSubmit("UIB020111-service" , "save1" , "glueAction.do");
  214. // find();
  215. }
  216. ]]>
  217. </script>
  218. </datagrid>
  219. <line id="line2" style="x1:675px; y1:30px; x2:685px; y2:30px; border-color:#000000; "/>
  220. <line id="line3" style="x1:0px; y1:30px; x2:971px; y2:30px; "/>
  221. <line id="line4" style="x1:0px; y1:0px; x2:970px; y2:0px; "/>
  222. <line id="line5" style="x1:0px; y1:30px; x2:971px; y2:30px; "/>
  223. <caption id="caption5" class="cell" visibility="visible" style="left:540px; top:5px; width:100px; height:20px; ">轧批号</caption>
  224. <input id="input1" ref="/root/formData/serachinfo/ROLLNO_1" style="left:640px; top:5px; width:100px; height:20px; "/>
  225. <line id="line6" style="x1:740px; y1:15px; x2:750px; y2:15px; "/>
  226. <input id="input4" ref="/root/formData/serachinfo/ROLLNO_2" style="left:750px; top:5px; width:100px; height:20px; ">
  227. <script type="javascript" ev:event="onkeydown">
  228. <![CDATA[
  229. if(event.keyCode==13)
  230. {
  231. model.setFocus("");
  232. model.setFocus("input4");
  233. find();
  234. }
  235. ]]>
  236. </script>
  237. </input>
  238. <caption id="caption1" class="cell" style="left:200px; top:5px; width:100px; height:20px; ">送样时间</caption>
  239. <input id="input2" ref="/root/formData/serachinfo/S_TIMD" inputtype="date" style="left:300px; top:5px; width:100px; height:20px; "/>
  240. <line id="line1" style="x1:400px; y1:15px; x2:420px; y2:15px; "/>
  241. <input id="input3" ref="/root/formData/serachinfo/E_TIME" inputtype="date" style="left:420px; top:5px; width:100px; height:20px; "/>
  242. <caption id="caption2" class="cell" style="left:5px; top:5px; width:75px; height:20px; ">是否已送样</caption>
  243. <select1 id="combo1" ref="/root/formData/serachinfo/songyangdengji" appearance="minimal" style="left:75px; top:5px; width:100px; height:20px; ">
  244. <choices>
  245. <item>
  246. <label>全部</label>
  247. <value>1</value>
  248. </item>
  249. <item>
  250. <label>已送</label>
  251. <value>2</value>
  252. </item>
  253. <item>
  254. <label>未送</label>
  255. <value>3</value>
  256. </item>
  257. </choices>
  258. </select1>
  259. </xhtml:body>
  260. </xhtml:html>