| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet href="../../css/body.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <formData>
- <LgCd/>
- </formData>
- <LovData>
- <LgCd/>
- </LovData>
- <gridData/>
- <reqData/>
- <resData/>
- <headLine>
- <ListResult_1_VO>
- <ListResult_1_Row>
- <LG_CD>热连轧成品出库班报表</LG_CD>
- <SM_CD/>
- <LG_NM/>
- <SM_CFNM/>
- <SM_CSNM/>
- <SM_EFNM/>
- <SM_ESNM/>
- <BIZ_CLF/>
- <CD_SEQ/>
- <USED_YN/>
- <CD_DESC/>
- <CD_LEN/>
- <MOD_ID/>
- <MOD_DATE/>
- </ListResult_1_Row>
- <ListResult_1_Row>
- <LG_CD>日期</LG_CD>
- <SM_CD/>
- <LG_NM/>
- <SM_CFNM/>
- <SM_CSNM/>
- <SM_EFNM/>
- <SM_ESNM/>
- <BIZ_CLF/>
- <CD_SEQ/>
- <USED_YN/>
- <CD_DESC/>
- <CD_LEN/>
- <MOD_ID/>
- <MOD_DATE>
- <![CDATA[班组 & 班次]]>
- </MOD_DATE>
- </ListResult_1_Row>
- </ListResult_1_VO>
- </headLine>
- <subTitle>
- <ListResult_1_VO>
- <ListResult_1_Row>
- <LG_CD>大分类代码</LG_CD>
- <SM_CD>小分类代码</SM_CD>
- <LG_NM>大分类名</LG_NM>
- <SM_CFNM>小分类名(中文)</SM_CFNM>
- <SM_CSNM>小分类略称(中文)</SM_CSNM>
- <SM_EFNM>小分类名(英文)</SM_EFNM>
- <SM_ESNM>小分类略称(英文)</SM_ESNM>
- <BIZ_CLF>业务领域区分</BIZ_CLF>
- <CD_SEQ>标示顺序</CD_SEQ>
- <USED_YN>使用与否</USED_YN>
- <CD_DESC>代码说明</CD_DESC>
- <CD_LEN>使用代码长度</CD_LEN>
- <MOD_ID>最终修改人</MOD_ID>
- <MOD_DATE>最终修改时间</MOD_DATE>
- </ListResult_1_Row>
- </ListResult_1_VO>
- </subTitle>
- <gridData-II/>
- </root>
- </instance>
- </model>
- <script type="javascript" src="../../js/boaCommon.js"/>
- <script type="javascript" src="../../js/boaMsg.js"/>
- <script type="javascript" src="../../js/mesCommon.js"/>
- <script type="javascript" src="../../js/dCommon.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- commSendReq("/root/formData");
- commSubmit("ExcelPrint-service" ,"success" ,"glueAction.do" );
- errorMessage();
- // The first added "ALL" in LgCd LOV
- model.makeValue("/root/LOVData/LgCd/LOVResult_1_Row[1]/LgNm" , "(ALL)" );
- model.makeValue("/root/LOVData/LgCd/LOVResult_1_Row[1]/LgCd" , "%" );
- var iRows = model.getXPathValue("count(/root/resData/LOVResult_1_VO/LOVResult_1_Row)");
- for( var i = 1; i <= iRows; i++ ) {
- model.makeValue("/root/LOVData/LgCd/LOVResult_1_Row["+ (i + 1) +"]/LgNm" , model.getValue("/root/resData/LOVResult_1_VO/LOVResult_1_Row["+ i +"]/LG_NM"));
- model.makeValue("/root/LOVData/LgCd/LOVResult_1_Row["+ (i + 1) +"]/LgCd" , model.getValue("/root/resData/LOVResult_1_VO/LOVResult_1_Row["+ i +"]/LG_CD"));
- }
- model.refresh();
- LgCd.select(0);
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function find() {
- commSendReq("/root/formData");
- commSubmit("ExcelPrint-service" ,"find" ,"glueAction.do" );
- //Populate HeadLine Information
- commAppendData ("/root/gridData/ListResult_1_VO" ,"/root/headLine/ListResult_1_VO" );
- //Populate SubTitle Information
- var iSubTitRows = Number(model.getXPathValue("count(/root/subTitle/ListResult_1_VO)") );
- for(var i = 1; i <= iSubTitRows ; i++) {
- model.duplicate("/root/gridData/ListResult_1_VO" ,"/root/subTitle/ListResult_1_VO/ListResult_1_Row["+ i +"]" );
- }
- //Populate Query-Results Information
- var nRows2 = dg2.rows - dg2.fixedRows + 1;
- var sCol_1 = "";
- var sCol_2 = "";
- var sCol_3 = "";
- var sCol_4 = "";
-
- var iQueryRows = Number(model.getXPathValue("count(/root/resData/ListResult_1_VO/ListResult_1_Row)" ));
- for(var i = 1; i <= iQueryRows ; i++) {
- model.duplicate("/root/gridData/ListResult_1_VO" ,"/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]" );
- //alert("nRows2 = ["+ nRows2 +"]");
- //alert("k = ["+ k +"]\nCOL_1 = ["+ sCol_1 +"]\nCOL_2 = ["+ sCol_2 +"]\nCOL_3 = ["+ sCol_3 +"]\nCOL_4 = ["+ sCol_4 +"]");
- for(var k = nRows2; k <= (nRows2 + 5); k++) {
- if( ((k%5) == 1) || ((k%5) == 0) ) {
- sCol_1 = "";
- sCol_2 = "";
- sCol_3 = "";
- sCol_4 = "";
- if( (k%5) == 0 ) sCol_1 = "탕량 바보~";
- } else if( (k%5) == 2 ) {
- sCol_1 = "ROLL NO.";
- sCol_2 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/LG_CD" );
- sCol_3 = "COIL NO.";
- sCol_4 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/LG_NM" );
- } else if( (k%5) == 3 ) {
- sCol_1 = "HEAD NO.";
- sCol_2 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/SM_CD" );
- sCol_3 = "STEEL GRADE";
- sCol_4 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/SM_CFNM" );
- } else if( (k%5) == 4 ) {
- sCol_1 = "CONTRACT NO.";
- sCol_2 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/MOD_ID" );
- sCol_3 = "WEIGHT";
- sCol_4 = model.getValue("/root/resData/ListResult_1_VO/ListResult_1_Row["+ i +"]/USED_YN" );
- }
- model.makeValue("/root/gridData-II/ListResult_1_VO/ListResult_1_Row["+ k +"]/COL_1" , sCol_1 );
- model.makeValue("/root/gridData-II/ListResult_1_VO/ListResult_1_Row["+ k +"]/COL_2" , sCol_2 );
- model.makeValue("/root/gridData-II/ListResult_1_VO/ListResult_1_Row["+ k +"]/COL_3" , sCol_3 );
- model.makeValue("/root/gridData-II/ListResult_1_VO/ListResult_1_Row["+ k +"]/COL_4" , sCol_4 );
- } // end for( k...)
-
- nRows2 = nRows2 + 5;
- }
- model.refresh();
- //Hidden TITLE Information
- var iHiddenRows = Number(model.getXPathValue("count(/root/headLine/ListResult_1_VO/ListResult_1_Row)")) + iSubTitRows + (dg1.fixedRows - 1);
- for(var i = dg1.fixedRows; i <= iHiddenRows ; i++) {
- dg1.rowHidden(i) = true;
- }
- dg1.isSelected(iHiddenRows + 1) = true;
-
- }
- function saveExcelScript(sDGridName, sExcelSheetName, saveType) {
- var sExcelName = window.fileDialog( "save", "", false, "SaveFileName", "xls", "Excel Files(*.xls)|*.xls" );
- if ( sExcelName == "" ) {
- return;
- }
- // var sCSVName = "C:\\TFSmartUpdater\\" + sExcelName.lastIndexOf(".") +".csv";
- var sCSVName = sExcelName +".csv";
- // alert("sExcelName = ["+ sExcelName +"]\nsCSVName = ["+ sCSVName + "]");
- eval(sDGridName).saveText(sCSVName, "\n", ",", '\:', true); //DataGrid의 내용을 CSV파일로 생성
- ObjTFExcel.launchNewInstance(0); //Execute EXCEL
- ObjTFExcel.createWorkbook(); //Create new Workbook(for example:Sheet1,Sheet2,Sheet3) -- createWorkBook(Excel-TemplateFile)
- ObjTFExcel.loadCSV(sCSVName); //Loading Contents, from CSV to Excel
- //Setting up EXCEL Layout.
- var nRows = sDGridName.rows - sDGridName.fixedRows + 1; //Keep Careful !!!
- var nCols = sDGridName.cols;
- //All of the range
- ObjTFExcel.fontcolor ( 01, 01, nRows, nCols ) = "#000000" ;
- ObjTFExcel.font ( 01, 01, nRows, nCols ) = "SimSun" ;
- ObjTFExcel.setBorderColor( 01, 01, nRows, nCols, "#000000") ;
- ObjTFExcel.bold ( 01, 01, nRows, nCols ) = true ;
- ObjTFExcel.fontsize ( 01, 01, nRows, nCols ) = 12 ;
- ObjTFExcel.underline ( 01, 01, nRows, nCols ) = 0 ;
- ObjTFExcel.valign ( 01, 01, nRows, nCols ) ="middle" ;
- ObjTFExcel.halign ( 01, 02, nRows, nCols ) ="left" ;
- //Query-Results Data
- var iRow = 1; // iRow = HeaderLine + 1;
- for(var i = iRow; i <= nRows; i++ ) {
- if( (i%5) == 1 ) {
- ObjTFExcel.rowHeight( i ) = 60;
- ObjTFExcel.mergeCell( i, 01, i, nCols );
- } else if( (i%5) == 0 ) {
- ObjTFExcel.rowHeight( i ) = 45;
- ObjTFExcel.mergeCell( i, 01, i, nCols );
- } else {
- ObjTFExcel.rowHeight( i ) = 40;
- }
- }
- ObjTFExcel.colwidth ( 01 ) = 20 ;
- ObjTFExcel.colwidth ( 02 ) = 20 ;
- ObjTFExcel.colwidth ( 03 ) = 20 ;
- ObjTFExcel.colwidth ( 04 ) = 20 ;
- // 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
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body>
- <caption id="caption1" style="left:10px; top:10px; width:290px; height:25px; font-weight:bold; color:#0000ff; vertical-align:middle; ">※. ExcelPrint Example</caption>
- <object id="ObjTFExcel" clsid="{fe8d1001-6a9d-424d-ae2a-301493bb12da}" style="left:320px; top:10px; width:155px; height:25px; "/>
- <button id="button1" style="left:860px; top:15px; width:90px; height:21px; background-color:#c0c0c0; ">
- <caption>EXCEL</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- saveExcelScript(dg1, "Sheet1");
- ]]>
- </script>
- </button>
- <line id="line1" style="x1:300px; y1:34px; x2:10px; y2:34px; border-color:#0000ff; "/>
- <datagrid id="dg1" nodeset="/root/gridData/ListResult_1_VO/ListResult_1_Row" caption="LG_CD^SM_CD^LG_NM^SM_CFNM^SM_CSNM^SM_EFNM^SM_ESNM^BIZ_CLF^CD_SEQ^USED_YN^CD_DESC^CD_LEN^MOD_ID^MOD_DATE|LG_CD^SM_CD^LG_NM^SM_CFNM^SM_CSNM^SM_EFNM^SM_ESNM^BIZ_CLF^CD_SEQ^USED_YN^CD_DESC^CD_LEN^MOD_ID^MOD_DATE" colsep="^" colwidth="60, 60, 100, 100, 100, 100, 100, 65, 70, 65, 100, 65, 70, 120" mergecellsfixedrows="bycolrec" rowsep="|" style="left:10px; top:50px; width:940px; height:450px; ">
- <col editable="false" ref="LG_CD" type="input" style="text-align:left; "/>
- <col editable="false" ref="SM_CD" type="input" style="text-align:left; "/>
- <col editable="false" ref="LG_NM" type="input" style="text-align:left; "/>
- <col editable="false" ref="SM_CFNM" type="input" style="text-align:left; "/>
- <col editable="false" ref="SM_CSNM" type="input" style="text-align:left; "/>
- <col editable="false" ref="SM_EFNM" type="input" style="text-align:left; "/>
- <col editable="false" ref="SM_ESNM" type="input" style="text-align:left; "/>
- <col editable="false" ref="BIZ_CLF" type="input" style="text-align:center; "/>
- <col editable="false" ref="CD_SEQ" type="input" style="text-align:right; "/>
- <col editable="false" ref="USED_YN" type="input" style="text-align:center; "/>
- <col editable="false" ref="CD_DESC" type="input" style="text-align:left; "/>
- <col editable="false" ref="CD_LEN" type="input" style="text-align:right; "/>
- <col editable="false" ref="MOD_ID" type="input" style="text-align:left; "/>
- <col editable="false" ref="MOD_DATE" type="input" style="text-align:center; "/>
- </datagrid>
- <datagrid id="dg2" nodeset="/root/gridData-II/ListResult_1_VO/ListResult_1_Row" caption="COL_1^COL_2^COL_3^COL_4|COL_1^COL_2^COL_3^COL_4" colsep="^" colwidth="100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:955px; top:50px; width:400px; height:450px; ">
- <col editable="false" ref="COL_1" type="input" style="text-align:left; "/>
- <col editable="false" ref="COL_2" type="input" style="text-align:left; "/>
- <col editable="false" ref="COL_3" type="input" style="text-align:left; "/>
- <col editable="false" ref="COL_4" type="input" style="text-align:left; "/>
- </datagrid>
- <button id="button2" style="left:765px; top:15px; width:90px; height:21px; background-color:#c0c0c0; ">
- <caption>FIND</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- find();
- ]]>
- </script>
- </button>
- <select1 id="LgCd" ref="/root/formData/LgCd" appearance="minimal" style="left:495px; top:15px; width:165px; height:21px; ">
- <choices>
- <itemset nodeset="/root/LOVData/LgCd/LOVResult_1_Row">
- <label ref="LgNm"/>
- <value ref="LgCd"/>
- </itemset>
- </choices>
- </select1>
- <button id="button3" style="left:860px; top:15px; width:90px; height:21px; background-color:#c0c0c0; ">
- <caption>EXCEL</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- saveExcelScript(dg2, "Sheet1");
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|