123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.4">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPZMI00201" position="absolute 0 0 425 500" titletext="메시지 읽기" onload="SPZME00100_onload" class="frm_POP" enable="true">
- <Layouts>
- <Layout>
- <Static id="Static08" position="absolute 11 45 418 121" class="sta_DA_box"/>
- <Static id="cap_sender" text="보낸이" class="cell_1" position="absolute 12 46 85 70"/>
- <Static id="cap_senderid" text="보낸이 ID" class="cell_1" position="absolute 12 71 85 95"/>
- <Static id="cap_pname" text="환자명" class="cell_1" position="absolute 214 46 287 70" onclick="cap_msgcnts05_onclick"/>
- <Button id="btn_send" taborder="1" text="보내기" class="btn4" position="absolute 290 470 358 490" tooltiptext="adfasdfaf" onclick="btn_send_onclick"/>
- <Button id="btn_cancel" taborder="2" text="닫기" class="btn4" position="absolute 361 470 417 490" onclick="btn_cancel_onclick"/>
- <Static id="Static01" class="hand" position="absolute 5 130 135 150" onclick="Static01_onclick" text="받은 메시지"/>
- <Button id="btn_addreceivemsg" taborder="4" text="받은메시지포함" class="btn2" position="absolute 311 302 416 322" onclick="btn_delfile_onclick"/>
- <Edit id="ipt_fromnm" taborder="6" lengthunit="utf8" class="input_essential" position="absolute 290 48 413 68" imemode="hangul"/>
- <Edit id="ipt_fromaddress" taborder="5" lengthunit="utf8" class="input_essential" position="absolute 88 48 211 68" imemode="alpha"/>
- <Edit id="ipt_toaddress" taborder="7" lengthunit="utf8" class="input_essential" position="absolute 88 73 211 93" imemode="alpha"/>
- <TextArea id="tar_rsvmsgcnts" taborder="10" position="absolute 11 154 418 294" class="input_essential"/>
- <Static id="caption00" text="메시지 읽기" class="sta_POP_title" position="absolute 12 8 161 28"/>
- <Button id="Button00" taborder="13" class="btn_POP_cls" position="absolute 399 12 413 25" onclick="Button00_onclick"/>
- <Static id="cap_pid" text="환자 ID" onclick="cap_msgcnts05_onclick" class="cell_1" position="absolute 214 71 287 95"/>
- <Edit id="ipt_fromnm00" taborder="15" imemode="hangul" lengthunit="utf8" class="input_essential" position="absolute 290 73 413 93"/>
- <Static id="cap_sendtime" text="송신시간" class="cell_1" position="absolute 12 96 85 120"/>
- <Edit id="ipt_toaddress00" taborder="16" imemode="alpha" lengthunit="utf8" class="input_essential" position="absolute 88 98 211 118"/>
- <Static id="cap_msgtype" text="메시지 종류" onclick="cap_msgcnts05_onclick" class="cell_1" position="absolute 214 96 287 120"/>
- <Edit id="ipt_fromnm01" taborder="17" imemode="hangul" lengthunit="utf8" class="input_essential" position="absolute 290 98 413 118"/>
- <Static id="Static03" text="보낼 메시지" onclick="Static01_onclick" class="hand" position="absolute 5 302 135 322"/>
- <TextArea id="tar_msgcnts" taborder="18" class="input_essential" position="absolute 11 324 418 464"/>
- <Button id="btn_del" taborder="19" text="삭제" onclick="btn_send_onclick" class="btn4" position="absolute 231 470 287 490" tooltiptext="adfasdfaf"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_file" 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="filesize" type="STRING" size="256"/>
- <Column id="filedata" type="BLOB" size="256"/>
- <Column id="filetype" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_msg" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="contents" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_fromaddress" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fromaddress" type="STRING" size="256"/>
- <Column id="fromname" type="STRING" size="256"/>
- <Column id="toaddress" type="STRING" size="256"/>
- <Column id="ccaddress" type="STRING" size="256"/>
- <Column id="subject" type="STRING" size="256"/>
- <Column id="msg" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind/>
- <Script type="xscript4.0"><![CDATA[/************************************************************************************************
- * 파 일 명 : SPZME00100_이메일전송.xfdl
- * 작 성 자 : 오은비
- * 작 성 일 : 2014.03.06
- * 설 명 : 이메일전송
- * 수 정 자 :
- * 수정이력 :
- ************************************************************************************************/
- include "com_commonxp::comm_main.xjs"
- /******************************* Form Variable *************************************************/
- /************************************************************************************************
- ******************************** Form Event ****************************************************
- ************************************************************************************************/
-
- function btn_clear_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_Init();
- }
- function btn_send_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_Save();
- }
- function Button00_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- function btn_attfile_onclick(obj:Button, e:ClickEventInfo)
- {
- trace ("파일첨부합니다");
-
- // 파일다이얼로그를 띄워 사용자에게 파일경로를 입력받는다.
- var fd = new FileDialog;
- var objVFile = fd.open("FileOpen", FileDialog.LOAD); // 단일 파일 선택
-
- if (utlf_isNull(objVFile)) {
- return;
- }
- // 해당 파일을 데이터 셋에 저장한다.
- lf_AttachFile(objVFile)
- }
- function btn_delfile_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_DelFile();
- }
- function SPZME00100_onload(obj:Form, e:LoadEventInfo)
- {
- //frmf_initForm(obj);
-
- /* 버튼 권한 설정
- R : Readonly
- X : Read Write
- P : Print */
- btn_clear.enable = frmf_checkAuth("X");
- try {
- // 팝업 전달값 할당
- ipt_fromaddress.value = call_fromaddress;
- ipt_fromnm.value = call_fromname;
- ipt_toaddress.value = call_toaddress;
- ipt_ccaddress.value = call_ccaddress;
- ipt_subject.value = call_subject;
- tar_msg.value = call_msg;
- ipt_msgcnts01.value = 0;
- }
- catch(e){
- lf_Init();
- }
- }
- /************************************************************************************************
- Form Function
- ************************************************************************************************/
- /********************************************************************************
- * 설 명 : 초기화 함수.
- * argument :
- ********************************************************************************/
- function lf_Init()
- {
- //Dataset 초기화
- ds_file.clearData();
- ipt_fromaddress.value ="";
- ipt_fromnm.value = "";
- ipt_toaddress.value = "";
- ipt_ccaddress.value = "";
- ipt_subject.value = "";
- tar_msg.value = "";
- ipt_msgcnts01.value = 0;
- }
- /********************************************************************************
- * 설 명 : 저장함수
- * argument :
- ********************************************************************************/
- function lf_Save()
- {
- if(!frmf_chkMdt(["ipt_fromaddress", "ipt_fromnm", "ipt_toaddress", "ipt_subject", "tar_msg"], ["보내는이", "이름", "받는이", "제목", "내용"])) {
- return;
- }
-
- var sInDsName = dsf_createDsRow("ds_fromaddress"
- ,[{col: "fromaddress" , val: ipt_fromaddress.value}
- , {col: "fromname" , val: ipt_fromnm.value}
- , {col: "toaddress", val: ipt_toaddress.value}
- , {col: "ccaddress", val: ipt_ccaddress.value}
- , {col: "subject" , val: ipt_subject.value }
- , {col: "msg" , val: tar_msg.value}]);
- ds_msg.clearData();
- tranf_submit({
- id: "TXZNE00101"
- , service: "emailsenderapp.EmailSender"
- , method: "reqExeSendMail"
- , inds : "req="+sInDsName+":U attach=ds_file:U"
- , outds: "ds_msg=message"
- , async: true
- , callback: "cbf_TXZNE00101"
- });
- }
- function cbf_TXZNE00101()
- {
- ds_fromaddress.clearData();
-
- if ( ds_msg.getColumn(0,0) == null) {
- alert("전송실패");
- } else {
- alert(ds_msg.getColumn(0,0));
- }
- }
- /********************************************************************************
- * 설 명 : 파일첨부함수
- * argument :
- ********************************************************************************/
- function lf_AttachFile(objVFile)
- {
- var nRowNum = ds_file.insertRow(0);
- // 그 파일의 데이터를 데이터셋의 특정 컬럼에 BLOB 형식으로 write 한다.
- var file = dsf_writeFileToDs(objVFile, ds_file, nRowNum, "filedata");
- var size = parseInt(ipt_msgcnts01.value)+parseInt(file.filesize);
- trace("size : "+size);
-
- if ( size <= 10000000) {
- var fnm = file.filenm;
- ds_file.setColumn(nRowNum, "filenm", file.filename);
- ds_file.setColumn(nRowNum, "filesize", file.filesize);
- ds_file.setColumn(nRowNum, "filetype", file.filetype);
-
- //trace("type : "+ file.filetype);
-
- lf_FileSize();
-
- } else {
- ds_file.deleteRow(0);
- alert ("최대 파일 크기를 확인해주세요.");
-
- }
- }
- /********************************************************************************
- * 설 명 : 파일삭제함수
- * argument :
- ********************************************************************************/
- function lf_DelFile()
- {
- ds_file.updatecontrol = false;
-
- var bSucc = ds_file.setRowType(ds_file.rowposition, Dataset.ROWTYPE_DELETE);
- var sValue = parseInt(ipt_msgcnts01.value) - parseInt(ds_file.getColumn(ds_file.rowposition, 1));
- ipt_msgcnts01.value = sValue;
-
- ds_file.deleteRow(ds_file.rowposition);
- ds_file.updatecontrol = true;
- }
- /********************************************************************************
- * 설 명 : 파일 크기 합계함수
- * argument :
- ********************************************************************************/
- function lf_FileSize()
- {
- var rowCnt = ds_file.rowcount;
- var sValue=0;
-
- for(var i=0 ; i<rowCnt ; i++){
- sValue = sValue + parseInt(ds_file.getColumn(i, 1));
- }
- ipt_msgcnts01.value = sValue;
- }
- ]]></Script>
- </Form>
- </FDL>
|