123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRPD04200" position="absolute 0 0 1204 785" titletext="당직(인턴/레지던트)등록" oninit="SMRPD04200_oninit" onload="SMRPD04200_onload">
- <Layouts>
- <Layout>
- <Grid id="grd_dutsumlist" taborder="10" binddataset="ds_main_list_dutsumlist" useinputpanel="false" position="absolute 0 120 1195 696" autoenter="select" autofittype="col" cellsizingtype="col" anchor="all" onexpanddown="grd_dutsumlist_onexpanddown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="26"/>
- <Column size="46"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="73"/>
- <Column size="34"/>
- <Column size="75"/>
- <Column size="76"/>
- <Column size="190"/>
- <Column size="330"/>
- <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="연차"/>
- <Cell col="7" text="직종"/>
- <Cell col="8" text="주민번호"/>
- <Cell col="9" text="부서"/>
- <Cell col="10" text="비고*"/>
- <Cell col="11" text="yymmdd"/>
- <Cell col="12" text="emeryn"/>
- <Cell col="13" text="endyn"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="expr:getRowType(currow) == '2' ? 'masknumber' : 'none'" style="align:center middle;" text="bind:ilja" mask="##" maskchar=" " enable="false"/>
- <Cell col="2" text="bind:yoil"/>
- <Cell col="3" displaytype="combo" edittype="expr:getRowType(currow) == '2' ? 'combo' : 'none'" style="align:center middle;font:arial,9,bold;" text="bind:dangjikgb" combodataset="ds_cmb_dangjikgb" combocodecol="value" combodatacol="label"/>
- <Cell col="4" displaytype="text" edittype="expr:getRowType(currow) == 2 ? 'text' : 'none'" style="align:center middle;" text="bind:emplno" expandshow="show" enable="false"/>
- <Cell col="5" text="bind:emplnm"/>
- <Cell col="6" text="bind:anual"/>
- <Cell col="7" text="bind:jobkindnm"/>
- <Cell col="8" text="bind:rregno"/>
- <Cell col="9" style="align:left middle;padding:2 2 2 2;" text="bind:dutplcedeptnm"/>
- <Cell col="10" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:remark" wordwrap="word" editautoselect="true"/>
- <Cell col="11" text="bind:yymmdd"/>
- <Cell col="12" text="bind:emeryn"/>
- <Cell col="13" text="bind:endyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption6" text="당직(인턴/레지던트/응급)등록" class="tit_1" position="absolute 0 0 344 25"/>
- <Shape id="line4" class="line_6" position="absolute 0 44 1195 50" anchor="left top right"/>
- <Button id="button36" taborder="1" text="저장" class="btn4" position="absolute 1139 23 1195 45" anchor="top right" onclick="button36_onclick"/>
- <Div id="grp_sea" taborder="2" position="absolute 0 48 1195 88" class="div_SA2" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption5" text="소속기관 :" class="search_name" position="absolute 11 10 97 27"/>
- <Combo id="cmb_instcd" taborder="1" class="combo_search" position="absolute 101 9 241 28" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
- <Static id="caption1" text="년월 :" class="search_name" position="absolute 261 10 347 27"/>
- <Calendar id="ipt_dutym" taborder="2" class="input_search" position="absolute 326 9 411 28" mask="yyyy-mm" autoselect="true" autoskip="true" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" onchanged="grp_sea_ipt_dutym_onchanged" style="align:center middle;"/>
- <Static id="caption2" text="근무부서 :" class="search_name" position="absolute 428 10 516 27"/>
- <Combo id="combo1" taborder="3" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 516 9 606 28">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">근무지</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">근무부서</Col>
- </Row>
- <Row>
- <Col id="codecolumn">3</Col>
- <Col id="datacolumn">근무과(팀)</Col>
- </Row>
- <Row>
- <Col id="codecolumn">4</Col>
- <Col id="datacolumn">근무부(실)</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Edit id="ipt_dutdeptcd" taborder="4" class="input_search" position="absolute 611 9 681 28" autoselect="true" autoskip="true" onkeydown="grp_sea_ipt_dutdeptcd_onkeydown"/>
- <Button id="btn_dutdept" taborder="5" class="icon_search" position="absolute 684 11 700 27" onclick="grp_sea_btn_dutdept_onclick"/>
- <Edit id="ipt_dutdeptnm" taborder="6" class="input_search" position="absolute 702 9 816 28" autoselect="true" autoskip="true" onkeydown="grp_sea_ipt_dutdeptnm_onkeydown"/>
- <Static id="caption3" text="사번 :" class="search_name" position="absolute 831 10 894 27"/>
- <Edit id="ipt_emplnos" taborder="7" class="input_default" position="absolute 892 9 959 28" autoselect="true" autoskip="true" onkeydown="grp_sea_ipt_emplnos_onkeydown"/>
- <Button id="btn_emplno" taborder="8" class="icon_search" position="absolute 964 9 980 25" onclick="grp_sea_btn_emplno_onclick"/>
- <Edit id="ipt_emplnms" taborder="9" class="input_default" position="absolute 983 9 1079 28" autoselect="true" autoskip="true" onkeydown="grp_sea_ipt_emplnms_onkeydown"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1092 8 1098 30" anchor="top right"/>
- <Button id="btn_search" taborder="10" text="조회" class="btn1" position="absolute 1106 8 1162 30" anchor="top right" onclick="grp_sea_btn_search_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_grdaddpaydedulist" taborder="3" text="행추가" class="btn2" position="absolute 845 96 898 115" anchor="top right" onclick="btn_grdaddpaydedulist_onclick"/>
- <Button id="btn_grddelpaydedulist" taborder="4" text="행삭제" class="btn2" position="absolute 899 96 952 115" anchor="top right" onclick="btn_grddelpaydedulist_onclick"/>
- <Button id="btn_excelformat" taborder="5" text="엑셀양식" class="btn7" position="absolute 953 96 1033 115" anchor="top right" onclick="btn_excelformat_onclick"/>
- <Button id="btn_inputexcel" taborder="6" text="엑셀입력" class="btn7" position="absolute 1034 96 1114 115" anchor="top right" onclick="btn_inputexcel_onclick"/>
- <Button id="btn_excsave" taborder="7" text="엑셀출력" class="btn7" position="absolute 1115 96 1195 115" anchor="top right" onclick="btn_excsave_onclick"/>
- <Shape id="line207" class="line_10" position="absolute 0 115 1195 121" anchor="left top right"/>
- <Radio id="rdo_retrflag" taborder="8" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 560 98 809 113" onitemchanged="rdo_retrflag_onitemchanged" columncount="-1" rowcount="-1">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">0610</Col>
- <Col id="datacolumn">인턴</Col>
- </Row>
- <Row>
- <Col id="codecolumn">0510</Col>
- <Col id="datacolumn">레지던트</Col>
- </Row>
- <Row>
- <Col id="codecolumn">Y</Col>
- <Col id="datacolumn">응급</Col>
- </Row>
- <Row>
- <Col id="codecolumn"/>
- <Col id="datacolumn">전체</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Static id="caption7" text="마감된 월입니다." visible="false" position="absolute 375 91 540 116" style="color:#ff0000ff;font:Dotum,12,bold;"/>
- <Static id="caption4" text="[구분 : 1.숙직 2.일직 3.일숙직]" position="absolute 120 96 355 116" style="font:Dotum,9,bold;"/>
- <Static id="caption278" text="근태집계목록" class="tit_2" position="absolute 0 99 162 121"/>
- <Grid id="grd_excelformat" taborder="9" binddataset="ds_format" useinputpanel="false" visible="false" position="absolute 100 241 1025 406">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="63"/>
- <Column size="15"/>
- <Column size="305"/>
- <Column size="96"/>
- <Column size="15"/>
- <Column size="17"/>
- <Column size="15"/>
- <Column size="17"/>
- <Column size="17"/>
- <Column size="330"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="일자*"/>
- <Cell col="1"/>
- <Cell col="2" text="구분*"/>
- <Cell col="3" text="사원번호*"/>
- <Cell col="4"/>
- <Cell col="5"/>
- <Cell col="6"/>
- <Cell col="7"/>
- <Cell col="8"/>
- <Cell col="9" text="비고*"/>
- </Band>
- <Band id="body">
- <Cell text="bind:ilja" mask="99"/>
- <Cell col="1" text="bind:yoil"/>
- <Cell col="2" text="bind:dangjikgb"/>
- <Cell col="3" enable="false" text="bind:emplno"/>
- <Cell col="4" text="bind:emplnm"/>
- <Cell col="5" text="bind:anual"/>
- <Cell col="6" text="bind:jobkindnm"/>
- <Cell col="7" text="bind:rregno"/>
- <Cell col="8" text="bind:dutplcedeptnm"/>
- <Cell col="9" text="bind:remark"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption10" text="1. 부서는 조회 년월의 마지막 일자를 기준으로 인사발령정보를 참조하여 보여줍니다." position="absolute 15 720 535 740" style="color:#ff0000ff;" anchor="left bottom"/>
- <Static id="caption8" text="2. 인턴의 부서명은 조회시 "의과인턴, 치과인턴"으로 보여집니다." position="absolute 15 738 535 758" style="color:#ff0000ff;" anchor="left bottom"/>
- <Static id="caption11" text="단, 인턴의 의,치과 여부는 "인턴평가대상자관리" 프로그램에 개인별로 등록된 치과구분을 사용하며, 여기에 등록되지 않은 사람은 교육수련실로 보여집니다." position="absolute 29 756 889 776" style="color:#ff0000ff;" anchor="left bottom"/>
- <Static id="caption9" text="※ 유의사항" position="absolute 0 701 85 721" style="color:#ff0000ff;font:Dotum,9,bold;" anchor="left bottom"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_retrparams" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_retrparams_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="frdutym" type="STRING" size="256"/>
- <Column id="dutunitcd" type="STRING" size="256"/>
- <Column id="dutunitnm" type="STRING" size="256"/>
- <Column id="retrflag" type="STRING" size="256"/>
- <Column id="emplno" type="STRING" size="256"/>
- <Column id="emplnm" type="STRING" size="256"/>
- <Column id="deptgb" type="STRING" size="256"/>
- <Column id="gb" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="frdutym"/>
- <Col id="dutunitcd"/>
- <Col id="dutunitnm"/>
- <Col id="retrflag">0510</Col>
- <Col id="emplno"/>
- <Col id="emplnm"/>
- <Col id="deptgb"/>
- <Col id="gb"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_list_dutsumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_list_dutsumlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="dutplcedeptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="emplno" type="STRING" size="256" sumtext="사원번호"/>
- <Column id="emplnm" type="STRING" size="256" sumtext="성명"/>
- <Column id="anual" type="STRING" size="256" sumtext="연차"/>
- <Column id="jobkindnm" type="STRING" size="256" sumtext="직종"/>
- <Column id="rregno" type="STRING" size="256" sumtext="주민번호"/>
- <Column id="yymmdd" type="STRING" size="256" sumtext="당직일자"/>
- <Column id="dangjikgb" type="STRING" size="256" sumtext="당직구분"/>
- <Column id="backduty" type="STRING" size="256" sumtext="근무"/>
- <Column id="remark" type="STRING" size="256" sumtext="비고"/>
- <Column id="yoil" type="STRING" size="256" sumtext="요일"/>
- <Column id="ilja" type="STRING" size="256" sumtext="일자"/>
- <Column id="emeryn" type="STRING" size="256" sumtext="응급여부"/>
- <Column id="endyn" type="STRING" size="256" sumtext="마감여부"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_format" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_cmb_dangjikgb" 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">1</Col>
- </Row>
- <Row>
- <Col id="label">일직</Col>
- <Col id="value">2</Col>
- </Row>
- <Row>
- <Col id="label">일숙직</Col>
- <Col id="value">3</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_holiinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_holiinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="holiyn" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_dangjikcheck" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_main_dangjikinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cnt" type="STRING" size="256" sumtext="당직횟수"/>
- <Column id="fromdd" type="STRING" size="256" sumtext="당직횟수"/>
- <Column id="todd" type="STRING" size="256" sumtext="당직횟수"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="ds_send_retrparams" columnid="instcd"/>
- <BindItem id="item1" compid="grp_sea.ipt_dutym" propid="value" datasetid="ds_send_retrparams" columnid="frdutym"/>
- <BindItem id="item2" compid="grp_sea.combo1" propid="value" datasetid="ds_send_retrparams" columnid="deptgb"/>
- <BindItem id="item3" compid="grp_sea.ipt_dutdeptcd" propid="value" datasetid="ds_send_retrparams" columnid="dutunitcd"/>
- <BindItem id="item4" compid="grp_sea.ipt_dutdeptnm" propid="value" datasetid="ds_send_retrparams" columnid="dutunitnm"/>
- <BindItem id="item5" compid="grp_sea.ipt_emplnos" propid="value" datasetid="ds_send_retrparams" columnid="emplno"/>
- <BindItem id="item6" compid="grp_sea.ipt_emplnms" propid="value" datasetid="ds_send_retrparams" columnid="emplnm"/>
- <BindItem id="item7" compid="rdo_retrflag" propid="value" datasetid="ds_send_retrparams" columnid="retrflag"/>
- </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
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- include "mis_humtrafactmngtxp::RPB001.xjs";
- var arErrorCode = new HashArray();
- function SMRPD04200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRPD04200_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_dutsumlist);
- grdf_setRowTypeIcon(grd_dutsumlist, 0);
-
- fInitialize();
- }
- function fInitialize()
- {
- ds_main_list_dutsumlist.clearData();
-
- ds_send_retrparams.setColumn(0, "frdutym", String(utlf_getCurrentDate()).substr(0, 6));
- misfComboInstCdListMulti("grp_sea.cmb_instcd",ds_send_retrparams.getColumn(0, "frdutym")+String(utlf_getCurrentDate()).substr(6, 2),"","N");
-
- misfGetAndSetUserInfo();
-
- ds_send_retrparams.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
-
- grp_sea.cmb_instcd.enable = false;
-
- ds_send_retrparams.setColumn(0, "deptgb", "1");
-
- grp_sea.btn_search.click();
- }
- function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function grp_sea_ipt_dutym_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- ds_send_retrparams.setColumn(0, "frdutym", String(obj.value).substr(0,6));
- grp_sea.btn_search.click();
- }
- function grp_sea_ipt_dutdeptcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- function grp_sea_btn_dutdept_onclick(obj:Button, e:ClickEventInfo)
- {
- misfOpenPopUpList("02", grp_sea.ipt_dutdeptcd, "", "dutunitcd,dutunitnm", grp_sea.cmb_instcd.value, "instcd");
- }
- function ds_send_retrparams_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "dutunitcd")
- {
- var setFocus = this.getFocus();
- grp_sea.ipt_dutdeptcd.value = e.newvalue;
- grp_sea.ipt_dutdeptcd.setFocus();
- misfValidationCheck("02", "", "dutunitcd,dutunitnm", grp_sea.cmb_instcd.value, "instcd" );
- setFocus.setFocus();
- }
-
- if(e.columnid == "dutunitnm")
- {
- var setFocus = this.getFocus();
- grp_sea.ipt_dutdeptnm.value = e.newvalue;
- grp_sea.ipt_dutdeptnm.setFocus();
- misfValidationCheck("02", "", "dutunitcd,dutunitnm", grp_sea.cmb_instcd.value, "instcd" );
- setFocus.setFocus();
- }
-
- if(e.columnid == "emplno")
- {
- var setFocus = this.getFocus();
- grp_sea.ipt_emplnos.value = e.newvalue;
- grp_sea.ipt_emplnos.setFocus();
-
- var recv_list = "emplno,emplnm" ;
- rpbfValidationCheck("EMPLNO", recv_list);
-
- if(String(e.newvalue).length > 0)
- {
- grp_sea.btn_search.click();
- }
- setFocus.setFocus();
- }
-
- if(e.columnid == "emplnm")
- {
- var setFocus = this.getFocus();
- grp_sea.ipt_emplnms.value = e.newvalue;
- grp_sea.ipt_emplnms.setFocus();
-
- var recv_list = "emplno,emplnm" ;
- rpbfValidationCheck("EMPLNM", recv_list);
-
- if(String(grp_sea.ipt_emplnos.value).length > 0)
- {
- grp_sea.btn_search.click();
- }
- setFocus.setFocus();
- }
- }
- function grp_sea_ipt_dutdeptnm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- misfValidationCheck("02", "", "dutunitcd,dutunitnm", grp_sea.cmb_instcd.value, "instcd" );
- }
- }
- function grp_sea_ipt_emplnos_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- function grp_sea_btn_emplno_onclick(obj:Button, e:ClickEventInfo)
- {
- var recv_list = "emplno,emplnm" ;
- rpbfOpenPopUpList("SPRPB00101", grp_sea.ipt_emplnos, recv_list,"","N");
-
- if(String(grp_sea.ipt_emplnos.value).length > 0)
- {
- grp_sea.btn_search.click();
- }
- }
- function grp_sea_ipt_emplnms_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- function rdo_retrflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- caption7.visible = false;
- button36.enable = true;
-
- var oParam = {};
- oParam.id = "TRRPD04201";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqGetDangjikList";
- oParam.inds = "req=ds_send_retrparams";
- oParam.outds = "ds_main_list_dutsumlist=dutsumlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRPD04201";
- tranf_submit(oParam);
-
- if(ds_main_list_dutsumlist.rowcount > 0)
- {
- var endyn = ds_main_list_dutsumlist.getColumn(0, "endyn");
-
- if(endyn == "Y")
- {
- // ds_main_list_dutsumlist.enableevent = false;
- // ds_main_list_dutsumlist.updatecontrol = false;
- // for(var i = 0; i < ds_main_list_dutsumlist.rowcount; i++)
- // {
- // misfSetReadOnlyCol(grd_dutsumlist, "ilja,yoil,dangjikgb,emplno,emplnm,anual,jobkindnm,rregno", "N", i);
- // }
- // ds_main_list_dutsumlist.updatecontrol = true;
- // ds_main_list_dutsumlist.enableevent = true;
- caption7.visible = true;
- button36.enable = false;
- }
- }
- }
- function grd_dutsumlist_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- var recv_list = "emplno,emplnm";
- rpbfOpenPopUpList("SPRPB00101", grd_dutsumlist, recv_list,"","N");
- }
- function ds_main_list_dutsumlist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if (e.columnid == "ilja" )
- {
- var ilja = e.newvalue.getLeftPad(2,"0");
- obj.setColumn(e.row, "ilja", ilja);
-
- var ymd = ds_send_retrparams.getColumn(0, "frdutym")+ ilja;
-
- if (utlf_isValidDateTime(ymd) == false)
- {
- sysf_messageBox("일자가 잘못 입력되었습니다.", "E999", "");
- return;
- }
-
- obj.setColumn(e.row, "yymmdd", ymd);
-
- var ymd = obj.getColumn(e.row, "yymmdd");
- var yoil = ymd.toDate().getDayOfWeek("K");
-
- ds_send_holiinfo.clearData();
- dsf_makeValue(ds_send_holiinfo, "instcd", "string", sysf_getUserInfo("dutplceinstcd"), 0);
- dsf_makeValue(ds_send_holiinfo, "basedd", "string", ymd, 0);
-
- var holiyn = "N";
-
- var oParam = {};
- oParam.id = "TRRPD04202";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqGetHoliYn";
- oParam.inds = "req=ds_send_holiinfo";
- oParam.outds = "ds_init_holiinfo=holiinfo";
- oParam.async = false;
- oParam.callback = "cf_TRRPD04202";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRRPD04202") > -1)
- {
- holiyn = ds_init_holiinfo.getColumn(0, "holiyn");
- }
-
- if (yoil == "토" || yoil == "일" || holiyn == "Y")
- {
- trace("1");
- obj.setColumn(ds_main_list_dutsumlist.rowposition, "dangjikgb", "3");
- }
- else
- {
- obj.setColumn(ds_main_list_dutsumlist.rowposition, "dangjikgb", "1");
- }
-
- ds_main_list_dutsumlist.setColumn(ds_main_list_dutsumlist.rowposition, "yoil", ymd.toDate().getDayOfWeek("K") + "요일");
- }
-
- var emplno = obj.getColumn(e.row, "emplno");
- var ilja = obj.getColumn(e.row, "ilja");
- var ymd = ds_send_retrparams.getColumn(0, "frdutym") + ilja;
-
- ds_send_dangjikcheck.clearData();
- dsf_makeValue(ds_send_dangjikcheck, "instcd", "string", sysf_getUserInfo("dutplceinstcd"), 0);
- dsf_makeValue(ds_send_dangjikcheck, "emplno", "string", emplno, 0);
- dsf_makeValue(ds_send_dangjikcheck, "yymmdd", "string", ymd, 0);
-
- if (!utlf_isNull(ymd) && !utlf_isNull(emplno))
- {
- var dangjikcnt = 0;
- var dangjikfromdd = "";
- var dangjiktodd = "";
-
- var oParam = {};
- oParam.id = "TRRPD04203";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqGetDangjikCnt";
- oParam.inds = "req=ds_send_dangjikcheck";
- oParam.outds = "ds_main_dangjikinfo=dangjikinfo";
- oParam.async = false;
- oParam.callback = "cf_TRRPD04203";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRRPD04203") > -1)
- {
- dangjikcnt = ds_main_dangjikinfo.getColumn(0, "cnt");
- dangjikfromdd = ds_main_dangjikinfo.getColumn(0, "fromdd");
- dangjiktodd = ds_main_dangjikinfo.getColumn(0, "todd");
- }
-
- if (parseInt(dangjikcnt) >= 3)
- {
- sysf_messageBox(dangjikfromdd + " ~ " + dangjiktodd + " 기간 사이에 3회 초과 등록입니다.", "E999");
- return;
- }
-
- var tempcnt = 0;
- var chk_ilja = "";
- var chk_ymd = "";
-
- for (var i = 0; i < obj.rowcount; i++)
- {
- if(obj.getRowType(i) == 2 && emplno == obj.getColumn(i, "emplno"))
- {
- chk_ilja = obj.getColumn(i, "ilja");
- chk_ymd = ds_send_retrparams.getColumn(0, "frdutym")+chk_ilja;
-
- if (chk_ymd >= dangjikfromdd && chk_ymd <= dangjiktodd)
- {
- tempcnt ++;
- }
- }
- }
-
- var chkcnt = parseInt(dangjikcnt) + tempcnt;
-
- if ( chkcnt > 3)
- {
- sysf_messageBox(dangjikfromdd + " ~ " + dangjiktodd + " 기간 사이에 3회 초과 등록입니다.", "E999");
- return;
- }
-
- ds_send_dangjikcheck.clearData();
- dsf_makeValue(ds_send_dangjikcheck, "instcd", "string", sysf_getUserInfo("dutplceinstcd"), 0);
- dsf_makeValue(ds_send_dangjikcheck, "drid", "string", emplno, 0);
- dsf_makeValue(ds_send_dangjikcheck, "yymmdd", "string", ymd, 0);
-
- var oParam = {};
- oParam.id = "TRRPD04204";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqGetDangjikOk";
- oParam.inds = "req=ds_send_dangjikcheck";
- oParam.outds = "ds_main_dangjikinfo=dangjikinfo";
- oParam.async = false;
- oParam.callback = "cf_TRRPD04204";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRRPD04204") > -1)
- {
- dangjikok = ds_main_dangjikinfo.getColumn(0, "dangjikok");
-
- if ( dangjikok == "N" )
- {
- sysf_messageBox("19시 기준으로 등록된 휴진 내역이 있습니다.", "E999");
- return;
- }
- }
-
- }
- }
- function cf_TRRPD04202(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function cf_TRRPD04203(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function cf_TRRPD04204(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function btn_grdaddpaydedulist_onclick(obj:Button, e:ClickEventInfo)
- {
- var irow = ds_main_list_dutsumlist.addRow();
-
- if(rdo_retrflag.value == "Y")
- {
- ds_main_list_dutsumlist.setColumn(irow, "emeryn", "Y");
- }
- }
- function btn_grddelpaydedulist_onclick(obj:Button, e:ClickEventInfo)
- {
- var datagrid1 = ds_main_list_dutsumlist;
- var status = datagrid1.getRowType(datagrid1.rowposition) ;
-
- if(status == 1)
- {
- datagrid1.updatecontrol = false;
- datagrid1.setRowType(datagrid1.rowposition, "d");
- datagrid1.updatecontrol = true;
- }
- else if(status == 2)
- {
- datagrid1.deleteRow(datagrid1.rowposition);
- }
- else if(status == 4)
- {
- datagrid1.updatecontrol = false;
- datagrid1.setRowType(datagrid1.rowposition, "d");
- datagrid1.updatecontrol = true;
- }
- }
- function btn_excelformat_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridInit(grd_excelformat);
- misfGridIUD(grd_excelformat, "A");
- var sTitle = "당직등록양식";
-
- dsf_makeValue(ds_format, "ilja", "string", "1~31", 0);
- dsf_makeValue(ds_format, "dangjikgb", "string", "코드로 작성(1:숙직, 3:일숙직)", 0);
- dsf_makeValue(ds_format, "emplno", "string", "15491", 0);
- dsf_makeValue(ds_format, "remark", "string", "필요시 적어주세요.", 0);
-
- misfGridIUD(grd_excelformat, "A");
- dsf_makeValue(ds_format, "ilja", "string", "전체 양식은 유지하고, (*)표시된 컬럼만 자료를 작성해주세요.", 0);
- misfSaveExcel(grd_excelformat, sTitle);
- }
- function btn_inputexcel_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_ImportExcel("ds_main_list_dutsumlist", 2, grd_dutsumlist);
-
- for (var i = 0; i < ds_main_list_dutsumlist.rowcount; i++)
- {
- var ilja = ds_main_list_dutsumlist.getColumn(i, "ilja").getLeftPad(2,"0");
- ds_main_list_dutsumlist.setColumn(i, "ilja", ilja);
- var ymd = ds_send_retrparams.getColumn(0, "frdutym") + ilja;
-
- ds_main_list_dutsumlist.setColumn(i, "yymmdd", ymd);
-
- var ymd = ds_main_list_dutsumlist.getColumn(i, "yymmdd");
- var yoil = ymd.toDate().getDayOfWeek("K");
-
- if (yoil == "토" || yoil == "일")
- {
- ds_main_list_dutsumlist.setColumn(i, "dangjikgb", "3");
- }
- else
- {
- ds_main_list_dutsumlist.setColumn(i, "dangjikgb", "1");
- }
- ds_main_list_dutsumlist.setColumn(i, "yoil", ymd.toDate().getDayOfWeek("K") + "요일");
-
- if(rdo_retrflag.value == "Y")
- {
- ds_main_list_dutsumlist.setColumn(i, "emeryn", "Y");
- }
- ds_main_list_dutsumlist.updatecontrol = false;
- ds_main_list_dutsumlist.setRowType(i, "i");
- ds_main_list_dutsumlist.updatecontrol = true;
- }
- }
- function btn_excsave_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_dutsumlist, "excel", "see", true)
- }
- function button36_onclick(obj:Button, e:ClickEventInfo)
- {
- for (var i = 0; i < ds_main_list_dutsumlist.rowcount; i ++)
- {
- var emplno1 = ds_main_list_dutsumlist.getColumn(i, "emplno");
- var ymd1 = ds_main_list_dutsumlist.getColumn(i, "yymmdd");
-
- if (utlf_isValidDateTime(ymd1) == false)
- {
- sysf_messageBox("일자가 잘못 입력되었습니다.", "E999", "");
- return;
- }
- if (utlf_isNull(ds_main_list_dutsumlist.getColumn(i, "emplno")))
- {
- sysf_messageBox(parseInt(i+1) + "번째의 사원번호는 필수 입력항목입니다.", "E999", "");
- return;
- }
-
- if(utlf_isNull(ds_main_list_dutsumlist.getColumn(i, "yymmdd")))
- {
- sysf_messageBox(parseInt(i+1) + "번째의 일자는 필수 입력항목입니다.", "E999", "");
- return;
- }
- }
- var update = grdf_getGridUpdateData(grd_dutsumlist).rowcount;
- if(update == 0)
- {
- sysf_messageBox("업데이트 정보가 없습니다.", "E999", "");
- return 0;
- }
- else
- {
- var oParam = {};
- oParam.id = "TXRPD04201";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqExeDangjikList";
- oParam.inds = "req=ds_main_list_dutsumlist:u";
- oParam.outds = "ds_=item";
- oParam.typeStr = "m";
- oParam.async = false;
- oParam.callback = "cf_TXRPD04201";
- tranf_submit(oParam);
- }
- }
- function cf_TXRPD04201(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- sysf_messageBox("정상적으로 처리되었습니다.", "E999", "");
- grp_sea.btn_search.click();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|