123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRPD03900" position="absolute 0 0 1197 801" titletext="부서별 근무형태 코드관리" onload="SMRPD03900_onload" style="background:transparent;">
- <Layouts>
- <Layout>
- <Div position="absolute 0 46 1195 797" id="group3" scrollbars="autoboth" anchor="all">
- <Layouts>
- <Layout>
- <Button position="absolute 923 50 1003 72" align="align:left middle;" id="btn_excadd" class="btn7" visible="false" text="엑셀입력" anchor="top right" onclick="group3_btn_excadd_onclick"/>
- <Button position="absolute 1115 50 1195 72" id="btn_excsave" class="btn7" text="엑셀저장" anchor="top right" onclick="group3_btn_excsave_onclick"/>
- <Grid position="absolute 0 76 590 728" id="grd_dutbasecdlist" class="text_center" binddataset="ds_main_dutbasecdlist" anchor="left top bottom" autoenter="select" cellsizingtype="col" oncellclick="group3_grd_dutbasecdlist_oncellclick" cellclickbound="cell">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="33"/>
- <Column size="0"/>
- <Column size="41"/>
- <Column size="270"/>
- <Column size="55"/>
- <Column size="55"/>
- <Column size="290"/>
- </Columns>
- <Rows>
- <Row size="35" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택" wordwrap="char"/>
- <Cell col="2" text="기관코드" wordwrap="char"/>
- <Cell col="3" text="근무코드" wordwrap="char"/>
- <Cell col="4" text="근무명칭" wordwrap="char"/>
- <Cell col="5" text="근무시작시간" wordwrap="char"/>
- <Cell col="6" text="근무종료시간" wordwrap="char"/>
- <Cell col="7" text="비 고" wordwrap="char"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:check" expr="expr:check == 'Y' ? 1 : 0"/>
- <Cell col="2" text="bind:instcd"/>
- <Cell col="3" text="bind:dutcd" enable="false"/>
- <Cell col="4" displaytype="text" style="align:left top;padding:5 2 1 2;" text="bind:dutnm" wordwrap="word" enable="false"/>
- <Cell col="5" text="bind:dutfromtm" mask="##:##" maskchar=" " enable="false"/>
- <Cell col="6" text="bind:duttotm" mask="##:##" maskchar=" " enable="false"/>
- <Cell col="7" displaytype="text" style="align:left top;padding:5 2 1 2;" text="bind:cmt" wordwrap="word" enable="false"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div position="absolute 0 5 1195 45" align="align:center top;" id="group2" class="div_SA2" anchor="left top right">
- <Layouts>
- <Layout>
- <Shape position="absolute 1107 10 1113 32" linetype="vertical" id="line13" class="line_4" anchor="top right"/>
- <Static text="근무부서 :" position="absolute 275 12 366 29" id="caption1" class="search_name" anchor="default"/>
- <Button position="absolute 1125 10 1181 32" id="btn_search" class="btn1" text="조회" anchor="top right" onclick="group3_group2_btn_search_onclick"/>
- <Edit position="absolute 366 11 451 30" id="ipt_dutdeptcd" class="input_essential" anchor="default" autoselect="true" onkeydown="Edit_onkeydown"/>
- <Edit position="absolute 475 11 615 30" id="ipt_dutdeptnm" class="input_search" anchor="default" autoselect="true" onkeydown="Edit_onkeydown"/>
- <Button position="absolute 455 13 471 29" id="btn_dutdept" class="icon_search" text="" anchor="default" onclick="group3_group2_btn_dutdept_onclick"/>
- <Combo position="absolute 734 11 915 30" id="cmb_dutplce" class="combo" visible="true" anchor="default" onitemchanged="group3_group2_cmb_dutplce_onitemchanged"/>
- <Static text="관리부서 :" position="absolute 645 12 735 29" id="caption2" class="search_name" anchor="default"/>
- <Combo position="absolute 102 11 255 30" id="cmb_instcd" class="combo_search" taborder="1" anchor="default" onitemchanged="group3_group2_cmb_instcd_onitemchanged"/>
- <Static text="소속기관 :" position="absolute 14 12 100 29" id="caption8" class="search_name" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Static text="부서별 코드등록" position="absolute 635 56 786 77" id="caption20" class="tit_2" anchor="default"/>
- <Shape position="absolute 635 72 1195 78" linetype="horizontal" id="line8" class="line_10" anchor="left top right"/>
- <Shape position="absolute 0 72 590 77" id="line7" class="line_10" anchor="default"/>
- <Static text="근무기초코드" position="absolute 0 55 159 72" id="caption25" class="tit_2" anchor="default"/>
- <Button position="absolute 1005 50 1058 72" id="btn_grdadd" class="btn2" text="행추가" anchor="top right" onclick="group3_btn_grdadd_onclick"/>
- <Button position="absolute 1060 50 1113 72" id="btn_grddel" class="btn2" text="행삭제" anchor="top right" onclick="group3_btn_grddel_onclick"/>
- <Grid position="absolute 635 77 1195 728" id="grd_deptdutcdlist" class="text_center" scrollbars="autoboth" binddataset="ds_main_deptdutcdlist" anchor="all" autoenter="select" cellsizingtype="col" onexpandup="group3_grd_deptdutcdlist_onexpandup" ontextchanged="group3_grd_deptdutcdlist_ontextchanged">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="110"/>
- <Column size="58"/>
- <Column size="210"/>
- <Column size="35"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="35" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="기관코드"/>
- <Cell col="2" text="부서코드" wordwrap="char"/>
- <Cell col="3" text="부서명" wordwrap="char"/>
- <Cell col="4" text="근무코드" wordwrap="char"/>
- <Cell col="5" text="근무코드명" wordwrap="char"/>
- <Cell col="6" text="정렬순서" wordwrap="char"/>
- <Cell col="7" text="최초등록자ID"/>
- <Cell col="8" text="최초등록일시"/>
- <Cell col="9" text="최종수정자ID"/>
- <Cell col="10" text="최종수정일시"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:instcd"/>
- <Cell col="2" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:deptcd" wordwrap="word" editautoselect="true" expandshow="show" enable="false"/>
- <Cell col="3" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:deptnm" wordwrap="word" editautoselect="true" enable="false"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:dutcd" wordwrap="word" editautoselect="true" expandshow="show" enable="false"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:dutnm" wordwrap="word" editautoselect="true" enable="false"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:sortseq" editautoselect="true"/>
- <Cell col="7" text="bind:fstrgstrid"/>
- <Cell col="8" text="bind:fstrgstdt"/>
- <Cell col="9" text="bind:lastupdtrid"/>
- <Cell col="10" text="bind:lastupdtdt"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 10 608 250 709" id="grd_dutdeptlist" visible="false" binddataset="ds_main_dutdeptlist" anchor="default" cellclickbound="cell">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="37"/>
- <Column size="81"/>
- <Column size="100"/>
- </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"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:check" expr="expr:(check=="Y"||check==1)?1:0"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:deptcd" expandshow="show"/>
- <Cell col="3" text="bind:deptnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Grid position="absolute 635 588 1005 728" id="grd_deptlist" visible="false" binddataset="ds_main_deptlist" anchor="left right bottom" onexpandup="group3_grd_deptlist_onexpandup" cellclickbound="cell">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="207"/>
- </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"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:check" expr="expr:(check=="Y"||check==1)?1:0"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:deptcd" expandshow="show"/>
- <Cell col="3" text="bind:deptnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_right" taborder="1" position="absolute 599 283 627 303" class="icon_right" onclick="group3_btn_right_onclick"/>
- <Button id="btn_left" taborder="2" class="icon_left" position="absolute 599 309 627 329" onclick="group3_btn_left_onclick" visible="false"/>
- <Edit id="opt_msg" taborder="3" readonly="true" position="absolute 0 732 1195 751" style="background:transparent;" visible="true" anchor="left right bottom"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 26 1195 61" id="group4" scrollbars="autoboth" anchor="left top right">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 21 1195 27" id="line1" class="line_6" anchor="left top right"/>
- <Button position="absolute 1127 0 1195 22" id="btn_clear" class="btn4" text="초기화" anchor="top right" onclick="group4_btn_clear_onclick"/>
- <Button position="absolute 1069 0 1125 22" id="btn_save" class="btn4" text="저장" anchor="top right" onclick="group4_btn_save_onclick"/>
- <Button position="absolute 857 0 961 22" id="btn_choideptsave" class="btn4" text="선택부서설정" anchor="top right" onclick="group4_btn_choideptsave_onclick"/>
- <Button position="absolute 963 0 1067 22" id="btn_showchoidept" class="btn4" text="선택부서보기" anchor="top right" onclick="group4_btn_showchoidept_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="부서별근무형태코드관리" class="tit_1" position="absolute 0 0 189 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_deptdutcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
- <Dataset id="ds_send_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_send_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="deptnm" type="STRING" size="256"/>
- <Column id="schedeptcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="deptcd"/>
- <Col id="deptnm"/>
- <Col id="schedeptcd"/>
- </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="temp" 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_main_dutdeptlist" firefirstcount="0" firenextcount="0" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_dutdeptlist_oncolumnchanged"/>
- <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="init" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="init"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_deptlist_oncolumnchanged"/>
- <Dataset id="ds_main_dutbasecdlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_dutbasecdlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="check" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="dutcd" type="STRING" size="256" sumtext="근무코드"/>
- <Column id="dutnm" type="STRING" size="256" sumtext="근무명"/>
- <Column id="dutfromtm" type="STRING" size="256" sumtext="시작시간"/>
- <Column id="duttotm" type="STRING" size="256" sumtext="종료시간"/>
- <Column id="cmt" type="STRING" size="256" sumtext="비고"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_deptdutcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
- <Dataset id="ds_search_deptdutcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group3.group2.ipt_dutdeptcd" propid="value" datasetid="ds_send" columnid="deptcd"/>
- <BindItem id="item1" compid="group3.group2.ipt_dutdeptnm" propid="value" datasetid="ds_send" columnid="deptnm"/>
- <BindItem id="item2" compid="group3.group2.cmb_dutplce" propid="value" datasetid="ds_send" columnid="deptcd"/>
- <BindItem id="item3" compid="group3.group2.cmb_instcd" propid="value" datasetid="ds_send" columnid="instcd"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-06-19
- * 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";
- include "mis_dligclaznsmngtxp::RPD001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- var ALL_CHECKED = false;
- var fcount = 1;
- var pos = "";
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : N/A
- * Description : 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- ****************************************************************************************/
- function fInitialize()
- {
- ds_main_deptlist.clearData();
- ds_main_dutbasecdlist.clearData();
- ds_main_deptdutcdlist.clearData();
- ds_main_dutdeptlist.clearData();
- ds_send.clearData(); ds_send.addRow();
- misfGridInit(group3.grd_deptlist);
- misfGridInit(group3.grd_dutbasecdlist);
- misfGridInit(group3.grd_deptdutcdlist);
- misfGridInit(group3.grd_dutdeptlist);
-
- misfMsterDetailSet(group3.grd_dutbasecdlist, null, "TRRPD03901", "N");
- misfMsterDetailSet(group3.grd_deptdutcdlist, null, "TRRPD03902", "Y");
- misfMsterDetailSet(group3.grd_deptlist, null, "TRRPD03902", "Y");
- // 디자인에서 이미 행높이 설정
- // group3.grd_dutbasecdlist.rowheight(0) = 35;
- // group3.grd_deptdutcdlist.rowheight(0) = 35;
- misfComboInstCdListMulti("group3.group2.cmb_instcd", utlf_getCurrentDate(),"","N");
- misfGetAndSetUserInfo();
- misfGetUserAuth();
- rpdfComboCdList(group3.group2.cmb_dutplce); // 권한별 근무부서 세팅
- rpdfSetDutUnitCombo();
- ds_send.enableevent = false;
- ds_send.setColumn( 0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_send.setColumn( 0, "deptcd", DUT_UNIT_CD);
- ds_send.setColumn( 0, "deptnm", DUT_UNIT_NM);
- ds_send.enableevent = true;
- if( DUTY_PART_YN == "Y" ) {
- }
- else {
- group3.group2.ipt_dutdeptcd.enable = false;
- group3.group2.ipt_dutdeptnm.enable = false;
- }
- if(sysf_getUserInfo("dutplceinstcd") == "001" && DUTY_PART_YN == "Y")
- {
- group3.group2.cmb_instcd.enable = true;
- }
- else
- {
- group3.group2.cmb_instcd.enable = false;
- }
- submitFunc("TRRPD03901");
-
- group3.group2.btn_search.click();
-
- //화면 권한 설정
- group3.group2.btn_search.enable = frmf_checkAuth("R");
- }
-
- /****************************************************************************************
- * Argument : N/A
- * Description : 조회
- ****************************************************************************************/
- function fRetrieve()
- {
- var updtdata = grdf_getGridUpdateData(group3.grd_deptdutcdlist);
- ds_search_deptdutcdlist.copyData(updtdata, false);
- if ( ds_search_deptdutcdlist.rowcount > 0) {
- var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 조회 작업을","Q003");
- if (ret != 6) { // not OK
- return;
- }
- }
- //근무부서 필수체크
- var null_check = utlf_transNullToEmpty(group3.group2.ipt_dutdeptcd.value);
- if( utlf_isNull(null_check) )
- {
- sysf_messageBox("근무부서는","I003");
- return;
- }
- submitFunc("TRRPD03902");
- var deptdutcdlist_rowcnt = ds_main_deptdutcdlist.rowcount;
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 저장
- ****************************************************************************************/
- function fSave()
- {
- var updtdata = grdf_getGridUpdateData(group3.grd_deptdutcdlist, "all");
- grdf_setStatusColumn(updtdata, "status");
- ds_send_deptdutcdlist.copyData(updtdata, true);
- if (ds_send_deptdutcdlist.rowcount == 0 )
- {
- sysf_messageBox("변경된 데이터가","I004");
- return;
- }
-
- var null_check1 = "";
- var null_chech2 = "";
-
- for(var i = 0; i < ds_send_deptdutcdlist.rowcount; i++)
- {
- null_check1 = dsf_getColumnNullToEmpty(ds_send_deptdutcdlist, i, "deptcd");
- null_check2 = dsf_getColumnNullToEmpty(ds_send_deptdutcdlist, i, "dutcd");
- if(null_check1 == "")
- {
- sysf_messageBox("부서코드는", "I003");
- return;
- }
- else if(null_check2 == "")
- {
- sysf_messageBox("근무코드는", "I003");
- return;
- }
- }
-
- var nRow = ds_main_deptlist.addRow();
- ds_main_deptlist.addColumn("deptcd", "string");
- ds_main_deptlist.addColumn("deptnm", "string");
- ds_main_deptlist.enableevent = false;
- ds_main_deptlist.setColumn(nRow, "deptcd", group3.group2.ipt_dutdeptcd.value);
- ds_main_deptlist.setColumn(nRow, "deptnm", group3.group2.ipt_dutdeptnm.value);
- ds_main_deptlist.enableevent = true;
- ds_send_deptlist.clear();
- dsf_copyColInfo(ds_send_deptlist, ds_main_deptlist);
- ds_send_deptlist.copyRow(ds_send_deptlist.addRow(), ds_main_deptlist, nRow);
-
- // misfSave("TXRPD03901"); //두개의 데이터셋 을 보내는건 구현안됨
- var oParam = {};
- oParam.id = "TXRPD03901";
- oParam.service = "dligclaznsmngtapp.DeptDutyCodeMngt";
- oParam.method = "reqExeSaveDeptDutyCodeList";
- oParam.inds = "deptdutcdlist=ds_send_deptdutcdlist deptlist=ds_send_deptlist";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TXRPD03901";
- tranf_submit(oParam);
- ds_main_dutbasecdlist.enableevent = false;
- ds_main_dutbasecdlist.updatecontrol = false;
- for(var i = 0 ; i < ds_main_dutbasecdlist.rowcount ; i++)
- {
- ds_main_dutbasecdlist.setColumn(i, "check", "N");
- }
- ds_main_dutbasecdlist.updatecontrol = true;
- ds_main_dutbasecdlist.enableevent = true;
-
- group3.group2.btn_search.click();
- group3.grd_deptdutcdlist.vscrollbar.pos = "";
-
- misfGridInit(group3.grd_deptlist);
- }
-
- /****************************************************************************************
- * Argument : N/A
- * Description :
- ****************************************************************************************/
- function fSetDeptPrCodeReg()
- {
- //근무부서 필수체크
- if(utlf_isNull(group3.group2.ipt_dutdeptcd.value))
- {
- sysf_messageBox("근무부서는","I003");
- return;
- }
- for (var i = 0; i < ds_main_dutbasecdlist.rowcount; i++)
- {
- if(ds_main_dutbasecdlist.getColumn(i, "check") == "Y")
- {
- var sDutCd = ds_main_dutbasecdlist.getColumn(i, "dutcd");
- var iDupCnt = 0;
- for(var k = 0; k < ds_main_deptdutcdlist.rowcount ; k++)
- {
- if(ds_main_deptdutcdlist.getColumn(k, "dutcd") == sDutCd)
- iDupCnt++;
- }
- if(iDupCnt > 0)
- {
- continue;
- }
- var nRow = ds_main_deptdutcdlist.addRow();
- trace("1111111")
- ds_main_deptdutcdlist.setColumn(nRow, "deptcd", group3.group2.ipt_dutdeptcd.value);
- ds_main_deptdutcdlist.setColumn(nRow, "deptnm", group3.group2.ipt_dutdeptnm.value);
- ds_main_deptdutcdlist.setColumn(nRow, "instcd", ds_main_dutbasecdlist.getColumn(i, "instcd"));
- ds_main_deptdutcdlist.setColumn(nRow, "dutcd", ds_main_dutbasecdlist.getColumn(i, "dutcd"));
- ds_main_deptdutcdlist.setColumn(nRow, "dutnm", ds_main_dutbasecdlist.getColumn(i, "dutnm"));
- var iPos = 0;
- if(ds_main_deptdutcdlist.rowcount > 27)
- {
- iPos = (ds_main_deptdutcdlist.rowcount - 27) * 30;
- }
- // group3.grd_deptdutcdlist.vscroll.attribute("pos") = (iPos).toString();
- group3.grd_deptdutcdlist.vscrollbar.pos = iPos;
- }
- }
- }
-
- /****************************************************************************************
- * Argument : N/A
- * Description : 초기화
- ****************************************************************************************/
- function fSetInitialize()
- {
- var updtdata = grdf_getGridUpdateData(group3.grd_deptdutcdlist, "all");
- if (updtdata.rowcount > 0)
- {
- var ret = sysf_messageBox("그리드에 작업 중인 내용이 있습니다. 초기화 작업을","Q003");
-
- if (ret != 6)
- { // not OK
- return;
- }
- }
-
- fInitialize();
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 행추가
- ****************************************************************************************/
- function fAddRow()
- {
- if(utlf_isNull(group3.group2.ipt_dutdeptcd.value))
- {
- sysf_messageBox("근무부서가","I004");
- return;
- }
-
- misfGridIUD(group3.grd_deptdutcdlist,"A");
- group3.grd_deptdutcdlist.setFocus();
- group3.grd_deptdutcdlist.setCellPos(1);
- group3.grd_deptdutcdlist.showEditor(true);
- group3.grd_deptdutcdlist.setEditCaret(-1);
- }
-
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMRPD03900_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- //grdf_initGrid(grd_XXX);
- //grdf_setGridSort(grd_XXX);
- grdf_setRowTypeIcon(group3.grd_deptdutcdlist, 0);
- grdf_setRowTypeIcon(group3.grd_dutdeptlist, 0);
- grdf_setRowTypeIcon(group3.grd_deptlist, 0);
- fInitialize();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 엑셀입력
- ****************************************************************************************/
- function group3_btn_excadd_onclick(obj:Button, e:ClickEventInfo) {
- ds_main_deptdutcdlist.clearData();
- grdf_ImportExcel("ds_main_deptdutcdlist", 2, group3.grd_deptdutcdlist, 0);
- }
- /****************************************************************************************
- * Components : Button
- * Description : 엑셀저장
- ****************************************************************************************/
- function group3_btn_excsave_onclick(obj:Button, e:ClickEventInfo) {
- misfSaveExcel(group3.grd_deptdutcdlist);
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 근무기초코드 조회
- ****************************************************************************************/
- function group3_grd_dutbasecdlist_oncellclick(obj:Grid, e:GridClickEventInfo) {
- if(e.row < 0 && e.col == obj.getBindCellIndex("body","check"))
- {
- var Yn = "N";
-
- if(!ALL_CHECKED) Yn = "Y";
- for(var i = 0; i < ds_main_dutbasecdlist.rowcount ; i++)
- {
- ds_main_dutbasecdlist.enableevent = false;
- ds_main_dutbasecdlist.setColumn(i, "check", Yn);
- ds_main_dutbasecdlist.enableevent = true;
- }
- ALL_CHECKED = (!ALL_CHECKED) ? true : false;
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function group3_group2_btn_search_onclick(obj:Button, e:ClickEventInfo) {
- fRetrieve();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 근무부서 조회 팝업
- ****************************************************************************************/
- function group3_group2_btn_dutdept_onclick(obj:Button, e:ClickEventInfo) {
- misfOpenPopUpList("02", group3.group2.ipt_dutdeptcd, "", "deptcd,deptnm", group3.group2.cmb_instcd.value, "instcd");
- group3.group2.btn_search.click();
- }
- /****************************************************************************************
- * Components : Combo
- * Description : 관리부서 변경 시 조회
- ****************************************************************************************/
- function group3_group2_cmb_dutplce_onitemchanged(obj:Combo, e:ItemChangeEventInfo) {
- ds_send.setColumn(0, "deptnm", group3.group2.cmb_dutplce.text);
- group3.group2.btn_search.click();
- }
- /****************************************************************************************
- * Components : Combo
- * Description : 기관변경시 조회
- ****************************************************************************************/
- function group3_group2_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo) {
- submitFunc("TRRPD03901");
- }
- /****************************************************************************************
- * Components : Button
- * Description : 행추가
- ****************************************************************************************/
- function group3_btn_grdadd_onclick(obj:Button, e:ClickEventInfo) {
- fAddRow();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 행삭제
- ****************************************************************************************/
- function group3_btn_grddel_onclick(obj:Button, e:ClickEventInfo) {
- misfGridIUD(group3.grd_deptdutcdlist,"D");
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 그리드 내용 변경
- ****************************************************************************************/
- function group3_grd_deptdutcdlist_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
- if (e.col == obj.getBindCellIndex("body","deptcd") || e.col == obj.getBindCellIndex("body","deptnm") )
- {//부서코드 입력시
- misfValidationCheck("02", "", "deptcd,deptnm");
- }
- else if (e.col == obj.getBindCellIndex("body","dutcd") || e.col == obj.getBindCellIndex("body","dutnm") )
- { //근무코드 입력시
- misfValidationCheck("09", "", "dutcd,dutnm");
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 초기화
- ****************************************************************************************/
- function group4_btn_clear_onclick(obj:Button, e:ClickEventInfo) {
- fSetInitialize();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 저장
- ****************************************************************************************/
- function group4_btn_save_onclick(obj:Button, e:ClickEventInfo) {
- fSave();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 선택부서설정
- ****************************************************************************************/
- function group4_btn_choideptsave_onclick(obj:Button, e:ClickEventInfo) {
- frmf_inputEnterKey("group3.grd_deptlist", "onexpandup", new GridMouseEventInfo);
- group4.btn_showchoidept.click();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 선택부서보기
- ****************************************************************************************/
- function group4_btn_showchoidept_onclick(obj:Button, e:ClickEventInfo) {
- if(group3.grd_deptlist.visible == true)
- {
- group3.grd_deptlist.visible = false;
- group4.btn_showchoidept.text = "선택부서보기";
- }
- else
- {
- group3.grd_deptlist.visible = true;
- group4.btn_showchoidept.text = "선택부서닫기";
- }
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 그리드 버튼 클릭
- ****************************************************************************************/
- function group3_grd_deptlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- misfGridInit(group3.grd_deptlist);
- ds_main_deptlist.addRow();
- misfOpenPopUpList("08", group3.grd_deptlist, "", "check,deptcd,deptnm");
- }
- function Edit_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13) obj.updateToDataset();
- }
- function ds_send_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "deptcd") {
- var setFocus = this.getFocus();
- group3.group2.ipt_dutdeptcd.setFocus();
- misfValidationCheck("02", "", "deptcd,deptnm", group3.group2.cmb_instcd.value, "instcd");
- group3.group2.btn_search.click();
- setFocus.setFocus();
- }else if(e.columnid == "deptnm"){
- var setFocus = this.getFocus();
- group3.group2.ipt_dutdeptnm.setFocus();
- misfValidationCheck("02", "", "deptcd,deptnm", group3.group2.cmb_instcd.value, "instcd");
- group3.group2.btn_search.click();
- setFocus.setFocus();
- }
- }
- function ds_main_dutbasecdlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "check")
- {
- obj.setColumn(e.row, "check", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
- }
- }
- function ds_main_dutdeptlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid=="check") {
- obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
- }
- }
- function ds_main_deptlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid=="check") {
- obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 오른쪽으로
- ****************************************************************************************/
- function group3_btn_right_onclick(obj:Button, e:ClickEventInfo)
- {
- fSetDeptPrCodeReg();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 왼쪽으로
- ****************************************************************************************/
- function group3_btn_left_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_main_deptdutcdlist.deleteRow(ds_main_deptdutcdlist.rowposition);
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 그리드 버튼 클릭
- ****************************************************************************************/
- function group3_grd_deptdutcdlist_onexpandup(obj:Grid, e:GridMouseEventInfo)
- {
- if (e.col == obj.getBindCellIndex("body","deptcd"))
- { //부서코드 버튼을 눌렀을 때
- misfOpenPopUpList("02", group3.grd_deptdutcdlist, "", "deptcd,deptnm");
- }
- else if (e.col == obj.getBindCellIndex("body","dutcd"))
- { //근무코드 버튼을 눌렀을 때
- misfOpenPopUpList("09", group3.grd_deptdutcdlist, "", "dutcd,dutnm", group3.group2.cmb_instcd.value, "instcd");
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|