2f52618d0f49985446d5e1348f64710ef30f1eab.svn-base 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  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. <FacStlGrp/>
  20. <FacStlGrd/>
  21. <SlabWth/>
  22. <RangeCoilThk>
  23. <FrCoilThk/>
  24. <ToCoilThk/>
  25. </RangeCoilThk>
  26. <DevTerm>
  27. <FrDevlmtDate/>
  28. <ToDevlmtDate/>
  29. </DevTerm>
  30. <castDnRst/>
  31. <matSpecSeq/>
  32. <MatTp>01</MatTp>
  33. <CoilThkGroup/>
  34. <CoilThk/>
  35. <SlabThk/>
  36. <OrdNo/>
  37. <OrdSeq/>
  38. </formData>
  39. <initData>
  40. <FacStlGrp>
  41. <IncludeAll>A</IncludeAll>
  42. </FacStlGrp>
  43. <FacStlGrd>
  44. <IncludeAll>A</IncludeAll>
  45. <FacStlGrd/>
  46. </FacStlGrd>
  47. <DevTerm>
  48. <FromNum>35</FromNum>
  49. <ToNum>0</ToNum>
  50. <DateFormat>YYYYMMDD</DateFormat>
  51. </DevTerm>
  52. <rcvInfo/>
  53. <BIZ_TP>CoilThickGroup</BIZ_TP>
  54. <LG_CD>D01002</LG_CD>
  55. </initData>
  56. <slab_count/>
  57. <wth_count/>
  58. <gridData>
  59. <sendInfo/>
  60. </gridData>
  61. <slab_wgt_sum/>
  62. <codeData/>
  63. </root>
  64. </instance>
  65. <script type="javascript" src="../../js/boaMsg.js"/>
  66. <script type="javascript" src="../../js/boaCommon.js"/>
  67. <script type="javascript" src="../../js/mesCommon.js"/>
  68. <script type="javascript">
  69. <![CDATA[
  70. function lpad(str, len, fill) {
  71. if (fill == null) fill = " ";
  72. str = str + "";
  73. while( str.length < len ) str = fill + str;
  74. return str;
  75. }
  76. var submitCommID = "UIDCommCode-service";
  77. var subimtDateID = "UIDCommDate-service";
  78. var submitMainID = "UID030020-service";
  79. //1、获取用户登录信息,只能在页面初始化函数中调用
  80. function InitParams(node)
  81. {
  82. if (typeof node == "undefined" && typeof node != "object") return;
  83. model.removenode("/root/initData/rcvInfo");
  84. model.makeNode("/root/initData/rcvInfo");
  85. var nodeList = node.childNodes;
  86. for (var i = 0; i < nodeList.length; i++)
  87. model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
  88. }
  89. //2. 页面初始化函数(必须)
  90. function Init(node)
  91. {
  92. //InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  93. // 在程序中会重建该节点,最好不要重名
  94. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  95. //...
  96. pageInit();
  97. }
  98. //3、页面标题
  99. function setTitle()
  100. {
  101. return "工序计划 >> 炉次浇次设计 >> 炉次浇次编制"; // 如:return "进程管理 >> 订单进程现况查询";
  102. }
  103. function pageInit()
  104. {
  105. // Populate values (连铸牌号-combo)
  106. commSendReq("/root/initData/FacStlGrp");
  107. commSubmit(submitCommID ,"findNormal" ,"glueAction.do" );
  108. model.copyNode("/root/formData/FacStlGrp" ,"/root/resData/DCommCodeResult_VO" );
  109. model.removenode("/root/reqData");
  110. // Populate values (厂内牌号-combo)
  111. commSendReq("/root/initData/FacStlGrd");
  112. commSubmit(submitCommID ,"findFacStlGrd2" , "glueAction.do" );
  113. model.copyNode("/root/formData/FacStlGrd" , "/root/resData/DCommCodeResult_VO");
  114. model.removenode("/root/reqData");
  115. // Populate values (发货指示期间-combo)
  116. commSendReq("/root/initData/DevTerm");
  117. commSubmit(subimtDateID ,"success" ,"glueAction.do" );
  118. model.setValue("/root/formData/DevTerm/FrDevlmtDate" , model.getValue("/root/resData/DateResultList_VO/DateResultList_Row/FR_DATE"));
  119. model.setValue("/root/formData/DevTerm/ToDevlmtDate" , model.getValue("/root/resData/DateResultList_VO/DateResultList_Row/TO_DATE"));
  120. model.removenode("/root/reqData");
  121. // 板坯宽度
  122. commSendReq("/root/initData/FacStlGrd");
  123. commSubmit(submitCommID ,"searchSlabDnWidth2" , "glueAction.do" );
  124. model.copyNode("/root/formData/SlabWth" , "/root/resData/DCommCodeResult_VO");
  125. model.removenode("/root/reqData");
  126. // 钢卷厚度
  127. /*commSendReq("/root/initData");
  128. commSubmit(submitCommID ,"numMinMaxByBizTp" , "glueAction.do" );
  129. model.copyNode("/root/formData/CoilThk" , "/root/resData/DCommCodeResult_VO");
  130. model.removenode("/root/reqData");
  131. model.removenode("/root/resData/DCommCodeResult_VO");*/
  132. cb_FacStlGrp.select(0);
  133. cb_FacStlGrd.select(0);
  134. cb_SlabWth.select(0);
  135. /*cb_CoilThkGrp.select(0);*/
  136. model.removenode("/root/reqData");
  137. model.makeNode("/root/reqData");
  138. commSendReq("/root/initData");
  139. commSubmit("UIGCOMMCODE-service","find","glueAction.do");
  140. model.copyNode("/root/codeData","/root/resData");
  141. model.removenode("/root/reqData");
  142. model.makeNode("/root/reqData");
  143. model.refresh();
  144. }
  145. function calculateSummary()
  146. {
  147. var count = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row)");
  148. var chk_count = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[CHK = 'Y'])");
  149. model.setValue("/root/slab_count",chk_count+"/"+count);
  150. var chk_wgt = model.getXPathValue("sum(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[CHK = 'Y']/SLAB_WGT)");
  151. var wgt = model.getXPathValue("sum(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row/SLAB_WGT)");
  152. //alert("wgt="+chk_wgt+"/"+wgt)
  153. model.setValue("/root/slab_wgt_sum",chk_wgt+"/"+wgt);
  154. 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)"));
  155. }
  156. function find()
  157. {
  158. model.removeNodeset(dg1.nodeset);
  159. model.removeNodeset(dg2.nodeset);
  160. model.removeNodeset(dg3.nodeset);
  161. //model.refresh();
  162. model.makeValue("/root/formData/FACSTLGED",model.getValue("/root/formData/FacStlGrd"));
  163. model.makeValue("/root/formData/FACSTLGEP",model.getValue("/root/formData/FacStlGrp"));
  164. if(model.getValue("/root/formData/SlabWth") == '1')
  165. {
  166. model.makeValue("/root/formData/SALABWTH","");
  167. }
  168. else
  169. {
  170. model.makeValue("/root/formData/SALABWTH",model.getValue("/root/formData/SlabWth"));
  171. }
  172. submitID = submitMainID;
  173. exec("/root/formData", "", "find", "/root/SlabDnRst/ListResult_0_VO", "/root/MatDnRst/ListResult_1_VO");
  174. calculateSummary();
  175. model.removenode("/root/reqData");
  176. model.removenode("/root/resData");
  177. model.refresh();
  178. cb_CastSpecSeq.select(0);
  179. commGridLevels(dg1,0);
  180. // commGridLevels(dg3,0);
  181. setColor();
  182. }
  183. function save()
  184. {
  185. var pbWidth = 200;
  186. var pbHeight = 100;
  187. var width = htmlwindow.screen.width;
  188. var height = htmlwindow.screen.height;
  189. var left = (width - pbWidth) / 2;
  190. var top = (height - pbHeight) / 2;
  191. 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;");
  192. commSendReq("/root/MatDnRst");
  193. commSubmit(submitMainID,"save","glueAction.do");
  194. model.removenode("/root/reqData");
  195. body.removeChild("progressBar");
  196. //errorMessage();
  197. model.refresh();
  198. }
  199. function create()
  200. {
  201. //model.setValue("/root/formData/MatTp","01");
  202. commSendReq("/root/formData/MatTp");
  203. commSubmit(submitMainID,"add" ,"glueAction.do" );
  204. var vCnt = model.getXPathValue("count(/root/resData/ListResult_1_VO/ListResult_1_Row)");
  205. model.duplicate("/root/MatDnRst/ListResult_1_VO" ,"/root/resData/ListResult_1_VO/ListResult_1_Row["+ vCnt +"]" );
  206. model.removenode("/root/reqData");
  207. //model.removenode("/root/resData/ListResult_1_VO");
  208. //errorMessage();
  209. model.refresh();
  210. cb_CastSpecSeq.select(cb_CastSpecSeq.length - 1);
  211. //model.refresh();
  212. }
  213. function chageSelect()
  214. {
  215. var sChgSpecSeq = model.getValue("/root/formData/matSpecSeq");//dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  216. if(sChgSpecSeq == "")
  217. {
  218. window.alert("请选择炉次!","提示信息");
  219. return;
  220. }
  221. var sFacStlGrd = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD");
  222. var iSlabRows = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"])" ));
  223. var iChgWeights = Number(model.getXPathValue("sum (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT)"));
  224. 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") );
  225. 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") );
  226. 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") );
  227. 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") );
  228. 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") );
  229. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/CMAT_CNT" , iSlabRows );
  230. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT" , iChgWeights );
  231. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD", sFacStlGrd );
  232. model.refresh();
  233. }
  234. function remove()
  235. {
  236. model.removenode("/root/gridData/sendInfo");
  237. model.makeNode("/root/gridData/sendInfo");
  238. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  239. var castDnRst = model.getValue("/root/formData/castDnRst");
  240. if(castDnRst == "")
  241. {
  242. window.alert("请选择需要删除的浇次","提示信息");
  243. return;
  244. }
  245. //var j = 0;
  246. //var flag = "true";
  247. for(var i = 1; i<=count; i++)
  248. {
  249. //var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  250. if(castDnRst == model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ"))
  251. {
  252. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  253. }
  254. //if(castDnRst == model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ"))
  255. //{
  256. // window.alert("要删除该浇次,请先删除该浇次中的所有炉次","提示信息");
  257. // flag = "false";
  258. // break;
  259. //}
  260. }
  261. //if(flag == "false")
  262. //{
  263. // return;
  264. //}
  265. if(commComfirmBox(" 确认删除该浇次? "," 提示信息 ")=='0') return;
  266. commSendReq("/root/gridData/sendInfo");
  267. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  268. find();
  269. calculateSummary();
  270. model.refresh();
  271. }
  272. function setColor()
  273. {
  274. dg1.rebuildStyle();
  275. var valCol = dg1.colRef("IS_ZLSJ");
  276. for(var i = dg1.fixedRows; i < dg1.rows; i++)
  277. {
  278. if(dg1.valueMatrix(i , valCol )== "否")
  279. {
  280. dg1.cellStyle("background-color" , i , valCol) = "#ff0000";
  281. }
  282. }
  283. }
  284. var dg2_currRow = -1; //dg2.onrowchanged
  285. ]]>
  286. </script>
  287. <script type="javascript" ev:event="xforms-ready">
  288. <![CDATA[
  289. //dg1.fixedcellcheckbox(0,dg1.colRef("CHK"))=true;
  290. //dg1.colStatus(0)=false;
  291. pageInit();
  292. ]]>
  293. </script>
  294. </model>
  295. </xhtml:head>
  296. <xhtml:body pagewidth="980" pageheight="620" guideline="1,980;2,620;" style="font-family:Tahoma; font-size:11pt; ">
  297. <caption id="ct_01" class="cell" style="left:0px; top:5px; width:80px; height:20px; text-align:center; vertical-align:middle; ">厂内牌号组</caption>
  298. <select1 id="cb_FacStlGrp" ref="/root/formData/FacStlGrp" appearance="minimal" editmode="inputsearch" style="left:82px; top:5px; width:100px; height:20px; ">
  299. <choices>
  300. <itemset nodeset="/root/formData/FacStlGrp/DCommCodeResult_Row">
  301. <label ref="SM_CFNM"/>
  302. <value ref="SM_CD"/>
  303. </itemset>
  304. </choices>
  305. </select1>
  306. <caption id="ct_02" class="cell" style="left:187px; top:5px; width:80px; height:20px; text-align:center; vertical-align:middle; ">厂内牌号</caption>
  307. <select1 id="cb_FacStlGrd" ref="/root/formData/FacStlGrd" appearance="minimal" editmode="inputsearch" style="left:269px; top:5px; width:100px; height:20px; ">
  308. <choices>
  309. <itemset nodeset="/root/formData/FacStlGrd/DCommCodeResult_Row">
  310. <label ref="FAC_STL_GRD_NM"/>
  311. <value ref="FAC_STL_GRD"/>
  312. </itemset>
  313. </choices>
  314. </select1>
  315. <caption id="ct_03" class="cell" style="left:374px; top:5px; width:80px; height:20px; text-align:center; vertical-align:middle; ">板坯宽度</caption>
  316. <select1 id="cb_SlabWth" ref="/root/formData/SlabWth" appearance="minimal" style="left:456px; top:5px; width:100px; height:20px; ">
  317. <choices>
  318. <itemset nodeset="/root/formData/SlabWth/DCommCodeResult_Row">
  319. <label ref="SLAB_WTH_NM"/>
  320. <value ref="SLAB_WTH"/>
  321. </itemset>
  322. </choices>
  323. </select1>
  324. <caption id="ct_04" class="cell" style="left:561px; top:5px; width:80px; height:20px; text-align:center; vertical-align:middle; ">板坯厚度</caption>
  325. <caption id="ct_05" class="cell" style="left:748px; top:5px; width:54px; height:20px; text-align:center; vertical-align:middle; ">订单号</caption>
  326. <caption id="caption2" style="left:881px; top:8px; width:20px; height:20px; text-align:center; vertical-align:bottom; ">~</caption>
  327. <line id="line_01" visibility="visible" style="x1:980px; y1:30px; x2:0px; y2:30px; border-color:#ff0000; "/>
  328. <datagrid id="dg1" nodeset="/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row" backcoloralternate="#f7f9f9" caption="选择^板坯号^厂内牌号^厂内牌号组^是否质量设计^钢卷^钢卷^板坯^板坯^板坯^热装区分^中厚板特殊要求^组合区分^交货期|选择^板坯号^厂内牌号^厂内牌号组^是否质量设计^宽度^厚度^宽度^长度^重量^热装区分^中厚板特殊要求^组合区分^交货期" colsep="^" colwidth="52, 78, 56, 36, 39, 7, 10, 43, 43, 43, 51, 63, 51, 66, 0, 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" defaultrows="30" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="byrow" style="left:0px; top:65px; width:527px; height:555px; border-style:solid; border-right-style:sunken; ">
  329. <col checkvalue="Y,N" ref="CHK" type="checkbox" style="text-align:left; "/>
  330. <col ref="DSN_SLAB_NO" style="text-align:left; "/>
  331. <col ref="FAC_STL_GRD" style="text-align:left; "/>
  332. <col ref="FAC_STL_GRP" style="text-align:left; "/>
  333. <col ref="IS_ZLSJ" style="text-align:center; "/>
  334. <col ref="COIL_WTH" visibility="hidden" style="text-align:right; "/>
  335. <col ref="COIL_THK" visibility="hidden" style="text-align:right; "/>
  336. <col ref="SLAB_WTH" style="text-align:right; "/>
  337. <col ref="SLAB_LEN" format="#,###" style="text-align:right; "/>
  338. <col ref="SLAB_WGT" format="#,###" style="text-align:right; "/>
  339. <col ref="HCR_YN"/>
  340. <col ref="SPEC_REQ_DESC"/>
  341. <col ref="COMB_YN"/>
  342. <col ref="ORD_DEVLMT_DATE" type="output" visibility="hidden" format="yyyy-mm-dd" style="text-align:left; "/>
  343. <col ref="DSN_SLAB_NO" visibility="hidden"/>
  344. <col ref="P_DSN_SLAB_NO" visibility="hidden"/>
  345. <col ref="EMGMTR_YN" visibility="hidden"/>
  346. <col ref="PROC_PATH" visibility="hidden"/>
  347. <col ref="SLAB_THK" visibility="hidden"/>
  348. <col ref="SCARFING_PROC_YN" visibility="hidden"/>
  349. <col ref="SPM_PROC_YN" visibility="hidden"/>
  350. <col ref="COIL_LEN" visibility="hidden"/>
  351. <col ref="COIL_WGT" visibility="hidden"/>
  352. <col ref="SLAB_TRMTH_TP" visibility="hidden"/>
  353. <col ref="LEVEL" visibility="hidden"/>
  354. <col ref="GRAVITY" visibility="hidden"/>
  355. <col ref="COIL_INDIA" visibility="hidden"/>
  356. <col ref="LEVEL" visibility="hidden"/>
  357. <col ref="COIL_OUTDIA" visibility="hidden"/>
  358. <col ref="AUTODSN_YN" visibility="hidden"/>
  359. <script type="javascript" ev:event="xforms-value-changed">
  360. <![CDATA[
  361. /*var vRefPDsnSlabNo = dg1.colRef("P_DSN_SLAB_NO");
  362. var vPDsnSlabNo = dg1.valueMatrix(dg1.row, vRefPDsnSlabNo);
  363. //alert( "P_DSN_SLAB_NO => ["+ vPDsnSlabNo + "]" );
  364. if( vPDsnSlabNo != "" )
  365. {
  366. dg1.valueMatrix(dg1.row, vRefChk) = model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[DSN_SLAB_NO = "+ vPDsnSlabNo +"]/CHK");
  367. }
  368. else
  369. {
  370. var vRefDsnSlabNo = dg1.colRef("DSN_SLAB_NO");
  371. var vDsnSlabNo = dg1.valueMatrix(dg1.row, vRefDsnSlabNo);
  372. var vCnt = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row[P_DSN_SLAB_NO = "+ vDsnSlabNo +"])");
  373. if( vCnt != 0 )
  374. {
  375. var vRefChk = dg1.colRef("CHK");
  376. var vChk = dg1.valueMatrix(dg1.row, vRefChk);
  377. var vMatchCnt = 0;
  378. var vRefPDsnSlabNo = dg1.colRef("P_DSN_SLAB_NO");
  379. for( var i = dg1.row; i < dg1.rows; i++ )
  380. {
  381. if( dg1.valueMatrix(i, vRefPDsnSlabNo) == vDsnSlabNo )
  382. {
  383. vMatchCnt++;
  384. dg1.valueMatrix(i, vRefChk) = vChk;
  385. if( vChk == 'Y' )
  386. dg1.addStatus(i, "update");
  387. else dg1.removeStatus(i,"");
  388. }
  389. if( vMatchCnt >= vCnt )
  390. {
  391. break;
  392. }
  393. }
  394. dg1.refresh();
  395. }
  396. }
  397. var selectRow = dg1.row;*/
  398. calculateSummary();
  399. caption1.refresh();
  400. caption7.refresh();
  401. ]]>
  402. </script>
  403. </datagrid>
  404. <button id="button2" style="left:450px; top:35px; width:75px; height:20px; font-weight:bold; text-align:right; vertical-align:middle; background-image:../../images/find.gif; border-color:#ffffff; border-style:solid; ">
  405. <caption>板坯选定</caption>
  406. <script type="javascript" ev:event="DOMActivate">
  407. <![CDATA[
  408. model.refresh();
  409. // Validate CAST_NO
  410. var vCastSpecSeq = cb_CastSpecSeq.value;
  411. if( vCastSpecSeq == "" )
  412. {
  413. model.alert("Please, choice the target cast!!!");
  414. return;
  415. }
  416. // Validate CHAREG_NO
  417. var vCharSpecSeq = "";
  418. var vRowCnt = 0;
  419. for( var i = 1; i < dg2.rows; i++ )
  420. {
  421. if( dg2.valueMatrix( i, dg2.colRef("CHK") ) == 'Y' )
  422. {
  423. vRowCnt++;
  424. vCharSpecSeq = dg2.valueMatrix( i, dg2.colRef("MAT_SPEC_SEQ") );
  425. }
  426. }
  427. if( vRowCnt == 0 )
  428. {
  429. model.alert("Please, choice the target charge!!!");
  430. return;
  431. }
  432. // Validate Resourced-SLAB_NO
  433. var vUpdatedArr = dg1.getUpdateData("update").split('|');
  434. vRowCnt = vUpdatedArr.length - 2; // Excepting 2 rows (One is Column's Ref, another one is Last-splited(Space)
  435. if( vRowCnt == 0 )
  436. {
  437. model.alert("Please, choice the slab to move!!!");
  438. return;
  439. }
  440. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  441. var idx = 0;
  442. var vRefChk = dg1.colRef("CHK");
  443. var vLevel = 0;
  444. //add by wangli -----------------------------------***************************
  445. 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)");
  446. if( vLastMatSpecSeq == "NaN" )
  447. {
  448. vLastMatSpecSeq = "000";
  449. }
  450. else
  451. {
  452. vLastMatSpecSeq = String(vLastMatSpecSeq).substring(Number(String(vLastMatSpecSeq).length)-4,Number(String(vLastMatSpecSeq).length));
  453. //alert("vLastMatSpecSeq="+vLastMatSpecSeq);
  454. }
  455. //alert(vLastMatSpecSeq);
  456. var k = 1;
  457. var g = 1;
  458. //add by wangli -----------------------------------**********************
  459. var seqCount = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = /root/formData/matSpecSeq])");
  460. var h = 0;
  461. // alert("vRowCnt="+vRowCnt);
  462. /****----------------------------- update at 2009-04-01--------------------------------****/
  463. var slabCount2 = model.getXPathValue("count(/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row)");
  464. var m = 0;
  465. for(var i = 1; i <= slabCount2; i++)
  466. {
  467. var chk = model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/CHK");
  468. if(chk == 'Y')
  469. {
  470. var lel2 = Number(model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/LEVEL"))+2;
  471. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LEVEL" , lel2 );
  472. var iNextMatSeq = (m+1) + Number(vLastMatSpecSeq);
  473. m++;
  474. iNextMatSeq = iNextMatSeq+"";
  475. for(var j = iNextMatSeq.length; j < 4; j++)
  476. {
  477. iNextMatSeq = "0" + iNextMatSeq;
  478. }
  479. iNextMatSeq = vCharSpecSeq + iNextMatSeq;
  480. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_SPEC_SEQ" , iNextMatSeq );
  481. if( lel2 == 3 )
  482. {
  483. //等级为3 的上一级单位号码赋炉次号
  484. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , vCharSpecSeq );
  485. if(model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COMB_YN") == 'Y')
  486. {
  487. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "2" );
  488. }
  489. else
  490. {
  491. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "0" );
  492. }
  493. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , g+Number(seqCount));
  494. g++;
  495. }
  496. else
  497. {
  498. //等级为4 的上一级单位号码赋母板坯号
  499. var slab_sum_no = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq and DSN_SLAB_NO="+model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/P_DSN_SLAB_NO")+"]/MAT_SPEC_SEQ");
  500. //alert("slab_sum_no="+ slab_sum_no);
  501. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , slab_sum_no);
  502. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "0" );
  503. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , k);
  504. k++;
  505. if(k >= 3)
  506. {
  507. k = 1;
  508. }
  509. }
  510. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_TP" , "0" + lel2 );
  511. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EXP_MAT_NO" , "" );
  512. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRD" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/FAC_STL_GRD" ) );
  513. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRP" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/FAC_STL_GRP" ) );
  514. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_RT" , (model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/DSN_SLAB_NO" )).substring(0,1) );
  515. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/TREAT_RT_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("TREAT_RT_CD" ))
  516. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PATH_PROC_CD" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/PROC_PATH" ) ); //dg1.valueMatrix( idx, dg1.colRef("PATH_PROC_CD" ))
  517. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LINE_PROC_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("LINE_PROC_CD" ))
  518. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_THK" ,model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SLAB_THK" ) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_THK" ))
  519. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WTH" ,model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SLAB_WTH" ) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_WTH" ))
  520. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN" ,model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SLAB_LEN" ) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN" ))
  521. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MIN" , "" ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN_MIN" ))
  522. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MAX" , "" ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN_MAX" ))
  523. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WGT" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SLAB_WGT" ) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_WGT" ))
  524. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_TERM_TIME" , "" ); //dg1.valueMatrix( idx, dg1.colRef("CCM_TERM_TIME" ))
  525. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WID_CHG_FL" , "" ); //dg1.valueMatrix( idx, dg1.colRef("WID_CHG_FL" ))
  526. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/HCR_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/HCR_YN" ) );
  527. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EMGMTR_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/EMGMTR_YN" ) ); //dg1.valueMatrix( idx, dg1.colRef("EMGMTR_YN" ))
  528. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SMS_DUEDATE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SMS_DUEDATE" ))
  529. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PRC_LINE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("PRC_LINE" ))
  530. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_PRC_LINE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("CCM_PRC_LINE" ))
  531. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PROG_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("PROG_CD" ))
  532. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SLAB_CUT_SEQ" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SLAB_CUT_SEQ" ))
  533. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSG_RATE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("DSG_RATE" ))
  534. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/OVER_ROLL_YN" , "N" ); //dg1.valueMatrix( idx, dg1.colRef("OVER_ROLL_YN" ))
  535. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SAMPLE_CUT" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SAMPLE_CUT" ))
  536. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_FL" , "2" ); //dg1.valueMatrix( idx, dg1.colRef("ORD_FL" ))
  537. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_NO" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/ORD_NO" ) );
  538. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_SEQ" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/ORD_SEQ" ) );
  539. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DELV_REQ_DATE" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/ORD_DEVLMT_DATE" ) );
  540. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPM_PROC_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SPM_PROC_YN" ) ); //dg1.valueMatrix( idx, dg1.colRef("SPM_PROC_YN" ))
  541. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SCARPING_PROC_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SCARFING_PROC_YN" ) ); //dg1.valueMatrix( idx, dg1.colRef("SCARPING_PROC_YN" ))
  542. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SEND_STS" , "01" ); //dg1.valueMatrix( idx, dg1.colRef("SEND_STS" ))
  543. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COMB_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COMB_YN" ) );
  544. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_THK" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_THK" ) );
  545. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WTH" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_WTH" ) );
  546. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_LEN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_LEN" ) );
  547. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WGT" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_WGT" ) );
  548. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CHK" , "false" );
  549. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/DSN_SLAB_NO" ) );
  550. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/P_DSN_SLAB_NO" ) );
  551. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/GRAVITY" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/GRAVITY" ) );
  552. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_INDIA" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_INDIA" ) );
  553. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_OUTDIA" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/COIL_OUTDIA" ) );
  554. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/AUTODSN_YN" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/AUTODSN_YN" ) );
  555. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPEC_REQ_DESC" , model.getValue("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]/SPEC_REQ_DESC" ) );
  556. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/KEEPWARM_YN" , 'N' );
  557. vTargetRow++;
  558. model.removenode("/root/SlabDnRst/ListResult_0_VO/ListResult_0_Row["+i+"]");
  559. i--;
  560. }
  561. }
  562. /****----------------------------- update at 2009-04-01--------------------------------****/
  563. /***<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  564. for( var i = 0; i < vRowCnt; i++ )
  565. {
  566. //获取选择板坯的行号ROW NUMBER
  567. idx = Number( vUpdatedArr[h + 1].split('^')[1] ); // Extracting rowNum from vUpdatedArr[i + 1]
  568. if( dg1.valueMatrix(idx, vRefChk) == 'Y' )
  569. {
  570. //浇次等级: 1
  571. //炉次等级: 2
  572. //板坯: 3
  573. //被组合板坯:4
  574. vLevel = Number(dg1.valueMatrix(idx, dg1.colRef("LEVEL"))) + 2;//级数加2,以保证其符合炉次浇次的级数
  575. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LEVEL" , vLevel );
  576. //**********************************************
  577. var iNextMatSeq = (i+1) + Number(vLastMatSpecSeq);
  578. iNextMatSeq = iNextMatSeq + "";
  579. for(var j = iNextMatSeq.length; j < 4; j++)
  580. {
  581. iNextMatSeq = "0" + iNextMatSeq;
  582. }
  583. iNextMatSeq = vCharSpecSeq + iNextMatSeq;
  584. //**********************************************
  585. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_SPEC_SEQ" , iNextMatSeq );
  586. // model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , dg1.valueMatrix( idx, dg1.colRef("PMAT_SPEC_SEQ" )) );
  587. if( vLevel == 3 )
  588. {
  589. //等级为3 的上一级单位号码赋炉次号
  590. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , vCharSpecSeq );
  591. if(dg1.valueMatrix( idx, dg1.colRef("COMB_YN")) == 'Y')
  592. {
  593. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "2" );
  594. }
  595. else
  596. {
  597. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "0" );
  598. }
  599. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , g+Number(seqCount));
  600. g++;
  601. }
  602. else
  603. {
  604. //等级为4 的上一级单位号码赋母板坯号
  605. var slab_sum_no = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq and DSN_SLAB_NO="+dg1.valueMatrix( idx, dg1.colRef("P_DSN_SLAB_NO"))+"]/MAT_SPEC_SEQ");
  606. //alert("slab_sum_no="+ slab_sum_no);
  607. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , slab_sum_no);
  608. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CMAT_CNT" , "0" );
  609. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , k);
  610. k++;
  611. if(k >= 3)
  612. {
  613. k = 1;
  614. }
  615. }
  616. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_TP" , "0" + vLevel );
  617. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EXP_MAT_NO" , "" );
  618. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRD" , dg1.valueMatrix( idx, dg1.colRef("FAC_STL_GRD" )) );
  619. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/FAC_STL_GRP" , dg1.valueMatrix( idx, dg1.colRef("FAC_STL_GRP" )) );
  620. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_RT" , (dg1.valueMatrix( idx, dg1.colRef("DSN_SLAB_NO" ))).substring(0,1) );
  621. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/TREAT_RT_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("TREAT_RT_CD" ))
  622. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PATH_PROC_CD" , dg1.valueMatrix( idx, dg1.colRef("PROC_PATH" )) ); //dg1.valueMatrix( idx, dg1.colRef("PATH_PROC_CD" ))
  623. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LINE_PROC_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("LINE_PROC_CD" ))
  624. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_THK" , dg1.valueMatrix( idx, dg1.colRef("SLAB_THK" )) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_THK" ))
  625. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WTH" , dg1.valueMatrix( idx, dg1.colRef("SLAB_WTH" )) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_WTH" ))
  626. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN" , dg1.valueMatrix( idx, dg1.colRef("SLAB_LEN" )) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN" ))
  627. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MIN" , "" ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN_MIN" ))
  628. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_LEN_MAX" , "" ); //dg1.valueMatrix( idx, dg1.colRef("MAT_LEN_MAX" ))
  629. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_WGT" , dg1.valueMatrix( idx, dg1.colRef("SLAB_WGT" )) ); //dg1.valueMatrix( idx, dg1.colRef("MAT_WGT" ))
  630. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_TERM_TIME" , "" ); //dg1.valueMatrix( idx, dg1.colRef("CCM_TERM_TIME" ))
  631. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WID_CHG_FL" , "" ); //dg1.valueMatrix( idx, dg1.colRef("WID_CHG_FL" ))
  632. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/HCR_YN" , dg1.valueMatrix( idx, dg1.colRef("HCR_YN" )) );
  633. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/EMGMTR_YN" , dg1.valueMatrix( idx, dg1.colRef("EMGMTR_YN" )) ); //dg1.valueMatrix( idx, dg1.colRef("EMGMTR_YN" ))
  634. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SMS_DUEDATE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SMS_DUEDATE" ))
  635. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PRC_LINE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("PRC_LINE" ))
  636. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CCM_PRC_LINE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("CCM_PRC_LINE" ))
  637. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PROG_CD" , "" ); //dg1.valueMatrix( idx, dg1.colRef("PROG_CD" ))
  638. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SLAB_CUT_SEQ" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SLAB_CUT_SEQ" ))
  639. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSG_RATE" , "" ); //dg1.valueMatrix( idx, dg1.colRef("DSG_RATE" ))
  640. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/OVER_ROLL_YN" , "N" ); //dg1.valueMatrix( idx, dg1.colRef("OVER_ROLL_YN" ))
  641. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SAMPLE_CUT" , "" ); //dg1.valueMatrix( idx, dg1.colRef("SAMPLE_CUT" ))
  642. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_FL" , "2" ); //dg1.valueMatrix( idx, dg1.colRef("ORD_FL" ))
  643. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_NO" , dg1.valueMatrix( idx, dg1.colRef("ORD_NO" )) );
  644. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/ORD_SEQ" , dg1.valueMatrix( idx, dg1.colRef("ORD_SEQ" )) );
  645. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DELV_REQ_DATE" , dg1.valueMatrix( idx, dg1.colRef("ORD_DEVLMT_DATE" )) );
  646. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPM_PROC_YN" , dg1.valueMatrix( idx, dg1.colRef("SPM_PROC_YN" )) ); //dg1.valueMatrix( idx, dg1.colRef("SPM_PROC_YN" ))
  647. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SCARPING_PROC_YN" , dg1.valueMatrix( idx, dg1.colRef("SCARFING_PROC_YN" )) ); //dg1.valueMatrix( idx, dg1.colRef("SCARPING_PROC_YN" ))
  648. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SEND_STS" , "01" ); //dg1.valueMatrix( idx, dg1.colRef("SEND_STS" ))
  649. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COMB_YN" , dg1.valueMatrix( idx, dg1.colRef("COMB_YN" )) );
  650. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_THK" , dg1.valueMatrix( idx, dg1.colRef("COIL_THK" )) );
  651. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WTH" , dg1.valueMatrix( idx, dg1.colRef("COIL_WTH" )) );
  652. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_LEN" , dg1.valueMatrix( idx, dg1.colRef("COIL_LEN" )) );
  653. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_WGT" , dg1.valueMatrix( idx, dg1.colRef("COIL_WGT" )) );
  654. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CHK" , "false" );
  655. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , dg1.valueMatrix( idx, dg1.colRef("DSN_SLAB_NO" )) );
  656. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , dg1.valueMatrix( idx, dg1.colRef("P_DSN_SLAB_NO" )) );
  657. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/GRAVITY" , dg1.valueMatrix( idx, dg1.colRef("GRAVITY" )) );
  658. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_INDIA" , dg1.valueMatrix( idx, dg1.colRef("COIL_INDIA" )) );
  659. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/COIL_OUTDIA" , dg1.valueMatrix( idx, dg1.colRef("COIL_OUTDIA" )) );
  660. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/AUTODSN_YN" , dg1.valueMatrix( idx, dg1.colRef("AUTODSN_YN" )) );
  661. vTargetRow++;
  662. //dg1.addStatus(idx, "delete");
  663. //dg1.rowHidden(idx) = true;
  664. dg1.deleteRow(idx, false);
  665. //idx = idx - 1;
  666. }
  667. else
  668. {
  669. h++;
  670. }<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<****/
  671. calculateSummary();
  672. chageSelect();
  673. model.refresh();
  674. ]]>
  675. </script>
  676. </button>
  677. <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" mergecellsfixedrows="bycolrec" rowsep="|" style="left:532px; top:65px; width:448px; height:180px; text-align:center; ">
  678. <col checkvalue="Y,N" ref="CHK" type="radio"/>
  679. <col ref="PMAT_SPEC_SEQ"/>
  680. <col ref="MAT_SPEC_SEQ"/>
  681. <col ref="FAC_STL_GRD"/>
  682. <col ref="CMAT_CNT" format="#,###" style="text-align:right; "/>
  683. <col ref="MAT_WGT" format="#,###" style="text-align:right; "/>
  684. <script type="javascript" ev:event="onrowchanged">
  685. <![CDATA[
  686. model.setValue("/root/formData/matSpecSeq", dg2.valueMatrix(dg2.row, dg2.colRef("MAT_SPEC_SEQ")));
  687. dg3.rebuild();
  688. if (dg2_currRow != -1)
  689. {
  690. dg2.valueMatrix(dg2_currRow, dg2.colRef("CHK") ) = "N";
  691. }
  692. dg2_currRow = dg2.row;
  693. dg2.valueMatrix(dg2_currRow, dg2.colRef("CHK") ) = "Y";
  694. 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)"));
  695. caption9.refresh();
  696. model.refresh();
  697. ]]>
  698. </script>
  699. </datagrid>
  700. <datagrid id="dg3" nodeset="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[LEVEL = 3 and PMAT_SPEC_SEQ=/root/formData/matSpecSeq]" scroll="auto" backcoloralternate="#f7f9f9" caption="选择^管理板坯号^牌号^钢卷^钢卷^板坯^板坯^板坯^热装区分^计划余材^caption1|选择^管理板坯号^牌号^宽度^厚度^宽度^长度^重量^热装区分^计划余材^caption1" colsep="^" colwidth="40, 78, 50, 7, 9, 63, 62, 70, 36, 32, 100" defaultrows="20" explorerbar="sort" mergecellsfixedrows="bycolrec" rowsep="|" style="left:532px; top:280px; width:448px; height:340px; ">
  701. <col ref="CHK" type="checkbox">
  702. <script type="javascript" ev:event="xforms-value-changed">
  703. <![CDATA[
  704. /*var selectRow = dg3.row;
  705. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  706. for(var i = 1; i<=count; i++)
  707. {
  708. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  709. var PMAT_SPEC_SEQ = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ");
  710. if(CHK == "true" && PMAT_SPEC_SEQ == model.getValue("/root/formData/matSpecSeq"))
  711. {
  712. var MAT_SPEC_SEQ1 = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ");
  713. for(var j = 1; j<=count; j++)
  714. {
  715. var MAT_SPEC_SEQ2 = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]/MAT_SPEC_SEQ");
  716. if(MAT_SPEC_SEQ2 > MAT_SPEC_SEQ1)
  717. {
  718. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]/CHK", "true");
  719. }
  720. }
  721. }
  722. }
  723. model.refresh();*/
  724. ]]>
  725. </script>
  726. </col>
  727. <col ref="MAT_SPEC_SEQ" style="text-align:left; padding-left:2; "/>
  728. <col ref="FAC_STL_GRD" style="text-align:left; padding-left:2; "/>
  729. <col ref="COIL_WTH" visibility="hidden"/>
  730. <col ref="COIL_THK" visibility="hidden"/>
  731. <col ref="MAT_WTH" format="#,###" style="text-align:right; "/>
  732. <col ref="MAT_LEN" type="input" format="#,###" style="text-align:right; background-color:#ffff99; "/>
  733. <col ref="MAT_WGT" type="output" format="#,###" style="text-align:right; "/>
  734. <col ref="HCR_YN"/>
  735. <col ref="ORD_FL"/>
  736. <col ref="PMAT_SPEC_SEQ" visibility="hidden"/>
  737. <col ref="MAT_THK" visibility="hidden"/>
  738. <col ref="GRAVITY" visibility="hidden"/>
  739. <script type="javascript" ev:event="xforms-value-changed">
  740. <![CDATA[
  741. var iGravity = Number(dg3.valueMatrix(dg3.row,dg3.colRef("GRAVITY")));
  742. var iSlabThk = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_THK")));
  743. var iSlabWth = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_WTH")));
  744. var iSlabLen = Number(dg3.valueMatrix(dg3.row,dg3.colRef("MAT_LEN")));
  745. var iSlabWgt = Math.ceil( (iSlabLen * iSlabWth * iSlabThk * iGravity * 1000) / 1000000000 );
  746. dg3.valueMatrix(dg3.row,dg3.colRef("MAT_WGT")) = iSlabWgt;
  747. calculateSummary();
  748. chageSelect();
  749. model.refresh();
  750. ]]>
  751. </script>
  752. </datagrid>
  753. <button id="bt_AddRestSlab" style="left:755px; top:250px; 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; ">
  754. <caption>余材添加</caption>
  755. <script type="javascript" ev:event="DOMActivate">
  756. <![CDATA[
  757. if( dg3.rows <= dg3.fixedRows ) {
  758. return;
  759. }
  760. var vLastMatSpecSeq = dg3.valueMatrix(dg3.rows - 1, dg3.colRef("MAT_SPEC_SEQ"));
  761. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  762. var iNextMatSeq = sChgSpecSeq + lpad(Number(vLastMatSpecSeq.substring(5)) + 1, 4, '0');
  763. /*var vLastMatSpecSeq = dg3.valueMatrix( dg3.rows - 1, dg3.colRef("MAT_SPEC_SEQ") );
  764. //var iNextMatSeq = 1 + Number(model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03']/MAT_SPEC_SEQ)"));
  765. var iNextMatSeq = 0;
  766. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  767. //var count = model.getXPathValue("max(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP >= '03' and substring(MAT_SPEC_SEQ,5,4))])");
  768. 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)");
  769. //alert("maxValue="+maxValue);
  770. //maxValue = substring(maxValue,5,4);
  771. if(maxValue != "NaN")
  772. {
  773. maxValue = Number(String(maxValue).substring(String(maxValue).length-4,String(maxValue).length)) + 1;
  774. iNextMatSeq = sChgSpecSeq + lpad(maxValue, 4, '0');
  775. // for(var i = 1; i <= count; i++)
  776. // {
  777. // if(i<9)
  778. // {
  779. // iNextMatSeq = sChgSpecSeq + "000" + (Number(i)+1);
  780. // }
  781. // else if(i>=9 && i<99)
  782. // {
  783. // iNextMatSeq = sChgSpecSeq +"00"+ (Number(i)+1);
  784. // }
  785. // else
  786. // {
  787. // iNextMatSeq = sChgSpecSeq +"0"+ (Number(i)+1);
  788. // }
  789. // }
  790. //iNextMatSeq = iNextMatSeq + "";
  791. //for(i = iNextMatSeq.length; i < 8; i++)
  792. //{
  793. // iNextMatSeq = "0" + iNextMatSeq;
  794. //}
  795. //model.alert( "iNextMatSeq = ["+ iNextMatSeq +"]" );
  796. */
  797. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  798. 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" ) );
  799. 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" )
  800. 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" ) );
  801. 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" ) );
  802. 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" ) );
  803. 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 );
  804. 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" ) );
  805. 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" ) );
  806. 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" ) );
  807. 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" ) );
  808. 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" ) );
  809. 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" ) );
  810. 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" ) );
  811. 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" ) );
  812. 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" ) );
  813. 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" ) );
  814. 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" ) );
  815. 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" ) );
  816. 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" ) );
  817. 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" ) );
  818. 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" ) );
  819. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/HCR_YN" , "C" ); //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/HCR_YN" )
  820. 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" ) );
  821. 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" ) );
  822. 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" ) );
  823. 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" ) );
  824. 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" ) );
  825. 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" ) );
  826. 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" ) );
  827. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/OVER_ROLL_YN" ,"Y" );
  828. 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" ) );
  829. 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" )
  830. 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" ) );
  831. 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" ) );
  832. 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" ) );
  833. 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" ) );
  834. 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" ) );
  835. 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" ) );
  836. 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" )
  837. 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" ) );
  838. 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" ) );
  839. 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" ) );
  840. 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" ) );
  841. 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" ) );
  842. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , "" );
  843. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , "" );
  844. 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" ) );
  845. 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" ) );
  846. 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" ) );
  847. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPEC_REQ_DESC" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SPEC_REQ_DESC" ) );
  848. 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" ) );
  849. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/KEEPWARM_YN" ,'N' );
  850. 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)"));
  851. //commAddRow(dg3);
  852. chageSelect();
  853. model.refresh();
  854. ]]>
  855. </script>
  856. </button>
  857. <button id="button4" style="left:830px; top:250px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_save.gif; border-color:#ffffff; border-style:solid; ">
  858. <caption>炉次选定</caption>
  859. <script type="javascript" ev:event="DOMActivate">
  860. <![CDATA[
  861. var sChgSpecSeq = dg2.valueMatrix( dg2.row, dg2.colRef("MAT_SPEC_SEQ") );
  862. if(sChgSpecSeq == "")
  863. {
  864. window.alert("请选择炉次!","提示信息");
  865. return;
  866. }
  867. var sFacStlGrd = dg3.valueMatrix( 2, dg3.colRef("FAC_STL_GRD" ) );
  868. var iSlabRows = Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"])" ));
  869. var iChgWeights = Number(model.getXPathValue("sum (/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[PMAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT)"));
  870. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/FAC_STL_GRD", sFacStlGrd );
  871. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/CMAT_CNT" , iSlabRows );
  872. model.setValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ sChgSpecSeq +"]/MAT_WGT" , iChgWeights );
  873. 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") );
  874. 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") );
  875. 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") );
  876. 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") );
  877. 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") );
  878. model.refresh();
  879. ]]>
  880. </script>
  881. </button>
  882. <button id="button5" style="left:905px; top:250px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_delete.gif; border-color:#ffffff; border-style:solid; ">
  883. <caption>板坯删除</caption>
  884. <script type="javascript" ev:event="onclick">
  885. <![CDATA[
  886. model.removenode("/root/gridData/sendInfo");
  887. model.makeNode("/root/gridData/sendInfo");
  888. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  889. var j = 0;
  890. for(var i = 1; i<=count; i++)
  891. {
  892. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  893. //var MAT_TP = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_TP");
  894. //var PMAT_SPEC_SEQ = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ");
  895. //alert("CHK=" + CHK);
  896. //if(PMAT_SPEC_SEQ == model.getValue("/root/formData/matSpecSeq"))
  897. if(CHK == "true")
  898. {
  899. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  900. j++;
  901. //model.removenode("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+j+"]");
  902. }
  903. }
  904. if(j == 0)
  905. {
  906. window.alert("请选择需要删除的板坯","提示信息");
  907. return;
  908. }
  909. if(commComfirmBox(" 确认删除该炉次中的板坯? "," 提示信息 ")=='0') return;
  910. commSendReq("/root/gridData/sendInfo");
  911. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  912. find();
  913. calculateSummary();
  914. chageSelect();
  915. save();
  916. model.refresh();
  917. ]]>
  918. </script>
  919. </button>
  920. <line id="line2" style="x1:530px; y1:275px; x2:980px; y2:275px; border-color:#ff0000; "/>
  921. <caption id="caption3" style="left:530px; top:255px; width:60px; height:22px; font-family:Tahoma; font-weight:bold; vertical-align:middle; ">炉次编制</caption>
  922. <caption id="caption4" style="left:535px; top:40px; width:60px; height:20px; font-family:Tahoma; font-weight:bold; vertical-align:middle; ">浇次编制</caption>
  923. <caption id="caption5" style="left:0px; top:40px; width:85px; height:21px; font-family:Tahoma; font-weight:bold; vertical-align:middle; ">选定对象板坯</caption>
  924. <line id="line3" visibility="visible" style="x1:980px; y1:60px; x2:0px; y2:60px; border-color:#ff0000; "/>
  925. <button id="bt_AddCharge" style="left:830px; top:35px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_create.gif; border-color:#ffffff; border-style:solid; ">
  926. <caption>添加炉次</caption>
  927. <script type="javascript" ev:event="DOMActivate">
  928. <![CDATA[
  929. // Validate CAST_NO
  930. var vCastSpecSeq = cb_CastSpecSeq.value;
  931. if( vCastSpecSeq == "" )
  932. {
  933. model.alert("Please, choice the target cast!!!");
  934. return;
  935. }
  936. //model.alert("===> ["+ model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '02'])") +"]");
  937. 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)");
  938. //alert("..............vLastMatSpecSeq="+vLastMatSpecSeq);
  939. //var iNextMatSeq = 1 + Number(vLastMatSpecSeq);
  940. //(iNextMatSeq + "").substring(
  941. //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");
  942. //vLastMatSpecSeq = vLastMatSpecSeq.substring(3);
  943. //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)");
  944. //var vLastMatSpecSeq = dg2.valueMatrix( dg2.rows - 1, dg2.colRef("MAT_SPEC_SEQ") );
  945. //model.alert("vLastMatSpecSeq = ["+ vLastMatSpecSeq +"]");
  946. if( vLastMatSpecSeq == "NaN" )
  947. {
  948. vLastMatSpecSeq = "00";
  949. }
  950. else
  951. {
  952. vLastMatSpecSeq = String(vLastMatSpecSeq).substring(Number(String(vLastMatSpecSeq).length)-2,Number(String(vLastMatSpecSeq).length));
  953. }
  954. var iNextMatSeq = 1 + Number(vLastMatSpecSeq);
  955. for(i = String(iNextMatSeq).length; i < 2; i++)
  956. {
  957. iNextMatSeq = "0" + iNextMatSeq;
  958. }
  959. 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;
  960. iNextMatSeq = vCastSpecSeq + iNextMatSeq;
  961. //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)"));
  962. //model.alert( "iNextMatSeq = ["+ iNextMatSeq +"]" );
  963. var vTargetRow = 1 + Number(model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)"));
  964. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/LEVEL" , 2 );
  965. 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" )
  966. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/PMAT_SPEC_SEQ" , vCastSpecSeq );
  967. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/MAT_TP" , "02" );
  968. 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" ) );
  969. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/WITHIN_SUB_SEQ" , CHARGE_SEQ );
  970. 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" ) );
  971. 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" ) );
  972. 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" ) );
  973. 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" ) );
  974. 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" ) );
  975. 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" ) );
  976. 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" ) );
  977. 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" ) );
  978. 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" ) );
  979. 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" ) );
  980. 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" ) );
  981. 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" ) );
  982. 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" ) );
  983. 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" ) );
  984. 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" ) );
  985. 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" ) );
  986. 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" ) );
  987. 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" ) );
  988. 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" ) );
  989. 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" ) );
  990. 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" ) );
  991. 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" ) );
  992. 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" ) );
  993. 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" ) );
  994. 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" ) );
  995. 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" ) );
  996. 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" ) );
  997. 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" ) );
  998. 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" ) );
  999. 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" ) );
  1000. 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" ) );
  1001. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SEND_STS" , "01" );
  1002. 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" ) );
  1003. 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" ) );
  1004. 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" ) );
  1005. 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" ) );
  1006. 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" ) );
  1007. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/SPEC_REQ_DESC" , model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_SPEC_SEQ = "+ vLastMatSpecSeq +"]/SPEC_REQ_DESC" ) );
  1008. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/CHK" , "N" );
  1009. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/DSN_SLAB_NO" , "" );
  1010. model.makeValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+ vTargetRow +"]/P_DSN_SLAB_NO" , "" );
  1011. 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" ) );
  1012. 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" ) );
  1013. 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" ));
  1014. 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" ));
  1015. model.refresh();
  1016. dg2.rebuild();
  1017. dg2.topRow = dg2.row;
  1018. ]]>
  1019. </script>
  1020. </button>
  1021. <button id="button8" style="left:905px; top:35px; width:75px; height:20px; font-weight:bold; text-align:right; background-image:../../images/btn_delete.gif; border-color:#ffffff; border-style:solid; ">
  1022. <caption>删除炉次</caption>
  1023. <script type="javascript" ev:event="onclick">
  1024. <![CDATA[
  1025. model.removenode("/root/gridData/sendInfo");
  1026. model.makeNode("/root/gridData/sendInfo");
  1027. var count = model.getXPathValue("count(/root/MatDnRst/ListResult_1_VO/ListResult_1_Row)");
  1028. var j = 0;
  1029. //var flag = "true";
  1030. for(var i = 1; i<=count; i++)
  1031. {
  1032. var CHK = model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/CHK");
  1033. if(CHK == "Y")
  1034. {
  1035. //model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/MAT_SPEC_SEQ");
  1036. model.duplicate("/root/gridData/sendInfo","/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]");
  1037. j++;
  1038. }
  1039. //if(model.getValue("/root/formData/matSpecSeq") == model.getValue("/root/MatDnRst/ListResult_1_VO/ListResult_1_Row["+i+"]/PMAT_SPEC_SEQ"))
  1040. //{
  1041. // window.alert("要删除该炉次,请先删除该炉次中的所有板坯","提示信息");
  1042. // flag = "false";
  1043. // break;
  1044. //}
  1045. }
  1046. //if(flag == "false")
  1047. //{
  1048. // return;
  1049. //}
  1050. if(j == 0)
  1051. {
  1052. window.alert("请选择需要删除的炉次信息","提示信息");
  1053. return;
  1054. }
  1055. if(commComfirmBox(" 确认删除该炉次? "," 提示信息 ")=='0') return;
  1056. commSendReq("/root/gridData/sendInfo");
  1057. commSubmit(submitMainID,"deleteMatDnRst","glueAction.do");
  1058. find();
  1059. calculateSummary();
  1060. model.refresh();
  1061. ]]>
  1062. </script>
  1063. </button>
  1064. <select1 id="cb_CastSpecSeq" ref="/root/formData/castDnRst" appearance="minimal" style="left:645px; top:35px; width:100px; height:20px; ">
  1065. <choices>
  1066. <itemset nodeset="/root/MatDnRst/ListResult_1_VO/ListResult_1_Row[MAT_TP = '01']">
  1067. <label ref="MAT_SPEC_SEQ"/>
  1068. <value ref="MAT_SPEC_SEQ"/>
  1069. </itemset>
  1070. </choices>
  1071. <script type="javascript" ev:event="xforms-select">
  1072. <![CDATA[
  1073. model.setValue("/root/formData/matSpecSeq", "");
  1074. dg2.rebuild();
  1075. dg3.rebuild();
  1076. //dg2.refresh();
  1077. ]]>
  1078. </script>
  1079. </select1>
  1080. <caption id="caption6" class="cell" style="left:83px; top:35px; width:97px; height:20px; text-align:center; vertical-align:middle; ">选定块数:重量</caption>
  1081. <caption id="caption7" ref="/root/slab_count" style="left:185px; top:35px; width:65px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  1082. <caption id="caption8" class="cell" style="left:587px; top:250px; width:64px; height:20px; text-align:center; vertical-align:middle; ">板坯总重量</caption>
  1083. <caption id="caption9" ref="/root/wth_count" format="#,###" style="left:652px; top:250px; width:100px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  1084. <select1 id="cb_CoilThkGrp" ref="/root/formData/SlabThk" appearance="minimal" style="left:643px; top:5px; width:100px; height:20px; ">
  1085. <choices>
  1086. <itemset nodeset="/root/codeData/COMM_CODE_RESULT_VO/COMM_CODE_RESULT_Row[LG_CD='D01002']">
  1087. <label ref="SM_CFNM"/>
  1088. <value ref="SM_CD"/>
  1089. </itemset>
  1090. </choices>
  1091. </select1>
  1092. <line id="line1" visibility="visible" style="x1:980px; y1:0px; x2:0px; y2:0px; border-color:#ff0000; "/>
  1093. <caption id="caption1" ref="/root/slab_wgt_sum" style="left:255px; top:35px; width:114px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  1094. <caption id="caption10" ref="/root/formData/OrdNo" style="left:805px; top:5px; width:80px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  1095. <caption id="caption11" ref="/root/formData/OrdSeq" style="left:898px; top:4px; width:72px; height:20px; text-align:right; border-color:#000000; border-style:solid; "/>
  1096. </xhtml:body>
  1097. </xhtml:html>