aa2dc1fec853024a6ba75427c87c15cbc8a29c6e.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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. <SPECABBSYM/>
  13. <SPECSTLGRD/>
  14. </formData>
  15. <datagrid1/>
  16. <initDatas>
  17. <InitSpecResult_VO>
  18. <InitSpecResult_Row>
  19. <LABEL>---全部---</LABEL>
  20. <VALUE/>
  21. </InitSpecResult_Row>
  22. </InitSpecResult_VO>
  23. </initDatas>
  24. <initSpecData>
  25. <InitSpec_Row>
  26. <LABEL/>
  27. <VALUE/>
  28. </InitSpec_Row>
  29. </initSpecData>
  30. <initDenData>
  31. <DengJi_Row>
  32. <LABEL/>
  33. <VALUE/>
  34. </DengJi_Row>
  35. </initDenData>
  36. <initGrdData>
  37. <InitSpecGrd_Row>
  38. <LABEL/>
  39. <VALUE/>
  40. </InitSpecGrd_Row>
  41. </initGrdData>
  42. <InitDevData>
  43. <InitDevCd_Row>
  44. <LABEL/>
  45. <VALUE/>
  46. </InitDevCd_Row>
  47. </InitDevData>
  48. <initYontTu>
  49. <OrdUseTp_Row>
  50. <LABEL/>
  51. <VALUE/>
  52. </OrdUseTp_Row>
  53. </initYontTu>
  54. <JiaoHuo>
  55. <JiaoHuoResult_Row>
  56. <SM_CD/>
  57. <SM_CD/>
  58. </JiaoHuoResult_Row>
  59. </JiaoHuo>
  60. </root>
  61. </instance>
  62. <script type="javascript" ev:event="xforms-ready">
  63. <![CDATA[
  64. if(window.parent==null) Init();
  65. ]]>
  66. </script>
  67. </model>
  68. <script type="javascript" src="../../js/boaCommon.js"/>
  69. <script type="javascript" src="../../js/b01.js"/>
  70. <script type="javascript">
  71. <![CDATA[
  72. var doFlag; //删除与修改的区分
  73. //交付条件标准号初始化
  74. function Init(node)
  75. {
  76. InitParams(node);
  77. datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
  78. commSubmit("UIB010260-service" , "success" , "glueAction.do");
  79. model.duplicate("/root/initDatas" , "/root/resData/InitSpecResult_VO"); //交付条件标准号初始化
  80. model.copyNode("/root/initSpecData" , "/root/resData/InitSpec_VO" );//标准号初始化
  81. model.copyNode("/root/initDenData" , "/root/resData/DengJi_VO" );//等级代码
  82. model.copyNode("/root/initGrdData" , "/root/resData/InitSpecGrd_VO");
  83. model.copyNode("/root/InitDevData" , "/root/resData/InitDevCd_VO" );
  84. model.copyNode("/root/initYontTu" , "/root/resData/OrdUseTp_VO" );
  85. model.copyNode("/root/JiaoHuo" , "/root/resData/JiaoHuoResult_VO" );
  86. model.refresh();
  87. }
  88. function find()
  89. {
  90. model.removenode("/root/reqData");
  91. model.makeNode("/root/reqData");
  92. commSendReq("/root/formData");
  93. commSubmit("UIB010260-service" , "find" , "glueAction.do" );
  94. model.copyNode("/root/datagrid1" , "/root/resData/DelResult_VO");
  95. model.refresh();
  96. datagrid1.clearStatus();
  97. datagrid1.rebuildStyle();
  98. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  99. }
  100. function save(doFlag)
  101. {
  102. if(doFlag == "D")//删除
  103. {
  104. if(beGridChanged(datagrid1) == "1")
  105. {
  106. if(commComfirmBox("数据已修改,可能出现误删,确定删除?","提示")=="0") return;
  107. }
  108. if(commComfirmBox("确认删除?","提示")=="0") return;
  109. var rows = datagrid1.rows;//获取总的行数
  110. for(var i= rows; i >0; i--)//从最后一行开始,若从第一行开始则需要相对定位
  111. {
  112. if(datagrid1.valueMatrix(i , datagrid1.colRef("CHK"))=="Y")//被选择则进行删除
  113. {
  114. datagrid1.deleteRow(i , false);
  115. }
  116. }
  117. }
  118. else
  119. {
  120. if(commComfirmBox("确认保存?","提示")=="0") return;
  121. }
  122. //注意交付条件规格必须存在于tbb01_spec_del表中,否则不能进行插入,更新操作
  123. model.removenode("/root/reqData");
  124. model.makeNode("/root/reqData");
  125. model.removenode("/root/tempData1");
  126. model.makeNode("/root/tempData1");
  127. b01MultiUpdate(datagrid1 , "/root/tempData1" , "A" , true , "rowStatus");
  128. commSendReq("/root/formData" , "/root/tempData1");
  129. getLoggingInInfo();
  130. commSubmit("UIB010260-service" , "save" , "glueAction.do" );
  131. model.copyNode("/root/datagrid1" , "/root/resData/DelResult_VO");
  132. model.refresh();
  133. datagrid1.cellAttribute("disabled",datagrid1.fixedRows , datagrid1.fixedCols+1 , datagrid1.rows - 1 , datagrid1.cols - 1) = "true";
  134. datagrid1.clearStatus();//清除grid的状态
  135. datagrid1.rebuildStyle();
  136. }
  137. ]]>
  138. </script>
  139. </xhtml:head>
  140. <xhtml:body pagewidth="980" pageheight="620">
  141. <datagrid id="datagrid1" nodeset="/root/datagrid1/DelResult_Row" caption="选择^交货状态^标准号^标准牌号^订单用途^外形尺寸标准号^等級代码&#xA;^录入人^录入日期^最后修改人^最后修改时间^品名(隐)^标准号(隐)^订单用途^标准钢号" colsep="^" colwidth="50, 59, 218, 139, 236, 155, 80, 99, 94, 89, 100, 55, 52, 46, 52" explorerbar="sortshow" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="40" rowsep="|" selectionmode="free" tooltip="label" style="left:0px; top:35px; width:978px; height:581px; border-style:solid; ">
  142. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  143. <col editmode="search" ref="PRDNM_CD" type="combo" style="text-align:left; ">
  144. <choices>
  145. <itemset nodeset="/root/JiaoHuo/JiaoHuoResult_Row">
  146. <label ref="SM_CD"/>
  147. <value ref="SM_CD"/>
  148. </itemset>
  149. </choices>
  150. </col>
  151. <col editmode="search" ref="SPEC_ABBSYM" type="combo" style="text-align:left; ">
  152. <choices>
  153. <itemset nodeset="/root/initSpecData/InitSpec_Row">
  154. <label ref="LABEL"/>
  155. <value ref="VALUE"/>
  156. </itemset>
  157. </choices>
  158. </col>
  159. <col editmode="search" ref="SPEC_STL_GRD" type="combo" style="text-align:left; ">
  160. <choices>
  161. <itemset nodeset="/root/initGrdData/InitSpecGrd_Row">
  162. <label ref="LABEL"/>
  163. <value ref="VALUE"/>
  164. </itemset>
  165. </choices>
  166. </col>
  167. <col editmode="search" ref="ORD_USE_TP" type="combo" style="text-align:left; ">
  168. <choices>
  169. <itemset nodeset="/root/initYontTu/OrdUseTp_Row">
  170. <label ref="LABEL"/>
  171. <value ref="VALUE"/>
  172. </itemset>
  173. </choices>
  174. </col>
  175. <col editmode="search" ref="DEV_SPEC_CD" type="combo" style="text-align:left; ">
  176. <choices>
  177. <itemset nodeset="/root/InitDevData/InitDevCd_Row">
  178. <label ref="LABEL"/>
  179. <value ref="VALUE"/>
  180. </itemset>
  181. </choices>
  182. </col>
  183. <col editmode="search" ref="DEV_DGR_CD" type="combo" style="text-align:left; ">
  184. <choices>
  185. <itemset nodeset="/root/initDenData/DengJi_Row">
  186. <label ref="LABEL"/>
  187. <value ref="VALUE"/>
  188. </itemset>
  189. </choices>
  190. </col>
  191. <col editable="false" ref="REGID" style="text-align:left; "/>
  192. <col editable="false" ref="REG_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  193. <col ref="MOD_ID" style="text-align:left; "/>
  194. <col ref="MOD_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  195. <col ref="PRDNM_CD1" visibility="hidden"/>
  196. <col ref="SPEC_ABBSYM1" visibility="hidden"/>
  197. <col ref="ORD_USE_TP1" visibility="hidden"/>
  198. <col ref="SPEC_STL_GRD1" visibility="hidden"/>
  199. <script type="javascript" ev:event="onentercell">
  200. <![CDATA[
  201. datagrid1.editCell();
  202. ]]>
  203. </script>
  204. <script type="javascript" ev:event="xforms-value-changed">
  205. <![CDATA[
  206. if(datagrid1.row < datagrid1.fixedRows && datagrid1.col != datagrid1.colRef("CHK")) return;
  207. var currentRow = datagrid1.row;
  208. var checkCol = datagrid1.colRef("CHK");
  209. var startCol = datagrid1.colRef("PRDNM_CD");
  210. var endCol = datagrid1.colRef("DEV_DGR_CD");
  211. if(datagrid1.valueMatrix(currentRow , checkCol) == "Y")
  212. {
  213. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , datagrid1.cols - 1) = "false";
  214. for(var i = startCol; i <= endCol ; i++)
  215. {
  216. datagrid1.cellStyle("background-color",currentRow ,i) = "#ffff99";
  217. }
  218. }
  219. else
  220. {
  221. datagrid1.cellAttribute("disabled",currentRow , checkCol+1 , currentRow , datagrid1.cols - 1) = "true";
  222. for(var i = startCol; i <= endCol ; i++)
  223. {
  224. datagrid1.cellStyle("background-color",currentRow, i) = "#ffffff";
  225. }
  226. }
  227. ]]>
  228. </script>
  229. <script type="javascript" ev:event="onkeydown">
  230. <![CDATA[
  231. onkeydownmove(datagrid1);
  232. ]]>
  233. </script>
  234. </datagrid>
  235. <caption id="caption1" class="cell" style="left:0px; top:5px; width:100px; height:20px; vertical-align:middle; border-style:solid; ">标准号/名称</caption>
  236. <button id="button4" style="left:835px; top:5px; width:72px; height:20px; background-image:../../images/btn_add.gif; ">
  237. <caption>增加</caption>
  238. <script type="javascript" ev:event="DOMActivate">
  239. <![CDATA[
  240. if(datagrid1.row < datagrid1.fixedRows)
  241. {
  242. datagrid1.addRow();
  243. datagrid1.vscroll.attribute("pos") = datagrid1.rows*20;
  244. }
  245. else
  246. {
  247. datagrid1.insertRow(datagrid1.row);
  248. }
  249. datagrid1.valueMatrix(datagrid1.row , datagrid1.colRef("CHK")) = "Y";
  250. ]]>
  251. </script>
  252. </button>
  253. <button id="button5" style="left:902px; top:5px; width:73px; height:20px; background-image:../../images/btn_move.gif; ">
  254. <caption>删除</caption>
  255. <script type="javascript" ev:event="DOMActivate">
  256. <![CDATA[
  257. save("D");
  258. ]]>
  259. </script>
  260. </button>
  261. <select1 id="combo1" ref="/root/formData/SPECABBSYM" appearance="minimal" editmode="input" showvalue="true" style="left:99px; top:5px; width:221px; height:20px; border-style:solid; ">
  262. <choices>
  263. <itemset nodeset="/root/initDatas/InitSpecResult_VO/InitSpecResult_Row">
  264. <label ref="LABEL"/>
  265. <value ref="VALUE"/>
  266. </itemset>
  267. </choices>
  268. </select1>
  269. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  270. <line id="line2" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  271. <caption id="caption2" class="cell" style="left:340px; top:5px; width:100px; height:20px; ">标准牌号</caption>
  272. <select1 id="combo2" ref="/root/formData/SPECSTLGRD" appearance="minimal" editmode="input" style="left:440px; top:5px; width:170px; height:20px; ">
  273. <choices>
  274. <itemset nodeset="/root/initGrdData/InitSpecGrd_Row">
  275. <label ref="LABEL"/>
  276. <value ref="VALUE"/>
  277. </itemset>
  278. </choices>
  279. </select1>
  280. </xhtml:body>
  281. </xhtml:html>