f9363e9b74d89bb76ffca2d160943453ef1b7e1a.svn-base 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441
  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. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <formData>
  10. <ShipProgCd/>
  11. <ShipDirNo/>
  12. <DlivDirNo/>
  13. <DlivType/>
  14. <CoilProgCd>%</CoilProgCd>
  15. <CAR_NO/>
  16. </formData>
  17. <gridData1/>
  18. <LOVData>
  19. <ShipDirNo/>
  20. <DlivDirNo/>
  21. <DlivType/>
  22. </LOVData>
  23. <resData/>
  24. <reqData/>
  25. <sumData>
  26. <SUM_ORD_WGT/>
  27. <SUM_NEED_WGT/>
  28. <SUM_COIL_CNT/>
  29. <SUM_TOT_SLAB_WGT/>
  30. <SUM_SLABRST_CNT/>
  31. <SUM_SLABRST_WGT/>
  32. <SUM_COILRST_WGT/>
  33. </sumData>
  34. <gridData2/>
  35. <EXCELHead>
  36. <ListResult_1_VO>
  37. <ListResult_1_Row>
  38. <col1>新余钢铁股份有限公司钢卷发货明细单(火车)</col1>
  39. <col2/>
  40. <col3/>
  41. <col4/>
  42. <col5/>
  43. <col6/>
  44. <col7/>
  45. <col8/>
  46. </ListResult_1_Row>
  47. <ListResult_1_Row>
  48. <col1>合 同 号:</col1>
  49. <col2/>
  50. <col3/>
  51. <col4>发货单号:</col4>
  52. <col5/>
  53. <col6/>
  54. <col7/>
  55. <col8/>
  56. </ListResult_1_Row>
  57. <ListResult_1_Row>
  58. <col1>用户编码:</col1>
  59. <col2/>
  60. <col3/>
  61. <col4>发货日:</col4>
  62. <col5/>
  63. <col6/>
  64. <col7/>
  65. <col8/>
  66. </ListResult_1_Row>
  67. <ListResult_1_Row>
  68. <col1>用户名称:</col1>
  69. <col2/>
  70. <col3/>
  71. <col4>到站:</col4>
  72. <col5/>
  73. <col6>制表:</col6>
  74. <col7/>
  75. <col8/>
  76. </ListResult_1_Row>
  77. <ListResult_1_Row>
  78. <col1>计划单号:</col1>
  79. <col2/>
  80. <col3/>
  81. <col4>车号:</col4>
  82. <col5/>
  83. <col6>收货单位:</col6>
  84. <col7/>
  85. <col8/>
  86. </ListResult_1_Row>
  87. <ListResult_1_Row>
  88. <col1>发货备注:</col1>
  89. <col2/>
  90. <col3/>
  91. <col4>产品名称:</col4>
  92. <col5/>
  93. <col6>标准:</col6>
  94. <col7/>
  95. <col8/>
  96. </ListResult_1_Row>
  97. <ListResult_1_Row>
  98. <col1>轧批号</col1>
  99. <col2>钢号</col2>
  100. <col3>规格(厚*宽)mm</col3>
  101. <col4>重量(吨)</col4>
  102. <col5>钢卷号</col5>
  103. <col6>等级</col6>
  104. <col7>性能</col7>
  105. <col8>草支垫</col8>
  106. </ListResult_1_Row>
  107. </ListResult_1_VO>
  108. </EXCELHead>
  109. <EXCELHeadCAR>
  110. <ListResult_1_VO>
  111. <ListResult_1_Row>
  112. <col1>新余钢铁股份有限公司钢卷发货明细单(汽车)</col1>
  113. <col2/>
  114. <col3/>
  115. <col4/>
  116. <col5/>
  117. <col6/>
  118. <col7/>
  119. <col8/>
  120. </ListResult_1_Row>
  121. <ListResult_1_Row>
  122. <col1>合 同 号:</col1>
  123. <col2/>
  124. <col3/>
  125. <col4>发货单号:</col4>
  126. <col5/>
  127. <col6/>
  128. <col7/>
  129. <col8/>
  130. </ListResult_1_Row>
  131. <ListResult_1_Row>
  132. <col1>用户编码:</col1>
  133. <col2/>
  134. <col3/>
  135. <col4>发货日:</col4>
  136. <col5/>
  137. <col6/>
  138. <col7/>
  139. <col8/>
  140. </ListResult_1_Row>
  141. <ListResult_1_Row>
  142. <col1>用户名称:</col1>
  143. <col2/>
  144. <col3/>
  145. <col4>到站:</col4>
  146. <col5/>
  147. <col6>制表:</col6>
  148. <col7/>
  149. <col8/>
  150. </ListResult_1_Row>
  151. <ListResult_1_Row>
  152. <col1>计划单号:</col1>
  153. <col2/>
  154. <col3/>
  155. <col4>车号:</col4>
  156. <col5/>
  157. <col6>收货单位:</col6>
  158. <col7/>
  159. <col8/>
  160. </ListResult_1_Row>
  161. <ListResult_1_Row>
  162. <col1>发货备注:</col1>
  163. <col2/>
  164. <col3/>
  165. <col4>产品名称:</col4>
  166. <col5/>
  167. <col6>标准:</col6>
  168. <col7/>
  169. <col8/>
  170. </ListResult_1_Row>
  171. <ListResult_1_Row>
  172. <col1>轧批号</col1>
  173. <col2>钢号</col2>
  174. <col3>规格(厚*宽)mm</col3>
  175. <col4>重量(吨)</col4>
  176. <col5>钢卷号</col5>
  177. <col6>等级</col6>
  178. <col7>性能</col7>
  179. <col8>草支垫</col8>
  180. </ListResult_1_Row>
  181. </ListResult_1_VO>
  182. </EXCELHeadCAR>
  183. <WK>
  184. <ENTRY_SHIFT/>
  185. <ENTRY_GROUP/>
  186. <ENTRY_REG/>
  187. <ENTRY_DTIME/>
  188. <ROUTE/>
  189. </WK>
  190. <CZD/>
  191. </root>
  192. </instance>
  193. <script type="javascript" src="../../js/boaCommon.js"/>
  194. <script type="javascript" src="../../js/boaMsg.js"/>
  195. <script type="javascript" src="../../js/mesCommon.js"/>
  196. <script type="javascript" src="../../js/dCommon.js"/>
  197. <script type="javascript" ev:event="xforms-ready">
  198. <![CDATA[
  199. ]]>
  200. </script>
  201. <script type="javascript">
  202. <![CDATA[
  203. //1、获取用户登录信息,只能在页面初始化函数中调用
  204. function InitParams(node)
  205. {
  206. if (typeof node == "undefined" && typeof node != "object") return;
  207. model.removenode("/root/initData/rcvInfo");
  208. model.makeNode("/root/initData/rcvInfo");
  209. var nodeList = node.childNodes;
  210. for (var i = 0; i < nodeList.length; i++)
  211. model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
  212. }
  213. //2. 页面初始化函数(必须)
  214. function Init(node)
  215. {
  216. InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
  217. // 在程序中会重建该节点,最好不要重名
  218. // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
  219. //...
  220. }
  221. //3、页面标题
  222. function setTitle()
  223. {
  224. return "热轧非计划发货管理->发货处理->发货实绩录入与发行装车明细(UIJ020400)"; // 如:return "进程管理 >> 订单进程现况查询";
  225. }
  226. function lpad(str, len, fill) {
  227. if (fill == null) fill = " ";
  228. str = str + "";
  229. while( str.length < len ) {
  230. str = fill + str;
  231. }
  232. return str;
  233. }
  234. function calculateSummary() {
  235. //暂时系统没有做处理
  236. model.setXPathValue("/root/sumData/SUM_ORD_WGT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/ORD_WGT )");
  237. model.setXPathValue("/root/sumData/SUM_NEED_WGT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/NEED_WGT )");
  238. model.setXPathValue("/root/sumData/SUM_COIL_CNT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/COIL_CNT )");
  239. model.setXPathValue("/root/sumData/SUM_TOT_SLAB_WGT","sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/TOT_SLAB_WGT )");
  240. model.setXPathValue("/root/sumData/SUM_SLABRST_CNT" ,"count(/root/gridData2/ListResult_2_VO/ListResult_2_Row )");
  241. model.setXPathValue("/root/sumData/SUM_SLABRST_WGT" ,"sum(/root/gridData2/ListResult_2_VO/ListResult_2_Row/SLAB_WGT )");
  242. model.setXPathValue("/root/sumData/SUM_COILRST_WGT" ,"sum(/root/gridData2/ListResult_2_VO/ListResult_2_Row/COIL_WGT )");
  243. }
  244. function find() {
  245. model.removeNodeset(dg1.nodeset);
  246. model.refresh();
  247. model.setValue("/root/formData/CoilProgCd","%");
  248. if( ShipProgCd.value == "" ){
  249. alert(" 状态区分必须选择,否则将导致数据量过大!! ");
  250. return;
  251. }
  252. if( ShipProgCd.value == "06" ){
  253. model.setValue("/root/formData/CoilProgCd","SFB");
  254. }
  255. if( ShipProgCd.value == "07" || ShipProgCd.value == "08" || ShipProgCd.value == "09"){
  256. model.setValue("/root/formData/CoilProgCd","SFF");
  257. //这里加入出库时间条件,减少数据量
  258. if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
  259. alert(" 出库时间需要选择,否则将导致数据量过大。不便于查找!!! ");
  260. return;
  261. }
  262. }
  263. commSendReq("/root/formData");
  264. model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
  265. commSubmit("UIJ020400-service" ,"find" ,"glueAction.do" );
  266. commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  267. //calculateSummary();
  268. model.refresh();
  269. dg1.isSelected( dg1.fixedRows ) = true;
  270. dg1.refresh();
  271. }
  272. function save() {
  273. model.removeNodeset("/root/reqData");
  274. model.makeNode("/root/reqData");
  275. //这里判断不为空
  276. if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
  277. alert(" 出库班次信息不能为空,请选择相应的出库班次! ");
  278. return;
  279. }
  280. if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
  281. alert(" 出库班组信息不能为空,请选择相应的出库班组信息!! ");
  282. return;
  283. }
  284. if(model.getValue("/root/WK/ENTRY_REG") == ""){
  285. alert(" 出库人信息不能为空,请选择相应的出库人信息!! ");
  286. return;
  287. }
  288. if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
  289. alert(" 出库时间信息不能为空,请输入相应的出库时间信息!! ");
  290. return;
  291. }
  292. if(model.getValue("/root/CZD") == ""){
  293. alert(" 草支垫重量必须输入,请输入相应的草支垫重量 ");
  294. return;
  295. }
  296. //判断卷重和车号不为空
  297. var nodeSet1 = dg1.nodeset;
  298. for(var j=1;j<dg1.rows;j++){
  299. var chk = model.getValue(nodeSet1+"["+j+"]/CHK");
  300. if(chk == "Y"){
  301. var COIL_WGT = model.getValue(nodeSet1+"["+j+"]/COIL_WGT");
  302. var TRANS_CAR_NO = model.getValue(nodeSet1+"["+j+"]/TRANS_CAR_NO");
  303. if(COIL_WGT == ""){
  304. alert("第"+j+"行的卷重数据为空,请核对后再点击保存按钮!");
  305. return;
  306. }
  307. if(TRANS_CAR_NO == ""){
  308. alert("第"+j+"行的车号数据为空,请核对后再点击保存按钮!");
  309. return;
  310. }
  311. }
  312. }
  313. var nRows = 1;
  314. var nCnt = dg1.rows - dg1.fixedRows + 1;
  315. for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
  316. //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
  317. if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "06" ) {
  318. //如果行选中,并且钢卷公共表中体现行车命令执行完
  319. dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "07";
  320. //发货指示号
  321. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_DIRNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
  322. //运输指示号
  323. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DLIV_DIRNO" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
  324. //车辆号
  325. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
  326. //装车地点
  327. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_ON_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_ON_PCD" )) );
  328. //目的地
  329. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEST_PCD" , dg1.valueMatrix(i, dg1.colRef("DEST_PCD" )) );
  330. //专用线
  331. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXLV_LINE_CD" , dg1.valueMatrix(i, dg1.colRef("EXLV_LINE_CD" )) );
  332. //卸车地点
  333. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_OFF_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_OFF_PCD" )) );
  334. //水运区分
  335. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BY_SEA_YN" , dg1.valueMatrix(i, dg1.colRef("BY_SEA_YN" )) );
  336. //出发港 这里把编码规则转换成描述便于理解
  337. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEPARTURE_CD" , dg1.valueMatrix(i, dg1.colRef("DEPARTURE_CD" )) );
  338. //到达港
  339. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ARRIVAL_CD" , dg1.valueMatrix(i, dg1.colRef("ARRIVAL_CD" )) );
  340. //生产钢卷号
  341. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
  342. //综合判定等级
  343. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
  344. //钢卷重量
  345. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT" )) );
  346. //钢卷外径
  347. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
  348. //发货清单号码
  349. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
  350. //品质保证书
  351. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
  352. //发货时间
  353. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRNF_DTIME" , dg1.valueMatrix(i, dg1.colRef("TRNF_DTIME" )) );
  354. //钢卷公共表中的状态字段
  355. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
  356. //标准钢号
  357. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
  358. //钢卷公共中的当前状态做前状态使用
  359. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD" )) );
  360. //状态改变时间
  361. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_DTIME" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_DTIME")) );
  362. //状态改变人
  363. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_PGM" )) );
  364. //合同号
  365. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
  366. //订单号
  367. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
  368. //运输公司编码
  369. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_COMP_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_COMP_CD" )) );
  370. //钢卷状态
  371. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_STAT" , dg1.valueMatrix(i, dg1.colRef("COIL_STAT" )) );
  372. //当前状态 SFF
  373. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD" )) );
  374. //当前状态修改人 UIJ010060
  375. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD_PGM" )) );
  376. //登录人
  377. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID") );
  378. //火运汽运标志
  379. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivType" , dg1.valueMatrix(i, dg1.colRef("DLIV_TP" )) );
  380. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
  381. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
  382. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
  383. nRows++;
  384. }
  385. }
  386. if( nRows > 1 ) {
  387. //这里加入班次、班组、出库人、时间
  388. model.duplicate("/root/reqData","/root/WK/ENTRY_SHIFT");
  389. model.duplicate("/root/reqData","/root/WK/ENTRY_GROUP");
  390. model.duplicate("/root/reqData","/root/WK/ENTRY_REG");
  391. model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
  392. model.duplicate("/root/reqData","/root/CZD");
  393. commSubmit("UIJ020400-service" ,"save" ,"glueAction.do" );
  394. commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  395. // calculateSummary();
  396. }
  397. model.refresh();
  398. }
  399. //打印的时候,必须改变相应的发货表的发货状态和钢卷公共表的发货状态
  400. //这里保存和打印使用的方法是一样的,只是传入的参数不同
  401. function print(){
  402. model.removeNodeset("/root/reqData");
  403. model.makeNode("/root/reqData");
  404. var nRows = 1;
  405. var nCnt = dg1.rows - dg1.fixedRows + 1;
  406. for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
  407. //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
  408. if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "07" ) {
  409. //如果行选中,并且钢卷公共表中体现行车命令执行完
  410. //打印的话,必须改为08
  411. dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "08";
  412. //发货指示号
  413. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_DIRNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
  414. //运输指示号
  415. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DLIV_DIRNO" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
  416. //车辆号
  417. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
  418. //装车地点
  419. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_ON_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_ON_PCD" )) );
  420. //目的地
  421. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEST_PCD" , dg1.valueMatrix(i, dg1.colRef("DEST_PCD" )) );
  422. //专用线
  423. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXLV_LINE_CD" , dg1.valueMatrix(i, dg1.colRef("EXLV_LINE_CD" )) );
  424. //卸车地点
  425. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_OFF_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_OFF_PCD" )) );
  426. //水运区分
  427. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BY_SEA_YN" , dg1.valueMatrix(i, dg1.colRef("BY_SEA_YN" )) );
  428. //出发港 这里把编码规则转换成描述便于理解
  429. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEPARTURE_CD" , dg1.valueMatrix(i, dg1.colRef("DEPARTURE_CD" )) );
  430. //到达港
  431. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ARRIVAL_CD" , dg1.valueMatrix(i, dg1.colRef("ARRIVAL_CD" )) );
  432. //生产钢卷号
  433. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
  434. //综合判定等级
  435. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
  436. //钢卷重量
  437. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT" )) );
  438. //钢卷外径
  439. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
  440. //发货清单号码
  441. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
  442. //品质保证书
  443. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
  444. //发货时间
  445. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRNF_DTIME" , dg1.valueMatrix(i, dg1.colRef("TRNF_DTIME" )) );
  446. //钢卷公共表中的状态字段
  447. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
  448. //标准钢号
  449. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
  450. //钢卷公共中的当前状态做前状态使用
  451. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD" )) );
  452. //状态改变时间
  453. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_DTIME" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_DTIME")) );
  454. //状态改变人
  455. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_PGM" )) );
  456. //合同号
  457. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
  458. //订单号
  459. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
  460. //运输公司编码
  461. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_COMP_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_COMP_CD" )) );
  462. //钢卷状态
  463. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_STAT" , dg1.valueMatrix(i, dg1.colRef("COIL_STAT" )) );
  464. //当前状态 SFF
  465. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD" )) );
  466. //当前状态修改人 UIJ010060
  467. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD_PGM" )) );
  468. //登录人
  469. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID") );
  470. //火运汽运标志
  471. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivType" , dg1.valueMatrix(i, dg1.colRef("DLIV_TP" )) );
  472. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
  473. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
  474. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
  475. nRows++;
  476. }
  477. }
  478. if( nRows > 1 ) {
  479. model.duplicate("/root/reqData","/root/CZD");
  480. commSubmit("UIJ020400-service" ,"print" ,"glueAction.do" );
  481. commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  482. //calculateSummary();
  483. }
  484. model.refresh();
  485. }
  486. //打印方法,这里需要拼出最终格式。
  487. //这里打印时需要改变钢卷公共和发货表状态的,暂时没有处理。后面需要补充进来
  488. function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
  489. var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
  490. if ( sExcelName == "" ) {
  491. return;
  492. }
  493. //var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
  494. var sCSVName = sExcelName +".csv";
  495. //alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
  496. eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true); //DataGrid의 내용을 CSV파일로 생성
  497. ObjTFExcel.launchNewInstance(0); //Execute EXCEL
  498. ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
  499. ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
  500. //Setting up EXCEL Layout.
  501. var nRows = sDGridName.rows - sDGridName.fixedRows + 1; //Keep Careful !!!
  502. var nCols = sDGridName.cols;
  503. //Header
  504. //Line 1 : Sheet Title
  505. //行高的设置
  506. ObjTFExcel.rowheight( 01 ) = 50 ;
  507. ObjTFExcel.bold ( 01, 01, 01, nCols ) = true ;
  508. //改变字体大小
  509. ObjTFExcel.fontsize ( 01, 01, 01, nCols ) = 18;
  510. ObjTFExcel.underline( 01, 01, 01, nCols ) = 3 ;
  511. ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
  512. ObjTFExcel.valign ( 01, 01, 01, nCols ) ="top" ;
  513. ObjTFExcel.mergeCell( 01, 01, 01, nCols ) ;
  514. ObjTFExcel.colwidth ( 01 ) = 200 ;
  515. //All of the range
  516. ObjTFExcel.fontcolor ( 01, 01, nRows, nCols ) = "#000000" ;
  517. ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
  518. //取消边框
  519. ObjTFExcel.setBorderColor( 07, 01, nRows, nCols, "#000000") ;
  520. ObjTFExcel.bold ( 01, 01, nRows, nCols ) = true ;
  521. //改变字体大小
  522. ObjTFExcel.fontsize ( 02, 01, nRows, nCols ) = 12 ;
  523. ObjTFExcel.underline ( 01, 01, nRows, nCols ) = 0 ;
  524. ObjTFExcel.valign ( 01, 01, nRows, nCols ) ="middle" ;
  525. //字体居中
  526. ObjTFExcel.halign ( 01, 01, nRows, nCols ) ="center" ;
  527. //字体左对齐的特殊定义
  528. ObjTFExcel.halign ( 01, 01, 02, nCols ) ="left" ;
  529. ObjTFExcel.halign ( 01, 01, 03, nCols ) ="left" ;
  530. ObjTFExcel.halign ( 01, 01, 04, nCols ) ="left" ;
  531. ObjTFExcel.halign ( 01, 01, 05, nCols ) ="left" ;
  532. ObjTFExcel.halign ( 01, 01, 06, nCols ) ="left" ;
  533. ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
  534. //Query-Results Data
  535. var iRow = 1; // iRow = HeaderLine + 1;
  536. //这里设置字体的行宽
  537. // for(var i = iRow; i <= nRows; i++ ) {
  538. // if( (i%5) == 1 ) {
  539. // ObjTFExcel.rowHeight( i ) = 60;
  540. // ObjTFExcel.mergeCell( i, 01, i, nCols );
  541. // } else if( (i%5) == 0 ) {
  542. // ObjTFExcel.rowHeight( i ) = 45;
  543. // ObjTFExcel.mergeCell( i, 01, i, nCols );
  544. // } else {
  545. // ObjTFExcel.rowHeight( i ) = 40;
  546. // }
  547. // }
  548. //合并单元格
  549. ObjTFExcel.mergeCell(02,05,02,08);
  550. ObjTFExcel.mergeCell(02,02,02,03);
  551. ObjTFExcel.mergeCell(03,02,03,03);
  552. ObjTFExcel.mergeCell(04,02,04,03);
  553. ObjTFExcel.mergeCell(05,02,05,03);
  554. ObjTFExcel.mergeCell(06,02,06,03);
  555. ObjTFExcel.mergeCell(04,07,04,08);
  556. ObjTFExcel.mergeCell(05,07,05,08);
  557. ObjTFExcel.mergeCell(06,07,06,08);
  558. //改变文本格式的方法,未知
  559. //ObjTFExcel.setformat(02,02,02,03,'@');
  560. //设置列的宽度
  561. ObjTFExcel.colwidth ( 01 ) = 15 ;
  562. ObjTFExcel.colwidth ( 02 ) = 10 ;
  563. ObjTFExcel.colwidth ( 03 ) = 15 ;
  564. ObjTFExcel.colwidth ( 04 ) = 10 ;
  565. ObjTFExcel.colwidth ( 05 ) = 20 ;
  566. ObjTFExcel.colwidth ( 06 ) = 10 ;
  567. ObjTFExcel.colwidth ( 07 ) = 10 ;
  568. ObjTFExcel.colwidth ( 08 ) = 15 ;
  569. // ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
  570. ObjTFExcel.sheetName(1) = sExcelSheetName;
  571. ObjTFExcel.save(sExcelName); //Saving EXCEL
  572. ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
  573. window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
  574. }
  575. //发送板加数据
  576. function send() {
  577. model.removeNodeset("/root/reqData");
  578. model.makeNode("/root/reqData");
  579. //这里判断不为空
  580. if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
  581. alert(" 移送班次信息不能为空,请选择相应的移送班次! ");
  582. return;
  583. }
  584. if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
  585. alert(" 移送班组信息不能为空,请选择相应的移送班组信息!! ");
  586. return;
  587. }
  588. if(model.getValue("/root/WK/ENTRY_REG") == ""){
  589. alert(" 移送人信息不能为空,请选择相应的移送人信息!! ");
  590. return;
  591. }
  592. if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
  593. alert(" 移送时间信息不能为空,请输入相应的移送时间信息!! ");
  594. return;
  595. }
  596. if(model.getValue("/root/WK/ROUTE") == ""){
  597. alert(" 移送去向信息不能为空,请输入相应的移送去向信息!! ");
  598. return;
  599. }
  600. //判断卷重和车号不为空
  601. var nodeSet1 = dg1.nodeset;
  602. for(var j=1;j<dg1.rows;j++){
  603. var chk = model.getValue(nodeSet1+"["+j+"]/CHK");
  604. if(chk == "Y"){
  605. var COIL_WGT = model.getValue(nodeSet1+"["+j+"]/COIL_WGT");
  606. var TRANS_CAR_NO = model.getValue(nodeSet1+"["+j+"]/TRANS_CAR_NO");
  607. if(COIL_WGT == ""){
  608. alert("第"+j+"行的卷重数据为空,请核对后再点击保存按钮!");
  609. return;
  610. }
  611. if(TRANS_CAR_NO == ""){
  612. alert("第"+j+"行的车号数据为空,请核对后再点击保存按钮!");
  613. return;
  614. }
  615. }
  616. }
  617. var nRows = 1;
  618. var nCnt = dg1.rows - dg1.fixedRows + 1;
  619. for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
  620. //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
  621. if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "08" ) {
  622. //如果行选中,并且钢卷公共表中体现行车命令执行完
  623. dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "09";
  624. //出库清单号
  625. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
  626. //钢卷号
  627. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/OLD_SAMPL_NO" , dg1.valueMatrix(i, dg1.colRef("OLD_SAMPL_NO" )) );
  628. //流水号
  629. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
  630. //板坯号
  631. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SLAB_NO" , dg1.valueMatrix(i, dg1.colRef("SLAB_NO" )) );
  632. //合同号
  633. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
  634. //订单号
  635. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
  636. //交货期
  637. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEVLMT_DTIME" , dg1.valueMatrix(i, dg1.colRef("DEVLMT_DTIME" )) );
  638. //订单厚度
  639. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_THK" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_THK" )) );
  640. //订单宽度
  641. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_WTH" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_WTH" )) );
  642. //订单长度
  643. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_LEN" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_LEN" )) );
  644. //订单内径
  645. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_INDIA" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_INDIA" )) );
  646. //订单外径
  647. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_OUTDIA" )) );
  648. //订单重量
  649. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_WGT" )) );
  650. //目的代码
  651. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SM_CD" , dg1.valueMatrix(i, dg1.colRef("SM_CD" )) );
  652. //客户代码
  653. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_CD" , dg1.valueMatrix(i, dg1.colRef("ORD_CD" )) );
  654. //钢卷长度
  655. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_LEN" , dg1.valueMatrix(i, dg1.colRef("COIL_LEN" )) );
  656. //钢卷内径
  657. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_INDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_INDIA" )) );
  658. //钢卷外径
  659. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
  660. //钢卷厚度
  661. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_THK" , dg1.valueMatrix(i, dg1.colRef("COIL_THK" )) );
  662. //钢卷宽度
  663. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WTH" , dg1.valueMatrix(i, dg1.colRef("COIL_WTH" )) );
  664. //钢卷重量
  665. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT")) );
  666. //产品代码
  667. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/PRODNM_CD" , dg1.valueMatrix(i, dg1.colRef("PRODNM_CD" )) );
  668. //规格略号
  669. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_ABBSYM" , dg1.valueMatrix(i, dg1.colRef("SPEC_ABBSYM" )) );
  670. //订单用途代码
  671. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_USE_CD" , dg1.valueMatrix(i, dg1.colRef("ORD_USE_CD" )) );
  672. //钢种
  673. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
  674. //成分判定等级
  675. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INGR_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("INGR_DEC_GRD" )) );
  676. //外观判定等级
  677. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXTSHAPE_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("EXTSHAPE_DEC_GRD" )) );
  678. //尺寸判定等级
  679. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SIZE_DEC_RST" , dg1.valueMatrix(i, dg1.colRef("SIZE_DEC_RST" )) );
  680. //重量判定等级
  681. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/WGT_DEC_RST" ,dg1.valueMatrix(i, dg1.colRef("WGT_DEC_RST" )));
  682. //材质判定等级
  683. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MATLQLTY_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("MATLQLTY_DEC_GRD" )) );
  684. //综合判定等级
  685. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
  686. //轧制时间
  687. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MILL_DTIME" , dg1.valueMatrix(i, dg1.colRef("MILL_DTIME" )) );
  688. //成分判定时间
  689. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INGR_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("INGR_DEC_DTIME" )) );
  690. //材质判定时间
  691. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MATLQLTY_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("MATLQLTY_DEC_DTIME" )) );
  692. //外观判定时间
  693. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXTSHAPE_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("EXTSHAPE_DEC_DTIME" )) );
  694. //综合判定时间
  695. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_DTIME" )) );
  696. //瑕疵代码1
  697. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD1" , dg1.valueMatrix(i, dg1.colRef("CRK_CD1" )) );
  698. //瑕疵代码2
  699. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD2" , dg1.valueMatrix(i, dg1.colRef("CRK_CD2" )) );
  700. //瑕疵代码3
  701. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD3" , dg1.valueMatrix(i, dg1.colRef("CRK_CD3" )) );
  702. //瑕疵代码4
  703. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD4" , dg1.valueMatrix(i, dg1.colRef("CRK_CD4" )) );
  704. //瑕疵代码5
  705. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD5" , dg1.valueMatrix(i, dg1.colRef("CRK_CD5" )) );
  706. //车辆号
  707. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
  708. //质保书编号
  709. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
  710. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
  711. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
  712. model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
  713. nRows++;
  714. }
  715. }
  716. if( nRows > 1 ) {
  717. //这里加入班次、班组、出库人、时间
  718. model.duplicate("/root/reqData","/root/WK/ENTRY_SHIFT");
  719. model.duplicate("/root/reqData","/root/WK/ENTRY_GROUP");
  720. model.duplicate("/root/reqData","/root/WK/ENTRY_REG");
  721. model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
  722. model.duplicate("/root/reqData","/root/WK/ROUTE");
  723. commSubmit("UIJ020400-service" ,"send" ,"glueAction.do" );
  724. commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
  725. // calculateSummary();
  726. }
  727. model.refresh();
  728. }
  729. ]]>
  730. </script>
  731. </model>
  732. </xhtml:head>
  733. <xhtml:body>
  734. <caption id="caption1" class="cell" style="left:0px; top:5px; width:80px; height:20px; text-align:center; vertical-align:middle; border-color:#000000; border-style:solid; ">
  735. <![CDATA[运输方式]]>
  736. </caption>
  737. <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:850px; top:5px; width:115px; height:25px; "/>
  738. <select1 id="DlivType" ref="/root/formData/DlivType" appearance="minimal" style="left:80px; top:5px; width:85px; height:20px; ">
  739. <choices>
  740. <item>
  741. <label>火运</label>
  742. <value>T</value>
  743. </item>
  744. <item>
  745. <label>汽运</label>
  746. <value>C</value>
  747. </item>
  748. </choices>
  749. </select1>
  750. <caption id="caption3" class="cell" style="left:325px; top:5px; width:88px; height:20px; text-align:center; vertical-align:middle; border-color:#000000; border-style:solid; ">
  751. <![CDATA[运送指示号]]>
  752. </caption>
  753. <select1 id="DlivDirNo" ref="/root/formData/DlivDirNo" appearance="minimal" editmode="input" style="left:415px; top:5px; width:97px; height:20px; ">
  754. <choices>
  755. <itemset nodeset="/root/LOVData/DlivDirNo/LOVResult_1_Row">
  756. <label ref="DlivDirNoNm"/>
  757. <value ref="DlivDirNo"/>
  758. </itemset>
  759. </choices>
  760. </select1>
  761. <caption id="caption4" class="cell" style="left:519px; top:5px; width:88px; height:20px; text-align:center; vertical-align:middle; border-color:#000000; border-style:solid; ">
  762. <![CDATA[状态区分]]>
  763. </caption>
  764. <select1 id="ShipProgCd" ref="/root/formData/ShipProgCd" appearance="minimal" style="left:609px; top:5px; width:99px; height:20px; ">
  765. <choices>
  766. <item>
  767. <label>发货待机</label>
  768. <value>06</value>
  769. </item>
  770. <item>
  771. <label>发货结束</label>
  772. <value>07</value>
  773. </item>
  774. <item>
  775. <label>明细发行结束</label>
  776. <value>08</value>
  777. </item>
  778. <item>
  779. <label>板加移送</label>
  780. <value>09</value>
  781. </item>
  782. </choices>
  783. </select1>
  784. <datagrid id="dg1" nodeset="/root/gridData1/ListResult_1_VO/ListResult_1_Row" scroll="auto" caption="选择^区分^到站^^合同单位^收货单位^钢种^钢卷号^规格略号^卷重(磅重)^车辆号^卷重(理论)^运送指示号^合同号^订单号^运输方式^运输公司^专用线^水运区分^到达港^等级^钢卷外径^清单号码^草支垫重量(公斤)^产品名称^品质保证书号^发货时间^出库班次^出库班组^出库操作时间^钢卷颜色备注^板坯号^交货期^钢卷订单规格^钢卷订单规格^钢卷订单规格^钢卷订单规格^钢卷订单规格^钢卷订单规格^钢卷实际规格^钢卷实际规格^钢卷实际规格^钢卷实际规格^钢卷实际规格^钢卷实际规格^目的地代码^客户代码^产品名称^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^^^^|选择^区分^到站^^合同单位^收货单位^钢种^钢卷号^规格略号^卷重(磅重)^车辆号^卷重(理论)^运送指示号^合同号^订单号^运输方式^运输公司^专用线^水运区分^到达港^等级^钢卷外径^清单号码^草支垫重量(公斤)^产品名称^品质保证书号^发货时间^出库班次^出库班组^出库操作时间^钢卷颜色备注^板坯号^交货期^厚度^宽度^长度^重量^内径^外径^厚度^宽度^长度^重量^内径^外径^目的地代码^客户代码^产品名称^caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^^^^" colsep="^" colwidth="34, 82, 81, 78, 90, 90, 100, 100, 70, 100, 100, 100, 78, 90, 69, 68, 72, 62, 40, 62, 40, 40, 64, 60, 100, 83, 120, 80, 81, 125, 100, 100, 100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" defaultrows="10" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:60px; width:900px; height:540px; ">
  785. <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
  786. <col editable="false" ref="SHIP_PROG_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
  787. <col editable="false" ref="DEST_PCD_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
  788. <col editable="false" ref="SHIP_DIRNO" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  789. <col editable="false" ref="CUST_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
  790. <col editable="false" ref="ORD_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
  791. <col editable="false" ref="SPEC_STL_GRD" type="input" style="text-align:left; background-color:#ffffff; "/>
  792. <col editable="false" ref="OLD_SAMPL_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
  793. <col editable="false" ref="SPEC_ABBSYM" type="input" style="text-align:left; background-color:#ffffff; "/>
  794. <col editable="false" ref="COIL_WGT" type="input" format="#,###" style="text-align:right; background-color:#ffffff; "/>
  795. <col ref="TRANS_CAR_NO" type="input" style="text-align:left; background-color:#ffff99; "/>
  796. <col editable="false" ref="CAL_WGT" type="input" style="text-align:left; background-color:#ffffff; "/>
  797. <col editable="false" ref="DLIV_DIRNO" type="input" style="text-align:left; background-color:#ffffff; "/>
  798. <col editable="false" ref="ORD_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
  799. <col editable="false" ref="ORD_SEQ" type="input" style="text-align:left; background-color:#ffffff; "/>
  800. <col editable="false" ref="DLIV_TP_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
  801. <col editable="false" ref="SHIP_COMP_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
  802. <col editable="false" ref="EXLV_LINE_CD_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
  803. <col editable="false" ref="BY_SEA_YN" type="input" style="text-align:center; background-color:#ffffff; "/>
  804. <col editable="false" ref="ARRIVAL_CD" type="input" style="background-color:#ffffff; "/>
  805. <col editable="false" ref="TOT_DEC_GRD" type="input" style="left:1203px; top:41px; width:40px; height:21px; text-align:center; background-color:#ffffff; "/>
  806. <col editable="false" ref="COIL_OUTDIA" type="input" format="#,###" style="text-align:right; background-color:#ffffff; "/>
  807. <col editable="false" ref="SHIP_INVNO" type="input" style="text-align:center; background-color:#ffffff; "/>
  808. <col editable="false" ref="CZD_WGT" type="input" style="text-align:center; background-color:#ffffff; "/>
  809. <col editable="false" ref="SM_CFNM" type="input" style="text-align:center; background-color:#ffffff; "/>
  810. <col editable="false" ref="CRET_NO" type="input" style="text-align:center; background-color:#ffffff; "/>
  811. <col editable="false" ref="TRNF_DTIME" type="input" style="text-align:center; background-color:#ffffff; "/>
  812. <col editable="false" ref="TRNF_SHIFT" type="input" style="text-align:center; background-color:#ffffff; "/>
  813. <col editable="false" ref="TRNF_GROUP" type="input" style="text-align:center; background-color:#ffffff; "/>
  814. <col editable="false" ref="TRNF_USE_TIME" type="input" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; background-color:#ffffff; "/>
  815. <col editable="false" ref="HCOLOUR_REM" type="input" style="text-align:center; background-color:#ffffff; "/>
  816. <col editable="false" ref="SLAB_NO" type="input" style="text-align:center; background-color:#ffffff; "/>
  817. <col editable="false" ref="DEVLMT_DTIME" type="input" style="background-color:#ffffff; "/>
  818. <col editable="false" ref="INSTR_COIL_THK" type="input" style="background-color:#ffffff; "/>
  819. <col editable="false" ref="INSTR_COIL_WTH" type="input" style="background-color:#ffffff; "/>
  820. <col editable="false" ref="INSTR_COIL_LEN" type="input" style="background-color:#ffffff; "/>
  821. <col editable="false" ref="INSTR_COIL_WGT" type="input" style="background-color:#ffffff; "/>
  822. <col editable="false" ref="INSTR_COIL_INDIA" type="input" style="background-color:#ffffff; "/>
  823. <col editable="false" ref="INSTR_COIL_OUTDIA" type="input" style="background-color:#ffffff; "/>
  824. <col editable="false" ref="COIL_THK" type="input" style="background-color:#ffffff; "/>
  825. <col editable="false" ref="COIL_WTH" type="input" style="background-color:#ffffff; "/>
  826. <col editable="false" ref="COIL_LEN" type="input" style="background-color:#ffffff; "/>
  827. <col editable="false" ref="COIL_WGT" type="input" style="background-color:#ffffff; "/>
  828. <col editable="false" ref="COIL_INDIA" type="input" style="background-color:#ffffff; "/>
  829. <col editable="false" ref="COIL_OUTDIA" type="input" style="background-color:#ffffff; "/>
  830. <col editable="false" ref="SM_CD" type="input" style="background-color:#ffffff; "/>
  831. <col editable="false" ref="ORD_CD" type="input" style="background-color:#ffffff; "/>
  832. <col editable="false" ref="PRODNM_CD" type="input" style="background-color:#ffffff; "/>
  833. <col editable="false" ref="CRK_CD1" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  834. <col editable="false" ref="CRK_CD2" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  835. <col editable="false" ref="CRK_CD3" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  836. <col editable="false" ref="CRK_CD4" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  837. <col editable="false" ref="CRK_CD5" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  838. <col editable="false" ref="INGR_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  839. <col editable="false" ref="MATLQLTY_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  840. <col editable="false" ref="EXTSHAPE_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  841. <col editable="false" ref="TOT_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  842. <col editable="false" ref="INGR_DEC_GRD" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  843. <col editable="false" ref="SIZE_DEC_RST" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  844. <col editable="false" ref="EXTSHAPE_DEC_GRD" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  845. <col editable="false" ref="WGT_DEC_RST" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  846. <col editable="false" ref="MILL_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
  847. <col editable="false" ref="ORD_USE_CD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
  848. <col editable="false" ref="GET_OFF_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
  849. <col editable="false" ref="GET_ON_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
  850. <col editable="false" ref="COIL_NO" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  851. <col editable="false" ref="SHIP_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  852. <col editable="false" ref="BEF_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  853. <col editable="false" ref="BEF_PROG_CD_DTIME" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  854. <col editable="false" ref="BEF_PROG_CD_PGM" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  855. <col editable="false" ref="SHIP_COMP_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  856. <col editable="false" ref="COIL_STAT" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  857. <col editable="false" ref="CUR_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  858. <col editable="false" ref="CUR_PROG_CD_PGM" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  859. <col editable="false" ref="DLIV_TP" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  860. <col editable="false" ref="DEST_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
  861. <col editable="false" ref="EXLV_LINE_CD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
  862. <col editable="false" ref="DEPARTURE_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  863. <col editable="false" ref="MATLQLTY_DEC_GRD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  864. <col editable="false" ref="T_W" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  865. <col editable="false" ref="SYS_TIME" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  866. <col editable="false" ref="TOT_DEC_GRD_DESC" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  867. <col editable="false" ref="MATLQLTY_DEC_GRD_DESC" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
  868. </datagrid>
  869. <output id="output5" ref="/root/sumData/SUM_SLABRST_WGT" visibility="hidden" format="#,###" style="left:347px; top:575px; width:90px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; border-style:solid; "/>
  870. <output id="output6" ref="/root/sumData/SUM_SLABRST_CNT" visibility="hidden" format="#,###" style="left:172px; top:575px; width:90px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; border-style:solid; "/>
  871. <output id="output8" ref="/root/sumData/SUM_COILRST_WGT" visibility="hidden" format="#,###" style="left:523px; top:575px; width:90px; height:20px; text-align:right; background-color:#ffffff; border-color:#000000; border-style:solid; "/>
  872. <caption id="caption10" class="cell" visibility="hidden" style="left:0px; top:574px; width:85px; height:20px; text-align:center; background-color:#ffcc99; border-color:#000000; border-style:solid; ">上表统计:</caption>
  873. <caption id="caption11" class="cell" visibility="hidden" style="left:90px; top:575px; width:80px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯块数</caption>
  874. <caption id="caption12" class="cell" visibility="hidden" style="left:265px; top:575px; width:80px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">板坯总重量</caption>
  875. <caption id="caption13" class="cell" visibility="hidden" style="left:440px; top:575px; width:80px; height:20px; text-align:center; border-color:#000000; border-style:solid; ">钢卷总重量</caption>
  876. <button id="button1" style="left:905px; top:30px; width:60px; height:20px; background-color:#c0c0c0; ">
  877. <caption>查询</caption>
  878. <script type="javascript" ev:event="DOMActivate">
  879. <![CDATA[
  880. find();
  881. ]]>
  882. </script>
  883. </button>
  884. <button id="button2" style="left:905px; top:55px; width:60px; height:20px; background-color:#c0c0c0; ">
  885. <caption>保存</caption>
  886. <script type="javascript" ev:event="DOMActivate">
  887. <![CDATA[
  888. save();
  889. ]]>
  890. </script>
  891. </button>
  892. <button id="button3" style="left:905px; top:80px; width:60px; height:20px; background-color:#c0c0c0; ">
  893. <caption>打印</caption>
  894. <script type="javascript" ev:event="DOMActivate">
  895. <![CDATA[
  896. //这里发货明细的打印应该是同一客户同一运输指示号下的
  897. var nodeSet1 = dg1.nodeset;
  898. var DLIV_DIRNO1 = null;
  899. //不同合同号的需要打印不同的明细
  900. var ORD_NO_TMP = null;
  901. //运输方式
  902. var DLIV_TP = null;
  903. for(var i=1;i<=dg1.rows;i++){
  904. var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
  905. if(chk1 == "Y"){
  906. DLIV_DIRNO1 = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
  907. DLIV_TP = model.getValue(nodeSet1+"["+i+"]/DLIV_TP");
  908. ORD_NO_TMP = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
  909. break;
  910. }
  911. }
  912. //再次循环datagrid1,如果发现车厢号不同的就给出提示。并且打印不成功
  913. for(var i=1;i<=dg1.rows;i++){
  914. var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
  915. if(chk1 == "Y"){
  916. var DLIV_DIRNO = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
  917. while(DLIV_DIRNO1 != DLIV_DIRNO){
  918. alert(" 不同运输指示号下的卷不能生成同一张发货明细,请确认后重新选择! ");
  919. return;
  920. }
  921. }
  922. }
  923. //取出第一个合同号
  924. var ORD_NO_TMP1 = null;
  925. //这里合同号不一样的,需要单独提示
  926. for(var i=1;i<=dg1.rows;i++){
  927. var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
  928. while(chk1 == "Y"){
  929. ORD_NO_TMP1 = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
  930. break;
  931. }
  932. if(ORD_NO_TMP != ORD_NO_TMP1 && ORD_NO_TMP != null && ORD_NO_TMP1 !=null){
  933. alert(" 同运输指示号下的卷,合同号不一样需要分开打印发货明细! ");
  934. return;
  935. }
  936. }
  937. //这里判断不为空
  938. if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
  939. alert(" 出库班次信息不能为空,请选择相应的出库班次! ");
  940. return;
  941. }
  942. if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
  943. alert(" 出库班组信息不能为空,请选择相应的出库班组信息!! ");
  944. return;
  945. }
  946. if(model.getValue("/root/WK/ENTRY_REG") == ""){
  947. alert(" 出库人信息不能为空,请选择相应的出库人信息!! ");
  948. return;
  949. }
  950. if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
  951. alert(" 出库时间信息不能为空,请输入相应的出库时间信息!! ");
  952. return;
  953. }
  954. if(model.getValue("/root/CZD") == ""){
  955. alert(" 草支垫重量不能为空,请输入草支垫重量!! ");
  956. return;
  957. }
  958. //判断完后再做打印明细准备,这里再做一个表格定义打印格式
  959. // for(var i=dg1.fixedRows;i<=dg1.rows;i++){
  960. // var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
  961. //
  962. // if(chk1 == "Y"){
  963. // //合同号
  964. // var ORD_NO = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
  965. // //发货清单号,由系统生成。待确认
  966. // var SHIP_INVNO = model.getValue(nodeSet1+"["+i+"]/SHIP_INVNO");
  967. // //这里编号和产品名称不确认
  968. // //总重量,总卷数放到后台去计算,这里暂时不表示
  969. // //发货日期,这里取系统时间,从数据库中取
  970. // //收货单位,这里需要从数据库中取
  971. // }
  972. // }
  973. //这里需要分火车和汽车的情况给于不同的格式
  974. if(DLIV_TP == "T"){
  975. //取出表头相应的值后,填入相应的位置。再把表头数据放入dg2中
  976. commAppendData ("/root/gridData2/ListResult_1_VO" ,"/root/EXCELHead/ListResult_1_VO" );
  977. model.refresh();
  978. }else if(DLIV_TP == "C"){
  979. //取出表头相应的值后,填入相应的位置。再把表头数据放入dg2中
  980. commAppendData ("/root/gridData2/ListResult_1_VO" ,"/root/EXCELHeadCAR/ListResult_1_VO" );
  981. model.refresh();
  982. }
  983. //把表头数据放入后还需要放入主题数据
  984. //这里表头数据就占用了前8行,主体数据从第9行开始有一个加一个
  985. var num_row = 8;
  986. //这里通过运输方式来区分
  987. var DLIV_TP = null;
  988. //合同号
  989. var ORD_NO = null;
  990. //发货单号,对应表单的发货清单号
  991. var SHIP_INVNO = null;
  992. //运输指示号
  993. var DLIV_DIRNO = null;
  994. //用户编码,对应合同单位
  995. var CUST_NM = null;
  996. //用户编码,对应收货单位
  997. var ORD_NM = null;
  998. //到站
  999. var DEST_PCD_DESC = null;
  1000. //制表,这里使用登录人
  1001. var REG_ID = null;
  1002. //车号
  1003. var TRANS_CAR_NO = null;
  1004. //收货单位,对应用户编码
  1005. //产品名称
  1006. var PRODNM_CD = null;
  1007. //标准
  1008. var SPEC_ABBSYM = null;
  1009. //钢卷个数
  1010. var coil_num_tmp = null;
  1011. //钢卷重量
  1012. var coil_wgt_tmp = null;
  1013. //草支垫重量
  1014. var CZD = null;
  1015. //合同备注,新加入的
  1016. var HCOLOUR_REM = null;
  1017. for(var i=1;i<=dg1.rows;i++){
  1018. var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
  1019. if(chk1 == "Y"){
  1020. //alert("num_row : "+num_row);
  1021. coil_num_tmp = coil_num_tmp +1;
  1022. //alert("coil_num_tmp : "+coil_num_tmp);
  1023. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col1");
  1024. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col2");
  1025. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col3");
  1026. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col4");
  1027. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col5");
  1028. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col6");
  1029. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col7");
  1030. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col8");
  1031. //轧批号//钢卷号,真实钢卷号
  1032. var COIL_NO = model.getValue(nodeSet1+"["+i+"]/OLD_SAMPL_NO");
  1033. //钢号
  1034. var SPEC_STL_GRD = model.getValue(nodeSet1+"["+i+"]/SPEC_STL_GRD");
  1035. //规格,没有
  1036. var T_W = model.getValue(nodeSet1+"["+i+"]/T_W");
  1037. //重量(吨)
  1038. var COIL_WGT = model.getValue(nodeSet1+"["+i+"]/COIL_WGT");
  1039. //等级,这里使用表述字段
  1040. var TOT_DEC_GRD = model.getValue(nodeSet1+"["+i+"]/TOT_DEC_GRD_DESC");
  1041. //性能 MATLQLTY_DEC_GRD。这里使用表述字段
  1042. var MATLQLTY_DEC_GRD = model.getValue(nodeSet1+"["+i+"]/MATLQLTY_DEC_GRD_DESC");
  1043. //备注
  1044. //这里循环获取表格主体数据
  1045. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col1",COIL_NO.substr(0,10));
  1046. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col2",SPEC_STL_GRD);
  1047. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col3",T_W);
  1048. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col4",(COIL_WGT/1000));
  1049. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col5",COIL_NO);
  1050. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col6",TOT_DEC_GRD);
  1051. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col7",MATLQLTY_DEC_GRD);
  1052. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col8","");
  1053. //这里获取表头数据
  1054. //这里把需要的值放入特定的位置,写死并且需要区分火运和汽运的情况。
  1055. //这里通过运输方式来区分
  1056. DLIV_TP = model.getValue(nodeSet1+"["+i+"]/DLIV_TP");
  1057. //合同号
  1058. ORD_NO = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
  1059. //发货单号,对应表单的发货清单号
  1060. SHIP_INVNO = model.getValue(nodeSet1+"["+i+"]/SHIP_INVNO");
  1061. //运输指示号
  1062. DLIV_DIRNO = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
  1063. //用户编码,对应客户公司
  1064. CUST_NM = model.getValue(nodeSet1+"["+i+"]/CUST_NM");
  1065. ORD_NM = model.getValue(nodeSet1+"["+i+"]/ORD_NM");
  1066. //发货日,这里取出库时间
  1067. var SYS_TIME = model.getValue("/root/WK/ENTRY_DTIME");
  1068. //编号,这里新钢有自己的编号规则。所以先空着确认后再处理
  1069. //计划单号,这里新钢没有填入。暂时空着
  1070. //到站
  1071. DEST_PCD_DESC = model.getValue(nodeSet1+"["+i+"]/DEST_PCD_DESC");
  1072. //制表,这里使用出库人
  1073. REG_ID = model.getValue("/root/WK/ENTRY_REG");
  1074. //计划单号
  1075. //车号
  1076. TRANS_CAR_NO = model.getValue(nodeSet1+"["+i+"]/TRANS_CAR_NO");
  1077. //收货单位
  1078. //发货备注,这里为空
  1079. //产品名称
  1080. PRODNM_CD = model.getValue(nodeSet1+"["+i+"]/SM_CFNM");
  1081. //标准
  1082. SPEC_ABBSYM = model.getValue(nodeSet1+"["+i+"]/SPEC_ABBSYM");
  1083. //钢卷重量累加
  1084. coil_wgt_tmp = Number(COIL_WGT) + Number(coil_wgt_tmp);
  1085. //草支垫重量
  1086. CZD = model.getValue("/root/CZD");
  1087. //外贸合同颜色备注栏
  1088. HCOLOUR_REM = model.getValue(nodeSet1+"["+i+"]/HCOLOUR_REM");
  1089. //alert("coil_wgt_tmp : "+coil_wgt_tmp);
  1090. //先赋值再增加行
  1091. num_row = num_row+1;
  1092. }
  1093. }
  1094. //这里能不能在添加几个空行,以便后面合计使用
  1095. for(var j=dg2.rows;j<=20;j++){
  1096. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col1");
  1097. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col2");
  1098. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col3");
  1099. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col4");
  1100. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col5");
  1101. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col6");
  1102. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col7");
  1103. model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col8");
  1104. }
  1105. //这里写在循环外面,保证取值的时候只取一次。
  1106. if(DLIV_TP == "T"){
  1107. //火运的情况
  1108. //汽运的情况
  1109. //合同号和发货单号,第二行
  1110. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col2","'"+ORD_NO);
  1111. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col5",DLIV_DIRNO);
  1112. //第三行,用户编码
  1113. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col2","");
  1114. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col5",SYS_TIME);
  1115. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col6","第"+SHIP_INVNO+"号");
  1116. //第四行,用户名称
  1117. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col2",CUST_NM);
  1118. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col5",DEST_PCD_DESC.substr(0,9));
  1119. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col7",REG_ID);
  1120. //第五行,计划单号
  1121. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col2","");
  1122. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col5",TRANS_CAR_NO);
  1123. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col7",ORD_NM);
  1124. //第六行,发货备注
  1125. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col2",HCOLOUR_REM);
  1126. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col5",PRODNM_CD);
  1127. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col7",SPEC_ABBSYM);
  1128. //第20行,总计
  1129. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col1","小计");
  1130. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col3",coil_num_tmp+"卷");
  1131. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col4",Number(coil_wgt_tmp/1000));
  1132. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col8","合计:"+CZD+"公斤");
  1133. }else if(DLIV_TP == "C"){
  1134. //汽运的情况
  1135. //合同号和发货单号,第二行
  1136. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col2","'"+ORD_NO);
  1137. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col5",DLIV_DIRNO);
  1138. //第三行,用户编码
  1139. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col2","");
  1140. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col5",SYS_TIME);
  1141. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col6","第"+SHIP_INVNO+"号");
  1142. //第四行,用户名称
  1143. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col2",CUST_NM);
  1144. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col5",DEST_PCD_DESC.substr(0,9));
  1145. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col7",REG_ID);
  1146. //第五行,计划单号
  1147. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col2","");
  1148. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col5",TRANS_CAR_NO);
  1149. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col7",ORD_NM);
  1150. //第六行,发货备注
  1151. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col2",HCOLOUR_REM);
  1152. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col5",PRODNM_CD);
  1153. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col7",SPEC_ABBSYM);
  1154. //第20行,总计
  1155. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col1","小计");
  1156. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col3",coil_num_tmp+"卷");
  1157. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col4",Number(coil_wgt_tmp/1000));
  1158. model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col8","合计:"+CZD+"公斤");
  1159. }
  1160. model.refresh();
  1161. //导出EXCEL方法
  1162. saveExcelScript(dg2, "Sheet1");
  1163. //打印后修改发货状态的方法
  1164. print();
  1165. ]]>
  1166. </script>
  1167. <hint>
  1168. <![CDATA[打印的发货明细请保存在C盘]]>
  1169. </hint>
  1170. </button>
  1171. <datagrid id="dg2" nodeset="/root/gridData2/ListResult_1_VO/ListResult_1_Row" visibility="hidden" caption="cols_1^cols_2^cols_3^cols_4^cols_5^cols_6^cols_7^cols_8" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:140px; width:805px; height:290px; ">
  1172. <col ref="col1"/>
  1173. <col ref="col2"/>
  1174. <col ref="col3"/>
  1175. <col ref="col4"/>
  1176. <col ref="col5"/>
  1177. <col ref="col6"/>
  1178. <col ref="col7"/>
  1179. <col ref="col8"/>
  1180. </datagrid>
  1181. <caption id="caption21" class="cell" style="left:0px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班次</caption>
  1182. <caption id="caption23" class="cell" style="left:145px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班组</caption>
  1183. <caption id="caption5" class="cell" style="left:455px; top:35px; width:60px; height:20px; border-color:#000000; ">出库时间</caption>
  1184. <caption id="caption14" class="cell" style="left:310px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">出库人</caption>
  1185. <select1 id="combo7" ref="/root/WK/ENTRY_REG" appearance="minimal" editmode="input" style="left:370px; top:35px; width:80px; height:20px; background-color:#ffff99; ">
  1186. <choices>
  1187. <item>
  1188. <label>刘文</label>
  1189. <value>刘文</value>
  1190. </item>
  1191. <item>
  1192. <label>蔡伟平</label>
  1193. <value>蔡伟平</value>
  1194. </item>
  1195. <item>
  1196. <label>廖林敏</label>
  1197. <value>廖林敏</value>
  1198. </item>
  1199. <item>
  1200. <label>周文刚</label>
  1201. <value>周文刚</value>
  1202. </item>
  1203. <item>
  1204. <label>吴贤峰</label>
  1205. <value>吴贤峰</value>
  1206. </item>
  1207. <item>
  1208. <label>敖艳敏</label>
  1209. <value>敖艳敏</value>
  1210. </item>
  1211. <item>
  1212. <label>林珑</label>
  1213. <value>林珑</value>
  1214. </item>
  1215. <item>
  1216. <label>成武</label>
  1217. <value>成武</value>
  1218. </item>
  1219. <item>
  1220. <label>安凡能</label>
  1221. <value>安凡能</value>
  1222. </item>
  1223. <item>
  1224. <label>李学海</label>
  1225. <value>李学海</value>
  1226. </item>
  1227. <item>
  1228. <label>刘忠华</label>
  1229. <value>刘忠华</value>
  1230. </item>
  1231. </choices>
  1232. </select1>
  1233. <select1 id="combo8" ref="/root/WK/ENTRY_SHIFT" appearance="minimal" style="left:60px; top:35px; width:80px; height:20px; background-color:#ffff99; ">
  1234. <choices>
  1235. <item>
  1236. <label>早</label>
  1237. <value>1</value>
  1238. </item>
  1239. <item>
  1240. <label>中</label>
  1241. <value>2</value>
  1242. </item>
  1243. <item>
  1244. <label>晚</label>
  1245. <value>3</value>
  1246. </item>
  1247. </choices>
  1248. </select1>
  1249. <select1 id="combo9" ref="/root/WK/ENTRY_GROUP" appearance="minimal" style="left:205px; top:35px; width:100px; height:20px; background-color:#ffff99; ">
  1250. <choices>
  1251. <item>
  1252. <label>甲</label>
  1253. <value>A</value>
  1254. </item>
  1255. <item>
  1256. <label>乙</label>
  1257. <value>B</value>
  1258. </item>
  1259. <item>
  1260. <label>丙</label>
  1261. <value>C</value>
  1262. </item>
  1263. <item>
  1264. <label>丁</label>
  1265. <value>D</value>
  1266. </item>
  1267. </choices>
  1268. </select1>
  1269. <input id="input6" ref="/root/WK/ENTRY_DTIME" inputtype="date" format="yyyy-mm-dd" style="left:515px; top:35px; width:100px; height:20px; background-color:#ffff99; "/>
  1270. <caption id="caption6" class="cell" style="left:630px; top:35px; width:85px; height:20px; border-color:#000000; ">草支垫重量</caption>
  1271. <input id="input1" ref="/root/CZD" format="#,###" style="left:715px; top:35px; width:70px; height:20px; background-color:#ffff99; "/>
  1272. <caption id="caption7" class="cell" style="left:785px; top:35px; width:35px; height:20px; border-color:#000000; ">公斤</caption>
  1273. <caption id="caption2" class="cell" visibility="hidden" style="left:500px; top:205px; width:88px; height:20px; text-align:center; vertical-align:middle; border-color:#000000; border-style:solid; ">
  1274. <![CDATA[发货指示号]]>
  1275. </caption>
  1276. <select1 id="ShipDirNo" ref="/root/formData/ShipDirNo" visibility="hidden" appearance="minimal" style="left:590px; top:205px; width:97px; height:20px; ">
  1277. <choices>
  1278. <itemset nodeset="/root/LOVData/ShipDirNo/LOVResult_1_Row">
  1279. <label ref="ShipDirNoNm"/>
  1280. <value ref="ShipDirNo"/>
  1281. </itemset>
  1282. </choices>
  1283. </select1>
  1284. <input id="input2" ref="/root/formData/CAR_NO" style="left:230px; top:5px; width:90px; height:20px; "/>
  1285. <caption id="caption8" class="cell" style="left:170px; top:5px; width:60px; height:20px; border-color:#000000; ">车辆号</caption>
  1286. <button id="button4" visibility="hidden" style="left:905px; top:105px; width:60px; height:20px; background-color:#c0c0c0; ">
  1287. <caption>板加移送</caption>
  1288. <script type="javascript" ev:event="DOMActivate">
  1289. <![CDATA[
  1290. send();
  1291. ]]>
  1292. </script>
  1293. <hint>
  1294. <![CDATA[打印的发货明细请保存在C盘]]>
  1295. </hint>
  1296. </button>
  1297. <caption id="caption9" class="cell" style="left:715px; top:5px; width:45px; height:20px; border-color:#000000; ">去向</caption>
  1298. <select1 id="combo1" ref="/root/WK/ROUTE" appearance="minimal" style="left:760px; top:5px; width:80px; height:20px; ">
  1299. <choices>
  1300. <item>
  1301. <label>板加厂</label>
  1302. <value>BJ</value>
  1303. </item>
  1304. </choices>
  1305. </select1>
  1306. </xhtml:body>
  1307. </xhtml:html>