123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMZHA20501" position="absolute 0 0 1238 805" titletext="부서장관리" oninit="SMZHA20501_oninit" onload="SMZHA20501_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 785 41" id="grp_search" class="div_SA2">
- <Layouts>
- <Layout>
- <Static text="결재분류" position="absolute 20 11 96 31" id="caption20" class="search_name" anchor="default"/>
- <Button position="absolute 703 11 767 31" id="btn_search" class="btn1" text="조회" anchor="default" onclick="grp_search_btn_search_onclick"/>
- <Combo position="absolute 115 11 305 31" id="cmb_search" class="combo_search" innerdataset="ds_init_cmb_search" datacolumn="cdnm" codecolumn="cdid" anchor="default"/>
- <Combo position="absolute 450 11 600 31" id="cmb_instcd" class="combo_search" innerdataset="ds_init_cmb_instcd" datacolumn="cdnm" codecolumn="cdid" anchor="default" onitemchanged="grp_search_cmb_instcd_onitemchanged"/>
- <Static text="기 관" position="absolute 380 11 440 31" id="caption4" class="search_name" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Static text="부서장조건" position="absolute 0 53 87 73" align="align:center middle;" id="caption1" class="tit_2"/>
- <Button position="absolute 157 50 221 70" id="btn_del_cond" class="btn2" text="조건삭제" onclick="btn_del_cond_onclick"/>
- <Button position="absolute 90 50 154 70" id="btn_reg_menuauthuser" class="btn2" visible="true" text="조건추가" onclick="btn_reg_menuauthuser_onclick"/>
- <Button position="absolute 795 21 851 41" id="btn_save" class="btn4" text="저장" anchor="top right" onclick="btn_save_onclick"/>
- <Grid position="absolute 0 71 785 805" id="grd_cond" binddataset="ds_grd_cond" autofittype="col" anchor="all" onexpandup="grd_cond_onexpandup" autoenter="select" autoupdatetype="comboselect">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="132"/>
- <Column size="183"/>
- <Column size="177"/>
- <Column size="168"/>
- <Column size="85"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <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="seq"/>
- <Cell col="7" text="deptcd"/>
- <Cell col="8" text="gubun"/>
- <Cell col="9" text="jobkindcd"/>
- <Cell col="10" text="jobposcd"/>
- <Cell col="11" text="instcd"/>
- <Cell col="12" text="trgtdeptcd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="expand" text="bind:jobkindnm" expandshow="show" expandsize="16"/>
- <Cell col="2" displaytype="text" edittype="expand" text="bind:jobposnm" expandshow="show" expandsize="16"/>
- <Cell col="3" displaytype="text" edittype="expand" text="bind:deptnm" expandshow="show" expandsize="16"/>
- <Cell col="4" displaytype="text" edittype="expand" text="bind:trgtdeptnm" expandshow="show" expandsize="16"/>
- <Cell col="5" displaytype="combo" edittype="combo" text="bind:trgtdeptgb" combodataset="ds_init_trgtdept" combocodecol="value" combodatacol="label"/>
- <Cell col="6" text="bind:seq"/>
- <Cell col="7" text="bind:deptcd"/>
- <Cell col="8" text="bind:gubun"/>
- <Cell col="9" text="bind:jobkindcd"/>
- <Cell col="10" text="bind:jobposcd"/>
- <Cell col="11" text="bind:instcd"/>
- <Cell col="12" text="bind:trgtdeptcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 795 71 1238 421" id="grd_allow" binddataset="ds_grd_allow" autofittype="col" anchor="top right bottom" onexpandup="grd_allow_onexpandup" autoenter="select">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="203"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <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="deptcd"/>
- <Cell col="6" text="gubun"/>
- <Cell col="7" text="seq"/>
- <Cell col="8" text="instcd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="expand" text="bind:emplno" expandshow="show" expandsize="16"/>
- <Cell col="2" text="bind:name"/>
- <Cell col="3" displaytype="text" edittype="expand" text="bind:deptnm" expandshow="show" expandsize="16"/>
- <Cell col="4"/>
- <Cell col="5" text="bind:deptcd"/>
- <Cell col="6" text="bind:gubun"/>
- <Cell col="7" text="bind:seq"/>
- <Cell col="8" text="bind:instcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="특별허용자" position="absolute 795 53 886 73" align="align:center middle;" id="caption2" class="tit_2" anchor="top right"/>
- <Button position="absolute 899 50 963 70" id="button1" class="btn2" visible="true" text="조건추가" anchor="top right" onclick="button1_onclick"/>
- <Button position="absolute 966 50 1030 70" id="button2" class="btn2" text="조건삭제" anchor="top right" onclick="button2_onclick"/>
- <Grid position="absolute 795 455 1238 805" id="grd_deny" binddataset="ds_grd_deny" autofittype="col" anchor="right bottom" autoenter="select" onexpandup="grd_deny_onexpandup">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="203"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <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="deptcd"/>
- <Cell col="5" text="gubun"/>
- <Cell col="6" text="seq"/>
- <Cell col="7" text="instcd"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="expand" text="bind:emplno" expandshow="show" expandsize="16"/>
- <Cell col="2" text="bind:name"/>
- <Cell col="3" displaytype="text" edittype="expand" text="bind:deptnm" expandshow="show" expandsize="16"/>
- <Cell col="4" text="bind:deptcd"/>
- <Cell col="5" text="bind:gubun"/>
- <Cell col="6" text="bind:seq"/>
- <Cell col="7" text="bind:instcd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 899 434 963 454" id="button3" class="btn2" visible="true" text="조건추가" anchor="right bottom" onclick="button3_onclick"/>
- <Button position="absolute 966 434 1030 454" id="button4" class="btn2" text="조건삭제" anchor="right bottom" onclick="button4_onclick"/>
- <Static text="특별제한자" position="absolute 795 437 882 457" align="align:center middle;" id="caption3" class="tit_2" anchor="right bottom"/>
- <Div id="div_wsearch" taborder="2" position="absolute 456 46 785 70" style="background:antiquewhite;border:1 solid #808080ff ;bordertype:round 2 2 ;">
- <Layouts>
- <Layout>
- <Static id="Static00" text="단어검색 :" class="search_name" position="absolute 15 2 92 22" anchor="default"/>
- <Edit id="edit_wsearch" taborder="1" position="absolute 91 1 247 21" anchor="default" onkeydown="div_wsearch_edit_wsearch_onkeydown" imemode="hangul"/>
- <Button id="btn_wsearch_pre" taborder="2" position="absolute 271 1 291 21" class="icon_pre" anchor="default" onclick="div_wsearch_btn_wsearch_pre_onclick"/>
- <Button id="btn_wsearch_next" taborder="3" position="absolute 293 1 313 21" class="icon_next" anchor="default" onclick="div_wsearch_btn_wsearch_next_onclick"/>
- <Button id="btn_wsearch" taborder="4" position="absolute 248 1 268 21" class="icon_search" anchor="default" onclick="div_wsearch_btn_wsearch_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_init_cmb_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING"/>
- <Column id="cdid" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_instcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING"/>
- <Column id="cdid" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="seq" type="STRING" size="256" sumtext="직종코드"/>
- <Column id="jobkindcd" type="STRING" size="256" sumtext="직종코드"/>
- <Column id="jobkindnm" type="STRING" size="256" sumtext="직종명"/>
- <Column id="jobposcd" type="STRING" size="256" sumtext="직위코드"/>
- <Column id="jobposnm" type="STRING" size="256" sumtext="직위명"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="trgtdeptgb" type="STRING" size="256" sumtext="대상부서"/>
- <Column id="gubun" type="STRING" size="256" sumtext="구분"/>
- <Column id="trgtdeptcd" type="STRING" size="256" sumtext="결재대상부서코드"/>
- <Column id="trgtdeptnm" type="STRING" size="256" sumtext="결재대상부서코드"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_allow" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="seq" type="STRING" size="256" sumtext="seq"/>
- <Column id="gubun" type="STRING" size="256" sumtext="구분"/>
- <Column id="emplno" type="STRING" size="256" sumtext="사번"/>
- <Column id="name" type="STRING" size="256" sumtext="이름"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_deny" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="seq" type="STRING" size="256" sumtext="seq"/>
- <Column id="gubun" type="STRING" size="256" sumtext="구분"/>
- <Column id="emplno" type="STRING" size="256" sumtext="사번"/>
- <Column id="name" type="STRING" size="256" sumtext="이름"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden_searchdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="gubun" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="gubun"/>
- <Col id="instcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_searchdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_savedata_allow" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_savedata_deny" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_trgtdept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">인사근무지</Col>
- <Col id="value">B</Col>
- </Row>
- <Row>
- <Col id="label">해당부서</Col>
- <Col id="value">C</Col>
- </Row>
- <Row>
- <Col id="label">근무지부서</Col>
- <Col id="value">E</Col>
- </Row>
- <Row>
- <Col id="label">하위부서</Col>
- <Col id="value">G</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_search.cmb_search" propid="value" datasetid="ds_hidden_searchdata" columnid="gubun"/>
- <BindItem id="item1" compid="grp_search.cmb_instcd" propid="value" datasetid="ds_hidden_searchdata" columnid="instcd"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2016-01-07
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2016-01-07 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- function SMZHA20501_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMZHA20501_onload(obj:Form, e:LoadEventInfo)
- {
- fInitialize();
- }
- function grp_search_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_search.btn_search.click();
- }
- var posGrdCond;
- var posGrdAllow;
- var posGrdDeny;
- function grp_search_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_send_searchdata.copyData(ds_hidden_searchdata);
-
- posGrdCond = grd_cond.vscrollbar.pos;
- posGrdAllow = grd_allow.vscrollbar.pos;
- posGrdDeny = grd_deny.vscrollbar.pos;
-
- ds_grd_cond.enableevent = false;
- ds_grd_allow.enableevent = false;
- ds_grd_deny.enableevent = false;
-
- var oParam = {};
- oParam.id = "TRZHA20501";
- oParam.service = "reqprgmapp.ReqPrgm";
- oParam.method = "reqGetDeptMgrCondList";
- oParam.inds = "req=ds_send_searchdata";
- oParam.outds = "ds_grd_cond=condlist ds_grd_allow=allowlist ds_grd_deny=denylist";
- oParam.async = true;
- oParam.callback = "cf_TRZHA20501";
- tranf_submit(oParam);
- }
- function cf_TRZHA20501(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- grd_cond.vscrollbar.pos = posGrdCond;
- grd_allow.vscrollbar.pos = posGrdAllow;
- grd_deny.vscrollbar.pos = posGrdDeny;
-
- ds_grd_cond.rowposition = -1;
- ds_grd_allow.rowposition = -1;
- ds_grd_deny.rowposition = -1;
-
- ds_grd_cond.enableevent = true;
- ds_grd_allow.enableevent = true;
- ds_grd_deny.enableevent = true;
- }
- function btn_reg_menuauthuser_onclick(obj:Button, e:ClickEventInfo)
- {
- var iRow = ds_grd_cond.addRow();
-
- fSetRowValue("ds_grd_cond", "trgtdeptgb", "B", iRow); //인사근무지
- fSetRowValue("ds_grd_cond", "gubun", ds_hidden_searchdata.getColumn(0, "gubun"), iRow);
- fSetRowValue("ds_grd_cond", "instcd", ds_hidden_searchdata.getColumn(0, "instcd"), iRow);
- }
- function btn_del_cond_onclick(obj:Button, e:ClickEventInfo)
- {
- var cur_row = ds_grd_cond.rowposition; // 행 번호 가져오기
- var iStatus = ds_grd_cond.getRowType(cur_row);
- if(cur_row < 0) {
- alert("삭제할 조건행을 선택해주세요.");
- return;
- }
- if (iStatus == Dataset.ROWTYPE_INSERT) { // 새로 삽입된 행이면
- ds_grd_cond.deleteRow(cur_row);
- } else {
- var rtn = sysf_messageBox("부서장조건을 ", "Q001");
- if(rtn == 6){
- ds_grd_cond.updatecontrol = false;
- ds_grd_cond.setRowType(cur_row, Dataset.ROWTYPE_DELETE);
- ds_grd_cond.updatecontrol = true;
-
- var oDsUpdate = grdf_getGridUpdateData(grd_cond, "delete");
-
- grdf_setStatusColumn(oDsUpdate, "status");
- ds_send_savedata.copyData(oDsUpdate, true);
-
- ds_send_savedata_allow.clearData();
- ds_send_savedata_deny.clearData();
-
- var oParam = {};
- oParam.id = "TXZHA20501";
- oParam.service = "reqprgmapp.ReqPrgm";
- oParam.method = "reqExeSaveDeptMgrCond";
- oParam.inds = "req=ds_send_savedata req_allow=ds_send_savedata_allow req_deny=ds_send_savedata_deny";
- oParam.typeStr = "status";
- oParam.async = false;
- oParam.callback = "cf_TXZHA20501";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TXZHA20501(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- var jRow = ds_grd_cond.rowposition;
- ds_grd_cond.deleteRow(jRow);
- ds_grd_cond.applyChange(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- fSave();
- grp_search.btn_search.click();
- }
- function fSave(){
- var oDsUpdate = grdf_getGridUpdateData(grd_cond);
- grdf_setStatusColumn(oDsUpdate, "status");
- ds_send_savedata.copyData(oDsUpdate, true);
-
- var oDsUpdate_allow = grdf_getGridUpdateData(grd_allow);
- grdf_setStatusColumn(oDsUpdate_allow, "status");
- ds_send_savedata_allow.copyData(oDsUpdate_allow, true);
-
- var oDsUpdate_deny = grdf_getGridUpdateData(grd_deny);
- grdf_setStatusColumn(oDsUpdate_deny, "status");
- ds_send_savedata_deny.copyData(oDsUpdate_deny, true);
-
- var oParam = {};
- oParam.id = "TXZHA20501";
- oParam.service = "reqprgmapp.ReqPrgm";
- oParam.method = "reqExeSaveDeptMgrCond";
- oParam.inds = "req=ds_send_savedata req_allow=ds_send_savedata_allow req_deny=ds_send_savedata_deny";
- oParam.async = false;
- tranf_submit(oParam);
- }
- function fInitialize(){
- grdf_setRowTypeIcon(grd_cond, 0);
- grdf_setRowTypeIcon(grd_allow, 0);
- grdf_setRowTypeIcon(grd_deny, 0);
-
- grdf_initGrid(grd_cond);
- grdf_initGrid(grd_allow);
- grdf_initGrid(grd_deny);
-
- misfComboComCdList("C0117", grp_search.cmb_search, "N"); //구분
- misfComboComCdList("C0048", grp_search.cmb_instcd, "N"); //기관
-
- ds_hidden_searchdata.setColumn(0, "gubun","01");
- ds_hidden_searchdata.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- }
- function fSetRowValue(sDataSet, destinationelement, sourceelement, row) {
- this.objects[sDataSet].setColumn(row, destinationelement, sourceelement);
- }
- function grd_cond_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- if (grdf_getBindCellName(obj, e.col) == "jobkindnm" ) { //직종
- var recv_list = "jobkindcd,jobkindnm";
- misfOpenPopUpList("03", ds_grd_cond,"R0061", recv_list) ;
- } else if (grdf_getBindCellName(obj, e.col) == "jobposnm" ) { //직위
- var recv_list = "jobposcd,jobposnm";
- misfOpenPopUpList("03", ds_grd_cond,"R0062", recv_list);
- } else if (grdf_getBindCellName(obj, e.col) == "deptnm" ) { //근무지부서
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ds_grd_cond,"", recv_list, ds_grd_cond.getColumn(e.row, "instcd"), "instcd");
- } else if (grdf_getBindCellName(obj, e.col) == "trgtdeptnm" ) { //결재대상부서
- var recv_list = "trgtdeptcd,trgtdeptnm";
- misfOpenPopUpList("02", ds_grd_cond,"", recv_list, ds_grd_cond.getColumn(e.row, "instcd"), "instcd");
- }
- }
- function div_wsearch_edit_wsearch_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13) {
- div_wsearch.btn_wsearch.click();
- div_wsearch.btn_wsearch_next.setFocus();
- }
- }
- var lastStartRow = 0;
- var lastEndRow = 0;
- function div_wsearch_btn_wsearch_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearchWord("next");
- }
- function fSearchWord(type) {
- var word = div_wsearch.edit_wsearch.text;
-
- var findRow = -1;
-
- if(type == "prev") {
- lastStartRow = 0;
- lastEndRow = ds_grd_cond.rowposition - 1;
- } else if(type == "next") {
- lastStartRow = ds_grd_cond.rowposition + 1;
- lastEndRow = ds_grd_cond.rowcount;
- }
-
- if(lastEndRow == 0) lastEndRow = ds_grd_cond.rowcount;
-
- if(type == "prev") {
- for(var i = lastEndRow - 1; i >= lastStartRow; i--) {
- for(var j = 0; j < ds_grd_cond.colcount; j++) {
- var text = ds_grd_cond.getColumn(i, j);
- if(utlf_isNull(text)) continue;
-
- if(text.indexOf(word) > -1) {
- findRow = i;
- break;
- }
- }
-
- if(findRow > -1) break;
- }
- } else {
- for(var i = lastStartRow; i < lastEndRow; i++) {
- for(var j = 0; j < ds_grd_cond.colcount; j++) {
- var text = ds_grd_cond.getColumn(i, j);
- if(utlf_isNull(text)) continue;
-
- if(text.indexOf(word) > -1) {
- findRow = i;
- break;
- }
- }
-
- if(findRow > -1) break;
- }
- }
-
- if(findRow > -1)
- ds_grd_cond.rowposition = findRow;
- }
- function div_wsearch_btn_wsearch_pre_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearchWord("prev");
- }
- function div_wsearch_btn_wsearch_next_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearchWord("next");
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- var iRow = ds_grd_allow.addRow();
-
- fSetRowValue("ds_grd_allow", "gubun", ds_hidden_searchdata.getColumn(0, "gubun"), iRow);
- fSetRowValue("ds_grd_allow", "instcd", ds_hidden_searchdata.getColumn(0, "instcd"), iRow);
- }
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- var cur_row = ds_grd_allow.rowposition; // 행 번호 가져오기
- var iStatus = ds_grd_allow.getRowType(cur_row);
- if(cur_row < 0) {
- alert("삭제할 조건행을 선택해주세요.");
- return;
- }
- if (iStatus == Dataset.ROWTYPE_INSERT) { // 새로 삽입된 행이면
- ds_grd_allow.deleteRow(cur_row);
- } else {
- var rtn = sysf_messageBox("특별허용자 조건을 ", "Q001");
- if(rtn == 6){
- ds_grd_allow.updatecontrol = false;
- ds_grd_allow.setRowType(cur_row, Dataset.ROWTYPE_DELETE);
- ds_grd_allow.updatecontrol = true;
-
- ds_send_savedata.clearData();
-
- var oDsUpdate = grdf_getGridUpdateData(grd_allow, "delete");
- grdf_setStatusColumn(oDsUpdate, "status");
- ds_send_savedata_allow.copyData(oDsUpdate, true);
-
- ds_send_savedata_deny.clearData();
-
- var oParam = {};
- oParam.id = "TXZHA20501";
- oParam.service = "reqprgmapp.ReqPrgm";
- oParam.method = "reqExeSaveDeptMgrCond";
- oParam.inds = "req=ds_send_savedata req_allow=ds_send_savedata_allow req_deny=ds_send_savedata_deny";
- oParam.typeStr = "status";
- oParam.async = false;
- oParam.callback = "cf_TXZHA20502";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TXZHA20502(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- var jRow = ds_grd_allow.rowposition;
- ds_grd_allow.deleteRow(jRow);
- ds_grd_allow.applyChange(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
- function grd_allow_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- if (grdf_getBindCellName(obj, e.col) == "deptnm" ) { //부서
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ds_grd_allow,"", recv_list, ds_grd_allow.getColumn(e.row, "instcd"), "instcd");
- }else if(grdf_getBindCellName(obj, e.col) == "emplno" ) { //사용자
- var recv_list = "emplno,name";
- misfOpenPopUpList("01", ds_grd_allow,"", recv_list, ds_grd_allow.getColumn(e.row, "instcd"), "instcd");
- }
- }
- function button3_onclick(obj:Button, e:ClickEventInfo)
- {
- var iRow = ds_grd_deny.addRow();
-
- fSetRowValue("ds_grd_deny", "gubun", ds_hidden_searchdata.getColumn(0, "gubun"), iRow);
- fSetRowValue("ds_grd_deny", "instcd", ds_hidden_searchdata.getColumn(0, "instcd"), iRow);
- }
- function button4_onclick(obj:Button, e:ClickEventInfo)
- {
- var cur_row = ds_grd_deny.rowposition; // 행 번호 가져오기
- var iStatus = ds_grd_deny.getRowType(cur_row);
- if(cur_row < 0) {
- alert("삭제할 조건행을 선택해주세요.");
- return;
- }
- if (iStatus == Dataset.ROWTYPE_INSERT) { // 새로 삽입된 행이면
- ds_grd_deny.deleteRow(cur_row);
- } else {
- var rtn = sysf_messageBox("특별제한자 조건을 ", "Q001");
- if(rtn == 6){
- ds_grd_deny.updatecontrol = false;
- ds_grd_deny.setRowType(cur_row, Dataset.ROWTYPE_DELETE);
- ds_grd_deny.updatecontrol = true;
-
- ds_send_savedata.clearData();
- ds_send_savedata_allow.clearData();
-
- var oDsUpdate = grdf_getGridUpdateData(grd_deny, "delete");
- grdf_setStatusColumn(oDsUpdate, "status");
- ds_send_savedata_deny.copyData(oDsUpdate, true);
-
- var oParam = {};
- oParam.id = "TXZHA20501";
- oParam.service = "reqprgmapp.ReqPrgm";
- oParam.method = "reqExeSaveDeptMgrCond";
- oParam.inds = "req=ds_send_savedata req_allow=ds_send_savedata_allow req_deny=ds_send_savedata_deny";
- oParam.typeStr = "status";
- oParam.async = false;
- oParam.callback = "cf_TXZHA20503";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TXZHA20503(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- var jRow = ds_grd_deny.rowposition;
- ds_grd_deny.deleteRow(jRow);
- ds_grd_deny.applyChange(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
- function grd_deny_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- if (grdf_getBindCellName(obj, e.col) == "deptnm" ) { //부서
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ds_grd_deny,"", recv_list, ds_grd_deny.getColumn(e.row, "instcd"), "instcd");
- }else if(grdf_getBindCellName(obj, e.col) == "emplno" ) { //사용자
- var recv_list = "emplno,name";
- misfOpenPopUpList("01", ds_grd_deny,"", recv_list, ds_grd_deny.getColumn(e.row, "instcd"), "instcd");
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|