UID040010.xrw 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059
  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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <reqData>
  10. </reqData>
  11. <resData/>
  12. <SlabDnRst>
  13. <ListResult_0_VO/>
  14. </SlabDnRst>
  15. <MatDnRst>
  16. <ListResult_1_VO/>
  17. </MatDnRst>
  18. <formData>
  19. <slab_thk>230</slab_thk>
  20. <slab_wth>1300</slab_wth>
  21. <slab_len>10500</slab_len>
  22. <fac_stl_grd/>
  23. <fac_stl_grp/>
  24. <slab_wgt>0</slab_wgt>
  25. <slab_cnt>10</slab_cnt>
  26. <castDnRst/>
  27. <matSpecSeq/>
  28. <MatTp>01</MatTp>
  29. <path_proc/>
  30. <keepWarmYN>N</keepWarmYN>
  31. </formData>
  32. <initData>
  33. <FacStlGrp>
  34. <IncludeAll>A</IncludeAll>
  35. </FacStlGrp>
  36. <FacStlGrd>
  37. <IncludeAll>A</IncludeAll>
  38. </FacStlGrd>
  39. <DevTerm>
  40. <FromNum>35</FromNum>
  41. <ToNum>0</ToNum>
  42. <DateFormat>YYYYMMDD</DateFormat>
  43. </DevTerm>
  44. <rcvInfo/>
  45. <BIZ_TP>CoilThickGroup</BIZ_TP>
  46. </initData>
  47. <slab_count/>
  48. <wth_count/>
  49. <gridData>
  50. <sendInfo/>
  51. </gridData>
  52. <slab_wgt_sum/>
  53. </root>
  54. </instance>
  55. <script type="javascript" src="../../js/boaMsg.js"/>
  56. <script type="javascript" src="../../js/boaCommon.js"/>
  57. <script type="javascript" src="../../js/mesCommon.js"/>
  58. <script type="javascript">
  59. <![CDATA[
  60. function lpad(str, len, fill) {
  61. if (fill == null) fill = " ";
  62. str = str + "";
  63. while( str.length < len ) str = fill + str;
  64. return str;
  65. }
  66. var submitCommID = "UIDCommCode-service";
  67. var subimtDateID = "UIDCommDate-service";
  68. var submitMainID = "UID040010-service";
  69. //1、获取用户登录信息,只能在页面初始化函数中调用
  70. function InitParams(node)
  71. {
  72. if (typeof node == "undefined" && typeof node != "object") return;
  73. model.removenode("/root/initData/rcvInfo");
  74. model.makeNode("/root/initData/rcvInfo");
  75. var nodeList = node.childNodes;
  76. for (var i = 0; i < nodeList.length; i++)
  77. model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
  78. }
  79. //2. 页面初始化函数(必须)
  80. function Init(node)
  81. {
  82. //InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  83. // 在程序中会重建该节点,最好不要重名
  84. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  85. //...
  86. pageInit();
  87. }
  88. //3、页面标题
  89. function setTitle()
  90. {
  91. return "工序计划 >> 炉次浇次编制(手工) >> 炉次浇次生成/指示确认"; // 如:return "进程管理 >> 订单进程现况查询";
  92. }
  93. function pageInit()
  94. {
  95. // Populate values (连铸牌号-combo)
  96. commSendReq("/root/initData/FacStlGrp");
  97. commSubmit(submitCommID ,"findNormal" ,"glueAction.do" );
  98. model.copyNode("/root/formData/fac_stl_grp" ,"/root/resData/DCommCodeResult_VO" );
  99. model.removenode("/root/reqData");
  100. // Populate values (厂内牌号-combo)
  101. commSendReq("/root/initData/FacStlGrd");
  102. commSubmit(submitCommID ,"findFacStlGrdJinji" , "glueAction.do" );
  103. model.copyNode("/root/formData/fac_stl_grd" , "/root/resData/DCommCodeResult_VO");
  104. model.removenode("/root/reqData");
  105. cb_FacStlGrp.select(1);
  106. cb_FacStlGrd.select(1);
  107. model.refresh();
  108. }
  109. function calculateSummary()
  110. {
  111. //var count = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row)");
  112. //var chk_count = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[CHK = 'Y'])");
  113. //model.setValue("/root/slab_count",chk_count+"/"+count);
  114. //var chk_wgt = model.getXPathValue("sum(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[CHK = 'Y']/SLAB_WGT)");
  115. //var wgt = model.getXPathValue("sum(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row/SLAB_WGT)");
  116. ///alert("wgt="+chk_wgt+"/"+wgt)
  117. //model.setValue("/root/slab_wgt_sum",chk_wgt+"/"+wgt);
  118. model.setValue("/root/wth_count",model.getXPathValue("sum(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL >= 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]/MAT_WGT)"));
  119. }
  120. function find()
  121. {
  122. //model.removeNodeset(dg1.nodeset);
  123. model.removeNodeset(dg2.nodeset);
  124. model.removeNodeset(dg3.nodeset);
  125. //model.refresh();
  126. //submitID = submitMainID;
  127. commSendReq("/root/formData/MatTp");
  128. commSubmit(submitMainID ,"find" ,"glueAction.do" );
  129. commAppendData("/root/MatDnRst/ListResult_1_VO" ,"/root/resData/ListResult_1_VO" );
  130. //exec("/root/formData", "", "find", "/root/SlabDnRst/ListResult_0_VO", "/root/MatDnRst/ListResult_1_VO");
  131. calculateSummary();
  132. model.removenode("/root/reqData");
  133. model.removenode("/root/resData");
  134. model.refresh();
  135. cb_CastSpecSeq.select(0);
  136. //commGridLevels(dg1,0);
  137. // commGridLevels(dg3,0);
  138. }
  139. function findPathProc()
  140. {
  141. var facStlGrd = model.getValue("/root/formData/fac_stl_grd");
  142. //alert("facStlGrd="+facStlGrd);
  143. model.makeValue("/root/facStlGrd",facStlGrd);
  144. commSendReq("/root/facStlGrd");
  145. commSubmit(submitMainID,"findPathProc","glueAction.do");
  146. var FacStlGrp = model.getValue("/root/resData/FacStlGrpRst_VO/FacStlGrpRst_Row/FAC_STL_GRP");
  147. var PATH_PROC_CD = model.getValue("/root/resData/PathProcCdRst_VO/PathProcCdRst_Row/PATH_PROC_CD");
  148. model.setValue("/root/formData/fac_stl_grp",FacStlGrp);
  149. model.setValue("/root/formData/path_proc",PATH_PROC_CD);
  150. model.refresh();
  151. }
  152. function save()
  153. {
  154. // var pbWidth = 200;
  155. // var pbHeight = 100;
  156. // var width = htmlwindow.screen.width;
  157. // var height = htmlwindow.screen.height;
  158. // var left = (width - pbWidth) / 2;
  159. // var top = (height - pbHeight) / 2;
  160. // var progressBar = body.createChild("xforms:group", "id:progressBar;left:" + left + "px; top:" + top + "px; width:" + pbWidth + "px; height:" + pbHeight + "px; popup:true; showeffect:blend 300; background-color:#dddddd; background-image:../../images/wait.gif; background-position:center; background-stretch:no-stretch;");
  161. commSendReq("/root/MatDnRst");
  162. commSubmit(submitMainID,"save","glueAction.do");
  163. model.removenode("/root/reqData");
  164. // body.removeChild("progressBar");
  165. // errorMessage();
  166. model.refresh();
  167. }
  168. function create()
  169. {
  170. //model.setValue("/root/formData/MatTp","01");
  171. commSendReq("/root/formData/MatTp");
  172. commSubmit(submitMainID,"add" ,"glueAction.do" );
  173. var vCnt = model.getXPathValue("count(/root/resData/ListResult_1_VO/ListResult_1_Row)");
  174. model.duplicate("/root/MatDnRst/ListResult_1_VO" ,"/root/resData/ListResult_1_VO/ListResult_1_Row["+ vCnt +"]" );
  175. model.removenode("/root/reqData");
  176. //model.removenode("/root/resData/ListResult_1_VO");
  177. //errorMessage();
  178. model.refresh();
  179. cb_CastSpecSeq.select(cb_CastSpecSeq.length - 1);
  180. //model.refresh();
  181. }
  182. function chageSelect()
  183. {
  184. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  185. if(sChgSpecSeq == "")
  186. {
  187. window.alert("请选择炉次!","提示信息");
  188. return;
  189. }
  190. var sFacStlGrd = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD");
  191. var iSlabRows = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"])" ));
  192. var iChgWeights = Number(model.getXPathValue("sum (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT)"));
  193. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP" ) );
  194. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD" ) );
  195. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH" ) );
  196. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK" ) );
  197. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN" ) );
  198. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/KEEPWARM_YN" , comb_keepWarmYN.value );
  199. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/CMAT_CNT" , iSlabRows );
  200. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT" , iChgWeights );
  201. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD", sFacStlGrd );
  202. model.refresh();
  203. }
  204. function chageSelect2()
  205. {
  206. var sChgSpecSeq = String(dg3.valueMatrix( 2, dg3.colRef("MAT_SPEC_SEQ") )).substring(0,4);
  207. if(sChgSpecSeq == "")
  208. {
  209. window.alert("请选择炉次!","提示信息");
  210. return;
  211. }
  212. var sFacStlGrd = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD");
  213. var iSlabRows = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"])" ));
  214. var iChgWeights = Number(model.getXPathValue("sum (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT)"));
  215. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP" ) );
  216. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD" ) );
  217. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH" ) );
  218. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK" ) );
  219. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN" ) );
  220. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/KEEPWARM_YN" , comb_keepWarmYN.value );
  221. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/CMAT_CNT" , iSlabRows );
  222. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT" , iChgWeights );
  223. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD", sFacStlGrd );
  224. model.refresh();
  225. }
  226. function remove()
  227. {
  228. model.removenode("/root/gridData/sendInfo");
  229. model.makeNode("/root/gridData/sendInfo");
  230. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  231. var castDnRst = model.getValue("/root/formData/castDnRst");
  232. if(castDnRst == "")
  233. {
  234. window.alert("请选择需要删除的浇次","提示信息");
  235. return;
  236. }
  237. for(var i = 1; i<=count; i++)
  238. {
  239. if(castDnRst == model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ"))
  240. {
  241. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  242. }
  243. }
  244. if(commComfirmBox(" 确认删除该浇次? "," 提示信息 ")=='0') return;
  245. commSendReq("/root/gridData/sendInfo");
  246. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  247. find();
  248. calculateSummary();
  249. model.refresh();
  250. }
  251. var dg2_currRow = -1; //dg2.onrowchanged
  252. ]]>
  253. </script>
  254. <script type="javascript" ev:event="xforms-ready">
  255. <![CDATA[
  256. //dg1.fixedcellcheckbox(0,dg1.colRef("CHK"))=true;
  257. //dg1.colStatus(0)=false;
  258. pageInit();
  259. //findPathProc();
  260. ]]>
  261. </script>
  262. <bind id="bind1" ref="/root/formData/slab_wgt" calculate="(/root/formData/slab_thk * /root/formData/slab_wth * /root/formData/slab_len * 7.8) div 1000000"/>
  263. <bind id="bind2" ref="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]/MAT_WGT"/>
  264. </model>
  265. </xhtml:head>
  266. <xhtml:body pagewidth="980" pageheight="620" guideline="1,980;2,620;" style="font-family:Tahoma; font-size:11pt; ">
  267. <caption id="ct_01" class="cell" style="left:0px; top:135px; width:90px; height:20px; text-align:center; vertical-align:middle; ">厂内牌号组</caption>
  268. <select1 id="cb_FacStlGrp" ref="/root/formData/fac_stl_grp" appearance="minimal" style="left:92px; top:135px; width:100px; height:20px; background-color:#ffff99; ">
  269. <choices>
  270. <itemset nodeset="/root/formData/fac_stl_grp/DCommCodeResult_Row">
  271. <label ref="SM_CFNM"/>
  272. <value ref="SM_CD"/>
  273. </itemset>
  274. </choices>
  275. </select1>
  276. <caption id="ct_02" class="cell" style="left:0px; top:110px; width:90px; height:20px; text-align:center; vertical-align:middle; ">厂内牌号</caption>
  277. <select1 id="cb_FacStlGrd" ref="/root/formData/fac_stl_grd" appearance="minimal" cols="3" style="left:92px; top:110px; width:100px; height:20px; background-color:#ffff99; ">
  278. <choices>
  279. <itemset nodeset="/root/formData/fac_stl_grd/DCommCodeResult_Row">
  280. <label ref="FAC_STL_GRD_NM"/>
  281. <value ref="FAC_STL_GRD"/>
  282. </itemset>
  283. </choices>
  284. <script type="javascript" ev:event="xforms-value-changed">
  285. <![CDATA[
  286. findPathProc();
  287. ]]>
  288. </script>
  289. </select1>
  290. <caption id="ct_03" class="cell" style="left:0px; top:35px; width:90px; height:20px; text-align:center; vertical-align:middle; ">板坯厚度</caption>
  291. <button id="button2" style="left:115px; top:5px; width:75px; height:20px; font-weight:bold; text-align:right; vertical-align:middle; background-image:../../images/find.gif; border-color:#ffffff; border-style:solid; ">
  292. <caption>炉次生成</caption>
  293. <script type="javascript" ev:event="DOMActivate">
  294. <![CDATA[
  295. //model.removenode("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]");
  296. var slab_thk = model.getValue("/root/formData/slab_thk");
  297. if(slab_thk == ""){window.alert("板坯厚度不能为空!","提示信息");return;}
  298. var slab_wth = model.getValue("/root/formData/slab_wth");
  299. if(slab_wth == ""){window.alert("板坯宽度不能为空!","提示信息");return;}
  300. var slab_len = model.getValue("/root/formData/slab_len");
  301. if(slab_len == ""){window.alert("板坯长度不能为空!","提示信息");return;}
  302. var fac_stl_grd = model.getValue("/root/formData/fac_stl_grd");
  303. if(fac_stl_grd == "%"){window.alert("厂内牌号不能为空!","提示信息");return;}
  304. var fac_stl_grp = model.getValue("/root/formData/fac_stl_grp");
  305. if(fac_stl_grp == "%"){window.alert("厂内牌号组不能为空!","提示信息");return;}
  306. var slab_wgt = model.getValue("/root/formData/slab_wgt");
  307. if(slab_wgt == ""){window.alert("板坯厚度不能为空!","提示信息");return;}
  308. var slab_cnt = model.getValue("/root/formData/slab_cnt");
  309. if(slab_cnt == ""){window.alert("板坯数量不能为空!","提示信息");return;}
  310. var keepWarmYN = model.getValue("/root/formData/keepWarmYN");
  311. var path_proc = model.getValue("/root/formData/path_proc");
  312. if(path_proc == ""){window.alert("工序路径不能为空!","提示信息");return;}
  313. // Validate CAST_NO
  314. var vCastSpecSeq = cb_CastSpecSeq.value;
  315. if( vCastSpecSeq == "" )
  316. {
  317. model.alert("请选择目标浇次!");
  318. return;
  319. }
  320. // Validate CHAREG_NO
  321. var vCharSpecSeq = "";
  322. var vRowCnt = 0;
  323. for( var i = 1; i < dg2.rows; i++ )
  324. {
  325. if( dg2.valueMatrix( i, dg2.colRef("CHK") ) == 'Y' )
  326. {
  327. vRowCnt++;
  328. vCharSpecSeq = dg2.valueMatrix( i, dg2.colRef("MAT_SPEC_SEQ") );
  329. }
  330. }
  331. if( vRowCnt == 0 )
  332. {
  333. model.alert("请选择目标炉次!");
  334. return;
  335. }
  336. //alert("vCharSpecSeq=" + vCharSpecSeq);
  337. var g = 1;
  338. //alert(Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)")));
  339. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  340. for( var i = 1; i <= count; i++ )
  341. {
  342. //alert(i);
  343. var PMAT_SPEC_SEQ = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+g+"]/PMAT_SPEC_SEQ");
  344. //alert("PMAT_SPEC_SEQ="+PMAT_SPEC_SEQ);
  345. //alert("g="+g);
  346. if(PMAT_SPEC_SEQ == vCharSpecSeq)
  347. {
  348. model.removenode("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+g+"]");
  349. }
  350. else
  351. {
  352. g++;
  353. }
  354. }
  355. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  356. var idx = 0;
  357. //var vRefChk = dg1.colRef("CHK");
  358. var vLevel = 0;
  359. //add by wangli -----------------------------------***************************
  360. var vLastMatSpecSeq = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03' and PMAT_SPEC_SEQ = /root/formData/matSpecSeq]/MAT_SPEC_SEQ)");
  361. if( vLastMatSpecSeq == "NaN" )
  362. {
  363. vLastMatSpecSeq = "000";
  364. }
  365. else
  366. {
  367. vLastMatSpecSeq = String(vLastMatSpecSeq).substring(Number(String(vLastMatSpecSeq).length)-4,Number(String(vLastMatSpecSeq).length));
  368. //alert("vLastMatSpecSeq="+vLastMatSpecSeq);
  369. }
  370. //alert(vLastMatSpecSeq);
  371. var k = 1;
  372. var g = 1;
  373. //add by wangli -----------------------------------**********************
  374. //var seqCount = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = /root/formData/matSpecSeq])");
  375. var h = 0;
  376. for( var i = 0; i < slab_cnt; i++ )
  377. {
  378. //浇次等级: 1
  379. //炉次等级: 2
  380. //板坯: 3
  381. //被组合板坯:4
  382. //vLevel = Number(dg1.valueMatrix(idx, dg1.colRef("LEVEL"))) + 2;//级数加2,以保证其符合炉次浇次的级数
  383. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/LEVEL" , 3);
  384. //**********************************************
  385. var iNextMatSeq = (i+1) + Number(vLastMatSpecSeq);
  386. iNextMatSeq = iNextMatSeq + "";
  387. for(var j = iNextMatSeq.length; j < 4; j++)
  388. {
  389. iNextMatSeq = "0" + iNextMatSeq;
  390. }
  391. iNextMatSeq = vCharSpecSeq + iNextMatSeq;
  392. //**********************************************
  393. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_SPEC_SEQ" , iNextMatSeq );
  394. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/PMAT_SPEC_SEQ" , vCharSpecSeq);
  395. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/CMAT_CNT" , "0" );
  396. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/WITHIN_SUB_SEQ" , 1+Number(i));
  397. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_TP" , "03");
  398. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/EXP_MAT_NO" , "" );
  399. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/FAC_STL_GRD", fac_stl_grd);
  400. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/FAC_STL_GRP", fac_stl_grp);
  401. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_RT", "H");
  402. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/TREAT_RT_CD", "");
  403. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/PATH_PROC_CD", path_proc);
  404. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/LINE_PROC_CD", "");
  405. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_THK", slab_thk);
  406. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_WTH", slab_wth);
  407. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_LEN", slab_len);
  408. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_LEN_MIN", "");
  409. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_LEN_MAX", "");
  410. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MAT_WGT", slab_wgt);
  411. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/CCM_TERM_TIME", "");
  412. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/WID_CHG_FL", "");
  413. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/HCR_YN", "C");
  414. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/EMGMTR_YN", "N");
  415. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SMS_DUEDATE", "");
  416. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/PRC_LINE", "");
  417. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/CCM_PRC_LINE", "");
  418. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/PROG_CD", "");
  419. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SLAB_CUT_SEQ", "");
  420. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/DSG_RATE", "");
  421. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/OVER_ROLL_YN", "N");
  422. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SAMPLE_CUT", "");
  423. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/ORD_FL", "2");
  424. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/ORD_NO", "");
  425. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/ORD_SEQ", "");
  426. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/DELV_REQ_DATE", "");
  427. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SPM_PROC_YN", "N");
  428. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SCARPING_PROC_YN", "N");
  429. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/SEND_STS", "01");
  430. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COMB_YN", "N");
  431. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_THK", "0");
  432. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_WTH", "0");
  433. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_LEN", "0");
  434. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_WGT", "0");
  435. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/REG_ID", "");
  436. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/REG_DTIME", "");
  437. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MOD_ID", "");
  438. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/MOD_DTIME", "");
  439. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/DSN_SLAB_NO", "");
  440. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/P_DSN_SLAB_NO", "");
  441. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/GRAVITY", "7.8");
  442. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/AUTODSN_YN", "");
  443. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_INDIA", "0");
  444. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/COIL_OUTDIA", "0");
  445. model.makeValue("/root/charge_date/ListResult_1_VO/ListResult_1_Row/KEEPWARM_YN", keepWarmYN);
  446. model.duplicate("/root/MatDnRst/ListResult_1_VO","/root/charge_date/ListResult_1_VO/ListResult_1_Row");
  447. }
  448. calculateSummary();
  449. model.refresh();
  450. chageSelect();
  451. ]]>
  452. </script>
  453. </button>
  454. <datagrid id="dg2" nodeset="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 2 and PMAT_SPEC_SEQ = /root/formData/castDnRst]" scroll="auto" backcoloralternate="#f7f9f9" caption="选择^管理号^管理号^厂内牌号^板坯块数^炉次重量|选择^浇次^炉次^厂内牌号^板坯块数^炉次重量" colsep="^" colwidth="40, 82, 82, 97, 75, 75" defaultrows="15" explorerbar="sort" extendlastcol="false" mergecellsfixedrows="bycolrec" rowsep="|" style="left:205px; top:35px; width:775px; height:230px; text-align:center; ">
  455. <col checkvalue="Y,N" ref="CHK" type="radio"/>
  456. <col ref="PMAT_SPEC_SEQ"/>
  457. <col ref="MAT_SPEC_SEQ"/>
  458. <col ref="FAC_STL_GRD"/>
  459. <col ref="CMAT_CNT" format="#,###" style="text-align:right; "/>
  460. <col ref="MAT_WGT" format="#,###" style="text-align:right; "/>
  461. <script type="javascript" ev:event="onrowchanged">
  462. <![CDATA[
  463. model.setValue("/root/formData/matSpecSeq", dg2.valueMatrix(dg2.row, dg2.colRef("MAT_SPEC_SEQ")));
  464. dg3.rebuild();
  465. if (dg2_currRow != -1)
  466. {
  467. dg2.valueMatrix(dg2_currRow, dg2.colRef("CHK") ) = "N";
  468. }
  469. dg2_currRow = dg2.row;
  470. dg2.valueMatrix(dg2_currRow, dg2.colRef("CHK") ) = "Y";
  471. model.setValue("/root/wth_count",model.getXPathValue("sum(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]/MAT_WGT)"));
  472. caption9.refresh();
  473. model.refresh();
  474. ]]>
  475. </script>
  476. <col ref="KEEPWARM_YN" visibility="hidden"/>
  477. </datagrid>
  478. <datagrid id="dg3" nodeset="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]" scroll="auto" caption="选择^管理板坯号^厂内牌号^厂内牌号组^板坯^板坯^板坯^板坯^热装区分^计划余材^是否冷坑^炉次内顺序^比重^通过工序|选择^管理板坯号^厂内牌号^厂内牌号组^宽度^厚度^长度^重量^热装区分^计划余材^是否冷坑^炉次内顺序^比重^通过工序" colsep="^" colwidth="40, 78, 57, 84, 63, 78, 62, 70, 60, 67, 76, 55, 62, 100" defaultrows="20" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:300px; width:980px; height:320px; ">
  479. <col ref="CHK" type="checkbox">
  480. <script type="javascript" ev:event="xforms-value-changed">
  481. <![CDATA[
  482. /*var selectRow = dg3.row;
  483. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  484. for(var i = 1; i<=count; i++)
  485. {
  486. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  487. var PMAT_SPEC_SEQ = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ");
  488. if(CHK == "true" && PMAT_SPEC_SEQ == model.getValue("/root/formData/matSpecSeq"))
  489. {
  490. var MAT_SPEC_SEQ1 = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ");
  491. for(var j = 1; j<=count; j++)
  492. {
  493. var MAT_SPEC_SEQ2 = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]/MAT_SPEC_SEQ");
  494. if(MAT_SPEC_SEQ2 > MAT_SPEC_SEQ1)
  495. {
  496. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]/CHK", "true");
  497. }
  498. }
  499. }
  500. }
  501. model.refresh();*/
  502. ]]>
  503. </script>
  504. </col>
  505. <col ref="MAT_SPEC_SEQ" style="text-align:left; padding-left:2; "/>
  506. <col ref="FAC_STL_GRD" style="text-align:left; padding-left:2; "/>
  507. <col ref="FAC_STL_GRP" style="text-align:left; padding-left:2; "/>
  508. <col ref="MAT_WTH" format="#,###" style="text-align:right; "/>
  509. <col ref="MAT_THK" format="#,###" style="text-align:right; "/>
  510. <col ref="MAT_LEN" type="input" format="#,###" style="text-align:right; background-color:#ffff99; "/>
  511. <col ref="MAT_WGT" type="output" format="#,###" style="text-align:right; "/>
  512. <col ref="HCR_YN"/>
  513. <col disabled="true" ref="ORD_FL" type="combo">
  514. <choices>
  515. <item>
  516. <label>订单材</label>
  517. <value>1</value>
  518. </item>
  519. <item>
  520. <label>余材</label>
  521. <value>2</value>
  522. </item>
  523. </choices>
  524. </col>
  525. <col ref="KEEPWARM_YN" type="combo" style="background-color:#ffff99; ">
  526. <choices>
  527. <item>
  528. <label>是</label>
  529. <value>Y</value>
  530. </item>
  531. <item>
  532. <label>否</label>
  533. <value>N</value>
  534. </item>
  535. </choices>
  536. </col>
  537. <col ref="WITHIN_SUB_SEQ" style="text-align:right; "/>
  538. <col ref="GRAVITY" style="text-align:right; "/>
  539. <col ref="PATH_PROC_CD"/>
  540. <script type="javascript" ev:event="xforms-value-changed">
  541. <![CDATA[
  542. var iGravity = Number(dg3.valueMatrix(dg3.row,dg3.colRef("GRAVITY")));
  543. var iSlabThk = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_THK")));
  544. var iSlabWth = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_WTH")));
  545. var iSlabLen = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_LEN")));
  546. var iSlabWgt = Math.ceil( (iSlabLen * iSlabWth * iSlabThk * iGravity * 1000) / 1000000000 );
  547. dg3.valueMatrix(dg3.row,dg3.colRef("MAT_WGT")) = iSlabWgt;
  548. calculateSummary();
  549. model.refresh();
  550. chageSelect();
  551. ]]>
  552. </script>
  553. </datagrid>
  554. <button id="bt_AddRestSlab" style="left:755px; top:270px; width:75px; height:20px; font-weight:bold; text-align:right; vertical-align:middle; background-image:../../images/btn_create.gif; border-color:#ffffff; border-style:solid; ">
  555. <caption>余材添加</caption>
  556. <script type="javascript" ev:event="DOMActivate">
  557. <![CDATA[
  558. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  559. if(sChgSpecSeq == "")
  560. {
  561. window.alert("请选择炉次!","提示信息");
  562. return;
  563. }
  564. if( dg3.rows <= dg3.fixedRows ) {
  565. return;
  566. }
  567. var vLastMatSpecSeq = dg3.valueMatrix(dg3.rows - 1, dg3.colRef("MAT_SPEC_SEQ"));
  568. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  569. var iNextMatSeq = sChgSpecSeq + lpad(Number(vLastMatSpecSeq.substring(5)) + 1, 4, '0');
  570. /*var vLastMatSpecSeq = dg3.valueMatrix( dg3.rows - 1, dg3.colRef("MAT_SPEC_SEQ") );
  571. //var iNextMatSeq = 1 + Number(model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03']/MAT_SPEC_SEQ)"));
  572. var iNextMatSeq = 0;
  573. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  574. //var count = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03' and substring(MAT_SPEC_SEQ,5,4))])");
  575. var maxValue = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03' and PMAT_SPEC_SEQ = /root/formData/matSpecSeq]/MAT_SPEC_SEQ)");
  576. //alert("maxValue="+maxValue);
  577. //maxValue = substring(maxValue,5,4);
  578. if(maxValue != "NaN")
  579. {
  580. maxValue = Number(String(maxValue).substring(String(maxValue).length-4,String(maxValue).length)) + 1;
  581. iNextMatSeq = sChgSpecSeq + lpad(maxValue, 4, '0');
  582. // for(var i = 1; i <= count; i++)
  583. // {
  584. // if(i<9)
  585. // {
  586. // iNextMatSeq = sChgSpecSeq + "000" + (Number(i)+1);
  587. // }
  588. // else if(i>=9 && i<99)
  589. // {
  590. // iNextMatSeq = sChgSpecSeq +"00"+ (Number(i)+1);
  591. // }
  592. // else
  593. // {
  594. // iNextMatSeq = sChgSpecSeq +"0"+ (Number(i)+1);
  595. // }
  596. // }
  597. //iNextMatSeq = iNextMatSeq + "";
  598. //for(i = iNextMatSeq.length; i < 8; i++)
  599. //{
  600. // iNextMatSeq = "0" + iNextMatSeq;
  601. //}
  602. //model.alert( "iNextMatSeq = ["+ iNextMatSeq +"]" );
  603. */
  604. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  605. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LEVEL" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/LEVEL" ) );
  606. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_SPEC_SEQ" , iNextMatSeq ); //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_SPEC_SEQ" )
  607. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PMAT_SPEC_SEQ" ) );
  608. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_TP" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_TP" ) );
  609. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EXP_MAT_NO" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/EXP_MAT_NO" ) );
  610. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , Number(model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/WITHIN_SUB_SEQ" ))+ 1 );
  611. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CMAT_CNT" ) );
  612. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/FAC_STL_GRD" ) );
  613. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRP" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/FAC_STL_GRP" ) );
  614. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_RT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_RT" ) );
  615. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/TREAT_RT_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/TREAT_RT_CD" ) );
  616. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PATH_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PATH_PROC_CD" ) );
  617. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LINE_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/LINE_PROC_CD" ) );
  618. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_THK" ) );
  619. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_WTH" ) );
  620. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN" ) );
  621. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MIN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN_MIN" ) );
  622. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MAX" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN_MAX" ) );
  623. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WGT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_WGT" ) );
  624. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_TERM_TIME" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CCM_TERM_TIME" ) );
  625. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WID_CHG_FL" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/WID_CHG_FL" ) );
  626. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/HCR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/HCR_YN" ) );
  627. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EMGMTR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/EMGMTR_YN" ) );
  628. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SMS_DUEDATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SMS_DUEDATE" ) );
  629. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PRC_LINE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PRC_LINE" ) );
  630. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_PRC_LINE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CCM_PRC_LINE" ) );
  631. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PROG_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PROG_CD" ) );
  632. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SLAB_CUT_SEQ" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SLAB_CUT_SEQ" ) );
  633. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSG_RATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/DSG_RATE" ) );
  634. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/OVER_ROLL_YN" ,"Y" );
  635. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SAMPLE_CUT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SAMPLE_CUT" ) );
  636. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_FL" , "2" ); //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_FL" )
  637. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_NO" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_NO" ) );
  638. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_SEQ" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_SEQ" ) );
  639. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DELV_REQ_DATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/DELV_REQ_DATE" ) );
  640. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPM_PROC_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SPM_PROC_YN" ) );
  641. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SCARPING_PROC_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SCARPING_PROC_YN" ) );
  642. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SEND_STS" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SEND_STS" ) );
  643. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COMB_YN" , "N" ); //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COMB_YN" )
  644. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_THK" ) );
  645. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_WTH" ) );
  646. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_LEN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_LEN" ) );
  647. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WGT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_WGT" ) );
  648. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CHK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CHK" ) );
  649. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , "" );
  650. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , "" );
  651. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/GRAVITY" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/GRAVITY" ) );
  652. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_INDIA" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_INDIA" ) );
  653. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_OUTDIA" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_OUTDIA" ));
  654. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/AUTODSN_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/AUTODSN_YN" ));
  655. model.setValue("/root/wth_count",model.getXPathValue("sum(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]/MAT_WGT)"));
  656. //commAddRow(dg3);
  657. chageSelect();
  658. model.refresh();
  659. ]]>
  660. </script>
  661. </button>
  662. <button id="button4" style="left:830px; top:270px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_save.gif; border-color:#ffffff; border-style:solid; ">
  663. <caption>炉次选定</caption>
  664. <script type="javascript" ev:event="DOMActivate">
  665. <![CDATA[
  666. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  667. if(sChgSpecSeq == "")
  668. {
  669. window.alert("请选择炉次!","提示信息");
  670. return;
  671. }
  672. var sFacStlGrd = dg3.valueMatrix( 2, dg3.colRef("FAC_STL_GRD" ) );
  673. var iSlabRows = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"])" ));
  674. var iChgWeights = Number(model.getXPathValue("sum (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT)"));
  675. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD", sFacStlGrd );
  676. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/CMAT_CNT" , iSlabRows );
  677. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT" , iChgWeights );
  678. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP", model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRP") );
  679. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD", model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/PATH_PROC_CD") );
  680. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH", model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WTH") );
  681. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK", model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_THK") );
  682. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN", model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/HCR_YN") );
  683. model.refresh();
  684. ]]>
  685. </script>
  686. </button>
  687. <button id="button5" style="left:905px; top:270px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_delete.gif; border-color:#ffffff; border-style:solid; ">
  688. <caption>板坯删除</caption>
  689. <script type="javascript" ev:event="onclick">
  690. <![CDATA[
  691. model.removenode("/root/gridData/sendInfo");
  692. model.makeNode("/root/gridData/sendInfo");
  693. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  694. var j = 0;
  695. for(var i = 1; i<=count; i++)
  696. {
  697. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  698. //var MAT_TP = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_TP");
  699. //var PMAT_SPEC_SEQ = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ");
  700. //alert("CHK=" + CHK);
  701. //if(PMAT_SPEC_SEQ == model.getValue("/root/formData/matSpecSeq"))
  702. if(CHK == "true")
  703. {
  704. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  705. j++;
  706. //model.removenode("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]");
  707. }
  708. }
  709. if(j == 0)
  710. {
  711. window.alert("请选择需要删除的板坯","提示信息");
  712. return;
  713. }
  714. if(commComfirmBox(" 确认删除该炉次中的板坯? "," 提示信息 ")=='0') return;
  715. commSendReq("/root/gridData/sendInfo");
  716. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  717. find();
  718. chageSelect2();
  719. calculateSummary();
  720. save();
  721. model.refresh();
  722. ]]>
  723. </script>
  724. </button>
  725. <line id="line2" style="x1:60px; y1:295px; x2:980px; y2:295px; border-color:#ff0000; "/>
  726. <caption id="caption3" style="left:0px; top:275px; width:60px; height:22px; font-family:Tahoma; font-weight:bold; vertical-align:middle; ">炉次信息</caption>
  727. <caption id="caption4" style="left:205px; top:5px; width:60px; height:20px; font-family:Tahoma; font-weight:bold; vertical-align:middle; ">浇次信息</caption>
  728. <line id="line3" visibility="visible" style="x1:980px; y1:30px; x2:0px; y2:30px; border-color:#ff0000; "/>
  729. <button id="bt_AddCharge" style="left:830px; top:5px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_create.gif; border-color:#ffffff; border-style:solid; ">
  730. <caption>添加炉次</caption>
  731. <script type="javascript" ev:event="DOMActivate">
  732. <![CDATA[
  733. // Validate CAST_NO
  734. var vCastSpecSeq = cb_CastSpecSeq.value;
  735. if( vCastSpecSeq == "" )
  736. {
  737. model.alert("Please, choice the target cast!!!");
  738. return;
  739. }
  740. //model.alert("===> ["+ model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02'])") +"]");
  741. var vLastMatSpecSeq = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02' and starts-with(MAT_SPEC_SEQ,"+model.getValue("/root/formData/castDnRst")+")]/MAT_SPEC_SEQ)");
  742. //alert("..............vLastMatSpecSeq="+vLastMatSpecSeq);
  743. //var iNextMatSeq = 1 + Number(vLastMatSpecSeq);
  744. //(iNextMatSeq + "").substring(
  745. //var vLastMatSpecSeq = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02' and PMAT_SPEC_SEQ = /root/formData/castDnRst]/MAT_SPEC_SEQ");
  746. //vLastMatSpecSeq = vLastMatSpecSeq.substring(3);
  747. //var vLastMatSpecSeq = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02' and PMAT_SPEC_SEQ = /root/formData/castDnRst]/MAT_SPEC_SEQ)");
  748. //var vLastMatSpecSeq = dg2.valueMatrix( dg2.rows - 1, dg2.colRef("MAT_SPEC_SEQ") );
  749. //model.alert("vLastMatSpecSeq = ["+ vLastMatSpecSeq +"]");
  750. if( vLastMatSpecSeq == "NaN" )
  751. {
  752. vLastMatSpecSeq = "00";
  753. }
  754. else
  755. {
  756. vLastMatSpecSeq = String(vLastMatSpecSeq).substring(Number(String(vLastMatSpecSeq).length)-2,Number(String(vLastMatSpecSeq).length));
  757. }
  758. var iNextMatSeq = 1 + Number(vLastMatSpecSeq);
  759. for(i = String(iNextMatSeq).length; i < 2; i++)
  760. {
  761. iNextMatSeq = "0" + iNextMatSeq;
  762. }
  763. var CHARGE_SEQ = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 2 and PMAT_SPEC_SEQ = /root/formData/castDnRst])"))+1;
  764. iNextMatSeq = vCastSpecSeq + iNextMatSeq;
  765. //var iNextMatSeq = 1 + parseInt(model.getXPathValue("max (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02' and PMAT_SPEC_SEQ = "+ model.getValue("/root/formData/castDnRst") +"]/MAT_SPEC_SEQ)"));
  766. //model.alert( "iNextMatSeq = ["+ iNextMatSeq +"]" );
  767. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  768. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LEVEL" , 2 );
  769. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_SPEC_SEQ" , iNextMatSeq ); //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_SPEC_SEQ" )
  770. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , vCastSpecSeq );
  771. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_TP" , "02" );
  772. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EXP_MAT_NO" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/EXP_MAT_NO" ) );
  773. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , CHARGE_SEQ );
  774. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CMAT_CNT" ) );
  775. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/FAC_STL_GRD" ) );
  776. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRP" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/FAC_STL_GRP" ) );
  777. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_RT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_RT" ) );
  778. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/TREAT_RT_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/TREAT_RT_CD" ) );
  779. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PATH_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PATH_PROC_CD" ) );
  780. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LINE_PROC_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/LINE_PROC_CD" ) );
  781. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_THK" ) );
  782. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_WTH" ) );
  783. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN" ) );
  784. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MIN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN_MIN" ) );
  785. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MAX" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_LEN_MAX" ) );
  786. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WGT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/MAT_WGT" ) );
  787. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_TERM_TIME" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CCM_TERM_TIME" ) );
  788. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WID_CHG_FL" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/WID_CHG_FL" ) );
  789. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/HCR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/HCR_YN" ) );
  790. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EMGMTR_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/EMGMTR_YN" ) );
  791. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SMS_DUEDATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SMS_DUEDATE" ) );
  792. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PRC_LINE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PRC_LINE" ) );
  793. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_PRC_LINE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/CCM_PRC_LINE" ) );
  794. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PROG_CD" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/PROG_CD" ) );
  795. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SLAB_CUT_SEQ" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SLAB_CUT_SEQ" ) );
  796. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSG_RATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/DSG_RATE" ) );
  797. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/OVER_ROLL_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/OVER_ROLL_YN" ) );
  798. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SAMPLE_CUT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SAMPLE_CUT" ) );
  799. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_FL" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_FL" ) );
  800. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_NO" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_NO" ) );
  801. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_SEQ" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/ORD_SEQ" ) );
  802. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DELV_REQ_DATE" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/DELV_REQ_DATE" ) );
  803. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPM_PROC_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SPM_PROC_YN" ) );
  804. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SCARPING_PROC_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SCARPING_PROC_YN" ) );
  805. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SEND_STS" , "01" );
  806. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COMB_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COMB_YN" ) );
  807. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_THK" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_THK" ) );
  808. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WTH" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_WTH" ) );
  809. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_LEN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_LEN" ) );
  810. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WGT" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_WGT" ) );
  811. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CHK" , "N" );
  812. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , "" );
  813. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , "" );
  814. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/GRAVITY" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/GRAVITY" ) );
  815. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_INDIA" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_INDIA" ) );
  816. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_OUTDIA" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/COIL_OUTDIA" ) );
  817. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/AUTODSN_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/AUTODSN_YN" ) );
  818. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/KEEPWARM_YN" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/KEEPWARM_YN" ) );
  819. model.refresh();
  820. dg2.rebuild();
  821. dg2.topRow = dg2.row;
  822. ]]>
  823. </script>
  824. </button>
  825. <button id="button8" style="left:905px; top:5px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_delete.gif; border-color:#ffffff; border-style:solid; ">
  826. <caption>删除炉次</caption>
  827. <script type="javascript" ev:event="onclick">
  828. <![CDATA[
  829. model.removenode("/root/gridData/sendInfo");
  830. model.makeNode("/root/gridData/sendInfo");
  831. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  832. var j = 0;
  833. //var flag = "true";
  834. for(var i = 1; i<=count; i++)
  835. {
  836. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  837. if(CHK == "Y")
  838. {
  839. //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ");
  840. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  841. j++;
  842. }
  843. //if(model.getValue("/root/formData/matSpecSeq") == model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ"))
  844. //{
  845. // window.alert("要删除该炉次,请先删除该炉次中的所有板坯","提示信息");
  846. // flag = "false";
  847. // break;
  848. //}
  849. }
  850. //if(flag == "false")
  851. //{
  852. // return;
  853. //}
  854. if(j == 0)
  855. {
  856. window.alert("请选择需要删除的炉次信息","提示信息");
  857. return;
  858. }
  859. if(commComfirmBox(" 确认删除该炉次? "," 提示信息 ")=='0') return;
  860. commSendReq("/root/gridData/sendInfo");
  861. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  862. find();
  863. calculateSummary();
  864. model.refresh();
  865. ]]>
  866. </script>
  867. </button>
  868. <select1 id="cb_CastSpecSeq" ref="/root/formData/castDnRst" appearance="minimal" style="left:260px; top:5px; width:100px; height:20px; ">
  869. <choices>
  870. <itemset nodeset="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '01']">
  871. <label ref="MAT_SPEC_SEQ"/>
  872. <value ref="MAT_SPEC_SEQ"/>
  873. </itemset>
  874. </choices>
  875. <script type="javascript" ev:event="xforms-select">
  876. <![CDATA[
  877. model.setValue("/root/formData/matSpecSeq", "");
  878. dg2.rebuild();
  879. dg3.rebuild();
  880. //dg2.refresh();
  881. ]]>
  882. </script>
  883. </select1>
  884. <caption id="caption8" class="cell" style="left:587px; top:270px; width:64px; height:20px; text-align:center; vertical-align:middle; ">板坯总重量</caption>
  885. <caption id="caption9" ref="/root/wth_count" format="#,###" style="left:652px; top:270px; width:100px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  886. <line id="line1" visibility="visible" style="x1:980px; y1:0px; x2:0px; y2:0px; border-color:#ff0000; "/>
  887. <input id="input1" ref="/root/formData/slab_thk" format="#,###" style="left:92px; top:35px; width:100px; height:20px; text-align:right; background-color:#ffff99; border-color:#000000; "/>
  888. <input id="input10" ref="/root/formData/slab_wth" format="#,###" style="left:92px; top:60px; width:100px; height:20px; text-align:right; background-color:#ffff99; border-color:#000000; "/>
  889. <caption id="caption10" class="cell" style="left:0px; top:60px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯宽度</caption>
  890. <caption id="caption1" class="cell" style="left:0px; top:85px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯长度</caption>
  891. <input id="input2" ref="/root/formData/slab_len" format="#,###" style="left:92px; top:85px; width:100px; height:20px; text-align:right; background-color:#ffff99; border-color:#000000; "/>
  892. <input id="input8" ref="/root/formData/slab_wgt" disabled="true" format="#,###" style="left:92px; top:160px; width:100px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; "/>
  893. <caption id="caption5" class="cell" style="left:0px; top:185px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯块数</caption>
  894. <caption id="caption6" class="cell" style="left:0px; top:160px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯单重</caption>
  895. <input id="input5" ref="/root/formData/slab_cnt" format="#,###" style="left:92px; top:185px; width:100px; height:20px; text-align:right; background-color:#ffff99; border-color:#000000; "/>
  896. <button id="button9" style="left:730px; top:5px; width:70px; height:20px; text-align:right; background-image:../../images/create.gif; ">
  897. <caption>指示确认</caption>
  898. <script type="javascript" ev:event="onclick">
  899. <![CDATA[
  900. var vleft = window.screenLeft + window.width/2 - 155;
  901. var vtop = window.screenTop + window.height/2 - 250;
  902. window.load("./UID040010_popup.xrw",
  903. "modal",
  904. "",
  905. "left:"+vleft+"; top:"+vtop+"; width:390; height:480; sysmenu:visible; min:visible; max:true; resize:true; caption:hidden;",
  906. "/root/initData", "/root/initData");
  907. ]]>
  908. </script>
  909. </button>
  910. <caption id="caption2" class="cell" style="left:0px; top:210px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">通过工序</caption>
  911. <input id="input3" ref="/root/formData/path_proc" style="left:92px; top:210px; width:100px; height:20px; text-align:right; border-color:#000000; "/>
  912. <caption id="caption7" class="cell" style="left:0px; top:235px; width:90px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">是否冷坑</caption>
  913. <select1 id="comb_keepWarmYN" ref="/root/formData/keepWarmYN" appearance="minimal" style="left:92px; top:235px; width:100px; height:20px; ">
  914. <choices>
  915. <item>
  916. <label>否</label>
  917. <value>N</value>
  918. </item>
  919. <item>
  920. <label>是</label>
  921. <value>Y</value>
  922. </item>
  923. </choices>
  924. </select1>
  925. <button id="button1" visibility="hidden" style="left:525px; top:5px; width:55px; height:20px; ">
  926. <caption>FIND</caption>
  927. <script type="javascript" ev:event="DOMActivate">
  928. <![CDATA[
  929. find();
  930. ]]>
  931. </script>
  932. </button>
  933. <button id="button3" visibility="hidden" style="left:587px; top:5px; width:55px; height:20px; ">
  934. <caption>CREATE</caption>
  935. <script type="javascript" ev:event="DOMActivate">
  936. <![CDATA[
  937. create();
  938. ]]>
  939. </script>
  940. </button>
  941. <button id="button6" visibility="hidden" style="left:649px; top:5px; width:55px; height:20px; ">
  942. <caption>SAVE</caption>
  943. <script type="javascript" ev:event="DOMActivate">
  944. <![CDATA[
  945. save();
  946. ]]>
  947. </script>
  948. </button>
  949. </xhtml:body>
  950. </xhtml:html>