123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLBD01100" position="absolute 0 0 1198 776" titletext="Untitle" oninit="SMLBD01100_oninit" onload="SMLBD01100_onload">
- <Layouts>
- <Layout>
- <MaskEdit id="input2" taborder="3" mask="99-99-999999" position="absolute 585 726 710 745"/>
- <Button id="button2" taborder="4" text="엑셀" class="btn7" position="absolute 1136 101 1192 120" onclick="button2_onclick"/>
- <Static id="caption1" text="비고사항" class="cell_1" position="absolute 0 749 100 772"/>
- <Combo id="combo1" taborder="5" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 105 726 220 745">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">혈소판헌혈</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">백혈구헌혈</Col>
- </Row>
- <Row>
- <Col id="codecolumn">9</Col>
- <Col id="datacolumn">기타헌혈</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Static id="caption2" text="Min 헌혈증번호" class="cell_1" position="absolute 230 725 335 748"/>
- <Static id="caption3" text="Max 헌혈증번호" class="cell_1" position="absolute 475 725 580 748"/>
- <MaskEdit id="input1" taborder="6" mask="99-99-999999" position="absolute 340 726 465 745"/>
- <Static id="caption4" text="입고일자" class="cell_1" position="absolute 930 725 1005 748"/>
- <Calendar id="ipt_rgstdd" taborder="7" class="input_search" position="absolute 1010 726 1135 745" mask="yyyy-mm-dd"/>
- <Edit id="input3" taborder="8" position="absolute 105 750 1135 769"/>
- <Grid id="datagrid1" taborder="9" binddataset="ds_datagrid1" useinputpanel="false" position="absolute 0 127 1193 692">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="128"/>
- <Column size="144"/>
- <Column size="146"/>
- <Column size="120"/>
- <Column size="100"/>
- <Column size="80"/>
- <Column size="472"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="입고일자"/>
- <Cell col="1" text="Min 헌혈증 번호"/>
- <Cell col="2" text="Max 헌혈증 번호"/>
- <Cell col="3" text="헌혈구분"/>
- <Cell col="4" text="입고량"/>
- <Cell col="5" text="입고자"/>
- <Cell col="6" text="비고사항"/>
- </Band>
- <Band id="body">
- <Cell text="bind:rgstdd" mask="yyyy-mm-dd"/>
- <Cell col="1" text="bind:minbrgstno" mask="99-99-999999"/>
- <Cell col="2" text="bind:maxbrgstno" mask="99-99-999999"/>
- <Cell col="3" displaytype="combo" edittype="combo" text="bind:donkind" enable="false"/>
- <Cell col="4" text="bind:brgststocqty" mask="#,###"/>
- <Cell col="5" text="bind:fstrgstrid"/>
- <Cell col="6" text="bind:cmtcnts"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption5" text="입고량" class="cell_1" position="absolute 720 725 795 748"/>
- <MaskEdit id="input4" taborder="10" mask="#,###" position="absolute 800 726 920 745"/>
- <Div id="group2" taborder="11" position="absolute 0 62 1195 97">
- <Layouts>
- <Layout>
- <Shape id="roundrect1" type="roundrectangle" class="roundrect_search" position="absolute 0 0 1195 35"/>
- <Shape id="line11" linetype="vertical" class="line_4" position="absolute 1111 7 1117 29"/>
- <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1126 7 1182 29" onclick="group2_btn_search_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption7" text="헌혈증번호" class="tit_2" position="absolute 1 106 92 123"/>
- <Static id="caption19" text="헌혈증 상세" class="tit_2" position="absolute 1 702 95 721"/>
- <Static id="caption11" text="헌혈종류" class="cell_1" position="absolute 0 725 100 748"/>
- <Button id="btn_cre" taborder="12" text="신규" class="btn4" enable="true" visible="false" position="absolute 1139 29 1195 51"/>
- <Button id="btn_upd" taborder="13" text="수정" class="btn4" enable="true" position="absolute 1078 29 1134 51"/>
- <Button id="btn_del" taborder="14" text="삭제" class="btn4" enable="true" position="absolute 1137 29 1193 51"/>
- <Button id="btn_save" taborder="15" text="저장" class="btn4" enable="true" position="absolute 1018 29 1074 51" onclick="btn_save_onclick"/>
- <Static id="caption6" text="헌혈증번호 관리" class="tit_1" position="absolute 0 0 128 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_datagrid1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="rgstdd" type="STRING"/>
- <Column id="minbrgstno" type="STRING"/>
- <Column id="maxbrgstno" type="STRING"/>
- <Column id="donkind" type="STRING"/>
- <Column id="brgststocqty" type="STRING"/>
- <Column id="fstrgstrid" type="STRING"/>
- <Column id="cmtcnts" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_combo1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">혈소판헌혈</Col>
- <Col id="value">1</Col>
- </Row>
- <Row>
- <Col id="label">백혈구헌혈</Col>
- <Col id="value">2</Col>
- </Row>
- <Row>
- <Col id="label">기타헌혈</Col>
- <Col id="value">9</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_brgstinfo_brgstlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="rgstdd" type="STRING" size="256"/>
- <Column id="minbrgstno" type="STRING" size="256"/>
- <Column id="maxbrgstno" type="STRING" size="256"/>
- <Column id="donkind" type="STRING" size="256"/>
- <Column id="brgststocqty" type="STRING" size="256"/>
- <Column id="cmtcnts" type="STRING" size="256"/>
- <Column id="fstrgstrid" type="STRING" size="256"/>
- <Column id="iudgb" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="item" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2015-05-01
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2015-05-01 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
-
- include "com_commonxp::comm_main.xjs";
- include "lis_commonxp::LLZ001.xjs";
- function SMLBD01100_oninit(obj:Form, e:InitEventInfo)
- {
- //폼 초기화 함수
- frmf_initForm(obj);
- }
- function SMLBD01100_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(datagrid1);
- //combo1.value = 1;
- //ipt_rgstdd.value = utlf_getCurrentDate();
- readfunc();
- }
- //조회
- function readfunc()
- {
- btn_save.enable = true;
- // btn_upd.disabled = true;
- btn_upd.enable = false;
- btn_del.enable = false;
- ipt_rgstdd.enable = true;
- // model.removeNodeset("/root/main/brgstinfo/brgstlist");
- // model.resetInstanceNode("/root/main/brgstinfo1/brgstdetl");
- // model.setValue("/root/main/brgstinfo1/brgstdetl/iudgb", "I");
- ds_brgstinfo_brgstlist.setColumn(0, "iudgb", 'I');
- var oParam = {};
- oParam.id = "TRLBD01101";
- oParam.service = "donmngtapp.DonRgst";
- oParam.method = "reqGetBrgstList";
- oParam.inds = "req=ds_brgstinfo_brgstlist";
- oParam.outds = "ds_datagrid1=brgstlist";
- oParam.async = false;
- //oParam.callback = "cf_TRLBD01101";
- tranf_submit(oParam);
-
- if(utlf_isNull(ds_datagrid1.getColumn(0, "rgstdd")))
- {
- ds_datagrid1.clearData();
- }
- }
- function fSaveData()
- {
- if (datacheck() == 1)
- {
- return;
- }
- //fCalcuqty();
- var oParam = {};
- oParam.id = "TXLBD01101";
- oParam.service = "donmngtapp.DonRgst";
- oParam.method = "reqExeBrgstList";
- oParam.inds = "req=ds_brgstinfo_brgstlist";
- oParam.outds = "ds_item=item";
- oParam.async = false;
- //oParam.callback = "cf_TXLBD01101";
- tranf_submit(oParam);
- readfunc();
- }
- function datacheck()
- {
- if(utlf_isNull(ipt_rgstdd.value))
- {
- alert("입고일자는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if(isDate(ipt_rgstdd.value) == 1)
- {
- messageBox("입고일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- //var ibgstno1 = model.getValue("/root/main/brgstinfo1/brgstdetl/minbrgstno");
- //var ibgstno2 = model.getValue("/root/main/brgstinfo1/brgstdetl/maxbrgstno");
- var ibgstno1 = ds_brgstinfo_brgstlist.getColumn(0, "minbrgstno");
- var ibgstno2 = ds_brgstinfo_brgstlist.getColumn(0, "maxbrgstno");
-
- if (ibgstno1.length != 10)
- {
- sysf_messageBox("Min 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
- return false;
- }
- if (ibgstno2.length != 10)
- {
- sysf_messageBox("Max 헌혈증번호는 10자리로 입력하셔야 합니다.", "E999", "");
- return false;
- }
- if (ibgstno1 > ibgstno2)
- {
- sysf_messageBox("Min 헌혈증번호가 Max 헌혈증번호 보다 큽니다.", "E999", "");
- return false;
- }
- }
- //조회
- function group2_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- readfunc();
- }
- //엑셀저장
- function button2_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(datagrid1, "헌혈증번호", "see");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var rgstdd= ds_brgstinfo_brgstlist.getColumn(0, "rgstdd");
- var irow = ds_datagrid1.findRow(rgstdd, 1, ds_datagrid1.setColumn(0, "rgstdd"), 1, 1);
- if (irow > 0)
- {
- alert("선택한 날짜에 등록된 자료가 존재합니다.", "E999", "");
- return;
- }
-
- fSaveData();
- }
- function isDate(str)
- { // 날짜 형식에 대한 적합여부 체크
- if (utlf_isNull(str)) return true; // 빈건 체크안함
- if (utlf_isNull(trim(str))) return true; // 빈건 체크안함
- if (isNaN(parseInt(str))) return false; // 숫자가 아니면 false
- if (str.length != 8) return false; // 8자리(yyyymmdd)가 아니면 false
-
- var yy = new Number(str.subst(0, 4));
- var mm = new Number(str.substr(4, 6)) - 1;
- var dd = new Number(str.substr(6, 8));
-
- var date = new Date(yy, mm, dd);
-
- if (yy != date.getFullYear() || mm != date.getMonth() ||dd != date.getDate())
- {
- return false; // 존재하지 않는 날짜
- }
- return true; // 존재하는 날짜
- }]]></Script>
- </Form>
- </FDL>
|