| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- <?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>
- </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 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 +"]" );
- }
- 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 - 1;
- 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 ) = 100 ;
- //Line 2 : Date
- ObjTFExcel.rowheight( 02 ) = 18 ;
- ObjTFExcel.bold ( 02, 01, 02, 01 ) = true ;
- ObjTFExcel.fontsize ( 02, 01, 02, 01 ) = 9 ;
- ObjTFExcel.underline( 02, 01, 02, 01 ) = 0 ;
- ObjTFExcel.halign ( 02, 01, 02, 01 ) ="left" ;
- ObjTFExcel.valign ( 02, 01, 02, 01 ) ="middle" ;
- ObjTFExcel.mergeCell( 02, 01, 02, 03 ) ;
- // ObjTFExcel.colwidth ( 01 ) = 100 ;
- //Line 2 : Work-Group & Work-Part
- ObjTFExcel.rowHeight( 02 ) = 18 ;
- ObjTFExcel.bold ( 02, nCols - 2, 02, nCols ) = true ;
- ObjTFExcel.fontsize ( 02, nCols - 2, 02, nCols ) = 9 ;
- ObjTFExcel.underline( 02, nCols - 2, 02, nCols ) = 0 ;
- ObjTFExcel.halign ( 02, nCols - 2, 02, nCols ) ="right" ;
- ObjTFExcel.valign ( 02, nCols - 2, 02, nCols ) ="middle" ;
- ObjTFExcel.mergeCell( 02, nCols - 2, 02, nCols ) ;
- // ObjTFExcel.colwidth ( 01 ) = 100 ;
- //Query-Results Data
- var iRow = 3; // Header Line + 1;
- // ObjTFExcel.cellBgColor (iRow, 01, iRow , nCols ) = "#EEEEEE"; // Undefined...
- ObjTFExcel.setBorderColor(iRow, 01, nRows, nCols, "#000000");
- for(var i = 3; i <= nRows; i++ ) {
- ObjTFExcel.rowHeight( i ) = 18;
- }
- ObjTFExcel.bold (iRow, 01, nRows, nCols ) = false ;
- ObjTFExcel.fontsize (iRow, 01, nRows, nCols ) = 9 ;
- ObjTFExcel.underline(iRow, 01, nRows, nCols ) = 0 ;
- ObjTFExcel.valign (iRow, 01, nRows, nCols ) ="middle" ;
- ObjTFExcel.halign (iRow, 01, nRows, 01 ) ="center" ; //大分类代码
- ObjTFExcel.colwidth ( 01 ) = 12 ;
- ObjTFExcel.halign (iRow, 02, nRows, 02 ) ="left" ; //小分类代码
- ObjTFExcel.colwidth ( 02 ) = 12 ;
- ObjTFExcel.halign (iRow, 03, nRows, 03 ) ="left" ; //大分类名
- ObjTFExcel.colwidth ( 03 ) = 20 ;
- ObjTFExcel.halign (iRow, 04, nRows, 04 ) ="left" ; //小分类名(中文)
- ObjTFExcel.colwidth ( 04 ) = 20 ;
- ObjTFExcel.halign (iRow, 05, nRows, 05 ) ="left" ; //小分类略称(中文)
- ObjTFExcel.colwidth ( 05 ) = 20 ;
- ObjTFExcel.halign (iRow, 06, nRows, 06 ) ="left" ; //小分类名(英文)
- ObjTFExcel.colwidth ( 06 ) = 20 ;
- ObjTFExcel.halign (iRow, 07, nRows, 07 ) ="left" ; //小分类略称(英文)
- ObjTFExcel.colwidth ( 07 ) = 20 ;
- ObjTFExcel.halign (iRow, 08, nRows, 08 ) ="center" ; //业务领域区分
- ObjTFExcel.colwidth ( 08 ) = 12 ;
- ObjTFExcel.halign (iRow, 09, nRows, 09 ) ="right" ; //标示顺序
- ObjTFExcel.colwidth ( 09 ) = 10 ;
- ObjTFExcel.halign (iRow, 10, nRows, 10 ) ="center" ; //使用与否
- ObjTFExcel.colwidth ( 10 ) = 10 ;
- ObjTFExcel.halign (iRow, 11, nRows, 11 ) ="left" ; //代码说明
- ObjTFExcel.colwidth ( 11 ) = 20 ;
- ObjTFExcel.halign (iRow, 12, nRows, 12 ) ="right" ; //使用代码长度
- ObjTFExcel.colwidth ( 12 ) = 15 ;
- ObjTFExcel.halign (iRow, 13, nRows, 13 ) ="left" ; //最终修改人
- ObjTFExcel.colwidth ( 13 ) = 12 ;
- ObjTFExcel.halign (iRow, 14, nRows, 14 ) ="center" ; //最终修改时间
- ObjTFExcel.colwidth ( 14 ) = 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>
- <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(dg1, "Sheet1");
- ]]>
- </script>
- </button>
- </xhtml:body>
- </xhtml:html>
|