123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRFC00403" position="absolute 0 0 1199 784" titletext="부서별 물품보유현황 제출내역" oninit="SMRFC00403_oninit" onload="SMRFC00403_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="부서별 물품보유현황 제출내역" class="tit_1" position="absolute 0 0 250 25"/>
- <Shape id="line16" class="line_2" position="absolute 0 44 1195 50" anchor="left top right"/>
- <Button id="btn_save" taborder="1" text="저장" class="btn4" position="absolute 1138 23 1194 45" anchor="top right" onclick="btn_save_onclick"/>
- <Div id="grp_sea" anchor="left top right" taborder="2" class="div_SA2" position="absolute 0 48 1195 88">
- <Layouts>
- <Layout>
- <Static id="cap_instcd" text="기관코드 :" class="search_name" position="absolute 15 11 101 28"/>
- <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1107 7 1113 32" anchor="top right"/>
- <Static id="cap_deptcd" text="기준년도 :" class="search_name" position="absolute 511 11 601 28"/>
- <Button id="btn_search" taborder="3" text="조회" class="btn1" position="absolute 1125 8 1181 30" onclick="grp_sea_btn_search_onclick" anchor="top right"/>
- <Combo id="cmb_instcd" taborder="4" class="combo_essential" enable="false" position="absolute 108 10 346 29" onitemchanged="grp_sea_cmb_instcd_onitemchanged"/>
- <Edit id="ipt_yyyy" taborder="5" autoselect="true" autoskip="true" class="input_search" position="absolute 605 10 710 29" maxlength="4" style="align:center middle;" onkeydown="grp_sea_ipt_yyyy_onkeydown" onkillfocus="grp_sea_ipt_yyyy_onkillfocus"/>
- </Layout>
- </Layouts>
- </Div>
- <Shape id="line2" class="line_10" position="absolute 0 133 1195 139" anchor="left top right"/>
- <Static id="caption8" text="부서별 물품 보유현황 제출 리스트" class="tit_2" position="absolute 0 117 232 140"/>
- <Button id="btn_grdadd" taborder="3" text="행추가" class="btn2" position="absolute 240 114 293 133" onclick="btn_grdadd_onclick" visible="false"/>
- <Button id="btn_grddel" taborder="4" text="행삭제" class="btn2" visible="false" position="absolute 296 114 349 133" onclick="btn_grddel_onclick"/>
- <Grid id="grd_deptgoodlist" taborder="5" binddataset="ds_main_grid_deptgoodlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 0 138 1195 782" anchor="all">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="19"/>
- <Column size="60"/>
- <Column size="125"/>
- <Column size="257"/>
- <Column size="100"/>
- <Column size="502"/>
- </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="제출비고"/>
- </Band>
- <Band id="body">
- <Cell celltype="head"/>
- <Cell col="1" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:instcd"/>
- <Cell col="2" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:deptcd"/>
- <Cell col="3" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:deptnm"/>
- <Cell col="4" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:sendyn"/>
- <Cell col="5" displaytype="text" edittype="text" style="background:EXPR(bkColor);background2:EXPR(bkColor);" text="bind:cmt"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Button id="button1" taborder="6" text="엑셀저장" class="btn7" position="absolute 1115 114 1195 133" onclick="button1_onclick" anchor="top right"/>
- <Static id="caption1" text="* 최종제출 여부 - 무 : 저장내역(X), Y : 최종제출, N : 저장내역(O).최종제출(X)" position="absolute 627 113 1111 133" style="background:#c4e693ff;" anchor="top right"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256"/>
- <Column id="yyyy" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_grid_deptgoodlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="sendyn" type="STRING" size="256" sumtext="최종제출여부"/>
- <Column id="cmt" type="STRING" size="256" sumtext="비고"/>
- <Column id="yyyy" type="STRING" size="256" sumtext="년도"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_grid_deptgoodlist_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="instcd" type="STRING" size="256" sumtext="기관"/>
- <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
- <Column id="deptnm" type="STRING" size="256" sumtext="부서명"/>
- <Column id="sendyn" type="STRING" size="256" sumtext="최종제출여부"/>
- <Column id="cmt" type="STRING" size="256" sumtext="비고"/>
- <Column id="yyyy" 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"/>
- </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";
- function SMRFC00403_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRFC00403_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_deptgoodlist);
- grdf_setRowTypeIcon(grd_deptgoodlist, 0);
-
- fInitialize();
- }
- function fInitialize()
- {
- misfGridInit(grd_deptgoodlist);
-
- misfComboComCdList("C0048",grp_sea.cmb_instcd,"Y");
- grp_sea.cmb_instcd.value = sysf_getUserInfo("dutplceinstcd");
- ds_send.setColumn(0, "yyyy", String(utlf_getCurrentDate()).substring(0, 4));
-
- var dutplcecd = sysf_getUserInfo("dutplcecd");
- if(dutplcecd == "4020334000" || sysf_getUserInfo("userid") == "MIS" || sysf_getUserInfo("userid") == "99207" )
- {
- grp_sea.btn_search.click();
- }
- else
- {
- sysf_messageBox("물류팀외 조회할 수","I004");
- grp_sea.btn_search.enable = false;
- btn_save.enable = false;
- grp_sea.ipt_yyyy.enable = false;
- }
- }
- function grp_sea_cmb_instcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
- {
- grp_sea.btn_search.click();
- }
- function grp_sea_btn_search_onclick(obj:Button, e:ClickEventInfo)
- {
- var yyyy = parseInt(ds_send.getColumn(0, "yyyy"));
- var year = parseInt(utlf_getCurrentDate().substring(0, 4));
- if(yyyy < '2017' || yyyy > year ) {
- sysf_messageBox("조회할 수 없는 년도","I009");
- return;
- }else{
- var oParam = {};
- oParam.id = "TRRFC00405";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "reqGetDeptGoodlist";
- oParam.inds = "req=ds_send";
- oParam.outds = "ds_main_grid_deptgoodlist=deptgoodlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRFC00405";
- tranf_submit(oParam);
- ds_main_grid_deptgoodlist.addColumn("bkColor", "string");
-
- ds_main_grid_deptgoodlist.enableevent = false;
- ds_main_grid_deptgoodlist.updatecontrol = false;
- // 그리드 색깔표시
- for(var i = 0; i < ds_main_grid_deptgoodlist.rowcount; i++){
- var sendyn = ds_main_grid_deptgoodlist.getColumn(i, "sendyn");
- if(sendyn == "Y"){
- ds_main_grid_deptgoodlist.setColumn(i, "bkColor", "#FFFFCC");
- }else{
- ds_main_grid_deptgoodlist.setColumn(i, "bkColor", "#white");
- }
- }
- ds_main_grid_deptgoodlist.updatecontrol = true;
- ds_main_grid_deptgoodlist.enableevent = true;
- }
- }
- function button1_onclick(obj:Button, e:ClickEventInfo)
- {
- if( ds_main_grid_deptgoodlist.rowcount > 0 )
- {
- var fileName ="부서별 물품보유현황 제출내역_" + utlf_getCurrentDate();
- grdf_exportExcel(grd_deptgoodlist, fileName, "Sheet", "true", "", "");
- }
- else
- {
- sysf_messageBox("저장 데이터가","I004");
- }
- }
- function btn_grdadd_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grd_deptgoodlist, "A");
- }
- function btn_grddel_onclick(obj:Button, e:ClickEventInfo)
- {
- misfGridIUD(grd_deptgoodlist, "D");
- }
- function btn_save_onclick(obj:Button, e:ClickEventInfo)
- {
- var updtdata = grdf_getGridUpdateData(grd_deptgoodlist).rowcount;
-
- if (updtdata == 0)
- {
- sysf_messageBox("변경된 데이터가","I004");
- return;
- }
-
- if(!frmf_chkMdtGrid(grd_deptgoodlist, [1,2,3,4], ["기관", "부서코드", "부서명", "최종제출여부"])) return;
-
- //if(!checkKeyColumn("grd_deptgoodlist")) return;
-
- rtn = sysf_messageBox("", "Q002");
- if(rtn != "6" ) return false;
- // var oParam = {};
- // oParam.id = "TXRFC00403";
- // oParam.service = "purcbaseapp.PurcBaseMngt";
- // oParam.method = "setProplist";
- // oParam.inds = "req=ds_main_grid_deptgoodlist:u";
- // oParam.outds = "";
- // oParam.async = false;
- // //oParam.callback = "cf_TXRFC00403";
- //
- // tranf_submit(oParam);
-
- ds_main_grid_deptgoodlist.enableevent = false;
- ds_main_grid_deptgoodlist.updatecontrol = false;
-
- grdf_setStatusColumn(ds_main_grid_deptgoodlist, "mode");
-
- ds_main_grid_deptgoodlist.updatecontrol = true;
- ds_main_grid_deptgoodlist.enableevent = true;
-
- ds_main_grid_deptgoodlist_temp.assign(ds_main_grid_deptgoodlist);
-
- ds_main_grid_deptgoodlist_temp.enableevent = false;
- ds_main_grid_deptgoodlist_temp.updatecontrol = false;
-
- for( var i=0 ; i<ds_main_grid_deptgoodlist_temp.rowcount ; i++ ){
- if( ds_main_grid_deptgoodlist_temp.getColumn(i, "instcd") == "본원" ){
- ds_main_grid_deptgoodlist_temp.setColumn(i, "instcd", "031");
- }else{
- ds_main_grid_deptgoodlist_temp.setColumn(i, "instcd", "032");
- }
- }
-
- ds_main_grid_deptgoodlist_temp.updatecontrol = true;
- ds_main_grid_deptgoodlist_temp.enableevent = true;
-
- var oParam = {};
- oParam.id = "TXRFC00407";
- oParam.service = "purcbaseapp.PurcBaseMngt";
- oParam.method = "setDeptGoodlist";
- oParam.inds = "req=ds_main_grid_deptgoodlist_temp:u";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TXRFC00407";
- tranf_submit(oParam);
- grp_sea.btn_search.click();
- }
- function grp_sea_ipt_yyyy_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == "13"){
- obj.updateToDataset();
- grp_sea.ipt_yyyy.setFocus();
- misfNoFormat();
- grp_sea_btn_search_onclick();
- }
- }
- function grp_sea_ipt_yyyy_onkillfocus(obj:Edit, e:KillFocusEventInfo)
- {
- grp_sea_btn_search_onclick();
- }
- ]]></Script>
- </Form>
- </FDL>
|