123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPPMC02010" position="absolute 0 0 716 300" titletext="보호자연락처관리" onload="SPPMC02010_onload">
- <Layouts>
- <Layout>
- <Button position="absolute 651 273 707 295" id="btn_cancel" class="btn4" taborder="7" text="닫기" onclick="btn_cancel_onclick"/>
- <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 75 707 81" style="strokepen:3 solid #33bbbbff;"/>
- <Static id="caption1" text="통장입금내역" class="tit_2" position="absolute 5 -65 113 19"/>
- <Grid id="datagrid1" taborder="8" binddataset="ds_main_protlist" useinputpanel="false" position="absolute 0 79 707 269" oncelldblclick="datagrid1_oncelldblclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="70"/>
- <Column size="70"/>
- <Column size="82"/>
- <Column size="70"/>
- <Column size="111"/>
- <Column size="266"/>
- <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="환자성명"/>
- <Cell col="3" text="관계"/>
- <Cell col="4" text="보호자성명"/>
- <Cell col="5" text="연락처"/>
- <Cell col="6" text="비고"/>
- <Cell col="7" text="pid"/>
- <Cell col="8" text="seqno"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" style="align:center middle;" text="bind:pid"/>
- <Cell col="2" style="align:center middle;" text="bind:hngnm"/>
- <Cell col="3" displaytype="combo" edittype="combo" text="bind:protflag" combodataset="ds_init_protflag" combocodecol="value" combodatacol="label"/>
- <Cell col="4" displaytype="text" edittype="text" text="bind:name"/>
- <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:phone"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:remark"/>
- <Cell col="7" text="bind:pid"/>
- <Cell col="8" text="bind:seqno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption2" text="보호자 연락처" class="tit_2" position="absolute 5 58 114 75"/>
- <Button id="button1" taborder="9" text="초기화" class="btn2" position="absolute 448 54 501 73" onclick="button1_onclick"/>
- <Button id="button2" taborder="10" text="추가" class="btn2" position="absolute 503 54 545 73" onclick="button2_onclick"/>
- <Button id="button3" taborder="11" text="삭제" class="btn2" position="absolute 547 54 589 73" onclick="button3_onclick"/>
- <Button id="button4" taborder="12" text="저장" class="btn5" position="absolute 591 54 633 73" onclick="button4_onclick"/>
- <Static id="caption5" text="인적사항" class="tit_2" position="absolute 5 0 89 16"/>
- <Button id="button7" taborder="19" text="엑셀저장" class="btn2" position="absolute 643 54 707 73" onclick="button7_onclick"/>
- <Div id="grp" taborder="20" position="absolute 0 19 707 49" class="div_SA2">
- <Layouts>
- <Layout>
- <Edit id="input1" taborder="0" position="absolute 105 5 171 24" onkeydown="grp_input1_onkeydown"/>
- <Static id="caption3" text="등록번호 :" class="search_name" position="absolute 9 6 94 23"/>
- <Button id="button5" taborder="1" text="조회" class="btn1" position="absolute 640 4 696 26" onclick="grp_button5_onclick"/>
- <Edit id="input2" taborder="2" enable="false" position="absolute 171 5 234 24"/>
- <Button id="button6" taborder="3" class="icon_search" position="absolute 86 8 102 21" onclick="grp_button6_onclick"/>
- <Static id="caption4" text="조회구분 :" class="search_name" position="absolute 260 6 360 23"/>
- <Radio id="radio1" taborder="4" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 332 5 447 25" style="textpadding:0 2 0 4;padding:1 1 0 2;" onitemchanged="grp_radio1_onitemchanged" columncount="-1" index="-1" rowcount="-1">
- <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="caption6" text="보호자성명 :" class="search_name" position="absolute 460 6 560 23"/>
- <Edit id="input3" taborder="5" enable="false" position="absolute 550 5 613 24" onkeydown="grp_input3_onkeydown"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_protlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="pid" type="STRING" size="256" sumtext="환자 등록번호"/>
- <Column id="hngnm" type="STRING" size="256" sumtext="환자성명"/>
- <Column id="protflag" type="STRING" size="256" sumtext="환자와의 관계"/>
- <Column id="name" type="STRING" size="256" sumtext="보호자 성명"/>
- <Column id="phone" type="STRING" size="256" sumtext="보호자 연락처"/>
- <Column id="remark" type="STRING" size="256" sumtext="비고"/>
- <Column id="seqno" type="STRING" size="256" sumtext="순번"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="pid" type="STRING" size="256"/>
- <Column id="srchcnd" type="STRING" size="256"/>
- <Column id="prothngnm" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="srchcnd">1</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_patinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="hngnm" type="STRING" size="256"/>
- <Column id="patinfolist" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_patinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_tmp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_protflag" 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">3</Col>
- </Row>
- <Row>
- <Col id="label">부모</Col>
- <Col id="value">4</Col>
- </Row>
- <Row>
- <Col id="label">기타</Col>
- <Col id="value">5</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp.input1" propid="value" datasetid="ds_send" columnid="pid"/>
- <BindItem id="item1" compid="grp.input2" propid="value" datasetid="ds_main_patinfo" columnid="hngnm"/>
- <BindItem id="item2" compid="grp.radio1" propid="value" datasetid="ds_send" columnid="srchcnd"/>
- <BindItem id="item3" compid="grp.input3" propid="value" datasetid="ds_send" columnid="prothngnm"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2016-05-24
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2016-05-24 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include 'com_commonxp::comm_main.xjs';
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Local methods
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument :
- * Description : fSearch
- ****************************************************************************************/
- function fSearch(){
- var srchCnd = utlf_transNullToEmpty(ds_send.getColumn(0, 'srchcnd'));
- var sPid = ds_send.getColumn(0, 'pid');
-
- if(srchCnd == '' && srchCnd == '1'){
- alert('환자조회 시 환자정보는 필수입니다.');
- return;
- }
-
- ds_main_protlist.clearData();
- ds_main_protlist.addRow();
-
- // 재조회
- var oParam = {};
- oParam.id = "TRPMC01404";
- oParam.service = "patinfomngtapp.PatBaseInfo";
- oParam.method = "reqGetProtList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_protlist=protlist";
- oParam.async = false;
- //oParam.callback = "cf_TRPMC01404";
- tranf_submit(oParam);
-
- if(ds_main_protlist.rowcount < 1){
- alert('검색결과가 존재하지 않습니다.');
- }
- }
- //=======================================================================================
- // callback
- //---------------------------------------------------------------------------------------
- function callback(sSvcId, nErrorCode, sErrorMsg){
- arErrorCode.push(sSvcId, nErrorCode);
- }
- //=======================================================================================
- // Events
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument :
- * Description : onload
- ****************************************************************************************/
- function SPPMC02010_onload(obj:Form, e:LoadEventInfo){
- frmf_initForm(obj);
-
- if(frmf_isPopup()){
- var sPid = utlf_transNullToEmpty(opener.frmf_getParameter('SPPMC02010_PID'));
- var sHngnm = opener.frmf_getParameter('SPPMC02010_HNGNM');
-
- if(sPid == ''){
- //
- }
- else{
- ds_send.setColumn(0, 'pid', sPid);
- ds_main_patinfo.setColumn(0, 'hngnm', sHngnm);
-
- fSearch();
- }
- }
-
- grdf_setRowTypeIcon(datagrid1, 0);
- }
- /****************************************************************************************
- * Argument :
- * Description : 등록번호 검색 아이콘 클릭 이벤트
- ****************************************************************************************/
- function grp_button6_onclick(obj:Button, e:ClickEventInfo){
- var ptbs_pid = utlf_transNullToEmpty(ds_send.getColumn(0, 'pid'));
-
- dsf_createDsRow('ds_req', [
- { col: 'pid', type: '', size: 256, val: '' },
- { col: 'srchcond', type: '', size: 256, val: '' },
- { col: 'checkfnexam', type: '', size: 256, val: '' },
- { col: 'autoflag', type: '', size: 256, val: '' }
- ], false);
-
- if(ptbs_pid == '' || ptbs_pid == ' '){
- // do nothing
- }
- else{
- ds_req.setColumn(0, 'pid', ptbs_pid);
- ds_req.setColumn(0, 'srchcond', '1');
- }
-
- ds_req.setColumn(0, 'checkfnexam', '1');
- ds_req.setColumn(0, 'autoflag', 'Y'); // 조회내역이 1건인 경우 자동 화면 닫기
-
- frmf_modal("SPPMC02500", "SPPMC02500", { arg_ds_send: ds_req }, "", '', '', '', "", "", "", "", "", "M");
-
- if(frmf_getParameter('SPPMC02500_popupendflag') == 'ok'){
- ds_send.setColumn(0, 'pid', ds_patinfolist.getColumn(0, 'pid'));
- ds_main_patinfo.setColumn(0, 'hngnm', ds_patinfolist.getColumn(0, 'hngnm'));
-
- fSearch();
- }
- else{
- return;
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 등록번호 input1 키보드 입력 이벤트
- ****************************************************************************************/
- function grp_input1_onkeydown(obj:Edit, e:KeyEventInfo){
- if(e.keycode == 13){
- obj.updateToDataset();
- grp.button6.click();
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 조회구분 라디오 아이템 변경 이벤트
- ****************************************************************************************/
- function grp_radio1_onitemchanged(obj:Radio, e:ItemChangeEventInfo){
- var srchCnd = ds_send.getColumn(0, 'srchcnd');
- if(srchCnd == '1'){
- ds_send.setColumn(0, 'prothngnm', '');
- grp.input3.enable = false;
- grp.input1.enable = true;
- }
- else{
- ds_send.setColumn(0, 'pid', '');
- ds_main_patinfo.setColumn(0, 'hngnm', '');
- grp.input3.enable = true;
- grp.input1.enable = false;
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 보호자성명 키보드 입력 이벤트
- ****************************************************************************************/
- function grp_input3_onkeydown(obj:Edit, e:KeyEventInfo){
- if(e.keycode == 13){
- obj.updateToDataset();
- grp.button5.click();
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 조회 버튼 클릭 이벤트
- ****************************************************************************************/
- function grp_button5_onclick(obj:Button, e:ClickEventInfo){
- fSearch();
- }
- /****************************************************************************************
- * Argument :
- * Description : 초기화 버튼 클릭 이벤트
- ****************************************************************************************/
- function button1_onclick(obj:Button, e:ClickEventInfo){
- fSearch();
- }
- /****************************************************************************************
- * Argument :
- * Description : 추가 버튼 클릭 이벤트
- ****************************************************************************************/
- function button2_onclick(obj:Button, e:ClickEventInfo){
- var srchCnd = ds_send.getColumn(0, 'srchcnd');
- var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
-
- if(srchCnd != '1'){
- alert('환자조회시에만 가능합니다.');
- return;
- }
- else if(srchCnd == '1' && sHngnm == ''){
- alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
- return;
- }
-
- var idx = ds_main_protlist.addRow();
- ds_main_protlist.setColumn(idx, 'pid', ds_send.getColumn(0, 'pid'));
- }
- /****************************************************************************************
- * Argument :
- * Description : 삭제 버튼 클릭 이벤트
- ****************************************************************************************/
- function button3_onclick(obj:Button, e:ClickEventInfo){
- var srchCnd = ds_send.getColumn(0, 'srchcnd');
- var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
-
- if(srchCnd != '1'){
- alert('환자조회시에만 가능합니다.');
- return;
- }
- else if(srchCnd == '1' && sHngnm == ''){
- alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
- return;
- }
-
- var status = ds_main_protlist.getRowType(datagrid1.currentrow);
- if(status = Dataset.ROWTYPE_INSERT){
- ds_main_protlist.deleteRow(datagrid1.currentrow);
- }
- else{
- ds_main_protlist.setRowType(datagrid1.currentrow, Dataset.ROWTYPE_DELETE);
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : 저장 버튼 클릭 이벤트
- ****************************************************************************************/
- function button4_onclick(obj:Button, e:ClickEventInfo){
- var srchCnd = ds_send.getColumn(0, 'srchcnd');
- var sHngnm = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0, 'hngnm'));
-
- if(srchCnd != '1'){
- alert('환자조회시에만 가능합니다.');
- return;
- }
- else if(srchCnd == '1' && sHngnm == ''){
- alert('환자가 조회되어있지 않습니다. \r\n환자정보 재조회하십시오.');
- return;
- }
-
- for(var i = 0; i < ds_main_protlist.rowcount; i++){
- var status = ds_main_protlist.getRowType(i);
- if(status == Dataset.ROWTYPE_INSERT || status == Dataset.ROWTYPE_UPDATE){
- if(utlf_transNullToEmpty(ds_main_protlist.getColumn(0, 'protflag')) == '' ||
- utlf_transNullToEmpty(ds_main_protlist.getColumn(0, 'name')) == ''){
- sysf_messageBox('관계, 성명은 필수입력값입니다.', 'E999');
- return;
- }
- }
- }
- var updated = grdf_getGridUpdateData(datagrid1, 'all');
- grdf_setStatusColumn(updated, 'status');
- ds_tmp.copyData(updated);
-
- var oParam = {};
- oParam.id = "TXPMC01404";
- oParam.service = "patinfomngtapp.PatBaseInfo";
- oParam.method = "reqExeProtList";
- oParam.inds = "req=ds_tmp";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TXPMC01404";
- tranf_submit(oParam);
-
- // 재조회
- oParam = {};
- oParam.id = "TRPMC01404";
- oParam.service = "patinfomngtapp.PatBaseInfo";
- oParam.method = "reqGetProtList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_protlist=protlist";
- oParam.async = false;
- //oParam.callback = "cf_TRPMC01404";
- tranf_submit(oParam);
- }
- /****************************************************************************************
- * Argument :
- * Description : 엑셀저장 버튼 클릭 이벤트
- ****************************************************************************************/
- function button7_onclick(obj:Button, e:ClickEventInfo){
- if(ds_main_patinfo.rowcount < 1){
- sysf_messageBox('저장할 데이터가', 'I004');
- return false;
- }
-
- grdf_exportExcel(datagrid1, '보호자리스트', 'SheetName1', true, '', 'user', true);
- }
- /****************************************************************************************
- * Argument :
- * Description : 닫기 버튼 클릭 이벤트
- ****************************************************************************************/
- function btn_cancel_onclick(obj:Button, e:ClickEventInfo){
- if(frmf_checkOpener()){
- this.close();
- }
- }
- /****************************************************************************************
- * Argument :
- * Description : datagrid1 그리드 더블 클릭 이벤트
- ****************************************************************************************/
- function datagrid1_oncelldblclick(obj:Grid, e:GridClickEventInfo){
- var row = obj.currentrow;
- var colnm = obj.getCellProperty('Body', obj.currentcell, 'text');
- if(colnm == 'pid' || colnm == 'hngnm'){
- // 검색조건 재설정
- ds_send.setColumn(0, 'srchcnd', '1');
- ds_send.setColumn(0, 'prothngnm', '');
-
- grp.input3.enable = false;
- grp.input1.enable = true;
-
- ds_send.setColumn(0, 'pid', ds_main_protlist.getColumn(row, 'pid'));
-
- grp.button6.click();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|