SPZSU30000_전공의시간외사용신청내역조회.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPZSU300000" position="absolute 0 0 1199 793" titletext="전공의 근무시간외 사용신청 내역" oninit="SPZSU300000_oninit" onload="SPZSU300000_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="전공의 근무시간외 사용신청 내역" class="tit_1" position="absolute 0 0 250 24"/>
  8. <Div id="div_search" anchor="left top right" taborder="1" class="div_SA" position="absolute 0 24 1195 64" onkeydown="div_search_onkeydown">
  9. <Layouts>
  10. <Layout>
  11. <Button id="btn_search" taborder="5" text="조회" class="btn1" position="absolute 1125 9 1181 31" anchor="top right" onclick="div_search_btn_search_onclick"/>
  12. <Shape id="line2" linetype="vertical" position="absolute 1112 9 1118 31" anchor="top right"/>
  13. <Calendar id="cal_fromdd" taborder="0" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd" class="input_essential" position="absolute 64 10 164 30" anchor="default"/>
  14. <Static id="Static00" text="~" position="absolute 169 10 183 30" style="align:center middle;" anchor="default"/>
  15. <Calendar id="cal_todd" taborder="1" autoselect="true" dateformat="yyyy-MM-dd" class="input_essential" position="absolute 188 10 288 30" anchor="default"/>
  16. <Static id="caption3" text="기간 : " onclick="Tab00_tabpage_hie_Div00_caption3_onclick" class="search_name" position="absolute 14 10 69 30" anchor="default"/>
  17. <Static id="caption11" text="진료과 :" class="search_name" position="absolute 302 12 396 29" anchor="default"/>
  18. <Static id="caption6" text="진료의사 :" class="search_name" position="absolute 517 12 611 29" anchor="default"/>
  19. <Static id="caption00" text="연차 : " onclick="Tab00_tabpage_hie_Div00_caption3_onclick" class="search_name" position="absolute 745 10 800 30" anchor="default"/>
  20. <Edit id="ipt_anual" taborder="4" autoselect="true" class="input_search" position="absolute 793 10 823 29" maxlength="2" anchor="default" inputtype="number"/>
  21. <Combo id="cmb_orddrid" taborder="6" innerdataset="@ds_init_doct" codecolumn="doctid" datacolumn="doctnm" class="combo_search" position="absolute 591 11 731 30" style="itemheight:15;" columncount="-1" rowcount="-1"/>
  22. <Combo id="cmb_orddeptcd" taborder="7" position="absolute 363 11 503 30" innerdataset="@ds_init_dept" codecolumn="deptcd" datacolumn="depthngnm" class="combo_search" index="-1" onitemchanged="div_search_cmb_orddeptcd_onitemchanged"/>
  23. </Layout>
  24. </Layouts>
  25. </Div>
  26. <Shape id="line00" class="line_10" position="absolute 0 88 1195 97" anchor="left top right"/>
  27. <Grid id="grd_list" class="datagrid2" taborder="2" binddataset="ds_result" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 94 1195 750" anchor="left top right" oncellclick="grd_list_oncellclick" onselectchanged="grd_list_onselectchanged" onmousemove="grd_list_onmousemove" onmouseleave="grd_list_onmouseleave" tooltiptype="hover,mouseleave">
  28. <Formats>
  29. <Format id="default">
  30. <Columns>
  31. <Column size="0"/>
  32. <Column size="30"/>
  33. <Column size="105"/>
  34. <Column size="60"/>
  35. <Column size="80"/>
  36. <Column size="100"/>
  37. <Column size="20"/>
  38. <Column size="100"/>
  39. <Column size="400"/>
  40. <Column size="80"/>
  41. <Column size="40"/>
  42. <Column size="180"/>
  43. </Columns>
  44. <Rows>
  45. <Row size="20" band="head"/>
  46. <Row size="20" band="head"/>
  47. <Row size="24"/>
  48. </Rows>
  49. <Band id="head">
  50. <Cell text="caption1"/>
  51. <Cell col="1" rowspan="2" style="align:center middle;" text="No." taborder="undefined"/>
  52. <Cell col="2" rowspan="2" text="진료과" taborder="undefined"/>
  53. <Cell col="3" rowspan="2" colspan="2" text="전공의" taborder="undefined"/>
  54. <Cell col="5" rowspan="2" colspan="3" text="신청시간" taborder="undefined"/>
  55. <Cell col="8" colspan="2" text="추가시간 요청" taborder="undefined"/>
  56. <Cell col="10" rowspan="2" text="연차" taborder="undefined"/>
  57. <Cell col="11" rowspan="2" text="비고" taborder="undefined"/>
  58. <Cell row="1"/>
  59. <Cell row="1" col="8" text="사 유"/>
  60. <Cell row="1" col="9" text="시간"/>
  61. </Band>
  62. <Band id="body">
  63. <Cell text="bind:coophospcd"/>
  64. <Cell col="1" expr="currow + 1"/>
  65. <Cell col="2" text="bind:orddeptnm"/>
  66. <Cell col="3" text="bind:orddrid"/>
  67. <Cell col="4" text="bind:orddrnm"/>
  68. <Cell col="5" text="bind:fromdt" mask="####.##.## ##:##"/>
  69. <Cell col="6" text="~"/>
  70. <Cell col="7" text="bind:todt" mask="####.##.## ##:##"/>
  71. <Cell col="8" style="align:left middle;padding:0 0 0 5;" text="bind:appresn"/>
  72. <Cell col="9" text="bind:hours"/>
  73. <Cell col="10" text="bind:anual"/>
  74. <Cell col="11" style="align:left middle;padding:0 0 0 5;" text="bind:remark"/>
  75. </Band>
  76. </Format>
  77. </Formats>
  78. </Grid>
  79. <Static id="caption00" text="부서정보" class="tit_2" position="absolute 0 73 80 95"/>
  80. <Button id="btn_excel" taborder="3" text="엑셀" class="btn7" position="absolute 1140 67 1195 89" anchor="top right" onclick="btn_excel_onclick"/>
  81. </Layout>
  82. </Layouts>
  83. <Objects>
  84. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  85. <ColumnInfo>
  86. <Column id="fromdd" type="STRING" size="256"/>
  87. <Column id="todd" type="STRING" size="256"/>
  88. <Column id="orddeptcd" type="STRING" size="256"/>
  89. <Column id="orddrid" type="STRING" size="256"/>
  90. <Column id="anual" type="STRING" size="256"/>
  91. </ColumnInfo>
  92. <Rows>
  93. <Row/>
  94. </Rows>
  95. </Dataset>
  96. <Dataset id="ds_init_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  97. <Dataset id="ds_init_doct" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  98. <Dataset id="ds_result" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  99. <Dataset id="ds_send_doctor" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  100. </Objects>
  101. <Bind>
  102. <BindItem id="item5" compid="div_search.cal_fromdd" propid="value" datasetid="ds_send_reqdata" columnid="fromdd"/>
  103. <BindItem id="item7" compid="div_search.cal_todd" propid="value" datasetid="ds_send_reqdata" columnid="todd"/>
  104. <BindItem id="item17" compid="div_search.ipt_anual" propid="value" datasetid="ds_send_reqdata" columnid="anual"/>
  105. <BindItem id="item1" compid="div_search.cmb_orddeptcd" propid="value" datasetid="ds_send_reqdata" columnid="orddeptcd"/>
  106. </Bind>
  107. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  108. * System Name :
  109. * Job Name :
  110. * Creator :
  111. * Make Date : 2020.02.03
  112. * Description :
  113. *---------------------------------------------------------------------------------------
  114. * Modify Date Modifier Modify Description
  115. *---------------------------------------------------------------------------------------
  116. *
  117. *---------------------------------------------------------------------------------------
  118. ****************************************************************************************/
  119. include "com_commonxp::comm_main.xjs";
  120. include "emr_dentirecxp::MRE001.xjs";
  121. function SPZSU300000_oninit(obj:Form, e:InitEventInfo)
  122. {
  123. frmf_initForm(obj);
  124. }
  125. function SPZSU300000_onload(obj:Form, e:LoadEventInfo)
  126. {
  127. fInit();
  128. }
  129. function fInit()
  130. {
  131. grdf_initGrid(grd_list);
  132. // 진료과 셋팅
  133. lf_mmbfGetDeptCodeComboList(ds_init_dept, "A");
  134. grdf_sortNodeList(ds_init_dept, "depthngnm", "asc"); // 가나다 순으로 정리되도록 수정.
  135. dsf_addDsItem(ds_init_dept, "deptcd", "depthngnm", "- 전 체 -", "", "above");
  136. div_search.cmb_orddeptcd.index = 0;
  137. // 조회기간 셋팅
  138. var curDate = utlf_getCurrentDate();
  139. ds_send_reqdata.setColumn(0, "fromdd", curDate - 1);
  140. ds_send_reqdata.setColumn(0, "todd", curDate);
  141. }
  142. // 조회
  143. function div_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
  144. {
  145. ds_send_reqdata.setColumn(0, "orddeptcd", div_search.cmb_orddeptcd.value);
  146. ds_send_reqdata.setColumn(0, "orddrid", div_search.cmb_orddrid.value);
  147. if(fChkSearchCond()){
  148. ds_result.clearData();
  149. var oParam = {};
  150. oParam.id = "TRZSU30001";
  151. oParam.service = "userdeptinfoapp.UserDeptInfo";
  152. oParam.method = "reqGetResiOvtLoginInfo";
  153. oParam.inds = "req=ds_send_reqdata";
  154. oParam.outds = "ds_result=result";
  155. oParam.async = false;
  156. oParam.callback = "cf_TRZSU30001";
  157. tranf_submit(oParam);
  158. }
  159. }
  160. function cf_TRZSU30001(sSvcId, nErrorCode, sErrorMsg)
  161. {
  162. if(nErrorCode < 0)
  163. {
  164. // 에러처리
  165. return;
  166. }
  167. else
  168. {
  169. }
  170. }
  171. function fChkSearchCond()
  172. {
  173. var fromdd = ds_send_reqdata.getColumn(0, "fromdd");
  174. var todd = ds_send_reqdata.getColumn(0, "todd");
  175. if(fromdd > todd)
  176. {
  177. sysf_messageBox("조회기간을 ", "I007"); // 확인하십시오.
  178. div_search.cal_fromdd.setFocus();
  179. return false;
  180. }
  181. return true;
  182. }
  183. function div_search_onkeydown(obj:Div, e:KeyEventInfo)
  184. {
  185. if (e.keycode == 13) {
  186. ds_send_reqdata.setColumn(0, "anual", div_search.ipt_anual.value);
  187. div_search_btn_search_onclick();
  188. }
  189. }
  190. // 진료과 선택시 진료의사 목록 셋팅
  191. function div_search_cmb_orddeptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  192. {
  193. var orddd = ds_send_reqdata.getColumn(0, "fromdd");
  194. var orddeptcd = ds_send_reqdata.getColumn(0, "orddeptcd");
  195. fDoctSearch(ds_init_doct, orddd, orddeptcd);
  196. }
  197. // 진료과별 의사목록 조회
  198. function fDoctSearch(dsObj, orddd, orddeptcd)
  199. {
  200. // 진료의사
  201. dsObj.clearData();
  202. //ds_init_doct.addRow();
  203. ds_send_doctor.clearData();
  204. dsf_makeValue( ds_send_doctor, "orddd", "string", orddd );
  205. dsf_makeValue( ds_send_doctor, "orddeptcd", "string", orddeptcd);
  206. var oParam = {};
  207. oParam.id = "TRARC01302";
  208. oParam.service = "healcarecoopapp.ReqAgnMngt";
  209. oParam.method = "reqGetDoctList";
  210. oParam.inds = "req=ds_send_doctor";
  211. oParam.outds = "ds_init_doct=medispcl";
  212. oParam.async = false;
  213. oParam.callback = "cf_TRARC01302";
  214. tranf_submit(oParam);
  215. //div_search.cmb_orddrid.index = 0;
  216. }
  217. function cf_TRARC01302(sSvcId, nErrorCode, sErrorMsg)
  218. {
  219. if(nErrorCode < 0)
  220. {
  221. // 에러처리
  222. return;
  223. }
  224. else
  225. {
  226. trace(ds_init_doct.saveXML());
  227. div_search.cmb_orddrid.index = 0;
  228. trace("index : " + div_search.cmb_orddrid.index + " , value : " + div_search.cmb_orddrid.value);
  229. trace(ds_send_reqdata.saveXML());
  230. }
  231. }
  232. // 엑셀 저장
  233. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  234. {
  235. fExcel();
  236. }
  237. function fExcel()
  238. {
  239. if (ds_result.rowcount == 0)
  240. {
  241. sysf_messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
  242. return;
  243. }
  244. var title = "전공의 근무시간외 사용신청 내역";
  245. var sheetNm = "전공의 근무시간외 사용신청 내역";
  246. grdf_exportExcel(grd_list, title, sheetNm);
  247. }
  248. // 그리드 Tooltip 처리
  249. function grd_list_onmousemove(obj:Grid, e:GridMouseEventInfo)
  250. {
  251. if(e.row >= 0 && (e.col == 8 || e.col == 11)){
  252. // 실제 Cell Size보다 Text가 더 길경우 처리를 위한 로직
  253. if(e.col == 8){
  254. var text = ds_result.getColumn(e.row, "appresn");
  255. }else{
  256. var text = ds_result.getColumn(e.row, "remark");
  257. }
  258. var ctrlObj = grd_list;
  259. var font = ctrlObj.getCellProperty("body", e.col, "font");
  260. if(utlf_isNull(font)) font = "Dotum,9";
  261. var fontStyle = font.toString().split(',');
  262. var bold = false;
  263. if(fontStyle.length > 2 && fontStyle[2] == "bold") bold = true;
  264. var objFont = utlf_getObjFont(fontStyle[1], fontStyle[0], bold); // 실제 폰트의 너비
  265. var objFontSize = utlf_getTextSize(text, objFont);
  266. var paddingSize = 0;
  267. var padding = ctrlObj.getCellProperty("body", e.col, "padding");
  268. if(!utlf_isNull(padding) && padding.length == 4) {
  269. paddingSize = padding[1] + padding[3];
  270. }
  271. var arrCellRect = ctrlObj.getCellRect(0, e.col);
  272. var width = arrCellRect.width - paddingSize - ctrlObj.vscrollbar.position.width + 12; // 실제 글자가 들어갈 수 있는 영역 너비(width - padding 좌우영역 - 세로 스크롤 넓이 + 10은 보정값)
  273. if(e.col != 8 && e.col != 11){
  274. obj.tooltiptext = "";
  275. } else {
  276. if(objFontSize.cx > width) {
  277. obj.tooltiptext = text;
  278. }else{
  279. obj.tooltiptext = "";
  280. }
  281. }
  282. } else {
  283. obj.tooltiptext = "";
  284. }
  285. }
  286. function grd_list_onmouseleave(obj:Grid, e:MouseEventInfo)
  287. {
  288. obj.tooltiptext = "";
  289. }
  290. ]]></Script>
  291. </Form>
  292. </FDL>