123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMLBT12000" position="absolute 0 0 1256 788" titletext="혈액출고관리" scrollbars="none" onload="SMLBT12000_onload">
- <Layouts>
- <Layout>
- <Button id="btn_del" taborder="1" text="행삭제" class="btn2" position="absolute 1203 131 1256 151" anchor="top right" onclick="btn_del_onclick"/>
- <Grid id="grd_bloddelivelist" taborder="2" binddataset="ds_grid_bloddelivelist" useinputpanel="false" autofittype="col" position="absolute 0 154 1256 711" anchor="all" style="align:center middle;" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="35"/>
- <Column size="123"/>
- <Column size="138"/>
- <Column size="70"/>
- <Column size="117"/>
- <Column size="104"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1"/>
- <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="사유"/>
- <Cell col="13" text="사유(기타)"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" displaytype="image" expr="expr:getRowType(currow) == 2 ?'theme://images/ico_i.png' : (getRowType(currow) == 4 ? 'theme://images/ico_u.png' : (getRowType(currow) == 8 ? 'theme://images/ico_d.png' : 'theme://images/ico_e.png'))"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:chk"/>
- <Cell col="2" edittype="text" style="align:center middle;" text="bind:blodno"/>
- <Cell col="3" displaytype="combo" style="align:center middle;" text="bind:blodbarcd" combodataset="ds_init_lb0803" combocodecol="etc01" combodatacol="nm"/>
- <Cell col="4" style="align:center middle;" text="bind:abo"/>
- <Cell col="5" text="bind:windt" mask="####-##-## ##:##"/>
- <Cell col="6" text="bind:validt" mask="####-##-## ##:##"/>
- <Cell col="7" text="bind:delivedt" mask="####-##-## ##:##"/>
- <Cell col="8" text="bind:deliveid"/>
- <Cell col="9" displaytype="normal" text="bind:iokind" combodataset="ds_init_lb0801" combocodecol="cd" combodatacol="nm"/>
- <Cell col="10" displaytype="normal" text="bind:iokindresn" combodataset="ds_init_lb0802" combocodecol="cd" combodatacol="nm"/>
- <Cell col="11" displaytype="combo" text="bind:delivekindcd" combodataset="ds_init_lb0801" combocodecol="cd" combodatacol="nm"/>
- <Cell col="12" displaytype="combo" text="bind:delivekindresn" combodataset="ds_init_lb0802" combocodecol="cd" combodatacol="nm"/>
- <Cell col="13" style="align:left;" text="bind:rmk"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption11" text="혈액출고 목록" class="tit_2" position="absolute 0 134 139 154"/>
- <Div id="group2" anchor="left top right" taborder="3" position="absolute 0 25 1255 124" class="div_SA">
- <Layouts>
- <Layout>
- <Static id="caption2" text="출고자" class="search_name" position="absolute 8 10 69 30" anchor="default"/>
- <Static id="caption3" text="출고일자" class="search_name" position="absolute 309 10 383 30" anchor="default"/>
- <Edit id="opt_delivenm" taborder="17" readonly="true" class="output_search" position="absolute 185 10 285 30" anchor="default"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1109 8 1109 52" anchor="default"/>
- <Edit id="ipt_blodno" taborder="18" onkeydown="group2_ipt_blodno_onkeydown" class="input_button" position="absolute 82 35 285 55" anchor="default" maxlength="10" inputtype="digit"/>
- <Static id="caption1" text="혈액번호" class="search_name" position="absolute 8 35 82 55" anchor="default"/>
- <Static id="caption4" text="출고유형" class="search_name" position="absolute 309 35 383 55" anchor="default"/>
- <Combo id="cmb_delivekindcd" taborder="19" innerdataset="@ds_init_lb0801" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 440 35 540 55" anchor="default" onitemchanged="group2_cmb_delivekindcd_onitemchanged"/>
- <Combo id="cmb_delivekindresn" taborder="20" innerdataset="@ds_init_lb0802" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 543 35 656 55" anchor="default" onitemchanged="group2_cmb_delivekindresn_onitemchanged"/>
- <Static id="caption6" text="혈액성분" class="search_name" position="absolute 680 10 754 30" anchor="default"/>
- <Combo id="cmb_blodcomcd" taborder="21" innerdataset="@ds_init_lb0803" codecolumn="cd" datacolumn="nm" class="combo_s_essential" position="absolute 754 10 854 30" anchor="default"/>
- <Shape id="line5" class="line_7" position="absolute 15 59 1180 59" anchor="default"/>
- <Static id="caption8" text="출고취소 혈액번호" class="search_name" position="absolute 309 67 448 87" anchor="default"/>
- <Edit id="ipt_cancelblod" taborder="22" class="input_button" position="absolute 440 67 540 87" anchor="default" onkeydown="group2_ipt_cancelblod_onkeydown" maxlength="10" inputtype="digit"/>
- <Combo id="cmb_blodcomcdcc" taborder="23" class="combo_s_essential" position="absolute 82 67 285 87" anchor="default" innerdataset="@ds_init_lb0803" datacolumn="nm" codecolumn="cd"/>
- <Static id="caption9" text="혈액성분" class="search_name" position="absolute 8 67 82 87" anchor="default"/>
- <Radio id="radio1" taborder="24" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" visible="false" position="absolute 857 10 1009 30" anchor="default">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn" size="256"/>
- <Column id="datacolumn" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">1</Col>
- <Col id="datacolumn">혈액출고</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">출고취소</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Edit id="ipt_delivepid" taborder="25" onkeyup="group2_ipt_delivepid_onkeyup" class="input_button" position="absolute 82 10 182 30" anchor="default" lengthunit="utf16" maxlength="10"/>
- <Button id="btn_ref" taborder="27" text="조회" onclick="group2_btn_ref_onclick" class="btn1" position="absolute 1188 10 1244 30" anchor="top right"/>
- <Edit id="ipt_rmk" taborder="28" maxlength="100" position="absolute 659 35 997 55" visible="false" enable="true" readonly="true" anchor="default"/>
- <Calendar id="ipt_todd" taborder="29" autoselect="true" class="input_s_essential" position="absolute 544 8 635 27" onkeyup="group2_ipt_todd_onkeyup"/>
- <Calendar id="ipt_fromdd" taborder="30" autoselect="true" oneditclick="group3_group2_ipt_fromdd_oneditclick" class="input_s_essential" position="absolute 441 8 532 27"/>
- <Static id="Static00" text="~" position="absolute 533 10 545 30"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="btn_init" taborder="4" text="초기화" class="btn4" position="absolute 1187 3 1256 23" anchor="top right" onclick="btn_init_onclick"/>
- <Button id="btn_cncl" taborder="5" text="출고취소" class="btn4" position="absolute 1102 3 1184 23" anchor="top right" onclick="btn_cncl_onclick"/>
- <Button id="btn_save" taborder="6" text="저장" class="btn4" position="absolute 1043 3 1099 23" anchor="top right" onclick="btn_save_onclick"/>
- <Static id="caption5" text="혈액출고관리" position="absolute 0 0 177 25" class="tit_1"/>
- <Shape id="Shape00" position="absolute 6 87 1250 88" style="border:2 dotted #3993d8ff ;color:forestgreen;" anchor="left top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_init_lb0801" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING"/>
- <Column id="nm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb0802" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING"/>
- <Column id="nm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_lb0803" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cd" type="STRING"/>
- <Column id="nm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_delivepsninfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="delivepid" type="STRING" size="256"/>
- <Column id="delivenm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grid_bloddelivelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_grid_bloddelivelist_oncolumnchanged">
- <ColumnInfo>
- <Column id="chk" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="blodno" type="STRING" size="256"/>
- <Column id="blodcomcd" type="STRING" size="256"/>
- <Column id="blodcomnm" type="STRING" size="256"/>
- <Column id="blodbarcd" type="STRING" size="256"/>
- <Column id="abo" type="STRING" size="256"/>
- <Column id="windt" type="STRING" size="256"/>
- <Column id="validt" type="STRING" size="256"/>
- <Column id="delivedt" type="STRING" size="256"/>
- <Column id="deliveid" type="STRING" size="256"/>
- <Column id="delivenm" type="STRING" size="256"/>
- <Column id="iokind" type="STRING" size="256"/>
- <Column id="iokindresn" type="STRING" size="256"/>
- <Column id="delivekindcd" type="STRING" size="256"/>
- <Column id="delivekindresn" type="STRING" size="256"/>
- <Column id="rmk" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_bloddelivelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="chk" type="STRING" size="256"/>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="blodno" type="STRING" size="256"/>
- <Column id="blodcomcd" type="STRING" size="256"/>
- <Column id="blodcomnm" type="STRING" size="256"/>
- <Column id="blodbarcd" type="STRING" size="256"/>
- <Column id="abo" type="STRING" size="256"/>
- <Column id="windt" type="STRING" size="256"/>
- <Column id="validt" type="STRING" size="256"/>
- <Column id="delivedt" type="STRING" size="256"/>
- <Column id="deliveid" type="STRING" size="256"/>
- <Column id="delivenm" type="STRING" size="256"/>
- <Column id="iokind" type="STRING" size="256"/>
- <Column id="iokindresn" type="STRING" size="256"/>
- <Column id="rmk" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_hidden_ref" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="startdt" type="STRING" size="256"/>
- <Column id="enddt" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item1" compid="group2.opt_delivenm" propid="value" datasetid="ds_temp_delivepsninfo" columnid="delivenm"/>
- <BindItem id="item0" compid="group2.ipt_todd" propid="value" datasetid="ds_hidden_ref" columnid="enddt"/>
- <BindItem id="item2" compid="group2.ipt_fromdd" propid="value" datasetid="ds_hidden_ref" columnid="startdt"/>
- </Bind>
- <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::LPZ001.xjs";
- include "lis_commonxp::LZZ002.xjs";
- include "lis_commonxp::LLZ001.xjs";
- function SMLBT12000_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- lf_SetInit();
- lf_bodyControl(false, group2, "ipt_delivepid");
- lf_bodyControl(false, this, "");
- //group2.cp_periodCal.enable = false;
- group2.ipt_fromdd.enable = false;
- group2.ipt_todd.enable = false;
- group2.ipt_delivepid.value = sysf_getUserId();
- }
- var searchgbn = "";
- var stat2 = "";
- //초기화
- function lf_SetInit(){
- // var aData = new Array();
- // aData[0] = utlf_getCurrentDate();
- // aData[1] = utlf_getCurrentDate();
- // group2.cp_periodCal.setData(aData);
-
- var today = utlf_getCurrentDate();
- ds_hidden_ref.setColumn( 0, "startdt",today);
- ds_hidden_ref.setColumn( 0, "enddt",today);
-
- group2.ipt_delivepid.value = "";
- group2.opt_delivenm.value = "";
-
- lf_getDbDeptcd("0000|0801|0802|0803|","cbf_TRLQF11001");
-
- grd_bloddelivelist.setFormatColProperty(9,"size",100);
- grd_bloddelivelist.setFormatColProperty(10,"size",180);
- grd_bloddelivelist.setFormatColProperty(11,"size",0);
- grd_bloddelivelist.setFormatColProperty(12,"size",0);
-
- }
- //키업 이벤트
- function lf_KeyEvent(objName, keyCode){
- if(keyCode == "13"){
-
- if(objName == "ipt_delivepid"){
- lf_GetDelivePsn();
- }
-
- if(objName == "ipt_blodno"){
- if (!utlf_isNull(group2.ipt_blodno.value)){
- group2.ipt_blodno.value = utlf_transNullToEmpty(String(group2.ipt_blodno.value).substr(0,10));
- }
-
- if(group2.cmb_blodcomcd.value == "00"){
- sysf_messageBox("혈액성분을 선택해주십시오.","I","");
- return;
- }
-
- lf_GetBlodDeliveList("blodno");
-
- group2.ipt_blodno.value = "";
- group2.ipt_blodno.setFocus();
- }
-
- if(objName == "ipt_cancelblod"){
- if(group2.cmb_blodcomcdcc.value == "00"){
- sysf_messageBox("혈액성분을 선택해주십시오.","I","");
- return;
- }
-
- group2.ipt_cancelblod.value = String(group2.ipt_cancelblod.value).substr(0, 10);
- searchgbn = "blodno";
-
- lf_GetBlodDeliveListcc("blodno");
-
- group2.ipt_cancelblod.setFocus();
-
- }
-
- }
-
- }
- //출고자 조회
- function lf_GetDelivePsn(){
-
- if(utlf_isNull(group2.ipt_delivepid.value)){
- sysf_messageBox("출고자 ID가 정확히 입력되지","E007","");
- group2.ipt_delivepid.setFocus();
- return;
- }
-
- group2.ipt_delivepid.value = String(group2.ipt_delivepid.value).toUpperCase();
-
- var sInDsName = dsf_createDsRow("ds_temp_search"
- , [{col: "delivepid", val: group2.ipt_delivepid.value}]);
- var oParam = {};
- oParam.id = "TRLBT12101";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqGetBlodDelivePsn";
- oParam.inds = "cond="+sInDsName;
- oParam.outds = "ds_temp_delivepsninfo=getBlodDelivePsn";
- oParam.async = false;
- oParam.callback = "cbf_TRLBT12101";
- tranf_submit(oParam);
- }
- //혈액출고 조회
- function lf_GetBlodDeliveList(ref){
- var blodbarcd = group2.cmb_blodcomcd.value;
- var blodbarcd = ds_init_lb0803.getColumn(ds_init_lb0803.findRow("cd", blodbarcd), "etc01");
- //trace();
- var returnValue = "";
-
- if(ref == "btn"){
-
- var aData1 = group2.ipt_fromdd.value;
- var aData2 = group2.ipt_todd.value;
-
- if(utlf_isNull(aData1) || utlf_isNull(aData2)){
- sysf_messageBox("출고일자를 입력해주십시오.","I","");
- return;
- }
-
- searchgbn = ref;
-
- dsf_createDsRow("ds_temp_search"
- , [{col: "startdt" , val: aData1}
- , {col: "enddt" , val: aData2}
- , {col: "blodcomcd" , val: blodbarcd}
- , {col: "blodbarcd" , val: blodbarcd}
- , {col: "iokind" , val: group2.cmb_delivekindcd.value} //2015.12.17추가
- , {col: "iokindresn", val: group2.cmb_delivekindresn.value} //2015.12.17추가
- ]);
- var oParam = {};
- oParam.id = "TRLBT12102";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqGetBlodDeliveList";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_grid_bloddelivelist=getBlodDeliveList";
- oParam.async = false;
- oParam.callback = "cbf_TRLBT12102";
- tranf_submit(oParam);
-
- }else if(ref == "blodno"){
-
- if(group2.cmb_delivekindcd.value == "00" || group2.cmb_delivekindresn.value == "00"){
- sysf_messageBox("출고유형을 선택해주십시오.","I","");
- return;
- }
-
- dsf_createDsRow("ds_temp_search"
- , [{col: "blodno" , val: group2.ipt_blodno.value}
- , {col: "blodbarcd" , val: blodbarcd}]);
- var oParam = {};
- oParam.id = "TRLBT12103";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqGetDeliveBlodNo";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_temp_bloddelivelist=getDeliveBlodNo";
- oParam.async = false;
- oParam.callback = "cbf_TRLBT12103";
- tranf_submit(oParam);
- }
-
- }
- //출고 취소할 혈액 조회
- function lf_GetBlodDeliveListcc(ref){
- var blodcomcdcc = group2.cmb_blodcomcdcc.value;
- var blodbarcdcc = ds_init_lb0803.getColumn(ds_init_lb0803.findRow("cd", blodcomcdcc), "etc01");
-
- if(ref == "blodno")
- {
- dsf_createDsRow("ds_temp_search", [{col: "blodno" , val: group2.ipt_cancelblod.value}
- ,{col: "blodbarcd", val: blodbarcdcc}]);
- var oParam = {};
- oParam.id = "TRLBT12104";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqGetDeliveBlodNoCC";
- oParam.inds = "cond=ds_temp_search";
- oParam.outds = "ds_temp_bloddelivelist=getDeliveBlodNocc";
- oParam.async = false;
- oParam.callback = "cbf_TRLBT12104";
- tranf_submit(oParam);
-
- }
-
- }
- //저장
- function lf_SaveBlodDelive(){
- if(utlf_isNull(group2.ipt_delivepid.value) || utlf_isNull(group2.opt_delivenm)){
- sysf_messageBox("출고자를 입력하십시오.","I","");
- return;
- }
-
- var TF = false;
- var delivekindcd = "";
- var delivekindresn = "";
-
- ds_grid_bloddelivelist.updatecontrol = false;
- for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
- delivekindcd = ds_grid_bloddelivelist.getColumn(i, "delivekindcd");
- delivekindresn = ds_grid_bloddelivelist.getColumn(i, "delivekindresn");
-
- if(utlf_isNull(delivekindcd) || utlf_isNull(delivekindresn)){
- sysf_messageBox((i+1) + "번째 행에 출고유형 및 사유가 누락되었습니다.","I","");
- return;
- }
-
- if(ds_grid_bloddelivelist.getColumn(i, "chk") == "Y" || ds_grid_bloddelivelist.getColumn(i, "chk") == 1){
- ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_INSERT);
- TF = true;
- }
- }
- ds_grid_bloddelivelist.updatecontrol = true;
-
- if(TF){
-
- dsf_createDsRow("ds_temp_search"
- , [{col: "delivepid", val: group2.ipt_delivepid.value}]);
- var oParam = {};
- oParam.id = "TXLBT12101";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqSetBlodDelive";
- oParam.inds = "data=ds_grid_bloddelivelist:U delivepid=ds_temp_search";
- oParam.async = false;
- oParam.callback = "cbf_TXLBT12101";
- tranf_submit(oParam);
-
- sysf_messageBox("저장되었습니다.","I","");
-
- }else{
- sysf_messageBox("저장 할 내역이 없습니다.","I","");
- return;
- }
- }
- //출고취소
- function lf_SaveBlodDeliveCancel(){
-
- var insertRow = 0;
- ds_grid_bloddelivelist.updatecontrol = false;
- for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
- if(ds_grid_bloddelivelist.getColumn(i, "chk") == "Y" || ds_grid_bloddelivelist.getColumn(i, "chk") == 1){
- ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_INSERT);
- insertRow++;
- }
- }
- ds_grid_bloddelivelist.updatecontrol = true;
-
- if(insertRow == 0){
- sysf_messageBox("저장 할 내역이 없습니다.","I","");
- return;
- }
- var oParam = {};
- oParam.id = "TXLBT12102";
- oParam.service = "transfusionmngtapp.BlodWinDeliveMngt";
- oParam.method = "reqSetBlodDeliveCancel";
- oParam.inds = "data=ds_grid_bloddelivelist:U";
- oParam.async = false;
- oParam.callback = "cbf_TXLBT12102";
- tranf_submit(oParam);
-
- }
- //출고유형 사유코드 세팅
- function lf_SetDeliveKindCd(){
- var delivekindcd = group2.cmb_delivekindcd.value;
-
- if(delivekindcd == "00"){
- group2.cmb_delivekindresn.enable = false;
- group2.cmb_delivekindresn.index = 0;
- }else{
- group2.cmb_delivekindresn.enable = true;
- ds_init_lb0802.filter("etc01 == '00' || etc01 == '"+delivekindcd+"'");
- }
-
-
- //출고유형 기타값 초기화
- group2.ipt_rmk.readonly = true;
- group2.ipt_rmk.value = "";
- }
- function lf_bodyControl(flag,obj,trueComponentName){
- var formComponentlist = obj.components;
-
- for(var i=0; i<formComponentlist.length; i++){
- if(formComponentlist[i] instanceof Edit || formComponentlist[i] instanceof Combo ||
- formComponentlist[i] instanceof Button || formComponentlist[i] instanceof Calendar ||
- formComponentlist[i] instanceof Radio || formComponentlist[i] instanceof TextArea){
- if(formComponentlist[i].name != trueComponentName){
- formComponentlist[i].enable = flag;
- }else{
- formComponentlist[i].enable = true;
- }
- }
- }
- }
- function createColumn(objDs, strColID){
- var isExist = false;
- if(!isExistCol(objDs, strColID)){
- objDs.addColumn(strColID,"string");
- }
- }
- function isExistCol(objDs, strColID){
- var isExist = false;
- var colID = "";
- for(var i=0; i<objDs.getColCount(); i++){
- colID = objDs.getColID(i);
- if(colID == strColID){
- isExist = true;
- }
- }
- return isExist;
- }
- //콜백_LIS공통코드 조회
- function cbf_TRLQF11001(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
- group2.cmb_delivekindcd.index = 0;
- group2.cmb_delivekindresn.index = 0;
- group2.cmb_blodcomcd.index = 0;
- group2.cmb_blodcomcdcc.index = 0;
- group2.ipt_delivepid.setFocus();
- }
- }
- //콜백_delievpsninfo
- function cbf_TRLBT12101(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
- if(!utlf_isNull(ds_temp_delivepsninfo.getColumn(0, "delivenm"))){
- lf_bodyControl(true,group2,"");
- lf_bodyControl(true,this,"");
- // group2.cp_periodCal.enable = true;
- group2.ipt_fromdd.enable = true;
- group2.ipt_todd.enable = true;
- group2.cmb_delivekindresn.enable = false;
- group2.ipt_blodno.setFocus();
- }else{
- sysf_messageBox("출고자 ID가 정확히 입력되지","E007","");
- group2.ipt_delivepid.value = "";
- group2.ipt_delivepid.setFocus();
- lf_bodyControl(false,group2,"ipt_delivepid");
- lf_bodyControl(false,this,"");
- return;
- }
- }
- }
- //콜백_혈액출고목록 버튼조회
- function cbf_TRLBT12102(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
-
- createColumn(ds_grid_bloddelivelist, "delivekindcd");
- createColumn(ds_grid_bloddelivelist, "delivekindresn");
- ds_grid_bloddelivelist.updatecontrol = false;
- for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
-
- var iokind = "";
- var delivekindcd = "";
- var row_0801 = ds_init_lb0801.findRow("nm", ds_grid_bloddelivelist.getColumn(i, "iokind"));
- if(row_0801 > 0){
- iokind = ds_init_lb0801.getColumn(row_0801, "nm");
- delivekindcd = ds_init_lb0801.getColumn(row_0801, "cd");
- }
- ds_grid_bloddelivelist.setColumn(i, "iokind", iokind);
- ds_grid_bloddelivelist.setColumn(i, "delivekindcd", delivekindcd);
-
- var iokindresn = "";
- var delivekindresn = "";
- var row_0802 = ds_init_lb0802.findRow("nm", ds_grid_bloddelivelist.getColumn(i, "iokindresn"));
- if(row_0802 > 0){
- iokindresn = ds_init_lb0802.getColumn(row_0802, "nm");
- delivekindresn = ds_init_lb0802.getColumn(row_0802, "cd");
- }
- ds_grid_bloddelivelist.setColumn(i, "iokindresn", iokindresn);
- ds_grid_bloddelivelist.setColumn(i, "delivekindresn", delivekindresn);
-
- ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_NORMAL);
- }
- ds_grid_bloddelivelist.updatecontrol = true;
-
- grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "none");
- grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "lightgrey");
-
- }
- }
- //콜백_혈액번호로 조회
- function cbf_TRLBT12103(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
-
- var rows = 0;
-
- if(searchgbn == "blodno"){
- rows = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after") -1;
- }else{
- rows = 0;
- dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "replace");
- }
-
- var tmpcnt = ds_temp_bloddelivelist.rowcount;
- if(tmpcnt > 0){
- var iokind = group2.cmb_delivekindcd.text;
- var iokindresn = group2.cmb_delivekindresn.text;
- var delivekindcd = group2.cmb_delivekindcd.value;
- var delivekindresn = group2.cmb_delivekindresn.value;
- var rmk = group2.ipt_rmk.value;
-
- createColumn(ds_grid_bloddelivelist, "delivekindcd");
- createColumn(ds_grid_bloddelivelist, "delivekindresn");
- createColumn(ds_grid_bloddelivelist, "rmk");
-
- ds_grid_bloddelivelist.updatecontrol = false;
- ds_grid_bloddelivelist.setColumn(rows, "iokind" , iokind);
- ds_grid_bloddelivelist.setColumn(rows, "iokindresn" , iokindresn);
- ds_grid_bloddelivelist.setColumn(rows, "delivekindcd" , delivekindcd);
- ds_grid_bloddelivelist.setColumn(rows, "delivekindresn", delivekindresn);
- ds_grid_bloddelivelist.setColumn(rows, "rmk" , rmk);
-
- ds_grid_bloddelivelist.setRowType(rows, Dataset.ROWTYPE_NORMAL);
- ds_grid_bloddelivelist.updatecontrol = true;
- }
-
- var gridRow = ds_grid_bloddelivelist.rowcount;
- ds_grid_bloddelivelist.rowposition = gridRow -1;
-
- searchgbn = "blodno";
- }
-
- stat2 = "1";
-
- grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "checkbox");
- grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "");
- }
- //콜백_출고 취소할 혈액 조회
- function cbf_TRLBT12104(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
-
- grd_bloddelivelist.setFormatColProperty(9,"size",0);
- grd_bloddelivelist.setFormatColProperty(10,"size",0);
- grd_bloddelivelist.setFormatColProperty(11,"size",100);
- grd_bloddelivelist.setFormatColProperty(12,"size",180);
-
- if(ds_temp_bloddelivelist.rowcount > 0){
-
- var tblodno = ds_temp_bloddelivelist.getColumn(0, "blodno");
- var tblodvarcd = ds_temp_bloddelivelist.getColumn(0, "blodbarcd");
-
- var iokind = "";
- var row_0801 = ds_init_lb0801.findRow("cd", ds_temp_bloddelivelist.getColumn(0, "delivekindcd"));
- if(row_0801 > 0){
- iokind = ds_init_lb0801.getColumn(row_0801, "nm");
- }
-
- var iokindresn = "";
- var row_0802 = ds_init_lb0802.findRow("cd", ds_temp_bloddelivelist.getColumn(0, "delivekindresn"));
- if(row_0802 > 0){
- iokindresn = ds_init_lb0802.getColumn(row_0802, "nm");
- }
-
- if(ds_grid_bloddelivelist.rowcount > 0){
- var findRow = ds_grid_bloddelivelist.findRow("blodno", tblodno);
- if(findRow < 0){
- var row = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after")-1;
-
- ds_grid_bloddelivelist.setColumn(row, "iokind", iokind);
- ds_grid_bloddelivelist.setColumn(row, "iokindresn", iokindresn);
-
- ds_grid_bloddelivelist.setColumn(row, "chk", "Y");
- createColumn(ds_grid_bloddelivelist, "color");
- ds_grid_bloddelivelist.setColumn(row, "color", "red");
- ds_grid_bloddelivelist.updatecontrol = false;
- ds_grid_bloddelivelist.setRowType(row, Dataset.ROWTYPE_INSERT);
- ds_grid_bloddelivelist.updatecontrol = true;
-
- }else{
- createColumn(ds_grid_bloddelivelist, "delivekindcd");
- createColumn(ds_grid_bloddelivelist, "delivekindresn");
-
- ds_grid_bloddelivelist.setColumn(findRow, "chk", "Y");
- ds_grid_bloddelivelist.setColumn(findRow, "iokind", iokind);
- ds_grid_bloddelivelist.setColumn(findRow, "iokindresn", iokindresn);
-
- createColumn(ds_grid_bloddelivelist, "color");
- ds_grid_bloddelivelist.setColumn(findRow, "color", "red");
-
- ds_grid_bloddelivelist.updatecontrol = false;
- ds_grid_bloddelivelist.setRowType(findRow, Dataset.ROWTYPE_INSERT);
- ds_grid_bloddelivelist.updatecontrol = true;
-
- }
-
- }else{
- var row = dsf_copyDs(ds_grid_bloddelivelist, ds_temp_bloddelivelist, "after")-1;
-
- ds_grid_bloddelivelist.setColumn(row, "iokind", iokind);
- ds_grid_bloddelivelist.setColumn(row, "iokindresn", iokindresn);
-
- ds_grid_bloddelivelist.setColumn(row, "chk", "Y");
- createColumn(ds_grid_bloddelivelist, "color");
- ds_grid_bloddelivelist.setColumn(row, "color", "red");
- ds_grid_bloddelivelist.updatecontrol = false;
- ds_grid_bloddelivelist.setRowType(row, Dataset.ROWTYPE_INSERT);
- ds_grid_bloddelivelist.updatecontrol = true;
- }
-
- }
-
- stat2 = "2";
-
- var sExpr = "EXPR(color)";
- for(var i=1; i<grd_bloddelivelist.getCellCount("Head"); i++){
- grd_bloddelivelist.setCellProperty("body", i, "color", sExpr);
- grd_bloddelivelist.setCellProperty("body", i, "color2", sExpr);
- grd_bloddelivelist.setCellProperty("body", i, "selectcolor", sExpr);
- }
-
- grd_bloddelivelist.setCellProperty("Body", 1, "edittype", "checkbox");
- grd_bloddelivelist.setCellProperty("Body", 1, "controlbackground", "");
-
- }
- }
- //콜백_저장
- function cbf_TXLBT12101(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
-
- ds_grid_bloddelivelist.updatecontrol = false;
- for(var i=0; i<ds_grid_bloddelivelist.rowcount; i++){
- ds_grid_bloddelivelist.setRowType(i, Dataset.ROWTYPE_NORMAL);
- }
- ds_grid_bloddelivelist.updatecontrol = true;
-
- }
-
- }
- //콜백_출고취소
- function cbf_TXLBT12102(strSvcID, nErrorCode, strErrorMag){
- if(nErrorCode != 0){
- sysf_messageBox("ID: " + strSvcID + " Error: " + strErrorMag, "E009", "");
- }else{
- ds_grid_bloddelivelist.clearData();
- }
- }
- function group2_ipt_delivepid_onkeyup(obj:Edit, e:KeyEventInfo)
- {
- lf_KeyEvent(obj.name, e.keycode);
- }
- function group2_ipt_blodno_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- lf_KeyEvent(obj.name, e.keycode);
- }
- function group2_btn_ref_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_GetBlodDeliveList("btn");
- }
- function group2_ipt_cancelblod_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- lf_KeyEvent(obj.name, e.keycode);
- }
- function btn_del_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_grid_bloddelivelist.deleteRow(ds_grid_bloddelivelist.rowposition);
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- trace('111 '+ds_grid_bloddelivelist.rowcount);
- if(ds_grid_bloddelivelist.rowcount < 1){
- sysf_messageBox("저장 할 내역이 없습니다.","I","");
- return;
- }
-
- var nRow = ds_grid_bloddelivelist.filterRow("chk","1");
- if(nRow < 0){
- sysf_messageBox("선택된 목록이 없습니다.","I","");
- return;
- }
- trace("searchgbn ==>"+searchgbn);
- if(searchgbn == "blodno"){
- lf_SaveBlodDelive();
- }
- }
- function btn_cncl_onclick(obj:Button, e:ClickEventInfo)
- {
- if(ds_grid_bloddelivelist.rowcount == '0'){
- sysf_messageBox("저장 할 내역이 없습니다.","I","");
- return;
- }
-
- var nRow = ds_grid_bloddelivelist.filterRow("chk","1");
- if(nRow < 0){
- sysf_messageBox("선택된 목록이 없습니다.","I","");
- return;
- }
-
- if(searchgbn == "blodno"){
- lf_SaveBlodDeliveCancel();
- }
- }
- function ds_grid_bloddelivelist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(obj.getColID(e.col) == "chk"){
- obj.updatecontrol = false;
- if(obj.getColumn(e.row, obj.getColID(e.col)) == 1){
- obj.setRowType(e.row, Dataset.ROWTYPE_INSERT);
- }else{
- obj.setRowType(e.row, Dataset.ROWTYPE_NORMAL);
- }
- obj.updatecontrol = true;
- }
- }
- function group2_cmb_delivekindcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- lf_SetDeliveKindCd();
- }
- function btn_init_onclick(obj:Button, e:ClickEventInfo)
- {
- this.reload();
- }
- function group2_cmb_delivekindresn_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- if( group2.cmb_delivekindcd.value == "02" && obj.value != "00" ) {
- group2.ipt_rmk.readonly = false;
- } else {
- group2.ipt_rmk.readonly = true;
- group2.ipt_rmk.value = "";
- }
- }
- // function group2_cp_periodCal_onkeyup(obj:cp_periodCal, e:KeyEventInfo)
- // {
- // if(e.keycode == 13)
- // {
- // lf_GetBlodDeliveList("btn");
- // }
- // }
- function group2_ipt_todd_onkeyup(obj:Calendar, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- lf_GetBlodDeliveList("btn");
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|