123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMADT50200" position="absolute 0 0 1001 777" titletext="임상시험약품재고관리" oninit="SMADT50200_oninit" onload="SMADT50200_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="임상시험약품재고관리" class="tit_1" position="absolute 0 0 163 25"/>
- <Div id="group2" anchor="left top right" taborder="1" class="div_SA" position="absolute 0 24 1000 64">
- <Layouts>
- <Layout>
- <Shape id="line13" linetype="vertical" position="absolute 853 8 859 33" anchor="top right"/>
- <Static id="caption24" text="업무일자 :" class="search_name" position="absolute 10 13 81 30" anchor="default" onclick="group2_caption24_onclick"/>
- <Button id="btn_sea" taborder="8" text="조회" onclick="group3_group2_btn_sea_onclick" class="btn1" position="absolute 873 9 929 31" anchor="top right"/>
- <Calendar id="ipt_fromdd" taborder="9" autoselect="true" dateformat="yyyy-MM-dd" class="input_essential" position="absolute 88 11 188 30" anchor="default" onchanged="group2_ipt_fromdd_onchanged"/>
- <Button id="btn_sea00" taborder="10" text="엑셀" class="btn4" position="absolute 932 9 988 31" anchor="top right" onclick="group2_btn_sea00_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape id="line00" class="line_1" position="absolute 2 92 841 102" style="strokepen:3 solid #33bbbbff;"/>
- <Static id="caption3" text="임상시험약품재고관리" class="search_name" position="absolute 7 77 172 94"/>
- <Button id="btn_save" taborder="3" text="저장" position="absolute 947 74 988 94" class="btn5" onclick="btn_save_onclick"/>
- <Grid id="Grid00" taborder="4" useinputpanel="false" position="absolute 750 99 984 760" binddataset="ds_stoclist" visible="false">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="81"/>
- <Column size="74"/>
- <Column size="75"/>
- <Column size="65"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="45" 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="입고량"/>
- <Cell col="5" text="출고량"/>
- <Cell col="6" text="반납량"/>
- </Band>
- <Band id="body">
- <Cell text="bind:drugcd"/>
- <Cell col="1" text="bind:nousestocqty"/>
- <Cell col="2" text="bind:usestocqty"/>
- <Cell col="3" style="align:right;padding:0 5 0 0;" text="bind:totstocqty"/>
- <Cell col="4" style="align:right;padding:0 5 0 0;" text="bind:inqty"/>
- <Cell col="5" style="align:right;padding:0 5 0 0;" text="bind:outqty"/>
- <Cell col="6" style="align:right;padding:0 5 0 0;" text="bind:rtnqty"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape id="line01" class="line_1" position="absolute 750 92 984 102" style="strokepen:3 solid #33bbbbff;"/>
- <Button id="Button00" taborder="5" text="삭제" position="absolute 900 74 945 94" onclick="Button00_onclick"/>
- <Grid id="grd_iolist" taborder="2" binddataset="ds_iolist" useinputpanel="false" position="absolute 2 99 988 760" oncelldblclick="grd_iolist_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22"/>
- <Column size="0"/>
- <Column size="117"/>
- <Column size="73"/>
- <Column size="343"/>
- <Column size="51"/>
- <Column size="51"/>
- <Column size="49"/>
- <Column size="49"/>
- <Column size="57"/>
- <Column size="53"/>
- <Column size="51"/>
- <Column size="51"/>
- </Columns>
- <Rows>
- <Row size="45" 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="가용 재고량"/>
- </Band>
- <Band id="body">
- <Cell/>
- <Cell col="1" displaytype="date" edittype="date" text="bind:workdd"/>
- <Cell col="2" style="align:left;padding:0 0 0 5;" text="bind:subjid"/>
- <Cell col="3" style="align:left;padding:5 5 5 5;" text="bind:drugcd"/>
- <Cell col="4" style="align:left;padding:0 0 0 5;" text="bind:drugnm"/>
- <Cell col="5" style="align:right;padding:0 5 0 0;" text="bind:safestocqty"/>
- <Cell col="6" displaytype="number" edittype="text" editfilter="number" style="padding:0 5 0 0;" text="bind:inqty"/>
- <Cell col="7" displaytype="number" edittype="text" editfilter="number" style="padding:0 5 0 0;" text="bind:outqty"/>
- <Cell col="8" displaytype="number" edittype="text" editfilter="number" style="padding:0 5 0 0;" text="bind:nouseqty"/>
- <Cell col="9" displaytype="number" edittype="text" editfilter="number" style="padding:0 5 0 0;" text="bind:nortnqty"/>
- <Cell col="10" displaytype="number" edittype="text" editfilter="number" style="padding:0 5 0 0;" text="bind:rtnqty"/>
- <Cell col="11" style="align:right;padding:0 5 0 0;" text="bind:nousestocqty"/>
- <Cell col="12" style="align:right;padding:0 5 0 0;background:EXPR(bgcolor=="1"?"yellow":"");background2:EXPR(bgcolor=="1"?"yellow":"");" text="bind:usestocqty"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="Button01" taborder="6" text="일자별 입출고내역 조회" position="absolute 748 74 898 94" onclick="Button01_onclick"/>
- <Button id="Button02" taborder="7" text="적정재고량 관리" position="absolute 638 74 746 94" onclick="Button02_onclick"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="workdd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_iolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="workdd" type="STRING" size="256"/>
- <Column id="drugcd" type="STRING" size="256"/>
- <Column id="drugnm" type="STRING" size="256"/>
- <Column id="inqty" type="STRING" size="256"/>
- <Column id="outqty" type="STRING" size="256"/>
- <Column id="rtnqty" type="STRING" size="256"/>
- <Column id="flag" type="STRING" size="256"/>
- <Column id="cmt" type="STRING" size="256"/>
- <Column id="nouseqty" type="STRING" size="256"/>
- <Column id="nortnqty" type="STRING" size="256"/>
- <Column id="subjid" type="STRING" size="256"/>
- <Column id="safestocqty" type="STRING" size="256"/>
- <Column id="bgcolor" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_stoclist" 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="inqty" type="STRING" size="256"/>
- <Column id="outqty" type="STRING" size="256"/>
- <Column id="rtnqty" type="STRING" size="256"/>
- <Column id="totstocqty" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group2.ipt_fromdd" propid="value" datasetid="ds_send" columnid="workdd"/>
- </Bind>
- <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 SMADT50200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMADT50200_onload(obj:Form, e:LoadEventInfo)
- {
-
- var deptcd = sysf_getUserInfo("dutplcecd");
- var userid = sysf_getUserInfo("userid");
-
- if(deptcd != "7460000000" && userid != "AST") {
- sysf_messageBox("사용 권한이 없습니다. ", "E");
- this.close();
- }
- ds_send.setColumn(0, "workdd", utlf_getCurrentDate());
-
- grdf_setRowTypeIcon(grd_iolist, 0); //상태값 표시
- ds_iolist.updatecontrol = true;
- fSearch();
- }
- function group3_group2_btn_sea_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearch();
- }
- function fSearch() {
- var oParam = {};
- oParam.id = "TRADT50401";
- oParam.service = "pharmacystocapp.DrugStocSum";
- oParam.method = "reqGetImsangDrugInOutInfo";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_iolist=info ds_stoclist=stoclist";
- oParam.async = false;
- //oParam.callback = "TRADT50300";
- tranf_submit(oParam);
- fChkSafeStocQty();
- }
- function fChkSafeStocQty() {
- var safestocqty;
- var usestocqty;
- var drugcd;
- var str ="약품코드: ";
- var cnt = 0;
- ds_iolist.updatecontrol = false;
- for(var i = 0; i < ds_iolist.rowcount; i++) {
- safestocqty = ds_iolist.getColumn(i, "safestocqty");
- usestocqty = ds_iolist.getColumn(i, "usestocqty");
- drugcd = ds_iolist.getColumn(i, "drugcd");
-
- if(safestocqty > usestocqty) {
- if(cnt >0) {
- str += ", ";
- }
- str += drugcd;
- cnt++;
-
- ds_iolist.setColumn(i, "bgcolor", "1");
-
- }
-
- //grd_iolist.setCellProperty("Body", grd_iolist.getBindCellIndex("body","usestocqty"), "font", "#ff0000"); //colfont14
- //grd_iolist.setCellProperty("Body", grd_iolist.getBindCellIndex("body","usestocqty"), "background", "#00ffff"); //colfont14
- }
- ds_iolist.updatecontrol = true;
-
- if(cnt > 0) {
- str += "\n항목이 가용재고량이 적정재고량보다 적습니다.";
- alert(str);
- }
-
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_send_savedata.clearData();
-
- var updtdata1 = grdf_getGridUpdateData(grd_iolist, "all");
- grdf_setStatusColumn(updtdata1, "m");
- ds_send_savedata.copyData(updtdata1,true);
-
- var oParam = {};
- oParam.id = "TXADT50401";
- oParam.service = "pharmacystocapp.DrugStocSum";
- oParam.method = "reqExeImsangDrugInOutInfo";
- oParam.inds = "req=ds_send_savedata";
- oParam.outds = "ds_iolist=info";
- oParam.async = false;
- //oParam.callback = "TRADT50300";
- tranf_submit(oParam);
-
- fSearch();
- }
- function group2_caption24_onclick(obj:Static, e:ClickEventInfo)
- {
-
- }
- function Button00_onclick(obj:Button, e:ClickEventInfo)
- {
- //Dataset 행삭제
- ds_iolist.updatecontrol = false;
-
- ds_iolist.setRowType(grd_iolist.currentrow, Dataset.ROWTYPE_DELETE);
- ds_iolist.updatecontrol = true;
- }
- function grd_iolist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var drugcd = "";
-
- if(grd_iolist.currentcol == "2" || grd_iolist.currentcol == "3") {
- drugcd = ds_iolist.getColumn(grd_iolist.currentrow, "drugcd");
- var objArg = new Object();
- objArg.arg_drugcd = drugcd;
-
- frmf_modal("SMADT50500", "SMADT50500", objArg, null, null, null, null, null, null, null, null, null, "M");
- }
-
-
-
- }
- function group2_ipt_fromdd_ontextchanged(obj:Calendar, e:TextChangedEventInfo)
- {
-
- }
- function group2_ipt_fromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- obj.updateToDataset();
- fSearch();
- }
- function Button01_onclick(obj:Button, e:ClickEventInfo)
- {
- var objArg = new Object();
-
- objArg.arg_drugcd = "";
-
- frmf_modal("SMADT50500", "SMADT50500", objArg, null, null, null, null, null, null, null, null, null, "M");
- fSearch();
- }
- function Button02_onclick(obj:Button, e:ClickEventInfo)
- {
- var objArg = new Object();
-
- objArg.arg_drugcd = "";
-
- frmf_modal("SMADT50600", "SMADT50600", objArg, null, null, null, null, null, null, null, null, null, "M");
- fSearch();
- }
- function group2_btn_sea00_onclick(obj:Button, e:ClickEventInfo)
- {
- //조회된 자료가 없으면 먼저 조회하라고 message
- if(ds_iolist.rowcount < 1) {
- sysf_messageBox("조회된 결과가 존재하지 않습니다. \n\n먼저 조회 후 Download 하십시요. ", "E999", "");
- return;
- }
-
- grdf_exportExcel(grd_iolist, "excel", "savetype", false, "", "user", false);
- }
- ]]></Script>
- </Form>
- </FDL>
|