SPAHB00500_기본코드관리.xfdl 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPAHB00500" position="absolute 0 0 519 544" titletext="기본코드선택" onload="SPAHB00500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 518 515" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Grid position="absolute 0 208 517 515" id="grd_etcdetllst" binddataset="ds_main_detlcodelst_item" cellclickbound="cell" oncelldblclick="group3_grd_etcdetllst_oncelldblclick">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="25" band="left"/>
  15. <Column size="28"/>
  16. <Column size="104"/>
  17. <Column size="362"/>
  18. <Column size="0"/>
  19. </Columns>
  20. <Rows>
  21. <Row size="24" band="head"/>
  22. <Row size="24"/>
  23. </Rows>
  24. <Band id="head">
  25. <Cell/>
  26. <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
  27. <Cell col="2" text="코드"/>
  28. <Cell col="3" text="명칭"/>
  29. <Cell col="4" text="etccd"/>
  30. </Band>
  31. <Band id="body">
  32. <Cell celltype="head" text="expr:currow+1"/>
  33. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:sel" expr="expr:(sel==&quot;Y&quot;||sel==1)?1:0"/>
  34. <Cell col="2" displaytype="text" text="bind:etcdetlcd"/>
  35. <Cell col="3" displaytype="text" text="bind:etcdetlnm"/>
  36. <Cell col="4" text="bind:etccd"/>
  37. </Band>
  38. </Format>
  39. </Formats>
  40. </Grid>
  41. <Div position="absolute 0 0 517 40" align="align:center top;" id="group2" class="div_SA2">
  42. <Layouts>
  43. <Layout>
  44. <Static text="대분류 :" position="absolute 16 11 102 28" id="caption2" class="search_name"/>
  45. <Button position="absolute 445 9 501 31" id="btn_search" class="btn1" text="조회" onclick="group3_group2_btn_search_onclick"/>
  46. <Shape position="absolute 426 9 432 30" linetype="vertical" id="line13"/>
  47. <Combo position="absolute 90 10 210 29" id="cmb_clscd" class="combo_essential" innerdataset="@ds_init_selectinput_item" datacolumn="etcdetlnm" codecolumn="etcdetlcd" onitemchanged="group3_group2_cmb_clscd_onitemchanged"/>
  48. </Layout>
  49. </Layouts>
  50. </Div>
  51. <Shape position="absolute 0 40 517 46" id="line1" class="line_10"/>
  52. <Grid position="absolute 0 45 517 203" id="grd_etclst" binddataset="ds_init_etclst_item" oncellclick="group3_grd_etclst_oncellclick">
  53. <Formats>
  54. <Format id="default">
  55. <Columns>
  56. <Column size="25" band="left"/>
  57. <Column size="104"/>
  58. <Column size="362"/>
  59. </Columns>
  60. <Rows>
  61. <Row size="24" band="head"/>
  62. <Row size="24"/>
  63. </Rows>
  64. <Band id="head">
  65. <Cell/>
  66. <Cell col="1" text="코드"/>
  67. <Cell col="2" text="명칭"/>
  68. </Band>
  69. <Band id="body">
  70. <Cell celltype="head" text="expr:currow+1"/>
  71. <Cell col="1" displaytype="text" text="bind:etccd"/>
  72. <Cell col="2" displaytype="text" text="bind:etcdetlnm"/>
  73. </Band>
  74. </Format>
  75. </Formats>
  76. </Grid>
  77. <Shape position="absolute 0 203 517 209" id="line2" class="line_10"/>
  78. </Layout>
  79. </Layouts>
  80. </Div>
  81. <Div position="absolute 0 515 517 543" id="group4" scrollbars="autoboth">
  82. <Layouts>
  83. <Layout>
  84. <Button position="absolute 461 3 517 25" id="btn_cncl" class="btn4" text="취소" onclick="group4_btn_cncl_onclick"/>
  85. <Button position="absolute 402 3 458 25" id="btn_cfm" class="btn4" text="확인" onclick="group4_btn_cfm_onclick"/>
  86. </Layout>
  87. </Layouts>
  88. </Div>
  89. </Layout>
  90. </Layouts>
  91. <Objects>
  92. <Dataset id="ds_main_detlcodelst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_detlcodelst_item_oncolumnchanged">
  93. <ColumnInfo>
  94. <Column id="sel" type="STRING" size="256"/>
  95. <Column id="etcdetlcd" type="STRING" size="256"/>
  96. <Column id="etcdetlnm" type="STRING" size="256"/>
  97. <Column id="etccd" type="STRING" size="256"/>
  98. <Column id="etcdetlcdkey" type="STRING" size="256"/>
  99. <Column id="etcitemcnts" type="STRING" size="256"/>
  100. <Column id="etcitemcnts2" type="STRING" size="256"/>
  101. <Column id="useyn" type="STRING" size="256"/>
  102. </ColumnInfo>
  103. <Rows>
  104. <Row>
  105. <Col id="sel"/>
  106. <Col id="etcdetlcd"/>
  107. <Col id="etcdetlnm"/>
  108. <Col id="etccd"/>
  109. <Col id="etcdetlcdkey"/>
  110. <Col id="etcitemcnts"/>
  111. <Col id="etcitemcnts2"/>
  112. <Col id="useyn"/>
  113. </Row>
  114. </Rows>
  115. </Dataset>
  116. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  117. <ColumnInfo>
  118. <Column id="clscd" type="STRING" size="256"/>
  119. <Column id="etccd" type="STRING" size="256"/>
  120. </ColumnInfo>
  121. <Rows>
  122. <Row>
  123. <Col id="clscd"/>
  124. <Col id="etccd"/>
  125. </Row>
  126. </Rows>
  127. </Dataset>
  128. <Dataset id="ds_init_etclst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  129. <ColumnInfo>
  130. <Column id="etccd" type="STRING" size="256"/>
  131. <Column id="etcdetlnm" type="STRING" size="256"/>
  132. <Column id="etccdkey" type="STRING" size="256"/>
  133. <Column id="useyn" type="STRING" size="256"/>
  134. </ColumnInfo>
  135. <Rows>
  136. <Row>
  137. <Col id="etccd"/>
  138. <Col id="etcdetlnm"/>
  139. <Col id="etccdkey"/>
  140. <Col id="useyn"/>
  141. </Row>
  142. </Rows>
  143. </Dataset>
  144. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  145. <ColumnInfo>
  146. <Column id="sellst" type="STRING" size="256"/>
  147. <Column id="okflag" type="STRING" size="256"/>
  148. </ColumnInfo>
  149. </Dataset>
  150. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  151. <ColumnInfo>
  152. <Column id="hidden" type="STRING" size="256"/>
  153. </ColumnInfo>
  154. <Rows>
  155. <Row>
  156. <Col id="hidden"/>
  157. </Row>
  158. </Rows>
  159. </Dataset>
  160. <Dataset id="ds_init_selectinput_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  161. <ColumnInfo>
  162. <Column id="etcdetlnm" type="STRING" size="256"/>
  163. <Column id="etcdetlcd" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. <Rows>
  166. <Row>
  167. <Col id="etcdetlnm"/>
  168. <Col id="etcdetlcd"/>
  169. </Row>
  170. </Rows>
  171. </Dataset>
  172. </Objects>
  173. <Bind>
  174. <BindItem id="item0" compid="group3.group2.cmb_clscd" propid="value" datasetid="ds_send" columnid="clscd"/>
  175. </Bind>
  176. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  177. * System Name :
  178. * Job Name :
  179. * Creator :
  180. * Make Date : 2017-12-04
  181. * Description :
  182. *---------------------------------------------------------------------------------------
  183. * Modify Date Modifier Modify Description
  184. *---------------------------------------------------------------------------------------
  185. * 2017-06-19 Live Converter TF->XP
  186. *
  187. *---------------------------------------------------------------------------------------
  188. ****************************************************************************************/
  189. //=======================================================================================
  190. // Lib Include
  191. //---------------------------------------------------------------------------------------
  192. include "com_commonxp::comm_main.xjs";
  193. include "mis_miscommonxp::MIS.xjs";
  194. //=======================================================================================
  195. // Global Form Variable
  196. //---------------------------------------------------------------------------------------
  197. var arErrorCode = new HashArray();
  198. /**
  199. * SPAHB00500_PARAM1 : 대분류코드
  200. * SPAHB00500_PARAM2 : 중분류코드
  201. * SPAHB00500_PARAM3 : multiyn => Y이면 소분류코드 다중선택입력모드
  202. * SPAHB00500_PARAM4 : 목적노드셋
  203. * SPAHB00500_PARAM5 : 중분류코드 setting여부(Y_N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
  204. */
  205. var sMultyYN = opener.frmf_getParameter("SPAHB00500_PARAM3");
  206. var midFlag = opener.frmf_getParameter("SPAHB00500_PARAM5");
  207. //=======================================================================================
  208. // Function
  209. //---------------------------------------------------------------------------------------
  210. /*-**************************************************************************************
  211. * Argument : N/A
  212. * Description : 초기화
  213. ****************************************************************************************/
  214. function fInit(){
  215. fGetLargeClassCdList() ;
  216. ds_main_detlcodelst_item.clearData();
  217. ds_init_etclst_item.clearData();
  218. if( sMultyYN == "N" ) {
  219. misfColHidden(group3.grd_etcdetllst, "sel", true);
  220. // group3.chk_allyn.visible = false;
  221. }else if(sMultyYN == "Y") {
  222. misfColHidden(group3.grd_etcdetllst, "sel", false);
  223. // group3.chk_allyn.visible = true;
  224. }
  225. if( frmf_checkOpener() || (midFlag =="Y")){
  226. sMultyYN = opener.frmf_getParameter("SPAHB00500_PARAM3");
  227. ds_send.setColumn( 0, "clscd" , opener.frmf_getParameter("SPAHB00500_PARAM1"));
  228. ds_send.setColumn( 0, "etccd" , opener.frmf_getParameter("SPAHB00500_PARAM2"));
  229. fGetEtcList();
  230. dsf_makeValue( ds_send, "clscd", "string", opener.frmf_getParameter("SPAHB00500_PARAM1"));
  231. dsf_makeValue( ds_send, "etccd", "string", opener.frmf_getParameter("SPAHB00500_PARAM2"));
  232. fGetDetlCodeList(true);
  233. opener.dsf_createDsRow("ds_temp", [{col:"okflag", type:"STRING", size:256, val:""}]);
  234. }
  235. }
  236. /*-**************************************************************************************
  237. * Argument : N/A
  238. * Description : 대분류 초기화
  239. ****************************************************************************************/
  240. function fGetLargeClassCdList(){
  241. var ret = null;
  242. var oParam = {};
  243. oParam.id = "TRAHB00603";
  244. oParam.service = "healexambaseapp.EtcCode";
  245. oParam.method = "reqGetSelInput";
  246. oParam.inds = "req=ds_send";
  247. oParam.outds = "ds_init_selectinput_item=item";
  248. oParam.async = false;
  249. oParam.callback = "cf_TRAHB00603";
  250. tranf_submit(oParam);
  251. if(arErrorCode.pop("TRAHB00603") > -1) ret = true;
  252. else ret = false;
  253. return ret;
  254. }
  255. function cf_TRAHB00603(sSvcId, nErrorCode, sErrorMsg) {
  256. arErrorCode.push(sSvcId, nErrorCode);
  257. }
  258. /*-**************************************************************************************
  259. * Argument : N/A
  260. * Description : 중분류 초기화
  261. ****************************************************************************************/
  262. function fGetEtcList(){
  263. var sClscd = ds_send.getColumn(0, "clscd");
  264. if( utlf_isNull(sClscd) ) return ;
  265. ds_init_etclst_item.clearData();
  266. ds_main_detlcodelst_item.clearData();
  267. var ret = null;
  268. var oParam = {};
  269. oParam.id = "TRAHB00601";
  270. oParam.service = "healexambaseapp.EtcCode";
  271. oParam.method = "reqGetEtcList";
  272. oParam.inds = "req=ds_send";
  273. oParam.outds = "ds_init_etclst_item=item";
  274. oParam.async = false;
  275. oParam.callback = "cf_TRAHB00601";
  276. tranf_submit(oParam);
  277. if(arErrorCode.pop("TRAHB00601") > -1) ret = true;
  278. else ret = false;
  279. return ret;
  280. }
  281. function cf_TRAHB00601(sSvcId, nErrorCode, sErrorMsg) {
  282. arErrorCode.push(sSvcId, nErrorCode);
  283. }
  284. /*-**************************************************************************************
  285. * Argument : N/A
  286. * Description : 분류별 상세코드내역 조회
  287. ****************************************************************************************/
  288. function fGetDetlCodeList(vFlag){
  289. if (vFlag==false) {
  290. var idx = ds_init_etclst_item.rowposition;
  291. if( idx < 0 ) return ;
  292. ds_send.setColumn( 0, "etccd", ds_init_etclst_item.getColumn(idx, 1) );
  293. }
  294. var sClscd = ds_send.getColumn(0, "clscd");
  295. if( utlf_isNull(sClscd) ) return ;
  296. sClscd = ds_send.getColumn(0, "etccd");
  297. if( utlf_isNull(sClscd) ) return ;
  298. ds_main_detlcodelst_item.clearData();
  299. var ret = null;
  300. var oParam = {};
  301. oParam.id = "TRAHB00602";
  302. oParam.service = "healexambaseapp.EtcCode";
  303. oParam.method = "reqGetDetlCodeList";
  304. oParam.inds = "req=ds_send";
  305. oParam.outds = "ds_main_detlcodelst_item=item";
  306. oParam.async = false;
  307. oParam.callback = "cf_TRAHB00602";
  308. tranf_submit(oParam);
  309. if(arErrorCode.pop("TRAHB00602") > -1) ret = true;
  310. else ret = false;
  311. }
  312. function cf_TRAHB00602(sSvcId, nErrorCode, sErrorMsg) {
  313. arErrorCode.push(sSvcId, nErrorCode);
  314. ds_main_detlcodelst_item.updatecontrol = false;
  315. dsf_setFixVal(ds_main_detlcodelst_item, "sel:N");
  316. ds_main_detlcodelst_item.updatecontrol = true;
  317. }
  318. /*-**************************************************************************************
  319. * Argument : N/A
  320. * Description : 소분류코드 선택항목 setting
  321. ****************************************************************************************/
  322. function fDclSetData(){
  323. if( frmf_checkOpener() ){
  324. var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
  325. var idx = 0 ;
  326. idx = ds_main_detlcodelst_item.rowposition;
  327. if( idx < 0 ) {
  328. sysf_messageBox("항목을 " , "C002");
  329. return -1;
  330. }
  331. ds_main_detlcodelst_item.setColumn(idx, "sel", "Y");
  332. ds_main_detlcodelst_item.filter("sel=='Y'");
  333. opener.objects[sDestXPath].clear();
  334. opener.objects[sDestXPath].copyData(ds_main_detlcodelst_item, true);
  335. ds_main_detlcodelst_item.filter("");
  336. opener.ds_temp.setColumn( 0, "okflag" , "ok");
  337. return 1;
  338. }
  339. }
  340. /*-**************************************************************************************
  341. * Argument : N/A
  342. * Description : 선택항목 세팅
  343. ****************************************************************************************/
  344. function fSetData() {
  345. var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
  346. if(sMultyYN == "Y") {
  347. }else {
  348. var idx = ds_main_detlcodelst_item.rowposition;
  349. if( idx < 0) {
  350. sysf_messageBox("항목을 " , "C002");
  351. return -1;
  352. }
  353. ds_main_detlcodelst_item.setColumn(idx, "sel", "Y");
  354. }
  355. ds_main_detlcodelst_item.filter("sel=='Y'");
  356. opener.objects[sDestXPath].clear();
  357. opener.objects[sDestXPath].copyData(ds_main_detlcodelst_item, true);
  358. ds_main_detlcodelst_item.filter("");
  359. opener.ds_temp.setColumn( 0, "okflag" , "ok");
  360. return 1;
  361. }
  362. /***==================================================================================================================================
  363. *소분류코드 선택항목 setting
  364. *==================================================================================================================================*/
  365. function fSetDataEtc(){
  366. var ret = -1;
  367. if( frmf_checkOpener() ){
  368. var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
  369. var idx = 0 ;
  370. idx = group3.grd_etclst.row;
  371. if( idx < 1) {
  372. sysf_messageBox("항목을 " , "C002");
  373. return -1;
  374. }
  375. var sAllYN = opener.frmf_getParameter("SPAHB00500_PARAM5"); //중분류코드 setting여부(Y_N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
  376. if( sAllYN == "Y" ) {
  377. copyNodesetType( sDestXPath , group3.grd_etcdetllst.nodeset , "replace", opener.model, model );
  378. }
  379. ret = 1;
  380. opener.ds_temp.setColumn( 0, "okflag" , "ok");
  381. }
  382. return ret ;
  383. }
  384. //=======================================================================================
  385. // Event
  386. //---------------------------------------------------------------------------------------
  387. /****************************************************************************************
  388. * Components : Form
  389. * Description : 화면 처음 초기화시 폼초기화
  390. ****************************************************************************************/
  391. function SPAHB00500_onload(obj:Form, e:LoadEventInfo) {
  392. frmf_initForm(obj);
  393. grdf_initGrid(group3.grd_etcdetllst);
  394. grdf_setGridSort(group3.grd_etclst);
  395. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  396. fInit();
  397. }
  398. /****************************************************************************************
  399. * Components : Grid
  400. * Description : 코드 선택
  401. ****************************************************************************************/
  402. function group3_grd_etcdetllst_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
  403. if( fDclSetData() == 1){
  404. this.close();
  405. }
  406. }
  407. /****************************************************************************************
  408. * Components : Button
  409. * Description : 조회
  410. ****************************************************************************************/
  411. function group3_group2_btn_search_onclick(obj:Button, e:ClickEventInfo) {
  412. fGetDetlCodeList(false);
  413. }
  414. /****************************************************************************************
  415. * Components : Grid
  416. * Description : 중분류 선택시 상세내역 조회
  417. ****************************************************************************************/
  418. function group3_grd_etclst_oncellclick(obj:Grid, e:GridClickEventInfo) {
  419. fGetDetlCodeList(false);
  420. }
  421. /****************************************************************************************
  422. * Components : Button
  423. * Description : 닫기
  424. ****************************************************************************************/
  425. function group4_btn_cncl_onclick(obj:Button, e:ClickEventInfo) {
  426. this.close();
  427. }
  428. /****************************************************************************************
  429. * Components : Button
  430. * Description : 확인
  431. ****************************************************************************************/
  432. function group4_btn_cfm_onclick(obj:Button, e:ClickEventInfo) {
  433. if( fSetData() == 1){
  434. this.close();
  435. }
  436. }
  437. function ds_main_detlcodelst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  438. {
  439. if(e.columnid=="sel") {
  440. obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
  441. }
  442. }
  443. /****************************************************************************************
  444. * Components : Combo
  445. * Description : 대분류 선택시 중분류 조회
  446. ****************************************************************************************/
  447. function group3_group2_cmb_clscd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  448. {
  449. fGetEtcList();
  450. }
  451. ]]></Script>
  452. </Form>
  453. </FDL>