SPZUM00500_예외로그인.xfdl 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPZUM00400" classname="Guide_SA_01" inheritanceid="" position="absolute 0 0 300 320" titletext="예외로그인" class="frm_POP" onload="SPZUM00500_onload" oninit="SPZUM00500_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Static id="stt_titleText" text="휴진일 로그인 사유 입력" class="sta_POP_title" position="absolute 12 8 266 28" usedecorate="false" wordwrap="none" transparenthittest="true"/>
  8. <Button id="btn_close" taborder="2" anchor="default" position="absolute 274 12 288 25" positiontype="position" class="btn_POP_cls" onclick="btn_cancel_onclick"/>
  9. <Button id="btn_confirm" taborder="3" text="확인" class="btn5" position="absolute 104 289 148 309" onclick="btn_confirm_onclick"/>
  10. <Static id="stt_subTitle" text="로그인 사유" class="tit_2" position="absolute 12 177 288 197" style="linespace:2;background:URL('theme://images/icon_tit_bullet2.png');align:left top;"/>
  11. <Static id="stt_userNm" position="absolute 116 190 284 211" style="font:Dotum,11,bold;"/>
  12. <Button id="btn_cancel" taborder="5" text="취소" class="btn5" position="absolute 152 289 196 309" onclick="btn_cancel_onclick"/>
  13. <Radio id="rdo_Resn" taborder="7" columncount="3" rowcount="2" position="absolute 10 194 290 254" codecolumn="codecolumn" datacolumn="datacolumn" style="textpadding:0 3 0 3;" onitemchanged="rdo_Resn_onitemchanged">
  14. <Dataset id="innerdataset">
  15. <ColumnInfo>
  16. <Column id="codecolumn" size="256"/>
  17. <Column id="datacolumn" size="256"/>
  18. </ColumnInfo>
  19. <Rows>
  20. <Row>
  21. <Col id="codecolumn">1</Col>
  22. <Col id="datacolumn">환자상태확인</Col>
  23. </Row>
  24. <Row>
  25. <Col id="codecolumn">2</Col>
  26. <Col id="datacolumn">예정환자파악</Col>
  27. </Row>
  28. <Row>
  29. <Col id="codecolumn">3</Col>
  30. <Col id="datacolumn">집담회용</Col>
  31. </Row>
  32. <Row>
  33. <Col id="codecolumn">4</Col>
  34. <Col id="datacolumn">기타</Col>
  35. </Row>
  36. </Rows>
  37. </Dataset>
  38. </Radio>
  39. <Edit id="edt_Resn" taborder="9" position="absolute 56 229 290 249" enable="false" onkeydown="edt_Resn_onkeydown"/>
  40. <Static id="stt_subTitle00" text="휴진정보" class="tit_2" position="absolute 12 44 288 64" style="linespace:2;background:URL('theme://images/icon_tit_bullet2.png');align:left top;"/>
  41. <Grid id="grd_rsvmsgcnts" class="grd_Search_Menu" taborder="13" binddataset="ds_main" scrollbars="none" scrollpixel="all" useinputpanel="false" autofittype="col" onkeydown="div_searchMenu_grd_search_menu_onkeydown" onmousemove="div_searchMenu_grd_search_menu_onmousemove" oncelldblclick="div_searchMenu_grd_search_menu_oncelldblclick" position="absolute 12 67 290 167" anchor="all" tooltiptype="hover" style="border:1 solid #808080ff ;">
  42. <Formats>
  43. <Format id="default">
  44. <Columns>
  45. <Column size="278"/>
  46. </Columns>
  47. <Rows>
  48. <Row size="100"/>
  49. </Rows>
  50. <Band id="body">
  51. <Cell displaytype="decoratetext" edittype="none" style="align:left middle;padding:0 8 0 8;font:Dotum,9;linespace:5;" text="bind:msgcnts" wordwrap="word" editdisplay="display"/>
  52. </Band>
  53. </Format>
  54. </Formats>
  55. </Grid>
  56. <Static id="cap_capslock" text="※ 처방 및 기록의 인증저장은 불가능 합니다." visible="true" position="absolute 11 261 289 281" style="color:#ff0000ff;bordertype:round 3 3 ;align:center middle;font:Dotum,9,bold;"/>
  57. </Layout>
  58. </Layouts>
  59. <Bind/>
  60. <Objects>
  61. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  62. <ColumnInfo>
  63. <Column id="msgcnts" type="STRING" size="500" sumtext="휴진정보"/>
  64. </ColumnInfo>
  65. <Rows>
  66. <Row>
  67. <Col id="msgcnts"/>
  68. </Row>
  69. </Rows>
  70. </Dataset>
  71. </Objects>
  72. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  73. * System Name : HIT
  74. * Job Name :
  75. * File Name : SPZUM00500_예외로그인.xfdl
  76. * Creator : 19338
  77. * Make Date : 2019-09-17
  78. *
  79. * Description : 교수 휴진일 예외 로그인 사유를 입력한다.
  80. *---------------------------------------------------------------------------------------
  81. * Modify Date Modifier Modify Description
  82. *---------------------------------------------------------------------------------------
  83. * 2019-09-17 19338 최초작성
  84. *---------------------------------------------------------------------------------------
  85. ****************************************************************************************/
  86. //=======================================================================================
  87. // Lib Include
  88. //---------------------------------------------------------------------------------------
  89. include "com_commonxp::comm_main.xjs"
  90. //=======================================================================================
  91. // Global Form Variable
  92. //---------------------------------------------------------------------------------------
  93. var lgv_bPwdvalid = false;
  94. var lgv_bExcept = true;
  95. function SPZUM00500_oninit(obj:Form, e:InitEventInfo)
  96. {
  97. //frmf_initForm(obj);
  98. // 휴진정보 세팅
  99. fDecorateText();
  100. }
  101. //=======================================================================================
  102. // Function
  103. //---------------------------------------------------------------------------------------
  104. function btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  105. {
  106. if(rdo_Resn.index < 0){
  107. sysf_messageBox("사유를 선택하세요");
  108. return;
  109. }
  110. if(rdo_Resn.index == 3 && (edt_Resn.value == "" || edt_Resn.value == null)){
  111. sysf_messageBox("기타사유를 입력하세요");
  112. edt_Resn.setFocus();
  113. return;
  114. }
  115. if(rdo_Resn.index == 3 && edt_Resn.getLength() < 5){
  116. sysf_messageBox("기타사유는 다섯 글자 이상 입력하세요");
  117. edt_Resn.setFocus();
  118. return;
  119. }
  120. var exptLgnCd; // 예외로그인사유코드(1:환자상태확인,2:예정환자파악,3:집담회용,4:기타)
  121. var exptLgnResn = ""; // 기타사유
  122. if(rdo_Resn.index == 3 && (edt_Resn.value != "" || edt_Resn.value != null)){
  123. var tmpStr = edt_Resn.value;
  124. var nCnt = tmpStr.length;
  125. var cnt = 0;
  126. for(var i = 1; i < nCnt; i++){
  127. if(tmpStr.charAt(i) == tmpStr.charAt(i-1)){
  128. cnt++;
  129. //trace("## i : " + i + ", tmpStr.charAt(i) : " + tmpStr.charAt(i)+ ", tmpStr.charAt(i-1) : " + tmpStr.charAt(i-1) + " , cnt : " + cnt);
  130. }
  131. }
  132. if(cnt >= 4){
  133. sysf_messageBox("기타사유에 같은 문자/숫자를 연속으로 4번 이상 사용하실 수 없습니다.","E999");
  134. edt_Resn.setFocus();
  135. return;
  136. }else{
  137. exptLgnResn = edt_Resn.value;
  138. }
  139. }
  140. exptLgnCd = rdo_Resn.value;
  141. //exptLgnResn = edt_Resn.value;
  142. tranf_submit({
  143. id: "TRZUM00501"
  144. , service: "hismainapp.Login"
  145. , method: "reqSetExptLoginInfo"
  146. , args: "exptLgnCd=" + wrapQuote(exptLgnCd) + " " +
  147. "exptLgnResn=" + wrapQuote(exptLgnResn) + " " +
  148. "userId=" + wrapQuote(sUserId)
  149. , outds: "ds_result=result"
  150. , async: true
  151. , force: true
  152. , callback: "cbf_TRZUM00501"
  153. });
  154. }
  155. // 예외 로그인 사유 저장 콜백
  156. function cbf_TRZUM00501(sSvcId, nErrorCode, sErrorMsg){
  157. if(nErrorCode == 0){
  158. this.close("Y");
  159. } else {
  160. // 에러처리
  161. sysf_messageBox(sErrorMsg, "E");
  162. }
  163. }
  164. // 취소버튼
  165. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  166. {
  167. // 로그인 취소 처리를 한다.
  168. var ipaddr = sysf_getIPAddress();
  169. var oParam = {};
  170. oParam.service = "hismainapp.Login";
  171. oParam.method = "reqLoginFailLogging";
  172. oParam.args = "KEY="+wrapQuote("8") + " " + // KEY:8 -> 휴진일 예외 로그인 사유 미입력으로 로그인 취소 합니다.
  173. "ipaddr="+wrapQuote(ipaddr) + " " +
  174. "userid="+wrapQuote(sUserId);
  175. oParam.async = false;
  176. tranf_submit(oParam);
  177. this.close("N");
  178. }
  179. // 라디오 버튼 선택 이벤트
  180. function rdo_Resn_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  181. {
  182. if(obj.index == 3){
  183. edt_Resn.enable = true;
  184. edt_Resn.setFocus();
  185. }else{
  186. edt_Resn.enable = false;
  187. }
  188. }
  189. // 사유 입력란 키입력 이벤트
  190. function edt_Resn_onkeydown(obj:Edit, e:KeyEventInfo)
  191. {
  192. if(e.keycode == 13){
  193. btn_confirm.click();
  194. }
  195. }
  196. // 휴진정보 세팅
  197. function fDecorateText(){
  198. var decoText;
  199. var textArr = new Array();
  200. textArr = sResnmsg.split("[");
  201. var index = sResnmsg.indexOf("[", 0)
  202. if(index >= 0) {
  203. decoText = "<b v='true'>" + textArr[0] + "</b>" + // 휴진기간
  204. "[" + textArr[1]; // 휴진사유
  205. } else {
  206. decoText = sResnmsg;
  207. }
  208. ds_main.setColumn(0, "msgcnts", decoText);
  209. }
  210. ]]></Script>
  211. </Form>
  212. </FDL>