UIE031047.xrw 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/css" href="../../css/body.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>
  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. <COULD_YN/>
  16. </initData>
  17. <codeData>
  18. <ORD_SEQ/>
  19. </codeData>
  20. <formData>
  21. <searchInfo>
  22. <PRODNM_CD/>
  23. <CUST_CD/>
  24. <STL_GRD/>
  25. <ORD_NO_M/>
  26. <ORD_SEQ_M/>
  27. <RCVORD_CLF/>
  28. <DEL_FR_DATE/>
  29. <DEL_TO_DATE/>
  30. <ORD_USEAGE_CD/>
  31. <SPEC_ABBSYM/>
  32. <ORD_THK_MIN>0</ORD_THK_MIN>
  33. <ORD_THK_MAX>999.999</ORD_THK_MAX>
  34. <ORD_WTH_MIN>0</ORD_WTH_MIN>
  35. <ORD_WTH_MAX>99999.9</ORD_WTH_MAX>
  36. <P_ORD_REV_CLF/>
  37. </searchInfo>
  38. <searchInfo2>
  39. <ORD_NO/>
  40. <ORD_SEQ/>
  41. <MAT_TYPE>AR</MAT_TYPE>
  42. <NIB028720>Y</NIB028720>
  43. <NIB028750>Y</NIB028750>
  44. <NIB028700>Y</NIB028700>
  45. <RCVORD_CLF/>
  46. <SIGN_STL>Y</SIGN_STL>
  47. </searchInfo2>
  48. <searchInfo3>
  49. <MAT_NOS/>
  50. </searchInfo3>
  51. <searchForm>
  52. <R_ORD_NO/>
  53. <R_ORD_SEQ/>
  54. <SIGN_STL>Y</SIGN_STL>
  55. <SIGN_CHEN_FEN>Y</SIGN_CHEN_FEN>
  56. <SING_CAIZHI>Y</SING_CAIZHI>
  57. <SIGN_QIANGZHI/>
  58. <P_REG_ID/>
  59. <errInfo/>
  60. <P_ORD_REV_CLF/>
  61. <MAT_TP/>
  62. </searchForm>
  63. </formData>
  64. <gridData>
  65. <REM_WGT/>
  66. </gridData>
  67. <reqData/>
  68. </root>
  69. </instance>
  70. <script type="javascript" ev:event="xforms-ready">
  71. <![CDATA[
  72. if (window.parent == null) Init();
  73. ]]>
  74. </script>
  75. </model>
  76. <script type="javascript" src="../../js/boaCommon.js"/>
  77. <script type="javascript" src="../../js/boaMsg.js"/>
  78. <script type="javascript" src="../../js/mesCommon.js">
  79. <![CDATA[
  80. submitID = "UIE031047-service";
  81. var gv_ord_no = "";
  82. var gv_ord_seq = "";
  83. var gv_reg_id = "";
  84. var P_RCVORD_CLF = "";
  85. // var v_ds_yn = "";
  86. function Init(node) {
  87. InitParams(node);
  88. exec("/root/initData/searchInfo", "", "", "/root/codeData/ListResult_0_VO",
  89. "/root/codeData/ListResult_1_VO", "/root/codeData/ListResult_2_VO");
  90. model.setValue("/root/formData/searchInfo/DEL_FR_DATE", commFirstDay());
  91. model.setValue("/root/formData/searchInfo/DEL_TO_DATE", commCurDate());
  92. pageInit();
  93. model.duplicate("/root/formData", "/root/initData/rcvInfo/REG_ID");
  94. model.property("V_REG_ID") = model.getValue("/root/initData/rcvInfo/REG_ID");
  95. gv_reg_id = model.property("V_REG_ID");
  96. }
  97. function pageInit(refresh) {
  98. model.removenode("/root/reqData");
  99. model.removenode("/root/resData");
  100. model.refresh();
  101. if (typeof refresh == "undefined") {
  102. isReadOnly(datagrid1, "PRODNM_CD,ORD_USEAGE_CD");
  103. }
  104. var datagrid = datagrid2;
  105. datagrid.rebuild();
  106. var rows = (datagrid.rows < 30) ? datagrid.rows : 30;
  107. for (var i = datagrid.fixedRows + 1; i < 30; i += 2)
  108. datagrid.rowStyle(i, "data", "background-color") = "#F7F9F9";
  109. rows = datagrid.rows;
  110. var colChk = datagrid.colRef("CHK");
  111. for (var i=datagrid.fixedRows; i<rows; i++)
  112. datagrid.valueMatrix(i, colChk) = "false";
  113. colStyle(datagrid, "CHK");
  114. }
  115. function find(req) {
  116. model.removenode("root/reqData");
  117. model.makeNode("root/reqData");
  118. if (typeof req == "undefined") req = "/root/formData/searchInfo";
  119. exec(req, "", "find", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  120. model.refresh();
  121. color_ds_yn();
  122. color_status();
  123. pageInit();
  124. }
  125. function save() {
  126. model.removenode("root/reqData");
  127. model.makeNode("root/reqData");
  128. model.setValue("/root/formData/searchForm/R_ORD_NO",gv_ord_no);
  129. model.setValue("/root/formData/searchForm/R_ORD_SEQ",gv_ord_seq);
  130. model.setValue("/root/formData/searchForm/MAT_TP",combo201.value);
  131. model.setValue("/root/formData/searchForm/P_REG_ID",gv_reg_id);
  132. model.setValue("/root/formData/searchForm/P_ORD_REV_CLF", datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("RCVORD_CLF")));
  133. // commSendReq("/root/formData/searchForm","/root/formData/searchInfo2");
  134. // commMultiUpdate(datagrid2,"/root/reqData","A",true,"rowStatus");
  135. exec("/root/formData/searchForm,/root/formData/searchInfo,/root/formData/searchInfo2", datagrid2, "replace", "/root/gridData/ListResult_0_VO", "/root/gridData/ListResult_1_VO");
  136. // commSubmit("UIE031047-service","replace","glueAction.do");
  137. // commAppendData("/root/gridData/ListResult_1_VO","/root/resData/ListResult_1_VO");
  138. // commAppendData("/root/gridData/ListResult_0_VO","/root/resData/ListResult_0_VO");
  139. // datagrid2.refresh();
  140. if (model.getValue("/root/resData/errorData") != "") {
  141. alert(model.getValue("/root/resData/errorData"));
  142. output201.value = datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("ORD_REM_WGT"));
  143. output201.refresh();
  144. return;
  145. }
  146. color_status();
  147. checkbox1.value = "";
  148. model.refresh();
  149. }
  150. function go(){
  151. window.load("UIE031046.xrw","modal","", "left:228; top:120; width:700; height:450; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
  152. }
  153. function color_ds_yn() {
  154. for(var i = 1;i<=datagrid1.rows-1;i++)
  155. {
  156. var v_ds_yn = datagrid1.valueMatrix(i,datagrid1.colRef("DN_YN"));
  157. var bgcolor = "#ffffff";
  158. if(v_ds_yn == "Y" ) {
  159. bgcolor = "pink";
  160. }
  161. else{
  162. bgcolor = "#ffffff";
  163. }
  164. datagrid1.rowstyle(i, "data", "background-color") = bgcolor;
  165. }
  166. }
  167. function chk_is_dn() {
  168. // var v_ds_yn = datagrid1.valueMatrix(datagrid1.row,datagrid1.colRef("DN_YN"));
  169. // var bgcolor = "#ffffff";
  170. // if(v_ds_yn == "Y" ) {
  171. // alert("该订单正在板坯设计中,请稍候充当...");
  172. // return;
  173. // }
  174. }
  175. function color_status()
  176. {
  177. for(var i = 1;i<=datagrid2.rows-1;i++)
  178. {
  179. var v_status = datagrid2.valueMatrix(i,datagrid2.colRef("JKB"));
  180. var v_tot_grd_clf = datagrid2.valueMatrix(i,datagrid2.colRef("TOT_GRD_CLF"));
  181. var bgcolor = "#ffffff";
  182. if(Number(v_status) > 1.5 ) {
  183. bgcolor = "red";
  184. }
  185. else{
  186. bgcolor = "#ffffff";
  187. }
  188. if(v_tot_grd_clf == "Y" ) {
  189. bgcolor = "#c0c0c0";
  190. }
  191. else{
  192. bgcolor = "#ffffff";
  193. }
  194. datagrid2.rowstyle(i, "data", "background-color") = bgcolor;
  195. }
  196. }
  197. var onrowchanged = false;
  198. function rowchanged() {
  199. showProgressBar();
  200. var datagrid = datagrid1;
  201. var row = datagrid.row;
  202. gv_ord_no = datagrid.valueMatrix(row, datagrid.colRef("ORD_NO"));
  203. gv_ord_seq = datagrid.valueMatrix(row, datagrid.colRef("ORD_SEQ"));
  204. model.property("V_ORD_NO") = gv_ord_no;
  205. model.property("V_ORD_SEQ") = gv_ord_seq;
  206. model.setValue("/root/formData/searchInfo2/ORD_NO", datagrid.valueMatrix(row, datagrid.colRef("ORD_NO")));
  207. model.setValue("/root/formData/searchInfo2/ORD_SEQ", datagrid.valueMatrix(row, datagrid.colRef("ORD_SEQ")));
  208. model.setValue("/root/formData/searchInfo2/RCVORD_CLF", datagrid.valueMatrix(row, datagrid.colRef("RCVORD_CLF")));
  209. model.setValue("/root/formData/searchInfo2/MAT_TYPE",combo201.value);
  210. model.setValue("/root/formData/searchInfo2/SIGN_STL",checkbox9.value);
  211. // commSendReq("/root/formData/searchInfo2","/root/formData/searchInfo");
  212. // commSendReq("/root/formData/searchInfo2");
  213. exec("/root/formData/searchInfo2,/root/formData/searchInfo", "", "onclick", "/root/gridData/ListResult_1_VO");
  214. model.setValue("/root/gridData/REM_WGT", datagrid.valueMatrix(row, datagrid.colRef("ORD_REM_WGT")));
  215. pageInit(false);
  216. model.refresh();
  217. color_status();
  218. removeProgressBar();
  219. }
  220. function fowardUID010031(gridID) {
  221. if(gridID.col == gridID.colRef("INGR_YN")) {
  222. model.makeValue("/root/fwdData/UID010031/ORD_NO", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_NO")));
  223. model.makeValue("/root/fwdData/UID010031/ORD_SEQ", gridID.valueMatrix(gridID.row, gridID.colRef("ORD_SEQ")));
  224. model.makeValue("/root/fwdData/UID010031/URL", "../../B/B01/UIB015020.xrw");
  225. var java = window.parent.javaScript;
  226. java.open(model.instances(0).selectSingleNode("/root/fwdData/UID010031"));
  227. }
  228. }
  229. ]]>
  230. </script>
  231. </xhtml:head>
  232. <xhtml:body overflow="hidden" pagewidth="980" pageheight="620" style="font-family:宋体; ">
  233. <group id="group1" overflow="hidden" ref="/root/formData/searchInfo" style="left:0px; top:0px; width:980px; height:80px; ">
  234. <line id="line2" style="x1:0px; y1:73px; x2:980px; y2:73px; "/>
  235. <caption id="caption101" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">产品</caption>
  236. <select1 id="combo101" ref="PRODNM_CD" appearance="minimal" style="left:92px; top:5px; width:127px; height:20px; ">
  237. <choices>
  238. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004' or LG_CD='A']">
  239. <label ref="SM_CFNM"/>
  240. <value ref="SM_CD"/>
  241. </itemset>
  242. </choices>
  243. </select1>
  244. <caption id="caption102" class="cell" style="left:229px; top:5px; width:90px; height:20px; ">客户</caption>
  245. <select1 id="combo102" ref="CUST_CD" appearance="minimal" style="left:321px; top:5px; width:127px; height:20px; ">
  246. <choices>
  247. <itemset nodeset="/root/codeData/ListResult_1_VO/ListResult_1_Row">
  248. <label ref="CUST_NM"/>
  249. <value ref="CUST_CD"/>
  250. </itemset>
  251. </choices>
  252. </select1>
  253. <caption id="caption103" class="cell" style="left:458px; top:5px; width:90px; height:20px; ">钢号</caption>
  254. <select1 id="combo103" ref="STL_GRD" appearance="minimal" style="left:550px; top:5px; width:110px; height:20px; ">
  255. <choices>
  256. <itemset nodeset="/root/codeData/ListResult_2_VO/ListResult_2_Row">
  257. <label ref="STL_GRD"/>
  258. <value ref="STL_GRD"/>
  259. </itemset>
  260. </choices>
  261. </select1>
  262. <caption id="caption104" class="cell" style="left:0px; top:27px; width:90px; height:20px; ">合同号</caption>
  263. <input id="input1041" ref="ORD_NO_M" maxlength="12" style="left:92px; top:27px; width:80px; height:20px; ">
  264. <script type="javascript" ev:event="xforms-value-changed">
  265. <![CDATA[
  266. model.setValue("/root/formData/searchInfo/ORD_SEQ_M", "");
  267. // if (model.getValue("/root/formData/searchInfo/ORD_NO_M").length == 12) {
  268. exec("/root/formData/searchInfo/ORD_NO_M", "", "seq", "/root/codeData/ORD_SEQ/ListResult_0_VO");
  269. model.removenode("/root/reqData");
  270. model.removenode("/root/resData");
  271. // } else {
  272. // model.removenode("/root/codeData/ORD_SEQ/ListResult_0_VO");
  273. // }
  274. model.refresh();
  275. ]]>
  276. </script>
  277. </input>
  278. <select1 id="combo1042" ref="ORD_SEQ_M" appearance="minimal" style="left:174px; top:27px; width:45px; height:20px; ">
  279. <choices>
  280. <itemset nodeset="/root/codeData/ORD_SEQ/ListResult_0_VO/ListResult_0_Row">
  281. <label ref="ORD_SEQ"/>
  282. <value ref="ORD_SEQ"/>
  283. </itemset>
  284. </choices>
  285. </select1>
  286. <caption id="caption105" class="cell" style="left:229px; top:27px; width:90px; height:20px; ">订货区分</caption>
  287. <select1 id="combo105" ref="RCVORD_CLF" appearance="minimal" style="left:321px; top:27px; width:127px; height:20px; ">
  288. <choices>
  289. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01001' or LG_CD='A']">
  290. <label ref="SM_CFNM"/>
  291. <value ref="SM_CD"/>
  292. </itemset>
  293. </choices>
  294. </select1>
  295. <caption id="caption106" class="cell" style="left:458px; top:27px; width:90px; height:20px; ">交货日期</caption>
  296. <input id="input1061" ref="DEL_FR_DATE" inputtype="date" style="left:550px; top:27px; width:100px; height:20px; "/>
  297. <input id="input1062" ref="DEL_TO_DATE" inputtype="date" style="left:652px; top:27px; width:100px; height:20px; "/>
  298. <caption id="caption107" class="cell" style="left:762px; top:27px; width:90px; height:20px; ">订单用途</caption>
  299. <select1 id="combo107" ref="ORD_USEAGE_CD" appearance="minimal" style="left:854px; top:27px; width:110px; height:20px; ">
  300. <choices>
  301. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007' or LG_CD='A']">
  302. <label ref="SM_CFNM"/>
  303. <value ref="SM_CD"/>
  304. </itemset>
  305. </choices>
  306. </select1>
  307. <select1 id="combo108" ref="SPEC_ABBSYM" appearance="minimal" style="left:92px; top:49px; width:127px; height:20px; ">
  308. <choices>
  309. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='B01001' or LG_CD = 'A']">
  310. <label ref="SM_CD"/>
  311. <value ref="SM_CD"/>
  312. </itemset>
  313. </choices>
  314. </select1>
  315. <caption id="caption1" class="cell" style="left:0px; top:49px; width:90px; height:20px; ">标准号</caption>
  316. <caption id="caption108" class="cell" style="left:229px; top:49px; width:90px; height:20px; ">厚度</caption>
  317. <input id="input1081" ref="ORD_THK_MIN" maxlength="6" format="#,###.#" style="left:321px; top:49px; width:62px; height:20px; text-align:right; "/>
  318. <input id="input1082" ref="ORD_THK_MAX" maxlength="6" format="#,###.#" style="left:385px; top:49px; width:63px; height:20px; text-align:right; "/>
  319. <caption id="caption109" class="cell" style="left:458px; top:49px; width:90px; height:20px; ">宽度</caption>
  320. <input id="input1091" ref="ORD_WTH_MIN" maxlength="6" format="#,###.#" style="left:550px; top:49px; width:60px; height:20px; text-align:right; "/>
  321. <input id="input1092" ref="ORD_WTH_MAX" maxlength="6" format="#,###.#" style="left:612px; top:49px; width:60px; height:20px; text-align:right; "/>
  322. <button id="button1" class="sw" style="left:880px; top:5px; width:100px; height:20px; ">
  323. <caption>强制充当</caption>
  324. <script type="javascript" ev:event="onclick">
  325. <![CDATA[
  326. var v_ds_yn = datagrid1.valueMatrix(datagrid1.row,datagrid1.colRef("DN_YN"));
  327. if(v_ds_yn == "Y" ) {
  328. alert("该订单正在板坯设计中,请稍候充当...");
  329. return;
  330. }
  331. if(commComfirmBox("强制充当有风险!请谨慎操作,后果自负,确定要强制充当吗?","强制充当对话框")=='0') return;
  332. save();
  333. color_ds_yn();
  334. pageInit();
  335. model.refresh();
  336. ]]>
  337. </script>
  338. </button>
  339. </group>
  340. <datagrid id="datagrid1" nodeset="/root/gridData/ListResult_0_VO/ListResult_0_Row" backcoloralternate="#F7F9F9" caption="合同号^订单号^客户^产品^钢号^标准号^订单用途^是否进保温坑^是否全部取样^订单厚度^订单宽度^订单长度^订单内径^订单外径^订单单重下限^订单单重上限^紧急材^交货期结束^订单重量^进程量^欠量^发货完重量^订货区分^发货方式^订单备注^板坯设计中^客户特殊要求" colsep="^" colwidth="80, 35, 150, 45, 150, 150, 100, 45, 45, 80, 80, 80, 80, 80, 100, 100, 35, 100, 80, 80, 80, 80, 100, 100, 100, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="45" rowsep="|" style="left:0px; top:78px; width:980px; height:210px; vertical-align:top; ">
  341. <col key="false" ref="ORD_NO"/>
  342. <col key="false" ref="ORD_SEQ"/>
  343. <col key="false" ref="CUST_CD" style="text-align:left; "/>
  344. <col key="false" ref="PRODNM_CD" type="combo">
  345. <choices>
  346. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01004']">
  347. <label ref="SM_CFNM"/>
  348. <value ref="SM_CD"/>
  349. </itemset>
  350. </choices>
  351. </col>
  352. <col ref="STL_GRD" style="text-align:left; "/>
  353. <col key="false" ref="SPEC_ABBSYM" style="text-align:left; "/>
  354. <col key="false" ref="ORD_USEAGE_CD" type="combo" style="text-align:left; ">
  355. <choices>
  356. <itemset nodeset="/root/codeData/ListResult_0_VO/ListResult_0_Row[LG_CD='A01007']">
  357. <label ref="SM_CFNM"/>
  358. <value ref="SM_CD"/>
  359. </itemset>
  360. </choices>
  361. </col>
  362. <col ref="KEEPWARM_YN"/>
  363. <col ref="EACHLOT_YN"/>
  364. <col key="false" ref="ORD_THK" format="#,###.#" style="text-align:right; "/>
  365. <col key="false" ref="ORD_WTH" format="#,###.#" style="text-align:right; "/>
  366. <col key="false" ref="ORD_LEN" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  367. <col key="false" ref="ORD_INDIA" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  368. <col key="false" ref="ORD_OUTDIA" visibility="hidden" format="#,###.#" style="text-align:right; "/>
  369. <col ref="ORD_UNIT_WGT_MIN" format="#,###.#" style="text-align:right; "/>
  370. <col ref="ORD_UNIT_WGT_MAX" format="#,###.#" style="text-align:right; "/>
  371. <col key="false" ref="EMGMTR_NMG_CLF"/>
  372. <col key="false" ref="DEL_TO_DATE" format="yyyy-mm-dd"/>
  373. <col ref="ORD_WGT" format="#,###.#" style="text-align:right; "/>
  374. <col ref="ORD_PRC_WGT" format="#,###.#" style="text-align:right; "/>
  375. <col ref="ORD_REM_WGT" format="(-)#,###.#" style="text-align:right; "/>
  376. <col ref="SHIP_END_WGT" format="#,###.#" style="text-align:right; "/>
  377. <col ref="RCVORD_CLF" style="text-align:left; "/>
  378. <col ref="DLIV_TP" style="text-align:left; "/>
  379. <col ref="MK_CONTENT" style="text-align:left; "/>
  380. <col ref="DN_YN"/>
  381. <col ref="INGR_YN" style="text-decoration:underline; color:#0000ff; cursor:hand; ">
  382. <script type="javascript" ev:event="onclick">
  383. <![CDATA[
  384. fowardUID010031(datagrid1);
  385. ]]>
  386. </script>
  387. </col>
  388. <script type="javascript" ev:event="onclick">
  389. <![CDATA[
  390. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  391. // 关闭强制充当
  392. // P_RCVORD_CLF = datagrid1.valueMatrix(datagrid1.row, datagrid1.colRef("RCVORD_CLF"));
  393. // if(P_RCVORD_CLF == "清库合同") {
  394. // checkbox1.disabled = false;
  395. // }else {
  396. // checkbox1.disabled = true;
  397. // }
  398. // checkbox1.refresh();
  399. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  400. if(datagrid1.col != datagrid1.colRef("INGR_YN")) {
  401. var v_ds_yn = datagrid1.valueMatrix(datagrid1.row,datagrid1.colRef("DN_YN"));
  402. if(v_ds_yn == "Y" ) {
  403. alert("该订单正在板坯设计中,请稍候充当...");
  404. model.removenode("/root/gridData/ListResult_1_VO");
  405. model.makeNode("/root/gridData/ListResult_1_VO");
  406. model.refresh();
  407. return;
  408. }
  409. if (!onrowchanged) return;
  410. rowchanged();
  411. onrowchanged = false;
  412. }
  413. ]]>
  414. </script>
  415. <script type="javascript" ev:event="onrowchanged">
  416. <![CDATA[
  417. onrowchanged = true;
  418. ]]>
  419. </script>
  420. <script type="javascript" ev:event="ondblclick">
  421. <![CDATA[
  422. var datagrid = datagrid1;
  423. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  424. ]]>
  425. </script>
  426. </datagrid>
  427. <group id="group2" overflow="hidden" ref="/root/formData/searchInfo2" style="left:0px; top:292px; width:980px; height:35px; ">
  428. <line id="line3" style="x1:0px; y1:0px; x2:980px; y2:0px; "/>
  429. <line id="line4" style="x1:0px; y1:30px; x2:980px; y2:30px; "/>
  430. <caption id="caption201" class="cell" style="left:0px; top:5px; width:90px; height:20px; ">物料类型</caption>
  431. <select1 id="combo201" ref="/root/formData/searchInfo2/MAT_TYPE" appearance="minimal" style="left:92px; top:5px; width:110px; height:20px; ">
  432. <choices>
  433. <item>
  434. <label>板坯</label>
  435. <value>TM</value>
  436. </item>
  437. <item>
  438. <label>钢卷</label>
  439. <value>AR</value>
  440. </item>
  441. </choices>
  442. <script type="javascript" ev:event="xforms-value-changed">
  443. <![CDATA[
  444. rowchanged();
  445. ]]>
  446. </script>
  447. </select1>
  448. <caption id="caption2" class="cell" style="left:212px; top:5px; width:90px; height:20px; ">剩余充当量</caption>
  449. <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; "/>
  450. <select id="checkbox4" ref="/root/initData/COULD_YN" disabled="true" overflow="visible" appearance="full" style="left:425px; top:5px; width:95px; height:20px; border-color:#000000; border-style:solid; ">
  451. <choices>
  452. <item>
  453. <label>允许超量充当</label>
  454. <value>OKTRUE</value>
  455. </item>
  456. </choices>
  457. </select>
  458. </group>
  459. <datagrid id="datagrid2" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" caption="选取^物料号^厂内钢号^成品牌号^物料厚度^物料宽度^物料长度^物料重量^物料内径^物料外径^径宽比^生产日期^余材原因^堆放位置^是否进保温坑^是否取样^最初合同号^最初订单号^钢卷备注^MAT_REP_WGT^钢卷流水号^次品区分" colsep="^" colwidth="35, 100, 93, 100, 80, 80, 80, 80, 80, 80, 100, 100, 100, 100, 45, 40, 80, 45, 100, 100, 100, 100" explorerbar="sortshow" extendlastcol="false" frozencols="2" mergecellsfixedrows="bycolrec" rowheader="select" rowheight="45" rowsep="|" style="left:0px; top:325px; width:980px; height:294px; text-align:center; ">
  460. <col checkvalue="Y,N" key="false" ref="CHK" type="checkbox"/>
  461. <col ref="DSP_NO"/>
  462. <col key="false" ref="STL_GRD" style="text-align:left; "/>
  463. <col key="false" ref="SPEC_STL_GRD" style="text-align:left; "/>
  464. <col ref="MAT_THK" format="#,###.#" style="text-align:right; "/>
  465. <col ref="MAT_WTH" format="#,###.#" style="text-align:right; "/>
  466. <col ref="MAT_LEN" format="#,###.#" style="text-align:right; "/>
  467. <col ref="MAT_WGT" format="#,###.#" style="text-align:right; "/>
  468. <col ref="MAT_INDIA" format="#,###.#" style="text-align:right; "/>
  469. <col ref="MAT_OUTDIA" format="#,###.#" style="text-align:right; "/>
  470. <col ref="JKB" format="#,###.#" style="text-align:right; "/>
  471. <col key="false" ref="MAT_DTIME" format="yyyy-mm-dd"/>
  472. <col key="false" ref="NONORD_CAUSE_CD" style="text-align:left; "/>
  473. <col key="false" ref="CUR_LOAD_LOC"/>
  474. <col ref="KEEPWARM_YN"/>
  475. <col ref="SAMPL_PICK_YN"/>
  476. <col key="false" ref="ORG_ORD_NO"/>
  477. <col key="false" ref="ORG_ORD_SEQ"/>
  478. <col key="false" ref="REM_YARD"/>
  479. <col key="false" ref="MAT_REP_WGT" visibility="hidden"/>
  480. <col ref="MAT_NO" visibility="hidden"/>
  481. <col ref="TOT_GRD_CLF" visibility="hidden"/>
  482. <script type="javascript" ev:event="xforms-value-changed">
  483. <![CDATA[
  484. var datagrid = datagrid2;
  485. var colChk = datagrid.colRef("CHK");
  486. if (datagrid.col != colChk) return;
  487. var row = datagrid.row;
  488. // 可充当的余重
  489. var remWgt = Number(model.getValue("/root/gridData/REM_WGT"));
  490. if (datagrid.valueMatrix(row, colChk) == "Y") {
  491. if (remWgt <= 0 && model.getValue("/root/initData/COULD_YN")!= "OKTRUE") {
  492. alert("已经充当满,不能再充当了!");
  493. datagrid.valueMatrix(row, colChk) = "N";
  494. datagrid.rowStatus(row) = 0;
  495. return;
  496. } else {
  497. remWgt -= Number(datagrid.valueMatrix(row, datagrid.colRef("MAT_REP_WGT")));
  498. }
  499. } else {
  500. remWgt += Number(datagrid.valueMatrix(row, datagrid.colRef("MAT_REP_WGT")));
  501. datagrid.rowStatus(row) = 0;
  502. }
  503. model.setValue("/root/gridData/REM_WGT", remWgt);
  504. //这里选择的时候就给出钢卷备注提示
  505. if (datagrid.valueMatrix(row, colChk) == "Y") {
  506. var REM_YARD = datagrid.valueMatrix(row,datagrid.colRef("REM_YARD"));
  507. if(REM_YARD != ""){
  508. alert("此钢卷存在备注:"+REM_YARD);
  509. }
  510. }
  511. ]]>
  512. </script>
  513. <script type="javascript" ev:event="ondblclick">
  514. <![CDATA[
  515. var datagrid = datagrid2;
  516. window.clipboardData = datagrid.valueMatrix(datagrid.row, datagrid.col);
  517. ]]>
  518. </script>
  519. </datagrid>
  520. <button id="button4" style="left:902px; top:298px; width:70px; height:20px; text-align:right; background-image:../../images/save.gif; ">
  521. <caption>指定充当</caption>
  522. <script type="javascript" ev:event="onclick">
  523. <![CDATA[
  524. go();
  525. ]]>
  526. </script>
  527. </button>
  528. <select id="checkbox1" ref="/root/formData/searchForm/SIGN_QIANGZHI" disabled="false" overflow="visible" appearance="full" style="left:825px; top:297px; width:70px; height:20px; border-style:none; ">
  529. <choices>
  530. <item>
  531. <label>强制充当</label>
  532. <value>Y</value>
  533. </item>
  534. </choices>
  535. </select>
  536. <select id="checkbox7" ref="/root/formData/searchForm/SIGN_CHEN_FEN" disabled="true" overflow="visible" appearance="full" style="left:712px; top:297px; width:55px; height:20px; border-style:none; ">
  537. <choices>
  538. <item>
  539. <label>同成分</label>
  540. <value>Y</value>
  541. </item>
  542. </choices>
  543. </select>
  544. <select id="checkbox8" ref="/root/formData/searchForm/SING_CAIZHI" disabled="true" overflow="visible" appearance="full" style="left:769px; top:297px; width:55px; height:20px; border-style:none; ">
  545. <choices>
  546. <item>
  547. <label>同材质</label>
  548. <value>Y</value>
  549. </item>
  550. </choices>
  551. </select>
  552. <select id="checkbox9" ref="/root/formData/searchInfo2/SIGN_STL" overflow="visible" appearance="full" style="left:656px; top:297px; width:55px; height:20px; border-style:none; ">
  553. <choices>
  554. <item>
  555. <label>同牌号</label>
  556. <value>Y</value>
  557. </item>
  558. </choices>
  559. <script type="javascript" ev:event="xforms-value-changed">
  560. <![CDATA[
  561. rowchanged();
  562. onrowchanged = false;
  563. ]]>
  564. </script>
  565. </select>
  566. <shape id="rectangle5" appearance="rectangle" style="left:529px; top:295px; width:10px; height:20px; background-color:red; "/>
  567. <caption id="caption5" style="left:543px; top:295px; width:53px; height:20px; vertical-align:middle; ">超径宽比</caption>
  568. <shape id="rectangle1" appearance="rectangle" style="left:596px; top:295px; width:10px; height:20px; background-color:#c0c0c0; "/>
  569. <caption id="caption3" style="left:610px; top:295px; width:28px; height:20px; vertical-align:middle; ">次品</caption>
  570. <shape id="rectangle2" appearance="rectangle" style="left:686px; top:50px; width:10px; height:20px; background-color:pink; "/>
  571. <caption id="caption4" style="left:700px; top:50px; width:75px; height:20px; vertical-align:middle; ">板坯设计中</caption>
  572. </xhtml:body>
  573. </xhtml:html>