123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMRT01300" position="absolute 0 0 1196 800" titletext="과색인 관리" onload="SMMRT01300_onload">
- <Layouts>
- <Layout>
- <Shape id="line4" linetype="horizontal" class="line_2" position="absolute 542 187 1191 193"/>
- <Shape id="line6" linetype="horizontal" class="line_2" position="absolute 542 114 1191 120"/>
- <Shape id="line21" linetype="horizontal" class="line_2" position="absolute 542 138 1191 144"/>
- <Shape id="line22" linetype="horizontal" class="line_2" position="absolute 542 162 1191 168"/>
- <Div id="grp_sea" taborder="18" position="absolute 0 25 535 65" class="div_SA"/>
- <Static id="caption6" text="과색인 관리" class="tit_1" position="absolute 0 0 120 25"/>
- <Shape id="line1" class="line_10" position="absolute 0 89 535 95"/>
- <Shape id="line10" linetype="horizontal" class="line_3" position="absolute 0 769 535 775"/>
- <Static id="caption19" text="색인명" class="cell_1" position="absolute 0 94 535 117" style="padding:0 0 0 0;align:center middle;"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 450 34 456 56"/>
- <Static id="caption3" text="색인구분 :" class="search_name" position="absolute 10 38 96 55"/>
- <Static id="caption26" text="진료부서 :" class="search_name" position="absolute 216 38 302 55"/>
- <Static id="caption16" text="색인코드" class="cell_1" position="absolute 542 94 621 117" style="padding:0 0 0 4;"/>
- <Static id="caption17" text="상위색인코드" class="cell_1" position="absolute 542 142 621 165" style="padding:0 0 0 4;"/>
- <Static id="caption18" text="부서코드" class="cell_1" position="absolute 542 167 621 190" style="padding:0 0 0 4;"/>
- <Shape id="line24" linetype="horizontal" class="line_10" position="absolute 542 89 1192 95"/>
- <Grid id="trv_deptindx" taborder="1" useinputpanel="false" treeusecheckbox="false" position="absolute 0 118 535 799" autofit="col" binddataset="ds_main_deptindxlist_item" oncellclick="trv_deptindx_oncellclick" onlbuttondown="trv_deptindx_onlbuttondown" onlbuttonup="trv_deptindx_onlbuttonup">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="535"/>
- </Columns>
- <Rows>
- <Row size="20"/>
- </Rows>
- <Band id="body">
- <Cell displaytype="tree" edittype="tree" text="bind:deptindxnm" treestartlevel="1" treelevel="bind:depth"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Combo id="cmb_indxflag" taborder="2" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 100 36 190 55">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">0</Col>
- <Col id="datacolumn">진단</Col>
- </Row>
- <Row>
- <Col id="codecolumn">9</Col>
- <Col id="datacolumn">수술</Col>
- </Row>
- <Row>
- <Col id="codecolumn">2</Col>
- <Col id="datacolumn">주호소</Col>
- </Row>
- </Rows>
- </Dataset>
- </Combo>
- <Edit id="ipt_srcheddeptnm" taborder="3" class="input_essential" position="absolute 305 36 405 55" onkeydown="ipt_srcheddeptnm_onkeydown"/>
- <Button id="btn_srchedindx" taborder="4" text="조회" class="btn1" position="absolute 466 34 522 56" onclick="btn_srchedindx_onclick"/>
- <Button id="btn_addindx" taborder="5" text="색인추가" class="btn2" position="absolute 471 67 535 89" onclick="btn_addindx_onclick"/>
- <Static id="caption1" text="색인명" class="cell_1" position="absolute 542 118 621 141" style="padding:0 0 0 4;"/>
- <Edit id="ipt_deptnm" taborder="6" class="input_essential" enable="false" position="absolute 624 168 724 187"/>
- <Edit id="ipt_deptupindxcd" taborder="7" class="input_essential" enable="false" position="absolute 624 143 724 162"/>
- <Edit id="ipt_deptindxcd" taborder="8" class="input_essential" enable="false" position="absolute 624 95 724 114" onkeydown="ipt_deptindxcd_onkeydown"/>
- <Edit id="ipt_deptindxnm" taborder="9" class="input_essential" position="absolute 624 119 1191 138"/>
- <Edit id="ipt_deptupindxnm" taborder="10" class="input_default" enable="false" position="absolute 747 143 1190 162"/>
- <Button id="btn_clear" taborder="11" text="CLEAR" class="btn2" position="absolute 1038 67 1102 89" onclick="btn_clear_onclick"/>
- <Static id="cap_indxinfo" text="진단 색인 정보" class="tit_2" position="absolute 542 73 671 91"/>
- <Button id="btn_upindxcd" taborder="12" class="icon_search" position="absolute 727 145 743 161" onclick="btn_upindxcd_onclick"/>
- <Button id="btn_deptsrch" taborder="13" class="icon_search" position="absolute 410 38 426 52" onclick="btn_deptsrch_onclick"/>
- <CheckBox id="cmb_highestlvel" taborder="14" position="absolute 726 95 826 115" text="최상위" truevalue="Y" onclick="cmb_highestlvel_onclick"/>
- <Button id="button90" taborder="15" text="삭제" class="btn5" position="absolute 1105 67 1147 89" onclick="button90_onclick"/>
- <Button id="button1" taborder="16" text="저장" class="btn5" position="absolute 1150 67 1192 89" onclick="button1_onclick"/>
- <Edit id="input1" taborder="17" class="input_default" enable="false" visible="false" position="absolute 737 168 815 187"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_hidden_condition" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="indxflag" type="STRING" size="256"/>
- <Column id="selectedindxcd" type="STRING" size="256"/>
- <Column id="getdata" type="STRING" size="256"/>
- <Column id="srcheddeptnm" type="STRING" size="256"/>
- <Column id="srcheddeptcd" type="STRING" size="256"/>
- <Column id="highestlvel" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="indxflag">0</Col>
- <Col id="selectedindxcd"/>
- <Col id="getdata"/>
- <Col id="srcheddeptnm"/>
- <Col id="srcheddeptcd"/>
- <Col id="highestlvel"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="today" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_indxinfo_deptindx" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="deptindxcd" type="STRING" size="256"/>
- <Column id="deptindxflag" type="STRING" size="256"/>
- <Column id="deptindxnm" type="STRING" size="256"/>
- <Column id="deptupindxcd" type="STRING" size="256"/>
- <Column id="deptupindxnm" type="STRING" size="256"/>
- <Column id="deptnm" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="status" type="STRING" size="256"/>
- <Column id="srchdeptindxcd" type="STRING" size="256"/>
- <Column id="deptseqno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="deptindxcd"/>
- <Col id="deptindxflag"/>
- <Col id="deptindxnm"/>
- <Col id="deptupindxcd"/>
- <Col id="deptupindxnm"/>
- <Col id="deptnm"/>
- <Col id="deptcd"/>
- <Col id="status"/>
- <Col id="srchdeptindxcd"/>
- <Col id="deptseqno"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_deptindxlist_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="depth" type="STRING" size="256"/>
- <Column id="deptindxcd" type="STRING" size="256"/>
- <Column id="deptupindxcd" type="STRING" size="256"/>
- <Column id="deptindxnm" type="STRING" size="256"/>
- <Column id="deptseqno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="depth"/>
- <Col id="deptindxcd"/>
- <Col id="deptupindxcd"/>
- <Col id="deptindxnm"/>
- <Col id="deptseqno"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="send" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="send"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden_condition_getdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="cmb_indxflag" propid="value" datasetid="ds_hidden_condition" columnid="indxflag"/>
- <BindItem id="item1" compid="ipt_srcheddeptnm" propid="value" datasetid="ds_hidden_condition" columnid="srcheddeptnm"/>
- <BindItem id="item2" compid="ipt_deptnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptnm"/>
- <BindItem id="item3" compid="ipt_deptupindxcd" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptupindxcd"/>
- <BindItem id="item4" compid="ipt_deptindxcd" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptindxcd"/>
- <BindItem id="item5" compid="ipt_deptindxnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptindxnm"/>
- <BindItem id="item6" compid="ipt_deptupindxnm" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptupindxnm"/>
- <BindItem id="item7" compid="cmb_highestlvel" propid="value" datasetid="ds_hidden_condition" columnid="highestlvel"/>
- <BindItem id="item8" compid="input1" propid="value" datasetid="ds_main_indxinfo_deptindx" columnid="deptseqno"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-12-04
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //include "emr_termmngtxp::SMMRT01300.xjs";
- //include "emr_termmngtxp::MRTCommon.xjs";
- //include "com_departmentcodexp::ZSD001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- var startRow = -1;
- var endRow = -1;
- var xCondPath = "ds_hidden_condition"; // 조회조건
- var xIndxInfoPath = "ds_main_indxinfo_deptindx"; // 색인정보
- var xIndxInfoBKPath = "ds_hidden_main_indxinfo_deptindx"; // 색인정보
- var xDeptIndxPath = "ds_main_deptindxlist_item"; // 과색인정보
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 조회
- ****************************************************************************************/
- function fn_TRMRT01301() {
- var oParam = {};
- oParam.id = "TRMRT01301";
- oParam.service = "termmngtapp.DeptSetMngt";
- oParam.method = "reqGetDeptIndxList";
- oParam.inds = "reqCond=ds_send";
- oParam.outds = "ds_main_deptindxlist_item=item";
- oParam.async = false;
- oParam.callback = "cf_TRMRT01301";
- tranf_submit(oParam);
- }
- function cf_TRMRT01301(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 과색인 조회
- ****************************************************************************************/
- function fSrchDeptIndxList(){
- var sIndxFlag = this.objects[xCondPath].getColumn(0, "indxflag");
- if(sIndxFlag == "0"){ // 진단
- cap_indxinfo.text = "진단 색인 정보";
- }else if(sIndxFlag == "9"){ // 수술
- cap_indxinfo.text = "수술 색인 정보";
- }else if(sIndxFlag == "2"){ // 주호소
- cap_indxinfo.text = "주호소 색인 정보";
- }
- if(utlf_isNull(this.objects[xCondPath].getColumn(0, "srcheddeptcd"))) {
- return;
- }
-
- this.objects[xDeptIndxPath].clearData();
- ds_send.clearData();
- dsf_makeValue( ds_send, "indxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
- dsf_makeValue( ds_send, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
-
- fn_TRMRT01301();
- if(arErrorCode.pop("TRMRT01301") > -1) {
- this.objects[xCondPath].setColumn( 0, "selectedindxcd", "");
- }
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 과색인 상세 조회
- ****************************************************************************************/
- function fSrchIndxInfo(){
- ipt_deptindxcd.enable = false;
- ds_send.clearData();
- dsf_makeValue( ds_send, "deptindxcd", "string", this.objects[xCondPath].getColumn(0, "selectedindxcd"));
- dsf_makeValue( ds_send, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- dsf_makeValue( ds_send, "indxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
- var oParam = {};
- oParam.id = "TRMRT01302";
- oParam.service = "termmngtapp.DeptSetMngt";
- oParam.method = "reqGetDeptIndxInfo";
- oParam.inds = "reqCond=ds_send";
- oParam.outds = "ds_main_indxinfo_deptindx=deptindx";
- oParam.async = false;
- oParam.callback = "cf_TRMRT01302";
- tranf_submit(oParam);
- if(arErrorCode.pop("TRMRT01301") > -1) {
- dsf_makeValue(this.objects[xCondPath], "highestlvel", "string", "");
- ds_hidden_main_indxinfo_deptindx.copyData(ds_main_indxinfo_deptindx);
- dsf_makeValue(this.objects[xIndxInfoPath], "deptnm", "string", this.objects[xCondPath].getColumn(0, "srcheddeptnm"));
- }
- }
- function cf_TRMRT01302(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- ds_main_indxinfo_deptindx.updateColID("depthngnm","deptnm");
- dsf_makeValue(ds_main_indxinfo_deptindx, "srchdeptindxcd", "string", ds_main_indxinfo_deptindx.getColumn(0, "deptindxcd"));
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 과색인 조회
- ****************************************************************************************/
- function fInit(){
- dsf_makeValue(this.objects[xIndxInfoPath], "status", "string", "I");
- var sIndxflag = this.objects[xCondPath+"_getdata"].getColumn(0, "indxflag");
- if(!utlf_isNull(sIndxflag)) {
- this.objects[xCondPath].setColumn(0, "indxflag", sIndxflag);
- this.objects[xCondPath].setColumn(0, "srcheddeptnm", this.objects[xCondPath+"_getdata"].getColumn(0, "deptnm"));
- this.objects[xCondPath].setColumn(0, "srcheddeptcd", this.objects[xCondPath+"_getdata"].getColumn(0, "deptcd"));
-
- fSrchDeptIndxList();
-
- opener.frmf_setParameter("saveyn","");
- }
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 색인 추가
- ****************************************************************************************/
- function fAddIndx(){
- var sIndxFlag = this.objects[xCondPath].getColumn(0, "indxflag");
- var sDeptCd = this.objects[xCondPath].getColumn(0, "srcheddeptcd");
- var sUpIndxCd = this.objects[xCondPath].getColumn(0, "selectedindxcd");
- if(trv_deptindx.currentrow < 0 && this.objects[xDeptIndxPath].rowcount > 0) {
- sysf_messageBox("색인을 선택하지", "E007");
- }
- if(utlf_isNull(sIndxFlag)){
- sysf_messageBox("색인구분을","C002");
- return;
- }
- if(utlf_isNull(sDeptCd)){
- sysf_messageBox("부서를","C002");
- return;
- }
- fIndxClear();
-
- this.objects[xCondPath].setColumn( 0, "highestlvel", "");
- this.objects[xIndxInfoPath].setColumn(0, "deptupindxcd", sUpIndxCd); // 상위색인코드
- dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxnm", "string", this.objects[xDeptIndxPath].lookup("deptindxcd", sUpIndxCd, "deptindxnm")); // 상위색인명
- if(this.objects[xDeptIndxPath].rowcount == 0){
- dsf_makeValue(this.objects[xIndxInfoPath], "deptseqno", "string", "0");
- }
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 색인 정보 Clear
- ****************************************************************************************/
- function fIndxClear(){
- ipt_deptindxcd.enable = true;
- var iIndx = trv_deptindx.currentrow;
- ds_hidden_condition.setColumn( 0, "highestlvel", "Y");
- dsf_makeValue(this.objects[xIndxInfoPath], "deptindxcd", "string", "");
- dsf_makeValue(this.objects[xIndxInfoPath], "deptindxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
- dsf_makeValue(this.objects[xIndxInfoPath], "deptindxnm", "string", "");
- dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxcd", "string", "-");
- dsf_makeValue(this.objects[xIndxInfoPath], "deptupindxnm", "string", "");
- dsf_makeValue(this.objects[xIndxInfoPath], "deptnm", "string", this.objects[xCondPath].getColumn(0, "srcheddeptnm"));
- dsf_makeValue(this.objects[xIndxInfoPath], "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- dsf_makeValue(this.objects[xIndxInfoPath], "status", "string", "I"); // 상태
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 색인 정보 저장
- ****************************************************************************************/
- function fSaveIndxInfo(){
- var sStatus = this.objects[xIndxInfoPath].getColumn(0, "status");
- var sIndxCd = this.objects[xIndxInfoPath].getColumn(0, "deptindxcd");
- var rtn = 0;
- var sNodeInfo ="deptindxcd▦deptindxnm▩색인코드▦색인명";
- var csvIndxInfoPath = dsf_getDsCSV(this.objects[xIndxInfoPath]);
- var csvIndxInfoBKPath = dsf_getDsCSV(this.objects[xIndxInfoBKPath]);
-
- if(fChkValueEmpty(xIndxInfoPath,sNodeInfo)){
- return;
- }
- if(!utlf_isNull(this.objects[xDeptIndxPath].lookup("deptindxcd", sIndxCd, "deptindxcd"))){
- if(sStatus == "I" || (sStatus == "U" && sIndxCd != this.objects[xIndxInfoPath].getColumn(0, "srchdeptindxcd"))){
- sysf_messageBox("이미 등록된 색인코드","E008");
- return;
- }
- }
- if(sStatus == "U"){
- if( csvIndxInfoPath == csvIndxInfoBKPath) {
- sysf_messageBox("변경된 데이터가","I004");
- return;
- }
- }
- if(sStatus != "D") {
- rtn = sysf_messageBox("","Q002");
- }else{
- rtn = sysf_messageBox("","Q001");
- }
- if(rtn != 6){
- if(sStatus == "D"){
- if( csvIndxInfoPath == csvIndxInfoBKPath ) {
- this.objects[xIndxInfoPath].getColumn(0, "status", "-");
- }else{
- this.objects[xIndxInfoPath].setColumn( 0, "status", "U");
- }
- }
- return;
- }
- ds_send.clearData();
- dsf_makeValue( ds_send, "srchedindxflag", "string", this.objects[xCondPath].getColumn(0, "indxflag"));
- dsf_makeValue( ds_send, "srcheddeptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- dsf_createDs("ds_send_deptindxinfo");
- ds_send_deptindxinfo.copyData(this.objects[xIndxInfoPath]);
- var oParam = {};
- oParam.id = "TXMRT01301";
- oParam.service = "termmngtapp.DeptSetMngt";
- oParam.method = "reqExeDeptIndxInfo";
- oParam.inds = "reqCond=ds_send deptindxinfo=ds_send_deptindxinfo";
- oParam.outds = "ds_main_deptindxlist_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXMRT01301";
- tranf_submit(oParam);
- if(arErrorCode.pop("TXMRT01301") > -1) {
- fIndxClear();
-
- if(!utlf_isNull(this.objects[xCondPath+"_getdata"].getColumn(0, "indxflag")) &&
- this.objects[xCondPath+"_getdata"].getColumn(0, "deptcd") == this.objects[xCondPath].getColumn(0, "srcheddeptcd")){
- opener.frmf_setParameter("saveyn","Y");
- }
- //이윤주 수정(20130312)
- fSrchDeptIndxList();
- }
- }
- function cf_TXMRT01301(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 빈 공백 check
- ****************************************************************************************/
- function fChkValueEmpty(pRef, pNodeInfo){
- var sNodeInfo = pNodeInfo.split("▩");
- var sNode = sNodeInfo[0].split("▦");
- var sNodeNm = sNodeInfo[1].split("▦");
- for(var i=0; i<sNode.length; i++){
- if(utlf_isNull(this.objects[pRef].getColumn(0, sNode[i]))) {
- sysf_messageBox(sNodeNm[i]+"는 ","I003");
- return true;
- }
- }
- return false;
- }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : Drag & Drop
- ****************************************************************************************/
- function fDragDropIndx(){
- if(utlf_isNull(ds_hidden_condition.getColumn(0, "selectedindxcd"))){
- return;
- }
-
- var treePath = ds_main_deptindxlist_item;
- var srcValue = treePath.getColumn(startRow, "indxcd");
- if(treePath.getColumn(startRow, "deptindxcd") != treePath.getColumn(endRow, "deptindxcd")) {
- var rtn = sysf_messageBox("색인 순서 변경을", "Q004");
- dsf_createDs("ds_send_reqdata_dragdrop");
- if(treePath.getColumn(startRow, "deptupindxcd") == treePath.getColumn(endRow, "deptupindxcd") && (rtn == 6)) {
- //같은 level에서만 순서변경이 가능하다
- //indxseqno 값을 변경
- //if(parseInt(model.getValue(treePath + "[indxcd='"+srcValue+"']_indxseqno")) < parseInt(model.getValue(treePath + "[indxcd='"+trv_deptindx.value+"']_indxseqno"))){
- if(treePath.getColumn(startRow, "deptseqno") > treePath.getColumn(endRow, "deptseqno")) {
- //alert("위로");
- dsf_makeValue( ds_send_reqdata_dragdrop, "status", "string", "PLUS");
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptindxcd", "string", treePath.getColumn(startRow, "deptindxcd"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptseqno", "string", treePath.getColumn(endRow, "deptseqno"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "predeptseqno", "string", treePath.getColumn(startRow, "deptseqno"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "indxflag", "string", ds_hidden_condition.getColumn(0, "indxflag"));
- } else {
- //alert("아래로");
- dsf_makeValue( ds_send_reqdata_dragdrop, "status", "string", "MINUS");
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptindxcd", "string", treePath.getColumn(startRow, "deptindxcd"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptseqno", "string", treePath.getColumn(endRow, "deptseqno"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "predeptseqno", "string", treePath.getColumn(startRow, "deptseqno"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "deptcd", "string", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- dsf_makeValue( ds_send_reqdata_dragdrop, "indxflag", "string", ds_hidden_condition.getColumn(0, "indxflag"));
- }
-
- fn_changeRow();
-
- ds_main_deptindxlist_item.clearData();
- var oParam = {};
- oParam.id = "TXMRT01302";
- oParam.service = "termmngtapp.DeptSetMngt";
- oParam.method = "reqExeDeptIndxSeqNo";
- oParam.inds = "req=ds_send_reqdata_dragdrop";
- oParam.outds = "ds_main_deptindxlist_item=item";
- oParam.async = false;
- oParam.callback = "cf_TXMRT01302";
- tranf_submit(oParam);
- if(arErrorCode.pop("TXMRT01302") > -1){
- sysf_messageBox("색인변경이", "I001");
- var cRow = ds_main_deptindxlist_item.findRow("indxcd",srcValue);
- grdf_expandTree(trv_deptindx, cRow);
- }
- } else if(rtn == 6){
- sysf_messageBox("다른 Level로 색인변경을", "E001");
- }
- }
- fIndxClear();
- }
- function cf_TXMRT01302(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function fn_changeRow() {
- var cDepth = ds_main_deptindxlist_item.getColumn(startRow, "depth");
- var nextRow = ds_main_deptindxlist_item.findRow("depth", cDepth, startRow+1);
- var nextRow2 = -1;
- if(nextRow != startRow+1) nextRow2 = ds_main_deptindxlist_item.findRow("depth", cDepth, endRow+1);
-
- dsf_createDs("ds_temp_copydata");
- dsf_copyColInfo(ds_temp_copydata, ds_main_deptindxlist_item);
- for(var i = nextRow - 1 ; i >= startRow ; i--) {
- ds_temp_copydata.copyRow(ds_temp_copydata.addRow(), ds_main_deptindxlist_item, i);
- ds_main_deptindxlist_item.deleteRow(i);
- }
-
- var insertRow = -1;
- if(ds_send_reqdata_dragdrop.getColumn(0, "state") == "MINUS") {
- if(ds_temp_copydata.rowcount > 1) {
- //뎁스 그룹 전체 이동시
- insertRow = nextRow2 - ds_temp_copydata.rowcount-1;
- } else {
- //최하위 뎁스 한건만 이동시키는 경우
- insertRow = endRow - ds_temp_copydata.rowcount+1;
- }
- } else {
- insertRow = endRow;
- }
- for(var j = 0 ; j < ds_temp_copydata.rowcount ; j++) {
- var nRow = ds_main_deptindxlist_item.insertRow(insertRow);
- ds_main_deptindxlist_item.copyRow(nRow, ds_temp_copydata, j);
- }
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMMRT01300_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- //grdf_initGrid(grd_XXX);
- //grdf_setGridSort(grd_XXX);
- //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
-
- try{
- ds_hidden_condition_getdata.copyData(arg_ds_hidden_condition_getdata);
- }catch(e){}
- fInit();
- }
- /****************************************************************************************
- * Components : Grid
- * Description : 색인명 선택
- ****************************************************************************************/
- function trv_deptindx_oncellclick(obj:Grid, e:GridClickEventInfo) {
- //해당 정보 조회_등록화면에 뿌려준다.
- this.objects[xCondPath].setColumn(0, "selectedindxcd", ds_main_deptindxlist_item.getColumn(e.row, "deptindxcd"));
- fSrchIndxInfo();
- }
- /****************************************************************************************
- * Components : Edit
- * Description : 진료부서 조회 팝업
- ****************************************************************************************/
- function ipt_srcheddeptnm_onkeyup(obj:Edit, e:KeyEventInfo) {
- if(e.keycode == 13) {
- obj.updateToDataset();
- btn_deptsrch.click();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function btn_srchedindx_onclick(obj:Button, e:ClickEventInfo) {
- fSrchDeptIndxList();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 색인추가
- ****************************************************************************************/
- function btn_addindx_onclick(obj:Button, e:ClickEventInfo) {
- fAddIndx();
- }
- /****************************************************************************************
- * Components : Edit
- * Description : 키 입력시 색인추가버튼 활성화
- ****************************************************************************************/
- function ipt_deptindxcd_onkeydown(obj:Edit, e:KeyEventInfo) {
- btn_upindxcd.enable = true;
- }
- /****************************************************************************************
- * Components : Button
- * Description : clear
- ****************************************************************************************/
- function btn_clear_onclick(obj:Button, e:ClickEventInfo) {
- fIndxClear();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 상위색인코드 검색팝업
- ****************************************************************************************/
- function btn_upindxcd_onclick(obj:Button, e:ClickEventInfo) {
- frmf_setParameter("indxflag", this.objects[xCondPath].getColumn(0, "indxflag"));
- frmf_setParameter("deptcd", this.objects[xCondPath].getColumn(0, "srcheddeptcd"));
- frmf_modal("SPMRT01100", "SPMRT01100", "", "", 1, 100, 100, "", "", "", "", "", "M");
-
- var sIndxCd = frmf_getParameter("indxcd");
- if(!utlf_isNull(sIndxCd)){
- this.objects[xIndxInfoPath].setColumn(0, "deptupindxcd", sIndxCd);
- this.objects[xIndxInfoPath].setColumn(0, "deptupindxnm", frmf_getParameter("indxnm"));
- }
- frmf_setParameter("indxcd", "");
- frmf_setParameter("indxnm", "");
- }
- /****************************************************************************************
- * Components : Button
- * Description : 진료부서 조회 팝업
- ****************************************************************************************/
- function btn_deptsrch_onclick(obj:Button, e:ClickEventInfo) {
- // zbcfOpenInstDeptCodeList("deptnm", this.objects[xCondPath].getColumn(0, "srcheddeptnm"), xCondPath].getColumn(0, "srcheddeptcd", xCondPath].getColumn(0, "srcheddeptnm", "ordduseryn", "D");
- var rtnObj = appf_openInstDeptCodeList("deptnm", this.objects[xCondPath].getColumn(0,"srcheddeptnm"), "ordduseryn", "D", "deptcd depthngnm");
- dsf_makeValue(this.objects[xCondPath],"srcheddeptcd","string",rtnObj.deptcd);
- dsf_makeValue(this.objects[xCondPath],"srcheddeptnm","string",rtnObj.depthngnm);
-
- fSrchDeptIndxList();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 삭제
- ****************************************************************************************/
- function button90_onclick(obj:Button, e:ClickEventInfo) {
- if(this.objects[xIndxInfoPath].getColumn(0, "status") != "I"){
- this.objects[xIndxInfoPath].setColumn( 0, "status", "D");
- fSaveIndxInfo();
- }else{
- fIndxClear();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 저장
- ****************************************************************************************/
- function button1_onclick(obj:Button, e:ClickEventInfo) {
- fSaveIndxInfo();
- }
- /****************************************************************************************
- * Components : CheckBox
- * Description : 값변경시
- ****************************************************************************************/
- function cmb_highestlvel_onclick(obj:CheckBox, e:ClickEventInfo)
- {
- if(obj.value == false) ds_hidden_condition.setColumn(0,"highestlvel","");
- fIndxClear();
- }
- function trv_deptindx_onlbuttondown(obj:Grid, e:GridMouseEventInfo)
- {
- startRow = e.row;
- }
- function trv_deptindx_onlbuttonup(obj:Grid, e:GridMouseEventInfo)
- {
- endRow = e.row;
- if(startRow > -1 && endRow > -1 && startRow != endRow) fDragDropIndx();
- }
- function ipt_srcheddeptnm_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13) {
- obj.updateToDataset();
- btn_deptsrch.click();
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|