SPAEB00010_공통코드관리.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPAEB00010" position="absolute 0 0 712 555" titletext="공통코드관리" oninit="SPAEB00010_oninit" onload="SPAEB00010_onload" scrollbars="none">
  5. <Layouts>
  6. <Layout>
  7. <Div id="Div00" taborder="1" position="absolute 0 25 710 65" class="div_SA"/>
  8. <Static text="공통코드관리" position="absolute 0 0 120 25" id="caption1" class="tit_1"/>
  9. <Shape position="absolute 0 89 710 95" id="line1" class="line_10"/>
  10. <Div position="absolute 0 522 710 553" id="group1" scrollbars="autoboth">
  11. <Layouts>
  12. <Layout>
  13. <Button position="absolute 526 5 582 27" id="btn_confirm" class="btn4" text="저장" onclick="group1_btn_confirm_onclick" anchor="default"/>
  14. <Button position="absolute 584 5 640 27" id="btn_cancel" class="btn4" text="닫기" onclick="group1_btn_cancel_onclick" anchor="default"/>
  15. <Shape position="absolute 0 -2 710 4" id="line32" class="line_6" anchor="default"/>
  16. </Layout>
  17. </Layouts>
  18. </Div>
  19. <Static text="그룹코드 :" position="absolute 17 38 116 55" id="caption2" class="search_name"/>
  20. <Button position="absolute 641 35 697 57" id="btn_sea" class="btn1" text="조회" onclick="btn_sea_onclick"/>
  21. <Grid position="absolute 0 94 710 521" id="grd_codelist" binddataset="ds_grd_codelist" autosizingtype="row" extendsizetype="row" cellsizingtype="col">
  22. <Formats>
  23. <Format id="default">
  24. <Columns>
  25. <Column size="25"/>
  26. <Column size="71"/>
  27. <Column size="143"/>
  28. <Column size="183"/>
  29. <Column size="58"/>
  30. <Column size="35"/>
  31. <Column size="65"/>
  32. <Column size="65"/>
  33. <Column size="65"/>
  34. <Column size="65"/>
  35. <Column size="59"/>
  36. <Column size="5"/>
  37. </Columns>
  38. <Rows>
  39. <Row size="24" band="head"/>
  40. <Row size="24"/>
  41. </Rows>
  42. <Band id="head">
  43. <Cell/>
  44. <Cell col="1" text="코드"/>
  45. <Cell col="2" text="코드명"/>
  46. <Cell col="3" text="설명"/>
  47. <Cell col="4" text="사용여부"/>
  48. <Cell col="5" text="순번"/>
  49. <Cell col="6" text="제어여부1"/>
  50. <Cell col="7" text="제어코드1"/>
  51. <Cell col="8" text="제어코드2"/>
  52. <Cell col="9" text="제어코드3"/>
  53. <Cell col="10" text="그룹코드"/>
  54. <Cell col="11" text="부서코드"/>
  55. </Band>
  56. <Band id="body">
  57. <Cell celltype="head"/>
  58. <Cell col="1" displaytype="text" edittype="text" text="bind:cdid"/>
  59. <Cell col="2" displaytype="text" edittype="text" text="bind:cdnm"/>
  60. <Cell col="3" displaytype="text" edittype="text" text="bind:detldesc" wordwrap="char" autosizerow="limitmin"/>
  61. <Cell col="4" displaytype="text" edittype="text" text="bind:useyn"/>
  62. <Cell col="5" displaytype="text" edittype="text" text="bind:dispseq"/>
  63. <Cell col="6" displaytype="text" edittype="text" text="bind:cntlyn1"/>
  64. <Cell col="7" displaytype="text" edittype="text" text="bind:cntlcd1"/>
  65. <Cell col="8" displaytype="text" edittype="text" text="bind:cntlcd2"/>
  66. <Cell col="9" displaytype="text" edittype="text" text="bind:cntlcd3"/>
  67. <Cell col="10" displaytype="text" edittype="text" text="bind:grupcdid"/>
  68. <Cell col="11" text="bind:suppdeptcd"/>
  69. </Band>
  70. </Format>
  71. </Formats>
  72. </Grid>
  73. <Combo position="absolute 110 37 210 56" id="cmb_grup" innerdataset="@ds_init_cmb_grup" datacolumn="grupcdnm" codecolumn="grupcdid" onitemchanged="cmb_grup_onitemchanged"/>
  74. <Button position="absolute 657 67 710 89" id="btn_grddel" class="btn2" text="행삭제" onclick="btn_grddel_onclick"/>
  75. <Button position="absolute 602 67 655 89" id="btn_grdadd" class="btn2" text="행추가" onclick="btn_grdadd_onclick"/>
  76. <Button position="absolute 642 527 710 549" id="button1" class="btn4" text="초기화" onclick="button1_onclick"/>
  77. </Layout>
  78. </Layouts>
  79. <Objects>
  80. <Dataset id="ds_grd_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  81. <ColumnInfo>
  82. <Column id="cdid" type="STRING"/>
  83. <Column id="cdnm" type="STRING"/>
  84. <Column id="detldesc" type="STRING"/>
  85. <Column id="useyn" type="STRING"/>
  86. <Column id="dispseq" type="STRING"/>
  87. <Column id="cntlyn1" type="STRING"/>
  88. <Column id="cntlcd1" type="STRING"/>
  89. <Column id="cntlcd2" type="STRING" size="256"/>
  90. <Column id="cntlcd3" type="STRING" size="256"/>
  91. <Column id="grupcdid" type="STRING"/>
  92. <Column id="suppdeptcd" type="STRING"/>
  93. </ColumnInfo>
  94. </Dataset>
  95. <Dataset id="ds_init_cmb_grup" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  96. <ColumnInfo>
  97. <Column id="grupcdnm" type="STRING"/>
  98. <Column id="grupcdid" type="STRING"/>
  99. </ColumnInfo>
  100. </Dataset>
  101. <Dataset id="ds_send_globalinstance" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  102. <ColumnInfo>
  103. <Column id="instance1" type="STRING" size="256"/>
  104. </ColumnInfo>
  105. <Rows>
  106. <Row/>
  107. </Rows>
  108. </Dataset>
  109. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_oncolumnchanged">
  110. <ColumnInfo>
  111. <Column id="grupcdid" type="STRING" size="256"/>
  112. <Column id="suppdeptcd" type="STRING" size="256"/>
  113. </ColumnInfo>
  114. <Rows>
  115. <Row/>
  116. </Rows>
  117. </Dataset>
  118. <Dataset id="ds_init_E0002" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  119. <ColumnInfo>
  120. <Column id="cdid" type="STRING" size="256"/>
  121. <Column id="cdnm" type="STRING" size="256"/>
  122. </ColumnInfo>
  123. </Dataset>
  124. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  125. <ColumnInfo>
  126. <Column id="checkseq" type="STRING" size="256"/>
  127. <Column id="grupcdid" type="STRING" size="256"/>
  128. </ColumnInfo>
  129. <Rows>
  130. <Row/>
  131. </Rows>
  132. </Dataset>
  133. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  134. </Objects>
  135. <Bind>
  136. <BindItem id="item0" compid="cmb_grup" propid="value" datasetid="ds_send" columnid="grupcdid"/>
  137. </Bind>
  138. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  139. * System Name :
  140. * Job Name :
  141. * Creator :
  142. * Make Date : 2015-11-13
  143. * Description :
  144. *---------------------------------------------------------------------------------------
  145. * Modify Date Modifier Modify Description
  146. *---------------------------------------------------------------------------------------
  147. * 2015-11-13 Live Converter TF->XP
  148. *
  149. *---------------------------------------------------------------------------------------
  150. ****************************************************************************************/
  151. include "com_commonxp::comm_main.xjs"
  152. include "ast_examcurexp::AEZ0001.xjs"
  153. include "ast_examcurexp::combolist.xjs"
  154. include "ast_commonxp::AST.xjs"
  155. function fn_TRAEB00010(){
  156. ds_send.setColumn(0,"suppdeptcd",frmf_getParameter("AST_DEPTCD"));
  157. var oParam = {};
  158. oParam.id = "TRAEB00010";
  159. oParam.service = "examcurebaseapp.ComCode";
  160. oParam.method = "reqGetComCodeDetailList";
  161. oParam.inds = "req=ds_send";
  162. oParam.outds = "ds_grd_codelist=item";
  163. oParam.async = false;
  164. oParam.callback = "cf_TRAEB00010";
  165. tranf_submit(oParam);
  166. }
  167. function cf_TRAEB00010(sSvcId, nErrorCode, sErrorMsg) {
  168. if(nErrorCode < 0) return;
  169. }
  170. function fn_TXAEB00010(){
  171. var oParam = {};
  172. oParam.id = "TXAEB00010";
  173. oParam.service = "examcurebaseapp.ComCode";
  174. oParam.method = "reqExeComCodeDetailList";
  175. oParam.inds = "req=ds_send_reqdata";
  176. oParam.outds = "ds_hidden=count";
  177. oParam.async = false;
  178. oParam.callback = "cf_TXAEB00010";
  179. tranf_submit(oParam);
  180. }
  181. function cf_TXAEB00010(sSvcId, nErrorCode, sErrorMsg) {
  182. if(nErrorCode < 0) return;
  183. }
  184. function fn_TRAEB00011(){
  185. ds_send_globalinstance.updateColID("instance1","suppdeptcd");
  186. var oParam = {};
  187. oParam.id = "TRAEB00011";
  188. oParam.service = "examcurebaseapp.ComCode";
  189. oParam.method = "reqGetComCodeGroupList";
  190. oParam.inds = "req=ds_send_globalinstance";
  191. oParam.outds = "ds_init_cmb_grup=item";
  192. oParam.async = false;
  193. oParam.callback = "cf_TRAEB00011";
  194. tranf_submit(oParam);
  195. }
  196. function cf_TRAEB00011(sSvcId, nErrorCode, sErrorMsg) {
  197. ds_send_globalinstance.updateColID("suppdeptcd","instance1");
  198. if(nErrorCode < 0) return;
  199. }
  200. function btn_sea_onclick(obj:Button, e:ClickEventInfo)
  201. {
  202. fn_TRAEB00010();
  203. }
  204. function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
  205. {
  206. var nRow = ds_grd_codelist.addRow();
  207. // 행추가 시 bottomRow 사용하지 마세요!! 꼭
  208. grd_codelist.setCellPos(nRow);
  209. ds_grd_codelist.setColumn(nRow,"suppdeptcd",ds_send_globalinstance.getColumn(0,"instance1"));
  210. ds_grd_codelist.setColumn(nRow,"grupcdid", cmb_grup.value);
  211. }
  212. function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
  213. {
  214. var arrRow = new Array();
  215. arrRow[0] = ds_grd_codelist.rowposition;
  216. grdf_setStatus(grd_codelist, "D", arrRow);
  217. }
  218. function SPAEB00010_oninit(obj:Form, e:InitEventInfo)
  219. {
  220. frmf_initForm(obj);
  221. }
  222. function SPAEB00010_onload(obj:Form, e:LoadEventInfo)
  223. {
  224. lf_aezfSetSuppDeptcd(); //AEZ0001.xjs
  225. ds_send_globalinstance.setColumn(0,"instance1",frmf_getParameter("AST_DEPTCD"));
  226. //sysf_trace("suppdeptcd = " + frmf_getParameter("AST_DEPTCD"));
  227. // 2011.06.21 권한 공통코드(E0002)로 관리
  228. lf_getAstCodeList([{dsNm: "ds_init_E0002", cdGrpId:"E0002"}], true);
  229. grdf_setToolTipBind(grd_codelist);
  230. //그룹코드조회
  231. fn_TRAEB00011();
  232. grdf_setRowTypeIcon(grd_codelist, 0); //status 표시 : 입력, 삭제, 갱신
  233. }
  234. function group1_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  235. {
  236. var auth_id = sysf_getUserInfo("userid");
  237. sysf_trace("auth_id =" + auth_id);
  238. //var dev_id = auth_id.substr(0,3);
  239. var idx_cncl = 0;
  240. var cnclidCnt = ds_init_E0002.rowcount;
  241. for( var i = 0 ; i< cnclidCnt ; i++){
  242. if(ds_init_E0002.getColumn(i,"cdid") == auth_id ){
  243. idx_cncl++;
  244. }
  245. }
  246. if ( idx_cncl != 0 || auth_id == "DEV" || auth_id == "AST" ) {
  247. }else {
  248. sysf_messageBox("저장/수정/삭제권한은 전산실 관리자에게만 부여합니다.","I999");
  249. return;
  250. }
  251. if ( sysf_messageBox("", "Q002") == 6 ) {
  252. var dsUpdate = grdf_getGridUpdateData(grd_codelist, "all");
  253. grdf_setStatusColumn(dsUpdate, "m");
  254. if(dsUpdate.rowcount == 0){
  255. sysf_messageBox("업데이트 정보가 없습니다.", "I");
  256. }
  257. else {
  258. ds_send_reqdata.clear();
  259. ds_send_reqdata.copyData(dsUpdate, true);
  260. dsf_setDefaultVal(ds_send_reqdata, "ubasecdflag:U");
  261. fn_TXAEB00010();
  262. }
  263. }
  264. //fn_TRAEB00011");
  265. fn_TRAEB00010();
  266. }
  267. function group1_btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  268. {
  269. this.close();
  270. }
  271. function button1_onclick(obj:Button, e:ClickEventInfo)
  272. {
  273. if ( sysf_messageBox("초기화하시겠습니까?", "Q") == 6) {
  274. ds_grd_codelist.clearData();
  275. }
  276. }
  277. function cmb_grup_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  278. {
  279. // 2011.05.09 코드가 E0001일 경우 섦
  280. if( obj.value == "E0001" ){
  281. //grd_codelist.colType(3) = "inputbutton";
  282. }else{
  283. //grd_codelist.colType(3) = "input";
  284. }
  285. fn_TRAEB00010();
  286. }
  287. ]]></Script>
  288. </Form>
  289. </FDL>