123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPRFE02500" position="absolute 0 0 757 549" titletext="첨부파일조회" onload="SPRFE02500_onload" onclose="SPRFE02500_onclose">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 755 522" id="group3" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Static text="첨부파일내역조회" position="absolute 0 0 175 25" id="caption1" class="tit_1" anchor="default"/>
- <Shape position="absolute 0 48 755 54" id="line1" class="line_10" anchor="default"/>
- <Grid position="absolute 0 53 755 517" id="grd_fileinfo" binddataset="ds_main_fileinfo_fileinfolist" anchor="default" oncelldblclick="group3_grd_fileinfo_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="75"/>
- <Column size="86"/>
- <Column size="246"/>
- <Column size="67"/>
- <Column size="150"/>
- <Column size="71"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </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="caption1"/>
- <Cell col="10"/>
- <Cell col="11"/>
- <Cell col="12"/>
- <Cell col="13"/>
- <Cell col="14"/>
- <Cell col="15"/>
- <Cell col="16"/>
- <Cell col="17"/>
- <Cell col="18"/>
- <Cell col="19"/>
- <Cell col="20"/>
- <Cell col="21"/>
- <Cell col="22"/>
- <Cell col="23"/>
- <Cell col="24"/>
- <Cell col="25"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:reqdd" mask="expr:utlf_isNull(reqdd) ? '' : '####-##-##'"/>
- <Cell col="2" displaytype="text" text="bind:fileseqno"/>
- <Cell col="3" displaytype="text" text="bind:filenm"/>
- <Cell col="4" text="bind:filesize"/>
- <Cell col="5" displaytype="text" text="bind:filetype"/>
- <Cell col="6" text="bind:qrycnt"/>
- <Cell col="7" text="bind:reqdeptnm"/>
- <Cell col="8" text="bind:attfilenm"/>
- <Cell col="9" text="bind:instcd"/>
- <Cell col="10" text="bind:reqdeptcd"/>
- <Cell col="11" text="bind:goalflag"/>
- <Cell col="12" text="bind:seqno"/>
- <Cell col="13" text="bind:reqpsnid"/>
- <Cell col="14" text="bind:filepath"/>
- <Cell col="15" text="bind:reqflag"/>
- <Cell col="16" text="bind:reqno"/>
- <Cell col="17" text="bind:reqseqno"/>
- <Cell col="18" text="bind:valumdlcd"/>
- <Cell col="19" text="bind:valuclsdetlcd"/>
- <Cell col="20" text="bind:publbaseflag"/>
- <Cell col="21" text="bind:idxcd"/>
- <Cell col="22" text="bind:seqno2"/>
- <Cell col="23" text="bind:wrtedd"/>
- <Cell col="24" text="bind:fileflag"/>
- <Cell col="25" text="bind:workflag"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 699 26 755 48" id="btn_search" class="btn1" text="조회" anchor="default" onclick="group3_btn_search_onclick"/>
- <Button position="absolute 641 26 697 48" id="btn_save" class="btn4" text="저장" anchor="default" onclick="group3_btn_save_onclick"/>
- <Button position="absolute 586 26 639 48" id="btn_delgrd" class="btn2" text="행삭제" anchor="default" onclick="group3_btn_delgrd_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 1 519 755 546" id="group1" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 640 3 696 25" id="btn_confirm" class="btn4" text="확인" anchor="default" onclick="group1_btn_confirm_onclick" visible="false"/>
- <Button position="absolute 698 3 754 25" id="btn_cancel" class="btn4" text="취소" anchor="default"/>
- <Shape position="absolute -8 -2 754 4" id="line32" class="line_6" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_fileinfo_fileinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="reqdd" type="STRING"/>
- <Column id="fileseqno" type="STRING"/>
- <Column id="filenm" type="STRING"/>
- <Column id="filesize" type="STRING"/>
- <Column id="filetype" type="STRING"/>
- <Column id="qrycnt" type="STRING"/>
- <Column id="reqdeptnm" type="STRING"/>
- <Column id="attfilenm" type="STRING"/>
- <Column id="instcd" type="STRING"/>
- <Column id="reqdeptcd" type="STRING"/>
- <Column id="goalflag" type="STRING"/>
- <Column id="seqno" type="STRING"/>
- <Column id="reqpsnid" type="STRING"/>
- <Column id="filepath" type="STRING"/>
- <Column id="reqflag" type="STRING"/>
- <Column id="reqno" type="STRING"/>
- <Column id="reqseqno" type="STRING"/>
- <Column id="valumdlcd" type="STRING"/>
- <Column id="valuclsdetlcd" type="STRING"/>
- <Column id="publbaseflag" type="STRING"/>
- <Column id="idxcd" type="STRING"/>
- <Column id="seqno2" type="STRING"/>
- <Column id="wrtedd" type="STRING"/>
- <Column id="fileflag" type="STRING"/>
- <Column id="workflag" type="STRING"/>
- <Column id="filedata" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_target" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_fileinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="reqdd" type="STRING" size="256"/>
- <Column id="reqflag" type="STRING" size="256"/>
- <Column id="reqno" type="STRING" size="256"/>
- <Column id="reqseqno" type="STRING" size="256"/>
- <Column id="reqpsnid" type="STRING" size="256"/>
- <Column id="reqdeptcd" type="STRING" size="256"/>
- <Column id="fileseqno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="reqdd"/>
- <Col id="reqflag"/>
- <Col id="reqno"/>
- <Col id="reqseqno"/>
- <Col id="reqpsnid"/>
- <Col id="reqdeptcd"/>
- <Col id="fileseqno"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp_save_fileinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filepath" type="STRING" size="256" sumtext="서버저장경로"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filedata" type="STRING" size="256" sumtext="파일데이터"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <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
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : N/A
- * Description :
- ****************************************************************************************/
-
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SPRFE02500_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- //grdf_initGrid(grd_XXX);
- grdf_setGridSort(group3.grd_fileinfo);
- grdf_setRowTypeIcon(group3.grd_fileinfo, 0);
- misfGridInit(group3.grd_fileinfo);
- misfMsterDetailSet(group3.grd_fileinfo, null, "TRRFE02501" ,"Y");
- var instcd = opener.frmf_getParameter("para_instcd" );
- var reqdd = opener.frmf_getParameter("para_reqdd" );
- var fileseqno = opener.frmf_getParameter("para_fileseqno" );
- var goodflag = opener.frmf_getParameter("para_goodflag" );
- var reqno = opener.frmf_getParameter("para_reqno" );
- var reqseqno = opener.frmf_getParameter("para_reqseqno" );
- var attfilenm = opener.frmf_getParameter("para_attfilenm" );
- var attfilepathnm = opener.frmf_getParameter("para_attfilepathnm");
- var manlyn = opener.frmf_getParameter("para_manlyn" );
- dsf_makeValue(ds_send_fileinfo, "instcd" , "string", instcd );
- dsf_makeValue(ds_send_fileinfo, "reqdd" , "string", reqdd );
- dsf_makeValue(ds_send_fileinfo, "goodflag" , "string", goodflag);
- dsf_makeValue(ds_send_fileinfo, "reqno" , "string", reqno);
- dsf_makeValue(ds_send_fileinfo, "reqseqno" , "string", reqseqno);
- dsf_makeValue(ds_send_fileinfo, "fileseqno" , "string", fileseqno);
- dsf_makeValue(ds_send_fileinfo, "manlyn" , "string", manlyn);
- group3.btn_search.click();
- }
- function group3_grd_fileinfo_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
- if(e.row < 0) return;
- var idx = e.row;
- var filepath = ds_main_fileinfo_fileinfolist.getColumn(idx, "filepath");
- var filenm = ds_main_fileinfo_fileinfolist.getColumn(idx, "filenm");
- var qrycnt = ds_main_fileinfo_fileinfolist.getColumn(idx, "qrycnt");
-
- //qrycnt 가 빈값일 경우는 숫자로 변환해도 0이 아닌 값으로 변환되므로 조건문으로 처리한다.
- if ( utlf_isNull(qrycnt)) {
- qrycnt = "0";
- }
- cnt = parseInt(qrycnt)+1;
- ds_main_fileinfo_fileinfolist.setColumn(idx, "qrycnt", cnt);
-
- ds_main_fileinfo_fileinfolist.enableevent = false;
- ds_main_fileinfo_fileinfolist.updatecontrol = false;
-
- ds_main_fileinfo_fileinfolist.setRowType(idx, 4);
-
- grdf_setStatusColumn(ds_main_fileinfo_fileinfolist, "status");
-
- ds_main_fileinfo_fileinfolist.updatecontrol = true;
- ds_main_fileinfo_fileinfolist.enableevent = true;
-
- ds_temp_save_fileinfolist.clear();
- dsf_copyColInfo(ds_temp_save_fileinfolist, ds_main_fileinfo_fileinfolist);
- ds_temp_save_fileinfolist.copyRow(ds_temp_save_fileinfolist.addRow(), ds_main_fileinfo_fileinfolist, idx);
-
- //misfSave("TXRFE02501");
- misfSave("TXRFE02502");
-
- ds_send.setColumn(0, "filepath", filepath);
-
- sysf_setErrorMsg(false); //자바단에서 에러발생시 1.0은 오류리턴을 안해서...
-
- var oParam = {};
- oParam.id = "TRRSD00422";
- oParam.service = "reqapp.ReqMngt";
- oParam.method = "reqGetReqAttfileDownLoad";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_attachfile=attachfile";
- oParam.async = false;
- //oParam.callback = "cf_TRRSD00422";
- tranf_submit(oParam);
-
- sysf_setErrorMsg(true);
-
- var fd = new FileDialog;
- var objVFile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
- if (objVFile != null)
- {
- var temp = dsf_readFileFromDs(objVFile.fullpath, ds_main_attachfile, 0, "filedata"); // 파일저장
- sleep(1000);
- if( !utlf_isNull(temp) )
- {
- var rtn = sysf_messageBox("파일을", "Q004");
- if( rtn == 6 )
- {
- var text = new String(objVFile.fullpath);
- var replaceText = text.replace(" ", "");
- if( text.length != replaceText.length )
- {
- sysf_messageBox("공백이 포함된 [파일명/폴더]는 자동열기가 실행되지 않습니다.", "E999", "");
- return;
- }
- else
- {
- //system.execShell(objVFile.fullpath);
- var path = objVFile.fullpath;
- var sArg = "";
- var objExtCommon = new ExtCommon();
- objExtCommon.executeProcess(path, sArg);
- }
- }
- }
- }
-
- // var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
- //
- // if (localfile != "") {
- // var qrycnt=group3.grd_fileinfo.valueMatrix(idx,group3.grd_fileinfo.colRef("qrycnt"));
- // //qrycnt 가 빈값일 경우는 숫자로 변환해도 0이 아닌 값으로 변환되므로 조건문으로 처리한다.
- // if ( qrycnt == "") {
- // qrycnt = "0";
- // }
- // cnt = parseInt(qrycnt)+1;
- // model.setValue("/root/main/fileinfo/fileinfolist["+idx+"]/qrycnt",cnt);
- // group3.grd_fileinfo.addStatus(idx,"update");
- //
- // misfSave("TXRFE02501");
- //
- // model.download(getActionURL("TRRSD00422")+"&filepath="+filepath,localfile);
- // var rtn = messageBox("파일을", "Q004");
- // if( rtn == 6 ) {
- // window.exec(localfile);
- // }
- // }
- // group3.btn_search.dispatch("DOMActivate");
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function group3_btn_search_onclick(obj:Button, e:ClickEventInfo) {
- misfMsterDetailRetrieve();
-
- if( utlf_isNull(ds_main_fileinfo_fileinfolist.getColumnInfo("filedata")) ){
- ds_main_fileinfo_fileinfolist.addColumn("filedata", "string");
- }
-
- if (ds_main_fileinfo_fileinfolist.rowcount > 0) {
- if (ds_main_fileinfo_fileinfolist.getColumn(0, "reqpsnid") == sysf_getUserInfo("userid")) {
- group3.btn_save.enable = true;
- group3.btn_delgrd.enable = true;
- }
- else {
- group3.btn_save.enable = false;
- group3.btn_delgrd.enable = false;
- }
- }
- else {
- group3.btn_save.enable = false;
- group3.btn_delgrd.enable = false;
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 저장
- ****************************************************************************************/
- function group3_btn_save_onclick(obj:Button, e:ClickEventInfo) {
- misfSave("TXRFE02502");
- group3.btn_search.click();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 행삭제
- ****************************************************************************************/
- function group3_btn_delgrd_onclick(obj:Button, e:ClickEventInfo) {
- misfGridIUD(group3.grd_fileinfo, "D");
- }
- /****************************************************************************************
- * Components : Button
- * Description : 확인
- ****************************************************************************************/
- function group1_btn_confirm_onclick(obj:Button, e:ClickEventInfo) {
- this.close();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 취소
- ****************************************************************************************/
- function group1_btn_cancel_onclick(obj:Button, e:ClickEventInfo) {
- this.close();
- }
- /****************************************************************************************
- * Components : Form
- * Description : 닫기전 변경데이터 체크
- ****************************************************************************************/
- function SPRFE02500_onclose(obj:Form, e:CloseEventInfo)
- {
- var dsUpdate = grdf_getGridUpdateData(group3.grd_fileinfo, "all");
- if (dsUpdate.rowcount > 0) {
- if (group3.btn_save.enable == true) {
- var save_val = sysf_messageBox("삭제 자료가 존재 합니다. ", "Q002");
- if (save_val == "6") {
- group3.btn_save.click();
- }
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|