SPCHI01300_내원부서설정.xfdl 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPCHI01300" position="absolute 0 0 461 393" titletext="건진 후 내원부서설정" oninit="SPCHI01300_oninit" onload="SPCHI01300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group1" taborder="8" position="absolute 0 0 460 40" class="div_SA2">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption1" text="부서검색 :" class="search_name" position="absolute 16 11 109 28"/>
  11. <Combo id="cmb_orddept" taborder="1" innerdataset="ds_init_basecdlist_orddeptlist_dept" codecolumn="deptcd" datacolumn="depthngnm" class="combo_search" position="absolute 108 10 238 29" onitemchanged="group1_cmb_orddept_onitemchanged"/>
  12. <Shape id="line1" linetype="vertical" class="line_4" position="absolute 360 9 366 31"/>
  13. <Button id="btn_search" taborder="2" text="조회" class="btn1" position="absolute 378 9 434 31"/>
  14. </Layout>
  15. </Layouts>
  16. </Div>
  17. <Static id="caption2" text="건진 후 내원 확인할 진료과(부서) 목록 설정" class="tit_2" position="absolute 0 49 330 70"/>
  18. <Button id="btn_adddept" taborder="3" text="행추가" class="btn2" position="absolute 353 46 406 65" onclick="btn_adddept_onclick"/>
  19. <Button id="btn_deldept" taborder="4" text="행삭제" class="btn2" position="absolute 407 46 460 65" onclick="btn_deldept_onclick"/>
  20. <Shape id="line2" linetype="horizontal" class="line_10" position="absolute 0 65 460 71"/>
  21. <Grid id="grd_deptlist" taborder="5" binddataset="ds_main_deptlist" useinputpanel="false" position="absolute 0 70 460 365" autoenter="select" cellsizingtype="col">
  22. <Formats>
  23. <Format id="default">
  24. <Columns>
  25. <Column size="23"/>
  26. <Column size="150"/>
  27. <Column size="150"/>
  28. <Column size="110"/>
  29. </Columns>
  30. <Rows>
  31. <Row size="24" band="head"/>
  32. <Row size="24"/>
  33. </Rows>
  34. <Band id="head">
  35. <Cell/>
  36. <Cell col="1" text="진료과"/>
  37. <Cell col="2" text="시작일시"/>
  38. <Cell col="3" text="등록자ID"/>
  39. </Band>
  40. <Band id="body">
  41. <Cell celltype="head"/>
  42. <Cell col="1" displaytype="combo" edittype="expr:getRowType(currow) == 2 ? 'combo' : 'none' " style="padding:0 0 0 3;" text="bind:orddeptcd" combodataset="ds_init_basecdlist_orddeptlist_dept" combocodecol="deptcd" combodatacol="depthngnm" combodisplayrowcount="100" enable="false"/>
  43. <Cell col="2" displaytype="date" class="text_center" text="bind:usdt" mask="yyyy-MM-dd hh:mm:ss" maskchar=" " calendardisplaynulltype="nulltext"/>
  44. <Cell col="3" class="text_center" text="bind:fstrgstrid"/>
  45. </Band>
  46. </Format>
  47. </Formats>
  48. </Grid>
  49. <Button id="btn_save" taborder="6" text="저장" class="btn4" position="absolute 344 368 400 390" onclick="btn_save_onclick"/>
  50. <Button id="btn_cancel" taborder="7" text="취소" class="btn4" position="absolute 403 368 459 390" onclick="btn_cancel_onclick"/>
  51. </Layout>
  52. </Layouts>
  53. <Objects>
  54. <Dataset id="ds_init_basecdlist_orddeptlist_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  55. <Dataset id="ds_main_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  56. <ColumnInfo>
  57. <Column id="orddeptcd" type="STRING" size="256" sumtext="진료과코드"/>
  58. <Column id="usdt" type="STRING" size="256" sumtext="시작일시"/>
  59. <Column id="fstrgstrid" type="STRING" size="256" sumtext="등록자ID"/>
  60. </ColumnInfo>
  61. </Dataset>
  62. <Dataset id="ds_send_srch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  63. <ColumnInfo>
  64. <Column id="orddept" type="STRING" size="256"/>
  65. </ColumnInfo>
  66. <Rows>
  67. <Row/>
  68. </Rows>
  69. </Dataset>
  70. </Objects>
  71. <Bind>
  72. <BindItem id="item0" compid="group1.cmb_orddept" propid="value" datasetid="ds_send_srch" columnid="orddept"/>
  73. </Bind>
  74. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  75. * System Name :
  76. * Job Name :
  77. * Creator :
  78. * Make Date : 2016-05-24
  79. * Description :
  80. *---------------------------------------------------------------------------------------
  81. * Modify Date Modifier Modify Description
  82. *---------------------------------------------------------------------------------------
  83. * 2016-05-24 Live Converter TF->XP
  84. *
  85. *---------------------------------------------------------------------------------------
  86. ****************************************************************************************/
  87. include "com_commonxp::comm_main.xjs";
  88. function SPCHI01300_oninit(obj:Form, e:InitEventInfo)
  89. {
  90. frmf_initForm(obj);
  91. }
  92. function SPCHI01300_onload(obj:Form, e:LoadEventInfo)
  93. {
  94. grdf_initGrid(grd_deptlist);
  95. grdf_setRowTypeIcon(grd_deptlist, 0);
  96. var instcd = sysf_getUserInfo("dutplceinstcd");
  97. var standard_yn = "orduseyn";
  98. var ord_deptflag = "D"; // 외래진료과
  99. var rslt_ref = "ds_init_basecdlist_orddeptlist_dept";
  100. appf_getDeptCodeList(instcd, standard_yn, ord_deptflag, "", "", "", "", "", rslt_ref, false, "")
  101. fCheckAuth();
  102. ds_main_deptlist.clearData();
  103. var oParam = {};
  104. oParam.id = "TRCHI01301";
  105. oParam.service = "healexammngtapp.HealExamTrgt";
  106. oParam.method = "reqGetFuDeptList";
  107. oParam.inds = "req=ds_send_srch";
  108. oParam.outds = "ds_main_deptlist=deptlist";
  109. oParam.async = false;
  110. //oParam.callback = "cf_TRCHI01301";
  111. tranf_submit(oParam);
  112. }
  113. function fCheckAuth()
  114. {
  115. // 권한체크
  116. if (!frmf_checkAuth("r"))
  117. {
  118. group1.btn_search.enable = false;
  119. }
  120. if (!frmf_checkAuth("x"))
  121. {
  122. btn_save.enable = false;
  123. btn_adddept.enable = false;
  124. btn_deldept.enable = false;
  125. }
  126. }
  127. function group1_cmb_orddept_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  128. {
  129. var oParam = {};
  130. oParam.id = "TRCHI01301";
  131. oParam.service = "healexammngtapp.HealExamTrgt";
  132. oParam.method = "reqGetFuDeptList";
  133. oParam.inds = "req=ds_send_srch";
  134. oParam.outds = "ds_main_deptlist=deptlist";
  135. oParam.async = false;
  136. //oParam.callback = "cf_TRCHI01301";
  137. tranf_submit(oParam);
  138. }
  139. function btn_adddept_onclick(obj:Button, e:ClickEventInfo)
  140. {
  141. grd_deptlist.setFocus();
  142. var addRow = ds_main_deptlist.addRow();
  143. ds_main_deptlist.setColumn(addRow, "usdt", utlf_getCurrentDate()+utlf_getCurrentTime());
  144. ds_main_deptlist.setColumn(addRow, "fstrgstrid", sysf_getUserId());
  145. grd_deptlist.setCellPos(1);
  146. grd_deptlist.showEditor(true);
  147. }
  148. function btn_deldept_onclick(obj:Button, e:ClickEventInfo)
  149. {
  150. dsf_deleteSelectedRows(grd_deptlist);
  151. }
  152. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  153. {
  154. fSaveDeptList();
  155. }
  156. function fCheckDeptList()
  157. {
  158. for (var i = 0; i < ds_main_deptlist.rowcount; i++)
  159. {
  160. if (ds_main_deptlist.getRowType(i) == 2)
  161. {
  162. if (utlf_isNull(ds_main_deptlist.getColumn(i, "orddeptcd")))
  163. {
  164. sysf_messageBox("진료과를","C002");
  165. ds_main_deptlist.rowposition = i;
  166. grd_deptlist.setCellPos(1)
  167. grd_deptlist.showEditor(true);
  168. return false;
  169. }
  170. }
  171. }
  172. return true;
  173. }
  174. function fSaveDeptList()
  175. {
  176. if(!fCheckDeptList()) return;
  177. var grid = grd_deptlist;
  178. var updt_list = grdf_getGridUpdateData(grid);
  179. if (updt_list.rowcount != 0)
  180. {
  181. var oParam = {};
  182. oParam.id = "TXCHI01301";
  183. oParam.service = "healexammngtapp.HealExamTrgt";
  184. oParam.method = "reqExeFuDeptList";
  185. oParam.inds = "deptlist=ds_main_deptlist:u";
  186. oParam.outds = "";
  187. oParam.async = false;
  188. oParam.callback = "cf_TXCHI01301";
  189. tranf_submit(oParam);
  190. }
  191. }
  192. function cf_TXCHI01301(sSvcId, nErrorCode, sErrorMsg)
  193. {
  194. if(nErrorCode < 0) return;
  195. else
  196. {
  197. ds_main_deptlist.applyChange();
  198. ds_send_srch.setColumn(0, "orddept", "");
  199. var oParam = {};
  200. oParam.id = "TRCHI01301";
  201. oParam.service = "healexammngtapp.HealExamTrgt";
  202. oParam.method = "reqGetFuDeptList";
  203. oParam.inds = "req=ds_send_srch";
  204. oParam.outds = "ds_main_deptlist=deptlist";
  205. oParam.async = false;
  206. //oParam.callback = "cf_TRCHI01301";
  207. tranf_submit(oParam);
  208. }
  209. }
  210. function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  211. {
  212. this.close();
  213. }
  214. ]]></Script>
  215. </Form>
  216. </FDL>