123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRFC01100" position="absolute 0 0 761 526" titletext="첨부파일조회" oninit="SMRFC01100_oninit" onload="SMRFC01100_onload">
- <Layouts>
- <Layout>
- <Static id="caption1" text="첨부파일내역조회" class="tit_2" position="absolute 0 11 175 32"/>
- <Shape id="line1" class="line_10" position="absolute 0 27 755 33"/>
- <Grid id="grd_fileinfo" taborder="1" binddataset="ds_main_fileinfo_fileinfolist" autoenter="select" useinputpanel="false" cellsizingtype="col" position="absolute 0 59 755 499" oncelldblclick="grd_fileinfo_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="18"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="350"/>
- <Column size="67"/>
- <Column size="150"/>
- <Column size="60"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="70"/>
- <Column size="80"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="첨부파일번호"/>
- <Cell col="2" text="자산코드"/>
- <Cell col="3" text="파일이름"/>
- <Cell col="4" text="파일크기"/>
- <Cell col="5" text="파일타입"/>
- <Cell col="6" text="다운로드"/>
- <Cell col="7" text="파일경로"/>
- <Cell col="8" text="첨부기관"/>
- <Cell col="9" text="첨부기관"/>
- <Cell col="10" text="첨부부서"/>
- <Cell col="11" text="첨부부서"/>
- <Cell col="12" text="등록자"/>
- <Cell col="13" text="등록자"/>
- <Cell col="14" text="등록시간"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:fileseqno"/>
- <Cell col="2" text="bind:fixasetcd"/>
- <Cell col="3" text="bind:filenm"/>
- <Cell col="4" displaytype="number" text="bind:filesize"/>
- <Cell col="5" text="bind:filetype"/>
- <Cell col="6" displaytype="number" text="bind:qrycnt"/>
- <Cell col="7" text="bind:filepath"/>
- <Cell col="8" text="bind:refinstcd"/>
- <Cell col="9" text="bind:refinstnm"/>
- <Cell col="10" text="bind:refdeptcd"/>
- <Cell col="11" text="bind:refdeptnm"/>
- <Cell col="12" text="bind:refpsnid"/>
- <Cell col="13" text="bind:refpsnnm"/>
- <Cell col="14" text="bind:fstrgstdt"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_search" taborder="2" text="조회" class="btn1" visible="false" position="absolute 638 5 694 27" onclick="btn_search_onclick"/>
- <Button id="btn_save" taborder="3" text="저장" class="btn4" position="absolute 698 5 754 27" onclick="btn_save_onclick"/>
- <Shape id="line2" class="line_3" position="absolute 0 55 755 61"/>
- <Button id="btn_delgrd" taborder="4" text="파일삭제" class="btn2" position="absolute 690 37 754 56" onclick="btn_delgrd_onclick"/>
- <Button id="btn_addfile" taborder="5" text="파일추가" class="btn2" position="absolute 622 37 686 56" onclick="btn_addfile_onclick"/>
- <Static id="cap_fixasetcd_search" text="자산코드 :" class="search_name" position="absolute 13 36 130 53"/>
- <Edit id="ipt_fixasetcd_search" taborder="6" readonly="true" autoselect="true" autoskip="true" class="output" position="absolute 105 35 210 54"/>
- <Edit id="ipt_goodnm_search" taborder="7" readonly="true" autoselect="true" autoskip="true" class="output" position="absolute 300 35 581 54"/>
- <Static id="cap_goodflaghngnm_search" text="자 산 명 :" class="search_name" position="absolute 218 35 305 52"/>
- <Edit id="ipt_uploadfile" taborder="8" visible="false" position="absolute 440 5 475 24"/>
- <Shape id="line32" class="line_6" position="absolute 0 500 580 506"/>
- <Button id="btn_confirm" taborder="9" text="확인" class="btn4" position="absolute 642 502 698 524" onclick="btn_confirm_onclick"/>
- <Button id="btn_cancel" taborder="10" text="취소" class="btn4" position="absolute 699 502 755 524" onclick="btn_cancel_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_fileinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fixasetcd" type="STRING" size="256"/>
- <Column id="fixasetnm" type="STRING" size="256"/>
- <Column id="reqpsnid" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="fixasetcd"/>
- <Col id="fixasetnm"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_fileinfo_fileinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fixasetcd" type="STRING" size="256" sumtext="고정자산코드"/>
- <Column id="fileseqno" type="STRING" size="256" sumtext="첨부파일순번"/>
- <Column id="refinstcd" type="STRING" size="256" sumtext="첨부등록기관"/>
- <Column id="refinstnm" type="STRING" size="256" sumtext="첨부등록기관"/>
- <Column id="refdeptcd" type="STRING" size="256" sumtext="첨부등록부서"/>
- <Column id="refdeptnm" type="STRING" size="256" sumtext="첨부등록부서"/>
- <Column id="refpsnid" type="STRING" size="256" sumtext="첨부등록ID"/>
- <Column id="refpsnnm" type="STRING" size="256" sumtext="첨부등록자명"/>
- <Column id="filenm" type="STRING" size="256" sumtext="화일명"/>
- <Column id="filepath" type="STRING" size="256" sumtext="화일경로"/>
- <Column id="filesize" type="STRING" size="256" sumtext="화일사이즈"/>
- <Column id="filetype" type="STRING" size="256" sumtext="화일유형"/>
- <Column id="qrycnt" type="STRING" size="256" sumtext="조회수"/>
- <Column id="fstrgstdt" type="STRING" size="256" sumtext="등록시간"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_target_defaultvalue" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_fileupcolumn_fileupload" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filenm" type="STRING" size="256"/>
- <Column id="filedata" type="BLOB" size="256"/>
- <Column id="filesize" type="STRING" size="256"/>
- <Column id="filetype" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_fileupcolumn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fixasetcd" type="STRING" size="256" sumtext="고정자산코드"/>
- <Column id="refinstcd" type="STRING" size="256" sumtext="참조등록기관코드"/>
- <Column id="refdeptcd" type="STRING" size="256" sumtext="참조등록부서코드"/>
- <Column id="refpsnid" type="STRING" size="256" sumtext="참조등록자ID"/>
- <Column id="attfilenm" type="STRING" size="256" sumtext="첨부파일이름"/>
- <Column id="attfilepathnm" type="STRING" size="256" sumtext="첨부파일경로"/>
- <Column id="reqdd" type="STRING" size="256" sumtext="수리요구일자"/>
- <Column id="reqno" type="STRING" size="256" sumtext="수리요구번호"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_sfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filenm" type="STRING" size="256" sumtext="첨부파일명"/>
- <Column id="filedata" type="STRING" size="256" sumtext="첨부파일데이터"/>
- <Column id="filesize" type="STRING" size="256" sumtext="첨부파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_attfileinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fileseqno" type="STRING" size="256" sumtext="첨부파일SeqNo"/>
- <Column id="filepath" type="STRING" size="256" sumtext="첨부파일경로"/>
- <Column id="filenm" type="STRING" size="256" sumtext="첨부파일명"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="ipt_fixasetcd_search" propid="value" datasetid="ds_send_fileinfo" columnid="fixasetcd"/>
- <BindItem id="item1" compid="ipt_goodnm_search" propid="value" datasetid="ds_send_fileinfo" columnid="fixasetnm"/>
- <BindItem id="item2" compid="ipt_uploadfile" propid="value" datasetid="ds_send_fileupcolumn_fileupload" columnid="file"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-06-19
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- var arErrorCode = new HashArray();
- function SMRFC01100_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRFC01100_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_fileinfo);
- grdf_setRowTypeIcon(grd_fileinfo, 0);
-
- try
- {
- ds_target_defaultvalue.copyData(arg_ds_target);
- }
- catch(e)
- {
- }
-
- misfGridInit(grd_fileinfo);
-
- misfMsterDetailSet(grd_fileinfo,null, "TRRFC01101" ,"Y");
-
- if(String(ds_target_defaultvalue.getColumn(0, "fixasetcd")).length > 0)
- {
- ds_send_fileinfo.setColumn(0, "fixasetcd", ds_target_defaultvalue.getColumn(0, "fixasetcd"));
- ds_send_fileinfo.setColumn(0, "fixasetnm", ds_target_defaultvalue.getColumn(0, "fixasetnm"));
- btn_search.click();
- }
- else
- {
- sysf_messageBox("자산코드가 없는 경우 조회가 불가능 합니다.", "I");
- btn_cancel.click();
- }
- }
- function btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- misfMsterDetailRetrieve();
-
- var reqpsnid = ds_send_fileinfo.getColumn(0, "reqpsnid");
- if (ds_main_fileinfo_fileinfolist.rowcount > 0)
- {
- if (ds_main_fileinfo_fileinfolist.getColumn(0, "reqpsnid") == reqpsnid)
- {
- btn_save.enable = true;
- btn_delgrd.enable = true;
- }
- else
- {
- btn_save.enable = false;
- btn_delgrd.enable = false;
- }
- }
- else
- {
- btn_save.enable = false;
- btn_delgrd.enable = false;
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var delCount = 0;
- for (var i = 0; i< ds_main_fileinfo_fileinfolist.rowcount; i++)
- {
- if ( ds_main_fileinfo_fileinfolist.getRowType(i) == 8)
- {
- delCount++;
- }
- }
- var rtn = sysf_messageBox(delCount + "건의 파일 삭제를", "Q009");
- if( rtn == 6 )
- {
- var oParam = {};
- oParam.id = "TXRFC01102";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "delFixasetAttFile";
- oParam.inds = "fileinfolist=ds_main_fileinfo_fileinfolist:u";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TXRFC01102";
- tranf_submit(oParam);
- btn_search.click();
- }
- }
- function btn_addfile_onclick(obj:Button, e:ClickEventInfo)
- {
- var fd = new FileDialog;
- var vFile = fd.open("FileOpen", FileDialog.SINGLELOAD);
-
- if(utlf_isNull(vFile)) return;
-
- var file = dsf_writeFileToDs(vFile, ds_send_fileupcolumn_fileupload, 0, "filedata");
-
- // if(file.filesize > 5242880) {
- // ds_send_attach.deleteRow(nRow);
- // sysf_messageBox("파일 크기가 최대치(5242880Byte)를", "E003");
- // return;
- // }
-
- var filename = file.filename;
- var filesize = file.filesize;
- var idx = filename.indexOf(".");
- // ds_send_attach.setColumn(nRow, "file" , filename);
- ds_send_fileupcolumn_fileupload.setColumn(0, "filenm", file.filename);
- ds_send_fileupcolumn_fileupload.setColumn(0, "filesize", file.filesize);
- ds_send_fileupcolumn_fileupload.setColumn(0, "filetype", file.filetype);
-
- ipt_uploadfile.value = vFile.fullpath;
- if(String(ipt_uploadfile.value).length > 0)
- {
- fAttfileAdd();
- }
- }
- function fAttfileAdd(bData)
- {
- ds_send_fileupcolumn.setColumn(0, "refinstcd" , sysf_getUserInfo("dutplceinstcd"));
- ds_send_fileupcolumn.setColumn(0, "refdeptcd" , sysf_getUserInfo("dutplcecd"));
- ds_send_fileupcolumn.setColumn(0, "refpsnid" , sysf_getUserInfo("userid"));
- ds_send_fileupcolumn.setColumn(0, "fixasetcd" , ipt_fixasetcd_search.value);
-
- var oParam = {};
- oParam.id = "TXRFC01101";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "insFixasetAttFile";
- oParam.inds = "sfile=ds_send_fileupcolumn_fileupload req=ds_send_fileupcolumn";
- oParam.outds = "ds_temp_attfileinfo=attfileinfo";
- oParam.async = false;
- oParam.callback = "cf_TXRFC01101";
- tranf_submit(oParam);
- }
- function cf_TXRFC01101(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0) return;
- else btn_search.click();
- }
- function btn_delgrd_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grd_fileinfo, "D");
- }
- function btn_confirm_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function grd_fileinfo_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var idx = ds_main_fileinfo_fileinfolist.rowposition;
- if(idx >= 0) {
- var filepath = ds_main_fileinfo_fileinfolist.getColumn(idx, "filepath");
- var fileseqno = ds_main_fileinfo_fileinfolist.getColumn(idx, "fileseqno");
- var filenm = ds_main_fileinfo_fileinfolist.getColumn(idx, "filenm");
- var attfilenm = filenm.split(".");
-
- var fd = new FileDialog;
- var localfile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", attfilenm[0]);
- if (!utlf_isNull(localfile)) {
- dsf_createDsRow("ds_req", [{col:"filepath", val:filepath}
- ,{col:"fileseqno", val:fileseqno}]);
-
- //sysf_setErrorMsg(false); //자바단에서 에러발생시 1.0은 오류리턴을 안해서...
-
- var oParam = {};
- oParam.id = "TRRFC01102";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetFixasetAttfileDownLoad";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_sfile=attachfile";
- oParam.async = false;
- oParam.callback = "cf_TRRFC01102";
- tranf_submit(oParam);
-
- //sysf_setErrorMsg(true);
-
- if( arErrorCode.pop("TRRFC01102") > -1 ){
- var temp = dsf_readFileFromDs(localfile.fullpath+"."+attfilenm[1], ds_sfile, 0, "filedata"); // 파일저장
-
- if( !utlf_isNull(temp) )
- {
- var rtn = sysf_messageBox("파일을", "Q004");
- if( rtn == 6 ) {
- var objExtCommon = new ExtCommon();
- var rtn = objExtCommon.executeProcess(localfile.fullpath+"."+attfilenm[1],"","");
- }
- }
- }
- }
- btn_search.click();
- }
- }
- function cf_TRRFC01102(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- ]]></Script>
- </Form>
- </FDL>
|