| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title/>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <ShipProgCd/>
- <ShipDirNo/>
- <DlivDirNo/>
- <DlivType/>
- <CoilProgCd>%</CoilProgCd>
- <CAR_NO/>
- </formData>
- <gridData1/>
- <LOVData>
- <ShipDirNo/>
- <DlivDirNo/>
- <DlivType/>
- </LOVData>
- <resData/>
- <reqData/>
- <sumData>
- <SUM_ORD_WGT/>
- <SUM_NEED_WGT/>
- <SUM_COIL_CNT/>
- <SUM_TOT_SLAB_WGT/>
- <SUM_SLABRST_CNT/>
- <SUM_SLABRST_WGT/>
- <SUM_COILRST_WGT/>
- </sumData>
- <gridData2/>
- <EXCELHead>
- <ListResult_1_VO>
- <ListResult_1_Row>
- <col1>新余钢铁股份有限公司钢卷发货明细单(火车)</col1>
- <col2/>
- <col3/>
- <col4/>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>合 同 号:</col1>
- <col2/>
- <col3/>
- <col4>发货单号:</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>用户编码:</col1>
- <col2/>
- <col3/>
- <col4>发货日:</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>用户名称:</col1>
- <col2/>
- <col3/>
- <col4>到站:</col4>
- <col5/>
- <col6>制表:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>计划单号:</col1>
- <col2/>
- <col3/>
- <col4>车号:</col4>
- <col5/>
- <col6>收货单位:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>发货备注:</col1>
- <col2/>
- <col3/>
- <col4>产品名称:</col4>
- <col5/>
- <col6>标准:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>轧批号</col1>
- <col2>钢号</col2>
- <col3>规格(厚*宽)mm</col3>
- <col4>重量(吨)</col4>
- <col5>钢卷号</col5>
- <col6>等级</col6>
- <col7>性能</col7>
- <col8>草支垫</col8>
- </ListResult_1_Row>
- </ListResult_1_VO>
- </EXCELHead>
- <EXCELHeadCAR>
- <ListResult_1_VO>
- <ListResult_1_Row>
- <col1>新余钢铁股份有限公司钢卷发货明细单(汽车)</col1>
- <col2/>
- <col3/>
- <col4/>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>合 同 号:</col1>
- <col2/>
- <col3/>
- <col4>发货单号:</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>用户编码:</col1>
- <col2/>
- <col3/>
- <col4>发货日:</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>用户名称:</col1>
- <col2/>
- <col3/>
- <col4>到站:</col4>
- <col5/>
- <col6>制表:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>计划单号:</col1>
- <col2/>
- <col3/>
- <col4>车号:</col4>
- <col5/>
- <col6>收货单位:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>发货备注:</col1>
- <col2/>
- <col3/>
- <col4>产品名称:</col4>
- <col5/>
- <col6>标准:</col6>
- <col7/>
- <col8/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>轧批号</col1>
- <col2>钢号</col2>
- <col3>规格(厚*宽)mm</col3>
- <col4>重量(吨)</col4>
- <col5>钢卷号</col5>
- <col6>等级</col6>
- <col7>性能</col7>
- <col8>草支垫</col8>
- </ListResult_1_Row>
- </ListResult_1_VO>
- </EXCELHeadCAR>
- <WK>
- <ENTRY_SHIFT/>
- <ENTRY_GROUP/>
- <ENTRY_REG/>
- <ENTRY_DTIME/>
- <ROUTE/>
- </WK>
- <CZD/>
- </root>
- </instance>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/mesCommon.js"/>
- <script type="javascript" src="../../js/dCommon.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //1、获取用户登录信息,只能在页面初始化函数中调用
- function InitParams(node)
- {
- if (typeof node == "undefined" && typeof node != "object") return;
- model.removenode("/root/initData/rcvInfo");
- model.makeNode("/root/initData/rcvInfo");
- var nodeList = node.childNodes;
- for (var i = 0; i < nodeList.length; i++)
- model.instances(0).selectSingleNode("/root/initData/rcvInfo").appendChild(nodeList.item(i));
- }
-
- //2. 页面初始化函数(必须)
- function Init(node)
- {
- InitParams(node); // 用于设置节点:/root/initData/rcvInfo,获取用户登录信息
- // 在程序中会重建该节点,最好不要重名
- // 函数 InitParams 在 mesCommon.js 中,仅在需要使用登录用户信息时调用
- //...
- }
-
- //3、页面标题
- function setTitle()
- {
- return "热轧非计划发货管理->发货处理->发货实绩录入与发行装车明细(UIJ020400)"; // 如:return "进程管理 >> 订单进程现况查询";
- }
-
- function lpad(str, len, fill) {
- if (fill == null) fill = " ";
-
- str = str + "";
-
- while( str.length < len ) {
- str = fill + str;
- }
-
- return str;
- }
- function calculateSummary() {
-
- //暂时系统没有做处理
- model.setXPathValue("/root/sumData/SUM_ORD_WGT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/ORD_WGT )");
- model.setXPathValue("/root/sumData/SUM_NEED_WGT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/NEED_WGT )");
- model.setXPathValue("/root/sumData/SUM_COIL_CNT" ,"sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/COIL_CNT )");
- model.setXPathValue("/root/sumData/SUM_TOT_SLAB_WGT","sum(/root/gridData1/ListResult_1_VO/ListResult_1_Row/TOT_SLAB_WGT )");
- model.setXPathValue("/root/sumData/SUM_SLABRST_CNT" ,"count(/root/gridData2/ListResult_2_VO/ListResult_2_Row )");
- model.setXPathValue("/root/sumData/SUM_SLABRST_WGT" ,"sum(/root/gridData2/ListResult_2_VO/ListResult_2_Row/SLAB_WGT )");
- model.setXPathValue("/root/sumData/SUM_COILRST_WGT" ,"sum(/root/gridData2/ListResult_2_VO/ListResult_2_Row/COIL_WGT )");
- }
- function find() {
- model.removeNodeset(dg1.nodeset);
- model.refresh();
- model.setValue("/root/formData/CoilProgCd","%");
-
- if( ShipProgCd.value == "" ){
- alert(" 状态区分必须选择,否则将导致数据量过大!! ");
- return;
- }
- if( ShipProgCd.value == "06" ){
- model.setValue("/root/formData/CoilProgCd","SFB");
- }
- if( ShipProgCd.value == "07" || ShipProgCd.value == "08" || ShipProgCd.value == "09"){
- model.setValue("/root/formData/CoilProgCd","SFF");
-
- //这里加入出库时间条件,减少数据量
- if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
- alert(" 出库时间需要选择,否则将导致数据量过大。不便于查找!!! ");
- return;
- }
- }
- commSendReq("/root/formData");
- model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
-
- commSubmit("UIJ020400-service" ,"find" ,"glueAction.do" );
- commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- //calculateSummary();
- model.refresh();
-
- dg1.isSelected( dg1.fixedRows ) = true;
-
- dg1.refresh();
- }
- function save() {
- model.removeNodeset("/root/reqData");
- model.makeNode("/root/reqData");
- //这里判断不为空
- if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
- alert(" 出库班次信息不能为空,请选择相应的出库班次! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
- alert(" 出库班组信息不能为空,请选择相应的出库班组信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_REG") == ""){
- alert(" 出库人信息不能为空,请选择相应的出库人信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
- alert(" 出库时间信息不能为空,请输入相应的出库时间信息!! ");
- return;
- }
-
- if(model.getValue("/root/CZD") == ""){
- alert(" 草支垫重量必须输入,请输入相应的草支垫重量 ");
- return;
- }
-
- //判断卷重和车号不为空
- var nodeSet1 = dg1.nodeset;
- for(var j=1;j<dg1.rows;j++){
- var chk = model.getValue(nodeSet1+"["+j+"]/CHK");
-
- if(chk == "Y"){
- var COIL_WGT = model.getValue(nodeSet1+"["+j+"]/COIL_WGT");
- var TRANS_CAR_NO = model.getValue(nodeSet1+"["+j+"]/TRANS_CAR_NO");
-
- if(COIL_WGT == ""){
- alert("第"+j+"行的卷重数据为空,请核对后再点击保存按钮!");
- return;
- }
- if(TRANS_CAR_NO == ""){
- alert("第"+j+"行的车号数据为空,请核对后再点击保存按钮!");
- return;
- }
- }
- }
-
- var nRows = 1;
- var nCnt = dg1.rows - dg1.fixedRows + 1;
-
- for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
- //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
- if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "06" ) {
- //如果行选中,并且钢卷公共表中体现行车命令执行完
- dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "07";
- //发货指示号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_DIRNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
- //运输指示号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DLIV_DIRNO" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
- //车辆号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
- //装车地点
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_ON_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_ON_PCD" )) );
- //目的地
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEST_PCD" , dg1.valueMatrix(i, dg1.colRef("DEST_PCD" )) );
- //专用线
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXLV_LINE_CD" , dg1.valueMatrix(i, dg1.colRef("EXLV_LINE_CD" )) );
- //卸车地点
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_OFF_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_OFF_PCD" )) );
- //水运区分
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BY_SEA_YN" , dg1.valueMatrix(i, dg1.colRef("BY_SEA_YN" )) );
- //出发港 这里把编码规则转换成描述便于理解
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEPARTURE_CD" , dg1.valueMatrix(i, dg1.colRef("DEPARTURE_CD" )) );
- //到达港
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ARRIVAL_CD" , dg1.valueMatrix(i, dg1.colRef("ARRIVAL_CD" )) );
- //生产钢卷号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
- //综合判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
- //钢卷重量
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT" )) );
- //钢卷外径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
- //发货清单号码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
- //品质保证书
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
- //发货时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRNF_DTIME" , dg1.valueMatrix(i, dg1.colRef("TRNF_DTIME" )) );
- //钢卷公共表中的状态字段
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
- //标准钢号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
- //钢卷公共中的当前状态做前状态使用
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD" )) );
- //状态改变时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_DTIME" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_DTIME")) );
- //状态改变人
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_PGM" )) );
- //合同号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
- //订单号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
- //运输公司编码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_COMP_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_COMP_CD" )) );
- //钢卷状态
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_STAT" , dg1.valueMatrix(i, dg1.colRef("COIL_STAT" )) );
- //当前状态 SFF
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD" )) );
- //当前状态修改人 UIJ010060
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD_PGM" )) );
- //登录人
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID") );
- //火运汽运标志
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivType" , dg1.valueMatrix(i, dg1.colRef("DLIV_TP" )) );
-
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
-
- nRows++;
- }
- }
-
- if( nRows > 1 ) {
- //这里加入班次、班组、出库人、时间
- model.duplicate("/root/reqData","/root/WK/ENTRY_SHIFT");
- model.duplicate("/root/reqData","/root/WK/ENTRY_GROUP");
- model.duplicate("/root/reqData","/root/WK/ENTRY_REG");
- model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
- model.duplicate("/root/reqData","/root/CZD");
-
- commSubmit("UIJ020400-service" ,"save" ,"glueAction.do" );
- commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- // calculateSummary();
- }
- model.refresh();
- }
-
- //打印的时候,必须改变相应的发货表的发货状态和钢卷公共表的发货状态
- //这里保存和打印使用的方法是一样的,只是传入的参数不同
- function print(){
- model.removeNodeset("/root/reqData");
- model.makeNode("/root/reqData");
- var nRows = 1;
- var nCnt = dg1.rows - dg1.fixedRows + 1;
- for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
- //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
- if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "07" ) {
- //如果行选中,并且钢卷公共表中体现行车命令执行完
- //打印的话,必须改为08
- dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "08";
- //发货指示号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_DIRNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
- //运输指示号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DLIV_DIRNO" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
- //车辆号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
- //装车地点
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_ON_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_ON_PCD" )) );
- //目的地
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEST_PCD" , dg1.valueMatrix(i, dg1.colRef("DEST_PCD" )) );
- //专用线
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXLV_LINE_CD" , dg1.valueMatrix(i, dg1.colRef("EXLV_LINE_CD" )) );
- //卸车地点
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/GET_OFF_PCD" , dg1.valueMatrix(i, dg1.colRef("GET_OFF_PCD" )) );
- //水运区分
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BY_SEA_YN" , dg1.valueMatrix(i, dg1.colRef("BY_SEA_YN" )) );
- //出发港 这里把编码规则转换成描述便于理解
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEPARTURE_CD" , dg1.valueMatrix(i, dg1.colRef("DEPARTURE_CD" )) );
- //到达港
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ARRIVAL_CD" , dg1.valueMatrix(i, dg1.colRef("ARRIVAL_CD" )) );
- //生产钢卷号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
- //综合判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
- //钢卷重量
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT" )) );
- //钢卷外径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
- //发货清单号码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
- //品质保证书
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
- //发货时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRNF_DTIME" , dg1.valueMatrix(i, dg1.colRef("TRNF_DTIME" )) );
- //钢卷公共表中的状态字段
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
- //标准钢号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
- //钢卷公共中的当前状态做前状态使用
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD" )) );
- //状态改变时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_DTIME" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_DTIME")) );
- //状态改变人
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/BEF_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("BEF_PROG_CD_PGM" )) );
- //合同号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
- //订单号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
- //运输公司编码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_COMP_CD" , dg1.valueMatrix(i, dg1.colRef("SHIP_COMP_CD" )) );
- //钢卷状态
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_STAT" , dg1.valueMatrix(i, dg1.colRef("COIL_STAT" )) );
- //当前状态 SFF
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD" )) );
- //当前状态修改人 UIJ010060
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CUR_PROG_CD_PGM" , dg1.valueMatrix(i, dg1.colRef("CUR_PROG_CD_PGM" )) );
- //登录人
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/REG_ID" , model.getValue("/root/initData/rcvInfo/REG_ID") );
- //火运汽运标志
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivType" , dg1.valueMatrix(i, dg1.colRef("DLIV_TP" )) );
-
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
- nRows++;
- }
- }
-
- if( nRows > 1 ) {
- model.duplicate("/root/reqData","/root/CZD");
- commSubmit("UIJ020400-service" ,"print" ,"glueAction.do" );
- commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- //calculateSummary();
- }
- model.refresh();
- }
-
- //打印方法,这里需要拼出最终格式。
- //这里打印时需要改变钢卷公共和发货表状态的,暂时没有处理。后面需要补充进来
- function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
- var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
- if ( sExcelName == "" ) {
- return;
- }
- //var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
- var sCSVName = sExcelName +".csv";
- //alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
- eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true); //DataGrid의 내용을 CSV파일로 생성
- ObjTFExcel.launchNewInstance(0); //Execute EXCEL
- ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
- ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
- //Setting up EXCEL Layout.
- var nRows = sDGridName.rows - sDGridName.fixedRows + 1; //Keep Careful !!!
- var nCols = sDGridName.cols;
-
- //Header
- //Line 1 : Sheet Title
- //行高的设置
- ObjTFExcel.rowheight( 01 ) = 50 ;
- ObjTFExcel.bold ( 01, 01, 01, nCols ) = true ;
- //改变字体大小
- ObjTFExcel.fontsize ( 01, 01, 01, nCols ) = 18;
- ObjTFExcel.underline( 01, 01, 01, nCols ) = 3 ;
- ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
- ObjTFExcel.valign ( 01, 01, 01, nCols ) ="top" ;
- ObjTFExcel.mergeCell( 01, 01, 01, nCols ) ;
- ObjTFExcel.colwidth ( 01 ) = 200 ;
-
- //All of the range
- ObjTFExcel.fontcolor ( 01, 01, nRows, nCols ) = "#000000" ;
- ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
- //取消边框
- ObjTFExcel.setBorderColor( 07, 01, nRows, nCols, "#000000") ;
- ObjTFExcel.bold ( 01, 01, nRows, nCols ) = true ;
- //改变字体大小
- ObjTFExcel.fontsize ( 02, 01, nRows, nCols ) = 12 ;
- ObjTFExcel.underline ( 01, 01, nRows, nCols ) = 0 ;
- ObjTFExcel.valign ( 01, 01, nRows, nCols ) ="middle" ;
- //字体居中
- ObjTFExcel.halign ( 01, 01, nRows, nCols ) ="center" ;
-
- //字体左对齐的特殊定义
- ObjTFExcel.halign ( 01, 01, 02, nCols ) ="left" ;
- ObjTFExcel.halign ( 01, 01, 03, nCols ) ="left" ;
- ObjTFExcel.halign ( 01, 01, 04, nCols ) ="left" ;
- ObjTFExcel.halign ( 01, 01, 05, nCols ) ="left" ;
- ObjTFExcel.halign ( 01, 01, 06, nCols ) ="left" ;
- ObjTFExcel.halign ( 01, 01, 01, nCols ) ="center" ;
-
- //Query-Results Data
- var iRow = 1; // iRow = HeaderLine + 1;
- //这里设置字体的行宽
- // for(var i = iRow; i <= nRows; i++ ) {
- // if( (i%5) == 1 ) {
- // ObjTFExcel.rowHeight( i ) = 60;
- // ObjTFExcel.mergeCell( i, 01, i, nCols );
- // } else if( (i%5) == 0 ) {
- // ObjTFExcel.rowHeight( i ) = 45;
- // ObjTFExcel.mergeCell( i, 01, i, nCols );
- // } else {
- // ObjTFExcel.rowHeight( i ) = 40;
- // }
- // }
-
- //合并单元格
- ObjTFExcel.mergeCell(02,05,02,08);
- ObjTFExcel.mergeCell(02,02,02,03);
- ObjTFExcel.mergeCell(03,02,03,03);
- ObjTFExcel.mergeCell(04,02,04,03);
- ObjTFExcel.mergeCell(05,02,05,03);
- ObjTFExcel.mergeCell(06,02,06,03);
- ObjTFExcel.mergeCell(04,07,04,08);
- ObjTFExcel.mergeCell(05,07,05,08);
- ObjTFExcel.mergeCell(06,07,06,08);
-
- //改变文本格式的方法,未知
- //ObjTFExcel.setformat(02,02,02,03,'@');
-
- //设置列的宽度
- ObjTFExcel.colwidth ( 01 ) = 15 ;
- ObjTFExcel.colwidth ( 02 ) = 10 ;
- ObjTFExcel.colwidth ( 03 ) = 15 ;
- ObjTFExcel.colwidth ( 04 ) = 10 ;
- ObjTFExcel.colwidth ( 05 ) = 20 ;
- ObjTFExcel.colwidth ( 06 ) = 10 ;
- ObjTFExcel.colwidth ( 07 ) = 10 ;
- ObjTFExcel.colwidth ( 08 ) = 15 ;
-
- // ObjTFExcel.setFormat(iRow, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
- ObjTFExcel.sheetName(1) = sExcelSheetName;
- ObjTFExcel.save(sExcelName); //Saving EXCEL
- ObjTFExcel.close(); //Closing EXCEL. (You must be closed EXCEL !!!)
- window.exec("EXCEL.EXE", sExcelName); //Openning EXCEL
- }
- //发送板加数据
- function send() {
- model.removeNodeset("/root/reqData");
- model.makeNode("/root/reqData");
- //这里判断不为空
- if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
- alert(" 移送班次信息不能为空,请选择相应的移送班次! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
- alert(" 移送班组信息不能为空,请选择相应的移送班组信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_REG") == ""){
- alert(" 移送人信息不能为空,请选择相应的移送人信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
- alert(" 移送时间信息不能为空,请输入相应的移送时间信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ROUTE") == ""){
- alert(" 移送去向信息不能为空,请输入相应的移送去向信息!! ");
- return;
- }
-
- //判断卷重和车号不为空
- var nodeSet1 = dg1.nodeset;
- for(var j=1;j<dg1.rows;j++){
- var chk = model.getValue(nodeSet1+"["+j+"]/CHK");
-
- if(chk == "Y"){
- var COIL_WGT = model.getValue(nodeSet1+"["+j+"]/COIL_WGT");
- var TRANS_CAR_NO = model.getValue(nodeSet1+"["+j+"]/TRANS_CAR_NO");
-
- if(COIL_WGT == ""){
- alert("第"+j+"行的卷重数据为空,请核对后再点击保存按钮!");
- return;
- }
- if(TRANS_CAR_NO == ""){
- alert("第"+j+"行的车号数据为空,请核对后再点击保存按钮!");
- return;
- }
- }
- }
-
- var nRows = 1;
- var nCnt = dg1.rows - dg1.fixedRows + 1;
-
- for( var i = dg1.fixedRows ; i <= nCnt ; i++ ) {
- //alert( "i = ["+ i +"]\nCHK = ["+ dg1.valueMatrix(i, dg1.colRef("CHK")) +"]\nCOIL_NO = ["+ dg1.valueMatrix(i, dg1.colRef("COIL_NO")) +"]");
- if( dg1.valueMatrix(i, dg1.colRef("CHK")) == "Y" && dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) == "08" ) {
- //如果行选中,并且钢卷公共表中体现行车命令执行完
- dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD")) = "09";
- //出库清单号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SHIP_INVNO" , dg1.valueMatrix(i, dg1.colRef("SHIP_INVNO" )) );
- //钢卷号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/OLD_SAMPL_NO" , dg1.valueMatrix(i, dg1.colRef("OLD_SAMPL_NO" )) );
- //流水号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_NO" , dg1.valueMatrix(i, dg1.colRef("COIL_NO" )) );
- //板坯号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SLAB_NO" , dg1.valueMatrix(i, dg1.colRef("SLAB_NO" )) );
- //合同号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_NO" , dg1.valueMatrix(i, dg1.colRef("ORD_NO" )) );
- //订单号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_SEQ" , dg1.valueMatrix(i, dg1.colRef("ORD_SEQ" )) );
- //交货期
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DEVLMT_DTIME" , dg1.valueMatrix(i, dg1.colRef("DEVLMT_DTIME" )) );
- //订单厚度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_THK" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_THK" )) );
- //订单宽度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_WTH" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_WTH" )) );
- //订单长度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_LEN" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_LEN" )) );
- //订单内径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_INDIA" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_INDIA" )) );
- //订单外径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_OUTDIA" )) );
- //订单重量
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INSTR_COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("INSTR_COIL_WGT" )) );
- //目的代码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SM_CD" , dg1.valueMatrix(i, dg1.colRef("SM_CD" )) );
- //客户代码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_CD" , dg1.valueMatrix(i, dg1.colRef("ORD_CD" )) );
- //钢卷长度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_LEN" , dg1.valueMatrix(i, dg1.colRef("COIL_LEN" )) );
- //钢卷内径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_INDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_INDIA" )) );
- //钢卷外径
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_OUTDIA" , dg1.valueMatrix(i, dg1.colRef("COIL_OUTDIA" )) );
- //钢卷厚度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_THK" , dg1.valueMatrix(i, dg1.colRef("COIL_THK" )) );
- //钢卷宽度
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WTH" , dg1.valueMatrix(i, dg1.colRef("COIL_WTH" )) );
- //钢卷重量
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/COIL_WGT" , dg1.valueMatrix(i, dg1.colRef("COIL_WGT")) );
- //产品代码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/PRODNM_CD" , dg1.valueMatrix(i, dg1.colRef("PRODNM_CD" )) );
- //规格略号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_ABBSYM" , dg1.valueMatrix(i, dg1.colRef("SPEC_ABBSYM" )) );
- //订单用途代码
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ORD_USE_CD" , dg1.valueMatrix(i, dg1.colRef("ORD_USE_CD" )) );
- //钢种
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SPEC_STL_GRD" , dg1.valueMatrix(i, dg1.colRef("SPEC_STL_GRD" )) );
- //成分判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INGR_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("INGR_DEC_GRD" )) );
- //外观判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXTSHAPE_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("EXTSHAPE_DEC_GRD" )) );
- //尺寸判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/SIZE_DEC_RST" , dg1.valueMatrix(i, dg1.colRef("SIZE_DEC_RST" )) );
- //重量判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/WGT_DEC_RST" ,dg1.valueMatrix(i, dg1.colRef("WGT_DEC_RST" )));
- //材质判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MATLQLTY_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("MATLQLTY_DEC_GRD" )) );
- //综合判定等级
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_GRD" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_GRD" )) );
- //轧制时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MILL_DTIME" , dg1.valueMatrix(i, dg1.colRef("MILL_DTIME" )) );
- //成分判定时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/INGR_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("INGR_DEC_DTIME" )) );
- //材质判定时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/MATLQLTY_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("MATLQLTY_DEC_DTIME" )) );
- //外观判定时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/EXTSHAPE_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("EXTSHAPE_DEC_DTIME" )) );
- //综合判定时间
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TOT_DEC_DTIME" , dg1.valueMatrix(i, dg1.colRef("TOT_DEC_DTIME" )) );
- //瑕疵代码1
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD1" , dg1.valueMatrix(i, dg1.colRef("CRK_CD1" )) );
- //瑕疵代码2
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD2" , dg1.valueMatrix(i, dg1.colRef("CRK_CD2" )) );
- //瑕疵代码3
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD3" , dg1.valueMatrix(i, dg1.colRef("CRK_CD3" )) );
- //瑕疵代码4
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD4" , dg1.valueMatrix(i, dg1.colRef("CRK_CD4" )) );
- //瑕疵代码5
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRK_CD5" , dg1.valueMatrix(i, dg1.colRef("CRK_CD5" )) );
- //车辆号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/TRANS_CAR_NO" , dg1.valueMatrix(i, dg1.colRef("TRANS_CAR_NO" )) );
- //质保书编号
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/CRET_NO" , dg1.valueMatrix(i, dg1.colRef("CRET_NO" )) );
-
-
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipProgCd" , dg1.valueMatrix(i, dg1.colRef("SHIP_PROG_CD" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/ShipDirNo" , dg1.valueMatrix(i, dg1.colRef("SHIP_DIRNO" )) );
- model.makeValue("/root/reqData/ReqResult_1_Row["+ nRows +"]/DlivDirNo" , dg1.valueMatrix(i, dg1.colRef("DLIV_DIRNO" )) );
-
- nRows++;
- }
- }
-
- if( nRows > 1 ) {
- //这里加入班次、班组、出库人、时间
- model.duplicate("/root/reqData","/root/WK/ENTRY_SHIFT");
- model.duplicate("/root/reqData","/root/WK/ENTRY_GROUP");
- model.duplicate("/root/reqData","/root/WK/ENTRY_REG");
- model.duplicate("/root/reqData","/root/WK/ENTRY_DTIME");
- model.duplicate("/root/reqData","/root/WK/ROUTE");
-
- commSubmit("UIJ020400-service" ,"send" ,"glueAction.do" );
- commAppendData("/root/gridData1/ListResult_1_VO" ,"/root/resData/ListResult_1_VO");
- // calculateSummary();
- }
- model.refresh();
- }
- ]]>
- </script>
- </model>
- </xhtml:head>
- <xhtml:body>
- <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; ">
- <![CDATA[运输方式]]>
- </caption>
- <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:850px; top:5px; width:115px; height:25px; "/>
- <select1 id="DlivType" ref="/root/formData/DlivType" appearance="minimal" style="left:80px; top:5px; width:85px; height:20px; ">
- <choices>
- <item>
- <label>火运</label>
- <value>T</value>
- </item>
- <item>
- <label>汽运</label>
- <value>C</value>
- </item>
- </choices>
- </select1>
- <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; ">
- <![CDATA[运送指示号]]>
- </caption>
- <select1 id="DlivDirNo" ref="/root/formData/DlivDirNo" appearance="minimal" editmode="input" style="left:415px; top:5px; width:97px; height:20px; ">
- <choices>
- <itemset nodeset="/root/LOVData/DlivDirNo/LOVResult_1_Row">
- <label ref="DlivDirNoNm"/>
- <value ref="DlivDirNo"/>
- </itemset>
- </choices>
- </select1>
- <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; ">
- <![CDATA[状态区分]]>
- </caption>
- <select1 id="ShipProgCd" ref="/root/formData/ShipProgCd" appearance="minimal" style="left:609px; top:5px; width:99px; height:20px; ">
- <choices>
- <item>
- <label>发货待机</label>
- <value>06</value>
- </item>
- <item>
- <label>发货结束</label>
- <value>07</value>
- </item>
- <item>
- <label>明细发行结束</label>
- <value>08</value>
- </item>
- <item>
- <label>板加移送</label>
- <value>09</value>
- </item>
- </choices>
- </select1>
- <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; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col editable="false" ref="SHIP_PROG_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DEST_PCD_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SHIP_DIRNO" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="CUST_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="ORD_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SPEC_STL_GRD" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="OLD_SAMPL_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SPEC_ABBSYM" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="COIL_WGT" type="input" format="#,###" style="text-align:right; background-color:#ffffff; "/>
- <col ref="TRANS_CAR_NO" type="input" style="text-align:left; background-color:#ffff99; "/>
- <col editable="false" ref="CAL_WGT" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DLIV_DIRNO" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="ORD_NO" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="ORD_SEQ" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DLIV_TP_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SHIP_COMP_NM" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="EXLV_LINE_CD_DESC" type="input" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="BY_SEA_YN" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="ARRIVAL_CD" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="TOT_DEC_GRD" type="input" style="left:1203px; top:41px; width:40px; height:21px; text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="COIL_OUTDIA" type="input" format="#,###" style="text-align:right; background-color:#ffffff; "/>
- <col editable="false" ref="SHIP_INVNO" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="CZD_WGT" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="SM_CFNM" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="CRET_NO" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="TRNF_DTIME" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="TRNF_SHIFT" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="TRNF_GROUP" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="TRNF_USE_TIME" type="input" format="yyyy-mm-dd hh:nn:ss" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="HCOLOUR_REM" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="SLAB_NO" type="input" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="DEVLMT_DTIME" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_THK" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_WTH" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_LEN" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_WGT" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_INDIA" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="INSTR_COIL_OUTDIA" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_THK" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_WTH" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_LEN" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_WGT" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_INDIA" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="COIL_OUTDIA" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="SM_CD" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="ORD_CD" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="PRODNM_CD" type="input" style="background-color:#ffffff; "/>
- <col editable="false" ref="CRK_CD1" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="CRK_CD2" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="CRK_CD3" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="CRK_CD4" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="CRK_CD5" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="INGR_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="MATLQLTY_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="EXTSHAPE_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="TOT_DEC_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="INGR_DEC_GRD" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="SIZE_DEC_RST" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="EXTSHAPE_DEC_GRD" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="WGT_DEC_RST" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="MILL_DTIME" type="input" visibility="hidden" style="background-color:#ffffff; "/>
- <col editable="false" ref="ORD_USE_CD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="GET_OFF_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="GET_ON_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="COIL_NO" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SHIP_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="BEF_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="BEF_PROG_CD_DTIME" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="BEF_PROG_CD_PGM" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SHIP_COMP_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="COIL_STAT" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="CUR_PROG_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="CUR_PROG_CD_PGM" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DLIV_TP" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="DEST_PCD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="EXLV_LINE_CD" type="input" visibility="hidden" style="text-align:center; background-color:#ffffff; "/>
- <col editable="false" ref="DEPARTURE_CD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="MATLQLTY_DEC_GRD" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="T_W" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="SYS_TIME" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="TOT_DEC_GRD_DESC" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- <col editable="false" ref="MATLQLTY_DEC_GRD_DESC" type="input" visibility="hidden" style="text-align:left; background-color:#ffffff; "/>
- </datagrid>
- <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; "/>
- <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; "/>
- <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; "/>
- <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>
- <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>
- <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>
- <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>
- <button id="button1" style="left:905px; top:30px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <button id="button2" style="left:905px; top:55px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>保存</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <button id="button3" style="left:905px; top:80px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>打印</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //这里发货明细的打印应该是同一客户同一运输指示号下的
- var nodeSet1 = dg1.nodeset;
- var DLIV_DIRNO1 = null;
- //不同合同号的需要打印不同的明细
- var ORD_NO_TMP = null;
- //运输方式
- var DLIV_TP = null;
- for(var i=1;i<=dg1.rows;i++){
-
- var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
-
- if(chk1 == "Y"){
- DLIV_DIRNO1 = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
- DLIV_TP = model.getValue(nodeSet1+"["+i+"]/DLIV_TP");
- ORD_NO_TMP = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
-
- break;
- }
-
-
- }
-
- //再次循环datagrid1,如果发现车厢号不同的就给出提示。并且打印不成功
- for(var i=1;i<=dg1.rows;i++){
- var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
-
- if(chk1 == "Y"){
- var DLIV_DIRNO = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
- while(DLIV_DIRNO1 != DLIV_DIRNO){
- alert(" 不同运输指示号下的卷不能生成同一张发货明细,请确认后重新选择! ");
- return;
- }
- }
- }
- //取出第一个合同号
- var ORD_NO_TMP1 = null;
- //这里合同号不一样的,需要单独提示
- for(var i=1;i<=dg1.rows;i++){
- var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
-
- while(chk1 == "Y"){
- ORD_NO_TMP1 = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
- break;
- }
-
- if(ORD_NO_TMP != ORD_NO_TMP1 && ORD_NO_TMP != null && ORD_NO_TMP1 !=null){
- alert(" 同运输指示号下的卷,合同号不一样需要分开打印发货明细! ");
- return;
- }
- }
-
- //这里判断不为空
- if(model.getValue("/root/WK/ENTRY_SHIFT") == ""){
- alert(" 出库班次信息不能为空,请选择相应的出库班次! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_GROUP") == ""){
- alert(" 出库班组信息不能为空,请选择相应的出库班组信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_REG") == ""){
- alert(" 出库人信息不能为空,请选择相应的出库人信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/ENTRY_DTIME") == ""){
- alert(" 出库时间信息不能为空,请输入相应的出库时间信息!! ");
- return;
- }
-
- if(model.getValue("/root/CZD") == ""){
- alert(" 草支垫重量不能为空,请输入草支垫重量!! ");
- return;
- }
-
- //判断完后再做打印明细准备,这里再做一个表格定义打印格式
- // for(var i=dg1.fixedRows;i<=dg1.rows;i++){
- // var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
- //
- // if(chk1 == "Y"){
- // //合同号
- // var ORD_NO = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
- // //发货清单号,由系统生成。待确认
- // var SHIP_INVNO = model.getValue(nodeSet1+"["+i+"]/SHIP_INVNO");
- // //这里编号和产品名称不确认
- // //总重量,总卷数放到后台去计算,这里暂时不表示
- // //发货日期,这里取系统时间,从数据库中取
- // //收货单位,这里需要从数据库中取
- // }
- // }
-
- //这里需要分火车和汽车的情况给于不同的格式
- if(DLIV_TP == "T"){
- //取出表头相应的值后,填入相应的位置。再把表头数据放入dg2中
- commAppendData ("/root/gridData2/ListResult_1_VO" ,"/root/EXCELHead/ListResult_1_VO" );
-
- model.refresh();
- }else if(DLIV_TP == "C"){
- //取出表头相应的值后,填入相应的位置。再把表头数据放入dg2中
- commAppendData ("/root/gridData2/ListResult_1_VO" ,"/root/EXCELHeadCAR/ListResult_1_VO" );
-
- model.refresh();
- }
-
-
- //把表头数据放入后还需要放入主题数据
- //这里表头数据就占用了前8行,主体数据从第9行开始有一个加一个
-
- var num_row = 8;
- //这里通过运输方式来区分
- var DLIV_TP = null;
- //合同号
- var ORD_NO = null;
- //发货单号,对应表单的发货清单号
- var SHIP_INVNO = null;
- //运输指示号
- var DLIV_DIRNO = null;
- //用户编码,对应合同单位
- var CUST_NM = null;
- //用户编码,对应收货单位
- var ORD_NM = null;
- //到站
- var DEST_PCD_DESC = null;
- //制表,这里使用登录人
- var REG_ID = null;
- //车号
- var TRANS_CAR_NO = null;
- //收货单位,对应用户编码
- //产品名称
- var PRODNM_CD = null;
- //标准
- var SPEC_ABBSYM = null;
- //钢卷个数
- var coil_num_tmp = null;
- //钢卷重量
- var coil_wgt_tmp = null;
- //草支垫重量
- var CZD = null;
- //合同备注,新加入的
- var HCOLOUR_REM = null;
-
- for(var i=1;i<=dg1.rows;i++){
- var chk1 = model.getValue(nodeSet1+"["+i+"]/CHK");
-
- if(chk1 == "Y"){
-
- //alert("num_row : "+num_row);
- coil_num_tmp = coil_num_tmp +1;
-
- //alert("coil_num_tmp : "+coil_num_tmp);
-
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col1");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col2");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col3");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col4");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col5");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col6");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col7");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col8");
-
- //轧批号//钢卷号,真实钢卷号
- var COIL_NO = model.getValue(nodeSet1+"["+i+"]/OLD_SAMPL_NO");
- //钢号
- var SPEC_STL_GRD = model.getValue(nodeSet1+"["+i+"]/SPEC_STL_GRD");
-
- //规格,没有
- var T_W = model.getValue(nodeSet1+"["+i+"]/T_W");
- //重量(吨)
- var COIL_WGT = model.getValue(nodeSet1+"["+i+"]/COIL_WGT");
- //等级,这里使用表述字段
- var TOT_DEC_GRD = model.getValue(nodeSet1+"["+i+"]/TOT_DEC_GRD_DESC");
- //性能 MATLQLTY_DEC_GRD。这里使用表述字段
- var MATLQLTY_DEC_GRD = model.getValue(nodeSet1+"["+i+"]/MATLQLTY_DEC_GRD_DESC");
- //备注
-
-
-
- //这里循环获取表格主体数据
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col1",COIL_NO.substr(0,10));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col2",SPEC_STL_GRD);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col3",T_W);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col4",(COIL_WGT/1000));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col5",COIL_NO);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col6",TOT_DEC_GRD);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col7",MATLQLTY_DEC_GRD);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+num_row+"]/col8","");
-
- //这里获取表头数据
- //这里把需要的值放入特定的位置,写死并且需要区分火运和汽运的情况。
- //这里通过运输方式来区分
- DLIV_TP = model.getValue(nodeSet1+"["+i+"]/DLIV_TP");
- //合同号
- ORD_NO = model.getValue(nodeSet1+"["+i+"]/ORD_NO");
- //发货单号,对应表单的发货清单号
- SHIP_INVNO = model.getValue(nodeSet1+"["+i+"]/SHIP_INVNO");
- //运输指示号
- DLIV_DIRNO = model.getValue(nodeSet1+"["+i+"]/DLIV_DIRNO");
- //用户编码,对应客户公司
- CUST_NM = model.getValue(nodeSet1+"["+i+"]/CUST_NM");
- ORD_NM = model.getValue(nodeSet1+"["+i+"]/ORD_NM");
-
- //发货日,这里取出库时间
- var SYS_TIME = model.getValue("/root/WK/ENTRY_DTIME");
- //编号,这里新钢有自己的编号规则。所以先空着确认后再处理
-
- //计划单号,这里新钢没有填入。暂时空着
-
- //到站
- DEST_PCD_DESC = model.getValue(nodeSet1+"["+i+"]/DEST_PCD_DESC");
- //制表,这里使用出库人
- REG_ID = model.getValue("/root/WK/ENTRY_REG");
- //计划单号
-
- //车号
- TRANS_CAR_NO = model.getValue(nodeSet1+"["+i+"]/TRANS_CAR_NO");
- //收货单位
-
- //发货备注,这里为空
-
- //产品名称
- PRODNM_CD = model.getValue(nodeSet1+"["+i+"]/SM_CFNM");
- //标准
- SPEC_ABBSYM = model.getValue(nodeSet1+"["+i+"]/SPEC_ABBSYM");
-
- //钢卷重量累加
- coil_wgt_tmp = Number(COIL_WGT) + Number(coil_wgt_tmp);
-
- //草支垫重量
- CZD = model.getValue("/root/CZD");
-
- //外贸合同颜色备注栏
- HCOLOUR_REM = model.getValue(nodeSet1+"["+i+"]/HCOLOUR_REM");
-
- //alert("coil_wgt_tmp : "+coil_wgt_tmp);
- //先赋值再增加行
- num_row = num_row+1;
- }
- }
-
- //这里能不能在添加几个空行,以便后面合计使用
- for(var j=dg2.rows;j<=20;j++){
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col1");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col2");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col3");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col4");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col5");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col6");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col7");
- model.makeNode("/root/gridData2/ListResult_1_VO/ListResult_1_Row["+j+"]/col8");
- }
-
- //这里写在循环外面,保证取值的时候只取一次。
- if(DLIV_TP == "T"){
- //火运的情况
- //汽运的情况
- //合同号和发货单号,第二行
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col2","'"+ORD_NO);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col5",DLIV_DIRNO);
- //第三行,用户编码
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col2","");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col5",SYS_TIME);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col6","第"+SHIP_INVNO+"号");
- //第四行,用户名称
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col2",CUST_NM);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col5",DEST_PCD_DESC.substr(0,9));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col7",REG_ID);
- //第五行,计划单号
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col2","");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col5",TRANS_CAR_NO);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col7",ORD_NM);
- //第六行,发货备注
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col2",HCOLOUR_REM);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col5",PRODNM_CD);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col7",SPEC_ABBSYM);
-
- //第20行,总计
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col1","小计");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col3",coil_num_tmp+"卷");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col4",Number(coil_wgt_tmp/1000));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col8","合计:"+CZD+"公斤");
-
- }else if(DLIV_TP == "C"){
- //汽运的情况
- //合同号和发货单号,第二行
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col2","'"+ORD_NO);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[2]/col5",DLIV_DIRNO);
- //第三行,用户编码
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col2","");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col5",SYS_TIME);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[3]/col6","第"+SHIP_INVNO+"号");
- //第四行,用户名称
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col2",CUST_NM);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col5",DEST_PCD_DESC.substr(0,9));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[4]/col7",REG_ID);
- //第五行,计划单号
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col2","");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col5",TRANS_CAR_NO);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[5]/col7",ORD_NM);
- //第六行,发货备注
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col2",HCOLOUR_REM);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col5",PRODNM_CD);
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[6]/col7",SPEC_ABBSYM);
-
- //第20行,总计
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col1","小计");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col3",coil_num_tmp+"卷");
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col4",Number(coil_wgt_tmp/1000));
- model.setValue("/root/gridData2/ListResult_1_VO/ListResult_1_Row[20]/col8","合计:"+CZD+"公斤");
- }
-
- model.refresh();
-
- //导出EXCEL方法
- saveExcelScript(dg2, "Sheet1");
- //打印后修改发货状态的方法
- print();
-
- ]]>
- </script>
- <hint>
- <![CDATA[打印的发货明细请保存在C盘]]>
- </hint>
- </button>
- <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; ">
- <col ref="col1"/>
- <col ref="col2"/>
- <col ref="col3"/>
- <col ref="col4"/>
- <col ref="col5"/>
- <col ref="col6"/>
- <col ref="col7"/>
- <col ref="col8"/>
- </datagrid>
- <caption id="caption21" class="cell" style="left:0px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班次</caption>
- <caption id="caption23" class="cell" style="left:145px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班组</caption>
- <caption id="caption5" class="cell" style="left:455px; top:35px; width:60px; height:20px; border-color:#000000; ">出库时间</caption>
- <caption id="caption14" class="cell" style="left:310px; top:35px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">出库人</caption>
- <select1 id="combo7" ref="/root/WK/ENTRY_REG" appearance="minimal" editmode="input" style="left:370px; top:35px; width:80px; height:20px; background-color:#ffff99; ">
- <choices>
- <item>
- <label>刘文</label>
- <value>刘文</value>
- </item>
- <item>
- <label>蔡伟平</label>
- <value>蔡伟平</value>
- </item>
- <item>
- <label>廖林敏</label>
- <value>廖林敏</value>
- </item>
- <item>
- <label>周文刚</label>
- <value>周文刚</value>
- </item>
- <item>
- <label>吴贤峰</label>
- <value>吴贤峰</value>
- </item>
- <item>
- <label>敖艳敏</label>
- <value>敖艳敏</value>
- </item>
- <item>
- <label>林珑</label>
- <value>林珑</value>
- </item>
- <item>
- <label>成武</label>
- <value>成武</value>
- </item>
- <item>
- <label>安凡能</label>
- <value>安凡能</value>
- </item>
- <item>
- <label>李学海</label>
- <value>李学海</value>
- </item>
- <item>
- <label>刘忠华</label>
- <value>刘忠华</value>
- </item>
- </choices>
- </select1>
- <select1 id="combo8" ref="/root/WK/ENTRY_SHIFT" appearance="minimal" style="left:60px; top:35px; width:80px; height:20px; background-color:#ffff99; ">
- <choices>
- <item>
- <label>早</label>
- <value>1</value>
- </item>
- <item>
- <label>中</label>
- <value>2</value>
- </item>
- <item>
- <label>晚</label>
- <value>3</value>
- </item>
- </choices>
- </select1>
- <select1 id="combo9" ref="/root/WK/ENTRY_GROUP" appearance="minimal" style="left:205px; top:35px; width:100px; height:20px; background-color:#ffff99; ">
- <choices>
- <item>
- <label>甲</label>
- <value>A</value>
- </item>
- <item>
- <label>乙</label>
- <value>B</value>
- </item>
- <item>
- <label>丙</label>
- <value>C</value>
- </item>
- <item>
- <label>丁</label>
- <value>D</value>
- </item>
- </choices>
- </select1>
- <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; "/>
- <caption id="caption6" class="cell" style="left:630px; top:35px; width:85px; height:20px; border-color:#000000; ">草支垫重量</caption>
- <input id="input1" ref="/root/CZD" format="#,###" style="left:715px; top:35px; width:70px; height:20px; background-color:#ffff99; "/>
- <caption id="caption7" class="cell" style="left:785px; top:35px; width:35px; height:20px; border-color:#000000; ">公斤</caption>
- <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; ">
- <![CDATA[发货指示号]]>
- </caption>
- <select1 id="ShipDirNo" ref="/root/formData/ShipDirNo" visibility="hidden" appearance="minimal" style="left:590px; top:205px; width:97px; height:20px; ">
- <choices>
- <itemset nodeset="/root/LOVData/ShipDirNo/LOVResult_1_Row">
- <label ref="ShipDirNoNm"/>
- <value ref="ShipDirNo"/>
- </itemset>
- </choices>
- </select1>
- <input id="input2" ref="/root/formData/CAR_NO" style="left:230px; top:5px; width:90px; height:20px; "/>
- <caption id="caption8" class="cell" style="left:170px; top:5px; width:60px; height:20px; border-color:#000000; ">车辆号</caption>
- <button id="button4" visibility="hidden" style="left:905px; top:105px; width:60px; height:20px; background-color:#c0c0c0; ">
- <caption>板加移送</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- send();
- ]]>
- </script>
- <hint>
- <![CDATA[打印的发货明细请保存在C盘]]>
- </hint>
- </button>
- <caption id="caption9" class="cell" style="left:715px; top:5px; width:45px; height:20px; border-color:#000000; ">去向</caption>
- <select1 id="combo1" ref="/root/WK/ROUTE" appearance="minimal" style="left:760px; top:5px; width:80px; height:20px; ">
- <choices>
- <item>
- <label>板加厂</label>
- <value>BJ</value>
- </item>
- </choices>
- </select1>
- </xhtml:body>
- </xhtml:html>
|