123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRFC00402" position="absolute 0 0 1193 800" titletext="부서별 대상품목 관리(재물조사)" oninit="SMRFC00402_oninit" onload="SMRFC00402_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="부서별 대상품목 관리" class="tit_1" position="absolute 0 0 164 25"/>
- <Shape id="line16" class="line_2" position="absolute 0 44 1185 50" anchor="left top right"/>
- <Button id="btn_clear" taborder="1" text="초기화" class="btn4" visible="false" position="absolute 740 23 808 45" anchor="top right" onclick="btn_clear_onclick"/>
- <Button id="btn_cancel" taborder="2" text="승인취소" class="btn2" position="absolute 894 23 974 45" anchor="top right" onclick="btn_cancel_onclick"/>
- <Button id="btn_deptaprv" taborder="3" text="부서장승인&최종제출" class="btn2" position="absolute 976 23 1128 45" anchor="top right" onclick="btn_deptaprv_onclick"/>
- <Button id="btn_save" taborder="4" text="저장" class="btn4" position="absolute 1130 23 1186 45" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_sea" anchor="left top right" taborder="5" class="div_SA2" position="absolute 0 48 1185 88">
- <Layouts>
- <Layout>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1107 6 1113 31" anchor="top right"/>
- <Static id="cap_instcd" text="기관코드 :" class="search_name" position="absolute 15 11 101 28"/>
- <Combo id="cmb_instcd" taborder="7" class="combo_essential" enable="false" position="absolute 98 10 275 29" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
- <Edit id="ipt_yyyy" taborder="8" class="input_search" position="absolute 445 10 550 29" autoselect="true" autoskip="true" maxlength="4" style="align:center middle;"/>
- <Static id="cap_dept031" text="사용부서 :" class="search_name" position="absolute 698 11 782 28"/>
- <Edit id="ipt_mngtdeptcd_search" taborder="9" enable="true" position="absolute 780 10 875 29" autoselect="true" autoskip="true"/>
- <Button id="btn_mngtdeptcd_search" taborder="10" class="icon_search" position="absolute 878 12 894 28" onclick="grp_sea_btn_mngtdeptcd_search_onclick" enable="true"/>
- <Edit id="ipt_mngtdeptnm_search" taborder="11" position="absolute 897 10 1047 29" class="output" readonly="true"/>
- <Button id="btn_search" taborder="12" text="조회" class="btn1" position="absolute 1120 8 1176 30" anchor="top right" onclick="grp_sea_btn_search_onclick"/>
- <Static id="caption5" text="기준년도 :" class="search_name" position="absolute 363 11 449 28"/>
- <Button id="btn_next" taborder="13" position="absolute 574 12 589 27" class="icon_next" onclick="grp_sea_btn_next_onclick"/>
- <Button id="btn_before" taborder="14" class="icon_pre" position="absolute 558 12 573 27" onclick="grp_sea_btn_before_onclick"/>
- <Static id="cap_dept032" text="설치장소 :" class="search_name" position="absolute 698 11 782 28"/>
- </Layout>
- </Layouts>
- </Div>
- <Static id="caption11" text="재물조사 정보" class="tit_2" position="absolute 0 103 205 126" onclick="caption11_onclick"/>
- <Div id="group1" taborder="6" style="background:#fffbf2ff;border:1 solid #ffd799ff ;" position="absolute 0 123 1185 183" anchor="left top right">
- <Layouts>
- <Layout>
- <Static id="caption12" text="부서 확인기간 :" class="cell_1" position="absolute 225 4 330 27"/>
- <MaskEdit id="input8" taborder="9" mask="####-##-##" maskchar=" " enable="false" position="absolute 333 5 438 24" style=":disabled {align:center middle;}" type="string" trimtype="both" displaynulltext=" " autoselect="true"/>
- <MaskEdit id="input9" taborder="10" mask="####-##-##" maskchar=" " enable="false" position="absolute 457 5 562 24" style=":disabled {align:center middle;}" type="string" trimtype="both" displaynulltext=" " autoselect="true"/>
- <Static id="caption13" text="기준일자 :" class="cell_1" position="absolute 10 4 100 27"/>
- <Edit id="input10" taborder="11" enable="false" position="absolute 103 5 195 24" style=":disabled {align:center middle;}" autoselect="true"/>
- <Static id="caption14" text="사용여부 :" class="cell_1" position="absolute 590 30 670 53" visible="false"/>
- <Edit id="input11" taborder="12" enable="false" position="absolute 673 32 718 51" style=":disabled {align:center middle;}" visible="false" autoselect="true"/>
- <Static id="caption16" text="~" position="absolute 442 6 462 26"/>
- <Static id="caption1" text="부서장 승인자명 :" class="cell_1" position="absolute 590 4 703 27"/>
- <Static id="caption2" text="최종제출일자 :" class="cell_1" position="absolute 817 4 922 27"/>
- <Edit id="input1" taborder="13" enable="false" position="absolute 706 5 796 24" autoselect="true"/>
- <MaskEdit id="input2" taborder="14" mask="####-##-##" maskchar=" " enable="false" position="absolute 925 6 1010 25" style=":disabled {align:center middle;}" type="string" trimtype="both" autoselect="true" displaynulltext=" "/>
- <MaskEdit id="input3" taborder="15" mask="#,###" enable="false" position="absolute 104 32 209 51" style=":disabled {align:center middle;}" autoselect="true"/>
- <MaskEdit id="input4" taborder="16" mask="#,###" enable="false" position="absolute 228 32 333 51" style=":disabled {align:center middle;}" autoselect="true"/>
- <Static id="caption4" text="~" position="absolute 213 33 233 53"/>
- <Static id="caption3" text="기준금액 :" class="cell_1" position="absolute 10 31 100 54"/>
- </Layout>
- </Layouts>
- </Div>
- <Button id="button4" taborder="7" text="엑셀저장" class="btn7" position="absolute 1105 203 1185 222" anchor="top right" onclick="button4_onclick"/>
- <Shape id="line3" class="line_10" position="absolute 0 222 1185 228" anchor="left top right"/>
- <Grid id="grd_degolist" taborder="8" binddataset="ds_main_grid_degolist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 227 1185 790" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="22" band="left"/>
- <Column size="0"/>
- <Column size="100"/>
- <Column size="100"/>
- <Column size="216"/>
- <Column size="131"/>
- <Column size="35"/>
- <Column size="75"/>
- <Column size="70"/>
- <Column size="75"/>
- <Column size="60"/>
- <Column size="115"/>
- <Column size="90"/>
- <Column size="90"/>
- <Column size="0"/>
- <Column size="0"/>
- <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" text="자산코드"/>
- <Cell col="4" text="자산명"/>
- <Cell col="5" text="규격"/>
- <Cell col="6" text="수량"/>
- <Cell col="7" text="취득금액"/>
- <Cell col="8" text="취득일"/>
- <Cell col="9" text="잔존가"/>
- <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="부서확인(fromdd)"/>
- <Cell col="17" text="부서확인(todd)"/>
- <Cell col="18" text="사용여부"/>
- <Cell col="19" text="기준금액(min)"/>
- <Cell col="20" text="기준금액(max)"/>
- <Cell col="21" text="사용부서코드"/>
- <Cell col="22" text="부서장승인자명"/>
- <Cell col="23" text="최종제출일자"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" text="bind:acntcd"/>
- <Cell col="2" style="align:left top;padding:4 2 2 2;" text="bind:acntnm" wordwrap="word"/>
- <Cell col="3" text="bind:fixasetcd"/>
- <Cell col="4" style="align:left;" text="bind:goodflaghngnm"/>
- <Cell col="5" style="align:left;" text="bind:goodspec"/>
- <Cell col="6" text="bind:goodqty"/>
- <Cell col="7" displaytype="number" text="bind:possnamt"/>
- <Cell col="8" displaytype="date" text="bind:possndd" calendardisplaynulltype="nulltext"/>
- <Cell col="9" displaytype="number" text="bind:janjonsak"/>
- <Cell col="10" displaytype="combo" edittype="combo" style="align:center middle;background:#c4e693ff;" text="bind:status" combodataset="ds_cmb_status" combocodecol="value" combodatacol="label"/>
- <Cell col="11" displaytype="text" edittype="text" style="background:#c4e693ff;" text="bind:remark"/>
- <Cell col="12" text="bind:mngtdeptnm"/>
- <Cell col="13" text="bind:installplcenm"/>
- <Cell col="14" text="bind:yyyy"/>
- <Cell col="15" text="bind:basedd"/>
- <Cell col="16" text="bind:dfromdd"/>
- <Cell col="17" text="bind:dtodd"/>
- <Cell col="18" text="bind:useyn"/>
- <Cell col="19" text="bind:passnmin"/>
- <Cell col="20" text="bind:passnmax"/>
- <Cell col="21" text="bind:mngtdeptcd"/>
- <Cell col="22" text="bind:deptaprvnm"/>
- <Cell col="23" text="bind:senddd"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="caption10" text="부서별 대상품목 리스트" class="tit_2" position="absolute 0 206 205 227"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_send_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="yyyy" type="STRING" size="256"/>
- <Column id="mngtdeptcd_search" type="STRING" size="256"/>
- <Column id="mngtdeptnm_search" type="STRING" size="256"/>
- <Column id="dfromdd" type="STRING" size="256"/>
- <Column id="dtodd" type="STRING" size="256"/>
- <Column id="basedd" type="STRING" size="256"/>
- <Column id="useyn" type="STRING" size="256"/>
- <Column id="deptaprvnm" type="STRING" size="256"/>
- <Column id="senddd" type="STRING" size="256"/>
- <Column id="passnmin" type="STRING" size="256"/>
- <Column id="passnmax" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="yyyy"/>
- <Col id="mngtdeptcd_search"/>
- <Col id="mngtdeptnm_search"/>
- <Col id="dfromdd"/>
- <Col id="dtodd"/>
- <Col id="basedd"/>
- <Col id="useyn"/>
- <Col id="deptaprvnm"/>
- <Col id="senddd"/>
- <Col id="passnmin"/>
- <Col id="passnmax"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_grid_degolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_grid_degolist_oncolumnchanged">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
- <Column id="acntcd" type="STRING" size="256" sumtext="계정코드"/>
- <Column id="acntnm" type="STRING" size="256" sumtext="계정명"/>
- <Column id="fixasetcd" type="STRING" size="256" sumtext="자산코드"/>
- <Column id="goodflaghngnm" type="STRING" size="256" sumtext="자산명"/>
- <Column id="goodspec" type="STRING" size="256" sumtext="규격"/>
- <Column id="goodqty" type="STRING" size="256" sumtext="수량"/>
- <Column id="possnamt" type="STRING" size="256" sumtext="취득금액"/>
- <Column id="possndd" type="STRING" size="256" sumtext="취득일자"/>
- <Column id="janjonsak" type="STRING" size="256" sumtext="잔존가액"/>
- <Column id="status" type="STRING" size="256" sumtext="보유상태"/>
- <Column id="remark" type="STRING" size="256" sumtext="부서비고"/>
- <Column id="mngtdeptnm" type="STRING" size="256" sumtext="사용부서"/>
- <Column id="installplcenm" type="STRING" size="256" sumtext="설치부서"/>
- <Column id="yyyy" type="STRING" size="256" sumtext="년도"/>
- <Column id="basedd" type="STRING" size="256" sumtext="기준일자"/>
- <Column id="dfromdd" type="STRING" size="256" sumtext="부서확인(fromdd)"/>
- <Column id="dtodd" type="STRING" size="256" sumtext="부서확인(todd)"/>
- <Column id="useyn" type="STRING" size="256" sumtext="사용여부"/>
- <Column id="passnmin" type="STRING" size="256" sumtext="기준금액(min)"/>
- <Column id="passnmax" type="STRING" size="256" sumtext="기준금액(max)"/>
- <Column id="mngtdeptcd" type="STRING" size="256" sumtext="사용부서코드"/>
- <Column id="installplcecd" type="STRING" size="256" sumtext="설치장소코드"/>
- <Column id="deptaprvnm" type="STRING" size="256" sumtext="부서장승인자명"/>
- <Column id="senddd" type="STRING" size="256" sumtext="최종제출일자"/>
- <Column id="silstatus" type="STRING" size="256" sumtext="실사결과"/>
- <Column id="silcmt" type="STRING" size="256" sumtext="실사비고"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_cmb_status" 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>
- </Rows>
- </Dataset>
- <Dataset id="ds_temp_userinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="flag" type="STRING" size="256" sumtext="부서징여부"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_sea.cmb_instcd" propid="value" datasetid="ds_send" columnid="instcd"/>
- <BindItem id="item1" compid="grp_sea.ipt_yyyy" propid="value" datasetid="ds_send" columnid="yyyy"/>
- <BindItem id="item2" compid="grp_sea.ipt_mngtdeptcd_search" propid="value" datasetid="ds_send" columnid="mngtdeptcd_search"/>
- <BindItem id="item3" compid="grp_sea.ipt_mngtdeptnm_search" propid="value" datasetid="ds_send" columnid="mngtdeptnm_search"/>
- <BindItem id="item4" compid="group1.input10" propid="value" datasetid="ds_send" columnid="basedd"/>
- <BindItem id="item5" compid="group1.input8" propid="value" datasetid="ds_send" columnid="dfromdd"/>
- <BindItem id="item6" compid="group1.input9" propid="value" datasetid="ds_send" columnid="dtodd"/>
- <BindItem id="item7" compid="group1.input11" propid="value" datasetid="ds_send" columnid="useyn"/>
- <BindItem id="item8" compid="group1.input1" propid="value" datasetid="ds_send" columnid="deptaprvnm"/>
- <BindItem id="item9" compid="group1.input2" propid="value" datasetid="ds_send" columnid="senddd"/>
- <BindItem id="item10" compid="group1.input3" propid="value" datasetid="ds_send" columnid="passnmin"/>
- <BindItem id="item11" compid="group1.input4" propid="value" datasetid="ds_send" columnid="passnmax"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2017-06-19
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2017-06-19 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- include "com_commonxp::comm_main.xjs";
- include "mis_miscommonxp::MIS.xjs";
- var arErrorCode = new HashArray();
- function SMRFC00402_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRFC00402_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_degolist);
- grdf_setRowTypeIcon(grd_degolist, 0);
-
- fInitialize();
- }
- function fInitialize()
- {
- misfGridInit(grd_degolist);
-
- misfComboComCdList("C0048",grp_sea.cmb_instcd,"Y");
- grp_sea.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
-
- ds_send.enableevent = false;
-
- ds_send.setColumn(0, "yyyy", String(utlf_getCurrentDate()).substring(0, 4));
-
- ds_send.enableevent = true;
-
- if(sysf_getUserInfo("dutplceinstcd") == "031")
- {
- grp_sea.cap_dept031.visible = true;
- grp_sea.cap_dept032.visible = false;
- }
- else
- {
- grp_sea.cap_dept031.visible = false;
- grp_sea.cap_dept032.visible = true;
- }
-
- //misfMsterDetailSet(grd_degolist, null, "TRRFC00403","Y"); //마스터 설정
-
- grp_sea.ipt_mngtdeptcd_search.value = sysf_getUserInfo("dutplcecd");
- grp_sea.ipt_mngtdeptnm_search.value = sysf_getUserInfo("dutplcenm");
-
- grp_sea.btn_search.click();
- }
- function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function ds_send_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "yyyy")
- {
- var dd = e.newvalue;
- var dday = String(utlf_getCurrentDate()).substring(0, 4);
- if(dday != dd)
- {
- btn_deptaprv.enable = false;
- btn_save.enable = false;
- }
- else
- {
- Displayflag(); //버튼활성화 여부
- }
- }
- if(e.columnid == "mngtdeptcd_search")
- {
- grp_sea.ipt_mngtdeptcd_search.value = e.newvalue;
- grp_sea.ipt_mngtdeptcd_search.setFocus();
- misfSearchDept(grp_sea.ipt_mngtdeptnm_search);
- }
- }
- function Displayflag()
- {
- dsf_makeValue(ds_send, "emplno", "string", sysf_getUserInfo("userid"), 0);
-
- var oParam = {};
- oParam.id = "TRRFC00404";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetDeptaprvlist";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_temp_userinfo=userinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRRFC00404";
- tranf_submit(oParam);
- var flag = ds_temp_userinfo.getColumn(0, "flag");
- var deptaprvnm = ds_send.getColumn(0, "deptaprvnm");
- var dutplcecd = sysf_getUserInfo("dutplcecd");
- if (utlf_isNull(deptaprvnm))
- {
- btn_save.enable = true;
- if(!utlf_isNull(flag) || sysf_getUserInfo("userid") == "MIS" || dutplcecd == "2240000000")
- {
- btn_deptaprv.enable = true;
- }
- else
- {
- btn_deptaprv.enable = false;
- }
- }
- else
- {
- btn_save.enable = false;
- btn_deptaprv.enable = false;
- }
- if(dutplcecd == "4020334000")
- {
- if (!utlf_isNull(deptaprvnm))
- {
- btn_cancel.enable = true;
- }
- else
- {
- btn_cancel.enable = false;
- }
- }
- else
- {
- btn_cancel.visible = false;
- }
- }
- function grp_sea_btn_before_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send.getColumn(0, "yyyy");
- var cvtdate = dd.toDate("YYYY");
- var tobasedd = cvtdate.getAddDate(-2,"Y").getDateFormat("YYYY");
- var dday = String(utlf_getCurrentDate()).substring(0, 4);
-
- ds_send.setColumn(0, "yyyy", tobasedd)
- if(dday != tobasedd)
- {
- btn_deptaprv.enable = false;
- btn_save.enable = false;
- }
- else
- {
- Displayflag();
- }
- }
- function grp_sea_btn_next_onclick(obj:Button, e:ClickEventInfo)
- {
- var dd = ds_send.getColumn(0, "yyyy");
- var cvtdate = dd.toDate("YYYY");
- var tobasedd = cvtdate.getDateFormat("YYYY");
- var dday = String(utlf_getCurrentDate()).substring(0, 4);
-
- ds_send.setColumn(0, "yyyy", tobasedd);
- if(dday != tobasedd)
- {
- btn_deptaprv.enable = false;
- btn_save.enable = false;
- }
- else
- {
- Displayflag() ;
- }
- }
- function grp_sea_btn_mngtdeptcd_search_onclick(obj:Button, e:ClickEventInfo)
- {
- misfOpenPopUpList("02", grp_sea.ipt_mngtdeptcd_search,"","mngtdeptcd_search,mngtdeptnm_search");
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var oParam = {};
- oParam.id = "TRRFC00403";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetDegolist";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_grid_degolist=degolist";
- oParam.async = false;
- //oParam.callback = "cf_TRRFC00403";
- tranf_submit(oParam);
-
- var cnt = ds_main_grid_degolist.rowcount;
- if(cnt == 0)
- {
- sysf_messageBox("대상품목 리스트가 존재하지" ,"I011");
- }
- else
- {
- var yyyy = ds_main_grid_degolist.getColumn(0, "yyyy");
- var basedd = String(ds_main_grid_degolist.getColumn(0, "basedd"));
- var tbasedd = yyyy + "-" + basedd.substr(0,2) + "-" + basedd.substr(2,2);
- var dfromdd = ds_main_grid_degolist.getColumn(0, "dfromdd");
- var dtodd = ds_main_grid_degolist.getColumn(0, "dtodd");
- //var useyn = ds_main_grid_degolist.getColumn(0, "useyn");
- var passnmin = ds_main_grid_degolist.getColumn(0, "passnmin");
- var passnmax = ds_main_grid_degolist.getColumn(0, "passnmax");
- var deptaprvnm = ds_main_grid_degolist.getColumn(0, "deptaprvnm");
- var senddd = ds_main_grid_degolist.getColumn(0, "senddd");
- var dd = utlf_getCurrentDate();
- ds_send.setColumn(0, "basedd", tbasedd);
- ds_send.setColumn(0, "dfromdd", dfromdd);
- ds_send.setColumn(0, "dtodd", dtodd);
- //ds_send.setColumn(0, "useyn", useyn);
- ds_send.setColumn(0, "deptaprvnm", deptaprvnm);
- ds_send.setColumn(0, "senddd", senddd);
- ds_send.setColumn(0, "passnmin", passnmin);
- ds_send.setColumn(0, "passnmax", passnmax);
-
- var tbasedd = String(ds_send.getColumn(0, "basedd"));
- var ttbasedd = tbasedd.substr(0,4) ;
- var fbasedd = tbasedd.substr(0,4) + "-" + tbasedd.substr(4,2) + "-" + tbasedd.substr(6,2) ;
- if(dfromdd <= dd && dd <= dtodd)
- {
- Displayflag() ; //버튼활성화 여부
- sysf_messageBox("물품 보유상태의 기준일자는 " + tbasedd ,"I009");
- }
- else
- {
- if(ttbasedd < dd) { //과거
- btn_save.enable = false;
- btn_clear.enable = false;
- }else{ //올해
- if(sysf_getUserInfo("dutplceinstcd") == "032")
- {
- sysf_messageBox("부서확인 기간 또는 사용가능한 기간이 아닙니다. \n물류팀 담당자(T.2052)에 확인하세요! ");
- }
- else
- {
- sysf_messageBox("부서확인 기간 또는 사용가능한 기간이 아닙니다. \n물류팀 담당자(T.5948)에 확인하세요! ");
- }
- ds_main_grid_degolist.clearData();
- grp_sea.btn_search.enable = false;
- btn_save.enable = false;
- btn_clear.enable = false;
- }
- }
- }
- }
- function ds_main_grid_degolist_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- if(e.columnid == "status")
- {
- var status = e.newvalue;
- if(status == "3")
- {
- sysf_messageBox("불용 선택은 수리요구 후 6월 30일 이전에 담당부서에서\n폐기 판정된 물품에 한함.");
- return;
- }
- }
- }
- function button4_onclick(obj:Button, e:ClickEventInfo)
- {
- var deptnm = ds_send.getColumn(0, "mngtdeptnm_search");
-
- if( ds_main_grid_degolist.rowcount > 0)
- {
- var fileName ="("+ deptnm +")"+"재물대상품목_" + utlf_getCurrentDate();
- grdf_exportExcel(grd_degolist, fileName, "Sheet", "true", "", "");
- }
- else
- {
- sysf_messageBox("저장 데이터가","I004");
- }
- }
- function btn_clear_onclick(obj:Button, e:ClickEventInfo)
- {
- fInitialize();
- }
- function btn_cancel_onclick(obj:Button, e:ClickEventInfo)
- {
- var deptaprvnm = ds_send.getColumn(0, "deptaprvnm");
- if(utlf_isNull(deptaprvnm))
- {
- sysf_messageBox("부서장 승인되지", "E007")
- return;
- }
- else
- {
- for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
- {
- var deptaprvnm = ds_main_grid_degolist.getColumn(i, "deptaprvnm");
- ds_main_grid_degolist.setColumn(i, "deptaprvnm", "");
- ds_main_grid_degolist.setColumn(i, "senddd", "");
-
- ds_main_grid_degolist.updatecontrol = false;
- ds_main_grid_degolist.setRowType(i, "u");
- ds_main_grid_degolist.updatecontrol = true;
- }
-
- if ( sysf_messageBox("부서장승인취소를", "Q002") == 6 )
- {
- ds_main_grid_degolist.enableevent = false;
- ds_main_grid_degolist.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_grid_degolist, "mode");
-
- ds_main_grid_degolist.updatecontrol = true;
- ds_main_grid_degolist.enableevent = true;
-
- var oParam = {};
- oParam.id = "TXRFC00405";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "setDegolist";
- oParam.inds = "req=ds_main_grid_degolist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.typeStr = "mode";
- oParam.callback = "cf_TXRFC00405";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXRFC00405") > -1)
- {
- grp_sea.btn_search.click();
- }
- }
- }
- }
- function cf_TXRFC00405(sSvcId, nErrorCode, sErrorMsg)
- {
- arErrorCode.push(sSvcId, nErrorCode);
- if(nErrorCode < 0) return;
- }
- function btn_deptaprv_onclick(obj:Button, e:ClickEventInfo)
- {
- for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
- {
- var status = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "status"));
- var goodflaghngnm = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "goodflaghngnm"));
- var fixasetcd = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "fixasetcd"));
-
- if(utlf_isNull(status))
- {
- sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 보유상태 정보가 없습니다.\n부서장승인&최종제출 할 수","I004");
- return;
- }
- else if(status == "2")
- {
- if(sysf_getUserInfo("dutplceinstcd") == "032")
- {
- sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.2052) 확인 후 처리 요망");
- }
- else
- {
- sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.5948) 확인 후 처리 요망");
- }
- return;
- }
- else
- {
- ds_main_grid_degolist.setColumn(i, "deptaprvnm", sysf_getUserInfo("userid"));
- ds_main_grid_degolist.setColumn(i, "senddd", utlf_getCurrentDate());
- ds_main_grid_degolist.updatecontrol = false;
- ds_main_grid_degolist.setRowType(i, "u");
- ds_main_grid_degolist.updatecontrol = true;
- }
- }
-
- var dday = String(utlf_getCurrentDate()).substring(0, 4);
- var dd = ds_send.getColumn(0, "yyyy");
- if(dday != dd)
- {
- sysf_messageBox("기준년도가 올해만 저장","I006");
- return;
- }
- else
- {
- if ( sysf_messageBox("부서장승인&최종제출을", "Q002") == 6 )
- {
- ds_main_grid_degolist.enableevent = false;
- ds_main_grid_degolist.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_grid_degolist, "mode");
-
- ds_main_grid_degolist.updatecontrol = true;
- ds_main_grid_degolist.enableevent = true;
-
- var oParam = {};
- oParam.id = "TXRFC00405";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "setDegolist";
- oParam.inds = "req=ds_main_grid_degolist:u";
- oParam.outds = "";
- oParam.async = false;
- oParam.typeStr = "mode";
- oParam.callback = "cf_TXRFC00405";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXRFC00405") > -1)
- {
- grp_sea.btn_search.click();
- sysf_messageBox("부서장승인&최종제출이", "I002");
- }
- }
- }
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var updtdata = grdf_getGridUpdateData(grd_degolist);
-
- if (updtdata.rowcount == 0)
- {
- sysf_messageBox("변경된 데이터가","I004");
- return;
- }
-
- for(var i = 0; i < ds_main_grid_degolist.rowcount; i++)
- {
- var status = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "status"));
- var goodflaghngnm = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "goodflaghngnm"));
- var fixasetcd = utlf_transNullToEmpty(ds_main_grid_degolist.getColumn(i, "fixasetcd"));
- if(status == "2")
- {
- if(sysf_getUserInfo("dutplceinstcd") == "032")
- {
- sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.2052) 확인 후 처리 요망");
- }
- else
- {
- sysf_messageBox(parseInt(i+1)+"번째 " + "'" + goodflaghngnm +"("+ fixasetcd +")" + "'" + " 품목의 보유상태가 \n미보유일 경우 물류팀 담당자(T.5948) 확인 후 처리 요망");
- }
- return;
- }
- }
- var dday = String(utlf_getCurrentDate()).substring(0, 4);
- var dd = ds_send.getColumn(0, "yyyy");
-
- ds_main_grid_degolist.enableevent = false;
- ds_main_grid_degolist.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_grid_degolist, "mode");
-
- ds_main_grid_degolist.updatecontrol = true;
- ds_main_grid_degolist.enableevent = true;
-
- if(dday != dd)
- {
- sysf_messageBox("기준년도가 올해만 저장","I006");
- return;
- }
- else
- {
- var oParam = {};
- oParam.id = "TXRFC00405";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "setDegolist";
- oParam.inds = "req=ds_main_grid_degolist";
- oParam.outds = "";
- oParam.async = false;
- oParam.typeStr = "mode";
- //oParam.callback = "cf_TXRFC00405";
- tranf_submit(oParam);
-
- grp_sea.btn_search.click();
- sysf_messageBox("저장", "I002");
- }
- }
- function caption11_onclick(obj:Static, e:ClickEventInfo)
- {
- for(var i = 0; i < ds_main_grid_degolist.rowcount; i++){
- ds_main_grid_degolist.setColumn(i, "status", "1");
- ds_main_grid_degolist.setRowType(i, "u");
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|