0d50c7639896ae4f0a9baeee2e136ebb804b81d8.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. <Pstove/>
  12. <Pseq/>
  13. <startDate/>
  14. <endDate/>
  15. <coilno/>
  16. <endCoil/>
  17. <initSeqNo>
  18. <SeqNo_VO>
  19. <SeqNo_Row>
  20. <LABEL/>
  21. <VALUE/>
  22. </SeqNo_Row>
  23. </SeqNo_VO>
  24. </initSeqNo>
  25. <initQltyName>
  26. <QltyName_Row>
  27. <LABEL/>
  28. <VALUE/>
  29. </QltyName_Row>
  30. </initQltyName>
  31. <initCharge>
  32. <ChargeNo_VO>
  33. <ChargeNo_Row>
  34. <LABEL>-------</LABEL>
  35. <VALUE/>
  36. </ChargeNo_Row>
  37. </ChargeNo_VO>
  38. </initCharge>
  39. <datagrid1/>
  40. <datagrid2/>
  41. </root>
  42. </instance>
  43. <script type="javascript" ev:event="xforms-ready">
  44. <![CDATA[
  45. if(window.parent==null) Init();
  46. ]]>
  47. </script>
  48. </model>
  49. <script type="javascript" src="../../js/boaCommon.js"/>
  50. <script type="javascript" src="../../js/b01.js"/>
  51. <script type="javascript">
  52. <![CDATA[
  53. function Init(node)
  54. {
  55. //试样号的序号初始化
  56. InitParams(node);
  57. input1.value = commCurDate();//当前时间
  58. input2.value = commCurDate();//当前时间
  59. datagrid1.colStatus(0)=false;
  60. commSubmit("UIB020140-service" , "success" , "glueAction.do");
  61. model.copyNode("/root/initSeqNo" , "/root/resData/SeqNo_VO");
  62. model.copyNode("/root/initQltyName" , "/root/resData/QltyName_VO");//获得材质项目
  63. model.duplicate("/root/initCharge" , "/root/resData/ChargeNo_VO");
  64. model.refresh();
  65. combo1.select(0);
  66. combo2.select(0);
  67. }
  68. function find()
  69. {
  70. model.removenode("/root/reqData");
  71. model.makeNode("/root/reqData");
  72. var smpNo = jsTrim(combo1.value+combo2.value);//试样号
  73. var coilNo= jsTrim(input2.value);//钢卷号
  74. model.makeValue("/root/reqData/SMP_NO" , smpNo);//试样号
  75. model.makeValue("/root/reqData/COILNO_1" , input3.value.Trim());
  76. model.makeValue("/root/reqData/COILNO_2" , input4.value.Trim());
  77. model.makeValue("/root/reqData/startTime" ,input1.value.Trim()+"0000" );//开始日期
  78. model.makeValue("/root/reqData/endTime" ,input2.value.Trim()+"9999" );//结束日期
  79. commSubmit("UIB020140-service" , "findCoil" , "glueAction.do");
  80. model.copyNode("/root/datagrid1" , "/root/resData/LotInfoResult_VO");
  81. model.refresh();
  82. setColor(datagrid1 , "MATLQLTY_DEC_GRD");
  83. }
  84. function setColor(grid , colName)
  85. {
  86. grid.rebuildStyle();
  87. var col = "";
  88. // col = grid.colRef("MATLQLTY_DEC_GRD");
  89. col = grid.colRef(colName);
  90. for(var i = grid.fixedRows; i < grid.rows; i++)
  91. {
  92. if(grid.valueMatrix(i , col) == "2")
  93. {
  94. grid.rowStyle(i , "data" , "color") = "#ff0000";
  95. }
  96. }
  97. }
  98. function save()
  99. {
  100. if(commComfirmBox("确认取消材质判定?","提示")=="0") return;
  101. var dcsCol = datagrid1.colRef("OVER_DCS");
  102. // var dcsId = datagrid1.valueMatrix()
  103. var id = model.getValue("");
  104. for(var i = datagrid1.fixedRows; i < datagrid1.rows; i++)
  105. {
  106. if(datagrid1.valueMatrix(i , dcsCol) == "Y")
  107. {
  108. datagrid1.addStatus(i , "update");
  109. }
  110. }
  111. model.removenode("/root/reqData");
  112. model.makeNode("/root/reqData");
  113. commMultiUpdate(datagrid1 , "/root/reqData" , "A" , true , "rowStatus");
  114. commSubmit("UIB020140-service" , "save" , "glueAction.do");
  115. find();
  116. }
  117. ]]>
  118. </script>
  119. </xhtml:head>
  120. <xhtml:body pagewidth="980" pageheight="620">
  121. <datagrid id="datagrid1" nodeset="/root/datagrid1/LotInfoResult_Row" caption="选择^生产流水号^钢卷号^取样^样片号^位置^订单号^取样代码^检验机关^标准号^标准钢号^订单用途^厚度^材质结果^是否已综合判定^判定人^判定时间^判定取消" colsep="^" colwidth="33, 97, 100, 39, 108, 37, 105, 55, 90, 134, 82, 65, 38, 56, 46, 60, 70, 61" explorerbar="sortshow" frozencols="2" mergecellsfixedrows="bycolrec" rowheight="35" rowsep="|" tooltip="true" style="left:0px; top:35px; width:980px; height:355px; ">
  122. <col ref="CHK" type="radio"/>
  123. <col editable="false" ref="COIL_NO" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  124. <col editable="false" ref="OLD_SAMPL_NO" type="input" style="background-color:#ffffff; "/>
  125. <col editable="false" ref="SMP_TIT_YN" type="input" style="background-color:#ffffff; "/>
  126. <col editable="false" ref="SMP_NO" type="input" style="background-color:#ffffff; "/>
  127. <col editable="false" ref="SMP_CUT_LOC" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  128. <col editable="false" ref="ORD_NO" type="input" style="background-color:#ffffff; "/>
  129. <col editable="false" ref="SAMPLING_CODE" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  130. <col editable="false" ref="EXAMORG_CD" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  131. <col editable="false" ref="SPEC_ABBSYM" type="input" style="background-color:#ffffff; "/>
  132. <col editable="false" ref="SPEC_STL_GRD" type="input" style="background-color:#ffffff; "/>
  133. <col editable="false" ref="ORD_USE_TP" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  134. <col editable="false" ref="COIL_THK" type="input" style="background-color:#ffffff; "/>
  135. <col editable="false" ref="MATLQLTY_DEC_GRD" type="input" style="background-color:#ffffff; "/>
  136. <col ref="TOT_OVER"/>
  137. <col ref="MATLQLTY_DEC_EMP_ID"/>
  138. <col editable="false" ref="QLTY_DCS_DTIME" type="input" format="yyyy-mm-dd hh:nn:ss" style="background-color:#ffffff; "/>
  139. <col checkvalue="Y,N" ref="OVER_DCS" type="checkbox"/>
  140. <script type="javascript" ev:event="xforms-value-changed">
  141. <![CDATA[
  142. //若当前点击的列示第一列,且非标题行,非最后行后的行
  143. if(datagrid1.col==0 && datagrid1.row>0 && datagrid1.row <= datagrid1.rows)
  144. {
  145. model.removenode("/root/reqData");
  146. model.makeNode("/root/reqData");
  147. var row = datagrid1.row;
  148. var coilNo = datagrid1.valueMatrix(row , datagrid1.colRef("COIL_NO"));//钢卷号
  149. var smpNo = datagrid1.valueMatrix(row , datagrid1.colRef("SMP_NO"));//样片号
  150. var ordNo = datagrid1.valueMatrix(row , datagrid1.colRef("ORD_NO"));//订单号
  151. var smpCutLoc = datagrid1.valueMatrix(row , datagrid1.colRef("SMP_CUT_LOC"));//位置
  152. model.makeValue("/root/reqData/COIL_NO" , coilNo);
  153. model.makeValue("/root/reqData/SMP_NO" , smpNo );
  154. model.makeValue("/root/reqData/ORD_NO" , ordNo);
  155. model.makeValue("/root/reqData/SMP_CUT_LOC" , smpCutLoc);
  156. if(smpCutLoc=="W")
  157. {
  158. datagrid2.colHidden(datagrid2.colRef("QLTY_VAL_WK2")) = false;
  159. datagrid2.colHidden(datagrid2.colRef("QLTY_UNIT_WK2")) = false;
  160. commSubmit("UIB020140-service" , "findW" , "glueAction.do");
  161. }
  162. else
  163. {
  164. datagrid2.colHidden(datagrid2.colRef("QLTY_VAL_WK2")) = true;
  165. datagrid2.colHidden(datagrid2.colRef("QLTY_UNIT_WK2")) = true;
  166. commSubmit("UIB020140-service" , "find" , "glueAction.do");
  167. }
  168. model.copyNode("/root/datagrid2" , "/root/resData/DecideResult_VO");
  169. model.refresh();
  170. setColor(datagrid2 , "QLTY_DCS_RST");
  171. }
  172. ]]>
  173. </script>
  174. <script type="javascript" ev:event="onclick">
  175. <![CDATA[
  176. var overCol = datagrid1.colRef("OVER_DCS");
  177. var id = model.getValue("/root/reqData/REG_ID");
  178. var totCol = datagrid1.colRef("TOT_OVER");
  179. if(overCol == datagrid1.col)
  180. {
  181. if(datagrid1.valueMatrix(datagrid1.row , totCol) == "Y")
  182. {
  183. datagrid1.valueMatrix(datagrid1.row , overCol) = "N"
  184. window.alert("综合判定已完成,不可取消材质判定!","警告");
  185. return;
  186. }
  187. var selected = datagrid1.valueMatrix(datagrid1.row ,datagrid1.col);
  188. var actCol = datagrid1.colRef("OLD_SAMPL_NO");//钢卷号所在的列
  189. // if(id != datagrid1.valueMatrix(datagrid1.row ,datagrid1.colRef("MATLQLTY_DEC_EMP_ID")))
  190. // {
  191. // return;
  192. // }
  193. for(var i = datagrid1.fixedRows; i < datagrid1.rows; i++)
  194. {
  195. if(datagrid1.valueMatrix(i,actCol).substr(0,10) == datagrid1.valueMatrix(datagrid1.row , actCol).substr(0,10))
  196. {
  197. datagrid1.valueMatrix(i , overCol) = selected;
  198. }
  199. }
  200. }
  201. ]]>
  202. </script>
  203. </datagrid>
  204. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; ">判定日期</caption>
  205. <caption id="caption2" class="cell" visibility="hidden" style="left:835px; top:5px; width:85px; height:20px; ">试样号</caption>
  206. <datagrid id="datagrid2" nodeset="/root/datagrid2/DecideResult_Row" allowuserresize="false" caption="材质代码^实验次数^材质项目^客户^客户^客户^标准^标准^标准^实绩(1)^实绩(1)^实绩(2)^实绩(2)^判定结果|材质代码^实验次数^材质项目^最小^最大^单位^最小^最大^单位^实绩值^单位^实绩值^单位^判定结果" colsep="^" colwidth="77, 45, 180, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:417px; width:980px; height:203px; ">
  207. <col editable="false" ref="QLTY_CD" type="input" style="background-color:#ffffff; "/>
  208. <col editable="false" ref="QLTY_SEQ" type="input" style="background-color:#ffffff; "/>
  209. <col disabled="true" ref="QLTY_CD" type="combo">
  210. <choices>
  211. <itemset nodeset="/root/initQltyName/QltyName_Row">
  212. <label ref="LABEL"/>
  213. <value ref="VALUE"/>
  214. </itemset>
  215. </choices>
  216. </col>
  217. <col editable="false" ref="CUST_QLTY_MIN" type="input" style="background-color:#ffffff; "/>
  218. <col editable="false" ref="CUST_QLTY_MAX" type="input" style="background-color:#ffffff; "/>
  219. <col editable="false" ref="CUST_QLTY_UNIT" type="input" style="background-color:#ffffff; "/>
  220. <col editable="false" ref="SPEC_QLTY_MIN" type="input" style="background-color:#ffffff; "/>
  221. <col editable="false" ref="SPEC_QLTY_MAX" type="input" style="background-color:#ffffff; "/>
  222. <col editable="false" ref="SPEC_QLTY_UNIT" type="input" style="background-color:#ffffff; "/>
  223. <col editable="false" ref="QLTY_VAL_WK1" type="input" style="background-color:#ffffff; "/>
  224. <col editable="false" ref="QLTY_UNIT_WK1" type="input" style="background-color:#ffffff; "/>
  225. <col editable="false" ref="QLTY_VAL_WK2" type="input" style="background-color:#ffffff; "/>
  226. <col editable="false" ref="QLTY_UNIT_WK2" type="input" style="background-color:#ffffff; "/>
  227. <col editable="false" ref="QLTY_DCS_RST" type="input" style="background-color:#ffffff; "/>
  228. </datagrid>
  229. <caption id="caption3" class="cell" style="left:0px; top:398px; width:100px; height:20px; ">判定实绩</caption>
  230. <line id="line1" style="x1:200px; y1:15px; x2:210px; y2:15px; "/>
  231. <select1 id="combo2" ref="/root/Pseq" visibility="hidden" appearance="minimal" editmode="inputsearch" style="left:950px; top:5px; width:10px; height:20px; ">
  232. <choices>
  233. <itemset nodeset="/root/initSeqNo/SeqNo_VO/SeqNo_Row">
  234. <label ref="LABEL"/>
  235. <value ref="VALUE"/>
  236. </itemset>
  237. </choices>
  238. </select1>
  239. <input id="input2" ref="/root/endDate" inputtype="date" style="left:210px; top:5px; width:100px; height:20px; "/>
  240. <line id="line2" style="x1:0px; y1:30px; x2:979px; y2:30px; "/>
  241. <line id="line3" style="x1:0px; y1:0px; x2:979px; y2:0px; "/>
  242. <select1 id="combo1" ref="/root/Pstove" visibility="hidden" appearance="minimal" cols="5" editmode="inputsearch" style="left:920px; top:5px; width:25px; height:20px; ">
  243. <choices>
  244. <itemset nodeset="/root/initCharge/ChargeNo_VO/ChargeNo_Row">
  245. <label ref="LABEL"/>
  246. <value ref="VALUE"/>
  247. </itemset>
  248. </choices>
  249. <script type="javascript" ev:event="xforms-value-changed">
  250. <![CDATA[
  251. model.resetInstanceNode("/root/initSeqNo/SeqNo_VO");//清除原来数据
  252. //获取序号
  253. model.removenode("/root/reqData");
  254. model.makeValue("/root/reqData/CHARGENO" , combo1.value.Trim());
  255. commSubmit("UIB020140-service" , "findSeq" , "glueAction.do");
  256. model.duplicate("/root/initSeqNo" , "/root/resData/SeqNo_VO");
  257. model.refresh();
  258. combo2.select(0);
  259. ]]>
  260. </script>
  261. </select1>
  262. <input id="input1" ref="/root/startDate" inputtype="date" style="left:100px; top:5px; width:100px; height:20px; "/>
  263. <line id="line4" style="x1:530px; y1:15px; x2:545px; y2:15px; "/>
  264. <caption id="caption4" class="cell" style="left:330px; top:5px; width:100px; height:20px; ">轧批号</caption>
  265. <input id="input3" ref="/root/coilno" style="left:430px; top:5px; width:100px; height:20px; "/>
  266. <input id="input4" ref="/root/endCoil" style="left:545px; top:5px; width:100px; height:20px; "/>
  267. <button id="button1" visibility="hidden" style="left:675px; top:5px; width:80px; height:20px; background-color:#ff9900; border-style:solid; ">
  268. <caption>判定取消</caption>
  269. <script type="javascript" ev:event="DOMActivate">
  270. <![CDATA[
  271. save();
  272. ]]>
  273. </script>
  274. </button>
  275. </xhtml:body>
  276. </xhtml:html>