123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMRSO20500" position="absolute 0 0 745 495" titletext="월마감(부서재고)" oninit="SMRSO20500_oninit" onload="SMRSO20500_onload">
- <Layouts>
- <Layout>
- <Static id="caption6" text="월마감(부서재고)" class="tit_1" position="absolute 0 0 230 25"/>
- <Button id="btn_distriendY" taborder="1" text="물류마감작업" class="btn4" visible="false" position="absolute 128 27 232 49" anchor="left top" onclick="btn_distriendY_onclick"/>
- <Button id="btn_distriendN" taborder="2" text="물류마감취소" class="btn4" visible="false" position="absolute 233 27 337 49" anchor="left top" onclick="btn_distriendN_onclick"/>
- <Button id="btn_exec" taborder="3" text="실행" class="btn4" position="absolute 338 27 394 49" anchor="left top" onclick="btn_exec_onclick"/>
- <Shape id="line1" class="line_10" position="absolute 0 89 400 95" anchor="left top"/>
- <Static id="caption1" text="부서재고 월마감 작업" class="tit_2" position="absolute 0 73 180 95" anchor="left top"/>
- <Shape id="line2" class="line_1" position="absolute 0 194 400 200" anchor="left top"/>
- <Static id="caption26" text="부 서" class="cell_1" position="absolute 0 146 110 169" anchor="left top"/>
- <Shape id="line4" class="line_2" position="absolute 0 142 400 148" anchor="left top" onclick="line4_onclick"/>
- <Shape id="line5" class="line_2" position="absolute 0 168 400 174" anchor="left top"/>
- <Static id="cap_purccondd" text="기관코드" class="cell_1" position="absolute 0 94 110 117" anchor="left top"/>
- <Static id="caption5" text="마감년월" class="cell_1" position="absolute 0 120 110 143"/>
- <Static id="cap_concmpycd1" text="작업구분" class="cell_1" position="absolute 0 172 110 195" anchor="left top"/>
- <Shape id="line10" class="line_2" position="absolute 0 116 400 122" anchor="left top"/>
- <Combo id="cmb_instcd" taborder="4" innerdataset="@ds_main_init" codecolumn="cnstcd" datacolumn="cnstnm" class="combo_default" enable="false" position="absolute 112 96 255 115" anchor="left top"/>
- <Calendar id="ipt_endmonth" taborder="5" position="absolute 112 122 255 141" mask="yyyy-mm" autoselect="true" autoskip="true" dateformat="yyyy-MM" value="null" editformat="yyyy-MM" onchanged="ipt_endmonth_onchanged"/>
- <Radio id="rdo_workyn" taborder="6" columncount="2" rowcount="0" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 114 174 259 194" anchor="left top">
- <Dataset id="innerdataset">
- <ColumnInfo>
- <Column id="codecolumn"/>
- <Column id="datacolumn"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="codecolumn">Y</Col>
- <Col id="datacolumn">마감작업</Col>
- </Row>
- <Row>
- <Col id="codecolumn">N</Col>
- <Col id="datacolumn">마감취소</Col>
- </Row>
- </Rows>
- </Dataset>
- </Radio>
- <Edit id="ipt_deptcd" taborder="7" class="input_default" position="absolute 112 148 182 167" anchor="left top" autoselect="true" autoskip="true" onkeydown="ipt_deptcd_onkeydown"/>
- <Edit id="opt_deptnm" taborder="8" readonly="true" position="absolute 202 148 390 167" anchor="left top" class="output" onsetfocus="opt_deptnm_onsetfocus"/>
- <Button id="btn_deptcd" taborder="9" class="icon_search" position="absolute 184 150 200 166" anchor="left top" onclick="btn_deptcd_onclick"/>
- <Grid id="grd_magam" taborder="10" binddataset="ds_main_magam_magamlist" autoenter="select" useinputpanel="false" cellsizingtype="col" autofittype="col" position="absolute 410 50 740 490" anchor="all" visible="false">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="23"/>
- <Column size="184"/>
- <Column size="100"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="부서"/>
- <Cell col="2" text="마감여부"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="currow+1"/>
- <Cell col="1" style="background:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');background2:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');" text="bind:deptnm"/>
- <Cell col="2" style="background:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');background2:EXPR(magamyn == 'Y' ? '#ccffff' : '#ffff99');" text="bind:magamyn"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- <Static id="cap_magam" position="absolute 5 205 400 235"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_send_search" 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="endmonth" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- <Column id="deptnm" type="STRING" size="256"/>
- <Column id="workyn" type="STRING" size="256"/>
- <Column id="endyn" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="endmonth"/>
- <Col id="deptcd"/>
- <Col id="deptnm"/>
- <Col id="workyn"/>
- <Col id="endyn"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_init" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="cnstnm" type="STRING" size="256"/>
- <Column id="cnstcd" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_main_magam_magamlist" 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="magamyn" type="STRING" size="256" sumtext="마감여부"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_magamsearch" 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="dd" type="STRING" size="256"/>
- <Column id="deptcd" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="instcd"/>
- <Col id="dd"/>
- <Col id="deptcd"/>
- </Row>
- </Rows>
- </Dataset>
- <Dataset id="ds_distrimagam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="endyn" type="STRING" size="256" sumtext="마감여부"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_magam" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="magamyn" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="cmb_instcd" propid="value" datasetid="ds_send_search" columnid="instcd"/>
- <BindItem id="item1" compid="ipt_endmonth" propid="value" datasetid="ds_send_search" columnid="endmonth"/>
- <BindItem id="item2" compid="ipt_deptcd" propid="value" datasetid="ds_send_search" columnid="deptcd"/>
- <BindItem id="item3" compid="opt_deptnm" propid="value" datasetid="ds_send_search" columnid="deptnm"/>
- <BindItem id="item4" compid="rdo_workyn" propid="value" datasetid="ds_send_search" columnid="workyn"/>
- </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 SMRSO20500_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj);
- }
- function SMRSO20500_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_initGrid(grd_magam);
-
- misfComboInstCdListMulti("cmb_instcd",utlf_getCurrentDate(),"","N");
- misfGridInit(grd_magam);
- misfGetAndSetUserInfo();
-
- ds_send_search.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_send_search.setColumn(0, "endmonth", String(utlf_getCurrentDate()).substr(0,6));
- ds_send_search.setColumn(0, "workyn", "Y");
- ds_send_search.setColumn(0, "deptcd", DUT_PLCEDEPT_CD);
- ds_send_search.setColumn(0, "deptnm", DUT_PLCEDEPT_NM);
-
- if(DUT_PLCEDEPT_CD == "4020334000")
- {
- btn_distriendY.visible = true;
- btn_distriendN.visible = true;
- }
- else
- {
- btn_distriendY.visible = false;
- btn_distriendN.visible = false;
- }
-
- ds_send_magamsearch.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
- ds_send_magamsearch.setColumn(0, "dd", String(utlf_getCurrentDate()).substr(0,6));
- ds_send_magamsearch.setColumn(0, "deptcd", DUT_PLCEDEPT_CD);
-
- reMagamYN();
-
- reEndDeptList();
- }
- var distriyn = "N";
-
- function reMagamYN()
- {
- cap_magam.value = "";
-
- var oParam = {};
- oParam.id = "TRRSO21003";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDistriDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_distrimagam=distrimagam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21003";
- tranf_submit(oParam);
- }
- function cf_TRRSO21003(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- var endyn = ds_distrimagam.getColumn(0, "endyn");
-
- if(endyn == "Y")
- {
- cap_magam.value = "물류마감이 되어있습니다.";
- btn_distriendY.enable = false;
- btn_distriendN.enable = true;
- btn_exec.enable = false;
- distriyn = "Y";
- }
- else
- {
- cap_magam.value = "";
- btn_distriendY.enable = true;
- btn_distriendN.enable = false;
- btn_exec.enable = true;
- distriyn = "N";
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_magam=magam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21002";
- tranf_submit(oParam);
- }
- }
- }
- function cf_TRRSO21002(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- var magamyn = ds_magam.getColumn(0, "magamyn");
-
- if(magamyn == "Y")
- {
- cap_magam.value = "해당부서는 현재 마감되어있습니다.";
- rdo_workyn.value = "N"
- }
- else
- {
- cap_magam.value = "";
- rdo_workyn.value = "Y"
- }
- }
- }
- function reEndDeptList()
- {
- var oParam = {};
- oParam.id = "TRRSO20502";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptMagamYN";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "ds_main_magam_magamlist=magamlist";
- oParam.async = false;
- //oParam.callback = "cf_TRRSO20502";
- tranf_submit(oParam);
- }
- function ipt_endmonth_onchanged(obj:Calendar, e:ChangeEventInfo)
- {
- var date = String(obj.value).substr(0, 6);
-
- ds_send_search.setColumn(0, "endmonth", date);
-
- ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
- ds_send_magamsearch.setColumn(0, "dd", date);
- ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
-
- reMagamYN();
- reEndDeptList();
- }
- function btn_deptcd_onclick(obj:Button, e:ClickEventInfo)
- {
- var recv_list = "deptcd,deptnm";
- misfOpenPopUpList("02", ds_send_search,"", recv_list) ;
-
- if(distriyn == "Y")
- {
- return;
- }
-
- if(!utlf_isNull(opt_deptnm.value))
- {
- ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
- ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
- ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_magam=magam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21002";
- tranf_submit(oParam);
- }
- }
- function opt_deptnm_onsetfocus(obj:Edit, e:SetFocusEventInfo)
- {
- misfValidationCheck("02", "", "deptcd,deptnm" );
-
- if(distriyn == "Y")
- {
- return;
- }
-
- if(!utlf_isNull(opt_deptnm.value))
- {
- ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
- ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
- ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_magam=magam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21002";
- tranf_submit(oParam);
- }
- }
- function btn_distriendY_onclick(obj:Button, e:ClickEventInfo)
- {
- if(String(ipt_endmonth.value).length < 6)
- {
- sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
- ipt_endmonth.setFocus();
- return;
- }
- ds_send_search.setColumn(0, "endyn", "Y");
-
- var oParam = {};
- oParam.id = "TXRSO20502";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeDistriMagamDept";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO20502";
- tranf_submit(oParam);
- }
- function cf_TXRSO20502(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- var oParam = {};
- oParam.id = "TRRSO21003";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDistriDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_distrimagam=distrimagam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21003";
- tranf_submit(oParam);
- }
- }
- function btn_distriendN_onclick(obj:Button, e:ClickEventInfo)
- {
- if(String(ipt_endmonth.value).length < 6)
- {
- sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
- ipt_endmonth.setFocus();
- return;
- }
- ds_send_search.setColumn(0, "endyn", "N");
-
- var oParam = {};
- oParam.id = "TXRSO20502";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeDistriMagamDept";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO20502";
- tranf_submit(oParam);
- }
- function btn_exec_onclick(obj:Button, e:ClickEventInfo)
- {
- if(String(ipt_endmonth.value).length < 6)
- {
- sysf_messageBox("마감년월이 올바로 선택되지 않았습니다. \n\n먼저 마감년월을 선택하십시요.", "E999", "");
- ipt_endmonth.setFocus();
- return;
- }
-
- if(utlf_isNull(ipt_deptcd.value))
- {
- sysf_messageBox("부서가 선택되지 않았습니다. \n\n부서를 선택하십시요.", "E999", "");
- ipt_deptcd.setFocus();
- return;
- }
- if(distriyn = "N")
- {
- var oParam = {};
- oParam.id = "TXRSO20501";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqExeMagamDept";
- oParam.inds = "req=ds_send_search";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXRSO20501";
- tranf_submit(oParam);
- }
- }
- function cf_TXRSO20501(sSvcId, nErrorCode, sErrorMsg)
- {
- if(nErrorCode < 0)
- {
- return;
- }
- else
- {
- ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
- ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
- ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
-
- reMagamYN();
- reEndDeptList();
- }
- }
- function ipt_deptcd_onkeydown(obj:Edit, e:KeyEventInfo)
- {
- if(e.keycode == 13)
- {
- obj.updateToDataset();
-
- misfValidationCheck("02", "", "deptcd,deptnm" );
-
- if(distriyn == "Y")
- {
- return;
- }
-
- if(!utlf_isNull(opt_deptnm.value))
- {
- ds_send_magamsearch.setColumn(0, "instcd", cmb_instcd.value);
- ds_send_magamsearch.setColumn(0, "dd", ds_send_search.getColumn(0, "endmonth"));
- ds_send_magamsearch.setColumn(0, "deptcd", ipt_deptcd.value);
-
- var oParam = {};
- oParam.id = "TRRSO21002";
- oParam.service = "deliveapp.DeliveMngt";
- oParam.method = "reqGetDeptJaegoMagamChk";
- oParam.inds = "req=ds_send_magamsearch";
- oParam.outds = "ds_magam=magam";
- oParam.async = false;
- oParam.callback = "cf_TRRSO21002";
- tranf_submit(oParam);
- }
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|