123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPMMR09200" classname="SMMMR05100_CONSULT수신의관리" inheritanceid="" position="absolute 0 0 465 420" titletext="컨설트 수신의사 관리" oninit="SPMMR09200_oninit" onload="SPMMR09200_onload">
- <Layouts>
- <Layout>
- <Static id="stx_tit" text="컨설트 수신의사 관리" position="absolute 512 0 666 20" class="tit_1" visible="false"/>
- <Static id="caption11" text="컨설트 수신의사 리스트" class="tit_2" position="absolute 0 4 171 20"/>
- <Grid id="grd_dhrcdlist" taborder="1" binddataset="ds_main_dhrcdlist" useinputpanel="false" position="absolute 0 23 465 420" autofittype="col" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="25"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="150"/>
- <Column size="110"/>
- <Column size="80"/>
- <Column size="80"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell displaytype="normal" text="hardcdno"/>
- <Cell col="1"/>
- <Cell col="2" displaytype="normal" text="순번"/>
- <Cell col="3" displaytype="normal" text="진료과"/>
- <Cell col="4" displaytype="normal" text="의사명"/>
- <Cell col="5" displaytype="normal" text="진료과"/>
- <Cell col="6" displaytype="normal" text="의사명"/>
- <Cell col="7" displaytype="normal" text="시작일자"/>
- <Cell col="8" displaytype="normal" text="종료일자"/>
- <Cell col="9" displaytype="normal" text="적용시작일시"/>
- <Cell col="10" displaytype="normal" text="적용종료일시"/>
- </Band>
- <Band id="body">
- <Cell displaytype="normal" text="bind:hardcdno"/>
- <Cell col="1"/>
- <Cell col="2" displaytype="normal" edittype="expr:getRowType(currow) == 2 ? 'text' : ''" text="bind:cdseqno"/>
- <Cell col="3" text="bind:trgtcd" combodataset="ds_init_deptlist" combocodecol="deptcd" combodatacol="depthngnm" combodisplayrowcount="-1"/>
- <Cell col="4" text="bind:trgtcdnm"/>
- <Cell col="5" displaytype="normal" text="bind:hardspec"/>
- <Cell col="6" displaytype="normal" text="bind:trgtcdsnm"/>
- <Cell col="7" displaytype="date" edittype="date" text="bind:valifromdd" calendardisplaynulltype="none"/>
- <Cell col="8" displaytype="date" edittype="date" text="bind:valitodd" calendardisplaynulltype="none"/>
- <Cell col="9" displaytype="date" edittype="date" text="bind:valifromdt" calendardisplaynulltype="none"/>
- <Cell col="10" displaytype="date" edittype="date" text="bind:valitodt" calendardisplaynulltype="none"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="button8" taborder="2" text="추가" onclick="button8_onclick" class="btn2" position="absolute 318 0 360 20" anchor="top right"/>
- <Button id="button9" taborder="3" text="삭제" onclick="button9_onclick" class="btn2" position="absolute 362 0 404 20" anchor="top right"/>
- <Button id="btn_SaveDhrcd" taborder="4" text="저장" onclick="btn_SaveDhrcd_onclick" class="btn4" position="absolute 409 0 465 20" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_dhrcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdno" type="STRING" size="256"/>
- <Column id="cdseqno" type="STRING" size="256"/>
- <Column id="trgtcd" type="STRING" size="256"/>
- <Column id="trgtcdnm" type="STRING" size="256"/>
- <Column id="valifromdd" type="STRING" size="256"/>
- <Column id="valitodd" type="STRING" size="256"/>
- <Column id="valifromdt" type="STRING" size="256"/>
- <Column id="valitodt" type="STRING" size="256"/>
- <Column id="hardspec" type="STRING" size="256"/>
- <Column id="trgtcdsnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" reversesubsum="false" loadkeymode="keep">
- <ColumnInfo>
- <Column id="deptcd" type="STRING" size="255"/>
- <Column id="depthngnm" type="STRING" size="255"/>
- <Column id="deptengabbr" type="STRING" size="255"/>
- <Column id="usersort" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-01-17
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- *
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var sHardCdNo = "9974";
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Function : lf_SetHrcdInfo
- * Description : 컨설트 수신의사 리스트 클릭시 기본정보 설정
- * Argument :
- * retrun type :
- * Creator :
- ****************************************************************************************/
- function lf_SetHrcdInfo(){
-
- ds_main_dhrcdlist.clearData();
-
- if(!utlf_isNull(sHardCdNo)) {
- dsf_createDsRow("ds_cond_reqdata", [{col:"userid", type:"string", size:256, val:sysf_getUserInfo("userid")}
- , {col:"deptcd", type:"string", size:256, val:sysf_getUserInfo("dutplcecd")}
- , {col:"hardcdno", type:"string", size:256, val:sHardCdNo}
- //, {col:"isku2id", type:"string", size:256, val:frmf_getScreenID()}
- ]);
- var oParam = {};
- oParam.id = "TRMMB08402";
- oParam.service = "prcpbaseapp.PrcpClsMngt";
- oParam.method = "reqGetHardCodeInfo";
- oParam.inds = "req=ds_cond_reqdata";
- oParam.outds = "ds_main_dhrcdlist=dhrcdlist";
- oParam.async = false;
- oParam.callback = "cf_TRMMB08402";
- tranf_submit(oParam);
-
- }
- }
- /****************************************************************************************
- * Argument : 01.sSvcId : 서비스 ID
- * : 02.nErrorCode : 에러코드
- * : 03.sErrorMsg : 에러메시지
- * Description : TRMMB08402의 콜백함수
- ****************************************************************************************/
- function cf_TRMMB08402(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- /****************************************************************************************
- * Function : lf_SaveDHrcdList
- * Description : 컨설트 수신의사 리스트 저장
- * Argument :
- * retrun type :
- * Creator :
- ****************************************************************************************/
- function lf_SaveDHrcdList(){
- // var sHardCdNo = grdDS.getColumn(grdDS.rowposition, "hardcd");
- // if(utlf_isNull(sHardCdNo)) {
- // alert("선택 된 항목이 없습니다.");
- // return;
- // }
-
- if( sysf_messageBox("컨설트 수신의 정보를","Q002") == 6 ){
-
- // step1. 불필요 항목 정리
- for( var i=ds_main_dhrcdlist.rowcount-1; i>=0; i-- ){
- var nTrgtcd = ds_main_dhrcdlist.getColumn(i, "trgtcd");
- var nTrgtcdnm = ds_main_dhrcdlist.getColumn(i, "trgtcdnm");
- if( utlf_isNull(nTrgtcd) || utlf_isNull(nTrgtcdnm)){
- ds_main_dhrcdlist.deleteRow(i);
- }
- }
-
- // step2. 수정사항 업데이트
- dsf_createDs("ds_send_dhrcdlist");
- var oDsUpdate = grdf_getGridUpdateData(grd_dhrcdlist);
- grdf_setStatusColumn(oDsUpdate, "status");
- ds_send_dhrcdlist.copyData(oDsUpdate, true);
-
- if( ds_send_dhrcdlist.rowcount < 1 ){
- sysf_messageBox("저장할 내용이 없습니다.");
- return;
- }
-
- //dsf_setDefaultVal(ds_send_dhrcdlist, "isku2id:"+frmf_getScreenID()+",codeupdate:Y");
- dsf_setDefaultVal(ds_send_dhrcdlist, "codeupdate:Y");
-
- var oParam = {};
- oParam.id = "TXMMB08402";
- oParam.service = "prcpbaseapp.PrcpClsMngt";
- oParam.method = "reqExeSaveDHardCodeList";
- oParam.inds = "req=ds_send_dhrcdlist";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXMMB08402";
- tranf_submit(oParam);
- }
- }
- /****************************************************************************************
- * Argument : 01.sSvcId : 서비스 ID
- * : 02.nErrorCode : 에러코드
- * : 03.sErrorMsg : 에러메시지
- * Description : TXMMB08402의 콜백함수
- ****************************************************************************************/
- function cf_TXMMB08402(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- lf_SetHrcdInfo();
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPMMR09200
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 초기화
- ****************************************************************************************/
- function SPMMR09200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPMMR09200
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 초기화
- ****************************************************************************************/
- function SPMMR09200_onload(obj:Form, e:LoadEventInfo)
- {
-
- grdf_setRowTypeIcon(grd_dhrcdlist, 1);
-
- // 부서 공통코드 조회
- lf_mmbfGetDeptCodeComboList(ds_init_deptlist, "A");
-
- lf_SetHrcdInfo();
-
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_SaveDhrcd
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 저장 버튼
- ****************************************************************************************/
- function btn_SaveDhrcd_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_SaveDHrcdList();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button8
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행추가 버튼
- ****************************************************************************************/
- function button8_onclick(obj:Button, e:ClickEventInfo)
- {
- // var sHardCdNo = grdDS.getColumn(grdDS.rowposition, "hardcd");
- // if(utlf_isNull(sHardCdNo)) {
- // alert("선택 된 항목이 없습니다.");
- // return;
- // }
- //
-
- var objArg = new Object();
- objArg.param = "_OneS_DD";
- objArg.flag = "usernm";
-
- var rtnDs = frmf_modal("SPZSU10103", "SPZSU10103", objArg, null, null, null, null, null, null, null, null, null, "M");
- if( !utlf_isNull(rtnDs) ){
- trace(rtnDs.saveXML());
- var userid = utlf_transNullToEmpty(rtnDs.getColumn(0, "userid"));
- var usernm = utlf_transNullToEmpty(rtnDs.getColumn(0, "usernm"));
- var dutplcecd = utlf_transNullToEmpty(rtnDs.getColumn(0, "dutplcecd"));
- var dutplcenm = utlf_transNullToEmpty(rtnDs.getColumn(0, "dutplcenm"));
- var jobkindcd = utlf_transNullToEmpty(rtnDs.getColumn(0, "jobkindcd"));
-
- if( utlf_isNull(userid) || utlf_isNull(dutplcecd) ){
- sysf_messageBox("컨설트 수신의사 정보가 없습니다.", "E");
- return;
- }
-
- if( !utlf_isNull(jobkindcd) && jobkindcd.substring(0, 2) != "03" ){
- sysf_messageBox("의사 직급이 아닙니다.", "E");
- return;
- }
-
- var nDupRow = ds_main_dhrcdlist.getCaseCount("trgtcd == '" + dutplcecd + "' && trgtcdnm == '" + userid + "'");
- if( nDupRow > 0 ){
- sysf_messageBox("선택한 대상자는 존재합니다.", "E");
- return;
- }
-
- var nRow = ds_main_dhrcdlist.addRow();
- ds_main_dhrcdlist.setColumn(nRow, "hardcdno", sHardCdNo);
- ds_main_dhrcdlist.setColumn(nRow, "valifromdd", utlf_getCurrentDate());
- ds_main_dhrcdlist.setColumn(nRow, "valitodd", "99991231");
- ds_main_dhrcdlist.setColumn(nRow, "trgtcd", dutplcecd);
- ds_main_dhrcdlist.setColumn(nRow, "trgtcdnm", userid);
- ds_main_dhrcdlist.setColumn(nRow, "hardspec", dutplcenm);
- ds_main_dhrcdlist.setColumn(nRow, "trgtcdsnm", usernm);
-
- //grd_dhrcdlist.showEditor(true);
- }
-
-
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button9
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 행삭제 버튼
- ****************************************************************************************/
- function button9_onclick(obj:Button, e:ClickEventInfo)
- {
-
- // var sHardCdNo = grdDS.getColumn(0, "hardcd");
- // if(utlf_isNull(sHardCdNo)) {
- // alert("선택 된 항목이 없습니다.");
- // return;
- // }
-
- var nRow = ds_main_dhrcdlist.rowposition;
- var iStatus = ds_main_dhrcdlist.getRowType(nRow);
- if(nRow < 0) {
- alert("삭제할 조건행을 선택해주세요.");
- return;
- }
- if (iStatus == 2) {
- ds_main_dhrcdlist.deleteRow(nRow);
- } else {
- grdf_setStatus(grd_dhrcdlist, "D", [nRow]);
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|