6a82d3491069435a2a350b46a7d6da9b2b56b2cd.svn-base 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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[ 热轧非计划发货管理 >> 发货处理 >> 日下车计划表(UIJ020100)]]>
  7. </xhtml:title>
  8. <model id="model1">
  9. <instance id="instance1">
  10. <root xmlns="">
  11. <formData>
  12. <DATE/>
  13. <TRANS_TYPE>T</TRANS_TYPE>
  14. <ORD_NO/>
  15. </formData>
  16. <resData/>
  17. <reqData/>
  18. <grid1/>
  19. <datagrid1/>
  20. <DLIV_DIRNO/>
  21. <sumData>
  22. <SUM_COILRST_CNT/>
  23. <SUM_COILRST_WGT/>
  24. </sumData>
  25. </root>
  26. </instance>
  27. </model>
  28. <script type="javascript">
  29. <![CDATA[
  30. function Init(node) {
  31. InitParams(node);
  32. }
  33. //调用公共的初始化方法获得登录用户名
  34. function InitParams(node) {
  35. if (typeof node == "undefined" && typeof node != "object") return;
  36. model.removenode("/root/initData/rcvInfo");
  37. model.makeNode("/root/initData/rcvInfo");
  38. var nodeList = node.childNodes;
  39. node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
  40. for (var i = 0; i < nodeList.length; i++)
  41. node.appendChild(nodeList.item(i));
  42. }
  43. function excelExport(){
  44. return datagrid2;
  45. }
  46. function find(){
  47. commSendReq("/root/formData");
  48. commSubmit("UIJ020100-service","find","glueAction.do");
  49. commAppendData("/root/grid1/FAHUO_RESULT_VO","/root/resData/FAHUO_RESULT_VO");
  50. datagrid1.refresh();
  51. var COIL_CNT = null;
  52. var COIL_WGT = null;
  53. var CUR_LOAD_LOC = null;
  54. var nodeSet1 = datagrid1.nodeset;
  55. for(var i = datagrid1.fixedRows ; i < datagrid1.rows ; i++){
  56. datagrid1.valueMatrix(i,datagrid1.colRef("CHK")) = i-1;
  57. var CNT = datagrid1.valueMatrix(i,datagrid1.colRef("CNT"));
  58. var ACT_WGT = datagrid1.valueMatrix(i,datagrid1.colRef("ACT_WGT"));
  59. //求和
  60. COIL_CNT =Number(COIL_CNT) + Number(CNT);
  61. COIL_WGT =Number(COIL_WGT) + Number(ACT_WGT);
  62. }
  63. //没有值的情况下,不能赋值
  64. if(COIL_CNT == null || COIL_WGT == null){
  65. model.setValue("/root/sumData/SUM_COILRST_CNT",0);
  66. model.setValue("/root/sumData/SUM_COILRST_WGT",0);
  67. model.refresh();
  68. }else{
  69. model.setValue("/root/sumData/SUM_COILRST_CNT",COIL_CNT);
  70. model.setValue("/root/sumData/SUM_COILRST_WGT",COIL_WGT/1000);
  71. model.refresh();
  72. }
  73. for(j=0;j<datagrid1.rows;j++){
  74. CUR_LOAD_LOC = model.getValue(nodeSet1+"["+j+"]/CUR_LOAD_LOC");
  75. if(CUR_LOAD_LOC == "YZ"){
  76. datagrid1.rowStyle((j+1), "data", "background-color") = "#ffff99";
  77. }else{
  78. datagrid1.rowStyle((j+1), "data", "background-color") = "#ffffff";
  79. }
  80. }
  81. datagrid1.refresh();
  82. }
  83. function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
  84. var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
  85. if ( sExcelName == "" ) {
  86. return;
  87. }
  88. //var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
  89. var sCSVName = sExcelName +".csv";
  90. //alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
  91. eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true); //DataGrid? ??? CSV??? ??
  92. ObjTFExcel.launchNewInstance(0); //Execute EXCEL
  93. ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
  94. ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
  95. //Setting up EXCEL Layout.
  96. var nRows = sDGridName.rows - sDGridName.fixedRows + 1; //Keep Careful !!!
  97. var nCols = sDGridName.cols;
  98. //Header
  99. //Line 1 : Sheet Title
  100. //行高的设置
  101. //All of the range
  102. ObjTFExcel.fontcolor ( 01, 01, nRows, nCols ) = "#000000" ;
  103. ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
  104. //取消边框
  105. ObjTFExcel.setBorderColor( 01, 01, nRows, nCols, "#000000") ;
  106. ObjTFExcel.bold ( 01, 01, nRows, nCols ) = true ;
  107. //改变字体大小
  108. ObjTFExcel.fontsize ( 01, 01, nRows, nCols ) = 12 ;
  109. ObjTFExcel.underline ( 01, 01, nRows, nCols ) = 0 ;
  110. ObjTFExcel.valign ( 01, 01, nRows, nCols ) ="middle" ;
  111. //字体居中
  112. ObjTFExcel.halign ( 01, 01, nRows, nCols ) ="center" ;
  113. //Query-Results Data
  114. var iRow = 1; // iRow = HeaderLine + 1;
  115. //这里设置字体的行宽
  116. // for(var i = iRow; i <= nRows; i++ ) {
  117. // if( (i%5) == 1 ) {
  118. // ObjTFExcel.rowHeight( i ) = 60;
  119. // ObjTFExcel.mergeCell( i, 01, i, nCols );
  120. // } else if( (i%5) == 0 ) {
  121. // ObjTFExcel.rowHeight( i ) = 45;
  122. // ObjTFExcel.mergeCell( i, 01, i, nCols );
  123. // } else {
  124. // ObjTFExcel.rowHeight( i ) = 40;
  125. // }
  126. // }
  127. //改变文本格式的方法,未知
  128. //ObjTFExcel.setformat(02,02,02,03,'@');
  129. //设置列的宽度
  130. ObjTFExcel.colwidth ( 01 ) = 5 ;
  131. ObjTFExcel.colwidth ( 02 ) = 10 ;
  132. ObjTFExcel.colwidth ( 03 ) = 20 ;
  133. ObjTFExcel.colwidth ( 04 ) = 10 ;
  134. ObjTFExcel.colwidth ( 05 ) = 15 ;
  135. ObjTFExcel.colwidth ( 06 ) = 10 ;
  136. ObjTFExcel.colwidth ( 07 ) = 10 ;
  137. ObjTFExcel.colwidth ( 08 ) = 5 ;
  138. ObjTFExcel.colwidth ( 09 ) = 5 ;
  139. ObjTFExcel.colwidth ( 10 ) = 10 ;
  140. // ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  141. ObjTFExcel.sheetName(1) = sExcelSheetName;
  142. ObjTFExcel.save(sExcelName); //Saving EXCEL
  143. ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
  144. window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
  145. }
  146. ]]>
  147. </script>
  148. <script type="javascript" src="../../js/boaCommon.js"/>
  149. </xhtml:head>
  150. <xhtml:body style="font-family:宋体; ">
  151. <select1 id="combo1" ref="/root/formData/TRANS_TYPE" appearance="minimal" style="left:220px; top:10px; width:65px; height:20px; ">
  152. <choices>
  153. <item>
  154. <label>火运</label>
  155. <value>T</value>
  156. </item>
  157. <item>
  158. <label>汽运</label>
  159. <value>C</value>
  160. </item>
  161. </choices>
  162. <script type="javascript" ev:event="xforms-value-changed">
  163. <![CDATA[
  164. //find();
  165. ]]>
  166. </script>
  167. </select1>
  168. <input id="input2" ref="/root/formData/DATE" class="input" inputtype="date" style="left:65px; top:10px; width:90px; height:20px; ">
  169. <script type="javascript" ev:event="xforms-value-changed">
  170. <![CDATA[
  171. // if(model.getValue("/root/formData/fromDate") == null || model.getValue("/root/formData/fromDate") == ""){
  172. // model.setValue("/root/formData/fromDate",model.getValue("/root/formData/toDate"));
  173. // input1.refresh();
  174. // }
  175. ]]>
  176. </script>
  177. </input>
  178. <datagrid id="datagrid1" nodeset="/root/grid1/FAHUO_RESULT_VO/FAHUO_RESULT_Row" caption="选择^计划时间^车牌号^到站^收货单位^客户名称^钢种^产品类型^订单厚度^订单宽度^发货数量^重量^发货计划状态^合同号^计划号^是否出口^产线^实际发货时间^出库指示号^合同性质^装车点^承运单位^是否水运^垛位|选择^计划时间^车牌号^到站^收货单位^客户名称^钢种^产品类型^订单厚度^订单宽度^发货数量^重量^发货计划状态^合同号^计划号^是否出口^产线^实际发货时间^出库指示号^合同性质^装车点^承运单位^是否水运^垛位" colsep="^" colwidth="50, 100, 68, 129, 113, 169, 52, 100, 62, 62, 62, 100, 100, 76, 60, 50, 50, 50, 50, 50, 50, 50, 50, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:45px; width:980px; height:355px; ">
  179. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  180. <col ref="PLANDATE" format="yyyy-mm-dd"/>
  181. <col ref="TRANS_CAR_NO"/>
  182. <col ref="STATIONCODE"/>
  183. <col ref="INCEPTCORPCODE"/>
  184. <col ref="BUYERCODE"/>
  185. <col ref="SPEC_STL_GRD"/>
  186. <col ref="PRODNM_CD"/>
  187. <col ref="INSTR_COIL_THK"/>
  188. <col ref="INSTR_COIL_WTH"/>
  189. <col ref="CNT"/>
  190. <col ref="ACT_WGT"/>
  191. <col ref="SHIP_PROG_CD"/>
  192. <col editable="false" ref="PACTNO" type="input"/>
  193. <col editable="false" ref="ORDERNO" type="input"/>
  194. <col editable="false" ref="ISOUT" type="input"/>
  195. <col editable="false" ref="PL" type="input"/>
  196. <col editable="false" ref="REALSENDTIME" type="input"/>
  197. <col editable="false" ref="DLIV_DIRNO" type="input"/>
  198. <col editable="false" ref="TRANSTYPE" type="input"/>
  199. <col editable="false" ref="LOADPOSITION" type="input"/>
  200. <col editable="false" ref="MOTORMANNAME" type="input"/>
  201. <col editable="false" ref="BY_SEA_YN" type="input"/>
  202. <col editable="false" ref="CUR_LOAD_LOC" type="input"/>
  203. <script type="javascript" ev:event="ondblclick">
  204. <![CDATA[
  205. if(combo1.value == "T")return;
  206. //双击事件获取具体计划下面的钢卷信息
  207. model.removenode("/root/reqData");
  208. model.makeNode("/root/reqData");
  209. var nodeSet1 = datagrid1.nodeset
  210. var rw ;
  211. for(var i=0;i<datagrid1.selectedRows;i++){
  212. rw = datagrid1.selectedRow(i);
  213. //把选中行的数字正确的显示
  214. rw = parseInt(rw-1);
  215. }
  216. var DLIV_DIRNO = model.getValue(nodeSet1+"["+rw+"]/DLIV_DIRNO");
  217. model.setValue("/root/DLIV_DIRNO",DLIV_DIRNO);
  218. model.duplicate("/root/reqData","/root/DLIV_DIRNO");
  219. commSubmit("UIJ020100-service","DLIV_COIL","glueAction.do");
  220. commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
  221. model.refresh();
  222. ]]>
  223. </script>
  224. </datagrid>
  225. <caption id="caption1" class="cell" style="left:0px; top:10px; width:65px; height:20px; ">发货日期</caption>
  226. <caption id="caption2" class="cell" style="left:160px; top:10px; width:60px; height:20px; ">发货方式</caption>
  227. <button id="button1" style="left:910px; top:25px; width:70px; height:20px; background-image:../../images/btn_excel.gif; ">
  228. <caption>打印</caption>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. window.print();
  232. ]]>
  233. </script>
  234. </button>
  235. <datagrid id="datagrid2" nodeset="/root/datagrid1/DLIV_COIL_VO/DLIV_COIL_Row" caption="选择^钢卷号^牌号^成品规格^订单规格^卷重(磅重)^合同号^订单号^垛位^到站^收货单位^合同单位^综合判定等级^发货进程状态^发运指示号^炉号^冶炼时间^轧制时间^钢卷颜色备注^标准^ 产品类型^运输方式" colsep="^" colwidth="100, 100, 90, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 87, 100, 100, 100, 100, 100, 200, 100, 100" frozencols="1" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:400px; width:980px; height:205px; ">
  236. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  237. <col ref="OLD_SAMPL_NO" style="text-align:left; "/>
  238. <col ref="SPEC_STL_GRD" style="text-align:left; "/>
  239. <col ref="T_W" style="text-align:right; "/>
  240. <col ref="IT_IW" style="text-align:right; "/>
  241. <col ref="ACT_WGT" style="text-align:right; "/>
  242. <col ref="ORD_NO" style="text-align:left; "/>
  243. <col ref="ORD_SEQ" style="text-align:left; "/>
  244. <col ref="CUR_LOAD_LOC" style="text-align:left; background-color:#ffffff; "/>
  245. <col ref="DEST_PCD_DESC" style="text-align:left; "/>
  246. <col ref="ORD_NM" style="text-align:left; "/>
  247. <col ref="CUST_NM" style="text-align:left; "/>
  248. <col ref="TOT_DEC_GRD" style="text-align:left; "/>
  249. <col ref="CUR_PROG_CD" style="text-align:left; "/>
  250. <col ref="DLIV_DIRNO" style="text-align:left; "/>
  251. <col ref="CHARGE_NO" style="text-align:left; "/>
  252. <col ref="CAS_END_DTIME" style="text-align:left; "/>
  253. <col ref="MILL_DTIME" format="yyyy-mm-dd hh:nn:ss" style="text-align:left; "/>
  254. <col ref="HCOLOUR_REM" style="text-align:left; "/>
  255. <col disabled="false" ref="SPEC_ABBSYM" type="input" style="text-align:left; "/>
  256. <col ref="PRODNM_CD" style="text-align:left; "/>
  257. <col ref="DLIV_TP"/>
  258. </datagrid>
  259. <caption id="caption10" class="cell" style="left:730px; top:25px; width:70px; height:20px; font-weight:bold; background-color:#ffcc00; border-color:#000000; ">重量合计</caption>
  260. <caption id="caption11" style="left:710px; top:26px; width:30px; height:20px; font-weight:bold; ">卷</caption>
  261. <caption id="caption12" style="left:880px; top:25px; width:20px; height:20px; font-weight:bold; ">吨</caption>
  262. <output id="output1" ref="/root/sumData/SUM_COILRST_CNT" style="left:650px; top:25px; width:60px; height:20px; text-align:center; "/>
  263. <caption id="caption9" class="cell" style="left:580px; top:25px; width:70px; height:20px; font-weight:bold; background-color:#ffcc00; border-color:#000000; ">卷数合计</caption>
  264. <output id="output2" ref="/root/sumData/SUM_COILRST_WGT" style="left:800px; top:25px; width:80px; height:20px; text-align:center; "/>
  265. <button id="button2" visibility="hidden" style="left:515px; top:25px; width:60px; height:20px; background-color:#c0c0c0; ">
  266. <caption>预装车</caption>
  267. <script type="javascript" ev:event="DOMActivate">
  268. <![CDATA[
  269. //双击事件获取具体计划下面的钢卷信息
  270. model.removenode("/root/reqData");
  271. model.makeNode("/root/reqData");
  272. //判断,没有选择的情况不能进行保存
  273. var nodeSet2 = datagrid2.nodeset;
  274. var mark = "N";
  275. var DLIV_TP = null;
  276. for(var i=0;i<datagrid2.rows;i++){
  277. var chk = model.getValue(nodeSet2+"["+i+"]/CHK");
  278. DLIV_TP = model.getValue(nodeSet2+"["+i+"]/DLIV_TP");
  279. if(chk != null && chk == "Y"){
  280. if(DLIV_TP == "T"){
  281. //存在一个没有选择的都不能进行预装车
  282. mark = "Y";
  283. }else{
  284. mark = "C";
  285. }
  286. }
  287. }
  288. if(mark == "Y"){
  289. commMultiUpdate(datagrid2,"/root/reqData","A",true,"rowStatus");
  290. //这里加入登录用户名,会不会与已有的initData冲突
  291. model.makeValue("/root/reqData/REG_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
  292. commSubmit("UIJ020100-service","YZ","glueAction.do");
  293. commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
  294. model.refresh();
  295. find();
  296. }else if(mark == "C"){
  297. alert(" 汽车运输的情况不能进行预装操作,请确认后再进行预装车操作! ");
  298. return;
  299. }else{
  300. alert(" 存在整车没有选择的计划,请确认后再进行预装车操作! ");
  301. return;
  302. }
  303. ]]>
  304. </script>
  305. </button>
  306. <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:820px; top:0px; width:155px; height:19px; "/>
  307. <caption id="caption14" class="cell" style="left:290px; top:10px; width:55px; height:20px; font-weight:bold; border-color:#000000; ">合同号</caption>
  308. <input id="input1" ref="/root/formData/ORD_NO" maxlength="12" style="left:345px; top:10px; width:100px; height:20px; "/>
  309. <button id="button3" visibility="hidden" style="left:450px; top:25px; width:60px; height:20px; background-color:#c0c0c0; ">
  310. <caption>导出上</caption>
  311. <script type="javascript" ev:event="DOMActivate">
  312. <![CDATA[
  313. //导出EXCEL方法
  314. saveExcelScript(datagrid1,"Sheet1");
  315. ]]>
  316. </script>
  317. </button>
  318. <button id="button4" style="left:745px; top:0px; width:70px; height:20px; background-image:../../images/btn_excel.gif; ">
  319. <caption>确认</caption>
  320. <script type="javascript" ev:event="DOMActivate">
  321. <![CDATA[
  322. var shipDirNOs = "";
  323. for(var i = datagrid1.fixedRows ; i < datagrid1.rows + datagrid1.fixedRows -1 ; i++){
  324. if(datagrid1.valueMatrix(i,datagrid1.colRef("CHK")) == "Y"){
  325. shipDirNOs = shipDirNOs + datagrid1.valueMatrix(i,datagrid1.colRef("DLIV_DIRNO")) + "|";
  326. }
  327. }
  328. //双击事件获取具体计划下面的钢卷信息
  329. model.removenode("/root/reqData");
  330. model.makeNode("/root/reqData");
  331. model.setValue("/root/DLIV_DIRNO",shipDirNOs);
  332. model.duplicate("/root/reqData","/root/DLIV_DIRNO");
  333. commSubmit("UIJ020100-service","DLIV_COIL2","glueAction.do");
  334. commAppendData("/root/datagrid1/DLIV_COIL_VO","/root/resData/DLIV_COIL_VO");
  335. model.refresh();
  336. ]]>
  337. </script>
  338. </button>
  339. <button id="button5" visibility="hidden" style="left:430px; top:145px; width:100px; height:20px; ">
  340. <caption>button5</caption>
  341. <script type="javascript" ev:event="onclick">
  342. <![CDATA[
  343. find();
  344. ]]>
  345. </script>
  346. </button>
  347. </xhtml:body>
  348. </xhtml:html>