a91ef42f3c1c9830e62995812d83726b7d064930.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <formData>
  10. <ORD_NO/>
  11. <ORD_SEQ/>
  12. <ASSEMBLE_CNT>2</ASSEMBLE_CNT>
  13. <slabthk1/>
  14. <slabthk2/>
  15. <slabwth1/>
  16. <slabwth2/>
  17. <coilthk1/>
  18. <coilthk2/>
  19. <coilwhk1/>
  20. <coilwth2/>
  21. </formData>
  22. <gridData>
  23. <slabDnRst/>
  24. </gridData>
  25. </root>
  26. </instance>
  27. <script type="javascript" ev:event="xforms-ready">
  28. <![CDATA[
  29. datagrid1.fixedcellcheckbox(0,datagrid1.colRef("CHK"))=true;
  30. datagrid1.colStatus(0)=false;
  31. ]]>
  32. </script>
  33. </model>
  34. <script type="javascript" src="../../js/boaCommon.js"/>
  35. <script type="javascript" src="../../js/boaMsg.js"/>
  36. <script type="javascript" src="../../js/dCommon.js"/>
  37. <script type="javascript">
  38. <![CDATA[
  39. //1、获取用户登录信息,只能在页面初始化函数中调用
  40. function InitParams(node)
  41. {
  42. if (typeof node == "undefined" && typeof node != "object") return;
  43. model.removenode("/root/initData/rcvInfo");
  44. model.makeNode("/root/initData/rcvInfo");
  45. var nodeList = node.childNodes;
  46. for (var i = 0; i < nodeList.length; i++)
  47. model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
  48. }
  49. //2. 页面初始化函数(必须)
  50. function Init(node)
  51. {
  52. InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  53. // 在程序中会重建该节点,最好不要重名
  54. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  55. //...
  56. }
  57. //3、页面标题
  58. function setTitle()
  59. {
  60. return "工序计划 >> 板坯设计 >> 板坯组合设计2"; // 如:return "进程管理 >> 订单进程现况查询";
  61. }
  62. function pageInitTree()
  63. {
  64. for(var i=1; i<datagrid1.rows; i++)
  65. {
  66. if( datagrid1.valueMatrix(i,11) == "Y")
  67. {
  68. datagrid1.outlinelevel(i) = 1;
  69. }
  70. else
  71. {
  72. datagrid1.outlinelevel(i) = 2;
  73. }
  74. }
  75. datagrid1.outlinebar = 4;
  76. datagrid1.treecolor = "red";
  77. }
  78. //4. 页面按键动作
  79. // 查询按键
  80. function find()
  81. {
  82. model.removenode("/root/reqData");
  83. model.makeNode("/root/reqData");
  84. commSendReq("/root/formData");
  85. commSubmit("UID010051-service","findSlabDnRst","glueAction.do");
  86. errorMessage();
  87. commAppendData("/root/gridData/slabDnRst/EmpListResult_VO","/root/resData/EmpListResult_VO");
  88. model.removenode("/root/resData/EmpListResult_VO");
  89. model.refresh();
  90. pageInitTree();
  91. model.refresh();
  92. }
  93. // 保存按键
  94. function save()
  95. {
  96. model.removenode("/root/gridData1/sendInfo");
  97. model.makeNode("/root/gridData1/sendInfo");
  98. var count = model.getXPathValue("count(/root/gridData1/EmpListResult_VO/EmpListResult_Row)");
  99. var j = 0;
  100. for(var i = 1; i<=count; i++)
  101. {
  102. var CHK = model.getValue("/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]/CHK");
  103. if(CHK == 'true')
  104. {
  105. model.duplicate("/root/gridData1/sendInfo","/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]");
  106. }
  107. else
  108. {
  109. j++;
  110. }
  111. }
  112. if(j == count)
  113. {
  114. window.alert(" 请选择组合板坏信息进行确认! "," 提示信息 ");
  115. return;
  116. }
  117. commSendReq("/root/gridData1/sendInfo");
  118. commSubmit("UID010050-service","saveSumSlabDnRes","glueAction.do");
  119. errorMessage();
  120. window.alert(" 保存成功! "," 提示信息 ");
  121. find();
  122. model.refresh();
  123. }
  124. // 新增按键
  125. function create()
  126. {
  127. }
  128. function copyGrid(gridID)
  129. {
  130. var tg = gridID.substr(8,1)
  131. gridID = document.all(gridID);
  132. var nodeset = gridID.nodeset;
  133. var nodeCnt2 = parseInt(model.getXPathValue("count(" + nodeset + ")"));
  134. var rowcnt = nodeCnt2 - 1;
  135. var slabno = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_NO");
  136. var slabthk = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_THK");
  137. var slabwth = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WTH");
  138. var slablen = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_LEN");
  139. var slabWgt = model.getValue(gridID.nodeset + "[" + rowcnt + "]/SLAB_WGT");
  140. var nslab = Number(slabno)+10;
  141. // 新增板坯
  142. if(nslab < 100) nslab = "0" + nslab;
  143. // 根据gridID区分表是 datagrid1 datagrid2
  144. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_NO",nslab);
  145. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_THK",slabthk);
  146. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_WTH",slabwth);
  147. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_LEN",slablen);
  148. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SLAB_WGT",slabWgt);
  149. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/HCR_CLF","C");
  150. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/ORD_FL","2");
  151. model.setValue("/root/gridData/SlabCutting0_VO/SlabCutting0_Row["+nodeCnt2+"]/SURPLMATL_YN","S");
  152. model.refresh();
  153. }
  154. // 删除按键
  155. function remove()
  156. {
  157. if(commComfirmBox(" 确认分解板坏组合结果? "," 提示信息 ")=='0') return;
  158. model.removenode("/root/gridData1/sendInfo");
  159. model.makeNode("/root/gridData1/sendInfo");
  160. var count = model.getXPathValue("count(/root/gridData1/EmpListResult_VO/EmpListResult_Row)");
  161. var j = 1;
  162. for(var i = 1; i<=count; i++)
  163. {
  164. var CHK = model.getValue("/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]/CHK");
  165. if(CHK == 'true')
  166. {
  167. model.duplicate("/root/gridData1/sendInfo","/root/gridData1/EmpListResult_VO/EmpListResult_Row["+i+"]");
  168. }
  169. }
  170. commSendReq("/root/gridData1/sendInfo");
  171. commSubmit("UID010050-service","deleteSumSlabDnRes","glueAction.do");
  172. errorMessage();
  173. find();
  174. model.refresh();
  175. }
  176. //增加特殊要求 10.15 wxy
  177. function fowardUID010031(gridID) {
  178. if(gridID.col == gridID.colRef("INGR_YN")) {
  179. model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
  180. model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
  181. model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
  182. var java = window.parent.javaScript;
  183. java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
  184. }
  185. }
  186. ]]>
  187. </script>
  188. </xhtml:head>
  189. <xhtml:body style="font-family:宋体; ">
  190. <switch id="switch1" style="left:0px; top:45px; width:970px; height:505px; ">
  191. <case id="case2"/>
  192. <case id="case1" selected="true">
  193. <datagrid id="datagrid1" nodeset="/root/gridData/slabDnRst/EmpListResult_VO/EmpListResult_Row" scroll="both" backcoloralternate="#f7f9f9" caption="选择^合同号^订单号^板坯号^厂内牌号^钢卷^钢卷^板坯^板坯^板坯^是否热送^组合区分^通过工序^特殊要求|选择^合同号^订单号^板坯号^厂内牌号^宽度^厚度^宽度^长度^单重^是否热送^组合区分^通过工序^特殊要求" colsep="^" colwidth="59, 90, 43, 104, 100, 52, 55, 59, 52, 57, 82, 79, 125, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" defaultrows="20" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:30px; width:965px; height:465px; ">
  194. <col checkvalue="true,false" ref="CHK" type="checkbox"/>
  195. <col ref="ORD_NO" type="input"/>
  196. <col ref="ORD_SEQ" type="input"/>
  197. <col ref="DSN_SLAB_NO"/>
  198. <col ref="FAC_STL_GRD" type="input"/>
  199. <col ref="COIL_WTH" style="text-align:right; "/>
  200. <col ref="COIL_THK" style="text-align:right; "/>
  201. <col ref="SLAB_WTH" style="text-align:right; "/>
  202. <col ref="SLAB_LEN" type="input" style="text-align:right; "/>
  203. <col ref="SLAB_WGT" type="input" style="text-align:right; "/>
  204. <col ref="HCR_YN"/>
  205. <col ref="COMB_YN"/>
  206. <col ref="PROC_PATH"/>
  207. <col ref="INGR_YN" style="text-decoration:underline; "/>
  208. <col ref="P_DSN_SLAB_NO" visibility="hidden"/>
  209. <col ref="EMGMTR_YN" visibility="hidden"/>
  210. <col ref="SLAB_THK" visibility="hidden"/>
  211. <col ref="COIL_LEN" visibility="hidden"/>
  212. <col ref="COIL_WGT" visibility="hidden"/>
  213. <col ref="FAC_STL_GRP" visibility="hidden"/>
  214. <col ref="COIL_PACK_WGT_MIN" visibility="hidden"/>
  215. <col ref="COIL_PACK_WGT_MAX" visibility="hidden"/>
  216. <col ref="AUTODSN_YN" visibility="hidden"/>
  217. <col ref="GRAVITY" visibility="hidden"/>
  218. <col ref="SLAB_TRMTH_TP" visibility="hidden"/>
  219. </datagrid>
  220. <caption id="caption2" class="cell" style="left:0px; top:5px; width:70px; height:20px; ">组合坯料数</caption>
  221. <input id="input1" ref="/root/formData/ASSEMBLE_CNT" maxlength="1" format="999999-9999999" style="left:75px; top:5px; width:25px; height:20px; text-align:center; "/>
  222. </case>
  223. <script type="javascript" ev:event="case1">
  224. <![CDATA[
  225. model.toggle("case1");
  226. ]]>
  227. </script>
  228. <script type="javascript" ev:event="case2">
  229. <![CDATA[
  230. model.toggle("case2");
  231. ]]>
  232. </script>
  233. <case id="case3"/>
  234. </switch>
  235. <button id="button2" style="left:814px; top:5px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
  236. <caption>板坯组合</caption>
  237. <script type="javascript" ev:event="onclick">
  238. <![CDATA[
  239. datagrid1.clearStatus();
  240. datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
  241. var V_ORDNO = "";
  242. var V_ORDSEQ ="";
  243. var numberFlag = 0;
  244. // for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
  245. // {
  246. // if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
  247. // {
  248. // numberFlag++;
  249. // V_ORDNO = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) ;
  250. // V_ORDSEQ = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") ) ;
  251. // }
  252. // if(numberFlag == 1 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" &&
  253. // V_ORDNO == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) &&
  254. // V_ORDSEQ == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") )
  255. // )
  256. // {
  257. // datagrid1.rowStatus(i)= "2";
  258. // }
  259. // }
  260. for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
  261. {
  262. if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
  263. {
  264. datagrid1.rowStatus(i)= "2";
  265. }
  266. //
  267. }
  268. model.removenode("/root/reqData");
  269. model.makeNode("/root/reqData");
  270. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  271. model.makeValue("/root/reqData/ASSEMBLE_CNT",model.getValue("/root/formData/ASSEMBLE_CNT"));
  272. commSubmit("UID010051-service","saveSumSlabDnRes","glueAction.do");
  273. retrunMessage();
  274. find();
  275. ]]>
  276. </script>
  277. </button>
  278. <button id="button6" style="left:889px; top:5px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
  279. <caption>板坯分解</caption>
  280. <script type="javascript" ev:event="onclick">
  281. <![CDATA[
  282. remove();
  283. ]]>
  284. </script>
  285. </button>
  286. <button id="button1" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:170px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
  287. <caption>单订单组合</caption>
  288. <script type="javascript" ev:event="DOMActivate">
  289. <![CDATA[
  290. switch1.dispatch("case1");
  291. ]]>
  292. </script>
  293. </button>
  294. <button id="button3" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:275px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
  295. <caption>双订单组合</caption>
  296. <script type="javascript" ev:event="DOMActivate">
  297. <![CDATA[
  298. switch1.dispatch("case2");
  299. ]]>
  300. </script>
  301. </button>
  302. <button id="button4" class="sw" visibility="hidden" select.background-image="../../images/sw_select.gif" focus.background-image="../../images/sw_select.gif" hover.background-image="../../images/sw_normal.gif" style="left:375px; top:5px; width:100px; height:20px; background-image:../../images/sw_normal.gif; ">
  303. <caption>生产保留指定</caption>
  304. <script type="javascript" ev:event="DOMActivate">
  305. <![CDATA[
  306. switch1.dispatch("case3");
  307. ]]>
  308. </script>
  309. </button>
  310. <input id="input2" ref="/root/formData/ORD_NO" style="left:40px; top:25px; width:85px; height:20px; "/>
  311. <caption id="caption3" class="cell" style="left:0px; top:25px; width:40px; height:20px; ">订单号</caption>
  312. <select1 id="combo1" ref="/root/formData/ORD_SEQ" appearance="minimal" style="left:125px; top:25px; width:45px; height:20px; ">
  313. <choices>
  314. <item>
  315. <label>combo1</label>
  316. <value>combo1</value>
  317. </item>
  318. </choices>
  319. </select1>
  320. <button id="button5" visibility="hidden" style="left:715px; top:55px; width:90px; height:15px; ">
  321. <caption>查询</caption>
  322. <script type="javascript" ev:event="DOMActivate">
  323. <![CDATA[
  324. model.removenode("/root/reqData");
  325. model.makeNode("/root/reqData");
  326. commSendReq("/root/formData");
  327. commSubmit("UID010051-service","findSlabDnRst","glueAction.do");
  328. errorMessage();
  329. commAppendData("/root/gridData/slabDnRst/EmpListResult_VO","/root/resData/EmpListResult_VO");
  330. model.removenode("/root/resData/EmpListResult_VO");
  331. model.refresh();
  332. pageInitTree();
  333. model.refresh();
  334. ]]>
  335. </script>
  336. </button>
  337. <button id="button7" class="butt_3" style="left:815px; top:50px; width:65px; height:19px; ">
  338. <caption>行增加</caption>
  339. <script type="javascript" ev:event="DOMActivate">
  340. <![CDATA[
  341. for(var i=1; i<=datagrid1.rows; i++)
  342. {
  343. if( datagrid1.isSelected(i) == true )
  344. {
  345. var a=i-1;
  346. var node1 = instance1.selectSingleNode("/root/gridData/slabDnRst/EmpListResult_VO/EmpListResult_Row[" + a + "]");
  347. var copyedNode = node1.cloneNode(true);
  348. var copyTo = instance1.selectSingleNode("/root/gridData/slabDnRst/EmpListResult_VO").appendChild(copyedNode);
  349. datagrid1.rebuild();
  350. }
  351. }
  352. //datagrid1.addRow();
  353. //datagrid1.insertRow(1,"above", "true", "true");
  354. //copyGrid("datagrid1");
  355. // datagrid3.rebuild();
  356. ]]>
  357. </script>
  358. </button>
  359. <button id="button8" style="left:890px; top:50px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
  360. <caption>保存增加</caption>
  361. <script type="javascript" ev:event="onclick">
  362. <![CDATA[
  363. datagrid1.clearStatus();
  364. datagrid1.colStatus(datagrid1.colRef("CHK"))=false;
  365. var V_ORDNO = "";
  366. var V_ORDSEQ ="";
  367. var numberFlag = 0;
  368. // for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
  369. // {
  370. // if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
  371. // {
  372. // numberFlag++;
  373. // V_ORDNO = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) ;
  374. // V_ORDSEQ = datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") ) ;
  375. // }
  376. // if(numberFlag == 1 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" &&
  377. // V_ORDNO == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_NO") ) &&
  378. // V_ORDSEQ == datagrid1.valueMatrix(i , datagrid1.colRef("ORD_SEQ") )
  379. // )
  380. // {
  381. // datagrid1.rowStatus(i)= "2";
  382. // }
  383. // }
  384. for(var i = datagrid1.fixedCols ; i<=datagrid1.rows; i++)
  385. {
  386. if(numberFlag == 0 && datagrid1.valueMatrix(i , datagrid1.colRef("CHK")) == "true" )
  387. {
  388. datagrid1.rowStatus(i)= "2";
  389. }
  390. //
  391. }
  392. model.removenode("/root/reqData");
  393. model.makeNode("/root/reqData");
  394. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStatus");
  395. model.makeValue("/root/reqData/ASSEMBLE_CNT",model.getValue("/root/formData/ASSEMBLE_CNT"));
  396. commSubmit("UID010051-service","addslab","glueAction.do");
  397. retrunMessage();
  398. find();
  399. ]]>
  400. </script>
  401. </button>
  402. <caption id="caption10" class="cell" style="left:172px; top:25px; width:55px; height:20px; text-align:center; vertical-align:middle; ">板坯宽度</caption>
  403. <input id="input3" ref="/root/formData/slabwth1" style="left:228px; top:25px; width:78px; height:20px; "/>
  404. <input id="input4" ref="/root/formData/slabwth2" style="left:305px; top:25px; width:78px; height:20px; "/>
  405. <caption id="caption1" class="cell" style="left:392px; top:25px; width:55px; height:20px; text-align:center; vertical-align:middle; ">板坯长度</caption>
  406. <input id="input5" ref="/root/formData/slabthk1" style="left:448px; top:25px; width:78px; height:20px; "/>
  407. <input id="input6" ref="/root/formData/slabthk2" style="left:525px; top:25px; width:78px; height:20px; "/>
  408. <caption id="caption4" class="cell" style="left:172px; top:50px; width:55px; height:20px; text-align:center; vertical-align:middle; ">钢卷宽度</caption>
  409. <caption id="caption5" class="cell" style="left:392px; top:50px; width:55px; height:20px; text-align:center; vertical-align:middle; ">钢卷厚度</caption>
  410. <input id="input7" ref="/root/formData/coilwhk1" style="left:228px; top:50px; width:78px; height:20px; "/>
  411. <input id="input8" ref="/root/formData/coilwth2" style="left:305px; top:50px; width:78px; height:20px; "/>
  412. <input id="input9" ref="/root/formData/coilthk1" style="left:448px; top:50px; width:78px; height:20px; "/>
  413. <input id="input10" ref="/root/formData/coilthk2" style="left:525px; top:50px; width:78px; height:20px; "/>
  414. </xhtml:body>
  415. </xhtml:html>