SMRPD31400_전문의평가기간설정.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMRPD31400" position="absolute 0 0 1200 770" titletext="전문의 평가 - 등록기간 설정" oninit="SMRPD31400_oninit" onload="SMRPD31400_onload">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="roundrect1" type="roundrectangle" position="absolute 0 48 1195 85"/>
  8. <Shape position="absolute 0 116 1195 122" linetype="horizontal" id="line7" class="line_10"/>
  9. <Grid position="absolute 0 121 1195 735" id="datagrid1" binddataset="ds_main_codeinfo_codelist" autoenter="key">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="20" band="left"/>
  14. <Column size="79"/>
  15. <Column size="100"/>
  16. <Column size="100"/>
  17. <Column size="606"/>
  18. <Column size="0"/>
  19. <Column size="0"/>
  20. </Columns>
  21. <Rows>
  22. <Row size="24" band="head"/>
  23. <Row size="24" band="head"/>
  24. <Row size="24"/>
  25. </Rows>
  26. <Band id="head">
  27. <Cell rowspan="2" taborder="undefined"/>
  28. <Cell col="1" rowspan="2" text="연도" taborder="undefined"/>
  29. <Cell col="2" colspan="2" text="평가 등록기간" taborder="undefined"/>
  30. <Cell col="4" rowspan="2" text="비고" taborder="undefined"/>
  31. <Cell col="5" text="instcd"/>
  32. <Cell col="6" text="orgcdid"/>
  33. <Cell row="1" col="2" text="시작일자"/>
  34. <Cell row="1" col="3" text="종료일자"/>
  35. <Cell row="1" col="5" text="instcd"/>
  36. <Cell row="1" col="6" text="orgcdid"/>
  37. </Band>
  38. <Band id="body">
  39. <Cell celltype="head"/>
  40. <Cell col="1" displaytype="number" edittype="masknumber" style="align:center;" text="bind:cdid" mask="####"/>
  41. <Cell col="2" displaytype="date" edittype="date" text="bind:cntlcd1" editautoselect="true" calendardisplaynulltype="none"/>
  42. <Cell col="3" displaytype="date" edittype="date" text="bind:cntlcd2" editautoselect="true" calendardisplaynulltype="none"/>
  43. <Cell col="4" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:detldesc" wordwrap="word" editautoselect="true"/>
  44. <Cell col="5" text="bind:instcd"/>
  45. <Cell col="6" text="bind:orgcdid"/>
  46. </Band>
  47. </Format>
  48. </Formats>
  49. </Grid>
  50. <Static text="연도별 등록기간" position="absolute 0 100 144 116" id="caption4" class="tit_2"/>
  51. <Button position="absolute 1085 95 1138 114" id="btn_grdadd" class="btn2" text="행추가" onclick="btn_grdadd_onclick"/>
  52. <Button position="absolute 1141 95 1194 114" id="btn_grddel" class="btn2" text="행삭제" onclick="btn_grddel_onclick"/>
  53. <Static text="전문의 평가 - 등록기간 설정" position="absolute 0 0 205 24" id="caption1" class="tit_1"/>
  54. <Div position="absolute 0 13 1195 44" id="group4" scrollbars="autoboth">
  55. <Layouts>
  56. <Layout>
  57. <Shape position="absolute 0 25 1195 31" linetype="horizontal" id="line2" class="line_6" anchor="default"/>
  58. <Button position="absolute 1139 4 1195 26" id="btn_save" class="btn4" text="저장" anchor="default" onclick="group4_btn_save_onclick"/>
  59. </Layout>
  60. </Layouts>
  61. </Div>
  62. <Button position="absolute 310 55 366 77" id="btn_search" class="btn1" text="조회" onclick="btn_search_onclick"/>
  63. <Shape position="absolute 292 55 298 77" linetype="vertical" id="line3"/>
  64. <Combo position="absolute 120 57 262 76" id="cmb_instcd" class="combo_s_default" enable="false" onitemchanged="cmb_instcd_onitemchanged"/>
  65. <Static text="기관코드" position="absolute 49 58 125 75" id="caption2" class="search_name"/>
  66. <Static text="※ 평가 등록기간 동안만 시스템이 오픈됩니다. 이 기간에 한해 평가자의 평가 등록이 가능합니다." position="absolute 0 740 526 760" id="caption3" style="color:#ff0000ff;"/>
  67. </Layout>
  68. </Layouts>
  69. <Objects>
  70. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  71. <ColumnInfo>
  72. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  73. </ColumnInfo>
  74. <Rows>
  75. <Row/>
  76. </Rows>
  77. </Dataset>
  78. <Dataset id="ds_init_prvg" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  79. <ColumnInfo>
  80. <Column id="cnt" type="STRING" size="256" sumtext="권한유무(있으면 1, 없으면 0)"/>
  81. </ColumnInfo>
  82. </Dataset>
  83. <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">
  84. <ColumnInfo>
  85. <Column id="cdid" type="STRING" size="256" sumtext="코드"/>
  86. <Column id="cntlcd1" type="STRING" size="256" sumtext="시작일자"/>
  87. <Column id="cntlcd2" type="STRING" size="256" sumtext="종료일자"/>
  88. <Column id="detldesc" type="STRING" size="256" sumtext="상세설명"/>
  89. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  90. <Column id="orgcdid" type="STRING" size="256" sumtext="원코드"/>
  91. <Column id="colIUD" type="STRING" size="256"/>
  92. </ColumnInfo>
  93. </Dataset>
  94. <Dataset id="ds_senddata_execdata_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  95. <ColumnInfo>
  96. <Column id="status" type="STRING" size="256" sumtext="처리구분"/>
  97. <Column id="cdid" type="STRING" size="256" sumtext="코드"/>
  98. <Column id="cntlcd1" type="STRING" size="256" sumtext="시작일자"/>
  99. <Column id="cntlcd2" type="STRING" size="256" sumtext="종료일자"/>
  100. <Column id="detldesc" type="STRING" size="256" sumtext="상세설명"/>
  101. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  102. <Column id="orgcdid" type="STRING" size="256" sumtext="원코드"/>
  103. </ColumnInfo>
  104. </Dataset>
  105. <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  106. <ColumnInfo>
  107. <Column id="count" type="STRING" size="256" sumtext="실행건수"/>
  108. </ColumnInfo>
  109. </Dataset>
  110. </Objects>
  111. <Bind>
  112. <BindItem id="item0" compid="cmb_instcd" propid="value" datasetid="ds_send_reqdata" columnid="instcd"/>
  113. </Bind>
  114. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  115. * System Name : 경대 의료정보시스템
  116. * Job Name : mis_dligclaznsmngtxp -> SMRPD31400
  117. * Creator : yjh
  118. * Make Date : 2018-01-05
  119. * Description :
  120. *---------------------------------------------------------------------------------------
  121. * Modify Date Modifier Modify Description
  122. *---------------------------------------------------------------------------------------
  123. * 2018-01-05 yjh TF->XP
  124. *
  125. *---------------------------------------------------------------------------------------
  126. ****************************************************************************************/
  127. //=======================================================================================
  128. // Lib Include
  129. //---------------------------------------------------------------------------------------
  130. include "com_commonxp::comm_main.xjs";
  131. include "mis_miscommonxp::MIS.xjs";
  132. //=======================================================================================
  133. // Global Form Variable
  134. //---------------------------------------------------------------------------------------
  135. var arErrorCode = new HashArray();
  136. //=======================================================================================
  137. // Function
  138. //---------------------------------------------------------------------------------------
  139. function readfunc(){ // 해당 조건에 대한 사용자 권한내역을 조회한다.
  140. //if (model.getValue("/root/send/reqdata/grupcdid") == ""){
  141. // messageBox("구분코드를 선택한 후 조회하시기 바랍니다.", "E999", "");
  142. // return;
  143. //}
  144. misfGridInit(datagrid1);
  145. var oParam = {};
  146. oParam.id = "TRRPD31401";
  147. oParam.service = "dligclaznsmngtapp.DutScheMngt";
  148. oParam.method = "reqGetSpcEvalPeriodList";
  149. oParam.inds = "req=ds_send_reqdata";
  150. oParam.outds = "ds_main_codeinfo_codelist=codelist";
  151. oParam.async = false;
  152. //oParam.callback = "cf_TRRPD31401";
  153. tranf_submit(oParam);
  154. ds_main_codeinfo_codelist.addColumn("colIUD", "string");
  155. }
  156. function datacheck(){
  157. var scdid1 = "";
  158. var scdid2 = "";
  159. for (var i = 0; i < ds_main_codeinfo_codelist.rowcount; i++){
  160. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "cdid"))){
  161. sysf_messageBox("연도는 필수 입력 항목입니다.", "E999", "");
  162. return false;
  163. }
  164. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "cntlcd1"))){
  165. sysf_messageBox("시작일자는 필수 입력 항목입니다.", "E999", "");
  166. return false;
  167. }
  168. if (utlf_transNullToEmpty(ds_main_codeinfo_codelist.getColumn(i, "cntlcd1")).length != 8){
  169. sysf_messageBox("시작일자가 정확하지 않습니다.", "E999", "");
  170. return false;
  171. }
  172. if (utlf_isNull(ds_main_codeinfo_codelist.getColumn(i, "cntlcd2"))){
  173. sysf_messageBox("종료일자는 필수 입력 항목입니다.", "E999", "");
  174. return false;
  175. }
  176. if (utlf_transNullToEmpty(ds_main_codeinfo_codelist.getColumn(i, "cntlcd2")).length != 8){
  177. sysf_messageBox("종료일자가 정확하지 않습니다.", "E999", "");
  178. return false;
  179. }
  180. scdid1 = ds_main_codeinfo_codelist.getColumn(i, "cdid");
  181. var k = i + 1;
  182. for (var j = k; j < ds_main_codeinfo_codelist.rowcount; j++){
  183. scdid2 = ds_main_codeinfo_codelist.getColumn(j, "cdid");
  184. if (i != j){
  185. if (scdid1 == scdid2){
  186. sysf_messageBox( "연도에 중복된 값이 존재합니다", "E999", "");
  187. return false;
  188. }
  189. }
  190. }
  191. }
  192. return true;
  193. }
  194. function ExecData(){
  195. ds_main_codeinfo_codelist.enableevent = false;
  196. ds_main_codeinfo_codelist.updatecontrol = false;
  197. grdf_setStatusColumn(ds_main_codeinfo_codelist, "status");
  198. ds_main_codeinfo_codelist.updatecontrol = true;
  199. ds_main_codeinfo_codelist.enableevent = true;
  200. var update = grdf_getGridUpdateData(datagrid1);
  201. ds_senddata_execdata_codelist.assign(update);
  202. var oParam = {};
  203. oParam.id = "TXRPD31401";
  204. oParam.service = "dligclaznsmngtapp.DutScheMngt";
  205. oParam.method = "reqExeSaveSpcEvalPeriodList";
  206. oParam.inds = "codelist=ds_senddata_execdata_codelist:A";
  207. oParam.outds = "ds_hidden_item=item";
  208. oParam.async = false;
  209. oParam.callback = "cf_TXRPD31401";
  210. tranf_submit(oParam);
  211. if (arErrorCode.pop("TXRPD31401") > -1){ //TXRPD30101
  212. readfunc();
  213. }
  214. }
  215. function cf_TXRPD31401(sSvcId, nErrorCode, sErrorMsg) {
  216. arErrorCode.push(sSvcId, nErrorCode);
  217. }
  218. function isDate(str) { // 날짜 형식에 대한 적합여부 체크
  219. if (str == "") return true; // 빈건 체크안함
  220. if (trim(str) == "") return true; // 빈건 체크안함
  221. if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
  222. if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
  223. var yy = new Number(str.substring(0, 4));
  224. var mm = new Number(str.substring(4, 6)) - 1;
  225. var dd = new Number(str.substring(6, 8));
  226. var date = new Date(yy, mm, dd);
  227. //alert(date.getFullYear() +"-" + (date.getMonth()+1) + "-" + date.getDate());
  228. if (yy != date.getFullYear() ||
  229. mm != date.getMonth() ||
  230. dd != date.getDate()) {
  231. return false; // 존재하지 않는 날짜
  232. }
  233. return true; // 존재하는 날짜
  234. }
  235. function trim(data){ // 문자에 대한 TRIM 작업
  236. return data.replace(/(^\s*)|(\s*$)/g, "");
  237. }
  238. //=======================================================================================
  239. // Event
  240. //---------------------------------------------------------------------------------------
  241. /****************************************************************************************
  242. * Components : Form
  243. * Components ID : SMRPD31400
  244. * Event : oninit
  245. * Argument : 01.obj : Object Event has occurred
  246. * : 02.e : Event Object
  247. * Description : 화면 처음 초기화시
  248. ****************************************************************************************/
  249. function SMRPD31400_oninit(obj:Form, e:InitEventInfo)
  250. {
  251. frmf_initForm(obj); //폼 초기화
  252. }
  253. /****************************************************************************************
  254. * Components : Form
  255. * Components ID : SMRPD31400
  256. * Event : onload
  257. * Argument : 01.obj : Object Event has occurred
  258. * : 02.e : Event Object
  259. * Description : 화면 로딩 완료시
  260. ****************************************************************************************/
  261. function SMRPD31400_onload(obj:Form, e:LoadEventInfo)
  262. {
  263. grdf_setRowTypeIcon(datagrid1, 0);
  264. grdf_setGridSort(datagrid1);
  265. //전문의평가 관리권한 확인용 : 관리권한이 있는 자만 사용 가능
  266. var oParam = {};
  267. oParam.id = "TRRPD31102";
  268. oParam.service = "dligclaznsmngtapp.DutScheMngt";
  269. oParam.method = "reqGetSpcEvalMngtPrvg";
  270. oParam.inds = "req=ds_send_reqdata";
  271. oParam.outds = "ds_init_prvg=codelist";
  272. oParam.async = false;
  273. oParam.callback = "cf_TRRPD31102";
  274. tranf_submit(oParam);
  275. if (arErrorCode.pop("TRRPD31102") > -1) {
  276. //alert(model.getValue("/root/init/prvg/cnt"));
  277. if(ds_init_prvg.getColumn(0, "cnt") != "1") {
  278. sysf_messageBox("프로그램 사용권한이 없습니다. 관리자에게 문의바랍니다.", "E999", "");
  279. return;
  280. }
  281. }
  282. misfComboInstCdListMulti("cmb_instcd", utlf_getCurrentDate(),"","N");
  283. //model.setValue(cmb_instcd.attribute("ref"), getUserInfo("dutplceinstcd"));
  284. //model.refresh();
  285. cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
  286. btn_search.click();
  287. }
  288. function cf_TRRPD31102(sSvcId, nErrorCode, sErrorMsg) {
  289. arErrorCode.push(sSvcId, nErrorCode);
  290. }
  291. /****************************************************************************************
  292. * Components : Button
  293. * Components ID : btn_grdadd
  294. * Event : onclick
  295. * Argument : 01.obj : Object Event has occurred
  296. * : 02.e : Event Object
  297. * Description : 행추가버튼 클릭시
  298. ****************************************************************************************/
  299. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  300. {
  301. ds_main_codeinfo_codelist.addRow();
  302. var irow = ds_main_codeinfo_codelist.rowposition;
  303. ds_main_codeinfo_codelist.setColumn(irow, "instcd", cmb_instcd.value);
  304. ds_main_codeinfo_codelist.rowposition = irow;
  305. datagrid1.setCellPos(datagrid1.getBindCellIndex("body", "cdid"));
  306. datagrid1.setFocus();
  307. datagrid1.showEditor(true);
  308. }
  309. /****************************************************************************************
  310. * Components : Button
  311. * Components ID : btn_grddel
  312. * Event : onclick
  313. * Argument : 01.obj : Object Event has occurred
  314. * : 02.e : Event Object
  315. * Description : 행삭제버튼 클릭시
  316. ****************************************************************************************/
  317. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  318. {
  319. var status = ds_main_codeinfo_codelist.getRowType(ds_main_codeinfo_codelist.rowposition);
  320. ds_main_codeinfo_codelist.enableevent = false;
  321. ds_main_codeinfo_codelist.updatecontrol = false;
  322. if(status == 1) {
  323. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, 8);
  324. }else if(status == 2) {
  325. ds_main_codeinfo_codelist.deleteRow(ds_main_codeinfo_codelist.rowposition);
  326. }else if(status == 4) {
  327. ds_main_codeinfo_codelist.setColumn(ds_main_codeinfo_codelist.rowposition, "colIUD", "u");
  328. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, 8);
  329. }else if(status == 8) {
  330. if(ds_main_codeinfo_codelist.getColumn(ds_main_codeinfo_codelist.rowposition, "colIUD") == "u") {
  331. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, 4);
  332. }else {
  333. ds_main_codeinfo_codelist.setRowType(ds_main_codeinfo_codelist.rowposition, 1);
  334. }
  335. }
  336. ds_main_codeinfo_codelist.updatecontrol = true;
  337. ds_main_codeinfo_codelist.enableevent = true;
  338. }
  339. /****************************************************************************************
  340. * Components : Button
  341. * Components ID : btn_save
  342. * Event : onclick
  343. * Argument : 01.obj : Object Event has occurred
  344. * : 02.e : Event Object
  345. * Description : 저장버튼 클릭시
  346. ****************************************************************************************/
  347. function group4_btn_save_onclick(obj:Button, e:ClickEventInfo)
  348. {
  349. if (datacheck() == false){
  350. return;
  351. }
  352. ExecData();
  353. }
  354. /****************************************************************************************
  355. * Components : Button
  356. * Components ID : btn_search
  357. * Event : onclick
  358. * Argument : 01.obj : Object Event has occurred
  359. * : 02.e : Event Object
  360. * Description : 조회버튼 클릭시
  361. ****************************************************************************************/
  362. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  363. {
  364. readfunc();
  365. }
  366. /****************************************************************************************
  367. * Components : Combo
  368. * Components ID : cmb_instcd
  369. * Event : onitemchanged
  370. * Argument : 01.obj : Object Event has occurred
  371. * : 02.e : Event Object
  372. * Description : 콤보 값 변경시
  373. ****************************************************************************************/
  374. function cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  375. {
  376. misfGridInit(datagrid1);
  377. }
  378. function ds_main_codeinfo_codelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  379. {
  380. ds_main_codeinfo_codelist.setColumn(e.row, "colIUD", "u");
  381. }
  382. ]]></Script>
  383. </Form>
  384. </FDL>