SMRPD30200_전공의근태권한관리.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRPD30200" position="absolute 0 0 1201 774" titletext="전공의 근태 권한 관리" oninit="SMRPD30200_oninit" onload="SMRPD30200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="grp_sea" taborder="2" position="absolute 0 48 1195 88" class="div_SA2" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption2" text="기관코드" class="search_name" position="absolute 49 11 125 28"/>
  11. <Combo id="cmb_instcd" taborder="1" class="combo_s_default" enable="false" position="absolute 130 10 272 29" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
  12. <Shape id="line3" linetype="vertical" position="absolute 287 8 293 30"/>
  13. <Button id="btn_search" taborder="2" text="조회" class="btn1" position="absolute 305 8 361 30" onclick="grp_sea_btn_search_onclick"/>
  14. </Layout>
  15. </Layouts>
  16. </Div>
  17. <Shape position="absolute 0 116 1195 122" linetype="horizontal" id="line7" class="line_10" anchor="left top right"/>
  18. <Grid position="absolute 0 121 1195 690" id="datagrid1" binddataset="ds_main_codeinfo_codelist" autoenter="select" cellsizingtype="col" anchor="all" onexpanddown="datagrid1_onexpanddown">
  19. <Formats>
  20. <Format id="default">
  21. <Columns>
  22. <Column size="23"/>
  23. <Column size="82"/>
  24. <Column size="104"/>
  25. <Column size="139"/>
  26. <Column size="108"/>
  27. <Column size="218"/>
  28. <Column size="0"/>
  29. <Column size="0"/>
  30. <Column size="0"/>
  31. </Columns>
  32. <Rows>
  33. <Row size="24" band="head"/>
  34. <Row size="24"/>
  35. </Rows>
  36. <Band id="head">
  37. <Cell/>
  38. <Cell col="1" text="사원번호"/>
  39. <Cell col="2" text="성명"/>
  40. <Cell col="3" text="허용 권한"/>
  41. <Cell col="4" text="권한 부서"/>
  42. <Cell col="5" text="부서명"/>
  43. <Cell col="6" text="instcd"/>
  44. <Cell col="7" text="grupcdid"/>
  45. <Cell col="8" text="orgcdid"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell celltype="head"/>
  49. <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" text="bind:emplno" expandshow="show" enable="false"/>
  50. <Cell col="2" text="bind:emplnm"/>
  51. <Cell col="3" displaytype="combo" edittype="combo" style="align:left middle;" text="bind:cntlcd1" combodataset="ds_cmb_cntlcd1" combocodecol="value" combodatacol="label"/>
  52. <Cell col="4" displaytype="text" edittype="text" text="bind:buseocode" expandshow="show"/>
  53. <Cell col="5" style="align:left middle;" text="bind:deptnm"/>
  54. <Cell col="6" text="bind:instcd"/>
  55. <Cell col="7" text="bind:grupcdid"/>
  56. <Cell col="8" text="bind:orgcdid"/>
  57. </Band>
  58. </Format>
  59. </Formats>
  60. </Grid>
  61. <Static text="개인별 권한 정보" position="absolute 0 100 134 122" id="caption4" class="tit_2"/>
  62. <Button position="absolute 1085 97 1138 116" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="btn_grdadd_onclick"/>
  63. <Button position="absolute 1141 97 1194 116" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="btn_grddel_onclick"/>
  64. <Static text="전공의 근태 권한 관리" position="absolute 0 0 217 25" id="caption1" class="tit_1"/>
  65. <Static text="※ 칠곡 소아청소년 분과 중 하나를 지정 시, 아래 8개 분과 전체에 대한 대한 근태 확인(또는 승인) 권한을 가지게 됩니다." position="absolute 0 710 912 738" id="caption5" anchor="left bottom"/>
  66. <Static text="※ 의국장 및 임상과장 권한을 등록하는 경우에는 권한 부서를 등록해 주십시요." position="absolute 0 695 485 715" id="caption3" anchor="left bottom"/>
  67. <Static text="- 소아알레르기호흡기, 소아청소년내분비, 소아청소년소화기영양, 소아청소년신경, 소아청소년신장, 소아청소년심장, 소아청소년혈액종양, 신생아" position="absolute 14 728 821 756" id="caption6" anchor="left bottom"/>
  68. <Shape id="line2" class="line_6" position="absolute 0 44 1195 50" anchor="left top right"/>
  69. <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1139 23 1195 45" anchor="top right" onclick="btn_save_onclick"/>
  70. </Layout>
  71. </Layouts>
  72. <Objects>
  73. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  74. <ColumnInfo>
  75. <Column id="instcd" type="STRING" size="256"/>
  76. <Column id="grupcdid" type="STRING" size="256"/>
  77. </ColumnInfo>
  78. <Rows>
  79. <Row>
  80. <Col id="instcd"/>
  81. <Col id="grupcdid">R0005</Col>
  82. </Row>
  83. </Rows>
  84. </Dataset>
  85. <Dataset id="ds_main_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_codeinfo_codelist_oncolumnchanged">
  86. <ColumnInfo>
  87. <Column id="emplno" type="STRING" size="256" sumtext="사원번호"/>
  88. <Column id="emplnm" type="STRING" size="256" sumtext="성명"/>
  89. <Column id="cntlcd1" type="STRING" size="256" sumtext="허용권한"/>
  90. <Column id="buseocode" type="STRING" size="256" sumtext="부서코드"/>
  91. <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
  92. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  93. <Column id="grupcdid" type="STRING" size="256" sumtext="그룹코드"/>
  94. <Column id="orgcdid" type="STRING" size="256" sumtext="원코드"/>
  95. </ColumnInfo>
  96. </Dataset>
  97. <Dataset id="ds_cmb_cntlcd1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  98. <ColumnInfo>
  99. <Column id="label" type="STRING" size="256"/>
  100. <Column id="value" type="STRING" size="256"/>
  101. </ColumnInfo>
  102. <Rows>
  103. <Row>
  104. <Col id="label">의국장</Col>
  105. <Col id="value">1</Col>
  106. </Row>
  107. <Row>
  108. <Col id="label">임상과장</Col>
  109. <Col id="value">2</Col>
  110. </Row>
  111. <Row>
  112. <Col id="label">교육수련담당자</Col>
  113. <Col id="value">3</Col>
  114. </Row>
  115. <Row>
  116. <Col id="label">교육수련실장</Col>
  117. <Col id="value">4</Col>
  118. </Row>
  119. </Rows>
  120. </Dataset>
  121. </Objects>
  122. <Bind>
  123. <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="ds_send_reqdata" columnid="instcd"/>
  124. </Bind>
  125. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  126. * System Name :
  127. * Job Name :
  128. * Creator :
  129. * Make Date : 2017-06-19
  130. * Description :
  131. *---------------------------------------------------------------------------------------
  132. * Modify Date Modifier Modify Description
  133. *---------------------------------------------------------------------------------------
  134. * 2017-06-19 Live Converter TF->XP
  135. *
  136. *---------------------------------------------------------------------------------------
  137. ****************************************************************************************/
  138. include "com_commonxp::comm_main.xjs";
  139. include "mis_miscommonxp::MIS.xjs";
  140. include "mis_humtrafactmngtxp::RPB001.xjs";
  141. function SMRPD30200_oninit(obj:Form, e:InitEventInfo)
  142. {
  143. frmf_initForm(obj);
  144. }
  145. function SMRPD30200_onload(obj:Form, e:LoadEventInfo)
  146. {
  147. grdf_initGrid(datagrid1);
  148. grdf_setRowTypeIcon(datagrid1, 0);
  149. misfComboInstCdListMulti("grp_sea.cmb_instcd",utlf_getCurrentDate(),"","N");
  150. grp_sea.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
  151. grp_sea.btn_search.click();
  152. }
  153. function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  154. {
  155. misfGridInit(datagrid1);
  156. }
  157. function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
  158. {
  159. readfunc();
  160. }
  161. function readfunc()
  162. {
  163. misfGridInit(datagrid1);
  164. var oParam = {};
  165. oParam.id = "TRRPD30201";
  166. oParam.service = "dligclaznsmngtapp.DutScheMngt";
  167. oParam.method = "reqGetDutyPowerList";
  168. oParam.inds = "req=ds_send_reqdata";
  169. oParam.outds = "ds_main_codeinfo_codelist=codelist";
  170. oParam.async = false;
  171. //oParam.callback = "cf_TRRPD30201";
  172. tranf_submit(oParam);
  173. }
  174. function ds_main_codeinfo_codelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  175. {
  176. if(e.columnid == "cntlcd1")
  177. {
  178. var cd = e.newvalue;
  179. if(cd != "1" && cd != "2" )
  180. {
  181. obj.setColumn(e.row, "buseocode", "");
  182. obj.setColumn(e.row, "deptnm", "");
  183. }
  184. }
  185. }
  186. function datagrid1_onexpanddown(obj:Grid, e:GridMouseEventInfo)
  187. {
  188. if (e.cell == obj.getBindCellIndex("Body", "emplno"))
  189. {
  190. var recv_list = "emplno,emplnm";
  191. rpbfOpenPopUpList("SPRPB00101", datagrid1, recv_list,"","N");
  192. }
  193. else if(e.cell == obj.getBindCellIndex("Body", "buseocode"))
  194. {
  195. misfOpenPopUpList("02", datagrid1, "", "buseocode,deptnm");
  196. }
  197. }
  198. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  199. {
  200. var irow = ds_main_codeinfo_codelist.addRow();
  201. ds_main_codeinfo_codelist.setColumn(irow, "instcd", grp_sea.cmb_instcd.value);
  202. ds_main_codeinfo_codelist.setColumn(irow, "grupcdid", ds_send_reqdata.getColumn(0, "grupcdid"));
  203. }
  204. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  205. {
  206. var status = ds_main_codeinfo_codelist.getRowType(ds_main_codeinfo_codelist.rowposition);
  207. if(status == 1)
  208. {
  209. ds_main_codeinfo_codelist.updatecontrol = false;
  210. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, "d");
  211. ds_main_codeinfo_codelist.updatecontrol = true;
  212. }
  213. else if(status == 2)
  214. {
  215. ds_main_codeinfo_codelist.deleteRow(ds_main_codeinfo_codelist.rowposition);
  216. }
  217. else if(status == 4)
  218. {
  219. ds_main_codeinfo_codelist.updatecontrol = false;
  220. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, "d");
  221. ds_main_codeinfo_codelist.updatecontrol = true;
  222. }
  223. else if(status == 8)
  224. {
  225. ds_main_codeinfo_codelist.updatecontrol = false;
  226. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, "");
  227. ds_main_codeinfo_codelist.updatecontrol = true;
  228. }
  229. }
  230. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  231. {
  232. if (datacheck() == false)
  233. {
  234. return;
  235. }
  236. ExecData();
  237. }
  238. function datacheck()
  239. {
  240. var scdid1 = "";
  241. var scdid2 = "";
  242. for (var i = 0; i < ds_main_codeinfo_codelist.rowcount; i ++)
  243. {
  244. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "emplno")))
  245. {
  246. sysf_messageBox("사원번호는 필수 입력 항목입니다.", "E999", "");
  247. return false;
  248. }
  249. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "cntlcd1")))
  250. {
  251. sysf_messageBox("허용권한은 필수 입력 항목입니다.", "E999", "");
  252. return false;
  253. }
  254. if (ds_main_codeinfo_codelist.getColumn(i, "cntlcd1") == "1" || ds_main_codeinfo_codelist.getColumn(i, "cntlcd1") == "2")
  255. {
  256. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "buseocode")))
  257. {
  258. sysf_messageBox("의국장, 임상과장 권한은 부서가 필수 입력 항목입니다.", "E999", "");
  259. return false;
  260. }
  261. }
  262. scdid1 = ds_main_codeinfo_codelist.getColumn(i, "emplno");
  263. for (var j = 0; j < ds_main_codeinfo_codelist.rowcount; j++)
  264. {
  265. scdid2 = ds_main_codeinfo_codelist.getColumn(j, "emplno");
  266. if (i != j)
  267. {
  268. if (scdid1 == scdid2)
  269. {
  270. sysf_messageBox(parseInt(j+1) + "번째 행에서 중복된 사원번호가 존재합니다", "E999", "");
  271. return false;
  272. }
  273. }
  274. }
  275. }
  276. return true;
  277. }
  278. function ExecData()
  279. {
  280. var oParam = {};
  281. oParam.id = "TXRPD30201";
  282. oParam.service = "dligclaznsmngtapp.DutScheMngt";
  283. oParam.method = "reqExeSaveDutyPowerList";
  284. oParam.inds = "codelist=ds_main_codeinfo_codelist:u";
  285. oParam.outds = "ds_=item";
  286. oParam.async = false;
  287. oParam.callback = "cf_TXRPD30201";
  288. tranf_submit(oParam);
  289. }
  290. function cf_TXRPD30201(sSvcId, nErrorCode, sErrorMsg)
  291. {
  292. if(nErrorCode < 0) return;
  293. else readfunc();
  294. }]]></Script>
  295. </Form>
  296. </FDL>