123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPSTP00800" position="absolute 0 0 1200 766" titletext="Untitle" onload="SPSTP00800_onload">
- <Layouts>
- <Layout>
- <Static id="caption1" text="수익예산등록" class="tit_2" position="absolute 0 50 105 66" anchor="left top"/>
- <Button id="button1" taborder="14" text="행추가" class="btn2" position="absolute 1087 47 1140 66" onclick="button1_onclick" anchor="top right"/>
- <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 66 1195 72" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
- <Grid id="grd_earnpre" taborder="15" binddataset="ds_grid_preearnlist" useinputpanel="false" position="absolute 0 71 1195 736" selecttype="multirow" autoenter="select" ontextchanged="grd_earnpre_ontextchanged" ondropdown="grd_earnpre_ondropdown" oncloseup="grd_earnpre_oncloseup" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25"/>
- <Column size="0"/>
- <Column size="60"/>
- <Column size="60"/>
- <Column size="120"/>
- <Column size="140"/>
- <Column size="0"/>
- <Column size="120"/>
- <Column size="120"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="status"/>
- <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="외래목표"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:status"/>
- <Cell col="2" displaytype="date" style="align:center middle;" text="bind:bugtym" mask="yyyy-MM" calendardisplaynulltype="none"/>
- <Cell col="3" displaytype="combo" edittype="combo" style="align:center middle;" text="bind:grupgb" combodataset="ds_static_grupgb" combocodecol="value" combodatacol="label"/>
- <Cell col="4" displaytype="combo" edittype="expr:(isDisabled == 'Y') ? 'none' : 'combo'" style="padding:0 0 0 3;" text="bind:centcd" combodataset="ds_init_centlist" combocodecol="cdid" combodatacol="cdnm" enable="true"/>
- <Cell col="5" displaytype="combo" edittype="expr:(isDisabled == 'Y') ? 'none' : 'combo'" style="padding:0 0 0 3;" text="bind:orddeptcd" combodataset="ds_init_orddeptlist" combocodecol="cdid" combodatacol="cdnm"/>
- <Cell col="6" displaytype="text" edittype="text" text="bind:dispseq" enable="true"/>
- <Cell col="7" displaytype="number" edittype="normal" editfilter="digit" style="align:right middle;" text="bind:inpgoal" mask="9,999" enable="true"/>
- <Cell col="8" displaytype="number" edittype="normal" editfilter="digit" style="align:right middle;" text="bind:outgoal" mask="9,999" enable="true"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="button2" taborder="16" text="행삭제" class="btn2" position="absolute 1142 47 1195 66" onclick="button2_onclick" anchor="top right"/>
- <Button id="button5" taborder="17" text="저장" class="btn4" position="absolute 1139 742 1195 764" onclick="button5_onclick" anchor="right bottom"/>
- <Button id="button3" taborder="18" text="엑셀저장" class="btn7" position="absolute 1011 47 1085 66" onclick="button3_onclick" anchor="top right"/>
- <Div position="absolute 380 150 682 350" id="group2" visible="false" style="border:1 solid #808080ff ;">
- <Layouts>
- <Layout>
- <Static text="진료과 조회" position="absolute 0 3 91 19" id="caption2" class="tit_2"/>
- <Shape position="absolute 0 21 300 27" linetype="horizontal" id="line4" class="line_1" style="strokepen:3 solid #33bbbbff;"/>
- <Button position="absolute 215 175 257 194" id="btn_cnfm" class="btn2" text="확인" onclick="group2_btn_cnfm_onclick"/>
- <Button position="absolute 258 175 300 194" id="button4" class="btn2" text="취소" onclick="group2_button4_onclick"/>
- <Grid position="absolute 0 25 300 173" id="grd_orddept" binddataset="ds_tmp_preearnlist" oncellclick="group2_grd_orddept_oncellclick">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="120"/>
- <Column size="140"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="센터"/>
- <Cell col="2" text="진료과"/>
- </Band>
- <Band id="body">
- <Cell displaytype="checkbox" edittype="checkbox" text="bind:flag" expr="expr:(flag == 'true' || flag == '1') ? '1' : '0'"/>
- <Cell col="1" displaytype="combo" text="bind:centcd" combodataset="ds_init_centlist" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- <Cell col="2" displaytype="combo" text="bind:orddeptcd" combodataset="ds_init_orddeptlist" combocodecol="cdid" combodatacol="cdnm" enable="false"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- </Div>
- <Div id="grp1" taborder="12" class="div_SA2" position="absolute 0 5 330 40" anchor="left top">
- <Layouts>
- <Layout>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 228 7 234 29" anchor="left top"/>
- <Static id="caption21" text="조회년월(from) :" class="search_name" position="absolute 16 8 127 27" anchor="left top"/>
- <Calendar id="ipt_srchdd" taborder="0" class="input_search" position="absolute 137 8 207 27" mask="yyyy-mm" anchor="left top" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" autoskip="true" autoselect="true"/>
- <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 255 7 311 29" anchor="left top" onclick="grp1_btn_search_onclick"/>
- </Layout>
- </Layouts>
- </Div>
- <Div id="grp2" taborder="13" class="div_SA2" position="absolute 358 5 803 40" anchor="left top">
- <Layouts>
- <Layout width="445" height="35">
- <Static id="caption3" text="복사년월(to) :" class="search_name" position="absolute 21 8 120 27" anchor="left top"/>
- <Button id="button6" taborder="1" text="월복사(from-to)" class="btn5" position="absolute 314 8 422 27" onclick="grp2_button6_onclick" anchor="left top"/>
- <Button id="button7" taborder="2" text="조회" class="btn1" position="absolute 240 7 296 29" onclick="grp2_button7_onclick" anchor="left top"/>
- <Shape id="line2" linetype="vertical" class="line_4" position="absolute 216 7 222 29" anchor="left top"/>
- <Calendar id="ipt_fromdd" taborder="0" class="input_search" position="absolute 128 8 198 27" mask="yyyy-mm" dateformat="yyyy-MM" editformat="yyyy-MM" anchor="left top"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="bugtym" type="STRING" size="256"/>
- <Column id="copybugtym" type="STRING" size="256"/>
- <Column id="centcd" type="STRING" size="256"/>
- <Column id="selcentcd" type="STRING" size="256"/>
- <Column id="srchflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="bugtym"/>
- <Col id="copybugtym"/>
- <Col id="centcd"/>
- <Col id="selcentcd"/>
- <Col id="srchflag"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_orddeptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cdid" type="STRING" size="256" sumtext=""/>
- <Column id="cdnm" type="STRING" size="256" sumtext=""/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grid_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_grid_preearnlist_oncolumnchanged">
- <ColumnInfo>
- <Column id="status" type="STRING" size="255"/>
- <Column id="instcd" type="STRING" size="255"/>
- <Column id="bugtym" type="STRING" size="255"/>
- <Column id="centcd" type="STRING" size="255"/>
- <Column id="orddeptcd" type="STRING" size="255"/>
- <Column id="grupgb" type="STRING" size="255"/>
- <Column id="dispseq" type="BIGDECIMAL" size="255"/>
- <Column id="inpgoal" type="BIGDECIMAL" size="255"/>
- <Column id="outgoal" type="BIGDECIMAL" size="255"/>
- <Column id="fstrgstrid" type="STRING" size="255"/>
- <Column id="fstrgstdt" type="STRING" size="255"/>
- <Column id="lastupdtrid" type="STRING" size="255"/>
- <Column id="lastupdtdt" type="STRING" size="255"/>
- <Column id="bugtflag" type="STRING" size="255"/>
- <Column id="seqno" type="BIGDECIMAL" size="255"/>
- <Column id="statflag" type="STRING" size="255"/>
- <Column id="inptotamt" type="BIGDECIMAL" size="255"/>
- <Column id="outtotamt" type="BIGDECIMAL" size="255"/>
- <Column id="isDisabled" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_static_grupgb" 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">10</Col>
- </Row>
- <Row>
- <Col id="label">외과계</Col>
- <Col id="value">20</Col>
- </Row>
- <Row>
- <Col id="label">기타</Col>
- <Col id="value">30</Col>
- </Row>
- <Row>
- <Col id="label">치과</Col>
- <Col id="value">40</Col>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_init_centlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_buffer_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="status" type="STRING" size="255"/>
- <Column id="instcd" type="STRING" size="255"/>
- <Column id="bugtym" type="STRING" size="255"/>
- <Column id="centcd" type="STRING" size="255"/>
- <Column id="orddeptcd" type="STRING" size="255"/>
- <Column id="grupgb" type="STRING" size="255"/>
- <Column id="dispseq" type="BIGDECIMAL" size="255"/>
- <Column id="inpgoal" type="BIGDECIMAL" size="255"/>
- <Column id="outgoal" type="BIGDECIMAL" size="255"/>
- <Column id="fstrgstrid" type="STRING" size="255"/>
- <Column id="fstrgstdt" type="STRING" size="255"/>
- <Column id="lastupdtrid" type="STRING" size="255"/>
- <Column id="lastupdtdt" type="STRING" size="255"/>
- <Column id="bugtflag" type="STRING" size="255"/>
- <Column id="seqno" type="BIGDECIMAL" size="255"/>
- <Column id="statflag" type="STRING" size="255"/>
- <Column id="inptotamt" type="BIGDECIMAL" size="255"/>
- <Column id="outtotamt" type="BIGDECIMAL" size="255"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_tmp_preearnlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="centcd" type="STRING" size="256"/>
- <Column id="orddeptcd" type="STRING" size="256"/>
- <Column id="flag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="centcd"/>
- <Col id="orddeptcd"/>
- <Col id="flag"/>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp2.ipt_fromdd" propid="value" datasetid="ds_cond" columnid="copybugtym"/>
- <BindItem id="item1" compid="grp1.ipt_srchdd" propid="value" datasetid="ds_cond" columnid="bugtym"/>
- </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
- //---------------------------------------------------------------------------------------
- /**
- * [fInit description]
- * @return {[type]} [description]
- */
- function fInit() {
- ds_cond.setColumn(0, "bugtym", utlf_getCurrentDate().substr(0, 6));
- if (sysf_getUserInfo("dutplceinstcd") == "031") {
- dsf_createDsRow('ds_TRSTP01701', [{ col: 'bugtym', type: 'string', size: 256, val: ds_cond.getColumn(0, 'bugtym') }], false);
- var oParam = {};
- oParam.id = "TRSTP01701";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreEarnOrddeptList";
- oParam.inds = "req=ds_TRSTP01701";
- oParam.outds = "ds_init_orddeptlist=orddeptlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TRSTP01701") > -1) {
- group2.visible = false;
- }
- }
- else if (getUserInfo("dutplceinstcd") == "032") {
- dsf_createDsRow('ds_TRSTP01703', [
- { col: 'bugtym', type: 'string', size: 256, val: ds_cond.getColumn(0, 'bugtym') },
- { col: 'srchflag', type: 'string', size: 256, val: ds_cond.getColumn(0, 'srchflag') }
- ], false);
- var oParam = {};
- oParam.id = "TRSTP01703";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreEarn032CentList";
- oParam.inds = "req=ds_TRSTP01703";
- oParam.outds = "ds_init_centlist=centlist ds_init_orddeptlist=orddeptlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
-
- if (arErrorCode.pop("TRSTP01703") > -1) {
- group2.visible = false;
- }
- }
- }
- /**
- * submit 후 호출 될 공통 콜백
- * @param {[type]} sSvcId [description]
- * @param {[type]} nErrorCode [description]
- * @param {[type]} sErrorMsg [description]
- * @return {Function} [description]
- */
- function callback(sSvcId, nErrorCode, sErrorMsg){
- arErrorCode.push(sSvcId, nErrorCode);
- }
- //=======================================================================================
- // Events
- //---------------------------------------------------------------------------------------
- /**
- * onload 이벤트 발생 시 호출
- * @param {[type]} obj:Form [description]
- * @param {[type]} e:LoadEventInfo [description]
- */
- function SPSTP00800_onload(obj: Form, e: LoadEventInfo) {
- frmf_initForm(obj);
- grdf_setRowTypeIcon(grd_earnpre, 0);
- fInit();
- }
- /**
- * grp1 조회 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function grp1_btn_search_onclick(obj: Button, e: ClickEventInfo) {
- ds_cond.setColumn(0, "srchflag", "from");
- dsf_createDsRow('ds_TRSTP01702', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'copybugtym', type: 'string', size: 256, val: '' },
- { col: 'srchflag', type: 'string', size: 256, val: '' }
- ], false);
-
- ds_TRSTP01702.copyRow(0, ds_cond, 0);
- ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
- ds_buffer_preearnlist.clearData();
-
- var oParam = {};
- oParam.id = "TRSTP01702";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreearnList";
- oParam.inds = "req=ds_TRSTP01702";
- oParam.outds = "ds_buffer_preearnlist=preearnlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- ds_buffer_preearnlist.addColumn('isDiabled', 'string');
-
- if (arErrorCode.pop("TRSTP01702") > -1) {
- ds_grid_preearnlist.clearData();
- for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
- var idx = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
- ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
- grdf_setStatus(grd_earnpre, '', [i]);
- }
- }
- }
- /**
- * grp2 조회 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function grp2_button7_onclick(obj: Button, e: ClickEventInfo) {
- if (String(ds_cond.getColumn(0, "copybugtym")).length < 1) {
- sysf_messageBox("복사년월을 선택하십시오.", "E999");
- return;
- }
- ds_cond.setColumn(0, "srchflag", "to");
- dsf_createDsRow('ds_TRSTP01702', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'copybugtym', type: 'string', size: 256, val: '' },
- { col: 'srchflag', type: 'string', size: 256, val: '' }
- ], false);
- ds_TRSTP01702.copyRow(0, ds_cond, 0);
- ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
- ds_buffer_preearnlist.clearData();
- var oParam = {};
- oParam.id = "TRSTP01702";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreearnList";
- oParam.inds = "req=ds_ds_TRSTP01702";
- oParam.outds = "ds_buffer_preearnlist=preearnlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TRSTP01702") > -1) {
- ds_grid_preearnlist.clearData();
- for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
- var idx = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
- ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
- grdf_setStatus(grd_earnpre, '', [i]);
- }
- }
- }
- /**
- * 월복사 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function grp2_button6_onclick(obj: Button, e: ClickEventInfo) {
- if (String(ds_cond.getColumn(0, "copybugtym")).length < 1) {
- sysf_messageBox("복사년월을 선택하십시오.", "E999");
- return;
- }
- dsf_createDsRow('ds_TXSTP00901', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'copybugtym', type: 'string', size: 256, val: '' }
- ], false);
- ds_TXSTP00901.copyRow(0, ds_cond, 0);
- ds_TXSTP00901.setColumn(0, 'bugtym', String(ds_TXSTP00901.getColumn(0, 'bugtym')).substr(0, 6));
- ds_TXSTP00901.setColumn(0, 'copybugtym', String(ds_TXSTP00901.getColumn(0, 'copybugtym')).substr(0, 6));
- ds_grid_preearnlist.clearData();
- var oParam = {};
- oParam.id = "TXSTP00901";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqExeCopyPreearnList";
- oParam.inds = "req=ds_TXSTP00901";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TXSTP00901") > -1) {
- sysf_messageBox("복사가 완료되었습니다.", "I999");
- }
- ds_cond.setColumn(0, "srchflag", "to");
- dsf_createDsRow('ds_TRSTP01702', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'copybugtym', type: 'string', size: 256, val: '' },
- { col: 'srchflag', type: 'string', size: 256, val: '' }
- ], false);
- ds_TRSTP01702.copyRow(0, ds_cond, 0);
- ds_TRSTP01702.setColumn(0, 'bugtym', String(ds_TRSTP01702.getColumn(0, 'bugtym')).substr(0, 6));
- ds_TRSTP01702.setColumn(0, 'copybugtym', String(ds_TRSTP01702.getColumn(0, 'copybugtym')).substr(0, 6));
- ds_buffer_preearnlist.clearData();
- var oParam = {};
- oParam.id = "TRSTP01702";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreearnList";
- oParam.inds = "req=ds_TRSTP01702";
- oParam.outds = "ds_buffer_preearnlist=preearnlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- ds_grid_preearnlist.addColumn('isEnabled', 'string');
- if (arErrorCode.pop("TRSTP01702") > -1) {
- ds_grid_preearnlist.clearData();
- for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
- var idx = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
- ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
- grdf_setStatus(grd_earnpre, '', [i]);
- }
- }
- }
- /**
- * 엑셀저장 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function button3_onclick(obj: Button, e: ClickEventInfo) {
- var today = ds_cond.getColumn(0, "bugtym");
- grdf_exportExcel(grd_earnpre, "수익예산_" + today, "Sheet1", true, "", "user", false);
- }
- /**
- * 행추가 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function button1_onclick(obj: Button, e: ClickEventInfo) {
- var idx = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.setColumn(idx, "bugtym",ds_cond.getColumn(0, "bugtym"));
- ds_grid_preearnlist.setColumn(idx, "status", "A");
- if (sysf_getUserInfo("dutplceinstcd") == "032") {
- ds_grid_preearnlist.enableevent = false;
- ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'N');
- ds_grid_preearnlist.enableevent = true;
- }
- }
- /**
- * 행삭제 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function button2_onclick(obj: Button, e: ClickEventInfo) {
- if (grd_earnpre.selectcount > 0) {
- for (var rowidx = 0; rowidx < ds_grid_preearnlist.rowcount; rowidx++) {
- if(!ds_grid_preearnlist.getSelect(rowidx)){
- continue;
- }
- var status = ds_grid_preearnlist.getColumn(rowidx, "status");
- if (status == "S") {
- grdf_setStatus(grd_earnpre, "D", [rowidx]);
- ds_grid_preearnlist.setColumn(rowidx, 'status', 'D');
- }
- else if (status == "A") {
- ds_grid_preearnlist.deleteRow(rowidx);
- }
- else if (status == "U") {
- grdf_setStatus(grd_earnpre, "D", [rowidx]);
- ds_grid_preearnlist.setColumn(rowidx, 'status', 'D');
- }
- }
- }
- }
- /**
- * 데이터셋 변경 후 이벤트
- * @param {[type]} obj: Dataset [description]
- * @param {[type]} e: DSColChangeEventInfo [description]
- * @return {[type]} [description]
- */
- function ds_grid_preearnlist_oncolumnchanged(obj: Dataset, e: DSColChangeEventInfo) {
- //칠곡병원 센터 하위 부서 코드 조회
-
- // if (sysf_getUserInfo("dutplceinstcd") == "032") {
- // if (e.columnid == "centcd") {
- // ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
- // ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
- // ds_tmp_orddeptlist.clearData();
- //
- // dsf_createDsRow('ds_TRSTP01704', [
- // { col: 'bugtym', type: 'string', size: 256, val: '' },
- // { col: 'centcd', type: 'string', size: 256, val: '' }
- // ], false);
- //
- // ds_TRSTP01704.copyRow(0, ds_cond, 0);
- // ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
- //
- // var oParam = {};
- // oParam.id = "TRSTP01704";
- // oParam.service = "stspamapp.StsPam";
- // oParam.method = "reqGetPreEarn032OrddeptList";
- // oParam.inds = "req=ds_TRSTP01704";
- // oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
- // oParam.async = false;
- // oParam.callback = "callback";
- //
- // tranf_submit(oParam);
- //
- // if (arErrorCode.pop("TRSTP01704") > -1) {
- // group2.visible = true;
- // }
- // }
- // }
- }
- function group2_grd_orddept_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- if(e.col == 0){
- var value = ds_tmp_preearnlist.getColumn(0, 'flag');
- ds_tmp_preearnlist.setColumn(0, 'flag', (value == '1') ? 'true' : 'false');
- }
- }
- /**
- * group2 확인 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function group2_btn_cnfm_onclick(obj: Button, e: ClickEventInfo) {
- var cnt = 0;
- for (var idx = 0; idx < ds_tmp_preearnlist.rowcount; idx++) {
- var flag = ds_tmp_preearnlist.getColumn(idx, "flag");
- if (flag == "true") {
- if(cnt == 0){
- ds_grid_preearnlist.setColumn(grd_earnpre.currentrow, 'orddeptcd', ds_tmp_preearnlist.getColumn(idx, 'orddeptcd'));
- }
- else{
- var nRow = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.setColumn(nRow, 'status', "A");
- ds_grid_preearnlist.setColumn(nRow, 'bugtym', ds_cond.getColumn(0, "/root/cond/bugtym"));
- ds_grid_preearnlist.setColumn(nRow, 'centcd', ds_tmp_preearnlist.getColumn(idx, "centcd"));
- ds_grid_preearnlist.setColumn(nRow, 'orddeptcd', ds_tmp_preearnlist.getColumn(idx, "orddeptcd"));
- }
- cnt++;
- }
- }
- group2.visible = false;
- }
- /**
- * 진료과 조회 팝업 취소 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function group2_button4_onclick(obj: Button, e: ClickEventInfo) {
- group2.visible = false;
- //group1.enable = true;
- }
- /**
- * 저장 버튼 클릭 이벤트
- * @param {[type]} obj: Button [description]
- * @param {[type]} e: ClickEventInfo [description]
- * @return {[type]} [description]
- */
- function button5_onclick(obj: Button, e: ClickEventInfo) {
- dsf_setDefaultVal(ds_grid_preearnlist, "centcd:-,grupgb:-,dispseq:0,inpgoal:0,outgoal:0");
-
- ds_buffer_preearnlist.clearData();
-
- var oParam = {};
- oParam.id = "TXSTP00900";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqExePreEarnOrddeptList";
- oParam.inds = "req=ds_grid_preearnlist";
- oParam.outds = "ds_buffer_preearnlist=preearnlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TXSTP00900") > -1) {
- ds_buffer_preearnlist.addColumn('isDiabled', 'string');
- ds_grid_preearnlist.clearData();
- for(var i = 0; i < ds_buffer_preearnlist.rowcount; i++){
- var idx = ds_grid_preearnlist.addRow();
- ds_grid_preearnlist.copyRow(idx, ds_buffer_preearnlist, i);
- ds_grid_preearnlist.setColumn(idx, 'isDisabled', 'Y');
- grdf_setStatus(grd_earnpre, '', [i]);
- }
- }
- }
- function grd_earnpre_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo)
- {
- var status = ds_grid_preearnlist.getColumn(e.row, 'status');
-
- if(status == 'A'){
-
- }
- else if(status == 'S'){
- ds_grid_preearnlist.setColumn(e.row, 'status', 'U');
- }
- else if(status == 'D'){
-
- }
-
- if (sysf_getUserInfo("dutplceinstcd") == "032") {
- if (e.columnid == "centcd") {
- ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
- ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
- ds_tmp_orddeptlist.clearData();
- dsf_createDsRow('ds_TRSTP01704', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'centcd', type: 'string', size: 256, val: '' }
- ], false);
- ds_TRSTP01704.copyRow(0, ds_cond, 0);
- ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
- var oParam = {};
- oParam.id = "TRSTP01704";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreEarn032OrddeptList";
- oParam.inds = "req=ds_TRSTP01704";
- oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TRSTP01704") > -1) {
- group2.visible = true;
- }
- }
- }
- }
- var downValue = 0;
- var upValue = 0;
- function grd_earnpre_ondropdown(obj:Grid, e:GridEditEventInfo)
- {
- downValue = e.value;
- }
- function grd_earnpre_oncloseup(obj:Grid, e:GridEditEventInfo)
- {
- if(downValue != e.value){
- var status = ds_grid_preearnlist.getColumn(e.row, 'status');
-
- if(status == 'A'){
-
- }
- else if(status == 'S'){
- ds_grid_preearnlist.setColumn(e.row, 'status', 'U');
- }
- else if(status == 'D'){
-
- }
-
- if (sysf_getUserInfo("dutplceinstcd") == "032") {
- if (e.columnid == "centcd") {
- ds_cond.setColumn(0, "centcd", ds_grid_preearnlist.getColumn(e.row, "centcd"));
- ds_grid_preearnlist.setColumn(e.row, "orddeptcd", "");
- ds_tmp_orddeptlist.clearData();
- dsf_createDsRow('ds_TRSTP01704', [
- { col: 'bugtym', type: 'string', size: 256, val: '' },
- { col: 'centcd', type: 'string', size: 256, val: '' }
- ], false);
- ds_TRSTP01704.copyRow(0, ds_cond, 0);
- ds_TRSTP01704.setColumn(0, 'bugtym', String(ds_TRSTP01704.getColumn(0, 'bugtym')).substr(0, 6));
- var oParam = {};
- oParam.id = "TRSTP01704";
- oParam.service = "stspamapp.StsPam";
- oParam.method = "reqGetPreEarn032OrddeptList";
- oParam.inds = "req=ds_TRSTP01704";
- oParam.outds = "ds_tmp_orddeptlist=orddeptlist";
- oParam.async = false;
- oParam.callback = "callback";
- tranf_submit(oParam);
- if (arErrorCode.pop("TRSTP01704") > -1) {
- group2.visible = true;
- }
- }
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|