| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/css" href="D:/workspace/xgmes3/WebContents/css/body.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/>
- <RZHQX/>
- </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();
-
- if(model.getValue("/root/QDATA/ORD_YN") == "1")
- {
- model.duplicate("/root/reqData","/root/QDATA/COIL_NO");
- commSubmit("UIH052400-service", "find1", "glueAction.do");
- }
- else
- {
- 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("UIH052400-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)
- {
- //if(commComfirmBox("所输出库日期"+"("+inputdate+")"+"与当前日期"+"("+tmpdate+")"+"不一致,是否继续出库?","提示")=="0") return;
- 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 rzhqx = "";//移送顺序
- var transId = 1;
- for( var i = datagrid1.fixedRows ; i <= nCnt ; i++ ) {
- if( datagrid1.valueMatrix(i, datagrid1.colRef("CHK")) == "Y") {
-
-
- if((datagrid1.valueMatrix(i, datagrid1.colRef("ACT_WGT")) == "")||(datagrid1.valueMatrix(i, datagrid1.colRef("ACT_WGT")) =="0")){
- alert("移送的钢卷重量为0,请确认后重新操作!");
- return;
- }
-
- 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")) + "|";
- rzhqx += datagrid1.valueMatrix(i, datagrid1.colRef("RZHQX")) + "|";
- 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.makeValue("/root/WK/RZHQX",rzhqx);
- model.duplicate("/root/reqData","/root/WK/RZHQX");
-
- //这里加入班次、班组、出库人、时间
- 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("UIH052400-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("UIH052400-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" 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, 100, 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="RZHQX" 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="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>
- <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" 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" 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="combo2" ref="/root/WK/TRNF_REG" visibility="hidden" appearance="minimal" editmode="input" style="left:720px; top:40px; 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>
- <object id="object1" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" visibility="hidden" style="left:930px; top:15px; width:45px; height:25px; "/>
- </xhtml:body>
- </xhtml:html>
|