UIE031060.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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[进程管理 >> 充当管理 >> 用途转换处理]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <initData>
  12. <searchInfo>
  13. <LG_CD>A01001,A01004,A01007,B01001</LG_CD>
  14. </searchInfo>
  15. </initData>
  16. <codeData>
  17. <ORD_SEQ/>
  18. </codeData>
  19. <formData>
  20. <searchInfo>
  21. <PRODNM_CD/>
  22. <CUST_CD/>
  23. <STL_GRD/>
  24. <ORD_NO_M/>
  25. <ORD_SEQ_M/>
  26. <RCVORD_CLF/>
  27. <DEL_FR_DATE/>
  28. <DEL_TO_DATE/>
  29. <ORD_USEAGE_CD/>
  30. <SPEC_ABBSYM/>
  31. <ORD_THK_MIN>0</ORD_THK_MIN>
  32. <ORD_THK_MAX>999.999</ORD_THK_MAX>
  33. <ORD_WTH_MIN>0</ORD_WTH_MIN>
  34. <ORD_WTH_MAX>99999.9</ORD_WTH_MAX>
  35. </searchInfo>
  36. <searchInfo2>
  37. <MAT_TP/>
  38. <ORD_NO/>
  39. <ORD_SEQ/>
  40. <NIB028720>Y</NIB028720>
  41. <NIB028750>Y</NIB028750>
  42. <NIB028700>Y</NIB028700>
  43. </searchInfo2>
  44. <searchInfo3>
  45. <MAT_NOS/>
  46. </searchInfo3>
  47. </formData>
  48. <gridData>
  49. <REM_WGT/>
  50. </gridData>
  51. </root>
  52. </instance>
  53. <script type="javascript" ev:event="xforms-ready">
  54. <![CDATA[
  55. if (window.parent == null) Init();
  56. ]]>
  57. </script>
  58. </model>
  59. <script type="javascript" src="../../js/boaCommon.js"/>
  60. <script type="javascript" src="../../js/boaMsg.js"/>
  61. <script type="javascript" src="../../js/mesCommon.js">
  62. <![CDATA[
  63. submitID = "UIE031060-service";
  64. function Init(node) {
  65. InitParams(node);
  66. exec("/root/initData/searchInfo", "", "", "/root/codeData/ListResult_0_VO",
  67. "/root/codeData/ListResult_1_VO", "/root/codeData/ListResult_2_VO");
  68. model.setValue("/root/formData/searchInfo/DEL_FR_DATE", commFirstDay());
  69. model.setValue("/root/formData/searchInfo/DEL_TO_DATE", commCurDate());
  70. pageInit();
  71. model.duplicate("/root/formData", "/root/initData/rcvInfo/REG_ID");
  72. }
  73. function pageInit(refresh) {
  74. model.removenode("/root/reqData");
  75. model.removenode("/root/resData");
  76. model.refresh();
  77. if (typeof refresh == "undefined") {
  78. isReadOnly(datagrid1, "CUST_CD,PRODNM_CD,ORD_USEAGE_CD,RCVORD_CLF");
  79. }
  80. var datagrid = datagrid2;
  81. commGridLevel2(datagrid);
  82. colStyle(datagrid, "CHK");
  83. isReadOnly(datagrid, "ORD_USEAGE_CD");
  84. }
  85. function find() {
  86. exec("/root/formData/searchInfo", "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  87. pageInit();
  88. }
  89. function save() {}
  90. function create() {}
  91. function remove() {}
  92. var onrowchanged = false;
  93. function rowchanged() {
  94. showProgressBar();
  95. var datagrid = datagrid1;
  96. var row = datagrid.row;
  97. model.setValue("/root/formData/searchInfo2/ORD_NO", datagrid.valueMatrix(row, datagrid.colRef("ORD_NO")));
  98. model.setValue("/root/formData/searchInfo2/ORD_SEQ", datagrid.valueMatrix(row, datagrid.colRef("ORD_SEQ")));
  99. exec("/root/formData/searchInfo2", "", "onclick", "/root/gridData/ListResult_1_VO");
  100. model.setValue("/root/gridData/REM_WGT", datagrid.valueMatrix(row, datagrid.colRef("ORD_REM_WGT")));
  101. pageInit(false);
  102. removeProgressBar();
  103. }
  104. function fowardUID010031(gridID) {
  105. if(gridID.col == gridID.colRef("INGR_YN")) {
  106. model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
  107. model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
  108. model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
  109. var java = window.parent.javaScript;
  110. java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
  111. }
  112. }
  113. ]]>
  114. </script>
  115. </xhtml:head>
  116. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  117. <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:80px; ">
  118. <line id="line2" style="x1:0px; y1:73px; x2:980px; y2:73px; "/>
  119. <caption id="caption101" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">产品</caption>
  120. <select1 id="combo101" ref="PRODNM_CD" appearance="minimal" style="left:92px; top:5px; width:127px; height:20px; ">
  121. <choices>
  122. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004' or LG_CD='A']">
  123. <label ref="SM_CFNM"/>
  124. <value ref="SM_CD"/>
  125. </itemset>
  126. </choices>
  127. </select1>
  128. <caption id="caption102" class="cell" style="left:229px; top:5px; width:90px; height:20px; ">客户</caption>
  129. <select1 id="combo102" ref="CUST_CD" appearance="minimal" style="left:321px; top:5px; width:127px; height:20px; ">
  130. <choices>
  131. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
  132. <label ref="CUST_NM"/>
  133. <value ref="CUST_CD"/>
  134. </itemset>
  135. </choices>
  136. </select1>
  137. <caption id="caption103" class="cell" style="left:458px; top:5px; width:90px; height:20px; ">钢号</caption>
  138. <select1 id="combo103" ref="STL_GRD" appearance="minimal" style="left:550px; top:5px; width:110px; height:20px; ">
  139. <choices>
  140. <itemset nodeset="/root/codeData/ListResult_2_VO/ListResult_2_Row">
  141. <label ref="STL_GRD"/>
  142. <value ref="STL_GRD"/>
  143. </itemset>
  144. </choices>
  145. </select1>
  146. <caption id="caption104" class="cell" style="left:0px; top:27px; width:90px; height:20px; ">合同号</caption>
  147. <input id="input1041" ref="ORD_NO_M" maxlength="12" style="left:92px; top:27px; width:80px; height:20px; ">
  148. <script type="javascript" ev:event="xforms-value-changed">
  149. <![CDATA[
  150. model.setValue("/root/formData/searchInfo/ORD_SEQ_M", "");
  151. // if (model.getValue("/root/formData/searchInfo/ORD_NO_M").length == 12) {
  152. exec("/root/formData/searchInfo/ORD_NO_M", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
  153. model.removenode("/root/reqData");
  154. model.removenode("/root/resData");
  155. // } else {
  156. // model.removenode("/root/codeData/ORD_SEQ/ListResult_0_VO");
  157. // }
  158. model.refresh();
  159. ]]>
  160. </script>
  161. </input>
  162. <select1 id="combo1042" ref="ORD_SEQ_M" appearance="minimal" style="left:174px; top:27px; width:45px; height:20px; ">
  163. <choices>
  164. <itemset nodeset="/root/codeData/ORD_SEQ/ListResult_0_VO/ListResult_0_Row">
  165. <label ref="ORD_SEQ"/>
  166. <value ref="ORD_SEQ"/>
  167. </itemset>
  168. </choices>
  169. </select1>
  170. <caption id="caption105" class="cell" style="left:229px; top:27px; width:90px; height:20px; ">订货区分</caption>
  171. <select1 id="combo105" ref="RCVORD_CLF" appearance="minimal" style="left:321px; top:27px; width:127px; height:20px; ">
  172. <choices>
  173. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01001' or LG_CD='A']">
  174. <label ref="SM_CFNM"/>
  175. <value ref="SM_CD"/>
  176. </itemset>
  177. </choices>
  178. </select1>
  179. <caption id="caption106" class="cell" style="left:458px; top:27px; width:90px; height:20px; ">交货日期</caption>
  180. <input id="input1061" ref="DEL_FR_DATE" inputtype="date" style="left:550px; top:27px; width:100px; height:20px; "/>
  181. <input id="input1062" ref="DEL_TO_DATE" inputtype="date" style="left:652px; top:27px; width:100px; height:20px; "/>
  182. <caption id="caption107" class="cell" style="left:762px; top:27px; width:90px; height:20px; ">订单用途</caption>
  183. <select1 id="combo107" ref="ORD_USEAGE_CD" appearance="minimal" style="left:854px; top:27px; width:110px; height:20px; ">
  184. <choices>
  185. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007' or LG_CD='A']">
  186. <label ref="SM_CFNM"/>
  187. <value ref="SM_CD"/>
  188. </itemset>
  189. </choices>
  190. </select1>
  191. <select1 id="combo108" ref="SPEC_ABBSYM" appearance="minimal" style="left:92px; top:49px; width:127px; height:20px; ">
  192. <choices>
  193. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='B01001' or LG_CD = 'A']">
  194. <label ref="SM_CD"/>
  195. <value ref="SM_CD"/>
  196. </itemset>
  197. </choices>
  198. </select1>
  199. <caption id="caption108" class="cell" style="left:0px; top:49px; width:90px; height:20px; ">标准号</caption>
  200. <caption id="caption110" class="cell" style="left:458px; top:49px; width:90px; height:20px; ">宽度</caption>
  201. <input id="input1091" ref="ORD_THK_MIN" maxlength="6" format="#,###.#" style="left:321px; top:49px; width:62px; height:20px; text-align:right; "/>
  202. <input id="input1092" ref="ORD_THK_MAX" maxlength="6" format="#,###.#" style="left:385px; top:49px; width:63px; height:20px; text-align:right; "/>
  203. <caption id="caption109" class="cell" style="left:229px; top:49px; width:90px; height:20px; ">厚度</caption>
  204. <input id="input1101" ref="ORD_WTH_MIN" maxlength="6" format="#,###.#" style="left:550px; top:49px; width:62px; height:20px; text-align:right; "/>
  205. <input id="input1102" ref="ORD_WTH_MAX" maxlength="6" format="#,###.#" style="left:614px; top:49px; width:63px; height:20px; text-align:right; "/>
  206. <button id="button2" class="sw" style="left:880px; top:5px; width:100px; height:20px; ">
  207. <caption>用途转换处理</caption>
  208. <script type="javascript" ev:event="onclick">
  209. <![CDATA[
  210. // NIE031061、NIE031062
  211. var datagrid = datagrid2;
  212. var rowSep = (datagrid.attribute("rowsep")=='')?'|':datagrid.attribute('rowsep');
  213. var colSep = (datagrid.attribute("colsep")=='')?'^':datagrid.attribute('colsep');
  214. var data = datagrid.getUpdateData();
  215. var up_data = data.split(rowSep);
  216. var rows = up_data.length - 1;
  217. var colRef = datagrid.colRef("MAT_NO");
  218. var colChk = datagrid.colRef("CHK");
  219. var mat_nos = "";
  220. for (var i=1; i<rows; i++) {
  221. var vRow = up_data[i].split(colSep);
  222. var Idx = Number(vRow[1]);
  223. if (datagrid.valueMatrix(Idx, colChk) == "Y")
  224. mat_nos += "," + datagrid.valueMatrix(Idx, colRef);
  225. }
  226. if (mat_nos != "") {
  227. model.setValue("/root/formData/searchInfo3/MAT_NOS", mat_nos.substring(1));
  228. exec("/root/formData", "", "replace", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  229. pageInit();
  230. }
  231. ]]>
  232. </script>
  233. </button>
  234. </group>
  235. <datagrid id="datagrid1" nodeset="/root/gridData/ListResult_0_VO/ListResult_0_Row" backcoloralternate="#F7F9F9" caption="合同号^订单号^客户^产品^钢号^标准号^订单用途^订单厚度^订单宽度^订单长度^订单内径^订单外径^订单单重下限^订单单重上限^紧急材^交货期结束^订货区分^订单重量^进程量^欠量^发货完重量^发货方式^客户特殊要求" colsep="^" colwidth="80, 35, 150, 45, 150, 150, 150, 80, 80, 80, 80, 80, 100, 100, 35, 100, 100, 80, 80, 80, 80, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="45" rowsep="|" style="left:0px; top:78px; width:980px; height:210px; ">
  236. <col ref="ORD_NO"/>
  237. <col ref="ORD_SEQ"/>
  238. <col ref="CUST_CD" type="combo" style="text-align:left; ">
  239. <choices>
  240. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
  241. <label ref="CUST_NM"/>
  242. <value ref="CUST_CD"/>
  243. </itemset>
  244. </choices>
  245. </col>
  246. <col ref="PRODNM_CD" type="combo">
  247. <choices>
  248. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004']">
  249. <label ref="SM_CFNM"/>
  250. <value ref="SM_CD"/>
  251. </itemset>
  252. </choices>
  253. </col>
  254. <col ref="STL_GRD" style="text-align:left; "/>
  255. <col ref="SPEC_ABBSYM" style="text-align:left; "/>
  256. <col ref="ORD_USEAGE_CD" type="combo" style="text-align:left; ">
  257. <choices>
  258. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007' or LG_CD='A']">
  259. <label ref="SM_CFNM"/>
  260. <value ref="SM_CD"/>
  261. </itemset>
  262. </choices>
  263. </col>
  264. <col ref="ORD_THK" format="#,###.#" style="text-align:right; "/>
  265. <col ref="ORD_WTH" format="#,###.#" style="text-align:right; "/>
  266. <col ref="ORD_LEN" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  267. <col ref="ORD_INDIA" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  268. <col ref="ORD_OUTDIA" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  269. <col ref="ORD_UNIT_WGT_MIN" format="#,###.#" style="text-align:right; "/>
  270. <col ref="ORD_UNIT_WGT_MAX" format="#,###.#" style="text-align:right; "/>
  271. <col ref="EMGMTR_NMG_CLF"/>
  272. <col ref="DEL_TO_DATE" format="yyyy-mm-dd"/>
  273. <col ref="RCVORD_CLF" type="combo" style="text-align:left; ">
  274. <choices>
  275. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01001']">
  276. <label ref="SM_CFNM"/>
  277. <value ref="SM_CD"/>
  278. </itemset>
  279. </choices>
  280. </col>
  281. <col ref="ORD_WGT" format="#,###.#" style="text-align:right; "/>
  282. <col ref="ORD_PRC_WGT" format="#,###.#" style="text-align:right; "/>
  283. <col ref="ORD_REM_WGT" format="(-)#,###.#" style="text-align:right; "/>
  284. <col ref="SHIP_END_WGT" format="#,###.#" style="text-align:right; "/>
  285. <col ref="DLIV_TP" style="text-align:left; "/>
  286. <col ref="INGR_YN" style="text-decoration:underline; color:#0000ff; cursor:hand; ">
  287. <script type="javascript" ev:event="onclick">
  288. <![CDATA[
  289. fowardUID010031(datagrid1);
  290. ]]>
  291. </script>
  292. </col>
  293. <script type="javascript" ev:event="onclick">
  294. <![CDATA[
  295. if(datagrid1.col != datagrid1.colRef("INGR_YN")) {
  296. if (!onrowchanged) return;
  297. rowchanged();
  298. onrowchanged = false;
  299. }
  300. ]]>
  301. </script>
  302. <script type="javascript" ev:event="onrowchanged">
  303. <![CDATA[
  304. onrowchanged = true;
  305. ]]>
  306. </script>
  307. <script type="javascript" ev:event="ondblclick">
  308. <![CDATA[
  309. var datagrid = datagrid1;
  310. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  311. ]]>
  312. </script>
  313. </datagrid>
  314. <group id="group2" overflow="hidden" ref="/root/formData/searchInfo2" style="left:0px; top:292px; width:980px; height:35px; ">
  315. <line id="line3" style="x1:0px; y1:0px; x2:9805px; y2:0px; "/>
  316. <line id="line4" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  317. <caption id="caption201" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">物料类型</caption>
  318. <select1 id="combo201" ref="MAT_TP" appearance="minimal" style="left:92px; top:5px; width:110px; height:20px; ">
  319. <choices>
  320. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004' or LG_CD='A']">
  321. <label ref="SM_CFNM"/>
  322. <value ref="SM_CD"/>
  323. </itemset>
  324. </choices>
  325. <script type="javascript" ev:event="xforms-value-changed">
  326. <![CDATA[
  327. rowchanged();
  328. ]]>
  329. </script>
  330. </select1>
  331. <caption id="caption2" class="cell" style="left:212px; top:5px; width:90px; height:20px; ">剩余充当量</caption>
  332. <output id="output201" ref="/root/gridData/REM_WGT" format="#,###" style="left:304px; top:5px; width:110px; height:20px; text-align:right; border-color:#c0c0c0; border-style:solid; "/>
  333. <select id="checkbox1" ref="NIB028720" overflow="visible" appearance="full" style="left:865px; top:5px; width:55px; height:20px; border-style:none; ">
  334. <choices>
  335. <item>
  336. <label>同成分</label>
  337. <value>Y</value>
  338. </item>
  339. </choices>
  340. <script type="javascript" ev:event="xforms-value-changed">
  341. <![CDATA[
  342. rowchanged();
  343. ]]>
  344. </script>
  345. </select>
  346. <select id="checkbox2" ref="NIB028750" overflow="visible" appearance="full" style="left:924px; top:5px; width:55px; height:20px; border-style:none; ">
  347. <choices>
  348. <item>
  349. <label>同材质</label>
  350. <value>Y</value>
  351. </item>
  352. </choices>
  353. <script type="javascript" ev:event="xforms-value-changed">
  354. <![CDATA[
  355. rowchanged();
  356. ]]>
  357. </script>
  358. </select>
  359. <select id="checkbox3" ref="NIB028700" overflow="visible" appearance="full" style="left:805px; top:5px; width:55px; height:20px; border-style:none; ">
  360. <choices>
  361. <item>
  362. <label>同牌号</label>
  363. <value>Y</value>
  364. </item>
  365. </choices>
  366. <script type="javascript" ev:event="xforms-value-changed">
  367. <![CDATA[
  368. rowchanged();
  369. ]]>
  370. </script>
  371. </select>
  372. </group>
  373. <datagrid id="datagrid2" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" caption="物料号^类型^转换^合同号^订单号^物料厚度^物料宽度^物料长度^物料重量^物料内径^物料外径^堆放位置^钢号^标准号^订单用途^生产日期^等级^物料进程^前物料进程^MAT_REP_WGT^ 钢卷流水号" colsep="^" colwidth="105, 35, 35, 80, 35, 80, 80, 80, 80, 80, 80, 80, 150, 150, 150, 120, 35, 120, 120, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="5" mergecellsfixedrows="bycolrec" rowheight="45" rowsep="|" style="left:0px; top:326px; width:980px; height:294px; ">
  374. <col key="false" ref="DSP_NO"/>
  375. <col key="false" ref="MAT_NAME"/>
  376. <col checkvalue="Y,N" key="false" ref="CHK" type="checkbox"/>
  377. <col ref="ORD_NO"/>
  378. <col ref="ORD_SEQ"/>
  379. <col key="false" ref="MAT_THK" format="#,###.#" style="text-align:right; "/>
  380. <col key="false" ref="MAT_WTH" format="#,###.#" style="text-align:right; "/>
  381. <col key="false" ref="MAT_LEN" format="#,###.#" style="text-align:right; "/>
  382. <col key="false" ref="MAT_WGT" format="#,###" style="text-align:right; "/>
  383. <col key="false" ref="COIL_INDIA" format="#,###.#" style="text-align:right; "/>
  384. <col key="false" ref="COIL_OUTDIA" format="#,###.#" style="text-align:right; "/>
  385. <col key="false" ref="CUR_LOAD_LOC"/>
  386. <col key="false" ref="STL_GRD" style="text-align:left; "/>
  387. <col key="false" ref="SPEC_ABBSYM" style="text-align:left; "/>
  388. <col key="false" ref="ORD_USE_CD" type="combo" style="text-align:left; ">
  389. <choices>
  390. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007']">
  391. <label ref="SM_CFNM"/>
  392. <value ref="SM_CD"/>
  393. </itemset>
  394. </choices>
  395. </col>
  396. <col key="false" ref="MAT_DTIME" format="yyyy-mm-dd"/>
  397. <col key="false" ref="MAT_GRD"/>
  398. <col key="false" ref="CUR_PROG_CD" style="text-align:left; "/>
  399. <col key="false" ref="BEF_PROG_CD" style="text-align:left; "/>
  400. <col ref="MAT_REP_WGT" visibility="hidden"/>
  401. <col ref="MAT_NO" visibility="hidden"/>
  402. <script type="javascript" ev:event="xforms-value-changed">
  403. <![CDATA[
  404. var datagrid = datagrid2;
  405. var colChk = datagrid.colRef("CHK");
  406. if (datagrid.col != colChk) return;
  407. var row = datagrid.row;
  408. // 可充当的余重
  409. var remWgt = Number(model.getValue("/root/gridData/REM_WGT"));
  410. if (remWgt <= 0) {
  411. alert("已经充当满,不能再充当了!");
  412. } else {
  413. if (datagrid.valueMatrix(row, colChk) == "Y") {
  414. remWgt -= Number(datagrid.valueMatrix(row, datagrid.colRef("MAT_REP_WGT")));
  415. } else {
  416. remWgt += Number(datagrid.valueMatrix(row, datagrid.colRef("MAT_REP_WGT")));
  417. datagrid.rowStatus(row) = 0;
  418. }
  419. model.setValue("/root/gridData/REM_WGT", remWgt);
  420. }
  421. ]]>
  422. </script>
  423. <script type="javascript" ev:event="ondblclick">
  424. <![CDATA[
  425. var datagrid = datagrid2;
  426. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  427. ]]>
  428. </script>
  429. </datagrid>
  430. </xhtml:body>
  431. </xhtml:html>