123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPADB64100" position="absolute 0 0 630 616" titletext="시럽제 제한 약품 리스트 조회" oninit="SPADB64100_oninit" onload="SPADB64100_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="시럽제 제한 조건 관리" class="tit_1" position="absolute 0 0 162 26"/>
- <Static id="caption3" text="시럽제 제한 조건 리스트" class="tit_2" position="absolute 0 31 188 47"/>
- <Button id="button3" taborder="1" text="저장" class="btn4" visible="false" position="absolute 574 25 630 47"/>
- <Grid id="grd_hardcodespec" taborder="2" binddataset="ds_grd_hardcodespec" useinputpanel="false" position="absolute 0 52 630 232" autofittype="col" onlbuttonup="grd_hardcodespec_onlbuttonup" cellsizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="100"/>
- <Column size="494"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="조건코드"/>
- <Cell col="2" text="조건명"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" text="bind:hardcdno"/>
- <Cell col="2" displaytype="text" edittype="none" text="bind:hardcdnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="cpt_worktitle" text="시럽제 제한 약품 리스트" class="tit_2" position="absolute 0 244 175 262"/>
- <Button id="button7" taborder="3" text="신규" class="btn2" position="absolute 433 241 475 260" onclick="button7_onclick"/>
- <Button id="button8" taborder="4" text="삭제" class="btn2" position="absolute 478 241 520 260" onclick="button8_onclick"/>
- <Button id="button9" taborder="5" text="저장" class="btn5" position="absolute 523 241 565 260" onclick="button9_onclick"/>
- <Button id="btn_excel" taborder="6" text="Excel" class="btn7" position="absolute 568 241 629 260" onclick="btn_excel_onclick"/>
- <Grid id="grd_hardcodespecdetl" taborder="7" binddataset="ds_grd_hardcodespecdetl" useinputpanel="false" position="absolute 0 265 630 616" autofittype="col" onexpanddown="grd_hardcodespecdetl_onexpanddown" autoenter="select" cellsizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="315"/>
- <Column size="0"/>
- <Column size="90"/>
- <Column size="90"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="status"/>
- <Cell col="2" text="hardcd"/>
- <Cell col="3" text="처방코드"/>
- <Cell col="4" text="제한 사유"/>
- <Cell col="5" text="코드일련번호"/>
- <Cell col="6" text="시작일자"/>
- <Cell col="7" text="종료일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" displaytype="image"/>
- <Cell col="1" text="bind:status"/>
- <Cell col="2" text="bind:hardcd"/>
- <Cell col="3" displaytype="text" edittype="text" text="bind:trgtcd" expandshow="show"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:trgtcdnm"/>
- <Cell col="5" text="bind:cdseqno"/>
- <Cell col="6" displaytype="date" edittype="date" text="bind:valifromdd"/>
- <Cell col="7" displaytype="date" edittype="date" text="bind:valitodd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape id="line1" class="line_1" position="absolute 0 47 630 53"/>
- <Shape id="line00" class="line_1" position="absolute 0 260 630 266"/>
- <Div id="group1" taborder="10" text="group1" position="absolute 7 319 604 549" style="background:white;border:2 solid #808080ff ;" visible="false">
- <Layouts>
- <Layout>
- <Grid id="grd_limantibioapplist" taborder="0" binddataset="ds_grd_limantibioapplist" useinputpanel="false" autofittype="col" oncelldblclick="grd_limantibioapplist_oncelldblclick" visible="true" position="absolute 1 1 592 201" cellsizingtype="both" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="100"/>
- <Column size="260"/>
- <Column size="100"/>
- <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="시작일자"/>
- <Cell col="4" text="종료일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow+1"/>
- <Cell col="1" style="align:left middle;padding:0 5 0 5;" text="bind:prcpcd"/>
- <Cell col="2" style="align:left middle;padding:0 5 0 5;" text="bind:prcpnm"/>
- <Cell col="3" displaytype="date" edittype="date" text="bind:valifromdd"/>
- <Cell col="4" displaytype="date" edittype="date" text="bind:valitodd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="btn_grdhidden" taborder="1" text="닫기" onclick="btn_grdhidden_onclick" class="btn2" position="absolute 550 204 592 223"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape id="line02" class="line_1" position="absolute 0 46 630 52"/>
- <Shape id="line03" class="line_1" position="absolute 0 48 630 54"/>
- <Shape id="line04" class="line_1" position="absolute 0 259 630 265"/>
- <Shape id="line05" class="line_1" position="absolute 0 261 630 267"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_hardcodespec" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdno" type="STRING"/>
- <Column id="hardcdnm" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_grd_hardcodespecdetl" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING"/>
- <Column id="hardcd" type="STRING"/>
- <Column id="trgtcd" type="STRING"/>
- <Column id="trgtcdnm" type="STRING"/>
- <Column id="cdseqno" type="STRING"/>
- <Column id="valifromdd" type="STRING"/>
- <Column id="valitodd" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_grd_limantibioapplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="prcpcd" type="STRING"/>
- <Column id="prcpnm" type="STRING"/>
- <Column id="valifromdd" type="STRING"/>
- <Column id="valitodd" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hardcdlist" type="STRING" size="256"/>
- <Column id="prcpcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="hardcdlist">319</Col>
- </Row>
- </Rows>
- </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="hardcdno" type="STRING" size="256"/>
- <Column id="hardcdnm" type="STRING" size="256"/>
- <Column id="status" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-11-03
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-03 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPADB64100
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SPADB64100_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPADB64100
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SPADB64100_onload(obj:Form, e:LoadEventInfo)
- {
- try {
- ds_hidden.copyData(arg_ds_hidden);
- } catch(e) {}
-
- //상태값 설정
- grdf_setRowTypeIcon(grd_hardcodespecdetl, 0);
- ds_grd_hardcodespec.clearData();
- ds_grd_hardcodespecdetl.clearData();
- ds_grd_limantibioapplist.clearData();
-
- grdf_setGridSort(grd_hardcodespecdetl); // 그리드 소트만
-
- //시럽제 제한 조건 리스트 조회
- var oParam = {};
- oParam.id = "TRMMO33101";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntiBioCondList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_hardcodespec=speclist";
- oParam.async = false;
- //oParam.callback = "cf_TRMMO33101";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button7
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 신규 Button Event
- ****************************************************************************************/
- function button7_onclick(obj:Button, e:ClickEventInfo)
- {
- if( ds_grd_hardcodespec.rowposition < 0 ){
- alert("시럽제 제한 조건을 선택해주십시오.");
- return;
- }
-
- var iRow = ds_grd_hardcodespecdetl.addRow();
- if( ds_grd_hardcodespecdetl.rowcount > 0 ){
- ds_grd_hardcodespecdetl.setColumn(iRow, "status", "I");
- ds_grd_hardcodespecdetl.setColumn(iRow, "hardcd", ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdno"));
- ds_grd_hardcodespecdetl.setColumn(iRow, "valifromdd", utlf_getCurrentDate());
- ds_grd_hardcodespecdetl.setColumn(iRow, "valitodd", "99991231");
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : button8
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 삭제 Button Event
- ****************************************************************************************/
- function button8_onclick(obj:Button, e:ClickEventInfo)
- {
- var cRow = ds_grd_hardcodespecdetl.rowposition;
- var getStatus = ds_grd_hardcodespecdetl.getColumn(cRow, "status");
- //sysf_trace("getStatus : " + getStatus);
- if( getStatus == "I" ){
- ds_grd_hardcodespecdetl.deleteRow(cRow);
- } else if( getStatus == "D" ){
- ds_grd_hardcodespecdetl.setColumn(cRow, "status", "");
- grdf_setStatus(grd_hardcodespecdetl, "", grdf_getSelectedRows(grd_hardcodespecdetl));
- } else {
- ds_grd_hardcodespecdetl.setColumn(cRow, "status", "D");
- grdf_setStatus(grd_hardcodespecdetl, "D", grdf_getSelectedRows(grd_hardcodespecdetl));
- }
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : grd_hardcodespecdetl
- * Event : onexpanddown
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 처방코드 검색
- ****************************************************************************************/
- function grd_hardcodespecdetl_onexpanddown(obj:Grid, e:GridMouseEventInfo)
- {
- if(e.col == 3) {
- obj.updateToDataset();
- ds_send_reqdata.clear();
- ds_send_reqdata.addColumn("prcpcd", "string");
- ds_send_reqdata.addColumn("prcpnm", "string");
-
- var nRow = ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(nRow, "prcpcd", ds_grd_hardcodespecdetl.getColumn(e.row, "trgtcd"));
- //ds_send_reqdata.setColumn(nRow, "prcpnm", ds_grd_hardcodespecdetl.getColumn(e.row, "trgtcdnm"));
-
- var oParam = {};
- oParam.id = "TRMMD08701";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntibioMasterPrcpList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_limantibioapplist=limantibiodruglist";
- oParam.async = true;
- //oParam.callback = "cf_TRMMD08701";
- tranf_submit(oParam);
- group1.visible = true;
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_excel
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Excel Button Event
- ****************************************************************************************/
- function btn_excel_onclick(obj:Button, e:ClickEventInfo)
- {
- if( ds_grd_hardcodespecdetl.rowcount > 0 ){
- grdf_exportExcel(grd_hardcodespecdetl,"시럽제 제한 조건코드","sheet1");
- } else {
- sysf_messageBox("시럽제 제한 조건을 선택해주십시오.", "I");
- return;
- }
- }
- /****************************************************************************************
- * 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 oDsUpdate = grdf_getGridUpdateData(grd_limantibioapplist);
- var oDsUpdate = grdf_getGridUpdateData(grd_hardcodespecdetl,"all");
- if( oDsUpdate.rowcount < 1 ){
- sysf_messageBox("입력","E013");
- return;
- }
-
- ds_send_req.clear();
- dsf_makeValue(ds_send_req,"hardcdno","string",ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdno"));
- dsf_makeValue(ds_send_req,"hardcdnm","string",ds_grd_hardcodespec.getColumn(ds_grd_hardcodespec.rowposition, "hardcdnm"));
-
- // ds_send_reqdata.clearData();
- // grdf_setStatusColumn(oDsUpdate, "status"); // 각행의 status에 rowType 값에 따라 'i', 'u', 'd'로 업데이트 시켜준다
- // ds_send_reqdata.copyData(oDsUpdate, true);
- for(var i = 0 ; i < oDsUpdate.rowcount ; i++) {
- if(oDsUpdate.getRowType(i) == 4) {
- oDsUpdate.setColumn(i,"status","U");
- }
- }
-
- ds_send_reqdata.clear();
- ds_send_reqdata.copyData(oDsUpdate, true);
-
- for( var i = 0; i < ds_send_reqdata.rowcount; i++ ){
- // 처방코드 null check
- if( utlf_isNull(ds_send_reqdata.getColumn(i, "trgtcd")) ){
- sysf_messageBox("처방코드는 ","I003");
- return;
- }
- // 처방명칭 null check
- if( utlf_isNull(ds_send_reqdata.getColumn(i, "trgtcdnm")) ){
- sysf_messageBox("처방명칭(제한사유)은 ","I003");
- return;
- }
- // 시작일자 null check
- if( utlf_isNull(ds_send_reqdata.getColumn(i, "valifromdd")) ){
- sysf_messageBox("시작일자는 ","I003");
- return;
- }
- // 종료일자 null check
- if( utlf_isNull(ds_send_reqdata.getColumn(i, "valitodd")) ){
- sysf_messageBox("종료일자는 ","I003");
- return;
- }
- }
-
- var oParam = {};
- oParam.id = "TRMMO33102";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqExeLimAntiBioCondInfo";
- oParam.inds = "req=ds_send_req savedata=ds_send_reqdata";
- oParam.outds = "ds_grd_hardcodespecdetl=specdetllist";
- oParam.async = false;
- //oParam.callback = "cf_TRMMO33102";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : group1.btn_grdhidden
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 처방코드조회 POPUP 닫기Event
- ****************************************************************************************/
- function btn_grdhidden_onclick(obj:Button, e:ClickEventInfo)
- {
- group1.visible = false;
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : group1.grd_limantibioapplist
- * Event : oncelldblclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 처방코드조회 리스트 선택 Event
- ****************************************************************************************/
- function grd_limantibioapplist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var pRow = ds_grd_hardcodespecdetl.rowposition;
- var cRow = e.row;
-
- if(cRow > -1) {
- ds_grd_hardcodespecdetl.setColumn(pRow, "trgtcd" , ds_grd_limantibioapplist.getColumn(cRow, "prcpcd"));
- ds_grd_hardcodespecdetl.setColumn(pRow, "trgtcdnm" , ds_grd_limantibioapplist.getColumn(cRow, "prcpnm"));
- group1.visible = false;
- }
- }
- /****************************************************************************************
- * Components : Grid
- * Components ID : group1.grd_hardcodespec
- * Event : onlbuttonup
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 제한조건 리스트 선택
- ****************************************************************************************/
- function grd_hardcodespec_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
- {
- if(e.row > -1) {
- ds_main_cond.setColumn(0, "hardcdno", ds_grd_hardcodespec.getColumn(e.row, "hardcdno"));
- ds_main_cond.setColumn(0, "hardcdnm", ds_grd_hardcodespec.getColumn(e.row, "hardcdnm"));
-
- //MIX 처방 약품 리스트 조회
- var oParam = {};
- oParam.id = "TRMMO33101";
- oParam.service = "prcpmngtapp.LimAntibioMngt";
- oParam.method = "reqGetLimAntiBioCondInfo";
- oParam.inds = "req=ds_main_cond";
- oParam.outds = "ds_grd_hardcodespecdetl=specdetllist";
- oParam.async = true;
- //oParam.callback = "cf_TRMMO33101";
- tranf_submit(oParam);
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|