123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMMNG04200" position="absolute 0 0 1205 758" titletext="SET기구 처방 집계현황" oninit="SMMNG04200_oninit" onload="SMMNG04200_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 15 1195 750" id="grp_biz" scrollbars="autoboth" anchor="all">
- <Layouts>
- <Layout>
- <Grid position="absolute 0 150 645 606" id="grd_sumlist2" visible="false" binddataset="ds_grd_sumlist2" anchor="default">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="85"/>
- <Column size="0"/>
- <Column size="100"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="구분"/>
- <Cell col="1" text="일자"/>
- <Cell col="2" text="부서코드"/>
- <Cell col="3" text="부서명"/>
- <Cell row="1" text="구분"/>
- <Cell row="1" col="1" text="일자"/>
- <Cell row="1" col="2" text="부서코드"/>
- <Cell row="1" col="3" text="부서명"/>
- </Band>
- <Band id="body">
- <Cell text="bind:flag"/>
- <Cell col="1" text="bind:delivedd" mask="yyyy-mm-dd"/>
- <Cell col="2" text="bind:reqdeptcd"/>
- <Cell col="3" text="bind:reqdeptnm"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Div position="absolute 0 10 1195 45" align="align:center top;" id="grp_sea" anchor="default">
- <Layouts>
- <Layout>
- <Shape id="roundrect1" type="roundrectangle" class="div_SA" position="absolute 0 0 1195 35"/>
- <Static text="조회일자:" position="absolute 15 10 106 27" id="cap_instcd" class="search_name" anchor="default"/>
- <Shape position="absolute 1052 5 1058 30" linetype="vertical" id="line13" class="line_4" anchor="default"/>
- <Button position="absolute 1070 8 1126 30" id="btn_search" class="btn1" taborder="2" text="조회" anchor="default" onclick="grp_biz_grp_sea_btn_search_onclick"/>
- <Calendar position="absolute 100 8 185 27" id="ipt_fromdd" anchor="default" oncloseup="grp_biz_grp_sea_ipt_fromdd_oncloseup" autoselect="true"/>
- <Calendar position="absolute 195 8 280 27" id="ipt_todd" anchor="default" autoselect="true"/>
- <Static text="~" position="absolute 185 10 201 28" id="caption1" anchor="default"/>
- <Radio position="absolute 285 10 465 26" id="rdo_deptflag" columncount="-1" codecolumn="codecolumn" datacolumn="datacolumn" rowcount="-1" anchor="default" onitemchanged="grp_biz_grp_sea_rdo_deptflag_onitemchanged">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">
- </Col>
- <Col id="datacolumn">전체</Col>
- </Row>
- <Row>
- <Col id="codecolumn">O</Col>
- <Col id="datacolumn">외래</Col>
- </Row>
- <Row>
- <Col id="codecolumn">I</Col>
- <Col id="datacolumn">병동</Col>
- </Row>
- <Row>
- <Col id="codecolumn">T</Col>
- <Col id="datacolumn">행정</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Combo position="absolute 470 8 615 27" id="cmb_deptcd" innerdataset="@ds_init_deptinfo_deptlist" datacolumn="deptnm" codecolumn="deptcd" anchor="default" onitemchanged="grp_biz_grp_sea_cmb_deptcd_onitemchanged"/>
- <Button position="absolute 1130 8 1186 30" id="button1" class="btn7" taborder="2" text="엑셀" anchor="default" onclick="grp_biz_grp_sea_button1_onclick"/>
- <Radio position="absolute 620 9 735 29" id="rdo_flag" columncount="-1" codecolumn="codecolumn" datacolumn="datacolumn" rowcount="-1" anchor="default" onitemchanged="grp_biz_grp_sea_rdo_flag_onitemchanged">
- <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>
- </Layout>
- </Layouts>
- </Div>
- <Static text="SET기구 처방 집계현황" position="absolute 1 58 183 76" id="caption8" class="tit_2" anchor="default"/>
- <Shape position="absolute 0 74 1195 80" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
- <Grid position="absolute 0 79 1195 735" id="grd_sumlist" binddataset="ds_main_suminfo_sumlist" anchor="all" oncelldblclick="grp_biz_grd_sumlist_oncelldblclick" oncellclick="grp_biz_grd_sumlist_oncellclick" cellsizebandtype="allband" cellsizingtype="col">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="0"/>
- <Column size="85"/>
- <Column size="0"/>
- <Column size="96"/>
- <Column size="40"/>
- <Column size="40"/>
- <Column size="40"/>
- <Column size="36"/>
- <Column size="40"/>
- <Column size="40"/>
- <Column size="40"/>
- <Column size="40"/>
- <Column size="40"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell text="구분"/>
- <Cell col="1" rowspan="2" text="일자" taborder="undefined"/>
- <Cell col="2" text="부서코드"/>
- <Cell col="3" rowspan="2" text="부서명" taborder="undefined"/>
- <Cell col="4" colspan="3" text="test1" taborder="undefined"/>
- <Cell col="7" colspan="3" text="test2" taborder="undefined"/>
- <Cell col="10" colspan="3" text="test3" taborder="undefined"/>
- <Cell row="1" text="구분"/>
- <Cell row="1" col="2" text="부서코드"/>
- <Cell row="1" col="4" text="1"/>
- <Cell row="1" col="5" text="11"/>
- <Cell row="1" col="6" text="111"/>
- <Cell row="1" col="7" text="2"/>
- <Cell row="1" col="8" text="22"/>
- <Cell row="1" col="9" text="222"/>
- <Cell row="1" col="10" text="3"/>
- <Cell row="1" col="11" text="33"/>
- <Cell row="1" col="12" text="333"/>
- </Band>
- <Band id="body">
- <Cell text="bind:flag"/>
- <Cell col="1" displaytype="expr:utlf_isNull(delivedd) ? 'text' : 'date'" style="background:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');background2:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');" text="expr:utlf_isNull(delivedd) ? '합계' : 'bind:delivedd'" calendardisplaynulltype="none"/>
- <Cell col="2" text="bind:reqdeptcd"/>
- <Cell col="3" displaytype="normal" style="align:left top;padding:5 2 0 2;" text="expr:utlf_isNull(reqdeptnm) ? '합계' : 'bind:reqdeptnm'" wordwrap="char"/>
- <Cell col="4"/>
- <Cell col="5"/>
- <Cell col="6"/>
- <Cell col="7"/>
- <Cell col="8"/>
- <Cell col="9"/>
- <Cell col="10"/>
- <Cell col="11"/>
- <Cell col="12"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button position="absolute 1129 54 1193 73" id="btn_sav" class="btn5" text="불출저장" anchor="default" onclick="grp_biz_btn_sav_onclick"/>
- <Static text="뒤에 새로운 그리드가 숨겨져있음(수정된 내역을 기존과 비교해서 그것만 따로 저장하게 하기위해)" position="absolute 555 53 1087 73" id="caption2" visible="false" anchor="default"/>
- <TextArea position="absolute 0 168 1195 711" id="tar_hidden" anchor="default" visible="true" style="background:#eeffeeff stretch 5,5;"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="SET기구 처방 집계현황" class="tit_1" position="absolute 0 0 186 25"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_grd_sumlist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="flag" type="STRING"/>
- <Column id="delivedd" type="STRING"/>
- <Column id="reqdeptcd" type="STRING"/>
- <Column id="reqdeptnm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_init_cmb_deptcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="deptnm" type="STRING"/>
- <Column id="deptcd" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_grd_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="flag" type="STRING"/>
- <Column id="delivedd" type="STRING"/>
- <Column id="reqdeptcd" type="STRING"/>
- <Column id="reqdeptnm" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_dutinfo_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_tmp_codeinfo_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_R0435list" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- <Column id="flag" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="deptflag" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="fromdd"/>
- <Col id="todd"/>
- <Col id="flag"/>
- <Col id="deptcd"/>
- <Col id="deptflag"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_suminfo_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_init_deptinfo_deptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="deptcd" type="STRING" size="256" sumtext=""/>
- <Column id="deptnm" type="STRING" size="256" sumtext=""/>
- <Column id="deptflag" type="STRING" size="256" sumtext=""/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_test" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_temp_suminfo_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- <Dataset id="ds_send_savedata_sumlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_biz.grp_sea.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
- <BindItem id="item1" compid="grp_biz.grp_sea.ipt_todd" propid="value" datasetid="ds_main_cond" columnid="todd"/>
- <BindItem id="item2" compid="grp_biz.grp_sea.rdo_deptflag" propid="value" datasetid="ds_main_cond" columnid="deptflag"/>
- <BindItem id="item3" compid="grp_biz.grp_sea.cmb_deptcd" propid="value" datasetid="ds_main_cond" columnid="deptcd"/>
- <BindItem id="item4" compid="grp_biz.grp_sea.rdo_flag" propid="value" datasetid="ds_main_cond" columnid="flag"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-07-11
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-07-11 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- var arErrorCode = new HashArray();
- var length;
- var userdutplcecd;
- function SMMNG04200_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- function SMMNG04200_onload(obj:Form, e:LoadEventInfo)
- {
- fInitialize();
- }
- function fInitialize() {
- var oParam = {};
- oParam.id = "TRMNG04201";
- oParam.service = "csrapp.CsrMngt";
- oParam.method = "reqGetDeptInfo";
- oParam.inds = "req=ds_main_suminfo_sumlist";
- oParam.outds = "ds_init_deptinfo_deptlist=deptlist";
- oParam.async = false;
- tranf_submit(oParam);
- //fromdd, todd를 당일자로 setting.
- var curdd = utlf_getCurrentDate();
-
- dsf_makeValue(ds_send, "plandd", "string", curdd);
- dsf_makeValue(ds_send, "instcd", "string", sysf_getUserInfo("dutplceinstcd"));
- var oParam = {};
- oParam.id = "TRMNB01208";
- oParam.service = "wardcareapp.WardBizMngt";
- oParam.method = "reqGetDutInfo";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_init_dutinfo_userinfo=userinfo";
- oParam.async = false;
- tranf_submit(oParam);
-
- grp_biz.grp_sea.ipt_fromdd.value = utlf_getCurrentDate();
- grp_biz.grp_sea.ipt_todd.value = utlf_getCurrentDate();
-
- dsf_makeValue(ds_send, "srchdd", "string", utlf_getCurrentDate());
- dsf_makeValue(ds_send, "cdgrupid", "string", "'160', 'T17', '002'");
- var oParam = {};
- oParam.id = "TRMNW00001";
- oParam.service = "wardcareapp.WardCareMngt";
- oParam.method = "reqGetNursHardCdInfo";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_tmp_codeinfo_codelist=codelist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_tmp_codeinfo_codelist.filter("cdgrupid=='002' && cdid == '"+sysf_getUserInfo("dutplcecd")+"'");
- var erdeptcd = ds_tmp_codeinfo_codelist.getColumn(0, "cdid");
- ds_tmp_codeinfo_codelist.filter("");
- ds_tmp_codeinfo_codelist.filter("cdgrupid=='160' and cdid == '"+sysf_getUserInfo("dutplcecd")+"'");
- userdutplcecd = ds_tmp_codeinfo_codelist.getColumn(0, "cdid");
- ds_tmp_codeinfo_codelist.filter("");
-
- if (!utlf_isNull(userdutplcecd)) {
- grp_biz.btn_sav.visible = true;
-
- } else {
- if(sysf_getUserInfo("userid")=="ENR") {
- grp_biz.btn_sav.visible = true;
- } else {
- grp_biz.btn_sav.visible = false;
- if(!utlf_isNull(erdeptcd)) {
- grp_biz.grp_sea.cmb_deptcd.value = ds_init_dutinfo_userinfo.lookup("userid", sysf_getUserInfo("userid"), "deptcd");
- } else {
- grp_biz.grp_sea.cmb_deptcd.value = sysf_getUserInfo("dutplcecd");
- }
- grp_biz.grp_sea.cmb_deptcd.enable = false;
- grp_biz.grp_sea.rdo_deptflag.enable = false
- }
- }
-
- var arrParam = [{dsNm: "ds_init_R0435list", cdGrpId: "R0435"}]
- appf_getCodeList(arrParam);
-
- grp_biz.grp_sea.rdo_flag.value="1";
-
-
- var node = ds_init_R0435list
-
- length = ds_init_R0435list.rowcount;
-
- var caption = "구분^일자^부서코드^부서명";
- var colName = "";
- var oldcolName = "";
-
- var sColumnInfo = "";
- var sRowInfo = "";
- var sHeadInfo = "";
- var sBodyInfo = "";
- var sBodyInfo2 = "";
- var sFormatInfo = "";
- var sHeadInfo2 = "";//처방 불출 합계
- var str = "";
- var colcount = 0;
- var style = 'style="background:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');background2:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');font:EXPR(utlf_isNull(delivedd) ? 'arial,9,bold' : '');"';
- var style2 = 'style="background:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');background2:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');"';
- var styleBu = 'style="align:left top;padding:5 2 0 2;background:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');background2:EXPR(utlf_isNull(delivedd) ? '#eeffee' : '');font:EXPR(utlf_isNull(delivedd) ? 'arial,9,bold' : '');"';
-
-
- sColumnInfo += '<Columns size="0" /> \r\n';
- sColumnInfo += '<Columns size="85" /> \r\n'
- sColumnInfo += '<Columns size="0" /> \r\n'
- sColumnInfo += '<Columns size="100" /> \r\n';
-
- sRowInfo += '<Row size="24" band="head" /> \r\n';
- sRowInfo += '<Row size="24" band="head" /> \r\n';
- sRowInfo += '<Row size="24" /> \r\n';
-
- sHeadInfo = '<Cell text="구분"/> \r\n';
- sHeadInfo += '<Cell col="1" rowspan="2" text="일자" taborder="undefined"/> \r\n';
- sHeadInfo += '<Cell col="2" text="부서코드"/> \r\n';
- sHeadInfo += '<Cell col="3" rowspan="2" text="부서명" taborder="undefined"/> \r\n';
- sHeadInfo2 += '<Cell row="1" text="구분"/> \r\n';
- sHeadInfo2 += '<Cell row="1" col="2" text="부서코드"/> \r\n';
-
- sBodyInfo += '<Cell text="bind:flag"/> \r\n';
- sBodyInfo += '<Cell col="1" displaytype="date" text="bind:delivedd" calendardisplaynulltype="none" '+ style + '/> \r\n';
- sBodyInfo += '<Cell col="2" text="bind:reqdeptcd" '+ style + '/> \r\n';
- sBodyInfo += '<Cell col="3" text="bind:reqdeptnm" '+ styleBu + ' wordwrap="char"/> \r\n';
-
- sBodyInfo2 += '<Cell text="계"/> \r\n';
- sBodyInfo2 += '<Cell col="1" text="계"/> \r\n';
- sBodyInfo2 += '<Cell col="2" text="계"/> \r\n';
- sBodyInfo2 += '<Cell col="3" text="계"/> \r\n';
-
-
- for(var i = 0; i < ds_init_R0435list.rowcount; i++) {
- colName = ds_init_R0435list.getColumn(i, "cdnm");
- sColumnInfo += '<Columns size="55" /> \r\n';
- sColumnInfo += '<Columns size="55" /> \r\n';
- sColumnInfo += '<Columns size="55" /> \r\n';
-
- if(oldcolName != colName){
- sHeadInfo += '<Cell col="' + (parseInt(i) + 4 + parseInt(colcount)) + '" colspan="3" text="'+ colName +'" taborder="undefined" style="font:arial,9,bold;"/> \r\n';
- }
- sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 4 + parseInt(colcount)) + '" text="처방"/> \r\n';
- sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 5 + parseInt(colcount)) + '" text="불출"/> \r\n';
- sHeadInfo2 += '<Cell row="1" col="' + (parseInt(i) + 6 + parseInt(colcount)) + '" text="합계"/> \r\n';
-
- str = "a1qty" + (parseInt(i) + 1);
- sBodyInfo += '<Cell col="'+(parseInt(i) + 4 + parseInt(colcount))+'" displaytype="number" edittype="expr:col1edit" text="bind:'+ str +'" '+ style + '/> \r\n';
-
- str = "a2qty" + (parseInt(i) + 1);
- sBodyInfo += '<Cell col="'+(parseInt(i) + 5 + parseInt(colcount))+'" displaytype="number" edittype="expr:col2edit" text="bind:'+ str +'" '+ style + '/> \r\n';
-
- str = "sumqty" + (parseInt(i) + 1);
- sBodyInfo += '<Cell col="'+(parseInt(i) + 6 + parseInt(colcount))+'" displaytype="number" edittype="expr:col1edit" text="bind:'+ str +'" font="arial,9,bold" '+ style2 + '/> \r\n';
-
- colcount = colcount + 2;
- oldcolName = colName;
- }
- sHeadInfo += sHeadInfo2;
-
- sColumnInfo = '<Columns> \r\n' + sColumnInfo + '</Columns> \r\n' ;
- sRowInfo = '<Rows> \r\n' + sRowInfo + '</Rows> \r\n';
- sHeadInfo = '<Band id="head"> \r\n' + sHeadInfo + '</Band> \r\n';
- sBodyInfo = '<Band id="body"> \r\n' + sBodyInfo + '</Band> \r\n';
-
- sFormatInfo = '<Formats> \r\n';
- sFormatInfo += '<Format id="default"> \r\n';
- sFormatInfo += sColumnInfo + sRowInfo + sHeadInfo + sBodyInfo;
- sFormatInfo += '</Format> \r\n';
- sFormatInfo += '</Formats>';
- grp_biz.grd_sumlist.enableredraw = false;
- grp_biz.grd_sumlist.formats = sFormatInfo;
- grp_biz.grd_sumlist.enableredraw = true;
- grp_biz.grd_sumlist.setFormatColProperty(grp_biz.grd_sumlist.getBindCellIndex("body", "reqdeptnm"), "size", 0);
- frmf_addComboItem("grp_biz.grp_sea.cmb_deptcd", "전체", "", "above");
- grp_biz.grp_sea.cmb_deptcd.value = "";
- grp_biz.tar_hidden.visible = false;
- }
- function grp_biz_grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- fSearch();
- }
- function fSearch(){
- //grd_sumlist.subtotal("clear", -1, i, "#,###.##", "background-color:#99ff99; font-weight:bold", 0, cmb_deptcd.label);
-
- var flag = grp_biz.grp_sea.rdo_flag.value;
-
- if(flag == "1") {
- var deptcd = grp_biz.grp_sea.cmb_deptcd.value;
-
- if(utlf_isNull(deptcd)) {
- sysf_messageBox("부서를 선택하십시오.", "E");
- return;
- }
-
- dsf_makeValue(ds_send_reqdata, "fromdd", "string", grp_biz.grp_sea.ipt_fromdd.value);
- dsf_makeValue(ds_send_reqdata, "todd", "string", grp_biz.grp_sea.ipt_todd.value);
- dsf_makeValue(ds_send_reqdata, "deptcd", "string", grp_biz.grp_sea.cmb_deptcd.value);
- dsf_makeValue(ds_send_reqdata, "deptflag", "string", grp_biz.grp_sea.rdo_deptflag.value);
-
- //일자별 조회
- var oParam = {};
- oParam.id = "TRMNG04201";
- oParam.service = "csrapp.CsrMngt";
- oParam.method = "reqGetSetSumInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_suminfo_sumlist=sumlist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_main_suminfo_sumlist.enableevent = false;
- ds_main_suminfo_sumlist.updatecontrol = false;
- dsf_setDefaultVal(ds_main_suminfo_sumlist, "col1edit:none,col2edit:text");
- ds_main_suminfo_sumlist.updatecontrol = true;
- ds_main_suminfo_sumlist.enableevent = true;
-
- ds_main_suminfo_sumlist.keystring = "G:reqdeptcd";
- grp_biz.grd_sumlist.updateToDataset();
-
- ds_main_suminfo_sumlist.enableevent = false;
- ds_main_suminfo_sumlist.updatecontrol = false;
-
- var EXPR = "EXPR(";
- var EXPRtext = "EXPR(";
-
- for(var i = 0; i < ds_main_suminfo_sumlist.rowcount ;i++){
-
- if(!utlf_isNull(ds_main_suminfo_sumlist.getColumn(i, "delivedd"))){
- EXPR += "currow == " + i + " ? 'date' : ";
- EXPRtext += "currow == " + i + " ? '"+ ds_main_suminfo_sumlist.getColumn(i, "delivedd") +"' : ";
- }else{
-
- }
- }
- EXPR += "'text')";
- EXPRtext += "'합계')";
-
- if(ds_main_suminfo_sumlist.rowcount > 0){
- grp_biz.grd_sumlist.setCellProperty("body", 1, "displaytype", EXPR);
- grp_biz.grd_sumlist.setCellProperty("body", 1, "text", EXPRtext);
- }
- ds_main_suminfo_sumlist.updatecontrol = true;
- ds_main_suminfo_sumlist.enableevent = true;
- } else {
- dsf_makeValue(ds_send_reqdata, "fromdd", "string", grp_biz.grp_sea.ipt_fromdd.value);
- dsf_makeValue(ds_send_reqdata, "todd", "string", grp_biz.grp_sea.ipt_todd.value);
- dsf_makeValue(ds_send_reqdata, "deptcd", "string", grp_biz.grp_sea.cmb_deptcd.value);
- dsf_makeValue(ds_send_reqdata, "deptflag", "string", grp_biz.grp_sea.rdo_deptflag.value);
-
- ds_main_suminfo_sumlist.keystring = "";
- //부서별 조회
- var oParam = {};
- oParam.id = "TRMNG04201";
- oParam.service = "csrapp.CsrMngt";
- oParam.method = "reqGetDeptSetSumInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_suminfo_sumlist=sumlist";
- oParam.async = false;
- tranf_submit(oParam);
-
- ds_main_suminfo_sumlist.enableevent = false;
- ds_main_suminfo_sumlist.updatecontrol = false;
- dsf_setDefaultVal(ds_main_suminfo_sumlist, "col1edit:none,col2edit:text");
-
- ds_main_suminfo_sumlist.addColumn("testCol", "string");
- for(var i = 0; i < ds_main_suminfo_sumlist.rowcount;i++){
- var str = ds_init_deptinfo_deptlist.lookup("deptcd", ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd"), "deptnm");
-
- if (utlf_isNull(str))
- {
- str = ds_main_suminfo_sumlist.getColumn(i, "reqdeptnm");
- str = str.replace("(누적)", "");
- }
- ds_main_suminfo_sumlist.setColumn(i, "testCol", str);
- }
- ds_main_suminfo_sumlist.keystring = "G:+testCol";
-
- ds_main_suminfo_sumlist.updatecontrol = true;
- ds_main_suminfo_sumlist.enableevent = true;
-
- var EXPRtext = "EXPR(";
- //
- for(var i = 0; i < ds_main_suminfo_sumlist.rowcount ;i++){
- if(!utlf_isNull(ds_main_suminfo_sumlist.getColumn(i, "testCol"))){
- //EXPR += "currow == " + i + " ? 'date' : ";
- EXPRtext += "currow == " + i + " ? '"+ ds_main_suminfo_sumlist.getColumn(i, "reqdeptnm") +"' : ";
- }
- }
- EXPRtext += "'합계')";
- if(ds_main_suminfo_sumlist.rowcount > 0){
- grp_biz.grd_sumlist.setCellProperty("body", 3, "text", EXPRtext);
- }
- ds_temp_suminfo_sumlist.copyData(ds_main_suminfo_sumlist);
- }
- }
- function grp_biz_grp_sea_rdo_flag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- ds_main_suminfo_sumlist.clearData();
-
- var flag = grp_biz.grp_sea.rdo_flag.value
-
- if(flag == "1") {
- grp_biz.grd_sumlist.setFormatColProperty(3, "size", 0);
- grp_biz.grd_sumlist.setFormatColProperty(1, "size", 85);
-
- grp_biz.grp_sea.ipt_todd.visible = true;
- grp_biz.grp_sea.caption1.visible = true;
- } else {
- grp_biz.grp_sea.ipt_todd.visible = false; //부서별일경우에는 종료일자 숨김.
- grp_biz.grp_sea.ipt_todd.value = grp_biz.grp_sea.ipt_fromdd.value;
- grp_biz.grp_sea.caption1.visible = false;
-
- grp_biz.grd_sumlist.setFormatColProperty(3, "size", 96);
- grp_biz.grd_sumlist.setFormatColProperty(1, "size", 0);
-
- //20180529 이돈희 수정 : 일자별에서 부서별 라디오 버튼 옮김때 부서 전체에서 이전에 선택된 부서로 조회(진료재료팀 곽진영, 요청번호 : 20180528005)
- //if (!utlf_isNull(userdutplcecd)) {
- // grp_biz.grp_sea.cmb_deptcd.value = "";
- //}
-
- fSearch();
- }
- }
- function grp_biz_grp_sea_ipt_fromdd_oncloseup(obj:Calendar, e:CalendarCloseUpEventInfo)
- {
- if(grp_biz.grp_sea.rdo_flag.value == "2") {
- grp_biz.grp_sea.ipt_todd.value = grp_biz.grp_sea.ipt_fromdd.value;
- }
- }
- function grp_biz_grp_sea_rdo_deptflag_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
- {
- var val = grp_biz.grp_sea.rdo_deptflag.value;
-
- if(utlf_isNull(val)) {
- ds_init_deptinfo_deptlist.filter("");
- grp_biz.grp_sea.cmb_deptcd.innerdataset = "ds_init_deptinfo_deptlist";
- } else {
- ds_init_deptinfo_deptlist.filter("deptcd=='' || deptflag=='" + val + "'")
- grp_biz.grp_sea.cmb_deptcd.innerdataset = "ds_init_deptinfo_deptlist";
- grp_biz.grp_sea.cmb_deptcd.value="";
- }
- }
- function grp_biz_grp_sea_cmb_deptcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- fSearch();
- }
- function grp_biz_grd_sumlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
- {
- var flag = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "flag");
-
- if(flag == "1") {
- return;
- }
-
- var colNm = grp_biz.grd_sumlist.getCellProperty("body", grp_biz.grd_sumlist.currentcol, "text");//현재선택한 컬럼의 참조명을 들고온다.
- colNm = colNm.replace("bind:", "");
- if(grp_biz.grd_sumlist.currentcol == 1){
- colNm = "delivedd";
- }
-
- var col = parseInt(((grp_biz.grd_sumlist.currentcol + 2) % 3));
-
- var seq;
- if(grp_biz.grd_sumlist.currentcol > 2) {
- if(col == 0) {
- seq = colNm.substr(5);
- } else if(col == 1) {
- seq = colNm.substr(5);
- } else if(col == 2) {
- seq = colNm.substr(6);
- }
- }
- //선택한 컬럼의 순번을 가져온다.
- //var goodcd = utlf_transNullToEmpty(ds_init_R0435list.lookup("dispseq", seq, "cdid"));
- if(utlf_isNull(seq)){
- var goodcd = "";
- }else{
- var goodcd = ds_init_R0435list.getColumn(seq - 1, "cdid");
- }
- var reqdeptcd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "reqdeptcd");
- var reqdeptnm = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "reqdeptnm");
-
- var fromdd = "";
- var todd = "";
- var delivedd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, "delivedd");
-
- if(col != 1) {
- if(grp_biz.grp_sea.rdo_flag.value == "1") {
- if(delivedd = "합계" || utlf_isNull(delivedd)) {
- fromdd = grp_biz.grp_sea.ipt_fromdd.value;
- todd = grp_biz.grp_sea.ipt_todd.value;
- } else {
- fromdd = delivedd;
- todd = delivedd;
- }
-
- reqdeptcd = grp_biz.grp_sea.cmb_deptcd.value;
- } else {
- fromdd = grp_biz.grp_sea.ipt_fromdd.value;
- todd = grp_biz.grp_sea.ipt_todd.value;
-
- if(reqdeptnm == "합계" || utlf_isNull(reqdeptnm)) {
- reqdeptcd = ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition - 1, "reqdeptcd");
- }
- }
- frmf_setParameter("fromdd", fromdd);
- frmf_setParameter("todd", todd);
- frmf_setParameter("goodcd", goodcd);
- frmf_setParameter("deptcd", reqdeptcd);
- if(col == 0 && utlf_isNull(ds_main_suminfo_sumlist.getColumn(ds_main_suminfo_sumlist.rowposition, grp_biz.grd_sumlist.currentcol))) {
- if(grp_biz.grd_sumlist.currentcol == 1){
- frmf_open("SPMNG04200", "SPMNG04200", "", null, "", "", "", null, null, null, null, null, "M");
- }
- } else {
- frmf_open("SPMNG04200", "SPMNG04200", "", null, "", "", "", null, null, null, null, null, "M");
- }
- }
- }
- function grp_biz_grd_sumlist_oncellclick(obj:Grid, e:GridClickEventInfo)
- {
- var fromdd = grp_biz.grp_sea.ipt_fromdd.value;
- var curdd = utlf_getCurrentDate();
-
- var flag = grp_biz.grp_sea.rdo_flag.value;
- // if(flag == "1") {
- // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "none");
- // } else {
- // if(fromdd != curdd) {
- // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "none");
- // } else {
- // grp_biz.grd_sumlist.setCellProperty("body", grp_biz.grd_sumlist.currentcol, "edittype", "text");
- // }
- // }
- }
- function grp_biz_btn_sav_onclick(obj:Button, e:ClickEventInfo)
- {
- var delivedd;
- var reqdeptcd;
- var orgqty;
- var cmpqty;
- var header = "delivedd▦reqdeptcd▦goodcd▦dlvqty▦updtflag▩";
- var data = "";
-
- var updtdata = grdf_getGridUpdateData(grp_biz.grd_sumlist);
-
- if(utlf_isNull(updtdata) || updtdata.rowcount == 0) {
- sysf_messageBox("변경된 내역이 존재하지 않습니다.", "E");
- return;
- }
-
- var updtflag;
-
- //수정된 데이터만 저장하기 위한 로직
- for(var i = 0; i < ds_main_suminfo_sumlist.rowcount; i++) {
- delivedd = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "delivedd"));
- reqdeptcd = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd"));
- updtflag = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "flag"));
-
- if(!utlf_isNull(delivedd)) { //subtotal로 만들어진 데이터인 경우에는. delivedd가 존재하지 않는다.
- if(ds_main_suminfo_sumlist.getRowType(i) == "4") { //데이터 수정을 위해 변경한 경우에는. 그리드 상태가 update이다.
-
- //length : 전역변수, set물품 리스트의 건수이다.(건수별로 앞에서 dynamic컬럼으로 생성.)
- //조회시 기존에 가져온 값을 grd_sumlist2에 복사해서 내부적으로 가지고있다.
- for(var j = 0; j < length; j++) {
- var jsum = eval(j + 1);
- cmpqty = utlf_transNullToEmpty(ds_main_suminfo_sumlist.getColumn(i, "a2qty" + jsum)); //현재 SET기구 현황 조회 그리드의 값
- ds_temp_suminfo_sumlist.filter("delivedd=='" + delivedd + "' && reqdeptcd=='" + reqdeptcd + "'");//현재바뀐것도 같은 물품의 원래값.
- orgqty = utlf_transNullToEmpty(ds_temp_suminfo_sumlist.getColumn(0, "a2qty" + jsum));
-
- ds_temp_suminfo_sumlist.filter("");
-
- //두개를 비교해서 다르면.(처음 조회시 가져왔던 정보에서 변경이 되었을 경우에는 저장을 위해 담는다.)
- if(orgqty != cmpqty ) {
- data += ds_main_suminfo_sumlist.getColumn(i, "delivedd") + "▦"
- + ds_main_suminfo_sumlist.getColumn(i, "reqdeptcd") + "▦"
- + ds_init_R0435list.getColumn(j, "cdid") + "▦"
- + cmpqty + "▦"
- + updtflag + "▩"
- ;
- }
- }
- }
- }
- }
-
- dsf_setCSVToDs("ds_send_savedata_sumlist", header + data);
-
- var oParam = {};
- oParam.id = "TXMNG04401";
- oParam.service = "csrapp.CsrMngt";
- oParam.method = "reqExeSumInfo";
- oParam.inds = "sumlist=ds_send_savedata_sumlist";
- oParam.outds = "";
- oParam.async = false;
- tranf_submit(oParam);
-
- fSearch();
- }
- function grp_biz_grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
- {
- grdf_exportExcel(grp_biz.grd_sumlist, "SET기구 처방 집계현황" + utlf_getCurrentDate(), "sheetname1" , true, "" , "" , true);
- }
- ]]></Script>
- </Form>
- </FDL>
|