123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRBC00200" position="absolute 0 0 1200 790" titletext="예산관리부서" oninit="SMRBC00200_oninit" onload="SMRBC00200_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 1195 23" id="group1">
- <Layouts>
- <Layout>
- <Static text="예산관리부서" position="absolute 0 0 115 24" id="caption6" class="tit_1" anchor="default"/>
- <Static id="caption4" class="patient_text_black" anchor="default" position="absolute 0 0 0 0"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 40 1195 784" id="group3" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 70 471 76" linetype="horizontal" id="line2" class="line_10"/>
- <Static text="부서목록" position="absolute 0 54 117 70" id="caption9" class="tit_2"/>
- <Div position="absolute 0 10 1194 45" align="align:center top;" id="grp_sea" class="div_SA">
- <Layouts>
- <Layout>
- <Shape position="absolute 1105 8 1111 30" linetype="vertical" id="line3" class="line_4"/>
- <Static text="부 서 :" position="absolute 11 9 75 26" id="caption5" class="search_name"/>
- <Edit position="absolute 75 8 155 27" id="ipt_deptcd" class="input_s_essential" taborder="3" autoselect="true" onkeydown="group3_grp_sea_ipt_deptcd_onkeydown"/>
- <Edit position="absolute 180 8 360 27" id="ipt_depthngnm" class="input_s_essential" taborder="3" autoselect="true" onkeydown="group3_grp_sea_ipt_depthngnm_onkeydown"/>
- <Button position="absolute 1123 8 1179 30" align="align:left middle;" id="btn_search" class="btn1" taborder="4" text="조회" onclick="group3_grp_sea_btn_search_onclick"/>
- <Button position="absolute 160 9 176 25" id="btn_help" class="icon_search" text="" onclick="group3_grp_sea_btn_help_onclick"/>
- <Combo position="absolute 479 8 654 27" id="cmb_instcd" class="combo_s_essential" taborder="1"/>
- <Static text="기 관 :" position="absolute 400 9 476 26" id="caption7" class="search_name"/>
- </Layout>
- </Layouts>
- </Div>
- <Button position="absolute 1037 50 1079 69" align="align:left middle;" id="button2" class="btn2" text="엑셀" onclick="group3_button2_onclick"/>
- <Shape position="absolute 476 70 1194 76" linetype="horizontal" id="line1" class="line_10"/>
- <Static text="예산관리부서 목록" position="absolute 476 54 607 70" id="caption3" class="tit_2"/>
- <Grid position="absolute 0 75 471 738" id="grd_deptlist" binddataset="ds_main_dept_deptlist" oncelldblclick="group3_grd_deptlist_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="279"/>
- </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="부서명"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow + 1"/>
- <Cell col="1" text="bind:instcd"/>
- <Cell col="2" style="align:left;" text="bind:deptcd"/>
- <Cell col="3" style="align:left;" text="bind:depthngnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 476 75 1193 738" id="grd_bugtlist" binddataset="ds_main_bugt_bugtlist">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="0"/>
- <Column size="80"/>
- <Column size="330"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="110"/>
- <Column size="124"/>
- <Column size="100"/>
- <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="출력순서"/>
- <Cell col="8" text="예산취합부서여부"/>
- <Cell col="9" text="org종료일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:instcd"/>
- <Cell col="2" style="align:left;" text="bind:deptcd"/>
- <Cell col="3" style="align:left;" text="bind:depthngnm"/>
- <Cell col="4" displaytype="date" edittype="date" text="bind:fromdd"/>
- <Cell col="5" displaytype="date" edittype="date" text="bind:todd"/>
- <Cell col="6" displaytype="checkbox" edittype="checkbox" text="bind:bugtuseyn" expr="expr:bugtuseyn == '1' || bugtuseyn == 'Y' ? '1' : '0'"/>
- <Cell col="7" displaytype="text" edittype="text" text="bind:bugtprntseq"/>
- <Cell col="8" displaytype="checkbox" edittype="checkbox" text="bind:bugtsumdeptyn" expr="expr:bugtsumdeptyn == '1' || bugtsumdeptyn == 'Y' ? '1' : '0'"/>
- <Cell col="9" text="bind:orgtodd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 1080 50 1138 69" id="btn_grdadd" class="btn2" text="행추가" onclick="group3_btn_grdadd_onclick"/>
- <Button position="absolute 1139 50 1192 69" id="btn_grddel" class="btn2" text="행삭제" onclick="group3_btn_grddel_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 23 1195 51" id="group2" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 22 1194 28" linetype="horizontal" id="line4" class="line_6" anchor="default"/>
- <Button position="absolute 1138 3 1194 25" id="btn_save" class="btn4" text="저장" anchor="default" onclick="group2_btn_save_onclick"/>
- <Button position="absolute 0 3 56 25" id="btn_prt" class="btn6" visible="false" text="출력" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_condition_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_dept_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_bugt_bugtlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_bugt_bugtlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="todd" type="STRING" size="256" sumtext="종료일자"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="시작일자"/>
- <Column id="bugtuseyn" type="STRING" size="256" sumtext="예산사용여부"/>
- <Column id="bugtprntseq" type="STRING" size="256" sumtext="예산서출력순서"/>
- <Column id="bugtsumdeptyn" type="STRING" size="256" sumtext="예산취합부서여부"/>
- <Column id="todd" type="STRING" size="256" sumtext="종료일자(초기)"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_bugttlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_bugt_bugtlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="todd" type="STRING" size="256" sumtext="종료일자"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="시작일자"/>
- <Column id="bugtuseyn" type="STRING" size="256" sumtext="예산사용여부"/>
- <Column id="bugtprntseq" type="STRING" size="256" sumtext="예산서출력순서"/>
- <Column id="bugtsumdeptyn" type="STRING" size="256" sumtext="예산취합부서여부"/>
- <Column id="todd" type="STRING" size="256" sumtext="종료일자(초기)"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group3.grp_sea.ipt_deptcd" propid="value" datasetid="ds_send_condition" columnid="deptcd"/>
- <BindItem id="item1" compid="group3.grp_sea.ipt_depthngnm" propid="value" datasetid="ds_send_condition" columnid="depthngnm"/>
- <BindItem id="item2" compid="group3.grp_sea.cmb_instcd" propid="value" datasetid="ds_send_condition" columnid="instcd"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : mis_bugtbaseinfoxp -> SMRBC00200
- * Creator : yjh
- * Make Date : 2017-11-16
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-11-16 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- include "mis_miscommonxp::RAC001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- //========================================================================================
- //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
- //========================================================================================
- function fCheckAuth() {
- btn_search.disabled = !checkAuth("R");
- btn_save.disabled = !checkAuth("X");
- btn_grdadd.disabled = !checkAuth("X");
- btn_grddel.disabled = !checkAuth("X");
- btn_prt.disabled = !checkAuth("P");
- }
- //========================================================================================
- //화면 로드시 초기화 함수
- //========================================================================================
- function fOpenForm() {
- ds_main_dept_deptlist.clearData();
- ds_main_bugt_bugtlist.clearData();
-
- misfComboComCdList("Z0007", group3.grp_sea.cmb_instcd, "N");
- ds_send_condition.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- // fGetBugtMngtList();
- }
- //========================================================================================
- //부서코드 조회
- //========================================================================================
- function fGetDeptList() {
- //기존 데이터 삭제
- ds_main_dept_deptlist.clearData();
- misfMsterDetailRetrieve();
-
-
-
- var oParam = {};
- oParam.id = "TRRBC00201";
- oParam.service = "bugtbaseinfoapp.BugtBaseInfo";
- oParam.method = "reqGetDeptList";
- oParam.inds = "req=ds_send_condition";
- oParam.outds = "ds_main_dept_deptlist=deptlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRBC00201";
- tranf_submit(oParam);
-
- ds_main_dept_deptlist.rowposition = -1;
- }
- //========================================================================================
- //예산관리부서 조회
- //========================================================================================
- function fGetBugtMngtList() {
- //기존 데이터 삭제
- model.removenode("/root/main/bugt/bugtlist");
- submit("TRRBC00202");
- }
- //========================================================================================
- // 저장버튼 클릭시 저장 수행 함수
- //========================================================================================
- function fClickSaveBtn() {
- if(!fIsValidForSave())//저장전 유효성 검사
- return;
- misfSave("TXRBC00201");
- }
- //========================================================================================
- //저장전 유효성 검사
- //========================================================================================
- function fIsValidForSave() {
- ds_main_bugt_bugtlist.enableevent = false;
- ds_main_bugt_bugtlist.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_bugt_bugtlist, "status");
-
- ds_main_bugt_bugtlist.updatecontrol = true;
- ds_main_bugt_bugtlist.enableevent = true;
-
- var sBugtList = grdf_getGridUpdateData(group3.grd_bugtlist, "all");
- if(sBugtList.rowcount == 0) {
- sysf_messageBox("변경된 데이터가","I004");
- return false;
- }else if(sBugtList.rowcount != 0 ) {
- ds_send_bugttlist.assign(sBugtList);
- return true;
- }
- }
- //========================================================================================
- //그리드 행 추가
- //========================================================================================
- function fAddGrid(pGrid) {
- var dept_row = ds_main_dept_deptlist.rowposition;
- if ( dept_row > -1 ) {
-
- var sInstCd = ds_main_dept_deptlist.getColumn(dept_row, "instcd");
- var sDeptCd = ds_main_dept_deptlist.getColumn(dept_row, "deptcd");
- var sDeptNm = ds_main_dept_deptlist.getColumn(dept_row, "depthngnm");
- for(var i = 0 ; i < ds_main_bugt_bugtlist.rowcount; i++)
- {
- if(ds_main_bugt_bugtlist.getColumn(i, "deptcd") == sDeptCd)
- {
- sysf_messageBox("이미 등록된 부 ","E008");
- return;
- }
- }
-
- ds_main_bugt_bugtlist.addRow();
-
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "instcd", sInstCd);
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "deptcd", sDeptCd);
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "depthngnm", sDeptNm);
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "fromdd", "18000101");
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "todd", "99991231");
- ds_main_bugt_bugtlist.setColumn(ds_main_bugt_bugtlist.rowposition, "bugtuseyn", "Y");
- pGrid.setCellPos(3);
- pGrid.showEditor(true);
- }else {
- sysf_messageBox("부서목록을 선택하지 ","E007");
- }
- }
- //========================================================================================
- //그리드 행 삭제
- //========================================================================================
- function fDelGrid(pGrid) {
- var cur_row = pGrid.row;
- if(cur_row > -1) {
- deleteSelectedRows(pGrid, true); //true : 바로삭제, false : 상태만 삭제로 변경
- model.refresh();
- }else if(cur_row == -1) {
- messageBox("삭제하려는 행을", "C002");
- }
- }
- //========================================================================================
- //부서코드 Help Open
- //========================================================================================
- function fOpenPopupDeptHelp(pControl, pInstance) {
- //02 부서코드Helper
- misfOpenPopUpList("02", pControl, "", pInstance);
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SMRBC00200
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SMRBC00200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SMRBC00200
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SMRBC00200_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setRowTypeIcon(group3.grd_bugtlist, 0);
- grdf_setGridSort(group3.grd_deptlist);
-
- fOpenForm();
- misfMsterDetailSet(group3.grd_deptlist, null, "TRRBC00201", "N");
- misfMsterDetailSet(group3.grd_bugtlist, null, "TRRBC00202", "Y");
- }
- /****************************************************************************************
- * Components : Edit
- * Components ID : ipt_deptcd
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 에디터 키 입력시
- ****************************************************************************************/
- function group3_grp_sea_ipt_deptcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- /****************************************************************************************
- * Components : Dataset
- * Components ID : ds_send_condition
- * Event : oncolumnchanged
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 데이터셋 값 변경시
- ****************************************************************************************/
- function ds_send_condition_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- switch( e.columnid ){
- case "deptcd" :
- case "depthngnm" :
- racfDeptValidCheck("deptcd,depthngnm");
- break;
-
- default :
- break;
- }
- }
- /****************************************************************************************
- * Components : Edit
- * Components ID : ipt_depthngnm
- * Event : onkeydown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 에디터 키 입력시
- ****************************************************************************************/
- function group3_grp_sea_ipt_depthngnm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_search
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 조회버튼 클릭시
- ****************************************************************************************/
- function group3_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetDeptList();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_help
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 돋보기버튼 클릭시
- ****************************************************************************************/
- function group3_grp_sea_btn_help_onclick(obj:Button, e:ClickEventInfo)
- {
- fOpenPopupDeptHelp(group3.grp_sea.ipt_deptcd, "deptcd,depthngnm");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button2
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 엑셀버튼 클릭시
- ****************************************************************************************/
- function group3_button2_onclick(obj:Button, e:ClickEventInfo)
- {
- //misfSaveExcel(grd_excelload);
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : grd_deptlist
- * Event : oncelldblclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 그리드 셀 더블클릭시
- ****************************************************************************************/
- function group3_grd_deptlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- fAddGrid(group3.grd_bugtlist);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_grdadd
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행추가버튼 클릭시
- ****************************************************************************************/
- function group3_btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- fAddGrid(group3.grd_bugtlist);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_grddel
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행삭제버튼 클릭시
- ****************************************************************************************/
- function group3_btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(group3.grd_bugtlist, "D");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_save
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 저장버튼 클릭시
- ****************************************************************************************/
- function group2_btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- fClickSaveBtn();
- }
- function ds_main_bugt_bugtlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- switch( e.columnid ){
- case "bugtuseyn" :
- case "bugtsumdeptyn" :
- if( e.newvalue == "1" || e.newvalue == "Y" ){
- obj.setColumn(e.row, e.columnid, "Y");
- }else{
- obj.setColumn(e.row, e.columnid, "N");
- }
- break;
-
- default :
- break;
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|