123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRAD02000" position="absolute 0 0 1197 787" titletext="구매검수자료일괄기표" onload="SMRAD02000_onload">
- <Layouts>
- <Layout>
- <Div id="grp_srch" taborder="10" position="absolute 0 51 1195 91" class="div_SA2" anchor="left top right"/>
- <Div position="absolute 0 26 1195 54" id="grp_btn" scrollbars="autoboth" anchor="left top right">
- <Layouts>
- <Layout>
- <Button position="absolute 1139 0 1195 22" id="button36" class="btn4" text="저장" anchor="right" onclick="grp_btn_button36_onclick"/>
- <Button position="absolute 806 0 874 22" id="button35" class="btn4" visible="false" text="초기화" anchor="right" onclick="grp_btn_button35_onclick"/>
- <Shape position="absolute 0 21 1195 27" id="line9" class="line_6" anchor="left top right"/>
- <Button position="absolute 750 0 803 22" id="button3" class="btn6" visible="false" text="출력" anchor="right" onclick="grp_btn_button3_onclick"/>
- <Button position="absolute 1008 0 1136 22" id="btn_change" class="btn4" text="지급처 일괄변경" anchor="right" onclick="grp_btn_btn_change_onclick"/>
- <Button position="absolute 877 0 1005 22" id="btn_batch" class="btn4" text="확인건 일괄체크" anchor="right" onclick="grp_btn_btn_batch_onclick"/>
- <Static text="※ 기표불가 자료(빨강색)가 포함되었습니다. 정보통신실로 연락하셔서 조치 후 기표가능합니다." position="absolute 160 2 743 22" align="align:right middle;" id="cpt_alert" visible="false" anchor="default" style="color:#ff0000ff;font:Dotum,9,bold;"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption6" text="구매검수자료일괄기표" class="tit_1" position="absolute 0 0 180 25"/>
- <Button id="btn_search" taborder="1" text="조회" class="btn1" position="absolute 1123 60 1179 82" anchor="right" onclick="btn_search_onclick"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1103 59 1109 81" anchor="right"/>
- <Shape id="line1" class="line_10" position="absolute 0 115 1195 121" anchor="left top right"/>
- <Combo id="cmb_instcd" taborder="2" class="combo_essential" enable="false" position="absolute 78 61 193 80"/>
- <Static id="caption2" text="기관 :" class="search_name" position="absolute 12 62 73 79"/>
- <Grid id="grd_grntpsn1" taborder="3" binddataset="ds_main_grnt_grntlist2" useinputpanel="false" position="absolute 0 120 1195 785" anchor="all" autoenter="select" cellclickbound="cell">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="25" band="left"/>
- <Column size="35"/>
- <Column size="69"/>
- <Column size="80"/>
- <Column size="38"/>
- <Column size="43"/>
- <Column size="120"/>
- <Column size="212"/>
- <Column size="80"/>
- <Column size="38"/>
- <Column size="101"/>
- <Column size="94"/>
- <Column size="55"/>
- <Column size="33"/>
- <Column size="36"/>
- <Column size="80"/>
- <Column size="36"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="결재"/>
- <Cell col="2" text="계정"/>
- <Cell col="3" colspan="2" text="계약일자" taborder="undefined"/>
- <Cell col="5" colspan="2" text="거래처" taborder="undefined"/>
- <Cell col="7" text="계약건명"/>
- <Cell col="8" colspan="2" text="검수일자" taborder="undefined"/>
- <Cell col="10" text="예정일자"/>
- <Cell col="11" text="금액"/>
- <Cell col="12" text="지급처"/>
- <Cell col="13" text="여부"/>
- <Cell col="14" text="순번"/>
- <Cell col="15" text="기표일자"/>
- <Cell col="16" text="확인"/>
- <Cell col="17" text="caption4"/>
- <Cell col="18" text="caption5"/>
- <Cell col="19" text="caption1"/>
- <Cell col="20" text="caption2"/>
- <Cell col="21" text="caption3"/>
- <Cell col="22" text="caption6"/>
- <Cell col="23" text="caption7"/>
- <Cell col="24" text="caption8"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:aprvtype"/>
- <Cell col="2" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:acctid" enable="false"/>
- <Cell col="3" displaytype="date" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:kydate"/>
- <Cell col="4" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:kyseq"/>
- <Cell col="5" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:custcode"/>
- <Cell col="6" displaytype="text" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:custnm"/>
- <Cell col="7" displaytype="text" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:rmrk"/>
- <Cell col="8" displaytype="date" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:ibgoymd"/>
- <Cell col="9" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:ibgoseq"/>
- <Cell col="10" displaytype="date" edittype="date" style="padding:0 0 0 0;background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:yejungymd" editdisplay="edit" calendardisplay="display"/>
- <Cell col="11" displaytype="number" edittype="masknumber" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:keumak"/>
- <Cell col="12" displaytype="combo" edittype="combo" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:flagbank" combodataset="ds_cmb_flagbank" combocodecol="value" combodatacol="label"/>
- <Cell col="13" displaytype="checkbox" edittype="checkbox" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:flag" expr="expr:(flag=="Y"||flag==1)?1:0"/>
- <Cell col="14" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:gipyoseq"/>
- <Cell col="15" displaytype="date" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:gipyoymd"/>
- <Cell col="16" style="background:EXPR(utlf_isNull(ymdaction) ? 'red' : '');background2:EXPR(utlf_isNull(ymdaction) ? 'red' : '');font:EXPR(utlf_isNull(ymdaction) ? 'Dotum,9,bold' : '');" text="bind:elecaprvyn"/>
- <Cell col="17" text="bind:gubun"/>
- <Cell col="18" text="bind:ymdwrite"/>
- <Cell col="19" text="bind:fromdd"/>
- <Cell col="20" text="bind:kyno"/>
- <Cell col="21" text="bind:seqwrite"/>
- <Cell col="22" text="bind:maxseq"/>
- <Cell col="23" text="bind:ymdaction"/>
- <Cell col="24" text="bind:entrregno"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Calendar id="ipt_unsldd" taborder="4" class="input_essential" position="absolute 320 61 435 80" onchanged="ipt_unsldd_onchanged"/>
- <Static id="caption5" text="기표일자 :" class="search_name" position="absolute 230 62 316 79"/>
- <Static id="caption1" text="구매검수내역" class="tit_2" position="absolute 0 99 131 116"/>
- <Edit id="input1" taborder="5" position="absolute 659 61 789 80" onkeyup="input1_onkeyup"/>
- <Edit id="input2" taborder="6" visible="false" position="absolute 460 61 560 80"/>
- <Edit id="output1" taborder="7" readonly="true" position="absolute 820 61 860 80" class="edt_transbg"/>
- <Static id="caption4" text="검색어 :" class="search_name" position="absolute 580 60 655 82"/>
- <Static id="caption3" text="※ 기표처리 이후에는 예정일자, 금액의 변경이 불가합니다." position="absolute 130 99 495 116" style="color:#ff0000ff;font:Dotum,9,bold;"/>
- <Button id="button1" taborder="8" text="엑셀출력" class="btn7" position="absolute 1115 93 1195 115" anchor="right" onclick="button1_onclick"/>
- <MaskEdit id="ipt_totamt" taborder="9" mask="(-)#,###" position="absolute 803 96 923 115"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_hidden_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="pumno" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="pumno"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo/>
- </Dataset>
- <Dataset id="ds_maxseq" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="maxseq" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="maxseq"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_paydedu" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_send_paydedu_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="todd" type="STRING" size="256"/>
- <Column id="kyno" type="STRING" size="256"/>
- <Column id="chk" type="STRING" size="256"/>
- <Column id="totamt" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="fromdd"/>
- <Col id="todd"/>
- <Col id="kyno"/>
- <Col id="chk"/>
- <Col id="totamt"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_seqinfo_seqlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
- <ColumnInfo>
- <Column id="flagseq" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="flagseq"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_grnt_grntlist2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep" oncolumnchanged="ds_main_grnt_grntlist2_oncolumnchanged">
- <ColumnInfo>
- <Column id="acctid" type="STRING" size="256"/>
- <Column id="kydate" type="STRING" size="256"/>
- <Column id="kyseq" type="STRING" size="256"/>
- <Column id="custcode" type="STRING" size="256"/>
- <Column id="custnm" type="STRING" size="256"/>
- <Column id="rmrk" type="STRING" size="256"/>
- <Column id="ibgoymd" type="STRING" size="256"/>
- <Column id="ibgoseq" type="STRING" size="256"/>
- <Column id="yejungymd" type="STRING" size="256"/>
- <Column id="keumak" type="STRING" size="256"/>
- <Column id="gipyoymd" type="STRING" size="256"/>
- <Column id="flag" type="STRING" size="256"/>
- <Column id="gipyoseq" type="STRING" size="256"/>
- <Column id="gubun" type="STRING" size="256"/>
- <Column id="ymdwrite" type="STRING" size="256"/>
- <Column id="fromdd" type="STRING" size="256"/>
- <Column id="kyno" type="STRING" size="256"/>
- <Column id="seqwrite" type="STRING" size="256"/>
- <Column id="maxseq" type="STRING" size="256"/>
- <Column id="ymdaction" type="STRING" size="256"/>
- <Column id="flagbank" type="STRING" size="256"/>
- <Column id="entrregno" type="STRING" size="256"/>
- <Column id="aprvtype" type="STRING" size="256"/>
- <Column id="elecaprvyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="acctid"/>
- <Col id="kydate"/>
- <Col id="kyseq"/>
- <Col id="custcode"/>
- <Col id="custnm"/>
- <Col id="rmrk"/>
- <Col id="ibgoymd"/>
- <Col id="ibgoseq"/>
- <Col id="yejungymd"/>
- <Col id="keumak"/>
- <Col id="gipyoymd"/>
- <Col id="flag"/>
- <Col id="gipyoseq"/>
- <Col id="gubun"/>
- <Col id="ymdwrite"/>
- <Col id="fromdd"/>
- <Col id="kyno"/>
- <Col id="seqwrite"/>
- <Col id="maxseq"/>
- <Col id="ymdaction"/>
- <Col id="flagbank"/>
- <Col id="entrregno"/>
- <Col id="aprvtype"/>
- <Col id="elecaprvyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_send_save_grntlist1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep"/>
- <Dataset id="ds_cmb_flagbank" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="label" type="STRING" size="256"/>
- <Column id="value" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="label">은행</Col>
- <Col id="value">1</Col>
- </Row>
- <Row>
- <Col id="label">직불</Col>
- <Col id="value">2</Col>
- </Row>
- <Row>
- <Col id="label">자동</Col>
- <Col id="value">3</Col>
- </Row>
- <Row>
- <Col id="label">전자</Col>
- <Col id="value">4</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="cmb_instcd" propid="value" datasetid="ds_send_paydedu" columnid="instcd"/>
- <BindItem id="item1" compid="ipt_unsldd" propid="value" datasetid="ds_send_paydedu" columnid="fromdd"/>
- <BindItem id="item2" compid="input1" propid="value" datasetid="ds_send_paydedu" columnid="kyno"/>
- <BindItem id="item3" compid="input2" propid="value" datasetid="ds_send_paydedu" columnid="chk"/>
- <BindItem id="item4" compid="output1" propid="value" datasetid="ds_seqinfo_seqlist" columnid="flagseq"/>
- <BindItem id="item5" compid="ipt_totamt" propid="value" datasetid="ds_send_paydedu" columnid="totamt"/>
- </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 "mis_miscommonxp::MIS.xjs";
- include "mis_paybaseinfomngtxp::RWC001.xjs";
- include "mis_humtrafactmngtxp::RPB001.xjs";
- include "mis_miscommonxp::RAC001.xjs";
- include "mis_acntcommonxp::RAD001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /*-**************************************************************************************
- * Argument : N/A
- * Description :
- ****************************************************************************************/
- // function fOpenPopupDeptHelp(pControl, pInstance)
- // {
- // misfOpenPopUpList("02", pControl, "", pInstance);
- //
- // //model.refresh();
- //
- // }
- // function fOpenPopupHelp(pHelper, pControl, pInstance, pCdgrupid, pValueControl, pNodeName)
- // {
- // misfOpenPopUpList(pHelper, pControl, pCdgrupid, pInstance, pValueControl, pNodeName);
- //
- // //model.refresh();
- //
- // }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : 초기화
- ****************************************************************************************/
- function initialize(){
- misfGridInit(grd_grntpsn1);
- misfMsterDetailSet(grd_grntpsn1, null, "TRRAD02001" ,"Y");
- var curdate = utlf_getCurrentDate();
- cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
-
- var deptcd = sysf_getUserInfo("dutplcecd");
- var deptnm = sysf_getUserInfo("dutplcenm");
- ds_send_paydedu.setColumn( 0, "fromdd", curdate); //기표일자 setting
- misfComboInstCdListMulti("cmb_instcd",utlf_getCurrentDate(),"","N"); //기관코드 setting
- ds_send_paydedu.setColumn( 0, "chk", "1");
- misfMsterDetailRetrieve(); //조회 및 그리드 setting
- //2011.05.02 박준범 - maxseq를 setting한다.
- if( ds_main_grnt_grntlist2.rowcount > 0 ){
- ds_maxseq.setColumn( 0, "maxseq", ds_main_grnt_grntlist2.getColumn(0, "maxseq") );
- } else {
- ds_maxseq.setColumn( 0, "maxseq", "0");
- }
- //2011.04.28 박준범 - ymdaction 이 null 인 경우, 기표시 error 가 발생하므로 사전에 data를 구분하기 위해
- //빨강색이 되도록 한다.
- for(var i = 0 ; i < ds_main_grnt_grntlist2.rowcount ; i++) {
- if(utlf_isNull(ds_main_grnt_grntlist2.getColumn(i, "ymdaction"))) {
- // grd_grntpsn1.rowStyle(i, "all", "color") = "red";
- // grd_grntpsn1.rowStyle(i, "all", "font-weight") = "bold";
- grp_btn.cpt_alert.visible = true;
- }else{
- // grd_grntpsn1.rowStyle(i, "all", "color") = "";
- // grd_grntpsn1.rowStyle(i, "all", "font-weight") = "";
- }
- }
- ds_main_grnt_grntlist2.rowposition = 0;
- }
- // function Popup(){
- // var ymd = ds_main_grnt_grntlist1.getColumn(0, "junpyodate");
- // var mdeptcd = ds_main_grnt_grntlist1.getColumn(0, "makedeptcd");
- // var ydeptcd = ds_main_grnt_grntlist1.getColumn(0, "yogudeptcd");
- // if (ymd != "" && mdeptcd != "" && ydeptcd != ""){
- // ds_popdata.setColumn( 0, "junpyodate", ymd);
- // ds_popdata.setColumn( 0, "makedeptcd", mdeptcd);
- // ds_popdata.setColumn( 0, "yogudeptcd", ydeptcd);
- // ds_popdata.setColumn( 0, "pumgubun", "3");
- // frmf_modal("SPRAD00400", "SPRAD00400", "ds_popdata""-"ds_popdata"", "", "", "", "", "", "", "", "", "", "M");
- // }
- // }
- /*-**************************************************************************************
- * Argument : N/A
- * Description : gipyoseq setting
- ****************************************************************************************/
- function Setseq(){
- //2011.05.02 박준범 - seq 생성하는 것 새로 생성
- var curseq; //현재의 maxseq를 담기위한 변수
- if( ds_main_grnt_grntlist2.getColumn(ds_main_grnt_grntlist2.rowposition, "flag") == "Y" ) {
- curseq = parseInt(ds_maxseq.getColumn(0, "maxseq")) + 1;
- ds_main_grnt_grntlist2.setColumn(ds_main_grnt_grntlist2.rowposition, "gipyoseq", curseq);
- } else {
- curseq = parseInt(ds_maxseq.getColumn(0, "maxseq")) - 1;
- ds_main_grnt_grntlist2.setColumn(ds_main_grnt_grntlist2.rowposition, "gipyoseq", "");
- }
- ds_maxseq.setColumn( 0, "maxseq", curseq);
- //2011.05.02 박준범
- // 이미 기표된 것을 check 해지 후 저장하지 않은 상태에서 다시 check할 경우, row가 수정된 것으로 인식되는데,
- // 이 경우는 row가 수정된 것으로 인식되지 않도록 row의 status 를 강제 조정한다.
- //2011.05.04 박준범
- // 기표가 안된 것인데 check했다가 check를 해지했을 경우 row가 수정된 것으로 인식하므로
- // 이 경우도 row가 수정된 것으로 인식하시 않도록 row의 status를 강제 조정한다.
- if( (ds_main_grnt_grntlist2.getColumn(ds_main_grnt_grntlist2.rowposition, "flag") == "Y" && !utlf_isNull(ds_main_grnt_grntlist2.getColumn(ds_main_grnt_grntlist2.rowposition, "gipyoymd")))
- || (ds_main_grnt_grntlist2.getColumn(ds_main_grnt_grntlist2.rowposition, "flag") == "N" && utlf_isNull(ds_main_grnt_grntlist2.getColumn(ds_main_grnt_grntlist2.rowposition, "gipyoymd"))) ) {
- grdf_setStatus(grd_grntpsn1, "N", [ds_main_grnt_grntlist2.rowposition]);
- }
- }
-
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Description : 화면 처음 초기화시 폼초기화
- ****************************************************************************************/
- function SMRAD02000_onload(obj:Form, e:LoadEventInfo) {
- frmf_initForm(obj);
- //grdf_initGrid(grd_XXX);
- //grdf_setGridSort(grd_XXX);
- grdf_setRowTypeIcon(grd_grntpsn1, 0);
- initialize();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 조회
- ****************************************************************************************/
- function btn_search_onclick(obj:Button, e:ClickEventInfo) {
- var totamt = 0; //금액총계
- grp_btn.cpt_alert.visible = false;
- ipt_totamt.value = "";
- ds_send_paydedu.setColumn( 0, "chk", "2");
- misfMsterDetailRetrieve();
- //2011.05.02 박준범 - maxseq를 setting한다.
- if( ds_main_grnt_grntlist2.rowcount > 0 ){
- ds_maxseq.setColumn( 0, "maxseq", ds_main_grnt_grntlist2.getColumn(0, "maxseq") );
- } else {
- ds_maxseq.setColumn( 0, "maxseq", "0");
- }
- //2011.04.28 박준범 - ymdaction 이 null 인 경우, 기표시 error 가 발생하므로 사전에 data를 구분하기 위해
- // 빨강색이 되도록 한다.
- for(var i = 0 ; i < ds_main_grnt_grntlist2.rowcount ; i++) {
- if(utlf_isNull(ds_main_grnt_grntlist2.getColumn(i, "ymdaction"))) {
- // grd_grntpsn1.rowStyle(i, "all", "color") = "red";
- // grd_grntpsn1.rowStyle(i, "all", "font-weight") = "bold";
- grp_btn.cpt_alert.visible = true;
- } else {
- // grd_grntpsn1.rowStyle(i, "all", "color") = "";
- // grd_grntpsn1.rowStyle(i, "all", "font-weight") = "";
- }
- //2012.03.02 박준범 - 전표처리된 것을 예정일자,금액을 변경하여 저장하면 전표가 또 생성되는 오류가 발생함
- // 그래서 전표처리가 된 것은 예정일자,금액을 변경하지 못하도록 컬럼 disable처리함
- // 전표처리 후 예정일자의 변경은 "예정일자 일괄변경" 프로그램을 사용토록 함
- if(ds_main_grnt_grntlist2.getColumn(i, "flag") == "Y") {
- misfSetReadOnlyCol(grd_grntpsn1, "yejungymd,keumak", true, i);
- //2013.06.18. 기표처리 후 지급처를 수정할 수 있기 때문에 comment처리
- //grd_grntpsn1.cellAttribute("disabled", i, grd_grntpsn1.colRef("flagbank") ) = "true"; //2013.06.12 박준범-Grid에 지급처를 추가하면서 추가
- totamt = parseFloat(totamt) + parseFloat(ds_main_grnt_grntlist2.getColumn(i, "keumak"));
- } else {
- misfSetReadOnlyCol(grd_grntpsn1, "yejungymd,keumak", false, i);
- //2013.06.18. 기표처리 후 지급처를 수정할 수 있기 때문에 comment처리
- //grd_grntpsn1.cellAttribute("disabled", i, grd_grntpsn1.colRef("flagbank") ) = "false"; //2013.06.12 박준범-Grid에 지급처를 추가하면서 추가
- }
- }
- ipt_totamt.value = totamt;
- ds_main_grnt_grntlist2.rowposition = 0;
- }
- /****************************************************************************************
- * Components : Edit
- * Description : 검색어 입력 후 처리
- ****************************************************************************************/
- function input1_onkeyup(obj:Edit, e:KeyEventInfo) {
- if(e.keycode == 13) {
- obj.updateToDataset();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 엑셀저장
- ****************************************************************************************/
- function button1_onclick(obj:Button, e:ClickEventInfo) {
- misfSaveExcel(grd_grntpsn1, "excel");
- }
- /****************************************************************************************
- * Components : Button
- * Description : 저장
- ****************************************************************************************/
- function grp_btn_button36_onclick(obj:Button, e:ClickEventInfo) {
- var success = misfSave("TXRAD02001");
- if (success){
- //2011.05.02 박준범 - 저장 후 다시 조회 루틴을 실행. 그렇지 않으면 삭제,저장 후 기표일자가 남아있어
- // 다시 check 하여 저장하면 기존에 그리드에 남아있던 일자로 전표가 또 발생하게 된다.
- btn_search.click();
- }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 초기화(사용안함)
- ****************************************************************************************/
- function grp_btn_button35_onclick(obj:Button, e:ClickEventInfo) {
- // ds_main_grnt_grntlist1.clearData();
- // grd_grntpsn1.enable = true;
- // ipt_unsldd.enable = true;
- // input4.enable = true;
- // input14.enable = false;
- // input15.enable = false;
- // input10.enable = false;
- // ds_send_paydedu.setColumn( 0, "pumno1", "");
- // ds_send_paydedu.setColumn( 0, "pumno2", "");
- //
- // initialize();
- }
- /****************************************************************************************
- * Components : Button
- * Description : 출력(사용안함)
- ****************************************************************************************/
- function grp_btn_button3_onclick(obj:Button, e:ClickEventInfo) {
- // if( sysf_messageBox("출력하시겠습니까" , "Q99" ) == 6 ){
- // var objDOM = rptf_createDOM();
- // var objParam = new Object();
- // rptf_setNodeListToDOM(objDOM, "/root/main/grnt/grntlist3" , ds_main_grnt_grntlist2);
- // objParam.xml_data_XML1 = objDOM.documentElement.source;
- // var option = "open=1;save=1;directprint=0;printdialog=1;print=1;zoom=0";
- // rptf_exeReportPreview30(["RPRAD01501"],[objParam], option);
- // }
- }
- /****************************************************************************************
- * Components : Button
- * Description : 지급처 일괄변경
- ****************************************************************************************/
- function grp_btn_btn_change_onclick(obj:Button, e:ClickEventInfo) {
- frmf_modal("SPRAD00200", "SPRAD00200", "", "", "", "", "", "", "", "", "", "", "M"); //미전환
- }
- /****************************************************************************************
- * Components : Button
- * Description : 확인건 일괄체크
- ****************************************************************************************/
- function grp_btn_btn_batch_onclick(obj:Button, e:ClickEventInfo) {
- var totamt = 0; //금액총계
- for(var i = 0; i < ds_main_grnt_grntlist2.rowcount; i++) {
- if( ds_main_grnt_grntlist2.getColumn(i, "elecaprvyn") == "Y" && ds_main_grnt_grntlist2.getColumn(i, "flag") != "Y" ) {
- // 그리드의 row중 ymdaction 컬럼이 null 인 것은 기표시 Error가 발생하므로,
- // 기표대상으로 선택되지 않도록 처리하고, Message를 발생시켜 정보통신실에서 처리하도록 한다.
- if( utlf_isNull(ds_main_grnt_grntlist2.getColumn(i, "ymdaction")) ) {
- sysf_messageBox("기표불가한 자료가 포함되어 있어 작업을 중단합니다. 정보통신실로 연락하셔서 조치 후 기표 가능합니다.", "E999", "");
- ipt_totamt.value = "";
- return;
- }
- ds_main_grnt_grntlist2.setColumn(i, "flag", "Y");
- grdf_setStatus(grd_grntpsn1, "U", [i]);
- // Setseq를 call 하기 위해 focus 위치를 옮김
- ds_main_grnt_grntlist2.rowposition = i;
- // grd_grntpsn1.col = grd_grntpsn1.colRef("flag");
- Setseq(); //gipyoseq setting
- totamt = parseFloat(totamt) + parseFloat(ds_main_grnt_grntlist2.getColumn(i, "keumak"));
- }
- }
- ipt_totamt.value = totamt;
- }
- function ds_main_grnt_grntlist2_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid=="flag") {
- obj.setColumn(e.row,e.columnid,(e.newvalue=="Y"||e.newvalue==1)?"Y":"N");
-
- //2011.04.29 박준범
- // 그리드의 row중 ymdaction 컬럼이 null 인 것은 기표시 Error가 발생하므로,
- // 기표대상으로 선택되지 않도록 처리하고, Message를 발생시켜 정보통신실에서 처리하도록 한다.
- if( utlf_isNull(obj.getColumn(e.row, "ymdaction")) ) {
- obj.setColumn( e.row, "flag", "N");
- grdf_setStatus(grd_grntpsn1, "N", [e.row]);
- sysf_messageBox("기표불가한 자료입니다. 정보통신실로 연락하셔서 조치 후 기표 가능합니다.", "E999", "");
- return;
- }
- Setseq(); //gipyoseq setting
- }
- }
- function ds_send_paydedu_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columid=="kyno") {
- //2011.06.02 박준범 - 검색어 부분에 값이 있을 경우에는 아래 findrow 작업을 하도록 수정
- // 값이 없는 경우, findrow를 실행하면 첫 row를 찾아 check하는 오류 방지
- if (utlf_isNull(e.newvalue)) return;
- var kyno = e.newvalue;
- var irow = ds_main_grnt_grntlist2.findRow("kyno", kyno);
- if (irow > -1){
- ds_main_grnt_grntlist2.rowposition = irow;
- grd_grntpsn1.vscrollbar.pos = idx;
- if (ds_main_grnt_grntlist2.getColumn(irow, "flag") == "N"){
- //2011.05.04 박준범
- // 그리드의 row중 ymdaction 컬럼이 null 인 것은 기표시 Error가 발생하므로,
- // 기표대상으로 선택되지 않도록 처리하고, Message를 발생시켜 정보통신실에서 처리하도록 한다.
- if( utlf_isNull(ds_main_grnt_grntlist2.getColumn(irow, "ymdaction")) ) {
- sysf_messageBox("기표불가한 자료입니다. 정보통신실로 연락하셔서 조치 후 기표 가능합니다.", "E999", "");
- return;
- }
- ds_main_grnt_grntlist2.setColumn( irow , "flag", "Y");
- grdf_setStatus(grd_grntpsn1, "U", [irow]);
- Setseq();
- }
- }
- }
- }
- /****************************************************************************************
- * Components : Calendar
- * Description : 기표일자 변경
- ****************************************************************************************/
- function ipt_unsldd_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- btn_search.click();
- }
- ]]></Script>
- </Form>
- </FDL>
|