123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>첨부파일조회</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <fileinfo>
- <fileinfolist/>
- </fileinfo>
- </main>
- <target/>
- <init>
- </init>
- <send>
- <fileinfo>
- <fixasetcd/>
- <fixasetnm/>
- </fileinfo>
- <save>
- <fileinfolist/>
- </save>
- <fileupcolumn>
- <refinstcd/>
- <refdeptcd/>
- <refpsnid/>
- <fixasetcd/>
- <fileseqno/>
- <attfilenm/>
- <attfilepathnm/>
- <fileupload>
- <file>
- <filename/>
- </file>
- </fileupload>
- </fileupcolumn>
- </send>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- misfGridInit(grd_fileinfo);
-
- misfMsterDetailSet(grd_fileinfo,null, "TRRFC01101" ,"Y");
-
- if(model.getValue("/root/target/defaultvalue/fixasetcd").length > 0){
-
- model.setValue("/root/send/fileinfo/fixasetcd", model.getValue("/root/target/defaultvalue/fixasetcd"));
- model.setValue("/root/send/fileinfo/fixasetnm" , model.getValue("/root/target/defaultvalue/fixasetnm"));
-
- model.refresh();
- btn_search.dispatch("DOMActivate");
- } else {
-
- messageBox("자산코드가 없는 경우 조회가 불가능 합니다.", "I");
- btn_cancel.dispatch("DOMActivate");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-model-destruct">
- <![CDATA[
- if (getGridUpdateData(grd_fileinfo) != "" ) {
- if (btn_save.disabled == false) {
- var save_val = messageBox("삭제 자료가 존재 합니다. ", "Q002");
-
- if (save_val == "6") {
- btn_save.dispatch("DOMActivate");
- }
- }
- }
- ]]>
- </script>
- <submission id="TRRFC01101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/fileinfo" resultref="/root/main/fileinfo"/>
- <submission id="TXRFC01101" mediatype="multipart/form-data" method="form-data-post" ref="/root/send/fileupcolumn" resultref="/root/temp"/>
- <submission id="TXRFC01102" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/fileinfo" resultref="/root/main/fileinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
- function fAttfileAdd(){
- //파일 다운로드 하는 기능
- var maxsize = upd_uploadfile.attribute("filesize");
-
- model.setValue("/root/send/fileupcolumn/refinstcd" , getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/fileupcolumn/refdeptcd" , getUserInfo("dutplcecd"));
- model.setValue("/root/send/fileupcolumn/refpsnid" , getUserInfo("userid"));
- model.setValue("/root/send/fileupcolumn/fixasetcd" , model.getValue(ipt_fixasetcd_search.attribute("ref")));
-
- submit("TXRFC01101");
- if (model.getValue(gvErrorMsgPath + "/type") != "error" ){
- //messageBox("첨부파일이 업로드" , "I002");
- btn_search.dispatch("DOMActivate");
- }
- //파일 업로드 후 첨부파일 팝업창을 띄워서 해당 파일이 잘 올라갔는지 확인할수 있도록 해준다.?????
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="800" pageheight="540" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:10px; top:0px; width:755px; height:522px; ">
- <caption id="caption1" class="tit_2" style="left:3px; top:11px; width:175px; height:13px; ">첨부파일내역조회</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:27px; x2:755px; y2:27px; "/>
- <datagrid id="grd_fileinfo" nodeset="/root/main/fileinfo/fileinfolist" scroll="auto" caption="첨부파일번호^자산코드^파일이름^파일크기^파일타입^다운로드^파일경로^첨부기관^첨부기관^첨부부서^첨부부서^등록자^등록자^등록시간" colsep="^" colwidth="84, 100, 350, 67, 150, 60, 100, 43, 100, 80, 100, 60, 70, 80" dataheight="23" defaultrows="0" explorerbar="sortshow" extendlastcol="false" mergecellsfixedrows="byrow" rowheader="update" rowheight="23" rowsep="|" tooltip="true" style="left:0px; top:59px; width:755px; height:440px; ">
- <col ref="fileseqno" visibility="hidden"/>
- <col ref="fixasetcd" visibility="hidden" style="text-align:left; "/>
- <col ref="filenm"/>
- <col ref="filesize" format="#,###" style="text-align:right; "/>
- <col ref="filetype"/>
- <col ref="qrycnt" format="#,###" style="text-align:right; "/>
- <col ref="filepath" visibility="hidden"/>
- <col ref="refinstcd" visibility="hidden"/>
- <col ref="refinstnm" visibility="hidden"/>
- <col ref="refdeptcd" visibility="hidden"/>
- <col ref="refdeptnm" visibility="hidden"/>
- <col ref="refpsnid" visibility="hidden"/>
- <col ref="refpsnnm"/>
- <col ref="fstrgstdt" style="text-align:center; "/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var idx = grd_fileinfo.row;
- if(idx >= grd_fileinfo.fixedRows) {
- var filepath = model.getValue("/root/main/fileinfo/fileinfolist["+idx+"]/filepath");
- var fileseqno = model.getValue("/root/main/fileinfo/fileinfolist["+idx+"]/fileseqno");
- var filenm = model.getValue("/root/main/fileinfo/fileinfolist["+idx+"]/filenm");
- var fileExt = "*";
-
- if(filenm != null) {
- fileExt = filenm.substr(filenm.lastIndexOf('.')+1);
- }
- var localfile = window.fileDialog("save","|",false,filenm,fileExt,"Files(*." + fileExt + ")|*." + fileExt);
- if (localfile != "") {
- model.download(getActionURL("TRRFC01102")+"&filepath="+filepath+"&fileseqno="+fileseqno,localfile);
- var rtn = messageBox("파일을", "Q004");
- if( rtn == 6 ) {
- window.exec(localfile);
- }
- }
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onaftersort">
- <![CDATA[
- grd_fileinfo.gridToInstance();
- ]]>
- </script>
- </datagrid>
- <button id="btn_search" class="btn1_letter2" visibility="hidden" style="left:636px; top:4px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfMsterDetailRetrieve();
-
- var reqpsnid = model.getValue("/root/send/fileinfo/reqpsnid");
- if (grd_fileinfo.rows - grd_fileinfo.fixedRows > 0) {
- if (grd_fileinfo.valueMatrix(grd_fileinfo.fixedRows, grd_fileinfo.colRef("reqpsnid")) == reqpsnid) {
- btn_save.disabled = false;
- btn_delgrd.disabled = false;
- }
- else {
- btn_save.disabled = true;
- btn_delgrd.disabled = true;
- }
- }
- else {
- btn_save.disabled = true;
- btn_delgrd.disabled = true;
- }
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:696px; top:4px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var delCount = 0;
- for (var i=grd_fileinfo.fixedRows ; i< grd_fileinfo.rows ; i++) {
- if ( grd_fileinfo.rowStatus(i) == 4) {
- delCount++;
- }
- }
- var rtn = messageBox(delCount + "건의 파일 삭제를", "Q009");
- if( rtn == 6 ) {
- misfSave("TXRFC01102");
- btn_search.dispatch("DOMActivate");
- }
- ]]>
- </script>
- </button>
- <line id="line2" class="line_3" style="x1:0px; y1:57px; x2:755px; y2:57px; "/>
- <button id="btn_delgrd" class="btn2_letter4" style="left:688px; top:35px; width:64px; height:19px; ">
- <caption>파일삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfGridIUD(grd_fileinfo, "D");
- ]]>
- </script>
- </button>
- <button id="btn_addfile" class="btn2_letter4" style="left:620px; top:35px; width:64px; height:19px; ">
- <caption>파일추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var files = window.fileDialog("open", "|", false);
- var replacepath = "";
-
- if( files.length <= 0 ) return;
-
- model.setValue(ipt_uploadfile.attribute("ref") , files); //전체파일경로와이름을 셋팅
- //var filename = files.substring(files.lastIndexOf('\\')+1 , files.length ); //파일이름만 나오게 문자정리
- //model.setValue(ipt_attfilenm.attribute("ref") , filename);
-
- if (model.getValue( ipt_uploadfile.attribute("ref") ).length > 0) {
- fAttfileAdd(); //첨부파일 서버로 저장하는 메소드 호출
- }
- ]]>
- </script>
- </button>
- <caption id="cap_fixasetcd_search" class="search_name" style="left:13px; top:36px; width:117px; height:17px; ">자산코드 :</caption>
- <input id="ipt_fixasetcd_search" ref="/root/send/fileinfo/fixasetcd" class="output_fix" navindex="16" editable="false" imemode="disabled" _chartype="upper" style="left:105px; top:35px; width:105px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <input id="ipt_goodnm_search" ref="/root/send/fileinfo/fixasetnm" class="output_fix" navindex="6" editable="false" style="left:300px; top:35px; width:281px; height:19px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="cap_goodflaghngnm_search" class="search_name" style="left:218px; top:35px; width:87px; height:17px; ">자 산 명 :</caption>
- <upload id="upd_uploadfile" nodeset="/root/send/fileupcolumn/fileupload/file" filecount="5" validate="true" style="left:480px; top:5px; width:25px; height:20px; "/>
- <input id="ipt_uploadfile" ref="/root/send/fileupcolumn/fileupload/file" visibility="hidden" style="left:440px; top:5px; width:35px; height:19px; "/>
- </group>
- <group id="group1" scroll="auto" style="left:10px; top:501px; width:755px; height:27px; ">
- <button id="btn_confirm" class="btn4_letter2" style="left:637px; top:2px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_cancel" class="btn4_letter2" style="left:694px; top:2px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:580; y2:0px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|