123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLLF01400" position="absolute 0 0 1256 805" titletext="사유코드관리" oninit="SMLLF01400_oninit" onload="SMLLF01400_onload">
- <Layouts>
- <Layout>
- <Button id="btn_save" taborder="3" text="저장" class="btn4" position="absolute 1200 0 1256 20" anchor="top right" positiontype="position" onclick="btn_save_onclick"/>
- <Static id="caption6" text="사유코드관리" class="tit_1" position="absolute 0 0 177 25" positiontype="position"/>
- <Static id="caption1" text="사유코드상세내역" class="tit_2" position="absolute 0 77 300 97" positiontype="position"/>
- <Edit id="input1" taborder="6" visible="false" position="absolute 127 74 277 94" oneditclick="input1_oneditclick" imemode="hangul" positiontype="position"/>
- <Grid id="grd_rsn" taborder="7" useinputpanel="false" position="absolute 0 97 1256 805" onmouseleave="grd_rsn_onmouseleave" anchor="all" autofittype="col" binddataset="ds_grid_grd_rsn" positiontype="position" autoenter="select" extendsizetype="row" autosizingtype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="30"/>
- <Column size="100"/>
- <Column size="130"/>
- <Column size="800"/>
- <Column size="60"/>
- <Column size="80"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="상태"/>
- <Cell col="2" text="사유코드유형"/>
- <Cell col="3" text="사유코드"/>
- <Cell col="4" text="사유"/>
- <Cell col="5" text="사용여부"/>
- <Cell col="6" text="표시순서"/>
- <Cell col="7" text="숨길꺼seq"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" celltype="head" displaytype="image"/>
- <Cell col="2" displaytype="text" edittype="expr:expr:getRowType(currow)==2?'text':'none'" style="align:middle;" text="bind:resncdkind" editlimit="2" editlengthunit="utf8"/>
- <Cell col="3" displaytype="text" edittype="expr:expr:getRowType(currow)==2?'text':'none'" style="align:middle;" text="bind:resncd" editlimit="5" editlengthunit="utf8"/>
- <Cell col="4" displaytype="text" edittype="expr:expr:getRowType(currow)==2?'textarea':'none'" text="bind:resndesc" wordwrap="word" editlimit="1000" editacceptsenter="true" editlengthunit="utf8" autosizerow="limitmin" autosizecol="default"/>
- <Cell col="5" displaytype="combo" edittype="combo" text="bind:resnuseyn" displayexpdec="-1" suppress="0" combodataset="ds_init_checkyn" combocodecol="cd" combodatacol="nm"/>
- <Cell col="6" displaytype="text" edittype="text" style="align:middle;" text="bind:resndispseq"/>
- <Cell col="7" text="bind:resndispseq"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_addrow" taborder="8" text="행추가" class="btn2" position="absolute 1200 74 1256 94" anchor="top right" positiontype="position" onclick="btn_addrow_onclick"/>
- <Div id="grp_sea" anchor="left top right" taborder="9" style="align:center top;" position="absolute 0 25 1256 67" class="div_SA">
- <Layouts>
- <Layout>
- <Static id="caption2" text="조회구분" class="search_name" position="absolute 8 10 98 30" positiontype="position"/>
- <Combo id="cmb_resn" taborder="15" class="combo_s_essential" position="absolute 81 10 261 30" positiontype="position" innerdataset="@ds_init_lb0117" codecolumn="cd" datacolumn="nm" onitemchanged="grp_sea_cmb_resn_onitemchanged"/>
- <Combo id="cmb_RefFlag" taborder="16" class="combo_s_essential" visible="false" position="absolute 264 10 414 30" positiontype="position" codecolumn="codecolumn" datacolumn="datacolumn"/>
- <Button id="btn_clear" taborder="17" text="초기화" class="btn1" position="absolute 1175 10 1244 30" anchor="top right" positiontype="position" onclick="grp_sea_btn_clear_onclick"/>
- <Button id="btn_Ref" taborder="18" text="조회" class="btn1" position="absolute 1116 10 1172 30" anchor="top right" positiontype="position" onclick="grp_sea_btn_Ref_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grid_grd_rsn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" cancolumnchange="ds_grid_grd_rsn_cancolumnchange">
- <ColumnInfo>
- <Column id="resncdkind" type="STRING"/>
- <Column id="resncd" type="STRING"/>
- <Column id="resndesc" type="STRING"/>
- <Column id="resnuseyn" type="STRING"/>
- <Column id="resndispseq" type="STRING"/>
- <Column id="resndispseq" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb0117" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_checkyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING"/>
- <Column id="nm" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cd">Y</Col>
- <Col id="nm">Y</Col>
- </Row>
- <Row>
- <Col id="cd">N</Col>
- <Col id="nm">N</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_print" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="able" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_execute" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="able" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="btn_save" propid="enable" datasetid="ds_execute" columnid="able"/>
- <BindItem id="item1" compid="btn_addrow" propid="enable" datasetid="ds_execute" columnid="able"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-09
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-09 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "lis_commonxp::LLZ001.xjs";
- function SMLLF01400_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMLLF01400_onload(obj:Form, e:LoadEventInfo)
- {
- //조회구분 콤보박스
- lf_initDataSet();
-
- //그리드 sort
- lf_menumaster();//메뉴권한
-
- grdf_setGridSort(grd_rsn);
- grdf_setRowTypeIcon(grd_rsn, 1);
- }
- function lf_initDataSet(){
- lf_getDbDeptcd("0117|","cbf_SMLLF01400");
- }
- //조회시 데이터 그리드에 가져오기
- function lf_GetRsnSearch(){
- var sInDsName = dsf_createDsRow("ds_cond_cond"
- , [{col:"resncdkind", val: grp_sea.cmb_resn.value}]);
- ds_grid_grd_rsn.clearData();
-
- var oParam = {};
- oParam.id = "TRLLF01401";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqGetResnList";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_grid_grd_rsn=resnlist";
- oParam.async = false;
- oParam.callback = "cbf_SMLLF01400";
- tranf_submit(oParam);
- }
- //데이터 저장
- function lf_saveRsnInfo(){
- // 서브밋호출
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "codeflag", val: ds_init_lb0117.getColumn(0,"nm")}]);
-
- var oParam = {};
- oParam.id = "TXLLF01401";
- oParam.service = "diagtestbaseinfomngtapp.GeneralTestBaseInfoMngt";
- oParam.method = "reqExeResn";
- oParam.inds = "cond=ds_grid_grd_rsn:U";
- oParam.async = false;
- oParam.callback = "cbf_SMLLF01400";
- tranf_submit(oParam);
- }
- //콜백함수
- function cbf_SMLLF01400(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0) sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- if(strSvcID == "TRLLF01401" && nErrorCode==0){
- }
- if(strSvcID == "TRLZZ00101" && nErrorCode==0){
- grp_sea.cmb_resn.index=0;
- lf_GetRsnSearch();
- return true;
- }
- }
- // 그리드 필수값 체크
- function lf_ckeckNull()
- {
- var nRow = grd_rsn.rowcount -1; //현재 행
- var updateds = grdf_getGridUpdateData(grd_rsn);
- if(updateds.rowcount > 0 ){ //추가된 행에 대하여
- for (i=0; i < updateds.rowcount; i++) {
- if(utlf_isNull(updateds.getColumn(i,"resncdkind")) // 사유코드
- || utlf_isNull(updateds.getColumn(i,"resncd"))
- || utlf_isNull(updateds.getColumn(i,"resndesc"))
- || utlf_isNull(updateds.getColumn(i,"resndispseq"))){ // 사유가 빈값이면
-
- sysf_messageBox("빈값이 존재", "E001");
-
- }else{ // 추가된 행에 빈 값이 없으면 저장
- var rtn = sysf_messageBox("저장된 내역은 수정하실 수 없습니다.\n이대로 ", "Q002");
-
- if(rtn == 7){ // 아니오 누를때
- return;
- }else{ // 예(6) 누르면 저장
- lf_saveRsnInfo();
- }
- }
- }
- }else{ // 추가 된 행이 없으면
- sysf_messageBox("저장 할 내용이 없습니다. \n사유코드를 저장 ", "E001"); // 할 수 없습니다.
- return;
- }
- }
-
- //진검 사용자별 메뉴권한
- function lf_menumaster(){
- var edit = frmf_checkAuth("X");
- var print = frmf_checkAuth("P");
- var eRow = ds_execute.addRow();
- var pRow = ds_print.addRow();
-
- if(edit == true){
- ds_execute.setColumn(eRow,"able",true);
- }
- if(print == true){
- ds_print.setColumn(pRow,"able",true);
- }
- }
- //조회버튼 클릭시
- function grp_sea_btn_Ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetRsnSearch();
- }
- //초기화 버튼 클릭시
- function grp_sea_btn_clear_onclick(obj:Button, e:ClickEventInfo)
- {
- grp_sea.cmb_resn.index=0; // 콤보박스 첫번째 항목 선택
- ds_grid_grd_rsn.clearData();
- }
- // 저장버튼 클릭시
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_ckeckNull(); // 빈값 있는지 확인
- }
- //행 추가
- function btn_addrow_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow=ds_grid_grd_rsn.addRow();
- var iresncdkind=ds_grid_grd_rsn.getColumn(ds_grid_grd_rsn.row,"resncdkind"); //현재 사유코드유형번호
- ds_grid_grd_rsn.setColumn(nRow,"resncdkind",iresncdkind);
-
- var iresndispseq = ds_grid_grd_rsn.getColumn(nRow-1,"resndispseq")+1; // 표시순서번호
- ds_grid_grd_rsn.setColumn(nRow,"resndispseq",iresndispseq);
-
- ds_grid_grd_rsn.setColumn(nRow,"resnuseyn","Y"); //사용번호
-
-
- }
- //콤보박스에서 고르고나면
- function grp_sea_cmb_resn_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea_btn_Ref_onclick();
- }
- ]]></Script>
- </Form>
- </FDL>
|