UIB010250.xrw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. <CUSTCD/>
  13. </formData>
  14. <datagrid1/>
  15. <reqData/>
  16. <resData/>
  17. <comboData>
  18. <SPEC_ABBSYM/>
  19. <SPEC_STL_GRD/>
  20. <ORD_USE_TP/>
  21. <FAC_STL_GRD/>
  22. <MILL_STD_NO/>
  23. <SMS_STD_NO/>
  24. <DEL_TOL_CD/>
  25. <DEV_DGR_CD/>
  26. <CustCodeResult/>
  27. </comboData>
  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 doFlag;
  41. function Init(node)
  42. {
  43. InitParams(node);
  44. //对下拉框中的信息进行初始化
  45. datagrid1.colStatus(datagrid1.colRef("CHK"))=false; //初始化时为非全选
  46. commSubmit("UIB010250-service" , "success" , "glueAction.do");
  47. model.copyNode("/root/comboData/CustCodeResult" , "/root/resData/CustCodeResult_VO");
  48. model.copyNode("/root/comboData/SPEC_ABBSYM" , "/root/resData/SPEC_ABBSYM_RESULT_VO");
  49. model.copyNode("/root/comboData/SPEC_STL_GRD" , "/root/resData/SPEC_STL_GRD_RESULT_VO");
  50. model.copyNode("/root/comboData/ORD_USE_TP" , "/root/resData/ORD_USE_TP_RESULT_VO");
  51. model.copyNode("/root/comboData/FAC_STL_GRD" , "/root/resData/FAC_STL_GRD_RESULT_VO");
  52. model.copyNode("/root/comboData/MILL_STD_NO" , "/root/resData/MILL_STD_NO_RESULT_VO");
  53. model.copyNode("/root/comboData/SMS_STD_NO" , "/root/resData/SMS_STD_NO_RESULT_VO");
  54. model.copyNode("/root/comboData/DEL_TOL_CD" , "/root/resData/DEL_TOL_CD_RESULT_VO");
  55. model.copyNode("/root/comboData/DEV_DGR_CD" , "/root/resData/DEV_DGR_CD_RESULT_VO");
  56. model.refresh();
  57. }
  58. function find()
  59. {
  60. model.removenode("/root/reqData");
  61. commSendReq("/root/formData");
  62. commSubmit("UIB010250-service" , "find" , "glueAction.do");
  63. model.copyNode("/root/datagrid1" , "/root/resData/CustRequestResult_VO");
  64. model.refresh();
  65. checkCustSpecNo();
  66. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  67. }
  68. function save(doFlag)
  69. {
  70. if(doFlag == "D")//删除
  71. {
  72. if(beGridChanged(datagrid1) == "1")
  73. {
  74. if(commComfirmBox("数据已修改,可能出现误删,确定删除?","提示")=="0") return;
  75. }
  76. if(commComfirmBox("确认删除?","提示")=="0") return;
  77. for(var i=datagrid1.rows; i >= datagrid1.fixedRows; i--)//“3”表示第一行(非标题行)
  78. {
  79. if(datagrid1.valueMatrix(i, datagrid1.colRef("CHK"))=="Y")
  80. {
  81. datagrid1.deleteRow(i,false);//删除checkbox值为y的行,自动刷新
  82. }
  83. }
  84. }
  85. else
  86. {
  87. if(commComfirmBox("确认保存?","提示")=="0") return;
  88. }
  89. model.removenode("/root/reqData");
  90. model.makeNode("/root/reqData");
  91. b01MultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");//获得修改、插入、删除参数
  92. getLoggingInInfo();//获得登录人信息
  93. commSubmit("UIB010250-service", "save", "glueAction.do");
  94. model.copyNode("/root/datagrid1" , "/root/resData/CustRequestResult_VO");
  95. datagrid1.clearStatus();
  96. model.refresh();
  97. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  98. datagrid1.rebuildStyle();
  99. }
  100. function checkCustSpecNo()
  101. {
  102. datagrid1.rebuildStyle();
  103. for(var i = datagrid1.fixedRows; i< datagrid1.rows; i++)
  104. {
  105. if(datagrid1.valueMatrix(i ,datagrid1.colRef("INGR_REQ")) == "NN"
  106. || datagrid1.valueMatrix(i ,datagrid1.colRef("INGR_REQ")) == "XX" )
  107. {
  108. datagrid1.rowstyle(i, "data", "color") = "#ff0000";
  109. }
  110. }
  111. }
  112. ]]>
  113. </script>
  114. </xhtml:head>
  115. <xhtml:body pagewidth="980" pageheight="620">
  116. <datagrid id="datagrid1" nodeset="/root/datagrid1/CustRequestResult_Row" caption="选择^客户参数号事项^客户参数号事项^客户参数号事项^客户参数号事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户参数号赋予时参考事项^客户要求事项^客户要求事项^客户要求事项^客户要求事项^客户要求事项^客户要求事项^客户要求事项^成分要求^材质要求^客户公司名称^录入人^录入时间^最后修改人^最后修改时间^CUST_SPEC_NO1|选择^客户参数号^成分客户参数号^材质客户参数号^交付客户参数号^标准号^标准钢号^最小厚度^最大厚度^最小宽度^最大宽度^订单用途1^订单用途^尺寸对应码^厂内钢号^炼钢规范编号^轧钢规范编号^冷轧规范编码^交付条件^等级代码^成分要求^材质要求^客户公司名称^录入人^录入时间^最后修改人^最后修改时间^CUST_SPEC_NO1|选择^客户参数号^成分客户参数号^材质客户参数号^交付客户参数号^标准号^标准钢号^最小厚度^最大厚度^最小宽度^最大宽度^订单用途1^订单用途^尺寸对应码^厂内钢号^炼钢规范编号^轧钢规范编号^冷轧规范编码^交付条件^等级代码^成分要求^材质要求^客户公司名称^录入人^录入时间^最后修改人^最后修改时间^CUST_SPEC_NO1" colsep="^" colwidth="35, 79, 100, 100, 100, 140, 127, 40, 40, 40, 40, 57, 160, 87, 91, 51, 51, 53, 107, 51, 78, 28, 180, 82, 93, 78, 100, 41" explorerbar="sortshow" frozencols="4" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="free" tooltip="label" style="left:0px; top:35px; width:980px; height:585px; border-style:solid; ">
  117. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  118. <col explorerbar="sortshow" ref="CUST_SPEC_NO" type="input" style="text-align:left; "/>
  119. <col ref="CUST_SPEC_NO_INGR" type="input"/>
  120. <col ref="CUST_SPEC_NO_QLTY" type="input"/>
  121. <col ref="CUST_SPEC_NO_DEL" type="input"/>
  122. <col explorerbar="sortmove" ref="SPEC_ABBSYM" style="text-align:left; "/>
  123. <col explorerbar="sortshow" ref="SPEC_STL_GRD" style="text-align:left; "/>
  124. <col ref="THK_MIN" type="input" style="text-align:right; "/>
  125. <col ref="THK_MAX" type="input" style="text-align:right; "/>
  126. <col ref="WTH_MIN" type="input" style="text-align:right; "/>
  127. <col ref="WTH_MAX" type="input" style="text-align:right; "/>
  128. <col explorerbar="sortshow" ref="ORD_USE_TP" visibility="hidden" style="text-align:left; "/>
  129. <col ref="ORD_USE" style="text-align:left; "/>
  130. <col ref="SIZE_SPEC_CD" visibility="visible"/>
  131. <col ref="FAC_STL_GRD" style="text-align:left; "/>
  132. <col ref="SMS_STD_NO" style="text-align:left; "/>
  133. <col ref="MILL_STD_NO" style="text-align:left; "/>
  134. <col ref="COLD_STD_NO"/>
  135. <col ref="DEV_SPEC_CD" style="text-align:left; "/>
  136. <col ref="DEV_DGR_CD" style="text-align:left; "/>
  137. <col disabled="true" editable="false" ref="INGR_REQ" type="combo" style="text-align:left; ">
  138. <choices>
  139. <item>
  140. <label>Y</label>
  141. <value>YY</value>
  142. </item>
  143. <item>
  144. <label>无成分要求</label>
  145. <value>QQ</value>
  146. </item>
  147. <item>
  148. <label>成分录入不完全</label>
  149. <value>NN</value>
  150. </item>
  151. <item>
  152. <label>未知异常</label>
  153. <value>XX</value>
  154. </item>
  155. </choices>
  156. </col>
  157. <col editable="false" ref="QLTY_REQ" style="text-align:left; "/>
  158. <col disabled="false" ref="CUST_NM" style="text-align:left; "/>
  159. <col ref="REG_ID" style="text-align:left; "/>
  160. <col ref="REG_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  161. <col ref="MOD_ID" style="text-align:left; "/>
  162. <col ref="MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  163. <col ref="CUST_SPEC_NO1" visibility="hidden"/>
  164. <script type="javascript" ev:event="onentercell">
  165. <![CDATA[
  166. datagrid1.editCell();
  167. ]]>
  168. </script>
  169. <script type="javascript" ev:event="xforms-value-changed">
  170. <![CDATA[
  171. compareMINMAX(datagrid1,"THK_MIN","THK_MAX") ; //验证最大值不能小于最小值
  172. compareMINMAX(datagrid1,"WTH_MIN","WTH_MAX") ; //验证最大值不能小于最小值
  173. if(datagrid1.row < datagrid1.fixedRows && datagrid1.col != datagrid1.colRef("CHK")) return;
  174. var currentRow = datagrid1.row;
  175. var checkCol = datagrid1.colRef("CHK");
  176. var startCol = datagrid1.colRef("CUST_SPEC_NO");
  177. var endCol = datagrid1.colRef("DEV_DGR_CD");
  178. if(datagrid1.valueMatrix(currentRow , checkCol) == "Y")
  179. {
  180. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , endCol) = "false";
  181. for(var i = startCol; i <= endCol ; i++)
  182. {
  183. datagrid1.cellStyle("background-color",currentRow ,i) = "#ffff99";
  184. }
  185. }
  186. else
  187. {
  188. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , endCol) = "true";
  189. for(var i = startCol; i <= endCol ; i++)
  190. {
  191. datagrid1.cellStyle("background-color",currentRow, i) = "#ffffff";
  192. }
  193. }
  194. ]]>
  195. </script>
  196. <script type="javascript" ev:event="ondblclick">
  197. <![CDATA[
  198. if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK"))=="Y"
  199. && datagrid1.col > datagrid1.colRef("CUST_SPEC_NO") && datagrid1.col <= datagrid1.colRef("CUST_SPEC_NO_DEL")
  200. )
  201. {
  202. window.load("./_UIB010250.xrw", "modal", "",
  203. "left:500; top:300; width:350; height:450; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  204. }
  205. else if(datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK"))=="Y")
  206. {
  207. window.load("./_UIB010320.xrw", "modal", "",
  208. "left:500; top:300; width:350; height:450; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  209. }
  210. ]]>
  211. </script>
  212. </datagrid>
  213. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; border-style:solid; ">客户公司</caption>
  214. <button id="button1" style="left:830px; top:5px; width:70px; height:20px; background-image:../../images/btn_add.gif; ">
  215. <caption>增加</caption>
  216. <script type="javascript" ev:event="onclick">
  217. <![CDATA[
  218. if(datagrid1.row < datagrid1.fixedRows)
  219. {
  220. datagrid1.addRow();
  221. datagrid1.vscroll.attribute("pos") = datagrid1.rows*20;
  222. }
  223. else
  224. {
  225. datagrid1.insertRow(datagrid1.row);
  226. }
  227. datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK")) = "Y";
  228. ]]>
  229. </script>
  230. </button>
  231. <button id="button2" style="left:905px; top:5px; width:70px; height:20px; background-image:../../images/btn_move.gif; ">
  232. <caption>删除</caption>
  233. <script type="javascript" ev:event="onclick">
  234. <![CDATA[
  235. save("D");
  236. ]]>
  237. </script>
  238. </button>
  239. <select1 id="combo1" ref="/root/formData/CUSTCD" appearance="minimal" editmode="input" style="left:97px; top:5px; width:158px; height:20px; border-style:solid; ">
  240. <choices>
  241. <itemset nodeset="/root/comboData/CustCodeResult/CustCodeResult_Row">
  242. <label ref="LABEL"/>
  243. <value ref="VALUE"/>
  244. </itemset>
  245. </choices>
  246. </select1>
  247. <line id="line2" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  248. <line id="line1" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  249. </xhtml:body>
  250. </xhtml:html>