| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="D:/workspace/xgmes3/WebContents/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>
- <![CDATA[热轧作业>>钢卷库管理>>钢卷库冷轧移送(UIH052400)]]>
- </xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <reqData/>
- <resData/>
- <datagrid1/>
- <datagrid2/>
- <WK>
- <TRNF_SHIFT/>
- <TRNF_GROUP/>
- <TRNF_REG/>
- <TRNF_DTIME/>
- <TRANSFER_TYPE/>
- <TRANSFER_NO/>
- <COIL_NOS/>
- <ACT_WGTS/>
- <ORD_NOS/>
- <ORD_SEQS/>
- <CUR_PROG_CDS/>
- <LSHS/>
- <TRANSSEQS/>
- </WK>
- <TR>
- <TRANSFER_TIME/>
- <TRANSFER_NO/>
- </TR>
- <QDATA>
- <ORD_YN/>
- <ORD_NO/>
- <ORD_SEQ/>
- <COIL_NO/>
- </QDATA>
- <EXCELHead>
- <ListResult_1_VO>
- <ListResult_1_Row>
- <col1>冷轧钢卷移送明细单</col1>
- <col2/>
- <col3/>
- <col4/>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>移送班次</col1>
- <col2/>
- <col3/>
- <col4>移送班组</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>移送人</col1>
- <col2/>
- <col3/>
- <col4>移送时间</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>序号</col1>
- <col2>钢卷号</col2>
- <col3>冶炼炉号</col3>
- <col4>钢种</col4>
- <col5>成品厚度</col5>
- <col6>成品宽度</col6>
- <col7>订单厚度</col7>
- <col8>订单宽度</col8>
- <col9>重量</col9>
- <col10>外径</col10>
- <col11>内径</col11>
- <col12>堆放位置</col12>
- <col13>外观质量</col13>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <col1>序号</col1>
- <col2>钢卷号</col2>
- <col3>冶炼炉号</col3>
- <col4>钢种</col4>
- <col5>成品厚度</col5>
- <col6>成品宽度</col6>
- <col7>订单厚度</col7>
- <col8>订单宽度</col8>
- <col9>重量</col9>
- <col10>外径</col10>
- <col11>内径</col11>
- <col12>堆放位置</col12>
- <col13>外观质量</col13>
- </ListResult_1_Row>
- </ListResult_1_VO>
- </EXCELHead>
- <dg1/>
- <EXCELHead2>
- <ListResult_2_VO>
- <ListResult_2_Row>
- <col1>冷轧钢卷移送实绩明细单</col1>
- <col2/>
- <col3/>
- <col4/>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- <col14/>
- <col15/>
- <col16/>
- <col17/>
- <col18/>
- </ListResult_2_Row>
- <ListResult_2_Row>
- <col1/>
- <col2>退回班次</col2>
- <col3/>
- <col4>退回班组</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- <col14/>
- <col15/>
- <col16/>
- <col17/>
- <col18/>
- </ListResult_2_Row>
- <ListResult_2_Row>
- <col1/>
- <col2>退回人</col2>
- <col3/>
- <col4>退回时间</col4>
- <col5/>
- <col6/>
- <col7/>
- <col8/>
- <col9/>
- <col10/>
- <col11/>
- <col12/>
- <col13/>
- <col14/>
- <col15/>
- <col16/>
- <col17/>
- <col18/>
- </ListResult_2_Row>
- <ListResult_2_Row>
- <col1>序号</col1>
- <col2>钢卷号</col2>
- <col3>牌号</col3>
- <col4>合同号</col4>
- <col5>订单号</col5>
- <col6>宽度</col6>
- <col7>厚度</col7>
- <col8>长度</col8>
- <col9>重量</col9>
- <col10>移送区分</col10>
- <col11>车辆号</col11>
- <col12>移送顺序</col12>
- <col13>退回堆放位置</col13>
- <col14>移送日期</col14>
- <col15>接收人</col15>
- <col16>接收时间</col16>
- <col17>退回人</col17>
- <col18>退回时间</col18>
- </ListResult_2_Row>
- <ListResult_2_Row>
- <col1>序号</col1>
- <col2>钢卷号</col2>
- <col3>牌号</col3>
- <col4>合同号</col4>
- <col5>订单号</col5>
- <col6>宽度</col6>
- <col7>厚度</col7>
- <col8>长度</col8>
- <col9>重量</col9>
- <col10>移送区分</col10>
- <col11>车辆号</col11>
- <col12>移送顺序</col12>
- <col13>退回堆放位置</col13>
- <col14>移送日期</col14>
- <col15>接收人</col15>
- <col16>接收时间</col16>
- <col17>退回人</col17>
- <col18>退回时间</col18>
- </ListResult_2_Row>
- </ListResult_2_VO>
- </EXCELHead2>
- <dg2/>
- <RegResultc>
- <InitRegResultc_Row>
- <LABEL/>
- <VALUE/>
- </InitRegResultc_Row>
- </RegResultc>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- if(window.parent==null) Init();
- ]]>
- </script>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript">
- <![CDATA[
- //页面初始化的时候需要获取登录的相关用户信息
- function Init(node) {
- InitParams(node);
- commSubmit("UIB010278-service", "success", "glueAction.do");
- model.copyNode("/root/RegResultc" , "/root/resData/InitRegResultc_VO");
- model.refresh();
- }
- //调用公共的初始化方法获得登录用户名
- 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;
- node = model.instances(0).selectSingleNode("/root/initData/rcvInfo");
- for (var i = 0; i < nodeList.length; i++)
- node.appendChild(nodeList.item(i));
- }
-
- /**
- 移送实绩导出功能数据设置
- */
- function setExcelData(){
- var transList = new Array();
-
- var nRows = 0;
- var nCnt = datagrid2.rows - datagrid2.fixedRows + 1;
- var coilNos = "";
- var actWgts = "";
- var ordNos = "";
- var ordSeqs = "";
- var curProgCds = "";
- var lshs = "";
- var transSeqs = "";//移送顺序
- var transId = 1;
- for( var i = datagrid2.fixedRows ; i <= nCnt ; i++ ) {
-
- if( true) {
- //移送顺序
- // if(datagrid1.valueMatrix(i, datagrid1.colRef("CR_PLANT_TRS_SEQ")) == ""){
- // alert("移送的钢卷必须输入移送顺序,请确认后重新操作!");
- // return;
- // }
- //钢卷号
- coilNos += datagrid2.valueMatrix(i, datagrid2.colRef("OLD_SAMPL_NO"))+"|";
- actWgts += datagrid2.valueMatrix(i, datagrid2.colRef("ACT_WGT"))+"|";
- ordNos += datagrid2.valueMatrix(i, datagrid2.colRef("ORD_NO"))+"|";
- ordSeqs += datagrid2.valueMatrix(i, datagrid2.colRef("ORD_SEQ"))+"|";
- curProgCds += datagrid2.valueMatrix(i, datagrid2.colRef("CUR_PROG_CD"))+"|";
- lshs += datagrid2.valueMatrix(i, datagrid2.colRef("COIL_NO"))+"|";//流水号
- transSeqs += datagrid2.valueMatrix(i, datagrid2.colRef("CR_PLANT_TRS_SEQ")) + "|";
-
- var transObj = new TransObject2();
- transObj.id2 = transId;
- transObj.coilNo2 = datagrid2.valueMatrix(i, datagrid2.colRef("OLD_SAMPL_NO"));
- transObj.stlGrd2 = datagrid2.valueMatrix(i, datagrid2.colRef("STL_GRD"));
- transObj.ordNo2 = datagrid2.valueMatrix(i, datagrid2.colRef("ORD_NO"));
- transObj.ordSeq2 = datagrid2.valueMatrix(i, datagrid2.colRef("ORD_SEQ"));
- transObj.coilWth2 = datagrid2.valueMatrix(i, datagrid2.colRef("COIL_WTH"));
- transObj.coilThk2 = datagrid2.valueMatrix(i, datagrid2.colRef("COIL_THK"));
- transObj.coilLen2 = datagrid2.valueMatrix(i, datagrid2.colRef("COIL_LEN"));
- transObj.coilWgt2 = datagrid2.valueMatrix(i, datagrid2.colRef("ACT_WGT"));
- transObj.crPlantClf2 = datagrid2.valueMatrix(i, datagrid2.colRef("CR_PLANT_TRS_CLF"));
- transObj.crPlantNo2 = datagrid2.valueMatrix(i, datagrid2.colRef("CR_PLANT_TRS_NO"));
- transObj.crPlantCd2 = datagrid2.valueMatrix(i, datagrid2.colRef("CR_PLANT_TRS_CD"));
- transObj.curLoadLoc2 = datagrid2.valueMatrix(i, datagrid2.colRef("CUR_LOAD_LOC"));
- transObj.crPlantTime2 = datagrid2.valueMatrix(i, datagrid2.colRef("CR_PLANT_TRS_DTIME"));
- transObj.receiveReg2 = datagrid2.valueMatrix(i, datagrid2.colRef("RECEIVE_REG"));
- transObj.receiveTime2 = datagrid2.valueMatrix(i, datagrid2.colRef("RECEIBE_TIME"));
- transObj.trnfReg2 = datagrid2.valueMatrix(i, datagrid2.colRef("TRNF_REG"));
- transObj.trnfTime2 = datagrid2.valueMatrix(i, datagrid2.colRef("TRNF_DTIME"));
- transId++;
- transList.push(transObj);
- }
- nRows++;
- }
-
- if(nRows > 0){
- model.makeValue("/root/WK/COIL_NOS",coilNos);
- model.duplicate("/root/reqData","/root/WK/COIL_NOS");
- model.makeValue("/root/WK/ACT_WGTS",actWgts);
- model.duplicate("/root/reqData","/root/WK/ACT_WGTS");
- model.makeValue("/root/WK/ORD_NOS",ordNos);
- model.duplicate("/root/reqData","/root/WK/ORD_NOS");
- model.makeValue("/root/WK/ORD_SEQS",ordSeqs);
- model.duplicate("/root/reqData","/root/WK/ORD_SEQS");
- model.makeValue("/root/WK/CUR_PROG_CDS",curProgCds);
- model.duplicate("/root/reqData","/root/WK/CUR_PROG_CDS");
- model.makeValue("/root/WK/LSHS",lshs);
- model.duplicate("/root/reqData","/root/WK/LSHS");
- model.makeValue("/root/WK/TRANSSEQS",transSeqs);
- model.duplicate("/root/reqData","/root/WK/TRANSSEQS");
- //这里加入班次、班组、出库人、时间
- model.duplicate("/root/reqData","/root/WK/TRNF_SHIFT");
- model.duplicate("/root/reqData","/root/WK/TRNF_GROUP");
- model.duplicate("/root/reqData","/root/WK/TRNF_REG");
- model.duplicate("/root/reqData","/root/WK/TRNF_DTIME");
- model.duplicate("/root/reqData","/root/WK/TRANSFER_TYPE");
- model.duplicate("/root/reqData","/root/WK/TRANSFER_NO");
-
- if(transList.length > 0)
- {
- commAppendData ("/root/dg2/ListResult_2_VO" ,"/root/EXCELHead2/ListResult_2_VO" );
-
- //var wgtCount = 0;
- for(var k = 0;k < transList.length;k++){
- var transObj = transList[k];
- var row = k+5;
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col1");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col1",transObj.id2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col2");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col2",transObj.coilNo2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col3");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col3",transObj.stlGrd2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col4");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col4",transObj.ordNo2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col5");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col5",transObj.ordSeq2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col6");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col6",transObj.coilWth2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col7");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col7",transObj.coilThk2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col8");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col8",transObj.coilLen2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col9");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col9",transObj.coilWgt2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col10");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col10",transObj.crPlantClf2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col11");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col11",transObj.crPlantNo2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col12");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col12",transObj.crPlantCd2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col13");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col13",transObj.curLoadLoc2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col14");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col14",transObj.crPlantTime2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col15");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col15",transObj.receiveReg2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col16");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col16",transObj.receiveTime2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col17");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col17",transObj.trnfReg2);
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col18");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ row +"]/col18",transObj.trnfTime2);
-
-
- //wgtCount += parseFloat(transObj.coilWgt2);
- }
-
- for(var k = 5;k < 8;k++){
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col1");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col2");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k)+"]/col3");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col4");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col5");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k)+"]/col6");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col7");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col8");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col9");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col10");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col11");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col12");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col13");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col14");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col15");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col16");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col17");
- model.makeNode("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+k) +"]/col18");
- }
-
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+2 +"]/col3",combo8.label + "班");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+2 +"]/col5",combo9.label + "班");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+3 +"]/col3",model.getValue("/root/WK/TRNF_REG"));
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+3 +"]/col5",model.getValue("/root/WK/TRNF_DTIME") + " ");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+7) +"]/col1","小计");
- model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+7) +"]/col2",transList.length + "卷");
-
- //model.setValue("/root/dg2/ListResult_2_VO/ListResult_2_Row["+ (transList.length+7) +"]/col9",(wgtCount/1000) + "吨");
-
- model.refresh();
-
- saveExcelScript2(dg2,"Sheet1");
- }
- }
-
- }
- /**
- 移送实绩导出功能
- */
- function saveExcelScript2(sDGridName, sExcelSheetName, saveType) {
- var sExcelName = window.fileDialog( "save", "", false, "冷轧钢卷移送实绩明细单", "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; //Keep Careful !!!
- //导出表的列数
- var nCols = sDGridName.cols;
-
- //All of the range
- ObjTFExcel.fontcolor( 01, 01, nRows, nCols ) = "#000000" ;
- ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
- //Header
- //Line 1 : Sheet Title
- //行高的设置
- ObjTFExcel.rowheight( 01 ) = 30 ;
- ObjTFExcel.bold ( 01, 01, 01, nCols ) = true ;
- //改变字体大小
- ObjTFExcel.fontsize ( 01, 01, 01, nCols ) = 14;
- 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 ;
- for(var i = 2; i <= nRows; i++ ) {
- ObjTFExcel.rowHeight( i ) = 18;
- }
-
- //取消边框
- ObjTFExcel.setBorderColor( 01, 01, nRows, nCols, "#000000") ;
- //ObjTFExcel.bold ( 01, 01, nRows, nCols ) = false ;
- ObjTFExcel.bold ( 01, 01, 01, nCols) = true ;
- ObjTFExcel.bold ( 02, 02, 02, 02 ) = true ;
- ObjTFExcel.bold ( 02, 04, 02, 04) = true ;
- ObjTFExcel.bold ( 03, 02, 03, 02 ) = true ;
- ObjTFExcel.bold ( 03, 04, 03, 04 ) = true ;
- ObjTFExcel.bold ( 04, 01, 04, 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 ( 04, 01, 04, nCols ) ="center" ;
- ObjTFExcel.halign ( 05, 02, nRows, nCols ) ="left" ;
-
-
- //字体左对齐的特殊定义
- 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" ;
-
- //合并单元格
- //ObjTFExcel.mergeCell(02,02,02,03);
- ObjTFExcel.mergeCell(02,05,02,18);
- //ObjTFExcel.mergeCell(03,02,03,03);
- ObjTFExcel.mergeCell(03,05,03,18);
-
- //设置列的宽度
- ObjTFExcel.colwidth ( 01 ) = 8 ;
- ObjTFExcel.colwidth ( 02 ) = 16 ;
- ObjTFExcel.colwidth ( 03 ) = 13 ;
- ObjTFExcel.colwidth ( 04 ) = 16 ;
- //设置表格文本常规格式
- ObjTFExcel.setFormat(05, 04, nRows, 04, "0;@");
-
- ObjTFExcel.colwidth ( 05 ) = 10 ;
- //设置表格文本格式
- ObjTFExcel.setFormat(05, 05, nRows, 05, "000;@");
- ObjTFExcel.colwidth ( 06 ) = 10 ;
- ObjTFExcel.colwidth ( 07 ) = 10 ;
- ObjTFExcel.colwidth ( 08 ) = 10 ;
- ObjTFExcel.colwidth ( 09 ) = 10 ;
- ObjTFExcel.colwidth ( 10 ) = 12 ;
- ObjTFExcel.colwidth ( 11 ) = 10 ;
- ObjTFExcel.colwidth ( 12 ) = 10 ;
- ObjTFExcel.colwidth ( 13 ) = 15 ;
- ObjTFExcel.colwidth ( 14 ) = 12 ;
- ObjTFExcel.halign (05,14, nRows, 14) ="right" ;
- ObjTFExcel.setFormat(05, 14, nRows, 14, "yyyy\"-\"mm\"-\"dd;@");
- ObjTFExcel.colwidth ( 15 ) = 12 ;
- ObjTFExcel.colwidth ( 16 ) = 21 ;
- ObjTFExcel.halign (05,16, nRows, 16) ="right" ;
- ObjTFExcel.setFormat(05, 16, nRows, 16, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
- ObjTFExcel.colwidth ( 17 ) = 12 ;
- ObjTFExcel.colwidth ( 18 ) = 21 ;
- ObjTFExcel.halign (05,18, nRows, 18) ="right" ;
- ObjTFExcel.setFormat(05, 18, nRows,18, "yyyy\"-\"mm\"-\"dd\"\" hh\":\"mm\":\"ss\"\";@");
- //ObjTFExcel.halign (05,16, nRows, 16) ="right" ; //接收日期
- //ObjTFExcel.setFormat(05, 18, nRows, 18, "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 TransObject2(){
- this.id2 = null;
- this.coilNo2 = null;
- this.stlGrd2 = null;
- this.ordNo2 = null;
- this.ordSeq2 = null;
- this.coilWth2 = null;
- this.coilThk2 = null;
- this.coilLen2 = null;
- this.coilWgt2 = 0;
- this.crPlantClf2 = null;
- this.crPlantNo2 = null;
- this.crPlantCd2 = null;
- this.curLoadLoc2 = null;
- this.crPlantTime2 = null;
- this.receiveReg2 = null;
- this.receiveTime2 = null;
- this.trnfReg2 = null;
- this.trnfTime2 = null;
- }
-
- /*
- *查询操作
- */
- function find(){
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.refresh();
-
-
- model.duplicate("/root/reqData","/root/QDATA/ORD_NO");
- model.duplicate("/root/reqData","/root/QDATA/ORD_SEQ");
- model.duplicate("/root/reqData","/root/QDATA/COIL_NO");
- commSubmit("UIH052402-service", "find", "glueAction.do");
-
- commAppendData("/root/datagrid1/ColdCoilResult_VO","/root/resData/ColdCoilResult_VO");
-
- model.refresh();
- //计算总数目和总重量
- }
-
- function getNowFormatDate() {
- var currentdate = commCurDate();
- return currentdate;
- }
- /**
- *移送冷轧操作
- */
- function save(){
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
-
- //这里判断不为空
- if(model.getValue("/root/WK/TRNF_SHIFT") == ""){
- alert(" 出库班次信息不能为空,请选择相应的出库班次! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_GROUP") == ""){
- alert(" 出库班组信息不能为空,请选择相应的出库班组信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_REG") == ""){
- alert(" 出库人信息不能为空,请选择相应的出库人信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_DTIME") == ""){
- alert(" 出库时间信息不能为空,请输入相应的出库时间信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRANSFER_TYPE") == ""){
- alert(" 移送区分不能为空,请选 择相应的移送方式!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRANSFER_NO") == ""){
- alert(" 步进梁号/车辆号不能为空,请输入相应的步进梁号/车辆号!! ");
- return;
- }
-
- var tmpdate = getNowFormatDate();
- var inputdate =model.getValue("/root/WK/TRNF_DTIME") ;
- if(inputdate!=tmpdate)
- {
- alert("所输移送日期"+"("+inputdate+")"+"不等于当前日期"+"("+tmpdate+")"+",禁止移送,请重新输入!");
- return;
- }
-
- var transList = new Array();
-
- var nRows = 0;
- var nCnt = datagrid1.rows - datagrid1.fixedRows + 1;
- var coilNos = "";
- var actWgts = "";
- var ordNos = "";
- var ordSeqs = "";
- var curProgCds = "";
- var lshs = "";
- var transSeqs = "";//移送顺序
- var transId = 1;
- for( var i = datagrid1.fixedRows ; i <= nCnt ; i++ ) {
- if( datagrid1.valueMatrix(i, datagrid1.colRef("CHK")) == "Y") {
-
- if(1.7>datagrid1.valueMatrix(i, datagrid1.colRef("COIL_THK")) >0){
- alert("厚度不符合要求!(0~2mm不允许移送)");
- return;
- }
- //移送顺序
- if(datagrid1.valueMatrix(i, datagrid1.colRef("CR_PLANT_TRS_SEQ")) == ""){
- alert("移送的钢卷必须输入移送顺序,请确认后重新操作!");
- return;
- }
-
- //钢卷号
- coilNos += datagrid1.valueMatrix(i, datagrid1.colRef("OLD_SAMPL_NO"))+"|";
- actWgts += datagrid1.valueMatrix(i, datagrid1.colRef("ACT_WGT"))+"|";
- ordNos += datagrid1.valueMatrix(i, datagrid1.colRef("ORD_NO"))+"|";
- ordSeqs += datagrid1.valueMatrix(i, datagrid1.colRef("ORD_SEQ"))+"|";
- curProgCds += datagrid1.valueMatrix(i, datagrid1.colRef("CUR_PROG_CD"))+"|";
- lshs += datagrid1.valueMatrix(i, datagrid1.colRef("COIL_NO"))+"|";//流水号
- transSeqs += datagrid1.valueMatrix(i, datagrid1.colRef("CR_PLANT_TRS_SEQ")) + "|";
-
- var transObj = new TransObject();
- transObj.id = transId;
- transObj.coilNo = datagrid1.valueMatrix(i, datagrid1.colRef("OLD_SAMPL_NO"));
- transObj.chargeNo = datagrid1.valueMatrix(i, datagrid1.colRef("CHARGE_NO"));
- transObj.stlGrd = datagrid1.valueMatrix(i, datagrid1.colRef("STL_GRD"));
- transObj.coilThk = datagrid1.valueMatrix(i, datagrid1.colRef("COIL_THK"));
- transObj.coilWth = datagrid1.valueMatrix(i, datagrid1.colRef("COIL_WTH"));
- transObj.instrCoilThk = datagrid1.valueMatrix(i, datagrid1.colRef("INSTR_COIL_THK"));
- transObj.instrCoilWth = datagrid1.valueMatrix(i, datagrid1.colRef("INSTR_COIL_WTH"));
- transObj.coilWgt = datagrid1.valueMatrix(i, datagrid1.colRef("ACT_WGT"));
- transObj.india = datagrid1.valueMatrix(i, datagrid1.colRef("COIL_INDIA"));
- transObj.outdia = datagrid1.valueMatrix(i, datagrid1.colRef("COIL_OUTDIA"));
- transObj.yardAddr = datagrid1.valueMatrix(i, datagrid1.colRef("CUR_LOAD_LOC"));
- transObj.extShape = datagrid1.valueMatrix(i, datagrid1.colRef("EXTSHAPE_DEC_GRD"));
- transId++;
- transList.push(transObj);
- }
- nRows++;
- }
-
- if(nRows > 0){
- model.makeValue("/root/WK/COIL_NOS",coilNos);
- model.duplicate("/root/reqData","/root/WK/COIL_NOS");
- model.makeValue("/root/WK/ACT_WGTS",actWgts);
- model.duplicate("/root/reqData","/root/WK/ACT_WGTS");
- model.makeValue("/root/WK/ORD_NOS",ordNos);
- model.duplicate("/root/reqData","/root/WK/ORD_NOS");
- model.makeValue("/root/WK/ORD_SEQS",ordSeqs);
- model.duplicate("/root/reqData","/root/WK/ORD_SEQS");
- model.makeValue("/root/WK/CUR_PROG_CDS",curProgCds);
- model.duplicate("/root/reqData","/root/WK/CUR_PROG_CDS");
- model.makeValue("/root/WK/LSHS",lshs);
- model.duplicate("/root/reqData","/root/WK/LSHS");
- model.makeValue("/root/WK/TRANSSEQS",transSeqs);
- model.duplicate("/root/reqData","/root/WK/TRANSSEQS");
- //这里加入班次、班组、出库人、时间
- model.duplicate("/root/reqData","/root/WK/TRNF_SHIFT");
- model.duplicate("/root/reqData","/root/WK/TRNF_GROUP");
- model.duplicate("/root/reqData","/root/WK/TRNF_REG");
- model.duplicate("/root/reqData","/root/WK/TRNF_DTIME");
- model.duplicate("/root/reqData","/root/WK/TRANSFER_TYPE");
- model.duplicate("/root/reqData","/root/WK/TRANSFER_NO");
-
- commSubmit("UIH052402-service" ,"save","glueAction.do");
-
- if(transList.length > 0)
- {
- commAppendData ("/root/dg1/ListResult_1_VO" ,"/root/EXCELHead/ListResult_1_VO" );
-
- var wgtCount = 0;
- for(var k = 0;k < transList.length;k++){
- var transObj = transList[k];
- var row = k+5;
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col1");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col1",transObj.id);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col2");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col2",transObj.coilNo);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col3");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col3",transObj.chargeNo);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col4");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col4",transObj.stlGrd);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col5");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col5",transObj.coilThk);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col6");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col6",transObj.coilWth);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col7");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col7",transObj.instrCoilThk);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col8");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col8",transObj.instrCoilWth);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col9");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col9",transObj.coilWgt);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col10");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col10",transObj.outdia);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col11");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col11",transObj.india);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col12");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col12",transObj.yardAddr);
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col13");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ row +"]/col13",transObj.extShape);
- wgtCount += parseFloat(transObj.coilWgt);
- }
-
- for(var k = 5;k < 8;k++){
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col1");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col2");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col3");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col4");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col5");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col6");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col7");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col8");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col9");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col10");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col11");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col12");
- model.makeNode("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+k) +"]/col13");
- }
-
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+2 +"]/col2",combo8.label + "班");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+2 +"]/col5",combo9.label + "班");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+3 +"]/col2",model.getValue("/root/WK/TRNF_REG"));
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+3 +"]/col5",model.getValue("/root/WK/TRNF_DTIME") + " ");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+7) +"]/col1","小计");
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+7) +"]/col2",transList.length + "卷");
-
- model.setValue("/root/dg1/ListResult_1_VO/ListResult_1_Row["+ (transList.length+7) +"]/col9",(wgtCount/1000) + "吨");
-
- model.refresh();
-
- saveExcelScript(dg1,"Sheet1");
- }
- }
-
- model.refresh();
-
- find();
- }
-
- function TransObject(){
- this.id = null;
- this.coilNo = null;
- this.chargeNo = null;
- this.stlGrd = null;
- this.coilThk = null;
- this.coilWth = null;
- this.instrCoilThk = null;
- this.instrCoilWth = null;
- this.coilWgt = null;
- this.india = null;
- this.outdia = null;
- this.yardAddr = null;
- this.extShape = null;
- }
-
- 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; //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( 04, 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" ;
-
- //合并单元格
- ObjTFExcel.mergeCell(02,02,02,03);
- ObjTFExcel.mergeCell(02,05,02,13);
- ObjTFExcel.mergeCell(03,02,03,03);
- ObjTFExcel.mergeCell(03,05,03,13);
-
- //设置列的宽度
- ObjTFExcel.colwidth ( 01 ) = 10 ;
- ObjTFExcel.colwidth ( 02 ) = 15 ;
- ObjTFExcel.colwidth ( 03 ) = 12 ;
- ObjTFExcel.colwidth ( 04 ) = 15 ;
- ObjTFExcel.colwidth ( 05 ) = 10 ;
- ObjTFExcel.colwidth ( 06 ) = 10 ;
- ObjTFExcel.colwidth ( 07 ) = 10 ;
- ObjTFExcel.colwidth ( 08 ) = 10 ;
- ObjTFExcel.colwidth ( 09 ) = 10 ;
- ObjTFExcel.colwidth ( 10 ) = 10 ;
- ObjTFExcel.colwidth ( 11 ) = 10 ;
- ObjTFExcel.colwidth ( 12 ) = 15 ;
- ObjTFExcel.colwidth ( 13 ) = 10 ;
- // 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 findTrans(){
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.refresh();
-
- model.duplicate("/root/reqData","/root/TR/TRANSFER_TIME");
- model.duplicate("/root/reqData","/root/TR/TRANSFER_NO");
- commSubmit("UIH052402-service", "findTrans", "glueAction.do");
- commAppendData("/root/datagrid2/CoilTransResult_VO","/root/resData/CoilTransResult_VO");
-
- model.refresh();
- //计算总数目和总重量
- }
-
- //移送退回
- function returnTrans(){
- model.removenode("/root/reqData");
- model.makeNode("/root/reqData");
- model.refresh();
-
- //这里判断不为空
- if(model.getValue("/root/WK/TRNF_SHIFT") == ""){
- alert(" 入库班次信息不能为空,请选择相应的入库班次! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_GROUP") == ""){
- alert(" 入库班组信息不能为空,请选择相应的入库班组信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_REG") == ""){
- alert(" 入库人信息不能为空,请选择相应的入库人信息!! ");
- return;
- }
-
- if(model.getValue("/root/WK/TRNF_DTIME") == ""){
- alert(" 入库时间信息不能为空,请输入相应的入库时间信息!! ");
- return;
- }
-
- var nodeSet = datagrid2.nodeset;
- for(var i=1;i<datagrid2.rows;i++){
- var CHK = model.getValue(nodeSet+"["+i+"]/CHK");
- var CURLOADLOC = model.getValue(nodeSet+"["+i+"]/CUR_LOAD_LOC");
-
- if(CHK =="Y" && CURLOADLOC == ""){
- alert(" 第"+i+"行的堆放位置为空,请输入相应的堆放位置! ");
- return;
- }
- }
-
- //这里加入班次、班组、入库人、时间
- model.duplicate("/root/reqData","/root/WK/TRNF_SHIFT");
- model.duplicate("/root/reqData","/root/WK/TRNF_GROUP");
- model.duplicate("/root/reqData","/root/WK/TRNF_REG");
- model.duplicate("/root/reqData","/root/WK/TRNF_DTIME");
-
- //这里加入登录用户名,会不会与已有的initData冲突
- model.makeValue("/root/reqData/LOGIN_ID",model.getValue("/root/initData/rcvInfo/REG_ID"));
-
- commMultiUpdate(datagrid2,"/root/reqData","A",true,"rowStuts");
- commSubmit("UIH052400-service", "returnTrans", "glueAction.do");
-
- if(model.getValue("/root/resData/rs_VO/rs_Row") == "COILIN"){
- alert(" 冷轧原料已接收入库,无法直接退回!");
- return;
- }
-
- findTrans();
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <caption id="caption4" class="cell" style="left:910px; top:45px; width:70px; height:20px; font-weight:bold; border-color:#000000; "/>
- <!--<caption id="caption3" class="cell" style="left:750px; top:0px; width:70px; height:20px; font-weight:bold; border-color:#000000; "/>
- <button id="button3" style="left:750px; top:0px; width:70px; height:20px; border-color:#000000; ">
- <caption>步进梁锁定</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- ]]>
- </script>
- </button>-->
- <caption id="caption9" class="cell" style="left:900px; top:320px; width:80px; height:20px; font-weight:bold; border-color:#000000; "/>
- <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:710px; top:40px; width:1px; height:1px; "/>
- <button id="button6" visibility="hidden" style="left:900px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>冷轧移送退回</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- returnTrans();
- ]]>
- </script>
- </button>
- <datagrid id="datagrid1" nodeset="/root/datagrid1/ColdCoilResult_VO/ColdCoilResult_Row" caption="选择^钢卷号^进程状态^牌号^合同号^订单号^实际规格^实际规格^实际规格^实际规格^堆放位置^进程状态^移送顺序^移送区分^步进梁号/车辆号^移送日期|选择^钢卷号^进程状态^牌号^合同号^订单号^宽度^厚度^长度^重量^堆放位置^进程状态^移送顺序^移送区分^步进梁号/车辆号^移送日期" colsep="^" colwidth="30, 100, 100, 66, 100, 50, 40, 40, 40, 40, 100, 100, 60, 76, 107, 118, 119, 100, 100, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:65px; width:980px; height:230px; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col ref="OLD_SAMPL_NO"/>
- <col ref="CUR_PROG_CD_NM"/>
- <col ref="STL_GRD"/>
- <col ref="ORD_NO"/>
- <col ref="ORD_SEQ"/>
- <col ref="COIL_WTH"/>
- <col ref="COIL_THK"/>
- <col ref="COIL_LEN"/>
- <col ref="ACT_WGT"/>
- <col ref="CUR_LOAD_LOC"/>
- <col ref="CUR_PROG_CD" visibility="hidden"/>
- <col ref="CR_PLANT_TRS_SEQ" type="input" style="background-color:#ffff99; "/>
- <col ref="TRANSFER_TYPE" type="combo">
- <choices>
- <item>
- <label>冷轧厂</label>
- <value>B</value>
- </item>
- <item>
- <label>其它转运</label>
- <value>C</value>
- </item>
- </choices>
- </col>
- <col ref="TRANSFER_NO" type="input"/>
- <col ref="TRANSFER_DATE" type="date"/>
- <col ref="COIL_NO" visibility="hidden"/>
- <col ref="CHARGE_NO" visibility="hidden"/>
- <col ref="INSTR_COIL_THK" visibility="hidden"/>
- <col ref="INSTR_COIL_WTH" visibility="hidden"/>
- <col ref="COIL_INDIA" visibility="hidden"/>
- <col ref="COIL_OUTDIA" visibility="hidden"/>
- <col ref="EXTSHAPE_DEC_GRD" visibility="hidden"/>
- </datagrid>
- <!--<output id="output1" style="left:820px; top:0px; width:90px; height:20px; background-color:#00ccff; "/>-->
- <datagrid id="datagrid2" nodeset="/root/datagrid2/CoilTransResult_VO/CoilTransResult_Row" caption="选择^钢卷号^牌号^合同号^订单号^实际规格^实际规格^实际规格^实际规格^移送区分^步进梁号/车辆号^移送顺序^钢卷退回放置位置^移送日期^接收人^接收时间^退回人^退回时间|选择^钢卷号^牌号^合同号^订单号^宽度^厚度^长度^重量^移送区分^步进梁号/车辆号^移送顺序^钢卷退回放置位置^移送日期^接收人^接收时间^退回人^退回时间" colsep="^" colwidth="30, 90, 55, 90, 45, 40, 40, 40, 40, 83, 80, 63, 90, 90, 100, 100, 100, 100" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:340px; width:980px; height:265px; ">
- <col checkvalue="Y,N" ref="CHK" type="checkbox"/>
- <col ref="OLD_SAMPL_NO"/>
- <col ref="STL_GRD"/>
- <col ref="ORD_NO"/>
- <col ref="ORD_SEQ"/>
- <col ref="COIL_WTH"/>
- <col ref="COIL_THK"/>
- <col ref="COIL_LEN"/>
- <col ref="ACT_WGT"/>
- <col ref="CR_PLANT_TRS_CLF"/>
- <col ref="CR_PLANT_TRS_NO"/>
- <col ref="CR_PLANT_TRS_CD"/>
- <col ref="CUR_LOAD_LOC" type="input" style="background-color:#ffff99; "/>
- <col ref="CR_PLANT_TRS_DTIME"/>
- <col ref="RECEIVE_REG"/>
- <col ref="RECEIBE_TIME"/>
- <col ref="TRNF_REG"/>
- <col ref="TRNF_DTIME"/>
- </datagrid>
- <caption id="caption5" class="cell" style="left:115px; top:320px; width:85px; height:20px; font-weight:bold; border-color:#000000; ">移送日期</caption>
- <input id="input1" ref="/root/TR/TRANSFER_NO" style="left:415px; top:320px; width:105px; height:20px; background-color:#ffff99; "/>
- <caption id="caption6" class="cell" style="left:300px; top:320px; width:115px; height:20px; font-weight:bold; border-color:#000000; ">步进梁号/车辆号</caption>
- <input id="input2" ref="/root/TR/TRANSFER_TIME" inputtype="date" format="yyyy-mm-dd" style="left:180px; top:320px; width:110px; height:20px; background-color:#ffff99; "/>
- <caption id="caption1" class="cell" style="left:0px; top:320px; width:95px; height:20px; font-weight:bold; border-color:#000000; ">常化移送实绩</caption>
- <caption id="caption2" class="cell" style="left:0px; top:45px; width:90px; height:20px; font-weight:bold; border-color:#000000; ">常化移送对象</caption>
- <button id="button1" style="left:910px; top:45px; width:70px; height:20px; border-color:#000000; ">
- <caption>移送</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- save();
- ]]>
- </script>
- </button>
- <caption id="caption3" class="cell" style="left:835px; top:45px; width:70px; height:20px; font-weight:bold; border-color:#000000; "/>
- <button id="button2" style="left:835px; top:45px; width:70px; height:20px; border-color:#000000; ">
- <caption>查询</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <caption id="caption21" class="cell" style="left:0px; top:10px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班次</caption>
- <caption id="caption23" class="cell" style="left:130px; top:10px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">班组</caption>
- <caption id="caption10" class="cell" style="left:405px; top:10px; width:60px; height:20px; border-color:#000000; ">操作时间</caption>
- <caption id="caption14" class="cell" style="left:260px; top:10px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">操作人</caption>
- <select1 id="combo8" ref="/root/WK/TRNF_SHIFT" appearance="minimal" style="left:60px; top:10px; width:65px; 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/TRNF_GROUP" appearance="minimal" style="left:190px; top:10px; width:65px; 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/TRNF_DTIME" inputtype="date" format="yyyy-mm-dd" style="left:465px; top:10px; width:100px; height:20px; background-color:#ffff99; "/>
- <caption id="caption11" class="cell" style="left:570px; top:10px; width:60px; height:20px; vertical-align:middle; border-color:#000000; ">移送区分</caption>
- <select1 id="combo1" ref="/root/WK/TRANSFER_TYPE" appearance="minimal" style="left:630px; top:10px; width:90px; height:20px; background-color:#ffff99; ">
- <choices>
- <item>
- <label>冷轧厂</label>
- <value>B</value>
- </item>
- <item>
- <label>其它转运</label>
- <value>C</value>
- </item>
- </choices>
- </select1>
- <caption id="caption12" class="cell" style="left:725px; top:10px; width:100px; height:20px; vertical-align:middle; border-color:#000000; ">步进梁号/车辆号</caption>
- <input id="input4" ref="/root/WK/TRANSFER_NO" style="left:825px; top:10px; width:100px; height:20px; background-color:#ffff99; "/>
- <button id="button3" style="left:815px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>移送选择退回</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- ]]>
- </script>
- </button>
- <caption id="caption13" class="cell" style="left:815px; top:320px; width:80px; height:20px; font-weight:bold; border-color:#000000; "/>
- <button id="button4" style="left:815px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>查询移送实绩</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- findTrans();
- ]]>
- </script>
- </button>
- <caption id="caption15" class="cell" style="left:255px; top:45px; width:85px; height:20px; vertical-align:middle; border-color:#000000; ">合同-订单号</caption>
- <input id="input5" ref="/root/QDATA/ORD_NO" style="left:340px; top:45px; width:100px; height:20px; background-color:#ffff99; "/>
- <input id="input7" ref="/root/QDATA/ORD_SEQ" style="left:445px; top:45px; width:50px; height:20px; background-color:#ffff99; "/>
- <select id="checkbox1" ref="/root/QDATA/ORD_YN" visibility="hidden" overflow="visible" appearance="full" style="left:125px; top:45px; width:100px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>是否余材</label>
- <value>1</value>
- </item>
- </choices>
- </select>
- <caption id="caption16" class="cell" style="left:515px; top:45px; width:50px; height:20px; vertical-align:middle; border-color:#000000; ">钢卷号</caption>
- <input id="input8" ref="/root/QDATA/COIL_NO" style="left:565px; top:45px; width:120px; height:20px; background-color:#ffff99; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode==13){
- model.setFocus("datagrid1" , true);//设置焦点
- find();
- }
- ]]>
- </script>
- </input>
- <!--visibility="hidden" -->
- <datagrid id="dg1" nodeset="/root/dg1/ListResult_1_VO/ListResult_1_Row" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13" colsep="^" colwidth="70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:605px; width:0px; height:0px; ">
- <col ref="col1"/>
- <col ref="col2"/>
- <col ref="col3"/>
- <col ref="col4"/>
- <col ref="col5"/>
- <col ref="col6"/>
- <col ref="col7"/>
- <col ref="col8"/>
- <col ref="col9"/>
- <col ref="col10"/>
- <col ref="col11"/>
- <col ref="col12"/>
- <col ref="col13"/>
- </datagrid>
- <!--visibility="hidden" -->
- <datagrid id="dg2" nodeset="/root/dg2/ListResult_2_VO/ListResult_2_Row" visibility="hidden" caption="caption1^caption2^caption3^caption4^caption5^caption6^caption7^caption8^caption9^caption10^caption11^caption12^caption13^caption14^caption15^caption16^caption17^caption18" colsep="^" colwidth="70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:605px; width:0px; height:0px; ">
- <col ref="col1"/>
- <col ref="col2"/>
- <col ref="col3"/>
- <col ref="col4"/>
- <col ref="col5"/>
- <col ref="col6"/>
- <col ref="col7"/>
- <col ref="col8"/>
- <col ref="col9"/>
- <col ref="col10"/>
- <col ref="col11"/>
- <col ref="col12"/>
- <col ref="col13"/>
- <col ref="col14"/>
- <col ref="col15"/>
- <col ref="col16"/>
- <col ref="col17"/>
- <col ref="col18"/>
- </datagrid>
- <button id="button5" style="left:730px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>移送选择退回</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- ]]>
- </script>
- </button>
- <button id="button7" style="left:730px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>查询移送实绩</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- findTrans();
- ]]>
- </script>
- </button>
- <caption id="caption8" class="cell" style="left:730px; top:320px; width:80px; height:20px; font-weight:bold; border-color:#000000; "/>
- <button id="button8" visibility="hidden" style="left:730px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>移送确认</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.load("UIH052401.xrw","modal","", "left:0; top:0; width:980; height:650; sysmenu:visible; min:visible; max:true; resize:true; caption:visible;");
- ]]>
- </script>
- </button>
- <button id="button11" style="left:645px; top:320px; width:80px; height:20px; border-color:#000000; ">
- <caption>导出</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- setExcelData();
- ]]>
- </script>
- </button>
- <select1 id="combo7" ref="/root/WK/TRNF_REG" appearance="minimal" editmode="input" style="left:320px; top:10px; width:80px; height:20px; background-color:#ffff99; ">
- <choices>
- <itemset nodeset="/root/RegResultc/InitRegResultc_Row">
- <label ref="LABEL"/>
- <value ref="VALUE"/>
- </itemset>
- </choices>
- </select1>
- </xhtml:body>
- </xhtml:html>
|