123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMO00800" position="absolute 0 0 1018 900" titletext="수련의 파견관리" onload="SPMMI00400_onload" oninit="SPMMI00400_oninit">
- <Layouts>
- <Layout>
- <Grid position="absolute 0 72 1016 870" id="grd_userlist" binddataset="ds_userlist" oncellclick="grd_diaghist_oncellclick" oncelldblclick="grd_diaghist_oncelldblclick" cellclickbound="cell" extendsizetype="none" autofittype="col" cellsizingtype="none" onkeydown="grd_userlist_onkeydown" style="background:transparent;">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="80"/>
- <Column size="135"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="0"/>
- <Column size="60"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="40"/>
- <Column size="120"/>
- <Column size="60"/>
- <Column size="120"/>
- <Column size="59"/>
- </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="orgdiagcd"/>
- <Cell col="8" text="tootfact"/>
- <Cell col="9" text="icd10cd"/>
- <Cell col="10" text="diagcd"/>
- <Cell col="11" text="시작일자"/>
- <Cell col="12" text="종료일자"/>
- <Cell col="13" displaytype="normal" edittype="none" text="권한"/>
- <Cell col="14" text="등록일시"/>
- <Cell col="15" text="등록자"/>
- <Cell col="16" text="수정일시"/>
- <Cell col="17" text="수정자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" displaytype="normal" edittype="none"/>
- <Cell col="1" displaytype="text" style="align:center;" text="bind:dutplcecd"/>
- <Cell col="2" displaytype="combo" edittype="combo" style="background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:dutplcecd" combodataset="ds_init_orddept" combocodecol="deptcd" combodatacol="depthngnm"/>
- <Cell col="3" displaytype="combo" edittype="none" style="align:center;background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:jobposcd" combodataset="ds_init_jobpostcd" combocodecol="cd" combodatacol="nm" combodisplay="edit"/>
- <Cell col="4" displaytype="text" edittype="text" style="align:center;background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:userid"/>
- <Cell col="5" text="bind:orgdiagnm"/>
- <Cell col="6" style="align:center middle;background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:usernm"/>
- <Cell col="7" text="bind:orgdiagcd"/>
- <Cell col="8" text="bind:tootfact"/>
- <Cell col="9" text="bind:icd10cd"/>
- <Cell col="10" text="bind:diagcd"/>
- <Cell col="11" displaytype="date" edittype="date" style="background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:fromdd"/>
- <Cell col="12" displaytype="date" edittype="date" style="background:EXPR(bind:colorflag=='Y'?'yellow':'');background2:EXPR(bind:colorflag=='Y'?'yellow':'');" text="bind:edittodd"/>
- <Cell col="13" displaytype="combo" edittype="combo" style="align:center;" text="bind:tempyn" combodataset="ds_init_tempyn" combocodecol="cd" combodatacol="nm"/>
- <Cell col="14" text="bind:fstrgstdt" mask="expr:utlf_isNull(fstrgstdt) ? "" : "####-##-## ##:##:##""/>
- <Cell col="15" text="bind:fstrgstrnm"/>
- <Cell col="16" text="bind:lastupdtdt" mask="expr:utlf_isNull(lastupdtdt) ? "" : "####-##-## ##:##:##""/>
- <Cell col="17" text="bind:lastupdtrnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_excel" taborder="2" text="샘플파일 다운로드" class="btn7" position="absolute 0 876 134 896" anchor="top right" onclick="btn_excel_onclick"/>
- <Div id="grp_sea" taborder="3" position="absolute 0 25 1016 64" class="div_SA">
- <Layouts>
- <Layout>
- <Calendar id="ipt_date" taborder="19" class="input_essential" position="absolute 92 10 198 29" anchor="default" enable="true"/>
- <Shape id="line2" linetype="vertical" class="line_4" position="absolute 906 7 911 33" anchor="default"/>
- <Button id="btn_srch" taborder="20" text="조회" class="btn1" position="absolute 929 8 990 30" anchor="default" onclick="grp_sea_btn_srch_onclick"/>
- <Static id="caption11" text="기준일자" class="search_name" position="absolute 18 11 88 28" anchor="default"/>
- <Static id="caption2" text="진료과" class="search_name" position="absolute 209 11 271 28" anchor="default"/>
- <Combo id="cmb_orddept" taborder="23" innerdataset="ds_init_orddept" codecolumn="deptcd" datacolumn="depthngnm" class="combo_search" position="absolute 270 9 447 28" anchor="default" onitemchanged="grp_sea_cmb_orddept_onitemchanged"/>
- <Static id="caption7" text="전공의" class="search_name" position="absolute 464 11 523 28" anchor="default"/>
- <Combo id="cmb_userid" taborder="24" innerdataset="@ds_init_userlist" codecolumn="userid" datacolumn="usernm" class="combo_search" position="absolute 522 9 613 28" anchor="default" onitemchanged="grp_sea_cmb_userid_onitemchanged"/>
- <Static id="caption00" text="사번" class="search_name" position="absolute 632 11 691 28" anchor="default"/>
- <Edit id="Edit00" taborder="25" position="absolute 680 9 756 29" onkeydown="grp_sea_Edit00_onkeydown" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="수련의 파견 관리" class="tit_1" position="absolute 0 0 137 25"/>
- <Shape id="line8" class="line_1" position="absolute 0 65 1015 72" style="strokepen:3 solid #33bbbbff;"/>
- <Button id="button8" taborder="4" text="추가" class="btn2" position="absolute 864 876 906 896" anchor="top right" onclick="button8_onclick"/>
- <Button id="button9" taborder="5" text="삭제" class="btn2" position="absolute 908 876 950 896" anchor="top right" onclick="button9_onclick"/>
- <Button id="btn_SaveDhrcd" taborder="6" text="저장" class="btn4" position="absolute 956 876 1012 896" anchor="top right" onclick="btn_SaveDhrcd_onclick"/>
- <Grid id="grd_sampleexcel" taborder="7" useinputpanel="false" position="absolute 3 644 496 748" visible="false">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="180"/>
- <Column size="80"/>
- <Column size="60"/>
- <Column size="80"/>
- <Column size="80"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="진료과"/>
- <Cell col="1" text="성명"/>
- <Cell col="2" text="사번"/>
- <Cell col="3" text="시작일"/>
- <Cell col="4" text="종료일"/>
- </Band>
- <Band id="body">
- <Cell/>
- <Cell col="1"/>
- <Cell col="2"/>
- <Cell col="3" mask="####-##-##"/>
- <Cell col="4" mask="####-##-##"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_excel00" taborder="8" text="엑셀파일 업로드" class="btn7" position="absolute 144 876 264 896" anchor="top right" onclick="btn_excel00_onclick"/>
- <Button id="btn_excel01" taborder="9" text="엑셀" class="btn7" position="absolute 781 876 840 896" anchor="top right" onclick="btn_excel01_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_userlist" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="dutplcecd" type="STRING"/>
- <Column id="dutplcenm" type="STRING"/>
- <Column id="jobposcd" type="STRING"/>
- <Column id="tempyn" type="STRING"/>
- <Column id="userid" type="STRING"/>
- <Column id="usernm" type="STRING"/>
- <Column id="fromdd" type="STRING"/>
- <Column id="todd" type="STRING"/>
- <Column id="edittodd" type="STRING"/>
- <Column id="fstrgstrid" type="STRING"/>
- <Column id="fstrgstrnm" type="STRING"/>
- <Column id="fstrgstdt" type="STRING"/>
- <Column id="lastupdtrid" type="STRING"/>
- <Column id="lastupdtrnm" type="STRING"/>
- <Column id="lastupdtdt" type="STRING"/>
- <Column id="excelyn" type="STRING" size="256"/>
- <Column id="colorflag" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_orddept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="depthngnm" type="STRING"/>
- <Column id="deptcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="basedd" type="STRING" size="256"/>
- <Column id="orddeptcd" type="STRING" size="256"/>
- <Column id="userid" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_userlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="usernm" type="STRING"/>
- <Column id="userid" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_uploadexcel" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="dutplcenm" type="STRING"/>
- <Column id="usernm" type="STRING"/>
- <Column id="userid" type="STRING"/>
- <Column id="fromdd" type="STRING"/>
- <Column id="todd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hardcd568" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_hardcd569" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_hardcd570" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_jobpostcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cd">1799</Col>
- <Col id="nm">인턴</Col>
- </Row>
- <Row>
- <Col id="cd">1800</Col>
- <Col id="nm">레지던트</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_tempyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING" size="256"/>
- <Column id="nm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="cd">N</Col>
- <Col id="nm">-</Col>
- </Row>
- <Row>
- <Col id="cd">C</Col>
- <Col id="nm">기록</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_save" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.ipt_date" propid="value" datasetid="ds_main_cond" columnid="basedd"/>
- <BindItem id="item1" compid="grp_sea.cmb_orddept" propid="value" datasetid="ds_main_cond" columnid="orddeptcd"/>
- <BindItem id="item2" compid="grp_sea.cmb_userid" propid="value" datasetid="ds_main_cond" columnid="userid"/>
- <BindItem id="item3" compid="grp_sea.Edit00" propid="value" datasetid="ds_main_cond" columnid="userid"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : KNUH2.0
- * Job Name : EMR
- * Creator :
- * Make Date : 2014-08-29
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-08-29 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- include "emr_prcpmngtxp::SPMMO00100.xjs";
- //include "emr_commonxp::EMRCommon.xjs"
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPMMO00800
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로드
- ****************************************************************************************/
- function SPMMI00400_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- grdf_initGrid(grd_userlist);
- }
- function SPMMI00400_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setRowTypeIcon(grd_userlist, 0);
- grdf_setToolTipBind(grd_userlist);
-
- ds_main_cond.setColumn(0, "basedd", utlf_getCurrentDate());
- ds_main_cond.setColumn(0, "orddeptcd", "-");
- ds_main_cond.setColumn(0, "userid", "-");
-
- lf_mmbfGetDeptCodeComboList(ds_init_orddept , "D",""); //부서코드 콤보
- //20190916 이돈희 : 칠곡 교육수련실 요청으로 내과 추가
- dsf_addDsItem( ds_init_orddept, "deptcd", "depthngnm", "내과", "2010000000", "above" ); //부서콤보 Item '전체'추가
- dsf_addDsItem( ds_init_orddept, "deptcd", "depthngnm", "전체", "-", "above" ); //부서콤보 Item '전체'추가
-
- lf_getHardCDList("N", "568", null, ds_hardcd568);
- lf_getHardCDList("N", "569", null, ds_hardcd569);
- lf_getHardCDList("N", "570", null, ds_hardcd570);
-
- //20190916 이돈희 : 칠곡 교육수련실 요청으로 내과 추가, 해당 공통코드 다른 곳에서 사용하므로 아래와 같이 추가
- var iRow = ds_hardcd568.addRow();
- if(iRow > -1){
- ds_hardcd568.setColumn(iRow, "hardcdno" , "568");
- ds_hardcd568.setColumn(iRow, "hardcodenm", "내과 세부부서");
- ds_hardcd568.setColumn(iRow, "hardcd" , "2010000000");
- ds_hardcd568.setColumn(iRow, "hardcdnm" , "내과");
- ds_hardcd568.setColumn(iRow, "cdseqno" , "9");
- ds_hardcd568.setColumn(iRow, "realtime" , "N");
- }
- }
- function grp_sea_btn_srch_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetUserSrch();
- }
- /****************************************************************************************
- * Function : fGetUserSrch
- * Description : 파견의검색
- * Argument :
- * :
- * return type :
- * Creator :
- ****************************************************************************************/
- function fGetUserSrch() {
- var oParam = {};
- oParam.id = "TRMMI00401";
- oParam.service = "prcpinfoapp.PrcpInfoEtcMngt";
- oParam.method = "reqGetResidentUserList";
- oParam.inds = "req=" + "ds_main_cond";
- oParam.outds = "ds_userlist=userlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMMO00801";
- tranf_submit(oParam);
- }
- function grp_sea_cmb_orddept_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- ds_init_userlist.clearData();
- lf_mmbfGetUserComboList(ds_init_userlist , grp_sea.cmb_orddept.value, "0330");
- dsf_addDsItem( ds_init_userlist , "userid", "usernm", "전체", "-", "above");
- ds_main_cond.setColumn(0,"userid", "-");
-
- fGetUserSrch();
- }
- function grp_sea_cmb_userid_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fGetUserSrch();
- }
- function grp_sea_Edit00_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13) {
- obj.updateToDataset();
- fGetUserSrch();
- }
- }
- function button8_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_userlist.addRow();
- var nRow = ds_userlist.rowposition;
- ds_userlist.setColumn(nRow, "fromdd", utlf_getCurrentDate());
- ds_userlist.setColumn(nRow, "todd", utlf_getCurrentDate());
- ds_userlist.setColumn(nRow, "edittodd", utlf_getCurrentDate());
- ds_userlist.setColumn(nRow, "tempyn", "N");
- }
- function button9_onclick(obj:Button, e:ClickEventInfo)
- {
- fDeleteRow();
- }
- function fDeleteRow() {
- var nRow = ds_userlist.rowposition;
- var iStatus = ds_userlist.getRowType(nRow);
- if(nRow < 0) {
- alert("삭제할 행을 선택해주세요.");
- return;
- }
- if (iStatus == 2) { // 새로 삽입된 행이면
- ds_userlist.deleteRow(nRow);
- } else if (iStatus == 8){ // 삭제 상태 이면
- grdf_setStatus(grd_userlist, "", [nRow]);
- } else {
- var sFstRgstrId = ds_userlist.getColumn(nRow, "fstrgstrid");
- var sFstRgstDt = ds_userlist.getColumn(nRow, "fstrgstdt");
- if(sFstRgstDt.length > 8) {
- sFstRgstDt = sFstRgstDt.substring(0, 8);
- }
-
- trace("sFstRgstrId : " + sFstRgstrId );
- trace("getUserInfo : " + sysf_getUserInfo("userid") );
-
- trace("sFstRgstDt : " + sFstRgstDt );
- trace("CurrentDate : " + utlf_getCurrentDate() );
-
- if(sFstRgstrId != sysf_getUserInfo("userid") || sFstRgstDt != utlf_getCurrentDate()) {
- sysf_messageBox("로그인 사용자가 당일 등록한 정보만 삭제 가능 합니다.", "E");
- return;
- } else {
- grdf_setStatus(grd_userlist, "D", [nRow]);
- }
- }
- }
- function btn_SaveDhrcd_onclick(obj:Button, e:ClickEventInfo)
- {
- var oDsUpdate = grdf_getGridUpdateData(grd_userlist);
- if(oDsUpdate.rowcount < 1){
- sysf_messageBox("입력 또는 수정 할 ", "E013");// 입력, 수정, 삭제 데이터가 없으면 "입력된 데이터가 없습니다."는 메시지 출력
- return;
- }
-
- grdf_setStatusColumn(oDsUpdate, "status");//각 행의 status에 rowType 값에 따라 i, u, d로 업데이트 시켜줌
- ds_send_save.copyData(oDsUpdate, true);
-
- if( sysf_messageBox("파견의사 정보를","Q002") == 6 ){
-
- var oParam = {};
- oParam.id = "TXMMI00401";
- oParam.service = "prcpinfoapp.PrcpInfoEtcMngt";
- oParam.method = "reqExeSaveResidentUserInfo";
- oParam.inds = "req=ds_send_save";
- oParam.outds = "";
- oParam.async = false;
- var bRtn = tranf_submit(oParam);
-
- if(bRtn) {
- fGetUserSrch();
- }
- }
- }
- function btn_excel01_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_userlist, "파견의사목록", "파견의사목록", false, "", "user", true);
- }
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_sampleexcel, "파견의사등록", "파견의사등록", false, "", "user", true);
- }
- function btn_excel00_onclick(obj:Button, e:ClickEventInfo)
- {
- var nRow = 0;
- var sDutPlceCd = "";
- var sDutPlceNm = "";
- var sUserNm = "";
- var sUserId = "";
- var sFromDd = "";
- var sToDd = "";
-
- ds_uploadexcel.clearData();
- if( grdf_ImportExcel("ds_uploadexcel", 1, "") != false){
- var rows = ds_uploadexcel.rowcount;
-
- if( rows <= 0 ){
- sysf_messageBox("등록된 사용자 정보가 없습니다","");
- return;
- }
-
- for (i = 0; i < rows; i++){
- sDutPlceNm = ds_uploadexcel.getColumn(i, "dutplcenm");
- sUserNm = ds_uploadexcel.getColumn(i, "usernm");
- sUserId = ds_uploadexcel.getColumn(i, "userid");
- sFromDd = ds_uploadexcel.getColumn(i, "fromdd");
- sToDd = ds_uploadexcel.getColumn(i, "todd");
-
- if ( utlf_isNull(sUserId)) {
- continue;
- }
- if(sDutPlceNm == "진료과" || sUserNm == "성명" || sUserId == "사번" || sFromDd == "시작일" || sToDd == "종료일") {
- continue;
- }
-
- if(sFromDd.length > 8) {
- sFromDd = sFromDd.substring(0, 8);
- }
- if(sToDd.length > 8) {
- sToDd = sToDd.substring(0, 8);
- }
-
- if(sDutPlceNm == "내과" || sDutPlceNm == "외과" || sDutPlceNm == "소아청소년과") { // 세부부서 처리
- var sMainDeptNm = sDutPlceNm;
- var deptrows = 0;
-
- if(sMainDeptNm == "내과") {
- deptrows = ds_hardcd568.rowcount; //내과 세부부서
- } else if(sMainDeptNm == "외과") {
- deptrows = ds_hardcd569.rowcount; //외과 세부부서
- } else if(sMainDeptNm == "소아청소년과") {
- deptrows = ds_hardcd570.rowcount; //소아청소년과 세부부서
- }
-
- for (j = 0; j< deptrows; j++){
- if(sMainDeptNm == "내과") {
- sDutPlceCd = ds_hardcd568.getColumn(j, "hardcd");
- } else if(sMainDeptNm == "외과") {
- sDutPlceCd = ds_hardcd569.getColumn(j, "hardcd");
- } else if(sMainDeptNm == "소아청소년과") {
- sDutPlceCd = ds_hardcd570.getColumn(j, "hardcd");
- }
-
- sDutPlceNm = ds_init_orddept.getColumn(ds_init_orddept.findRow("deptcd", sDutPlceCd), "depthngnm");
-
- nRow = ds_userlist.addRow();
- //nRow = ds_userlist.rowposition;
-
- ds_userlist.setColumn(nRow, "dutplcecd", sDutPlceCd);
- ds_userlist.setColumn(nRow, "dutplcenm", sDutPlceNm);
- ds_userlist.setColumn(nRow, "usernm", sUserNm);
- ds_userlist.setColumn(nRow, "userid", sUserId);
- ds_userlist.setColumn(nRow, "fromdd", sFromDd);
- ds_userlist.setColumn(nRow, "todd", sToDd);
- ds_userlist.setColumn(nRow, "edittodd", sToDd);
- ds_userlist.setColumn(nRow, "tempyn", "N");
- ds_userlist.setColumn(nRow, "excelyn", "Y");
- }
- } else {
- sDutPlceCd = ds_init_orddept.getColumn(ds_init_orddept.findRow("depthngnm", sDutPlceNm), "deptcd");
-
- nRow = ds_userlist.addRow();
- //nRow = ds_userlist.rowposition;
-
- ds_userlist.setColumn(nRow, "dutplcecd", sDutPlceCd);
- ds_userlist.setColumn(nRow, "dutplcenm", sDutPlceNm);
- ds_userlist.setColumn(nRow, "usernm", sUserNm);
- ds_userlist.setColumn(nRow, "userid", sUserId);
- ds_userlist.setColumn(nRow, "fromdd", sFromDd);
- ds_userlist.setColumn(nRow, "todd", sToDd);
- ds_userlist.setColumn(nRow, "edittodd", sToDd);
- ds_userlist.setColumn(nRow, "tempyn", "N");
- ds_userlist.setColumn(nRow, "excelyn", "Y");
- }
- }
- ds_userlist.rowposition = -1;
-
- // 정렬 후 파일 내 동일한 정보 있는지 체크 후 색깔 표시
- ds_userlist.updateLocaleSortGroup("S:+excelyn+userid+dutplcenm+fromdd+todd"); // 정렬
-
- var rows = ds_userlist.rowcount;
- var startRow = ds_userlist.findRow("excelyn", "Y");
- var cols = grd_userlist.getCellCount("Head");
- var nmIdx = grd_userlist.getBindCellIndex("body", "usernm"); // 성명 칼럼에 색깔 표시하기 위함.
-
- // 업로드할 엑셀파일 내 중복된 내용 있는지 체크 후 있으면 해당 row 제거
- for (var m = startRow; m < rows - 1; m++){
-
- // 동일사번, 동일과 정보 중 파견기간 겹치는 경우
- if(ds_userlist.getColumn(m, "userid") == ds_userlist.getColumn(m + 1, "userid")
- && ds_userlist.getColumn(m, "dutplcecd") == ds_userlist.getColumn(m + 1, "dutplcecd")
- && ds_userlist.getColumn(m, "todd") >= ds_userlist.getColumn(m + 1, "fromdd")){
-
- if(ds_userlist.getColumn(m, "excelyn") == "Y"
- && ds_userlist.getColumn(m + 1, "excelyn") == "Y"){
- ds_userlist.setColumn(m, "colorflag", "Y");
- ds_userlist.setColumn(m + 1, "colorflag", "Y");
- }
- }
- }
- }
- }
- function grd_userlist_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if(e.keycode == 46) { // delete 키 입력시
- fDeleteRow();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|