123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPAHB00500" position="absolute 0 0 519 544" titletext="기본코드선택" onload="SPAHB00500_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 518 515" id="group3" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Grid position="absolute 0 208 517 515" id="grd_etcdetllst" binddataset="ds_main_detlcodelst_item" cellclickbound="cell" oncelldblclick="group3_grd_etcdetllst_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="28"/>
- <Column size="104"/>
- <Column size="362"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox"/>
- <Cell col="2" text="코드"/>
- <Cell col="3" text="명칭"/>
- <Cell col="4" text="etccd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:sel" expr="expr:(sel=="Y"||sel==1)?1:0"/>
- <Cell col="2" displaytype="text" text="bind:etcdetlcd"/>
- <Cell col="3" displaytype="text" text="bind:etcdetlnm"/>
- <Cell col="4" text="bind:etccd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div position="absolute 0 0 517 40" align="align:center top;" id="group2" class="div_SA2">
- <Layouts>
- <Layout>
- <Static text="대분류 :" position="absolute 16 11 102 28" id="caption2" class="search_name"/>
- <Button position="absolute 445 9 501 31" id="btn_search" class="btn1" text="조회" onclick="group3_group2_btn_search_onclick"/>
- <Shape position="absolute 426 9 432 30" linetype="vertical" id="line13"/>
- <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"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape position="absolute 0 40 517 46" id="line1" class="line_10"/>
- <Grid position="absolute 0 45 517 203" id="grd_etclst" binddataset="ds_init_etclst_item" oncellclick="group3_grd_etclst_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="104"/>
- <Column size="362"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="코드"/>
- <Cell col="2" text="명칭"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" displaytype="text" text="bind:etccd"/>
- <Cell col="2" displaytype="text" text="bind:etcdetlnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape position="absolute 0 203 517 209" id="line2" class="line_10"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 515 517 543" id="group4" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 461 3 517 25" id="btn_cncl" class="btn4" text="취소" onclick="group4_btn_cncl_onclick"/>
- <Button position="absolute 402 3 458 25" id="btn_cfm" class="btn4" text="확인" onclick="group4_btn_cfm_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <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">
- <ColumnInfo>
- <Column id="sel" type="STRING" size="256"/>
- <Column id="etcdetlcd" type="STRING" size="256"/>
- <Column id="etcdetlnm" type="STRING" size="256"/>
- <Column id="etccd" type="STRING" size="256"/>
- <Column id="etcdetlcdkey" type="STRING" size="256"/>
- <Column id="etcitemcnts" type="STRING" size="256"/>
- <Column id="etcitemcnts2" type="STRING" size="256"/>
- <Column id="useyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="sel"/>
- <Col id="etcdetlcd"/>
- <Col id="etcdetlnm"/>
- <Col id="etccd"/>
- <Col id="etcdetlcdkey"/>
- <Col id="etcitemcnts"/>
- <Col id="etcitemcnts2"/>
- <Col id="useyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="clscd" type="STRING" size="256"/>
- <Column id="etccd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="clscd"/>
- <Col id="etccd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_etclst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="etccd" type="STRING" size="256"/>
- <Column id="etcdetlnm" type="STRING" size="256"/>
- <Column id="etccdkey" type="STRING" size="256"/>
- <Column id="useyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="etccd"/>
- <Col id="etcdetlnm"/>
- <Col id="etccdkey"/>
- <Col id="useyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="sellst" type="STRING" size="256"/>
- <Column id="okflag" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="hidden" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="hidden"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_selectinput_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="etcdetlnm" type="STRING" size="256"/>
- <Column id="etcdetlcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="etcdetlnm"/>
- <Col id="etcdetlcd"/>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group3.group2.cmb_clscd" propid="value" datasetid="ds_send" columnid="clscd"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-12-04
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- /**
- * SPAHB00500_PARAM1 : 대분류코드
- * SPAHB00500_PARAM2 : 중분류코드
- * SPAHB00500_PARAM3 : multiyn => Y이면 소분류코드 다중선택입력모드
- * SPAHB00500_PARAM4 : 목적노드셋
- * SPAHB00500_PARAM5 : 중분류코드 setting여부(Y_N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
- */
- var sMultyYN = opener.frmf_getParameter("SPAHB00500_PARAM3");
- var midFlag = opener.frmf_getParameter("SPAHB00500_PARAM5");
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 초기화
- ****************************************************************************************/
- function fInit(){
- fGetLargeClassCdList() ;
- ds_main_detlcodelst_item.clearData();
- ds_init_etclst_item.clearData();
-
- if( sMultyYN == "N" ) {
- misfColHidden(group3.grd_etcdetllst, "sel", true);
- // group3.chk_allyn.visible = false;
- }else if(sMultyYN == "Y") {
- misfColHidden(group3.grd_etcdetllst, "sel", false);
- // group3.chk_allyn.visible = true;
- }
- if( frmf_checkOpener() || (midFlag =="Y")){
- sMultyYN = opener.frmf_getParameter("SPAHB00500_PARAM3");
- ds_send.setColumn( 0, "clscd" , opener.frmf_getParameter("SPAHB00500_PARAM1"));
- ds_send.setColumn( 0, "etccd" , opener.frmf_getParameter("SPAHB00500_PARAM2"));
-
- fGetEtcList();
- dsf_makeValue( ds_send, "clscd", "string", opener.frmf_getParameter("SPAHB00500_PARAM1"));
- dsf_makeValue( ds_send, "etccd", "string", opener.frmf_getParameter("SPAHB00500_PARAM2"));
-
- fGetDetlCodeList(true);
-
- opener.dsf_createDsRow("ds_temp", [{col:"okflag", type:"STRING", size:256, val:""}]);
- }
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 대분류 초기화
- ****************************************************************************************/
- function fGetLargeClassCdList(){
- var ret = null;
- var oParam = {};
- oParam.id = "TRAHB00603";
- oParam.service = "healexambaseapp.EtcCode";
- oParam.method = "reqGetSelInput";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_selectinput_item=item";
- oParam.async = false;
- oParam.callback = "cf_TRAHB00603";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRAHB00603") > -1) ret = true;
- else ret = false;
- return ret;
- }
- function cf_TRAHB00603(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 중분류 초기화
- ****************************************************************************************/
- function fGetEtcList(){
- var sClscd = ds_send.getColumn(0, "clscd");
- if( utlf_isNull(sClscd) ) return ;
- ds_init_etclst_item.clearData();
- ds_main_detlcodelst_item.clearData();
- var ret = null;
- var oParam = {};
- oParam.id = "TRAHB00601";
- oParam.service = "healexambaseapp.EtcCode";
- oParam.method = "reqGetEtcList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_etclst_item=item";
- oParam.async = false;
- oParam.callback = "cf_TRAHB00601";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRAHB00601") > -1) ret = true;
- else ret = false;
-
- return ret;
- }
- function cf_TRAHB00601(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 분류별 상세코드내역 조회
- ****************************************************************************************/
- function fGetDetlCodeList(vFlag){
- if (vFlag==false) {
- var idx = ds_init_etclst_item.rowposition;
- if( idx < 0 ) return ;
- ds_send.setColumn( 0, "etccd", ds_init_etclst_item.getColumn(idx, 1) );
- }
-
- var sClscd = ds_send.getColumn(0, "clscd");
- if( utlf_isNull(sClscd) ) return ;
- sClscd = ds_send.getColumn(0, "etccd");
- if( utlf_isNull(sClscd) ) return ;
- ds_main_detlcodelst_item.clearData();
- var ret = null;
- var oParam = {};
- oParam.id = "TRAHB00602";
- oParam.service = "healexambaseapp.EtcCode";
- oParam.method = "reqGetDetlCodeList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_detlcodelst_item=item";
- oParam.async = false;
- oParam.callback = "cf_TRAHB00602";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TRAHB00602") > -1) ret = true;
- else ret = false;
- }
- function cf_TRAHB00602(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- ds_main_detlcodelst_item.updatecontrol = false;
- dsf_setFixVal(ds_main_detlcodelst_item, "sel:N");
- ds_main_detlcodelst_item.updatecontrol = true;
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 소분류코드 선택항목 setting
- ****************************************************************************************/
- function fDclSetData(){
- if( frmf_checkOpener() ){
- var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
- var idx = 0 ;
- idx = ds_main_detlcodelst_item.rowposition;
- if( idx < 0 ) {
- sysf_messageBox("항목을 " , "C002");
- return -1;
- }
-
- ds_main_detlcodelst_item.setColumn(idx, "sel", "Y");
- ds_main_detlcodelst_item.filter("sel=='Y'");
- opener.objects[sDestXPath].clear();
- opener.objects[sDestXPath].copyData(ds_main_detlcodelst_item, true);
- ds_main_detlcodelst_item.filter("");
- opener.ds_temp.setColumn( 0, "okflag" , "ok");
- return 1;
- }
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 선택항목 세팅
- ****************************************************************************************/
- function fSetData() {
- var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
- if(sMultyYN == "Y") {
- }else {
- var idx = ds_main_detlcodelst_item.rowposition;
- if( idx < 0) {
- sysf_messageBox("항목을 " , "C002");
- return -1;
- }
-
- ds_main_detlcodelst_item.setColumn(idx, "sel", "Y");
- }
-
- ds_main_detlcodelst_item.filter("sel=='Y'");
- opener.objects[sDestXPath].clear();
- opener.objects[sDestXPath].copyData(ds_main_detlcodelst_item, true);
- ds_main_detlcodelst_item.filter("");
- opener.ds_temp.setColumn( 0, "okflag" , "ok");
-
- return 1;
- }
- /***==================================================================================================================================
- *소분류코드 선택항목 setting
- *==================================================================================================================================*/
- function fSetDataEtc(){
- var ret = -1;
- if( frmf_checkOpener() ){
- var sDestXPath = opener.frmf_getParameter("SPAHB00500_PARAM4");
- var idx = 0 ;
- idx = group3.grd_etclst.row;
- if( idx < 1) {
- sysf_messageBox("항목을 " , "C002");
- return -1;
- }
- var sAllYN = opener.frmf_getParameter("SPAHB00500_PARAM5"); //중분류코드 setting여부(Y_N)=>선택형결과의 경우 중분류 선택시 중분류 코드 해당 중분류에 속한 소분류 전코드를 부모창에 copy
- if( sAllYN == "Y" ) {
- copyNodesetType( sDestXPath , group3.grd_etcdetllst.nodeset , "replace", opener.model, model );
- }
- ret = 1;
- opener.ds_temp.setColumn( 0, "okflag" , "ok");
- }
- return ret ;
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SPAHB00500_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- grdf_initGrid(group3.grd_etcdetllst);
- grdf_setGridSort(group3.grd_etclst);
- //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
- fInit();
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 코드 선택
- ****************************************************************************************/
- function group3_grd_etcdetllst_oncelldblclick(obj:Grid, e:GridClickEventInfo) {
- if( fDclSetData() == 1){
- this.close();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function group3_group2_btn_search_onclick(obj:Button, e:ClickEventInfo) {
- fGetDetlCodeList(false);
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 중분류 선택시 상세내역 조회
- ****************************************************************************************/
- function group3_grd_etclst_oncellclick(obj:Grid, e:GridClickEventInfo) {
- fGetDetlCodeList(false);
- }
- /****************************************************************************************
- * Components : Button
- * Description : 닫기
- ****************************************************************************************/
- function group4_btn_cncl_onclick(obj:Button, e:ClickEventInfo) {
- this.close();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 확인
- ****************************************************************************************/
- function group4_btn_cfm_onclick(obj:Button, e:ClickEventInfo) {
- if( fSetData() == 1){
- this.close();
- }
- }
- function ds_main_detlcodelst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid=="sel") {
- obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
- }
- }
- /****************************************************************************************
- * Components : Combo
- * Description : 대분류 선택시 중분류 조회
- ****************************************************************************************/
- function group3_group2_cmb_clscd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fGetEtcList();
- }
- ]]></Script>
- </Form>
- </FDL>
|