123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMNO04500" position="absolute 0 0 1199 760" titletext="임산부보고서" oninit="SMMNO04500_oninit" onload="SMMNO04500_onload">
- <Layouts>
- <Layout>
- <Div id="group2" taborder="1" class="div_SA" position="absolute 0 24 1195 64" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption2" text="진료기간 :" class="search_name" position="absolute 15 12 101 29"/>
- <Calendar id="ipt_fromdd" taborder="1" class="input_search" position="absolute 97 11 198 30" autoselect="true" autoskip="true"/>
- <Static id="caption3" text="~" position="absolute 206 15 221 29"/>
- <Calendar id="ipt_todd" taborder="2" class="input_search" position="absolute 221 11 322 30" autoselect="true"/>
- <Shape id="line2" linetype="vertical" class="line_4" position="absolute 702 9 708 29" anchor="top right"/>
- <Button id="button1" taborder="3" text="조회" class="btn1" position="absolute 715 9 771 31" anchor="top right" onclick="group2_button1_onclick"/>
- <Button id="button2" taborder="4" text="자료생성" class="btn1" position="absolute 776 9 856 31" anchor="top right" onclick="group2_button2_onclick"/>
- <Button id="button3" taborder="5" text="행추가" class="btn4" position="absolute 861 9 929 31" anchor="top right" onclick="group2_button3_onclick"/>
- <Button id="button4" taborder="6" text="행삭제" class="btn4" position="absolute 934 9 1002 31" anchor="top right" onclick="group2_button4_onclick"/>
- <Button id="button5" taborder="7" text="저장" class="btn4" position="absolute 1007 9 1063 31" anchor="top right" onclick="group2_button5_onclick"/>
- <Button id="button6" taborder="8" text="출력" class="btn6" position="absolute 1068 9 1124 31" anchor="top right" onclick="group2_button6_onclick"/>
- <Button id="button7" taborder="9" text="엑셀" class="btn7" position="absolute 1129 9 1185 31" anchor="top right" onclick="group2_button7_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Grid position="absolute 0 78 1195 753" id="grd_preg" binddataset="ds_main_preginfo_preglist" cellsizingtype="col" anchor="all" selecttype="multirow" autoenter="key" onkeyup="grd_preg_onkeyup">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="19" band="left"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="150"/>
- <Column size="129"/>
- <Column size="80"/>
- <Column size="486"/>
- </Columns>
- <Rows>
- <Row size="24" 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="주소"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" displaytype="text" edittype="text" text="bind:instcd"/>
- <Cell col="2" displaytype="text" edittype="text" text="bind:cretno"/>
- <Cell col="3" displaytype="date" edittype="date" text="bind:indd" editautoselect="true" editautoskip="true" taborder="1" calendardisplaynulltype="nulltext"/>
- <Cell col="4" displaytype="text" edittype="mask" style="align:center middle;" text="bind:pid" mask="#######" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="2"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:pname" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="3"/>
- <Cell col="6" displaytype="text" edittype="mask" style="align:center middle;" text="bind:rrgstno" mask="######-#######" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="4"/>
- <Cell col="7" displaytype="text" edittype="text" style="align:center middle;" text="bind:phone" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="5"/>
- <Cell col="8" displaytype="text" edittype="mask" style="align:center middle;" text="bind:zipcd" mask="###-###" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="6"/>
- <Cell col="9" displaytype="text" edittype="text" text="bind:address" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="7"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Shape position="absolute 0 73 1195 79" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
- <Static id="caption1" text="임산부 보고서" class="tit_1" position="absolute 0 0 265 24"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_preginfo_preglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="indd" type="STRING" size="256" sumtext="내원일"/>
- <Column id="pid" type="STRING" size="256" sumtext="환자번호"/>
- <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
- <Column id="pname" type="STRING" size="256" sumtext="환자이름"/>
- <Column id="rrgstno" type="STRING" size="256" sumtext="주민등록번호"/>
- <Column id="husband" type="STRING" size="256" sumtext="배우자명"/>
- <Column id="zipcd" type="STRING" size="256" sumtext="우편번호"/>
- <Column id="address" type="STRING" size="256" sumtext="주소"/>
- <Column id="phone" type="STRING" size="256" sumtext="전화번호"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_preglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="group2.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
- <BindItem id="item1" compid="group2.ipt_todd" propid="value" datasetid="ds_main_cond" columnid="todd"/>
- </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";
- var arErrorCode = new HashArray();
- function SMMNO04500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMMNO04500_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_preg);
- grdf_setRowTypeIcon(grd_preg, 0);
- fInitialize();
- }
- function fInitialize()
- {
- ds_main_preginfo_preglist.clearData();
-
- //조회날짜 받아옴
- var fromdd = ((utlf_getCurrentDate().toDate()).getAddDate(-30)).getDateFormat();
- var todd = utlf_getCurrentDate();
-
- //지난달을 보여줌
- ds_main_cond.setColumn(0, "fromdd",fromdd);
- ds_main_cond.setColumn(0, "todd",todd);
- fSearch();
- }
- function fSearch()
- {
- ds_main_preginfo_preglist.clearData();
- // 조회 조건을 셋팅 한다.
- var oParam = {};
- oParam.id = "TRMNO04501";
- oParam.service = "outcareapp.OutCareMngt";
- oParam.method = "reqGetPregList";
- oParam.inds = "req=ds_main_cond";
- oParam.outds = "ds_main_preginfo_preglist=preglist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNO04501";
- tranf_submit(oParam);
- }
- function group2_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearch();
- }
- function group2_button2_onclick(obj:Button, e:ClickEventInfo)
- {
- fCreate();
- }
- function fCreate()
- {
- ds_main_preginfo_preglist.clearData();
- // 조회 조건을 셋팅 한다.
- var oParam = {};
- oParam.id = "TRMNO04501";
- oParam.service = "outcareapp.OutCareMngt";
- oParam.method = "reqGetCreatePregList";
- oParam.inds = "req=ds_main_cond";
- oParam.outds = "ds_main_preginfo_preglist=preglist";
- oParam.async = false;
- //oParam.callback = "cf_TRMNO04501";
- tranf_submit(oParam);
-
- for(var i = 0; i < ds_main_preginfo_preglist.rowcount; i++)
- {
- ds_main_preginfo_preglist.updatecontrol = false;
- ds_main_preginfo_preglist.setRowType(i, "i");
- ds_main_preginfo_preglist.updatecontrol = true;
- }
- }
- function group2_button3_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_main_preginfo_preglist.addRow();
- }
- function group2_button4_onclick(obj:Button, e:ClickEventInfo)
- {
- var selectedRows = grdf_getSelectedRows(grd_preg);
- if(selectedRows.length == 0)
- {
- alert("삭제할 행을 선택해주세요.");
- return;
- }
- var iStatus;
- var cur_row;
- for(var i = 0; i < selectedRows.length; i++)
- {
- cur_row = selectedRows[i];
- iStatus = ds_main_preginfo_preglist.getRowType(cur_row);
- if (iStatus == 2)
- {
- ds_main_preginfo_preglist.deleteRow(cur_row);
- }
- else if (iStatus == 8)
- {// 삭제로 표시된 행이면
- ds_main_preginfo_preglist.updatecontrol = false;
- ds_main_preginfo_preglist.setRowType(cur_row, "");
- ds_main_preginfo_preglist.updatecontrol = true;
- }
- else
- {
- ds_main_preginfo_preglist.updatecontrol = false;
- ds_main_preginfo_preglist.setRowType(cur_row, "d");
- ds_main_preginfo_preglist.updatecontrol = true;
- }
- }
- }
- function group2_button5_onclick(obj:Button, e:ClickEventInfo)
- {
- fSave();
- }
- function fSave()
- {
- for(var iRow = 0; iRow < ds_main_preginfo_preglist.rowcount; iRow++)
- {
- if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "indd")))
- {
- sysf_messageBox("진료일자를","C001");
- return;
- }
- else
- {
- if(String(ds_main_preginfo_preglist.getColumn(iRow, "indd")).length != 8)
- {
- sysf_messageBox("8자리 진료일자를","C001");
- return;
- }
- }
-
- if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "pid")))
- {
- sysf_messageBox("환자번호를","C001");
- return;
- }
- if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "pname")))
- {
- sysf_messageBox("임산부명를","C001");
- return;
- }
- if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "rrgstno")))
- {
- sysf_messageBox("주민번호를","C001");
- return;
- }
- else
- {
- if(String(ds_main_preginfo_preglist.getColumn(iRow, "rrgstno")).length != 13)
- {
- sysf_messageBox("13자리 주민번호를","C001");
- return;
- }
- }
-
- if(!utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "zipcd")) && String(ds_main_preginfo_preglist.getColumn(iRow, "zipcd")).length != 6)
- {
- sysf_messageBox("6자리 우편번호를","C001");
- return;
- }
- }
- var updateData = grdf_getGridUpdateData(grd_preg);
- if(updateData.rowcount == 0)
- {
- sysf_messageBox("저장할 데이터를 입력하지 ","E007");
- return;
- }
-
- if(sysf_messageBox("저장 " , "S001") == '6')
- {
- grdf_setStatusColumn(updateData, "status");
- ds_send_preglist.copyData(updateData, true);
- var oParam = {};
- oParam.id = "TXMNO04501";
- oParam.service = "outcareapp.OutCareMngt";
- oParam.method = "reqSavePregList";
- oParam.inds = "preglist=ds_send_preglist";
- oParam.outds = "ds_=basecodelistinfo";
- oParam.async = false;
- oParam.callback = "cf_TXMNO04501";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXMNO04501") > -1)
- {
- fSearch();
- }
- }
- }
- function cf_TXMNO04501(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function group2_button6_onclick(obj:Button, e:ClickEventInfo)
- {
- var objDOM = rptf_createDOM();
- rptf_setNodeListToDOM(objDOM, "/root/main/cond", ds_main_cond);
- rptf_setNodeListToDOM(objDOM, "/root/main/preginfo/preglist", ds_main_preginfo_preglist);
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source;
- var option = "";
- rptf_exeReportPreview30(["RPMNO04500"],[objParam], option);
- }
- function group2_button7_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grd_preg, "임산부보고서", "임산부보고서", "true", "", "");
- }
- function grd_preg_onkeyup(obj:Grid, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.setCellPos(obj.currentcell+1);
- obj.showEditor(true);
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|