123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMASB02200" position="absolute 0 0 1131 719" titletext="기본코드관리" oninit="SMASB02200_oninit" onload="SMASB02200_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 15 1124 713" id="grp_biz" scrollbars="autoboth">
- <Layouts>
- <Layout width="1124" height="698">
- <Static text="분류코드" position="absolute 1 14 79 31" id="caption1" class="tit_2" anchor="default"/>
- <Shape position="absolute 0 30 594 36" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
- <Grid position="absolute 0 35 594 698" id="grd_etclst" binddataset="ds_main_etclst_item" anchor="default" autoenter="key" cellclickbound="cell" selecttype="multirow" oncellclick="grp_biz_grd_etclst_oncellclick" onkeydown="grp_biz_grd_etclst_onkeydown">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="24"/>
- <Column size="100"/>
- <Column size="347"/>
- <Column size="100"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="caption1"/>
- <Cell col="1"/>
- <Cell col="2" text="코드"/>
- <Cell col="3" text="분류코드명"/>
- <Cell col="4" text="적용여부"/>
- </Band>
- <Band id="body">
- <Cell text="bind:clscd"/>
- <Cell col="1" celltype="head"/>
- <Cell col="2" displaytype="text" text="bind:etccd" editlimit="2"/>
- <Cell col="3" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:etcdetlnm" wordwrap="word"/>
- <Cell col="4" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' || useyn == '1' ? '1' : '0' "/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 373 10 437 29" id="btn_refresh" class="btn2" text="새로고침" anchor="default" onclick="grp_biz_btn_refresh_onclick"/>
- <Button position="absolute 440 10 493 29" id="btn_addcell" class="btn2" text="행추가" anchor="default" onclick="grp_biz_btn_addcell_onclick"/>
- <Button position="absolute 496 10 549 29" id="btn_grddel" class="btn2" text="행삭제" anchor="default" onclick="grp_biz_btn_grddel_onclick"/>
- <Button position="absolute 552 10 594 29" id="button3" class="btn5" text="저장" anchor="default" onclick="grp_biz_button3_onclick"/>
- <Grid position="absolute 601 35 1124 698" id="grd_detlcodelist" binddataset="ds_main_detlcodelst_item" anchor="default" autoenter="key" cellclickbound="cell" selecttype="multirow" onkeydown="grp_biz_grd_detlcodelist_onkeydown" oncellclick="grp_biz_grd_detlcodelist_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="24"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="273"/>
- <Column size="101"/>
- </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="적용여부"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:clscd"/>
- <Cell col="2" displaytype="text" text="bind:etccd"/>
- <Cell col="3" displaytype="text" edittype="text" style="align:left top;padding:5 2 1 2;" text="bind:etcdetlnm" wordwrap="word"/>
- <Cell col="4" displaytype="checkbox" edittype="checkbox" text="bind:useyn" expr="expr:useyn == 'Y' || useyn == '1' ? '1' : '0' "/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static text="상세코드" position="absolute 602 14 680 31" id="caption3" class="tit_2" anchor="default"/>
- <Shape position="absolute 601 30 1123 36" linetype="horizontal" id="line2" class="line_10" anchor="default"/>
- <Button position="absolute 948 10 1001 29" id="btn_grdadd" class="btn2" text="행추가" anchor="default" onclick="grp_biz_btn_grdadd_onclick"/>
- <Button position="absolute 1003 10 1078 29" id="btn_seldeldetl" class="btn2" text="선택행삭제" anchor="default" onclick="grp_biz_btn_seldeldetl_onclick"/>
- <Button position="absolute 1080 10 1122 29" id="btn_save2" class="btn5" text="저장" anchor="default" onclick="grp_biz_btn_save2_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="기본코드 관리" class="tit_1" position="absolute 0 0 149 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_etclst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_etclst_item_oncolumnchanged"/>
- <Dataset id="ds_main_detlcodelst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_detlcodelst_item_oncolumnchanged"/>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="clscd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="clscd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="savedata" type="STRING" size="256"/>
- <Column id="clscd" type="STRING" size="256"/>
- <Column id="etccd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="savedata"/>
- <Col id="clscd"/>
- <Col id="etccd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="count" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="count"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_req_savedata_tmp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <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";
- include "com_basiccodexp::ZBC001.xjs"
- var arErrorCode = new HashArray();
- function SMASB02200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- grdf_setRowTypeIcon(grp_biz.grd_etclst, 1);
- grdf_setRowTypeIcon(grp_biz.grd_detlcodelist, 0);
- }
- function SMASB02200_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grp_biz.grd_etclst);
- grdf_setToolTipBind(grp_biz.grd_etclst);
-
- grdf_initGrid(grp_biz.grd_detlcodelist);
- grdf_setToolTipBind(grp_biz.grd_detlcodelist);
-
- ds_main_etclst_item.clearData();
- ds_main_detlcodelst_item.clearData();
-
- var oParam = {};
- oParam.id = "TRASB02201";
- oParam.service = "infcbaseapp.EtcMngt";
- oParam.method = "reqGetEtcCodeList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_etclst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
- }
- function grp_biz_btn_refresh_onclick(obj:Button, e:ClickEventInfo)
- {
- fGetEtcCodeList();
- grp_biz.grd_etclst.setCellProperty("body", 2, "edittype", "none");
- }
- /*====================================================================================================================
- @desc : 분류코드의 환자 정보를 조회한다.
- ====================================================================================================================*/
- function fGetEtcCodeList() {
- ds_main_etclst_item.clearData();
- ds_main_detlcodelst_item.clearData();
-
- var oParam = {};
- oParam.id = "TRASB02201";
- oParam.service = "infcbaseapp.EtcMngt";
- oParam.method = "reqGetEtcCodeList";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_etclst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
- }
- function grp_biz_btn_addcell_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_main_etclst_item.addRow();
- grp_biz.grd_etclst.setCellPos(2);
- grp_biz.grd_etclst.showEditor(true);
-
- grp_biz.grd_etclst.setCellProperty("body", 2, "edittype", "text");
- }
- function grp_biz_btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- var getRowno = lf_deleteSelectedRows(grp_biz.grd_etclst, true);
- }
- function ds_main_etclst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(grp_biz.grd_etclst.currentcol == grp_biz.grd_etclst.getBindCellIndex("body", "useyn")){
- if(ds_main_etclst_item.getColumn(ds_main_etclst_item.rowposition, "useyn") == "Y" || ds_main_etclst_item.getColumn(ds_main_etclst_item.rowposition, "useyn") == "1"){
- ds_main_etclst_item.setColumn(ds_main_etclst_item.rowposition, "useyn", "Y");
- }else{
- ds_main_etclst_item.setColumn(ds_main_etclst_item.rowposition, "useyn", "N");
- }
- }
- }
- function lf_deleteSelectedRows(grd, markonly) {
- var rowIdx;
- var bindDs = eval(grd.binddataset);
- var arrSelected = new Array();
- var sSelectType = grd.selecttype;
- if (sSelectType == "row" || sSelectType == "currow" || sSelectType == "cell") {
- arrSelected[0] = bindDs.rowposition;
- } else {
- for (var i = 0; i < bindDs.getRowCount(); i++) {
- //선택된 행인지 체크
- if (bindDs.getSelect(i) == true) {
- arrSelected.push(i);
- }
- }
- }
- if (arrSelected.length > 0) {
- // mark delete row 상태만 변경
- if (markonly == true) {
- for (var k = arrSelected.length - 1; k >= 0; k--) {
- bindDs.updatecontrol = false;
- bindDs.setRowType(arrSelected[k], "D");
- bindDs.updatecontrol = true;
- }
- }
- //row 삭제
- else {
- for (var k = arrSelected.length - 1; k >= 0; k--) {
- //bindDs.updatecontrol = false;
- bindDs.deleteRow(arrSelected[k]);
- //bindDs.updatecontrol = true;
- }
- }
- }
- }
- function grp_biz_button3_onclick(obj:Button, e:ClickEventInfo)
- {
- if (fExeEtcCodeList() == true) {
- fGetEtcCodeList();
- }
- grp_biz.grd_etclst.setCellProperty("body", 2, "edittype", "none");
- }
- function fExeEtcCodeList() {
- var updateData = grdf_getGridUpdateData(grp_biz.grd_etclst);
-
- if(utlf_isNull(updateData) && updateData.rowcount > 0) {
- sysf_messageBox("입력","E013"); // 그리드에 데이터가 업데이트 되지 않으면 "입력된 데이터가 없습니다."는 메시지 출력
- return ;
- }
-
- var rsv_cnt = ds_main_etclst_item.rowcount;
- for( var i = 0; i < rsv_cnt ; i++){
- if( utlf_isNull(ds_main_etclst_item.getColumn(i, "etccd"))) {
- sysf_messageBox("분류코드는","I003"); // "분류코드는 필수 입력입니다." 라는 메시지 출력
- return ;
- }
- }
-
- var ret = false;
-
- if ( sysf_messageBox("기본코드정보를","Q002") == 6 ) {
- ds_send_req_savedata.clearData();
- dsf_makeValue(ds_send_req, "clscd", "string", "00"); // 분류코드의 컬럼 clscd 를 '00'으로 셋팅해준다.
-
- //분류코드의 업데이트 된 내용을 savedata에 넣는다
- //grdf_setStatusColumn(updateData, "status");
- //ds_send_req_savedata.copyData(updateData);
-
-
- var sData = grdf_getGridUpdateData(grp_biz.grd_etclst);
- grdf_setStatusColumn(sData, "status");
-
- ds_send_req_savedata.clearData();
- ds_send_req_savedata.copyData(sData, true);
-
-
- var oParam = {};
- oParam.id = "TXASB02201";
- oParam.service = "infcbaseapp.EtcMngt";
- oParam.method = "reqExeEtcCodeList";
- oParam.inds = "saveclscd=ds_send_req req=ds_send_req_savedata";
- oParam.outds = "ds_hidden_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXASB02201";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXASB02201") > -1){
- ret = true;
- }
- }
- return ret;
- }
- function cf_TXASB02201(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function grp_biz_btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- ds_main_detlcodelst_item.addRow();
- grp_biz.grd_detlcodelist.setCellPos(2);
- grp_biz.grd_detlcodelist.showEditor(true);
-
- grp_biz.grd_detlcodelist.setCellProperty("body", 2, "edittype", "text");
-
- /*
- for(var i = 0; i < ds_main_detlcodelst_item.rowcount; i++){
- if( utlf_isNull(ds_main_detlcodelst_item.getColumn(i,"useyn")) ){
- ds_main_detlcodelst_item.setColumn(i,"useyn","N");
- }
-
- }
- */
-
- if( utlf_isNull(ds_main_detlcodelst_item.getColumn(ds_main_detlcodelst_item.rowposition,"useyn")) ){
- ds_main_detlcodelst_item.setColumn(ds_main_detlcodelst_item.rowposition,"useyn","N");
- }
- }
- function grp_biz_btn_seldeldetl_onclick(obj:Button, e:ClickEventInfo)
- {
- var getRowno = lf_deleteSelectedRows(grp_biz.grd_detlcodelist, true);
- }
- function grp_biz_btn_save2_onclick(obj:Button, e:ClickEventInfo)
- {
- if (fExeEtcDetlCodeList() == true) {
- fGetEtcDetlCodeList();
- }
- grp_biz.grd_detlcodelist.setCellProperty("body", 2, "edittype", "none");
- }
- function fGetEtcDetlCodeList(){
- var idx = ds_main_etclst_item.rowposition;
- if( idx < 0) return ; // grd_etclst.row가 1보다 작으면 실행되지 않는다.
-
- ds_main_detlcodelst_item.clearData();
- fSetEtcCodeList(grp_biz.grd_etclst); // 상세코드를 조회하는 함수를 호출한다.
- ds_send_req.setColumn(0, "clscd", ds_main_etclst_item.getColumn(ds_main_etclst_item.rowposition, "etccd")); // grd_etclst.nodeset/etccd 의 값을 req/clscd값으로 저장한다.
-
- var oParam = {};
- oParam.id = "TRASB02202";
- oParam.service = "infcbaseapp.EtcMngt";
- oParam.method = "reqGetEtcDetlCodeList";
- oParam.inds = "req=ds_send_req";
- oParam.outds = "ds_main_detlcodelst_item=item";
- oParam.async = false;
- tranf_submit(oParam);
- }
- function fSetEtcCodeList(vGrdObj){
- if( utlf_isNull(vGrdObj) ) return false;
- var etccd = ds_main_etclst_item.getColumn(ds_main_etclst_item.rowposition, "etccd");
- ds_send_req.setColumn(0, "etccd", etccd );
- }
- function fExeEtcDetlCodeList() {
- var updateData = grdf_getGridUpdateData(grp_biz.grd_detlcodelist);
-
- if(utlf_isNull(updateData) && updateData.rowcount > 0) {
- sysf_messageBox("입력","E013");
- return ;
- }
-
- var rsv_cnt = ds_main_detlcodelst_item.rowcount;
- for( var i = 0; i < rsv_cnt ; i++){
- if(utlf_isNull(ds_main_detlcodelst_item.getColumn(i, "etccd"))) {
- sysf_messageBox("분류코드는","I003");
- return ;
- }
- }
-
- var ret = false;
-
- if ( sysf_messageBox("기본코드정보를","Q002") == 6) {
- ds_send_req_savedata.clearData();
-
- //grdf_setStatusColumn(updateData, "status");
- //ds_send_req_savedata.copyData(updateData);
-
- var sData = grdf_getGridUpdateData(grp_biz.grd_detlcodelist);
- grdf_setStatusColumn(sData, "status");
-
- ds_send_req_savedata.clearData();
- ds_send_req_savedata.copyData(sData, true);
-
- var oParam = {};
- oParam.id = "TXASB02201";
- oParam.service = "infcbaseapp.EtcMngt";
- oParam.method = "reqExeEtcCodeList";
- oParam.inds = "saveclscd=ds_send_req req=ds_send_req_savedata";
- oParam.outds = "ds_hidden_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXASB02201";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXASB02201") > -1){
- ret = true;
- }
- }
- return ret;
- }
- function cf_TXASB02201(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function grp_biz_grd_etclst_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if (e.row >= 0 && e.col >= 0) {
- if (ds_main_etclst_item.rowcount == 0 ) {
- return ;
- }
- // 코드를 클릭하였을 경우에만 상세코드를 호출한다. 분류코드명을 클릭할 경우 분류코드를 수정할 수 있도록 한다.
- if(!utlf_isNull(ds_main_etclst_item.getColumn(ds_main_etclst_item.rowposition, "clscd"))) {
- if (grp_biz.grd_etclst.currentcol == 2) {
- fGetEtcDetlCodeList();
- } else {
- grp_biz.grd_etclst.showEditor(true);
- }
- }
- }
- grp_biz.grd_detlcodelist.setCellProperty("body", 2, "edittype", "none");
- }
- function grp_biz_grd_etclst_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if( e.keycode == 13 ) { // Cell 에서 Enter를 치게 되면 이벤트를 발생한다.
- if(grp_biz.grd_etclst.currentcol == 2 ) {
- grp_biz.grd_etclst.setCellPos(3);
- grp_biz.grd_etclst.showEditor(true);
- }
- else if(grp_biz.grd_etclst.currentcol == 3) {
- grp_biz_btn_addcell_onclick();
- }
- }
- }
- function grp_biz_grd_detlcodelist_onkeydown(obj:Grid, e:KeyEventInfo)
- {
- if( e.keycode == 13 ) { // Cell 에서 Enter를 치게 되면 이벤트를 발생한다.
- if(grp_biz.grd_detlcodelist.currentcol == 2 ) {
- grp_biz.grd_detlcodelist.setCellPos(3);
- grp_biz.grd_detlcodelist.showEditor(true);
- }
- else if(grp_biz.grd_detlcodelist.currentcol == 3) {
- grp_biz_btn_grdadd_onclick();
- }
- }
- }
- function grp_biz_grd_detlcodelist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if (e.row >= 0 && e.col >= 0) {
- if (ds_main_detlcodelst_item.rowcount == 0) {
- return ;
- }
- grp_biz.grd_detlcodelist.showEditor(true);
- }
- }
- function ds_main_detlcodelst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(grp_biz.grd_detlcodelist.currentcol == grp_biz.grd_detlcodelist.getBindCellIndex("body", "useyn")){
- if(ds_main_detlcodelst_item.getColumn(ds_main_detlcodelst_item.rowposition, "useyn") == "Y" || ds_main_detlcodelst_item.getColumn(ds_main_detlcodelst_item.rowposition, "useyn") == "1"){
- ds_main_detlcodelst_item.setColumn(ds_main_detlcodelst_item.rowposition, "useyn", "Y");
- }else{
- ds_main_detlcodelst_item.setColumn(ds_main_detlcodelst_item.rowposition, "useyn", "N");
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|