UIB010320.xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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[品质设计>>生产规范录入>>Design-key]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <SPECABBSYM/>
  13. <SPECSTLGRD/>
  14. </formData>
  15. <datagrid1/>
  16. <initSpecData>
  17. <SpecResult_VO>
  18. <SpecResult_Row>
  19. <LABEL>------全部------</LABEL>
  20. <VALUE/>
  21. </SpecResult_Row>
  22. </SpecResult_VO>
  23. </initSpecData>
  24. <initCustData>
  25. <CustResult_VO>
  26. <CustResult_Row>
  27. <LABEL>---全部---</LABEL>
  28. <VALUE/>
  29. </CustResult_Row>
  30. </CustResult_VO>
  31. </initCustData>
  32. <comboData>
  33. <SPEC_ABBSYM/>
  34. <SPEC_STL_GRD/>
  35. <ORD_USE_TP/>
  36. <FAC_STL_GRD/>
  37. <MILL_STD_NO/>
  38. <SMS_STD_NO/>
  39. <DEL_TOL_CD/>
  40. <DEV_DGR_CD/>
  41. </comboData>
  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. var doFlag; //删除与修改、增加的区分
  55. function Init(node)
  56. {
  57. InitParams(node);
  58. //对下拉框中的信息进行初始化
  59. datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
  60. commSubmit("UIB010320-service", "success", "glueAction.do");
  61. model.duplicate("/root/initSpecData" , "/root/resData/SpecResult_VO");
  62. model.copyNode("/root/comboData/SPEC_STL_GRD" , "/root/resData/SPEC_STL_GRD_RESULT_VO");
  63. /*
  64. model.copyNode("/root/comboData/ORD_USE_TP" , "/root/resData/ORD_USE_TP_RESULT_VO");
  65. model.copyNode("/root/comboData/FAC_STL_GRD" , "/root/resData/FAC_STL_GRD_RESULT_VO");
  66. model.copyNode("/root/comboData/MILL_STD_NO" , "/root/resData/MILL_STD_NO_RESULT_VO");
  67. model.copyNode("/root/comboData/SMS_STD_NO" , "/root/resData/SMS_STD_NO_RESULT_VO");
  68. model.copyNode("/root/comboData/DEL_TOL_CD" , "/root/resData/DEL_TOL_CD_RESULT_VO");
  69. model.copyNode("/root/comboData/DEV_DGR_CD" , "/root/resData/DEV_DGR_CD_RESULT_VO");
  70. model.duplicate("/root/initCustData" , "/root/resData/CustResult_VO");
  71. model.copyNode("/root/comboData/SPEC_ABBSYM" , "/root/resData/SPEC_ABBSYM_RESULT_VO");*/
  72. model.refresh();
  73. }
  74. function find(doFlag)
  75. {
  76. model.removenode("/root/reqData");
  77. model.makeNode("/root/reqData");
  78. commSendReq("/root/formData");
  79. commSubmit("UIB010320-service", "find", "glueAction.do");
  80. model.copyNode("/root/datagrid1" , "/root/resData/DesignKeyResult_VO");
  81. model.refresh();
  82. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  83. datagrid1.rebuildStyle();
  84. }
  85. function save(doFlag)
  86. {
  87. //判断炼钢生产规范编号、轧钢生产规范编号是否为空,若为空则不允许保存
  88. /*var rows = datagrid1.rows;
  89. var str = "";
  90. var sms = null;
  91. var mill = null;
  92. var stl = null;
  93. var col1 = datagrid1.colRef("SMS_STD_NO");//炼钢生产规范编号所在列
  94. var col2 = datagrid1.colRef("MILL_STD_NO");//轧钢生产规范编号所在列
  95. var col3 = datagrid1.colRef("FAC_STL_GRD");//厂内钢号所在列
  96. for(var i=3 ; i < rows; i++)//标题行不算,所以从第三行开始算
  97. {
  98. sms = datagrid1.valueMatrix(i , col1);//炼钢生产规范编号
  99. mill= datagrid1.valueMatrix(i , col2);//轧钢生产规范编号
  100. stl = datagrid1.valueMatrix(i , col3);//厂内钢号
  101. if(jsTrim(stl)=="")
  102. {
  103. str = "第"+(i-2)+"行:厂内钢号为空";
  104. break;
  105. }
  106. if(jsTrim(sms)=="")
  107. {
  108. str = "第"+(i-2)+"行:炼钢生产规范编号为空";
  109. break;
  110. }
  111. if(jsTrim(mill)=="")
  112. {
  113. str = "第"+(i-2)+"行:轧钢生产规范编号为空";
  114. break;
  115. }
  116. }
  117. if(jsTrim(str) != "")
  118. {
  119. window.alert(str,"错误");
  120. return;
  121. }*/
  122. if(doFlag == "D")//删除
  123. {
  124. if(beGridChanged(datagrid1) == "1")
  125. {
  126. if(commComfirmBox("数据已修改,可能出现误删,确定删除?","提示")=="0") return;
  127. }
  128. if(commComfirmBox("确认删除?","提示")=="0") return;
  129. for(var i=datagrid1.rows; i >= datagrid1.fixedRows; i--)//“3”表示第一行(非标题行)
  130. {
  131. if(datagrid1.valueMatrix(i, datagrid1.colRef("CHK"))=="Y")
  132. {
  133. datagrid1.deleteRow(i,false);//删除checkbox值为y的行,自动刷新
  134. }
  135. }
  136. }
  137. else
  138. {
  139. if(commComfirmBox("确认保存?","提示")=="0") return;
  140. }
  141. model.removenode("/root/reqData");
  142. model.makeNode("/root/reqData");
  143. b01MultiUpdate(datagrid1 , "/root/reqData" , "A" , true , "rowStuts");
  144. getLoggingInInfo();//获得登录人信息
  145. commSubmit("UIB010320-service" , "save" , "glueAction.do");
  146. model.copyNode("/root/datagrid1" , "/root/resData/DesignKeyResult_VO");
  147. model.refresh();
  148. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  149. datagrid1.clearStatus();//清除状态
  150. datagrid1.rebuildStyle();
  151. }
  152. ]]>
  153. </script>
  154. </xhtml:head>
  155. <xhtml:body pagewidth="980" pageheight="620">
  156. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; vertical-align:middle; border-style:solid; ">标准号</caption>
  157. <select1 id="combo1" ref="/root/formData/SPECABBSYM" appearance="minimal" editmode="input" style="left:97px; top:5px; width:223px; height:20px; border-style:solid; ">
  158. <choices>
  159. <itemset nodeset="/root/initSpecData/SpecResult_VO/SpecResult_Row">
  160. <label ref="LABEL"/>
  161. <value ref="VALUE"/>
  162. </itemset>
  163. </choices>
  164. </select1>
  165. <datagrid id="datagrid1" nodeset="/root/datagrid1/DesignKeyResult_Row" caption="选择^生产线^订单必须参数^订单必须参数^订单必须参数^订单必须参数^订单必须参数^订单必须参数^订单必须参数^订单必须参数^订单必须参数^基料卷标准^基料卷标准^基料卷标准^基料卷标准^基料卷标准^生产规范编码^生产规范编码^生产规范编码^生产规范编码^生产规范编码^录入人^录入时间^最后修改人^最后修改时间^PROD_LINE^PRDNM_CD^SPEC_ABBSYM^THK_MIN^THK_MAX^WTH_MIN^WTH_MAX^SPEC_STL_GRD|选择^生产线^交货状态^标准号^厚度^厚度^宽度^宽度^订单用途编码^订单用途^标准牌号^基料卷交货状态^基料卷标准号^基料卷标准牌号^基料用途^基料卷用途^规格对应码^厂内牌号^炼钢规范^热轧规范^冷轧规范^录入人^录入时间^最后修改人^最后修改时间^PROD_LINE^PRDNM_CD^SPEC_ABBSYM^THK_MIN^THK_MAX^WTH_MIN^WTH_MAX^SPEC_STL_GRD|选择^生产线^交货状态^标准号^最小^最大^最小^最大^订单用途编码^订单用途^标准牌号^基料卷交货状态^基料卷标准号^基料卷标准牌号^基料用途^基料卷用途^规格对应码^厂内牌号^炼钢规范^热轧规范^冷轧规范^录入人^录入时间^最后修改人^最后修改时间^PROD_LINE^PRDNM_CD^SPEC_ABBSYM^THK_MIN^THK_MAX^WTH_MIN^WTH_MAX^SPEC_STL_GRD" colsep="^" colwidth="30, 49, 42, 129, 40, 40, 40, 40, 50, 100, 107, 79, 72, 85, 100, 100, 82, 86, 56, 55, 55, 80, 100, 79, 100, 50, 56, 54, 49, 33, 34, 61, 68, 50" explorerbar="sort" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="free" tooltip="label" style="left:0px; top:35px; width:980px; height:585px; border-style:solid; ">
  166. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  167. <col ref="PROD_LINE" type="input" style="background-color:#ffffff; "/>
  168. <col explorerbar="sortshowmove" disabled="false" editmode="inputsearch" ref="PRDNM_CD" type="input" maxlength="2" style="text-align:left; background-color:#ffffff; "/>
  169. <col explorerbar="sortshowmove" disabled="false" editmode="search" ref="SPEC_ABBSYM" type="input" style="text-align:left; background-color:#ffffff; "/>
  170. <col ref="THK_MIN" type="input" style="text-align:right; background-color:#ffffff; "/>
  171. <col ref="THK_MAX" type="input" style="text-align:right; background-color:#ffffff; "/>
  172. <col ref="WTH_MIN" type="input" style="text-align:right; background-color:#ffffff; "/>
  173. <col ref="WTH_MAX" type="input" style="text-align:right; background-color:#ffffff; "/>
  174. <col editmode="search" ref="ORD_USE_TP" visibility="hidden" style="text-align:left; "/>
  175. <col ref="ORD_USE"/>
  176. <col explorerbar="sortshowmove" editmode="search" ref="SPEC_STL_GRD" type="input" style="text-align:left; background-color:#ffffff; "/>
  177. <col ref="C_PRDNM_CD" type="input" style="background-color:#ffffff; "/>
  178. <col ref="C_SPEC_ABBSYM" type="input" style="background-color:#ffffff; "/>
  179. <col ref="C_SPEC_STL_GRD" type="input" style="background-color:#ffffff; "/>
  180. <col ref="C_ORD_USE_TP" visibility="hidden"/>
  181. <col ref="C_ORD_USE"/>
  182. <col ref="SIZE_SPEC_CD" type="input"/>
  183. <col explorerbar="sortshowmove" editmode="search" ref="FAC_STL_GRD" type="input" style="text-align:left; background-color:#ffffff; "/>
  184. <col ref="SMS_STD_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
  185. <col ref="MILL_STD_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
  186. <col ref="COLD_STD_NO" type="input" style="background-color:#ffffff; "/>
  187. <col ref="REG_ID" style="text-align:left; "/>
  188. <col ref="REG_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  189. <col ref="MOD_ID" style="text-align:left; "/>
  190. <col ref="MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  191. <col ref="PROD_LINE1" visibility="hidden"/>
  192. <col ref="PRDNM_CD1" visibility="hidden"/>
  193. <col ref="SPEC_ABBSYM1" visibility="hidden"/>
  194. <col ref="THK_MIN1" visibility="hidden"/>
  195. <col ref="THK_MAX1" visibility="hidden"/>
  196. <col ref="WTH_MIN1" visibility="hidden"/>
  197. <col ref="WTH_MAX1" visibility="hidden"/>
  198. <col ref="SPEC_STL_GRD1" visibility="hidden"/>
  199. <col ref="ORD_USE_TP1" visibility="hidden"/>
  200. <script type="javascript" ev:event="xforms-value-changed">
  201. <![CDATA[
  202. if(datagrid1.row < datagrid1.fixedRows && datagrid1.col != datagrid1.colRef("CHK")) return;
  203. var currentRow = datagrid1.row;
  204. var checkCol = datagrid1.colRef("CHK");
  205. var startCol = datagrid1.colRef("PROD_LINE");
  206. var endCol = datagrid1.colRef("COLD_STD_NO");
  207. if(datagrid1.valueMatrix(currentRow , checkCol) == "Y")
  208. {
  209. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , datagrid1.cols - 1) = "false";
  210. for(var i = startCol; i <= endCol ; i++)
  211. {
  212. datagrid1.cellStyle("background-color",currentRow ,i) = "#ffff99";
  213. }
  214. }
  215. else
  216. {
  217. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , datagrid1.cols - 1) = "true";
  218. for(var i = startCol; i <= endCol ; i++)
  219. {
  220. datagrid1.cellStyle("background-color",currentRow, i) = "#ffffff";
  221. }
  222. }
  223. ]]>
  224. </script>
  225. <script type="javascript" ev:event="onentercell">
  226. <![CDATA[
  227. datagrid1.editCell();
  228. ]]>
  229. </script>
  230. <script type="javascript" ev:event="onkeydown">
  231. <![CDATA[
  232. onkeydownmove(datagrid1);
  233. ]]>
  234. </script>
  235. <script type="javascript" ev:event="ondblclick">
  236. <![CDATA[
  237. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK"))=="Y")
  238. {
  239. window.load("./_UIB010320.xrw", "modal", "",
  240. "left:500; top:300; width:350; height:450; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  241. }
  242. ]]>
  243. </script>
  244. </datagrid>
  245. <button id="button3" style="left:840px; top:5px; width:75px; height:20px; background-image:../../images/btn_add.gif; ">
  246. <caption>增加</caption>
  247. <script type="javascript" ev:event="onclick">
  248. <![CDATA[
  249. if(datagrid1.row < datagrid1.fixedRows)
  250. {
  251. datagrid1.addRow();
  252. datagrid1.vscroll.attribute("pos") = datagrid1.rows*20;
  253. }
  254. else
  255. {
  256. datagrid1.insertRow(datagrid1.row);
  257. }
  258. datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK")) = "Y";
  259. ]]>
  260. </script>
  261. </button>
  262. <button id="button4" style="left:905px; top:5px; width:75px; height:20px; background-image:../../images/btn_move.gif; ">
  263. <caption>删除</caption>
  264. <script type="javascript" ev:event="onclick">
  265. <![CDATA[
  266. save("D");
  267. ]]>
  268. </script>
  269. </button>
  270. <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  271. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  272. <caption id="caption2" class="cell" style="left:345px; top:5px; width:100px; height:20px; vertical-align:middle; border-style:solid; ">牌号</caption>
  273. <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="inputsearch" style="left:442px; top:5px; width:143px; height:20px; border-style:solid; ">
  274. <choices>
  275. <itemset nodeset="/root/comboData/SPEC_STL_GRD/SPEC_STL_GRD_RESULT_Row">
  276. <label ref="LABEL"/>
  277. <value ref="VALUE"/>
  278. </itemset>
  279. </choices>
  280. </select1>
  281. </xhtml:body>
  282. </xhtml:html>