123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPAHA04410" position="absolute 0 0 1170 690" titletext="판정이미지" oninit="SPAHA04410_oninit" onload="SPAHA04410_onload">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 40 1165 51" linetype="horizontal" id="line8" class="line_10" anchor="default"/>
- <Static text="사진 목록" position="absolute 1 26 119 44" id="caption20" class="tit_2" anchor="default"/>
- <Button position="absolute 290 390 354 409" id="btn_upload" class="btn5" text="업로드" anchor="default" onclick="btn_upload_onclick"/>
- <Button position="absolute 224 390 288 409" id="btn_addfile" class="btn2" text="파일추가" anchor="default" onclick="btn_addfile_onclick"/>
- <Grid position="absolute 0 47 354 380" id="grd_attachfile" visible="true" binddataset="ds_main_imagelst_item" anchor="default" autofittype="col" oncellclick="grd_attachfile_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="307"/>
- <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="예약번호"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" style="align:left top;padding:5 2 1 2;" text="bind:filenm" wordwrap="word"/>
- <Cell col="2" text="bind:filepath"/>
- <Cell col="3" text="bind:healexamflag"/>
- <Cell col="4" text="bind:rsrvdd"/>
- <Cell col="5" text="bind:rsrvno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 0 410 355 560" id="grd_addiamge" binddataset="ds_send_cond_attach" anchor="default" autofittype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="341"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="파일경로"/>
- </Band>
- <Band id="body">
- <Cell style="align:left top;padding:5 2 1 2;" text="bind:file" wordwrap="word"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 300 23 353 42" id="btn_del" class="btn5" text="삭제" anchor="default" onclick="btn_del_onclick"/>
- <ImageViewer id="img1" anchor="default" position="absolute 0 0 0 0"/>
- <Button position="absolute 1100 23 1164 42" id="btn_down" class="btn2" text="파일저장" anchor="default" onclick="btn_down_onclick"/>
- <Static id="caption2" text="판정이미지 관리" class="tit_1" position="absolute 0 0 217 25"/>
- <ImageViewer id="img_phot1" taborder="1" stretch="fit" position="absolute 360 48 1164 682" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_imagelst_item" 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="filepath" type="STRING" size="256"/>
- <Column id="healexamflag" type="STRING" size="256"/>
- <Column id="rsrvdd" type="STRING" size="256"/>
- <Column id="rsrvno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="filenm"/>
- <Col id="filepath"/>
- <Col id="healexamflag"/>
- <Col id="rsrvdd"/>
- <Col id="rsrvno"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_image_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="image" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="image"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
- <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
- <Column id="rsrvdd" type="STRING" size="256" sumtext="예약일자"/>
- <Column id="rsrvno" type="STRING" size="256" sumtext="예약번호"/>
- <Column id="pid" type="STRING" size="256" sumtext="등로번호"/>
- <Column id="orddd" type="STRING" size="256" sumtext="건진일자"/>
- <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
- <Column id="pkgcd" type="STRING" size="256" sumtext="패키지코드"/>
- <Column id="filepath" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="healexamflag"/>
- <Col id="healexamdetlflag"/>
- <Col id="rsrvdd"/>
- <Col id="rsrvno"/>
- <Col id="pid"/>
- <Col id="orddd"/>
- <Col id="cretno"/>
- <Col id="pkgcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_image" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="filenm" type="STRING" size="256" sumtext="파일명"/>
- <Column id="filedata" type="BLOB" size="256" sumtext="파일데이터"/>
- <Column id="filesize" type="STRING" size="256" sumtext="파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_cond_attach" 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="BLOB" size="256" sumtext="첨부파일데이터"/>
- <Column id="filesize" type="STRING" size="256" sumtext="첨부파일크기"/>
- <Column id="filetype" type="STRING" size="256" sumtext="파일종류"/>
- <Column id="file" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_temp_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_attachfile" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="img_phot1" propid="image" datasetid="ds_main_image_attachfile" columnid="image"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "ast_healexamxp::AHA001.xjs";
- include "pam_pamcomnxp::PAM.xjs";
- include "ast_healthexambasexp::healcombolist.xjs";
- include "ast_healthexamrsrvacptxp::AHA.xjs"
- var arErrorCode = new HashArray();
- var cnj_img_view = null;
- function SPAHA04410_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- grdf_setRowTypeIcon(grd_attachfile, 0);
- }
- function SPAHA04410_onload(obj:Form, e:LoadEventInfo)
- {
- try{
- ds_init_send.copyData(arg_ds_init_send);
- }catch(e){
- sysf_catchTrace(e);
- }
- fInitialize();
- }
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- btn_addfile.enable = false;
- btn_upload.enable = false;
- btn_del.enable = false;
- btn_down.enable = false;
-
- if(frmf_checkOpener() == true) {
- var rsrvdd = ds_init_send.getColumn(0, "rsrvdd");
- var rsrvno = ds_init_send.getColumn(0, "rsrvno");
-
- if(!utlf_isNull(rsrvdd) && !utlf_isNull(rsrvno)) {
- ds_send.setColumn(0, "healexamflag", ds_init_send.getColumn(0, "healexamflag"));
- ds_send.setColumn(0, "healexamdetlflag", ds_init_send.getColumn(0, "healexamdetlflag"));
- ds_send.setColumn(0, "rsrvdd", rsrvdd);
- ds_send.setColumn(0, "rsrvno", rsrvno);
- ds_send.setColumn(0, "pid", ds_init_send.getColumn(0, "pid"));
- ds_send.setColumn(0, "orddd", ds_init_send.getColumn(0, "orddd"));
- ds_send.setColumn(0, "cretno", ds_init_send.getColumn(0, "cretno"));
- ds_send.setColumn(0, "pkgcd", ds_init_send.getColumn(0, "pkgcd"));
-
- btn_addfile.enable = true;
- btn_upload.enable = true;
- btn_del.enable = true;
- btn_down.enable = true;
-
- var oParam = {};
- oParam.id = "TRAHA04415";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqGetJudgImageList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_imagelst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
- }else {
- btn_addfile.enable = false;
- btn_upload.enable = false;
- btn_del.enable = false;
- btn_down.enable = false;
- }
- ds_send_cond_attach.clearData();
- }
- }
- function btn_upload_onclick(obj:Button, e:ClickEventInfo)
- {
- if (ds_send_cond_attach.rowcount == 0)
- {
- sysf_messageBox("업로드될 파일이", "I004");
- return false;
- }
- var oParam = {};
- oParam.id = "TXAHA04413";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqInsJudgImage";
- oParam.inds = "file=ds_send_cond_attach req=ds_send";
- oParam.outds = "ds_hidden_temp_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXAHA04413";
- tranf_submit(oParam);
- if (arErrorCode.pop("TXAHA04413") > -1) {
- //submit("TRAHA04415");
- var oParam = {};
- oParam.id = "TRAHA04415";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqGetJudgImageList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_imagelst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_send_cond_attach.clearData();
- }
- }
- function cf_TXAHA04413(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function btn_addfile_onclick(obj:Button, e:ClickEventInfo)
- {
- // var maxsize = upload1.attribute("filesize");
- // files = window.fileDialog("open", "|", true);
- // filelist = files.split("|");
- // for(var i = 0 ; i < filelist.length ; i++ ) {
- // var file = filelist[i];
- // if(file != "") {
- // grd_addiamge.addRow(false);
- // grd_addiamge.valueMatrix(grd_addiamge.rows - 1, 0) = file;
- // if (!checkFileSize(upload1)){
- // grd_addiamge.removeItem();
- // messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
- //
- // }
- // }
- // }
- var maxsize = 5242880;
- //var name = ds_main_iteminfo.getColumn(0, "attfilenm");
- var fd = new FileDialog;
- files = fd.open("FileOpen", FileDialog.SINGLELOAD);
-
- //ds_send_cond_attach.clearData();
- var addrow = ds_send_cond_attach.addRow();
- var file = dsf_writeFileToDs(files,ds_send_cond_attach,addrow, "filedata");
- filesize = file.filesize;
-
- if (filesize > maxsize){
- sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
- }
- if(utlf_isNull(files)){
- //ds_main_cond.setColumn(addrow, "attfile", "");
- //ds_main_cond.setColumn(addrow, "attfilepath", "");
- ds_send_cond_attach.setColumn(addrow, "file", "");
- ds_send_cond_attach.setColumn(addrow, "filedata", "");
- ds_send_cond_attach.setColumn(addrow, "filenm", "");
- ds_send_cond_attach.setColumn(addrow, "filesize", "");
- ds_send_cond_attach.setColumn(addrow, "filetype", "");
- }
- else{
- //ds_main_cond.setColumn(addrow, "attfile", file.filename);
- ds_send_cond_attach.setColumn(addrow, "file", file.filename);
- ds_send_cond_attach.setColumn(addrow, "filenm", file.filename);
- ds_send_cond_attach.setColumn(addrow, "filesize", file.filesize);
- ds_send_cond_attach.setColumn(addrow, "filetype", file.filetype);
- }
-
- // if (!checkFileSize(vFile.getFileSize()))
- // {
- // ipt_attfilenm.value = "";
- // sysf_messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
- // ds_send_cond_attach.clearData();
- // ds_send_cond_attach.addRow();
- // }
- //dsf_makeValue(ds_main_iteminfo, "fileyn", "string", 'Y');
- }
- function checkFileSize(fileSize)
- {
- if (fileSize <= 5242880)
- return true;
- else
- return false;
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- if ( ds_main_imagelst_item.rowposition < 0 || ds_main_imagelst_item.rowcount == 0 ) {
- return false;
- }
- if ( sysf_messageBox("선택된 파일을 ","Q001") != 6 )
- {
- return false;
- }
- //grd_attachfile.clearStatus()
- var selectrow = grdf_getSelectedRows(grd_attachfile);
-
- ds_main_imagelst_item.enableevent = false;
- ds_main_imagelst_item.updatecontrol = false;
- for(var i = 0 ; i < selectrow; i++)
- {
- var cur_row= grd_attachfile.selectstartrow;
- ds_main_imagelst_item.setRowType(cur_row, 8);
- }
- ds_main_imagelst_item.updatecontrol = true;
- ds_main_imagelst_item.enableevent = true;
-
- var updateData = grdf_getGridUpdateData(grd_attachfile);
- ds_send_savedata.copyData(updateData, true);
-
- if( sysf_messageBox("이미지를 ", "Q001") !=6) return ;
-
- var oParam = {};
- oParam.id = "TXAHA04414";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqDelJudgImage";
- oParam.inds = "file=ds_send_savedata";
- oParam.outds = "ds_temp_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXAHA04414";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXAHA04414") > -1) {
- var oParam = {};
- oParam.id = "TRAHA04415";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqGetJudgImageList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_imagelst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
- }
- }
- function cf_TXAHA04414(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function grd_attachfile_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if (e.row >=0 && e.col >= 0) {
- var idx = ds_main_imagelst_item.rowposition;
- if(idx < 0) return false;
- var filepath = ds_main_imagelst_item.getColumn(idx, "filepath");
-
- ds_send.setColumn(0, "filepath", filepath);
-
- //submit("TRAHA04416");
- var oParam = {};
- oParam.id = "TRAHA04416";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqGetJudgImage";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_image_attachfile=attachfile";
- oParam.async = false;
- tranf_submit(oParam);
-
- img_phot1.image = ds_main_image_attachfile.getColumn(0, "filedata");
- }
- }
- function btn_down_onclick(obj:Button, e:ClickEventInfo)
- {
- if(!utlf_isNull(ds_main_image_attachfile.getColumn(0, "filedata")))
- {
- var idx = ds_main_imagelst_item.rowposition;
- var filepath = ds_main_imagelst_item.getColumn(idx , "filepath");
- var filenm = ds_main_imagelst_item.getColumn(idx , "filenm");
- ds_req.clearData();
- ds_req.addRow();
- dsf_makeValue(ds_req, "filepath", "string", filepath);
- var oParam = {};
- oParam.id = "TRAHA04417";
- oParam.service = "healthexamjudgapp.JudgInpt";
- oParam.method = "reqGetJudgImage";
- oParam.inds = "req=ds_req";
- oParam.outds = "ds_attachfile=attachfile";
- oParam.async = false;
- tranf_submit(oParam);
- var fd = new FileDialog;
- //var sFileName = ds_main_iteminfo.getColumn(0,"attfilenm");
- var objVFile = fd.open("FileSave", FileDialog.SAVE, "%MYDOCUMENT%", filenm); // 단일 파일 선택
- if (objVFile != null) {
- dsf_readFileFromDs(objVFile.fullpath, ds_download, 0, "attfilecnts"); // 파일저장
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|