6dcffe2353027f50d188b4621d3a359083528d94.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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>车辆号</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <resData/>
  10. <reqData/>
  11. <DLIV_TP/>
  12. <ORD_NO/>
  13. <CAR_NO/>
  14. <datagrid1>
  15. <CHK/>
  16. <COIL_NO/>
  17. <COIL_WGT/>
  18. <DEST_CD/>
  19. </datagrid1>
  20. <DLIV_DIRNO/>
  21. <CUST_NM/>
  22. <ORD_NM/>
  23. <EXLV_LINE_CD/>
  24. <REG_ID/>
  25. <ORD_SEQ/>
  26. <formData>
  27. <R_ORD_NO/>
  28. <R_ORD_SEQ/>
  29. <R_MAT_NO/>
  30. <SIGN_STL/>
  31. <SIGN_CHEN_FEN/>
  32. <SING_CAIZHI/>
  33. <SIGN_QIANGZHI/>
  34. <P_REG_ID/>
  35. </formData>
  36. <ORD_YN>Y</ORD_YN>
  37. <WK>
  38. <ENTRY_SHIFT/>
  39. <ENTRY_GROUP/>
  40. <ENTRY_REG/>
  41. <ENTRY_DTIME/>
  42. </WK>
  43. </root>
  44. </instance>
  45. <script type="javascript" ev:event="xforms-ready">
  46. <![CDATA[
  47. ]]>
  48. </script>
  49. </model>
  50. <script type="javascript" src="../../js/boaMsg.js"/>
  51. <script type="javascript" src="../../js/boaCommon.js"/>
  52. </xhtml:head>
  53. <xhtml:body pagewidth="650" pageheight="500">
  54. <caption id="caption8" class="cell" style="left:0px; top:40px; width:75px; height:20px; "/>
  55. <caption id="caption7" class="cell" style="left:395px; top:40px; width:75px; height:20px; "/>
  56. <caption id="caption6" class="cell" style="left:250px; top:40px; width:115px; height:20px; "/>
  57. <caption id="caption2" class="cell" style="left:470px; top:40px; width:75px; height:20px; "/>
  58. <caption id="caption1" class="cell" style="left:545px; top:40px; width:65px; height:20px; "/>
  59. <datagrid id="datagrid1" nodeset="/root/datagrid1/YZCCoil_VO/YZCCoil_Row" caption="选择^钢卷号^重量^到站" colsep="^" colwidth="110, 179, 167, 152" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:60px; width:610px; height:215px; ">
  60. <col checkvalue="Y,N" ref="CHK" type="checkbox" style="background-color:#ffff99; "/>
  61. <col ref="COIL_NO" type="input" maxlength="13" style="background-color:#ffff99; "/>
  62. <col ref="COIL_WGT" type="input" format="#,###" style="background-color:#ffff99; "/>
  63. <col ref="DEST_CD" type="input" maxlength="20" style="background-color:#ffff99; "/>
  64. <hint>
  65. <![CDATA[同车的钢卷不同合同号时,需要分开两次输入]]>
  66. </hint>
  67. </datagrid>
  68. <caption id="caption4" class="cell" style="left:0px; top:5px; width:60px; height:20px; ">车辆号</caption>
  69. <input id="input3" ref="/root/CAR_NO" maxlength="20" style="left:60px; top:5px; width:80px; height:20px; background-color:#ffff99; "/>
  70. <caption id="caption3" class="cell" style="left:140px; top:5px; width:55px; height:20px; ">合同号</caption>
  71. <input id="input2" ref="/root/ORD_NO" style="left:195px; top:5px; width:100px; height:20px; background-color:#ffff99; ">
  72. <hint>
  73. <![CDATA[老系统的合同号为月份+合同号的后4位。新系统的合同号必须输入合同号加订单号]]>
  74. </hint>
  75. </input>
  76. <select1 id="combo4" ref="/root/DLIV_TP" appearance="minimal" style="left:535px; top:5px; width:70px; height:20px; background-color:#ffff99; ">
  77. <choices>
  78. <item>
  79. <label>公路(车辆)</label>
  80. <value>C</value>
  81. </item>
  82. <item>
  83. <label>铁路(火车)</label>
  84. <value>T</value>
  85. </item>
  86. </choices>
  87. </select1>
  88. <caption id="caption9" class="cell" style="left:470px; top:5px; width:65px; height:20px; ">运输方式</caption>
  89. <button id="button1" style="left:545px; top:40px; width:65px; height:20px; ">
  90. <caption>确定</caption>
  91. <script type="javascript" ev:event="DOMActivate">
  92. <![CDATA[
  93. model.removenode("/root/reqData");
  94. model.makeNode("/root/reqData");
  95. var opp1 = window.opener;
  96. //这里需要获取前面页面的班次、组、工作人、出库时间
  97. model.setValue("/root/REG_ID",opp1.model.getValue("/root/REG_ID"));
  98. model.setValue("/root/WK/ENTRY_SHIFT",opp1.model.getValue("/root/WK/ENTRY_SHIFT"));
  99. model.setValue("/root/WK/ENTRY_GROUP",opp1.model.getValue("/root/WK/ENTRY_GROUP"));
  100. model.setValue("/root/WK/ENTRY_REG",opp1.model.getValue("/root/WK/ENTRY_REG"));
  101. model.setValue("/root/WK/ENTRY_DTIME",opp1.model.getValue("/root/WK/ENTRY_DTIME"));
  102. model.refresh();
  103. if(model.getValue("/root/ORD_NO") == ""){
  104. alert("合同号必须输入,老系统输入月份+后4位。新系统必须输全!");
  105. return;
  106. }
  107. if(model.getValue("/root/ORD_SEQ") == ""){
  108. alert("订单号必须输入,请通过新老系统合同转换获得!!");
  109. return;
  110. }
  111. //这里需要给出提示,充当存在风险,请确认好再进行
  112. var isUse = commComfirmBox("这里用的是强制充当功能,请确认待发的卷是否满足合同的牌号,规格,重量上下限等相应条件?","提示");
  113. if(isUse == "0"){
  114. //如果选择否的话,不进行相应操作
  115. //find();
  116. //bool1.value = "true";
  117. return;
  118. }
  119. var nodeSet1 = datagrid1.nodeset;
  120. for(var i=1;i<datagrid1.rows;i++){
  121. //这里增加了选择标志,所以只处理选择了的钢卷
  122. var chk = model.getValue(nodeSet1+"["+i+"]/CHK");
  123. if(chk == "Y"){
  124. var coil_no = model.getValue(nodeSet1+"["+i+"]/COIL_NO");
  125. if(coil_no != null){
  126. var ord_no = model.getValue("/root/ORD_NO");
  127. var ord_seq = model.getValue("/root/ORD_SEQ");
  128. var P_REG_ID = model.getValue("/root/WK/ENTRY_REG");
  129. model.setValue("/root/formData/R_ORD_NO",ord_no);
  130. model.setValue("/root/formData/R_ORD_SEQ",ord_seq);
  131. model.setValue("/root/formData/R_MAT_NO",coil_no);
  132. model.setValue("/root/formData/SIGN_STL","N");
  133. model.setValue("/root/formData/SIGN_CHEN_FEN","N");
  134. model.setValue("/root/formData/SING_CAIZHI","N");
  135. model.setValue("/root/formData/SIGN_QIANGZHI","Y");
  136. model.setValue("/root/formData/P_REG_ID",P_REG_ID);
  137. commSendReq("/root/formData");
  138. commSubmit("UIE031046-service","save","glueAction.do");
  139. if (model.getValue("/root/resData/errorData") != "") {
  140. //alert(model.getValue("/root/resData/errorData"));
  141. output1.value = model.getValue("/root/resData/errorData");
  142. alert("请查看充当错误提示信息!!");
  143. return;
  144. }
  145. }
  146. }
  147. }
  148. // alert("1 :"+model.getValue("/root/formData/R_ORD_NO"));
  149. // alert("2 :"+model.getValue("/root/formData/R_ORD_SEQ"));
  150. // alert("3 :"+model.getValue("/root/formData/R_MAT_NO"));
  151. // alert("4 :"+model.getValue("/root/formData/SIGN_STL"));
  152. // alert("5 :"+model.getValue("/root/formData/P_REG_ID"));
  153. if (model.getValue("/root/resData/errorData") != "") {
  154. //alert(model.getValue("/root/resData/errorData"));
  155. output1.value = model.getValue("/root/resData/errorData");
  156. alert("请查看充当错误提示信息!!");
  157. return;
  158. }else{
  159. // //保存需要出库的数据
  160. model.removenode("/root/reqData");
  161. model.makeNode("/root/reqData");
  162. model.duplicate("/root/reqData","/root/REG_ID");
  163. model.duplicate("/root/reqData","/root/DLIV_TP");
  164. model.duplicate("/root/reqData","/root/ORD_NO");
  165. model.duplicate("/root/reqData","/root/CAR_NO");
  166. model.duplicate("/root/reqData","/root/DLIV_DIRNO");
  167. model.duplicate("/root/reqData","/root/CUST_NM");
  168. model.duplicate("/root/reqData","/root/ORD_NM");
  169. model.duplicate("/root/reqData","/root/EXLV_LINE_CD");
  170. model.duplicate("/root/reqData","/root/WK/ENTRY_SHIFT");
  171. model.duplicate("/root/reqData","/root/WK/ENTRY_GROUP");
  172. model.duplicate("/root/reqData","/root/WK/ENTRY_REG");
  173. model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
  174. for(var i=0;i<datagrid1.rows;i++){
  175. datagrid1.rowStatus(i) = 3;
  176. }
  177. commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  178. commSubmit("UIH050800-service", "save", "glueAction.do");
  179. alert(" 出库成功!!! ");
  180. window.close();
  181. }
  182. ]]>
  183. </script>
  184. </button>
  185. <button id="button2" style="left:470px; top:40px; width:75px; height:20px; ">
  186. <caption>增加行</caption>
  187. <script type="javascript" ev:event="onclick">
  188. <![CDATA[
  189. //点击按钮,在表格的选中位置增加行
  190. datagrid1.addRow();
  191. var nodeSet1 = datagrid1.nodeset;
  192. for(var i=1;i<datagrid1.rows;i++){
  193. model.setValue(nodeSet1+"["+i+"]/COIL_NO","R9-00");
  194. model.refresh();
  195. }
  196. // var rw;
  197. // for(var i=0;i<=datagrid1.selectedRows;i++){
  198. // rw = datagrid1.selectedRow(i);
  199. //
  200. // if(Number(rw) == Number(datagrid1.Rows-1)){
  201. // //如果选中的是最后一行,在后面新加一行
  202. // datagrid1.addRow();
  203. // }else{
  204. // //如果不是最后一行的话,在选中行的下面加入一行
  205. // datagrid1.insertRow(Number(rw+1));
  206. // }
  207. // }
  208. ]]>
  209. </script>
  210. </button>
  211. <caption id="caption5" class="cell" style="left:295px; top:5px; width:50px; height:20px; ">订单号</caption>
  212. <input id="input1" ref="/root/ORD_SEQ" style="left:345px; top:5px; width:45px; height:20px; background-color:#ffff99; ">
  213. <hint>
  214. <![CDATA[老系统的合同号为月份+合同号的后4位。新系统的合同号必须输入合同号加订单号]]>
  215. </hint>
  216. </input>
  217. <output id="output1" style="left:0px; top:285px; width:610px; height:200px; ">
  218. <hint>
  219. <![CDATA[钢卷充当错误提示的信息]]>
  220. </hint>
  221. </output>
  222. <button id="button3" style="left:250px; top:40px; width:115px; height:20px; ">
  223. <caption>新老系统合同号转换</caption>
  224. <script type="javascript" ev:event="onclick">
  225. <![CDATA[
  226. // //根据输入的合同号和钢卷来获取合同号和订单号
  227. // model.removenode("/root/reqData");
  228. // model.makeNode("/root/reqData");
  229. //
  230. // if(model.getValue("/root/ORD_NO") == ""){
  231. // alert(" 合同号必须输入,请确认后再点击转换按钮!!! ");
  232. // return;
  233. // }
  234. //
  235. // model.duplicate("/root/reqData","/root/ORD_NO");
  236. // model.duplicate("/root/reqData","/root/ORD_N_O");
  237. //
  238. // for(var i=0;i<datagrid1.rows;i++){
  239. // datagrid1.rowStatus(i) = 3;
  240. // }
  241. //
  242. // commMultiUpdate(datagrid1,"/root/reqData","A",true,"rowStuts");
  243. //
  244. // commSubmit("UIH050800-service", "save", "glueAction.do");
  245. if(model.getValue("/root/ORD_NO") == ""){
  246. alert(" 合同号为必输项,请输入后再点击转换按钮! ");
  247. return;
  248. }
  249. if(model.getValue("/root/ORD_YN") == ""){
  250. alert(" 转换标志位为必输项,请选择新老系统合同标志再点击转换按钮! ");
  251. return;
  252. }
  253. window.load("./UIH05_ORD_NO.xrw", "modal", "modalWin", "left:400; top:100; width:650px; height:500px");
  254. ]]>
  255. </script>
  256. </button>
  257. <select1 id="combo1" ref="/root/ORD_YN" appearance="minimal" style="left:390px; top:5px; width:80px; height:20px; background-color:#ffff99; ">
  258. <choices>
  259. <item>
  260. <label>老系统合同号</label>
  261. <value>Y</value>
  262. </item>
  263. <item>
  264. <label>新系统合同号</label>
  265. <value>N</value>
  266. </item>
  267. </choices>
  268. </select1>
  269. <button id="button4" style="left:395px; top:40px; width:75px; height:20px; ">
  270. <caption>取消行</caption>
  271. <script type="javascript" ev:event="onclick">
  272. <![CDATA[
  273. //点击按钮,在表格的选中位置增加行
  274. var nodeSet1 = datagrid1.nodeset;
  275. var row = null;
  276. for(var i=0;i<datagrid1.selectedRows;i++){
  277. row = datagrid1.selectedRow(i);
  278. }
  279. if(row != null){
  280. datagrid1.deleteRow(row);
  281. }
  282. datagrid1.refresh();
  283. ]]>
  284. </script>
  285. <hint>
  286. <![CDATA[删除鼠标选中的行]]>
  287. </hint>
  288. </button>
  289. <button id="button5" style="left:0px; top:40px; width:75px; height:20px; ">
  290. <caption>预装车卷查询</caption>
  291. <script type="javascript" ev:event="onclick">
  292. <![CDATA[
  293. model.removenode("/root/reqData");
  294. model.makeNode("/root/reqData");
  295. //这里需要清空datagrid1
  296. model.removenode("/root/datagrid1");
  297. model.makeNode("/root/datagrid1");
  298. commSubmit("UIH050800-service", "searchYZC", "glueAction.do");
  299. commAppendData("/root/datagrid1/YZCCoil_VO","/root/resData/YZCCoil_VO");
  300. model.refresh();
  301. ]]>
  302. </script>
  303. </button>
  304. </xhtml:body>
  305. </xhtml:html>