123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRPD30500" position="absolute 0 0 1201 737" titletext="전공의 수련현황표 엑셀upload" oninit="SMRPD30500_oninit" onload="SMRPD30500_onload">
- <Layouts>
- <Layout>
- <Shape position="absolute 0 116 1195 122" linetype="horizontal" id="line7" class="line_10" anchor="left top right"/>
- <Grid position="absolute 0 121 1195 675" id="grd_dutlist" binddataset="ds_main_dutlist" autoenter="select" autofittype="col" cellsizingtype="col" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="57"/>
- <Column size="99"/>
- <Column size="122"/>
- <Column size="44"/>
- <Column size="122"/>
- <Column size="44"/>
- <Column size="327"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell rowspan="2" taborder="undefined"/>
- <Cell col="1" rowspan="2" text="사번" taborder="undefined"/>
- <Cell col="2" rowspan="2" text="근태코드" taborder="undefined"/>
- <Cell col="3" colspan="2" text="근무일시(From)" taborder="undefined"/>
- <Cell col="5" colspan="2" text="근무일시(To)" taborder="undefined"/>
- <Cell col="7" rowspan="2" text="비고" taborder="undefined"/>
- <Cell row="1" col="3" text="년월일"/>
- <Cell row="1" col="4" text="시"/>
- <Cell row="1" col="5" text="년월일"/>
- <Cell row="1" col="6" text="시"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:emplno" editautoselect="true"/>
- <Cell col="2" displaytype="combo" edittype="combo" text="bind:duttype" editautoselect="true" combodataset="ds_init_duttype_codelist" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="3" displaytype="date" edittype="date" text="bind:fromdd" editautoselect="true" calendardisplaynulltype="nulltext" enable="false"/>
- <Cell col="4" text="bind:fromtm1" editautoselect="true"/>
- <Cell col="5" displaytype="date" edittype="date" text="bind:todd" editautoselect="true" calendardisplaynulltype="nulltext" enable="false"/>
- <Cell col="6" text="bind:totm1" editautoselect="true"/>
- <Cell col="7" text="bind:cmt" editautoselect="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="상세내역 List" position="absolute 0 100 113 122" id="caption4" class="tit_2"/>
- <Static text="※ 엑셀자료 작성시 유의점" position="absolute 0 680 503 700" id="caption3" style="color:#ff0000ff;" anchor="left bottom"/>
- <Static text="- 본인의 자료만 등록 가능합니다." position="absolute 16 697 740 717" id="caption5" style="color:#ff0000ff;" anchor="left bottom"/>
- <Button position="absolute 996 97 1101 116" id="btn_download" class="btn2" taborder="6" text="양식 Download" anchor="top right" onclick="btn_download_onclick"/>
- <Button position="absolute 1102 97 1196 116" id="btn_upload" class="btn7" text="엑셀 Upload" anchor="top right" onclick="btn_upload_onclick"/>
- <Static text="- 근태코드는 반드시 코드값으로 작성하십시요." position="absolute 15 713 739 733" id="caption8" style="color:#ff0000ff;" anchor="left bottom"/>
- <Button position="absolute 912 97 965 116" id="btn_grddel" class="btn2" visible="false" text="행삭제" anchor="top right" onclick="btn_grddel_onclick"/>
- <Grid position="absolute 30 265 900 545" id="grd_sample" visible="false" binddataset="ds_sampledata">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="27"/>
- <Column size="57"/>
- <Column size="99"/>
- <Column size="122"/>
- <Column size="44"/>
- <Column size="122"/>
- <Column size="44"/>
- <Column size="327"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell rowspan="2" taborder="undefined"/>
- <Cell col="1" rowspan="2" text="사번" taborder="undefined"/>
- <Cell col="2" rowspan="2" text="근태코드" taborder="undefined"/>
- <Cell col="3" colspan="2" text="근무일시(From)" taborder="undefined"/>
- <Cell col="5" colspan="2" text="근무일시(To)" taborder="undefined"/>
- <Cell col="7" rowspan="2" text="비고" taborder="undefined"/>
- <Cell row="1" col="3" text="년월일"/>
- <Cell row="1" col="4" text="시"/>
- <Cell row="1" col="5" text="년월일"/>
- <Cell row="1" col="6" text="시"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:emplno"/>
- <Cell col="2" text="bind:duttype"/>
- <Cell col="3" text="bind:fromdd"/>
- <Cell col="4" text="bind:fromtm1"/>
- <Cell col="5" text="bind:todd"/>
- <Cell col="6" text="bind:totm1"/>
- <Cell col="7" text="bind:cmt"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption1" text="전공의 수련현황표 엑셀 Upload" class="tit_1" position="absolute 0 0 307 23"/>
- <Shape id="line2" class="line_6" position="absolute 0 42 1195 48" anchor="left top right"/>
- <Button id="btn_save" taborder="7" text="저장" class="btn4" position="absolute 1080 21 1136 43" anchor="top right" onclick="btn_save_onclick"/>
- <Button id="btn_close" taborder="8" text="닫기" class="btn4" position="absolute 1139 21 1195 43" anchor="top right" onclick="btn_close_onclick"/>
- <Div id="grp_sea" taborder="9" position="absolute 0 47 1195 81" class="div_SA" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="cap_instcd" text="기관코드" class="search_name" position="absolute 61 8 140 25" anchor="default"/>
- <Combo id="cmb_instcd" taborder="1" innerdataset="@ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 140 8 290 27" anchor="default"/>
- <Static id="caption7" text="사번" class="search_name" position="absolute 320 8 375 25" anchor="default"/>
- <Edit id="ipt_emplnm" taborder="2" enable="false" position="absolute 426 8 520 27" anchor="default"/>
- <Edit id="ipt_emplno" taborder="3" enable="false" position="absolute 374 8 425 27" anchor="default" onkeyup="grp_sea_ipt_emplno_onkeyup"/>
- <Static id="caption2" text="근무년월" class="search_name" position="absolute 550 8 626 25" anchor="default"/>
- <Calendar id="ipt_dutym" taborder="4" position="absolute 630 8 710 27" mask="yyyy-mm" anchor="default" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" onchanged="grp_sea_ipt_dutym_onchanged"/>
- <Shape id="line6" linetype="vertical" position="absolute 1052 5 1058 27" anchor="top right"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_search" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_search_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="emplno" type="STRING" size="256"/>
- <Column id="emplnm" type="STRING" size="256"/>
- <Column id="dutym" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="emplno"/>
- <Col id="emplnm"/>
- <Col id="dutym"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cnstnm" type="STRING" size="256"/>
- <Column id="cnstcd" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_dutlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_sampledata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_duttype_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256" sumtext="코드"/>
- <Column id="cdnm" type="STRING" size="256" sumtext="코드명"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="instcd" columnid="instcd"/>
- <BindItem id="item1" compid="grp_sea.ipt_emplno" propid="value" datasetid="ds_send_search" columnid="emplno"/>
- <BindItem id="item2" compid="grp_sea.ipt_emplnm" propid="value" datasetid="ds_send_search" columnid="emplnm"/>
- <BindItem id="item3" compid="grp_sea.ipt_dutym" propid="value" datasetid="ds_send_search" columnid="dutym"/>
- </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";
- function SMRPD30500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRPD30500_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_dutlist);
- grdf_setRowTypeIcon(grd_dutlist, 0);
-
- grdf_initGrid(grd_sample);
- grdf_setRowTypeIcon(grd_sample, 0);
-
- misfComboComCdList("Z0007", grp_sea.cmb_instcd, "N"); //기관코드
- ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
-
- grp_sea.ipt_emplno.value = sysf_getUserInfo("userid");
- grp_sea.ipt_emplnm.value = sysf_getUserInfo("usernm");
- var oParam = {};
- oParam.id = "TRRPD30303";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqGetDuttypeList";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "ds_init_duttype_codelist=codelist";
- oParam.async = false;
- //oParam.callback = "cf_TRRPD30303";
- tranf_submit(oParam);
- }
- function grp_sea_ipt_emplno_onkeyup(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
- }
- }
- function ds_send_search_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "emplno")
- {
- grp_sea.ipt_emplno.enable = true;
- grp_sea.ipt_emplno.value = e.newvalue;
- grp_sea.ipt_emplno.setFocus();
-
- var recv_list = "emplno,emplnm" ;
- rpbfValidationCheck("EMPLNO", recv_list);
- grp_sea.ipt_emplno.enable = false;
- }
- }
- function grp_sea_ipt_dutym_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- var date = String(obj.value).substr(0,6);
- ds_send_search.setColumn(0, "dutym", date);
- }
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- var status = ds_main_dutlist.getRowType(ds_main_dutlist.rowposition);
- if(status != 4)
- {
- sysf_messageBox("행삭제는 엑셀 Upload 한 자료 저장하기 전에 수정하는 용도로만 \n사용이 가능합니다. ", "E999", "");
- return;
- }
- ds_main_dutlist.deleteRow(ds_main_dutlist.rowposition);
- }
- function btn_download_onclick(obj:Button, e:ClickEventInfo)
- {
- dsf_makeValue(ds_sampledata, "emplno", "string", sysf_getUserInfo("userid"), 0);
- dsf_makeValue(ds_sampledata, "duttype", "string", "01", 0);
- dsf_makeValue(ds_sampledata, "fromdd", "string", utlf_getCurrentDate(), 0);
- dsf_makeValue(ds_sampledata, "todd", "string", "07", 0);
- dsf_makeValue(ds_sampledata, "todd", "string", utlf_getCurrentDate(), 0);
- dsf_makeValue(ds_sampledata, "todd", "string", "09", 0);
-
- var addrow = ds_sampledata.addRow();
-
- var duttypeCodeTxt = "코드로 입력 ";
-
- for(var i = 0; i < ds_init_duttype_codelist.rowcount; i++)
- {
- duttypeCodeTxt += ds_init_duttype_codelist.getColumn(i, "cdid") + ":";
- duttypeCodeTxt += ds_init_duttype_codelist.getColumn(i, "cdnm") + " ";
- }
-
- ds_sampledata.setColumn(addrow, "duttype", duttypeCodeTxt);
-
- grdf_exportExcel(grd_sample, "수련현황표 양식", "see", false);
- }
- function btn_upload_onclick(obj:Button, e:ClickEventInfo)
- {
- sysf_messageBox("엑셀 Upload를 하실 때는 반드시 양식에 맞게 입력해주셔야 합니다.", "I999", "");
-
- grdf_ImportExcel("ds_main_dutlist", 2, grd_dutlist)
-
- ds_main_dutlist.updatecontrol = false;
- for(var i = 0; i < ds_main_dutlist.rowcount; i++)
- {
- ds_main_dutlist.setRowType(i, "i");
-
- ds_main_dutlist.setColumn(i, "duttype", ds_main_dutlist.getColumn(i, "duttype").getLeftPad(2,"0"));
- ds_main_dutlist.setColumn(i, "fromtm1", ds_main_dutlist.getColumn(i, "fromtm1").getLeftPad(2,"0"));
- ds_main_dutlist.setColumn(i, "totm1", ds_main_dutlist.getColumn(i, "fromttotm1m1").getLeftPad(2,"0"));
- }
- ds_main_dutlist.updatecontrol = true;
- sysf_messageBox("Upload 가 완료되었습니다. \n데이터를 확인 후 저장버튼을 누르십시요." , "I999", "");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if (sysf_messageBox( "수련현황표 자료를 저장하시겠습니까?", "Q999","") != 6)
- {
- return;
- }
-
- if (datacheck() == false)
- {
- return;
- }
-
- ExecData();
- }
- function datacheck()
- {
- if(String(grp_sea.ipt_dutym.value).length != 6)
- {
- sysf_messageBox("상단의 근무년월이 입력되지 않았습니다. ", "E999", "");
- grp_sea.ipt_dutym.setFocus();
- return false;
- }
-
- for(var i = 0; i < ds_main_dutlist.rowcount; i++)
- {
- if(ds_main_dutlist.getColumn(i, "emplno") != grp_sea.ipt_emplno.value)
- {
- sysf_messageBox("사번이 일치하지 않습니다. 사번을 확인하십시요.(본인 자료만 저장 가능) ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
-
- if(utlf_isNull(ds_main_dutlist.getColumn(i, "duttype")))
- {
- sysf_messageBox("근태코드가 존재하지 않는 코드입니다. 근태코드를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(String(ds_main_dutlist.getColumn(i, "fromdd")).length != 10)
- {
- sysf_messageBox("근무시작일자가 적합하지 않습니다. 근무일자를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
-
- if(String(ds_main_dutlist.getColumn(i, "todd")).length != 10)
- {
- sysf_messageBox("근무종료일자가 적합하지 않습니다. 근무일자를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(String(ds_main_dutlist.getColumn(i, "fromtm1")).length != 2 || ds_main_dutlist.getColumn(i, "fromtm1") < "00" || ds_main_dutlist.getColumn(i, "fromtm1") > "23")
- {
- sysf_messageBox("근무시작시간의 형식이 적합하지 않습니다. 시간은 두 자리로 입력하세요.(00~23) ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(String(ds_main_dutlist.getColumn(i, "totm1")).length != 2 || ds_main_dutlist.getColumn(i, "totm1") < "00" || ds_main_dutlist.getColumn(i, "totm1") > "23")
- {
- sysf_messageBox("근무종료시간의 형식이 적합하지 않습니다. 시간은 두 자리로 입력하세요.(00~23) ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(ds_main_dutlist.getColumn(i, "fromdd") + ds_main_dutlist.getColumn(i, "fromtm1") >= ds_main_dutlist.getColumn(i, "todd")+ds_main_dutlist.getColumn(i, "totm1"))
- {
- sysf_messageBox("근무 종료일시가 시작일시보다 작거나 같습니다. \n근무일시를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(String(ds_main_dutlist.getColumn(i, "fromdd")).substr(0,6) != grp_sea.ipt_dutym.value)
- {
- sysf_messageBox("근무시작일자가 상단의 근무년월과 일치하지 않습니다. 근무일자를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- if(String(ds_main_dutlist.getColumn(i, "todd")).substr(0,6) != grp_sea.ipt_dutym.value)
- {
- sysf_messageBox("근무종료일자가 상단의 근무년월과 일치하지 않습니다. 근무일자를 확인하십시요. ", "E999", "");
- ds_main_dutlist.rowposition = i;
- return false;
- }
- }
- return true;
- }
- function ExecData()
- {
- var oParam = {};
- oParam.id = "TXRPD30501";
- oParam.service = "dligclaznsmngtapp.DutScheMngt";
- oParam.method = "reqExeSaveDutyInfoMulti";
- oParam.inds = "req=ds_main_dutlist:u";
- oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_TXRPD30501";
- tranf_submit(oParam);
- }
- function cf_TXRPD30501(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- sysf_messageBox("저장되었습니다. ", "I999", "" );
- }
- }
- function btn_close_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|