fa090eec698c8fbc745894cc91bf14ee1b9f8e32.svn-base 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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>
  6. <![CDATA[进程管理 >> 充当管理 >> HMI充当处理]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <initData>
  12. <searchInfo>
  13. <LG_CD>A01004,A01007,E01010</LG_CD>
  14. </searchInfo>
  15. <Slab>
  16. <Slab_Num_YN/>
  17. <Slab_Num>1</Slab_Num>
  18. <Slab_Wgt_YN/>
  19. <Slab_Wgt/>
  20. </Slab>
  21. </initData>
  22. <codeData/>
  23. <formData>
  24. <searchInfo>
  25. <MAT_TP>TM</MAT_TP>
  26. <STL_GRD/>
  27. <LOC/>
  28. <MAT_NO_M/>
  29. <WOO_RSN/>
  30. <ORD_THK_MIN>0</ORD_THK_MIN>
  31. <ORD_THK_MAX>999.999</ORD_THK_MAX>
  32. <ORD_WTH_MIN>0</ORD_WTH_MIN>
  33. <ORD_WTH_MAX>99999.9</ORD_WTH_MAX>
  34. </searchInfo>
  35. <searchInfo2>
  36. <MAT_NO/>
  37. <NIB028720>Y</NIB028720>
  38. <NIB028750>Y</NIB028750>
  39. <PROC_RATE/>
  40. <NIB028700>Y</NIB028700>
  41. </searchInfo2>
  42. </formData>
  43. <gridData>
  44. <REM_WGT/>
  45. </gridData>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. if (window.parent == null) Init();
  51. ]]>
  52. </script>
  53. </model>
  54. <script type="javascript" src="../../js/boaCommon.js"/>
  55. <script type="javascript" src="../../js/boaMsg.js"/>
  56. <script type="javascript" src="../../js/mesCommon.js">
  57. <![CDATA[
  58. submitID = "UIE031030-service";
  59. function Init(node) {
  60. exec("/root/initData/searchInfo", "", "", "/root/codeData/ListResult_0_VO",
  61. "/root/codeData/ListResult_1_VO", "/root/codeData/ListResult_2_VO");
  62. pageInit();
  63. }
  64. function pageInit(refresh) {
  65. model.removenode("/root/reqData");
  66. model.removenode("/root/resData");
  67. model.refresh();
  68. if (typeof refresh == "undefined") {
  69. isReadOnly(datagrid1, "WOO_RSN");
  70. }
  71. var datagrid = datagrid2;
  72. datagrid.rebuild();
  73. var rows = (datagrid.rows < 30) ? datagrid.rows : 30;
  74. for (var i = datagrid.fixedRows + 1; i < 30; i += 2)
  75. datagrid.rowStyle(i, "data", "background-color") = "#F7F9F9";
  76. rows = datagrid.rows;
  77. var colChk = datagrid.colRef("CHK");
  78. for (var i=datagrid.fixedRows; i<rows; i++)
  79. datagrid.valueMatrix(i, colChk) = "false";
  80. datagrid.isReadOnly(0, colChk + 1, datagrid.rows - 1, datagrid.cols - 1) = true;
  81. colStyle(datagrid, "CHK");
  82. }
  83. function find() {
  84. exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  85. model.setValue("/root/formData/searchInfo2/MAT_NO", "");
  86. model.setValue("/root/gridData/REM_WGT", 0);
  87. pageInit();
  88. }
  89. function save() {}
  90. function create() {}
  91. function remove() {}
  92. var cutseq = 1;
  93. var onrowchanged = false;
  94. function rowchanged() {
  95. showProgressBar();
  96. var datagrid = datagrid1;
  97. model.setValue("/root/formData/searchInfo2/MAT_NO", datagrid.valueMatrix(datagrid.row, datagrid.colRef("MAT_NO")));
  98. if (model.getValue("/root/formData/searchInfo2/MAT_NO") != "") {
  99. exec("/root/formData/searchInfo2", "", "onclick", "/root/gridData/ListResult_1_VO");
  100. model.setValue("/root/formData/searchInfo2/PROC_RATE", datagrid.valueMatrix(datagrid.row, datagrid.colRef("PROC_RATE")));
  101. model.setValue("/root/gridData/REM_WGT", datagrid.valueMatrix(datagrid.row, datagrid.colRef("ALLOW_REP_WGT")));
  102. pageInit(false);
  103. cutseq = 1;
  104. refSeq = -1;
  105. }
  106. removeProgressBar();
  107. }
  108. // 指定参照标准
  109. var refThk, refWth, refStl, refSpe, refUse, refSeq = -1;
  110. ]]>
  111. </script>
  112. </xhtml:head>
  113. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  114. <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:80px; ">
  115. <line id="line2" style="x1:0px; y1:73px; x2:980px; y2:73px; "/>
  116. <caption id="caption102" class="cell" style="left:229px; top:5px; width:90px; height:20px; ">钢号</caption>
  117. <select1 id="combo102" ref="STL_GRD" appearance="minimal" style="left:321px; top:5px; width:127px; height:20px; ">
  118. <choices>
  119. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
  120. <label ref="STL_GRD"/>
  121. <value ref="STL_GRD"/>
  122. </itemset>
  123. </choices>
  124. </select1>
  125. <caption id="caption103" class="cell" style="left:458px; top:5px; width:90px; height:20px; ">堆放位置</caption>
  126. <input id="combo103" ref="LOC" appearance="minimal" style="left:550px; top:5px; width:127px; height:20px; "/>
  127. <caption id="caption104" class="cell" style="left:0px; top:27px; width:90px; height:20px; ">物料号</caption>
  128. <input id="input104" ref="MAT_NO_M" maxlength="13" style="left:92px; top:27px; width:127px; height:20px; "/>
  129. <caption id="caption105" class="cell" style="left:229px; top:27px; width:90px; height:20px; ">余材原因</caption>
  130. <select1 id="combo105" ref="WOO_RSN" appearance="minimal" style="left:321px; top:27px; width:127px; height:20px; ">
  131. <choices>
  132. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='E01010' or LG_CD='A']">
  133. <label ref="SM_CFNM"/>
  134. <value ref="SM_CD"/>
  135. </itemset>
  136. </choices>
  137. </select1>
  138. <caption id="caption106" class="cell" style="left:0px; top:49px; width:90px; height:20px; ">厚度</caption>
  139. <input id="input1061" ref="ORD_THK_MIN" maxlength="6" format="#,###.#" style="left:92px; top:49px; width:62px; height:20px; text-align:right; "/>
  140. <input id="input1062" ref="ORD_THK_MAX" maxlength="6" format="#,###.#" style="left:156px; top:49px; width:63px; height:20px; text-align:right; "/>
  141. <caption id="caption107" class="cell" style="left:229px; top:49px; width:90px; height:20px; ">宽度</caption>
  142. <input id="input1071" ref="ORD_WTH_MIN" maxlength="6" format="#,###.#" style="left:321px; top:49px; width:62px; height:20px; text-align:right; "/>
  143. <input id="input1072" ref="ORD_WTH_MAX" maxlength="6" format="#,###.#" style="left:385px; top:49px; width:63px; height:20px; text-align:right; "/>
  144. <button id="button1" class="sw" style="left:880px; top:5px; width:100px; height:20px; ">
  145. <caption>充当处理</caption>
  146. <script type="javascript" ev:event="onclick">
  147. <![CDATA[
  148. // NIE031031
  149. var datagrid = datagrid2;
  150. model.removenode("/root/formData/gridData");
  151. var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
  152. var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
  153. var data = datagrid.getUpdateData("update");
  154. var up_data = data.split(rowSep);
  155. var rows = up_data.length - 1;
  156. for (var i=1; i<rows; i++) {
  157. var vRow = up_data[i].split(colSep);
  158. var Idx = Number(vRow[1]);
  159. model.makeValue("/root/formData/gridData[" + i + "]/ORD_NO", datagrid.valueMatrix(Idx, datagrid.colRef("ORD_NO")));
  160. model.makeValue("/root/formData/gridData[" + i + "]/ORD_SEQ", datagrid.valueMatrix(Idx, datagrid.colRef("ORD_SEQ")));
  161. model.makeValue("/root/formData/gridData[" + i + "]/WGT", datagrid.valueMatrix(Idx, datagrid.colRef("WGT")));
  162. model.makeValue("/root/formData/gridData[" + i + "]/CUT_CNT", datagrid.valueMatrix(Idx, datagrid.colRef("CUT_CNT")));
  163. }
  164. exec("/root/formData", "", "replace", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  165. model.removenode("/root/formData/gridData");
  166. model.setValue("/root/gridData/REM_WGT", "");
  167. datagrid1.row = 0;
  168. pageInit();
  169. ]]>
  170. </script>
  171. </button>
  172. <select1 id="combo101" ref="MAT_TP" appearance="minimal" style="left:92px; top:5px; width:127px; height:20px; ">
  173. <choices>
  174. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004']">
  175. <label ref="SM_CFNM"/>
  176. <value ref="SM_CD"/>
  177. </itemset>
  178. </choices>
  179. </select1>
  180. <caption id="caption101" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">物料类型</caption>
  181. </group>
  182. <datagrid id="datagrid1" nodeset="/root/gridData/ListResult_0_VO/ListResult_0_Row" backcoloralternate="#F7F9F9" caption="物料号^钢号^物料厚度^物料宽度^物料长度^物料重量^物料内径^物料外径^生产日期^余材原因^堆放位置^是否进保温坑^是否采样^最初合同号^最初订单号^PROC_RATE^钢卷流水号" colsep="^" colwidth="100, 150, 80, 80, 80, 80, 80, 80, 100, 100, 100, 45, 40, 80, 45, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="1" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="45" rowsep="|" style="left:0px; top:78px; width:980px; height:210px; ">
  183. <col key="false" ref="DSP_NO"/>
  184. <col key="false" ref="STL_GRD" style="text-align:left; "/>
  185. <col ref="MAT_THK" format="#,###.#" style="text-align:right; "/>
  186. <col ref="MAT_WTH" format="#,###.#" style="text-align:right; "/>
  187. <col ref="MAT_LEN" format="#,###.#" style="text-align:right; "/>
  188. <col ref="MAT_WGT" format="#,###.#" style="text-align:right; "/>
  189. <col ref="COIL_INDIA" format="#,###.#" style="text-align:right; "/>
  190. <col ref="COIL_OUTDIA" format="#,###.#" style="text-align:right; "/>
  191. <col key="false" ref="PROD_DTIME" format="yyyy-mm-dd"/>
  192. <col key="false" ref="WOO_RSN" type="combo" style="text-align:left; ">
  193. <choices>
  194. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='E01010']">
  195. <label ref="SM_CFNM"/>
  196. <value ref="SM_CD"/>
  197. </itemset>
  198. </choices>
  199. </col>
  200. <col key="false" ref="LOC"/>
  201. <col ref="KEEPWARM_YN"/>
  202. <col ref="SAMPL_PICK_YN"/>
  203. <col key="false" ref="ORG_ORD_NO"/>
  204. <col key="false" ref="ORG_ORD_SEQ"/>
  205. <col ref="ALLOW_REP_WGT" visibility="hidden"/>
  206. <col ref="MAT_NO" visibility="hidden"/>
  207. <script type="javascript" ev:event="onclick">
  208. <![CDATA[
  209. if (!onrowchanged) return;
  210. rowchanged();
  211. onrowchanged = false;
  212. ]]>
  213. </script>
  214. <script type="javascript" ev:event="onrowchanged">
  215. <![CDATA[
  216. onrowchanged = true;
  217. ]]>
  218. </script>
  219. <script type="javascript" ev:event="ondblclick">
  220. <![CDATA[
  221. var datagrid = datagrid1;
  222. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  223. ]]>
  224. </script>
  225. </datagrid>
  226. <group id="group2" overflow="hidden" ref="/root/formData/searchInfo2" style="left:0px; top:292px; width:980px; height:35px; ">
  227. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  228. <line id="line4" style="x1:0px; y1:29px; x2:980px; y2:29px; "/>
  229. <select id="checkbox1" ref="NIB028720" overflow="visible" appearance="full" style="left:865px; top:6px; width:55px; height:15px; border-style:none; ">
  230. <choices>
  231. <item>
  232. <label>同成分</label>
  233. <value>Y</value>
  234. </item>
  235. </choices>
  236. <script type="javascript" ev:event="xforms-value-changed">
  237. <![CDATA[
  238. rowchanged();
  239. ]]>
  240. </script>
  241. </select>
  242. <select id="checkbox2" ref="NIB028750" overflow="visible" appearance="full" style="left:924px; top:6px; width:55px; height:15px; border-style:none; ">
  243. <choices>
  244. <item>
  245. <label>同材质</label>
  246. <value>Y</value>
  247. </item>
  248. </choices>
  249. <script type="javascript" ev:event="xforms-value-changed">
  250. <![CDATA[
  251. rowchanged();
  252. ]]>
  253. </script>
  254. </select>
  255. <caption id="caption1" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">剩余充当量</caption>
  256. <output id="output201" ref="/root/gridData/REM_WGT" format="#,###" style="left:92px; top:5px; width:110px; height:20px; text-align:right; border-color:#c0c0c0; border-style:solid; "/>
  257. <select id="checkbox3" ref="/root/initData/Slab/Slab_Num_YN" overflow="visible" appearance="full" style="left:356px; top:6px; width:45px; height:15px; border-style:none; ">
  258. <choices>
  259. <item>
  260. <label>指定</label>
  261. <value>Y</value>
  262. </item>
  263. </choices>
  264. </select>
  265. <caption id="caption2" class="cell" style="left:212px; top:5px; width:90px; height:20px; ">充当块数</caption>
  266. <input id="input1" ref="/root/initData/Slab/Slab_Num" format="#,###" style="left:304px; top:5px; width:50px; height:20px; text-align:right; "/>
  267. <select id="checkbox4" ref="/root/initData/Slab/Slab_Wgt_YN" overflow="visible" appearance="full" style="left:605px; top:6px; width:45px; height:15px; border-style:none; ">
  268. <choices>
  269. <item>
  270. <label>指定</label>
  271. <value>Y</value>
  272. </item>
  273. </choices>
  274. </select>
  275. <caption id="caption3" class="cell" style="left:411px; top:5px; width:90px; height:20px; ">充当单重</caption>
  276. <input id="input2" ref="/root/initData/Slab/Slab_Wgt" format="#,###" style="left:503px; top:5px; width:100px; height:20px; text-align:right; "/>
  277. <select id="checkbox5" ref="NIB028700" overflow="visible" appearance="full" style="left:805px; top:5px; width:55px; height:20px; border-style:none; ">
  278. <choices>
  279. <item>
  280. <label>同牌号</label>
  281. <value>Y</value>
  282. </item>
  283. </choices>
  284. <script type="javascript" ev:event="xforms-value-changed">
  285. <![CDATA[
  286. rowchanged();
  287. ]]>
  288. </script>
  289. </select>
  290. </group>
  291. <datagrid id="datagrid2" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" caption="选取^合同号^订单号^客户^产品^钢号^标准号^订单用途^订单厚度^订单宽度^订单长度^订单内径^订单外径^订单单重下限^订单单重上限^紧急材^交货期结束^设计板坯厚度^设计板坯宽度^设计板坯长度^设计板坯重量^订单重量^交付允许误差最小^交付允许误差最大^充当确定重量^充当重量^充当余量重量^MAT_REP_WGT^CUT_CNT^CUT_SEQ" colsep="^" colwidth="30, 80, 35, 100, 45, 150, 150, 150, 80, 80, 80, 80, 80, 80, 80, 35, 100, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 100, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="3" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="45" rowsep="|" style="left:0px; top:325px; width:980px; height:294px; ">
  292. <col checkvalue="Y,N" key="false" ref="CHK" type="checkbox"/>
  293. <col ref="ORD_NO"/>
  294. <col ref="ORD_SEQ"/>
  295. <col key="false" ref="CUST_CD" style="text-align:left; "/>
  296. <col key="false" ref="PRODNM_CD" type="combo">
  297. <choices>
  298. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004']">
  299. <label ref="SM_CFNM"/>
  300. <value ref="SM_CD"/>
  301. </itemset>
  302. </choices>
  303. </col>
  304. <col key="false" ref="STL_GRD" style="text-align:left; "/>
  305. <col key="false" ref="SPEC_ABBSYM" style="text-align:left; "/>
  306. <col key="false" ref="ORD_USEAGE_CD" type="combo" style="text-align:left; ">
  307. <choices>
  308. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007']">
  309. <label ref="SM_CFNM"/>
  310. <value ref="SM_CD"/>
  311. </itemset>
  312. </choices>
  313. </col>
  314. <col key="false" ref="ORD_THK" format="#,###.#" style="text-align:right; "/>
  315. <col key="false" ref="ORD_WTH" format="#,###.#" style="text-align:right; "/>
  316. <col key="false" ref="ORD_LEN" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  317. <col key="false" ref="ORD_INDIA" visibility="hidden" format="#,###" style="text-align:right; "/>
  318. <col key="false" ref="ORD_OUTDIA" visibility="hidden" format="#,###" style="text-align:right; "/>
  319. <col key="false" ref="ORD_WGT_MIN" format="#,###" style="text-align:right; "/>
  320. <col key="false" ref="ORD_WGT_MAX" format="#,###" style="text-align:right; "/>
  321. <col key="false" ref="EMGMTR_NMG_CLF"/>
  322. <col key="false" ref="DEL_TO_DATE" format="yyyy-mm-dd"/>
  323. <col key="false" ref="DESIGN_SLAB_THK" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  324. <col key="false" ref="DESIGN_SLAB_WTH" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  325. <col key="false" ref="DESIGN_SLAB_LEN" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  326. <col key="false" ref="DESIGN_SLAB_WGT" visibility="hidden" format="#,###" style="text-align:right; "/>
  327. <col key="false" ref="ORD_WGT" format="#,###" style="text-align:right; "/>
  328. <col key="false" ref="WGT_ACVAL_MIN" format="#,###" style="text-align:right; "/>
  329. <col key="false" ref="WGT_ACVAL_MAX" format="#,###" style="text-align:right; "/>
  330. <col key="false" ref="REP_CONF_WGT" format="#,###" style="text-align:right; "/>
  331. <col key="false" ref="REP_WGT" format="#,###" style="text-align:right; "/>
  332. <col key="false" ref="REP_REM_WGT" format="(-)#,###" style="text-align:right; "/>
  333. <col ref="WGT" visibility="hidden"/>
  334. <col ref="CUT_CNT" visibility="hidden"/>
  335. <col key="false" ref="CUT_SEQ" visibility="hidden"/>
  336. <script type="javascript" ev:event="xforms-value-changed">
  337. <![CDATA[
  338. var datagrid = datagrid2;
  339. var colChk = datagrid.colRef("CHK");
  340. if (datagrid.col != colChk) return;
  341. var row = datagrid.row;
  342. if (refSeq > -1) {
  343. var notAct = false;
  344. if (refThk != datagrid.valueMatrix(row, datagrid.colRef("ORD_THK"))) {
  345. alert("订单厚度与第一次选取的不一致,不能选取!");
  346. notAct = true;
  347. } else if (refWth != datagrid.valueMatrix(row, datagrid.colRef("ORD_WTH"))) {
  348. alert("订单宽度与第一次选取的不一致,不能选取!");
  349. notAct = true;
  350. } else if (refStl != datagrid.valueMatrix(row, datagrid.colRef("STL_GRD"))) {
  351. alert("订单钢号与第一次选取的不一致,不能选取!");
  352. notAct = true;
  353. } else if (refSpe != datagrid.valueMatrix(row, datagrid.colRef("SPEC_ABBSYM"))) {
  354. alert("订单标准与第一次选取的不一致,不能选取!");
  355. notAct = true;
  356. } else if (refUse != datagrid.valueMatrix(row, datagrid.colRef("ORD_USEAGE_CD"))) {
  357. alert("订单用途与第一次选取的不一致,不能选取!");
  358. notAct = true;
  359. }
  360. if (notAct) {
  361. datagrid.valueMatrix(row, colChk) = false;
  362. datagrid.rowStatus(row) = 0;
  363. return;
  364. }
  365. }
  366. // 可充当物料的余重
  367. var remWgt = Number(model.getValue("/root/gridData/REM_WGT"));
  368. if (datagrid.valueMatrix(row, colChk) == "Y") {
  369. var min = Number(datagrid.valueMatrix(row, datagrid.colRef("ORD_WGT_MIN")));
  370. var max = Number(datagrid.valueMatrix(row, datagrid.colRef("ORD_WGT_MAX")));
  371. if (remWgt == 0 || remWgt < min) {
  372. alert("剩余重量不足!");
  373. datagrid.valueMatrix(row, colChk) = "N";
  374. datagrid.rowStatus(row) = 0;
  375. } else {
  376. // 已充当物料的重量
  377. var repWgt = 0;
  378. var cnt = "";
  379. var actNum = 100; // 充当次数
  380. if (model.getValue("/root/initData/Slab/Slab_Num_YN") == "Y")
  381. actNum = Number(model.getValue("/root/initData/Slab/Slab_Num"));
  382. var actWgt = max;
  383. if (model.getValue("/root/initData/Slab/Slab_Wgt_YN") == "Y") {
  384. actWgt = Number(model.getValue("/root/initData/Slab/Slab_Wgt"));
  385. if (actWgt > max) actWgt = max;
  386. if (actWgt < min) actWgt = min;
  387. }
  388. while (remWgt >= min && actNum > 0) {
  389. if (remWgt >= actWgt) {
  390. cnt += "," + actWgt;
  391. repWgt += actWgt;
  392. remWgt -= actWgt;
  393. } else if (remWgt >= min) {
  394. cnt += "," + remWgt;
  395. repWgt += remWgt;
  396. remWgt = 0;
  397. break;
  398. }
  399. actNum--;
  400. }
  401. model.setValue("/root/gridData/REM_WGT", remWgt);
  402. datagrid.valueMatrix(row, datagrid.colRef("WGT")) = repWgt;
  403. datagrid.valueMatrix(row, datagrid.colRef("CUT_CNT")) = cnt.substring(1);
  404. datagrid.valueMatrix(row, datagrid.colRef("CUT_SEQ")) = cutseq++;
  405. datagrid.valueMatrix(row, datagrid.colRef("REP_WGT")) =
  406. Number(datagrid.valueMatrix(row, datagrid.colRef("REP_WGT"))) + repWgt;
  407. // 指定参照标准
  408. if (refSeq == -1) {
  409. refThk = datagrid.valueMatrix(row, datagrid.colRef("ORD_THK"));
  410. refWth = datagrid.valueMatrix(row, datagrid.colRef("ORD_WTH"));
  411. refStl = datagrid.valueMatrix(row, datagrid.colRef("STL_GRD"));
  412. refSpe = datagrid.valueMatrix(row, datagrid.colRef("SPEC_ABBSYM"));
  413. refUse = datagrid.valueMatrix(row, datagrid.colRef("ORD_USEAGE_CD"));
  414. refSeq = datagrid.valueMatrix(row, datagrid.colRef("CUT_SEQ"));
  415. }
  416. }
  417. } else {
  418. model.setValue("/root/gridData/REM_WGT", remWgt + Number(datagrid.valueMatrix(row, datagrid.colRef("WGT"))));
  419. datagrid.valueMatrix(row, datagrid.colRef("REP_WGT")) =
  420. Number(datagrid.valueMatrix(row, datagrid.colRef("REP_WGT"))) - Number(datagrid.valueMatrix(row, datagrid.colRef("WGT")));
  421. datagrid.rowStatus(row) = 0;
  422. if (refSeq == datagrid.valueMatrix(row, datagrid.colRef("CUT_SEQ"))) {
  423. refSeq = -1;
  424. var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
  425. var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
  426. var data = datagrid.getUpdateData("update");
  427. var up_data = data.split(rowSep);
  428. var rows = up_data.length - 1;
  429. if (rows > 1) {
  430. var vRow = up_data[1].split(colSep);
  431. var Idx = Number(vRow[1]);
  432. refThk = datagrid.valueMatrix(Idx, datagrid.colRef("ORD_THK"));
  433. refWth = datagrid.valueMatrix(Idx, datagrid.colRef("ORD_WTH"));
  434. refStl = datagrid.valueMatrix(Idx, datagrid.colRef("STL_GRD"));
  435. refSpe = datagrid.valueMatrix(Idx, datagrid.colRef("SPEC_ABBSYM"));
  436. refUse = datagrid.valueMatrix(Idx, datagrid.colRef("ORD_USEAGE_CD"));
  437. refSeq = datagrid.valueMatrix(Idx, datagrid.colRef("CUT_SEQ"));
  438. }
  439. }
  440. }
  441. ]]>
  442. </script>
  443. <script type="javascript" ev:event="ondblclick">
  444. <![CDATA[
  445. var datagrid = datagrid2;
  446. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  447. ]]>
  448. </script>
  449. </datagrid>
  450. </xhtml:body>
  451. </xhtml:html>