123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPANC00302" position="absolute 0 0 619 343" titletext="복막투석액계산" oninit="SPANC00302_oninit" onload="SPANC00302_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 501 306" id="grp_biz" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Static text="복막투석액 계산" position="absolute 0 10 135 26" id="caption1" class="tit_2"/>
- <Shape position="absolute 0 26 500 32" linetype="horizontal" id="line1" class="line_10"/>
- <Grid position="absolute 0 31 500 306" align="align:center middle;" id="grd_dextrose" binddataset="ds_main_dextrosegrid">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="136"/>
- <Column size="105"/>
- <Column size="105"/>
- <Column size="127"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="Dextrose농도(g/dl)"/>
- <Cell col="1" text="용량(L)"/>
- <Cell col="2" text="횟수(회)"/>
- <Cell col="3" text="농도*용량*횟수"/>
- </Band>
- <Band id="body">
- <Cell displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,0 none #808080ff,1 solid #808080ff,1 solid #808080ff' : '');" text="bind:concen" mask="99" editlimitbymask="integer"/>
- <Cell col="1" displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,0 none #808080ff,1 solid #808080ff,1 solid #808080ff' : '');" text="bind:volume" mask="##.9" editlimitbymask="both"/>
- <Cell col="2" displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,1 solid #808080ff,1 solid #808080ff,0 none #808080ff' : '');" text="bind:time" mask="9" editlimitbymask="integer"/>
- <Cell col="3" displaytype="number" edittype="none" style="align:center;" text="bind:rowtotal" mask="##9.9"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="Total * 0.7 * 3.4 =" position="absolute 135 195 270 208" id="caption2"/>
- <MaskEdit readonly="true" position="absolute 240 190 300 209" align="align:center middle;" id="output1" mask="9999"/>
- <Static text="kcal" position="absolute 305 195 360 208" id="caption3"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 306 501 333" id="grp_btn" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 385 5 441 27" id="btn_cfm" class="btn4" text="확인" onclick="grp_btn_btn_cfm_onclick"/>
- <Button position="absolute 444 5 500 27" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_dextrosegrid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_dextrosegrid_oncolumnchanged">
- <ColumnInfo>
- <Column id="concen" type="STRING"/>
- <Column id="volume" type="STRING"/>
- <Column id="time" type="STRING"/>
- <Column id="rowtotal" type="STRING"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- <Row/>
- <Row/>
- <Row/>
- <Row>
- <Col id="concen"></Col>
- <Col id="volume">Total</Col>
- <Col id="time"></Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_maindata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="kcal" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_biz.output1" propid="value" datasetid="ds_main_maindata" columnid="kcal"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : ast_dietxp -> SPANC00302
- * Creator : yjh
- * Make Date : 2018-03-28
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2018-03-28 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANC00302
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SPANC00302_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANC00302
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SPANC00302_onload(obj:Form, e:LoadEventInfo)
- {
- // grd_dextrose.mergerow(1)=false;
- // grd_dextrose.mergerow(2)=false;
- // grd_dextrose.mergerow(3)=false;
- // grd_dextrose.mergerow(4)=false;
- }
- /****************************************************************************************
- * Components : Dataset
- * Components ID : ds_main_dextrosegrid
- * Event : oncolumnchanged
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 데이터셋 값 변경시
- ****************************************************************************************/
- function ds_main_dextrosegrid_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- var total = 0;
- var kcal = 0;
-
- for ( var i = 0; i <= 3; i++ ) {
- var concen = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "concen"))); // 농도
- var volume = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "volume"))); // 용량
- var times = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "time"))); // 횟수
- var rowtotal = concen * volume * times; // row별 total
- //rowtotal = rowtotal.toString().getRound(-2, "DOWN");
- ds_main_dextrosegrid.setColumn(i, "rowtotal", rowtotal);
- var total = total + rowtotal; // 총 total
- //total = total.toString().getRound(-2, "DOWN");
- ds_main_dextrosegrid.setColumn(4, "rowtotal", total);
- var kcal = total * 0.7 * 3.4; // 복막투석액(kcal)
- kcal = kcal.toString().getRound(-1, "HALF_UP");
- ds_main_maindata.setColumn(0, "kcal", kcal);
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_cfm
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 확인버튼 클릭시
- ****************************************************************************************/
- function grp_btn_btn_cfm_onclick(obj:Button, e:ClickEventInfo)
- {
- opener.frmf_setParameter("iParam_kcal", ds_main_maindata.getColumn(0, "kcal"));
- this.close();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_can
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 취소버튼 클릭시
- ****************************************************************************************/
- function grp_btn_btn_can_onclick(obj:Button, e:ClickEventInfo)
- {
- opener.frmf_setParameter("iParam_kcal", "");
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|