123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMABC00700" position="absolute 0 0 1200 778" titletext="조혈모세포 일괄폐기" oninit="SMABC00700_oninit" onload="SMABC00700_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="조혈모세포일괄폐기" class="tit_1" position="absolute 0 0 200 23"/>
- <Button id="btn_save" taborder="1" text="폐기처리" class="btn4" position="absolute 1029 21 1109 43" anchor="top right" onclick="btn_save_onclick"/>
- <Button id="btn_can" taborder="2" text="폐기취소" class="btn4" position="absolute 1113 21 1193 43" anchor="top right" onclick="btn_can_onclick"/>
- <Static id="caption1" text="조혈모세포 일괄폐기 대상" class="tit_2" position="absolute 0 86 200 107"/>
- <Shape id="line1" class="line_10" position="absolute 0 102 1194 108" anchor="left top right"/>
- <Div id="grp_sea" anchor="left top right" taborder="3" class="div_SA" position="absolute 0 44 1194 79">
- <Layouts>
- <Layout>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1104 7 1110 29" anchor="top right"/>
- <Button id="btn_sea" taborder="4" text="조회" class="btn1" position="absolute 1123 7 1179 29" anchor="top right" onclick="grp_sea_btn_sea_onclick"/>
- <Radio id="radio2" taborder="5" columncount="2" rowcount="1" codecolumn="codecolumn" datacolumn="datacolumn" class="radio_search" position="absolute 335 8 511 28" onitemchanged="grp_sea_radio2_onitemchanged">
- <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>
- </Rows>
- </Dataset>
- </Radio>
- <Static id="caption5" text="~" class="search_no_b" position="absolute 207 10 219 27"/>
- <Calendar id="ipt_sdate" taborder="6" class="input_s_essential" position="absolute 104 9 204 28" dateformat="yyyy-MM-dd" autoselect="true"/>
- <Calendar id="ipt_edate" taborder="7" class="input_s_essential" enable="false" position="absolute 222 9 322 28" dateformat="yyyy-MM-dd" value="null" autoselect="true"/>
- <Static id="cpt_days" text="보관일자 :" class="search_name" position="absolute 15 10 101 27"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid id="grd_abnlist" taborder="4" binddataset="ds_main_celltretdetl_celltretdetail" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 107 1194 772" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="26"/>
- <Column size="102"/>
- <Column size="142"/>
- <Column size="113"/>
- <Column size="92"/>
- <Column size="108"/>
- <Column size="116"/>
- <Column size="80"/>
- <Column size="358"/>
- <Column size="40"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="보관일자"/>
- <Cell col="2" text="Stem Cell Source"/>
- <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="caption1"/>
- <Cell col="11" text="caption2"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="currow+1"/>
- <Cell col="1" displaytype="date" edittype="none" text="bind:keepdd" mask="yyyy-MM-dd" calendardisplaynulltype="nulltext"/>
- <Cell col="2" displaytype="combo" edittype="combo" text="bind:scs" combodataset="ds_init_cmbinfo_stemcellsource_A0159" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="3" displaytype="none" edittype="none" text="bind:pid"/>
- <Cell col="4" text="bind:hngnm"/>
- <Cell col="5" displaytype="date" edittype="date" text="bind:abndd" mask="yyyy-MM-dd" calendardisplaynulltype="nulltext"/>
- <Cell col="6" displaytype="combo" edittype="combo" text="bind:abnresn" combodataset="ds_init_cmbinfo_abnresn_A0155" combocodecol="cdid" combodatacol="cdnm"/>
- <Cell col="7" text="bind:abnnm"/>
- <Cell col="8" displaytype="text" edittype="text" text="bind:abnrem"/>
- <Cell col="9" displaytype="checkbox" edittype="checkbox" text="bind:chk" expr="expr:chk == 'Y' ? 1 : 0"/>
- <Cell col="10" text="bind:abnid"/>
- <Cell col="11" text="bind:cellbcno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_baseinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="sdate" type="STRING" size="256"/>
- <Column id="tdate" type="STRING" size="256"/>
- <Column id="gb" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="sdate"/>
- <Col id="tdate"/>
- <Col id="gb"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_celltretdetl_celltretdetail" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_celltretdetl_celltretdetail_oncolumnchanged">
- <ColumnInfo>
- <Column id="keepdd" type="STRING" size="256" sumtext="보관일자"/>
- <Column id="scs" type="STRING" size="256" sumtext="Stem Cell Source"/>
- <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
- <Column id="hngnm" type="STRING" size="256" sumtext="환자명"/>
- <Column id="abndd" type="STRING" size="256" sumtext="폐기일자"/>
- <Column id="abnresn" type="STRING" size="256" sumtext="폐기사유"/>
- <Column id="abnnm" type="STRING" size="256" sumtext="폐기자"/>
- <Column id="abnrem" type="STRING" size="256" sumtext="비고"/>
- <Column id="chk" type="STRING" size="256" sumtext="선택"/>
- <Column id="abnid" type="STRING" size="256" sumtext="폐기자"/>
- <Column id="cellbcno" type="STRING" size="256" sumtext="바코드번호"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmbinfo_stemcellsource_A0159" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdnm" type="STRING" size="256"/>
- <Column id="cdid" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmbinfo_abnresn_A0155" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256"/>
- <Column id="cdnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.ipt_sdate" propid="value" datasetid="ds_send_baseinfo" columnid="sdate"/>
- <BindItem id="item1" compid="grp_sea.ipt_edate" propid="value" datasetid="ds_send_baseinfo" columnid="tdate"/>
- <BindItem id="item2" compid="grp_sea.radio2" propid="value" datasetid="ds_send_baseinfo" columnid="gb"/>
- </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";
- function SMABC00700_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMABC00700_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_abnlist);
-
- var arrParam = [{dsNm: "ds_init_cmbinfo_abnresn_A0155", cdGrpId: "A0155"}
- , {dsNm: "ds_init_cmbinfo_stemcellsource_A0159", cdGrpId: "A0159"}]
- appf_getCodeList(arrParam);
-
- ds_send_baseinfo.setColumn(0, "sdate", utlf_getCurrentDate());
- ds_send_baseinfo.setColumn(0, "tdate", grp_sea.ipt_sdate.value);
- grp_sea.ipt_sdate.value = String(grp_sea.ipt_sdate.value).toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
- btn_save.enable = false;
- btn_can.enable = true;
-
- ds_send_baseinfo.setColumn(0, "gb", "1");
- }
- function grp_sea_radio2_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- if (obj.value == "1")
- {
- btn_save.enable = true;
- btn_can.enable = false;
- grp_sea.ipt_edate.enable = false;
- grp_sea.ipt_sdate.value = String(grp_sea.ipt_edate.value).toDate().getAddDate(-365 * 4,"D").getDateFormat("YYYYMMDD") ;
- grp_sea.cpt_days.text = "보관일자";
- }
- else
- {
- btn_save.enable = false;
- btn_can.enable = true;
- grp_sea.ipt_edate.enable = true;
- grp_sea.ipt_sdate.value = String(grp_sea.ipt_edate.value).toDate().getAddDate(-7,"D").getDateFormat("YYYYMMDD") ;
- grp_sea.cpt_days.text = "폐기일자";
- }
-
- fReadFunc();
- }
- function trim(data)
- { // 문자에 대한 TRIM 작업
- return data.replace(/(^\s*)|(\s*$)/g, "");
- }
- function isDate(str)
- {
- if(utlf_isNull(str))
- {
- return true;
- }
-
- if (utlf_isNull(trim(str)))
- {
- return true; // 빈건 체크안함
- }
- if (isNaN(parseInt(str)))
- {
- return false; // 숫자가 아니면 fals
- }
- if (str.length != 8)
- {
- return false;
- }
-
- var yy = new Number(str.substr(0, 4));
- var mm = new Number(str.substr(4, 2));
- var dd = new Number(str.substr(6, 2));
- var date = new Date(yy, mm, dd);
-
- if (yy != date.getFullYear() || mm != date.getMonth() || dd != date.getDate())
- {
- return false; // 존재하지 않는 날짜
- }
- return true; // 존재하는 날짜
- }
- function fDataCheck()
- {
- if (isDate(ds_send_baseinfo.getColumn(0, "sdate")) == false)
- {
- sysf_messageBox("보관 시작일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (utlf_isNull(ds_send_baseinfo.getColumn(0, "sdate")))
- {
- sysf_messageBox("보관 시작일은 필수 입력 또는 선택 항목입니다.", "E999", "");
- return false;
- }
- if (isDate(ds_send_baseinfo.getColumn(0, "tdate")) == false)
- {
- sysf_messageBox("보관 종료일의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (utlf_isNull(ds_send_baseinfo.getColumn(0, "tdate")))
- {
- sysf_messageBox("보관 종료일은 필수 입력 또는 선택 항목입니다.", "E999", "");
- return false;
- }
- if (ds_send_baseinfo.getColumn(0, "sdate") > ds_send_baseinfo.getColumn(0, "tdate"))
- {
- sysf_messageBox("보관 기간일이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- return true;
- }
- function fReadFunc()
- {
- if (fDataCheck() == false)
- {
- return;
- }
-
- ds_main_celltretdetl_celltretdetail.clearData();
- var oParam = {};
- oParam.id = "TRABC00701";
- oParam.service = "hsctstemcellapp.StemCellTreat";
- oParam.method = "reqGetStemCellBatAbn";
- oParam.inds = "req=ds_send_baseinfo";
- oParam.outds = "ds_main_celltretdetl_celltretdetail=celltretdetail";
- oParam.async = false;
- //oParam.callback = "cf_TRABC00701";
- tranf_submit(oParam);
-
- if(utlf_isNull(ds_main_celltretdetl_celltretdetail.getColumn(0, "pid")))
- {
- ds_main_celltretdetl_celltretdetail.clearData();
- }
-
- if(ds_send_baseinfo.getColumn(0, "gb") == "1")
- {
- grd_abnlist.setCellProperty("Body", grd_abnlist.getBindCellIndex("Body", "abnresn"), "eddittype", "combo");
- }
- else
- {
- grd_abnlist.setCellProperty("Body", grd_abnlist.getBindCellIndex("Body", "abnresn"), "eddittype", "none");
- }
- }
- function grp_sea_btn_sea_onclick(obj:Button, e:ClickEventInfo)
- {
- fReadFunc();
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- if (fSaveChk() == false)
- {
- return;
- }
- fSaveData();
- }
- function fSaveChk()
- {
- var k = 0;
- for (var i = 0; i < ds_main_celltretdetl_celltretdetail.rowcount; i++)
- {
- if(ds_main_celltretdetl_celltretdetail.getColumn(i, "chk") == "Y")
- {
- k = parseInt(k) + 1;
-
- if(utlf_isNull(ds_main_celltretdetl_celltretdetail.getColumn(i, "abndd")))
- {
- sysf_messageBox("폐기일자는 필수 입력항목입니다.", "E999", "");
- return false;
- }
- if (isDate(ds_main_celltretdetl_celltretdetail.getColumn(i, "abndd")) == false)
- {
- sysf_messageBox("폐기일자의 날짜 형식이 잘못 입력되었습니다.", "E999", "");
- return false;
- }
- if (utlf_isNull(ds_main_celltretdetl_celltretdetail.getColumn(i, "abnresn")))
- {
- sysf_messageBox("폐기사유는 필수 선택항목입니다.", "E999", "");
- return false;
- }
- }
- }
- if (k == 0)
- {
- sysf_messageBox("폐기처리할 자료를 선택하지 않았습니다.", "E999", "");
- return false;
- }
- return true;
- }
- function fSaveData()
- {
- var oParam = {};
- oParam.id = "TXABC00701";
- oParam.service = "hsctstemcellapp.StemCellTreat";
- oParam.method = "reqExeStemCellBatAbn";
- oParam.inds = "celltretdetail=ds_main_celltretdetl_celltretdetail";
- oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_TXABC00701";
- tranf_submit(oParam);
- }
- function cf_TXABC00701(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- fReadFunc();
- }
- }
- function ds_main_celltretdetl_celltretdetail_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "chk")
- {
- obj.setColumn(e.row, "chk", (e.newvalue == "Y" || e.newvalue == 1) ? "Y" : "N");
-
- if(ds_send_baseinfo.getColumn(0, "gb") == "1")
- {
- if(e.newvalue == 1)
- {
- obj.setColumn(e.row, "abndd", utlf_getCurrentDate());
- obj.setColumn(e.row, "abnnm", sysf_getUserName());
- obj.setColumn(e.row, "abnid", sysf_getUserId());
- obj.setColumn(e.row, "abnresn", "6");
- }
- else
- {
- obj.setColumn(e.row, "abndd", "");
- obj.setColumn(e.row, "abnnm", "");
- obj.setColumn(e.row, "abnid", "");
- obj.setColumn(e.row, "abnresn", "");
- }
- }
- }
- }
- function btn_can_onclick(obj:Button, e:ClickEventInfo)
- {
- var k = 0;
-
- for(var i = 0; i < ds_main_celltretdetl_celltretdetail.rowcount; i++)
- {
- if(ds_main_celltretdetl_celltretdetail.getColumn(i, "chk") == "Y")
- {
- k = parseInt(k) + 1;
- }
- }
- if (k == 0)
- {
- sysf_messageBox("폐기취소할 자료를 선택하지 않았습니다.", "E999", "");
- return false;
- }
- fSaveData2();
- }
- function fSaveData2()
- {
- var oParam = {};
- oParam.id = "TXABC00702";
- oParam.service = "hsctstemcellapp.StemCellTreat";
- oParam.method = "reqExeStemCellAbnCncl";
- oParam.inds = "celltretdetail=ds_main_celltretdetl_celltretdetail";
- oParam.outds = "ds_=item";
- oParam.async = false;
- oParam.callback = "cf_TXABC00702";
- tranf_submit(oParam);
- }
- function cf_TXABC00702(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- fReadFunc();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|