SMCRC00100_연동정보관리.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMCRC00100" position="absolute 0 0 1197 783" titletext="데이터 연동설정 관리" oninit="SMCRC00100_oninit" onload="SMCRC00100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 25 1194 65" align="align:center top;" id="group2" class="div_SA" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Static text="프로그램 ID :" position="absolute 16 11 120 28" id="caption3" class="search_name" anchor="left top"/>
  11. <Edit position="absolute 125 10 270 29" id="ipt_prgmid" class="input_search" anchor="left top"/>
  12. <Button position="absolute 275 11 291 27" id="btn_prgmsrch" class="icon_search" text="" anchor="left top" onclick="group2_btn_prgmsrch_onclick"/>
  13. <Static text="연동테이블명 :" position="absolute 331 11 450 28" id="caption4" class="search_name" anchor="left top"/>
  14. <Edit position="absolute 450 10 595 29" id="ipt_tablenm" class="input_search" anchor="left top"/>
  15. <Button position="absolute 600 11 616 27" id="btn_tablesrch" class="icon_search" text="" anchor="left top" onclick="group2_btn_tablesrch_onclick"/>
  16. <Static text="사용여부 :" position="absolute 910 13 996 30" id="caption5" class="search_name" anchor="top right"/>
  17. <Combo position="absolute 1005 11 1090 30" id="cmb_useyn" class="combo_search" innerdataset="@ds_init_comncdlist_C0022list" datacolumn="cdnm" codecolumn="cdid" anchor="top right" index="-1"/>
  18. <Shape position="absolute 1104 11 1110 33" linetype="vertical" id="line1" class="line_4" anchor="top right"/>
  19. <Button position="absolute 1123 11 1179 33" id="btn_search" class="btn1" text="조회" anchor="top right" onclick="group2_btn_search_onclick"/>
  20. </Layout>
  21. </Layouts>
  22. </Div>
  23. <Static id="caption1" text="데이터 연동정보 관리" class="tit_1" position="absolute 0 0 165 25" anchor="left top"/>
  24. <Static id="caption2" text="데이터 연동정보 설정" class="tit_2" position="absolute 0 77 148 93" anchor="left top"/>
  25. <Button id="btn_syncadd" taborder="1" text="항목추가" class="btn2" position="absolute 983 74 1047 93" anchor="top right" onclick="btn_syncadd_onclick" enable="true"/>
  26. <Button id="btn_syncdel" taborder="2" text="항목삭제" class="btn2" position="absolute 1050 74 1114 93" anchor="top right" onclick="btn_syncdel_onclick"/>
  27. <Button id="btn_saveexcel" taborder="3" text="엑셀저장" class="btn7" position="absolute 1117 74 1193 93" anchor="top right" onclick="btn_saveexcel_onclick"/>
  28. <Shape id="line2" linetype="horizontal" class="line_10" position="absolute 0 93 1194 99" anchor="left top right"/>
  29. <Grid id="grd_synclist" taborder="4" binddataset="ds_main_list_synclist" useinputpanel="false" position="absolute 0 98 1194 756" anchor="all" autoenter="select" cellsizingtype="col">
  30. <Formats>
  31. <Format id="default">
  32. <Columns>
  33. <Column size="25"/>
  34. <Column size="150"/>
  35. <Column size="150"/>
  36. <Column size="150"/>
  37. <Column size="60"/>
  38. <Column size="60"/>
  39. <Column size="70"/>
  40. <Column size="60"/>
  41. <Column size="90"/>
  42. <Column size="80"/>
  43. <Column size="80"/>
  44. <Column size="80"/>
  45. <Column size="70"/>
  46. <Column size="60"/>
  47. <Column size="70"/>
  48. </Columns>
  49. <Rows>
  50. <Row size="24" band="head"/>
  51. <Row size="24"/>
  52. </Rows>
  53. <Band id="head">
  54. <Cell/>
  55. <Cell col="1" text="프로그램 ID"/>
  56. <Cell col="2" text="연동 테이블명"/>
  57. <Cell col="3" text="연동 테이블정보"/>
  58. <Cell col="4" text="연동간격"/>
  59. <Cell col="5" text="연동단위"/>
  60. <Cell col="6" text="실행시작"/>
  61. <Cell col="7" text="실행종료"/>
  62. <Cell col="8" text="접속 IP"/>
  63. <Cell col="9" text="접속 DB"/>
  64. <Cell col="10" text="접속 ID"/>
  65. <Cell col="11" text="접속 PW"/>
  66. <Cell col="12" text="접속 Port"/>
  67. <Cell col="13" text="사용여부"/>
  68. <Cell col="14" text="속성구분"/>
  69. </Band>
  70. <Band id="body">
  71. <Cell celltype="head"/>
  72. <Cell col="1" displaytype="text" edittype="text" text="bind:prgmid"/>
  73. <Cell col="2" displaytype="text" edittype="text" text="bind:synctablenm"/>
  74. <Cell col="3" displaytype="text" edittype="text" text="bind:tableinfo"/>
  75. <Cell col="4" displaytype="combo" edittype="combo" style="align:center middle;" class="text_center" text="bind:syncintvl" combodataset="ds_init_comncdlist_C0035list" combocodecol="cdid" combodatacol="cdnm" combodisplayrowcount="20"/>
  76. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" class="text_center" text="bind:syncunit"/>
  77. <Cell col="6" displaytype="text" edittype="expr:fromdt_edittype" style="align:center middle;" class="text_center" text="bind:fromdt" mask="##:##" maskchar=" "/>
  78. <Cell col="7" displaytype="text" edittype="expr:fcsttodt_edittype" style="align:center middle;" class="text_center" text="bind:fcsttodt" mask="##:##" maskchar=" "/>
  79. <Cell col="8" displaytype="text" edittype="text" class="text_center" text="bind:connip"/>
  80. <Cell col="9" displaytype="text" edittype="text" style="align:center middle;" class="text_center" text="bind:conndb"/>
  81. <Cell col="10" displaytype="text" edittype="text" style="align:center middle;" class="text_center" text="bind:connacnt"/>
  82. <Cell col="11" displaytype="text" edittype="text" style="align:left middle;padding:0 0 0 5;" class="text_center" text="bind:connpwd_mask" maskchar=" " editclipmode="excludespace"/>
  83. <Cell col="12" displaytype="text" edittype="text" style="align:center middle;" class="text_center" text="bind:connport"/>
  84. <Cell col="13" displaytype="combo" edittype="combo" style="align:center middle;" class="text_center" text="bind:useyn" combodataset="ds_init_comncdlist_C0022list" combocodecol="cdid" combodatacol="cdnm"/>
  85. <Cell col="14" displaytype="combo" edittype="combo" class="text_center" text="bind:attrflag" combodataset="ds_init_comncdlist_C0025list" combocodecol="cdid" combodatacol="cdnm"/>
  86. </Band>
  87. </Format>
  88. </Formats>
  89. </Grid>
  90. <Button id="btn_navi" taborder="5" text="연동내역정보" class="btn3" position="absolute 0 758 104 780" anchor="left bottom" onclick="btn_navi_onclick"/>
  91. <Button id="btn_save" taborder="6" text="저장" class="btn4" position="absolute 1068 758 1124 780" anchor="right bottom" onclick="btn_save_onclick"/>
  92. <Button id="btn_init" taborder="7" text="초기화" class="btn4" position="absolute 1127 758 1195 780" anchor="right bottom" onclick="btn_init_onclick"/>
  93. <Button id="btn_hospinfo" taborder="8" text="병원정보설정" class="btn3" position="absolute 108 758 212 780" anchor="left bottom" onclick="btn_hospinfo_onclick"/>
  94. </Layout>
  95. </Layouts>
  96. <Objects>
  97. <Dataset id="ds_init_comncdlist_C0022list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  98. <ColumnInfo>
  99. <Column id="cdnm" type="STRING"/>
  100. <Column id="cdid" type="STRING"/>
  101. </ColumnInfo>
  102. </Dataset>
  103. <Dataset id="ds_init_comncdlist_C0025list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  104. <ColumnInfo>
  105. <Column id="cdnm" type="STRING"/>
  106. <Column id="cdid" type="STRING"/>
  107. </ColumnInfo>
  108. </Dataset>
  109. <Dataset id="ds_init_comncdlist_C0035list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="cdnm" type="STRING"/>
  112. <Column id="cdid" type="STRING"/>
  113. </ColumnInfo>
  114. </Dataset>
  115. <Dataset id="ds_send_srch" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="prgmid" type="STRING" size="256"/>
  118. <Column id="tablenm" type="STRING" size="256"/>
  119. <Column id="useyn" type="STRING" size="256"/>
  120. </ColumnInfo>
  121. <Rows>
  122. <Row/>
  123. </Rows>
  124. </Dataset>
  125. <Dataset id="ds_main_list_synclist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  126. <ColumnInfo>
  127. <Column id="prgmid" type="STRING"/>
  128. <Column id="synctablenm" type="STRING"/>
  129. <Column id="tableinfo" type="STRING"/>
  130. <Column id="syncintvl" type="STRING"/>
  131. <Column id="syncunit" type="STRING"/>
  132. <Column id="fromdt" type="STRING"/>
  133. <Column id="fcsttodt" type="STRING"/>
  134. <Column id="connip" type="STRING"/>
  135. <Column id="conndb" type="STRING"/>
  136. <Column id="connacnt" type="STRING"/>
  137. <Column id="connpwd" type="STRING"/>
  138. <Column id="connport" type="STRING"/>
  139. <Column id="useyn" type="STRING"/>
  140. <Column id="attrflag" type="STRING"/>
  141. </ColumnInfo>
  142. </Dataset>
  143. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  144. <ColumnInfo>
  145. <Column id="synclist" type="STRING" size="256"/>
  146. </ColumnInfo>
  147. <Rows>
  148. <Row/>
  149. </Rows>
  150. </Dataset>
  151. </Objects>
  152. <Bind>
  153. <BindItem id="item0" compid="group2.cmb_useyn" propid="value" datasetid="ds_send_srch" columnid="useyn"/>
  154. <BindItem id="item1" compid="group2.ipt_tablenm" propid="value" datasetid="ds_send_srch" columnid="tablenm"/>
  155. <BindItem id="item2" compid="group2.ipt_prgmid" propid="value" datasetid="ds_send_srch" columnid="prgmid"/>
  156. </Bind>
  157. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  158. * System Name :
  159. * Job Name :
  160. * Creator :
  161. * Make Date : 2016-05-24
  162. * Description :
  163. *---------------------------------------------------------------------------------------
  164. * Modify Date Modifier Modify Description
  165. *---------------------------------------------------------------------------------------
  166. * 2016-05-24 Live Converter TF->XP
  167. *
  168. *---------------------------------------------------------------------------------------
  169. ****************************************************************************************/
  170. include "com_commonxp::comm_main.xjs";
  171. include "com_basiccodexp::ZBC001.xjs";
  172. include "crm_rulexp::CRZ001.xjs";
  173. function SMCRC00100_oninit(obj:Form, e:InitEventInfo)
  174. {
  175. frmf_initForm(obj);
  176. }
  177. function SMCRC00100_onload(obj:Form, e:LoadEventInfo)
  178. {
  179. grdf_initGrid(grd_synclist);
  180. grdf_setRowTypeIcon(grd_synclist, 0);
  181. var arrParam = [ {dsNm : "ds_init_comncdlist_C0022list", cdGrpId: "C0022"},
  182. {dsNm : "ds_init_comncdlist_C0025list", cdGrpId: "C0025"},
  183. {dsNm : "ds_init_comncdlist_C0035list", cdGrpId: "C0035"}];
  184. appf_getCodeList(arrParam);
  185. frmf_addComboItemAll("group2.cmb_useyn");
  186. group2.cmb_useyn.index = 0;
  187. fCheckAuth();
  188. fInitSyncList();
  189. var oParam = {};
  190. oParam.id = "TRCRC00101";
  191. oParam.service = "rulemngtapp.RuleMngt";
  192. oParam.method = "reqGetSyncList";
  193. oParam.inds = "req=ds_send_srch";
  194. oParam.outds = "ds_main_list_synclist=synclist";
  195. oParam.async = false;
  196. //oParam.callback = "cf_TRCRC00101";
  197. tranf_submit(oParam);
  198. passwordMask();
  199. fGetSyncdtSet();
  200. }
  201. function fCheckAuth()
  202. {
  203. if (!frmf_checkAuth("r"))
  204. {
  205. group2.btn_search.enable = false;
  206. }
  207. if (!frmf_checkAuth("x"))
  208. {
  209. btn_syncadd.enable=false;
  210. btn_syncdel.enable=false;
  211. btn_save.enable=false;
  212. }
  213. if (!frmf_checkAuth("p"))
  214. {
  215. btn_saveexcel.enable = false;
  216. }
  217. }
  218. //초기화
  219. function fInitSyncList()
  220. {
  221. // 그리드 초기화
  222. ds_main_list_synclist.clearData();
  223. }
  224. //================================================================//
  225. //예약관련 프로세스만 실행시간을 수정할 수 있도록 한다. //
  226. //===============================================================//
  227. function fGetSyncdtSet()
  228. {
  229. if(ds_main_list_synclist.rowcount > 0)
  230. {
  231. for(i = 0; ds_main_list_synclist.rowcount > i ;i++)
  232. {
  233. if(ds_main_list_synclist.getColumn(i, "prgmid") == "SCHEDULE_MNG" || ds_main_list_synclist.getColumn(i, "prgmid") == "SCHEDULE_MNG_MAPPING")
  234. {
  235. ds_main_list_synclist.updatecontrol = false;
  236. dsf_makeValue(ds_main_list_synclist, "fromdt_edittype", "string", "text", i);
  237. dsf_makeValue(ds_main_list_synclist, "fcsttodt_edittype", "string", "text", i);
  238. ds_main_list_synclist.updatecontrol = true;
  239. }
  240. else
  241. {
  242. ds_main_list_synclist.updatecontrol = false;
  243. dsf_makeValue(ds_main_list_synclist, "fromdt_edittype", "string", "none", i);
  244. dsf_makeValue(ds_main_list_synclist, "fcsttodt_edittype", "string", "none", i);
  245. ds_main_list_synclist.updatecontrol = true;
  246. }
  247. }
  248. }
  249. }
  250. //프로그램 ID검색
  251. function group2_btn_prgmsrch_onclick(obj:Button, e:ClickEventInfo)
  252. {
  253. var srch_condition = "P";
  254. var srch_term = ds_send_srch.getColumn(0, "prgmid");
  255. var param = crzfOpenSelectPrgm(srch_condition, srch_term);
  256. ds_send_srch.setColumn(0, "prgmid", param.prgmid);
  257. }
  258. //연동테이블명 검색
  259. function group2_btn_tablesrch_onclick(obj:Button, e:ClickEventInfo)
  260. {
  261. var srch_condition = "T";
  262. var srch_term = ds_send_srch.getColumn(0, "tablenm");
  263. var param = crzfOpenSelectPrgm(srch_condition, srch_term);
  264. ds_send_srch.setColumn(0, "tablenm", param.tablenm);
  265. }
  266. //조회
  267. function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
  268. {
  269. var oParam = {};
  270. oParam.id = "TRCRC00101";
  271. oParam.service = "rulemngtapp.RuleMngt";
  272. oParam.method = "reqGetSyncList";
  273. oParam.inds = "req=ds_send_srch";
  274. oParam.outds = "ds_main_list_synclist=synclist";
  275. oParam.async = false;
  276. //oParam.callback = "cf_TRCRC00101";
  277. tranf_submit(oParam);
  278. passwordMask();
  279. fGetSyncdtSet();
  280. }
  281. function passwordMask()
  282. {
  283. if(utlf_isNull(ds_main_list_synclist.getColumnInfo("connpwd_mask")))
  284. {
  285. ds_main_list_synclist.addColumn("connpwd_mask", "string");
  286. }
  287. var mask = "";
  288. ds_main_list_synclist.enableevent = false;
  289. ds_main_list_synclist.updatecontrol = false;
  290. for(var i = 0; i < ds_main_list_synclist.rowcount; i++)
  291. {
  292. var length = utlf_transNullToEmpty(ds_main_list_synclist.getColumn(i, "connpwd")).length;
  293. mask = "";
  294. for(var j = 0; j < length ;j++)
  295. {
  296. mask += "*";
  297. }
  298. if(!utlf_isNull(mask))
  299. {
  300. ds_main_list_synclist.setColumn(i, "connpwd_mask", mask);
  301. }
  302. }
  303. ds_main_list_synclist.updatecontrol = true;
  304. ds_main_list_synclist.enableevent = true;
  305. }
  306. //항목추가
  307. function btn_syncadd_onclick(obj:Button, e:ClickEventInfo)
  308. {
  309. var addRow = ds_main_list_synclist.addRow();
  310. ds_main_list_synclist.updatecontrol = false;
  311. dsf_makeValue(ds_main_list_synclist, "fromdt_edittype", "string", "text", addRow);
  312. dsf_makeValue(ds_main_list_synclist, "fcsttodt_edittype", "string", "text", addRow);
  313. ds_main_list_synclist.updatecontrol = true;
  314. grd_synclist.setCellPos(grd_synclist.getBindCellIndex("Body", "prgmid"));
  315. grd_synclist.setFocus();
  316. }
  317. //항목삭제
  318. function btn_syncdel_onclick(obj:Button, e:ClickEventInfo)
  319. {
  320. dsf_deleteSelectedRows(grd_synclist, true)
  321. }
  322. //엑셀저장
  323. function btn_saveexcel_onclick(obj:Button, e:ClickEventInfo)
  324. {
  325. grdf_exportExcel(grd_synclist, "excel", "SheetName", "true", "", "");
  326. }
  327. //연동내역정보
  328. function btn_navi_onclick(obj:Button, e:ClickEventInfo)
  329. {
  330. frmf_open("SMCRC00200", "SMCRC00200", "", "", "", "", "", "", "", "", "", "", "M");
  331. }
  332. function btn_hospinfo_onclick(obj:Button, e:ClickEventInfo)
  333. {
  334. //window.load("SPCRC00400_병원정보설정.xrw", "modal", "hosp_pop", "align:center;", "", "");
  335. frmf_modal("SPCRC00400", "SPCRC00400", "", "", "", "", "", "", "", "", "", "", "M");
  336. }
  337. //저장버튼
  338. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  339. {
  340. fSaveSyncList();
  341. }
  342. //저장
  343. function fSaveSyncList()
  344. {
  345. var grid = grd_synclist;
  346. var updt_list = grdf_getGridUpdateData(grid);
  347. var oParam = {};
  348. oParam.id = "TXCRC00101";
  349. oParam.service = "rulemngtapp.RuleMngt";
  350. oParam.method = "reqExeSyncList";
  351. oParam.inds = "synclist=ds_main_list_synclist:A";
  352. oParam.outds = "";
  353. oParam.async = false;
  354. oParam.callback = "cf_TXCRC00101";
  355. tranf_submit(oParam);
  356. }
  357. function cf_TXCRC00101(sSvcId, nErrorCode, sErrorMsg)
  358. {
  359. if(nErrorCode < 0)
  360. {
  361. return;
  362. }
  363. else
  364. {
  365. var oParam = {};
  366. oParam.id = "TRCRC00101";
  367. oParam.service = "rulemngtapp.RuleMngt";
  368. oParam.method = "reqGetSyncList";
  369. oParam.inds = "req=ds_send_srch";
  370. oParam.outds = "ds_main_list_synclist=synclist";
  371. oParam.async = false;
  372. //oParam.callback = "cf_TRCRC00101";
  373. tranf_submit(oParam);
  374. passwordMask();
  375. fGetSyncdtSet();
  376. }
  377. }
  378. //초기화버튼
  379. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  380. {
  381. fInitSyncList();
  382. }
  383. ]]></Script>
  384. </Form>
  385. </FDL>