123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMADT50201" position="absolute 0 0 837 736" titletext="약품 재고 관리" oninit="SMADT50201_oninit" onload="SMADT50201_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 25 836 735" id="group3" scrollbars="autoboth" anchor="all">
- <Layouts>
- <Layout>
- <Static text="상세 내역" position="absolute 0 54 183 71" id="caption10" class="tit_2" anchor="default"/>
- <Grid position="absolute 0 75 836 710" id="datagrid1" binddataset="ds_main_prcplist" anchor="all" cellsizingtype="both" onvtracklast="group3_datagrid1_onvtracklast" selecttype="multirow" extendsizetype="row">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="45"/>
- <Column size="69"/>
- <Column size="80"/>
- <Column size="0"/>
- <Column size="180"/>
- <Column size="60"/>
- <Column size="0"/>
- <Column size="57"/>
- </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="불출수량"/>
- <Cell col="12" text="UNIQNO"/>
- <Cell col="13" text="투약번호"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" text="expr:currow + 1"/>
- <Cell col="1" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:genrdd"/>
- <Cell col="2" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:genrtm"/>
- <Cell col="3" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:prcpdd"/>
- <Cell col="4" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:spcldrug" wordwrap="char"/>
- <Cell col="5" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:deptnm" wordwrap="char"/>
- <Cell col="6" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:wardnm"/>
- <Cell col="7" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:pid"/>
- <Cell col="8" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:panm" wordwrap="char"/>
- <Cell col="9" displaytype="text" text="bind:calcscorcd"/>
- <Cell col="10" displaytype="text" style="align:left top;padding:4 2 1 2;" text="bind:engnm" wordwrap="char"/>
- <Cell col="11" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:execprcptotqty"/>
- <Cell col="12" displaytype="text" text="bind:execdd"/>
- <Cell col="13" displaytype="text" style="align:center top;padding:4 2 1 2;" text="bind:drugno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape position="absolute 0 70 836 77" linetype="horizontal" id="line4" class="line_1" anchor="left top right" style="strokepen:3 solid #33bbbbff;"/>
- <Div id="group2" taborder="1" position="absolute 0 0 836 45" class="div_SA" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption1" text="조회/마감/재고반영 부서" class="search_name" visible="false" position="absolute 185 15 370 32" anchor="default"/>
- <Button id="btn_srch" taborder="1" text="조회" class="btn3" visible="false" position="absolute 724 10 784 32" anchor="default" onclick="group3_group2_btn_srch_onclick"/>
- <Button id="btn_excsave" taborder="2" text="엑셀저장" class="btn2" visible="false" position="absolute 15 15 79 34" anchor="default" onclick="group3_group2_btn_excsave_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="약품 재고 환자별 상세 내역" class="tit_1" position="absolute 0 0 217 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_prcplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="genrdd" type="STRING"/>
- <Column id="genrtm" type="STRING"/>
- <Column id="prcpdd" type="STRING"/>
- <Column id="spcldrug" type="STRING"/>
- <Column id="deptnm" type="STRING"/>
- <Column id="wardnm" type="STRING"/>
- <Column id="pid" type="STRING"/>
- <Column id="panm" type="STRING"/>
- <Column id="calcscorcd" type="STRING"/>
- <Column id="engnm" type="STRING"/>
- <Column id="execprcptotqty" type="STRING"/>
- <Column id="execdd" type="STRING"/>
- <Column id="drugno" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="srchfromdd" type="STRING" size="256"/>
- <Column id="calcscorcd" type="STRING" size="256"/>
- <Column id="execdeptcd" type="STRING" size="256"/>
- <Column id="prcpflag" type="STRING" size="256"/>
- <Column id="endtime" type="STRING" size="256"/>
- <Column id="fromddflag" type="STRING" size="256"/>
- <Column id="fromtm" type="STRING" size="256"/>
- <Column id="toddflag" type="STRING" size="256"/>
- <Column id="totm" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- <Column id="srchorddeptcd" type="STRING" size="256"/>
- <Column id="issdeptcd" type="STRING" size="256"/>
- <Column id="spcldrug" type="STRING" size="256"/>
- <Column id="maendflag" type="STRING" size="256"/>
- <Column id="ddflag" type="STRING" size="256"/>
- <Column id="srchdeptcd" type="STRING" size="256"/>
- <Column id="offset" type="STRING" size="256"/>
- <Column id="pagesize" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="srchfromdd"/>
- <Col id="calcscorcd"/>
- <Col id="execdeptcd"/>
- <Col id="prcpflag">O</Col>
- <Col id="endtime"/>
- <Col id="fromddflag"/>
- <Col id="fromtm">150001</Col>
- <Col id="toddflag"/>
- <Col id="totm">150000</Col>
- <Col id="fromdd"/>
- <Col id="todd"/>
- <Col id="srchorddeptcd"/>
- <Col id="issdeptcd"/>
- <Col id="spcldrug"/>
- <Col id="maendflag"/>
- <Col id="ddflag"/>
- <Col id="srchdeptcd">전체</Col>
- <Col id="offset">0</Col>
- <Col id="pagesize">1000</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="drugcd" type="STRING" size="256"/>
- <Column id="fromddflag" type="STRING" size="256"/>
- <Column id="toddflag" type="STRING" size="256"/>
- <Column id="fromtm" type="STRING" size="256"/>
- <Column id="totm" type="STRING" size="256"/>
- <Column id="issdeptcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="drugcd"/>
- <Col id="fromddflag"/>
- <Col id="toddflag"/>
- <Col id="fromtm"/>
- <Col id="totm"/>
- <Col id="issdeptcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_chksum" 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-13
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-11-13 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- var arErrorCode = new HashArray();
- /******************************************************************
- * Argument :
- * Description : 초기화
- ******************************************************************/
- function SMADT50201_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMADT50201_onload(obj:Form, e:LoadEventInfo)
- {
- // 약품재고관리 상세 (메인메뉴에서 본 화면 호출 시 예외처리)
- try {
- if( arg_ds_temp.rowcount > 0 ){
- ds_temp.copyData(arg_ds_temp);
- }
- } catch(e) {
- sysf_catchTrace(e);
- }
-
- grdf_setGridSort(group3.datagrid1); // 그리드 소트만
-
- ds_main_prcplist.clearData();
- frmf_inputEnterKey("group3.group2.btn_srch", "onclick", new ClickEventInfo);
- }
- /******************************************************************
- * Argument :
- * Description : 조회 Button event
- ******************************************************************/
- function group3_group2_btn_srch_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_send.setColumn(0, "calcscorcd", ds_temp.getColumn(0, "drugcd"));
- ds_send.setColumn(0, "fromddflag", ds_temp.getColumn(0, "fromddflag"));
- ds_send.setColumn(0, "toddflag", ds_temp.getColumn(0, "toddflag"));
- ds_send.setColumn(0, "fromtm", ds_temp.getColumn(0, "fromtm"));
- ds_send.setColumn(0, "totm", ds_temp.getColumn(0, "totm"));
-
- var issdeptcd = ds_temp.getColumn(0, "issdeptcd");
- if(issdeptcd == "병동약국") {
- ds_send.setColumn(0, "issdeptcd","3240300000");
- } else if(issdeptcd == "외래약국") {
- ds_send.setColumn(0, "issdeptcd","3240400000");
- } else if(issdeptcd == "특수조제실") {
- ds_send.setColumn(0, "issdeptcd","3240807000");
- }
-
- dsf_setTypeFormat(ds_send, "offset:INT^pagesize:INT");
- var oParam = {};
- oParam.id = "TRADT50203";
- oParam.service = "pharmacystocapp.DrugStocSum";
- oParam.method = "reqGetDrugStocSumDetlList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_prcplist=prcpinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRADT50203";
- tranf_submit(oParam);
- }
- /******************************************************************
- * Argument :
- * Description : Button event
- ******************************************************************/
- function group3_group2_btn_excsave_onclick(obj:Button, e:ClickEventInfo)
- {
- // 조회일자로 ast에 집계 출력된 내역이 있는지 확인.
- var oParam = {};
- oParam.id = "TRADT11026";
- oParam.service = "pharmacydrugsumapp.BeforeCure";
- oParam.method = "reqGetChkAst";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_chksum=item";
- oParam.async = false;
- //oParam.callback = "cf_TRADT11026";
- tranf_submit(oParam);
-
- var chkast = ds_init_chksum.getColumn(0, "chkast");
-
- // ast에 집계된 내역이 없으면 중지
- if( chkast != "Y" ) {
- alert("조회된 일자로 발주된 데이터가 없습니다. ");
- return;
- }
-
- // 조회일자로 집계된 내역을 출력한다.
- var prcplist = ds_main_prcplist.getColCount(0, "inorddeptnm");
- ds_send.setColumn(0, "prnflag", "E");
-
- if( utlf_isNull(prcplist) ) {
- ds_main_prcplist.clearData();
- var oParam = {};
- oParam.id = "TRADT11024";
- oParam.service = "pharmacydrugsumapp.BeforeCure";
- oParam.method = "reqGetAstSum";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_prcplist=astinfo";
- oParam.async = false;
- oParam.callback = "cf_TRADT11024";
- tranf_submit(oParam);
- }
- //var file = window.fileDialog("save","","false","","xls","Excel Files(*.xls)|*.xls");
-
- if( ds_main_prcplist.getRowCount > 0 ){
- grdf_exportExcel(datagrid1, "약품재고환자별상세내역", "약품재고환자별상세내역", false, "", "user", false);
- } else {
- sysf_messageBox("조회된 데이터가 ", "I004");
- }
- //model.removeNodeset("/root/send/prcplist/prcpinfo")
- }
- function group3_datagrid1_onvtracklast(obj:Grid, e:ScrollEventInfo)
- {
- ds_send.setColumn(0, "offset", ds_main_prcplist.rowcount);
-
- dsf_setTypeFormat(ds_send, "offset:INT^pagesize:INT");
-
- dsf_createDs("ds_temp_prcplist");
- ds_temp_prcplist.assign(ds_main_prcplist);
- ds_temp_prcplist.clearData();
-
- var oParam = {};
- oParam.id = "TRADT50203";
- oParam.service = "pharmacystocapp.DrugStocSum";
- oParam.method = "reqGetDrugStocSumDetlList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_temp_prcplist=prcpinfo";
- oParam.async = false;
- oParam.callback = "cf_TRADT50203";
- tranf_submit(oParam);
- }
- function cf_TRADT50203(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
-
- if( ds_temp_prcplist.rowcount > 0 ){
- ds_main_prcplist.appendData(ds_temp_prcplist, true, false);
- }
-
- dsf_deleteDs("ds_temp_prcplist");
- }]]></Script>
- </Form>
- </FDL>
|